@theoplayer/theoads 9.9.0 → 9.10.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/THEOplayer.chromeless.d.ts +1 -1
- package/THEOplayer.chromeless.esm.js +2 -2
- package/THEOplayer.chromeless.js +3 -3
- package/THEOplayer.common.d.ts +39 -0
- package/THEOplayer.common.esm.js +3 -3
- package/THEOplayer.d.ts +1 -1
- package/THEOplayer.esm.js +3 -3
- package/THEOplayer.js +3 -3
- package/THEOplayer.transmux.asmjs.js +3 -3
- package/THEOplayer.transmux.js +3 -3
- package/package.json +1 -1
- package/theoplayer.d.js +3 -3
- package/theoplayer.sw.js +3 -3
package/theoplayer.sw.js
CHANGED
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
THEOplayer is based on patented technology developed by
|
|
25
25
|
THEO Technologies (https://www.theoplayer.com).
|
|
26
26
|
|
|
27
|
-
Version: 9.
|
|
28
|
-
Created: 2025-
|
|
27
|
+
Version: 9.10.1
|
|
28
|
+
Created: 2025-08-13T16:09:43.040Z
|
|
29
29
|
*/
|
|
30
|
-
!function(t){"use strict";var n,i,e,r,o,u,s,f,h,c=t.window,a=t.document,v=(t.location,t.navigator),d=t.setTimeout,l=t.clearTimeout,w=t.setInterval,b=t.clearInterval,g=t.Error,m=t.TypeError,p=(t.SyntaxError,t.Object),y=t.Math,_=t.parseInt,S=t.parseFloat,T=t.isNaN,I=t.Uint8Array,E=(t.Worker,t.WorkerGlobalScope,t.XMLHttpRequest),k=p.create,R=p.defineProperty,O=p.getOwnPropertyDescriptor,N=p.getOwnPropertyNames,P=p.getPrototypeOf,A=p.prototype.hasOwnProperty,D=function(t,n){return function(){return t&&(n=t(t=0)),n}},C=function(t,n){return function(){return n||t((n={exports:{}}).exports,n),n.exports}},x=D(function(){"function"==typeof Symbol&&Symbol.iterator?(n=Symbol,i=null!=(u=Symbol.for)?u:Symbol,e=Symbol.iterator,r=null!=(s=Symbol.dispose)?s:i("Symbol.dispose"),o=null!=(f=Symbol.asyncDispose)?f:i("Symbol.asyncDispose")):(h=0,n=function(t){return"hd"+t+"_"+ ++h},e=(i=function(t){return"hd"+t})("Symbol.iterator"),r=i("Symbol.dispose"),o=i("Symbol.asyncDispose"),n.for=i,n.iterator=e,n.dispose=r,n.asyncDispose=o)});function B(t,i){return null!=i&&void 0!==n&&i[n.hasInstance]?!!i[n.hasInstance](t):t instanceof i}var M=D(function(){x(),pt()});function L(t){return t&&void 0!==n&&t.constructor===n?"symbol":typeof t}var U,F,z,W,V,q,H,X,j,Y,K,G,$,Z,J,Q,tt,nt,it,et=D(function(){x(),pt()});function rt(t){var n=this.constructor;return this.then(function(i){return n.resolve(t()).then(function(){return i})},function(i){return n.resolve(t()).then(function(){return n.reject(i)})})}function ot(t){return new this(function(n,i){if(!t||void 0===t.length)return i(new m((void 0===t?"undefined":L(t))+" "+t+" is not iterable(cannot read property Symbol(Symbol.iterator))"));var e=Array.prototype.slice.call(t);if(0===e.length)return n([]);var r=e.length;function o(t,i){if(i&&("object"===(void 0===i?"undefined":L(i))||"function"==typeof i)){var u=i.then;if("function"==typeof u)return void u.call(i,function(n){o(t,n)},function(i){e[t]={status:"rejected",reason:i},0===--r&&n(e)})}e[t]={status:"fulfilled",value:i},0===--r&&n(e)}for(var u=0;u<e.length;u++)o(u,e[u])})}function ut(t){return Boolean(t&&void 0!==t.length)}function st(){}function ft(t){if(!B(this,ft))throw new m("Promises must be constructed via new");if("function"!=typeof t)throw new m("not a function");this.Ra=0,this.ttn=!1,this.HSt=void 0,this.ntn=[],lt(t,this)}function ht(t,n){for(;3===t.Ra;)t=t.HSt;0!==t.Ra?(t.ttn=!0,ft.itn(function(){var i=1===t.Ra?n.onFulfilled:n.onRejected;if(null!==i){var e;try{e=i(t.HSt)}catch(t){return void at(n.promise,t)}ct(n.promise,e)}else(1===t.Ra?ct:at)(n.promise,t.HSt)})):t.ntn.push(n)}function ct(t,n){try{if(n===t)throw new m("A promise cannot be resolved with itself.");if(n&&("object"===(void 0===n?"undefined":L(n))||"function"==typeof n)){var i=n.then;if(B(n,ft))return t.Ra=3,t.HSt=n,void vt(t);if("function"==typeof i)return void lt(function(t,n){return function(){t.apply(n,arguments)}}(i,n),t)}t.Ra=1,t.HSt=n,vt(t)}catch(n){at(t,n)}}function at(t,n){t.Ra=2,t.HSt=n,vt(t)}function vt(t){2===t.Ra&&0===t.ntn.length&&ft.itn(function(){t.ttn||ft.rtn(t.HSt)});for(var n=0,i=t.ntn.length;n<i;n++)ht(t,t.ntn[n]);t.ntn=null}function dt(t,n,i){this.onFulfilled="function"==typeof t?t:null,this.onRejected="function"==typeof n?n:null,this.promise=i}function lt(t,n){var i=!1;try{t(function(t){i||(i=!0,ct(n,t))},function(t){i||(i=!0,at(n,t))})}catch(t){if(i)return;i=!0,at(n,t)}}function wt(t){return new G(K,{reason:t,promise:F.reject(t).catch(function(){}),cancelable:!0})}function bt(t){var n=new $(K,{detail:{reason:t},cancelable:!0});return p.defineProperty(n,"reason",{value:t}),n}function gt(t){var n=a.createEvent("CustomEvent");return n.initCustomEvent(K,!1,!0,{reason:t}),n}var mt=D(function(){var t,n,i,e;x(),pt(),M(),et(),U=d,ft.prototype.catch=function(t){return this.then(null,t)},ft.prototype.then=function(t,n){var i=new this.constructor(st);return ht(this,new dt(t,n,i)),i},ft.prototype.finally=rt,ft.all=function(t){return new ft(function(n,i){if(!ut(t))return i(new m("Promise.all accepts an array"));var e=Array.prototype.slice.call(t);if(0===e.length)return n([]);var r=e.length;function o(t,u){try{if(u&&("object"===(void 0===u?"undefined":L(u))||"function"==typeof u)){var s=u.then;if("function"==typeof s)return void s.call(u,function(n){o(t,n)},i)}e[t]=u,0===--r&&n(e)}catch(t){i(t)}}for(var u=0;u<e.length;u++)o(u,e[u])})},ft.allSettled=ot,ft.resolve=function(t){return t&&"object"===(void 0===t?"undefined":L(t))&&t.constructor===ft?t:new ft(function(n){n(t)})},ft.reject=function(t){return new ft(function(n,i){i(t)})},ft.race=function(t){return new ft(function(n,i){if(!ut(t))return i(new m("Promise.race accepts an array"));for(var e=0,r=t.length;e<r;e++)ft.resolve(t[e]).then(n,i)})},ft.itn="function"==typeof setImmediate&&function(t){setImmediate(t)}||function(t){U(t,0)},ft.rtn=function(t){"undefined"!=typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",t)},F=function(){var t=self.Promise;if(void 0!==t)try{if(-1!==t.toString().indexOf("[native code]"))return t}catch(t){}}(),z=v?v.userAgent:"",W=z.match(/Firefox\/([0-9]+)/i),V=null!=W,q=W?Number(W[1]):0,H=z.match(/(Version)\/((\d+)\.(\d+)(?:\.(\d+))?).*Safari/),X=null!=H,j=H?Number(H[3]):0,Y=function(){function t(t){this.qy=0,this.Ld=0,this.Xm=[],this.etn=t}return t.prototype.stn=function(t){var n=this.length();this.utn(n+1);var i=this.Ld+n&this.etn-1;this.Xm[i]=t,this.qy=n+1},t.prototype.push=function(t){var n=this.length()+1;if(this.etn<n)this.stn(t);else{var i=this.Ld+n-1,e=this.etn-1;this.Xm[i&e]=t,this.qy=n}},t.prototype.shift=function(){var t=this.Ld,n=this.Xm[t];return this.Xm[t]=void 0,this.Ld=t+1&this.etn-1,this.qy--,n},t.prototype.length=function(){return this.qy},t.prototype.utn=function(t){this.etn<t&&this.otn(this.etn<<1)},t.prototype.otn=function(t){var n=this.etn;this.etn=t;var i=this.Ld+this.qy&n-1;!function(t,n,i,e){for(var r=0;r<e;++r)t[r+i]=t[r+n],t[r+n]=void 0}(this.Xm,0,n,i)},t}(),K="unhandledrejection",G=self.PromiseRejectionEvent,$=self.CustomEvent,Z=function(t){return Z=function(){try{var t=F.resolve(),n="error",i=new G(K,{reason:n,promise:t});return K===i.type&&n===i.reason}catch(t){}return!1}()?wt:function(){try{var t="error",n=new $(K,{detail:{reason:t}});return K===n.type&&t===n.detail.reason}catch(t){}return!1}()?bt:gt,Z(t)},Q=V&&q<60||X&&j<15,F&&!Q?(tt=F,function(){}):(tt=ft,nt=null!==(J=function(){var t=self.queueMicrotask;if("function"==typeof t)return function(n){return t(n)};var n=F;if(n&&"function"==typeof n.resolve){var i=n.resolve();return function(t){return i.then(t)}}}())&&void 0!==J?J:ft.itn,t=nt,n=new Y(16),i=!1,(it={e6:function(r){n.push(r),i||(i=!0,t(e))},UY:e=function(){for(;n.length()>0;)n.shift()();i=!1}}).UY,ft.itn=it.e6,ft.rtn=function(t){try{var n=Z(t);if(!self.dispatchEvent(n)||n.defaultPrevented)return}catch(t){}d(function(){throw new g("Unhandled promise rejection: ".concat(t))},0)})}),pt=D(function(){mt()}),yt=C(function(t,i){var r,o;x(),pt(),et(),r=t,o=function(t){var i="function"==typeof n&&"symbol"===L(e)?n:function(t){return"Symbol("+t+")"};function r(){}var o=Number.isNaN||function(t){return t!=t},u=r;function s(t){return"object"===(void 0===t?"undefined":L(t))&&null!==t||"function"==typeof t}function f(t){return t.slice()}function h(t,n,i,e,r){new I(t).set(new I(i,e,r),n)}function c(t){return!1!==function(t){return"number"==typeof t&&(!o(t)&&!(t<0))}(t)&&t!==1/0}function a(t,n,i){if("function"!=typeof t)throw new m("Argument is not a function");return Function.prototype.apply.call(t,n,i)}function v(t,n,i,e){var r=t[n];if(void 0!==r){if("function"!=typeof r)throw new m(r+" is not a method");switch(i){case 0:return function(){return l(r,t,e)};case 1:return function(n){var i=[n].concat(e);return l(r,t,i)}}}return function(){return R(void 0)}}function d(t,n,i){var e=t[n];if(void 0!==e)return a(e,t,i)}function l(t,n,i){try{return R(a(t,n,i))}catch(t){return O(t)}}function w(t){if(t=Number(t),o(t)||t<0)throw new RangeError("highWaterMark property of a queuing strategy must be non-negative and non-NaN");return t}function b(t){if(void 0===t)return function(){return 1};if("function"!=typeof t)throw new m("size property of a queuing strategy must be a function");return function(n){return t(n)}}var _=tt,S=tt.prototype.then,T=tt.resolve.bind(_),E=tt.reject.bind(_);function k(t){return new _(t)}function R(t){return T(t)}function O(t){return E(t)}function N(t,n,i){return S.call(t,n,i)}function P(t,n,i){N(N(t,n,i),void 0,u)}function A(t,n){P(t,n)}function D(t,n){P(t,void 0,n)}function C(t,n,i){return N(t,n,i)}function x(t){N(t,void 0,u)}var B=function(){function t(){this.Rd=0,this.Dd=0,this.Ld={Od:[],Fd:void 0},this.Vd=this.Ld,this.Rd=0,this.Dd=0}return p.defineProperty(t.prototype,"length",{get:function(){return this.Dd},enumerable:!0,configurable:!0}),t.prototype.push=function(t){var n=this.Vd,i=n;16383===n.Od.length&&(i={Od:[],Fd:void 0}),n.Od.push(t),i!==n&&(this.Vd=i,n.Fd=i),++this.Dd},t.prototype.shift=function(){var t=this.Ld,n=t,i=this.Rd,e=i+1,r=t.Od,o=r[i];return 16384===e&&(n=t.Fd,e=0),--this.Dd,this.Rd=e,t!==n&&(this.Ld=n),r[i]=void 0,o},t.prototype.forEach=function(t){for(var n=this.Rd,i=this.Ld,e=i.Od;!(n===e.length&&void 0===i.Fd||n===e.length&&(n=0,0===(e=(i=i.Fd).Od).length));)t(e[n]),++n},t.prototype.peek=function(){var t=this.Ld,n=this.Rd;return t.Od[n]},t}();function M(t,n,i){var e=null;!0===i&&(e=p.prototype);var r=p.create(e);return r.value=t,r.done=n,r}function U(t,n){t.Wd=!0,t.Ud=n,n.Gd=t,"readable"===n.Ra?V(t):"closed"===n.Ra?function(t){V(t),X(t)}(t):q(t,n.Xd)}function F(t,n){return Zn(t.Ud,n)}function z(t){"readable"===t.Ud.Ra?H(t,new m("Reader was released and can no longer be used to monitor the stream's closedness")):function(t,n){q(t,n)}(t,new m("Reader was released and can no longer be used to monitor the stream's closedness")),t.Ud.Gd=void 0,t.Ud=void 0}function W(t){return new m("Cannot "+t+" a stream using a released reader")}function V(t){t.Zd=k(function(n,i){t.Hd=n,t.zd=i})}function q(t,n){V(t),H(t,n)}function H(t,n){x(t.Zd),t.zd(n),t.Hd=void 0,t.zd=void 0}function X(t){t.Hd(void 0),t.Hd=void 0,t.zd=void 0}var j=i("[[CancelSteps]]"),Y=i("[[PullSteps]]");function K(t,n){void 0===n&&(n=!1);var i=new it(t);return i.Wd=n,i}function G(t){return k(function(n,i){var e={Yd:n,Kd:i};t.Gd.qd.push(e)})}function $(t,n,i){var e=t.Gd;e.qd.shift().Yd(M(n,i,e.Wd))}function Z(t){return t.Gd.qd.length}function J(t){var n=t.Gd;return void 0!==n&&!!et(n)}var Q,nt,it=function(){function t(t){if(!1===Gn(t))throw new m("ReadableStreamDefaultReader can only be constructed with a ReadableStream instance");if(!0===$n(t))throw new m("This stream has already been locked for exclusive reading by another reader");U(this,t),this.qd=new B}return p.defineProperty(t.prototype,"closed",{get:function(){return et(this)?this.Zd:O(ot("closed"))},enumerable:!0,configurable:!0}),t.prototype.cancel=function(t){return et(this)?void 0===this.Ud?O(W("cancel")):F(this,t):O(ot("cancel"))},t.prototype.read=function(){return et(this)?void 0===this.Ud?O(W("read from")):rt(this):O(ot("read"))},t.prototype.releaseLock=function(){if(!et(this))throw ot("releaseLock");if(void 0!==this.Ud){if(this.qd.length>0)throw new m("Tried to release a reader lock when that reader has pending read() calls un-settled");z(this)}},t}();function et(t){return!!s(t)&&!!p.prototype.hasOwnProperty.call(t,"qd")}function rt(t){var n=t.Ud;return n.Qd=!0,"closed"===n.Ra?R(M(void 0,!0,t.Wd)):"errored"===n.Ra?O(n.Xd):n.Jd[Y]()}function ot(t){return new m("ReadableStreamDefaultReader.prototype."+t+" can only be used on a ReadableStreamDefaultReader")}"symbol"===L(i.asyncIterator)&&((Q={})[i.asyncIterator]=function(){return this},nt=Q,p.defineProperty(nt,i.asyncIterator,{enumerable:!1}));var ut={next:function(){if(!1===st(this))return O(ft("next"));var t=this.$d;return void 0===t.Ud?O(W("iterate")):C(rt(t),function(n){var i=n.done;return i&&z(t),M(n.value,i,!0)})},return:function(t){if(!1===st(this))return O(ft("next"));var n=this.$d;if(void 0===n.Ud)return O(W("finish iterating"));if(n.qd.length>0)return O(new m("Tried to release a reader lock when that reader has pending read() calls un-settled"));if(!1===this.ul){var i=F(n,t);return z(n),C(i,function(){return M(t,!0,!0)})}return z(n),R(M(t,!0,!0))}};function st(t){return!!s(t)&&!!p.prototype.hasOwnProperty.call(t,"$d")}function ft(t){return new m("ReadableStreamAsyncIterator."+t+" can only be used on a ReadableSteamAsyncIterator")}function ht(t){var n=t.tf.shift();return t.if-=n.size,t.if<0&&(t.if=0),n.value}function ct(t,n,i){if(!c(i=Number(i)))throw new RangeError("Size must be a finite, non-NaN, non-negative number.");t.tf.push({value:n,size:i}),t.if+=i}function at(t){t.tf=new B,t.if=0}void 0!==nt&&p.setPrototypeOf(ut,nt),p.defineProperty(ut,"next",{enumerable:!1}),p.defineProperty(ut,"return",{enumerable:!1});var vt=i("[[AbortSteps]]"),dt=i("[[ErrorSteps]]"),lt=function(){function t(t,n){void 0===t&&(t={}),void 0===n&&(n={}),bt(this);var i=n.size,e=n.highWaterMark;if(void 0!==t.type)throw new RangeError("Invalid type is specified");var r=b(i);void 0===e&&(e=1),function(t,n,i,e){var r=p.create(xt.prototype);function o(){return d(n,"start",[r])}var u=v(n,"write",1,[r]),s=v(n,"close",0,[]),f=v(n,"abort",1,[]);Bt(t,r,o,u,s,f,i,e)}(this,t,e=w(e),r)}return p.defineProperty(t.prototype,"locked",{get:function(){if(!1===gt(this))throw Vt("locked");return mt(this)},enumerable:!0,configurable:!0}),t.prototype.abort=function(t){return!1===gt(this)?O(Vt("abort")):!0===mt(this)?O(new m("Cannot abort a stream that already has a writer")):pt(this,t)},t.prototype.close=function(){return!1===gt(this)?O(Vt("close")):!0===mt(this)?O(new m("Cannot close a stream that already has a writer")):!0===It(this)?O(new m("Cannot close an already-closing stream")):yt(this)},t.prototype.getWriter=function(){if(!1===gt(this))throw Vt("getWriter");return wt(this)},t}();function wt(t){return new Rt(t)}function bt(t){t.Ra="writable",t.Xd=void 0,t.ef=void 0,t.nf=void 0,t.rf=new B,t.hf=void 0,t.uf=void 0,t.cf=void 0,t.df=void 0,t.lf=!1}function gt(t){return!!s(t)&&!!p.prototype.hasOwnProperty.call(t,"nf")}function mt(t){return void 0!==t.ef}function pt(t,n){var i=t.Ra;if("closed"===i||"errored"===i)return R(void 0);if(void 0!==t.df)return t.df.vf;var e=!1;"erroring"===i&&(e=!0,n=void 0);var r=k(function(i,r){t.df={vf:void 0,Yd:i,Kd:r,_f:n,gf:e}});return t.df.vf=r,!1===e&&St(t,n),r}function yt(t){var n=t.Ra;if("closed"===n||"errored"===n)return O(new m("The stream (in "+n+" state) is not in the writable state and cannot be closed"));var i=k(function(n,i){var e={Yd:n,Kd:i};t.uf=e}),e=t.ef;return void 0!==e&&!0===t.lf&&"writable"===n&&Qt(e),function(t){ct(t,"close",0),Ut(t)}(t.nf),i}function _t(t,n){"writable"!==t.Ra?Tt(t):St(t,n)}function St(t,n){var i=t.nf;t.Ra="erroring",t.Xd=n;var e=t.ef;void 0!==e&&At(e,n),!1===function(t){return void 0!==t.hf||void 0!==t.cf}(t)&&!0===i.mf&&Tt(t)}function Tt(t){t.Ra="errored",t.nf[dt]();var n=t.Xd;if(t.rf.forEach(function(t){t.Kd(n)}),t.rf=new B,void 0!==t.df){var i=t.df;if(t.df=void 0,!0===i.gf)return i.Kd(n),void Et(t);P(t.nf[vt](i._f),function(){i.Yd(),Et(t)},function(n){i.Kd(n),Et(t)})}else Et(t)}function It(t){return void 0!==t.uf||void 0!==t.cf}function Et(t){void 0!==t.uf&&(t.uf.Kd(t.Xd),t.uf=void 0);var n=t.ef;void 0!==n&&Yt(n,t.Xd)}function kt(t,n){var i=t.ef;void 0!==i&&n!==t.lf&&(!0===n?function(t){Gt(t)}(i):Qt(i)),t.lf=n}var Rt=function(){function t(t){if(!1===gt(t))throw new m("WritableStreamDefaultWriter can only be constructed with a WritableStream instance");if(!0===mt(t))throw new m("This stream has already been locked for exclusive writing by another writer");this.pf=t,t.ef=this;var n=t.Ra;if("writable"===n)!1===It(t)&&!0===t.lf?Gt(this):Zt(this),Xt(this);else if("erroring"===n)$t(this,t.Xd),Xt(this);else if("closed"===n)Zt(this),function(t){Xt(t),Kt(t)}(this);else{var i=t.Xd;$t(this,i),jt(this,i)}}return p.defineProperty(t.prototype,"closed",{get:function(){return!1===Ot(this)?O(qt("closed")):this.Zd},enumerable:!0,configurable:!0}),p.defineProperty(t.prototype,"desiredSize",{get:function(){if(!1===Ot(this))throw qt("desiredSize");if(void 0===this.pf)throw Ht("desiredSize");return function(t){var n=t.pf,i=n.Ra;return"errored"===i||"erroring"===i?null:"closed"===i?0:Lt(n.nf)}(this)},enumerable:!0,configurable:!0}),p.defineProperty(t.prototype,"ready",{get:function(){return!1===Ot(this)?O(qt("ready")):this.wf},enumerable:!0,configurable:!0}),t.prototype.abort=function(t){return!1===Ot(this)?O(qt("abort")):void 0===this.pf?O(Ht("abort")):function(t,n){var i=t.pf;return pt(i,n)}(this,t)},t.prototype.close=function(){if(!1===Ot(this))return O(qt("close"));var t=this.pf;return void 0===t?O(Ht("close")):!0===It(t)?O(new m("Cannot close an already-closing stream")):Nt(this)},t.prototype.releaseLock=function(){if(!1===Ot(this))throw qt("releaseLock");void 0!==this.pf&&Dt(this)},t.prototype.write=function(t){return!1===Ot(this)?O(qt("write")):void 0===this.pf?O(Ht("write to")):Ct(this,t)},t}();function Ot(t){return!!s(t)&&!!p.prototype.hasOwnProperty.call(t,"pf")}function Nt(t){return yt(t.pf)}function Pt(t,n){"pending"===t.yf?Yt(t,n):function(t,n){jt(t,n)}(t,n)}function At(t,n){"pending"===t.bf?Jt(t,n):function(t,n){$t(t,n)}(t,n)}function Dt(t){var n=t.pf,i=new m("Writer was released and can no longer be used to monitor the stream's closedness");At(t,i),Pt(t,i),n.ef=void 0,t.pf=void 0}function Ct(t,n){var i=t.pf,e=i.nf,r=function(t,n){try{return t.Af(n)}catch(n){return Ft(t,n),1}}(e,n);if(i!==t.pf)return O(Ht("write to"));var o=i.Ra;if("errored"===o)return O(i.Xd);if(!0===It(i)||"closed"===o)return O(new m("The stream is closing or closed and cannot be written to"));if("erroring"===o)return O(i.Xd);var u=function(t){return k(function(n,i){var e={Yd:n,Kd:i};t.rf.push(e)})}(i);return function(t,n,i){var e={chunk:n};try{ct(t,e,i)}catch(n){return void Ft(t,n)}var r=t.Sf;!1===It(r)&&"writable"===r.Ra&&kt(r,zt(t)),Ut(t)}(e,n,r),u}var xt=function(){function t(){throw new m("WritableStreamDefaultController cannot be constructed explicitly")}return t.prototype.error=function(t){if(!1===function(t){return!!s(t)&&!!p.prototype.hasOwnProperty.call(t,"Sf")}(this))throw new m("WritableStreamDefaultController.prototype.error can only be used on a WritableStreamDefaultController");"writable"===this.Sf.Ra&&Wt(this,t)},t.prototype[vt]=function(t){var n=this.Tf(t);return Mt(this),n},t.prototype[dt]=function(){at(this)},t}();function Bt(t,n,i,e,r,o,u,s){n.Sf=t,t.nf=n,n.tf=void 0,n.if=void 0,at(n),n.mf=!1,n.Af=s,n.kf=u,n.Ef=e,n.Rf=r,n.Tf=o;var f=zt(n);kt(t,f),P(R(i()),function(){n.mf=!0,Ut(n)},function(i){n.mf=!0,_t(t,i)})}function Mt(t){t.Ef=void 0,t.Rf=void 0,t.Tf=void 0,t.Af=void 0}function Lt(t){return t.kf-t.if}function Ut(t){var n=t.Sf;if(!1!==t.mf&&void 0===n.hf)if("erroring"!==n.Ra){if(0!==t.tf.length){var i=function(t){return t.tf.peek().value}(t);"close"===i?function(t){var n=t.Sf;(function(t){t.cf=t.uf,t.uf=void 0})(n),ht(t);var i=t.Rf();Mt(t),P(i,function(){!function(t){t.cf.Yd(void 0),t.cf=void 0,"erroring"===t.Ra&&(t.Xd=void 0,void 0!==t.df&&(t.df.Yd(),t.df=void 0)),t.Ra="closed";var n=t.ef;void 0!==n&&Kt(n)}(n)},function(t){!function(t,n){t.cf.Kd(n),t.cf=void 0,void 0!==t.df&&(t.df.Kd(n),t.df=void 0),_t(t,n)}(n,t)})}(t):function(t,n){var i=t.Sf;!function(t){t.hf=t.rf.shift()}(i);var e=t.Ef(n);P(e,function(){!function(t){t.hf.Yd(void 0),t.hf=void 0}(i);var n=i.Ra;if(ht(t),!1===It(i)&&"writable"===n){var e=zt(t);kt(i,e)}Ut(t)},function(n){"writable"===i.Ra&&Mt(t),function(t,n){t.hf.Kd(n),t.hf=void 0,_t(t,n)}(i,n)})}(t,i.chunk)}}else Tt(n)}function Ft(t,n){"writable"===t.Sf.Ra&&Wt(t,n)}function zt(t){return Lt(t)<=0}function Wt(t,n){var i=t.Sf;Mt(t),St(i,n)}function Vt(t){return new m("WritableStream.prototype."+t+" can only be used on a WritableStream")}function qt(t){return new m("WritableStreamDefaultWriter.prototype."+t+" can only be used on a WritableStreamDefaultWriter")}function Ht(t){return new m("Cannot "+t+" a stream using a released writer")}function Xt(t){t.Zd=k(function(n,i){t.Hd=n,t.zd=i,t.yf="pending"})}function jt(t,n){Xt(t),Yt(t,n)}function Yt(t,n){x(t.Zd),t.zd(n),t.Hd=void 0,t.zd=void 0,t.yf="rejected"}function Kt(t){t.Hd(void 0),t.Hd=void 0,t.zd=void 0,t.yf="resolved"}function Gt(t){t.wf=k(function(n,i){t.If=n,t.xf=i}),t.bf="pending"}function $t(t,n){Gt(t),Jt(t,n)}function Zt(t){Gt(t),Qt(t)}function Jt(t,n){x(t.wf),t.xf(n),t.If=void 0,t.xf=void 0,t.bf="rejected"}function Qt(t){t.If(void 0),t.If=void 0,t.xf=void 0,t.bf="fulfilled"}function tn(t){if("object"!==(void 0===t?"undefined":L(t))||null===t)return!1;try{return"boolean"==typeof t.aborted}catch(t){return!1}}var nn,en="undefined"!=typeof DOMException?DOMException:void 0,rn=function(t){if("function"!=typeof t&&"object"!==(void 0===t?"undefined":L(t)))return!1;try{return new t,!0}catch(t){return!1}}(en)?en:((nn=function(t,n){this.message=t||"",this.name=n||"Error",g.captureStackTrace&&g.captureStackTrace(this,this.constructor)}).prototype=p.create(g.prototype),p.defineProperty(nn.prototype,"constructor",{value:nn,writable:!0,configurable:!0}),nn);function on(t,n,i,e,o,u){var s=K(t),f=wt(n);t.Qd=!0;var h=!1,c=R(void 0);return k(function(a,v){var d,l,w,b;if(void 0!==u){if(d=function(){var i=new rn("Aborted","AbortError"),r=[];!1===e&&r.push(function(){return"writable"===n.Ra?pt(n,i):R(void 0)}),!1===o&&r.push(function(){return"readable"===t.Ra?Zn(t,i):R(void 0)}),_(function(){return tt.all(r.map(function(t){return t()}))},!0,i)},!0===u.aborted)return void d();u.addEventListener("abort",d)}if(y(t,s.Zd,function(t){!1===e?_(function(){return pt(n,t)},!0,t):S(!0,t)}),y(n,f.Zd,function(n){!1===o?_(function(){return Zn(t,n)},!0,n):S(!0,n)}),l=t,w=s.Zd,b=function(){!1===i?_(function(){return function(t){var n=t.pf,i=n.Ra;return!0===It(n)||"closed"===i?R(void 0):"errored"===i?O(n.Xd):Nt(t)}(f)}):S()},"closed"===l.Ra?b():A(w,b),!0===It(n)||"closed"===n.Ra){var g=new m("the destination writable stream closed before all data could be piped to it");!1===o?_(function(){return Zn(t,g)},!0,g):S(!0,g)}function p(){var t=c;return N(c,function(){return t!==c?p():void 0})}function y(t,n,i){"errored"===t.Ra?i(t.Xd):D(n,i)}function _(t,i,e){function r(){P(t(),function(){return T(i,e)},function(t){return T(!0,t)})}!0!==h&&(h=!0,"writable"===n.Ra&&!1===It(n)?A(p(),r):r())}function S(t,i){!0!==h&&(h=!0,"writable"===n.Ra&&!1===It(n)?A(p(),function(){return T(t,i)}):T(t,i))}function T(t,n){Dt(f),z(s),void 0!==u&&u.removeEventListener("abort",d),t?v(n):a(void 0)}x(k(function(t,n){!function i(e){e?t():N(!0===h?R(!0):N(f.wf,function(){return N(rt(s),function(t){return!0===t.done||(c=N(Ct(f,t.value),void 0,r),!1)})}),i,n)}(!1)}))})}var un=function(){function t(){throw new m}return p.defineProperty(t.prototype,"desiredSize",{get:function(){if(!1===sn(this))throw gn("desiredSize");return ln(this)},enumerable:!0,configurable:!0}),t.prototype.close=function(){if(!1===sn(this))throw gn("close");if(!1===wn(this))throw new m("The stream is not in a state that permits close");an(this)},t.prototype.enqueue=function(t){if(!1===sn(this))throw gn("enqueue");if(!1===wn(this))throw new m("The stream is not in a state that permits enqueue");return vn(this,t)},t.prototype.error=function(t){if(!1===sn(this))throw gn("error");dn(this,t)},t.prototype[j]=function(t){at(this);var n=this.Cf(t);return cn(this),n},t.prototype[Y]=function(){var t=this.Pf;if(this.tf.length>0){var n=ht(this);return!0===this.Nf&&0===this.tf.length?(cn(this),Jn(t)):fn(this),R(M(n,!1,t.Gd.Wd))}var i=G(t);return fn(this),i},t}();function sn(t){return!!s(t)&&!!p.prototype.hasOwnProperty.call(t,"Pf")}function fn(t){!1!==hn(t)&&(!0!==t.Df?(t.Df=!0,P(t.Bf(),function(){t.Df=!1,!0===t.Lf&&(t.Lf=!1,fn(t))},function(n){dn(t,n)})):t.Lf=!0)}function hn(t){var n=t.Pf;return!1!==wn(t)&&!1!==t.mf&&(!0===$n(n)&&Z(n)>0||ln(t)>0)}function cn(t){t.Bf=void 0,t.Cf=void 0,t.Af=void 0}function an(t){var n=t.Pf;t.Nf=!0,0===t.tf.length&&(cn(t),Jn(n))}function vn(t,n){var i=t.Pf;if(!0===$n(i)&&Z(i)>0)$(i,n,!1);else{var e=void 0;try{e=t.Af(n)}catch(n){throw dn(t,n),n}try{ct(t,n,e)}catch(n){throw dn(t,n),n}}fn(t)}function dn(t,n){var i=t.Pf;"readable"===i.Ra&&(at(t),cn(t),Qn(i,n))}function ln(t){var n=t.Pf.Ra;return"errored"===n?null:"closed"===n?0:t.kf-t.if}function wn(t){var n=t.Pf.Ra;return!1===t.Nf&&"readable"===n}function bn(t,n,i,e,r,o,u){n.Pf=t,n.tf=void 0,n.if=void 0,at(n),n.mf=!1,n.Nf=!1,n.Lf=!1,n.Df=!1,n.Af=u,n.kf=o,n.Bf=e,n.Cf=r,t.Jd=n,P(R(i()),function(){n.mf=!0,fn(n)},function(t){dn(n,t)})}function gn(t){return new m("ReadableStreamDefaultController.prototype."+t+" can only be used on a ReadableStreamDefaultController")}var mn=Number.isInteger||function(t){return"number"==typeof t&&isFinite(t)&&y.floor(t)===t},pn=function(){function t(){throw new m("ReadableStreamBYOBRequest cannot be used directly")}return p.defineProperty(t.prototype,"view",{get:function(){if(!1===Sn(this))throw Un("view");return this.Mf},enumerable:!0,configurable:!0}),t.prototype.respond=function(t){if(!1===Sn(this))throw Un("respond");if(void 0===this.Of)throw new m("This BYOB request has been invalidated");this.Mf.buffer,function(t,n){if(!1===c(n=Number(n)))throw new RangeError("bytesWritten must be a finite");Dn(t,n)}(this.Of,t)},t.prototype.respondWithNewView=function(t){if(!1===Sn(this))throw Un("respond");if(void 0===this.Of)throw new m("This BYOB request has been invalidated");if(!ArrayBuffer.isView(t))throw new m("You can only respond with array buffer views");t.buffer,function(t,n){var i=t.Ff.peek();if(i.byteOffset+i.bytesFilled!==n.byteOffset)throw new RangeError("The region specified by view does not match byobRequest");if(i.byteLength!==n.byteLength)throw new RangeError("The buffer of view has different capacity than byobRequest");i.buffer=n.buffer,Dn(t,n.byteLength)}(this.Of,t)},t}(),yn=function(){function t(){throw new m("ReadableByteStreamController constructor cannot be used directly")}return p.defineProperty(t.prototype,"byobRequest",{get:function(){if(!1===_n(this))throw Fn("byobRequest");if(void 0===this.Vf&&this.Ff.length>0){var t=this.Ff.peek(),n=new I(t.buffer,t.byteOffset+t.bytesFilled,t.byteLength-t.bytesFilled),i=p.create(pn.prototype);!function(t,n,i){t.Of=n,t.Mf=i}(i,this,n),this.Vf=i}return this.Vf},enumerable:!0,configurable:!0}),p.defineProperty(t.prototype,"desiredSize",{get:function(){if(!1===_n(this))throw Fn("desiredSize");return Mn(this)},enumerable:!0,configurable:!0}),t.prototype.close=function(){if(!1===_n(this))throw Fn("close");if(!0===this.Nf)throw new m("The stream has already been closed; do not close it again!");var t=this.Wf.Ra;if("readable"!==t)throw new m("The stream (in "+t+" state) is not in the readable state and cannot be closed");!function(t){var n=t.Wf;if(t.if>0)t.Nf=!0;else{if(t.Ff.length>0&&t.Ff.peek().bytesFilled>0){var i=new m("Insufficient bytes to fill elements in the given buffer");throw Bn(t,i),i}xn(t),Jn(n)}}(this)},t.prototype.enqueue=function(t){if(!1===_n(this))throw Fn("enqueue");if(!0===this.Nf)throw new m("stream is closed or draining");var n=this.Wf.Ra;if("readable"!==n)throw new m("The stream (in "+n+" state) is not in the readable state and cannot be enqueued to");if(!ArrayBuffer.isView(t))throw new m("You can only enqueue array buffer views when using a ReadableByteStreamController");t.buffer,function(t,n){var i=t.Wf,e=n.buffer,r=n.byteOffset,o=n.byteLength,u=e;!0===J(i)?0===Z(i)?kn(t,u,r,o):$(i,new I(u,r,o),!1):!0===Vn(i)?(kn(t,u,r,o),An(t)):kn(t,u,r,o),Tn(t)}(this,t)},t.prototype.error=function(t){if(!1===_n(this))throw Fn("error");Bn(this,t)},t.prototype[j]=function(t){this.Ff.length>0&&(this.Ff.peek().bytesFilled=0),at(this);var n=this.Cf(t);return xn(this),n},t.prototype[Y]=function(){var t=this.Wf;if(this.if>0){var n=this.tf.shift();this.if-=n.byteLength,Nn(this);var i=void 0;try{i=new I(n.buffer,n.byteOffset,n.byteLength)}catch(t){return O(t)}return R(M(i,!1,t.Gd.Wd))}var e=this.Uf;if(void 0!==e){var r=void 0;try{r=new ArrayBuffer(e)}catch(t){return O(t)}var o={buffer:r,byteOffset:0,byteLength:e,bytesFilled:0,elementSize:1,ctor:I,readerType:"default"};this.Ff.push(o)}var u=G(t);return Tn(this),u},t}();function _n(t){return!!s(t)&&!!p.prototype.hasOwnProperty.call(t,"Wf")}function Sn(t){return!!s(t)&&!!p.prototype.hasOwnProperty.call(t,"Of")}function Tn(t){var n=function(t){var n=t.Wf;if("readable"!==n.Ra)return!1;if(!0===t.Nf)return!1;if(!1===t.mf)return!1;if(!0===J(n)&&Z(n)>0)return!0;if(!0===Vn(n)&&Wn(n)>0)return!0;var i=Mn(t);return i>0}(t);!1!==n&&(!0!==t.Df?(t.Df=!0,P(t.Bf(),function(){t.Df=!1,!0===t.Lf&&(t.Lf=!1,Tn(t))},function(n){Bn(t,n)})):t.Lf=!0)}function In(t,n){var i=!1;"closed"===t.Ra&&(i=!0);var e=En(n);"default"===n.readerType?$(t,e,i):function(t,n,i){var e=t.Gd,r=e.Gf.shift();r.Yd(M(n,i,e.Wd))}(t,e,i)}function En(t){var n=t.bytesFilled,i=t.elementSize;return new t.ctor(t.buffer,t.byteOffset,n/i)}function kn(t,n,i,e){t.tf.push({buffer:n,byteOffset:i,byteLength:e}),t.if+=e}function Rn(t,n){var i=n.elementSize,e=n.bytesFilled-n.bytesFilled%i,r=y.min(t.if,n.byteLength-n.bytesFilled),o=n.bytesFilled+r,u=o-o%i,s=r,f=!1;u>e&&(s=u-n.bytesFilled,f=!0);for(var c=t.tf;s>0;){var a=c.peek(),v=y.min(s,a.byteLength),d=n.byteOffset+n.bytesFilled;h(n.buffer,d,a.buffer,a.byteOffset,v),a.byteLength===v?c.shift():(a.byteOffset+=v,a.byteLength-=v),t.if-=v,On(t,v,n),s-=v}return f}function On(t,n,i){Pn(t),i.bytesFilled+=n}function Nn(t){0===t.if&&!0===t.Nf?(xn(t),Jn(t.Wf)):Tn(t)}function Pn(t){void 0!==t.Vf&&(t.Vf.Of=void 0,t.Vf.Mf=void 0,t.Vf=void 0)}function An(t){for(;t.Ff.length>0;){if(0===t.if)return;var n=t.Ff.peek();!0===Rn(t,n)&&(Cn(t),In(t.Wf,n))}}function Dn(t,n){var i=t.Ff.peek();if("closed"===t.Wf.Ra){if(0!==n)throw new m("bytesWritten must be 0 when calling respond() on a closed stream");!function(t,n){n.buffer=n.buffer;var i=t.Wf;if(!0===Vn(i))for(;Wn(i)>0;)In(i,Cn(t))}(t,i)}else!function(t,n,i){if(i.bytesFilled+n>i.byteLength)throw new RangeError("bytesWritten out of range");if(On(t,n,i),!(i.bytesFilled<i.elementSize)){Cn(t);var e=i.bytesFilled%i.elementSize;if(e>0){var r=i.byteOffset+i.bytesFilled,o=i.buffer.slice(r-e,r);kn(t,o,0,o.byteLength)}i.buffer=i.buffer,i.bytesFilled-=e,In(t.Wf,i),An(t)}}(t,n,i);Tn(t)}function Cn(t){var n=t.Ff.shift();return Pn(t),n}function xn(t){t.Bf=void 0,t.Cf=void 0}function Bn(t,n){var i=t.Wf;"readable"===i.Ra&&(function(t){Pn(t),t.Ff=new B}(t),at(t),xn(t),Qn(i,n))}function Mn(t){var n=t.Wf.Ra;return"errored"===n?null:"closed"===n?0:t.kf-t.if}function Ln(t,n,i){var e=p.create(yn.prototype),r=v(n,"pull",0,[e]),o=v(n,"cancel",1,[]),u=n.autoAllocateChunkSize;if(void 0!==u&&(u=Number(u),!1===mn(u)||u<=0))throw new RangeError("autoAllocateChunkSize must be a positive integer");!function(t,n,i,e,r,o,u){n.Wf=t,n.Lf=!1,n.Df=!1,n.Vf=void 0,n.tf=n.if=void 0,at(n),n.Nf=!1,n.mf=!1,n.kf=w(o),n.Bf=e,n.Cf=r,n.Uf=u,n.Ff=new B,t.Jd=n,P(R(i()),function(){n.mf=!0,Tn(n)},function(t){Bn(n,t)})}(t,e,function(){return d(n,"start",[e])},r,o,i,u)}function Un(t){return new m("ReadableStreamBYOBRequest.prototype."+t+" can only be used on a ReadableStreamBYOBRequest")}function Fn(t){return new m("ReadableByteStreamController.prototype."+t+" can only be used on a ReadableByteStreamController")}function zn(t){return k(function(n,i){var e={Yd:n,Kd:i};t.Gd.Gf.push(e)})}function Wn(t){return t.Gd.Gf.length}function Vn(t){var n=t.Gd;return void 0!==n&&!!Hn(n)}var qn=function(){function t(t){if(!Gn(t))throw new m("ReadableStreamBYOBReader can only be constructed with a ReadableStream instance given a byte source");if(!1===_n(t.Jd))throw new m("Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte source");if($n(t))throw new m("This stream has already been locked for exclusive reading by another reader");U(this,t),this.Gf=new B}return p.defineProperty(t.prototype,"closed",{get:function(){return Hn(this)?this.Zd:O(Xn("closed"))},enumerable:!0,configurable:!0}),t.prototype.cancel=function(t){return Hn(this)?void 0===this.Ud?O(W("cancel")):F(this,t):O(Xn("cancel"))},t.prototype.read=function(t){return Hn(this)?void 0===this.Ud?O(W("read from")):ArrayBuffer.isView(t)?(t.buffer,0===t.byteLength?O(new m("view must have non-zero byteLength")):function(t,n){var i=t.Ud;return i.Qd=!0,"errored"===i.Ra?O(i.Xd):function(t,n){var i=t.Wf,e=1;n.constructor!==DataView&&(e=n.constructor.BYTES_PER_ELEMENT);var r=n.constructor,o={buffer:n.buffer,byteOffset:n.byteOffset,byteLength:n.byteLength,bytesFilled:0,elementSize:e,ctor:r,readerType:"byob"};if(t.Ff.length>0)return t.Ff.push(o),zn(i);if("closed"===i.Ra)return R(M(new r(o.buffer,o.byteOffset,0),!0,i.Gd.Wd));if(t.if>0){if(!0===Rn(t,o)){var u=En(o);return Nn(t),R(M(u,!1,i.Gd.Wd))}if(!0===t.Nf){var s=new m("Insufficient bytes to fill elements in the given buffer");return Bn(t,s),O(s)}}t.Ff.push(o);var f=zn(i);return Tn(t),f}(i.Jd,n)}(this,t)):O(new m("view must be an array buffer view")):O(Xn("read"))},t.prototype.releaseLock=function(){if(!Hn(this))throw Xn("releaseLock");if(void 0!==this.Ud){if(this.Gf.length>0)throw new m("Tried to release a reader lock when that reader has pending read() calls un-settled");z(this)}},t}();function Hn(t){return!!s(t)&&!!p.prototype.hasOwnProperty.call(t,"Gf")}function Xn(t){return new m("ReadableStreamBYOBReader.prototype."+t+" can only be used on a ReadableStreamBYOBReader")}var jn=function(){function t(t,n){void 0===t&&(t={}),void 0===n&&(n={}),Kn(this);var i=n.size,e=n.highWaterMark,r=t.type;if("bytes"===String(r)){if(void 0!==i)throw new RangeError("The strategy for a byte stream cannot have a size function");void 0===e&&(e=0),Ln(this,t,e=w(e))}else{if(void 0!==r)throw new RangeError("Invalid type is specified");var o=b(i);void 0===e&&(e=1),function(t,n,i,e){var r=p.create(un.prototype),o=v(n,"pull",0,[r]),u=v(n,"cancel",1,[]);bn(t,r,function(){return d(n,"start",[r])},o,u,i,e)}(this,t,e=w(e),o)}}return p.defineProperty(t.prototype,"locked",{get:function(){if(!1===Gn(this))throw ti("locked");return $n(this)},enumerable:!0,configurable:!0}),t.prototype.cancel=function(t){return!1===Gn(this)?O(ti("cancel")):!0===$n(this)?O(new m("Cannot cancel a stream that already has a reader")):Zn(this,t)},t.prototype.getReader=function(t){var n=(void 0===t?{}:t).mode;if(!1===Gn(this))throw ti("getReader");if(void 0===n)return K(this,!0);if("byob"===(n=String(n)))return function(t,n){void 0===n&&(n=!1);var i=new qn(t);return i.Wd=n,i}(this,!0);throw new RangeError("Invalid mode is specified")},t.prototype.pipeThrough=function(t,n){var i=t.writable,e=t.readable,r=void 0===n?{}:n,o=r.preventClose,u=r.preventAbort,s=r.preventCancel,f=r.signal;if(!1===Gn(this))throw ti("pipeThrough");if(!1===gt(i))throw new m("writable argument to pipeThrough must be a WritableStream");if(!1===Gn(e))throw new m("readable argument to pipeThrough must be a ReadableStream");if(o=Boolean(o),u=Boolean(u),s=Boolean(s),void 0!==f&&!tn(f))throw new m("ReadableStream.prototype.pipeThrough's signal option must be an AbortSignal");if(!0===$n(this))throw new m("ReadableStream.prototype.pipeThrough cannot be used on a locked ReadableStream");if(!0===mt(i))throw new m("ReadableStream.prototype.pipeThrough cannot be used on a locked WritableStream");return x(on(this,i,o,u,s,f)),e},t.prototype.pipeTo=function(t,n){var i=void 0===n?{}:n,e=i.preventClose,r=i.preventAbort,o=i.preventCancel,u=i.signal;return!1===Gn(this)?O(ti("pipeTo")):!1===gt(t)?O(new m("ReadableStream.prototype.pipeTo's first argument must be a WritableStream")):(e=Boolean(e),r=Boolean(r),o=Boolean(o),void 0===u||tn(u)?!0===$n(this)?O(new m("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream")):!0===mt(t)?O(new m("ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream")):on(this,t,e,r,o,u):O(new m("ReadableStream.prototype.pipeTo's signal option must be an AbortSignal")))},t.prototype.tee=function(){if(!1===Gn(this))throw ti("tee");var t=function(t){var n,i,e,r,o,u=K(t),s=!1,h=!1,c=!1,a=k(function(t){o=t});function v(){return!0===s||(s=!0,x(C(rt(u),function(t){if(s=!1,!0===t.done)return!1===h&&an(e.Jd),void(!1===c&&an(r.Jd));var n=t.value,i=n,o=n;!1===h&&vn(e.Jd,i),!1===c&&vn(r.Jd,o)}))),R(void 0)}function d(){}return e=Yn(d,v,function(e){if(h=!0,n=e,!0===c){var r=f([n,i]),u=Zn(t,r);o(u)}return a}),r=Yn(d,v,function(e){if(c=!0,i=e,!0===h){var r=f([n,i]),u=Zn(t,r);o(u)}return a}),D(u.Zd,function(t){dn(e.Jd,t),dn(r.Jd,t)}),[e,r]}(this);return f(t)},t.prototype.getIterator=function(t){var n=(void 0===t?{}:t).preventCancel,i=void 0!==n&&n;if(!1===Gn(this))throw ti("getIterator");return function(t,n){void 0===n&&(n=!1);var i=K(t),e=p.create(ut);return e.$d=i,e.ul=Boolean(n),e}(this,i)},t}();function Yn(t,n,i,e,r){void 0===e&&(e=1),void 0===r&&(r=function(){return 1});var o=p.create(jn.prototype);return Kn(o),bn(o,p.create(un.prototype),t,n,i,e,r),o}function Kn(t){t.Ra="readable",t.Gd=void 0,t.Xd=void 0,t.Qd=!1}function Gn(t){return!!s(t)&&!!p.prototype.hasOwnProperty.call(t,"Jd")}function $n(t){return void 0!==t.Gd}function Zn(t,n){return t.Qd=!0,"closed"===t.Ra?R(void 0):"errored"===t.Ra?O(t.Xd):(Jn(t),C(t.Jd[j](n),r))}function Jn(t){t.Ra="closed";var n=t.Gd;void 0!==n&&(et(n)&&(n.qd.forEach(function(t){t.Yd(M(void 0,!0,n.Wd))}),n.qd=new B),X(n))}function Qn(t,n){t.Ra="errored",t.Xd=n;var i=t.Gd;void 0!==i&&(et(i)?(i.qd.forEach(function(t){t.Kd(n)}),i.qd=new B):(i.Gf.forEach(function(t){t.Kd(n)}),i.Gf=new B),H(i,n))}function ti(t){return new m("ReadableStream.prototype."+t+" can only be used on a ReadableStream")}"symbol"===L(i.asyncIterator)&&p.defineProperty(jn.prototype,i.asyncIterator,{value:jn.prototype.getIterator,enumerable:!1,writable:!0,configurable:!0});var ni=function(){function t(t){var n=t.highWaterMark;this.highWaterMark=n}return t.prototype.size=function(t){return t.byteLength},t}(),ii=function(){function t(t){var n=t.highWaterMark;this.highWaterMark=n}return t.prototype.size=function(){return 1},t}(),ei=function(){function t(t,n,i){void 0===t&&(t={}),void 0===n&&(n={}),void 0===i&&(i={});var e=n.size,r=n.highWaterMark,o=i.size,u=i.highWaterMark;if(void 0!==t.writableType)throw new RangeError("Invalid writable type specified");var s=b(e);if(void 0===r&&(r=1),r=w(r),void 0!==t.readableType)throw new RangeError("Invalid readable type specified");var f,h=b(o);void 0===u&&(u=0),u=w(u),function(t,n,i,e,r,o){function u(){return n}function s(n){return function(t,n){var i=t.Xf;return!0===t.lf?C(t.Zf,function(){var e=t.Hf;if("erroring"===e.Ra)throw e.Xd;return vi(i,n)}):vi(i,n)}(t,n)}function f(n){return function(t,n){return oi(t,n),R(void 0)}(t,n)}function h(){return function(t){var n=t.zf,i=t.Xf,e=i.Yf();return ci(i),C(e,function(){if("errored"===n.Ra)throw n.Xd;var t=n.Jd;!0===wn(t)&&an(t)},function(i){throw oi(t,i),n.Xd})}(t)}function c(){return function(t){return si(t,!1),t.Zf}(t)}function a(n){return ui(t,n),R(void 0)}t.Hf=function(t,n,i,e,r,o){void 0===r&&(r=1),void 0===o&&(o=function(){return 1});var u=p.create(lt.prototype);return bt(u),Bt(u,p.create(xt.prototype),t,n,i,e,r,o),u}(u,s,h,f,i,e),t.zf=Yn(u,c,a,r,o),t.lf=void 0,t.Zf=void 0,t.Kf=void 0,si(t,!0),t.Xf=void 0}(this,k(function(t){f=t}),r,s,u,h),function(t,n){var i=p.create(fi.prototype),e=function(t){try{return ai(i,t),R(void 0)}catch(t){return O(t)}},r=n.transform;if(void 0!==r){if("function"!=typeof r)throw new m("transform is not a method");e=function(t){return l(r,n,[t,i])}}var o=v(n,"flush",0,[i]);!function(t,n,i,e){n.qf=t,t.Xf=n,n.jf=i,n.Yf=e}(t,i,e,o)}(this,t);var c=d(t,"start",[this.Xf]);f(c)}return p.defineProperty(t.prototype,"readable",{get:function(){if(!1===ri(this))throw li("readable");return this.zf},enumerable:!0,configurable:!0}),p.defineProperty(t.prototype,"writable",{get:function(){if(!1===ri(this))throw li("writable");return this.Hf},enumerable:!0,configurable:!0}),t}();function ri(t){return!!s(t)&&!!p.prototype.hasOwnProperty.call(t,"Xf")}function oi(t,n){dn(t.zf.Jd,n),ui(t,n)}function ui(t,n){ci(t.Xf),Ft(t.Hf.nf,n),!0===t.lf&&si(t,!1)}function si(t,n){void 0!==t.Zf&&t.Kf(),t.Zf=k(function(n){t.Kf=n}),t.lf=n}var fi=function(){function t(){throw new m("TransformStreamDefaultController instances cannot be created directly")}return p.defineProperty(t.prototype,"desiredSize",{get:function(){if(!1===hi(this))throw di("desiredSize");return ln(this.qf.zf.Jd)},enumerable:!0,configurable:!0}),t.prototype.enqueue=function(t){if(!1===hi(this))throw di("enqueue");ai(this,t)},t.prototype.error=function(t){if(!1===hi(this))throw di("error");!function(t,n){oi(t.qf,n)}(this,t)},t.prototype.terminate=function(){if(!1===hi(this))throw di("terminate");!function(t){var n=t.qf,i=n.zf.Jd;!0===wn(i)&&an(i);var e=new m("TransformStream terminated");ui(n,e)}(this)},t}();function hi(t){return!!s(t)&&!!p.prototype.hasOwnProperty.call(t,"qf")}function ci(t){t.jf=void 0,t.Yf=void 0}function ai(t,n){var i=t.qf,e=i.zf.Jd;if(!1===wn(e))throw new m("Readable side is not in a state that permits enqueue");try{vn(e,n)}catch(t){throw ui(i,t),i.zf.Xd}var r=function(t){return!0!==hn(t)}(e);r!==i.lf&&si(i,!0)}function vi(t,n){return C(t.jf(n),void 0,function(n){throw oi(t.qf,n),n})}function di(t){return new m("TransformStreamDefaultController.prototype."+t+" can only be used on a TransformStreamDefaultController")}function li(t){return new m("TransformStream.prototype."+t+" can only be used on a TransformStream")}t.ByteLengthQueuingStrategy=ni,t.CountQueuingStrategy=ii,t.ReadableStream=jn,t.TransformStream=ei,t.WritableStream=lt,p.defineProperty(t,"__esModule",{value:!0})},"object"===(void 0===t?"undefined":L(t))&&void 0!==i?o(t):"function"==typeof define&&define.amd?define(["exports"],o):o((r=r||self).WebStreamsPolyfill={})}),_t=C(function(t){function n(){var t=yt();return n=function(){return t},t}x(),pt(),p.defineProperty(t,"__esModule",{value:!0}),function(t,n){for(var i in n)p.defineProperty(t,i,{enumerable:!0,get:p.getOwnPropertyDescriptor(n,i).get})}(t,{get ByteLengthQueuingStrategy(){return n().ByteLengthQueuingStrategy},get CountQueuingStrategy(){return n().CountQueuingStrategy},get ReadableStream(){return n().ReadableStream},get TransformStream(){return n().TransformStream},get WritableStream(){return n().WritableStream}})});function St(t,n){return(St=p.setPrototypeOf||function(t,n){return t.__proto__=n,t})(t,n)}function Tt(t,n){if("function"!=typeof n&&null!==n)throw new m("Super expression must either be null or a function");t.prototype=p.create(n&&n.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),n&&St(t,n)}function It(t,n){for(var i=0;i<n.length;i++){var e=n[i];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),p.defineProperty(t,e.key,e)}}function Et(t,n,i){return n&&It(t.prototype,n),i&&It(t,i),t}function kt(t,n){(null==n||n>t.length)&&(n=t.length);for(var i=0,e=new Array(n);i<n;i++)e[i]=t[i];return e}function Rt(t,i){var r=void 0!==n&&t[e]||t["@@iterator"];if(r)return(r=r.call(t)).next.bind(r);if(Array.isArray(t)||(r=function(t,n){if(t){if("string"==typeof t)return kt(t,n);var i=p.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(i):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?kt(t,n):void 0}}(t))||i&&t&&"number"==typeof t.length){r&&(t=r);var o=0;return function(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}}}throw new m("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}x(),pt(),x(),pt(),x(),pt(),x(),pt(),x(),pt(),x(),pt(),x(),pt(),x(),pt(),M(),x(),pt(),M(),x(),pt(),x(),pt(),x(),pt(),x(),pt(),x(),pt(),M(),x(),pt();var Ot,Nt=((Ot={}).Sv="web",Ot.Tv="android",Ot.Ev="android-tv",Ot.Rv="ios",Ot.Iv="tvos",Ot.xv="chromecast",Ot.Cv="theoliveweb",Ot);var Pt=v?v.userAgent:"",At=Pt.match(/chrome\/([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)/i),Dt=Pt.match(/Edg\/([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)/i),Ct=Pt.match(/Android ([0-9\.]+)/i),xt=Pt.match(/Windows NT ([0-9\.]+)/i),Bt=Pt.match(/(Version)\/((\d+)\.(\d+)(?:\.(\d+))?).*Safari/),Mt=Pt.match(/Firefox\/([0-9\.]+)/i),Lt=Pt.match(/OPR\/(\d+\.\d+)/i),Ut=Pt.match(/Tizen ([0-9\.]+)/i),Ft=Pt.match(/(iPhone OS|iPad OS|iPod OS|Mac OS X) (\d+)_(\d+)_?(\d+)?/),zt=Pt.match(/HbbTV\/([0-9.]+)/i),Wt=function(){function t(){this.Pv=Boolean("ontouchstart"in self||self.DocumentTouch&&B(a,self.DocumentTouch)||v&&v.msMaxTouchPoints),this.Dv=/(mac\sos\sx)\s?([\w\s\.]+\w)*/i.test(Pt)||/(macintosh|mac(?=_powerpc)\s)/i.test(Pt),this.Lv=/Windows NT/i.test(Pt),this.Ov=xt?S(xt[1]):0,this.Vv=/Android/i.test(Pt),this.Uv=Ct?S(Ct[1]):0,this.Xv=/windows phone (8|8\.1)/i.test(Pt),this.Hv=/iPhone/i.test(Pt),this.Yv=/iPad/i.test(Pt),this.qv=this.Dv&&this.Pv&&!this.Yv,this.Jv=/iPod/i.test(Pt),this.r_=/Mobile Safari/i.test(Pt),this.s_=/EOS\d*STB/i.test(Pt),this.n_=/APP\d*STB/i.test(Pt),this.$v=(this.Hv||this.Yv||this.qv||this.Jv)&&!this.Xv,this.i_=Ft?S(Ft[2]):0,this.h_=this.Xv||this.$v||this.Vv||this.r_,this.a_=/CriOS/i.test(Pt),this.c_=Boolean(self.chrome&&/google/i.test(v.vendor))||this.a_,this.__=this.c_&&/Edg\//i.test(v.userAgent),this.m_=Dt?_(Dt[1],10):0,this.Ig=Boolean(/CriOS/i.test(Pt)),this.Rg=Boolean(self.chrome||/Chrome/i.test(Pt)||this.Ig),this.f_=At?_(At[1],10):0,this.y_=/SMART-TV.*Tizen/i.test(Pt),this.A_=Ut?S(Ut[1]):0,this.l_=this.A_>0?function(t){return t>=8?108:t>=7?94:t>=6.5?85:t>=6?76:t>=5.5?69:t>=5?63:t>=4?56:t>=3?47:0}(this.A_):void 0,this.T_=/webos|web0s/i.test(Pt),this.E_=/HbbTV/i.test(Pt),this.I_=!!zt&&function(t){if(!t)return!1;var n=t.split(".").map(Number);return 3===n.length&&1===n[0]&&2===n[1]}(zt[1]),this.C_=/VIZIO/i.test(Pt),this.N_=/Edge\/\d+/i.test(Pt),this.B_=/Trident/i.test(Pt),this.M_=this.B_&&!self.ActiveXObject&&"ActiveXObject"in self,this.F_=/Vivaldi/i.test(Pt),this.W_=/Firefox/i.test(Pt)&&!/Seamonkey/i.test(Pt),this.G_=Mt?S(Mt[1]):0,this.Z_=/Safari/i.test(Pt)&&!/Chrome/i.test(Pt)&&!this.Xv&&!this.y_,this.z_=Bt?S(Bt[2]):0,this.K_=Boolean(Lt),this.j_=Lt?S(Lt[1]):0,this.J_=/CrKey/.test(Pt),this.rg=/\b(tv|smart-tv|smarttv|appletv|crkey|googletv|hbbtv|pov_tv|roku|viera|nettv|philipstv|vizio)\b/i.test(Pt),this.ag=/PlayStation 4/i.test(Pt),this.dg="web"===Nt.Ev,this.vg="web"===Nt.Tv,this.gg=this.vg||this.dg,this.wg="web"===Nt.Rv,this.Ag="web"===Nt.Iv,this.Tg="web"===Nt.xv}return Et(t,[{key:"Ke",get:function(){return this.Pv}},{key:"Nv",get:function(){return this.Dv}},{key:"Bv",get:function(){return this.Lv}},{key:"Mv",get:function(){return this.Ov}},{key:"Fv",get:function(){return this.Vv}},{key:"Wv",get:function(){return this.Uv}},{key:"Gv",get:function(){return this.Xv}},{key:"Zv",get:function(){return this.Hv}},{key:"zv",get:function(){return this.Yv}},{key:"Kv",get:function(){return this.qv}},{key:"Qv",get:function(){return this.Jv}},{key:"ru",get:function(){return this.$v}},{key:"t_",get:function(){return this.i_}},{key:"e_",get:function(){return this.s_||this.n_}},{key:"vd",get:function(){return this.r_}},{key:"Ks",get:function(){return this.h_}},{key:"o_",get:function(){return this.a_}},{key:"u_",get:function(){return this.c_}},{key:"d_",get:function(){var t;return null!=(t=this.l_)?t:this.f_}},{key:"v_",get:function(){return this.__}},{key:"g_",get:function(){var t;return(null==(t=c.chrome)?void 0:t.webview)&&this.m_>0}},{key:"p_",get:function(){return this.m_}},{key:"w_",get:function(){return this.y_}},{key:"b_",get:function(){return this.A_}},{key:"S_",get:function(){return this.T_}},{key:"k_",get:function(){return this.E_}},{key:"R_",get:function(){return this.I_}},{key:"x_",get:function(){return this.C_}},{key:"P_",get:function(){return this.N_}},{key:"D_",get:function(){return this.B_}},{key:"L_",get:function(){return this.M_}},{key:"O_",get:function(){return this.F_}},{key:"V_",get:function(){return this.W_}},{key:"U_",get:function(){return this.G_}},{key:"X_",get:function(){return this.Z_}},{key:"H_",get:function(){return 0===this.z_&&Vt.ru?this.i_:this.z_}},{key:"Y_",get:function(){return this.K_}},{key:"q_",get:function(){return this.j_}},{key:"Q_",get:function(){return this.J_}},{key:"eg",get:function(){return this.rg}},{key:"hg",get:function(){return!(!this.S_&&!this.w_)&&this.d_<=56}},{key:"og",get:function(){return this.ag}},{key:"cg",get:function(){return this.dg}},{key:"fg",get:function(){return this.vg}},{key:"_g",get:function(){return this.gg}},{key:"pg",get:function(){return this.wg}},{key:"yg",get:function(){return this.Ag}},{key:"Sg",get:function(){return this.Tg}},{key:"Eg",get:function(){return this.Rg}},{key:"IS_IOS_CHROME",get:function(){return this.Ig}}]),t}();Wt.xg=new Wt;var Vt=Wt.xg;x(),pt(),et();var qt={}.toString;function Ht(t){return null!=t}var Xt,jt=Array.isArray||function(t){return"[object Array]"===qt.call(t)};function Yt(t){return"object"===(void 0===t?"undefined":L(t))&&null!==t}function Kt(t){return"function"==typeof t}function Gt(t){return Kt(t)||Yt(t)}function $t(t){Xt=t}x(),pt(),x(),pt();var Zt=function(){};function Jt(t){var n;return function(){return void 0!==t&&(n=t(),t=void 0),n}}function Qt(t,n,i,e,r,o,u){try{var s=t[o](u),f=s.value}catch(t){return void i(t)}s.done?n(f):tt.resolve(f).then(e,r)}function tn(t){return function(){var n=this,i=arguments;return new tt(function(e,r){var o=t.apply(n,i);function u(t){Qt(o,e,r,u,s,"next",t)}function s(t){Qt(o,e,r,u,s,"throw",t)}u(void 0)})}}function nn(t,i){var r,o,u,s={label:0,sent:function(){if(1&u[0])throw u[1];return u[1]},trys:[],ops:[]},f=p.create(("function"==typeof Iterator?Iterator:p).prototype);return f.next=h(0),f.throw=h(1),f.return=h(2),"function"==typeof n&&(f[e]=function(){return this}),f;function h(n){return function(e){return function(n){if(r)throw new m("Generator is already executing.");for(;f&&(f=0,n[0]&&(s=0)),s;)try{if(r=1,o&&(u=2&n[0]?o.return:n[0]?o.throw||((u=o.return)&&u.call(o),0):o.next)&&!(u=u.call(o,n[1])).done)return u;switch(o=0,u&&(n=[2&n[0],u.value]),n[0]){case 0:case 1:u=n;break;case 4:return s.label++,{value:n[1],done:!1};case 5:s.label++,o=n[1],n=[0];continue;case 7:n=s.ops.pop(),s.trys.pop();continue;default:if(!(u=s.trys,(u=u.length>0&&u[u.length-1])||6!==n[0]&&2!==n[0])){s=0;continue}if(3===n[0]&&(!u||n[1]>u[0]&&n[1]<u[3])){s.label=n[1];break}if(6===n[0]&&s.label<u[1]){s.label=u[1],u=n;break}if(u&&s.label<u[2]){s.label=u[2],s.ops.push(n);break}u[2]&&s.ops.pop(),s.trys.pop();continue}n=i.call(t,s)}catch(t){n=[6,t],o=0}finally{r=u=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}([n,e])}}}x(),pt(),x(),pt(),x(),pt(),x(),pt();var en="function"==typeof SuppressedError?SuppressedError:function(t,n,i){var e=new g(i);return e.name="SuppressedError",e.error=t,e.suppressed=n,e};x(),pt(),x(),pt(),x(),pt(),x(),pt(),x(),pt(),x(),pt(),x(),pt();var rn=9007199254740991,on=(y.pow(2,-52),Array.prototype.find,Array.prototype.findLast,"function"==typeof Array.prototype.findIndex?function(t,n){return t.findIndex(n)}:function(t,n){for(var i=0;i<t.length;i+=1){if(n(t[i],i,t))return i}return-1}),un="function"==typeof Array.prototype.findLastIndex?function(t,n){return t.findLastIndex(n)}:function(t,n){for(var i=t.length-1;i>=0;i-=1){if(n(t[i],i,t))return i}return-1};Array.prototype.at;function sn(t,n){var i=t.indexOf(n);return-1!==i&&(function(t,n){0===n?t.shift():t.splice(n,1)}(t,i),!0)}function fn(t,n){for(var i=new Array(t.length),e=0,r=0;r<t.length;){if(t[r]===n){r++,i.length-=1;break}i[e++]=t[r++]}for(;r<t.length;)i[e++]=t[r++];return i}function hn(t,n){return-1!==t.indexOf(n)}function cn(t){t.length=0}Array.prototype.flat,Array.prototype.flatMap;var an=function(){function t(){this.Mg=!1,this.Og=!1,this.Fg=[],this.Wg=[]}var n=t.prototype;return n.Lg=function(){if(!this.Mg&&!this.Og){this.Mg=!0;for(var t,n=Rt(this.Fg.slice());!(t=n()).done;){(0,t.value)()}this.Vg()}},n.Vg=function(){if(!this.Og){this.Og=!0;for(var t,n=Rt(this.Wg.slice());!(t=n()).done;){(0,t.value)()}cn(this.Fg),cn(this.Wg)}},n.Ug=function(t){this.Og||this.Fg.push(t)},n.Gg=function(t){this.Og||sn(this.Fg,t)},n.Xg=function(t){this.Og||this.Wg.push(t)},n.Zg=function(t){this.Og||sn(this.Wg,t)},t}(),vn=function(){function t(){this.zg=new an}var n=t.prototype;return n.Yg=function(){this.zg.Lg()},n.Vg=function(){this.zg.Vg()},n.Kg=function(t){var n=this.zg;if(!n.Mg)if(t.Mg)n.Lg();else if(!n.Og&&!t.Og){var i=function(){e(),n.Lg()},e=function(){t.Gg(i),t.Zg(e),n.Gg(i),n.Zg(e)};t.Ug(i),t.Xg(e),n.Ug(i),n.Xg(e)}},n.qg=function(){var n=new t,i=new t,e=n.Hg,r=i.Hg,o=this.zg,u=function(){e.Mg&&r.Og||r.Mg&&e.Og?o.Lg():e.Og&&r.Og&&o.Vg()};e.Ug(u),r.Ug(u),e.Xg(u),r.Xg(u),n.Kg(o),i.Kg(o);return o.Xg(function(){e.Gg(u),r.Gg(u),e.Zg(u),r.Zg(u)}),[n,i]},n[r]=function(){this.Yg()},t.jg=function(n){for(var i,e=new t,r=Rt(n);!(i=r()).done;){var o=i.value;void 0!==o&&e.Kg(o)}return e},Et(t,[{key:"Hg",get:function(){return this.zg}}]),t}();x(),pt(),M(),x(),pt();var dn=function(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];g.apply(this,n)};(dn.prototype=p.create(g.prototype)).constructor=dn;var ln=function(t){function n(n,i){var e;return(e=t.call(this)||this).cause=void 0,e.message=n||"Unknown error",e.cause=i,g.captureStackTrace&&g.captureStackTrace(e,e.constructor),e}return Tt(n,t),Et(n,[{key:"name",get:function(){return"BaseError"}}]),n}(dn),wn=function(t){function n(n,i){return t.call(this,n||"Aborted",i)||this}return Tt(n,t),Et(n,[{key:"name",get:function(){return"AbortError"}}]),n}(ln);function bn(t){return B(t,g)&&"AbortError"===t.name}function gn(t,n){return n?new tt(function(i,e){if(n.Mg)return t.catch(Zt),e(new wn);var r=function(){n.Gg(r),e(new wn)};n.Ug(r),t.then(function(t){n.Gg(r),i(t)},function(t){n.Gg(r),e(t)})}):t}function mn(t,n){return tn(function(){var i,e;return nn(this,function(u){switch(u.label){case 0:i={stack:[],error:void 0,hasError:!1},u.label=1;case 1:return u.trys.push([1,3,4,5]),function(t,n,i){if(null!=n){if("object"!=typeof n&&"function"!=typeof n)throw new m("Object expected.");var e,u;if(i){if(!o)throw new m("Symbol.asyncDispose is not defined.");e=n[o]}if(void 0===e){if(!r)throw new m("Symbol.dispose is not defined.");e=n[r],i&&(u=e)}if("function"!=typeof e)throw new m("Object not disposable.");u&&(e=function(){try{u.call(this)}catch(t){return tt.reject(t)}}),t.stack.push({value:n,dispose:e,async:i})}else i&&t.stack.push({async:!0});return n}(i,n,!1),[4,t];case 2:return[2,u.sent()];case 3:return e=u.sent(),i.error=e,i.hasError=!0,[3,5];case 4:return function(t){function n(n){t.error=t.hasError?new en(n,t.error,"An error was suppressed during disposal."):n,t.hasError=!0}var i,e=0;(function r(){for(;i=t.stack.pop();)try{if(!i.async&&1===e)return e=0,t.stack.push(i),tt.resolve().then(r);if(i.dispose){var o=i.dispose.call(i.value);if(i.async)return e|=2,tt.resolve(o).then(r,function(t){return n(t),r()})}else e|=1}catch(t){n(t)}if(1===e)return t.hasError?tt.reject(t.error):tt.resolve();if(t.hasError)throw t.error})()}(i),[7];case 5:return[2]}})})()}tt.resolve();function pn(t,n){return new tt(function(i,e){if(void 0!==n&&n.Mg)e(new wn);else{var r=Xt.Ng(function(){void 0!==n&&n.Gg(o),i()},t),o=function(){Xt.Pg(r),e(new wn)};void 0!==n&&n.Ug(o)}})}function yn(){return void 0!==a?a.createElement("video"):void 0}var _n=Jt(yn);Jt(function(){return"undefined"!=typeof HTMLVideoElement&&B(_n(),HTMLVideoElement)});x(),pt(),x(),pt(),x(),pt(),et();var Sn=null;try{Sn=new WebAssembly.Instance(new WebAssembly.Module(new I([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch(Ot){}function Tn(t,n,i){this.low=0|t,this.high=0|n,this.unsigned=!!i}function In(t){return!0===(t&&t.Jg)}function En(t){var n=y.clz32(t&-t);return t?31-n:n}Tn.prototype.Jg,p.defineProperty(Tn.prototype,"Jg",{value:!0}),Tn.isLong=In;var kn={},Rn={};function On(t,n){var i,e,r;return n?(r=0<=(t>>>=0)&&t<256)&&(e=Rn[t])?e:(i=Pn(t,0,!0),r&&(Rn[t]=i),i):(r=-128<=(t|=0)&&t<128)&&(e=kn[t])?e:(i=Pn(t,t<0?-1:0,!1),r&&(kn[t]=i),i)}function Nn(t,n){if(T(t))return n?Fn:Un;if(n){if(t<0)return Fn;if(t>=Bn)return Hn}else{if(t<=-Mn)return Xn;if(t+1>=Mn)return qn}return t<0?Nn(-t,n).neg():Pn(t%xn|0,t/xn|0,n)}function Pn(t,n,i){return new Tn(t,n,i)}Tn.fromInt=On,Tn.fromNumber=Nn,Tn.fromBits=Pn;var An=y.pow;function Dn(t,n,i){if(0===t.length)throw g("empty string");if("number"==typeof n?(i=n,n=!1):n=!!n,"NaN"===t||"Infinity"===t||"+Infinity"===t||"-Infinity"===t)return n?Fn:Un;if((i=i||10)<2||36<i)throw RangeError("radix");var e;if((e=t.indexOf("-"))>0)throw g("interior hyphen");if(0===e)return Dn(t.substring(1),n,i).neg();for(var r=Nn(An(i,8)),o=Un,u=0;u<t.length;u+=8){var s=y.min(8,t.length-u),f=_(t.substring(u,u+s),i);if(s<8){var h=Nn(An(i,s));o=o.mul(h).add(Nn(f))}else o=(o=o.mul(r)).add(Nn(f))}return o.unsigned=n,o}function Cn(t,n){return"number"==typeof t?Nn(t,n):"string"==typeof t?Dn(t,n):Pn(t.low,t.high,"boolean"==typeof n?n:t.unsigned)}Tn.fromString=Dn,Tn.fromValue=Cn;var xn=4294967296,Bn=xn*xn,Mn=Bn/2,Ln=On(1<<24),Un=On(0);Tn.ZERO=Un;var Fn=On(0,!0);Tn.UZERO=Fn;var zn=On(1);Tn.ONE=zn;var Wn=On(1,!0);Tn.UONE=Wn;var Vn=On(-1);Tn.NEG_ONE=Vn;var qn=Pn(-1,2147483647,!1);Tn.MAX_VALUE=qn;var Hn=Pn(-1,-1,!0);Tn.MAX_UNSIGNED_VALUE=Hn;var Xn=Pn(0,-2147483648,!1);Tn.MIN_VALUE=Xn;var jn=Tn.prototype;jn.toInt=function(){return this.unsigned?this.low>>>0:this.low},jn.toNumber=function(){return this.unsigned?(this.high>>>0)*xn+(this.low>>>0):this.high*xn+(this.low>>>0)},jn.toString=function(t){if((t=t||10)<2||36<t)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative()){if(this.eq(Xn)){var n=Nn(t),i=this.div(n),e=i.mul(n).sub(this);return i.toString(t)+e.toInt().toString(t)}return"-"+this.neg().toString(t)}for(var r=Nn(An(t,6),this.unsigned),o=this,u="";;){var s=o.div(r),f=(o.sub(s.mul(r)).toInt()>>>0).toString(t);if((o=s).isZero())return f+u;for(;f.length<6;)f="0"+f;u=""+f+u}},jn.getHighBits=function(){return this.high},jn.getHighBitsUnsigned=function(){return this.high>>>0},jn.getLowBits=function(){return this.low},jn.getLowBitsUnsigned=function(){return this.low>>>0},jn.getNumBitsAbs=function(){if(this.isNegative())return this.eq(Xn)?64:this.neg().getNumBitsAbs();for(var t=0!=this.high?this.high:this.low,n=31;n>0&&!(t&1<<n);n--);return 0!=this.high?n+33:n+1},jn.isSafeInteger=function(){var t=this.high>>21;return!t||!this.unsigned&&(-1===t&&!(0===this.low&&-2097152===this.high))},jn.isZero=function(){return 0===this.high&&0===this.low},jn.eqz=jn.isZero,jn.isNegative=function(){return!this.unsigned&&this.high<0},jn.isPositive=function(){return this.unsigned||this.high>=0},jn.isOdd=function(){return!(1&~this.low)},jn.isEven=function(){return!(1&this.low)},jn.equals=function(t){return In(t)||(t=Cn(t)),(this.unsigned===t.unsigned||this.high>>>31!=1||t.high>>>31!=1)&&(this.high===t.high&&this.low===t.low)},jn.eq=jn.equals,jn.notEquals=function(t){return!this.eq(t)},jn.neq=jn.notEquals,jn.ne=jn.notEquals,jn.lessThan=function(t){return this.comp(t)<0},jn.lt=jn.lessThan,jn.lessThanOrEqual=function(t){return this.comp(t)<=0},jn.lte=jn.lessThanOrEqual,jn.le=jn.lessThanOrEqual,jn.greaterThan=function(t){return this.comp(t)>0},jn.gt=jn.greaterThan,jn.greaterThanOrEqual=function(t){return this.comp(t)>=0},jn.gte=jn.greaterThanOrEqual,jn.ge=jn.greaterThanOrEqual,jn.compare=function(t){if(In(t)||(t=Cn(t)),this.eq(t))return 0;var n=this.isNegative(),i=t.isNegative();return n&&!i?-1:!n&&i?1:this.unsigned?t.high>>>0>this.high>>>0||t.high===this.high&&t.low>>>0>this.low>>>0?-1:1:this.sub(t).isNegative()?-1:1},jn.comp=jn.compare,jn.negate=function(){return!this.unsigned&&this.eq(Xn)?Xn:this.not().add(zn)},jn.neg=jn.negate,jn.add=function(t){In(t)||(t=Cn(t));var n=this.high>>>16,i=65535&this.high,e=this.low>>>16,r=65535&this.low,o=t.high>>>16,u=65535&t.high,s=t.low>>>16,f=0,h=0,c=0,a=0;return c+=(a+=r+(65535&t.low))>>>16,h+=(c+=e+s)>>>16,f+=(h+=i+u)>>>16,f+=n+o,Pn((c&=65535)<<16|(a&=65535),(f&=65535)<<16|(h&=65535),this.unsigned)},jn.subtract=function(t){return In(t)||(t=Cn(t)),this.add(t.neg())},jn.sub=jn.subtract,jn.multiply=function(t){if(this.isZero())return this;if(In(t)||(t=Cn(t)),Sn)return Pn(Sn.mul(this.low,this.high,t.low,t.high),Sn.get_high(),this.unsigned);if(t.isZero())return this.unsigned?Fn:Un;if(this.eq(Xn))return t.isOdd()?Xn:Un;if(t.eq(Xn))return this.isOdd()?Xn:Un;if(this.isNegative())return t.isNegative()?this.neg().mul(t.neg()):this.neg().mul(t).neg();if(t.isNegative())return this.mul(t.neg()).neg();if(this.lt(Ln)&&t.lt(Ln))return Nn(this.toNumber()*t.toNumber(),this.unsigned);var n=this.high>>>16,i=65535&this.high,e=this.low>>>16,r=65535&this.low,o=t.high>>>16,u=65535&t.high,s=t.low>>>16,f=65535&t.low,h=0,c=0,a=0,v=0;return a+=(v+=r*f)>>>16,c+=(a+=e*f)>>>16,a&=65535,c+=(a+=r*s)>>>16,h+=(c+=i*f)>>>16,c&=65535,h+=(c+=e*s)>>>16,c&=65535,h+=(c+=r*u)>>>16,h+=n*f+i*s+e*u+r*o,Pn((a&=65535)<<16|(v&=65535),(h&=65535)<<16|(c&=65535),this.unsigned)},jn.mul=jn.multiply,jn.divide=function(t){if(In(t)||(t=Cn(t)),t.isZero())throw g("division by zero");var n,i,e;if(Sn)return this.unsigned||-2147483648!==this.high||-1!==t.low||-1!==t.high?Pn((this.unsigned?Sn.div_u:Sn.div_s)(this.low,this.high,t.low,t.high),Sn.get_high(),this.unsigned):this;if(this.isZero())return this.unsigned?Fn:Un;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return Fn;if(t.gt(this.shru(1)))return Wn;e=Fn}else{if(this.eq(Xn))return t.eq(zn)||t.eq(Vn)?Xn:t.eq(Xn)?zn:(n=this.shr(1).div(t).shl(1)).eq(Un)?t.isNegative()?zn:Vn:(i=this.sub(t.mul(n)),e=n.add(i.div(t)));if(t.eq(Xn))return this.unsigned?Fn:Un;if(this.isNegative())return t.isNegative()?this.neg().div(t.neg()):this.neg().div(t).neg();if(t.isNegative())return this.div(t.neg()).neg();e=Un}for(i=this;i.gte(t);){n=y.max(1,y.floor(i.toNumber()/t.toNumber()));for(var r=y.ceil(y.log(n)/y.LN2),o=r<=48?1:An(2,r-48),u=Nn(n),s=u.mul(t);s.isNegative()||s.gt(i);)s=(u=Nn(n-=o,this.unsigned)).mul(t);u.isZero()&&(u=zn),e=e.add(u),i=i.sub(s)}return e},jn.div=jn.divide,jn.modulo=function(t){return In(t)||(t=Cn(t)),Sn?Pn((this.unsigned?Sn.rem_u:Sn.rem_s)(this.low,this.high,t.low,t.high),Sn.get_high(),this.unsigned):this.sub(this.div(t).mul(t))},jn.mod=jn.modulo,jn.rem=jn.modulo,jn.not=function(){return Pn(~this.low,~this.high,this.unsigned)},jn.countLeadingZeros=function(){return this.high?y.clz32(this.high):y.clz32(this.low)+32},jn.clz=jn.countLeadingZeros,jn.countTrailingZeros=function(){return this.low?En(this.low):En(this.high)+32},jn.ctz=jn.countTrailingZeros,jn.and=function(t){return In(t)||(t=Cn(t)),Pn(this.low&t.low,this.high&t.high,this.unsigned)},jn.or=function(t){return In(t)||(t=Cn(t)),Pn(this.low|t.low,this.high|t.high,this.unsigned)},jn.xor=function(t){return In(t)||(t=Cn(t)),Pn(this.low^t.low,this.high^t.high,this.unsigned)},jn.shiftLeft=function(t){return In(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?Pn(this.low<<t,this.high<<t|this.low>>>32-t,this.unsigned):Pn(0,this.low<<t-32,this.unsigned)},jn.shl=jn.shiftLeft,jn.shiftRight=function(t){return In(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?Pn(this.low>>>t|this.high<<32-t,this.high>>t,this.unsigned):Pn(this.high>>t-32,this.high>=0?0:-1,this.unsigned)},jn.shr=jn.shiftRight,jn.shiftRightUnsigned=function(t){return In(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?Pn(this.low>>>t|this.high<<32-t,this.high>>>t,this.unsigned):Pn(32===t?this.high:this.high>>>t-32,0,this.unsigned)},jn.shru=jn.shiftRightUnsigned,jn.shr_u=jn.shiftRightUnsigned,jn.rotateLeft=function(t){var n;return In(t)&&(t=t.toInt()),0==(t&=63)?this:32===t?Pn(this.high,this.low,this.unsigned):t<32?(n=32-t,Pn(this.low<<t|this.high>>>n,this.high<<t|this.low>>>n,this.unsigned)):(n=32-(t-=32),Pn(this.high<<t|this.low>>>n,this.low<<t|this.high>>>n,this.unsigned))},jn.rotl=jn.rotateLeft,jn.rotateRight=function(t){var n;return In(t)&&(t=t.toInt()),0==(t&=63)?this:32===t?Pn(this.high,this.low,this.unsigned):t<32?(n=32-t,Pn(this.high<<n|this.low>>>t,this.low<<n|this.high>>>t,this.unsigned)):(n=32-(t-=32),Pn(this.low<<n|this.high>>>t,this.high<<n|this.low>>>t,this.unsigned))},jn.rotr=jn.rotateRight,jn.toSigned=function(){return this.unsigned?Pn(this.low,this.high,!1):this},jn.toUnsigned=function(){return this.unsigned?this:Pn(this.low,this.high,!0)},jn.toBytes=function(t){return t?this.toBytesLE():this.toBytesBE()},jn.toBytesLE=function(){var t=this.high,n=this.low;return[255&n,n>>>8&255,n>>>16&255,n>>>24,255&t,t>>>8&255,t>>>16&255,t>>>24]},jn.toBytesBE=function(){var t=this.high,n=this.low;return[t>>>24,t>>>16&255,t>>>8&255,255&t,n>>>24,n>>>16&255,n>>>8&255,255&n]},Tn.fromBytes=function(t,n,i){return i?Tn.fromBytesLE(t,n):Tn.fromBytesBE(t,n)},Tn.fromBytesLE=function(t,n){return new Tn(t[0]|t[1]<<8|t[2]<<16|t[3]<<24,t[4]|t[5]<<8|t[6]<<16|t[7]<<24,n)},Tn.fromBytesBE=function(t,n){return new Tn(t[4]<<24|t[5]<<16|t[6]<<8|t[7],t[0]<<24|t[1]<<16|t[2]<<8|t[3],n)},"function"==typeof BigInt&&(Tn.fromBigInt=function(t,n){return Pn(Number(BigInt.asIntN(32,t)),Number(BigInt.asIntN(32,t>>BigInt(32))),n)},Tn.fromValue=function(t,n){return"bigint"===(void 0===t?"undefined":L(t))?Tn.fromBigInt(t,n):Cn(t,n)},jn.toBigInt=function(){var t=BigInt(this.low>>>0);return BigInt(this.unsigned?this.high>>>0:this.high)<<BigInt(32)|t});var Yn=Tn;function Kn(){return Date.now()||(new Date).getTime()}var Gn=1/6,$n=(Yn.fromNumber(rn),Boolean("ontouchstart"in self||self.DocumentTouch&&B(a,self.DocumentTouch))||Boolean(v&&v.msMaxTouchPoints)),Zn=_n(),Jn=Boolean(Zn&&Zn.webkitShowPlaybackTargetPicker),Qn=function(){function t(){this.im=void 0,this.Bm=!1,this.Ke=$n,this.Ks=!1,this.Qg=!0}var n=t.prototype;return n.nm=function(){return 0},n.Pm=function(t,n){return!0},n.Nm=function(t){return t>=2*Gn},Et(t,[{key:"$g",get:function(){return void 0===this.im&&(this.im=this.nm()),this.im}},{key:"hm",get:function(){return Vt.Fv?"android":Vt.Nv?"macos":Vt.ru?"ios":Vt.Bv?"windows":"other"}},{key:"um",get:function(){return Vt.eg?"tv":Vt.Ks?"mobile":"desktop"}},{key:"dm",get:function(){return!Vt.eg}},{key:"lm",get:function(){if(c.screen)return{width:c.screen.width,height:c.screen.height}}},{key:"fm",get:function(){return c.devicePixelRatio||1}},{key:"vm",get:function(){return Jn}},{key:"_m",get:function(){return!1}},{key:"gm",get:function(){return!0}},{key:"pm",get:function(){return!!(Vt.X_||Vt.ru||Vt.g_)||!!Vt.x_}},{key:"wm",get:function(){return Vt.x_}},{key:"ym",get:function(){return!Vt.ru}},{key:"Am",get:function(){return!0}},{key:"Sm",get:function(){return!0}},{key:"Tm",get:function(){return!1}},{key:"Em",get:function(){}},{key:"Rm",get:function(){return!0}},{key:"Im",get:function(){return!1}},{key:"xm",get:function(){return Vt.x_}},{key:"Cm",get:function(){return!1}},{key:"Dm",get:function(){return!1}}]),t}(),ti=function(t){function n(){return t.call(this)||this}return Tt(n,t),n}(Qn);x(),pt();var ni=function(t){function n(){return t.apply(this,arguments)||this}return Tt(n,t),n.prototype.Pm=function(t,n){if(t&&t.Lm&&n&&n.Lm){var i=ii(t.Lm,"mp4a.40.2")&&ii(n.Lm,"mp4a.40.5"),e=ii(t.Lm,"mp4a.40.5")&&ii(n.Lm,"mp4a.40.2"),r=ii(t.Lm,"mp4a.40.2")&&ii(n.Lm,"mp4a.40.34"),o=ii(t.Lm,"mp4a.40.34")&&ii(n.Lm,"mp4a.40.2"),u=ii(t.Lm,"mp4a.40.5")&&ii(n.Lm,"mp4a.40.34"),s=ii(t.Lm,"mp4a.40.34")&&ii(n.Lm,"mp4a.40.5");return!(i||e||r||o||u||s)}return!0},Et(n,[{key:"Em",get:function(){if(Vt.Nv)return 4096}}]),n}(ti);function ii(t,n){return t.indexOf(n)>-1}x(),pt();var ei=function(t){function n(){return t.apply(this,arguments)||this}return Tt(n,t),n.prototype.Nm=function(t){return t>=2},n}(ti);x(),pt();var ri=function(t){function n(){var n;return(n=t.call(this)||this).Bm=Vt.H_>=11,n.Qg=Vt.X_&&!(Vt.ru&&Vt.H_<10),n}return Tt(n,t),Et(n,[{key:"Cm",get:function(){return Vt.H_<17}},{key:"Dm",get:function(){return!0}}]),n}(ti);x(),pt();var oi,ui=function(t){function n(){return t.apply(this,arguments)||this}return Tt(n,t),Et(n,[{key:"Rm",get:function(){return!Vt.Bv||(Vt.v_?92!==Vt.p_:Vt.d_>=100)}}]),n}(ti);x(),pt(),x(),pt(),x(),pt(),x(),pt(),x(),pt();var si=function(){var t=yn();if(!t)return!1;var n=t.muted;return t.muted=!n,t.muted!==n}();!function(){if(Vt.Kv)return!1;var t=yn();if(!t)return!1;var n=t.volume;t.volume=n/2+.1,t.volume}();var fi=function(t){function n(n){var i;return(i=t.call(this)||this).Mm=void 0,i.Mm=n,i.Bm=i.Mm.Bm,i.Ke=i.Mm.Ke,i.Qg=si&&i.Mm.Qg,i}Tt(n,t);var i=n.prototype;return i.nm=function(){return this.Mm.$g},i.Pm=function(t,n){return this.Mm.Pm(t,n)},i.Nm=function(t){return this.Mm.Nm(t)},Et(n,[{key:"Em",get:function(){return this.Mm.Em}},{key:"Rm",get:function(){return this.Mm.Rm}},{key:"Cm",get:function(){return this.Mm.Cm}}]),n}(Qn),hi=function(t){function n(n){var i;return(i=t.call(this,n)||this).Bm=!0,i.Ks=!0,i}return Tt(n,t),Et(n,[{key:"Tm",get:function(){return Vt.ru}}]),n}(fi);x(),pt();var ci=function(t){function n(){return t.apply(this,arguments)||this}return Tt(n,t),n.prototype.nm=function(){return function(t){return t&&Gt(c.ManagedMediaSource)?c.ManagedMediaSource:Gt(c.MediaSource)?c.MediaSource:void 0}(!0)?t.prototype.nm.call(this):1},Et(n,[{key:"Tm",get:function(){return!0}}]),n}(hi);x(),pt();var ai=function(t){function n(){var n;return(n=t.apply(this,arguments)||this).Wm=void 0,n}return Tt(n,t),n.prototype.Pm=function(n,i){return t.prototype.Pm.call(this,n,i)},Et(n,[{key:"_m",get:function(){return Vt.b_<3}},{key:"gm",get:function(){return Vt.b_>=3}},{key:"lm",get:function(){var t=this;return c.tizen&&!this.Wm&&c.tizen.systeminfo.getPropertyValue("DISPLAY",function(n){var i=n.resolutionWidth,e=n.resolutionHeight;1===i&&1===e||(t.Wm={width:i,height:e})}),this.Wm}},{key:"Im",get:function(){return Vt.b_<3}}]),n}(fi);x(),pt();var vi=function(t){function n(){var n;return(n=t.apply(this,arguments)||this).Wm=void 0,n}return Tt(n,t),Et(n,[{key:"lm",get:function(){var t=this;return c.webOS&&!this.Wm&&c.webOS.deviceInfo(function(n){t.Wm={width:n.screenWidth,height:n.screenHeight}}),this.Wm}},{key:"Am",get:function(){return!1}}]),n}(fi);x(),pt();var di=function(t){function n(){return t.apply(this,arguments)||this}return Tt(n,t),Et(n,[{key:"Tm",get:function(){return!0}},{key:"Dm",get:function(){return this.Mm.Dm}}]),n}(fi);!function(t){oi=t}(function(){var t=function(){if(Vt.V_)return new ni;if(Vt.P_||Vt.D_)return new ei;if(Vt.X_)return new ri;if(Vt.u_)return new ui;return new ti}();return Vt.ru?new ci(t):Vt.Ks?new hi(t):Vt.w_?new ai(t):Vt.S_?new vi(t):Vt.Nv?new di(t):new fi(t)}()),x(),pt(),x(),pt(),M(),et(),x(),pt();var li=!(Vt.D_&&!Vt.L_),wi=self.console;function bi(t){if(Yt(t))try{return JSON.stringify(t)}catch(t){}return t}function gi(t){return t.map(bi).join(" ")}function mi(t){var n=wi&&wi[t];return n?n.bind&&li?n.bind(wi):function(){for(var n=arguments.length,i=new Array(n),e=0;e<n;e++)i[e]=arguments[e];wi[t](gi(i))}:void 0}var pi=mi("log")||Zt,yi=mi("warn")||pi.bind(void 0,"WARNING:"),_i=mi("error")||pi.bind(void 0,"ERROR:"),Si=function(){var t=wi&&wi.assert;return t?t.bind&&li?t.bind(wi):function(t){for(var n=arguments.length,i=new Array(n>1?n-1:0),e=1;e<n;e++)i[e-1]=arguments[e];wi.assert(t,gi(i))}:function(t){for(var n=arguments.length,i=new Array(n>1?n-1:0),e=1;e<n;e++)i[e-1]=arguments[e];t||_i.apply(void 0,[].concat(["Assertion failed:"],i))}}();function Ti(t,n){for(var i=0;i<n.length;i++){var e=n[i];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),p.defineProperty(t,e.key,e)}}function Ii(t,n){var i=function(t,n){var i=t.length;if(i<=1)return t;for(var e=new Array(i),r=1;r<i;r*=2){Ei(t,n,r,e);var o=t;t=e,e=o}return t}(t,n);return i!==t&&Ei(i,null,t.length,t),t}function Ei(t,n,i,e){var r,o,u,s,f,h=t.length,c=0,a=2*i;for(r=0;r<h;r+=a)for(u=(o=r+i)+i,o>h&&(o=h),u>h&&(u=h),s=r,f=o;;)if(s<o&&f<u)n(t[s],t[f])<=0?e[c++]=t[s++]:e[c++]=t[f++];else if(s<o)e[c++]=t[s++];else{if(!(f<u))break;e[c++]=t[f++]}}x(),pt();var ki=/[a-zA-Z]/,Ri=/[0-9]/,Oi=/[0-9a-fA-F]/,Ni=/^0x/i,Pi=/^[0-9]+$/,Ai=/^[0-9a-fA-F]+$/,Di=/^[0-7]+$/,Ci=p.prototype.toString,xi=Array.isArray||function(t){return"[object Array]"===Ci.call(t)},Bi=void 0!==n&&"symbol"==typeof e;function Mi(t){return xi(t)?t:Array.from(t)}function Li(t,n,i){var e=t[n];t[n]=t[i],t[i]=e}function Ui(t){return t>=65&&t<=90}function Fi(t){return Ui(t)||function(t){return t>=97&&t<=122}(t)}function zi(t){return t>=48&&t<=57}function Wi(t){return zi(t)||Fi(t)}function Vi(t){return zi(t)||t>=65&&t<=70||t>=97&&t<=102}function qi(t){return Ui(t)?t+32:t}function Hi(t){return zi(t)?t-48:t>=65&&t<=70?t-65+10:t>=97&&t<=102?t-97+10:-1}function Xi(t,n){return void 0===n&&(n=!1),0<=t&&t<=9?t+48:10<=t&&t<=15?t+(n?87:55):-1}var ji=y.min,Yi=String.fromCharCode;function Ki(t){for(var n=t.length,i=[],e=0;e<n;e+=16384){var r=ji(e+16384,n);i.push(Yi.apply(null,t.slice(e,r)))}return i.join("")}var Gi=2147483647,$i=/[^\0-\x7E]/,Zi=/[\x2E\u3002\uFF0E\uFF61]/g,Ji={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},Qi=y.floor,te=String.fromCharCode;function ne(t){throw new RangeError(Ji[t])}function ie(t){for(var n=[],i=0,e=t.length;i<e;){var r=t.charCodeAt(i++);if(r>=55296&&r<=56319&&i<e){var o=t.charCodeAt(i++);56320==(64512&o)?n.push(((1023&r)<<10)+(1023&o)+65536):(n.push(r),i--)}else n.push(r)}return n}var ee,re,oe,ue=function(t,n){return t+22+75*(t<26)-((0!=n)<<5)},se=function(t,n,i){var e=0;for(t=i?Qi(t/700):t>>1,t+=Qi(t/n);t>455;e+=36)t=Qi(t/35);return Qi(e+36*t/(t+38))},fe=function(t){return function(t,n){var i=t.split("@"),e="";i.length>1&&(e=i[0]+"@",t=i[1]);var r=function(t,n){for(var i=[],e=t.length;e--;)i[e]=n(t[e]);return i}((t=t.replace(Zi,".")).split("."),n).join(".");return e+r}(t,function(t){return $i.test(t)?"xn--"+function(t){for(var n=[],i=(t=ie(t)).length,e=128,r=0,o=72,u=0,s=t;u<s.length;u++){var f=s[u];f<128&&n.push(te(f))}var h=n.length,c=h;for(h&&n.push("-");c<i;){for(var a=Gi,v=0,d=t;v<d.length;v++){var l=d[v];l>=e&&l<a&&(a=l)}var w=c+1;a-e>Qi((Gi-r)/w)&&ne("overflow"),r+=(a-e)*w,e=a;for(var b=0,g=t;b<g.length;b++){var m=g[b];if(m<e&&++r>Gi&&ne("overflow"),m==e){for(var p=r,y=36;;y+=36){var _=y<=o?1:y>=o+26?26:y-o;if(p<_)break;var S=p-_,T=36-_;n.push(te(ue(_+S%T,0))),p=Qi(S/T)}n.push(te(ue(p,0))),o=se(r,w,c==h),r=0,++c}}++r,++e}return n.join("")}(t):t})};function he(t){for(var n=[],i=0;i<t.length;i++){var e=t[i];e>65535&&(e-=65536,n.push(e>>>10&1023|55296),e=56320|1023&e),n.push(e)}return Ki(n)}function ce(t){if(t>=55296&&t<=57343)throw new g("Lone surrogate U+"+t.toString(16).toUpperCase()+" is not a scalar value")}function ae(t,n){return t>>n&63|128}function ve(t,n){4294967168&t?(4294965248&t?4294901760&t?4292870144&t||(n.push(t>>18&7|240),n.push(ae(t,12)),n.push(ae(t,6))):(ce(t),n.push(t>>12&15|224),n.push(ae(t,6))):n.push(t>>6&31|192),n.push(63&t|128)):n.push(t)}function de(t){for(var n=[],i=0;i<t.length;i++){ve(t[i],n)}return n}function le(){if(oe>=re)throw new g("Invalid byte index");var t=255&ee[oe];if(oe++,128==(192&t))return 63&t;throw new g("Invalid continuation byte")}function we(){var t,n;if(oe>re)throw new g("Invalid byte index");if(oe===re)return!1;if(t=255&ee[oe],oe++,!(128&t))return t;if(192==(224&t)){if((n=(31&t)<<6|le())>=128)return n;throw new g("Invalid continuation byte")}if(224==(240&t)){if((n=(15&t)<<12|le()<<6|le())>=2048)return ce(n),n;throw new g("Invalid continuation byte")}if(240==(248&t)&&(n=(7&t)<<18|le()<<12|le()<<6|le())>=65536&&n<=1114111)return n;throw new g("Invalid UTF-8 detected")}function be(t){return[37,Xi(t>>4),Xi(15&t)]}function ge(t){return function(t){return t>=0&&t<=31}(t)||t>126}function me(t){return ge(t)||32===t||34===t||60===t||62===t||96===t}function pe(t){return me(t)||35===t||63===t||123===t||125===t}function ye(t){return pe(t)||47===t||58===t||59===t||61===t||64===t||t>=91&&t<=94||124===t}function _e(t){return t<33||t>126||34===t||35===t||60===t||62===t}function Se(t){return _e(t)||39===t}function Te(t,n){if(!n(t))return[t];for(var i=de([t]),e=[],r=0;r<i.length;r++){var o=i[r];e.push.apply(e,be(o))}return e}function Ie(t,n){for(var i=[],e=0,r=ie(t);e<r.length;e++){var o=r[e];i.push.apply(i,Te(o,n))}return he(i)}function Ee(t){return function(t){for(var n=[],i=t.length,e=0;e<i;e++){var r=t[e];if(37===r&&e+2<i&&Vi(t[e+1])&&Vi(t[e+2])){var o=Hi(t[e+1])<<4|Hi(t[e+2]);n.push(o),e+=2}else n.push(r)}return n}(de(t))}function ke(t){return he(function(t){ee=t.slice(),re=ee.length,oe=0;for(var n,i=[];!1!==(n=we());)i.push(n);return i}(Ee(ie(t))))}function Re(t){var n=t.length,i=[0,0,0,0,0,0,0,0],e=0,r=null,o=0;if(o<n&&":"===t[o]){if(!(o+1<n&&":"===t[o+1]))throw new m;o+=2,r=e+=1}for(;o<n;){if(8===e)throw new m("Too many groups");if(":"!==t[o]){for(var u=0,s=0;s<4&&o<n&&Oi.test(t[o]);)u=u<<4|_(t[o],16),o+=1,s+=1;if("."===t[o]){if(0===s)throw new m;if(o-=s,e>6)throw new m;for(var f=0;o<n;){var h=null;if(f>0){if(!("."===t[o]&&f<4))throw new m;o+=1}if(!Ri.test(t[o]))throw new m;for(;o<n&&Ri.test(t[o]);){var c=_(t[o],10);if(null===h)h=c;else{if(0===h)throw new m;if((h=10*h+c)>255)throw new m}o+=1}i[e]=i[e]<<8|h,2!==(f+=1)&&4!==f||(e+=1)}if(4!==f)throw new m;break}if(":"===t[o]){if((o+=1)===n)throw new m}else if(o<n)throw new m;i[e]=u,e+=1}else{if(null!==r)throw new m("Too many :: groups");o+=1,r=e+=1}}if(null!==r){var a=e-r;for(e=7;0!==e&&a>0;)Li(i,e,r+a-1),e-=1,a-=1}else if(8!==e)throw new m;return i}function Oe(t){var n=10,i=Pi;return Ni.test(t)?(t=t.slice(2),n=16,i=Ai):t.length>=2&&"0"===t[0]&&(t=t.slice(1),n=8,i=Di),""===t?0:i.test(t)?_(t,n):void 0}var Ne={Um:4},Pe=/[\0\t\n\r #%/:?@\[\\\]]/,Ae=/[\0\t\n\r #/:?@\[\\\]]/;function De(t,n){if("["===t[0]){if("]"!==t[t.length-1])throw new m("Invalid IPv6 address");return{Um:2,Gm:Re(t.slice(1,-1))}}if(!n)return function(t){if(Ae.test(t))throw new m("Invalid code point in opaque host");var n=Ie(t,ge);return""===n?Ne:{Um:3,Xm:n}}(t);var i=function(t){var n=function(t){return fe(t.toLowerCase())}(t);return n}(ke(t));if(Pe.test(i))throw new m("Invalid code point in host");var e=function(t){var n=t.split(".");if(""===n[n.length-1]&&n.pop(),!(n.length>4)){for(var i=[],e=0;e<n.length;e++){var r=n[e];if(""===r)return;var o=Oe(r);if(void 0===o)return;i.push(o)}for(var u=0;u<i.length-1;u++)if(i[u]>255)throw new m;if(i[i.length-1]>=y.pow(256,5-i.length))throw new m;for(var s=i.pop(),f=0;f<i.length;f++)s+=i[f]*y.pow(256,3-f);return s}}(i);return void 0!==e?{Um:1,Gm:e}:""===i?Ne:{Um:0,Zm:i}}function Ce(t){switch(t.Um){case 0:return t.Zm;case 1:return function(t){for(var n=[],i=t,e=1;e<=4;e++)n.push(""+(255&i)),4!==e&&n.push("."),i>>>=8;return n.reverse().join("")}(t.Gm);case 2:return"["+function(t){for(var n="",i=function(t){for(var n=0,i=0,e=0,r=0,o=0;o<8;o++)0===t[o]?(0===r&&(e=o),r++):(r>i&&(n=e,i=r),r=0);return r>i&&(n=e,i=r),i>1?n:null}(t),e=!1,r=0;r<8;r++){if(e){if(0===t[r])continue;e=!1}i!==r?(n+=t[r].toString(16),7!==r&&(n+=":")):(n+=0===r?"::":":",e=!0)}return n}(t.Gm)+"]";case 3:return t.Xm;case 4:return""}}var xe=/\+/g;function Be(t){return 42===t||45===t||46===t||95===t||Wi(t)}function Me(t){for(var n=t.split("&"),i=[],e=0;e<n.length;e++){var r=n[e];if(""!==r){var o=r.indexOf("="),u=void 0,s=void 0;-1!==o?(u=r.slice(0,o),s=r.slice(o+1)):(u=r,s=""),u=u.replace(xe," "),s=s.replace(xe," ");var f=ke(u),h=ke(s);i.push([f,h])}}return i}function Le(t){for(var n="",i=0;i<t.length;i++){var e=t[i];i>0&&(n+="&"),n+=Ue(de(ie(e[0])))+"="+Ue(de(ie(e[1])))}return n}function Ue(t){for(var n=[],i=0;i<t.length;i++){var e=t[i];32===e?n.push(43):Be(e)?n.push(e):n.push.apply(n,be(e))}return Ki(n)}var Fe=/(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])/;function ze(t){var n=""+t,i=Fe.exec(n);return i?function(t,n){for(var i=t.length,e=[],r=n;r<i;r++){var o=t.charCodeAt(r);if(Ve(o))if(qe(o)||r===i-1)e.push(We);else{var u=t.charCodeAt(r+1);qe(u)?(e.push(o,u),r++):e.push(We)}else e.push(o)}return t.slice(0,n)+Ki(e)}(n,i.index):n}var We=65533,Ve=function(t){return 55296==(63488&t)},qe=function(t){return!!(1024&t)};function He(t,n){var i=t[0],e=n[0];return i===e?0:i<e?-1:1}function Xe(t){t.Hm.length=0}function je(t,n){!function(t,n){for(var i=0;i<n.length;i++)t[i]=n[i];t.length=n.length}(t.Hm,Me(n))}function Ye(t){if(t.rc){var n=Le(t.Hm);""===n&&(n=null),t.rc.rc.zm=n}}var Ke=function(){function t(t){if(void 0===t&&(t=void 0),this.rc=null,null==t)this.Hm=[];else if("object"==typeof t||"function"==typeof t)if(function(t){return t instanceof Ke&&!!xi(t.Hm)&&(!Bi||t[e]===Ge)}(t))this.Hm=t.Hm.slice();else if(function(t){return null!=t&&(!!xi(t)||!!Bi&&"function"==typeof t[e])}(t)){this.Hm=[];for(var n=0,i=Mi(t);n<i.length;n++){var r=Mi(i[n]);if(2!==r.length)throw new m("Invalid name-value pair");this.Hm.push([ze(r[0]),ze(r[1])])}}else for(var o in this.Hm=[],t)p.prototype.hasOwnProperty.call(t,o)&&this.Hm.push([ze(o),ze(t[o])]);else(t=ze(t)).length>0&&"?"===t[0]&&(t=t.slice(1)),this.Hm=Me(t)}var n=t.prototype;return n.append=function(t,n){t=ze(t),n=ze(n),this.Hm.push([t,n]),Ye(this)},n.delete=function(t){t=ze(t);for(var n=this.Hm,i=0;i<n.length;){n[i][0]===t?n.splice(i,1):i++}Ye(this)},n.get=function(t){t=ze(t);for(var n=this.Hm,i=0;i<n.length;i++){var e=n[i];if(e[0]===t)return e[1]}return null},n.getAll=function(t){t=ze(t);for(var n=this.Hm,i=[],e=0;e<n.length;e++){var r=n[e];r[0]===t&&i.push(r[1])}return i},n.has=function(t){t=ze(t);for(var n=this.Hm,i=0;i<n.length;i++){if(n[i][0]===t)return!0}return!1},n.set=function(t,n){t=ze(t),n=ze(n);for(var i=this.Hm,e=!1,r=0;r<i.length;){var o=i[r];o[0]===t?e?i.splice(r,1):(o[1]=n,e=!0,r++):r++}e||i.push([t,n]),Ye(this)},n.sort=function(){Ii(this.Hm,He),Ye(this)},n.toString=function(){return Le(this.Hm)},n.entries=function(){return new Qe(this.Hm,$e)},n.keys=function(){return new Qe(this.Hm,Ze)},n.values=function(){return new Qe(this.Hm,Je)},n.forEach=function(t){var n=this;this.Hm.forEach(function(i){return t(i[1],i[0],n)})},t}(),Ge=Ke.prototype.entries;Bi&&(Ke.prototype[e]=Ge);var $e=function(t){return[t[0],t[1]]},Ze=function(t){return t[0]},Je=function(t){return t[1]},Qe=function(){function t(t,n){this.Ym=0,this.Hm=t,this.Km=n}return t.prototype.next=function(){return this.Ym<this.Hm.length?{done:!1,value:this.Km(this.Hm[this.Ym++])}:{done:!0,value:void 0}},t}(),tr="null";var nr=p.create(null);nr.ftp=21,nr.file=0,nr.gopher=70,nr.http=80,nr.https=443,nr.ws=80,nr.wss=443;var ir=/^(?:\.|%2e)$/i,er=/^(?:\.|%2e){2}$/i;function rr(t){return ir.test(t)}function or(t){return er.test(t)}function ur(t){return void 0!==nr[t]}function sr(t){return ur(t.qm)}function fr(t){return""!==t.jm||""!==t.Qm}function hr(t){var n=t.length;if(!(n>=2))return!1;if(!ar(t.slice(0,2)))return!1;if(2!==n){var i=t[2];if(47!==i&&92!==i&&63!==i&&35!==i)return!1}return!0}function cr(t){return 2===t.length&&ki.test(t[0])&&(":"===t[1]||"|"===t[1])}function ar(t){return 2===t.length&&cr(Ki(t))}function vr(t){return cr(t)&&":"===t[1]}function dr(t){var n=t.Jm;0!==n.length&&("file"===t.qm&&1===n.length&&vr(n[0])||n.pop())}function lr(t){return null===t.$m||Ne===t.$m||t.tp||"file"===t.qm}var wr=-1,br=/\t|\n|\r/g,gr=/^[\x00-\x1f ]+|[\x00-\x1f ]+$/g;function mr(t,n,i,e){void 0===i&&(i=null),void 0===e&&(e=null),i||(i=new yr,t=t.replace(gr,""));var r=null!==e?e:0;n=n||null;for(var o=[],u=!1,s=!1,f=!1,h=ie(t=t.replace(br,"")),c=h.length,a=0;a<=c;){var v=a<c?h[a]:wr;switch(r){case 0:if(!Fi(v)){if(null===e){o.length=0,r=2;continue}throw new m("Invalid scheme")}o.push(qi(v)),r=1;break;case 1:if(Wi(v)||43===v||45===v||46===v)o.push(qi(v));else{if(58!==v){if(null===e){o.length=0,r=2,a=0;continue}throw new m("Invalid scheme")}var d=he(o);if(null!==e){if(ur(i.qm)&&!ur(d))return;if(!ur(i.qm)&&ur(d))return;if((fr(i)||null!==i.ep)&&"file"===d)return;if("file"===i.qm&&(i.$m===Ne||null===i.$m))return}if(i.qm=d,null!==e)return void(sr(i)&&i.ep===nr[i.qm]&&(i.ep=null));o.length=0,"file"===i.qm?r=13:sr(i)&&n&&n.qm===i.qm?r=3:sr(i)?r=7:47===h[a+1]?(r=4,a+=1):(i.tp=!0,i.Jm.push(""),r=18)}break;case 2:if(!n||n.tp&&35!==v)throw new m("Invalid scheme");n.tp&&35===v?(i.qm=n.qm,i.Jm=n.Jm.slice(),i.zm=n.zm,i.sp="",i.tp=!0,r=20):"file"!==n.qm?(r=5,a-=1):(r=13,a-=1);break;case 3:47===v&&47===h[a+1]?r=8:(r=5,a-=1);break;case 4:47===v?r=9:(r=17,a-=1);break;case 5:i.qm=n.qm,wr===v?(i.jm=n.jm,i.Qm=n.Qm,i.$m=n.$m,i.ep=n.ep,i.Jm=n.Jm.slice(),i.zm=n.zm):47===v?r=6:63===v?(i.jm=n.jm,i.Qm=n.Qm,i.$m=n.$m,i.ep=n.ep,i.Jm=n.Jm.slice(),i.zm="",r=19):35===v?(i.jm=n.jm,i.Qm=n.Qm,i.$m=n.$m,i.ep=n.ep,i.Jm=n.Jm.slice(),i.zm=n.zm,i.sp="",r=20):92===v&&sr(i)?r=6:(i.jm=n.jm,i.Qm=n.Qm,i.$m=n.$m,i.ep=n.ep,i.Jm=n.Jm.slice(),i.Jm.pop(),r=17,a-=1);break;case 6:!sr(i)||47!==v&&92!==v?47===v?r=9:(i.jm=n.jm,i.Qm=n.Qm,i.$m=n.$m,i.ep=n.ep,r=17,a-=1):r=8;break;case 7:if(47!==v||47!==h[a+1]){r=8;continue}r=8,a+=1;break;case 8:47!==v&&92!==v&&(r=9,a-=1);break;case 9:if(64===v){u&&o.unshift(37,52,48),u=!0;for(var l=0;l<o.length;l++){var w=o[l];if(58!==w||f){var b=he(Te(w,ye));f?i.Qm+=b:i.jm+=b}else f=!0}o.length=0}else if(wr===v||47===v||63===v||35===v||sr(i)&&92===v){if(u&&0===o.length)throw new m("Invalid host");a-=o.length+1,o.length=0,r=10}else o.push(v);break;case 10:case 11:if(null!==e&&"file"===i.qm)a-=1,r=15;else if(58!==v||s)if(wr===v||47===v||63===v||35===v||sr(i)&&92===v){if(a-=1,sr(i)&&0===o.length)throw new m("Invalid host");if(null!==e&&0===o.length&&(fr(i)||null!==i.ep))return;var g=De(he(o),sr(i));if(i.$m=g,o.length=0,r=16,null!==e)return}else 91===v?s=!0:93===v&&(s=!1),o.push(v);else{if(0===o.length)throw new m("Invalid host");var p=De(he(o),sr(i));if(i.$m=p,o.length=0,r=12,11===e)return}break;case 12:if(zi(v))o.push(v);else{if(!(wr===v||47===v||63===v||35===v||sr(i)&&92===v||null!==e))throw new m("Invalid port");if(0!==o.length){var y=_(he(o),10);if(y>65535)throw new m("Invalid port");i.ep=y===nr[i.qm]?null:y,o.length=0}if(null!==e)return;r=16,a-=1}break;case 13:i.qm="file",47===v||92===v?r=14:n&&"file"===n.qm?wr===v?(i.$m=n.$m,i.Jm=n.Jm.slice(),i.zm=n.zm):63===v?(i.$m=n.$m,i.Jm=n.Jm.slice(),i.zm="",r=19):35===v?(i.$m=n.$m,i.Jm=n.Jm.slice(),i.zm=n.zm,i.sp="",r=20):(hr(h.slice(a))||(i.$m=n.$m,i.Jm=n.Jm.slice(),dr(i)),r=17,a-=1):(r=17,a-=1);break;case 14:47===v||92===v?r=15:(n&&"file"===n.qm&&!hr(h.slice(a))&&(vr(n.Jm[0])?i.Jm.push(n.Jm[0]):i.$m=n.$m),r=17,a-=1);break;case 15:if(wr===v||47===v||92===v||63===v||35===v)if(a-=1,null===e&&ar(o))r=17;else if(0===o.length){if(i.$m=Ne,null!==e)return;r=16}else{var S=De(he(o),sr(i));if(0===S.Um&&"localhost"===S.Zm&&(S=Ne),i.$m=S,null!==e)return;o.length=0,r=16}else o.push(v);break;case 16:sr(i)?(r=17,47!==v&&92!==v&&(a-=1)):null===e&&63===v?(i.zm="",r=19):null===e&&35===v?(i.sp="",r=20):wr!==v&&(r=17,47!==v&&(a-=1));break;case 17:if(wr===v||47===v||sr(i)&&92===v||null===e&&(63===v||35===v)){var T=he(o);if(or(T)?(dr(i),47===v||sr(i)&&92===v||i.Jm.push("")):!rr(T)||47===v||sr(i)&&92===v?rr(T)||("file"===i.qm&&0===i.Jm.length&&ar(o)&&(Ne!==i.$m&&null!==i.$m&&(i.$m=Ne),o[1]=58,T=he(o)),i.Jm.push(T)):i.Jm.push(""),o.length=0,"file"===i.qm&&(wr===v||63===v||35===v))for(;i.Jm.length>1&&""===i.Jm[0];)i.Jm.shift();63===v?(i.zm="",r=19):35===v&&(i.sp="",r=20)}else o.push.apply(o,Te(v,pe));break;case 18:63===v?(i.zm="",r=19):35===v?(i.sp="",r=20):wr!==v&&(i.Jm[0]+=he(Te(v,ge)));break;case 19:null===e&&35===v?(i.sp="",r=20):wr!==v&&(i.zm+=he(Te(v,sr(i)?Se:_e)));break;case 20:wr===v||0===v||(i.sp+=he(Te(v,me)))}a++}return i}function pr(t,n,i,e){try{mr(t,n,i,e)}catch(t){}}var yr=function(){this.qm="",this.jm="",this.Qm="",this.$m=null,this.ep=null,this.Jm=[],this.zm=null,this.sp=null,this.tp=!1};function _r(t){switch(t.qm){case"blob":var n;try{n=mr(t.Jm[0],null)}catch(t){return tr}return _r(n);case"ftp":case"gopher":case"http":case"https":case"ws":case"wss":return function(t,n,i){return t+"://"+Ce(n)+(null===i?"":":"+i)}(t.qm,t.$m,t.ep);default:return tr}}var Sr=function(){function t(t,n){var i,e=null;if(null!=n)if(function(t){return null!=t&&t instanceof Sr&&"object"==typeof t.rc}(n))e=n.rc;else try{e=mr(String(n),null)}catch(t){throw new m("Invalid base URL: "+t.message)}try{i=mr(String(t),e)}catch(t){throw new m("Invalid URL: "+t.message)}var r=i.zm;this.rc=i,this.zm=function(t){var n=new Ke;return null!==t&&je(n,t),n}(r),this.zm.rc=this}var n=t.prototype;return n.toString=function(){return this.href},n.toJSON=function(){return this.href},function(t,n,i){n&&Ti(t.prototype,n),i&&Ti(t,i)}(t,[{key:"href",get:function(){return function(t,n){void 0===n&&(n=!1);var i=t.qm+":";if(null!==t.$m?(i+="//",fr(t)&&(i+=t.jm,""!==t.Qm&&(i+=":"+t.Qm),i+="@"),i+=Ce(t.$m),null!==t.ep&&(i+=":"+t.ep)):null===t.$m&&"file"===t.qm&&(i+="//"),t.tp)i+=t.Jm[0];else for(var e=0,r=t.Jm;e<r.length;e++)i+="/"+r[e];return null!==t.zm&&(i+="?"+t.zm),n||null===t.sp||(i+="#"+t.sp),i}(this.rc)},set:function(t){var n;try{n=mr(String(t),null)}catch(t){throw new m("Invalid URL: "+t.message)}this.rc=n,Xe(this.zm);var i=this.rc.zm;null!==i&&je(this.zm,i)}},{key:"origin",get:function(){return _r(this.rc)}},{key:"protocol",get:function(){return this.rc.qm+":"},set:function(t){pr(t+":",null,this.rc,0)}},{key:"username",get:function(){return this.rc.jm},set:function(t){lr(this.rc)||(this.rc.jm=Ie(t,ye))}},{key:"password",get:function(){return this.rc.Qm},set:function(t){lr(this.rc)||(this.rc.Qm=Ie(t,ye))}},{key:"host",get:function(){var t=this.rc,n=t.$m;if(null===n)return"";var i=t.ep,e=Ce(n);return null!==i&&(e+=":"+i),e},set:function(t){this.rc.tp||pr(t,null,this.rc,10)}},{key:"hostname",get:function(){var t=this.rc.$m;return null===t?"":Ce(t)},set:function(t){this.rc.tp||pr(t,null,this.rc,11)}},{key:"port",get:function(){var t=this.rc.ep;return null===t?"":""+t},set:function(t){lr(this.rc)||(""===t?this.rc.ep=null:pr(t,null,this.rc,12))}},{key:"pathname",get:function(){var t=this.rc.Jm;return this.rc.tp?t[0]:0===t.length?"":"/"+t.join("/")},set:function(t){this.rc.tp||(this.rc.Jm.length=0,pr(t,null,this.rc,16))}},{key:"search",get:function(){var t=this.rc.zm;return null===t||""===t?"":"?"+t},set:function(t){t=ze(t);var n=this.rc;if(""===t)return n.zm=null,void Xe(this.zm);"?"===t[0]&&(t=t.slice(1)),n.zm="",pr(t,null,n,19),je(this.zm,t)}},{key:"searchParams",get:function(){return this.zm}},{key:"hash",get:function(){var t=this.rc.sp;return null===t||""===t?"":"#"+t},set:function(t){""!==t?("#"===t[0]&&(t=t.slice(1)),this.rc.sp="",pr(t,null,this.rc,20)):this.rc.sp=null}}]),t}();function Tr(t){return t.document&&t.document.baseURI||t.location.href||""}x(),pt();var Ir=function(){function t(){this.Cg=void 0,this.yp=new Er,this.Sp=oi,this.Ap=kr(),self.performance&&self.performance.now?this.Cg=function(){return self.performance.now()}:this.Cg=Kn}var n=t.prototype;return n.np=function(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];pi.apply(void 0,[].concat(n))},n.rp=function(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];yi.apply(void 0,[].concat(n))},n.hp=function(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];_i.apply(void 0,[].concat(n))},n.op=function(t){for(var n=arguments.length,i=new Array(n>1?n-1:0),e=1;e<n;e++)i[e-1]=arguments[e];Si.apply(void 0,[].concat([t],i))},n.Ng=function(t,n){return d(t,n)},n.ap=function(t,n){return w(t,n)},n.Pg=function(t){l(t)},n.cp=function(t){b(t)},n.dp=function(){return this.lp.dp()},n.fp=function(){return this.lp.fp()},n.vp=function(){return this.lp.vp()},n._p=function(){return this.lp._p()},n.gp=function(){return this.lp.gp()},n.mp=function(t,n){return this.lp.mp(t,n)},n.pp=function(t){return this.lp.pp(t)},n.Dh=function(t,n){var i;return void 0===n&&(n=Tr(c)),i="object"!==(void 0===n?"undefined":L(n))||B(n,Sr)?n:n.href,new Sr(t,i)},n.bp=function(t,n){if(void 0===n&&(n=Tr(c)),this.Ap){var i=function(t){return"string"==typeof t}(n)?n:n.toString();return new self.URL(t,i).href}return this.Dh(t,n).href},Et(t,[{key:"wp",get:function(){return this.yp}},{key:"Zs",get:function(){return this.Sp}},{key:"Tp",get:function(){return{kp:v&&v.userAgent.match(/Android /i)?"Android":"other",Ep:Boolean(v&&v.userAgent.match(/Android 8.0.0/i))}}},{key:"Rp",get:function(){return self&&self.location&&"https:"===self.location.protocol}},{key:"Ip",get:function(){return"languages"in v?v.languages.slice():[v.language]}}]),t}(),Er=function(){function t(){}return Et(t,[{key:"xp",get:function(){return v.oscpu}},{key:"Zs",get:function(){return v.platform}},{key:"Cp",get:function(){return v.vendor}},{key:"Pp",get:function(){return v.vendorSub}}]),t}();function kr(){if(self.URL)try{var t=new self.URL("b","http://a");return t.pathname="c d","http://a/c%20d"===t.href}catch(t){}return!1}x(),pt();var Rr=function(){function t(){}var n=t.prototype;return n.gp=function(){return tt.resolve(!1)},n.fp=function(){return tt.resolve(!1)},n._p=function(){return tt.resolve(!1)},n.vp=function(){return tt.resolve(!1)},n.pp=function(t){return tt.resolve(!1)},n.mp=function(t,n){return tt.resolve(!1)},n.dp=function(){return tt.resolve(!1)},t}();x(),pt();var Or=function(){function t(){}var n=t.prototype;return n.wT=function(){},n.My=function(t){},n.Dy=function(t){},n.By=function(t,n){},t}();x(),pt();var Nr="default",Pr="unknown";x(),pt(),x(),pt(),x(),pt();var Ar=function(t){return t.bT="arraybuffer",t.AT="json",t.ST="stream",t.TT="text",t}({});x(),pt(),M();var Dr=function(){function t(n){var i=this;this.Lp=void 0,this.Lp={},B(n,t)?n.asList().forEach(function(t){var n=t[0],e=t[1];i.append(n,e)}):Array.isArray(n)?n.forEach(function(t){var n=t[0],e=t[1];i.append(n,e)}):n&&p.getOwnPropertyNames(n).forEach(function(t){i.append(t,n[t])})}var n=t.prototype;return n.append=function(t,n){var i=t,e=n;i=Cr(i),e=xr(e);var r=i.toLowerCase();if(this.Lp.hasOwnProperty(r)){var o=this.Lp[r],u=o[1];o[1]=u?u+", "+e:e}else this.Lp[r]=[i,e]},n.delete=function(t){var n=Cr(t).toLowerCase();delete this.Lp[n]},n.get=function(t){var n=Cr(t).toLowerCase();return this.Lp.hasOwnProperty(n)?this.Lp[n][1]:null},n.has=function(t){var n=Cr(t).toLowerCase();return this.Lp.hasOwnProperty(n)},n.set=function(t,n){var i=t,e=(i=Cr(i)).toLowerCase();this.Lp[e]=[i,xr(n)]},n.forEach=function(t,n){for(var i in this.Lp)this.Lp.hasOwnProperty(i)&&t.call(n,this.Lp[i][1],i,this)},n.asList=function(){var t=[];for(var n in this.Lp)if(this.Lp.hasOwnProperty(n)){var i=this.Lp[n],e=i[0],r=i[1];t.push([e,r])}return t},n.kT=function(){var t={};return this.forEach(function(n,i){t[i]=n}),t},n.ET=function(t){var n=this;t.forEach(function(t,i){n.append(i,t)})},n.IT=function(t){var n=this;t.forEach(function(t,i){n.set(i,t)})},t}();function Cr(t){var n=t;if("string"!=typeof n&&(n=String(n)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(n))throw new m("Invalid character in header field name");return n}function xr(t){var n=t;return"string"!=typeof n&&(n=String(n)),n}var Br=function(t){return t.DELETE="DELETE",t.GET="GET",t.HEAD="HEAD",t.OPTIONS="OPTIONS",t.POST="POST",t.PUT="PUT",t}({}),Mr=function(t){return t.Ek="same-origin",t.Rk="no-cors",t.Ik="cors",t.xk="navigate",t}({}),Lr=function(t,n){this.LT=void 0,this.JT=void 0,this.Ck=void 0,this.jT=void 0,this.Pk=void 0,this.Nk=void 0,this.Hg=void 0,this.Gp=void 0,this.Dk=void 0,this.Bk=void 0,this.Yu=void 0,this.Lk=void 0,this.Mk=void 0,this.Ok=void 0,this.Fk=void 0,this.Vk=void 0;var i,e,r,o,u,s,f,h,c,a,v,d,l,w,b,g,m,p,y=t.Yu;n?(i=n.LT,e=n.JT,r=n.Ck,o=n.jT,u=n.Pk,s=n.Nk,f=n.Hg,h=n.Gp,c=n.Dk,a=n.Bk,v=n.Lk,d=n.Mk,l=n.Ok,w=n.Fk,b=n.Vk):(i=null,e={},r="GET",o=Ar.TT,u=0,s=0,h="",c="",a="",v=!1,l=void 0,w=!1,b=void 0),this.Yu=y,this.LT=t.LT||i,this.JT=new Dr(t.JT||e),this.Ck=t.Ck||r,this.jT=t.jT||o,this.Pk=void 0!==t.Pk?Number(t.Pk)||0:u,this.Nk=void 0!==t.Nk?Number(t.Nk)||0:s,this.Hg=t.Hg||f||(new vn).Hg,this.Gp=t.Gp||h,this.Dk=t.Dk||c,this.Bk=t.Bk||a,this.Lk=void 0!==t.Lk?Boolean(t.Lk):v,this.Mk=t.Mk||d,this.Ok=null!=(g=t.Ok)?g:l,this.Fk=null!=(m=t.Fk)?m:w,this.Vk=null!=(p=t.Vk)?p:b};x(),pt(),x(),pt();var Ur=function(t){return t.Kk="HttpOpenError",t.qk="HttpResponseError",t.jk="HttpTimeoutError",t}({}),Fr=function(t){function n(n,i,e){var r;return(r=t.call(this,i,e)||this).Qk=void 0,r.Qk=n,r}return Tt(n,t),Et(n,[{key:"QT",get:function(){return this.Qk}}]),n}(ln);var zr=function(t){function n(n,i){return t.call(this,n,function(t){return"Error while opening "+t+". Invalid URL."}(n.Yu),i)||this}return Tt(n,t),Et(n,[{key:"name",get:function(){return Ur.Kk}}]),n}(Fr),Wr=function(){function t(){}var n=t.prototype;return n.QT=function(t){return tt.reject(new zr(new Lr(t)))},n.Wk=function(t){},n.kn=function(){},t}();x(),pt();var Vr=function(t){function n(n){return t.call(this,"Invalid XML",n)||this}return Tt(n,t),n}(ln),qr=function(t){function n(){var n;return(n=t.apply(this,arguments)||this).iR=new Rr,n.XV=new Wr,n.i=new Or,n}return Tt(n,t),n.prototype.xE=function(t){throw new Vr},Et(n,[{key:"lp",get:function(){return this.iR}},{key:"eR",get:function(){return!1}},{key:"nR",get:function(){return!1}},{key:"aR",get:function(){return!1}},{key:"hR",get:function(){return!1}},{key:"uR",get:function(){return this.i}},{key:"cR",get:function(){return{dR:Zt}}},{key:"lR",get:function(){return Nr}},{key:"fR",get:function(){return Pr}},{key:"vR",get:function(){return this.XV}}]),n}(Ir);function Hr(){return Hr=p.assign||function(t){for(var n=1;n<arguments.length;n++){var i=arguments[n];for(var e in i)p.prototype.hasOwnProperty.call(i,e)&&(t[e]=i[e])}return t},Hr.apply(this,arguments)}function Xr(){var t=p.create(null);return t.Np=void 0,delete t.Np,t}function jr(){return new Kr}$t(new qr),x(),pt(),x(),pt(),x(),pt(),x(),pt(),x(),pt(),x(),pt();var Yr="undefined"!=typeof Map&&"entries"in Map.prototype?Map:void 0,Kr=Yr||function(){var t=function(){function t(t,n){this.data=void 0,this.keys=void 0,this.index=0,this.selector=void 0,this.data=t,this.selector=n,this.keys=p.keys(t)}return t.prototype.next=function(){var t=this.index;return t<this.keys.length?(this.index++,{value:this.selector(this.data,this.keys[t]),done:!1}):{value:void 0,done:!0}},t}();return function(){function n(){this.data=Xr(),this.size=0}var i=n.prototype;return i.get=function(t){return this.data[t]},i.set=function(t,n){return this.has(t)||this.size++,this.data[t]=n,this},i.has=function(t){return t in this.data},i.delete=function(t){return!!this.has(t)&&(this.size--,delete this.data[t],!0)},i.clear=function(){this.data=Xr(),this.size=0},i.keys=function(){return new t(this.data,function(t,n){return n})},i.values=function(){return new t(this.data,function(t,n){return t[n]})},i.entries=function(){return new t(this.data,function(t,n){return[n,t[n]]})},i.forEach=function(t){for(var n in this.data)t(this.data[n],n)},n}()}();Yr||function(){var t=function(){function t(t,n){this.Dp=void 0,this.Bp=void 0,this.Dp=t,this.Bp=n}return t.prototype.next=function(){var t=this.Dp.next();return t.done?t:{value:this.Bp(t.value),done:!1}},t}();(function(){function n(){this.Lp=jr()}var i=n.prototype;i.get=function(t){return this.Lp.get(""+t)},i.set=function(t,n){return this.Lp.set(""+t,n),this},i.has=function(t){return this.Lp.has(""+t)},i.delete=function(t){return this.Lp.delete(""+t)},i.clear=function(){this.Lp.clear()},i.keys=function(){return new t(this.Lp.keys(),function(t){return Number(t)})},i.values=function(){return this.Lp.values()},i.entries=function(){return new t(this.Lp.entries(),function(t){var n=t[0],i=t[1];return[Number(n),i]})},i.forEach=function(t){this.Lp.forEach(function(n,i){t(n,Number(i))})},Et(n,[{key:"size",get:function(){return this.Lp.size}}])})()}();x(),pt(),x(),pt();var Gr="9a04f079-9840-4286-ab92-e65be0885f95",$r="urn:uuid:"+Gr,Zr="com.microsoft.playready",Jr="edef8ba9-79d6-4ace-a3c8-27dcd51d21ed",Qr="urn:uuid:"+Jr,to="com.widevine.alpha",no="1077efec-c0b2-4d02-ace3-3c1e52e2fb4b",io="urn:uuid:"+no,eo="org.w3.clearkey",ro="94ce86fb-07ff-4f43-adb8-93d2fa968ca2",oo="urn:uuid:"+ro,uo="com.apple.fps.1_0";x(),pt();var so=function(t){return t.Mp="playready",t.Op="widevine",t.Wp="fairplay",t.Fp="clearkey",t.Vp="clearkey_dash_if",t.Up="aes128",t}({}),fo={Gp:so.Mp,Xp:Zr,Zp:"cenc",Hp:Gr,zp:$r,Yp:"PlayReady"},ho={Gp:so.Op,Xp:to,Zp:"cenc",Hp:Jr,zp:Qr,Yp:"Widevine"},co={Gp:so.Wp,Xp:uo,Zp:"skd",Hp:ro,zp:oo,Yp:"FairPlay"},ao=(so.Wp,{Gp:so.Fp,Xp:eo,Zp:"cenc",Hp:no,zp:io,Yp:"ClearKey"});so.Vp;x(),pt();String.prototype.replaceAll;var vo="function"==typeof String.prototype.startsWith?function(t,n){return Ht(t)&&t.startsWith(n)}:function(t,n){return Ht(t)&&t.substr(0,n.length)===n},lo=(String.prototype.endsWith,"function"==typeof String.prototype.repeat?function(t,n){return t.repeat(n)}:function(t,n){var i=0|n;if(0===t.length||0===i)return"";for(var e=t,r="";1&~i||(r+=e),0!=(i>>>=1);)e+=e;return r}),wo=(String.prototype.padStart,String.prototype.padEnd,16384),bo="function"==typeof String.fromCodePoint?function(t){var n;return t.length<=wo?(n=String).fromCodePoint.apply(n,[].concat(t)):mo(t,String.fromCodePoint)}:function(t){for(var n,i=[],e=Rt(t);!(n=e()).done;){var r=n.value;r>65535&&(r-=65536,i.push(r>>>10&1023|55296),r=56320|1023&r),i.push(r)}return go(i)};function go(t){var n;return t.length<=wo?(n=String).fromCharCode.apply(n,[].concat(t)):mo(t,String.fromCharCode)}function mo(t,n){for(var i=[],e=0;e<t.length;e+=wo)i.push(n.apply(void 0,[].concat(t.slice(e,e+wo))));return i.join("")}var po=Vt.u_&&Vt.d_>=42||Vt.V_&&Vt.U_>=38||Vt.P_||Vt.L_||Vt.Y_&&Vt.q_>=29;function yo(t,n){return function(t,n){return Ht(t)&&-1!==t.indexOf(n)}(t,"audio")?{initDataTypes:["cenc"],audioCapabilities:[Hr({contentType:t},n?{robustness:"SW_SECURE_CRYPTO"}:{})]}:{initDataTypes:["cenc"],videoCapabilities:[Hr({contentType:t},n?{robustness:"SW_SECURE_CRYPTO"}:{})]}}var _o=function(){function t(t){this.jp=void 0,this.Kp=jr(),this.Qp=void 0,this.jp=t}var n=t.prototype;return n.gp=function(){return this.pp(ho)},n.fp=function(){return this.pp(ao)},n._p=function(){return this.pp(fo)},n.vp=function(){return this.pp(co)},n.pp=function(t){var n=t.zp,i=this.Kp.get(n);if(i)return i;var e=this.mp(t,'video/mp4; codecs="avc1.42000a"');return this.Kp.set(n,e),e},n.mp=function(t,n){return tn(function(){return nn(this,function(i){switch(i.label){case 0:return i.trys.push([0,2,,7]),[4,this.jp.qp(t.Xp,[yo(n,!0)])];case 1:return i.sent(),[2,!0];case 2:i.sent(),i.label=3;case 3:return i.trys.push([3,5,,6]),[4,this.jp.qp(t.Xp,[yo(n,!1)])];case 4:return i.sent(),[2,!0];case 5:return i.sent(),[2,!1];case 6:return[3,7];case 7:return[2]}})}).call(this)},n.dp=function(){return this.Qp||(this.Qp=this.Jp()),this.Qp},n.Jp=function(){return tn(function(){return nn(this,function(t){switch(t.label){case 0:return"https:"===c.location.protocol?[2,!1]:po?[4,this.fp()]:[2,!1];case 1:return t.sent()?[2,!1]:[2,!0]}})}).call(this)},t}();function So(t,n,i){if("function"==typeof i)i.call(t,n);else for(var e,r=Rt(i);!(e=r()).done;){e.value.call(t,n)}}x(),pt(),x(),pt(),x(),pt(),x(),pt(),x(),pt(),x(),pt();var To=function(){function t(t){var n=this;this.iw=Xr(),this.hw=void 0,this.ew=0,this.ow=void 0,this.Rs=function(t){n.So(t)},this.ow=null!=t?t:this}var n=t.prototype;return n.wn=function(t,n){if("function"==typeof n)if("string"==typeof t)this.$p(t,n);else for(var i,e=Rt(t);!(i=e()).done;){var r=i.value;this.$p(r,n)}},n.$p=function(t,n){var i=this.iw[t];void 0===i?this.iw[t]=n:"function"==typeof i?this.iw[t]=[i,n]:0===this.ew?i.push(n):this.iw[t]=i.concat(n)},n.nw=function(t){if("function"==typeof t){var n=this.hw;void 0===n?this.hw=t:"function"==typeof n?this.hw=[n,t]:0===this.ew?n.push(t):this.hw=n.concat(t)}},n.Vo=function(){this.iw=Xr(),this.hw=void 0},n.So=function(t){this.ew++;var n=this.iw[t.type],i=this.hw;void 0!==n&&So(this.ow,t,n),void 0!==i&&So(this.ow,t,i),this.ew--},n.mn=function(t,n){if("function"==typeof n)if("string"==typeof t)this.aw(t,n);else for(var i,e=Rt(t);!(i=e()).done;){var r=i.value;this.aw(r,n)}},n.aw=function(t,n){var i=this.iw[t];void 0!==i&&("function"==typeof i?i===n&&(this.iw[t]=void 0):0===this.ew?sn(i,n):this.iw[t]=fn(i,n))},n.uw=function(t){if("string"==typeof t)this.iw[t]=void 0;else for(var n,i=Rt(t);!(n=i()).done;){var e=n.value;this.iw[e]=void 0}},n.cw=function(t){var n=this.hw;void 0!==n&&("function"==typeof n?n===t&&(this.hw=void 0):0===this.ew?sn(n,t):this.hw=fn(n,t))},n.dw=function(t,n){var i=this;return new tt(function(e,r){if(n&&n.Mg)return r(new wn);var o=function(t){s(),e(t)},u=function(){s(),r(new wn)},s=function(){i.mn(t,o),n&&n.Gg(u)};i.wn(t,o),n&&n.Ug(u)})},t}();x(),pt(),x(),pt();var Io=function(t,n){void 0===n&&(n=new Date),this.type=void 0,this.date=void 0,this.type=t,this.date=n};x(),pt();var Eo=function(t){return t.lw="fw",t._w="gw",t.mw="contentprotectionerror",t.pw="contentprotectionsuccess",t.ww="currentsourcechange",t.yw="destroy",t.Aw="durationchange",t.Sw="emptied",t.Tw="encrypted",t.Ew="ended",t.Rw="Iw",t.xw="Cw",t.Pw="Nw",t.Dw="Bw",t.Lw="loadstart",t.Mw="manifestupdate",t.Ow="nosupportedrepresentationfound",t.Fw="offline",t.Vw="online",t.Ww="pause",t.uo="play",t.Uw="progress",t.Gw="ratechange",t.Xw="representationchange",t.Zw="resize",t.Hw="seeked",t.zw="seeking",t.Yw="segmentnotfound",t.Kw="qw",t.jw="Qw",t.do="sourcechange",t.Jw="timeupdate",t.$w="volumechange",t.iy="ey",t.sy="oy",t.LICENSE_REQUEST_GENERATED="uy",t.ly="metricschange",t}({}),ko=["cenc"],Ro=["cbcs","cbcs-1-9"],Oo=function(t){function n(n){var i;return(i=t.call(this,Eo.sy)||this).vy=void 0,i.vy=n,i}return Tt(n,t),n}(Io),No=function(t){function n(n,i,e,r){var o;return(o=t.call(this,"gy")||this).py=void 0,o.wy=void 0,o.gy=void 0,o.yy=void 0,o.py=n,o.wy=i,o.gy=e,o.yy=r,o}return Tt(n,t),n}(Io),Po=function(t){function n(){return t.call(this,"lt")||this}return Tt(n,t),n}(Io);x(),pt(),x(),pt(),x(),pt();var Ao="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");function Do(t,n,i){return Ao[t>>2]+Ao[(3&t)<<4|n>>4]+Ao[(15&n)<<2|i>>6]+Ao[63&i]}function Co(t,n,i){for(var e=[],r=n;r<i;r+=3)e.push(Do(t[r],t[r+1],t[r+2]));return e.join("")}x(),pt(),M(),x(),pt();var xo=function(){function t(t){void 0===t&&(t=0),this.uc=void 0,this.uc=t}var n=t.prototype;return n.Ty=function(t){this.uc+=t},n.Ey=function(t){this.uc=t},n.Ry=function(){return new t(this.ac)},Et(t,[{key:"ac",get:function(){return this.uc}}]),t}();function Bo(t){if(t>=55296&&t<=57343)throw new g("Lone surrogate U+"+t.toString(16).toUpperCase()+" is not a scalar value")}function Mo(t,n){return t>>n&63|128}function Lo(t,n){4294967168&t?(4294965248&t?4294901760&t?4292870144&t||(n.push(t>>18&7|240),n.push(Mo(t,12)),n.push(Mo(t,6))):(Bo(t),n.push(t>>12&15|224),n.push(Mo(t,6))):n.push(t>>6&31|192),n.push(63&t|128)):n.push(t)}function Uo(t,n){if(n.ac>=t.length)throw new g("Invalid byte index");var i=255&t[n.ac];if(n.Ty(1),128==(192&i))return 63&i;throw new g("Invalid continuation byte")}function Fo(t,n){var i=n.ac;if(i>t.length)throw new g("Invalid byte index");if(i===t.length)return!1;var e=255&t[i];if(n.Ty(1),!(128&e))return e;if(192==(224&e)){var r=(31&e)<<6|Uo(t,n);if(r>=128)return r;throw new g("Invalid continuation byte")}if(224==(240&e)){var o=(15&e)<<12|Uo(t,n)<<6|Uo(t,n);if(o>=2048)return Bo(o),o;throw new g("Invalid continuation byte")}if(240==(248&e)){var u=(7&e)<<18|Uo(t,n)<<12|Uo(t,n)<<6|Uo(t,n);if(u>=65536&&u<=1114111)return u}throw new g("Invalid UTF-8 detected")}x(),pt(),x(),pt();function zo(t,n,i){void 0===i&&(i=!1);var e=t.getUint16(n.ac,i);return n.Ty(2),e}function Wo(t,n,i,e){void 0===e&&(e=!1),t.setUint16(n.ac,i,e),n.Ty(2)}function Vo(t,n,i,e){void 0===e&&(e=!1),t.setUint32(n.ac,i,e),n.Ty(4)}function qo(t,n,i,e){void 0===e&&(e=!1);for(var r=i.length,o=0;o<r;o+=1){Wo(t,n,i.charCodeAt(o),e)}}function Ho(t,n){return void 0===n&&(n=!1),function(t,n,i,e){for(var r=[];n.ac+2<=t.byteLength;){var o=zo(t,n,i);if(e&&!o)break;r.push(o)}return go(r)}(Yo(t),new Zo,n,!1)}function Xo(t){return function(t){return bo(t)}(function(t,n){var i,e=[],r=new Zo;if(!n){if(!1===(i=Fo(t,r)))return e;65279===i||e.push(i)}for(;!1!==(i=Fo(t,r));)e.push(i);return e}(Ko(t)))}function jo(t){return new I(function(t){for(var n,i=[],e=Rt(t);!(n=e()).done;)Lo(n.value,i);return i}(function(t){for(var n=[],i=0,e=t.length;i<e;){var r=t.charCodeAt(i++);if(r>=55296&&r<=56319&&i<e){var o=t.charCodeAt(i++);56320==(64512&o)?n.push(((1023&r)<<10)+(1023&o)+65536):(n.push(r),i--)}else n.push(r)}return n}(t)))}function Yo(t){return new DataView(t.buffer,t.byteOffset,t.byteLength)}function Ko(t){return new I(t.buffer,t.byteOffset,t.byteLength)}function Go(t){return B(t,ArrayBuffer)?new I(t):Ko(t)}function $o(t){if(t.slice)return t.slice(0);var n=new I(t.byteLength);return n.set(t,0),n}var Zo=function(){function t(t){void 0===t&&(t=0),this.uc=void 0,this.uc=t}var n=t.prototype;return n.Ty=function(t){this.uc+=t},n.Ey=function(t){this.uc=t},n.Ry=function(){return new t(this.ac)},n.Cy=function(){return new xo(this.ac<<3)},Et(t,[{key:"ac",get:function(){return this.uc}}]),t}(),Jo=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]","[object DataView]"],Qo=ArrayBuffer.isView||function(t){return t&&hn(Jo,qt.call(t))};function tu(t,n){return t===n||function(t,n){if(t===n)return!0;if(t.byteLength!==n.byteLength)return!1;if(t.buffer===n.buffer&&t.byteOffset===n.byteOffset)return!0;for(var i=0;i<t.length;i+=1)if(t[i]!==n[i])return!1;return!0}(Go(t),Go(n))}function nu(t){var n=t.reduce(function(t,n){return t+n.byteLength},0);return function(t,n){for(var i,e=new I(n),r=0,o=Rt(t);!(i=o()).done;){var u=i.value;e.set(u,r),r+=u.byteLength}return e}(t,n)}function iu(t){return function(t){for(var n=t.length,i=n%3,e=[],r=n-i,o=0;o<r;o+=16383)e.push(Co(t,o,y.min(r,o+16383)));if(1===i){var u=t[n-1];e.push(Ao[u>>2]+Ao[(3&u)<<4]+"==")}else if(2===i){var s=t[n-2],f=t[n-1];e.push(Ao[s>>2]+Ao[(3&s)<<4|f>>4]+Ao[(15&f)<<2]+"=")}return e.join("")}(new I(t))}var eu=new I([0]).buffer,ru=function(){function t(){this.nc=void 0,this.nc=[]}var n=t.prototype;return n.Ny=function(t){for(var n,i=Rt(this.nc);!(n=i()).done;){if(tu(n.value[0],t))return!0}return!1},n.Dy=function(t){for(var n,i=Rt(this.nc);!(n=i()).done;){var e=n.value;if(tu(e[0],t))return e[1]}},n.By=function(t,n){for(var i,e=Rt(this.nc);!(i=e()).done;){var r=i.value;if(tu(r[0],t))return void(r[1]=n)}this.nc.push([t,n])},n.Ly=function(t,n){this.nc.forEach(function(n){return t(n[1],n[0])},n)},n.My=function(){cn(this.nc)},Et(t,[{key:"Py",get:function(){return this.nc.length}}]),t}();x(),pt();var ou=function(){function t(){var t=this;this.Vy=void 0,this.Yd=void 0,this.Kd=void 0,this.Vy=new tt(function(n,i){t.Yd=n,t.Kd=i})}var n=t.prototype;return n.Oy=function(t){this.Yd&&(this.Yd(t),this.Vg())},n.Fy=function(t){this.Kd&&(this.Kd(t),this.Vg())},n.Yg=function(){this.Vy.catch(Zt),this.Fy(new wn)},n.Kg=function(t){var n=this;t.then(function(t){return n.Oy(t)},function(t){return n.Fy(t)})},n.Vg=function(){this.Yd=void 0,this.Kd=void 0},t}();function uu(t,n){return t===Zr?function(t){if(t.byteLength<2*su.length)return t;var n=new DataView(t,0,2*su.length),i=Ho(n,!0);if(i===su)return t;return function(t){var n='<PlayReadyKeyMessage type="LicenseAcquisition"><LicenseAcquisition Version="1"><Challenge encoding="base64encoded">',i='</Challenge><HttpHeaders><HttpHeader><name>Content-Type</name><value>text/xml; charset=utf-8</value></HttpHeader><HttpHeader><name>SOAPAction</name><value>"http://schemas.microsoft.com/DRM/2007/03/protocols/AcquireLicense"</value></HttpHeader></HttpHeaders></LicenseAcquisition></PlayReadyKeyMessage>',e=""+n+iu(t)+i;return function(t,n){void 0===n&&(n=!1);var i=new I(2*t.length);return qo(Yo(i),new Zo,t,n),i}(e,!0).buffer}(t)}(n):n}x(),pt();var su="<PlayReady";x(),pt(),x(),pt();var fu=function(t){function n(n,i,e,r){var o;return(o=t.call(this,n,r)||this).Wy=void 0,o.Uy=void 0,o.Wy=i,o.Uy=e,o}return Tt(n,t),n}(ln);x(),pt(),x(),pt(),x(),pt(),x(),pt(),x(),pt();var hu=function(t,n){return(hu=p.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)p.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(t,n)};function cu(t,n){if("function"!=typeof n&&null!==n)throw new m("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}hu(t,n),t.prototype=null===n?p.create(n):(i.prototype=n.prototype,new i)}function au(t,n,i){return t.indexOf?t.indexOf(n,i):Array.prototype.indexOf.call(t,n,i)}x(),pt(),x(),pt(),x(),pt(),x(),pt(),x(),pt(),x(),pt(),x(),pt();!function(){function t(t,n){this.Gy=t,this.Xy=n}t.prototype.get=function(t){var n=this.Gy.get(t);if(0===this.Xy||void 0===n)return n;var i=this.Gy.get(t+1)||0,e=n&(1<<8-this.Xy)-1,r=i>>8-this.Xy;return(e<<this.Xy)+r},t.prototype.getBit=function(t){if(!(t<0)){var n=this.Gy.get(y.floor((t+this.Xy)/8));if(void 0!==n)return(n&1<<7-this.Xy-t%8)>0?1:0}},p.defineProperty(t.prototype,"bitLength",{get:function(){return this.Gy.bitLength-this.Xy},enumerable:!1,configurable:!0}),p.defineProperty(t.prototype,"length",{get:function(){return this.Gy.length},enumerable:!1,configurable:!0})}();x(),pt(),x(),pt();y.pow(2,-52);function vu(t,n,i){return y.min(y.max(t,n),i)}function du(t,n){return t>>8-n}function lu(t,n){return t&(1<<n)-1}var wu=function(){function t(t){this.Zy=t,this.Hy=0,this.zy=0}return p.defineProperty(t.prototype,"totalBitsRead",{get:function(){return 8*this.Hy+this.zy},enumerable:!1,configurable:!0}),p.defineProperty(t.prototype,"done",{get:function(){return this.Hy===this.Zy.length&&0===this.zy},enumerable:!1,configurable:!0}),p.defineProperty(t.prototype,"location",{get:function(){return{byte:this.Hy,bit:this.zy}},enumerable:!1,configurable:!0}),t.prototype.copy=function(){var n=new t(this.Zy);return n.seek(this.Hy,this.zy),n},t.prototype.canReadBits=function(t){return 8*this.Hy+t+this.zy<=8*this.Zy.length},t.prototype.canReadBytes=function(t){return 0===this.zy?this.Hy+t<=this.Zy.length:this.Hy+t<this.Zy.length},t.prototype.incBit=function(){this.zy++,this.zy>7&&(this.Hy++,this.zy=0)},t.prototype.seek=function(t,n){this.Hy=t,this.zy=n},t.prototype.peekBit=function(){if(!this.canReadBits(1))throw new g("Cannot read past end of buffer.");return this.Zy.get(this.Hy)>>7-this.zy&1},t.prototype.readBit=function(){var t=this.peekBit();return this.incBit(),t},t.prototype.readByte=function(){if(!this.canReadBytes(1))throw new g("Cannot read past end of buffer.");if(0===this.zy)return this.Zy.get(this.Hy++);var t=lu(this.Zy.get(this.Hy),8-this.zy),n=du(this.Zy.get(this.Hy+1),this.zy);return this.Hy++,t<<this.zy|n},t.prototype.readBits=function(t){if(!this.canReadBits(t))throw new g("Cannot read past end of buffer.");for(var n=[],i=0;i<t;i++)n.push(this.readBit());return n},t.prototype.readUInt=function(t){if(t>32)throw new g("The max bitlength that can be provided is 32.");if(!this.canReadBits(t))throw new g("Cannot read past end of buffer.");var n=0;if(0===this.zy&&t%8==0)for(var i=t-8;i>=0;i-=8)n|=this.readByte()<<i;else for(i=t-1;i>=0;i--)n|=this.readBit()<<i;return n},t.prototype.readInt=function(t){if(t>32)throw new g("The max bitlength that can be provided is 32.");if(!this.canReadBits(t))throw new g("Cannot read past end of buffer.");var n=this.readUInt(t);return 0===(n&1<<t-1)?n:n-y.pow(2,t)},t.prototype.readExponentialGolombCode=function(){for(var t=0;0===this.readBit();)t++;var n=1<<t;return n+=this.readUInt(t)-1},t.prototype.readSignedExponentialGolombCode=function(){var t=this.readExponentialGolombCode();return 1&t?(t+1)/2:-t/2},t.prototype.skipBits=function(t){if(!this.canReadBits(t))throw new g("Skipping over the buffer edge is not allowed.");var n=this.zy+t;this.Hy+=n>>3,this.zy=7&n},t.prototype.readBool=function(){return this.readBit()>0},t.prototype.readString=function(t){if(!this.canReadBytes(t))throw new g("Cannot read past end of buffer.");for(var n=[],i=0;i<t;i++)n.push(this.readByte());return String.fromCharCode.apply(String,n)},t}();x(),pt(),x(),pt(),x(),pt();var bu=function(t,n){return t===n?0:t<n?-1:t>n?1:T(t)?T(n)?0:1:-1},gu=function(){function t(){this.Yy=[],this.Ky=[],this.qy=0}return t.from=function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];for(var e=new t,r=0,o=n;r<o.length;r++){var u=o[r];e.pushRange(u)}return e},t.prototype.pushRange=function(t,n,i){if(void 0===n&&(n=0),void 0===i&&(i=t.length),i<0)throw new g("The buffer length must be positive.");if(0!==i){if(0===this.Ky.length)this.Ky.push(0);else{var e=this.Ky[this.Ky.length-1]+this.Yy[this.Yy.length-1].length;this.Ky.push(e)}this.Yy.push(t.subarray(n,n+i)),this.qy+=i}},t.prototype.concat=function(n){var i=new t;return i.pushRange(this.join()),i.pushRange(n.join()),i},t.prototype.copy=function(t,n,i,e){if(void 0===n&&(n=0),void 0===i&&(i=0),void 0===e&&(e=this.length),n<0||i<0||e<0)throw new RangeError;return this.slice(i,e).copyInternal(t,n)},t.prototype.copyInternal=function(t,n){for(var i=0,e=n,r=0,o=this.Yy;r<o.length;r++){var u=o[r];t.set(u,e),i+=u.length,e+=u.length}return i},t.prototype.clear=function(){this.Yy=[],this.Ky=[],this.qy=0},t.prototype.get=function(t){if(!(t<0||t>=this.length)){var n=this.findContainingBufferIndex(t),i=t-this.Ky[n];return this.Yy[n][i]}},p.defineProperty(t.prototype,"first",{get:function(){return this.get(0)},enumerable:!1,configurable:!0}),t.prototype.indexOf=function(t){if(this.Yy.length<1)return-1;if(this.Yy.length>1){var n=this.join();this.clear(),this.pushRange(n)}var i=this.Yy[0];return"number"==typeof t?au(i,t):"undefined"!=typeof Buffer?Buffer.from(i.buffer,i.byteOffset,i.byteLength).indexOf(t):function(t,n){if(0===n.length)return 0;for(var i=n[0],e=n.length,r=t.length-e,o=0;o<=r&&!((o=au(t,i,o))<0||o>r);o++){for(var u=o+1,s=o+e,f=1;u<s&&t[u]===n[f];u++,f++);if(u===s)return o}return-1}(i,t)},t.prototype.findContainingBufferIndex=function(t){return function(t,n,i){if(0!==t.length){var e=0,r=t.length-1;if(1!==i(t[e],n)){if(1===i(n,t[r]))return r;for(;e!==r;){var o=y.ceil((e+r)/2);i(t[o],n)<=0?e=o:r=o-1}return e}}}(this.Ky,t,bu)},t.prototype.join=function(){if(1===this.Yy.length)return this.Yy[0];var t=new I(this.length);return this.copyInternal(t,0),t},p.defineProperty(t.prototype,"length",{get:function(){return this.qy},enumerable:!1,configurable:!0}),p.defineProperty(t.prototype,"bitLength",{get:function(){return 8*this.length},enumerable:!1,configurable:!0}),t.prototype.readUIntBE=function(t,n){if(n<=0||n>4)throw new g("Expected byteLength to be between 0 and 4 but was "+n);if(t<0||t>this.length-n)throw new g("Offset must be between 0 and buffer.length - byteLength, but was "+t+" (max allowed "+(this.length-n)+")");if(1===n)return this.get(t);for(var i=0,e=0;e<n;e++)i+=this.get(t+e)*y.pow(2,8*(n-e-1));return i},t.prototype.slice=function(n,i){void 0===i&&(i=this.length);var e=vu(n,0,this.length),r=vu(i,0,this.length);if(e>r)return new t;if(e===r)return new t;for(var o=new t,u=this.findContainingBufferIndex(e),s=this.Yy[u],f=e,h=f-this.Ky[u];f+s.length-h<r;)o.pushRange(s,h,s.length-h),u+=1,h=(f+=s.length-h)-this.Ky[u],s=this.Yy[u];var c=r-f;return o.pushRange(s,h,c),o},t.prototype.trim=function(){if(0===this.length)return new t;for(var n=this.length-1,i=this.Yy.length-1,e=this.Yy[i],r=e.length-1;n>=0&&i>=0;){if(0!==e[r])break;if(0===r){if(0===i)return new t;i-=1,r=(e=this.Yy[i]).length-1}else r-=1;n-=1}return this.slice(0,n+1)},t}(),mu=function(){function t(n){this.jy=n||t.BUFFER_CHUNK_SIZE,this.Qy=!1,this.Jy=new gu,this.Zy=new I(this.jy),this.$y=0,this.ib=0,this.zy=7}return t.prototype.closeByte=function(){this.Zy[this.$y++]=this.ib,this.$y>=this.jy&&this.closeBuffer(),this.ib=0,this.zy=7},t.prototype.closeBuffer=function(t){void 0===t&&(t=!0),0!==this.$y&&(this.Jy.pushRange(this.Zy,0,this.$y),t&&(this.Zy=new I(this.jy)),this.$y=0)},p.defineProperty(t.prototype,"isWritingStartBit",{get:function(){return 7===this.zy},enumerable:!1,configurable:!0}),t.prototype.close=function(){if(this.Qy)throw new g("Cannot close a closed BitWriter.");return this.isWritingStartBit||this.closeByte(),this.closeBuffer(!1),this.Qy=!0,this.Jy},t.prototype.writeBit=function(t){if(this.Qy)throw new g("Cannot write to a closed BitWriter.");this.ib|=t<<this.zy,0===this.zy?this.closeByte():this.zy--},t.prototype.writeByte=function(t){if(this.Qy)throw new g("Cannot write to a closed BitWriter.");this.isWritingStartBit?(this.ib=t,this.closeByte()):this.writeByteUnaligned(t)},t.prototype.writeByteUnaligned=function(t){var n=this.zy;this.ib|=du(t,n+1),this.closeByte(),this.ib=lu(t,8-n)<<n+1,this.zy=n},t.prototype.writeBits=function(t){for(var n=0,i=t;n<i.length;n++){var e=i[n];this.writeBit(e)}},t.prototype.writeBytes=function(t){if(this.Qy)throw new g("Cannot write to a closed BitWriter.");this.isWritingStartBit?this.writeBytesAligned(t):this.writeBytesUnaligned(t)},t.prototype.writeBytesAligned=function(t){this.$y+t.length<=this.jy?(this.Zy.set(t,this.$y),this.$y+=t.length,this.$y===this.jy&&this.closeBuffer()):(this.closeBuffer(),this.Jy.pushRange(t))},t.prototype.writeBytesUnaligned=function(t){if(0!==t.length){var n=this.zy;this.ib|=du(t[0],n+1),this.closeByte();for(var i=1;i<t.length;i++){var e=lu(t[i-1],8-n),r=du(t[i],n+1);this.ib=e<<n+1|r,this.closeByte()}this.ib=lu(t[t.length-1],8-n)<<n+1,this.zy=n}},t.prototype.writeUInt=function(t,n){if(t<0)throw new g("Received a negative number.");if(n>32)throw new g("The max bitlength that can be provided is 32.");if(t>=y.pow(2,n))throw new g("Uint "+t+" cannot be represented in "+n+" bit(s).");if(this.isWritingStartBit&&n%8==0)for(var i=n-8;i>=0;i-=8)this.writeByte(t>>i&255);else for(i=n-1;i>=0;i--)this.writeBool((t&1<<i)>0)},t.prototype.writeInt=function(t,n){if(n>32)throw new g("The max bitlength that can be provided is 32.");if(y.abs(t)>=y.pow(2,n-1))throw new g("Signed integer "+t+" cannot be represented in "+n+" bit(s).");t<0?this.writeUInt(t+y.pow(2,n),n):this.writeUInt(t,n)},t.prototype.writeExponentialGolombCode=function(t){if(t<0)throw new g("Received a negative number.");for(var n=y.floor(y.log2(t+1))+1,i=0;i<n-1;i++)this.writeBit(0);this.writeUInt(t+1,n)},t.prototype.writeSignedExponentialGolombCode=function(t){0===t?this.writeExponentialGolombCode(0):t<0?this.writeExponentialGolombCode(-2*t):this.writeExponentialGolombCode(2*t-1)},t.prototype.padByte=function(t){for(;!this.isWritingStartBit;)this.writeBit(t)},t.prototype.writeBool=function(t){this.writeBit(t?1:0)},t.prototype.writeString=function(t){for(var n=function(t){for(var n=new I(t.length),i=0;i<t.length;i++)n[i]=t.charCodeAt(i);return n}(t),i=0;i<n.length;i++)this.writeByte(n[i])},t.BUFFER_CHUNK_SIZE=1024,t}();x(),pt();var pu=function(){function t(t){this.rb=new gu,this.ef=t}return t.prototype.closeWriter=function(){void 0!==this.ef&&(this.rb=this.rb.concat(this.ef.close()),this.ef=void 0)},p.defineProperty(t.prototype,"writer",{get:function(){return void 0===this.ef&&(this.ef=new mu),this.ef},enumerable:!1,configurable:!0}),t.prototype.concat=function(t){this.closeWriter(),this.rb=this.rb.concat(t)},t.prototype.toRangedBuffer=function(){return this.closeWriter(),this.rb},t}(),yu=function(){function t(t){if(this.boxType=t,4!==t.length&&16!==t.length)throw new g("The provided box type does not conform to either a 4 character type or a 16 byte uuid.")}return t.prototype.serializeCommonBoxHeader=function(n){var i=this.getSize(),e=i>=t.LARGE_SIZE/8,r=16===this.boxType.length;n.writeUInt(e?1:i,32),n.writeString(r?"uuid":this.boxType),e&&(n.writeUInt(y.floor(i/t.LARGE_SIZE),32),n.writeUInt(i%t.LARGE_SIZE,32)),r&&n.writeString(this.boxType)},t.prototype.getSize=function(){var n=8+(this.boxType.length>4?16:0),i=this.getBoxContentSize()+n;return i>=t.LARGE_SIZE/8&&(i+=8),i},t.prototype.serialize=function(){var t=new pu;return this.serializeCommonBoxHeader(t.writer),this.serializeBoxContent(t),t.toRangedBuffer()},t.LARGE_SIZE=y.pow(2,32),t}();function _u(t,n){return B(t,Yn)?64===n:t<y.pow(2,n)}function Su(t,n){return y.round(t*y.pow(2,n))}function Tu(t,n){for(var i=0;i<n.length;i++)t.writeByte(n[i])}function Iu(t,n){return t/y.pow(2,n)}x(),pt(),M();var Eu=function(t){function n(n,i,e){var r=t.call(this,n)||this;if(r.version=i,!_u(i,8))throw new g("the provided version cannot fit in 8 bits.");return r.flags=e,r}return cu(n,t),p.defineProperty(n.prototype,"flags",{get:function(){return this.eb},set:function(t){this.eb=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return 4},n.prototype.serializeFlags=function(t){if("number"!=typeof this.flags)throw new g("Missing custom serializeFlags method.");t.writer.writeUInt(this.flags,24)},n.prototype.serializeBoxContent=function(t){t.writer.writeByte(this.version),this.serializeFlags(t)},n}(yu);x(),pt(),x(),pt();var ku=function(t){function n(n,i){var e=t.call(this,n)||this;return e.data=i,e}return cu(n,t),n.prototype.getBoxContentSize=function(){return this.data.length},n.prototype.serializeBoxContent=function(t){t.concat(gu.from(this.data))},n}(yu);x(),pt(),x(),pt();var Ru=function(){function t(t){void 0===t&&(t=0),this.offset=t}return t.prototype.shift=function(t){this.offset+=t},t.prototype.seek=function(t){this.offset=t},t.prototype.clone=function(){return new t(this.offset)},t}();x(),pt();var Ou=16384;function Nu(t){var n=t.length;if(n<=Ou)return String.fromCharCode.apply(String,t);for(var i=[],e=0;e<n;e+=Ou)i.push(String.fromCharCode.apply(String,t.slice(e,e+Ou)));return i.join("")}var Pu=function(){function t(t){this.raw=t}return t.prototype.isSet=function(t){return function(t,n){return(t&n)===n}(this.raw,t)},t}();function Au(t,n){var i=t.getUint8(n.offset);return n.shift(1),i}function Du(t,n,i){var e=Fu(Wu(t),n.offset,n.offset+i);return n.shift(e.byteLength),e}function Cu(t,n,i){return n.offset+i<=t.byteLength}function xu(t,n,i){void 0===i&&(i=!1);var e=t.getUint32(n.offset,i);return n.shift(4),e}function Bu(t,n,i){void 0===i&&(i=!1);var e=xu(t,n,i),r=xu(t,n,i),o=i?r:e,u=i?e:r;return Yn.fromBits(u,o,!0)}function Mu(t,n,i){return Nu(function(t){return[].slice.call(t)}(Du(t,n,i)))}function Lu(t,n){var i,e=Au(t,n);return 128&e?192==(224&e)?i=64*(31&e)+(63&Au(t,n)):224==(240&e)?i=4096*(15&e)+64*(63&Au(t,n))+(63&Au(t,n)):240==(248&e)&&(i=262144*(7&e)+4096*(63&Au(t,n))+64*(63&Au(t,n))+(63&Au(t,n))):i=e,i}function Uu(t,n){return function(t,n,i){var e=[],r=function(t,n){return n.offset+3<=t.byteLength&&239===t.getUint8(n.offset)&&187===t.getUint8(n.offset+1)&&191===t.getUint8(n.offset+2)}(t,n);r&&n.shift(3);for(;n.offset<t.byteLength;){var o=Lu(t,n);if(void 0===o)break;if(i&&0===o)break;e.push(o)}return function(t){for(var n=[],i=0,e=t;i<e.length;i++){var r=e[i];r>65535&&(r-=65536,n.push(r>>>10&1023|55296),r=56320|1023&r),n.push(r)}return Nu(n)}(e)}(t,n,!0)}function Fu(t,n,i){return void 0===n&&(n=0),void 0===i&&(i=t.byteLength),new I(t.buffer,t.byteOffset+n,i-n)}function zu(t,n,i){return void 0===n&&(n=0),void 0===i&&(i=t.byteLength),new DataView(t.buffer,t.byteOffset+n,i-n)}function Wu(t){return new I(t.buffer,t.byteOffset,t.byteLength)}var Vu=function(){function t(t){void 0===t&&(t=0),this.offset=t}return t.prototype.shift=function(t){this.offset+=t},t.prototype.seek=function(t){this.offset=t},t.prototype.clone=function(){return new t(this.offset)},t.prototype.toBit=function(){return new Ru(this.offset<<3)},t}();x(),pt();var qu=function(){function t(t,n){this.data=t,this.cursor=n}return t.prototype.nextUint8=function(){return Au(this.data,this.cursor)},t.prototype.nextUint16=function(){return function(t,n,i){void 0===i&&(i=!1);var e=t.getUint16(n.offset,i);return n.shift(2),e}(this.data,this.cursor)},t.prototype.nextInt16=function(){return function(t,n,i){void 0===i&&(i=!1);var e=t.getInt16(n.offset,i);return n.shift(2),e}(this.data,this.cursor)},t.prototype.nextUint32=function(){return xu(this.data,this.cursor)},t.prototype.nextInt32=function(){return function(t,n,i){void 0===i&&(i=!1);var e=t.getInt32(n.offset,i);return n.shift(4),e}(this.data,this.cursor)},t.prototype.nextInt64=function(){return function(t,n,i){void 0===i&&(i=!1);var e=xu(t,n,i),r=xu(t,n,i),o=i?r:e,u=i?e:r;return Yn.fromBits(u,o,!1)}(this.data,this.cursor)},t.prototype.nextUint64=function(){return Bu(this.data,this.cursor)},t.prototype.nextUint8Array=function(t){return Du(this.data,this.cursor,t)},t.prototype.nextUint32Array=function(t){return function(t,n,i){for(var e=[],r=0;r<i;r++)e.push(xu(t,n));return e}(this.data,this.cursor,t)},t.prototype.nextChars=function(t){return Mu(this.data,this.cursor,t)},t.prototype.nextUTF8String=function(){return Uu(this.data,this.cursor)},t.prototype.skip=function(t){this.cursor.shift(t)},t.prototype.clone=function(){return new t(this.data,this.cursor.clone())},t}();function Hu(t,n){return t.type===n}function Xu(t){var n=function(t,n){var i=[];for(;n.offset<t.byteLength;){var e=ju(t,n);if(!e.complete)return{complete:!1,boxes:i};i.push(e.box)}return{complete:!0,boxes:i}}(t.data,t.cursor);if(!n.complete)throw new g("Data incomplete");return n.boxes}function ju(t,n){var i=n.offset,e=function(t,n){var i=n.offset;if(!Cu(t,n,8)){return{complete:!1,neededOffset:o=n.offset+8}}var e=xu(t,n),r=Mu(t,n,4);if(1===e){if(!Cu(t,n,8)){var o=n.offset+8;return n.seek(i),{complete:!1,neededOffset:o}}e=Bu(t,n).toNumber()}if("uuid"===r){if(!Cu(t,n,16)){o=n.offset+16;return n.seek(i),{complete:!1,neededOffset:o}}r=Mu(t,n,16)}var u=n.offset,s={type:r,size:e,headerSize:u-i};return{complete:!0,header:s}}(t,n);if(!e.complete)return e;var r=e.header,o=r.size;0===o&&(o=t.byteLength-i);var u=i+o;if(u>t.byteLength){var s=u;return n.seek(i),{complete:!1,neededOffset:s}}var f={type:r.type,offset:i,data:new qu(zu(t,i,u),new Vu(r.headerSize))};return n.seek(u),{complete:!0,box:f}}function Yu(t){return{version:t>>24,flags:new Pu(16777215&t)}}function Ku(t,n){var i,e,r,o;return 1===n?(i=t.nextUint64(),e=t.nextUint64(),r=t.nextUint32(),o=t.nextUint64()):(i=t.nextUint32(),e=t.nextUint32(),r=t.nextUint32(),o=t.nextUint32()),{creation:i,modification:e,scale:r,duration:o}}function Gu(t){return t.skipBits(4),{isLeading:t.readUInt(2),sampleDependsOn:t.readUInt(2),sampleIsDependedOn:t.readUInt(2),sampleHasRedundancy:t.readUInt(2),samplePaddingValue:t.readUInt(3),sampleIsNonSyncSample:Boolean(t.readBit()),sampleDegradationPriority:t.readUInt(16)}}function $u(t){var n=t.nextUint32Array(9);return{a:Iu(n[0],16),b:Iu(n[1],16),u:Iu(n[2],30),c:Iu(n[3],16),d:Iu(n[4],16),v:Iu(n[5],30),x:Iu(n[6],16),y:Iu(n[7],16),w:Iu(n[8],30)}}function Zu(t){return new ku(t.type,Fu(Wu(t.data.data),t.data.cursor.offset))}var Ju=function(t){function n(n,i,e,r){void 0===e&&(e=0),void 0===r&&(r=0);var o=t.call(this,"hdlr",e,r)||this;return o.name=i,o.handlerType=n,o}return cu(n,t),p.defineProperty(n.prototype,"handlerType",{get:function(){return this.sb},set:function(t){this.sb=t},enumerable:!1,configurable:!0}),n.prototype.serializeReserved=function(t){t.writer.writeUInt(0,32),t.writer.writeUInt(0,32),t.writer.writeUInt(0,32)},n.prototype.getBoxContentSize=function(){var n,i;return t.prototype.getBoxContentSize.call(this)+4+4+12+(null!==(i=null===(n=this.name)||void 0===n?void 0:n.length)&&void 0!==i?i:0)+1},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(0,32),n.writer.writeString(this.handlerType),this.serializeReserved(n),this.name&&n.writer.writeString(this.name),n.writer.writeByte(0)},n}(Eu);function Qu(t){var n=t.data,i=Yu(n.nextUint32()),e=i.version,r=i.flags;n.skip(4);var o=n.nextChars(4);n.skip(12);var u=n.nextUTF8String();return new Ju(o,u,e,r.raw)}!function(t){function n(){return t.call(this,"mdir")||this}cu(n,t),n.prototype.serializeReserved=function(t){t.writer.writeString("appl"),t.writer.writeUInt(0,32),t.writer.writeUInt(0,32)}}(Ju);x(),pt(),x(),pt(),x(),pt();var ts=function(){function t(t,n){void 0===n&&(n=!1),this.fixed28BitMode=n,this.tag=t}return t.prototype.encodeSize=function(t){for(var n=[];t>0;)n.length>0&&(n[n.length-1]+=128),n.push(t%128),t>>=7;if(this.fixed28BitMode)for(;n.length<4;)n.push(128);return n.reverse()},p.defineProperty(t.prototype,"tag",{get:function(){return this.hb},set:function(t){if(!_u(t,8))throw new g("Provided tag does not fit in 8 bits.");this.hb=t},enumerable:!1,configurable:!0}),t.prototype.getSize=function(){return this.getDescriptorSize()+1+this.encodeSize(this.getDescriptorSize()).length},t.prototype.serialize=function(t){t.writer.writeByte(this.tag);for(var n=0,i=this.encodeSize(this.getDescriptorSize());n<i.length;n++){var e=i[n];t.writer.writeByte(e)}this.serializeDescriptorContent(t)},t}();x(),pt();!function(t){function n(n,i,e,r,o,u,s){void 0===s&&(s={});var f=t.call(this,4,s.fixed28BitMode)||this;return f.upStream=e,f.decoderSpecificInfo=u,f.objectTypeIndication=n,f.streamType=i,f.bufferSizeDb=r,f.maxBitrate=o.max,f.avgBitrate=o.avg,f}cu(n,t),p.defineProperty(n.prototype,"objectTypeIndication",{get:function(){return this.ob},set:function(t){if(!_u(t,8))throw new g("Provided objectTypeIndication does not fit in 8 bits.");this.ob=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"streamType",{get:function(){return this.ub},set:function(t){if(!_u(t,6))throw new g("Provided streamType does not fit in 6 bits.");this.ub=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"bufferSizeDb",{get:function(){return this.fb},set:function(t){if(!_u(t,24))throw new g("Provided bufferSizeDb does not fit in 24 bits.");this.fb=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"maxBitrate",{get:function(){return this._b},set:function(t){if(!_u(t,32))throw new g("Provided maxBitrate does not fit in 32 bits.");this._b=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"avgBitrate",{get:function(){return this.gb},set:function(t){if(!_u(t,32))throw new g("Provided avgBitrate does not fit in 32 bits.");this.gb=t},enumerable:!1,configurable:!0}),n.prototype.getDescriptorSize=function(){return 13+this.decoderSpecificInfo.reduce(function(t,n){return t+n.getSize()},0)},n.prototype.serializeDescriptorContent=function(t){t.writer.writeByte(this.objectTypeIndication),t.writer.writeUInt(this.streamType,6),t.writer.writeBool(this.upStream),t.writer.writeBit(1),t.writer.writeUInt(this.bufferSizeDb,24),t.writer.writeUInt(this.maxBitrate,32),t.writer.writeUInt(this.avgBitrate,32);for(var n=0,i=this.decoderSpecificInfo;n<i.length;n++){i[n].serialize(t)}}}(ts);x(),pt();!function(t){function n(n,i){void 0===i&&(i={});var e=t.call(this,5,i.fixed28BitMode)||this;return e.data=n,e}cu(n,t),n.prototype.getDescriptorSize=function(){return this.data.length},n.prototype.serializeDescriptorContent=function(t){t.concat(gu.from(this.data))}}(ts);x(),pt(),x(),pt();var ns=function(t){function n(n){void 0===n&&(n=!1);var i=t.call(this,6,n)||this;return i.predefined=2,i}return cu(n,t),n.prototype.getDescriptorSize=function(){return 1},n.prototype.serializeDescriptorContent=function(t){t.writer.writeByte(this.predefined)},n}(ts);!function(t){function n(n,i,e,r){void 0===r&&(r={});var o=t.call(this,3,r.fixed28BitMode)||this;return o.decoderConfigDescriptor=e,o.esId=n,o.streamPriority=i,o.dependsOnEsId=null==r?void 0:r.dependsOnEsId,o.urlString=null==r?void 0:r.url,o.ocrEsId=null==r?void 0:r.ocrEsId,o.slConfigDescriptor=new ns(r.fixed28BitMode),o}cu(n,t),p.defineProperty(n.prototype,"streamDependenceFlag",{get:function(){return void 0!==this.dependsOnEsId},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"urlFlag",{get:function(){return void 0!==this.urlString},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"ocrStreamFlag",{get:function(){return void 0!==this.ocrEsId},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"esId",{get:function(){return this.mb},set:function(t){if(!_u(t,16))throw new g("Provided esId does not fit in 16 bits.");this.mb=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"streamPriority",{get:function(){return this.pb},set:function(t){if(!_u(t,5))throw new g("Provided streamPriority does not fit in 5 bits.");this.pb=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"dependsOnEsId",{get:function(){return this.wb},set:function(t){if(t&&!_u(t,16))throw new g("Provided dependsOnEsId does not fit in 16 bits.");this.wb=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"ocrEsId",{get:function(){return this.yb},set:function(t){if(t&&!_u(t,16))throw new g("Provided ocrEsId does not fit in 16 bits.");this.yb=t},enumerable:!1,configurable:!0}),n.prototype.getDescriptorSize=function(){return 3+(this.streamDependenceFlag?2:0)+(this.urlFlag?1+this.urlString.length:0)+(this.ocrStreamFlag?2:0)+this.decoderConfigDescriptor.getSize()+this.slConfigDescriptor.getSize()},n.prototype.serializeDescriptorContent=function(t){t.writer.writeUInt(this.esId,16),t.writer.writeBool(this.streamDependenceFlag),t.writer.writeBool(this.urlFlag),t.writer.writeBool(this.ocrStreamFlag),t.writer.writeUInt(this.streamPriority,5),this.streamDependenceFlag&&t.writer.writeUInt(this.dependsOnEsId,16),this.urlFlag&&(t.writer.writeByte(this.urlString.length),t.writer.writeString(this.urlString)),this.ocrStreamFlag&&t.writer.writeUInt(this.ocrEsId,16),this.decoderConfigDescriptor.serialize(t),this.slConfigDescriptor.serialize(t)}}(ts);x(),pt(),x(),pt(),x(),pt(),x(),pt(),x(),pt();var is=function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n.boxes=[],n}return cu(n,t),n.prototype.getSize=function(){return t.prototype.getSize.call(this)+this.boxes.reduce(function(t,n){return t+n.getSize()},0)},n.prototype.serialize=function(){for(var n=t.prototype.serialize.call(this),i=0,e=this.boxes;i<e.length;i++){var r=e[i];n=n.concat(r.serialize())}return n},n}(yu),es=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return cu(n,t),n.prototype.serializeBoxContent=function(t){},n.prototype.getBoxContentSize=function(){return 0},n}(is),rs=function(t){function n(n,i){var e=t.call(this,n)||this;return e.dataReferenceIndex=i,e}return cu(n,t),p.defineProperty(n.prototype,"dataReferenceIndex",{get:function(){return this.bb},set:function(t){if(!_u(t,16))throw new g("Provided dataReferenceIndex does not fit in 16 bits.");this.bb=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return 8},n.prototype.serializeBoxContent=function(t){for(var n=0;n<6;n++)t.writer.writeByte(0);t.writer.writeUInt(this.dataReferenceIndex,16)},n}(es),os=function(t){function n(n,i,e,r){var o,u,s=this;return(s=t.call(this,n,i)||this).extra=r,s.channelCount=null!==(o=e.channelCount)&&void 0!==o?o:2,s.sampleSize=null!==(u=e.sampleSize)&&void 0!==u?u:16,s.sampleRate=e.sampleRate,s}return cu(n,t),p.defineProperty(n.prototype,"channelCount",{get:function(){return this.Ab},set:function(t){if(!_u(t,16))throw new g("Provided channelCount does not fit in 16 bits.");this.Ab=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"sampleSize",{get:function(){return this.Sb},set:function(t){if(!_u(t,16))throw new g("Provided sampleSize does not fit in 16 bits.");this.Sb=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"sampleRate",{get:function(){return this.Tb},set:function(t){if(!_u(Su(t,16),32))throw new g("Provided rate does not fit in 32 bits (fixed 16.16).");this.Tb=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){var n,i;return t.prototype.getBoxContentSize.call(this)+8+2+2+2+2+(void 0!==this.sampleRate?4:0)+(null!==(i=null===(n=this.extra)||void 0===n?void 0:n.length)&&void 0!==i?i:0)},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(0,32),n.writer.writeUInt(0,32),n.writer.writeUInt(this.channelCount,16),n.writer.writeUInt(this.sampleSize,16),n.writer.writeUInt(0,16),n.writer.writeUInt(0,16),n.writer.writeUInt(Su(this.sampleRate,16),32),this.extra&&Tu(n.writer,this.extra)},n}(rs);x(),pt();!function(t){function n(n){var i=t.call(this,"stco",0,0)||this;return i.entries=n,i}cu(n,t),p.defineProperty(n.prototype,"entries",{get:function(){return this.kb},set:function(t){if(!_u(t.length,32))throw new g("Number of allowed entries cannot fit in 32 bits.");if(t.some(function(t){return!_u(t,32)}))throw new g("Not all entries can be represented in 32 bits.");this.kb=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4+4*this.entries.length},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.entries.length,32);for(var i=0,e=this.entries;i<e.length;i++){var r=e[i];n.writer.writeUInt(r,32)}}}(Eu);x(),pt();!function(t){function n(n){var i=t.call(this,"clap")||this;return i.cleanApertureWidthN=n.cleanApertureWidthN,i.cleanApertureWidthD=n.cleanApertureWidthD,i.cleanApertureHeightN=n.cleanApertureHeightN,i.cleanApertureHeightD=n.cleanApertureHeightD,i.horizOffN=n.horizOffN,i.horizOffD=n.horizOffD,i.vertOffN=n.vertOffN,i.vertOffD=n.vertOffD,i}cu(n,t),p.defineProperty(n.prototype,"cleanApertureWidthN",{get:function(){return this.Eb},set:function(t){if(!_u(t,32))throw new g("Provided cleanApertureWidthN does not fit in 32 bits.");this.Eb=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"cleanApertureWidthD",{get:function(){return this.Rb},set:function(t){if(!_u(t,32))throw new g("Provided cleanApertureWidthD does not fit in 32 bits.");this.Rb=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"cleanApertureHeightN",{get:function(){return this.Ib},set:function(t){if(!_u(t,32))throw new g("Provided cleanApertureHeightN does not fit in 32 bits.");this.Ib=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"cleanApertureHeightD",{get:function(){return this.xb},set:function(t){if(!_u(t,32))throw new g("Provided cleanApertureHeightD does not fit in 32 bits.");this.xb=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"horizOffN",{get:function(){return this.Cb},set:function(t){if(!_u(t,32))throw new g("Provided horizOffN does not fit in 32 bits.");this.Cb=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"horizOffD",{get:function(){return this.Pb},set:function(t){if(!_u(t,32))throw new g("Provided horizOffD does not fit in 32 bits.");this.Pb=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"vertOffN",{get:function(){return this.Nb},set:function(t){if(!_u(t,32))throw new g("Provided vertOffN does not fit in 32 bits.");this.Nb=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"vertOffD",{get:function(){return this.Db},set:function(t){if(!_u(t,32))throw new g("Provided vertOffD does not fit in 32 bits.");this.Db=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return 32},n.prototype.serializeBoxContent=function(t){t.writer.writeUInt(this.cleanApertureWidthN,32),t.writer.writeUInt(this.cleanApertureWidthD,32),t.writer.writeUInt(this.cleanApertureHeightN,32),t.writer.writeUInt(this.cleanApertureHeightD,32),t.writer.writeUInt(this.horizOffN,32),t.writer.writeUInt(this.horizOffD,32),t.writer.writeUInt(this.vertOffN,32),t.writer.writeUInt(this.vertOffD,32)}}(yu);x(),pt();!function(t){function n(n,i){var e=t.call(this,"ctts",n,0)||this;return e.entries=i,e}cu(n,t),p.defineProperty(n.prototype,"entries",{get:function(){return this.kb},set:function(t){if(!_u(t.length,32))throw new g("Number of allowed entries cannot fit in 32 bits.");if(t.some(function(t){return!_u(t.sampleCount,32)||!_u(t.sampleOffset,32)}))throw new g("Not all entries can be represented in 64 bits.");this.kb=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4+8*this.entries.length},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.entries.length,32);for(var i=0,e=this.entries;i<e.length;i++){var r=e[i];n.writer.writeUInt(r.sampleCount,32),0===this.version?n.writer.writeUInt(r.sampleOffset,32):1===this.version&&n.writer.writeInt(r.sampleOffset,32)}}}(Eu);x(),pt();!function(t){function n(n){var i=t.call(this,"url ",0,void 0===n?1:0)||this;return i.location=n,i}cu(n,t),p.defineProperty(n.prototype,"location",{get:function(){return this.Bb},set:function(t){this.flags=void 0===t?1:0,this.Bb=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){var n=t.prototype.getBoxContentSize.call(this);return this.location?n+this.location.length+1:n},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),this.location&&(n.writer.writeString(this.location),n.writer.writeByte(0))}}(Eu);x(),pt();!function(t){function n(n,i,e){var r=t.call(this,"urn ",0,e)||this;return r.name=n,r.location=i,r}cu(n,t),p.defineProperty(n.prototype,"location",{get:function(){return this.Bb},set:function(t){if(1&this.flags)throw new g("The moov containment flag is set, a DataEntryUrlBox should be used instead.");this.Bb=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){var n=t.prototype.getBoxContentSize.call(this)+this.name.length+1;return this.location?n+this.location.length+1:n},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeString(this.name),n.writer.writeByte(0),this.location&&(n.writer.writeString(this.location),n.writer.writeByte(0))}}(Eu);x(),pt();!function(t){function n(){return t.call(this,"dinf")||this}cu(n,t)}(es);x(),pt(),x(),pt();var us=function(t){function n(n,i,e){var r=t.call(this,n)||this;if(r.version=i,!_u(i,8))throw new g("the provided version cannot fit in 8 bits.");return r.flags=e,r}return cu(n,t),p.defineProperty(n.prototype,"flags",{get:function(){return this.eb},set:function(t){this.eb=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return 4},n.prototype.serializeFlags=function(t){if("number"!=typeof this.flags)throw new g("Missing custom serializeFlags method.");t.writer.writeUInt(this.flags,24)},n.prototype.serializeBoxContent=function(t){t.writer.writeByte(this.version),this.serializeFlags(t)},n}(is);!function(t){function n(){return t.call(this,"dref",0,0)||this}cu(n,t),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.boxes.length,32)}}(us);x(),pt(),x(),pt();var ss=function(t){function n(n,i,e){void 0===e&&(e=0);var r=t.call(this,"elst",i,e)||this;return r.entries=n,r}return cu(n,t),p.defineProperty(n.prototype,"bitSize",{get:function(){return 0===this.version?32:64},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"entries",{get:function(){return this.kb},set:function(t){for(var n=0,i=t;n<i.length;n++){var e=i[n];if(!_u(e.segmentDuration,this.bitSize))throw new g("SegmentDuration of one of the entries does not fit in ".concat(this.bitSize," bits."));if(!_u(e.mediaTime,this.bitSize))throw new g("MediaTime of one of the entries does not fit in ".concat(this.bitSize," bits."));if(!_u(e.mediaRateInteger,16))throw new g("Provided mediaRateInteger does not fit in 16 bits.");if(e.mediaRateFraction&&!_u(e.mediaRateFraction,16))throw new g("Provided mediaRateFraction does not fit in 16 bits.")}this.kb=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4+this.entries.length*(2*this.bitSize/8+2+2)},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.entries.length,32),this.serializeElstBoxContent(n)},n}(Eu),fs=function(t){function n(n,i){return void 0===i&&(i=0),t.call(this,n,0,i)||this}return cu(n,t),n.prototype.serializeElstBoxContent=function(t){for(var n,i=0,e=this.entries;i<e.length;i++){var r=e[i];t.writer.writeUInt(r.segmentDuration,32),t.writer.writeInt(r.mediaTime,32),t.writer.writeUInt(r.mediaRateInteger,16),t.writer.writeUInt(null!==(n=r.mediaRateFraction)&&void 0!==n?n:0,16)}},n}(ss),hs=function(t){function n(n,i){return void 0===i&&(i=0),t.call(this,n,1,i)||this}return cu(n,t),n.prototype.serializeElstBoxContent=function(t){for(var n,i=0,e=this.entries;i<e.length;i++){var r=e[i];t.writer.writeUInt(r.segmentDuration.getHighBitsUnsigned(),32),t.writer.writeUInt(r.segmentDuration.getLowBitsUnsigned(),32),t.writer.writeInt(r.mediaTime.getHighBits(),32),t.writer.writeInt(r.mediaTime.getLowBits(),32),t.writer.writeUInt(r.mediaRateInteger,16),t.writer.writeUInt(null!==(n=r.mediaRateFraction)&&void 0!==n?n:0,16)}},n}(ss);function cs(t){for(var n=t.data,i=Yu(n.nextUint32()),e=i.version,r=i.flags,o=n.nextUint32(),u=[],s=0;s<o;s++){var f=void 0,h=void 0;0===e?(f=n.nextUint32(),h=n.nextInt32()):(f=n.nextUint64(),h=n.nextInt64());var c=n.nextInt16(),a=n.nextInt16();u.push({segmentDuration:f,mediaTime:h,mediaRateFraction:a,mediaRateInteger:c})}return 0===e?new fs(u,r.raw):new hs(u,r.raw)}var as=function(t){function n(){return t.call(this,"edts")||this}return cu(n,t),n}(es);function vs(t){for(var n=new as,i=0,e=Xu(t.data);i<e.length;i++){var r=e[i];Hu(r,"elst")?n.boxes.push(cs(r)):n.boxes.push(Zu(r))}return n}x(),pt(),x(),pt();var ds=function(t){function n(n,i,e,r){var o=t.call(this,n)||this;return o.majorBrand=i,o.minorVersion=e,o.compatibleBrands=r,o}return cu(n,t),p.defineProperty(n.prototype,"majorBrand",{get:function(){return this.Lb},set:function(t){if(4!==t.length)throw new g("the provided major brand does not conform to the 4 character requirement");this.Lb=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"minorVersion",{get:function(){return this.Mb},set:function(t){if(!_u(t,32))throw new g("the provided minor version does not fit in 32 bits.");this.Mb=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"compatibleBrands",{get:function(){return this.Ob},set:function(t){if(t.some(function(t){return 4!==t.length}))throw new g("Some of the compatible brands do not conform to the 4 character requirement");this.Ob=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return 4*(2+this.compatibleBrands.length)},n.prototype.serializeBoxContent=function(t){t.writer.writeString(this.majorBrand),t.writer.writeUInt(this.minorVersion,32);for(var n=0,i=this.compatibleBrands;n<i.length;n++){var e=i[n];t.writer.writeString(e)}},n}(yu);!function(t){function n(n,i,e){return t.call(this,"ftyp",n,i,e)||this}cu(n,t)}(ds);x(),pt();!function(t){function n(n,i){void 0===i&&(i="free");var e=t.call(this,i)||this;return e.data=n,e}cu(n,t),n.prototype.getBoxContentSize=function(){var t,n;return null!==(n=null===(t=this.data)||void 0===t?void 0:t.length)&&void 0!==n?n:0},n.prototype.serializeBoxContent=function(t){this.data&&t.concat(gu.from(this.data))}}(yu);x(),pt(),x(),pt();var ls=function(t){function n(n,i,e,r){void 0===r&&(r=0);var o=t.call(this,"mdhd",e,r)||this;return o.creationTime=n.creation,o.modificationTime=n.modification,o.timescale=n.scale,o.duration=n.duration,o.language=i,o}return cu(n,t),p.defineProperty(n.prototype,"creationTime",{get:function(){return this.Fb},set:function(t){if(!_u(t,this.bitSize))throw new g("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.Fb=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"modificationTime",{get:function(){return this.Vb},set:function(t){if(!_u(t,this.bitSize))throw new g("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.Vb=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"timescale",{get:function(){return this.Wb},set:function(t){if(!_u(t,32))throw new g("Provided sequence number does not fit in 32 bits.");this.Wb=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"duration",{get:function(){return this.Ub},set:function(t){if(!_u(t,this.bitSize))throw new g("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.Ub=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"language",{get:function(){return this.Gb},set:function(t){if(!ms(t))throw new g("Expected an ISO-639-2/T language code");this.Gb=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"bitSize",{get:function(){return 0===this.version?32:64},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.bitSize/8*3+4+2+2},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),this.serializeMdiaContent(n),n.writer.writeBit(0);for(var i=0,e=this.language;i<e.length;i++){var r=e[i];n.writer.writeUInt(r.charCodeAt(0)-96,5)}n.writer.writeUInt(0,16)},n}(Eu),ws=function(t){function n(n,i,e){return void 0===e&&(e=0),t.call(this,n,i,0,e)||this}return cu(n,t),n.prototype.serializeMdiaContent=function(t){t.writer.writeUInt(this.creationTime,32),t.writer.writeUInt(this.modificationTime,32),t.writer.writeUInt(this.timescale,32),t.writer.writeUInt(this.duration,32)},n}(ls),bs=function(t){function n(n,i,e){return void 0===e&&(e=0),t.call(this,n,i,1,e)||this}return cu(n,t),n.prototype.serializeMdiaContent=function(t){t.writer.writeUInt(this.creationTime.getHighBitsUnsigned(),32),t.writer.writeUInt(this.creationTime.getLowBitsUnsigned(),32),t.writer.writeUInt(this.modificationTime.getHighBitsUnsigned(),32),t.writer.writeUInt(this.modificationTime.getLowBitsUnsigned(),32),t.writer.writeUInt(this.timescale,32),t.writer.writeUInt(this.duration.getHighBitsUnsigned(),32),t.writer.writeUInt(this.duration.getLowBitsUnsigned(),32)},n}(ls);function gs(t){var n=t.data,i=Yu(n.nextUint32()),e=i.version,r=i.flags,o=Ku(n,e),u=new wu(gu.from(n.nextUint8Array(2)));u.skipBits(1);for(var s=[],f=0;f<3;f++)s.push(u.readUInt(5));var h=s.map(function(t){return String.fromCharCode(t+96)}).join("");return ms(h)||(h="und"),n.skip(2),0===e?new ws(o,h,r.raw):new bs(o,h,r.raw)}function ms(t){return/^[a-z]{3}$/.test(t)}var ps=function(t){function n(){return t.call(this,"mdia")||this}return cu(n,t),n}(es);function ys(t){for(var n=new ps,i=0,e=Xu(t.data);i<e.length;i++){var r=e[i];Hu(r,"mdhd")?n.boxes.push(gs(r)):Hu(r,"hdlr")?n.boxes.push(Qu(r)):n.boxes.push(Zu(r))}return n}x(),pt();!function(t){function n(){var n=t.call(this,"mdat")||this;return n.data=new gu,n}cu(n,t),n.prototype.getBoxContentSize=function(){return this.data.length},n.prototype.serializeBoxContent=function(t){t.concat(this.data)}}(yu);x(),pt();!function(t){function n(){return t.call(this,"minf")||this}cu(n,t)}(es);x(),pt();var _s;!function(t){function n(n){var i=t.call(this,"meta",0,0)||this;return i.handler=n,i}cu(n,t),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.handler.getSize()},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.concat(this.handler.serialize())}}(us);x(),pt(),x(),pt(),function(t){t.VIDEO="vide",t.AUXILIARY_VIDEO="auxv",t.AUDIO="soun",t.METADATA="meta",t.HINT="hint",t.TEXT="text",t.SUBTITLE="subt",t.FONT="fdsm"}(_s||(_s={})),x(),pt();var Ss,Ts,Is={a:1,b:0,u:0,c:0,d:1,v:0,x:0,y:0,w:1};function Es(t,n){n.writer.writeUInt(Su(t.a,16),32),n.writer.writeUInt(Su(t.b,16),32),n.writer.writeUInt(Su(0,30),32),n.writer.writeUInt(Su(t.c,16),32),n.writer.writeUInt(Su(t.d,16),32),n.writer.writeUInt(Su(0,30),32),n.writer.writeUInt(Su(t.x,16),32),n.writer.writeUInt(Su(t.y,16),32),n.writer.writeUInt(Su(1,30),32)}function ks(t,n){var i,e,r,o;n.writer.writeUInt(null!==(i=t.isLeading)&&void 0!==i?i:Ss.UNKNOWN,2),n.writer.writeUInt(null!==(e=t.sampleDependsOn)&&void 0!==e?e:Ts.UNKNOWN,2),n.writer.writeUInt(null!==(r=t.sampleIsDependedOn)&&void 0!==r?r:Ts.UNKNOWN,2),n.writer.writeUInt(null!==(o=t.sampleHasRedundancy)&&void 0!==o?o:Ts.UNKNOWN,2)}function Rs(t,n){var i,e,r;n.writer.writeUInt(0,4),ks(t,n),n.writer.writeUInt(null!==(i=t.samplePaddingValue)&&void 0!==i?i:0,3),n.writer.writeBool(null!==(e=t.sampleIsNonSyncSample)&&void 0!==e&&e),n.writer.writeUInt(null!==(r=t.sampleDegradationPriority)&&void 0!==r?r:0,16)}x(),pt(),function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.WITH_DEPENDENCY=1]="WITH_DEPENDENCY",t[t.NO=2]="NO",t[t.WITHOUT_DEPENDENCY=3]="WITHOUT_DEPENDENCY"}(Ss||(Ss={})),function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.YES=1]="YES",t[t.NO=2]="NO",t[t.RESERVED=3]="RESERVED"}(Ts||(Ts={})),x(),pt(),x(),pt();var Os=function(){};x(),pt(),x(),pt(),x(),pt();var Ns=function(t){function n(n,i,e){var r=t.call(this,"pssh",n,0)||this;return r.systemId=i,r.data=e,r}return cu(n,t),p.defineProperty(n.prototype,"systemId",{get:function(){return this.Xb},set:function(t){if(16!==t.length)throw new g("Provided systemId length is not 16.");this.Xb=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"data",{get:function(){return this.Xm},set:function(t){if(!_u(t.length,32))throw new g("Provided data length does not fit in 32 bits.");this.Xm=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+16+4+this.data.length},n.prototype.serializeVersionBoxContent=function(t){},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.concat(gu.from(this.systemId)),this.serializeVersionBoxContent(n),n.writer.writeUInt(this.data.length,32),n.concat(gu.from(this.data))},n}(Eu),Ps=function(t){function n(n,i){return t.call(this,0,n,i)||this}return cu(n,t),n}(Ns),As=function(t){function n(n,i,e){var r=t.call(this,1,n,i)||this;return r.kIds=e,r}return cu(n,t),p.defineProperty(n.prototype,"kIds",{get:function(){return this.Zb},set:function(t){if(!_u(t.length,32))throw new g("Provided kIds length cannot fit in 32 bits.");if(t.some(function(t){return 16!==t.length}))throw new g("Not all provided key ids are 16 bytes long.");this.Zb=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4+16*this.kIds.length},n.prototype.serializeVersionBoxContent=function(t){t.writer.writeUInt(this.kIds.length,32);for(var n=0,i=this.kIds;n<i.length;n++){var e=i[n];t.concat(gu.from(e))}},n}(Ns);function Ds(t){var n=t.data.nextUint8();t.data.skip(3);var i=t.data.nextUint8Array(16),e=[];if(1===n)for(var r=t.data.nextUint32(),o=0;o<r;o++)e.push(t.data.nextUint8Array(16));var u=t.data.nextUint32(),s=t.data.nextUint8Array(u);return 1===n?new As(i,s,e):new Ps(i,s)}x(),pt(),x(),pt();var Cs=function(t){function n(n,i,e){void 0===e&&(e=0);var r=t.call(this,"mehd",i,e)||this;return r.fragmentDuration=n,r}return cu(n,t),p.defineProperty(n.prototype,"bitSize",{get:function(){return 0===this.version?32:64},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"fragmentDuration",{get:function(){return this.Hb},set:function(t){if(!_u(t,this.bitSize))throw new g("The provided fragmentDuration does not fit in ".concat(this.bitSize," bits."));this.Hb=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.bitSize/8},n}(Eu),xs=function(t){function n(n,i){return void 0===i&&(i=0),t.call(this,n,0,i)||this}return cu(n,t),n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.fragmentDuration,32)},n}(Cs),Bs=function(t){function n(n,i){return void 0===i&&(i=0),t.call(this,n,1,i)||this}return cu(n,t),n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.fragmentDuration.getHighBitsUnsigned(),32),n.writer.writeUInt(this.fragmentDuration.getLowBitsUnsigned(),32)},n}(Cs);function Ms(t){var n=t.data,i=Yu(n.nextUint32()),e=i.version,r=i.flags;return 0===e?new xs(n.nextUint32(),r.raw):new Bs(n.nextUint64(),r.raw)}x(),pt();var Ls=function(t){function n(n,i,e,r){void 0===i&&(i={}),void 0===e&&(e=0),void 0===r&&(r=0);var o,u,s,f=this;return(f=t.call(this,"trex",e,r)||this).trackId=n,f.defaultSampleDescriptionIndex=null!==(o=null==i?void 0:i.sampleDescriptionIndex)&&void 0!==o?o:0,f.defaultSampleDuration=null!==(u=i.sampleDuration)&&void 0!==u?u:0,f.defaultSampleSize=null!==(s=i.sampleSize)&&void 0!==s?s:0,f.defaultSampleFlags=i.sampleFlags,f}return cu(n,t),p.defineProperty(n.prototype,"trackId",{get:function(){return this.zb},set:function(t){if(!_u(t,32))throw new g("Provided track id does not fit in 32 bits.");this.zb=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"defaultSampleDescriptionIndex",{get:function(){return this.Yb},set:function(t){if(!_u(t,32))throw new g("Provided default sample description index does not fit in 32 bits.");this.Yb=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"defaultSampleDuration",{get:function(){return this.Kb},set:function(t){if(!_u(t,32))throw new g("Provided default sample duration does not fit in 32 bits.");this.Kb=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"defaultSampleSize",{get:function(){return this.qb},set:function(t){if(!_u(t,32))throw new g("Provided default sample size does not fit in 32 bits.");this.qb=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"defaultSampleFlags",{get:function(){return this.jb},set:function(t){if((null==t?void 0:t.samplePaddingValue)&&!_u(t.samplePaddingValue,3))throw new g("Provided sample padding value does not fit in 3 bits.");if((null==t?void 0:t.sampleDegradationPriority)&&!_u(t.sampleDegradationPriority,16))throw new g("Provided sample degradation priority does not fit in 16 bits.");this.jb=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+20},n.prototype.serializeBoxContent=function(n){var i;t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.trackId,32),n.writer.writeUInt(this.defaultSampleDescriptionIndex,32),n.writer.writeUInt(this.defaultSampleDuration,32),n.writer.writeUInt(this.defaultSampleSize,32),Rs(null!==(i=this.defaultSampleFlags)&&void 0!==i?i:{},n)},n}(Eu);function Us(t){var n=t.data,i=Yu(n.nextUint32()),e=i.version,r=i.flags,o=n.nextUint32(),u=n.nextUint32(),s=n.nextUint32(),f=n.nextUint32(),h=Gu(new wu(gu.from(n.nextUint8Array(4))));return new Ls(o,{sampleDescriptionIndex:u,sampleDuration:s,sampleSize:f,sampleFlags:h},e,r.raw)}var Fs=function(t){function n(){return t.call(this,"mvex")||this}return cu(n,t),n}(es);function zs(t){for(var n=new Fs,i=0,e=Xu(t.data);i<e.length;i++){var r=e[i];Hu(r,"mehd")?n.boxes.push(Ms(r)):Hu(r,"trex")?n.boxes.push(Us(r)):n.boxes.push(Zu(r))}return n}x(),pt();var Ws=function(t){function n(i,e,r,o,u){void 0===u&&(u=0);var s,f,h,c=this;return(c=t.call(this,"mvhd",o,u)||this).creationTime=i.creation,c.modificationTime=i.modification,c.timescale=i.scale,c.duration=i.duration,c.rate=null!==(s=r.rate)&&void 0!==s?s:n.DEFAULT_RATE,c.volume=null!==(f=r.volume)&&void 0!==f?f:n.DEFAULT_VOLUME,c.matrix=null!==(h=r.matrix)&&void 0!==h?h:Is,c.Qb=e,c}return cu(n,t),p.defineProperty(n.prototype,"bitSize",{get:function(){return 0===this.version?32:64},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"creationTime",{get:function(){return this.Fb},set:function(t){if(!_u(t,this.bitSize))throw new g("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.Fb=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"modificationTime",{get:function(){return this.Vb},set:function(t){if(!_u(t,this.bitSize))throw new g("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.Vb=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"timescale",{get:function(){return this.Wb},set:function(t){if(!_u(t,32))throw new g("Provided sequence number does not fit in 32 bits.");this.Wb=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"duration",{get:function(){return this.Ub},set:function(t){if(!_u(t,this.bitSize))throw new g("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.Ub=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"rate",{get:function(){return this.Jb},set:function(t){if(!_u(Su(t,16),32))throw new g("Provided rate does not fit in 32 bits (fixed 16.16).");this.Jb=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"volume",{get:function(){return this.$b},set:function(t){if(!_u(Su(t,8),16))throw new g("Provided volume does not fit in 16 bits (fixed 8.8).");this.$b=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"matrix",{get:function(){return this.tA},set:function(t){if(0!==t.u||0!==t.v||1!==t.w)throw new g("(u, v, w) does not match the required (0, 0, 1)");this.tA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"nextTrackId",{get:function(){return this.Qb},set:function(t){if(0===t)throw new g("NextTrackId cannot be 0.");if(!_u(t,32))throw new g("NextTrackId cannot exceed 32 bits.");this.Qb=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.bitSize/8*3+4+4+2+2+8+36+24+4},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),this.serializeMvhdContent(n),n.writer.writeUInt(Su(this.rate,16),32),n.writer.writeUInt(Su(this.volume,8),16),n.writer.writeUInt(0,16),n.writer.writeUInt(0,32),n.writer.writeUInt(0,32),Es(this.matrix,n);for(var i=0;i<6;i++)n.writer.writeUInt(0,32);n.writer.writeUInt(this.nextTrackId,32)},n.DEFAULT_RATE=1,n.DEFAULT_VOLUME=1,n}(Eu),Vs=function(t){function n(n,i,e,r){return void 0===e&&(e={}),void 0===r&&(r=0),t.call(this,n,i,e,0,r)||this}return cu(n,t),n.prototype.serializeMvhdContent=function(t){t.writer.writeUInt(this.creationTime,32),t.writer.writeUInt(this.modificationTime,32),t.writer.writeUInt(this.timescale,32),t.writer.writeUInt(this.duration,32)},n}(Ws),qs=function(t){function n(n,i,e,r){return void 0===e&&(e={}),void 0===r&&(r=0),t.call(this,n,i,e,1,r)||this}return cu(n,t),n.prototype.serializeMvhdContent=function(t){t.writer.writeUInt(this.creationTime.getHighBitsUnsigned(),32),t.writer.writeUInt(this.creationTime.getLowBitsUnsigned(),32),t.writer.writeUInt(this.modificationTime.getHighBitsUnsigned(),32),t.writer.writeUInt(this.modificationTime.getLowBitsUnsigned(),32),t.writer.writeUInt(this.timescale,32),t.writer.writeUInt(this.duration.getHighBitsUnsigned(),32),t.writer.writeUInt(this.duration.getLowBitsUnsigned(),32)},n}(Ws);function Hs(t){var n=t.data,i=Yu(n.nextUint32()),e=i.version,r=i.flags,o=Ku(n,e),u=Iu(n.nextUint32(),16),s=Iu(n.nextUint16(),8);n.skip(2),n.skip(8);var f=$u(n);n.skip(24);var h=n.nextUint32();return 0===e?new Vs(o,h,{rate:u,volume:s,matrix:f},r.raw):new qs(o,h,{rate:u,volume:s,matrix:f},r.raw)}x(),pt(),x(),pt();var Xs=function(t){function n(n,i,e,r,o,u,s){void 0===s&&(s={});var f,h,c,a=this;return a=t.call(this,"tkhd",n,function(t){var n,i,e,r;return{trackEnabled:null===(n=null==t?void 0:t.trackEnabled)||void 0===n||n,trackInMovie:null===(i=null==t?void 0:t.trackInMovie)||void 0===i||i,trackInPreview:null===(e=null==t?void 0:t.trackInPreview)||void 0===e||e,trackSizeIsAspectRatio:null!==(r=null==t?void 0:t.trackSizeIsAspectRatio)&&void 0!==r&&r}}(s))||this,a.creationTime=i.creation,a.modificationTime=i.modification,a.trackId=e,a.duration=i.duration,a.volume=r,a.width=o,a.height=u,a.layer=null!==(f=s.layer)&&void 0!==f?f:0,a.alternateGroup=null!==(h=s.alternateGroup)&&void 0!==h?h:0,a.matrix=null!==(c=s.matrix)&&void 0!==c?c:Is,a}return cu(n,t),p.defineProperty(n.prototype,"bitSize",{get:function(){return 0===this.version?32:64},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"creationTime",{get:function(){return this.Fb},set:function(t){if(!_u(t,this.bitSize))throw new g("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.Fb=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"modificationTime",{get:function(){return this.Vb},set:function(t){if(!_u(t,this.bitSize))throw new g("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.Vb=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"trackId",{get:function(){return this.zb},set:function(t){if(0===t)throw new g("trackId cannot be 0.");if(!_u(t,32))throw new g("trackId cannot exceed 32 bits.");this.zb=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"duration",{get:function(){return this.Ub},set:function(t){if(!_u(t,this.bitSize))throw new g("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.Ub=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"volume",{get:function(){return this.$b},set:function(t){if(!_u(Su(t,8),16))throw new g("Provided volume does not fit in 16 bits (fixed 8.8).");this.$b=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"width",{get:function(){return this.iA},set:function(t){if(!_u(Su(t,16),32))throw new g("Provided width does not fit in 32 bits (fixed 16.16).");this.iA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"height",{get:function(){return this.eA},set:function(t){if(!_u(Su(t,16),32))throw new g("Provided height does not fit in 32 bits (fixed 16.16).");this.eA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"layer",{get:function(){return this.sA},set:function(t){if(!_u(t,16))throw new g("Provided layer does not fit in 16 bits.");this.sA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"alternateGroup",{get:function(){return this.nA},set:function(t){if(!_u(t,16))throw new g("Provided alternateGroup does not fit in 16 bits.");this.nA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"matrix",{get:function(){return this.tA},set:function(t){if(0!==t.u||0!==t.v||1!==t.w)throw new g("(u, v, w) does not match the required (0, 0, 1)");this.tA=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.bitSize/8*3+4+4+8+2+2+2+2+36+4+4},n.prototype.serializeFlags=function(t){t.writer.writeUInt(0,20),t.writer.writeBool(this.flags.trackSizeIsAspectRatio),t.writer.writeBool(this.flags.trackInPreview),t.writer.writeBool(this.flags.trackInMovie),t.writer.writeBool(this.flags.trackEnabled)},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),this.serializeTkhdContent(n),n.writer.writeUInt(0,32),n.writer.writeUInt(0,32),n.writer.writeUInt(this.layer,16),n.writer.writeUInt(this.alternateGroup,16),n.writer.writeUInt(Su(this.volume,8),16),n.writer.writeUInt(0,16),Es(this.matrix,n),n.writer.writeUInt(Su(this.width,16),32),n.writer.writeUInt(Su(this.height,16),32)},n}(Eu),js=function(t){function n(n,i,e,r,o,u){return t.call(this,0,n,i,e,r,o,u)||this}return cu(n,t),n.prototype.serializeTkhdContent=function(t){t.writer.writeUInt(this.creationTime,32),t.writer.writeUInt(this.modificationTime,32),t.writer.writeUInt(this.trackId,32),t.writer.writeUInt(0,32),t.writer.writeUInt(this.duration,32)},n}(Xs),Ys=function(t){function n(n,i,e,r,o,u){return t.call(this,1,n,i,e,r,o,u)||this}return cu(n,t),n.prototype.serializeTkhdContent=function(t){t.writer.writeUInt(this.creationTime.getHighBitsUnsigned(),32),t.writer.writeUInt(this.creationTime.getLowBitsUnsigned(),32),t.writer.writeUInt(this.modificationTime.getHighBitsUnsigned(),32),t.writer.writeUInt(this.modificationTime.getLowBitsUnsigned(),32),t.writer.writeUInt(this.trackId,32),t.writer.writeUInt(0,32),t.writer.writeUInt(this.duration.getHighBitsUnsigned(),32),t.writer.writeUInt(this.duration.getLowBitsUnsigned(),32)},n}(Xs);function Ks(t){var n,i,e,r,o=t.data,u=Yu(o.nextUint32()),s=u.version,f=u.flags,h=f.isSet(8),c=f.isSet(4),a=f.isSet(2),v=f.isSet(1);0===s?(n=o.nextUint32(),i=o.nextUint32(),e=o.nextUint32(),o.skip(4),r=o.nextUint32()):(n=o.nextUint64(),i=o.nextUint64(),e=o.nextUint32(),o.skip(4),r=o.nextUint64()),o.skip(8);var d=o.nextInt16(),l=o.nextInt16(),w=Iu(o.nextInt16(),8);o.skip(2);var b=$u(o),g=Iu(o.nextUint32(),16),m=Iu(o.nextUint32(),16);return 0===s?new js({creation:n,modification:i,duration:r},e,w,g,m,{layer:d,matrix:b,alternateGroup:l,trackSizeIsAspectRatio:h,trackEnabled:v,trackInPreview:c,trackInMovie:a}):new Ys({creation:n,modification:i,duration:r},e,w,g,m,{layer:d,matrix:b,alternateGroup:l,trackSizeIsAspectRatio:h,trackEnabled:v,trackInPreview:c,trackInMovie:a})}var Gs=function(t){function n(){return t.call(this,"trak")||this}return cu(n,t),n}(es);function $s(t){for(var n=new Gs,i=0,e=Xu(t.data);i<e.length;i++){var r=e[i];Hu(r,"tkhd")?n.boxes.push(Ks(r)):Hu(r,"mdia")?n.boxes.push(ys(r)):Hu(r,"edts")?n.boxes.push(vs(r)):n.boxes.push(Zu(r))}return n}var Zs=function(t){function n(){return t.call(this,"moov")||this}return cu(n,t),n}(es);x(),pt(),x(),pt(),x(),pt();var Js=function(t){function n(n,i,e){void 0===e&&(e=0);var r=t.call(this,"tfdt",i,e)||this;return r.baseMediaDecodeTime=n,r}return cu(n,t),p.defineProperty(n.prototype,"bitSize",{get:function(){return 0===this.version?32:64},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"baseMediaDecodeTime",{get:function(){return this.rA},set:function(t){if(!_u(t,this.bitSize))throw new g("Provided baseMediaDecodeTime does not fit in ".concat(this.bitSize," bits."));this.rA=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.bitSize/8},n}(Eu),Qs=function(t){function n(n,i){return void 0===i&&(i=0),t.call(this,n,0,i)||this}return cu(n,t),n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.baseMediaDecodeTime,32)},n}(Js),tf=function(t){function n(n,i){return void 0===i&&(i=0),t.call(this,n,1,i)||this}return cu(n,t),n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.baseMediaDecodeTime.getHighBitsUnsigned(),32),n.writer.writeUInt(this.baseMediaDecodeTime.getLowBitsUnsigned(),32)},n}(Js);function nf(t){var n=t.data,i=Yu(n.nextUint32()),e=i.version,r=i.flags;return 0===e?new Qs(n.nextUint32(),r.raw):new tf(n.nextUint64(),r.raw)}x(),pt();var ef=function(t){function n(n,i){void 0===i&&(i=0);var e=t.call(this,"tfhd",i,function(t){return{baseDataOffsetPresent:void 0!==t.baseDataOffset,sampleDescriptionIndexPresent:void 0!==t.sampleDescriptionIndex,defaultSampleDurationPresent:void 0!==t.defaultSampleDuration,defaultSampleSizePresent:void 0!==t.defaultSampleSize,defaultSampleFlagsPresent:void 0!==t.defaultSampleFlags,durationIsEmpty:t.durationIsEmpty,defaultBaseIsMoof:t.defaultBaseIsMoof}}(n))||this;return e.trackId=n.trackId,e.baseDataOffset=n.baseDataOffset,e.sampleDescriptionIndex=n.sampleDescriptionIndex,e.defaultSampleDuration=n.defaultSampleDuration,e.defaultSampleSize=n.defaultSampleSize,e.defaultSampleFlags=n.defaultSampleFlags,e}return cu(n,t),p.defineProperty(n.prototype,"trackId",{get:function(){return this.zb},set:function(t){if(!_u(t,32))throw new g("Provided track id does not fit in 32 bits.");this.zb=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"baseDataOffset",{get:function(){return this.hA},set:function(t){if(void 0===t&&this.flags.baseDataOffsetPresent)throw new g("The base data offset present flag is set.");if(void 0!==t&&!this.flags.baseDataOffsetPresent)throw new g("The base data offset present flag is not set.");if(t&&!_u(t,64))throw new g("Provided baseDataOffset does not fit in 32 bits.");this.hA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"sampleDescriptionIndex",{get:function(){return this.oA},set:function(t){if(void 0===t&&this.flags.sampleDescriptionIndexPresent)throw new g("The sample description index flag is set.");if(void 0!==t&&!this.flags.sampleDescriptionIndexPresent)throw new g("The sample description index flag is not set.");if(t&&!_u(t,32))throw new g("Provided sampleDescriptionIndex does not fit in 32 bits.");this.oA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"defaultSampleDuration",{get:function(){return this.Kb},set:function(t){if(void 0===t&&this.flags.defaultSampleDurationPresent)throw new g("The default sample duration present flag is set.");if(void 0!==t&&!this.flags.defaultSampleDurationPresent)throw new g("The default sample duration present flag is not set.");if(t&&!_u(t,32))throw new g("Provided defaultSampleDuration does not fit in 32 bits.");this.Kb=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"defaultSampleSize",{get:function(){return this.qb},set:function(t){if(void 0===t&&this.flags.defaultSampleSizePresent)throw new g("The default sample size present flag is set.");if(void 0!==t&&!this.flags.defaultSampleSizePresent)throw new g("The default sample size present flag is not set.");if(t&&!_u(t,32))throw new g("Provided defaultSampleSize does not fit in 32 bits.");this.qb=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"defaultSampleFlags",{get:function(){return this.jb},set:function(t){if(void 0===t&&this.flags.defaultSampleFlagsPresent)throw new g("The default sample flags present flag is set.");if(void 0!==t&&!this.flags.defaultSampleFlagsPresent)throw new g("The default sample flags present flag is not set.");if((null==t?void 0:t.samplePaddingValue)&&!_u(t.samplePaddingValue,3))throw new g("Provided sample padding value does not fit in 3 bits.");if((null==t?void 0:t.sampleDegradationPriority)&&!_u(t.sampleDegradationPriority,16))throw new g("Provided sample degradation priority does not fit in 16 bits.");this.jb=t},enumerable:!1,configurable:!0}),n.prototype.serializeFlags=function(t){t.writer.writeUInt(0,6),t.writer.writeBool(this.flags.defaultBaseIsMoof),t.writer.writeBool(this.flags.durationIsEmpty),t.writer.writeByte(0),t.writer.writeUInt(0,2),t.writer.writeBool(this.flags.defaultSampleFlagsPresent),t.writer.writeBool(this.flags.defaultSampleSizePresent),t.writer.writeBool(this.flags.defaultSampleDurationPresent),t.writer.writeBit(0),t.writer.writeBool(this.flags.sampleDescriptionIndexPresent),t.writer.writeBool(this.flags.baseDataOffsetPresent)},n.prototype.getBoxContentSize=function(){var n=t.prototype.getBoxContentSize.call(this)+4;return this.flags.baseDataOffsetPresent&&(n+=8),this.flags.sampleDescriptionIndexPresent&&(n+=4),this.flags.defaultSampleDurationPresent&&(n+=4),this.flags.defaultSampleSizePresent&&(n+=4),this.flags.defaultSampleFlagsPresent&&(n+=4),n},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.trackId,32),this.flags.baseDataOffsetPresent&&(n.writer.writeUInt(this.baseDataOffset.getHighBitsUnsigned(),32),n.writer.writeUInt(this.baseDataOffset.getLowBitsUnsigned(),32)),this.flags.sampleDescriptionIndexPresent&&n.writer.writeUInt(this.sampleDescriptionIndex,32),this.flags.defaultSampleDurationPresent&&n.writer.writeUInt(this.defaultSampleDuration,32),this.flags.defaultSampleSizePresent&&n.writer.writeUInt(this.defaultSampleSize,32),this.flags.defaultSampleFlagsPresent&&Rs(this.defaultSampleFlags,n)},n}(Eu);function rf(t){var n=t.data,i=n.nextUint8(),e=new wu(gu.from(n.nextUint8Array(3)));e.skipBits(6);var r=Boolean(e.readBit()),o=Boolean(e.readBit());e.skipBits(10);var u=Boolean(e.readBit()),s=Boolean(e.readBit()),f=Boolean(e.readBit());e.skipBits(1);var h=Boolean(e.readBit()),c=Boolean(e.readBit()),a=n.nextUint32(),v=c?n.nextUint64():void 0,d=h?n.nextUint32():void 0,l=f?n.nextUint32():void 0,w=s?n.nextUint32():void 0,b=u?Gu(new wu(gu.from(n.nextUint8Array(4)))):void 0;return new ef({trackId:a,defaultBaseIsMoof:r,durationIsEmpty:o,baseDataOffset:v,sampleDescriptionIndex:d,defaultSampleDuration:l,defaultSampleSize:w,defaultSampleFlags:b},i)}x(),pt();var of=function(t){function n(n,i,e){var r=t.call(this,"trun",n,function(t){var n,i,e,r;return{dataOffsetPresent:void 0!==t.dataOffset,firstSampleFlagsPresent:void 0!==t.firstSampleFlags,sampleDurationPresent:null!==(n=t.sampleDurationPresent)&&void 0!==n&&n,sampleSizePresent:null!==(i=t.sampleSizePresent)&&void 0!==i&&i,sampleFlagsPresent:null!==(e=t.sampleFlagsPresent)&&void 0!==e&&e,sampleCompositionTimeOffsetsPresent:null!==(r=t.sampleCompositionTimeOffsetsPresent)&&void 0!==r&&r}}(i))||this;return r.dataOffset=i.dataOffset,r.samples=e,r.firstSampleFlags=i.firstSampleFlags,r}return cu(n,t),p.defineProperty(n.prototype,"dataOffset",{get:function(){return this.aA},set:function(t){if(t&&!_u(t,32))throw new g("Provided data offset does not fit in 32 bits.");this.aA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"firstSampleFlags",{get:function(){return this.uA},set:function(t){if((null==t?void 0:t.samplePaddingValue)&&!_u(t.samplePaddingValue,3))throw new g("Provided sample padding value does not fit in 3 bits.");if((null==t?void 0:t.sampleDegradationPriority)&&!_u(t.sampleDegradationPriority,16))throw new g("Provided sample degradation priority does not fit in 16 bits.");this.uA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"samples",{get:function(){return this.cA},set:function(t){var n,i;if(!_u(t.length,32))throw new g("The sample count cannot be represented in 32 bits.");for(var e=0,r=t;e<r.length;e++){var o=r[e];if(void 0===o.duration&&this.flags.sampleDurationPresent)throw new g("The sample duration present flag is set.");if(void 0!==o.duration&&!this.flags.sampleDurationPresent)throw new g("The sample duration present flag is not set.");if(o.duration&&!_u(o.duration,32))throw new g("Provided sample duration does not fit in 32 bits.");if(void 0===o.size&&this.flags.sampleSizePresent)throw new g("The sample size present flag is set.");if(void 0!==o.size&&!this.flags.sampleSizePresent)throw new g("The sample size present flag is not set.");if(o.size&&!_u(o.size,32))throw new g("Provided sample size does not fit in 32 bits.");if(void 0===o.flags&&this.flags.sampleFlagsPresent)throw new g("The sample flags present flag is set.");if(void 0!==o.flags&&!this.flags.sampleFlagsPresent)throw new g("The sample flags present flag is not set.");if((null===(n=o.flags)||void 0===n?void 0:n.samplePaddingValue)&&!_u(o.flags.samplePaddingValue,3))throw new g("Provided sample padding value does not fit in 3 bits.");if((null===(i=o.flags)||void 0===i?void 0:i.sampleDegradationPriority)&&!_u(o.flags.sampleDegradationPriority,16))throw new g("Provided sample degradation priority does not fit in 16 bits.");if(void 0===o.compositionTimeOffset&&this.flags.sampleCompositionTimeOffsetsPresent)throw new g("The sample compositionTimeOffset present flag is set.");if(void 0!==o.compositionTimeOffset&&!this.flags.sampleCompositionTimeOffsetsPresent)throw new g("The sample compositionTimeOffset present flag is not set.");if(o.compositionTimeOffset&&!_u(o.compositionTimeOffset,32))throw new g("Provided sample compositionTimeOffset does not fit in 32 bits.")}this.cA=t},enumerable:!1,configurable:!0}),n.prototype.serializeFlags=function(t){t.writer.writeByte(0),t.writer.writeUInt(0,4),t.writer.writeBool(this.flags.sampleCompositionTimeOffsetsPresent),t.writer.writeBool(this.flags.sampleFlagsPresent),t.writer.writeBool(this.flags.sampleSizePresent),t.writer.writeBool(this.flags.sampleDurationPresent),t.writer.writeUInt(0,5),t.writer.writeBool(this.flags.firstSampleFlagsPresent),t.writer.writeBit(0),t.writer.writeBool(this.flags.dataOffsetPresent)},n.prototype.getBoxContentSize=function(){var n=t.prototype.getBoxContentSize.call(this)+4;return this.flags.dataOffsetPresent&&(n+=4),this.flags.firstSampleFlagsPresent&&(n+=4),this.flags.sampleDurationPresent&&(n+=4*this.samples.length),this.flags.sampleSizePresent&&(n+=4*this.samples.length),this.flags.sampleFlagsPresent&&(n+=4*this.samples.length),this.flags.sampleCompositionTimeOffsetsPresent&&(n+=4*this.samples.length),n},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.samples.length,32),this.flags.dataOffsetPresent&&n.writer.writeUInt(this.dataOffset,32),this.flags.firstSampleFlagsPresent&&Rs(this.firstSampleFlags,n);for(var i=0,e=this.samples;i<e.length;i++){var r=e[i];this.flags.sampleDurationPresent&&n.writer.writeUInt(r.duration,32),this.flags.sampleSizePresent&&n.writer.writeUInt(r.size,32),this.flags.sampleFlagsPresent&&Rs(r.flags,n),this.flags.sampleCompositionTimeOffsetsPresent&&(0===this.version?n.writer.writeUInt(r.compositionTimeOffset,32):n.writer.writeInt(r.compositionTimeOffset,32))}},n}(Eu);function uf(t){var n=t.data,i=n.nextUint8(),e=new wu(gu.from(n.nextUint8Array(3)));e.skipBits(12);var r=Boolean(e.readBit()),o=Boolean(e.readBit()),u=Boolean(e.readBit()),s=Boolean(e.readBit());e.skipBits(5);var f=Boolean(e.readBit());e.skipBits(1);var h=Boolean(e.readBit()),c=n.nextUint32(),a={sampleDurationPresent:s,sampleSizePresent:u,sampleFlagsPresent:o,sampleCompositionTimeOffsetsPresent:r};h&&(a.dataOffset=n.nextInt32()),f&&(a.firstSampleFlags=Gu(new wu(gu.from(n.nextUint8Array(4)))));for(var v=[],d=0;d<c;d++){var l={};s&&(l.duration=n.nextUint32()),u&&(l.size=n.nextUint32()),o&&(l.flags=Gu(new wu(gu.from(n.nextUint8Array(4))))),r&&(l.compositionTimeOffset=0===i?n.nextUint32():n.nextInt32()),v.push(l)}return new of(i,a,v)}var sf=function(t){function n(){return t.call(this,"traf")||this}return cu(n,t),n}(es);function ff(t){for(var n=new sf,i=0,e=Xu(t.data);i<e.length;i++){var r=e[i];Hu(r,"tfhd")?n.boxes.push(rf(r)):Hu(r,"tfdt")?n.boxes.push(nf(r)):Hu(r,"trun")?n.boxes.push(uf(r)):n.boxes.push(Zu(r))}return n}var hf=function(t){function n(){return t.call(this,"moof")||this}return cu(n,t),n}(es);x(),pt();!function(t){function n(n){var i=t.call(this,"mfhd",0,0)||this;return i.sequenceNumber=n,i}cu(n,t),p.defineProperty(n.prototype,"sequenceNumber",{get:function(){return this.dA},set:function(t){if(!_u(t,32))throw new g("Provided sequence number does not fit in 32 bits.");this.dA=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.sequenceNumber,32)}}(Eu);x(),pt();var cf=function(t){function n(n){var i=t.call(this,"frma")||this;return i.codingName=n,i}return cu(n,t),p.defineProperty(n.prototype,"codingName",{get:function(){return this.lA},set:function(t){if(4!==t.length)throw new g("Provided coding name was not 4 characters long.");this.lA=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return 4},n.prototype.serializeBoxContent=function(t){t.writer.writeString(this.codingName)},n}(yu);x(),pt();!function(t){function n(n,i){var e=t.call(this,"pasp")||this;return e.hSpacing=n,e.vSpacing=i,e}cu(n,t),p.defineProperty(n.prototype,"hSpacing",{get:function(){return this.fA},set:function(t){if(!_u(t,32))throw new g("Provided hSpacing does not fit in 32 bits.");this.fA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"vSpacing",{get:function(){return this.vA},set:function(t){if(!_u(t,32))throw new g("Provided vSpacing does not fit in 32 bits.");this.vA=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return 8},n.prototype.serializeBoxContent=function(t){t.writer.writeUInt(this.hSpacing,32),t.writer.writeUInt(this.vSpacing,32)}}(yu);x(),pt();!function(t){function n(n,i,e){var r=t.call(this,n)||this;return r.sample=i,r.sinf=e,r}cu(n,t),n.prototype.getBoxContentSize=function(){return this.sample.getBoxContentSize()+this.sinf.getSize()},n.prototype.serializeBoxContent=function(t){this.sample.serializeBoxContent(t),t.concat(this.sinf.serialize())}}(es);x(),pt();!function(t){function n(n,i,e){var r=t.call(this,"sinf")||this;return r.schm=i,r.schi=e,r.frma=new cf(n),r}cu(n,t),n.prototype.getBoxContentSize=function(){var t,n,i,e;return this.frma.getSize()+(null!==(n=null===(t=this.schm)||void 0===t?void 0:t.getSize())&&void 0!==n?n:0)+(null!==(e=null===(i=this.schi)||void 0===i?void 0:i.getSize())&&void 0!==e?e:0)},n.prototype.serializeBoxContent=function(t){t.concat(this.frma.serialize()),this.schm&&t.concat(this.schm.serialize()),this.schi&&t.concat(this.schi.serialize())}}(yu);x(),pt();var af=function(t){function n(n,i,e){var r=t.call(this,"saio",n,void 0===e?0:1)||this;return r.entries=i,r.explicitAuxInfoType=e,r}return cu(n,t),p.defineProperty(n.prototype,"bitSize",{get:function(){return 0===this.version?32:64},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"entries",{get:function(){return this.kb},set:function(t){var n=this;if(!_u(t.length,32))throw new g("Number of entries provided does not fit in 32 bits.");if(t.some(function(t){return!_u(t,n.bitSize)}))throw new g("Not all provided entries fit in ".concat(this.bitSize," bits."));this.kb=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"explicitAuxInfoType",{get:function(){return this._A},set:function(t){if(void 0===t)this.flags=0;else{if(!_u(t.auxInfoType,32))throw new g("Provided auxInfoType does not fit in 32 bits.");if(!_u(t.auxInfoTypeParameter,32))throw new g("Provided auxInfoTypeParameter does not fit in 32 bits.");this.flags=1}this._A=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+(void 0===this.explicitAuxInfoType?0:8)+4+this.entries.length*this.bitSize/8},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),void 0!==this.explicitAuxInfoType&&(n.writer.writeUInt(this.explicitAuxInfoType.auxInfoType,32),n.writer.writeUInt(this.explicitAuxInfoType.auxInfoTypeParameter,32)),n.writer.writeUInt(this.entries.length,32),this.serializeSaioContent(n)},n}(Eu);(function(t){function n(){return null!==t&&t.apply(this,arguments)||this}cu(n,t),n.prototype.serializeSaioContent=function(t){for(var n=0,i=this.entries;n<i.length;n++){var e=i[n];t.writer.writeUInt(e,32)}}})(af),function(t){function n(){return null!==t&&t.apply(this,arguments)||this}cu(n,t),n.prototype.serializeSaioContent=function(t){for(var n=0,i=this.entries;n<i.length;n++){var e=i[n];t.writer.writeUInt(e.getHighBitsUnsigned(),32),t.writer.writeUInt(e.getLowBitsUnsigned(),32)}}}(af);x(),pt();!function(t){function n(n,i,e){var r=t.call(this,"saiz",0,void 0===e?0:1)||this;return r.defaultSampleInfoSize=n,r.sampleInfoSizes=i,r.explicitAuxInfoType=e,r}cu(n,t),p.defineProperty(n.prototype,"defaultSampleInfoSize",{get:function(){return this.gA},set:function(t){if(!_u(t,8))throw new g("Provided defaultSampleInfoSize does not fit in a single byte.");this.gA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"sampleInfoSizes",{get:function(){return this.mA},set:function(t){if(!_u(t.length,32))throw new g("Number of sampleInfoSizes provided does not fit in 32 bits.");if(t.some(function(t){return!_u(t,8)}))throw new g("Not all provided sampleInfoSizes fit in a byte.");this.mA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"explicitAuxInfoType",{get:function(){return this._A},set:function(t){if(void 0===t)this.flags=0;else{if(!_u(t.auxInfoType,32))throw new g("Provided auxInfoType does not fit in 32 bits.");if(!_u(t.auxInfoTypeParameter,32))throw new g("Provided auxInfoTypeParameter does not fit in 32 bits.");this.flags=1}this._A=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+(void 0===this.explicitAuxInfoType?0:8)+1+4+(0!==this.defaultSampleInfoSize?0:this.sampleInfoSizes.length)},n.prototype.serializeBoxContent=function(n){if(0!==this.defaultSampleInfoSize&&this.sampleInfoSizes.length>0)throw new g("Both a default size and specific sizes are provided. This is prohibited.");t.prototype.serializeBoxContent.call(this,n),void 0!==this.explicitAuxInfoType&&(n.writer.writeUInt(this.explicitAuxInfoType.auxInfoType,32),n.writer.writeUInt(this.explicitAuxInfoType.auxInfoTypeParameter,32)),n.writer.writeByte(this.defaultSampleInfoSize),n.writer.writeUInt(this.sampleInfoSizes.length,32);for(var i=0,e=this.sampleInfoSizes;i<e.length;i++){var r=e[i];n.writer.writeByte(r)}}}(Eu);x(),pt();!function(t){function n(n){var i=t.call(this,"sdtp",0,0)||this;return i.samples=n,i}cu(n,t),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.samples.length},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n);for(var i=0,e=this.samples;i<e.length;i++){ks(e[i],n)}}}(Eu);x(),pt();!function(t){function n(n){return t.call(this,"stsd",n,0)||this}cu(n,t),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.boxes.length,32)}}(us);x(),pt();var vf=function(t){function n(n,i,e){var r=t.call(this,"sgpd",n,0)||this;return r.entries=e,r.groupingType=i,r}return cu(n,t),p.defineProperty(n.prototype,"groupingType",{get:function(){return this.pA},set:function(t){if(4!==t.length)throw new g("The provided groupingType does not equal 4 characters.");this.pA=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4+4},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeString(this.groupingType),this.serializeVersionBoxContent(n),n.writer.writeUInt(this.entries.length,32);for(var i=0,e=this.entries;i<e.length;i++){var r=e[i];this.serializeEntryBoxContent(n,r)}},n.prototype.serializeEntryBoxContent=function(t,n){n.serializeBoxContent(t)},n}(Eu);(function(t){function n(n,i){return t.call(this,0,n,i)||this}cu(n,t),n.prototype.serializeVersionBoxContent=function(t){}})(vf),function(t){function n(n,i,e){var r=t.call(this,1,n,e)||this;return r.defaultLength=i,r}cu(n,t),p.defineProperty(n.prototype,"defaultLength",{get:function(){return this.wA},set:function(t){if(!_u(t,32))throw new g("The provided defaultLength does not fit in 32 bits.");this.wA=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4+this.entries.length*(this.defaultLength||4)},n.prototype.serializeVersionBoxContent=function(t){t.writer.writeUInt(this.defaultLength,32)},n.prototype.serializeEntryBoxContent=function(t,n){0===this.defaultLength&&t.writer.writeUInt(n.getBoxContentSize(),32),n.serializeBoxContent(t)}}(vf),function(t){function n(n,i,e,r){void 0===r&&(r=0);var o=this;if(n<2)throw new g("This constructor is only meant for versions 2 and up.");return(o=t.call(this,n,i,e)||this).defaultSampleDescriptionIndex=r,o}cu(n,t),p.defineProperty(n.prototype,"defaultSampleDescriptionIndex",{get:function(){return this.Yb},set:function(t){if(!_u(t,32))throw new g("The provided defaultSampleDescriptionIndex does not fit in 32 bits.");this.Yb=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4},n.prototype.serializeVersionBoxContent=function(t){t.writer.writeUInt(this.defaultSampleDescriptionIndex,32)}}(vf);x(),pt();(function(t){function n(n){void 0===n&&(n=[]);var i=t.call(this,"stsz",0,0)||this;return i.sampleSizes=n,i}cu(n,t),p.defineProperty(n.prototype,"sampleSizes",{get:function(){return this.yA},set:function(t){if(!_u(t.length,32))throw new g("Number of allowed samples cannot fit in 32 bits.");if(t.some(function(t){return!_u(t,32)}))throw new g("Not all sampleSizes can be represented in 32 bits.");this.yA=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4+4+4*this.sampleSizes.length},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(0,32),n.writer.writeUInt(this.sampleSizes.length,32);for(var i=0,e=this.sampleSizes;i<e.length;i++){var r=e[i];n.writer.writeUInt(r,32)}}})(Eu),function(t){function n(n,i){void 0===n&&(n=0),void 0===i&&(i=0);var e=t.call(this,"stsz",0,0)||this;return e.defaultSampleSize=n,e.samples=i,e}cu(n,t),p.defineProperty(n.prototype,"defaultSampleSize",{get:function(){return this.qb},set:function(t){if(!_u(t,32))throw new g("Provided defaultSampleSize does not fit in 32 bits.");this.qb=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"samples",{get:function(){return this.cA},set:function(t){if(!_u(t,32))throw new g("Number of allowed samples cannot fit in 32 bits.");this.cA=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4+4},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.defaultSampleSize,32),n.writer.writeUInt(this.samples,32)}}(Eu);x(),pt();!function(t){function n(){return t.call(this,"stbl")||this}cu(n,t)}(es);x(),pt();!function(t){function n(n){var i=t.call(this,"stsc",0,0)||this;return i.entries=n,i}cu(n,t),p.defineProperty(n.prototype,"entries",{get:function(){return this.kb},set:function(t){if(!_u(t.length,32))throw new g("Number of allowed entries cannot fit in 32 bits.");if(t.some(function(t){return!_u(t.firstChunk,32)||!_u(t.sampleDescriptionIndex,32)||!_u(t.samplesPerChunk,32)}))throw new g("Not all entries can be represented in 96 bits.");this.kb=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4+12*this.entries.length},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.entries.length,32);for(var i=0,e=this.entries;i<e.length;i++){var r=e[i];n.writer.writeUInt(r.firstChunk,32),n.writer.writeUInt(r.samplesPerChunk,32),n.writer.writeUInt(r.sampleDescriptionIndex,32)}}}(Eu);x(),pt();!function(t){function n(){return t.call(this,"schi")||this}cu(n,t)}(es);x(),pt();!function(t){function n(n,i,e){var r=t.call(this,"schm",0,void 0===e?0:1)||this;return r.schemeType=n,r.schemeVersion=i,r.schemeUri=e,r}cu(n,t),p.defineProperty(n.prototype,"schemeType",{get:function(){return this.bA},set:function(t){if(4!==t.length)throw new g("The provided schemeType does not have a length of 4.");this.bA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"schemeVersion",{get:function(){return this.AA},set:function(t){if(!_u(t,32))throw new g("The provided schemeVersion does not fit in 23 bits.");this.AA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"schemeUri",{get:function(){return this.SA},set:function(t){if(t&&4!==t.length)throw new g("The provided schemeUri does not have a length of 4.");this.flags=void 0===t?0:1,this.SA=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4+4+(void 0===this.schemeUri?0:this.schemeUri.length+1)},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeString(this.schemeType),n.writer.writeUInt(this.schemeVersion,32),this.schemeUri&&(n.writer.writeString(this.schemeUri),n.writer.writeByte(0))}}(Eu);x(),pt();var df=function(t){function n(n,i,e,r,o,u,s){void 0===s&&(s=0);var f=t.call(this,"sidx",n,s)||this;return f.referenceId=i,f.timescale=e,f.earliestPresentationTime=r,f.firstOffset=o,f.references=u,f}return cu(n,t),p.defineProperty(n.prototype,"bitSize",{get:function(){return 0===this.version?32:64},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"referenceId",{get:function(){return this.TA},set:function(t){if(!_u(t,32))throw new g("Provided referenceId does not fit in 32 bits.");this.TA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"timescale",{get:function(){return this.Wb},set:function(t){if(!_u(t,32))throw new g("Provided timescale does not fit in 32 bits.");this.Wb=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"earliestPresentationTime",{get:function(){return this.kA},set:function(t){if(!_u(t,this.bitSize))throw new g("Provided earliestPresentationTime does not fit in ".concat(this.bitSize," bits."));this.kA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"firstOffset",{get:function(){return this.EA},set:function(t){if(!_u(t,this.bitSize))throw new g("Provided timescale does not fit in ".concat(this.bitSize," bits."));this.EA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"references",{get:function(){return this.RA},set:function(t){if(!_u(t.length,16))throw new g("The number of provided reference items does not fit in 16 bits.");for(var n=0,i=t;n<i.length;n++){var e=i[n];if(!_u(e.referencedSize,31))throw new g("Provided referenced size does not fit in 31 bits.");if(!_u(e.subsegmentDuration,32))throw new g("Provided subsegment duration does not fit in 31 bits.");if(!_u(e.sapType,3))throw new g("Provided SAP type does not fit in 3 bits.");if(!_u(e.sapDeltaTime,28))throw new g("Provided SAP delta time does not fit in 28 bits.")}this.RA=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4+4+this.bitSize/8*2+2+2+12*this.references.length},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.referenceId,32),n.writer.writeUInt(this.timescale,32),this.serializeSidxBoxContent(n),n.writer.writeUInt(0,16),n.writer.writeUInt(this.references.length,16);for(var i=0,e=this.references;i<e.length;i++){var r=e[i];n.writer.writeBit(r.referenceType),n.writer.writeUInt(r.referencedSize,31),n.writer.writeUInt(r.subsegmentDuration,32),n.writer.writeBool(r.startsWithSap),n.writer.writeUInt(r.sapType,3),n.writer.writeUInt(r.sapDeltaTime,28)}},n}(Eu),lf=function(t){function n(n,i,e,r,o,u){return void 0===u&&(u=0),t.call(this,0,n,i,e,r,o,u)||this}return cu(n,t),n.prototype.serializeSidxBoxContent=function(t){t.writer.writeUInt(this.earliestPresentationTime,32),t.writer.writeUInt(this.firstOffset,32)},n}(df),wf=function(t){function n(n,i,e,r,o,u){return void 0===u&&(u=0),t.call(this,1,n,i,e,r,o,u)||this}return cu(n,t),n.prototype.serializeSidxBoxContent=function(t){t.writer.writeUInt(this.earliestPresentationTime.getHighBitsUnsigned(),32),t.writer.writeUInt(this.earliestPresentationTime.getLowBitsUnsigned(),32),t.writer.writeUInt(this.firstOffset.getHighBitsUnsigned(),32),t.writer.writeUInt(this.firstOffset.getLowBitsUnsigned(),32)},n}(df);x(),pt();!function(t){function n(n,i,e){return t.call(this,"styp",n,i,e)||this}cu(n,t)}(ds);x(),pt();!function(t){function n(n){void 0===n&&(n=0);var i=t.call(this,"smhd",0,0)||this;return i.balance=n,i}cu(n,t),p.defineProperty(n.prototype,"balance",{get:function(){return this.IA},set:function(t){if(t<-1||t>1)throw new g("Provided balance does not fit in the allowed range [-1, 1].");if(!_u(Su(t,8),16))throw new g("Provided balance does not fit in 16 bits (fixed 8.8).");this.IA=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+2+2},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(Su(this.balance,8),16),n.writer.writeUInt(0,16)}}(Eu);x(),pt();!function(t){function n(n){var i=t.call(this,"stss",0,0)||this;return i.entries=n,i}cu(n,t),p.defineProperty(n.prototype,"entries",{get:function(){return this.kb},set:function(t){if(!_u(t.length,32))throw new g("Number of allowed entries cannot fit in 32 bits.");if(t.some(function(t){return!_u(t,32)}))throw new g("Not all entries can be represented in 32 bits.");this.kb=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4+4*this.entries.length},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.entries.length,32);for(var i=0,e=this.entries;i<e.length;i++){var r=e[i];n.writer.writeUInt(r,32)}}}(Eu);x(),pt();!function(t){function n(n){var i=t.call(this,"stts",0,0)||this;return i.entries=n,i}cu(n,t),p.defineProperty(n.prototype,"entries",{get:function(){return this.kb},set:function(t){if(!_u(t.length,32))throw new g("Number of allowed entries cannot fit in 32 bits.");if(t.some(function(t){return!_u(t.sampleCount,32)||!_u(t.sampleDelta,32)}))throw new g("Not all entries can be represented in 64 bits.");this.kb=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4+8*this.entries.length},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.entries.length,32);for(var i=0,e=this.entries;i<e.length;i++){var r=e[i];n.writer.writeUInt(r.sampleCount,32),n.writer.writeUInt(r.sampleDelta,32)}}}(Eu);x(),pt();!function(t){function n(n){var i=t.call(this,"trep",0,0)||this;return i.trackId=n,i}cu(n,t),p.defineProperty(n.prototype,"trackId",{get:function(){return this.zb},set:function(t){if(!_u(t,32))throw new g("The provided trackId does not fit in 32 bits.");this.zb=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.trackId,32)}}(us);x(),pt();!function(t){function n(){return t.call(this,"udta")||this}cu(n,t)}(es);x(),pt();var bf={red:0,green:0,blue:0};!function(t){function n(n,i){void 0===n&&(n=0),void 0===i&&(i=bf);var e=t.call(this,"vmhd",0,1)||this;return e.graphicsMode=n,e.opColor=i,e}cu(n,t),p.defineProperty(n.prototype,"opColor",{get:function(){return this.xA},set:function(t){if(!_u(t.red,16)||!_u(t.green,16)||!_u(t.blue,16))throw new g("Not all colors could be represented in 16 bits.");this.xA=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+2+6},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.graphicsMode,16),n.writer.writeUInt(this.opColor.red,16),n.writer.writeUInt(this.opColor.green,16),n.writer.writeUInt(this.opColor.blue,16)}}(Eu);x(),pt();var gf=function(t){function n(n,i,e,r,o){void 0===r&&(r={}),void 0===o&&(o=void 0);var u,s,f,h,c,a=this;return(a=t.call(this,n,i)||this).width=e.width,a.height=e.height,a.horizontalResolution=null!==(u=e.horizontal)&&void 0!==u?u:72,a.verticalResolution=null!==(s=e.vertical)&&void 0!==s?s:72,a.compressorName=null!==(f=r.compressorName)&&void 0!==f?f:"",a.frameCount=null!==(h=r.frameCount)&&void 0!==h?h:1,a.depth=null!==(c=r.depth)&&void 0!==c?c:24,a.clap=r.clap,a.pasp=r.pasp,a.extra=o,a}return cu(n,t),p.defineProperty(n.prototype,"width",{get:function(){return this.iA},set:function(t){if(!_u(t,16))throw new g("Provided width does not fit in 16 bits.");this.iA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"height",{get:function(){return this.eA},set:function(t){if(!_u(t,16))throw new g("Provided height does not fit in 16 bits.");this.eA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"horizontalResolution",{get:function(){return this.CA},set:function(t){if(!_u(Su(t,16),32))throw new g("Provided horizontalResolution does not fit in 32 bits (fixed 16.16).");this.CA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"verticalResolution",{get:function(){return this.PA},set:function(t){if(!_u(Su(t,16),32))throw new g("Provided verticalResolution does not fit in 32 bits (fixed 16.16).");this.PA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"compressorName",{get:function(){return this.NA},set:function(t){if(t.length>31)throw new g("The provided compressorName should at most be 31 characters long.");this.NA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"frameCount",{get:function(){return this.DA},set:function(t){if(!_u(t,16))throw new g("Provided frameCount does not fit in 16 bits.");this.DA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"depth",{get:function(){return this.BA},set:function(t){if(!_u(t,16))throw new g("Provided depth does not fit in 16 bits.");this.BA=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){var n,i,e,r,o,u;return t.prototype.getBoxContentSize.call(this)+2+2+12+2+2+4+4+4+2+32+2+2+(null!==(i=null===(n=this.clap)||void 0===n?void 0:n.getSize())&&void 0!==i?i:0)+(null!==(r=null===(e=this.pasp)||void 0===e?void 0:e.getSize())&&void 0!==r?r:0)+(null!==(u=null===(o=this.extra)||void 0===o?void 0:o.length)&&void 0!==u?u:0)},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(0,16),n.writer.writeUInt(0,16),n.writer.writeUInt(0,32),n.writer.writeUInt(0,32),n.writer.writeUInt(0,32),n.writer.writeUInt(this.width,16),n.writer.writeUInt(this.height,16),n.writer.writeUInt(Su(this.horizontalResolution,16),32),n.writer.writeUInt(Su(this.verticalResolution,16),32),n.writer.writeUInt(0,32),n.writer.writeUInt(this.frameCount,16),n.writer.writeByte(this.compressorName.length),n.writer.writeString(this.compressorName);for(var i=0;i<31-this.compressorName.length;i++)n.writer.writeByte(0);n.writer.writeUInt(this.depth,16),n.writer.writeInt(-1,16),this.clap&&n.concat(this.clap.serialize()),this.pasp&&n.concat(this.pasp.serialize()),this.extra&&Tu(n.writer,this.extra)},n}(rs);x(),pt(),x(),pt(),M();!function(t){function n(n){var i=t.call(this,"esds",0,0)||this;return i.esDescriptor=n,i}cu(n,t),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+(B(this.esDescriptor,I)?this.esDescriptor.length:this.esDescriptor.getSize())},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),B(this.esDescriptor,I)?n.concat(gu.from(this.esDescriptor)):this.esDescriptor.serialize(n)}}(Eu);x(),pt();!function(t){function n(n,i,e){var r=t.call(this,"mp4a",n,e)||this;return r.esd=i,r}cu(n,t),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.esd.getSize()},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.concat(this.esd.serialize())}}(os);x(),pt();!function(t){function n(n,i,e,r){void 0===r&&(r={});var o=t.call(this,"mp4v",n,i,r)||this;return o.esDescriptor=e,o}cu(n,t),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.esDescriptor.getSize()},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),this.esDescriptor.serialize(n)}}(gf);x(),pt();!function(t){function n(n,i){var e=t.call(this,"mp4s",n)||this;return e.esDescriptor=i,e}cu(n,t),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.esDescriptor.getSize()},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),this.esDescriptor.serialize(n)}}(rs);x(),pt(),x(),pt();!function(t){function n(n){var i=t.call(this,"avcC")||this;return i.decoderConfig=n,i}cu(n,t),n.prototype.getBoxContentSize=function(){return this.decoderConfig.getSize()},n.prototype.serializeBoxContent=function(t){this.decoderConfig.serialize(t)}}(yu);x(),pt();!function(){function t(t,n,i,e,r,o){void 0===o&&(o=1),this.lengthSizeMinusOne=i,this.version=o,this.profileIndication=t.indication,this.profileCompatibility=t.compatibility,this.levelIndication=n,this.spsSets=e,this.ppsSets=r}p.defineProperty(t.prototype,"version",{get:function(){return this.LA},set:function(t){if(!_u(t,8))throw new g("Provided version does not fit in 8 bits.");this.LA=t},enumerable:!1,configurable:!0}),p.defineProperty(t.prototype,"profileIndication",{get:function(){return this.MA},set:function(t){if(!_u(t,8))throw new g("Provided profileIndication does not fit in 8 bits.");this.MA=t},enumerable:!1,configurable:!0}),p.defineProperty(t.prototype,"profileCompatibility",{get:function(){return this.OA},set:function(t){if(!_u(t,8))throw new g("Provided profileCompatibility does not fit in 8 bits.");this.OA=t},enumerable:!1,configurable:!0}),p.defineProperty(t.prototype,"levelIndication",{get:function(){return this.FA},set:function(t){if(!_u(t,8))throw new g("Provided levelIndication does not fit in 8 bits.");this.FA=t},enumerable:!1,configurable:!0}),p.defineProperty(t.prototype,"spsSets",{get:function(){return this.VA},set:function(t){if(!_u(t.length,5))throw new g("Provided number of spsSets exceeds the max (32)");this.VA=t},enumerable:!1,configurable:!0}),p.defineProperty(t.prototype,"ppsSets",{get:function(){return this.WA},set:function(t){if(!_u(t.length,8))throw new g("Provided number of ppsSets exceeds the max (256)");this.WA=t},enumerable:!1,configurable:!0}),t.prototype.getSize=function(){return 7+2*this.spsSets.length+this.spsSets.reduce(function(t,n){return t+n.length},0)+2*this.ppsSets.length+this.ppsSets.reduce(function(t,n){return t+n.length},0)},t.prototype.serialize=function(t){t.writer.writeByte(this.version),t.writer.writeByte(this.profileIndication),t.writer.writeByte(this.profileCompatibility),t.writer.writeByte(this.levelIndication),t.writer.writeBits([1,1,1,1,1,1]),t.writer.writeUInt(this.lengthSizeMinusOne,2),t.writer.writeBits([1,1,1]),t.writer.writeUInt(this.spsSets.length,5);for(var n=0,i=this.spsSets;n<i.length;n++){var e=i[n];t.writer.writeUInt(e.length,16),t.concat(gu.from(e))}t.writer.writeByte(this.ppsSets.length);for(var r=0,o=this.ppsSets;r<o.length;r++){var u=o[r];t.writer.writeUInt(u.length,16),t.concat(gu.from(u))}}}();x(),pt();!function(t){function n(n,i,e,r,o){void 0===r&&(r={}),void 0===o&&(o=void 0);var u=t.call(this,"avc1",n,i,r)||this;return u.configurationBox=e,u.bitrateBox=o,u}cu(n,t),n.prototype.getBoxContentSize=function(){var n,i;return t.prototype.getBoxContentSize.call(this)+this.configurationBox.getSize()+(null!==(i=null===(n=this.bitrateBox)||void 0===n?void 0:n.getSize())&&void 0!==i?i:0)},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.concat(this.configurationBox.serialize()),this.bitrateBox&&n.concat(this.bitrateBox.serialize())}}(gf);x(),pt();!function(t){function n(n,i,e){var r=t.call(this,"btrt")||this;return r.bufferSizeDb=n,r.max=i,r.avg=e,r}cu(n,t),p.defineProperty(n.prototype,"bufferSizeDb",{get:function(){return this.fb},set:function(t){if(!_u(t,32))throw new g("Provided bufferSizeDb does not fit in 32 bits.");this.fb=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"max",{get:function(){return this.UA},set:function(t){if(!_u(t,32))throw new g("Provided max does not fit in 32 bits.");this.UA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"avg",{get:function(){return this.GA},set:function(t){if(!_u(t,32))throw new g("Provided avg does not fit in 32 bits.");this.GA=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return 12},n.prototype.serializeBoxContent=function(t){t.writer.writeUInt(this.bufferSizeDb,32),t.writer.writeUInt(this.max,32),t.writer.writeUInt(this.avg,32)}}(yu);x(),pt(),x(),pt(),x(),pt();var mf=function(t){function n(n,i){var e,r,o,u,s=this;if(s=t.call(this,"tenc",n,0)||this,i.perSampleIvSize>0&&(null!==(r=null===(e=i.constantIv)||void 0===e?void 0:e.length)&&void 0!==r?r:0)>0)throw new g("Either perSampleSize should be > 0 or constantIv should be defined. Not both.");return s.kId=i.kId,s.isProtected=null!==(o=i.isProtected)&&void 0!==o?o:1,i.perSampleIvSize>0?s.perSampleIvSize=i.perSampleIvSize:s.constantIv=null!==(u=i.constantIv)&&void 0!==u?u:new I(0),s}return cu(n,t),p.defineProperty(n.prototype,"isProtected",{get:function(){return this.XA},set:function(t){if(!_u(t,8))throw new g("Provided isProtected does not fit in 1 byte.");this.XA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"perSampleIvSize",{get:function(){return this.ZA},set:function(t){if(![8,16].includes(t))throw new g("Provided perSampleIvSize does not match any allowed value [8, 16].");this.ZA=t,this.HA=new I(0)},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"kId",{get:function(){return this.zA},set:function(t){if(16!==t.length)throw new g("Provided kId length is not 16.");this.zA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"constantIv",{get:function(){return this.HA},set:function(t){if(![8,16].includes(t.length))throw new g("Provided constant IV length does not match any allowed value [8, 16].");this.HA=t,this.ZA=0},enumerable:!1,configurable:!0}),n.prototype.getTencHeaderSize=function(){return 20+(this.constantIv.length>0?1+this.constantIv.length:0)},n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.getTencHeaderSize()},n.prototype.serializeVersionBoxContent=function(t){t.writer.writeByte(0)},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),this.serializeOwnContent(n)},n.prototype.serializeOwnContent=function(t){t.writer.writeByte(0),this.serializeVersionBoxContent(t),t.writer.writeByte(this.isProtected),t.writer.writeByte(this.perSampleIvSize),Tu(t.writer,this.kId),0===this.perSampleIvSize&&(t.writer.writeByte(this.constantIv.length),Tu(t.writer,this.constantIv))},n}(Eu),pf=(function(t){function n(n){return t.call(this,0,n)||this}cu(n,t)}(mf),function(t){function n(n){var i=t.call(this,1,n)||this;return i.cryptByteBlocks=n.cryptByteBlock,i.skipByteBlocks=n.skipByteBlock,i}return cu(n,t),p.defineProperty(n.prototype,"cryptByteBlocks",{get:function(){return this.YA},set:function(t){if(!_u(t,4))throw new g("Provided cryptByteBlocks does not fit in 4 bits.");this.YA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"skipByteBlocks",{get:function(){return this.KA},set:function(t){if(!_u(t,4))throw new g("Provided skipByteBlocks does not fit in 4 bits.");this.KA=t},enumerable:!1,configurable:!0}),n.prototype.serializeVersionBoxContent=function(t){t.writer.writeUInt(this.cryptByteBlocks,4),t.writer.writeUInt(this.skipByteBlocks,4)},n}(mf));!function(t){function n(n){var i=t.call(this)||this;return i.tencBox=new pf(n),i}cu(n,t),n.prototype.serializeBoxContent=function(t){this.tencBox.serializeOwnContent(t)},n.prototype.getBoxContentSize=function(){return this.tencBox.getTencHeaderSize()}}(Os);function yf(t){return void 0!==t.iv}function _f(t){return void 0!==t.subsamples}x(),pt();!function(t){function n(n){var i=t.call(this,"senc",0,{useSubsampleEncryption:!1})||this;return i.samples=n,i}cu(n,t),p.defineProperty(n.prototype,"samples",{get:function(){return this.cA},set:function(t){var n;if(!_u(t.length,32))throw new g("The number of samples provided does not fit in 32 bits.");for(var i=0,e=t;i<e.length;i++){var r=e[i];if(yf(r)&&![8,16].includes(r.iv.length))throw new g("IV of one of the provided samples did not satisfy the required length constraints. [8, 16]");if(void 0===n&&(n=_f(r)),!0===n&&!_f(r)||!1===n&&_f(r))throw new g("Mix of samples with and without subsamples detected.");if(_f(r)){if(!_u(r.subsamples.length,16))throw new g("Subsample length of one of the provided samples does not fit in 16 bits.");for(var o=0,u=r.subsamples;o<u.length;o++){var s=u[o];if(!_u(s.clearData,16))throw new g("Subsample clearData of one of the provided samples does not fit in 16 bits.");if(!_u(s.protectedData,23))throw new g("Subsample protectedData of one of the provided samples does not fit in 23 bits.")}}}this.flags.useSubsampleEncryption=null!=n&&n,this.cA=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){for(var n=0,i=0,e=this.samples;i<e.length;i++){var r=e[i];yf(r)&&(n+=r.iv.length),_f(r)&&(n+=2+6*r.subsamples.length)}return t.prototype.getBoxContentSize.call(this)+4+n},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.samples.length,32);for(var i=0,e=this.samples;i<e.length;i++){var r=e[i];if(yf(r)&&Tu(n.writer,r.iv),_f(r)){n.writer.writeUInt(r.subsamples.length,16);for(var o=0,u=r.subsamples;o<u.length;o++){var s=u[o];n.writer.writeUInt(s.clearData,16),n.writer.writeUInt(s.protectedData,32)}}}},n.prototype.serializeFlags=function(t){t.writer.writeUInt(this.flags.useSubsampleEncryption?2:0,24)}}(Eu);x(),pt(),x(),pt();!function(t){function n(n,i,e,r,o){var u=t.call(this,"emsg",0,0)||this;return u.schemeIdUri=n,u.value=i,u.data=o,u.id=e,u.timescale=r.timescale,u.presentationTimeDelta=r.presentationTimeDelta,u.eventDuration=r.eventDuration,u}cu(n,t),p.defineProperty(n.prototype,"timescale",{get:function(){return this.Wb},set:function(t){if(!_u(t,32))throw new g("The provided timescale does not fit in 32 bits.");this.Wb=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"presentationTimeDelta",{get:function(){return this.qA},set:function(t){if(!_u(t,32))throw new g("The provided presentationTimeDelta does not fit in 32 bits.");this.qA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"eventDuration",{get:function(){return this.jA},set:function(t){if(!_u(t,32))throw new g("The provided eventDuration does not fit in 32 bits.");this.jA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"id",{get:function(){return this.QA},set:function(t){if(!_u(t,32))throw new g("The provided id does not fit in 32 bits.");this.QA=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.schemeIdUri.length+1+this.value.length+1+16+this.data.length},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeString(this.schemeIdUri),n.writer.writeByte(0),n.writer.writeString(this.value),n.writer.writeByte(0),n.writer.writeUInt(this.timescale,32),n.writer.writeUInt(this.presentationTimeDelta,32),n.writer.writeUInt(this.eventDuration,32),n.writer.writeUInt(this.id,32),n.concat(gu.from(this.data))}}(Eu);x(),pt(),x(),pt(),x(),pt();!function(){function t(){this.boxes=[]}t.prototype.serialize=function(){for(var t=new pu,n=0,i=this.boxes;n<i.length;n++){var e=i[n];t.concat(e.serialize())}return t.toRangedBuffer()}}();function Sf(t,n){return function(i){var e=new qu(function(t){return new DataView(t.buffer,t.byteOffset,t.byteLength)}(i),new Vu),r=function(t,n){for(var i=t.data,e=t.cursor;e.offset<i.byteLength;){var r=ju(i,e);if(!r.complete)return;if(Hu(r.box,n))return r.box}}(e,t);if(!r)throw new g("".concat(t," box not found"));return n(r)}}Sf("moov",function(t){for(var n=new Zs,i=0,e=Xu(t.data);i<e.length;i++){var r=e[i];Hu(r,"mvhd")?n.boxes.push(Hs(r)):Hu(r,"trak")?n.boxes.push($s(r)):Hu(r,"mvex")?n.boxes.push(zs(r)):Hu(r,"pssh")?n.boxes.push(Ds(r)):n.boxes.push(Zu(r))}return n}),Sf("sidx",function(t){var n,i,e=t.data,r=Yu(e.nextUint32()),o=r.version,u=r.flags,s=e.nextUint32(),f=e.nextUint32();0===o?(n=e.nextUint32(),i=e.nextUint32()):(n=e.nextUint64(),i=e.nextUint64()),e.skip(2);for(var h=e.nextUint16(),c=[],a=0;a<h;a++){var v=new wu(gu.from(e.nextUint8Array(12))),d=v.readBit(),l=v.readUInt(31),w=v.readUInt(32),b=Boolean(v.readBit()),g=v.readUInt(3),m=v.readUInt(28);c.push({referenceType:d,referencedSize:l,subsegmentDuration:w,startsWithSap:b,sapType:g,sapDeltaTime:m})}return 0===o?new lf(s,f,n,i,c,u.raw):new wf(s,f,n,i,c,u.raw)}),Sf("moof",function(t){for(var n=new hf,i=0,e=Xu(t.data);i<e.length;i++){var r=e[i];Hu(r,"traf")?n.boxes.push(ff(r)):Hu(r,"pssh")?n.boxes.push(Ds(r)):n.boxes.push(Zu(r))}return n});var Tf=Sf("pssh",Ds),If=function(t){function n(n,i){var e;(e=t.call(this)||this).tS=void 0,e.uS=void 0,e.iS=void 0,e.sS=void 0,e.Zd=void 0,e.nS=void 0,e.cS=void 0,e.dS=void 0,e.lS=void 0,e.tS=n,e.uS=i,e.sS=!1,e.cS=function(){e.oS()},e.dS=function(t){e.So(new No(e,t.messageType,uu(e.uS,t.message)))},e.lS=function(){e.sS=!0,e.iS.Py>0&&(e.iS.My(),e.So(new Oo(e.iS))),e.tS.removeEventListener("keystatuseschange",e.cS),e.tS.removeEventListener("message",e.dS)},e.tS.addEventListener("keystatuseschange",e.cS),e.tS.addEventListener("message",e.dS),e.iS=new ru;var r=[];return e.tS.closed&&r.push(tt.resolve(e.tS.closed)),e.nS=new ou,r.push(e.nS.Vy),e.Zd=tt.race(r).then(e.lS,e.lS),e.oS(),e}Tt(n,t);var i=n.prototype;return i.Xs=function(){if(this.sS)return this.Zd;var t=[];return t.push(tt.resolve(this.tS.close())),t.push(pn(1e3)),this.nS.Kg(tt.race(t).catch(Ef)),this.sS=!0,this.Zd},i.rS=function(t,n,i){if(Vt.e_){var e=Tf(Go(n));if(1===e.version)n=new Ps(e.systemId,e.data).serialize().join()}return tt.resolve(this.tS.generateRequest(t,n)).catch(Ef)},i.Un=function(t){return tt.resolve(this.tS.load(t)).catch(Ef)},i.hS=function(){return tt.resolve(this.tS.remove()).catch(Ef)},i.er=function(t){return tt.resolve(this.tS.update(t)).catch(Ef)},i.oS=function(){var t=this;this.iS.My(),this.tS.keyStatuses.forEach(function(n,i){t.aS(i,n)}),this.So(new Oo(this.iS))},i.aS=function(t,n){if("string"==typeof t){var i=t;t=n,n=i}var e=Go(t);if(this.uS===Zr&&16===e.byteLength&&(Vt.v_||Vt.og)){var r=Yo(e),o=r.getUint32(0,!0),u=r.getUint16(4,!0),s=r.getUint16(6,!0);r.setUint32(0,o,!1),r.setUint16(4,u,!1),r.setUint16(6,s,!1)}this.uS===Zr&&"status-pending"===n&&(n="usable"),this.iS.By(e,n)},Et(n,[{key:"JA",get:function(){return this.Zd}},{key:"$A",get:function(){return this.tS.expiration}},{key:"vy",get:function(){return this.iS}},{key:"eS",get:function(){return this.tS.sessionId}}]),n}(To);function Ef(t){var n;if(t.message){var i=t.message.match(/^SystemCode:0x([0-9a-fA-F]+)$/);i&&(n=0|_(i[1],16))}throw new fu(t.message,void 0,n,t)}var kf=function(){function t(t,n,i){this.vS=void 0,this._S=void 0,this.Cd=void 0,this.vS=t,this._S=n,this.Cd=i}var n=t.prototype;return n.fS=function(t){return tn(function(){return nn(this,function(n){return[2,new If(this.vS.createSession(t),this._S)]})}).call(this)},n.gS=function(t){return tt.resolve(this.vS.setServerCertificate(t))},n._n=function(t){return tt.resolve(t.setMediaKeys(this.vS))},n.mS=function(t){return tt.resolve(t.setMediaKeys(null))},n.hr=function(){return tt.resolve()},t}(),Rf=function(){function t(t,n,i){this.pS=void 0,this.uS=void 0,this.yS=void 0,this.pS=t,this.uS=n,this.yS=i}var n=t.prototype;return n.wS=function(){return tn(function(){var t;return nn(this,function(n){switch(n.label){case 0:return[4,this.pS.createMediaKeys()];case 1:return t=n.sent(),[2,new kf(t,this.uS,this.yS)]}})}).call(this)},n.bS=function(){return this.yS},Et(t,[{key:"_S",get:function(){return this.pS.keySystem}}]),t}();function Of(t){var n=t.trim(),i=n.indexOf(";");return i<0?n:n.substr(0,i).trim()}function Nf(t,n,i,e){var r=!1;if(!(e.persistentState&&"optional"!==e.persistentState||e.distinctiveIdentifier&&"optional"!==e.distinctiveIdentifier)){var o={audioCapabilities:[],videoCapabilities:[],persistentState:e.persistentState||"optional",distinctiveIdentifier:e.distinctiveIdentifier||"optional",initDataTypes:e.initDataTypes,sessionTypes:["temporary"],label:e.label,kS:e.kS},u=!1;if(e.audioCapabilities){var s=e.audioCapabilities.filter(function(t){return Boolean(t.contentType)});s.length&&(o.audioCapabilities=s.filter(function(e){return Pf(t,n,i,e)}),u=!0,o.audioCapabilities.length&&(r=!0))}if(e.videoCapabilities){var f=e.videoCapabilities.filter(function(t){return Boolean(t.contentType)});f.length&&(o.videoCapabilities=f.filter(function(e){return Pf(t,n,i,e)}),u=!0,o.videoCapabilities.length&&(r=!0))}return u||(r=t(i,"video/mp4")),r?o:void 0}}function Pf(t,n,i,e){return!!e.contentType&&(!(e.encryptionScheme&&!hn(n,e.encryptionScheme))&&(!e.robustness&&t(i,Of(e.contentType))))}function Af(t){if(t.videoCapabilities)for(var n,i=Rt(t.videoCapabilities);!(n=i()).done;){var e=n.value;if(e.contentType)return e.contentType}if(t.audioCapabilities)for(var r,o=Rt(t.audioCapabilities);!(r=o()).done;){var u=r.value;if(u.contentType)return u.contentType}}function Df(t){for(var n,i=[],e=Rt(t);!(n=e()).done;){var r=n.value;r.encryptionScheme&&i.push({contentType:r.contentType,robustness:r.robustness})}return t.concat(i)}function Cf(t){return!(!t.audioCapabilities||!t.audioCapabilities.some(xf))||!(!t.videoCapabilities||!t.videoCapabilities.some(xf))}function xf(t){return!t.robustness}function Bf(t,n){for(var i,e=[],r=Rt(t);!(i=r()).done;){var o=i.value;o.robustness?e.push(o):e.push(Hr({},o,{robustness:n}))}return e}x(),pt(),x(),pt();var Mf=function(){function t(){}return t.prototype.qp=function(t,n){return tn(function(){var i,e,r,o,u,s,f,h;return nn(this,function(c){switch(c.label){case 0:for(n=n.filter(function(t){return!t.kS}),i=Rt(n);!(e=i()).done;)(r=e.value).audioCapabilities&&(r.audioCapabilities=Df(r.audioCapabilities)),r.videoCapabilities&&(r.videoCapabilities=Df(r.videoCapabilities));if(t!==to||!n.some(Cf))return[3,4];o=n.map(function(t){return function(t,n){return Hr({},t,{videoCapabilities:t.videoCapabilities?Bf(t.videoCapabilities,n):void 0,audioCapabilities:t.audioCapabilities?Bf(t.audioCapabilities,n):void 0})}(t,"SW_SECURE_CRYPTO")}),c.label=1;case 1:return c.trys.push([1,3,,4]),[4,v.requestMediaKeySystemAccess(t,o)];case 2:return u=c.sent(),s=u.getConfiguration(),[2,new Rf(u,t,s)];case 3:return c.sent(),[3,4];case 4:return[4,v.requestMediaKeySystemAccess(t,n)];case 5:return f=c.sent(),h=f.getConfiguration(),[2,new Rf(f,t,h)]}})})()},t.ES=function(){return void 0!==v&&"function"==typeof v.requestMediaKeySystemAccess},t}();x(),pt(),x(),pt(),x(),pt(),x(),pt();var Lf=function(t){function n(n,i){var e;return(e=t.call(this)||this).DS=void 0,e.LS=void 0,e.sS=void 0,e.IS=void 0,e.WS=void 0,e.PS=void 0,e.xS=void 0,e.RS=void 0,e.lS=void 0,e.MS=void 0,e.Ts=void 0,e.FS=void 0,e.DS=n,e.LS=i,e.sS=!1,e.WS=void 0,e.PS=void 0,e.RS=void 0,e.lS=function(){e.sS=!0,e.IS.Oy(void 0),e.RS&&(e.RS.removeEventListener("mskeyclose",e.lS),e.RS.removeEventListener("mskeymessage",e.MS),e.RS.removeEventListener("mskeyerror",e.Ts),e.RS.removeEventListener("mskeyadded",e.FS))},e.MS=function(t){e.PS&&(e.PS.Oy(void 0),e.PS=void 0),e.So(new No(e,"license-request",$o(t.message).buffer,t.destinationURL||void 0))},e.Ts=function(){var t=e.RS&&e.RS.error;if(t){var n=new fu("Unknown CDM error",t.code,t.systemCode);if(e.PS)e.PS.Fy(n),e.PS=void 0;else if(e.WS)e.WS.Fy(n),e.WS=void 0;else switch(n.Wy){case MSMediaKeyError.MS_MEDIA_KEYERR_OUTPUT:case MSMediaKeyError.MS_MEDIA_KEYERR_HARDWARECHANGE:e.VS("output-not-allowed");break;default:e.VS("internal-error")}}},e.FS=function(){e.PS&&(e.VS("usable"),e.PS.Oy(void 0),e.PS=void 0),e.WS&&(e.VS("usable"),e.WS.Oy(void 0),e.WS=void 0)},e.IS=new ou,e.xS=new ru,e}Tt(n,t);var i=n.prototype;return i.rS=function(t,n,i){return tn(function(){return nn(this,function(t){switch(t.label){case 0:return this.CS(),this.PS=new ou,this.fS(Go(n),i),[4,this.PS.Vy];case 1:return t.sent(),[2]}})}).call(this)},i.fS=function(t,n){if(!t)throw new m("Expected initData to be defined but was "+t+".");var i,e=n&&n.playready&&n.playready.NS;return(i=n?this.DS.createSession(this.LS,t,e):this.DS.createSession(this.LS,t)).addEventListener("mskeyclose",this.lS),i.addEventListener("mskeymessage",this.MS),i.addEventListener("mskeyerror",this.Ts),i.addEventListener("mskeyadded",this.FS),this.RS=i,this.VS("status-pending"),i},i.Un=function(t){return tn(function(){return nn(this,function(t){return this.CS(),[2,!0]})}).call(this)},i.er=function(t){return tn(function(){var n;return nn(this,function(i){switch(i.label){case 0:if(this.WS=new ou,this.CS(),!this.RS)return[2,tt.resolve()];if(0===(n=Go(t)).byteLength)throw new m("Cannot call update with an empty response.");return this.RS.update(n),[4,this.WS.Vy];case 1:return i.sent(),[2]}})}).call(this)},i.Xs=function(){return!this.sS&&this.RS&&(this.sS=!0,this.RS.close()),this.IS.Vy},i.hS=function(){return tn(function(){return nn(this,function(t){return this.CS(),[2]})}).call(this)},i.CS=function(){if(this.sS)throw new m("Already closing or closed.")},i.VS=function(t){this.xS.My(),this.xS.By(eu,t),this.So(new Oo(this.xS))},Et(n,[{key:"eS",get:function(){return this.RS&&this.RS.sessionId||""}},{key:"$A",get:function(){return NaN}},{key:"JA",get:function(){return this.IS.Vy}},{key:"vy",get:function(){return this.xS}}]),n}(To),Uf=function(){function t(t,n,i){this.DS=void 0,this._S=void 0,this.Cd=void 0,this.LS=void 0,this.DS=t,this._S=n,this.Cd=i;var e=Af(i)||"video/mp4";this.LS=Of(e)}var n=t.prototype;return n.fS=function(t){return tn(function(){return nn(this,function(t){return[2,new Lf(this.DS,this.LS)]})}).call(this)},n.gS=function(t){return tt.resolve(!1)},n._n=function(t){var n=this,i=function(){t.msSetMediaKeys(n.DS),t.removeEventListener("loadedmetadata",i)};return t.readyState>=1?t.msSetMediaKeys(this.DS):t.addEventListener("loadedmetadata",i),tt.resolve()},n.mS=function(t){return tt.resolve()},n.hr=function(){return tt.resolve()},t}(),Ff=function(){function t(t,n){this.uS=void 0,this.US=void 0,this.uS=t,this.US=n}var n=t.prototype;return n.bS=function(){return this.US},n.wS=function(){var t=new c.MSMediaKeys(this.uS);return tt.resolve(new Uf(t,this.uS,this.US))},Et(t,[{key:"_S",get:function(){return this.uS}}]),t}(),zf=function(){function t(){}return t.prototype.qp=function(t,n){try{return tt.resolve(function(t,n){if(!Wf())throw new m("Unsupported key system "+t);for(var i,e=Rt(n);!(i=e()).done;){var r=i.value,o=Nf(Vf,ko,t,r);if(o)return new Ff(t,o)}throw new m("Unsupported key system configuration for "+t)}(t,n))}catch(t){return tt.reject(t)}},t.ES=function(){return Wf()},t}();function Wf(){return void 0!==c.MSMediaKeys&&"function"==typeof c.MSMediaKeys.isTypeSupported}function Vf(t,n){return c.MSMediaKeys.isTypeSupported(t,n)}x(),pt(),x(),pt(),x(),pt(),x(),pt();var qf=function(t){function n(n,i,e){var r;return(r=t.call(this)||this).HS=void 0,r.LS=void 0,r.ZS=void 0,r.IS=void 0,r.YS=void 0,r.xS=void 0,r.GS=void 0,r.zS=void 0,r.Ts=void 0,r.MS=void 0,r.FS=void 0,r.HS=n,r.LS=i,r.ZS=e,r.IS=new ou,r.YS=void 0,r.xS=new ru,r.GS=void 0,r.zS=new ou,r.Ts=function(){var t=r.GS&&r.GS.error;if(t){var n=new fu("Unknown CDM error",t.code,t.systemCode);r.YS?(r.YS.Fy(n),r.YS=void 0):n.Wy===WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT?r.VS("output-not-allowed"):r.VS("internal-error"),r.So(new Po)}},r.MS=function(t){r.So(new No(r,"license-request",$o(t.message).buffer,"this is a test string"===t.destinationURL?void 0:t.destinationURL))},r.FS=function(){r.YS&&(r.YS.Oy(void 0),r.YS=void 0),r.VS("usable")},r}Tt(n,t);var i=n.prototype;return i.rS=function(t,n,i){var e=i&&i.fairplay&&i.fairplay.XS;if(!e)throw new m("Expected FairPlay contentId to be defined but was "+e+".");var r=function(t,n,i){var e=Xo(t),r=2*e.length,o=2*n.length,u=new ArrayBuffer(4+r+4+o+4+i.byteLength),s=new DataView(u),f=new Zo;return Vo(s,f,r,!0),qo(s,f,e,!0),Vo(s,f,o,!0),qo(s,f,n,!0),Vo(s,f,i.byteLength,!0),function(t,n,i){Ko(t).set(Ko(i),n.ac),n.Ty(i.byteLength)}(s,f,i),new I(u)}(Go(n),e,this.ZS);return this.GS=this.HS.createSession(this.LS,r),this.GS.addEventListener("webkitkeymessage",this.MS,!1),this.GS.addEventListener("webkitkeyadded",this.FS,!1),this.GS.addEventListener("webkitkeyerror",this.Ts,!1),this.VS("status-pending"),this.zS.Oy(this.GS),this.zS=new ou,tt.resolve()},i.Un=function(t){return tt.resolve(!0)},i.er=function(t){return tn(function(){var n,i;return nn(this,function(e){switch(e.label){case 0:if(0===(n=Go(t)).byteLength)throw new m("Cannot call update with an empty response.");return this.YS=new ou,(i=this.GS)?[3,2]:[4,this.zS.Vy];case 1:i=e.sent(),e.label=2;case 2:return i.update(n),[4,this.YS.Vy];case 3:return e.sent(),[2]}})}).call(this)},i.Xs=function(){var t,n=this.GS;return n&&(n.removeEventListener("webkitkeymessage",this.MS,!1),n.removeEventListener("webkitkeyadded",this.FS,!1),n.removeEventListener("webkitkeyerror",this.Ts,!1),n.close()),this.zS.Yg(),null==(t=this.YS)||t.Yg(),this.IS.Oy(void 0),this.IS.Vy},i.hS=function(){return tt.resolve(void 0)},i.VS=function(t){this.xS.My(),this.xS.By(eu,t),this.So(new Oo(this.xS))},Et(n,[{key:"eS",get:function(){return this.GS?this.GS.sessionId:""}},{key:"$A",get:function(){return NaN}},{key:"JA",get:function(){return this.IS.Vy}},{key:"vy",get:function(){return this.xS}}]),n}(To);x(),pt(),x(),pt();var Hf=function(t){return t[t.CONFIGURATION_ERROR=1e3]="CONFIGURATION_ERROR",t[t.LICENSE_ERROR=2e3]="LICENSE_ERROR",t[t.LICENSE_INVALID_DOMAIN=2001]="LICENSE_INVALID_DOMAIN",t[t.LICENSE_INVALID_SOURCE=2002]="LICENSE_INVALID_SOURCE",t[t.LICENSE_EXPIRED=2003]="LICENSE_EXPIRED",t[t.LICENSE_INVALID_FEATURE=2004]="LICENSE_INVALID_FEATURE",t[t.SOURCE_INVALID=3e3]="SOURCE_INVALID",t[t.SOURCE_NOT_SUPPORTED=3001]="SOURCE_NOT_SUPPORTED",t[t.MANIFEST_LOAD_ERROR=4e3]="MANIFEST_LOAD_ERROR",t[t.MANIFEST_CORS_ERROR=4001]="MANIFEST_CORS_ERROR",t[t.MANIFEST_PARSE_ERROR=4002]="MANIFEST_PARSE_ERROR",t[t.MEDIA_NOT_SUPPORTED=5e3]="MEDIA_NOT_SUPPORTED",t[t.MEDIA_LOAD_ERROR=5001]="MEDIA_LOAD_ERROR",t[t.MEDIA_DECODE_ERROR=5002]="MEDIA_DECODE_ERROR",t[t.MEDIA_AVPLAYER_ERROR=5003]="MEDIA_AVPLAYER_ERROR",t[t.MEDIA_ABORTED=5004]="MEDIA_ABORTED",t[t.NETWORK_ERROR=6e3]="NETWORK_ERROR",t[t.NETWORK_TIMEOUT=6001]="NETWORK_TIMEOUT",t[t.CONTENT_PROTECTION_ERROR=7e3]="CONTENT_PROTECTION_ERROR",t[t.CONTENT_PROTECTION_NOT_SUPPORTED=7001]="CONTENT_PROTECTION_NOT_SUPPORTED",t[t.CONTENT_PROTECTION_CONFIGURATION_MISSING=7002]="CONTENT_PROTECTION_CONFIGURATION_MISSING",t[t.CONTENT_PROTECTION_CONFIGURATION_INVALID=7003]="CONTENT_PROTECTION_CONFIGURATION_INVALID",t[t.CONTENT_PROTECTION_INITIALIZATION_INVALID=7004]="CONTENT_PROTECTION_INITIALIZATION_INVALID",t[t.CONTENT_PROTECTION_CERTIFICATE_ERROR=7005]="CONTENT_PROTECTION_CERTIFICATE_ERROR",t[t.CONTENT_PROTECTION_CERTIFICATE_INVALID=7006]="CONTENT_PROTECTION_CERTIFICATE_INVALID",t[t.CONTENT_PROTECTION_LICENSE_ERROR=7007]="CONTENT_PROTECTION_LICENSE_ERROR",t[t.CONTENT_PROTECTION_LICENSE_INVALID=7008]="CONTENT_PROTECTION_LICENSE_INVALID",t[t.CONTENT_PROTECTION_KEY_EXPIRED=7009]="CONTENT_PROTECTION_KEY_EXPIRED",t[t.CONTENT_PROTECTION_KEY_MISSING=7010]="CONTENT_PROTECTION_KEY_MISSING",t[t.CONTENT_PROTECTION_OUTPUT_RESTRICTED=7011]="CONTENT_PROTECTION_OUTPUT_RESTRICTED",t[t.CONTENT_PROTECTION_INTERNAL_ERROR=7012]="CONTENT_PROTECTION_INTERNAL_ERROR",t[t.SUBTITLE_LOAD_ERROR=8e3]="SUBTITLE_LOAD_ERROR",t[t.SUBTITLE_CORS_ERROR=8001]="SUBTITLE_CORS_ERROR",t[t.SUBTITLE_PARSE_ERROR=8002]="SUBTITLE_PARSE_ERROR",t[t.VR_PLATFORM_UNSUPPORTED=9e3]="VR_PLATFORM_UNSUPPORTED",t[t.VR_PRESENTATION_ERROR=9001]="VR_PRESENTATION_ERROR",t[t.AD_ERROR=1e4]="AD_ERROR",t[t.AD_BLOCKER_DETECTED=10001]="AD_BLOCKER_DETECTED",t[t.FULLSCREEN_ERROR=11e3]="FULLSCREEN_ERROR",t[t.PICTURE_IN_PICTURE_ERROR=11001]="PICTURE_IN_PICTURE_ERROR",t[t.CACHE_SOURCE_ERROR=12e3]="CACHE_SOURCE_ERROR",t[t.CACHE_CONTENT_PROTECTION_ERROR=12001]="CACHE_CONTENT_PROTECTION_ERROR",t[t.THEO_LIVE_UNKNOWN_ERROR=13e3]="THEO_LIVE_UNKNOWN_ERROR",t[t.THEO_LIVE_CHANNEL_NOT_FOUND=13001]="THEO_LIVE_CHANNEL_NOT_FOUND",t[t.THEO_LIVE_END_OF_DEMO=13002]="THEO_LIVE_END_OF_DEMO",t[t.THEO_LIVE_ANALYTICS_ERROR=13003]="THEO_LIVE_ANALYTICS_ERROR",t}({}),Xf=function(t){return t[t.CONFIGURATION=1]="CONFIGURATION",t[t.LICENSE=2]="LICENSE",t[t.SOURCE=3]="SOURCE",t[t.MANIFEST=4]="MANIFEST",t[t.MEDIA=5]="MEDIA",t[t.NETWORK=6]="NETWORK",t[t.CONTENT_PROTECTION=7]="CONTENT_PROTECTION",t[t.SUBTITLE=8]="SUBTITLE",t[t.VR=9]="VR",t[t.AD=10]="AD",t[t.FULLSCREEN=11]="FULLSCREEN",t[t.CACHE=12]="CACHE",t[t.THEOLIVE=13]="THEOLIVE",t}({});!function(t){t.fromCode=function(n){var i=y.floor(n/1e3);if(i in t)return i;throw new m("Invalid error code: "+n)}}(Xf||(Xf={}));var jf=function(t){function n(n,i,e){var r;return(r=t.call(this,i,e)||this).code=void 0,r.code=n,r}return Tt(n,t),Et(n,[{key:"name",get:function(){return"THEOplayerError"}},{key:"category",get:function(){return Xf.fromCode(this.code)}}]),n}(ln),Yf=function(){function t(t,n,i){this.HS=void 0,this._S=void 0,this.Cd=void 0,this.LS=void 0,this.ZS=void 0,this.HS=t,this._S=n,this.Cd=i,this.ZS=void 0;var e=Af(i)||"video/mp4";this.LS=Of(e)}var n=t.prototype;return n.getInternalMediaKeys=function(){return this.HS},n.fS=function(t){return tn(function(){return nn(this,function(t){if(!this.ZS)throw new jf(Hf.CONTENT_PROTECTION_CERTIFICATE_ERROR,"No valid certificate was provided.");return[2,new qf(this.HS,this.LS,this.ZS)]})}).call(this)},n.gS=function(t){return this.ZS=Go(t),tt.resolve(!0)},n._n=function(t){return t.webkitSetMediaKeys(this.HS),tt.resolve()},n.mS=function(t){return t.webkitSetMediaKeys(null),tt.resolve()},n.hr=function(){return tt.resolve()},t}(),Kf=function(){function t(t,n){this.uS=void 0,this.US=void 0,this.uS=t,this.US=n}var n=t.prototype;return n.bS=function(){return this.US},n.wS=function(){var t=new c.WebKitMediaKeys(this.uS);return tt.resolve(new Yf(t,this.uS,this.US))},Et(t,[{key:"_S",get:function(){return this.uS}}]),t}(),Gf=function(){function t(){}return t.prototype.qp=function(t,n){try{return tt.resolve(function(t,n){if(t!==uo)throw new m(t+" is not supported with webkit-prefixed Encrypted Media Extensions.");if(!$f())throw new m("Unsupported key system "+t);for(var i,e=Rt(n);!(i=e()).done;){var r=i.value,o=Nf(Zf,Ro,t,r);if(o)return new Kf(t,o)}throw new m("Unsupported key system configuration for "+t)}(t,n))}catch(t){return tt.reject(t)}},t.ES=function(){return $f()},t}();function $f(){return void 0!==c.WebKitMediaKeys&&"function"==typeof c.WebKitMediaKeys.isTypeSupported}function Zf(t,n){return c.WebKitMediaKeys.isTypeSupported(t,n)}x(),pt();var Jf=function(){function t(t){this.KS=void 0,this.KS=t}return t.prototype.qp=function(t,n){return tn(function(){var i,e,r;return nn(this,function(o){switch(o.label){case 0:i=Rt(this.KS),o.label=1;case 1:if((e=i()).done)return[3,6];r=e.value,o.label=2;case 2:return o.trys.push([2,4,,5]),[4,r.qp(t,n)];case 3:return[2,o.sent()];case 4:return o.sent(),[3,5];case 5:return[3,1];case 6:throw new m("Unsupported key system configuration for "+t)}})}).call(this)},t}();x(),pt(),x(),pt(),x(),pt(),x(),pt(),x(),pt();var Qf=function(){function t(t){var n=this;this.jS=[],this.QS=void 0,this.qS=new vn,this.tT=void 0,this.JS=function(){return 0===n.jS.length?n.tT?th(n.tT,n.qS.Hg).then(n.iT,n.iT):n.iT():n.jS.shift()().then(n.JS)},this.iT=function(){if(0!==n.jS.length)return n.JS();n.QS=void 0},this.tT=t}var n=t.prototype;return n.Zo=function(t,n){var i=this;return new tt(function(e){var r=vn.jg([i.qS.Hg,n]),o=function(){r.Vg()};i.jS.push(function(){var n=th(t,r.Hg);return e(n),n.then(o,o)}),i.QS||(i.QS=i.JS())})},n.Yg=function(){return this.$S(!0)},n.kn=function(){return this.tT=void 0,this.$S(!1)},n.$S=function(t){var n=this.QS;return this.qS.Yg(),t&&(this.qS=new vn),tt.resolve(n)},t}();function th(t,n){return new tt(function(i){return i(t(n))})}var nh=new Qf,ih=function(t){function n(n){var i;return(i=t.call(this)||this).uS=void 0,i.PS=void 0,i.YS=void 0,i.IS=void 0,i.Qy=void 0,i.cT=void 0,i.uT=void 0,i.aT=void 0,i.hT=void 0,i.oT=void 0,i.uS=n,i.PS=void 0,i.YS=void 0,i.Qy=!1,i.cT=void 0,i.hT=void 0,i.IS=new ou,i.uT="",i.oT=new ou,i.aT=new ru,i}Tt(n,t);var i=n.prototype;return i.eT=function(){this.YS&&(this.VS("usable"),this.YS.Oy(void 0),this.YS=void 0)},i.sT=function(t){var n=new fu("Unknown CDM error",t.errorCode,t.systemCode);this.YS?(this.YS.Fy(n),this.YS=void 0):this.PS?(this.PS.Fy(n),this.PS=void 0):n.Wy===WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT?this.VS("output-restricted"):1===n.Uy?this.VS("expired"):this.VS("internal-error")},i.nT=function(t){0!==t.message.byteLength?(this.PS&&(this.PS.Oy(void 0),this.PS=void 0),this.So(new No(this,"license-request",uu(this.uS,$o(t.message).buffer),t.defaultURL||void 0))):this.PS&&(this.PS.Fy("Empty key message"),this.PS=void 0)},i.rT=function(t){this.hT||(this.hT=t,this.oT.Oy(t))},i.Xs=function(){return tn(function(){return nn(this,function(t){return this.throwIfClosed(),this.YS&&(this.YS.Fy(void 0),this.YS=void 0),this.Qy=!0,this.IS.Oy(void 0),[2]})}).call(this)},i.rS=function(t,n){return tn(function(){var t;return nn(this,function(i){switch(i.label){case 0:return this.throwIfClosed(),this.PS=new ou,this.cT=Go(n),(t=this.hT)?[3,2]:[4,this.oT.Vy];case 1:t=i.sent(),i.label=2;case 2:return t.webkitGenerateKeyRequest(this.uS,this.cT),[4,this.PS.Vy];case 3:return i.sent(),[2]}})}).call(this)},i.Un=function(t){return tn(function(){return nn(this,function(t){return this.throwIfClosed(),[2,!1]})}).call(this)},i.hS=function(){return tn(function(){return nn(this,function(t){return this.throwIfClosed(),[2]})}).call(this)},i.er=function(t){return tn(function(){var n;return nn(this,function(i){switch(i.label){case 0:return n=this,this.throwIfClosed(),this.YS=new ou,Vt.S_||Vt.w_?[2,nh.Zo(function(){return tn(function(){return nn(this,function(n){switch(n.label){case 0:return[4,this.doUpdate(t)];case 1:return n.sent(),[2]}})}).call(n)})]:[4,this.doUpdate(t)];case 1:return i.sent(),[2]}})}).call(this)},i.doUpdate=function(t){return tn(function(){var n;return nn(this,function(i){switch(i.label){case 0:return void 0===this.YS?[2]:(n=this.hT)?[3,2]:[4,this.oT.Vy];case 1:n=i.sent(),i.label=2;case 2:return n.webkitAddKey(this.uS,Go(t),this.cT,this.eS),[4,this.YS.Vy];case 3:return i.sent(),Vt.w_?[4,pn(500)]:[3,5];case 4:i.sent(),i.label=5;case 5:return[2]}})}).call(this)},i.throwIfClosed=function(){if(this.Qy)throw new m("Already closing or closed.")},i.VS=function(t){this.aT.My(),this.aT.By(eu,t),this.So(new Oo(this.aT))},i.dT=function(){return tn(function(){var t,n;return nn(this,function(i){switch(i.label){case 0:return(n=this.hT)?[3,2]:[4,this.oT.Vy];case 1:n=i.sent(),i.label=2;case 2:if(!(t=n).webkitCancelKeyRequest)return[3,7];i.label=3;case 3:return i.trys.push([3,4,5,7]),t.webkitCancelKeyRequest(this.uS,this.uT),[3,7];case 4:return i.sent(),[3,7];case 5:return[4,pn(500)];case 6:return i.sent(),[7];case 7:return[2]}})}).call(this)},Et(n,[{key:"vy",get:function(){return this.aT}},{key:"eS",get:function(){return this.uT},set:function(t){this.uT=t}},{key:"JA",get:function(){return this.IS.Vy}},{key:"$A",get:function(){return NaN}}]),n}(To),eh=function(){function t(t,n){var i=this;this._S=void 0,this.Cd=void 0,this.hT=void 0,this.vT=void 0,this._T=void 0,this.FS=void 0,this.lT=void 0,this.fT=void 0,this._S=t,this.Cd=n,this.hT=void 0,this.vT=jr(),this._T=[],this.FS=function(t){var n=i.gT(t.sessionId);n&&n.eT()},this.lT=function(t){var n=i.gT(t.sessionId);n&&n.sT(t)},this.fT=function(t){var n=i.gT(t.sessionId);n&&n.nT(t)}}var n=t.prototype;return n._n=function(t){return this.hT=t,this.hT.addEventListener("webkitkeyadded",this.FS),this.hT.addEventListener("webkitkeyerror",this.lT),this.hT.addEventListener("webkitkeymessage",this.fT),this.vT.forEach(function(n,i){return n.rT(t)}),this._T.forEach(function(n){return n.rT(t)}),tt.resolve()},n.mS=function(t){return t.removeEventListener("webkitkeyadded",this.FS),t.removeEventListener("webkitkeyerror",this.lT),t.removeEventListener("webkitkeymessage",this.fT),this.hT=void 0,tt.resolve()},n.hr=function(){return tn(function(){var t,n;return nn(this,function(i){switch(i.label){case 0:t=this.vT.entries(),n=t.next(),i.label=1;case 1:return n.done?[3,3]:[4,n.value[1].dT()];case 2:return i.sent(),n=t.next(),[3,1];case 3:return this.vT.clear(),[2]}})}).call(this)},n.fS=function(t,n,i){return tn(function(){var t;return nn(this,function(n){return t=new ih(this._S),this.hT&&t.rT(this.hT),this._T.push(t),[2,t]})}).call(this)},n.gS=function(t){return tt.resolve(!1)},n.gT=function(t){if(t){var n=this.vT.get(t);return n||((n=this._T.shift())?(n.eS=t,this.vT.set(t,n),n):void 0)}},t}(),rh=function(){function t(t,n){this._S=void 0,this.mT=void 0,this._S=t,this.mT=n}var n=t.prototype;return n.wS=function(){return tt.resolve(new eh(this._S,this.mT))},n.bS=function(){return this.mT},t}(),oh=function(){function t(){}return t.prototype.qp=function(t,n){try{return tt.resolve(function(t,n){if(!oh.ES())throw new m("Unsupported key system "+t);for(var i,e=Rt(n);!(i=e()).done;){var r=i.value,o=Nf(uh,ko,t,r);if(o)return new rh(t,o)}throw new m("Unsupported key system configuration for "+t)}(t,n))}catch(t){return tt.reject(t)}},t.ES=function(){return"undefined"!=typeof HTMLMediaElement&&void 0!==HTMLMediaElement.prototype.webkitGenerateKeyRequest&&void 0!==HTMLMediaElement.prototype.webkitAddKey&&void 0!==HTMLMediaElement.prototype.webkitCancelKeyRequest},t}();function uh(t,n){var i=_n();return Boolean(i&&i.canPlayType&&""!==i.canPlayType(n,t))}x(),pt();var sh,fh=function(){function t(){}return t.prototype.qp=function(t,n){return t===to||t===Zr?tt.resolve(void 0):tt.reject(new g("DRM configuration not supported"))},t}();function hh(){return sh||(sh=function(){var t=[];Gf.ES()&&t.push(new Gf);Mf.ES()&&t.push(new Mf);zf.ES()&&t.push(new zf);oh.ES()&&t.push(new oh);Vt.k_&&t.push(new fh);return new Jf(t)}()),sh}x(),pt(),x(),pt();var ch=function(){function t(){this.pT=jr()}var n=t.prototype;return n.My=function(t){this.pT.delete(t)},n.wT=function(){this.pT.clear()},n.Dy=function(t){return this.pT.get(t)},n.By=function(t,n){this.pT.set(t,n)},t}(),ah=function(){function t(){}return t.yT=function(){return t.xg||(t.xg=vh.ES()?new vh:new ch),t.xg},t.My=function(n){t.yT().My(n)},t.wT=function(){t.yT().wT()},t.Dy=function(n){return t.yT().Dy(n)},t.By=function(n,i){t.yT().By(n,i)},t}();ah.xg=void 0;var vh=function(t){function n(){return t.apply(this,arguments)||this}Tt(n,t);var i=n.prototype;return i.My=function(t){self.sessionStorage.removeItem(t)},i.wT=function(){self.sessionStorage.clear()},i.Dy=function(t){var n;return null!=(n=self.sessionStorage.getItem(t))?n:void 0},i.By=function(t,n){self.sessionStorage.setItem(t,n)},n.ES=function(){var t="foobar";try{return self.sessionStorage.setItem(t,t),self.sessionStorage.removeItem(t),!0}catch(t){return!1}},n}(ah);x(),pt(),x(),pt();var dh=function(){var t=self.Blob;if(t)try{new t;return function(t){return function(n,i){return new t(n,i)}}(t)}catch(t){}var n=self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder;if(n)return function(t){return function(n,i){var e=new t;if(n)for(var r,o=Rt(n);!(r=o()).done;){var u=r.value;e.append(u)}return e.getBlob(i&&i.type||"")}}(n)}();function lh(t,n,i){var e=dh([n],{type:"application/octet-stream"}),r=URL.createObjectURL(e),o=function(t,n){var i=t,e=i.indexOf("?");if(e>=0&&(i=i.substr(0,e)),i=i.substr(i.lastIndexOf("/")+1),n){var r=i.indexOf(".");r<0&&(r=i.length),i=i.substr(0,r)+n+i.substr(r)}return i}(t,i),u=a.createElement("a");u.href=r,u.download=o,a.body.appendChild(u),u.click(),a.body.removeChild(u),URL.revokeObjectURL(r)}x(),pt(),x(),pt(),x(),pt(),x(),pt(),x(),pt(),M(),x(),pt();var wh=function(t,n,i){return i=null!=t?k(P(t)):{},function(t,n,i,e){if(n&&"object"==typeof n||"function"==typeof n)for(var r,o=N(n),u=0,s=o.length;u<s;u++)r=o[u],A.call(t,r)||r===i||R(t,r,{get:function(t){return n[t]}.bind(null,r),enumerable:!(e=O(n,r))||e.enumerable});return t}(!n&&t&&t.__esModule?i:R(i,"default",{value:t,enumerable:!0}),t)}(_t());x(),pt();var bh=t,gh=Gt(bh.ReadableStream)&&Gt(bh.WritableStream)&&Gt(bh.TransformStream)&&Kt(bh.ReadableStream.prototype.pipeThrough)&&!oi.Cm,mh=gh?bh.ReadableStream:wh.ReadableStream,ph=(gh?bh.WritableStream:wh.WritableStream,gh?bh.TransformStream:wh.TransformStream);gh&&bh.ByteLengthQueuingStrategy?bh.ByteLengthQueuingStrategy:wh.ByteLengthQueuingStrategy,gh&&bh.CountQueuingStrategy?bh.CountQueuingStrategy:wh.CountQueuingStrategy;function yh(t){return function(t){return new mh({start:function(n){for(var i,e=Rt(t);!(i=e()).done;){var r=i.value;n.enqueue(r)}n.close()}})}([t])}function _h(t){return yh(function(t){return new I(t)}(t))}function Sh(t,n){return function(t,n){var i=n,e=t.getReader(),r=new ou,o=function(){u();var t=new wn;e.cancel(t).catch(Zt),r.Fy(t)},u=function(){i&&(i.Gg(o),i=void 0)};i&&(i.Mg?o():i.Ug(o));var s=[],f=function(t){return t.done?(u(),tt.resolve(s)):(s.push(t.value),tt.resolve(e.read()).then(f))};return tt.resolve(e.read()).then(f).then(function(t){u(),r.Oy(t)},function(t){u(),r.Fy(t)}),r.Vy}(t,n).then(function(t){return nu(t).buffer})}function Th(t,n){var i=n,e=new ph,r=e.readable,o=e.writable,u=o.getWriter(),s=function(){i&&i.Yg()};return u.closed.then(s,s),t.then(function(t){return i=void 0,u.releaseLock(),t.pipeTo(o).catch(Zt)},function(t){return i=void 0,u.releaseLock(),o.abort(t).catch(Zt)}),r}function Ih(t){return Xo(new I(t))}function Eh(t){return jo(t).buffer}x(),pt();var kh="text/plain;charset=UTF-8",Rh=function(){function t(){}var n=t.prototype;return n.xT=function(t){return this.CT(t).then(JSON.parse)},n.PT=function(t,n){switch(t){case Ar.bT:return this.NT(n);case Ar.AT:return this.xT(n);case Ar.ST:return this.DT();case Ar.TT:return this.CT(n);default:throw new m}},t}();function Oh(t,n,i){if(B(t,Rh))return t;if(B(t,mh))return function(t,n){return new Ph({Gp:0,DT:t,BT:Nh(n)})}(t,i);var e=Nh(i),r=tt.resolve(t).then(function(t){return function(t,n){if(t){if("string"==typeof t)return{Gp:Ar.TT,LT:t,BT:n||kh};if(B(t,ArrayBuffer)||Qo(t))return{Gp:Ar.bT,LT:Lh(t),BT:n};if(function(t){return Yt(t)&&t.constructor&&t.constructor===p}(t)||jt(t))return{Gp:Ar.AT,LT:t,BT:n};throw new m("Unsupported BodyInit type")}return{Gp:Ar.TT,LT:null,BT:n}}(t,e)});return new Ph({Gp:1,Vy:r,MT:n})}function Nh(t){return(t.get("content-type")||"").toLowerCase()}var Ph=function(t){function n(n){var i;return(i=t.call(this)||this).FT=!1,i.WT=void 0,i.GT=new ou,i.GT.Vy.catch(Zt),i.HT(n),i}Tt(n,t);var i=n.prototype;return i.UT=function(){return this.GT.Vy},i.CT=function(t){return this.XT(Ah,t)},i.xT=function(t){return this.XT(Ch,t)},i.NT=function(t){return this.XT(Bh,t)},i.DT=function(){return this.ZT(function(t){return 0===t.Gp?t.DT:Th(t.Vy.then(Mh).then(_h),t.MT)}(this.WT))},i.XT=function(t,n){if(this.FT)return tt.reject(new m("Already used"));this.FT=!0;var i=t(this.WT,n);return this.GT.Kg(i.then(Zt)),i},i.ZT=function(t){if(this.FT)throw new m("Already used");if(t.locked)throw new m("Body stream is locked");this.FT=!0;var n=new ph,i=tt.resolve(t.pipeTo(n.writable));return this.GT.Kg(i),n.readable},i.HT=function(t){this.WT=t,1===t.Gp&&t.Vy.catch(Zt)},i.zT=function(){if(this.FT)throw new m("Already used");var t=function(t){if(0===t.Gp){var n=t.DT.tee(),i=n[0],e=n[1];return[{Gp:t.Gp,DT:i,BT:t.BT},{Gp:t.Gp,DT:e,BT:t.BT}]}var r=t.MT.qg(),o=r[0],u=r[1];return[{Gp:t.Gp,Vy:t.Vy,MT:o},{Gp:t.Gp,Vy:t.Vy,MT:u}]}(this.WT),i=t[0],e=t[1];return this.HT(i),new n(e)},Et(n,[{key:"OT",get:function(){return this.FT}},{key:"VT",get:function(){return 0===this.WT.Gp}}]),n}(Rh);function Ah(t,n){return 0===t.Gp?Sh(t.DT,n).then(Ih):(n&&t.MT.Kg(n),mn(t.Vy.then(Dh),t.MT))}function Dh(t){switch(t.Gp){case Ar.TT:return tt.resolve(t.LT||"");case Ar.bT:return tt.resolve(t.LT).then(Ih);case Ar.AT:return tt.resolve(t.LT).then(JSON.stringify)}}function Ch(t,n){return 0===t.Gp?Ah(t,n).then(JSON.parse):(n&&t.MT.Kg(n),mn(t.Vy.then(xh),t.MT))}function xh(t){return t.Gp===Ar.AT?tt.resolve(t.LT):Dh(t).then(JSON.parse)}function Bh(t,n){return 0===t.Gp?Sh(t.DT,n):(n&&t.MT.Kg(n),mn(t.Vy.then(Mh),t.MT))}function Mh(t){switch(t.Gp){case Ar.bT:return tt.resolve(t.LT);case Ar.TT:case Ar.AT:return Dh(t).then(Eh)}}function Lh(t){return B(t,ArrayBuffer)?t:$o(Ko(t)).buffer}var Uh=function(t){function n(n){var i;return(i=t.call(this)||this).YT=void 0,i.YT=n,i}Tt(n,t);var i=n.prototype;return i.UT=function(){return this.YT.UT()},i.CT=function(t){return this.YT.CT(t)},i.xT=function(t){return this.YT.xT(t)},i.NT=function(t){return this.YT.NT(t)},i.DT=function(t){return this.YT.DT(t)},i.zT=function(){return this.YT.zT()},Et(n,[{key:"OT",get:function(){return this.YT.OT}},{key:"VT",get:function(){return this.YT.VT}}]),n}(Rh);var Fh=function(t){function n(n,i){var e,r,o,u,s,f;i?(r=i.JT,o=i.jT,u=i.KT,s=i.$T,f=i.ek):(r=[],o=Ar.TT,u=200,s="OK",f=!1);var h=n.QT,c=new Dr(n.JT||r),a=n.jT||o,v=n.nk||(i&&i.QT===h?i.nk:h.Yu),d=i?i.YT:null,l=Oh(void 0!==n.qT?n.qT:d,n.MT||new vn,c);return(e=t.call(this,l)||this).JT=void 0,e.QT=void 0,e.nk=void 0,e.jT=void 0,e.KT=void 0,e.$T=void 0,e.ek=void 0,e.JT=c,e.QT=h,e.nk=v,e.jT=a,e.KT=void 0!==n.KT?n.KT:u,e.$T=void 0!==n.$T?String(n.$T):s,e.ek=n.ek||f,e}Tt(n,t);var i=n.prototype;return i.qT=function(t){return this.PT(this.jT,t)},i.Ry=function(){return new n({qT:this.zT(),QT:this.QT},this)},n}(Uh),zh=function(){function t(){}var n=t.prototype;return n.QT=function(t){var n=function(t){return new Fh({qT:null,JT:{},QT:t,nk:t.Yu,jT:t.jT,KT:0,$T:Eo.Fw})}(new Lr(t));return tt.resolve(n)},n.Wk=function(t){},n.kn=function(){},t}();var Wh=function(){function t(t,n){void 0===n&&(n=!0),this.Zk=void 0,this.zk=void 0,this.Zk=t,this.zk=n}var n=t.prototype;return n.QT=function(t){var n=this.Xk(t);return this.Zk.QT(n)},n.Wk=function(t){return this.Zk.Wk(this.Hk(t))},n.Xk=function(n){var i=new Lr(n);if(!this.zk){var e=t.Yk(i.Yu);i=new Lr({Yu:e},i)}return i},n.Hk=function(n){var i=n.Yu;return this.zk||(i=t.Yk(i)),{Yu:i,LT:n.LT}},n.kn=function(){this.Zk.kn()},t.Yk=function(t){return Xt.Rp&&vo(t,"http://")?t.replace(":","s:"):t},Et(t,null,[{key:"Uk",get:function(){return t.Gk||(t.Gk=new t(new zh)),t.Gk}}]),t}();Wh.Gk=void 0,x(),pt(),x(),pt(),x(),pt(),x(),pt();var Vh=function(t){function n(n,i,e){var r;return(r=t.call(this,n.QT,null!=e?e:function(t){return"Error while loading "+t.QT.Yu+", status code "+t.KT}(n),i)||this).$k=void 0,r.$k=n,r}return Tt(n,t),Et(n,[{key:"name",get:function(){return Ur.qk}},{key:"Jk",get:function(){return this.$k}}]),n}(Fr);x(),pt();var qh=function(t){function n(n,i){return t.call(this,n,function(t){return"Request for "+t.Yu+" timed out after "+t.Pk+" seconds."}(n),i)||this}return Tt(n,t),Et(n,[{key:"name",get:function(){return Ur.jk}}]),n}(Fr);x(),pt();var Hh=self.fetch,Xh=self.Request,jh=self.Response,Yh=self.Headers,Kh=self.ReadableStream,Gh=self.AbortSignal,$h=self.AbortController,Zh=Jt(function(){try{return Kt(Hh)&&Gt(Xh)&&Gt(jh)&&Gt(Yh)&&"forEach"in Yh.prototype&&kr()}catch(t){return!1}}),Jh=["http:","https:"];var Qh=Jt(function(){try{return Zh()&&Gt(Gh)&&Gt($h)&&"signal"in Xh.prototype}catch(t){return!1}}),tc=Jt(function(){try{return Zh()&&Gt(Kh)&&"body"in jh.prototype&&!Vt.e_}catch(t){return!1}});function nc(t,n){var i,e=t.JT.has("content-length")?Number(t.JT.get("content-length")):void 0;return i=t.VT?function(t,n,i){return t.pipeThrough(new ph(new ic(n,i)))}(t.DT(),n,e):function(t,n,i){return tn(function(){var e,r;return nn(this,function(o){switch(o.label){case 0:return[4,tt.resolve()];case 1:return o.sent(),n(0,i),[4,t];case 2:return e=o.sent(),r=e.byteLength,n(r,null!=i?i:r),[2,e]}})})()}(t.NT(),n,e),new Fh({qT:i,QT:t.QT},t)}x(),pt(),M(),x(),pt();var ic=function(){function t(t,n){this.iE=void 0,this.eE=void 0,this.tE=void 0,this.iE=t,this.eE=n,this.tE=0}var n=t.prototype;return n.transform=function(t,n){this.tE+=t.byteLength,this.iE(this.tE,this.eE),n.enqueue(t)},n.flush=function(t){var n;this.iE(this.tE,null!=(n=this.eE)?n:this.tE)},t}();var ec=function(){function t(t){this.Jk=void 0,this.Qk=void 0,this.qS=new vn,this.$k=void 0,this.nE=0,this.rE=!1,this.Qk=t,this.qS.Kg(t.Hg),this.Jk=this.sE()}var n=t.prototype;return n.sE=function(){return tn(function(){var t,n,i,e,r,o,u,s,f,h;return nn(this,function(c){switch(c.label){case 0:t=this,(n=this.Qk).Pk&&(this.nE=d(function(){t.rE=!0,t.qS.Yg()},n.Pk),this.qS.Hg.Xg(function(){l(t.nE)}));try{i=Hh(n.Yu,{method:n.Ck,headers:n.JT.kT(),body:n.LT,credentials:n.Lk?"include":"same-origin",signal:uc(this.qS.Hg),mode:n.Ok,keepalive:n.Vk})}catch(t){throw new zr(n,t)}c.label=1;case 1:return c.trys.push([1,3,,4]),[4,i];case 2:return e=c.sent(),[3,4];case 3:throw r=c.sent(),bn(o=this.hE(r))&&this.qS.Yg(),o;case 4:if(u=e.url||n.Yu,s=0===e.status&&"file:"===function(t){return Xt.Dh(t).protocol}(u)?200:e.status,f=new rc(this,e,this.qS),!function(t){return t.KT>=200&&t.KT<=299||304===t.KT}(h=new Fh({qT:f,QT:n,jT:n.jT,JT:sc(e.headers),KT:s,$T:e.statusText,nk:u})))throw new Vh(h);return n.Mk&&(h=nc(h,n.Mk)),[2,h]}})}).call(this)},n.hE=function(t){return function(t){return B(t,Fr)}(t)?t:bn(t)?this.rE?new qh(this.Qk):new wn(t.message,t):this.$k?new Vh(this.$k,t):new zr(this.Qk,t)},t}(),rc=function(t){function n(n,i,e){var r;return(r=t.call(this)||this).aE=void 0,r.oE=void 0,r.qS=void 0,r.GT=new ou,r.aE=n,r.oE=i,r.qS=e,r.GT.Vy.catch(Zt),r}Tt(n,t);var i=n.prototype;return i.UT=function(){return this.GT.Vy},i.CT=function(t){return this.XT(this.oE.text(),t)},i.NT=function(t){return this.XT(this.oE.arrayBuffer(),t)},i.DT=function(){var t=this.oE.body;return t?this.ZT(t):Th(this.NT().then(_h),this.qS)},i.zT=function(){var t=this.oE.clone(),i=this.qS.qg(),e=i[0],r=i[1];return this.qS=e,new n(this.aE,t,r)},i.XT=function(t,n){var i=this;n&&this.qS.Kg(n);var e=gn(tt.resolve(t),this.qS.Hg).catch(function(t){throw i.aE.hE(t)});return e=mn(e,this.qS),this.GT.Kg(e.then(Zt)),e},i.ZT=function(t){var n=this;return new mh(new fc(t,function(t){return n.aE.hE(t)},this.qS,this.GT),{highWaterMark:0})},Et(n,[{key:"OT",get:function(){return this.oE.bodyUsed}},{key:"VT",get:function(){return Ht(this.oE.body)}}]),n}(Rh),oc="abort";function uc(t){if(Qh()){var n=new $h;if(t.Mg)n.abort();else if(!t.Og){var i=function(){e(),n.abort()},e=function(){n.signal.removeEventListener(oc,i),t.Gg(i),t.Zg(e)};n.signal.addEventListener(oc,i),t.Ug(i),t.Xg(e)}return n.signal}}function sc(t){if(function(t){return Yt(t)&&"function"==typeof t.forEach}(t)){var n=new Dr;return t.forEach(function(t,i){Array.isArray(t)&&2===t.length?n.append(t[0],t[1]):n.append(i,t)}),n}return new Dr(t)}var fc=function(){function t(t,n,i,e){this.uE=void 0,this.cE=void 0,this.qS=void 0,this.GT=void 0,this.Gd=void 0,this.uE=t,this.cE=n,this.qS=i,this.GT=e}var n=t.prototype;return n.start=function(t){this.Gd=this.uE.getReader()},n.pull=function(t){return tn(function(){var n,i,e;return nn(this,function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,gn(this.Gd.read(),this.qS.Hg)];case 1:return n=r.sent(),[3,3];case 2:return i=r.sent(),e=this.cE(i),this.GT.Fy(e),this.qS.Yg(),this.Gd.cancel(e).catch(Zt),t.error(e),[2];case 3:return n.done?(this.GT.Oy(),this.qS.Yg(),t.close()):t.enqueue(n.value),[2]}})}).call(this)},n.cancel=function(t){return this.qS.Yg(),this.GT.Fy(t),this.Gd.cancel(t)},t}();x(),pt();var hc=function(){function t(t){var n=this;this.lE=void 0,this.Qk=void 0,this.qS=new vn,this.$k=void 0,this.dE=new ou,this.AE=void 0,this.yE=!1,this.wE=function(){var t;n.fE(),null==(t=n.lE)||t.abort()},this.Qk=t,this.qS.Kg(t.Hg),this.lE=new E,this.sE()}var n=t.prototype;return n.sE=function(){var t=this,n=this.lE,i=this.Qk;if(i.Hg.Mg)return this.fE();n.onreadystatechange=function(){return t.vE()},n.onprogress=function(n){return t.iE(n)},n.onload=function(){return t._E()},n.onloadend=function(){return t.gE()},n.onerror=function(){return t.mE()},n.ontimeout=function(){return t.pE()},n.onabort=function(){return t.fE()},n.open(i.Ck,i.Yu,!0),n.withCredentials=Boolean(i.Lk),"responseType"in n&&i.jT&&(i.jT===Ar.TT?n.responseType="text":n.responseType="arraybuffer"),i.JT.forEach(function(t,i){n.setRequestHeader(i,t)}),i.Pk&&(n.timeout=i.Pk),this.qS.Hg.Ug(this.wE);var e=i.LT;e?n.send(e):n.send()},n.vE=function(){var t=this.lE;void 0!==t&&t.readyState>=2&&!this.yE&&(this.yE=!0,this.bE())},n.bE=function(){var t,n,i=this.lE,e=function(t){var n=new Dr,i=t.replace(/\r?\n[\t ]+/g," ");return i.split(/\r?\n/).forEach(function(t){var i=t.split(":"),e=i.shift().trim();if(e){var r=i.join(":").trim();n.append(e,r)}}),n}(i.getAllResponseHeaders()||""),r=this.Qk;this.AE=new ou,this.$k=new Fh({QT:r,jT:r.jT,qT:this.AE.Vy,KT:i.status,$T:i.statusText,JT:e,nk:null!=(n=i.responseURL)?n:e.get("X-Request-URL")}),null==(t=this.dE)||t.Oy(this.$k)},n._E=function(){var t,n=this.lE;if(void 0!==n){var i=n.response;if(!Ht(i)){var e=this.Qk.jT;i=e===Ar.TT?n.responseText:e===Ar.bT?new ArrayBuffer(0):{}}null==(t=this.AE)||t.Oy(i)}},n.gE=function(){this.kn()},n.iE=function(t){void 0!==this.lE&&(null==this.Qk.Mk||this.Qk.Mk.call(this.Qk,t.loaded,t.lengthComputable?t.total:void 0))},n.mE=function(){var t=new g("Network request failed");this.$k?this.Ts(new Vh(this.$k,t)):this.Ts(new zr(this.Qk,t))},n.pE=function(){this.Ts(new qh(this.Qk))},n.fE=function(){this.Ts(new wn),this.kn()},n.Ts=function(t){var n,i;null==(n=null!=(i=this.AE)?i:this.dE)||n.Fy(t)},n.kn=function(){this.lE=void 0,this.$k=void 0,this.dE=void 0,this.AE=void 0,this.qS.Vg()},Et(t,[{key:"Jk",get:function(){return this.dE.Vy}}]),t}();x(),pt();var cc=function(){function t(){}var n=t.prototype;return n.QT=function(t){return function(t){if(!Zh()||!function(t){try{return Jh.indexOf(new self.URL(t,self.location.href).protocol)>=0}catch(t){return!1}}(t.Yu))return!1;if(!tc()&&t.Mk)return!1;if(!t.Fk&&t.Ck!==Br.POST){if(Vt.S_&&Vt.d_<=68)return!1;if(Vt.w_)return!1}return!0}(t)?new ec(t).Jk:new hc(t).Jk},n.Wk=function(t){var n=c.navigator;if(n&&n.sendBeacon)n.sendBeacon(t.Yu,dh([t.LT],{type:t.BT}));else{var i=t.BT?{"Content-type":t.BT}:void 0;this.QT(new Lr({Ck:Br.POST,Yu:t.Yu,LT:t.LT,JT:i,Ok:Mr.Rk})).then(function(t){!function(t){t.then(Zt,Zt)}(t.NT())},Zt)}},n.kn=function(){},t}();x(),pt(),x(),pt();var ac=function(t){return t[t.SE=1]="SE",t[t.TE=2]="TE",t[t.TT=3]="TT",t[t.kE=4]="kE",t[t.EE=9]="EE",t}({});var vc=function(){function t(){}return t.prototype.xE=function(t){var n,i=new DOMParser;try{n=i.parseFromString(t,"text/xml")}catch(t){throw new Vr(t)}if(!n||n.getElementsByTagName("parsererror").length>0)throw new Vr;return new pc(n)},t}(),dc=function(){function t(t){this.PE=void 0,this.PE=t}var n=t.prototype;return n.LE=function(t){return this.PE.isEqualNode(t.PE)},n.OE=function(n){return new t(this.PE.cloneNode(n))},Et(t,[{key:"RE",get:function(){return ac.TE}},{key:"CE",get:function(){var t;return null!=(t=this.PE.localName)?t:Sc(this.PE.nodeName)}},{key:"l",get:function(){return this.PE.nodeName}},{key:"NE",get:function(){var t;return null!=(t=this.PE.namespaceURI)?t:void 0}},{key:"DE",get:function(){var t;return null!=(t=this.PE.prefix)?t:void 0}},{key:"BE",get:function(){return this.PE.nodeValue}}]),t}(),lc=function(){function t(t){this.WE=void 0,this.VE=void 0,this.WE=t}var n=t.prototype;return n.UE=function(t){return this.FE.filter(function(n){return yc(n)&&n.GE===t})},n.XE=function(t,n){return this.FE.filter(function(i){return yc(i)&&i.CE===n&&i.NE===t})},n.HE=function(t){this.WE.appendChild(t.ZE),this.VE&&this.VE.push(t)},n.LE=function(t){return this.WE.isEqualNode(t.ZE)},Et(t,[{key:"FE",get:function(){return void 0===this.VE&&(this.VE=function(t){for(var n=[],i=0;i<t.length;i++){var e=_c(t.item(i));e&&n.push(e)}return n}(this.WE.childNodes)),this.VE}},{key:"m",get:function(){return this.FE.filter(yc)}},{key:"ZE",get:function(){return this.WE}}]),t}(),wc=function(t){function n(n){return t.call(this,n)||this}Tt(n,t);var i=n.prototype;return i.KE=function(t){if(this.WE.hasAttribute(t))return this.WE.getAttribute(t)},i.qE=function(t,n){if(this.WE.hasAttributeNS(t,n))return this.WE.getAttributeNS(t,n)},i.jE=function(t){this.WE.removeAttribute(t)},i.QE=function(t,n){this.WE.removeAttributeNS(t,n)},i.JE=function(t,n){this.WE.setAttribute(t,n)},i.$E=function(t,n,i){this.WE.setAttributeNS(t,n,i)},i.OE=function(t){return new n(this.WE.cloneNode(t))},Et(n,[{key:"RE",get:function(){return ac.SE}},{key:"CE",get:function(){var t;return null!=(t=this.WE.localName)?t:Sc(this.WE.nodeName)}},{key:"NE",get:function(){var t;return null!=(t=this.WE.namespaceURI)?t:void 0}},{key:"DE",get:function(){var t;return null!=(t=this.WE.prefix)?t:void 0}},{key:"GE",get:function(){return this.WE.nodeName}},{key:"zE",get:function(){return function(t){for(var n=[],i=0;i<t.length;i++)n.push(new dc(t.item(i)));return n}(this.WE.attributes)}},{key:"YE",get:function(){return this.WE.textContent}}]),n}(lc),bc=function(){function t(t){this.WE=void 0,this.WE=t}return t.prototype.LE=function(t){return this.qT===t.qT},Et(t,[{key:"qT",get:function(){return this.WE.nodeValue}},{key:"ZE",get:function(){return this.WE}}]),t}(),gc=function(t){function n(n){return t.call(this,n)||this}return Tt(n,t),n.prototype.OE=function(t){return new n(this.WE.cloneNode(t))},Et(n,[{key:"RE",get:function(){return ac.TT}}]),n}(bc),mc=function(t){function n(n){return t.call(this,n)||this}return Tt(n,t),n.prototype.OE=function(t){return new n(this.WE.cloneNode(t))},Et(n,[{key:"RE",get:function(){return ac.kE}}]),n}(bc),pc=function(t){function n(n){return t.call(this,n)||this}return Tt(n,t),n.prototype.OE=function(t){return new n(this.WE.cloneNode(t))},Et(n,[{key:"RE",get:function(){return ac.EE}},{key:"tR",get:function(){return new wc(this.WE.documentElement)}}]),n}(lc);function yc(t){return function(t){return 1===t.RE}(t)}function _c(t){switch(t.nodeType){case ac.SE:return new wc(t);case ac.TT:return new gc(t);case ac.kE:return new mc(t)}}function Sc(t){var n=t.indexOf(":");return n<0?t:t.substr(n+1)}var Tc=function(t){function n(){var n;return(n=t.apply(this,arguments)||this).iR=void 0,n.sR=tc(),n.rR=Vt.hg||Vt.e_,n.oR=(Vt.hg||Vt.S_&&Vt.d_<=68||Vt.e_)&&!(Vt.w_&&Vt.b_<3),n._R=void 0,n.gR=new vc,n}return Tt(n,t),n.prototype.xE=function(t){return this.gR.xE(t)},Et(n,[{key:"lp",get:function(){return this.iR||(this.iR=new _o(hh())),this.iR}},{key:"eR",get:function(){return this.sR}},{key:"nR",get:function(){return this.rR}},{key:"hR",get:function(){return this.oR}},{key:"aR",get:function(){return!1}},{key:"uR",get:function(){return ah.yT()}},{key:"cR",get:function(){return{dR:lh}}},{key:"lR",get:function(){return v.connection&&v.connection.effectiveType||Nr}},{key:"fR",get:function(){return v.connection&&v.connection.type||Pr}},{key:"vR",get:function(){return this._R||(this._R=new Wh(new cc)),this._R}}]),n}(Ir);$t(new Tc),x(),pt(),x(),pt();x(),pt(),x(),pt(),x(),pt();var Ic=function(t){return t.Ak="audio",t.Sk="video",t.CV="metadata",t}({});x(),pt(),x(),pt();var Ec=function(t){return t.ck="#EXTINF",t.KLt="#EXT-X-MAP",t.p="#EXTM3U",t.en="#EXT-X-VERSION",t.ui="#EXT-X-TARGETDURATION",t.vSt="#EXT-X-START",t.li="#EXT-X-INDEPENDENT-SEGMENTS",t.ST="#EXT-X-STREAM-INF",t.vr="#EXT-X-MEDIA-SEQUENCE",t.sf="#EXT-X-ENDLIST",t.ff="#EXT-X-MEDIA",t.af="#EXT-X-DISCONTINUITY",t.nv="#EXT-X-DISCONTINUITY-SEQUENCE",t.ev="#EXT-X-PLAYLIST-TYPE",t.sv="#EXT-X-KEY",t}({}),kc=function(){function t(t,n){this.Gp="#EXTINF",this.cv=void 0,this.av=void 0,this.cv=t,this.av=n}return t.prototype.pC=function(){return this.Gp+":"+this.cv+",\n"+this.av},t}(),Rc=function(){function t(t){this.Gp="#EXT-X-MAP",this.av=void 0,this.av=t}return t.prototype.pC=function(){return this.Gp+':URI="'+this.av+'"'},t}(),Oc=function(){function t(){this.Gp="#EXTM3U"}return t.prototype.pC=function(){return this.Gp},t}(),Nc=function(){function t(t){this.Gp="#EXT-X-VERSION",this.cN=void 0,this.cN=t}return t.prototype.pC=function(){return this.Gp+":"+this.cN},t}(),Pc=function(){function t(t){this.Gp="#EXT-X-TARGETDURATION",this.VLt=void 0,this.VLt=t}return t.prototype.pC=function(){return this.Gp+":"+this.VLt},t}(),Ac=function(){function t(t){this.Gp="#EXT-X-START",this.WMt=void 0,this.WMt=t}return t.prototype.pC=function(){return this.Gp+":TIME-OFFSET="+this.WMt},t}(),Dc=function(){function t(t,n,i){this.uri=void 0,this.keyFormat=void 0,this.keyFormatVersions=void 0,this.Gp=void 0,this.uri=t,this.keyFormat=n,this.keyFormatVersions=i,this.Gp="#EXT-X-KEY"}return t.prototype.pC=function(){return this.Gp+':METHOD=SAMPLE-AES,URI="'+this.uri+'",KEYFORMAT="'+this.keyFormat+'",KEYFORMATVERSIONS="'+this.keyFormatVersions+'"'},t}(),Cc=function(){function t(t){this.Gp="#EXT-X-STREAM-INF",this.$U=1,this.av=void 0,this.av=t}return t.prototype.pC=function(){return this.Gp+":BANDWIDTH="+this.$U+',AUDIO="audio"\n'+this.av},t}(),xc=function(){function t(t){this.Gp="#EXT-X-MEDIA-SEQUENCE",this.xB=void 0,this.xB=t}return t.prototype.pC=function(){return this.Gp+":"+this.xB},t}(),Bc=function(){function t(t){this.Gp="#EXT-X-MEDIA",this.av=void 0,this.av=t}return t.prototype.pC=function(){var t=jr();t.set("TYPE","AUDIO"),t.set("GROUP-ID",'"audio"'),t.set("NAME",'"audio"'),t.set("AUTOSELECT","YES"),t.set("DEFAULT","YES"),t.set("CHANNELS",'"2"'),t.set("URI",'"'+this.av+'"');var n=[];return t.forEach(function(t,i){return n.push(i+"="+t)}),this.Gp+":"+n.join(",")},t}();x(),pt();var Mc=function(){function t(t){this.kb=[],this.kb=t}var n=t.prototype;return n.iD=function(){return this.kb},n.dv=function(t){this.kb.push(t)},n.mVt=function(){for(var t,n="",i=Rt(this.iD());!(t=i()).done;){n+=t.value.pC()+"\n"}return n},n.Vg=function(){this.kb.length=0},t}(),Lc=function(t){function n(n,i){var e;return e=t.call(this,[new Oc,new Nc(8)])||this,i&&e.dv(new Cc("video/index.m3u8")),n&&e.dv(new Bc("audio/index.m3u8")),e}return Tt(n,t),n}(Mc);x(),pt(),x(),pt(),x(),pt();var Uc=function(t){return t.Bit="HELLO",t.Lit="HI_THERE",t.Mit="INITIALIZE",t.Oit="APPEND_INIT",t.Fit="APPEND_DATA",t.Vit="ACK",t.Wit="REMOVE",t.Uit="DESTROY_SESSION",t}({});x(),pt(),x(),pt();var Fc,zc=new Array(256);for(Fc=0;Fc<256;Fc+=1)zc[Fc]=(Fc<16?"0":"")+Fc.toString(16);function Wc(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var n=16*y.random()|0;return("x"===t?n:3&n|8).toString(16)})}x(),pt();var Vc=function(t){function n(n){var i;return(i=t.call(this,"append")||this).qT=void 0,i.qT=n,i}return Tt(n,t),n}(Io),qc=function(t){function n(){var n;return(n=t.apply(this,arguments)||this).gRt=0,n.Xm=new I(0),n.Qy=!1,n.lv=!1,n}Tt(n,t);var i=n.prototype;return i.s2=function(t,n){this.gRt+=n,this.Xm=nu([this.Xm,t]),this.So(new Vc(t))},i.Xs=function(){this.JA||(this.So(new Io("close")),this.Qy=!0)},Et(n,[{key:"yR",get:function(){return this.gRt}},{key:"qT",get:function(){return this.Xm}},{key:"JA",get:function(){return this.Qy}},{key:"wv",get:function(){return this.lv},set:function(t){this.lv=t}}]),n}(To),Hc="sync-seg-",Xc=function(){function t(t,n){this.gv=!1,this.kv=!1,this.jv=void 0,this.Ad=void 0,this.o=Hc+Wc(),this.jv=n?new qc:void 0,this.Ad=t?new qc:void 0}return t.prototype.Xs=function(){this.jv&&this.jv.Xs(),this.Ad&&this.Ad.Xs()},Et(t,[{key:"tw",get:function(){return this.gv},set:function(t){this.gv=t}},{key:"rw",get:function(){return this.kv},set:function(t){this.kv=t}}]),t}();x(),pt();var jc=1.1,Yc=function(t){function n(n,i,e){var r;return(r=t.call(this,[new Oc,new Nc(8),new Pc(1),new Ac(0)])||this).jot=void 0,r.sw=void 0,r.bw=[],r.zyt=jr(),r.$nt=void 0,r.kw=0,r.tb=function(t){if(t.gO>=rn)for(;r.bw.length>0;)r.nb()},e&&r.dv(new Dc(e,"com.apple.streamingkeydelivery","1")),r.jot=n,r.$nt=i,r.$nt.wn("remove",r.tb),r.sw=new xc(0),r.dv(r.sw),r}Tt(n,t);var i=n.prototype;return i.cCt=function(){return this.jot===Ic.Sk?this.$nt.cb:this.jot===Ic.Ak?this.$nt.ab:void 0},i.zot=function(t){return this.zyt.get(t)},i.Vg=function(){this.bw.length=0,this.sw.xB=0,this.zyt.clear(),this.kw=0},i.iD=function(){return this.lb(),[].concat(t.prototype.iD.call(this),this.bw)},i.lb=function(){for(var t,n=Rt(this.$nt.tg());!(t=n()).done;){var i=t.value;if(!this.zyt.has(i.o)){var e=void 0;if(this.jot===Ic.Sk?(e=i.jv,i.rw=!0):(e=i.Ad,i.tw=!0),!e)return;this.zyt.set(i.o,e),e.wv&&this.bw.push(new Rc(i.o+"-init")),this.bw.push(new kc(jc,i.o)),this.kw+=jc}}this.ng()},i.ng=function(){for(;this.kw>60;)this.nb()},i.nb=function(){var t=this.bw.shift();void 0!==t&&function(t){return t.Gp===Ec.ck}(t)&&(this.zyt.delete(t.av),this.kw-=t.cv,this.sw.xB++)},n}(Mc);var Kc=function(t){function n(n){var i;return(i=t.call(this,"remove")||this).gO=void 0,i.gO=n,i}return Tt(n,t),n}(Io),Gc=function(t){function n(n,i){var e;return(e=t.call(this)||this).ig=void 0,e.ug=void 0,e.sg=void 0,e.lg=void 0,e.bg=void 0,e.mg=void 0,e.kg=void 0,e.tm=void 0,e.rm=void 0,e.om=void 0,e.sm=void 0,e.ig=n,e.ug=i,e.sg=[],e.bg=[],e.mg=jr(),e.kg=jr(),e.tm=jr(),e.rm=0,e}Tt(n,t);var i=n.prototype;return i.tg=function(){return this.lg?(this.sg=this.sg.filter(function(t){return!(t.rw&&t.tw)}),[].concat(this.sg,[this.lg],this.bg)):[]},i.o2=function(t){this.am(t)},i.s2=function(t){this.am(t),this.bm(t),this.km(t)},i.hS=function(t){this.am(t),this.km(t)},i.Vg=function(){var t;null==(t=this.lg)||t.Xs(),this.lg=void 0,this.bg.forEach(function(t){return t.Xs()}),this.bg.length=0,this.sg.length=0,this.tm=jr(),this.rm=0},i.bm=function(t){var n=t.startPts,i=t.totalDuration;this.kg.set(t.mediaType,n+i)},i.ip=function(){if(this.lg){this.lg.Xs(),this.sg.push(this.lg);var t=this.bg.shift(),n=new Xc(this.ig,this.ug);t?(this.lg=t,this.bg.push(n)):this.lg=n}},i.up=function(t){if(this.lg){var n=!this.lg.Ad||0===this.lg.Ad.yR,i=!this.lg.jv||0===this.lg.jv.yR,e=this.lg.Ad&&this.lg.Ad.wv,r=this.lg.jv&&this.lg.jv.wv,o=i&&(n&&!(this.lg.tw||this.lg.rw)||e),u=n&&(i&&!(this.lg.tw||this.lg.rw)||r);(t===Ic.Ak&&!u||t===Ic.Sk&&!o)&&(this.ip(),this.ip())}},i.am=function(t){var n=t.mediaType,i=t.kind,e=this.mg.get(n);if(void 0===e){if(i===Uc.Oit||i===Uc.Fit){var r=[t];this.mg.set(n,r)}}else e.push(t)},i.km=function(t){var n=this.ty(t);for(var i,e=Rt(n);!(i=e()).done;){var r=i.value;switch(r.kind){case Uc.Oit:this.ny(r),this.tm=jr(),this.rm=0;break;case Uc.Wit:this.hy(r);break;case Uc.Fit:this.my(r)}}},i.ny=function(t){var n=t.mediaType;void 0===this.lg?(this.lg=new Xc(this.ig,this.ug),this.bg.push(new Xc(this.ig,this.ug))):this.up(n),n===Ic.Sk?(this.sm=t.segment,this.lg.jv.wv=!0):n===Ic.Ak&&(this.om=t.segment,this.lg.Ad.wv=!0)},i.my=function(t){var n,i,e=t.mediaType===Ic.Ak,r=t.totalDuration,o=null!=(n=this.tm.get(t.mediaType))?n:0;e?(this.lg.Ad.s2(t.segment,r),i=o+this.lg.Ad.yR):(this.lg.jv.s2(t.segment,r),i=o+this.lg.jv.yR),i>=this.rm+jc&&(this.tm.set(t.mediaType,i),this.rm+=jc,this.ip())},i.hy=function(t){this.kg.set(t.mediaType,void 0),this.up(t.mediaType),this.sg.length=0,this.So(new Kc(t.endTime))},i.ty=function(t){var n=this;if(t.kind===Uc.Wit)return this.ky(t);var i=[];return this.mg.forEach(function(t){if(t&&t.length>0){var e=on(t,function(t){return t.kind===Uc.Wit});-1===e&&(e=t.length);for(var r,o=Rt(t.slice(0,e));!(r=o()).done;){var u=r.value;if(!hn(i,u)){var s,f=n.ky(u);if(f.length>0)(s=i).push.apply(s,[].concat(f));else if(u.kind===Uc.Fit)break}}}}),i},i.ky=function(t){var n=this.mg.get(t.mediaType),i=function(t){return t===Ic.Sk?Ic.Ak:Ic.Sk}(t.mediaType);if(!(i===Ic.Sk?this.ug:this.ig))return n.splice(0,n.indexOf(t)+1);if(t.kind===Uc.Oit)return[];var e=this.kg.get(i);if(void 0===e)return[];if(t.kind===Uc.Wit){var r=this.OS(i);if(r.length>0){var o=n.splice(0,n.indexOf(t));return n.splice(0,1),[].concat(o,r,[t])}return[]}if(t.startPts<=e){var u=n.splice(0,n.indexOf(t));n.splice(0,1);var s=this.AS(t,u,i);return[].concat(u,s,[t])}return[]},i.AS=function(t,n,i){var e=this.mg.get(i);if(!e)return[];var r=t.startPts+t.totalDuration,o=on(e,function(t){return t.kind===Uc.Wit}),u=o-1;-1===o&&(u=e.length-1);for(var s=u+1,f=0;f<=u&&s===u+1;f++){var h=e[f];h.kind===Uc.Fit&&h.startPts>r&&(s=f)}var c=-1;return-1!==on(n,function(t){return t.kind===Uc.Oit})&&(c=on(e,function(t){return t.kind===Uc.Oit})),c>s&&(s=c+1),s>0?(e[s-1].kind===Uc.Oit&&(s-=1),e.splice(0,s)):[]},i.OS=function(t){var n=this.mg.get(t);if(n){var i=on(n,function(t){return t.kind===Uc.Wit});if(i>=0)return n.splice(0,i+1)}return[]},i.BS=function(){var t="[MEDIABUFFER] endPTS: ";this.kg.forEach(function(n,i){t=t.concat(i+" = "+n+" ")}),Xt.np(t)},i.RT=function(t,n){var i=t+": [";null==n||n.forEach(function(t){i=i.concat(" "+t.kind+"("+t.mediaType+")")}),i=i.concat(" ]"),Xt.np(i)},Et(n,[{key:"ab",get:function(){var t;return null==(t=this.om)?void 0:t.slice()}},{key:"cb",get:function(){var t;return null==(t=this.sm)?void 0:t.slice()}}]),n}(To);var $c=function(){function t(t,n){this.IE=void 0,this.ME=void 0,this.tk=void 0,this.ik=void 0;var i=t.some(function(t){return t.match("audio")}),e=t.some(function(t){return t.match("video")});this.ME=new Gc(i,e),this.IE=new Lc(i,e),i&&(this.tk=new Yc(Ic.Ak,this.ME,n)),e&&(this.ik=new Yc(Ic.Sk,this.ME,n))}var n=t.prototype;return n.uk=function(t){var n,i,e=Zc(t);return e===Ic.Sk?null==(n=this.ik)?void 0:n.cCt():e===Ic.Ak?null==(i=this.tk)?void 0:i.cCt():void 0},n.zot=function(t){var n,i,e=t.split("/")[1],r=Zc(t);return r===Ic.Sk?null==(n=this.ik)?void 0:n.zot(e):r===Ic.Ak?null==(i=this.tk)?void 0:i.zot(e):void 0},n.o2=function(t){this.ME.o2(t)},n.s2=function(t){this.ME.s2(t)},n.ldt=function(t){this.ME.hS(t)},n.Vg=function(){var t,n;this.ME.Vg(),this.IE.Vg(),null==(t=this.tk)||t.Vg(),null==(n=this.ik)||n.Vg()},Et(t,[{key:"sk",get:function(){return this.IE}},{key:"ak",get:function(){return this.tk}},{key:"mk",get:function(){return this.ik}}]),t}();function Zc(t){return t.match(/video/)?Ic.Sk:Ic.Ak}var Jc=function(){function t(t,n){var i=this;this.kk=void 0,this.TR=void 0,this.Eat=void 0,this.rYt=void 0,this.kk=t,this.TR=n,this.Eat=void 0,this.rYt=function(t){return tn(function(){var n,i;return nn(this,function(e){switch((n=t.data).kind){case Uc.Mit:this.Eat=new $c(n.mediaBufferConfigs,n.fairPlaySdkUri);break;case Uc.Oit:this.Eat.o2(n);break;case Uc.Fit:this.Eat.s2(n);break;case Uc.Wit:this.Eat.ldt(n)}return i={kind:Uc.Vit},this.kk.postMessage(i),[2]})}).call(i)},this.kk.onmessage=this.rYt}var n=t.prototype;return n.mVt=function(t){return"master.m3u8"===t?this.Eat.sk:"video/index.m3u8"===t?this.Eat.mk:"audio/index.m3u8"===t?this.Eat.ak:void 0},n.CR=function(t){if(t.match(/m3u8/)){var n,i=null==(n=this.mVt(t))?void 0:n.mVt();return new Response(i,{headers:{"Content-Type":"application/x-mpegurl; charset=utf-8"}})}if(t.match(Hc)){var e={"Content-Type":t.match(/video/)?"video/mp4":"audio/mp4"};if(t.match(/init/)){var r,o=null==(r=this.Eat)?void 0:r.uk(t);return new Response(o,{headers:e})}var u=this.Zot(t);if(!u)return new Response(void 0,{status:404,statusText:"Not Found"});var s=function(t){var n,i=function(t){n.enqueue(t.qT)},e=function(){n.close(),t.mn("append",i),t.mn("close",e)};return new self.ReadableStream({start:function(r){(n=r).enqueue(t.qT),t.JA?n.close():(t.wn("append",i),t.wn("close",e))},cancel:function(){t.mn("append",i),t.mn("close",e)}})}(u);return new Response(s,{headers:e})}return new Response(void 0,{status:404,statusText:"Not Found"})},n.Zot=function(t){return this.Eat.zot(t)},n.close=function(){var t;this.kk.close(),null==(t=this.Eat)||t.Vg()},t}(),Qc=function(){function t(){var t=this;this.D6=jr(),this.Mzt=void 0,this.rYt=function(n){var i=n.data;if(i.kind===Uc.Bit){t.BR().catch(Zt);var e=i.port,r=Wc(),o=new Jc(e,n.source.id);t.D6.set(r,o);var u=function(n){n.data.kind===Uc.Uit&&(t.IN(r),e.removeEventListener("message",u))};e.addEventListener("message",u);var s={kind:Uc.Lit,sessionId:r};e.postMessage(s)}},this.XP=function(n){if(vo(n.request.url,"https://theo.proxy")){var i=new URL(n.request.url).pathname.split("/"),e=i[1],r=i.slice(2).join("/"),o=t.D6.get(e);if(void 0===o){var u=new Response(void 0,{headers:{message:"Given session ["+e+"] not found."},status:404,statusText:"Not Found"});return void n.respondWith(u)}if(void 0===r){var s=new Response(void 0,{headers:{message:"No resource ["+r+"] provided."},status:404,statusText:"Not Found"});return void n.respondWith(s)}var f=o.CR(r);n.respondWith(f)}}}var n=t.prototype;return n.gr=function(t){this.Mzt=t,t.addEventListener("message",this.rYt),t.addEventListener("fetch",this.XP)},n.IN=function(t){var n=this.D6.get(t);n&&n.close(),this.D6.delete(t)},n.BR=function(){return tn(function(){var t,n,i;return nn(this,function(e){switch(e.label){case 0:return t=this,[4,this.Mzt.clients.matchAll()];case 1:return n=e.sent(),i=n.map(function(t){return t.id}),this.D6.forEach(function(n,e){hn(i,n.TR)||t.IN(e)}),[2]}})}).call(this)},t}();Qc.ID=new Qc;var ta=self;ta.addEventListener("install",function(t){t.waitUntil(ta.skipWaiting())}),ta.addEventListener("activate",function(t){t.waitUntil(ta.clients.claim())}),Qc.ID.gr(ta)}("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof s?s:"undefined"!=typeof global?global:this);
|
|
30
|
+
!function(t){"use strict";var n,i,e,r,o,u,s,f,h,c=t.window,a=t.document,v=(t.location,t.navigator),d=t.setTimeout,l=t.clearTimeout,w=t.setInterval,b=t.clearInterval,g=t.Error,m=t.TypeError,p=(t.SyntaxError,t.Object),y=t.Math,_=t.parseInt,S=t.parseFloat,T=t.isNaN,I=t.Uint8Array,k=(t.Worker,t.WorkerGlobalScope,t.XMLHttpRequest),E=p.create,R=p.defineProperty,O=p.getOwnPropertyDescriptor,N=p.getOwnPropertyNames,P=p.getPrototypeOf,A=p.prototype.hasOwnProperty,D=function(t,n){return function(){return t&&(n=t(t=0)),n}},C=function(t,n){return function(){return n||t((n={exports:{}}).exports,n),n.exports}},x=D(function(){"function"==typeof Symbol&&Symbol.iterator?(n=Symbol,i=null!=(u=Symbol.for)?u:Symbol,e=Symbol.iterator,r=null!=(s=Symbol.dispose)?s:i("Symbol.dispose"),o=null!=(f=Symbol.asyncDispose)?f:i("Symbol.asyncDispose")):(h=0,n=function(t){return"hd"+t+"_"+ ++h},e=(i=function(t){return"hd"+t})("Symbol.iterator"),r=i("Symbol.dispose"),o=i("Symbol.asyncDispose"),n.for=i,n.iterator=e,n.dispose=r,n.asyncDispose=o)});function B(t,i){return null!=i&&void 0!==n&&i[n.hasInstance]?!!i[n.hasInstance](t):t instanceof i}var M=D(function(){x(),pt()});function F(t){return t&&void 0!==n&&t.constructor===n?"symbol":typeof t}var L,U,z,W,V,H,q,X,j,Y,K,G,$,Z,J,Q,tt,nt,it,et=D(function(){x(),pt()});function rt(t){var n=this.constructor;return this.then(function(i){return n.resolve(t()).then(function(){return i})},function(i){return n.resolve(t()).then(function(){return n.reject(i)})})}function ot(t){return new this(function(n,i){if(!t||void 0===t.length)return i(new m((void 0===t?"undefined":F(t))+" "+t+" is not iterable(cannot read property Symbol(Symbol.iterator))"));var e=Array.prototype.slice.call(t);if(0===e.length)return n([]);var r=e.length;function o(t,i){if(i&&("object"===(void 0===i?"undefined":F(i))||"function"==typeof i)){var u=i.then;if("function"==typeof u)return void u.call(i,function(n){o(t,n)},function(i){e[t]={status:"rejected",reason:i},0===--r&&n(e)})}e[t]={status:"fulfilled",value:i},0===--r&&n(e)}for(var u=0;u<e.length;u++)o(u,e[u])})}function ut(t){return Boolean(t&&void 0!==t.length)}function st(){}function ft(t){if(!B(this,ft))throw new m("Promises must be constructed via new");if("function"!=typeof t)throw new m("not a function");this.Ra=0,this.tki=!1,this.iTt=void 0,this.iki=[],lt(t,this)}function ht(t,n){for(;3===t.Ra;)t=t.iTt;0!==t.Ra?(t.tki=!0,ft.nki(function(){var i=1===t.Ra?n.onFulfilled:n.onRejected;if(null!==i){var e;try{e=i(t.iTt)}catch(t){return void at(n.promise,t)}ct(n.promise,e)}else(1===t.Ra?ct:at)(n.promise,t.iTt)})):t.iki.push(n)}function ct(t,n){try{if(n===t)throw new m("A promise cannot be resolved with itself.");if(n&&("object"===(void 0===n?"undefined":F(n))||"function"==typeof n)){var i=n.then;if(B(n,ft))return t.Ra=3,t.iTt=n,void vt(t);if("function"==typeof i)return void lt(function(t,n){return function(){t.apply(n,arguments)}}(i,n),t)}t.Ra=1,t.iTt=n,vt(t)}catch(n){at(t,n)}}function at(t,n){t.Ra=2,t.iTt=n,vt(t)}function vt(t){2===t.Ra&&0===t.iki.length&&ft.nki(function(){t.tki||ft.rki(t.iTt)});for(var n=0,i=t.iki.length;n<i;n++)ht(t,t.iki[n]);t.iki=null}function dt(t,n,i){this.onFulfilled="function"==typeof t?t:null,this.onRejected="function"==typeof n?n:null,this.promise=i}function lt(t,n){var i=!1;try{t(function(t){i||(i=!0,ct(n,t))},function(t){i||(i=!0,at(n,t))})}catch(t){if(i)return;i=!0,at(n,t)}}function wt(t){return new G(K,{reason:t,promise:U.reject(t).catch(function(){}),cancelable:!0})}function bt(t){var n=new $(K,{detail:{reason:t},cancelable:!0});return p.defineProperty(n,"reason",{value:t}),n}function gt(t){var n=a.createEvent("CustomEvent");return n.initCustomEvent(K,!1,!0,{reason:t}),n}var mt=D(function(){var t,n,i,e;x(),pt(),M(),et(),L=d,ft.prototype.catch=function(t){return this.then(null,t)},ft.prototype.then=function(t,n){var i=new this.constructor(st);return ht(this,new dt(t,n,i)),i},ft.prototype.finally=rt,ft.all=function(t){return new ft(function(n,i){if(!ut(t))return i(new m("Promise.all accepts an array"));var e=Array.prototype.slice.call(t);if(0===e.length)return n([]);var r=e.length;function o(t,u){try{if(u&&("object"===(void 0===u?"undefined":F(u))||"function"==typeof u)){var s=u.then;if("function"==typeof s)return void s.call(u,function(n){o(t,n)},i)}e[t]=u,0===--r&&n(e)}catch(t){i(t)}}for(var u=0;u<e.length;u++)o(u,e[u])})},ft.allSettled=ot,ft.resolve=function(t){return t&&"object"===(void 0===t?"undefined":F(t))&&t.constructor===ft?t:new ft(function(n){n(t)})},ft.reject=function(t){return new ft(function(n,i){i(t)})},ft.race=function(t){return new ft(function(n,i){if(!ut(t))return i(new m("Promise.race accepts an array"));for(var e=0,r=t.length;e<r;e++)ft.resolve(t[e]).then(n,i)})},ft.nki="function"==typeof setImmediate&&function(t){setImmediate(t)}||function(t){L(t,0)},ft.rki=function(t){"undefined"!=typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",t)},U=function(){var t=self.Promise;if(void 0!==t)try{if(-1!==t.toString().indexOf("[native code]"))return t}catch(t){}}(),z=v?v.userAgent:"",W=z.match(/Firefox\/([0-9]+)/i),V=null!=W,H=W?Number(W[1]):0,q=z.match(/(Version)\/((\d+)\.(\d+)(?:\.(\d+))?).*Safari/),X=null!=q,j=q?Number(q[3]):0,Y=function(){function t(t){this.hb=0,this.Ld=0,this.qm=[],this.eki=t}return t.prototype.ski=function(t){var n=this.length();this.uki(n+1);var i=this.Ld+n&this.eki-1;this.qm[i]=t,this.hb=n+1},t.prototype.push=function(t){var n=this.length()+1;if(this.eki<n)this.ski(t);else{var i=this.Ld+n-1,e=this.eki-1;this.qm[i&e]=t,this.hb=n}},t.prototype.shift=function(){var t=this.Ld,n=this.qm[t];return this.qm[t]=void 0,this.Ld=t+1&this.eki-1,this.hb--,n},t.prototype.length=function(){return this.hb},t.prototype.uki=function(t){this.eki<t&&this.oki(this.eki<<1)},t.prototype.oki=function(t){var n=this.eki;this.eki=t;var i=this.Ld+this.hb&n-1;!function(t,n,i,e){for(var r=0;r<e;++r)t[r+i]=t[r+n],t[r+n]=void 0}(this.qm,0,n,i)},t}(),K="unhandledrejection",G=self.PromiseRejectionEvent,$=self.CustomEvent,Z=function(t){return Z=function(){try{var t=U.resolve(),n="error",i=new G(K,{reason:n,promise:t});return K===i.type&&n===i.reason}catch(t){}return!1}()?wt:function(){try{var t="error",n=new $(K,{detail:{reason:t}});return K===n.type&&t===n.detail.reason}catch(t){}return!1}()?bt:gt,Z(t)},Q=V&&H<60||X&&j<15,U&&!Q?(tt=U,function(){}):(tt=ft,nt=null!==(J=function(){var t=self.queueMicrotask;if("function"==typeof t)return function(n){return t(n)};var n=U;if(n&&"function"==typeof n.resolve){var i=n.resolve();return function(t){return i.then(t)}}}())&&void 0!==J?J:ft.nki,t=nt,n=new Y(16),i=!1,(it={l6:function(r){n.push(r),i||(i=!0,t(e))},qY:e=function(){for(;n.length()>0;)n.shift()();i=!1}}).qY,ft.nki=it.l6,ft.rki=function(t){try{var n=Z(t);if(!self.dispatchEvent(n)||n.defaultPrevented)return}catch(t){}d(function(){throw new g("Unhandled promise rejection: ".concat(t))},0)})}),pt=D(function(){mt()}),yt=C(function(t,i){var r,o;x(),pt(),et(),r=t,o=function(t){var i="function"==typeof n&&"symbol"===F(e)?n:function(t){return"Symbol("+t+")"};function r(){}var o=Number.isNaN||function(t){return t!=t},u=r;function s(t){return"object"===(void 0===t?"undefined":F(t))&&null!==t||"function"==typeof t}function f(t){return t.slice()}function h(t,n,i,e,r){new I(t).set(new I(i,e,r),n)}function c(t){return!1!==function(t){return"number"==typeof t&&(!o(t)&&!(t<0))}(t)&&t!==1/0}function a(t,n,i){if("function"!=typeof t)throw new m("Argument is not a function");return Function.prototype.apply.call(t,n,i)}function v(t,n,i,e){var r=t[n];if(void 0!==r){if("function"!=typeof r)throw new m(r+" is not a method");switch(i){case 0:return function(){return l(r,t,e)};case 1:return function(n){var i=[n].concat(e);return l(r,t,i)}}}return function(){return R(void 0)}}function d(t,n,i){var e=t[n];if(void 0!==e)return a(e,t,i)}function l(t,n,i){try{return R(a(t,n,i))}catch(t){return O(t)}}function w(t){if(t=Number(t),o(t)||t<0)throw new RangeError("highWaterMark property of a queuing strategy must be non-negative and non-NaN");return t}function b(t){if(void 0===t)return function(){return 1};if("function"!=typeof t)throw new m("size property of a queuing strategy must be a function");return function(n){return t(n)}}var _=tt,S=tt.prototype.then,T=tt.resolve.bind(_),k=tt.reject.bind(_);function E(t){return new _(t)}function R(t){return T(t)}function O(t){return k(t)}function N(t,n,i){return S.call(t,n,i)}function P(t,n,i){N(N(t,n,i),void 0,u)}function A(t,n){P(t,n)}function D(t,n){P(t,void 0,n)}function C(t,n,i){return N(t,n,i)}function x(t){N(t,void 0,u)}var B=function(){function t(){this.Rd=0,this.Dd=0,this.Ld={Od:[],Fd:void 0},this.Vd=this.Ld,this.Rd=0,this.Dd=0}return p.defineProperty(t.prototype,"length",{get:function(){return this.Dd},enumerable:!0,configurable:!0}),t.prototype.push=function(t){var n=this.Vd,i=n;16383===n.Od.length&&(i={Od:[],Fd:void 0}),n.Od.push(t),i!==n&&(this.Vd=i,n.Fd=i),++this.Dd},t.prototype.shift=function(){var t=this.Ld,n=t,i=this.Rd,e=i+1,r=t.Od,o=r[i];return 16384===e&&(n=t.Fd,e=0),--this.Dd,this.Rd=e,t!==n&&(this.Ld=n),r[i]=void 0,o},t.prototype.forEach=function(t){for(var n=this.Rd,i=this.Ld,e=i.Od;!(n===e.length&&void 0===i.Fd||n===e.length&&(n=0,0===(e=(i=i.Fd).Od).length));)t(e[n]),++n},t.prototype.peek=function(){var t=this.Ld,n=this.Rd;return t.Od[n]},t}();function M(t,n,i){var e=null;!0===i&&(e=p.prototype);var r=p.create(e);return r.value=t,r.done=n,r}function L(t,n){t.Wd=!0,t.Ud=n,n.Gd=t,"readable"===n.Ra?V(t):"closed"===n.Ra?function(t){V(t),X(t)}(t):H(t,n.Xd)}function U(t,n){return Zn(t.Ud,n)}function z(t){"readable"===t.Ud.Ra?q(t,new m("Reader was released and can no longer be used to monitor the stream's closedness")):function(t,n){H(t,n)}(t,new m("Reader was released and can no longer be used to monitor the stream's closedness")),t.Ud.Gd=void 0,t.Ud=void 0}function W(t){return new m("Cannot "+t+" a stream using a released reader")}function V(t){t.Zd=E(function(n,i){t.Hd=n,t.zd=i})}function H(t,n){V(t),q(t,n)}function q(t,n){x(t.Zd),t.zd(n),t.Hd=void 0,t.zd=void 0}function X(t){t.Hd(void 0),t.Hd=void 0,t.zd=void 0}var j=i("[[CancelSteps]]"),Y=i("[[PullSteps]]");function K(t,n){void 0===n&&(n=!1);var i=new it(t);return i.Wd=n,i}function G(t){return E(function(n,i){var e={Yd:n,Kd:i};t.Gd.qd.push(e)})}function $(t,n,i){var e=t.Gd;e.qd.shift().Yd(M(n,i,e.Wd))}function Z(t){return t.Gd.qd.length}function J(t){var n=t.Gd;return void 0!==n&&!!et(n)}var Q,nt,it=function(){function t(t){if(!1===Gn(t))throw new m("ReadableStreamDefaultReader can only be constructed with a ReadableStream instance");if(!0===$n(t))throw new m("This stream has already been locked for exclusive reading by another reader");L(this,t),this.qd=new B}return p.defineProperty(t.prototype,"closed",{get:function(){return et(this)?this.Zd:O(ot("closed"))},enumerable:!0,configurable:!0}),t.prototype.cancel=function(t){return et(this)?void 0===this.Ud?O(W("cancel")):U(this,t):O(ot("cancel"))},t.prototype.read=function(){return et(this)?void 0===this.Ud?O(W("read from")):rt(this):O(ot("read"))},t.prototype.releaseLock=function(){if(!et(this))throw ot("releaseLock");if(void 0!==this.Ud){if(this.qd.length>0)throw new m("Tried to release a reader lock when that reader has pending read() calls un-settled");z(this)}},t}();function et(t){return!!s(t)&&!!p.prototype.hasOwnProperty.call(t,"qd")}function rt(t){var n=t.Ud;return n.Qd=!0,"closed"===n.Ra?R(M(void 0,!0,t.Wd)):"errored"===n.Ra?O(n.Xd):n.Jd[Y]()}function ot(t){return new m("ReadableStreamDefaultReader.prototype."+t+" can only be used on a ReadableStreamDefaultReader")}"symbol"===F(i.asyncIterator)&&((Q={})[i.asyncIterator]=function(){return this},nt=Q,p.defineProperty(nt,i.asyncIterator,{enumerable:!1}));var ut={next:function(){if(!1===st(this))return O(ft("next"));var t=this.$d;return void 0===t.Ud?O(W("iterate")):C(rt(t),function(n){var i=n.done;return i&&z(t),M(n.value,i,!0)})},return:function(t){if(!1===st(this))return O(ft("next"));var n=this.$d;if(void 0===n.Ud)return O(W("finish iterating"));if(n.qd.length>0)return O(new m("Tried to release a reader lock when that reader has pending read() calls un-settled"));if(!1===this.ul){var i=U(n,t);return z(n),C(i,function(){return M(t,!0,!0)})}return z(n),R(M(t,!0,!0))}};function st(t){return!!s(t)&&!!p.prototype.hasOwnProperty.call(t,"$d")}function ft(t){return new m("ReadableStreamAsyncIterator."+t+" can only be used on a ReadableSteamAsyncIterator")}function ht(t){var n=t.tf.shift();return t.if-=n.size,t.if<0&&(t.if=0),n.value}function ct(t,n,i){if(!c(i=Number(i)))throw new RangeError("Size must be a finite, non-NaN, non-negative number.");t.tf.push({value:n,size:i}),t.if+=i}function at(t){t.tf=new B,t.if=0}void 0!==nt&&p.setPrototypeOf(ut,nt),p.defineProperty(ut,"next",{enumerable:!1}),p.defineProperty(ut,"return",{enumerable:!1});var vt=i("[[AbortSteps]]"),dt=i("[[ErrorSteps]]"),lt=function(){function t(t,n){void 0===t&&(t={}),void 0===n&&(n={}),bt(this);var i=n.size,e=n.highWaterMark;if(void 0!==t.type)throw new RangeError("Invalid type is specified");var r=b(i);void 0===e&&(e=1),function(t,n,i,e){var r=p.create(xt.prototype);function o(){return d(n,"start",[r])}var u=v(n,"write",1,[r]),s=v(n,"close",0,[]),f=v(n,"abort",1,[]);Bt(t,r,o,u,s,f,i,e)}(this,t,e=w(e),r)}return p.defineProperty(t.prototype,"locked",{get:function(){if(!1===gt(this))throw Vt("locked");return mt(this)},enumerable:!0,configurable:!0}),t.prototype.abort=function(t){return!1===gt(this)?O(Vt("abort")):!0===mt(this)?O(new m("Cannot abort a stream that already has a writer")):pt(this,t)},t.prototype.close=function(){return!1===gt(this)?O(Vt("close")):!0===mt(this)?O(new m("Cannot close a stream that already has a writer")):!0===It(this)?O(new m("Cannot close an already-closing stream")):yt(this)},t.prototype.getWriter=function(){if(!1===gt(this))throw Vt("getWriter");return wt(this)},t}();function wt(t){return new Rt(t)}function bt(t){t.Ra="writable",t.Xd=void 0,t.ef=void 0,t.nf=void 0,t.rf=new B,t.hf=void 0,t.uf=void 0,t.cf=void 0,t.df=void 0,t.lf=!1}function gt(t){return!!s(t)&&!!p.prototype.hasOwnProperty.call(t,"nf")}function mt(t){return void 0!==t.ef}function pt(t,n){var i=t.Ra;if("closed"===i||"errored"===i)return R(void 0);if(void 0!==t.df)return t.df.vf;var e=!1;"erroring"===i&&(e=!0,n=void 0);var r=E(function(i,r){t.df={vf:void 0,Yd:i,Kd:r,_f:n,gf:e}});return t.df.vf=r,!1===e&&St(t,n),r}function yt(t){var n=t.Ra;if("closed"===n||"errored"===n)return O(new m("The stream (in "+n+" state) is not in the writable state and cannot be closed"));var i=E(function(n,i){var e={Yd:n,Kd:i};t.uf=e}),e=t.ef;return void 0!==e&&!0===t.lf&&"writable"===n&&Qt(e),function(t){ct(t,"close",0),Lt(t)}(t.nf),i}function _t(t,n){"writable"!==t.Ra?Tt(t):St(t,n)}function St(t,n){var i=t.nf;t.Ra="erroring",t.Xd=n;var e=t.ef;void 0!==e&&At(e,n),!1===function(t){return void 0!==t.hf||void 0!==t.cf}(t)&&!0===i.mf&&Tt(t)}function Tt(t){t.Ra="errored",t.nf[dt]();var n=t.Xd;if(t.rf.forEach(function(t){t.Kd(n)}),t.rf=new B,void 0!==t.df){var i=t.df;if(t.df=void 0,!0===i.gf)return i.Kd(n),void kt(t);P(t.nf[vt](i._f),function(){i.Yd(),kt(t)},function(n){i.Kd(n),kt(t)})}else kt(t)}function It(t){return void 0!==t.uf||void 0!==t.cf}function kt(t){void 0!==t.uf&&(t.uf.Kd(t.Xd),t.uf=void 0);var n=t.ef;void 0!==n&&Yt(n,t.Xd)}function Et(t,n){var i=t.ef;void 0!==i&&n!==t.lf&&(!0===n?function(t){Gt(t)}(i):Qt(i)),t.lf=n}var Rt=function(){function t(t){if(!1===gt(t))throw new m("WritableStreamDefaultWriter can only be constructed with a WritableStream instance");if(!0===mt(t))throw new m("This stream has already been locked for exclusive writing by another writer");this.pf=t,t.ef=this;var n=t.Ra;if("writable"===n)!1===It(t)&&!0===t.lf?Gt(this):Zt(this),Xt(this);else if("erroring"===n)$t(this,t.Xd),Xt(this);else if("closed"===n)Zt(this),function(t){Xt(t),Kt(t)}(this);else{var i=t.Xd;$t(this,i),jt(this,i)}}return p.defineProperty(t.prototype,"closed",{get:function(){return!1===Ot(this)?O(Ht("closed")):this.Zd},enumerable:!0,configurable:!0}),p.defineProperty(t.prototype,"desiredSize",{get:function(){if(!1===Ot(this))throw Ht("desiredSize");if(void 0===this.pf)throw qt("desiredSize");return function(t){var n=t.pf,i=n.Ra;return"errored"===i||"erroring"===i?null:"closed"===i?0:Ft(n.nf)}(this)},enumerable:!0,configurable:!0}),p.defineProperty(t.prototype,"ready",{get:function(){return!1===Ot(this)?O(Ht("ready")):this.wf},enumerable:!0,configurable:!0}),t.prototype.abort=function(t){return!1===Ot(this)?O(Ht("abort")):void 0===this.pf?O(qt("abort")):function(t,n){var i=t.pf;return pt(i,n)}(this,t)},t.prototype.close=function(){if(!1===Ot(this))return O(Ht("close"));var t=this.pf;return void 0===t?O(qt("close")):!0===It(t)?O(new m("Cannot close an already-closing stream")):Nt(this)},t.prototype.releaseLock=function(){if(!1===Ot(this))throw Ht("releaseLock");void 0!==this.pf&&Dt(this)},t.prototype.write=function(t){return!1===Ot(this)?O(Ht("write")):void 0===this.pf?O(qt("write to")):Ct(this,t)},t}();function Ot(t){return!!s(t)&&!!p.prototype.hasOwnProperty.call(t,"pf")}function Nt(t){return yt(t.pf)}function Pt(t,n){"pending"===t.yf?Yt(t,n):function(t,n){jt(t,n)}(t,n)}function At(t,n){"pending"===t.bf?Jt(t,n):function(t,n){$t(t,n)}(t,n)}function Dt(t){var n=t.pf,i=new m("Writer was released and can no longer be used to monitor the stream's closedness");At(t,i),Pt(t,i),n.ef=void 0,t.pf=void 0}function Ct(t,n){var i=t.pf,e=i.nf,r=function(t,n){try{return t.Af(n)}catch(n){return Ut(t,n),1}}(e,n);if(i!==t.pf)return O(qt("write to"));var o=i.Ra;if("errored"===o)return O(i.Xd);if(!0===It(i)||"closed"===o)return O(new m("The stream is closing or closed and cannot be written to"));if("erroring"===o)return O(i.Xd);var u=function(t){return E(function(n,i){var e={Yd:n,Kd:i};t.rf.push(e)})}(i);return function(t,n,i){var e={chunk:n};try{ct(t,e,i)}catch(n){return void Ut(t,n)}var r=t.Sf;!1===It(r)&&"writable"===r.Ra&&Et(r,zt(t)),Lt(t)}(e,n,r),u}var xt=function(){function t(){throw new m("WritableStreamDefaultController cannot be constructed explicitly")}return t.prototype.error=function(t){if(!1===function(t){return!!s(t)&&!!p.prototype.hasOwnProperty.call(t,"Sf")}(this))throw new m("WritableStreamDefaultController.prototype.error can only be used on a WritableStreamDefaultController");"writable"===this.Sf.Ra&&Wt(this,t)},t.prototype[vt]=function(t){var n=this.Tf(t);return Mt(this),n},t.prototype[dt]=function(){at(this)},t}();function Bt(t,n,i,e,r,o,u,s){n.Sf=t,t.nf=n,n.tf=void 0,n.if=void 0,at(n),n.mf=!1,n.Af=s,n.kf=u,n.Ef=e,n.Rf=r,n.Tf=o;var f=zt(n);Et(t,f),P(R(i()),function(){n.mf=!0,Lt(n)},function(i){n.mf=!0,_t(t,i)})}function Mt(t){t.Ef=void 0,t.Rf=void 0,t.Tf=void 0,t.Af=void 0}function Ft(t){return t.kf-t.if}function Lt(t){var n=t.Sf;if(!1!==t.mf&&void 0===n.hf)if("erroring"!==n.Ra){if(0!==t.tf.length){var i=function(t){return t.tf.peek().value}(t);"close"===i?function(t){var n=t.Sf;(function(t){t.cf=t.uf,t.uf=void 0})(n),ht(t);var i=t.Rf();Mt(t),P(i,function(){!function(t){t.cf.Yd(void 0),t.cf=void 0,"erroring"===t.Ra&&(t.Xd=void 0,void 0!==t.df&&(t.df.Yd(),t.df=void 0)),t.Ra="closed";var n=t.ef;void 0!==n&&Kt(n)}(n)},function(t){!function(t,n){t.cf.Kd(n),t.cf=void 0,void 0!==t.df&&(t.df.Kd(n),t.df=void 0),_t(t,n)}(n,t)})}(t):function(t,n){var i=t.Sf;!function(t){t.hf=t.rf.shift()}(i);var e=t.Ef(n);P(e,function(){!function(t){t.hf.Yd(void 0),t.hf=void 0}(i);var n=i.Ra;if(ht(t),!1===It(i)&&"writable"===n){var e=zt(t);Et(i,e)}Lt(t)},function(n){"writable"===i.Ra&&Mt(t),function(t,n){t.hf.Kd(n),t.hf=void 0,_t(t,n)}(i,n)})}(t,i.chunk)}}else Tt(n)}function Ut(t,n){"writable"===t.Sf.Ra&&Wt(t,n)}function zt(t){return Ft(t)<=0}function Wt(t,n){var i=t.Sf;Mt(t),St(i,n)}function Vt(t){return new m("WritableStream.prototype."+t+" can only be used on a WritableStream")}function Ht(t){return new m("WritableStreamDefaultWriter.prototype."+t+" can only be used on a WritableStreamDefaultWriter")}function qt(t){return new m("Cannot "+t+" a stream using a released writer")}function Xt(t){t.Zd=E(function(n,i){t.Hd=n,t.zd=i,t.yf="pending"})}function jt(t,n){Xt(t),Yt(t,n)}function Yt(t,n){x(t.Zd),t.zd(n),t.Hd=void 0,t.zd=void 0,t.yf="rejected"}function Kt(t){t.Hd(void 0),t.Hd=void 0,t.zd=void 0,t.yf="resolved"}function Gt(t){t.wf=E(function(n,i){t.If=n,t.xf=i}),t.bf="pending"}function $t(t,n){Gt(t),Jt(t,n)}function Zt(t){Gt(t),Qt(t)}function Jt(t,n){x(t.wf),t.xf(n),t.If=void 0,t.xf=void 0,t.bf="rejected"}function Qt(t){t.If(void 0),t.If=void 0,t.xf=void 0,t.bf="fulfilled"}function tn(t){if("object"!==(void 0===t?"undefined":F(t))||null===t)return!1;try{return"boolean"==typeof t.aborted}catch(t){return!1}}var nn,en="undefined"!=typeof DOMException?DOMException:void 0,rn=function(t){if("function"!=typeof t&&"object"!==(void 0===t?"undefined":F(t)))return!1;try{return new t,!0}catch(t){return!1}}(en)?en:((nn=function(t,n){this.message=t||"",this.name=n||"Error",g.captureStackTrace&&g.captureStackTrace(this,this.constructor)}).prototype=p.create(g.prototype),p.defineProperty(nn.prototype,"constructor",{value:nn,writable:!0,configurable:!0}),nn);function on(t,n,i,e,o,u){var s=K(t),f=wt(n);t.Qd=!0;var h=!1,c=R(void 0);return E(function(a,v){var d,l,w,b;if(void 0!==u){if(d=function(){var i=new rn("Aborted","AbortError"),r=[];!1===e&&r.push(function(){return"writable"===n.Ra?pt(n,i):R(void 0)}),!1===o&&r.push(function(){return"readable"===t.Ra?Zn(t,i):R(void 0)}),_(function(){return tt.all(r.map(function(t){return t()}))},!0,i)},!0===u.aborted)return void d();u.addEventListener("abort",d)}if(y(t,s.Zd,function(t){!1===e?_(function(){return pt(n,t)},!0,t):S(!0,t)}),y(n,f.Zd,function(n){!1===o?_(function(){return Zn(t,n)},!0,n):S(!0,n)}),l=t,w=s.Zd,b=function(){!1===i?_(function(){return function(t){var n=t.pf,i=n.Ra;return!0===It(n)||"closed"===i?R(void 0):"errored"===i?O(n.Xd):Nt(t)}(f)}):S()},"closed"===l.Ra?b():A(w,b),!0===It(n)||"closed"===n.Ra){var g=new m("the destination writable stream closed before all data could be piped to it");!1===o?_(function(){return Zn(t,g)},!0,g):S(!0,g)}function p(){var t=c;return N(c,function(){return t!==c?p():void 0})}function y(t,n,i){"errored"===t.Ra?i(t.Xd):D(n,i)}function _(t,i,e){function r(){P(t(),function(){return T(i,e)},function(t){return T(!0,t)})}!0!==h&&(h=!0,"writable"===n.Ra&&!1===It(n)?A(p(),r):r())}function S(t,i){!0!==h&&(h=!0,"writable"===n.Ra&&!1===It(n)?A(p(),function(){return T(t,i)}):T(t,i))}function T(t,n){Dt(f),z(s),void 0!==u&&u.removeEventListener("abort",d),t?v(n):a(void 0)}x(E(function(t,n){!function i(e){e?t():N(!0===h?R(!0):N(f.wf,function(){return N(rt(s),function(t){return!0===t.done||(c=N(Ct(f,t.value),void 0,r),!1)})}),i,n)}(!1)}))})}var un=function(){function t(){throw new m}return p.defineProperty(t.prototype,"desiredSize",{get:function(){if(!1===sn(this))throw gn("desiredSize");return ln(this)},enumerable:!0,configurable:!0}),t.prototype.close=function(){if(!1===sn(this))throw gn("close");if(!1===wn(this))throw new m("The stream is not in a state that permits close");an(this)},t.prototype.enqueue=function(t){if(!1===sn(this))throw gn("enqueue");if(!1===wn(this))throw new m("The stream is not in a state that permits enqueue");return vn(this,t)},t.prototype.error=function(t){if(!1===sn(this))throw gn("error");dn(this,t)},t.prototype[j]=function(t){at(this);var n=this.Cf(t);return cn(this),n},t.prototype[Y]=function(){var t=this.Pf;if(this.tf.length>0){var n=ht(this);return!0===this.Nf&&0===this.tf.length?(cn(this),Jn(t)):fn(this),R(M(n,!1,t.Gd.Wd))}var i=G(t);return fn(this),i},t}();function sn(t){return!!s(t)&&!!p.prototype.hasOwnProperty.call(t,"Pf")}function fn(t){!1!==hn(t)&&(!0!==t.Df?(t.Df=!0,P(t.Bf(),function(){t.Df=!1,!0===t.Lf&&(t.Lf=!1,fn(t))},function(n){dn(t,n)})):t.Lf=!0)}function hn(t){var n=t.Pf;return!1!==wn(t)&&!1!==t.mf&&(!0===$n(n)&&Z(n)>0||ln(t)>0)}function cn(t){t.Bf=void 0,t.Cf=void 0,t.Af=void 0}function an(t){var n=t.Pf;t.Nf=!0,0===t.tf.length&&(cn(t),Jn(n))}function vn(t,n){var i=t.Pf;if(!0===$n(i)&&Z(i)>0)$(i,n,!1);else{var e=void 0;try{e=t.Af(n)}catch(n){throw dn(t,n),n}try{ct(t,n,e)}catch(n){throw dn(t,n),n}}fn(t)}function dn(t,n){var i=t.Pf;"readable"===i.Ra&&(at(t),cn(t),Qn(i,n))}function ln(t){var n=t.Pf.Ra;return"errored"===n?null:"closed"===n?0:t.kf-t.if}function wn(t){var n=t.Pf.Ra;return!1===t.Nf&&"readable"===n}function bn(t,n,i,e,r,o,u){n.Pf=t,n.tf=void 0,n.if=void 0,at(n),n.mf=!1,n.Nf=!1,n.Lf=!1,n.Df=!1,n.Af=u,n.kf=o,n.Bf=e,n.Cf=r,t.Jd=n,P(R(i()),function(){n.mf=!0,fn(n)},function(t){dn(n,t)})}function gn(t){return new m("ReadableStreamDefaultController.prototype."+t+" can only be used on a ReadableStreamDefaultController")}var mn=Number.isInteger||function(t){return"number"==typeof t&&isFinite(t)&&y.floor(t)===t},pn=function(){function t(){throw new m("ReadableStreamBYOBRequest cannot be used directly")}return p.defineProperty(t.prototype,"view",{get:function(){if(!1===Sn(this))throw Ln("view");return this.Mf},enumerable:!0,configurable:!0}),t.prototype.respond=function(t){if(!1===Sn(this))throw Ln("respond");if(void 0===this.Of)throw new m("This BYOB request has been invalidated");this.Mf.buffer,function(t,n){if(!1===c(n=Number(n)))throw new RangeError("bytesWritten must be a finite");Dn(t,n)}(this.Of,t)},t.prototype.respondWithNewView=function(t){if(!1===Sn(this))throw Ln("respond");if(void 0===this.Of)throw new m("This BYOB request has been invalidated");if(!ArrayBuffer.isView(t))throw new m("You can only respond with array buffer views");t.buffer,function(t,n){var i=t.Ff.peek();if(i.byteOffset+i.bytesFilled!==n.byteOffset)throw new RangeError("The region specified by view does not match byobRequest");if(i.byteLength!==n.byteLength)throw new RangeError("The buffer of view has different capacity than byobRequest");i.buffer=n.buffer,Dn(t,n.byteLength)}(this.Of,t)},t}(),yn=function(){function t(){throw new m("ReadableByteStreamController constructor cannot be used directly")}return p.defineProperty(t.prototype,"byobRequest",{get:function(){if(!1===_n(this))throw Un("byobRequest");if(void 0===this.Vf&&this.Ff.length>0){var t=this.Ff.peek(),n=new I(t.buffer,t.byteOffset+t.bytesFilled,t.byteLength-t.bytesFilled),i=p.create(pn.prototype);!function(t,n,i){t.Of=n,t.Mf=i}(i,this,n),this.Vf=i}return this.Vf},enumerable:!0,configurable:!0}),p.defineProperty(t.prototype,"desiredSize",{get:function(){if(!1===_n(this))throw Un("desiredSize");return Mn(this)},enumerable:!0,configurable:!0}),t.prototype.close=function(){if(!1===_n(this))throw Un("close");if(!0===this.Nf)throw new m("The stream has already been closed; do not close it again!");var t=this.Wf.Ra;if("readable"!==t)throw new m("The stream (in "+t+" state) is not in the readable state and cannot be closed");!function(t){var n=t.Wf;if(t.if>0)t.Nf=!0;else{if(t.Ff.length>0&&t.Ff.peek().bytesFilled>0){var i=new m("Insufficient bytes to fill elements in the given buffer");throw Bn(t,i),i}xn(t),Jn(n)}}(this)},t.prototype.enqueue=function(t){if(!1===_n(this))throw Un("enqueue");if(!0===this.Nf)throw new m("stream is closed or draining");var n=this.Wf.Ra;if("readable"!==n)throw new m("The stream (in "+n+" state) is not in the readable state and cannot be enqueued to");if(!ArrayBuffer.isView(t))throw new m("You can only enqueue array buffer views when using a ReadableByteStreamController");t.buffer,function(t,n){var i=t.Wf,e=n.buffer,r=n.byteOffset,o=n.byteLength,u=e;!0===J(i)?0===Z(i)?En(t,u,r,o):$(i,new I(u,r,o),!1):!0===Vn(i)?(En(t,u,r,o),An(t)):En(t,u,r,o),Tn(t)}(this,t)},t.prototype.error=function(t){if(!1===_n(this))throw Un("error");Bn(this,t)},t.prototype[j]=function(t){this.Ff.length>0&&(this.Ff.peek().bytesFilled=0),at(this);var n=this.Cf(t);return xn(this),n},t.prototype[Y]=function(){var t=this.Wf;if(this.if>0){var n=this.tf.shift();this.if-=n.byteLength,Nn(this);var i=void 0;try{i=new I(n.buffer,n.byteOffset,n.byteLength)}catch(t){return O(t)}return R(M(i,!1,t.Gd.Wd))}var e=this.Uf;if(void 0!==e){var r=void 0;try{r=new ArrayBuffer(e)}catch(t){return O(t)}var o={buffer:r,byteOffset:0,byteLength:e,bytesFilled:0,elementSize:1,ctor:I,readerType:"default"};this.Ff.push(o)}var u=G(t);return Tn(this),u},t}();function _n(t){return!!s(t)&&!!p.prototype.hasOwnProperty.call(t,"Wf")}function Sn(t){return!!s(t)&&!!p.prototype.hasOwnProperty.call(t,"Of")}function Tn(t){var n=function(t){var n=t.Wf;if("readable"!==n.Ra)return!1;if(!0===t.Nf)return!1;if(!1===t.mf)return!1;if(!0===J(n)&&Z(n)>0)return!0;if(!0===Vn(n)&&Wn(n)>0)return!0;var i=Mn(t);return i>0}(t);!1!==n&&(!0!==t.Df?(t.Df=!0,P(t.Bf(),function(){t.Df=!1,!0===t.Lf&&(t.Lf=!1,Tn(t))},function(n){Bn(t,n)})):t.Lf=!0)}function In(t,n){var i=!1;"closed"===t.Ra&&(i=!0);var e=kn(n);"default"===n.readerType?$(t,e,i):function(t,n,i){var e=t.Gd,r=e.Gf.shift();r.Yd(M(n,i,e.Wd))}(t,e,i)}function kn(t){var n=t.bytesFilled,i=t.elementSize;return new t.ctor(t.buffer,t.byteOffset,n/i)}function En(t,n,i,e){t.tf.push({buffer:n,byteOffset:i,byteLength:e}),t.if+=e}function Rn(t,n){var i=n.elementSize,e=n.bytesFilled-n.bytesFilled%i,r=y.min(t.if,n.byteLength-n.bytesFilled),o=n.bytesFilled+r,u=o-o%i,s=r,f=!1;u>e&&(s=u-n.bytesFilled,f=!0);for(var c=t.tf;s>0;){var a=c.peek(),v=y.min(s,a.byteLength),d=n.byteOffset+n.bytesFilled;h(n.buffer,d,a.buffer,a.byteOffset,v),a.byteLength===v?c.shift():(a.byteOffset+=v,a.byteLength-=v),t.if-=v,On(t,v,n),s-=v}return f}function On(t,n,i){Pn(t),i.bytesFilled+=n}function Nn(t){0===t.if&&!0===t.Nf?(xn(t),Jn(t.Wf)):Tn(t)}function Pn(t){void 0!==t.Vf&&(t.Vf.Of=void 0,t.Vf.Mf=void 0,t.Vf=void 0)}function An(t){for(;t.Ff.length>0;){if(0===t.if)return;var n=t.Ff.peek();!0===Rn(t,n)&&(Cn(t),In(t.Wf,n))}}function Dn(t,n){var i=t.Ff.peek();if("closed"===t.Wf.Ra){if(0!==n)throw new m("bytesWritten must be 0 when calling respond() on a closed stream");!function(t,n){n.buffer=n.buffer;var i=t.Wf;if(!0===Vn(i))for(;Wn(i)>0;)In(i,Cn(t))}(t,i)}else!function(t,n,i){if(i.bytesFilled+n>i.byteLength)throw new RangeError("bytesWritten out of range");if(On(t,n,i),!(i.bytesFilled<i.elementSize)){Cn(t);var e=i.bytesFilled%i.elementSize;if(e>0){var r=i.byteOffset+i.bytesFilled,o=i.buffer.slice(r-e,r);En(t,o,0,o.byteLength)}i.buffer=i.buffer,i.bytesFilled-=e,In(t.Wf,i),An(t)}}(t,n,i);Tn(t)}function Cn(t){var n=t.Ff.shift();return Pn(t),n}function xn(t){t.Bf=void 0,t.Cf=void 0}function Bn(t,n){var i=t.Wf;"readable"===i.Ra&&(function(t){Pn(t),t.Ff=new B}(t),at(t),xn(t),Qn(i,n))}function Mn(t){var n=t.Wf.Ra;return"errored"===n?null:"closed"===n?0:t.kf-t.if}function Fn(t,n,i){var e=p.create(yn.prototype),r=v(n,"pull",0,[e]),o=v(n,"cancel",1,[]),u=n.autoAllocateChunkSize;if(void 0!==u&&(u=Number(u),!1===mn(u)||u<=0))throw new RangeError("autoAllocateChunkSize must be a positive integer");!function(t,n,i,e,r,o,u){n.Wf=t,n.Lf=!1,n.Df=!1,n.Vf=void 0,n.tf=n.if=void 0,at(n),n.Nf=!1,n.mf=!1,n.kf=w(o),n.Bf=e,n.Cf=r,n.Uf=u,n.Ff=new B,t.Jd=n,P(R(i()),function(){n.mf=!0,Tn(n)},function(t){Bn(n,t)})}(t,e,function(){return d(n,"start",[e])},r,o,i,u)}function Ln(t){return new m("ReadableStreamBYOBRequest.prototype."+t+" can only be used on a ReadableStreamBYOBRequest")}function Un(t){return new m("ReadableByteStreamController.prototype."+t+" can only be used on a ReadableByteStreamController")}function zn(t){return E(function(n,i){var e={Yd:n,Kd:i};t.Gd.Gf.push(e)})}function Wn(t){return t.Gd.Gf.length}function Vn(t){var n=t.Gd;return void 0!==n&&!!qn(n)}var Hn=function(){function t(t){if(!Gn(t))throw new m("ReadableStreamBYOBReader can only be constructed with a ReadableStream instance given a byte source");if(!1===_n(t.Jd))throw new m("Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte source");if($n(t))throw new m("This stream has already been locked for exclusive reading by another reader");L(this,t),this.Gf=new B}return p.defineProperty(t.prototype,"closed",{get:function(){return qn(this)?this.Zd:O(Xn("closed"))},enumerable:!0,configurable:!0}),t.prototype.cancel=function(t){return qn(this)?void 0===this.Ud?O(W("cancel")):U(this,t):O(Xn("cancel"))},t.prototype.read=function(t){return qn(this)?void 0===this.Ud?O(W("read from")):ArrayBuffer.isView(t)?(t.buffer,0===t.byteLength?O(new m("view must have non-zero byteLength")):function(t,n){var i=t.Ud;return i.Qd=!0,"errored"===i.Ra?O(i.Xd):function(t,n){var i=t.Wf,e=1;n.constructor!==DataView&&(e=n.constructor.BYTES_PER_ELEMENT);var r=n.constructor,o={buffer:n.buffer,byteOffset:n.byteOffset,byteLength:n.byteLength,bytesFilled:0,elementSize:e,ctor:r,readerType:"byob"};if(t.Ff.length>0)return t.Ff.push(o),zn(i);if("closed"===i.Ra)return R(M(new r(o.buffer,o.byteOffset,0),!0,i.Gd.Wd));if(t.if>0){if(!0===Rn(t,o)){var u=kn(o);return Nn(t),R(M(u,!1,i.Gd.Wd))}if(!0===t.Nf){var s=new m("Insufficient bytes to fill elements in the given buffer");return Bn(t,s),O(s)}}t.Ff.push(o);var f=zn(i);return Tn(t),f}(i.Jd,n)}(this,t)):O(new m("view must be an array buffer view")):O(Xn("read"))},t.prototype.releaseLock=function(){if(!qn(this))throw Xn("releaseLock");if(void 0!==this.Ud){if(this.Gf.length>0)throw new m("Tried to release a reader lock when that reader has pending read() calls un-settled");z(this)}},t}();function qn(t){return!!s(t)&&!!p.prototype.hasOwnProperty.call(t,"Gf")}function Xn(t){return new m("ReadableStreamBYOBReader.prototype."+t+" can only be used on a ReadableStreamBYOBReader")}var jn=function(){function t(t,n){void 0===t&&(t={}),void 0===n&&(n={}),Kn(this);var i=n.size,e=n.highWaterMark,r=t.type;if("bytes"===String(r)){if(void 0!==i)throw new RangeError("The strategy for a byte stream cannot have a size function");void 0===e&&(e=0),Fn(this,t,e=w(e))}else{if(void 0!==r)throw new RangeError("Invalid type is specified");var o=b(i);void 0===e&&(e=1),function(t,n,i,e){var r=p.create(un.prototype),o=v(n,"pull",0,[r]),u=v(n,"cancel",1,[]);bn(t,r,function(){return d(n,"start",[r])},o,u,i,e)}(this,t,e=w(e),o)}}return p.defineProperty(t.prototype,"locked",{get:function(){if(!1===Gn(this))throw ti("locked");return $n(this)},enumerable:!0,configurable:!0}),t.prototype.cancel=function(t){return!1===Gn(this)?O(ti("cancel")):!0===$n(this)?O(new m("Cannot cancel a stream that already has a reader")):Zn(this,t)},t.prototype.getReader=function(t){var n=(void 0===t?{}:t).mode;if(!1===Gn(this))throw ti("getReader");if(void 0===n)return K(this,!0);if("byob"===(n=String(n)))return function(t,n){void 0===n&&(n=!1);var i=new Hn(t);return i.Wd=n,i}(this,!0);throw new RangeError("Invalid mode is specified")},t.prototype.pipeThrough=function(t,n){var i=t.writable,e=t.readable,r=void 0===n?{}:n,o=r.preventClose,u=r.preventAbort,s=r.preventCancel,f=r.signal;if(!1===Gn(this))throw ti("pipeThrough");if(!1===gt(i))throw new m("writable argument to pipeThrough must be a WritableStream");if(!1===Gn(e))throw new m("readable argument to pipeThrough must be a ReadableStream");if(o=Boolean(o),u=Boolean(u),s=Boolean(s),void 0!==f&&!tn(f))throw new m("ReadableStream.prototype.pipeThrough's signal option must be an AbortSignal");if(!0===$n(this))throw new m("ReadableStream.prototype.pipeThrough cannot be used on a locked ReadableStream");if(!0===mt(i))throw new m("ReadableStream.prototype.pipeThrough cannot be used on a locked WritableStream");return x(on(this,i,o,u,s,f)),e},t.prototype.pipeTo=function(t,n){var i=void 0===n?{}:n,e=i.preventClose,r=i.preventAbort,o=i.preventCancel,u=i.signal;return!1===Gn(this)?O(ti("pipeTo")):!1===gt(t)?O(new m("ReadableStream.prototype.pipeTo's first argument must be a WritableStream")):(e=Boolean(e),r=Boolean(r),o=Boolean(o),void 0===u||tn(u)?!0===$n(this)?O(new m("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream")):!0===mt(t)?O(new m("ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream")):on(this,t,e,r,o,u):O(new m("ReadableStream.prototype.pipeTo's signal option must be an AbortSignal")))},t.prototype.tee=function(){if(!1===Gn(this))throw ti("tee");var t=function(t){var n,i,e,r,o,u=K(t),s=!1,h=!1,c=!1,a=E(function(t){o=t});function v(){return!0===s||(s=!0,x(C(rt(u),function(t){if(s=!1,!0===t.done)return!1===h&&an(e.Jd),void(!1===c&&an(r.Jd));var n=t.value,i=n,o=n;!1===h&&vn(e.Jd,i),!1===c&&vn(r.Jd,o)}))),R(void 0)}function d(){}return e=Yn(d,v,function(e){if(h=!0,n=e,!0===c){var r=f([n,i]),u=Zn(t,r);o(u)}return a}),r=Yn(d,v,function(e){if(c=!0,i=e,!0===h){var r=f([n,i]),u=Zn(t,r);o(u)}return a}),D(u.Zd,function(t){dn(e.Jd,t),dn(r.Jd,t)}),[e,r]}(this);return f(t)},t.prototype.getIterator=function(t){var n=(void 0===t?{}:t).preventCancel,i=void 0!==n&&n;if(!1===Gn(this))throw ti("getIterator");return function(t,n){void 0===n&&(n=!1);var i=K(t),e=p.create(ut);return e.$d=i,e.ul=Boolean(n),e}(this,i)},t}();function Yn(t,n,i,e,r){void 0===e&&(e=1),void 0===r&&(r=function(){return 1});var o=p.create(jn.prototype);return Kn(o),bn(o,p.create(un.prototype),t,n,i,e,r),o}function Kn(t){t.Ra="readable",t.Gd=void 0,t.Xd=void 0,t.Qd=!1}function Gn(t){return!!s(t)&&!!p.prototype.hasOwnProperty.call(t,"Jd")}function $n(t){return void 0!==t.Gd}function Zn(t,n){return t.Qd=!0,"closed"===t.Ra?R(void 0):"errored"===t.Ra?O(t.Xd):(Jn(t),C(t.Jd[j](n),r))}function Jn(t){t.Ra="closed";var n=t.Gd;void 0!==n&&(et(n)&&(n.qd.forEach(function(t){t.Yd(M(void 0,!0,n.Wd))}),n.qd=new B),X(n))}function Qn(t,n){t.Ra="errored",t.Xd=n;var i=t.Gd;void 0!==i&&(et(i)?(i.qd.forEach(function(t){t.Kd(n)}),i.qd=new B):(i.Gf.forEach(function(t){t.Kd(n)}),i.Gf=new B),q(i,n))}function ti(t){return new m("ReadableStream.prototype."+t+" can only be used on a ReadableStream")}"symbol"===F(i.asyncIterator)&&p.defineProperty(jn.prototype,i.asyncIterator,{value:jn.prototype.getIterator,enumerable:!1,writable:!0,configurable:!0});var ni=function(){function t(t){var n=t.highWaterMark;this.highWaterMark=n}return t.prototype.size=function(t){return t.byteLength},t}(),ii=function(){function t(t){var n=t.highWaterMark;this.highWaterMark=n}return t.prototype.size=function(){return 1},t}(),ei=function(){function t(t,n,i){void 0===t&&(t={}),void 0===n&&(n={}),void 0===i&&(i={});var e=n.size,r=n.highWaterMark,o=i.size,u=i.highWaterMark;if(void 0!==t.writableType)throw new RangeError("Invalid writable type specified");var s=b(e);if(void 0===r&&(r=1),r=w(r),void 0!==t.readableType)throw new RangeError("Invalid readable type specified");var f,h=b(o);void 0===u&&(u=0),u=w(u),function(t,n,i,e,r,o){function u(){return n}function s(n){return function(t,n){var i=t.Xf;return!0===t.lf?C(t.Zf,function(){var e=t.Hf;if("erroring"===e.Ra)throw e.Xd;return vi(i,n)}):vi(i,n)}(t,n)}function f(n){return function(t,n){return oi(t,n),R(void 0)}(t,n)}function h(){return function(t){var n=t.zf,i=t.Xf,e=i.Yf();return ci(i),C(e,function(){if("errored"===n.Ra)throw n.Xd;var t=n.Jd;!0===wn(t)&&an(t)},function(i){throw oi(t,i),n.Xd})}(t)}function c(){return function(t){return si(t,!1),t.Zf}(t)}function a(n){return ui(t,n),R(void 0)}t.Hf=function(t,n,i,e,r,o){void 0===r&&(r=1),void 0===o&&(o=function(){return 1});var u=p.create(lt.prototype);return bt(u),Bt(u,p.create(xt.prototype),t,n,i,e,r,o),u}(u,s,h,f,i,e),t.zf=Yn(u,c,a,r,o),t.lf=void 0,t.Zf=void 0,t.Kf=void 0,si(t,!0),t.Xf=void 0}(this,E(function(t){f=t}),r,s,u,h),function(t,n){var i=p.create(fi.prototype),e=function(t){try{return ai(i,t),R(void 0)}catch(t){return O(t)}},r=n.transform;if(void 0!==r){if("function"!=typeof r)throw new m("transform is not a method");e=function(t){return l(r,n,[t,i])}}var o=v(n,"flush",0,[i]);!function(t,n,i,e){n.qf=t,t.Xf=n,n.jf=i,n.Yf=e}(t,i,e,o)}(this,t);var c=d(t,"start",[this.Xf]);f(c)}return p.defineProperty(t.prototype,"readable",{get:function(){if(!1===ri(this))throw li("readable");return this.zf},enumerable:!0,configurable:!0}),p.defineProperty(t.prototype,"writable",{get:function(){if(!1===ri(this))throw li("writable");return this.Hf},enumerable:!0,configurable:!0}),t}();function ri(t){return!!s(t)&&!!p.prototype.hasOwnProperty.call(t,"Xf")}function oi(t,n){dn(t.zf.Jd,n),ui(t,n)}function ui(t,n){ci(t.Xf),Ut(t.Hf.nf,n),!0===t.lf&&si(t,!1)}function si(t,n){void 0!==t.Zf&&t.Kf(),t.Zf=E(function(n){t.Kf=n}),t.lf=n}var fi=function(){function t(){throw new m("TransformStreamDefaultController instances cannot be created directly")}return p.defineProperty(t.prototype,"desiredSize",{get:function(){if(!1===hi(this))throw di("desiredSize");return ln(this.qf.zf.Jd)},enumerable:!0,configurable:!0}),t.prototype.enqueue=function(t){if(!1===hi(this))throw di("enqueue");ai(this,t)},t.prototype.error=function(t){if(!1===hi(this))throw di("error");!function(t,n){oi(t.qf,n)}(this,t)},t.prototype.terminate=function(){if(!1===hi(this))throw di("terminate");!function(t){var n=t.qf,i=n.zf.Jd;!0===wn(i)&&an(i);var e=new m("TransformStream terminated");ui(n,e)}(this)},t}();function hi(t){return!!s(t)&&!!p.prototype.hasOwnProperty.call(t,"qf")}function ci(t){t.jf=void 0,t.Yf=void 0}function ai(t,n){var i=t.qf,e=i.zf.Jd;if(!1===wn(e))throw new m("Readable side is not in a state that permits enqueue");try{vn(e,n)}catch(t){throw ui(i,t),i.zf.Xd}var r=function(t){return!0!==hn(t)}(e);r!==i.lf&&si(i,!0)}function vi(t,n){return C(t.jf(n),void 0,function(n){throw oi(t.qf,n),n})}function di(t){return new m("TransformStreamDefaultController.prototype."+t+" can only be used on a TransformStreamDefaultController")}function li(t){return new m("TransformStream.prototype."+t+" can only be used on a TransformStream")}t.ByteLengthQueuingStrategy=ni,t.CountQueuingStrategy=ii,t.ReadableStream=jn,t.TransformStream=ei,t.WritableStream=lt,p.defineProperty(t,"__esModule",{value:!0})},"object"===(void 0===t?"undefined":F(t))&&void 0!==i?o(t):"function"==typeof define&&define.amd?define(["exports"],o):o((r=r||self).WebStreamsPolyfill={})}),_t=C(function(t){function n(){var t=yt();return n=function(){return t},t}x(),pt(),p.defineProperty(t,"__esModule",{value:!0}),function(t,n){for(var i in n)p.defineProperty(t,i,{enumerable:!0,get:p.getOwnPropertyDescriptor(n,i).get})}(t,{get ByteLengthQueuingStrategy(){return n().ByteLengthQueuingStrategy},get CountQueuingStrategy(){return n().CountQueuingStrategy},get ReadableStream(){return n().ReadableStream},get TransformStream(){return n().TransformStream},get WritableStream(){return n().WritableStream}})});function St(t,n){return(St=p.setPrototypeOf||function(t,n){return t.__proto__=n,t})(t,n)}function Tt(t,n){if("function"!=typeof n&&null!==n)throw new m("Super expression must either be null or a function");t.prototype=p.create(n&&n.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),n&&St(t,n)}function It(t,n){for(var i=0;i<n.length;i++){var e=n[i];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),p.defineProperty(t,e.key,e)}}function kt(t,n,i){return n&&It(t.prototype,n),i&&It(t,i),t}function Et(t,n){(null==n||n>t.length)&&(n=t.length);for(var i=0,e=new Array(n);i<n;i++)e[i]=t[i];return e}function Rt(t,i){var r=void 0!==n&&t[e]||t["@@iterator"];if(r)return(r=r.call(t)).next.bind(r);if(Array.isArray(t)||(r=function(t,n){if(t){if("string"==typeof t)return Et(t,n);var i=p.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(i):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?Et(t,n):void 0}}(t))||i&&t&&"number"==typeof t.length){r&&(t=r);var o=0;return function(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}}}throw new m("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}x(),pt(),x(),pt(),x(),pt(),x(),pt(),x(),pt(),x(),pt(),x(),pt(),x(),pt(),M(),x(),pt(),M(),x(),pt(),x(),pt(),x(),pt(),x(),pt(),x(),pt(),M(),x(),pt();var Ot,Nt=((Ot={}).Sv="web",Ot.Tv="android",Ot.Ev="android-tv",Ot.Rv="ios",Ot.Iv="tvos",Ot.xv="chromecast",Ot.Cv="theoliveweb",Ot);var Pt=v?v.userAgent:"",At=Pt.match(/chrome\/([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)/i),Dt=Pt.match(/Edg\/([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)/i),Ct=Pt.match(/Android ([0-9\.]+)/i),xt=Pt.match(/Windows NT ([0-9\.]+)/i),Bt=Pt.match(/(Version)\/((\d+)\.(\d+)(?:\.(\d+))?).*Safari/),Mt=Pt.match(/Firefox\/([0-9\.]+)/i),Ft=Pt.match(/OPR\/(\d+\.\d+)/i),Lt=Pt.match(/Tizen ([0-9\.]+)/i),Ut=Pt.match(/(iPhone OS|iPad OS|iPod OS|Mac OS X) (\d+)_(\d+)_?(\d+)?/),zt=Pt.match(/HbbTV\/([0-9.]+)/i),Wt=Pt.match(/(AFT.*) Build/i),Vt=function(){function t(){this.Pv=Boolean("ontouchstart"in self||self.DocumentTouch&&B(a,self.DocumentTouch)||v&&v.msMaxTouchPoints),this.Dv=/(mac\sos\sx)\s?([\w\s\.]+\w)*/i.test(Pt)||/(macintosh|mac(?=_powerpc)\s)/i.test(Pt),this.Lv=/Windows NT/i.test(Pt),this.Ov=xt?S(xt[1]):0,this.Vv=/Android/i.test(Pt),this.Uv=Ct?S(Ct[1]):0,this.Xv=/windows phone (8|8\.1)/i.test(Pt),this.Hv=/iPhone/i.test(Pt),this.Yv=/iPad/i.test(Pt),this.qv=this.Dv&&this.Pv&&!this.Yv,this.Jv=/iPod/i.test(Pt),this.r_=/Mobile Safari/i.test(Pt),this.e_=/EOS\d*STB/i.test(Pt),this.n_=/APP\d*STB/i.test(Pt),this.$v=(this.Hv||this.Yv||this.qv||this.Jv)&&!this.Xv,this.i_=Ut?S(Ut[2]):0,this.h_=this.Xv||this.$v||this.Vv||this.r_,this.a_=/CriOS/i.test(Pt),this.c_=Boolean(self.chrome&&/google/i.test(v.vendor))||this.a_,this.__=this.c_&&/Edg\//i.test(v.userAgent),this.m_=Dt?_(Dt[1],10):0,this.Dg=Boolean(/CriOS/i.test(Pt)),this.Ng=Boolean(self.chrome||/Chrome/i.test(Pt)||this.Dg),this.f_=At?_(At[1],10):0,this.y_=/SMART-TV.*Tizen/i.test(Pt),this.A_=Lt?S(Lt[1]):0,this.l_=this.A_>0?function(t){return t>=8?108:t>=7?94:t>=6.5?85:t>=6?76:t>=5.5?69:t>=5?63:t>=4?56:t>=3?47:0}(this.A_):void 0,this.T_=/webos|web0s/i.test(Pt),this.E_=/HbbTV/i.test(Pt),this.I_=!!zt&&function(t){if(!t)return!1;var n=t.split(".").map(Number);return 3===n.length&&1===n[0]&&2===n[1]}(zt[1]),this.C_=/AFT.* Build/i.test(Pt),this.P_=Wt?Wt[1]:void 0,this.D_=/VIZIO/i.test(Pt),this.L_=/Edge\/\d+/i.test(Pt),this.O_=/Trident/i.test(Pt),this.V_=this.O_&&!self.ActiveXObject&&"ActiveXObject"in self,this.U_=/Vivaldi/i.test(Pt),this.X_=/Firefox/i.test(Pt)&&!/Seamonkey/i.test(Pt),this.H_=Mt?S(Mt[1]):0,this.Y_=/Safari/i.test(Pt)&&!/Chrome/i.test(Pt)&&!this.Xv&&!this.y_,this.q_=Bt?S(Bt[2]):0,this.Q_=Boolean(Ft),this.eg=Ft?S(Ft[1]):0,this.hg=/CrKey/.test(Pt),this.ag=/\b(tv|smart-tv|smarttv|appletv|crkey|googletv|hbbtv|pov_tv|roku|viera|nettv|philipstv|vizio)\b/i.test(Pt),this.fg=/PlayStation 4/i.test(Pt),this._g=/PlayStation 5/i.test(Pt),this.pg="web"===Nt.Ev,this.yg="web"===Nt.Tv,this.Sg=this.yg||this.pg,this.Eg="web"===Nt.Rv,this.Ig="web"===Nt.Iv,this.Cg="web"===Nt.xv}return kt(t,[{key:"Ke",get:function(){return this.Pv}},{key:"Nv",get:function(){return this.Dv}},{key:"Bv",get:function(){return this.Lv}},{key:"Mv",get:function(){return this.Ov}},{key:"Fv",get:function(){return this.Vv}},{key:"Wv",get:function(){return this.Uv}},{key:"Gv",get:function(){return this.Xv}},{key:"Zv",get:function(){return this.Hv}},{key:"zv",get:function(){return this.Yv}},{key:"Kv",get:function(){return this.qv}},{key:"Qv",get:function(){return this.Jv}},{key:"ru",get:function(){return this.$v}},{key:"t_",get:function(){return this.i_}},{key:"s_",get:function(){return this.e_||this.n_}},{key:"vd",get:function(){return this.r_}},{key:"Ks",get:function(){return this.h_}},{key:"o_",get:function(){return this.a_}},{key:"u_",get:function(){return this.c_}},{key:"d_",get:function(){var t;return null!=(t=this.l_)?t:this.f_}},{key:"v_",get:function(){return this.__}},{key:"g_",get:function(){var t;return(null==(t=c.chrome)?void 0:t.webview)&&this.m_>0}},{key:"p_",get:function(){return this.m_}},{key:"w_",get:function(){return this.y_}},{key:"b_",get:function(){return this.A_}},{key:"S_",get:function(){return this.T_}},{key:"k_",get:function(){return this.E_}},{key:"R_",get:function(){return this.I_}},{key:"x_",get:function(){return this.C_}},{key:"IS_FIRETV_AFTMM",get:function(){return"AFTMM"===this.P_}},{key:"N_",get:function(){return this.D_}},{key:"B_",get:function(){return this.L_}},{key:"M_",get:function(){return this.O_}},{key:"F_",get:function(){return this.V_}},{key:"W_",get:function(){return this.U_}},{key:"G_",get:function(){return this.X_}},{key:"Z_",get:function(){return this.H_}},{key:"z_",get:function(){return this.Y_}},{key:"K_",get:function(){return 0===this.q_&&Ht.ru?this.i_:this.q_}},{key:"j_",get:function(){return this.Q_}},{key:"J_",get:function(){return this.eg}},{key:"rg",get:function(){return this.hg}},{key:"og",get:function(){return this.ag}},{key:"cg",get:function(){return!(!this.S_&&!this.w_)&&this.d_<=56}},{key:"dg",get:function(){return this.fg}},{key:"vg",get:function(){return this._g}},{key:"gg",get:function(){return this.pg}},{key:"wg",get:function(){return this.yg}},{key:"Ag",get:function(){return this.Sg}},{key:"Tg",get:function(){return this.Eg}},{key:"Rg",get:function(){return this.Ig}},{key:"xg",get:function(){return this.Cg}},{key:"Pg",get:function(){return this.Ng}},{key:"IS_IOS_CHROME",get:function(){return this.Dg}}]),t}();Vt.Bg=new Vt;var Ht=Vt.Bg;x(),pt(),et();var qt={}.toString;function Xt(t){return null!=t}var jt,Yt=Array.isArray||function(t){return"[object Array]"===qt.call(t)};function Kt(t){return"object"===(void 0===t?"undefined":F(t))&&null!==t}function Gt(t){return"function"==typeof t}function $t(t){return Gt(t)||Kt(t)}function Zt(t){jt=t}x(),pt(),x(),pt();var Jt=function(){};function Qt(t){var n;return function(){return void 0!==t&&(n=t(),t=void 0),n}}function tn(t,n,i,e,r,o,u){try{var s=t[o](u),f=s.value}catch(t){return void i(t)}s.done?n(f):tt.resolve(f).then(e,r)}function nn(t){return function(){var n=this,i=arguments;return new tt(function(e,r){var o=t.apply(n,i);function u(t){tn(o,e,r,u,s,"next",t)}function s(t){tn(o,e,r,u,s,"throw",t)}u(void 0)})}}function en(t,i){var r,o,u,s={label:0,sent:function(){if(1&u[0])throw u[1];return u[1]},trys:[],ops:[]},f=p.create(("function"==typeof Iterator?Iterator:p).prototype);return f.next=h(0),f.throw=h(1),f.return=h(2),"function"==typeof n&&(f[e]=function(){return this}),f;function h(n){return function(e){return function(n){if(r)throw new m("Generator is already executing.");for(;f&&(f=0,n[0]&&(s=0)),s;)try{if(r=1,o&&(u=2&n[0]?o.return:n[0]?o.throw||((u=o.return)&&u.call(o),0):o.next)&&!(u=u.call(o,n[1])).done)return u;switch(o=0,u&&(n=[2&n[0],u.value]),n[0]){case 0:case 1:u=n;break;case 4:return s.label++,{value:n[1],done:!1};case 5:s.label++,o=n[1],n=[0];continue;case 7:n=s.ops.pop(),s.trys.pop();continue;default:if(!(u=s.trys,(u=u.length>0&&u[u.length-1])||6!==n[0]&&2!==n[0])){s=0;continue}if(3===n[0]&&(!u||n[1]>u[0]&&n[1]<u[3])){s.label=n[1];break}if(6===n[0]&&s.label<u[1]){s.label=u[1],u=n;break}if(u&&s.label<u[2]){s.label=u[2],s.ops.push(n);break}u[2]&&s.ops.pop(),s.trys.pop();continue}n=i.call(t,s)}catch(t){n=[6,t],o=0}finally{r=u=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}([n,e])}}}x(),pt(),x(),pt(),x(),pt(),x(),pt();var rn="function"==typeof SuppressedError?SuppressedError:function(t,n,i){var e=new g(i);return e.name="SuppressedError",e.error=t,e.suppressed=n,e};x(),pt(),x(),pt(),x(),pt(),x(),pt(),x(),pt(),x(),pt(),x(),pt();var on=9007199254740991,un=(y.pow(2,-52),Array.prototype.find,Array.prototype.findLast,"function"==typeof Array.prototype.findIndex?function(t,n){return t.findIndex(n)}:function(t,n){for(var i=0;i<t.length;i+=1){if(n(t[i],i,t))return i}return-1}),sn="function"==typeof Array.prototype.findLastIndex?function(t,n){return t.findLastIndex(n)}:function(t,n){for(var i=t.length-1;i>=0;i-=1){if(n(t[i],i,t))return i}return-1};Array.prototype.at;function fn(t,n){var i=t.indexOf(n);return-1!==i&&(function(t,n){0===n?t.shift():t.splice(n,1)}(t,i),!0)}function hn(t,n){for(var i=new Array(t.length),e=0,r=0;r<t.length;){if(t[r]===n){r++,i.length-=1;break}i[e++]=t[r++]}for(;r<t.length;)i[e++]=t[r++];return i}function cn(t,n){return-1!==t.indexOf(n)}function an(t){t.length=0}Array.prototype.flat,Array.prototype.flatMap;var vn=function(){function t(){this.Ug=!1,this.Gg=!1,this.Xg=[],this.Hg=[]}var n=t.prototype;return n.Wg=function(){if(!this.Ug&&!this.Gg){this.Ug=!0;for(var t,n=Rt(this.Xg.slice());!(t=n()).done;){(0,t.value)()}this.Zg()}},n.Zg=function(){if(!this.Gg){this.Gg=!0;for(var t,n=Rt(this.Hg.slice());!(t=n()).done;){(0,t.value)()}an(this.Xg),an(this.Hg)}},n.zg=function(t){this.Gg||this.Xg.push(t)},n.Yg=function(t){this.Gg||fn(this.Xg,t)},n.Kg=function(t){this.Gg||this.Hg.push(t)},n.qg=function(t){this.Gg||fn(this.Hg,t)},t}(),dn=function(){function t(){this.Qg=new vn}var n=t.prototype;return n.Jg=function(){this.Qg.Wg()},n.Zg=function(){this.Qg.Zg()},n.$g=function(t){var n=this.Qg;if(!n.Ug)if(t.Ug)n.Wg();else if(!n.Gg&&!t.Gg){var i=function(){e(),n.Wg()},e=function(){t.Yg(i),t.qg(e),n.Yg(i),n.qg(e)};t.zg(i),t.Kg(e),n.zg(i),n.Kg(e)}},n.im=function(){var n=new t,i=new t,e=n.jg,r=i.jg,o=this.Qg,u=function(){e.Ug&&r.Gg||r.Ug&&e.Gg?o.Wg():e.Gg&&r.Gg&&o.Zg()};e.zg(u),r.zg(u),e.Kg(u),r.Kg(u),n.$g(o),i.$g(o);return o.Kg(function(){e.Yg(u),r.Yg(u),e.qg(u),r.qg(u)}),[n,i]},n[r]=function(){this.Jg()},t.nm=function(n){for(var i,e=new t,r=Rt(n);!(i=r()).done;){var o=i.value;void 0!==o&&e.$g(o)}return e},kt(t,[{key:"jg",get:function(){return this.Qg}}]),t}();x(),pt(),M(),x(),pt();var ln=function(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];g.apply(this,n)};(ln.prototype=p.create(g.prototype)).constructor=ln;var wn=function(t){function n(n,i){var e;return(e=t.call(this)||this).cause=void 0,e.message=n||"Unknown error",e.cause=i,g.captureStackTrace&&g.captureStackTrace(e,e.constructor),e}return Tt(n,t),kt(n,[{key:"name",get:function(){return"BaseError"}}]),n}(ln),bn=function(t){function n(n,i){return t.call(this,n||"Aborted",i)||this}return Tt(n,t),kt(n,[{key:"name",get:function(){return"AbortError"}}]),n}(wn);function gn(t){return B(t,g)&&"AbortError"===t.name}function mn(t,n){return n?new tt(function(i,e){if(n.Ug)return t.catch(Jt),e(new bn);var r=function(){n.Yg(r),e(new bn)};n.zg(r),t.then(function(t){n.Yg(r),i(t)},function(t){n.Yg(r),e(t)})}):t}function pn(t,n){return nn(function(){var i,e;return en(this,function(u){switch(u.label){case 0:i={stack:[],error:void 0,hasError:!1},u.label=1;case 1:return u.trys.push([1,3,4,5]),function(t,n,i){if(null!=n){if("object"!=typeof n&&"function"!=typeof n)throw new m("Object expected.");var e,u;if(i){if(!o)throw new m("Symbol.asyncDispose is not defined.");e=n[o]}if(void 0===e){if(!r)throw new m("Symbol.dispose is not defined.");e=n[r],i&&(u=e)}if("function"!=typeof e)throw new m("Object not disposable.");u&&(e=function(){try{u.call(this)}catch(t){return tt.reject(t)}}),t.stack.push({value:n,dispose:e,async:i})}else i&&t.stack.push({async:!0});return n}(i,n,!1),[4,t];case 2:return[2,u.sent()];case 3:return e=u.sent(),i.error=e,i.hasError=!0,[3,5];case 4:return function(t){function n(n){t.error=t.hasError?new rn(n,t.error,"An error was suppressed during disposal."):n,t.hasError=!0}var i,e=0;(function r(){for(;i=t.stack.pop();)try{if(!i.async&&1===e)return e=0,t.stack.push(i),tt.resolve().then(r);if(i.dispose){var o=i.dispose.call(i.value);if(i.async)return e|=2,tt.resolve(o).then(r,function(t){return n(t),r()})}else e|=1}catch(t){n(t)}if(1===e)return t.hasError?tt.reject(t.error):tt.resolve();if(t.hasError)throw t.error})()}(i),[7];case 5:return[2]}})})()}tt.resolve();function yn(t,n){return new tt(function(i,e){if(void 0!==n&&n.Ug)e(new bn);else{var r=jt.Og(function(){void 0!==n&&n.Yg(o),i()},t),o=function(){jt.Mg(r),e(new bn)};void 0!==n&&n.zg(o)}})}function _n(){return void 0!==a?a.createElement("video"):void 0}var Sn=Qt(_n);Qt(function(){return"undefined"!=typeof HTMLVideoElement&&B(Sn(),HTMLVideoElement)});x(),pt(),x(),pt(),x(),pt(),et();var Tn=null;try{Tn=new WebAssembly.Instance(new WebAssembly.Module(new I([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch(Ot){}function In(t,n,i){this.low=0|t,this.high=0|n,this.unsigned=!!i}function kn(t){return!0===(t&&t.um)}function En(t){var n=y.clz32(t&-t);return t?31-n:n}In.prototype.um,p.defineProperty(In.prototype,"um",{value:!0}),In.isLong=kn;var Rn={},On={};function Nn(t,n){var i,e,r;return n?(r=0<=(t>>>=0)&&t<256)&&(e=On[t])?e:(i=An(t,0,!0),r&&(On[t]=i),i):(r=-128<=(t|=0)&&t<128)&&(e=Rn[t])?e:(i=An(t,t<0?-1:0,!1),r&&(Rn[t]=i),i)}function Pn(t,n){if(T(t))return n?zn:Un;if(n){if(t<0)return zn;if(t>=Mn)return Xn}else{if(t<=-Fn)return jn;if(t+1>=Fn)return qn}return t<0?Pn(-t,n).neg():An(t%Bn|0,t/Bn|0,n)}function An(t,n,i){return new In(t,n,i)}In.fromInt=Nn,In.fromNumber=Pn,In.fromBits=An;var Dn=y.pow;function Cn(t,n,i){if(0===t.length)throw g("empty string");if("number"==typeof n?(i=n,n=!1):n=!!n,"NaN"===t||"Infinity"===t||"+Infinity"===t||"-Infinity"===t)return n?zn:Un;if((i=i||10)<2||36<i)throw RangeError("radix");var e;if((e=t.indexOf("-"))>0)throw g("interior hyphen");if(0===e)return Cn(t.substring(1),n,i).neg();for(var r=Pn(Dn(i,8)),o=Un,u=0;u<t.length;u+=8){var s=y.min(8,t.length-u),f=_(t.substring(u,u+s),i);if(s<8){var h=Pn(Dn(i,s));o=o.mul(h).add(Pn(f))}else o=(o=o.mul(r)).add(Pn(f))}return o.unsigned=n,o}function xn(t,n){return"number"==typeof t?Pn(t,n):"string"==typeof t?Cn(t,n):An(t.low,t.high,"boolean"==typeof n?n:t.unsigned)}In.fromString=Cn,In.fromValue=xn;var Bn=4294967296,Mn=Bn*Bn,Fn=Mn/2,Ln=Nn(1<<24),Un=Nn(0);In.ZERO=Un;var zn=Nn(0,!0);In.UZERO=zn;var Wn=Nn(1);In.ONE=Wn;var Vn=Nn(1,!0);In.UONE=Vn;var Hn=Nn(-1);In.NEG_ONE=Hn;var qn=An(-1,2147483647,!1);In.MAX_VALUE=qn;var Xn=An(-1,-1,!0);In.MAX_UNSIGNED_VALUE=Xn;var jn=An(0,-2147483648,!1);In.MIN_VALUE=jn;var Yn=In.prototype;Yn.toInt=function(){return this.unsigned?this.low>>>0:this.low},Yn.toNumber=function(){return this.unsigned?(this.high>>>0)*Bn+(this.low>>>0):this.high*Bn+(this.low>>>0)},Yn.toString=function(t){if((t=t||10)<2||36<t)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative()){if(this.eq(jn)){var n=Pn(t),i=this.div(n),e=i.mul(n).sub(this);return i.toString(t)+e.toInt().toString(t)}return"-"+this.neg().toString(t)}for(var r=Pn(Dn(t,6),this.unsigned),o=this,u="";;){var s=o.div(r),f=(o.sub(s.mul(r)).toInt()>>>0).toString(t);if((o=s).isZero())return f+u;for(;f.length<6;)f="0"+f;u=""+f+u}},Yn.getHighBits=function(){return this.high},Yn.getHighBitsUnsigned=function(){return this.high>>>0},Yn.getLowBits=function(){return this.low},Yn.getLowBitsUnsigned=function(){return this.low>>>0},Yn.getNumBitsAbs=function(){if(this.isNegative())return this.eq(jn)?64:this.neg().getNumBitsAbs();for(var t=0!=this.high?this.high:this.low,n=31;n>0&&!(t&1<<n);n--);return 0!=this.high?n+33:n+1},Yn.isSafeInteger=function(){var t=this.high>>21;return!t||!this.unsigned&&(-1===t&&!(0===this.low&&-2097152===this.high))},Yn.isZero=function(){return 0===this.high&&0===this.low},Yn.eqz=Yn.isZero,Yn.isNegative=function(){return!this.unsigned&&this.high<0},Yn.isPositive=function(){return this.unsigned||this.high>=0},Yn.isOdd=function(){return!(1&~this.low)},Yn.isEven=function(){return!(1&this.low)},Yn.equals=function(t){return kn(t)||(t=xn(t)),(this.unsigned===t.unsigned||this.high>>>31!=1||t.high>>>31!=1)&&(this.high===t.high&&this.low===t.low)},Yn.eq=Yn.equals,Yn.notEquals=function(t){return!this.eq(t)},Yn.neq=Yn.notEquals,Yn.ne=Yn.notEquals,Yn.lessThan=function(t){return this.comp(t)<0},Yn.lt=Yn.lessThan,Yn.lessThanOrEqual=function(t){return this.comp(t)<=0},Yn.lte=Yn.lessThanOrEqual,Yn.le=Yn.lessThanOrEqual,Yn.greaterThan=function(t){return this.comp(t)>0},Yn.gt=Yn.greaterThan,Yn.greaterThanOrEqual=function(t){return this.comp(t)>=0},Yn.gte=Yn.greaterThanOrEqual,Yn.ge=Yn.greaterThanOrEqual,Yn.compare=function(t){if(kn(t)||(t=xn(t)),this.eq(t))return 0;var n=this.isNegative(),i=t.isNegative();return n&&!i?-1:!n&&i?1:this.unsigned?t.high>>>0>this.high>>>0||t.high===this.high&&t.low>>>0>this.low>>>0?-1:1:this.sub(t).isNegative()?-1:1},Yn.comp=Yn.compare,Yn.negate=function(){return!this.unsigned&&this.eq(jn)?jn:this.not().add(Wn)},Yn.neg=Yn.negate,Yn.add=function(t){kn(t)||(t=xn(t));var n=this.high>>>16,i=65535&this.high,e=this.low>>>16,r=65535&this.low,o=t.high>>>16,u=65535&t.high,s=t.low>>>16,f=0,h=0,c=0,a=0;return c+=(a+=r+(65535&t.low))>>>16,h+=(c+=e+s)>>>16,f+=(h+=i+u)>>>16,f+=n+o,An((c&=65535)<<16|(a&=65535),(f&=65535)<<16|(h&=65535),this.unsigned)},Yn.subtract=function(t){return kn(t)||(t=xn(t)),this.add(t.neg())},Yn.sub=Yn.subtract,Yn.multiply=function(t){if(this.isZero())return this;if(kn(t)||(t=xn(t)),Tn)return An(Tn.mul(this.low,this.high,t.low,t.high),Tn.get_high(),this.unsigned);if(t.isZero())return this.unsigned?zn:Un;if(this.eq(jn))return t.isOdd()?jn:Un;if(t.eq(jn))return this.isOdd()?jn:Un;if(this.isNegative())return t.isNegative()?this.neg().mul(t.neg()):this.neg().mul(t).neg();if(t.isNegative())return this.mul(t.neg()).neg();if(this.lt(Ln)&&t.lt(Ln))return Pn(this.toNumber()*t.toNumber(),this.unsigned);var n=this.high>>>16,i=65535&this.high,e=this.low>>>16,r=65535&this.low,o=t.high>>>16,u=65535&t.high,s=t.low>>>16,f=65535&t.low,h=0,c=0,a=0,v=0;return a+=(v+=r*f)>>>16,c+=(a+=e*f)>>>16,a&=65535,c+=(a+=r*s)>>>16,h+=(c+=i*f)>>>16,c&=65535,h+=(c+=e*s)>>>16,c&=65535,h+=(c+=r*u)>>>16,h+=n*f+i*s+e*u+r*o,An((a&=65535)<<16|(v&=65535),(h&=65535)<<16|(c&=65535),this.unsigned)},Yn.mul=Yn.multiply,Yn.divide=function(t){if(kn(t)||(t=xn(t)),t.isZero())throw g("division by zero");var n,i,e;if(Tn)return this.unsigned||-2147483648!==this.high||-1!==t.low||-1!==t.high?An((this.unsigned?Tn.div_u:Tn.div_s)(this.low,this.high,t.low,t.high),Tn.get_high(),this.unsigned):this;if(this.isZero())return this.unsigned?zn:Un;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return zn;if(t.gt(this.shru(1)))return Vn;e=zn}else{if(this.eq(jn))return t.eq(Wn)||t.eq(Hn)?jn:t.eq(jn)?Wn:(n=this.shr(1).div(t).shl(1)).eq(Un)?t.isNegative()?Wn:Hn:(i=this.sub(t.mul(n)),e=n.add(i.div(t)));if(t.eq(jn))return this.unsigned?zn:Un;if(this.isNegative())return t.isNegative()?this.neg().div(t.neg()):this.neg().div(t).neg();if(t.isNegative())return this.div(t.neg()).neg();e=Un}for(i=this;i.gte(t);){n=y.max(1,y.floor(i.toNumber()/t.toNumber()));for(var r=y.ceil(y.log(n)/y.LN2),o=r<=48?1:Dn(2,r-48),u=Pn(n),s=u.mul(t);s.isNegative()||s.gt(i);)s=(u=Pn(n-=o,this.unsigned)).mul(t);u.isZero()&&(u=Wn),e=e.add(u),i=i.sub(s)}return e},Yn.div=Yn.divide,Yn.modulo=function(t){return kn(t)||(t=xn(t)),Tn?An((this.unsigned?Tn.rem_u:Tn.rem_s)(this.low,this.high,t.low,t.high),Tn.get_high(),this.unsigned):this.sub(this.div(t).mul(t))},Yn.mod=Yn.modulo,Yn.rem=Yn.modulo,Yn.not=function(){return An(~this.low,~this.high,this.unsigned)},Yn.countLeadingZeros=function(){return this.high?y.clz32(this.high):y.clz32(this.low)+32},Yn.clz=Yn.countLeadingZeros,Yn.countTrailingZeros=function(){return this.low?En(this.low):En(this.high)+32},Yn.ctz=Yn.countTrailingZeros,Yn.and=function(t){return kn(t)||(t=xn(t)),An(this.low&t.low,this.high&t.high,this.unsigned)},Yn.or=function(t){return kn(t)||(t=xn(t)),An(this.low|t.low,this.high|t.high,this.unsigned)},Yn.xor=function(t){return kn(t)||(t=xn(t)),An(this.low^t.low,this.high^t.high,this.unsigned)},Yn.shiftLeft=function(t){return kn(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?An(this.low<<t,this.high<<t|this.low>>>32-t,this.unsigned):An(0,this.low<<t-32,this.unsigned)},Yn.shl=Yn.shiftLeft,Yn.shiftRight=function(t){return kn(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?An(this.low>>>t|this.high<<32-t,this.high>>t,this.unsigned):An(this.high>>t-32,this.high>=0?0:-1,this.unsigned)},Yn.shr=Yn.shiftRight,Yn.shiftRightUnsigned=function(t){return kn(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?An(this.low>>>t|this.high<<32-t,this.high>>>t,this.unsigned):An(32===t?this.high:this.high>>>t-32,0,this.unsigned)},Yn.shru=Yn.shiftRightUnsigned,Yn.shr_u=Yn.shiftRightUnsigned,Yn.rotateLeft=function(t){var n;return kn(t)&&(t=t.toInt()),0==(t&=63)?this:32===t?An(this.high,this.low,this.unsigned):t<32?(n=32-t,An(this.low<<t|this.high>>>n,this.high<<t|this.low>>>n,this.unsigned)):(n=32-(t-=32),An(this.high<<t|this.low>>>n,this.low<<t|this.high>>>n,this.unsigned))},Yn.rotl=Yn.rotateLeft,Yn.rotateRight=function(t){var n;return kn(t)&&(t=t.toInt()),0==(t&=63)?this:32===t?An(this.high,this.low,this.unsigned):t<32?(n=32-t,An(this.high<<n|this.low>>>t,this.low<<n|this.high>>>t,this.unsigned)):(n=32-(t-=32),An(this.low<<n|this.high>>>t,this.high<<n|this.low>>>t,this.unsigned))},Yn.rotr=Yn.rotateRight,Yn.toSigned=function(){return this.unsigned?An(this.low,this.high,!1):this},Yn.toUnsigned=function(){return this.unsigned?this:An(this.low,this.high,!0)},Yn.toBytes=function(t){return t?this.toBytesLE():this.toBytesBE()},Yn.toBytesLE=function(){var t=this.high,n=this.low;return[255&n,n>>>8&255,n>>>16&255,n>>>24,255&t,t>>>8&255,t>>>16&255,t>>>24]},Yn.toBytesBE=function(){var t=this.high,n=this.low;return[t>>>24,t>>>16&255,t>>>8&255,255&t,n>>>24,n>>>16&255,n>>>8&255,255&n]},In.fromBytes=function(t,n,i){return i?In.fromBytesLE(t,n):In.fromBytesBE(t,n)},In.fromBytesLE=function(t,n){return new In(t[0]|t[1]<<8|t[2]<<16|t[3]<<24,t[4]|t[5]<<8|t[6]<<16|t[7]<<24,n)},In.fromBytesBE=function(t,n){return new In(t[4]<<24|t[5]<<16|t[6]<<8|t[7],t[0]<<24|t[1]<<16|t[2]<<8|t[3],n)},"function"==typeof BigInt&&(In.fromBigInt=function(t,n){return An(Number(BigInt.asIntN(32,t)),Number(BigInt.asIntN(32,t>>BigInt(32))),n)},In.fromValue=function(t,n){return"bigint"===(void 0===t?"undefined":F(t))?In.fromBigInt(t,n):xn(t,n)},Yn.toBigInt=function(){var t=BigInt(this.low>>>0);return BigInt(this.unsigned?this.high>>>0:this.high)<<BigInt(32)|t});var Kn=In;function Gn(){return Date.now()||(new Date).getTime()}var $n=1/6,Zn=(Kn.fromNumber(on),Boolean("ontouchstart"in self||self.DocumentTouch&&B(a,self.DocumentTouch))||Boolean(v&&v.msMaxTouchPoints)),Jn=Sn(),Qn=Boolean(Jn&&Jn.webkitShowPlaybackTargetPicker),ti=function(){function t(){this.lm=void 0,this.Wm=!1,this.Ke=Zn,this.Ks=!1,this.hm=!0}var n=t.prototype;return n.fm=function(){return 0},n.Mm=function(t,n){return!0},n.Om=function(t){return t>=2*$n},kt(t,[{key:"dm",get:function(){return void 0===this.lm&&(this.lm=this.fm()),this.lm}},{key:"vm",get:function(){return Ht.Fv?"android":Ht.Nv?"macos":Ht.ru?"ios":Ht.Bv?"windows":"other"}},{key:"_m",get:function(){return Ht.og?"tv":Ht.Ks?"mobile":"desktop"}},{key:"gm",get:function(){return!Ht.og}},{key:"pm",get:function(){if(c.screen)return{width:c.screen.width,height:c.screen.height}}},{key:"wm",get:function(){return c.devicePixelRatio||1}},{key:"ym",get:function(){return Qn}},{key:"Am",get:function(){return!1}},{key:"Sm",get:function(){return!0}},{key:"Tm",get:function(){return!!(Ht.z_||Ht.ru||Ht.g_)||!!Ht.N_}},{key:"Em",get:function(){return Ht.N_}},{key:"Rm",get:function(){return!Ht.ru}},{key:"Im",get:function(){return!0}},{key:"xm",get:function(){return!0}},{key:"Cm",get:function(){return!1}},{key:"Pm",get:function(){}},{key:"Nm",get:function(){return!0}},{key:"Dm",get:function(){return!1}},{key:"Bm",get:function(){return Ht.N_}},{key:"Lm",get:function(){return!1}},{key:"Fm",get:function(){return!1}},{key:"Vm",get:function(){return!1}}]),t}(),ni=function(t){function n(){return t.call(this)||this}return Tt(n,t),n}(ti);x(),pt();var ii=function(t){function n(){return t.apply(this,arguments)||this}return Tt(n,t),n.prototype.Mm=function(t,n){if(t&&t.Um&&n&&n.Um){var i=ei(t.Um,"mp4a.40.2")&&ei(n.Um,"mp4a.40.5"),e=ei(t.Um,"mp4a.40.5")&&ei(n.Um,"mp4a.40.2"),r=ei(t.Um,"mp4a.40.2")&&ei(n.Um,"mp4a.40.34"),o=ei(t.Um,"mp4a.40.34")&&ei(n.Um,"mp4a.40.2"),u=ei(t.Um,"mp4a.40.5")&&ei(n.Um,"mp4a.40.34"),s=ei(t.Um,"mp4a.40.34")&&ei(n.Um,"mp4a.40.5");return!(i||e||r||o||u||s)}return!0},kt(n,[{key:"Pm",get:function(){if(Ht.Nv)return 4096}}]),n}(ni);function ei(t,n){return t.indexOf(n)>-1}x(),pt();var ri=function(t){function n(){return t.apply(this,arguments)||this}return Tt(n,t),n.prototype.Om=function(t){return t>=2},n}(ni);x(),pt();var oi=function(t){function n(){var n;return(n=t.call(this)||this).Wm=Ht.K_>=11,n.hm=Ht.z_&&!(Ht.ru&&Ht.K_<10),n}return Tt(n,t),kt(n,[{key:"Lm",get:function(){return Ht.K_<17}},{key:"Fm",get:function(){return!0}}]),n}(ni);x(),pt();var ui,si=function(t){function n(){return t.apply(this,arguments)||this}return Tt(n,t),kt(n,[{key:"Nm",get:function(){return!Ht.Bv||(Ht.v_?92!==Ht.p_:Ht.d_>=100)}}]),n}(ni);x(),pt(),x(),pt(),x(),pt(),x(),pt(),x(),pt();var fi=function(){var t=_n();if(!t)return!1;var n=t.muted;return t.muted=!n,t.muted!==n}();!function(){if(Ht.Kv)return!1;var t=_n();if(!t)return!1;var n=t.volume;t.volume=n/2+.1,t.volume}();var hi=function(t){function n(n){var i;return(i=t.call(this)||this).Gm=void 0,i.Gm=n,i.Wm=i.Gm.Wm,i.Ke=i.Gm.Ke,i.hm=fi&&i.Gm.hm,i}Tt(n,t);var i=n.prototype;return i.fm=function(){return this.Gm.dm},i.Mm=function(t,n){return this.Gm.Mm(t,n)},i.Om=function(t){return this.Gm.Om(t)},kt(n,[{key:"Pm",get:function(){return this.Gm.Pm}},{key:"Nm",get:function(){return this.Gm.Nm}},{key:"Lm",get:function(){return this.Gm.Lm}}]),n}(ti),ci=function(t){function n(n){var i;return(i=t.call(this,n)||this).Wm=!0,i.Ks=!0,i}return Tt(n,t),kt(n,[{key:"Cm",get:function(){return Ht.ru}}]),n}(hi);x(),pt();var ai=function(t){function n(){return t.apply(this,arguments)||this}return Tt(n,t),n.prototype.fm=function(){return function(t){return t&&$t(c.ManagedMediaSource)?c.ManagedMediaSource:$t(c.MediaSource)?c.MediaSource:void 0}(!0)?t.prototype.fm.call(this):1},kt(n,[{key:"Cm",get:function(){return!0}}]),n}(ci);x(),pt();var vi=function(t){function n(){var n;return(n=t.apply(this,arguments)||this).zm=void 0,n}return Tt(n,t),n.prototype.Mm=function(n,i){return t.prototype.Mm.call(this,n,i)},kt(n,[{key:"Am",get:function(){return Ht.b_<3}},{key:"Sm",get:function(){return Ht.b_>=3}},{key:"pm",get:function(){var t=this;return c.tizen&&!this.zm&&c.tizen.systeminfo.getPropertyValue("DISPLAY",function(n){var i=n.resolutionWidth,e=n.resolutionHeight;1===i&&1===e||(t.zm={width:i,height:e})}),this.zm}},{key:"Dm",get:function(){return Ht.b_<3}}]),n}(hi);x(),pt();var di=function(t){function n(){var n;return(n=t.apply(this,arguments)||this).zm=void 0,n}return Tt(n,t),kt(n,[{key:"pm",get:function(){var t=this;return c.webOS&&!this.zm&&c.webOS.deviceInfo(function(n){t.zm={width:n.screenWidth,height:n.screenHeight}}),this.zm}},{key:"Im",get:function(){return!1}}]),n}(hi);x(),pt();var li=function(t){function n(){return t.apply(this,arguments)||this}return Tt(n,t),kt(n,[{key:"Cm",get:function(){return!0}},{key:"Fm",get:function(){return this.Gm.Fm}}]),n}(hi);x(),pt();var wi=function(t){function n(){return t.apply(this,arguments)||this}return Tt(n,t),kt(n,[{key:"Vm",get:function(){return Ht.IS_FIRETV_AFTMM}}]),n}(hi);!function(t){ui=t}(function(){var t=function(){if(Ht.G_)return new ii;if(Ht.B_||Ht.M_)return new ri;if(Ht.z_)return new oi;if(Ht.u_)return new si;return new ni}();return Ht.ru?new ai(t):Ht.x_?new wi(t):Ht.Ks?new ci(t):Ht.w_?new vi(t):Ht.S_?new di(t):Ht.Nv?new li(t):new hi(t)}()),x(),pt(),x(),pt(),M(),et(),x(),pt();var bi=!(Ht.M_&&!Ht.F_),gi=self.console;function mi(t){if(Kt(t))try{return JSON.stringify(t)}catch(t){}return t}function pi(t){return t.map(mi).join(" ")}function yi(t){var n=gi&&gi[t];return n?n.bind&&bi?n.bind(gi):function(){for(var n=arguments.length,i=new Array(n),e=0;e<n;e++)i[e]=arguments[e];gi[t](pi(i))}:void 0}var _i=yi("log")||Jt,Si=yi("warn")||_i.bind(void 0,"WARNING:"),Ti=yi("error")||_i.bind(void 0,"ERROR:"),Ii=function(){var t=gi&&gi.assert;return t?t.bind&&bi?t.bind(gi):function(t){for(var n=arguments.length,i=new Array(n>1?n-1:0),e=1;e<n;e++)i[e-1]=arguments[e];gi.assert(t,pi(i))}:function(t){for(var n=arguments.length,i=new Array(n>1?n-1:0),e=1;e<n;e++)i[e-1]=arguments[e];t||Ti.apply(void 0,[].concat(["Assertion failed:"],i))}}();function ki(t,n){for(var i=0;i<n.length;i++){var e=n[i];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),p.defineProperty(t,e.key,e)}}function Ei(t,n){var i=function(t,n){var i=t.length;if(i<=1)return t;for(var e=new Array(i),r=1;r<i;r*=2){Ri(t,n,r,e);var o=t;t=e,e=o}return t}(t,n);return i!==t&&Ri(i,null,t.length,t),t}function Ri(t,n,i,e){var r,o,u,s,f,h=t.length,c=0,a=2*i;for(r=0;r<h;r+=a)for(u=(o=r+i)+i,o>h&&(o=h),u>h&&(u=h),s=r,f=o;;)if(s<o&&f<u)n(t[s],t[f])<=0?e[c++]=t[s++]:e[c++]=t[f++];else if(s<o)e[c++]=t[s++];else{if(!(f<u))break;e[c++]=t[f++]}}x(),pt();var Oi=/[a-zA-Z]/,Ni=/[0-9]/,Pi=/[0-9a-fA-F]/,Ai=/^0x/i,Di=/^[0-9]+$/,Ci=/^[0-9a-fA-F]+$/,xi=/^[0-7]+$/,Bi=p.prototype.toString,Mi=Array.isArray||function(t){return"[object Array]"===Bi.call(t)},Fi=void 0!==n&&"symbol"==typeof e;function Li(t){return Mi(t)?t:Array.from(t)}function Ui(t,n,i){var e=t[n];t[n]=t[i],t[i]=e}function zi(t){return t>=65&&t<=90}function Wi(t){return zi(t)||function(t){return t>=97&&t<=122}(t)}function Vi(t){return t>=48&&t<=57}function Hi(t){return Vi(t)||Wi(t)}function qi(t){return Vi(t)||t>=65&&t<=70||t>=97&&t<=102}function Xi(t){return zi(t)?t+32:t}function ji(t){return Vi(t)?t-48:t>=65&&t<=70?t-65+10:t>=97&&t<=102?t-97+10:-1}function Yi(t,n){return void 0===n&&(n=!1),0<=t&&t<=9?t+48:10<=t&&t<=15?t+(n?87:55):-1}var Ki=y.min,Gi=String.fromCharCode;function $i(t){for(var n=t.length,i=[],e=0;e<n;e+=16384){var r=Ki(e+16384,n);i.push(Gi.apply(null,t.slice(e,r)))}return i.join("")}var Zi=2147483647,Ji=/[^\0-\x7E]/,Qi=/[\x2E\u3002\uFF0E\uFF61]/g,te={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},ne=y.floor,ie=String.fromCharCode;function ee(t){throw new RangeError(te[t])}function re(t){for(var n=[],i=0,e=t.length;i<e;){var r=t.charCodeAt(i++);if(r>=55296&&r<=56319&&i<e){var o=t.charCodeAt(i++);56320==(64512&o)?n.push(((1023&r)<<10)+(1023&o)+65536):(n.push(r),i--)}else n.push(r)}return n}var oe,ue,se,fe=function(t,n){return t+22+75*(t<26)-((0!=n)<<5)},he=function(t,n,i){var e=0;for(t=i?ne(t/700):t>>1,t+=ne(t/n);t>455;e+=36)t=ne(t/35);return ne(e+36*t/(t+38))},ce=function(t){return function(t,n){var i=t.split("@"),e="";i.length>1&&(e=i[0]+"@",t=i[1]);var r=function(t,n){for(var i=[],e=t.length;e--;)i[e]=n(t[e]);return i}((t=t.replace(Qi,".")).split("."),n).join(".");return e+r}(t,function(t){return Ji.test(t)?"xn--"+function(t){for(var n=[],i=(t=re(t)).length,e=128,r=0,o=72,u=0,s=t;u<s.length;u++){var f=s[u];f<128&&n.push(ie(f))}var h=n.length,c=h;for(h&&n.push("-");c<i;){for(var a=Zi,v=0,d=t;v<d.length;v++){var l=d[v];l>=e&&l<a&&(a=l)}var w=c+1;a-e>ne((Zi-r)/w)&&ee("overflow"),r+=(a-e)*w,e=a;for(var b=0,g=t;b<g.length;b++){var m=g[b];if(m<e&&++r>Zi&&ee("overflow"),m==e){for(var p=r,y=36;;y+=36){var _=y<=o?1:y>=o+26?26:y-o;if(p<_)break;var S=p-_,T=36-_;n.push(ie(fe(_+S%T,0))),p=ne(S/T)}n.push(ie(fe(p,0))),o=he(r,w,c==h),r=0,++c}}++r,++e}return n.join("")}(t):t})};function ae(t){for(var n=[],i=0;i<t.length;i++){var e=t[i];e>65535&&(e-=65536,n.push(e>>>10&1023|55296),e=56320|1023&e),n.push(e)}return $i(n)}function ve(t){if(t>=55296&&t<=57343)throw new g("Lone surrogate U+"+t.toString(16).toUpperCase()+" is not a scalar value")}function de(t,n){return t>>n&63|128}function le(t,n){4294967168&t?(4294965248&t?4294901760&t?4292870144&t||(n.push(t>>18&7|240),n.push(de(t,12)),n.push(de(t,6))):(ve(t),n.push(t>>12&15|224),n.push(de(t,6))):n.push(t>>6&31|192),n.push(63&t|128)):n.push(t)}function we(t){for(var n=[],i=0;i<t.length;i++){le(t[i],n)}return n}function be(){if(se>=ue)throw new g("Invalid byte index");var t=255&oe[se];if(se++,128==(192&t))return 63&t;throw new g("Invalid continuation byte")}function ge(){var t,n;if(se>ue)throw new g("Invalid byte index");if(se===ue)return!1;if(t=255&oe[se],se++,!(128&t))return t;if(192==(224&t)){if((n=(31&t)<<6|be())>=128)return n;throw new g("Invalid continuation byte")}if(224==(240&t)){if((n=(15&t)<<12|be()<<6|be())>=2048)return ve(n),n;throw new g("Invalid continuation byte")}if(240==(248&t)&&(n=(7&t)<<18|be()<<12|be()<<6|be())>=65536&&n<=1114111)return n;throw new g("Invalid UTF-8 detected")}function me(t){return[37,Yi(t>>4),Yi(15&t)]}function pe(t){return function(t){return t>=0&&t<=31}(t)||t>126}function ye(t){return pe(t)||32===t||34===t||60===t||62===t||96===t}function _e(t){return ye(t)||35===t||63===t||123===t||125===t}function Se(t){return _e(t)||47===t||58===t||59===t||61===t||64===t||t>=91&&t<=94||124===t}function Te(t){return t<33||t>126||34===t||35===t||60===t||62===t}function Ie(t){return Te(t)||39===t}function ke(t,n){if(!n(t))return[t];for(var i=we([t]),e=[],r=0;r<i.length;r++){var o=i[r];e.push.apply(e,me(o))}return e}function Ee(t,n){for(var i=[],e=0,r=re(t);e<r.length;e++){var o=r[e];i.push.apply(i,ke(o,n))}return ae(i)}function Re(t){return function(t){for(var n=[],i=t.length,e=0;e<i;e++){var r=t[e];if(37===r&&e+2<i&&qi(t[e+1])&&qi(t[e+2])){var o=ji(t[e+1])<<4|ji(t[e+2]);n.push(o),e+=2}else n.push(r)}return n}(we(t))}function Oe(t){return ae(function(t){oe=t.slice(),ue=oe.length,se=0;for(var n,i=[];!1!==(n=ge());)i.push(n);return i}(Re(re(t))))}function Ne(t){var n=t.length,i=[0,0,0,0,0,0,0,0],e=0,r=null,o=0;if(o<n&&":"===t[o]){if(!(o+1<n&&":"===t[o+1]))throw new m;o+=2,r=e+=1}for(;o<n;){if(8===e)throw new m("Too many groups");if(":"!==t[o]){for(var u=0,s=0;s<4&&o<n&&Pi.test(t[o]);)u=u<<4|_(t[o],16),o+=1,s+=1;if("."===t[o]){if(0===s)throw new m;if(o-=s,e>6)throw new m;for(var f=0;o<n;){var h=null;if(f>0){if(!("."===t[o]&&f<4))throw new m;o+=1}if(!Ni.test(t[o]))throw new m;for(;o<n&&Ni.test(t[o]);){var c=_(t[o],10);if(null===h)h=c;else{if(0===h)throw new m;if((h=10*h+c)>255)throw new m}o+=1}i[e]=i[e]<<8|h,2!==(f+=1)&&4!==f||(e+=1)}if(4!==f)throw new m;break}if(":"===t[o]){if((o+=1)===n)throw new m}else if(o<n)throw new m;i[e]=u,e+=1}else{if(null!==r)throw new m("Too many :: groups");o+=1,r=e+=1}}if(null!==r){var a=e-r;for(e=7;0!==e&&a>0;)Ui(i,e,r+a-1),e-=1,a-=1}else if(8!==e)throw new m;return i}function Pe(t){var n=10,i=Di;return Ai.test(t)?(t=t.slice(2),n=16,i=Ci):t.length>=2&&"0"===t[0]&&(t=t.slice(1),n=8,i=xi),""===t?0:i.test(t)?_(t,n):void 0}var Ae={Ym:4},De=/[\0\t\n\r #%/:?@\[\\\]]/,Ce=/[\0\t\n\r #/:?@\[\\\]]/;function xe(t,n){if("["===t[0]){if("]"!==t[t.length-1])throw new m("Invalid IPv6 address");return{Ym:2,Km:Ne(t.slice(1,-1))}}if(!n)return function(t){if(Ce.test(t))throw new m("Invalid code point in opaque host");var n=Ee(t,pe);return""===n?Ae:{Ym:3,qm:n}}(t);var i=function(t){var n=function(t){return ce(t.toLowerCase())}(t);return n}(Oe(t));if(De.test(i))throw new m("Invalid code point in host");var e=function(t){var n=t.split(".");if(""===n[n.length-1]&&n.pop(),!(n.length>4)){for(var i=[],e=0;e<n.length;e++){var r=n[e];if(""===r)return;var o=Pe(r);if(void 0===o)return;i.push(o)}for(var u=0;u<i.length-1;u++)if(i[u]>255)throw new m;if(i[i.length-1]>=y.pow(256,5-i.length))throw new m;for(var s=i.pop(),f=0;f<i.length;f++)s+=i[f]*y.pow(256,3-f);return s}}(i);return void 0!==e?{Ym:1,Km:e}:""===i?Ae:{Ym:0,jm:i}}function Be(t){switch(t.Ym){case 0:return t.jm;case 1:return function(t){for(var n=[],i=t,e=1;e<=4;e++)n.push(""+(255&i)),4!==e&&n.push("."),i>>>=8;return n.reverse().join("")}(t.Km);case 2:return"["+function(t){for(var n="",i=function(t){for(var n=0,i=0,e=0,r=0,o=0;o<8;o++)0===t[o]?(0===r&&(e=o),r++):(r>i&&(n=e,i=r),r=0);return r>i&&(n=e,i=r),i>1?n:null}(t),e=!1,r=0;r<8;r++){if(e){if(0===t[r])continue;e=!1}i!==r?(n+=t[r].toString(16),7!==r&&(n+=":")):(n+=0===r?"::":":",e=!0)}return n}(t.Km)+"]";case 3:return t.qm;case 4:return""}}var Me=/\+/g;function Fe(t){return 42===t||45===t||46===t||95===t||Hi(t)}function Le(t){for(var n=t.split("&"),i=[],e=0;e<n.length;e++){var r=n[e];if(""!==r){var o=r.indexOf("="),u=void 0,s=void 0;-1!==o?(u=r.slice(0,o),s=r.slice(o+1)):(u=r,s=""),u=u.replace(Me," "),s=s.replace(Me," ");var f=Oe(u),h=Oe(s);i.push([f,h])}}return i}function Ue(t){for(var n="",i=0;i<t.length;i++){var e=t[i];i>0&&(n+="&"),n+=ze(we(re(e[0])))+"="+ze(we(re(e[1])))}return n}function ze(t){for(var n=[],i=0;i<t.length;i++){var e=t[i];32===e?n.push(43):Fe(e)?n.push(e):n.push.apply(n,me(e))}return $i(n)}var We=/(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])/;function Ve(t){var n=""+t,i=We.exec(n);return i?function(t,n){for(var i=t.length,e=[],r=n;r<i;r++){var o=t.charCodeAt(r);if(qe(o))if(Xe(o)||r===i-1)e.push(He);else{var u=t.charCodeAt(r+1);Xe(u)?(e.push(o,u),r++):e.push(He)}else e.push(o)}return t.slice(0,n)+$i(e)}(n,i.index):n}var He=65533,qe=function(t){return 55296==(63488&t)},Xe=function(t){return!!(1024&t)};function je(t,n){var i=t[0],e=n[0];return i===e?0:i<e?-1:1}function Ye(t){t.Qm.length=0}function Ke(t,n){!function(t,n){for(var i=0;i<n.length;i++)t[i]=n[i];t.length=n.length}(t.Qm,Le(n))}function Ge(t){if(t.rc){var n=Ue(t.Qm);""===n&&(n=null),t.rc.rc.Jm=n}}var $e=function(){function t(t){if(void 0===t&&(t=void 0),this.rc=null,null==t)this.Qm=[];else if("object"==typeof t||"function"==typeof t)if(function(t){return t instanceof $e&&!!Mi(t.Qm)&&(!Fi||t[e]===Ze)}(t))this.Qm=t.Qm.slice();else if(function(t){return null!=t&&(!!Mi(t)||!!Fi&&"function"==typeof t[e])}(t)){this.Qm=[];for(var n=0,i=Li(t);n<i.length;n++){var r=Li(i[n]);if(2!==r.length)throw new m("Invalid name-value pair");this.Qm.push([Ve(r[0]),Ve(r[1])])}}else for(var o in this.Qm=[],t)p.prototype.hasOwnProperty.call(t,o)&&this.Qm.push([Ve(o),Ve(t[o])]);else(t=Ve(t)).length>0&&"?"===t[0]&&(t=t.slice(1)),this.Qm=Le(t)}var n=t.prototype;return n.append=function(t,n){t=Ve(t),n=Ve(n),this.Qm.push([t,n]),Ge(this)},n.delete=function(t){t=Ve(t);for(var n=this.Qm,i=0;i<n.length;){n[i][0]===t?n.splice(i,1):i++}Ge(this)},n.get=function(t){t=Ve(t);for(var n=this.Qm,i=0;i<n.length;i++){var e=n[i];if(e[0]===t)return e[1]}return null},n.getAll=function(t){t=Ve(t);for(var n=this.Qm,i=[],e=0;e<n.length;e++){var r=n[e];r[0]===t&&i.push(r[1])}return i},n.has=function(t){t=Ve(t);for(var n=this.Qm,i=0;i<n.length;i++){if(n[i][0]===t)return!0}return!1},n.set=function(t,n){t=Ve(t),n=Ve(n);for(var i=this.Qm,e=!1,r=0;r<i.length;){var o=i[r];o[0]===t?e?i.splice(r,1):(o[1]=n,e=!0,r++):r++}e||i.push([t,n]),Ge(this)},n.sort=function(){Ei(this.Qm,je),Ge(this)},n.toString=function(){return Ue(this.Qm)},n.entries=function(){return new nr(this.Qm,Je)},n.keys=function(){return new nr(this.Qm,Qe)},n.values=function(){return new nr(this.Qm,tr)},n.forEach=function(t){var n=this;this.Qm.forEach(function(i){return t(i[1],i[0],n)})},t}(),Ze=$e.prototype.entries;Fi&&($e.prototype[e]=Ze);var Je=function(t){return[t[0],t[1]]},Qe=function(t){return t[0]},tr=function(t){return t[1]},nr=function(){function t(t,n){this.$m=0,this.Qm=t,this.tp=n}return t.prototype.next=function(){return this.$m<this.Qm.length?{done:!1,value:this.tp(this.Qm[this.$m++])}:{done:!0,value:void 0}},t}(),ir="null";var er=p.create(null);er.ftp=21,er.file=0,er.gopher=70,er.http=80,er.https=443,er.ws=80,er.wss=443;var rr=/^(?:\.|%2e)$/i,or=/^(?:\.|%2e){2}$/i;function ur(t){return rr.test(t)}function sr(t){return or.test(t)}function fr(t){return void 0!==er[t]}function hr(t){return fr(t.sp)}function cr(t){return""!==t.ep||""!==t.np}function ar(t){var n=t.length;if(!(n>=2))return!1;if(!dr(t.slice(0,2)))return!1;if(2!==n){var i=t[2];if(47!==i&&92!==i&&63!==i&&35!==i)return!1}return!0}function vr(t){return 2===t.length&&Oi.test(t[0])&&(":"===t[1]||"|"===t[1])}function dr(t){return 2===t.length&&vr($i(t))}function lr(t){return vr(t)&&":"===t[1]}function wr(t){var n=t.rp;0!==n.length&&("file"===t.sp&&1===n.length&&lr(n[0])||n.pop())}function br(t){return null===t.hp||Ae===t.hp||t.op||"file"===t.sp}var gr=-1,mr=/\t|\n|\r/g,pr=/^[\x00-\x1f ]+|[\x00-\x1f ]+$/g;function yr(t,n,i,e){void 0===i&&(i=null),void 0===e&&(e=null),i||(i=new Sr,t=t.replace(pr,""));var r=null!==e?e:0;n=n||null;for(var o=[],u=!1,s=!1,f=!1,h=re(t=t.replace(mr,"")),c=h.length,a=0;a<=c;){var v=a<c?h[a]:gr;switch(r){case 0:if(!Wi(v)){if(null===e){o.length=0,r=2;continue}throw new m("Invalid scheme")}o.push(Xi(v)),r=1;break;case 1:if(Hi(v)||43===v||45===v||46===v)o.push(Xi(v));else{if(58!==v){if(null===e){o.length=0,r=2,a=0;continue}throw new m("Invalid scheme")}var d=ae(o);if(null!==e){if(fr(i.sp)&&!fr(d))return;if(!fr(i.sp)&&fr(d))return;if((cr(i)||null!==i.ap)&&"file"===d)return;if("file"===i.sp&&(i.hp===Ae||null===i.hp))return}if(i.sp=d,null!==e)return void(hr(i)&&i.ap===er[i.sp]&&(i.ap=null));o.length=0,"file"===i.sp?r=13:hr(i)&&n&&n.sp===i.sp?r=3:hr(i)?r=7:47===h[a+1]?(r=4,a+=1):(i.op=!0,i.rp.push(""),r=18)}break;case 2:if(!n||n.op&&35!==v)throw new m("Invalid scheme");n.op&&35===v?(i.sp=n.sp,i.rp=n.rp.slice(),i.Jm=n.Jm,i.cp="",i.op=!0,r=20):"file"!==n.sp?(r=5,a-=1):(r=13,a-=1);break;case 3:47===v&&47===h[a+1]?r=8:(r=5,a-=1);break;case 4:47===v?r=9:(r=17,a-=1);break;case 5:i.sp=n.sp,gr===v?(i.ep=n.ep,i.np=n.np,i.hp=n.hp,i.ap=n.ap,i.rp=n.rp.slice(),i.Jm=n.Jm):47===v?r=6:63===v?(i.ep=n.ep,i.np=n.np,i.hp=n.hp,i.ap=n.ap,i.rp=n.rp.slice(),i.Jm="",r=19):35===v?(i.ep=n.ep,i.np=n.np,i.hp=n.hp,i.ap=n.ap,i.rp=n.rp.slice(),i.Jm=n.Jm,i.cp="",r=20):92===v&&hr(i)?r=6:(i.ep=n.ep,i.np=n.np,i.hp=n.hp,i.ap=n.ap,i.rp=n.rp.slice(),i.rp.pop(),r=17,a-=1);break;case 6:!hr(i)||47!==v&&92!==v?47===v?r=9:(i.ep=n.ep,i.np=n.np,i.hp=n.hp,i.ap=n.ap,r=17,a-=1):r=8;break;case 7:if(47!==v||47!==h[a+1]){r=8;continue}r=8,a+=1;break;case 8:47!==v&&92!==v&&(r=9,a-=1);break;case 9:if(64===v){u&&o.unshift(37,52,48),u=!0;for(var l=0;l<o.length;l++){var w=o[l];if(58!==w||f){var b=ae(ke(w,Se));f?i.np+=b:i.ep+=b}else f=!0}o.length=0}else if(gr===v||47===v||63===v||35===v||hr(i)&&92===v){if(u&&0===o.length)throw new m("Invalid host");a-=o.length+1,o.length=0,r=10}else o.push(v);break;case 10:case 11:if(null!==e&&"file"===i.sp)a-=1,r=15;else if(58!==v||s)if(gr===v||47===v||63===v||35===v||hr(i)&&92===v){if(a-=1,hr(i)&&0===o.length)throw new m("Invalid host");if(null!==e&&0===o.length&&(cr(i)||null!==i.ap))return;var g=xe(ae(o),hr(i));if(i.hp=g,o.length=0,r=16,null!==e)return}else 91===v?s=!0:93===v&&(s=!1),o.push(v);else{if(0===o.length)throw new m("Invalid host");var p=xe(ae(o),hr(i));if(i.hp=p,o.length=0,r=12,11===e)return}break;case 12:if(Vi(v))o.push(v);else{if(!(gr===v||47===v||63===v||35===v||hr(i)&&92===v||null!==e))throw new m("Invalid port");if(0!==o.length){var y=_(ae(o),10);if(y>65535)throw new m("Invalid port");i.ap=y===er[i.sp]?null:y,o.length=0}if(null!==e)return;r=16,a-=1}break;case 13:i.sp="file",47===v||92===v?r=14:n&&"file"===n.sp?gr===v?(i.hp=n.hp,i.rp=n.rp.slice(),i.Jm=n.Jm):63===v?(i.hp=n.hp,i.rp=n.rp.slice(),i.Jm="",r=19):35===v?(i.hp=n.hp,i.rp=n.rp.slice(),i.Jm=n.Jm,i.cp="",r=20):(ar(h.slice(a))||(i.hp=n.hp,i.rp=n.rp.slice(),wr(i)),r=17,a-=1):(r=17,a-=1);break;case 14:47===v||92===v?r=15:(n&&"file"===n.sp&&!ar(h.slice(a))&&(lr(n.rp[0])?i.rp.push(n.rp[0]):i.hp=n.hp),r=17,a-=1);break;case 15:if(gr===v||47===v||92===v||63===v||35===v)if(a-=1,null===e&&dr(o))r=17;else if(0===o.length){if(i.hp=Ae,null!==e)return;r=16}else{var S=xe(ae(o),hr(i));if(0===S.Ym&&"localhost"===S.jm&&(S=Ae),i.hp=S,null!==e)return;o.length=0,r=16}else o.push(v);break;case 16:hr(i)?(r=17,47!==v&&92!==v&&(a-=1)):null===e&&63===v?(i.Jm="",r=19):null===e&&35===v?(i.cp="",r=20):gr!==v&&(r=17,47!==v&&(a-=1));break;case 17:if(gr===v||47===v||hr(i)&&92===v||null===e&&(63===v||35===v)){var T=ae(o);if(sr(T)?(wr(i),47===v||hr(i)&&92===v||i.rp.push("")):!ur(T)||47===v||hr(i)&&92===v?ur(T)||("file"===i.sp&&0===i.rp.length&&dr(o)&&(Ae!==i.hp&&null!==i.hp&&(i.hp=Ae),o[1]=58,T=ae(o)),i.rp.push(T)):i.rp.push(""),o.length=0,"file"===i.sp&&(gr===v||63===v||35===v))for(;i.rp.length>1&&""===i.rp[0];)i.rp.shift();63===v?(i.Jm="",r=19):35===v&&(i.cp="",r=20)}else o.push.apply(o,ke(v,_e));break;case 18:63===v?(i.Jm="",r=19):35===v?(i.cp="",r=20):gr!==v&&(i.rp[0]+=ae(ke(v,pe)));break;case 19:null===e&&35===v?(i.cp="",r=20):gr!==v&&(i.Jm+=ae(ke(v,hr(i)?Ie:Te)));break;case 20:gr===v||0===v||(i.cp+=ae(ke(v,ye)))}a++}return i}function _r(t,n,i,e){try{yr(t,n,i,e)}catch(t){}}var Sr=function(){this.sp="",this.ep="",this.np="",this.hp=null,this.ap=null,this.rp=[],this.Jm=null,this.cp=null,this.op=!1};function Tr(t){switch(t.sp){case"blob":var n;try{n=yr(t.rp[0],null)}catch(t){return ir}return Tr(n);case"ftp":case"gopher":case"http":case"https":case"ws":case"wss":return function(t,n,i){return t+"://"+Be(n)+(null===i?"":":"+i)}(t.sp,t.hp,t.ap);default:return ir}}var Ir=function(){function t(t,n){var i,e=null;if(null!=n)if(function(t){return null!=t&&t instanceof Ir&&"object"==typeof t.rc}(n))e=n.rc;else try{e=yr(String(n),null)}catch(t){throw new m("Invalid base URL: "+t.message)}try{i=yr(String(t),e)}catch(t){throw new m("Invalid URL: "+t.message)}var r=i.Jm;this.rc=i,this.Jm=function(t){var n=new $e;return null!==t&&Ke(n,t),n}(r),this.Jm.rc=this}var n=t.prototype;return n.toString=function(){return this.href},n.toJSON=function(){return this.href},function(t,n,i){n&&ki(t.prototype,n),i&&ki(t,i)}(t,[{key:"href",get:function(){return function(t,n){void 0===n&&(n=!1);var i=t.sp+":";if(null!==t.hp?(i+="//",cr(t)&&(i+=t.ep,""!==t.np&&(i+=":"+t.np),i+="@"),i+=Be(t.hp),null!==t.ap&&(i+=":"+t.ap)):null===t.hp&&"file"===t.sp&&(i+="//"),t.op)i+=t.rp[0];else for(var e=0,r=t.rp;e<r.length;e++)i+="/"+r[e];return null!==t.Jm&&(i+="?"+t.Jm),n||null===t.cp||(i+="#"+t.cp),i}(this.rc)},set:function(t){var n;try{n=yr(String(t),null)}catch(t){throw new m("Invalid URL: "+t.message)}this.rc=n,Ye(this.Jm);var i=this.rc.Jm;null!==i&&Ke(this.Jm,i)}},{key:"origin",get:function(){return Tr(this.rc)}},{key:"protocol",get:function(){return this.rc.sp+":"},set:function(t){_r(t+":",null,this.rc,0)}},{key:"username",get:function(){return this.rc.ep},set:function(t){br(this.rc)||(this.rc.ep=Ee(t,Se))}},{key:"password",get:function(){return this.rc.np},set:function(t){br(this.rc)||(this.rc.np=Ee(t,Se))}},{key:"host",get:function(){var t=this.rc,n=t.hp;if(null===n)return"";var i=t.ap,e=Be(n);return null!==i&&(e+=":"+i),e},set:function(t){this.rc.op||_r(t,null,this.rc,10)}},{key:"hostname",get:function(){var t=this.rc.hp;return null===t?"":Be(t)},set:function(t){this.rc.op||_r(t,null,this.rc,11)}},{key:"port",get:function(){var t=this.rc.ap;return null===t?"":""+t},set:function(t){br(this.rc)||(""===t?this.rc.ap=null:_r(t,null,this.rc,12))}},{key:"pathname",get:function(){var t=this.rc.rp;return this.rc.op?t[0]:0===t.length?"":"/"+t.join("/")},set:function(t){this.rc.op||(this.rc.rp.length=0,_r(t,null,this.rc,16))}},{key:"search",get:function(){var t=this.rc.Jm;return null===t||""===t?"":"?"+t},set:function(t){t=Ve(t);var n=this.rc;if(""===t)return n.Jm=null,void Ye(this.Jm);"?"===t[0]&&(t=t.slice(1)),n.Jm="",_r(t,null,n,19),Ke(this.Jm,t)}},{key:"searchParams",get:function(){return this.Jm}},{key:"hash",get:function(){var t=this.rc.cp;return null===t||""===t?"":"#"+t},set:function(t){""!==t?("#"===t[0]&&(t=t.slice(1)),this.rc.cp="",_r(t,null,this.rc,20)):this.rc.cp=null}}]),t}();function kr(t){return t.document&&t.document.baseURI||t.location.href||""}x(),pt();var Er=function(){function t(){this.Lg=void 0,this.Ep=new Rr,this.xp=ui,this.Ip=Or(),self.performance&&self.performance.now?this.Lg=function(){return self.performance.now()}:this.Lg=Gn}var n=t.prototype;return n.dp=function(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];_i.apply(void 0,[].concat(n))},n.lp=function(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];Si.apply(void 0,[].concat(n))},n.fp=function(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];Ti.apply(void 0,[].concat(n))},n.vp=function(t){for(var n=arguments.length,i=new Array(n>1?n-1:0),e=1;e<n;e++)i[e-1]=arguments[e];Ii.apply(void 0,[].concat([t],i))},n.Og=function(t,n){return d(t,n)},n._p=function(t,n){return w(t,n)},n.Mg=function(t){l(t)},n.gp=function(t){b(t)},n.mp=function(){return this.pp.mp()},n.wp=function(){return this.pp.wp()},n.yp=function(){return this.pp.yp()},n.bp=function(){return this.pp.bp()},n.Ap=function(){return this.pp.Ap()},n.Sp=function(t,n){return this.pp.Sp(t,n)},n.Tp=function(t){return this.pp.Tp(t)},n.Dh=function(t,n){var i;return void 0===n&&(n=kr(c)),i="object"!==(void 0===n?"undefined":F(n))||B(n,Ir)?n:n.href,new Ir(t,i)},n.Rp=function(t,n){if(void 0===n&&(n=kr(c)),this.Ip){var i=function(t){return"string"==typeof t}(n)?n:n.toString();return new self.URL(t,i).href}return this.Dh(t,n).href},kt(t,[{key:"kp",get:function(){return this.Ep}},{key:"Zs",get:function(){return this.xp}},{key:"Cp",get:function(){return{Pp:v&&v.userAgent.match(/Android /i)?"Android":"other",Np:Boolean(v&&v.userAgent.match(/Android 8.0.0/i))}}},{key:"Dp",get:function(){return self&&self.location&&"https:"===self.location.protocol}},{key:"Bp",get:function(){return"languages"in v?v.languages.slice():[v.language]}}]),t}(),Rr=function(){function t(){}return kt(t,[{key:"Lp",get:function(){return v.oscpu}},{key:"Zs",get:function(){return v.platform}},{key:"Mp",get:function(){return v.vendor}},{key:"Op",get:function(){return v.vendorSub}}]),t}();function Or(){if(self.URL)try{var t=new self.URL("b","http://a");return t.pathname="c d","http://a/c%20d"===t.href}catch(t){}return!1}x(),pt();var Nr=function(){function t(){}var n=t.prototype;return n.Ap=function(){return tt.resolve(!1)},n.wp=function(){return tt.resolve(!1)},n.bp=function(){return tt.resolve(!1)},n.yp=function(){return tt.resolve(!1)},n.Tp=function(t){return tt.resolve(!1)},n.Sp=function(t,n){return tt.resolve(!1)},n.mp=function(){return tt.resolve(!1)},t}();x(),pt();var Pr=function(){function t(){}var n=t.prototype;return n.IT=function(){},n.Zy=function(t){},n.Uy=function(t){},n.Gy=function(t,n){},t}();x(),pt();var Ar="default",Dr="unknown";x(),pt(),x(),pt(),x(),pt();var Cr=function(t){return t.CT="arraybuffer",t.PT="json",t.NT="stream",t.DT="text",t}({});x(),pt(),M();var xr=function(){function t(n){var i=this;this.Up=void 0,this.Up={},B(n,t)?n.asList().forEach(function(t){var n=t[0],e=t[1];i.append(n,e)}):Array.isArray(n)?n.forEach(function(t){var n=t[0],e=t[1];i.append(n,e)}):n&&p.getOwnPropertyNames(n).forEach(function(t){i.append(t,n[t])})}var n=t.prototype;return n.append=function(t,n){var i=t,e=n;i=Br(i),e=Mr(e);var r=i.toLowerCase();if(this.Up.hasOwnProperty(r)){var o=this.Up[r],u=o[1];o[1]=u?u+", "+e:e}else this.Up[r]=[i,e]},n.delete=function(t){var n=Br(t).toLowerCase();delete this.Up[n]},n.get=function(t){var n=Br(t).toLowerCase();return this.Up.hasOwnProperty(n)?this.Up[n][1]:null},n.has=function(t){var n=Br(t).toLowerCase();return this.Up.hasOwnProperty(n)},n.set=function(t,n){var i=t,e=(i=Br(i)).toLowerCase();this.Up[e]=[i,Mr(n)]},n.forEach=function(t,n){for(var i in this.Up)this.Up.hasOwnProperty(i)&&t.call(n,this.Up[i][1],i,this)},n.asList=function(){var t=[];for(var n in this.Up)if(this.Up.hasOwnProperty(n)){var i=this.Up[n],e=i[0],r=i[1];t.push([e,r])}return t},n.BT=function(){var t={};return this.forEach(function(n,i){t[i]=n}),t},n.LT=function(t){var n=this;t.forEach(function(t,i){n.append(i,t)})},n.MT=function(t){var n=this;t.forEach(function(t,i){n.set(i,t)})},t}();function Br(t){var n=t;if("string"!=typeof n&&(n=String(n)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(n))throw new m("Invalid character in header field name");return n}function Mr(t){var n=t;return"string"!=typeof n&&(n=String(n)),n}var Fr=function(t){return t.DELETE="DELETE",t.GET="GET",t.HEAD="HEAD",t.OPTIONS="OPTIONS",t.POST="POST",t.PUT="PUT",t}({}),Lr=function(t){return t.Bk="same-origin",t.Lk="no-cors",t.Mk="cors",t.Ok="navigate",t}({}),Ur=function(t,n){this.XT=void 0,this.lk=void 0,this.Fk=void 0,this.ck=void 0,this.Vk=void 0,this.Wk=void 0,this.jg=void 0,this.Kp=void 0,this.Uk=void 0,this.Gk=void 0,this.Yu=void 0,this.Xk=void 0,this.Zk=void 0,this.Hk=void 0,this.zk=void 0,this.Yk=void 0;var i,e,r,o,u,s,f,h,c,a,v,d,l,w,b,g,m,p,y=t.Yu;n?(i=n.XT,e=n.lk,r=n.Fk,o=n.ck,u=n.Vk,s=n.Wk,f=n.jg,h=n.Kp,c=n.Uk,a=n.Gk,v=n.Xk,d=n.Zk,l=n.Hk,w=n.zk,b=n.Yk):(i=null,e={},r="GET",o=Cr.DT,u=0,s=0,h="",c="",a="",v=!1,l=void 0,w=!1,b=void 0),this.Yu=y,this.XT=t.XT||i,this.lk=new xr(t.lk||e),this.Fk=t.Fk||r,this.ck=t.ck||o,this.Vk=void 0!==t.Vk?Number(t.Vk)||0:u,this.Wk=void 0!==t.Wk?Number(t.Wk)||0:s,this.jg=t.jg||f||(new dn).jg,this.Kp=t.Kp||h,this.Uk=t.Uk||c,this.Gk=t.Gk||a,this.Xk=void 0!==t.Xk?Boolean(t.Xk):v,this.Zk=t.Zk||d,this.Hk=null!=(g=t.Hk)?g:l,this.zk=null!=(m=t.zk)?m:w,this.Yk=null!=(p=t.Yk)?p:b};x(),pt(),x(),pt();var zr=function(t){return t.sE="HttpOpenError",t.eE="HttpResponseError",t.nE="HttpTimeoutError",t}({}),Wr=function(t){function n(n,i,e){var r;return(r=t.call(this,i,e)||this).rE=void 0,r.rE=n,r}return Tt(n,t),kt(n,[{key:"dk",get:function(){return this.rE}}]),n}(wn),Vr=function(t){function n(n,i){return t.call(this,n,"Error while opening "+n.Yu+".",i)||this}return Tt(n,t),kt(n,[{key:"name",get:function(){return zr.sE}}]),n}(Wr),Hr=function(){function t(){}var n=t.prototype;return n.dk=function(t){return tt.reject(new Vr(new Ur(t)))},n.Kk=function(t){},n.kn=function(){},t}();x(),pt();var qr=function(t){function n(n){return t.call(this,"Invalid XML",n)||this}return Tt(n,t),n}(wn),Xr=function(t){function n(){var n;return(n=t.apply(this,arguments)||this).uR=new Nr,n.QV=new Hr,n.i=new Pr,n}return Tt(n,t),n.prototype.FE=function(t){throw new qr},kt(n,[{key:"pp",get:function(){return this.uR}},{key:"cR",get:function(){return!1}},{key:"lR",get:function(){return!1}},{key:"gR",get:function(){return!1}},{key:"vR",get:function(){return!1}},{key:"mR",get:function(){return this.i}},{key:"pR",get:function(){return{wR:Jt}}},{key:"yR",get:function(){return Ar}},{key:"bR",get:function(){return Dr}},{key:"AR",get:function(){return this.QV}}]),n}(Er);function jr(){return jr=p.assign||function(t){for(var n=1;n<arguments.length;n++){var i=arguments[n];for(var e in i)p.prototype.hasOwnProperty.call(i,e)&&(t[e]=i[e])}return t},jr.apply(this,arguments)}function Yr(){var t=p.create(null);return t.Fp=void 0,delete t.Fp,t}function Kr(){return new $r}Zt(new Xr),x(),pt(),x(),pt(),x(),pt(),x(),pt(),x(),pt(),x(),pt();var Gr="undefined"!=typeof Map&&"entries"in Map.prototype?Map:void 0,$r=Gr||function(){var t=function(){function t(t,n){this.data=void 0,this.keys=void 0,this.index=0,this.selector=void 0,this.data=t,this.selector=n,this.keys=p.keys(t)}return t.prototype.next=function(){var t=this.index;return t<this.keys.length?(this.index++,{value:this.selector(this.data,this.keys[t]),done:!1}):{value:void 0,done:!0}},t}();return function(){function n(){this.data=Yr(),this.size=0}var i=n.prototype;return i.get=function(t){return this.data[t]},i.set=function(t,n){return this.has(t)||this.size++,this.data[t]=n,this},i.has=function(t){return t in this.data},i.delete=function(t){return!!this.has(t)&&(this.size--,delete this.data[t],!0)},i.clear=function(){this.data=Yr(),this.size=0},i.keys=function(){return new t(this.data,function(t,n){return n})},i.values=function(){return new t(this.data,function(t,n){return t[n]})},i.entries=function(){return new t(this.data,function(t,n){return[n,t[n]]})},i.forEach=function(t){for(var n in this.data)t(this.data[n],n)},n}()}();Gr||function(){var t=function(){function t(t,n){this.Vp=void 0,this.Wp=void 0,this.Vp=t,this.Wp=n}return t.prototype.next=function(){var t=this.Vp.next();return t.done?t:{value:this.Wp(t.value),done:!1}},t}();(function(){function n(){this.Up=Kr()}var i=n.prototype;i.get=function(t){return this.Up.get(""+t)},i.set=function(t,n){return this.Up.set(""+t,n),this},i.has=function(t){return this.Up.has(""+t)},i.delete=function(t){return this.Up.delete(""+t)},i.clear=function(){this.Up.clear()},i.keys=function(){return new t(this.Up.keys(),function(t){return Number(t)})},i.values=function(){return this.Up.values()},i.entries=function(){return new t(this.Up.entries(),function(t){var n=t[0],i=t[1];return[Number(n),i]})},i.forEach=function(t){this.Up.forEach(function(n,i){t(n,Number(i))})},kt(n,[{key:"size",get:function(){return this.Up.size}}])})()}();x(),pt(),x(),pt();var Zr="9a04f079-9840-4286-ab92-e65be0885f95",Jr="urn:uuid:"+Zr,Qr="com.microsoft.playready",to="edef8ba9-79d6-4ace-a3c8-27dcd51d21ed",no="urn:uuid:"+to,io="com.widevine.alpha",eo="1077efec-c0b2-4d02-ace3-3c1e52e2fb4b",ro="urn:uuid:"+eo,oo="org.w3.clearkey",uo="94ce86fb-07ff-4f43-adb8-93d2fa968ca2",so="urn:uuid:"+uo,fo="com.apple.fps.1_0";x(),pt();var ho=function(t){return t.Gp="playready",t.Xp="widevine",t.zp="fairplay",t.Zp="clearkey",t.Hp="clearkey_dash_if",t.Yp="aes128",t}({}),co={Kp:ho.Gp,qp:Qr,jp:"cenc",Qp:Zr,Jp:Jr,$p:"PlayReady"},ao={Kp:ho.Xp,qp:io,jp:"cenc",Qp:to,Jp:no,$p:"Widevine"},vo={Kp:ho.zp,qp:fo,jp:"skd",Qp:uo,Jp:so,$p:"FairPlay"},lo=(ho.zp,{Kp:ho.Zp,qp:oo,jp:"cenc",Qp:eo,Jp:ro,$p:"ClearKey"});ho.Hp;x(),pt();String.prototype.replaceAll;var wo="function"==typeof String.prototype.startsWith?function(t,n){return Xt(t)&&t.startsWith(n)}:function(t,n){return Xt(t)&&t.substr(0,n.length)===n},bo=(String.prototype.endsWith,"function"==typeof String.prototype.repeat?function(t,n){return t.repeat(n)}:function(t,n){var i=0|n;if(0===t.length||0===i)return"";for(var e=t,r="";1&~i||(r+=e),0!=(i>>>=1);)e+=e;return r}),go=(String.prototype.padStart,String.prototype.padEnd,16384),mo="function"==typeof String.fromCodePoint?function(t){var n;return t.length<=go?(n=String).fromCodePoint.apply(n,[].concat(t)):yo(t,String.fromCodePoint)}:function(t){for(var n,i=[],e=Rt(t);!(n=e()).done;){var r=n.value;r>65535&&(r-=65536,i.push(r>>>10&1023|55296),r=56320|1023&r),i.push(r)}return po(i)};function po(t){var n;return t.length<=go?(n=String).fromCharCode.apply(n,[].concat(t)):yo(t,String.fromCharCode)}function yo(t,n){for(var i=[],e=0;e<t.length;e+=go)i.push(n.apply(void 0,[].concat(t.slice(e,e+go))));return i.join("")}var _o=Ht.u_&&Ht.d_>=42||Ht.G_&&Ht.Z_>=38||Ht.B_||Ht.F_||Ht.j_&&Ht.J_>=29;function So(t,n){return function(t,n){return Xt(t)&&-1!==t.indexOf(n)}(t,"audio")?{initDataTypes:["cenc"],audioCapabilities:[jr({contentType:t},n?{robustness:"SW_SECURE_CRYPTO"}:{})]}:{initDataTypes:["cenc"],videoCapabilities:[jr({contentType:t},n?{robustness:"SW_SECURE_CRYPTO"}:{})]}}var To=function(){function t(t){this.nw=void 0,this.iw=Kr(),this.hw=void 0,this.nw=t}var n=t.prototype;return n.Ap=function(){return this.Tp(ao)},n.wp=function(){return this.Tp(lo)},n.bp=function(){return this.Tp(co)},n.yp=function(){return this.Tp(vo)},n.Tp=function(t){var n=t.Jp,i=this.iw.get(n);if(i)return i;var e=this.Sp(t,'video/mp4; codecs="avc1.42000a"');return this.iw.set(n,e),e},n.Sp=function(t,n){return nn(function(){return en(this,function(i){switch(i.label){case 0:return i.trys.push([0,2,,7]),[4,this.nw.ew(t.qp,[So(n,!0)])];case 1:return i.sent(),[2,!0];case 2:i.sent(),i.label=3;case 3:return i.trys.push([3,5,,6]),[4,this.nw.ew(t.qp,[So(n,!1)])];case 4:return i.sent(),[2,!0];case 5:return i.sent(),[2,!1];case 6:return[3,7];case 7:return[2]}})}).call(this)},n.mp=function(){return this.hw||(this.hw=this.ow()),this.hw},n.ow=function(){return nn(function(){return en(this,function(t){switch(t.label){case 0:return"https:"===c.location.protocol?[2,!1]:_o?[4,this.wp()]:[2,!1];case 1:return t.sent()?[2,!1]:[2,!0]}})}).call(this)},t}();function Io(t,n,i){if("function"==typeof i)i.call(t,n);else for(var e,r=Rt(i);!(e=r()).done;){e.value.call(t,n)}}x(),pt(),x(),pt(),x(),pt(),x(),pt(),x(),pt(),x(),pt();var ko=function(){function t(t){var n=this;this.uw=Yr(),this.lw=void 0,this.cw=0,this.fw=void 0,this.Rs=function(t){n.So(t)},this.fw=null!=t?t:this}var n=t.prototype;return n.wn=function(t,n){if("function"==typeof n)if("string"==typeof t)this.aw(t,n);else for(var i,e=Rt(t);!(i=e()).done;){var r=i.value;this.aw(r,n)}},n.aw=function(t,n){var i=this.uw[t];void 0===i?this.uw[t]=n:"function"==typeof i?this.uw[t]=[i,n]:0===this.cw?i.push(n):this.uw[t]=i.concat(n)},n.dw=function(t){if("function"==typeof t){var n=this.lw;void 0===n?this.lw=t:"function"==typeof n?this.lw=[n,t]:0===this.cw?n.push(t):this.lw=n.concat(t)}},n.Vo=function(){this.uw=Yr(),this.lw=void 0},n.So=function(t){this.cw++;var n=this.uw[t.type],i=this.lw;void 0!==n&&Io(this.fw,t,n),void 0!==i&&Io(this.fw,t,i),this.cw--},n.mn=function(t,n){if("function"==typeof n)if("string"==typeof t)this._w(t,n);else for(var i,e=Rt(t);!(i=e()).done;){var r=i.value;this._w(r,n)}},n._w=function(t,n){var i=this.uw[t];void 0!==i&&("function"==typeof i?i===n&&(this.uw[t]=void 0):0===this.cw?fn(i,n):this.uw[t]=hn(i,n))},n.gw=function(t){if("string"==typeof t)this.uw[t]=void 0;else for(var n,i=Rt(t);!(n=i()).done;){var e=n.value;this.uw[e]=void 0}},n.mw=function(t){var n=this.lw;void 0!==n&&("function"==typeof n?n===t&&(this.lw=void 0):0===this.cw?fn(n,t):this.lw=hn(n,t))},n.pw=function(t,n){var i=this;return new tt(function(e,r){if(n&&n.Ug)return r(new bn);var o=function(t){s(),e(t)},u=function(){s(),r(new bn)},s=function(){i.mn(t,o),n&&n.Yg(u)};i.wn(t,o),n&&n.zg(u)})},t}();x(),pt(),x(),pt();var Eo=function(t,n){void 0===n&&(n=new Date),this.type=void 0,this.date=void 0,this.type=t,this.date=n};x(),pt();var Ro=function(t){return t.ww="yw",t.Aw="Sw",t.Tw="contentprotectionerror",t.Ew="contentprotectionsuccess",t.Rw="currentsourcechange",t.Iw="destroy",t.xw="durationchange",t.Cw="emptied",t.Pw="encrypted",t.Nw="ended",t.Dw="Bw",t.Lw="Mw",t.Ow="Fw",t.Vw="Ww",t.Uw="loadstart",t.Gw="manifestupdate",t.Xw="nosupportedrepresentationfound",t.Zw="offline",t.Hw="online",t.zw="pause",t.uo="play",t.Yw="progress",t.Kw="ratechange",t.qw="representationchange",t.jw="resize",t.Qw="seeked",t.Jw="seeking",t.$w="segmentnotfound",t.iy="sy",t.ey="oy",t.uy="ly",t.do="sourcechange",t.vy="timeupdate",t._y="volumechange",t.gy="py",t.wy="yy",t.LICENSE_REQUEST_GENERATED="by",t.Ay="metricschange",t}({}),Oo=["cenc"],No=["cbcs","cbcs-1-9"],Po=function(t){function n(n){var i;return(i=t.call(this,Ro.wy)||this).Sy=void 0,i.Sy=n,i}return Tt(n,t),n}(Eo),Ao=function(t){function n(n,i,e,r){var o;return(o=t.call(this,"Ey")||this).Ry=void 0,o.Iy=void 0,o.Ey=void 0,o.xy=void 0,o.Ry=n,o.Iy=i,o.Ey=e,o.xy=r,o}return Tt(n,t),n}(Eo),Do=function(t){function n(){return t.call(this,"lt")||this}return Tt(n,t),n}(Eo);x(),pt(),x(),pt(),x(),pt();var Co="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");function xo(t,n,i){return Co[t>>2]+Co[(3&t)<<4|n>>4]+Co[(15&n)<<2|i>>6]+Co[63&i]}function Bo(t,n,i){for(var e=[],r=n;r<i;r+=3)e.push(xo(t[r],t[r+1],t[r+2]));return e.join("")}x(),pt(),M(),x(),pt();var Mo=function(){function t(t){void 0===t&&(t=0),this.uc=void 0,this.uc=t}var n=t.prototype;return n.Dy=function(t){this.uc+=t},n.By=function(t){this.uc=t},n.Ly=function(){return new t(this.ac)},kt(t,[{key:"ac",get:function(){return this.uc}}]),t}();function Fo(t){if(t>=55296&&t<=57343)throw new g("Lone surrogate U+"+t.toString(16).toUpperCase()+" is not a scalar value")}function Lo(t,n){return t>>n&63|128}function Uo(t,n){4294967168&t?(4294965248&t?4294901760&t?4292870144&t||(n.push(t>>18&7|240),n.push(Lo(t,12)),n.push(Lo(t,6))):(Fo(t),n.push(t>>12&15|224),n.push(Lo(t,6))):n.push(t>>6&31|192),n.push(63&t|128)):n.push(t)}function zo(t,n){if(n.ac>=t.length)throw new g("Invalid byte index");var i=255&t[n.ac];if(n.Dy(1),128==(192&i))return 63&i;throw new g("Invalid continuation byte")}function Wo(t,n){var i=n.ac;if(i>t.length)throw new g("Invalid byte index");if(i===t.length)return!1;var e=255&t[i];if(n.Dy(1),!(128&e))return e;if(192==(224&e)){var r=(31&e)<<6|zo(t,n);if(r>=128)return r;throw new g("Invalid continuation byte")}if(224==(240&e)){var o=(15&e)<<12|zo(t,n)<<6|zo(t,n);if(o>=2048)return Fo(o),o;throw new g("Invalid continuation byte")}if(240==(248&e)){var u=(7&e)<<18|zo(t,n)<<12|zo(t,n)<<6|zo(t,n);if(u>=65536&&u<=1114111)return u}throw new g("Invalid UTF-8 detected")}x(),pt(),x(),pt();function Vo(t,n,i){void 0===i&&(i=!1);var e=t.getUint16(n.ac,i);return n.Dy(2),e}function Ho(t,n,i,e){void 0===e&&(e=!1),t.setUint16(n.ac,i,e),n.Dy(2)}function qo(t,n,i,e){void 0===e&&(e=!1),t.setUint32(n.ac,i,e),n.Dy(4)}function Xo(t,n,i,e){void 0===e&&(e=!1);for(var r=i.length,o=0;o<r;o+=1){Ho(t,n,i.charCodeAt(o),e)}}function jo(t,n){return void 0===n&&(n=!1),function(t,n,i,e){for(var r=[];n.ac+2<=t.byteLength;){var o=Vo(t,n,i);if(e&&!o)break;r.push(o)}return po(r)}(Go(t),new Qo,n,!1)}function Yo(t){return function(t){return mo(t)}(function(t,n){var i,e=[],r=new Qo;if(!n){if(!1===(i=Wo(t,r)))return e;65279===i||e.push(i)}for(;!1!==(i=Wo(t,r));)e.push(i);return e}($o(t)))}function Ko(t){return new I(function(t){for(var n,i=[],e=Rt(t);!(n=e()).done;)Uo(n.value,i);return i}(function(t){for(var n=[],i=0,e=t.length;i<e;){var r=t.charCodeAt(i++);if(r>=55296&&r<=56319&&i<e){var o=t.charCodeAt(i++);56320==(64512&o)?n.push(((1023&r)<<10)+(1023&o)+65536):(n.push(r),i--)}else n.push(r)}return n}(t)))}function Go(t){return new DataView(t.buffer,t.byteOffset,t.byteLength)}function $o(t){return new I(t.buffer,t.byteOffset,t.byteLength)}function Zo(t){return B(t,ArrayBuffer)?new I(t):$o(t)}function Jo(t){if(t.slice)return t.slice(0);var n=new I(t.byteLength);return n.set(t,0),n}var Qo=function(){function t(t){void 0===t&&(t=0),this.uc=void 0,this.uc=t}var n=t.prototype;return n.Dy=function(t){this.uc+=t},n.By=function(t){this.uc=t},n.Ly=function(){return new t(this.ac)},n.Fy=function(){return new Mo(this.ac<<3)},kt(t,[{key:"ac",get:function(){return this.uc}}]),t}(),tu=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]","[object DataView]"],nu=ArrayBuffer.isView||function(t){return t&&cn(tu,qt.call(t))};function iu(t,n){return t===n||function(t,n){if(t===n)return!0;if(t.byteLength!==n.byteLength)return!1;if(t.buffer===n.buffer&&t.byteOffset===n.byteOffset)return!0;for(var i=0;i<t.length;i+=1)if(t[i]!==n[i])return!1;return!0}(Zo(t),Zo(n))}function eu(t){var n=t.reduce(function(t,n){return t+n.byteLength},0);return function(t,n){for(var i,e=new I(n),r=0,o=Rt(t);!(i=o()).done;){var u=i.value;e.set(u,r),r+=u.byteLength}return e}(t,n)}function ru(t){return function(t){for(var n=t.length,i=n%3,e=[],r=n-i,o=0;o<r;o+=16383)e.push(Bo(t,o,y.min(r,o+16383)));if(1===i){var u=t[n-1];e.push(Co[u>>2]+Co[(3&u)<<4]+"==")}else if(2===i){var s=t[n-2],f=t[n-1];e.push(Co[s>>2]+Co[(3&s)<<4|f>>4]+Co[(15&f)<<2]+"=")}return e.join("")}(new I(t))}var ou=new I([0]).buffer,uu=function(){function t(){this.nc=void 0,this.nc=[]}var n=t.prototype;return n.Wy=function(t){for(var n,i=Rt(this.nc);!(n=i()).done;){if(iu(n.value[0],t))return!0}return!1},n.Uy=function(t){for(var n,i=Rt(this.nc);!(n=i()).done;){var e=n.value;if(iu(e[0],t))return e[1]}},n.Gy=function(t,n){for(var i,e=Rt(this.nc);!(i=e()).done;){var r=i.value;if(iu(r[0],t))return void(r[1]=n)}this.nc.push([t,n])},n.Xy=function(t,n){this.nc.forEach(function(n){return t(n[1],n[0])},n)},n.Zy=function(){an(this.nc)},kt(t,[{key:"Vy",get:function(){return this.nc.length}}]),t}();x(),pt();var su=function(){function t(){var t=this;this.Yy=void 0,this.Yd=void 0,this.Kd=void 0,this.Yy=new tt(function(n,i){t.Yd=n,t.Kd=i})}var n=t.prototype;return n.Hy=function(t){this.Yd&&(this.Yd(t),this.Zg())},n.zy=function(t){this.Kd&&(this.Kd(t),this.Zg())},n.Jg=function(){this.Yy.catch(Jt),this.zy(new bn)},n.$g=function(t){var n=this;t.then(function(t){return n.Hy(t)},function(t){return n.zy(t)})},n.Zg=function(){this.Yd=void 0,this.Kd=void 0},t}();function fu(t,n){return t===Qr?function(t){if(t.byteLength<2*hu.length)return t;var n=new DataView(t,0,2*hu.length),i=jo(n,!0);if(i===hu)return t;return function(t){var n='<PlayReadyKeyMessage type="LicenseAcquisition"><LicenseAcquisition Version="1"><Challenge encoding="base64encoded">',i='</Challenge><HttpHeaders><HttpHeader><name>Content-Type</name><value>text/xml; charset=utf-8</value></HttpHeader><HttpHeader><name>SOAPAction</name><value>"http://schemas.microsoft.com/DRM/2007/03/protocols/AcquireLicense"</value></HttpHeader></HttpHeaders></LicenseAcquisition></PlayReadyKeyMessage>',e=""+n+ru(t)+i;return function(t,n){void 0===n&&(n=!1);var i=new I(2*t.length);return Xo(Go(i),new Qo,t,n),i}(e,!0).buffer}(t)}(n):n}x(),pt();var hu="<PlayReady";x(),pt(),x(),pt();var cu=function(t){function n(n,i,e,r){var o;return(o=t.call(this,n,r)||this).Ky=void 0,o.qy=void 0,o.Ky=i,o.qy=e,o}return Tt(n,t),n}(wn);x(),pt(),x(),pt(),x(),pt(),x(),pt(),x(),pt();var au=function(t,n){return(au=p.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)p.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(t,n)};function vu(t,n){if("function"!=typeof n&&null!==n)throw new m("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}au(t,n),t.prototype=null===n?p.create(n):(i.prototype=n.prototype,new i)}function du(t,n,i){return t.indexOf?t.indexOf(n,i):Array.prototype.indexOf.call(t,n,i)}x(),pt(),x(),pt(),x(),pt(),x(),pt(),x(),pt(),x(),pt(),x(),pt();!function(){function t(t,n){this.jy=t,this.Qy=n}t.prototype.get=function(t){var n=this.jy.get(t);if(0===this.Qy||void 0===n)return n;var i=this.jy.get(t+1)||0,e=n&(1<<8-this.Qy)-1,r=i>>8-this.Qy;return(e<<this.Qy)+r},t.prototype.getBit=function(t){if(!(t<0)){var n=this.jy.get(y.floor((t+this.Qy)/8));if(void 0!==n)return(n&1<<7-this.Qy-t%8)>0?1:0}},p.defineProperty(t.prototype,"bitLength",{get:function(){return this.jy.bitLength-this.Qy},enumerable:!1,configurable:!0}),p.defineProperty(t.prototype,"length",{get:function(){return this.jy.length},enumerable:!1,configurable:!0})}();x(),pt(),x(),pt();y.pow(2,-52);function lu(t,n,i){return y.min(y.max(t,n),i)}function wu(t,n){return t>>8-n}function bu(t,n){return t&(1<<n)-1}var gu=function(){function t(t){this.Jy=t,this.$y=0,this.ib=0}return p.defineProperty(t.prototype,"totalBitsRead",{get:function(){return 8*this.$y+this.ib},enumerable:!1,configurable:!0}),p.defineProperty(t.prototype,"done",{get:function(){return this.$y===this.Jy.length&&0===this.ib},enumerable:!1,configurable:!0}),p.defineProperty(t.prototype,"location",{get:function(){return{byte:this.$y,bit:this.ib}},enumerable:!1,configurable:!0}),t.prototype.copy=function(){var n=new t(this.Jy);return n.seek(this.$y,this.ib),n},t.prototype.canReadBits=function(t){return 8*this.$y+t+this.ib<=8*this.Jy.length},t.prototype.canReadBytes=function(t){return 0===this.ib?this.$y+t<=this.Jy.length:this.$y+t<this.Jy.length},t.prototype.incBit=function(){this.ib++,this.ib>7&&(this.$y++,this.ib=0)},t.prototype.seek=function(t,n){this.$y=t,this.ib=n},t.prototype.peekBit=function(){if(!this.canReadBits(1))throw new g("Cannot read past end of buffer.");return this.Jy.get(this.$y)>>7-this.ib&1},t.prototype.readBit=function(){var t=this.peekBit();return this.incBit(),t},t.prototype.readByte=function(){if(!this.canReadBytes(1))throw new g("Cannot read past end of buffer.");if(0===this.ib)return this.Jy.get(this.$y++);var t=bu(this.Jy.get(this.$y),8-this.ib),n=wu(this.Jy.get(this.$y+1),this.ib);return this.$y++,t<<this.ib|n},t.prototype.readBits=function(t){if(!this.canReadBits(t))throw new g("Cannot read past end of buffer.");for(var n=[],i=0;i<t;i++)n.push(this.readBit());return n},t.prototype.readUInt=function(t){if(t>32)throw new g("The max bitlength that can be provided is 32.");if(!this.canReadBits(t))throw new g("Cannot read past end of buffer.");var n=0;if(0===this.ib&&t%8==0)for(var i=t-8;i>=0;i-=8)n|=this.readByte()<<i;else for(i=t-1;i>=0;i--)n|=this.readBit()<<i;return n},t.prototype.readInt=function(t){if(t>32)throw new g("The max bitlength that can be provided is 32.");if(!this.canReadBits(t))throw new g("Cannot read past end of buffer.");var n=this.readUInt(t);return 0===(n&1<<t-1)?n:n-y.pow(2,t)},t.prototype.readExponentialGolombCode=function(){for(var t=0;0===this.readBit();)t++;var n=1<<t;return n+=this.readUInt(t)-1},t.prototype.readSignedExponentialGolombCode=function(){var t=this.readExponentialGolombCode();return 1&t?(t+1)/2:-t/2},t.prototype.skipBits=function(t){if(!this.canReadBits(t))throw new g("Skipping over the buffer edge is not allowed.");var n=this.ib+t;this.$y+=n>>3,this.ib=7&n},t.prototype.readBool=function(){return this.readBit()>0},t.prototype.readString=function(t){if(!this.canReadBytes(t))throw new g("Cannot read past end of buffer.");for(var n=[],i=0;i<t;i++)n.push(this.readByte());return String.fromCharCode.apply(String,n)},t}();x(),pt(),x(),pt(),x(),pt();var mu=function(t,n){return t===n?0:t<n?-1:t>n?1:T(t)?T(n)?0:1:-1},pu=function(){function t(){this.sb=[],this.eb=[],this.hb=0}return t.from=function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];for(var e=new t,r=0,o=n;r<o.length;r++){var u=o[r];e.pushRange(u)}return e},t.prototype.pushRange=function(t,n,i){if(void 0===n&&(n=0),void 0===i&&(i=t.length),i<0)throw new g("The buffer length must be positive.");if(0!==i){if(0===this.eb.length)this.eb.push(0);else{var e=this.eb[this.eb.length-1]+this.sb[this.sb.length-1].length;this.eb.push(e)}this.sb.push(t.subarray(n,n+i)),this.hb+=i}},t.prototype.concat=function(n){var i=new t;return i.pushRange(this.join()),i.pushRange(n.join()),i},t.prototype.copy=function(t,n,i,e){if(void 0===n&&(n=0),void 0===i&&(i=0),void 0===e&&(e=this.length),n<0||i<0||e<0)throw new RangeError;return this.slice(i,e).copyInternal(t,n)},t.prototype.copyInternal=function(t,n){for(var i=0,e=n,r=0,o=this.sb;r<o.length;r++){var u=o[r];t.set(u,e),i+=u.length,e+=u.length}return i},t.prototype.clear=function(){this.sb=[],this.eb=[],this.hb=0},t.prototype.get=function(t){if(!(t<0||t>=this.length)){var n=this.findContainingBufferIndex(t),i=t-this.eb[n];return this.sb[n][i]}},p.defineProperty(t.prototype,"first",{get:function(){return this.get(0)},enumerable:!1,configurable:!0}),t.prototype.indexOf=function(t){if(this.sb.length<1)return-1;if(this.sb.length>1){var n=this.join();this.clear(),this.pushRange(n)}var i=this.sb[0];return"number"==typeof t?du(i,t):"undefined"!=typeof Buffer?Buffer.from(i.buffer,i.byteOffset,i.byteLength).indexOf(t):function(t,n){if(0===n.length)return 0;for(var i=n[0],e=n.length,r=t.length-e,o=0;o<=r&&!((o=du(t,i,o))<0||o>r);o++){for(var u=o+1,s=o+e,f=1;u<s&&t[u]===n[f];u++,f++);if(u===s)return o}return-1}(i,t)},t.prototype.findContainingBufferIndex=function(t){return function(t,n,i){if(0!==t.length){var e=0,r=t.length-1;if(1!==i(t[e],n)){if(1===i(n,t[r]))return r;for(;e!==r;){var o=y.ceil((e+r)/2);i(t[o],n)<=0?e=o:r=o-1}return e}}}(this.eb,t,mu)},t.prototype.join=function(){if(1===this.sb.length)return this.sb[0];var t=new I(this.length);return this.copyInternal(t,0),t},p.defineProperty(t.prototype,"length",{get:function(){return this.hb},enumerable:!1,configurable:!0}),p.defineProperty(t.prototype,"bitLength",{get:function(){return 8*this.length},enumerable:!1,configurable:!0}),t.prototype.readUIntBE=function(t,n){if(n<=0||n>4)throw new g("Expected byteLength to be between 0 and 4 but was "+n);if(t<0||t>this.length-n)throw new g("Offset must be between 0 and buffer.length - byteLength, but was "+t+" (max allowed "+(this.length-n)+")");if(1===n)return this.get(t);for(var i=0,e=0;e<n;e++)i+=this.get(t+e)*y.pow(2,8*(n-e-1));return i},t.prototype.slice=function(n,i){void 0===i&&(i=this.length);var e=lu(n,0,this.length),r=lu(i,0,this.length);if(e>r)return new t;if(e===r)return new t;for(var o=new t,u=this.findContainingBufferIndex(e),s=this.sb[u],f=e,h=f-this.eb[u];f+s.length-h<r;)o.pushRange(s,h,s.length-h),u+=1,h=(f+=s.length-h)-this.eb[u],s=this.sb[u];var c=r-f;return o.pushRange(s,h,c),o},t.prototype.trim=function(){if(0===this.length)return new t;for(var n=this.length-1,i=this.sb.length-1,e=this.sb[i],r=e.length-1;n>=0&&i>=0;){if(0!==e[r])break;if(0===r){if(0===i)return new t;i-=1,r=(e=this.sb[i]).length-1}else r-=1;n-=1}return this.slice(0,n+1)},t}(),yu=function(){function t(n){this.ob=n||t.BUFFER_CHUNK_SIZE,this.ub=!1,this.fb=new pu,this.Jy=new I(this.ob),this._b=0,this.gb=0,this.ib=7}return t.prototype.closeByte=function(){this.Jy[this._b++]=this.gb,this._b>=this.ob&&this.closeBuffer(),this.gb=0,this.ib=7},t.prototype.closeBuffer=function(t){void 0===t&&(t=!0),0!==this._b&&(this.fb.pushRange(this.Jy,0,this._b),t&&(this.Jy=new I(this.ob)),this._b=0)},p.defineProperty(t.prototype,"isWritingStartBit",{get:function(){return 7===this.ib},enumerable:!1,configurable:!0}),t.prototype.close=function(){if(this.ub)throw new g("Cannot close a closed BitWriter.");return this.isWritingStartBit||this.closeByte(),this.closeBuffer(!1),this.ub=!0,this.fb},t.prototype.writeBit=function(t){if(this.ub)throw new g("Cannot write to a closed BitWriter.");this.gb|=t<<this.ib,0===this.ib?this.closeByte():this.ib--},t.prototype.writeByte=function(t){if(this.ub)throw new g("Cannot write to a closed BitWriter.");this.isWritingStartBit?(this.gb=t,this.closeByte()):this.writeByteUnaligned(t)},t.prototype.writeByteUnaligned=function(t){var n=this.ib;this.gb|=wu(t,n+1),this.closeByte(),this.gb=bu(t,8-n)<<n+1,this.ib=n},t.prototype.writeBits=function(t){for(var n=0,i=t;n<i.length;n++){var e=i[n];this.writeBit(e)}},t.prototype.writeBytes=function(t){if(this.ub)throw new g("Cannot write to a closed BitWriter.");this.isWritingStartBit?this.writeBytesAligned(t):this.writeBytesUnaligned(t)},t.prototype.writeBytesAligned=function(t){this._b+t.length<=this.ob?(this.Jy.set(t,this._b),this._b+=t.length,this._b===this.ob&&this.closeBuffer()):(this.closeBuffer(),this.fb.pushRange(t))},t.prototype.writeBytesUnaligned=function(t){if(0!==t.length){var n=this.ib;this.gb|=wu(t[0],n+1),this.closeByte();for(var i=1;i<t.length;i++){var e=bu(t[i-1],8-n),r=wu(t[i],n+1);this.gb=e<<n+1|r,this.closeByte()}this.gb=bu(t[t.length-1],8-n)<<n+1,this.ib=n}},t.prototype.writeUInt=function(t,n){if(t<0)throw new g("Received a negative number.");if(n>32)throw new g("The max bitlength that can be provided is 32.");if(t>=y.pow(2,n))throw new g("Uint "+t+" cannot be represented in "+n+" bit(s).");if(this.isWritingStartBit&&n%8==0)for(var i=n-8;i>=0;i-=8)this.writeByte(t>>i&255);else for(i=n-1;i>=0;i--)this.writeBool((t&1<<i)>0)},t.prototype.writeInt=function(t,n){if(n>32)throw new g("The max bitlength that can be provided is 32.");if(y.abs(t)>=y.pow(2,n-1))throw new g("Signed integer "+t+" cannot be represented in "+n+" bit(s).");t<0?this.writeUInt(t+y.pow(2,n),n):this.writeUInt(t,n)},t.prototype.writeExponentialGolombCode=function(t){if(t<0)throw new g("Received a negative number.");for(var n=y.floor(y.log2(t+1))+1,i=0;i<n-1;i++)this.writeBit(0);this.writeUInt(t+1,n)},t.prototype.writeSignedExponentialGolombCode=function(t){0===t?this.writeExponentialGolombCode(0):t<0?this.writeExponentialGolombCode(-2*t):this.writeExponentialGolombCode(2*t-1)},t.prototype.padByte=function(t){for(;!this.isWritingStartBit;)this.writeBit(t)},t.prototype.writeBool=function(t){this.writeBit(t?1:0)},t.prototype.writeString=function(t){for(var n=function(t){for(var n=new I(t.length),i=0;i<t.length;i++)n[i]=t.charCodeAt(i);return n}(t),i=0;i<n.length;i++)this.writeByte(n[i])},t.BUFFER_CHUNK_SIZE=1024,t}();x(),pt();var _u=function(){function t(t){this.rb=new pu,this.ef=t}return t.prototype.closeWriter=function(){void 0!==this.ef&&(this.rb=this.rb.concat(this.ef.close()),this.ef=void 0)},p.defineProperty(t.prototype,"writer",{get:function(){return void 0===this.ef&&(this.ef=new yu),this.ef},enumerable:!1,configurable:!0}),t.prototype.concat=function(t){this.closeWriter(),this.rb=this.rb.concat(t)},t.prototype.toRangedBuffer=function(){return this.closeWriter(),this.rb},t}(),Su=function(){function t(t){if(this.boxType=t,4!==t.length&&16!==t.length)throw new g("The provided box type does not conform to either a 4 character type or a 16 byte uuid.")}return t.prototype.serializeCommonBoxHeader=function(n){var i=this.getSize(),e=i>=t.LARGE_SIZE/8,r=16===this.boxType.length;n.writeUInt(e?1:i,32),n.writeString(r?"uuid":this.boxType),e&&(n.writeUInt(y.floor(i/t.LARGE_SIZE),32),n.writeUInt(i%t.LARGE_SIZE,32)),r&&n.writeString(this.boxType)},t.prototype.getSize=function(){var n=8+(this.boxType.length>4?16:0),i=this.getBoxContentSize()+n;return i>=t.LARGE_SIZE/8&&(i+=8),i},t.prototype.serialize=function(){var t=new _u;return this.serializeCommonBoxHeader(t.writer),this.serializeBoxContent(t),t.toRangedBuffer()},t.LARGE_SIZE=y.pow(2,32),t}();function Tu(t,n){return B(t,Kn)?64===n:t<y.pow(2,n)}function Iu(t,n){return y.round(t*y.pow(2,n))}function ku(t,n){for(var i=0;i<n.length;i++)t.writeByte(n[i])}function Eu(t,n){return t/y.pow(2,n)}x(),pt(),M();var Ru=function(t){function n(n,i,e){var r=t.call(this,n)||this;if(r.version=i,!Tu(i,8))throw new g("the provided version cannot fit in 8 bits.");return r.flags=e,r}return vu(n,t),p.defineProperty(n.prototype,"flags",{get:function(){return this.mb},set:function(t){this.mb=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return 4},n.prototype.serializeFlags=function(t){if("number"!=typeof this.flags)throw new g("Missing custom serializeFlags method.");t.writer.writeUInt(this.flags,24)},n.prototype.serializeBoxContent=function(t){t.writer.writeByte(this.version),this.serializeFlags(t)},n}(Su);x(),pt(),x(),pt();var Ou=function(t){function n(n,i){var e=t.call(this,n)||this;return e.data=i,e}return vu(n,t),n.prototype.getBoxContentSize=function(){return this.data.length},n.prototype.serializeBoxContent=function(t){t.concat(pu.from(this.data))},n}(Su);x(),pt(),x(),pt();var Nu=function(){function t(t){void 0===t&&(t=0),this.offset=t}return t.prototype.shift=function(t){this.offset+=t},t.prototype.seek=function(t){this.offset=t},t.prototype.clone=function(){return new t(this.offset)},t}();x(),pt();var Pu=16384;function Au(t){var n=t.length;if(n<=Pu)return String.fromCharCode.apply(String,t);for(var i=[],e=0;e<n;e+=Pu)i.push(String.fromCharCode.apply(String,t.slice(e,e+Pu)));return i.join("")}var Du=function(){function t(t){this.raw=t}return t.prototype.isSet=function(t){return function(t,n){return(t&n)===n}(this.raw,t)},t}();function Cu(t,n){var i=t.getUint8(n.offset);return n.shift(1),i}function xu(t,n,i){var e=Wu(Hu(t),n.offset,n.offset+i);return n.shift(e.byteLength),e}function Bu(t,n,i){return n.offset+i<=t.byteLength}function Mu(t,n,i){void 0===i&&(i=!1);var e=t.getUint32(n.offset,i);return n.shift(4),e}function Fu(t,n,i){void 0===i&&(i=!1);var e=Mu(t,n,i),r=Mu(t,n,i),o=i?r:e,u=i?e:r;return Kn.fromBits(u,o,!0)}function Lu(t,n,i){return Au(function(t){return[].slice.call(t)}(xu(t,n,i)))}function Uu(t,n){var i,e=Cu(t,n);return 128&e?192==(224&e)?i=64*(31&e)+(63&Cu(t,n)):224==(240&e)?i=4096*(15&e)+64*(63&Cu(t,n))+(63&Cu(t,n)):240==(248&e)&&(i=262144*(7&e)+4096*(63&Cu(t,n))+64*(63&Cu(t,n))+(63&Cu(t,n))):i=e,i}function zu(t,n){return function(t,n,i){var e=[],r=function(t,n){return n.offset+3<=t.byteLength&&239===t.getUint8(n.offset)&&187===t.getUint8(n.offset+1)&&191===t.getUint8(n.offset+2)}(t,n);r&&n.shift(3);for(;n.offset<t.byteLength;){var o=Uu(t,n);if(void 0===o)break;if(i&&0===o)break;e.push(o)}return function(t){for(var n=[],i=0,e=t;i<e.length;i++){var r=e[i];r>65535&&(r-=65536,n.push(r>>>10&1023|55296),r=56320|1023&r),n.push(r)}return Au(n)}(e)}(t,n,!0)}function Wu(t,n,i){return void 0===n&&(n=0),void 0===i&&(i=t.byteLength),new I(t.buffer,t.byteOffset+n,i-n)}function Vu(t,n,i){return void 0===n&&(n=0),void 0===i&&(i=t.byteLength),new DataView(t.buffer,t.byteOffset+n,i-n)}function Hu(t){return new I(t.buffer,t.byteOffset,t.byteLength)}var qu=function(){function t(t){void 0===t&&(t=0),this.offset=t}return t.prototype.shift=function(t){this.offset+=t},t.prototype.seek=function(t){this.offset=t},t.prototype.clone=function(){return new t(this.offset)},t.prototype.toBit=function(){return new Nu(this.offset<<3)},t}();x(),pt();var Xu=function(){function t(t,n){this.data=t,this.cursor=n}return t.prototype.nextUint8=function(){return Cu(this.data,this.cursor)},t.prototype.nextUint16=function(){return function(t,n,i){void 0===i&&(i=!1);var e=t.getUint16(n.offset,i);return n.shift(2),e}(this.data,this.cursor)},t.prototype.nextInt16=function(){return function(t,n,i){void 0===i&&(i=!1);var e=t.getInt16(n.offset,i);return n.shift(2),e}(this.data,this.cursor)},t.prototype.nextUint32=function(){return Mu(this.data,this.cursor)},t.prototype.nextInt32=function(){return function(t,n,i){void 0===i&&(i=!1);var e=t.getInt32(n.offset,i);return n.shift(4),e}(this.data,this.cursor)},t.prototype.nextInt64=function(){return function(t,n,i){void 0===i&&(i=!1);var e=Mu(t,n,i),r=Mu(t,n,i),o=i?r:e,u=i?e:r;return Kn.fromBits(u,o,!1)}(this.data,this.cursor)},t.prototype.nextUint64=function(){return Fu(this.data,this.cursor)},t.prototype.nextUint8Array=function(t){return xu(this.data,this.cursor,t)},t.prototype.nextUint32Array=function(t){return function(t,n,i){for(var e=[],r=0;r<i;r++)e.push(Mu(t,n));return e}(this.data,this.cursor,t)},t.prototype.nextChars=function(t){return Lu(this.data,this.cursor,t)},t.prototype.nextUTF8String=function(){return zu(this.data,this.cursor)},t.prototype.skip=function(t){this.cursor.shift(t)},t.prototype.clone=function(){return new t(this.data,this.cursor.clone())},t}();function ju(t,n){return t.type===n}function Yu(t){var n=function(t,n){var i=[];for(;n.offset<t.byteLength;){var e=Ku(t,n);if(!e.complete)return{complete:!1,boxes:i};i.push(e.box)}return{complete:!0,boxes:i}}(t.data,t.cursor);if(!n.complete)throw new g("Data incomplete");return n.boxes}function Ku(t,n){var i=n.offset,e=function(t,n){var i=n.offset;if(!Bu(t,n,8)){return{complete:!1,neededOffset:o=n.offset+8}}var e=Mu(t,n),r=Lu(t,n,4);if(1===e){if(!Bu(t,n,8)){var o=n.offset+8;return n.seek(i),{complete:!1,neededOffset:o}}e=Fu(t,n).toNumber()}if("uuid"===r){if(!Bu(t,n,16)){o=n.offset+16;return n.seek(i),{complete:!1,neededOffset:o}}r=Lu(t,n,16)}var u=n.offset,s={type:r,size:e,headerSize:u-i};return{complete:!0,header:s}}(t,n);if(!e.complete)return e;var r=e.header,o=r.size;0===o&&(o=t.byteLength-i);var u=i+o;if(u>t.byteLength){var s=u;return n.seek(i),{complete:!1,neededOffset:s}}var f={type:r.type,offset:i,data:new Xu(Vu(t,i,u),new qu(r.headerSize))};return n.seek(u),{complete:!0,box:f}}function Gu(t){return{version:t>>24,flags:new Du(16777215&t)}}function $u(t,n){var i,e,r,o;return 1===n?(i=t.nextUint64(),e=t.nextUint64(),r=t.nextUint32(),o=t.nextUint64()):(i=t.nextUint32(),e=t.nextUint32(),r=t.nextUint32(),o=t.nextUint32()),{creation:i,modification:e,scale:r,duration:o}}function Zu(t){return t.skipBits(4),{isLeading:t.readUInt(2),sampleDependsOn:t.readUInt(2),sampleIsDependedOn:t.readUInt(2),sampleHasRedundancy:t.readUInt(2),samplePaddingValue:t.readUInt(3),sampleIsNonSyncSample:Boolean(t.readBit()),sampleDegradationPriority:t.readUInt(16)}}function Ju(t){var n=t.nextUint32Array(9);return{a:Eu(n[0],16),b:Eu(n[1],16),u:Eu(n[2],30),c:Eu(n[3],16),d:Eu(n[4],16),v:Eu(n[5],30),x:Eu(n[6],16),y:Eu(n[7],16),w:Eu(n[8],30)}}function Qu(t){return new Ou(t.type,Wu(Hu(t.data.data),t.data.cursor.offset))}var ts=function(t){function n(n,i,e,r){void 0===e&&(e=0),void 0===r&&(r=0);var o=t.call(this,"hdlr",e,r)||this;return o.name=i,o.handlerType=n,o}return vu(n,t),p.defineProperty(n.prototype,"handlerType",{get:function(){return this.pb},set:function(t){this.pb=t},enumerable:!1,configurable:!0}),n.prototype.serializeReserved=function(t){t.writer.writeUInt(0,32),t.writer.writeUInt(0,32),t.writer.writeUInt(0,32)},n.prototype.getBoxContentSize=function(){var n,i;return t.prototype.getBoxContentSize.call(this)+4+4+12+(null!==(i=null===(n=this.name)||void 0===n?void 0:n.length)&&void 0!==i?i:0)+1},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(0,32),n.writer.writeString(this.handlerType),this.serializeReserved(n),this.name&&n.writer.writeString(this.name),n.writer.writeByte(0)},n}(Ru);function ns(t){var n=t.data,i=Gu(n.nextUint32()),e=i.version,r=i.flags;n.skip(4);var o=n.nextChars(4);n.skip(12);var u=n.nextUTF8String();return new ts(o,u,e,r.raw)}!function(t){function n(){return t.call(this,"mdir")||this}vu(n,t),n.prototype.serializeReserved=function(t){t.writer.writeString("appl"),t.writer.writeUInt(0,32),t.writer.writeUInt(0,32)}}(ts);x(),pt(),x(),pt(),x(),pt();var is=function(){function t(t,n){void 0===n&&(n=!1),this.fixed28BitMode=n,this.tag=t}return t.prototype.encodeSize=function(t){for(var n=[];t>0;)n.length>0&&(n[n.length-1]+=128),n.push(t%128),t>>=7;if(this.fixed28BitMode)for(;n.length<4;)n.push(128);return n.reverse()},p.defineProperty(t.prototype,"tag",{get:function(){return this.wb},set:function(t){if(!Tu(t,8))throw new g("Provided tag does not fit in 8 bits.");this.wb=t},enumerable:!1,configurable:!0}),t.prototype.getSize=function(){return this.getDescriptorSize()+1+this.encodeSize(this.getDescriptorSize()).length},t.prototype.serialize=function(t){t.writer.writeByte(this.tag);for(var n=0,i=this.encodeSize(this.getDescriptorSize());n<i.length;n++){var e=i[n];t.writer.writeByte(e)}this.serializeDescriptorContent(t)},t}();x(),pt();!function(t){function n(n,i,e,r,o,u,s){void 0===s&&(s={});var f=t.call(this,4,s.fixed28BitMode)||this;return f.upStream=e,f.decoderSpecificInfo=u,f.objectTypeIndication=n,f.streamType=i,f.bufferSizeDb=r,f.maxBitrate=o.max,f.avgBitrate=o.avg,f}vu(n,t),p.defineProperty(n.prototype,"objectTypeIndication",{get:function(){return this.yb},set:function(t){if(!Tu(t,8))throw new g("Provided objectTypeIndication does not fit in 8 bits.");this.yb=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"streamType",{get:function(){return this.bb},set:function(t){if(!Tu(t,6))throw new g("Provided streamType does not fit in 6 bits.");this.bb=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"bufferSizeDb",{get:function(){return this.Ab},set:function(t){if(!Tu(t,24))throw new g("Provided bufferSizeDb does not fit in 24 bits.");this.Ab=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"maxBitrate",{get:function(){return this.Sb},set:function(t){if(!Tu(t,32))throw new g("Provided maxBitrate does not fit in 32 bits.");this.Sb=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"avgBitrate",{get:function(){return this.Tb},set:function(t){if(!Tu(t,32))throw new g("Provided avgBitrate does not fit in 32 bits.");this.Tb=t},enumerable:!1,configurable:!0}),n.prototype.getDescriptorSize=function(){return 13+this.decoderSpecificInfo.reduce(function(t,n){return t+n.getSize()},0)},n.prototype.serializeDescriptorContent=function(t){t.writer.writeByte(this.objectTypeIndication),t.writer.writeUInt(this.streamType,6),t.writer.writeBool(this.upStream),t.writer.writeBit(1),t.writer.writeUInt(this.bufferSizeDb,24),t.writer.writeUInt(this.maxBitrate,32),t.writer.writeUInt(this.avgBitrate,32);for(var n=0,i=this.decoderSpecificInfo;n<i.length;n++){i[n].serialize(t)}}}(is);x(),pt();!function(t){function n(n,i){void 0===i&&(i={});var e=t.call(this,5,i.fixed28BitMode)||this;return e.data=n,e}vu(n,t),n.prototype.getDescriptorSize=function(){return this.data.length},n.prototype.serializeDescriptorContent=function(t){t.concat(pu.from(this.data))}}(is);x(),pt(),x(),pt();var es=function(t){function n(n){void 0===n&&(n=!1);var i=t.call(this,6,n)||this;return i.predefined=2,i}return vu(n,t),n.prototype.getDescriptorSize=function(){return 1},n.prototype.serializeDescriptorContent=function(t){t.writer.writeByte(this.predefined)},n}(is);!function(t){function n(n,i,e,r){void 0===r&&(r={});var o=t.call(this,3,r.fixed28BitMode)||this;return o.decoderConfigDescriptor=e,o.esId=n,o.streamPriority=i,o.dependsOnEsId=null==r?void 0:r.dependsOnEsId,o.urlString=null==r?void 0:r.url,o.ocrEsId=null==r?void 0:r.ocrEsId,o.slConfigDescriptor=new es(r.fixed28BitMode),o}vu(n,t),p.defineProperty(n.prototype,"streamDependenceFlag",{get:function(){return void 0!==this.dependsOnEsId},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"urlFlag",{get:function(){return void 0!==this.urlString},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"ocrStreamFlag",{get:function(){return void 0!==this.ocrEsId},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"esId",{get:function(){return this.kb},set:function(t){if(!Tu(t,16))throw new g("Provided esId does not fit in 16 bits.");this.kb=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"streamPriority",{get:function(){return this.Eb},set:function(t){if(!Tu(t,5))throw new g("Provided streamPriority does not fit in 5 bits.");this.Eb=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"dependsOnEsId",{get:function(){return this.Rb},set:function(t){if(t&&!Tu(t,16))throw new g("Provided dependsOnEsId does not fit in 16 bits.");this.Rb=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"ocrEsId",{get:function(){return this.Ib},set:function(t){if(t&&!Tu(t,16))throw new g("Provided ocrEsId does not fit in 16 bits.");this.Ib=t},enumerable:!1,configurable:!0}),n.prototype.getDescriptorSize=function(){return 3+(this.streamDependenceFlag?2:0)+(this.urlFlag?1+this.urlString.length:0)+(this.ocrStreamFlag?2:0)+this.decoderConfigDescriptor.getSize()+this.slConfigDescriptor.getSize()},n.prototype.serializeDescriptorContent=function(t){t.writer.writeUInt(this.esId,16),t.writer.writeBool(this.streamDependenceFlag),t.writer.writeBool(this.urlFlag),t.writer.writeBool(this.ocrStreamFlag),t.writer.writeUInt(this.streamPriority,5),this.streamDependenceFlag&&t.writer.writeUInt(this.dependsOnEsId,16),this.urlFlag&&(t.writer.writeByte(this.urlString.length),t.writer.writeString(this.urlString)),this.ocrStreamFlag&&t.writer.writeUInt(this.ocrEsId,16),this.decoderConfigDescriptor.serialize(t),this.slConfigDescriptor.serialize(t)}}(is);x(),pt(),x(),pt(),x(),pt(),x(),pt(),x(),pt();var rs=function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n.boxes=[],n}return vu(n,t),n.prototype.getSize=function(){return t.prototype.getSize.call(this)+this.boxes.reduce(function(t,n){return t+n.getSize()},0)},n.prototype.serialize=function(){for(var n=t.prototype.serialize.call(this),i=0,e=this.boxes;i<e.length;i++){var r=e[i];n=n.concat(r.serialize())}return n},n}(Su),os=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return vu(n,t),n.prototype.serializeBoxContent=function(t){},n.prototype.getBoxContentSize=function(){return 0},n}(rs),us=function(t){function n(n,i){var e=t.call(this,n)||this;return e.dataReferenceIndex=i,e}return vu(n,t),p.defineProperty(n.prototype,"dataReferenceIndex",{get:function(){return this.xb},set:function(t){if(!Tu(t,16))throw new g("Provided dataReferenceIndex does not fit in 16 bits.");this.xb=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return 8},n.prototype.serializeBoxContent=function(t){for(var n=0;n<6;n++)t.writer.writeByte(0);t.writer.writeUInt(this.dataReferenceIndex,16)},n}(os),ss=function(t){function n(n,i,e,r){var o,u,s=this;return(s=t.call(this,n,i)||this).extra=r,s.channelCount=null!==(o=e.channelCount)&&void 0!==o?o:2,s.sampleSize=null!==(u=e.sampleSize)&&void 0!==u?u:16,s.sampleRate=e.sampleRate,s}return vu(n,t),p.defineProperty(n.prototype,"channelCount",{get:function(){return this.Cb},set:function(t){if(!Tu(t,16))throw new g("Provided channelCount does not fit in 16 bits.");this.Cb=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"sampleSize",{get:function(){return this.Pb},set:function(t){if(!Tu(t,16))throw new g("Provided sampleSize does not fit in 16 bits.");this.Pb=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"sampleRate",{get:function(){return this.Nb},set:function(t){if(!Tu(Iu(t,16),32))throw new g("Provided rate does not fit in 32 bits (fixed 16.16).");this.Nb=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){var n,i;return t.prototype.getBoxContentSize.call(this)+8+2+2+2+2+(void 0!==this.sampleRate?4:0)+(null!==(i=null===(n=this.extra)||void 0===n?void 0:n.length)&&void 0!==i?i:0)},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(0,32),n.writer.writeUInt(0,32),n.writer.writeUInt(this.channelCount,16),n.writer.writeUInt(this.sampleSize,16),n.writer.writeUInt(0,16),n.writer.writeUInt(0,16),n.writer.writeUInt(Iu(this.sampleRate,16),32),this.extra&&ku(n.writer,this.extra)},n}(us);x(),pt();!function(t){function n(n){var i=t.call(this,"stco",0,0)||this;return i.entries=n,i}vu(n,t),p.defineProperty(n.prototype,"entries",{get:function(){return this.Db},set:function(t){if(!Tu(t.length,32))throw new g("Number of allowed entries cannot fit in 32 bits.");if(t.some(function(t){return!Tu(t,32)}))throw new g("Not all entries can be represented in 32 bits.");this.Db=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4+4*this.entries.length},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.entries.length,32);for(var i=0,e=this.entries;i<e.length;i++){var r=e[i];n.writer.writeUInt(r,32)}}}(Ru);x(),pt();!function(t){function n(n){var i=t.call(this,"clap")||this;return i.cleanApertureWidthN=n.cleanApertureWidthN,i.cleanApertureWidthD=n.cleanApertureWidthD,i.cleanApertureHeightN=n.cleanApertureHeightN,i.cleanApertureHeightD=n.cleanApertureHeightD,i.horizOffN=n.horizOffN,i.horizOffD=n.horizOffD,i.vertOffN=n.vertOffN,i.vertOffD=n.vertOffD,i}vu(n,t),p.defineProperty(n.prototype,"cleanApertureWidthN",{get:function(){return this.Bb},set:function(t){if(!Tu(t,32))throw new g("Provided cleanApertureWidthN does not fit in 32 bits.");this.Bb=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"cleanApertureWidthD",{get:function(){return this.Lb},set:function(t){if(!Tu(t,32))throw new g("Provided cleanApertureWidthD does not fit in 32 bits.");this.Lb=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"cleanApertureHeightN",{get:function(){return this.Mb},set:function(t){if(!Tu(t,32))throw new g("Provided cleanApertureHeightN does not fit in 32 bits.");this.Mb=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"cleanApertureHeightD",{get:function(){return this.Ob},set:function(t){if(!Tu(t,32))throw new g("Provided cleanApertureHeightD does not fit in 32 bits.");this.Ob=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"horizOffN",{get:function(){return this.Fb},set:function(t){if(!Tu(t,32))throw new g("Provided horizOffN does not fit in 32 bits.");this.Fb=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"horizOffD",{get:function(){return this.Vb},set:function(t){if(!Tu(t,32))throw new g("Provided horizOffD does not fit in 32 bits.");this.Vb=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"vertOffN",{get:function(){return this.Wb},set:function(t){if(!Tu(t,32))throw new g("Provided vertOffN does not fit in 32 bits.");this.Wb=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"vertOffD",{get:function(){return this.Ub},set:function(t){if(!Tu(t,32))throw new g("Provided vertOffD does not fit in 32 bits.");this.Ub=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return 32},n.prototype.serializeBoxContent=function(t){t.writer.writeUInt(this.cleanApertureWidthN,32),t.writer.writeUInt(this.cleanApertureWidthD,32),t.writer.writeUInt(this.cleanApertureHeightN,32),t.writer.writeUInt(this.cleanApertureHeightD,32),t.writer.writeUInt(this.horizOffN,32),t.writer.writeUInt(this.horizOffD,32),t.writer.writeUInt(this.vertOffN,32),t.writer.writeUInt(this.vertOffD,32)}}(Su);x(),pt();!function(t){function n(n,i){var e=t.call(this,"ctts",n,0)||this;return e.entries=i,e}vu(n,t),p.defineProperty(n.prototype,"entries",{get:function(){return this.Db},set:function(t){if(!Tu(t.length,32))throw new g("Number of allowed entries cannot fit in 32 bits.");if(t.some(function(t){return!Tu(t.sampleCount,32)||!Tu(t.sampleOffset,32)}))throw new g("Not all entries can be represented in 64 bits.");this.Db=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4+8*this.entries.length},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.entries.length,32);for(var i=0,e=this.entries;i<e.length;i++){var r=e[i];n.writer.writeUInt(r.sampleCount,32),0===this.version?n.writer.writeUInt(r.sampleOffset,32):1===this.version&&n.writer.writeInt(r.sampleOffset,32)}}}(Ru);x(),pt();!function(t){function n(n){var i=t.call(this,"url ",0,void 0===n?1:0)||this;return i.location=n,i}vu(n,t),p.defineProperty(n.prototype,"location",{get:function(){return this.Gb},set:function(t){this.flags=void 0===t?1:0,this.Gb=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){var n=t.prototype.getBoxContentSize.call(this);return this.location?n+this.location.length+1:n},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),this.location&&(n.writer.writeString(this.location),n.writer.writeByte(0))}}(Ru);x(),pt();!function(t){function n(n,i,e){var r=t.call(this,"urn ",0,e)||this;return r.name=n,r.location=i,r}vu(n,t),p.defineProperty(n.prototype,"location",{get:function(){return this.Gb},set:function(t){if(1&this.flags)throw new g("The moov containment flag is set, a DataEntryUrlBox should be used instead.");this.Gb=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){var n=t.prototype.getBoxContentSize.call(this)+this.name.length+1;return this.location?n+this.location.length+1:n},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeString(this.name),n.writer.writeByte(0),this.location&&(n.writer.writeString(this.location),n.writer.writeByte(0))}}(Ru);x(),pt();!function(t){function n(){return t.call(this,"dinf")||this}vu(n,t)}(os);x(),pt(),x(),pt();var fs=function(t){function n(n,i,e){var r=t.call(this,n)||this;if(r.version=i,!Tu(i,8))throw new g("the provided version cannot fit in 8 bits.");return r.flags=e,r}return vu(n,t),p.defineProperty(n.prototype,"flags",{get:function(){return this.mb},set:function(t){this.mb=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return 4},n.prototype.serializeFlags=function(t){if("number"!=typeof this.flags)throw new g("Missing custom serializeFlags method.");t.writer.writeUInt(this.flags,24)},n.prototype.serializeBoxContent=function(t){t.writer.writeByte(this.version),this.serializeFlags(t)},n}(rs);!function(t){function n(){return t.call(this,"dref",0,0)||this}vu(n,t),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.boxes.length,32)}}(fs);x(),pt(),x(),pt();var hs=function(t){function n(n,i,e){void 0===e&&(e=0);var r=t.call(this,"elst",i,e)||this;return r.entries=n,r}return vu(n,t),p.defineProperty(n.prototype,"bitSize",{get:function(){return 0===this.version?32:64},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"entries",{get:function(){return this.Db},set:function(t){for(var n=0,i=t;n<i.length;n++){var e=i[n];if(!Tu(e.segmentDuration,this.bitSize))throw new g("SegmentDuration of one of the entries does not fit in ".concat(this.bitSize," bits."));if(!Tu(e.mediaTime,this.bitSize))throw new g("MediaTime of one of the entries does not fit in ".concat(this.bitSize," bits."));if(!Tu(e.mediaRateInteger,16))throw new g("Provided mediaRateInteger does not fit in 16 bits.");if(e.mediaRateFraction&&!Tu(e.mediaRateFraction,16))throw new g("Provided mediaRateFraction does not fit in 16 bits.")}this.Db=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4+this.entries.length*(2*this.bitSize/8+2+2)},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.entries.length,32),this.serializeElstBoxContent(n)},n}(Ru),cs=function(t){function n(n,i){return void 0===i&&(i=0),t.call(this,n,0,i)||this}return vu(n,t),n.prototype.serializeElstBoxContent=function(t){for(var n,i=0,e=this.entries;i<e.length;i++){var r=e[i];t.writer.writeUInt(r.segmentDuration,32),t.writer.writeInt(r.mediaTime,32),t.writer.writeUInt(r.mediaRateInteger,16),t.writer.writeUInt(null!==(n=r.mediaRateFraction)&&void 0!==n?n:0,16)}},n}(hs),as=function(t){function n(n,i){return void 0===i&&(i=0),t.call(this,n,1,i)||this}return vu(n,t),n.prototype.serializeElstBoxContent=function(t){for(var n,i=0,e=this.entries;i<e.length;i++){var r=e[i];t.writer.writeUInt(r.segmentDuration.getHighBitsUnsigned(),32),t.writer.writeUInt(r.segmentDuration.getLowBitsUnsigned(),32),t.writer.writeInt(r.mediaTime.getHighBits(),32),t.writer.writeInt(r.mediaTime.getLowBits(),32),t.writer.writeUInt(r.mediaRateInteger,16),t.writer.writeUInt(null!==(n=r.mediaRateFraction)&&void 0!==n?n:0,16)}},n}(hs);function vs(t){for(var n=t.data,i=Gu(n.nextUint32()),e=i.version,r=i.flags,o=n.nextUint32(),u=[],s=0;s<o;s++){var f=void 0,h=void 0;0===e?(f=n.nextUint32(),h=n.nextInt32()):(f=n.nextUint64(),h=n.nextInt64());var c=n.nextInt16(),a=n.nextInt16();u.push({segmentDuration:f,mediaTime:h,mediaRateFraction:a,mediaRateInteger:c})}return 0===e?new cs(u,r.raw):new as(u,r.raw)}var ds=function(t){function n(){return t.call(this,"edts")||this}return vu(n,t),n}(os);function ls(t){for(var n=new ds,i=0,e=Yu(t.data);i<e.length;i++){var r=e[i];ju(r,"elst")?n.boxes.push(vs(r)):n.boxes.push(Qu(r))}return n}x(),pt(),x(),pt();var ws=function(t){function n(n,i,e,r){var o=t.call(this,n)||this;return o.majorBrand=i,o.minorVersion=e,o.compatibleBrands=r,o}return vu(n,t),p.defineProperty(n.prototype,"majorBrand",{get:function(){return this.Xb},set:function(t){if(4!==t.length)throw new g("the provided major brand does not conform to the 4 character requirement");this.Xb=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"minorVersion",{get:function(){return this.Zb},set:function(t){if(!Tu(t,32))throw new g("the provided minor version does not fit in 32 bits.");this.Zb=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"compatibleBrands",{get:function(){return this.Hb},set:function(t){if(t.some(function(t){return 4!==t.length}))throw new g("Some of the compatible brands do not conform to the 4 character requirement");this.Hb=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return 4*(2+this.compatibleBrands.length)},n.prototype.serializeBoxContent=function(t){t.writer.writeString(this.majorBrand),t.writer.writeUInt(this.minorVersion,32);for(var n=0,i=this.compatibleBrands;n<i.length;n++){var e=i[n];t.writer.writeString(e)}},n}(Su);!function(t){function n(n,i,e){return t.call(this,"ftyp",n,i,e)||this}vu(n,t)}(ws);x(),pt();!function(t){function n(n,i){void 0===i&&(i="free");var e=t.call(this,i)||this;return e.data=n,e}vu(n,t),n.prototype.getBoxContentSize=function(){var t,n;return null!==(n=null===(t=this.data)||void 0===t?void 0:t.length)&&void 0!==n?n:0},n.prototype.serializeBoxContent=function(t){this.data&&t.concat(pu.from(this.data))}}(Su);x(),pt(),x(),pt();var bs=function(t){function n(n,i,e,r){void 0===r&&(r=0);var o=t.call(this,"mdhd",e,r)||this;return o.creationTime=n.creation,o.modificationTime=n.modification,o.timescale=n.scale,o.duration=n.duration,o.language=i,o}return vu(n,t),p.defineProperty(n.prototype,"creationTime",{get:function(){return this.zb},set:function(t){if(!Tu(t,this.bitSize))throw new g("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.zb=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"modificationTime",{get:function(){return this.Yb},set:function(t){if(!Tu(t,this.bitSize))throw new g("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.Yb=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"timescale",{get:function(){return this.Kb},set:function(t){if(!Tu(t,32))throw new g("Provided sequence number does not fit in 32 bits.");this.Kb=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"duration",{get:function(){return this.qb},set:function(t){if(!Tu(t,this.bitSize))throw new g("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.qb=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"language",{get:function(){return this.jb},set:function(t){if(!ys(t))throw new g("Expected an ISO-639-2/T language code");this.jb=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"bitSize",{get:function(){return 0===this.version?32:64},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.bitSize/8*3+4+2+2},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),this.serializeMdiaContent(n),n.writer.writeBit(0);for(var i=0,e=this.language;i<e.length;i++){var r=e[i];n.writer.writeUInt(r.charCodeAt(0)-96,5)}n.writer.writeUInt(0,16)},n}(Ru),gs=function(t){function n(n,i,e){return void 0===e&&(e=0),t.call(this,n,i,0,e)||this}return vu(n,t),n.prototype.serializeMdiaContent=function(t){t.writer.writeUInt(this.creationTime,32),t.writer.writeUInt(this.modificationTime,32),t.writer.writeUInt(this.timescale,32),t.writer.writeUInt(this.duration,32)},n}(bs),ms=function(t){function n(n,i,e){return void 0===e&&(e=0),t.call(this,n,i,1,e)||this}return vu(n,t),n.prototype.serializeMdiaContent=function(t){t.writer.writeUInt(this.creationTime.getHighBitsUnsigned(),32),t.writer.writeUInt(this.creationTime.getLowBitsUnsigned(),32),t.writer.writeUInt(this.modificationTime.getHighBitsUnsigned(),32),t.writer.writeUInt(this.modificationTime.getLowBitsUnsigned(),32),t.writer.writeUInt(this.timescale,32),t.writer.writeUInt(this.duration.getHighBitsUnsigned(),32),t.writer.writeUInt(this.duration.getLowBitsUnsigned(),32)},n}(bs);function ps(t){var n=t.data,i=Gu(n.nextUint32()),e=i.version,r=i.flags,o=$u(n,e),u=new gu(pu.from(n.nextUint8Array(2)));u.skipBits(1);for(var s=[],f=0;f<3;f++)s.push(u.readUInt(5));var h=s.map(function(t){return String.fromCharCode(t+96)}).join("");return ys(h)||(h="und"),n.skip(2),0===e?new gs(o,h,r.raw):new ms(o,h,r.raw)}function ys(t){return/^[a-z]{3}$/.test(t)}var _s=function(t){function n(){return t.call(this,"mdia")||this}return vu(n,t),n}(os);function Ss(t){for(var n=new _s,i=0,e=Yu(t.data);i<e.length;i++){var r=e[i];ju(r,"mdhd")?n.boxes.push(ps(r)):ju(r,"hdlr")?n.boxes.push(ns(r)):n.boxes.push(Qu(r))}return n}x(),pt();!function(t){function n(){var n=t.call(this,"mdat")||this;return n.data=new pu,n}vu(n,t),n.prototype.getBoxContentSize=function(){return this.data.length},n.prototype.serializeBoxContent=function(t){t.concat(this.data)}}(Su);x(),pt();!function(t){function n(){return t.call(this,"minf")||this}vu(n,t)}(os);x(),pt();var Ts;!function(t){function n(n){var i=t.call(this,"meta",0,0)||this;return i.handler=n,i}vu(n,t),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.handler.getSize()},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.concat(this.handler.serialize())}}(fs);x(),pt(),x(),pt(),function(t){t.VIDEO="vide",t.AUXILIARY_VIDEO="auxv",t.AUDIO="soun",t.METADATA="meta",t.HINT="hint",t.TEXT="text",t.SUBTITLE="subt",t.FONT="fdsm"}(Ts||(Ts={})),x(),pt();var Is,ks,Es={a:1,b:0,u:0,c:0,d:1,v:0,x:0,y:0,w:1};function Rs(t,n){n.writer.writeUInt(Iu(t.a,16),32),n.writer.writeUInt(Iu(t.b,16),32),n.writer.writeUInt(Iu(0,30),32),n.writer.writeUInt(Iu(t.c,16),32),n.writer.writeUInt(Iu(t.d,16),32),n.writer.writeUInt(Iu(0,30),32),n.writer.writeUInt(Iu(t.x,16),32),n.writer.writeUInt(Iu(t.y,16),32),n.writer.writeUInt(Iu(1,30),32)}function Os(t,n){var i,e,r,o;n.writer.writeUInt(null!==(i=t.isLeading)&&void 0!==i?i:Is.UNKNOWN,2),n.writer.writeUInt(null!==(e=t.sampleDependsOn)&&void 0!==e?e:ks.UNKNOWN,2),n.writer.writeUInt(null!==(r=t.sampleIsDependedOn)&&void 0!==r?r:ks.UNKNOWN,2),n.writer.writeUInt(null!==(o=t.sampleHasRedundancy)&&void 0!==o?o:ks.UNKNOWN,2)}function Ns(t,n){var i,e,r;n.writer.writeUInt(0,4),Os(t,n),n.writer.writeUInt(null!==(i=t.samplePaddingValue)&&void 0!==i?i:0,3),n.writer.writeBool(null!==(e=t.sampleIsNonSyncSample)&&void 0!==e&&e),n.writer.writeUInt(null!==(r=t.sampleDegradationPriority)&&void 0!==r?r:0,16)}x(),pt(),function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.WITH_DEPENDENCY=1]="WITH_DEPENDENCY",t[t.NO=2]="NO",t[t.WITHOUT_DEPENDENCY=3]="WITHOUT_DEPENDENCY"}(Is||(Is={})),function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.YES=1]="YES",t[t.NO=2]="NO",t[t.RESERVED=3]="RESERVED"}(ks||(ks={})),x(),pt(),x(),pt();var Ps=function(){};x(),pt(),x(),pt(),x(),pt();var As=function(t){function n(n,i,e){var r=t.call(this,"pssh",n,0)||this;return r.systemId=i,r.data=e,r}return vu(n,t),p.defineProperty(n.prototype,"systemId",{get:function(){return this.Qb},set:function(t){if(16!==t.length)throw new g("Provided systemId length is not 16.");this.Qb=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"data",{get:function(){return this.qm},set:function(t){if(!Tu(t.length,32))throw new g("Provided data length does not fit in 32 bits.");this.qm=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+16+4+this.data.length},n.prototype.serializeVersionBoxContent=function(t){},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.concat(pu.from(this.systemId)),this.serializeVersionBoxContent(n),n.writer.writeUInt(this.data.length,32),n.concat(pu.from(this.data))},n}(Ru),Ds=function(t){function n(n,i){return t.call(this,0,n,i)||this}return vu(n,t),n}(As),Cs=function(t){function n(n,i,e){var r=t.call(this,1,n,i)||this;return r.kIds=e,r}return vu(n,t),p.defineProperty(n.prototype,"kIds",{get:function(){return this.Jb},set:function(t){if(!Tu(t.length,32))throw new g("Provided kIds length cannot fit in 32 bits.");if(t.some(function(t){return 16!==t.length}))throw new g("Not all provided key ids are 16 bytes long.");this.Jb=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4+16*this.kIds.length},n.prototype.serializeVersionBoxContent=function(t){t.writer.writeUInt(this.kIds.length,32);for(var n=0,i=this.kIds;n<i.length;n++){var e=i[n];t.concat(pu.from(e))}},n}(As);function xs(t){var n=t.data.nextUint8();t.data.skip(3);var i=t.data.nextUint8Array(16),e=[];if(1===n)for(var r=t.data.nextUint32(),o=0;o<r;o++)e.push(t.data.nextUint8Array(16));var u=t.data.nextUint32(),s=t.data.nextUint8Array(u);return 1===n?new Cs(i,s,e):new Ds(i,s)}x(),pt(),x(),pt();var Bs=function(t){function n(n,i,e){void 0===e&&(e=0);var r=t.call(this,"mehd",i,e)||this;return r.fragmentDuration=n,r}return vu(n,t),p.defineProperty(n.prototype,"bitSize",{get:function(){return 0===this.version?32:64},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"fragmentDuration",{get:function(){return this.$b},set:function(t){if(!Tu(t,this.bitSize))throw new g("The provided fragmentDuration does not fit in ".concat(this.bitSize," bits."));this.$b=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.bitSize/8},n}(Ru),Ms=function(t){function n(n,i){return void 0===i&&(i=0),t.call(this,n,0,i)||this}return vu(n,t),n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.fragmentDuration,32)},n}(Bs),Fs=function(t){function n(n,i){return void 0===i&&(i=0),t.call(this,n,1,i)||this}return vu(n,t),n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.fragmentDuration.getHighBitsUnsigned(),32),n.writer.writeUInt(this.fragmentDuration.getLowBitsUnsigned(),32)},n}(Bs);function Ls(t){var n=t.data,i=Gu(n.nextUint32()),e=i.version,r=i.flags;return 0===e?new Ms(n.nextUint32(),r.raw):new Fs(n.nextUint64(),r.raw)}x(),pt();var Us=function(t){function n(n,i,e,r){void 0===i&&(i={}),void 0===e&&(e=0),void 0===r&&(r=0);var o,u,s,f=this;return(f=t.call(this,"trex",e,r)||this).trackId=n,f.defaultSampleDescriptionIndex=null!==(o=null==i?void 0:i.sampleDescriptionIndex)&&void 0!==o?o:0,f.defaultSampleDuration=null!==(u=i.sampleDuration)&&void 0!==u?u:0,f.defaultSampleSize=null!==(s=i.sampleSize)&&void 0!==s?s:0,f.defaultSampleFlags=i.sampleFlags,f}return vu(n,t),p.defineProperty(n.prototype,"trackId",{get:function(){return this.tA},set:function(t){if(!Tu(t,32))throw new g("Provided track id does not fit in 32 bits.");this.tA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"defaultSampleDescriptionIndex",{get:function(){return this.iA},set:function(t){if(!Tu(t,32))throw new g("Provided default sample description index does not fit in 32 bits.");this.iA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"defaultSampleDuration",{get:function(){return this.sA},set:function(t){if(!Tu(t,32))throw new g("Provided default sample duration does not fit in 32 bits.");this.sA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"defaultSampleSize",{get:function(){return this.eA},set:function(t){if(!Tu(t,32))throw new g("Provided default sample size does not fit in 32 bits.");this.eA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"defaultSampleFlags",{get:function(){return this.nA},set:function(t){if((null==t?void 0:t.samplePaddingValue)&&!Tu(t.samplePaddingValue,3))throw new g("Provided sample padding value does not fit in 3 bits.");if((null==t?void 0:t.sampleDegradationPriority)&&!Tu(t.sampleDegradationPriority,16))throw new g("Provided sample degradation priority does not fit in 16 bits.");this.nA=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+20},n.prototype.serializeBoxContent=function(n){var i;t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.trackId,32),n.writer.writeUInt(this.defaultSampleDescriptionIndex,32),n.writer.writeUInt(this.defaultSampleDuration,32),n.writer.writeUInt(this.defaultSampleSize,32),Ns(null!==(i=this.defaultSampleFlags)&&void 0!==i?i:{},n)},n}(Ru);function zs(t){var n=t.data,i=Gu(n.nextUint32()),e=i.version,r=i.flags,o=n.nextUint32(),u=n.nextUint32(),s=n.nextUint32(),f=n.nextUint32(),h=Zu(new gu(pu.from(n.nextUint8Array(4))));return new Us(o,{sampleDescriptionIndex:u,sampleDuration:s,sampleSize:f,sampleFlags:h},e,r.raw)}var Ws=function(t){function n(){return t.call(this,"mvex")||this}return vu(n,t),n}(os);function Vs(t){for(var n=new Ws,i=0,e=Yu(t.data);i<e.length;i++){var r=e[i];ju(r,"mehd")?n.boxes.push(Ls(r)):ju(r,"trex")?n.boxes.push(zs(r)):n.boxes.push(Qu(r))}return n}x(),pt();var Hs=function(t){function n(i,e,r,o,u){void 0===u&&(u=0);var s,f,h,c=this;return(c=t.call(this,"mvhd",o,u)||this).creationTime=i.creation,c.modificationTime=i.modification,c.timescale=i.scale,c.duration=i.duration,c.rate=null!==(s=r.rate)&&void 0!==s?s:n.DEFAULT_RATE,c.volume=null!==(f=r.volume)&&void 0!==f?f:n.DEFAULT_VOLUME,c.matrix=null!==(h=r.matrix)&&void 0!==h?h:Es,c.rA=e,c}return vu(n,t),p.defineProperty(n.prototype,"bitSize",{get:function(){return 0===this.version?32:64},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"creationTime",{get:function(){return this.zb},set:function(t){if(!Tu(t,this.bitSize))throw new g("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.zb=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"modificationTime",{get:function(){return this.Yb},set:function(t){if(!Tu(t,this.bitSize))throw new g("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.Yb=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"timescale",{get:function(){return this.Kb},set:function(t){if(!Tu(t,32))throw new g("Provided sequence number does not fit in 32 bits.");this.Kb=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"duration",{get:function(){return this.qb},set:function(t){if(!Tu(t,this.bitSize))throw new g("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.qb=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"rate",{get:function(){return this.hA},set:function(t){if(!Tu(Iu(t,16),32))throw new g("Provided rate does not fit in 32 bits (fixed 16.16).");this.hA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"volume",{get:function(){return this.oA},set:function(t){if(!Tu(Iu(t,8),16))throw new g("Provided volume does not fit in 16 bits (fixed 8.8).");this.oA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"matrix",{get:function(){return this.aA},set:function(t){if(0!==t.u||0!==t.v||1!==t.w)throw new g("(u, v, w) does not match the required (0, 0, 1)");this.aA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"nextTrackId",{get:function(){return this.rA},set:function(t){if(0===t)throw new g("NextTrackId cannot be 0.");if(!Tu(t,32))throw new g("NextTrackId cannot exceed 32 bits.");this.rA=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.bitSize/8*3+4+4+2+2+8+36+24+4},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),this.serializeMvhdContent(n),n.writer.writeUInt(Iu(this.rate,16),32),n.writer.writeUInt(Iu(this.volume,8),16),n.writer.writeUInt(0,16),n.writer.writeUInt(0,32),n.writer.writeUInt(0,32),Rs(this.matrix,n);for(var i=0;i<6;i++)n.writer.writeUInt(0,32);n.writer.writeUInt(this.nextTrackId,32)},n.DEFAULT_RATE=1,n.DEFAULT_VOLUME=1,n}(Ru),qs=function(t){function n(n,i,e,r){return void 0===e&&(e={}),void 0===r&&(r=0),t.call(this,n,i,e,0,r)||this}return vu(n,t),n.prototype.serializeMvhdContent=function(t){t.writer.writeUInt(this.creationTime,32),t.writer.writeUInt(this.modificationTime,32),t.writer.writeUInt(this.timescale,32),t.writer.writeUInt(this.duration,32)},n}(Hs),Xs=function(t){function n(n,i,e,r){return void 0===e&&(e={}),void 0===r&&(r=0),t.call(this,n,i,e,1,r)||this}return vu(n,t),n.prototype.serializeMvhdContent=function(t){t.writer.writeUInt(this.creationTime.getHighBitsUnsigned(),32),t.writer.writeUInt(this.creationTime.getLowBitsUnsigned(),32),t.writer.writeUInt(this.modificationTime.getHighBitsUnsigned(),32),t.writer.writeUInt(this.modificationTime.getLowBitsUnsigned(),32),t.writer.writeUInt(this.timescale,32),t.writer.writeUInt(this.duration.getHighBitsUnsigned(),32),t.writer.writeUInt(this.duration.getLowBitsUnsigned(),32)},n}(Hs);function js(t){var n=t.data,i=Gu(n.nextUint32()),e=i.version,r=i.flags,o=$u(n,e),u=Eu(n.nextUint32(),16),s=Eu(n.nextUint16(),8);n.skip(2),n.skip(8);var f=Ju(n);n.skip(24);var h=n.nextUint32();return 0===e?new qs(o,h,{rate:u,volume:s,matrix:f},r.raw):new Xs(o,h,{rate:u,volume:s,matrix:f},r.raw)}x(),pt(),x(),pt();var Ys=function(t){function n(n,i,e,r,o,u,s){void 0===s&&(s={});var f,h,c,a=this;return a=t.call(this,"tkhd",n,function(t){var n,i,e,r;return{trackEnabled:null===(n=null==t?void 0:t.trackEnabled)||void 0===n||n,trackInMovie:null===(i=null==t?void 0:t.trackInMovie)||void 0===i||i,trackInPreview:null===(e=null==t?void 0:t.trackInPreview)||void 0===e||e,trackSizeIsAspectRatio:null!==(r=null==t?void 0:t.trackSizeIsAspectRatio)&&void 0!==r&&r}}(s))||this,a.creationTime=i.creation,a.modificationTime=i.modification,a.trackId=e,a.duration=i.duration,a.volume=r,a.width=o,a.height=u,a.layer=null!==(f=s.layer)&&void 0!==f?f:0,a.alternateGroup=null!==(h=s.alternateGroup)&&void 0!==h?h:0,a.matrix=null!==(c=s.matrix)&&void 0!==c?c:Es,a}return vu(n,t),p.defineProperty(n.prototype,"bitSize",{get:function(){return 0===this.version?32:64},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"creationTime",{get:function(){return this.zb},set:function(t){if(!Tu(t,this.bitSize))throw new g("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.zb=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"modificationTime",{get:function(){return this.Yb},set:function(t){if(!Tu(t,this.bitSize))throw new g("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.Yb=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"trackId",{get:function(){return this.tA},set:function(t){if(0===t)throw new g("trackId cannot be 0.");if(!Tu(t,32))throw new g("trackId cannot exceed 32 bits.");this.tA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"duration",{get:function(){return this.qb},set:function(t){if(!Tu(t,this.bitSize))throw new g("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.qb=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"volume",{get:function(){return this.oA},set:function(t){if(!Tu(Iu(t,8),16))throw new g("Provided volume does not fit in 16 bits (fixed 8.8).");this.oA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"width",{get:function(){return this.uA},set:function(t){if(!Tu(Iu(t,16),32))throw new g("Provided width does not fit in 32 bits (fixed 16.16).");this.uA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"height",{get:function(){return this.cA},set:function(t){if(!Tu(Iu(t,16),32))throw new g("Provided height does not fit in 32 bits (fixed 16.16).");this.cA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"layer",{get:function(){return this.dA},set:function(t){if(!Tu(t,16))throw new g("Provided layer does not fit in 16 bits.");this.dA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"alternateGroup",{get:function(){return this.lA},set:function(t){if(!Tu(t,16))throw new g("Provided alternateGroup does not fit in 16 bits.");this.lA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"matrix",{get:function(){return this.aA},set:function(t){if(0!==t.u||0!==t.v||1!==t.w)throw new g("(u, v, w) does not match the required (0, 0, 1)");this.aA=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.bitSize/8*3+4+4+8+2+2+2+2+36+4+4},n.prototype.serializeFlags=function(t){t.writer.writeUInt(0,20),t.writer.writeBool(this.flags.trackSizeIsAspectRatio),t.writer.writeBool(this.flags.trackInPreview),t.writer.writeBool(this.flags.trackInMovie),t.writer.writeBool(this.flags.trackEnabled)},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),this.serializeTkhdContent(n),n.writer.writeUInt(0,32),n.writer.writeUInt(0,32),n.writer.writeUInt(this.layer,16),n.writer.writeUInt(this.alternateGroup,16),n.writer.writeUInt(Iu(this.volume,8),16),n.writer.writeUInt(0,16),Rs(this.matrix,n),n.writer.writeUInt(Iu(this.width,16),32),n.writer.writeUInt(Iu(this.height,16),32)},n}(Ru),Ks=function(t){function n(n,i,e,r,o,u){return t.call(this,0,n,i,e,r,o,u)||this}return vu(n,t),n.prototype.serializeTkhdContent=function(t){t.writer.writeUInt(this.creationTime,32),t.writer.writeUInt(this.modificationTime,32),t.writer.writeUInt(this.trackId,32),t.writer.writeUInt(0,32),t.writer.writeUInt(this.duration,32)},n}(Ys),Gs=function(t){function n(n,i,e,r,o,u){return t.call(this,1,n,i,e,r,o,u)||this}return vu(n,t),n.prototype.serializeTkhdContent=function(t){t.writer.writeUInt(this.creationTime.getHighBitsUnsigned(),32),t.writer.writeUInt(this.creationTime.getLowBitsUnsigned(),32),t.writer.writeUInt(this.modificationTime.getHighBitsUnsigned(),32),t.writer.writeUInt(this.modificationTime.getLowBitsUnsigned(),32),t.writer.writeUInt(this.trackId,32),t.writer.writeUInt(0,32),t.writer.writeUInt(this.duration.getHighBitsUnsigned(),32),t.writer.writeUInt(this.duration.getLowBitsUnsigned(),32)},n}(Ys);function $s(t){var n,i,e,r,o=t.data,u=Gu(o.nextUint32()),s=u.version,f=u.flags,h=f.isSet(8),c=f.isSet(4),a=f.isSet(2),v=f.isSet(1);0===s?(n=o.nextUint32(),i=o.nextUint32(),e=o.nextUint32(),o.skip(4),r=o.nextUint32()):(n=o.nextUint64(),i=o.nextUint64(),e=o.nextUint32(),o.skip(4),r=o.nextUint64()),o.skip(8);var d=o.nextInt16(),l=o.nextInt16(),w=Eu(o.nextInt16(),8);o.skip(2);var b=Ju(o),g=Eu(o.nextUint32(),16),m=Eu(o.nextUint32(),16);return 0===s?new Ks({creation:n,modification:i,duration:r},e,w,g,m,{layer:d,matrix:b,alternateGroup:l,trackSizeIsAspectRatio:h,trackEnabled:v,trackInPreview:c,trackInMovie:a}):new Gs({creation:n,modification:i,duration:r},e,w,g,m,{layer:d,matrix:b,alternateGroup:l,trackSizeIsAspectRatio:h,trackEnabled:v,trackInPreview:c,trackInMovie:a})}var Zs=function(t){function n(){return t.call(this,"trak")||this}return vu(n,t),n}(os);function Js(t){for(var n=new Zs,i=0,e=Yu(t.data);i<e.length;i++){var r=e[i];ju(r,"tkhd")?n.boxes.push($s(r)):ju(r,"mdia")?n.boxes.push(Ss(r)):ju(r,"edts")?n.boxes.push(ls(r)):n.boxes.push(Qu(r))}return n}var Qs=function(t){function n(){return t.call(this,"moov")||this}return vu(n,t),n}(os);x(),pt(),x(),pt(),x(),pt();var tf=function(t){function n(n,i,e){void 0===e&&(e=0);var r=t.call(this,"tfdt",i,e)||this;return r.baseMediaDecodeTime=n,r}return vu(n,t),p.defineProperty(n.prototype,"bitSize",{get:function(){return 0===this.version?32:64},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"baseMediaDecodeTime",{get:function(){return this.fA},set:function(t){if(!Tu(t,this.bitSize))throw new g("Provided baseMediaDecodeTime does not fit in ".concat(this.bitSize," bits."));this.fA=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.bitSize/8},n}(Ru),nf=function(t){function n(n,i){return void 0===i&&(i=0),t.call(this,n,0,i)||this}return vu(n,t),n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.baseMediaDecodeTime,32)},n}(tf),ef=function(t){function n(n,i){return void 0===i&&(i=0),t.call(this,n,1,i)||this}return vu(n,t),n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.baseMediaDecodeTime.getHighBitsUnsigned(),32),n.writer.writeUInt(this.baseMediaDecodeTime.getLowBitsUnsigned(),32)},n}(tf);function rf(t){var n=t.data,i=Gu(n.nextUint32()),e=i.version,r=i.flags;return 0===e?new nf(n.nextUint32(),r.raw):new ef(n.nextUint64(),r.raw)}x(),pt();var of=function(t){function n(n,i){void 0===i&&(i=0);var e=t.call(this,"tfhd",i,function(t){return{baseDataOffsetPresent:void 0!==t.baseDataOffset,sampleDescriptionIndexPresent:void 0!==t.sampleDescriptionIndex,defaultSampleDurationPresent:void 0!==t.defaultSampleDuration,defaultSampleSizePresent:void 0!==t.defaultSampleSize,defaultSampleFlagsPresent:void 0!==t.defaultSampleFlags,durationIsEmpty:t.durationIsEmpty,defaultBaseIsMoof:t.defaultBaseIsMoof}}(n))||this;return e.trackId=n.trackId,e.baseDataOffset=n.baseDataOffset,e.sampleDescriptionIndex=n.sampleDescriptionIndex,e.defaultSampleDuration=n.defaultSampleDuration,e.defaultSampleSize=n.defaultSampleSize,e.defaultSampleFlags=n.defaultSampleFlags,e}return vu(n,t),p.defineProperty(n.prototype,"trackId",{get:function(){return this.tA},set:function(t){if(!Tu(t,32))throw new g("Provided track id does not fit in 32 bits.");this.tA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"baseDataOffset",{get:function(){return this.vA},set:function(t){if(void 0===t&&this.flags.baseDataOffsetPresent)throw new g("The base data offset present flag is set.");if(void 0!==t&&!this.flags.baseDataOffsetPresent)throw new g("The base data offset present flag is not set.");if(t&&!Tu(t,64))throw new g("Provided baseDataOffset does not fit in 32 bits.");this.vA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"sampleDescriptionIndex",{get:function(){return this._A},set:function(t){if(void 0===t&&this.flags.sampleDescriptionIndexPresent)throw new g("The sample description index flag is set.");if(void 0!==t&&!this.flags.sampleDescriptionIndexPresent)throw new g("The sample description index flag is not set.");if(t&&!Tu(t,32))throw new g("Provided sampleDescriptionIndex does not fit in 32 bits.");this._A=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"defaultSampleDuration",{get:function(){return this.sA},set:function(t){if(void 0===t&&this.flags.defaultSampleDurationPresent)throw new g("The default sample duration present flag is set.");if(void 0!==t&&!this.flags.defaultSampleDurationPresent)throw new g("The default sample duration present flag is not set.");if(t&&!Tu(t,32))throw new g("Provided defaultSampleDuration does not fit in 32 bits.");this.sA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"defaultSampleSize",{get:function(){return this.eA},set:function(t){if(void 0===t&&this.flags.defaultSampleSizePresent)throw new g("The default sample size present flag is set.");if(void 0!==t&&!this.flags.defaultSampleSizePresent)throw new g("The default sample size present flag is not set.");if(t&&!Tu(t,32))throw new g("Provided defaultSampleSize does not fit in 32 bits.");this.eA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"defaultSampleFlags",{get:function(){return this.nA},set:function(t){if(void 0===t&&this.flags.defaultSampleFlagsPresent)throw new g("The default sample flags present flag is set.");if(void 0!==t&&!this.flags.defaultSampleFlagsPresent)throw new g("The default sample flags present flag is not set.");if((null==t?void 0:t.samplePaddingValue)&&!Tu(t.samplePaddingValue,3))throw new g("Provided sample padding value does not fit in 3 bits.");if((null==t?void 0:t.sampleDegradationPriority)&&!Tu(t.sampleDegradationPriority,16))throw new g("Provided sample degradation priority does not fit in 16 bits.");this.nA=t},enumerable:!1,configurable:!0}),n.prototype.serializeFlags=function(t){t.writer.writeUInt(0,6),t.writer.writeBool(this.flags.defaultBaseIsMoof),t.writer.writeBool(this.flags.durationIsEmpty),t.writer.writeByte(0),t.writer.writeUInt(0,2),t.writer.writeBool(this.flags.defaultSampleFlagsPresent),t.writer.writeBool(this.flags.defaultSampleSizePresent),t.writer.writeBool(this.flags.defaultSampleDurationPresent),t.writer.writeBit(0),t.writer.writeBool(this.flags.sampleDescriptionIndexPresent),t.writer.writeBool(this.flags.baseDataOffsetPresent)},n.prototype.getBoxContentSize=function(){var n=t.prototype.getBoxContentSize.call(this)+4;return this.flags.baseDataOffsetPresent&&(n+=8),this.flags.sampleDescriptionIndexPresent&&(n+=4),this.flags.defaultSampleDurationPresent&&(n+=4),this.flags.defaultSampleSizePresent&&(n+=4),this.flags.defaultSampleFlagsPresent&&(n+=4),n},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.trackId,32),this.flags.baseDataOffsetPresent&&(n.writer.writeUInt(this.baseDataOffset.getHighBitsUnsigned(),32),n.writer.writeUInt(this.baseDataOffset.getLowBitsUnsigned(),32)),this.flags.sampleDescriptionIndexPresent&&n.writer.writeUInt(this.sampleDescriptionIndex,32),this.flags.defaultSampleDurationPresent&&n.writer.writeUInt(this.defaultSampleDuration,32),this.flags.defaultSampleSizePresent&&n.writer.writeUInt(this.defaultSampleSize,32),this.flags.defaultSampleFlagsPresent&&Ns(this.defaultSampleFlags,n)},n}(Ru);function uf(t){var n=t.data,i=n.nextUint8(),e=new gu(pu.from(n.nextUint8Array(3)));e.skipBits(6);var r=Boolean(e.readBit()),o=Boolean(e.readBit());e.skipBits(10);var u=Boolean(e.readBit()),s=Boolean(e.readBit()),f=Boolean(e.readBit());e.skipBits(1);var h=Boolean(e.readBit()),c=Boolean(e.readBit()),a=n.nextUint32(),v=c?n.nextUint64():void 0,d=h?n.nextUint32():void 0,l=f?n.nextUint32():void 0,w=s?n.nextUint32():void 0,b=u?Zu(new gu(pu.from(n.nextUint8Array(4)))):void 0;return new of({trackId:a,defaultBaseIsMoof:r,durationIsEmpty:o,baseDataOffset:v,sampleDescriptionIndex:d,defaultSampleDuration:l,defaultSampleSize:w,defaultSampleFlags:b},i)}x(),pt();var sf=function(t){function n(n,i,e){var r=t.call(this,"trun",n,function(t){var n,i,e,r;return{dataOffsetPresent:void 0!==t.dataOffset,firstSampleFlagsPresent:void 0!==t.firstSampleFlags,sampleDurationPresent:null!==(n=t.sampleDurationPresent)&&void 0!==n&&n,sampleSizePresent:null!==(i=t.sampleSizePresent)&&void 0!==i&&i,sampleFlagsPresent:null!==(e=t.sampleFlagsPresent)&&void 0!==e&&e,sampleCompositionTimeOffsetsPresent:null!==(r=t.sampleCompositionTimeOffsetsPresent)&&void 0!==r&&r}}(i))||this;return r.dataOffset=i.dataOffset,r.samples=e,r.firstSampleFlags=i.firstSampleFlags,r}return vu(n,t),p.defineProperty(n.prototype,"dataOffset",{get:function(){return this.gA},set:function(t){if(t&&!Tu(t,32))throw new g("Provided data offset does not fit in 32 bits.");this.gA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"firstSampleFlags",{get:function(){return this.mA},set:function(t){if((null==t?void 0:t.samplePaddingValue)&&!Tu(t.samplePaddingValue,3))throw new g("Provided sample padding value does not fit in 3 bits.");if((null==t?void 0:t.sampleDegradationPriority)&&!Tu(t.sampleDegradationPriority,16))throw new g("Provided sample degradation priority does not fit in 16 bits.");this.mA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"samples",{get:function(){return this.pA},set:function(t){var n,i;if(!Tu(t.length,32))throw new g("The sample count cannot be represented in 32 bits.");for(var e=0,r=t;e<r.length;e++){var o=r[e];if(void 0===o.duration&&this.flags.sampleDurationPresent)throw new g("The sample duration present flag is set.");if(void 0!==o.duration&&!this.flags.sampleDurationPresent)throw new g("The sample duration present flag is not set.");if(o.duration&&!Tu(o.duration,32))throw new g("Provided sample duration does not fit in 32 bits.");if(void 0===o.size&&this.flags.sampleSizePresent)throw new g("The sample size present flag is set.");if(void 0!==o.size&&!this.flags.sampleSizePresent)throw new g("The sample size present flag is not set.");if(o.size&&!Tu(o.size,32))throw new g("Provided sample size does not fit in 32 bits.");if(void 0===o.flags&&this.flags.sampleFlagsPresent)throw new g("The sample flags present flag is set.");if(void 0!==o.flags&&!this.flags.sampleFlagsPresent)throw new g("The sample flags present flag is not set.");if((null===(n=o.flags)||void 0===n?void 0:n.samplePaddingValue)&&!Tu(o.flags.samplePaddingValue,3))throw new g("Provided sample padding value does not fit in 3 bits.");if((null===(i=o.flags)||void 0===i?void 0:i.sampleDegradationPriority)&&!Tu(o.flags.sampleDegradationPriority,16))throw new g("Provided sample degradation priority does not fit in 16 bits.");if(void 0===o.compositionTimeOffset&&this.flags.sampleCompositionTimeOffsetsPresent)throw new g("The sample compositionTimeOffset present flag is set.");if(void 0!==o.compositionTimeOffset&&!this.flags.sampleCompositionTimeOffsetsPresent)throw new g("The sample compositionTimeOffset present flag is not set.");if(o.compositionTimeOffset&&!Tu(o.compositionTimeOffset,32))throw new g("Provided sample compositionTimeOffset does not fit in 32 bits.")}this.pA=t},enumerable:!1,configurable:!0}),n.prototype.serializeFlags=function(t){t.writer.writeByte(0),t.writer.writeUInt(0,4),t.writer.writeBool(this.flags.sampleCompositionTimeOffsetsPresent),t.writer.writeBool(this.flags.sampleFlagsPresent),t.writer.writeBool(this.flags.sampleSizePresent),t.writer.writeBool(this.flags.sampleDurationPresent),t.writer.writeUInt(0,5),t.writer.writeBool(this.flags.firstSampleFlagsPresent),t.writer.writeBit(0),t.writer.writeBool(this.flags.dataOffsetPresent)},n.prototype.getBoxContentSize=function(){var n=t.prototype.getBoxContentSize.call(this)+4;return this.flags.dataOffsetPresent&&(n+=4),this.flags.firstSampleFlagsPresent&&(n+=4),this.flags.sampleDurationPresent&&(n+=4*this.samples.length),this.flags.sampleSizePresent&&(n+=4*this.samples.length),this.flags.sampleFlagsPresent&&(n+=4*this.samples.length),this.flags.sampleCompositionTimeOffsetsPresent&&(n+=4*this.samples.length),n},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.samples.length,32),this.flags.dataOffsetPresent&&n.writer.writeUInt(this.dataOffset,32),this.flags.firstSampleFlagsPresent&&Ns(this.firstSampleFlags,n);for(var i=0,e=this.samples;i<e.length;i++){var r=e[i];this.flags.sampleDurationPresent&&n.writer.writeUInt(r.duration,32),this.flags.sampleSizePresent&&n.writer.writeUInt(r.size,32),this.flags.sampleFlagsPresent&&Ns(r.flags,n),this.flags.sampleCompositionTimeOffsetsPresent&&(0===this.version?n.writer.writeUInt(r.compositionTimeOffset,32):n.writer.writeInt(r.compositionTimeOffset,32))}},n}(Ru);function ff(t){var n=t.data,i=n.nextUint8(),e=new gu(pu.from(n.nextUint8Array(3)));e.skipBits(12);var r=Boolean(e.readBit()),o=Boolean(e.readBit()),u=Boolean(e.readBit()),s=Boolean(e.readBit());e.skipBits(5);var f=Boolean(e.readBit());e.skipBits(1);var h=Boolean(e.readBit()),c=n.nextUint32(),a={sampleDurationPresent:s,sampleSizePresent:u,sampleFlagsPresent:o,sampleCompositionTimeOffsetsPresent:r};h&&(a.dataOffset=n.nextInt32()),f&&(a.firstSampleFlags=Zu(new gu(pu.from(n.nextUint8Array(4)))));for(var v=[],d=0;d<c;d++){var l={};s&&(l.duration=n.nextUint32()),u&&(l.size=n.nextUint32()),o&&(l.flags=Zu(new gu(pu.from(n.nextUint8Array(4))))),r&&(l.compositionTimeOffset=0===i?n.nextUint32():n.nextInt32()),v.push(l)}return new sf(i,a,v)}var hf=function(t){function n(){return t.call(this,"traf")||this}return vu(n,t),n}(os);function cf(t){for(var n=new hf,i=0,e=Yu(t.data);i<e.length;i++){var r=e[i];ju(r,"tfhd")?n.boxes.push(uf(r)):ju(r,"tfdt")?n.boxes.push(rf(r)):ju(r,"trun")?n.boxes.push(ff(r)):n.boxes.push(Qu(r))}return n}var af=function(t){function n(){return t.call(this,"moof")||this}return vu(n,t),n}(os);x(),pt();!function(t){function n(n){var i=t.call(this,"mfhd",0,0)||this;return i.sequenceNumber=n,i}vu(n,t),p.defineProperty(n.prototype,"sequenceNumber",{get:function(){return this.wA},set:function(t){if(!Tu(t,32))throw new g("Provided sequence number does not fit in 32 bits.");this.wA=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.sequenceNumber,32)}}(Ru);x(),pt();var vf=function(t){function n(n){var i=t.call(this,"frma")||this;return i.codingName=n,i}return vu(n,t),p.defineProperty(n.prototype,"codingName",{get:function(){return this.yA},set:function(t){if(4!==t.length)throw new g("Provided coding name was not 4 characters long.");this.yA=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return 4},n.prototype.serializeBoxContent=function(t){t.writer.writeString(this.codingName)},n}(Su);x(),pt();!function(t){function n(n,i){var e=t.call(this,"pasp")||this;return e.hSpacing=n,e.vSpacing=i,e}vu(n,t),p.defineProperty(n.prototype,"hSpacing",{get:function(){return this.bA},set:function(t){if(!Tu(t,32))throw new g("Provided hSpacing does not fit in 32 bits.");this.bA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"vSpacing",{get:function(){return this.AA},set:function(t){if(!Tu(t,32))throw new g("Provided vSpacing does not fit in 32 bits.");this.AA=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return 8},n.prototype.serializeBoxContent=function(t){t.writer.writeUInt(this.hSpacing,32),t.writer.writeUInt(this.vSpacing,32)}}(Su);x(),pt();!function(t){function n(n,i,e){var r=t.call(this,n)||this;return r.sample=i,r.sinf=e,r}vu(n,t),n.prototype.getBoxContentSize=function(){return this.sample.getBoxContentSize()+this.sinf.getSize()},n.prototype.serializeBoxContent=function(t){this.sample.serializeBoxContent(t),t.concat(this.sinf.serialize())}}(os);x(),pt();!function(t){function n(n,i,e){var r=t.call(this,"sinf")||this;return r.schm=i,r.schi=e,r.frma=new vf(n),r}vu(n,t),n.prototype.getBoxContentSize=function(){var t,n,i,e;return this.frma.getSize()+(null!==(n=null===(t=this.schm)||void 0===t?void 0:t.getSize())&&void 0!==n?n:0)+(null!==(e=null===(i=this.schi)||void 0===i?void 0:i.getSize())&&void 0!==e?e:0)},n.prototype.serializeBoxContent=function(t){t.concat(this.frma.serialize()),this.schm&&t.concat(this.schm.serialize()),this.schi&&t.concat(this.schi.serialize())}}(Su);x(),pt();var df=function(t){function n(n,i,e){var r=t.call(this,"saio",n,void 0===e?0:1)||this;return r.entries=i,r.explicitAuxInfoType=e,r}return vu(n,t),p.defineProperty(n.prototype,"bitSize",{get:function(){return 0===this.version?32:64},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"entries",{get:function(){return this.Db},set:function(t){var n=this;if(!Tu(t.length,32))throw new g("Number of entries provided does not fit in 32 bits.");if(t.some(function(t){return!Tu(t,n.bitSize)}))throw new g("Not all provided entries fit in ".concat(this.bitSize," bits."));this.Db=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"explicitAuxInfoType",{get:function(){return this.SA},set:function(t){if(void 0===t)this.flags=0;else{if(!Tu(t.auxInfoType,32))throw new g("Provided auxInfoType does not fit in 32 bits.");if(!Tu(t.auxInfoTypeParameter,32))throw new g("Provided auxInfoTypeParameter does not fit in 32 bits.");this.flags=1}this.SA=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+(void 0===this.explicitAuxInfoType?0:8)+4+this.entries.length*this.bitSize/8},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),void 0!==this.explicitAuxInfoType&&(n.writer.writeUInt(this.explicitAuxInfoType.auxInfoType,32),n.writer.writeUInt(this.explicitAuxInfoType.auxInfoTypeParameter,32)),n.writer.writeUInt(this.entries.length,32),this.serializeSaioContent(n)},n}(Ru);(function(t){function n(){return null!==t&&t.apply(this,arguments)||this}vu(n,t),n.prototype.serializeSaioContent=function(t){for(var n=0,i=this.entries;n<i.length;n++){var e=i[n];t.writer.writeUInt(e,32)}}})(df),function(t){function n(){return null!==t&&t.apply(this,arguments)||this}vu(n,t),n.prototype.serializeSaioContent=function(t){for(var n=0,i=this.entries;n<i.length;n++){var e=i[n];t.writer.writeUInt(e.getHighBitsUnsigned(),32),t.writer.writeUInt(e.getLowBitsUnsigned(),32)}}}(df);x(),pt();!function(t){function n(n,i,e){var r=t.call(this,"saiz",0,void 0===e?0:1)||this;return r.defaultSampleInfoSize=n,r.sampleInfoSizes=i,r.explicitAuxInfoType=e,r}vu(n,t),p.defineProperty(n.prototype,"defaultSampleInfoSize",{get:function(){return this.TA},set:function(t){if(!Tu(t,8))throw new g("Provided defaultSampleInfoSize does not fit in a single byte.");this.TA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"sampleInfoSizes",{get:function(){return this.kA},set:function(t){if(!Tu(t.length,32))throw new g("Number of sampleInfoSizes provided does not fit in 32 bits.");if(t.some(function(t){return!Tu(t,8)}))throw new g("Not all provided sampleInfoSizes fit in a byte.");this.kA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"explicitAuxInfoType",{get:function(){return this.SA},set:function(t){if(void 0===t)this.flags=0;else{if(!Tu(t.auxInfoType,32))throw new g("Provided auxInfoType does not fit in 32 bits.");if(!Tu(t.auxInfoTypeParameter,32))throw new g("Provided auxInfoTypeParameter does not fit in 32 bits.");this.flags=1}this.SA=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+(void 0===this.explicitAuxInfoType?0:8)+1+4+(0!==this.defaultSampleInfoSize?0:this.sampleInfoSizes.length)},n.prototype.serializeBoxContent=function(n){if(0!==this.defaultSampleInfoSize&&this.sampleInfoSizes.length>0)throw new g("Both a default size and specific sizes are provided. This is prohibited.");t.prototype.serializeBoxContent.call(this,n),void 0!==this.explicitAuxInfoType&&(n.writer.writeUInt(this.explicitAuxInfoType.auxInfoType,32),n.writer.writeUInt(this.explicitAuxInfoType.auxInfoTypeParameter,32)),n.writer.writeByte(this.defaultSampleInfoSize),n.writer.writeUInt(this.sampleInfoSizes.length,32);for(var i=0,e=this.sampleInfoSizes;i<e.length;i++){var r=e[i];n.writer.writeByte(r)}}}(Ru);x(),pt();!function(t){function n(n){var i=t.call(this,"sdtp",0,0)||this;return i.samples=n,i}vu(n,t),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.samples.length},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n);for(var i=0,e=this.samples;i<e.length;i++){Os(e[i],n)}}}(Ru);x(),pt();!function(t){function n(n){return t.call(this,"stsd",n,0)||this}vu(n,t),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.boxes.length,32)}}(fs);x(),pt();var lf=function(t){function n(n,i,e){var r=t.call(this,"sgpd",n,0)||this;return r.entries=e,r.groupingType=i,r}return vu(n,t),p.defineProperty(n.prototype,"groupingType",{get:function(){return this.EA},set:function(t){if(4!==t.length)throw new g("The provided groupingType does not equal 4 characters.");this.EA=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4+4},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeString(this.groupingType),this.serializeVersionBoxContent(n),n.writer.writeUInt(this.entries.length,32);for(var i=0,e=this.entries;i<e.length;i++){var r=e[i];this.serializeEntryBoxContent(n,r)}},n.prototype.serializeEntryBoxContent=function(t,n){n.serializeBoxContent(t)},n}(Ru);(function(t){function n(n,i){return t.call(this,0,n,i)||this}vu(n,t),n.prototype.serializeVersionBoxContent=function(t){}})(lf),function(t){function n(n,i,e){var r=t.call(this,1,n,e)||this;return r.defaultLength=i,r}vu(n,t),p.defineProperty(n.prototype,"defaultLength",{get:function(){return this.RA},set:function(t){if(!Tu(t,32))throw new g("The provided defaultLength does not fit in 32 bits.");this.RA=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4+this.entries.length*(this.defaultLength||4)},n.prototype.serializeVersionBoxContent=function(t){t.writer.writeUInt(this.defaultLength,32)},n.prototype.serializeEntryBoxContent=function(t,n){0===this.defaultLength&&t.writer.writeUInt(n.getBoxContentSize(),32),n.serializeBoxContent(t)}}(lf),function(t){function n(n,i,e,r){void 0===r&&(r=0);var o=this;if(n<2)throw new g("This constructor is only meant for versions 2 and up.");return(o=t.call(this,n,i,e)||this).defaultSampleDescriptionIndex=r,o}vu(n,t),p.defineProperty(n.prototype,"defaultSampleDescriptionIndex",{get:function(){return this.iA},set:function(t){if(!Tu(t,32))throw new g("The provided defaultSampleDescriptionIndex does not fit in 32 bits.");this.iA=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4},n.prototype.serializeVersionBoxContent=function(t){t.writer.writeUInt(this.defaultSampleDescriptionIndex,32)}}(lf);x(),pt();(function(t){function n(n){void 0===n&&(n=[]);var i=t.call(this,"stsz",0,0)||this;return i.sampleSizes=n,i}vu(n,t),p.defineProperty(n.prototype,"sampleSizes",{get:function(){return this.IA},set:function(t){if(!Tu(t.length,32))throw new g("Number of allowed samples cannot fit in 32 bits.");if(t.some(function(t){return!Tu(t,32)}))throw new g("Not all sampleSizes can be represented in 32 bits.");this.IA=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4+4+4*this.sampleSizes.length},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(0,32),n.writer.writeUInt(this.sampleSizes.length,32);for(var i=0,e=this.sampleSizes;i<e.length;i++){var r=e[i];n.writer.writeUInt(r,32)}}})(Ru),function(t){function n(n,i){void 0===n&&(n=0),void 0===i&&(i=0);var e=t.call(this,"stsz",0,0)||this;return e.defaultSampleSize=n,e.samples=i,e}vu(n,t),p.defineProperty(n.prototype,"defaultSampleSize",{get:function(){return this.eA},set:function(t){if(!Tu(t,32))throw new g("Provided defaultSampleSize does not fit in 32 bits.");this.eA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"samples",{get:function(){return this.pA},set:function(t){if(!Tu(t,32))throw new g("Number of allowed samples cannot fit in 32 bits.");this.pA=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4+4},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.defaultSampleSize,32),n.writer.writeUInt(this.samples,32)}}(Ru);x(),pt();!function(t){function n(){return t.call(this,"stbl")||this}vu(n,t)}(os);x(),pt();!function(t){function n(n){var i=t.call(this,"stsc",0,0)||this;return i.entries=n,i}vu(n,t),p.defineProperty(n.prototype,"entries",{get:function(){return this.Db},set:function(t){if(!Tu(t.length,32))throw new g("Number of allowed entries cannot fit in 32 bits.");if(t.some(function(t){return!Tu(t.firstChunk,32)||!Tu(t.sampleDescriptionIndex,32)||!Tu(t.samplesPerChunk,32)}))throw new g("Not all entries can be represented in 96 bits.");this.Db=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4+12*this.entries.length},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.entries.length,32);for(var i=0,e=this.entries;i<e.length;i++){var r=e[i];n.writer.writeUInt(r.firstChunk,32),n.writer.writeUInt(r.samplesPerChunk,32),n.writer.writeUInt(r.sampleDescriptionIndex,32)}}}(Ru);x(),pt();!function(t){function n(){return t.call(this,"schi")||this}vu(n,t)}(os);x(),pt();!function(t){function n(n,i,e){var r=t.call(this,"schm",0,void 0===e?0:1)||this;return r.schemeType=n,r.schemeVersion=i,r.schemeUri=e,r}vu(n,t),p.defineProperty(n.prototype,"schemeType",{get:function(){return this.xA},set:function(t){if(4!==t.length)throw new g("The provided schemeType does not have a length of 4.");this.xA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"schemeVersion",{get:function(){return this.CA},set:function(t){if(!Tu(t,32))throw new g("The provided schemeVersion does not fit in 23 bits.");this.CA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"schemeUri",{get:function(){return this.PA},set:function(t){if(t&&4!==t.length)throw new g("The provided schemeUri does not have a length of 4.");this.flags=void 0===t?0:1,this.PA=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4+4+(void 0===this.schemeUri?0:this.schemeUri.length+1)},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeString(this.schemeType),n.writer.writeUInt(this.schemeVersion,32),this.schemeUri&&(n.writer.writeString(this.schemeUri),n.writer.writeByte(0))}}(Ru);x(),pt();var wf=function(t){function n(n,i,e,r,o,u,s){void 0===s&&(s=0);var f=t.call(this,"sidx",n,s)||this;return f.referenceId=i,f.timescale=e,f.earliestPresentationTime=r,f.firstOffset=o,f.references=u,f}return vu(n,t),p.defineProperty(n.prototype,"bitSize",{get:function(){return 0===this.version?32:64},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"referenceId",{get:function(){return this.NA},set:function(t){if(!Tu(t,32))throw new g("Provided referenceId does not fit in 32 bits.");this.NA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"timescale",{get:function(){return this.Kb},set:function(t){if(!Tu(t,32))throw new g("Provided timescale does not fit in 32 bits.");this.Kb=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"earliestPresentationTime",{get:function(){return this.DA},set:function(t){if(!Tu(t,this.bitSize))throw new g("Provided earliestPresentationTime does not fit in ".concat(this.bitSize," bits."));this.DA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"firstOffset",{get:function(){return this.BA},set:function(t){if(!Tu(t,this.bitSize))throw new g("Provided timescale does not fit in ".concat(this.bitSize," bits."));this.BA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"references",{get:function(){return this.LA},set:function(t){if(!Tu(t.length,16))throw new g("The number of provided reference items does not fit in 16 bits.");for(var n=0,i=t;n<i.length;n++){var e=i[n];if(!Tu(e.referencedSize,31))throw new g("Provided referenced size does not fit in 31 bits.");if(!Tu(e.subsegmentDuration,32))throw new g("Provided subsegment duration does not fit in 31 bits.");if(!Tu(e.sapType,3))throw new g("Provided SAP type does not fit in 3 bits.");if(!Tu(e.sapDeltaTime,28))throw new g("Provided SAP delta time does not fit in 28 bits.")}this.LA=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4+4+this.bitSize/8*2+2+2+12*this.references.length},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.referenceId,32),n.writer.writeUInt(this.timescale,32),this.serializeSidxBoxContent(n),n.writer.writeUInt(0,16),n.writer.writeUInt(this.references.length,16);for(var i=0,e=this.references;i<e.length;i++){var r=e[i];n.writer.writeBit(r.referenceType),n.writer.writeUInt(r.referencedSize,31),n.writer.writeUInt(r.subsegmentDuration,32),n.writer.writeBool(r.startsWithSap),n.writer.writeUInt(r.sapType,3),n.writer.writeUInt(r.sapDeltaTime,28)}},n}(Ru),bf=function(t){function n(n,i,e,r,o,u){return void 0===u&&(u=0),t.call(this,0,n,i,e,r,o,u)||this}return vu(n,t),n.prototype.serializeSidxBoxContent=function(t){t.writer.writeUInt(this.earliestPresentationTime,32),t.writer.writeUInt(this.firstOffset,32)},n}(wf),gf=function(t){function n(n,i,e,r,o,u){return void 0===u&&(u=0),t.call(this,1,n,i,e,r,o,u)||this}return vu(n,t),n.prototype.serializeSidxBoxContent=function(t){t.writer.writeUInt(this.earliestPresentationTime.getHighBitsUnsigned(),32),t.writer.writeUInt(this.earliestPresentationTime.getLowBitsUnsigned(),32),t.writer.writeUInt(this.firstOffset.getHighBitsUnsigned(),32),t.writer.writeUInt(this.firstOffset.getLowBitsUnsigned(),32)},n}(wf);x(),pt();!function(t){function n(n,i,e){return t.call(this,"styp",n,i,e)||this}vu(n,t)}(ws);x(),pt();!function(t){function n(n){void 0===n&&(n=0);var i=t.call(this,"smhd",0,0)||this;return i.balance=n,i}vu(n,t),p.defineProperty(n.prototype,"balance",{get:function(){return this.MA},set:function(t){if(t<-1||t>1)throw new g("Provided balance does not fit in the allowed range [-1, 1].");if(!Tu(Iu(t,8),16))throw new g("Provided balance does not fit in 16 bits (fixed 8.8).");this.MA=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+2+2},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(Iu(this.balance,8),16),n.writer.writeUInt(0,16)}}(Ru);x(),pt();!function(t){function n(n){var i=t.call(this,"stss",0,0)||this;return i.entries=n,i}vu(n,t),p.defineProperty(n.prototype,"entries",{get:function(){return this.Db},set:function(t){if(!Tu(t.length,32))throw new g("Number of allowed entries cannot fit in 32 bits.");if(t.some(function(t){return!Tu(t,32)}))throw new g("Not all entries can be represented in 32 bits.");this.Db=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4+4*this.entries.length},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.entries.length,32);for(var i=0,e=this.entries;i<e.length;i++){var r=e[i];n.writer.writeUInt(r,32)}}}(Ru);x(),pt();!function(t){function n(n){var i=t.call(this,"stts",0,0)||this;return i.entries=n,i}vu(n,t),p.defineProperty(n.prototype,"entries",{get:function(){return this.Db},set:function(t){if(!Tu(t.length,32))throw new g("Number of allowed entries cannot fit in 32 bits.");if(t.some(function(t){return!Tu(t.sampleCount,32)||!Tu(t.sampleDelta,32)}))throw new g("Not all entries can be represented in 64 bits.");this.Db=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4+8*this.entries.length},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.entries.length,32);for(var i=0,e=this.entries;i<e.length;i++){var r=e[i];n.writer.writeUInt(r.sampleCount,32),n.writer.writeUInt(r.sampleDelta,32)}}}(Ru);x(),pt();!function(t){function n(n){var i=t.call(this,"trep",0,0)||this;return i.trackId=n,i}vu(n,t),p.defineProperty(n.prototype,"trackId",{get:function(){return this.tA},set:function(t){if(!Tu(t,32))throw new g("The provided trackId does not fit in 32 bits.");this.tA=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.trackId,32)}}(fs);x(),pt();!function(t){function n(){return t.call(this,"udta")||this}vu(n,t)}(os);x(),pt();var mf={red:0,green:0,blue:0};!function(t){function n(n,i){void 0===n&&(n=0),void 0===i&&(i=mf);var e=t.call(this,"vmhd",0,1)||this;return e.graphicsMode=n,e.opColor=i,e}vu(n,t),p.defineProperty(n.prototype,"opColor",{get:function(){return this.OA},set:function(t){if(!Tu(t.red,16)||!Tu(t.green,16)||!Tu(t.blue,16))throw new g("Not all colors could be represented in 16 bits.");this.OA=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+2+6},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.graphicsMode,16),n.writer.writeUInt(this.opColor.red,16),n.writer.writeUInt(this.opColor.green,16),n.writer.writeUInt(this.opColor.blue,16)}}(Ru);x(),pt();var pf=function(t){function n(n,i,e,r,o){void 0===r&&(r={}),void 0===o&&(o=void 0);var u,s,f,h,c,a=this;return(a=t.call(this,n,i)||this).width=e.width,a.height=e.height,a.horizontalResolution=null!==(u=e.horizontal)&&void 0!==u?u:72,a.verticalResolution=null!==(s=e.vertical)&&void 0!==s?s:72,a.compressorName=null!==(f=r.compressorName)&&void 0!==f?f:"",a.frameCount=null!==(h=r.frameCount)&&void 0!==h?h:1,a.depth=null!==(c=r.depth)&&void 0!==c?c:24,a.clap=r.clap,a.pasp=r.pasp,a.extra=o,a}return vu(n,t),p.defineProperty(n.prototype,"width",{get:function(){return this.uA},set:function(t){if(!Tu(t,16))throw new g("Provided width does not fit in 16 bits.");this.uA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"height",{get:function(){return this.cA},set:function(t){if(!Tu(t,16))throw new g("Provided height does not fit in 16 bits.");this.cA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"horizontalResolution",{get:function(){return this.FA},set:function(t){if(!Tu(Iu(t,16),32))throw new g("Provided horizontalResolution does not fit in 32 bits (fixed 16.16).");this.FA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"verticalResolution",{get:function(){return this.VA},set:function(t){if(!Tu(Iu(t,16),32))throw new g("Provided verticalResolution does not fit in 32 bits (fixed 16.16).");this.VA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"compressorName",{get:function(){return this.WA},set:function(t){if(t.length>31)throw new g("The provided compressorName should at most be 31 characters long.");this.WA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"frameCount",{get:function(){return this.UA},set:function(t){if(!Tu(t,16))throw new g("Provided frameCount does not fit in 16 bits.");this.UA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"depth",{get:function(){return this.GA},set:function(t){if(!Tu(t,16))throw new g("Provided depth does not fit in 16 bits.");this.GA=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){var n,i,e,r,o,u;return t.prototype.getBoxContentSize.call(this)+2+2+12+2+2+4+4+4+2+32+2+2+(null!==(i=null===(n=this.clap)||void 0===n?void 0:n.getSize())&&void 0!==i?i:0)+(null!==(r=null===(e=this.pasp)||void 0===e?void 0:e.getSize())&&void 0!==r?r:0)+(null!==(u=null===(o=this.extra)||void 0===o?void 0:o.length)&&void 0!==u?u:0)},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(0,16),n.writer.writeUInt(0,16),n.writer.writeUInt(0,32),n.writer.writeUInt(0,32),n.writer.writeUInt(0,32),n.writer.writeUInt(this.width,16),n.writer.writeUInt(this.height,16),n.writer.writeUInt(Iu(this.horizontalResolution,16),32),n.writer.writeUInt(Iu(this.verticalResolution,16),32),n.writer.writeUInt(0,32),n.writer.writeUInt(this.frameCount,16),n.writer.writeByte(this.compressorName.length),n.writer.writeString(this.compressorName);for(var i=0;i<31-this.compressorName.length;i++)n.writer.writeByte(0);n.writer.writeUInt(this.depth,16),n.writer.writeInt(-1,16),this.clap&&n.concat(this.clap.serialize()),this.pasp&&n.concat(this.pasp.serialize()),this.extra&&ku(n.writer,this.extra)},n}(us);x(),pt(),x(),pt(),M();!function(t){function n(n){var i=t.call(this,"esds",0,0)||this;return i.esDescriptor=n,i}vu(n,t),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+(B(this.esDescriptor,I)?this.esDescriptor.length:this.esDescriptor.getSize())},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),B(this.esDescriptor,I)?n.concat(pu.from(this.esDescriptor)):this.esDescriptor.serialize(n)}}(Ru);x(),pt();!function(t){function n(n,i,e){var r=t.call(this,"mp4a",n,e)||this;return r.esd=i,r}vu(n,t),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.esd.getSize()},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.concat(this.esd.serialize())}}(ss);x(),pt();!function(t){function n(n,i,e,r){void 0===r&&(r={});var o=t.call(this,"mp4v",n,i,r)||this;return o.esDescriptor=e,o}vu(n,t),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.esDescriptor.getSize()},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),this.esDescriptor.serialize(n)}}(pf);x(),pt();!function(t){function n(n,i){var e=t.call(this,"mp4s",n)||this;return e.esDescriptor=i,e}vu(n,t),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.esDescriptor.getSize()},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),this.esDescriptor.serialize(n)}}(us);x(),pt(),x(),pt();!function(t){function n(n){var i=t.call(this,"avcC")||this;return i.decoderConfig=n,i}vu(n,t),n.prototype.getBoxContentSize=function(){return this.decoderConfig.getSize()},n.prototype.serializeBoxContent=function(t){this.decoderConfig.serialize(t)}}(Su);x(),pt();!function(){function t(t,n,i,e,r,o){void 0===o&&(o=1),this.lengthSizeMinusOne=i,this.version=o,this.profileIndication=t.indication,this.profileCompatibility=t.compatibility,this.levelIndication=n,this.spsSets=e,this.ppsSets=r}p.defineProperty(t.prototype,"version",{get:function(){return this.XA},set:function(t){if(!Tu(t,8))throw new g("Provided version does not fit in 8 bits.");this.XA=t},enumerable:!1,configurable:!0}),p.defineProperty(t.prototype,"profileIndication",{get:function(){return this.ZA},set:function(t){if(!Tu(t,8))throw new g("Provided profileIndication does not fit in 8 bits.");this.ZA=t},enumerable:!1,configurable:!0}),p.defineProperty(t.prototype,"profileCompatibility",{get:function(){return this.HA},set:function(t){if(!Tu(t,8))throw new g("Provided profileCompatibility does not fit in 8 bits.");this.HA=t},enumerable:!1,configurable:!0}),p.defineProperty(t.prototype,"levelIndication",{get:function(){return this.zA},set:function(t){if(!Tu(t,8))throw new g("Provided levelIndication does not fit in 8 bits.");this.zA=t},enumerable:!1,configurable:!0}),p.defineProperty(t.prototype,"spsSets",{get:function(){return this.YA},set:function(t){if(!Tu(t.length,5))throw new g("Provided number of spsSets exceeds the max (32)");this.YA=t},enumerable:!1,configurable:!0}),p.defineProperty(t.prototype,"ppsSets",{get:function(){return this.KA},set:function(t){if(!Tu(t.length,8))throw new g("Provided number of ppsSets exceeds the max (256)");this.KA=t},enumerable:!1,configurable:!0}),t.prototype.getSize=function(){return 7+2*this.spsSets.length+this.spsSets.reduce(function(t,n){return t+n.length},0)+2*this.ppsSets.length+this.ppsSets.reduce(function(t,n){return t+n.length},0)},t.prototype.serialize=function(t){t.writer.writeByte(this.version),t.writer.writeByte(this.profileIndication),t.writer.writeByte(this.profileCompatibility),t.writer.writeByte(this.levelIndication),t.writer.writeBits([1,1,1,1,1,1]),t.writer.writeUInt(this.lengthSizeMinusOne,2),t.writer.writeBits([1,1,1]),t.writer.writeUInt(this.spsSets.length,5);for(var n=0,i=this.spsSets;n<i.length;n++){var e=i[n];t.writer.writeUInt(e.length,16),t.concat(pu.from(e))}t.writer.writeByte(this.ppsSets.length);for(var r=0,o=this.ppsSets;r<o.length;r++){var u=o[r];t.writer.writeUInt(u.length,16),t.concat(pu.from(u))}}}();x(),pt();!function(t){function n(n,i,e,r,o){void 0===r&&(r={}),void 0===o&&(o=void 0);var u=t.call(this,"avc1",n,i,r)||this;return u.configurationBox=e,u.bitrateBox=o,u}vu(n,t),n.prototype.getBoxContentSize=function(){var n,i;return t.prototype.getBoxContentSize.call(this)+this.configurationBox.getSize()+(null!==(i=null===(n=this.bitrateBox)||void 0===n?void 0:n.getSize())&&void 0!==i?i:0)},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.concat(this.configurationBox.serialize()),this.bitrateBox&&n.concat(this.bitrateBox.serialize())}}(pf);x(),pt();!function(t){function n(n,i,e){var r=t.call(this,"btrt")||this;return r.bufferSizeDb=n,r.max=i,r.avg=e,r}vu(n,t),p.defineProperty(n.prototype,"bufferSizeDb",{get:function(){return this.Ab},set:function(t){if(!Tu(t,32))throw new g("Provided bufferSizeDb does not fit in 32 bits.");this.Ab=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"max",{get:function(){return this.qA},set:function(t){if(!Tu(t,32))throw new g("Provided max does not fit in 32 bits.");this.qA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"avg",{get:function(){return this.jA},set:function(t){if(!Tu(t,32))throw new g("Provided avg does not fit in 32 bits.");this.jA=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return 12},n.prototype.serializeBoxContent=function(t){t.writer.writeUInt(this.bufferSizeDb,32),t.writer.writeUInt(this.max,32),t.writer.writeUInt(this.avg,32)}}(Su);x(),pt(),x(),pt(),x(),pt();var yf=function(t){function n(n,i){var e,r,o,u,s=this;if(s=t.call(this,"tenc",n,0)||this,i.perSampleIvSize>0&&(null!==(r=null===(e=i.constantIv)||void 0===e?void 0:e.length)&&void 0!==r?r:0)>0)throw new g("Either perSampleSize should be > 0 or constantIv should be defined. Not both.");return s.kId=i.kId,s.isProtected=null!==(o=i.isProtected)&&void 0!==o?o:1,i.perSampleIvSize>0?s.perSampleIvSize=i.perSampleIvSize:s.constantIv=null!==(u=i.constantIv)&&void 0!==u?u:new I(0),s}return vu(n,t),p.defineProperty(n.prototype,"isProtected",{get:function(){return this.QA},set:function(t){if(!Tu(t,8))throw new g("Provided isProtected does not fit in 1 byte.");this.QA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"perSampleIvSize",{get:function(){return this.JA},set:function(t){if(![8,16].includes(t))throw new g("Provided perSampleIvSize does not match any allowed value [8, 16].");this.JA=t,this.$A=new I(0)},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"kId",{get:function(){return this.tS},set:function(t){if(16!==t.length)throw new g("Provided kId length is not 16.");this.tS=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"constantIv",{get:function(){return this.$A},set:function(t){if(![8,16].includes(t.length))throw new g("Provided constant IV length does not match any allowed value [8, 16].");this.$A=t,this.JA=0},enumerable:!1,configurable:!0}),n.prototype.getTencHeaderSize=function(){return 20+(this.constantIv.length>0?1+this.constantIv.length:0)},n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.getTencHeaderSize()},n.prototype.serializeVersionBoxContent=function(t){t.writer.writeByte(0)},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),this.serializeOwnContent(n)},n.prototype.serializeOwnContent=function(t){t.writer.writeByte(0),this.serializeVersionBoxContent(t),t.writer.writeByte(this.isProtected),t.writer.writeByte(this.perSampleIvSize),ku(t.writer,this.kId),0===this.perSampleIvSize&&(t.writer.writeByte(this.constantIv.length),ku(t.writer,this.constantIv))},n}(Ru),_f=(function(t){function n(n){return t.call(this,0,n)||this}vu(n,t)}(yf),function(t){function n(n){var i=t.call(this,1,n)||this;return i.cryptByteBlocks=n.cryptByteBlock,i.skipByteBlocks=n.skipByteBlock,i}return vu(n,t),p.defineProperty(n.prototype,"cryptByteBlocks",{get:function(){return this.iS},set:function(t){if(!Tu(t,4))throw new g("Provided cryptByteBlocks does not fit in 4 bits.");this.iS=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"skipByteBlocks",{get:function(){return this.sS},set:function(t){if(!Tu(t,4))throw new g("Provided skipByteBlocks does not fit in 4 bits.");this.sS=t},enumerable:!1,configurable:!0}),n.prototype.serializeVersionBoxContent=function(t){t.writer.writeUInt(this.cryptByteBlocks,4),t.writer.writeUInt(this.skipByteBlocks,4)},n}(yf));!function(t){function n(n){var i=t.call(this)||this;return i.tencBox=new _f(n),i}vu(n,t),n.prototype.serializeBoxContent=function(t){this.tencBox.serializeOwnContent(t)},n.prototype.getBoxContentSize=function(){return this.tencBox.getTencHeaderSize()}}(Ps);function Sf(t){return void 0!==t.iv}function Tf(t){return void 0!==t.subsamples}x(),pt();!function(t){function n(n){var i=t.call(this,"senc",0,{useSubsampleEncryption:!1})||this;return i.samples=n,i}vu(n,t),p.defineProperty(n.prototype,"samples",{get:function(){return this.pA},set:function(t){var n;if(!Tu(t.length,32))throw new g("The number of samples provided does not fit in 32 bits.");for(var i=0,e=t;i<e.length;i++){var r=e[i];if(Sf(r)&&![8,16].includes(r.iv.length))throw new g("IV of one of the provided samples did not satisfy the required length constraints. [8, 16]");if(void 0===n&&(n=Tf(r)),!0===n&&!Tf(r)||!1===n&&Tf(r))throw new g("Mix of samples with and without subsamples detected.");if(Tf(r)){if(!Tu(r.subsamples.length,16))throw new g("Subsample length of one of the provided samples does not fit in 16 bits.");for(var o=0,u=r.subsamples;o<u.length;o++){var s=u[o];if(!Tu(s.clearData,16))throw new g("Subsample clearData of one of the provided samples does not fit in 16 bits.");if(!Tu(s.protectedData,23))throw new g("Subsample protectedData of one of the provided samples does not fit in 23 bits.")}}}this.flags.useSubsampleEncryption=null!=n&&n,this.pA=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){for(var n=0,i=0,e=this.samples;i<e.length;i++){var r=e[i];Sf(r)&&(n+=r.iv.length),Tf(r)&&(n+=2+6*r.subsamples.length)}return t.prototype.getBoxContentSize.call(this)+4+n},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.samples.length,32);for(var i=0,e=this.samples;i<e.length;i++){var r=e[i];if(Sf(r)&&ku(n.writer,r.iv),Tf(r)){n.writer.writeUInt(r.subsamples.length,16);for(var o=0,u=r.subsamples;o<u.length;o++){var s=u[o];n.writer.writeUInt(s.clearData,16),n.writer.writeUInt(s.protectedData,32)}}}},n.prototype.serializeFlags=function(t){t.writer.writeUInt(this.flags.useSubsampleEncryption?2:0,24)}}(Ru);x(),pt(),x(),pt();!function(t){function n(n,i,e,r,o){var u=t.call(this,"emsg",0,0)||this;return u.schemeIdUri=n,u.value=i,u.data=o,u.id=e,u.timescale=r.timescale,u.presentationTimeDelta=r.presentationTimeDelta,u.eventDuration=r.eventDuration,u}vu(n,t),p.defineProperty(n.prototype,"timescale",{get:function(){return this.Kb},set:function(t){if(!Tu(t,32))throw new g("The provided timescale does not fit in 32 bits.");this.Kb=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"presentationTimeDelta",{get:function(){return this.eS},set:function(t){if(!Tu(t,32))throw new g("The provided presentationTimeDelta does not fit in 32 bits.");this.eS=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"eventDuration",{get:function(){return this.nS},set:function(t){if(!Tu(t,32))throw new g("The provided eventDuration does not fit in 32 bits.");this.nS=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"id",{get:function(){return this.rS},set:function(t){if(!Tu(t,32))throw new g("The provided id does not fit in 32 bits.");this.rS=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.schemeIdUri.length+1+this.value.length+1+16+this.data.length},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeString(this.schemeIdUri),n.writer.writeByte(0),n.writer.writeString(this.value),n.writer.writeByte(0),n.writer.writeUInt(this.timescale,32),n.writer.writeUInt(this.presentationTimeDelta,32),n.writer.writeUInt(this.eventDuration,32),n.writer.writeUInt(this.id,32),n.concat(pu.from(this.data))}}(Ru);x(),pt(),x(),pt(),x(),pt();!function(){function t(){this.boxes=[]}t.prototype.serialize=function(){for(var t=new _u,n=0,i=this.boxes;n<i.length;n++){var e=i[n];t.concat(e.serialize())}return t.toRangedBuffer()}}();function If(t,n){return function(i){var e=new Xu(function(t){return new DataView(t.buffer,t.byteOffset,t.byteLength)}(i),new qu),r=function(t,n){for(var i=t.data,e=t.cursor;e.offset<i.byteLength;){var r=Ku(i,e);if(!r.complete)return;if(ju(r.box,n))return r.box}}(e,t);if(!r)throw new g("".concat(t," box not found"));return n(r)}}If("moov",function(t){for(var n=new Qs,i=0,e=Yu(t.data);i<e.length;i++){var r=e[i];ju(r,"mvhd")?n.boxes.push(js(r)):ju(r,"trak")?n.boxes.push(Js(r)):ju(r,"mvex")?n.boxes.push(Vs(r)):ju(r,"pssh")?n.boxes.push(xs(r)):n.boxes.push(Qu(r))}return n}),If("sidx",function(t){var n,i,e=t.data,r=Gu(e.nextUint32()),o=r.version,u=r.flags,s=e.nextUint32(),f=e.nextUint32();0===o?(n=e.nextUint32(),i=e.nextUint32()):(n=e.nextUint64(),i=e.nextUint64()),e.skip(2);for(var h=e.nextUint16(),c=[],a=0;a<h;a++){var v=new gu(pu.from(e.nextUint8Array(12))),d=v.readBit(),l=v.readUInt(31),w=v.readUInt(32),b=Boolean(v.readBit()),g=v.readUInt(3),m=v.readUInt(28);c.push({referenceType:d,referencedSize:l,subsegmentDuration:w,startsWithSap:b,sapType:g,sapDeltaTime:m})}return 0===o?new bf(s,f,n,i,c,u.raw):new gf(s,f,n,i,c,u.raw)}),If("moof",function(t){for(var n=new af,i=0,e=Yu(t.data);i<e.length;i++){var r=e[i];ju(r,"traf")?n.boxes.push(cf(r)):ju(r,"pssh")?n.boxes.push(xs(r)):n.boxes.push(Qu(r))}return n});var kf=If("pssh",xs),Ef=function(t){function n(n,i){var e;(e=t.call(this)||this).aS=void 0,e.mS=void 0,e.uS=void 0,e.dS=void 0,e.Zd=void 0,e.lS=void 0,e.pS=void 0,e.wS=void 0,e.yS=void 0,e.aS=n,e.mS=i,e.dS=!1,e.pS=function(){e._S()},e.wS=function(t){e.So(new Ao(e,t.messageType,fu(e.mS,t.message)))},e.yS=function(){e.dS=!0,e.uS.Vy>0&&(e.uS.Zy(),e.So(new Po(e.uS))),e.aS.removeEventListener("keystatuseschange",e.pS),e.aS.removeEventListener("message",e.wS)},e.aS.addEventListener("keystatuseschange",e.pS),e.aS.addEventListener("message",e.wS),e.uS=new uu;var r=[];return e.aS.closed&&r.push(tt.resolve(e.aS.closed)),e.lS=new su,r.push(e.lS.Yy),e.Zd=tt.race(r).then(e.yS,e.yS),e._S(),e}Tt(n,t);var i=n.prototype;return i.Xs=function(){if(this.dS)return this.Zd;var t=[];return t.push(tt.resolve(this.aS.close())),t.push(yn(1e3)),this.lS.$g(tt.race(t).catch(Rf)),this.dS=!0,this.Zd},i.fS=function(t,n,i){if(Ht.s_){var e=kf(Zo(n));if(1===e.version)n=new Ds(e.systemId,e.data).serialize().join()}return tt.resolve(this.aS.generateRequest(t,n)).catch(Rf)},i.Un=function(t){return tt.resolve(this.aS.load(t)).catch(Rf)},i.vS=function(){return tt.resolve(this.aS.remove()).catch(Rf)},i.er=function(t){return tt.resolve(this.aS.update(t)).catch(Rf)},i._S=function(){var t=this;this.uS.Zy(),this.aS.keyStatuses.forEach(function(n,i){t.gS(i,n)}),this.So(new Po(this.uS))},i.gS=function(t,n){if("string"==typeof t){var i=t;t=n,n=i}var e=Zo(t);if(this.mS===Qr&&16===e.byteLength&&(Ht.v_||Ht.dg)){var r=Go(e),o=r.getUint32(0,!0),u=r.getUint16(4,!0),s=r.getUint16(6,!0);r.setUint32(0,o,!1),r.setUint16(4,u,!1),r.setUint16(6,s,!1)}this.mS===Qr&&"status-pending"===n&&(n="usable"),this.uS.Gy(e,n)},kt(n,[{key:"hS",get:function(){return this.Zd}},{key:"oS",get:function(){return this.aS.expiration}},{key:"Sy",get:function(){return this.uS}},{key:"cS",get:function(){return this.aS.sessionId}}]),n}(ko);function Rf(t){var n;if(t.message){var i=t.message.match(/^SystemCode:0x([0-9a-fA-F]+)$/);i&&(n=0|_(i[1],16))}throw new cu(t.message,void 0,n,t)}var Of=function(){function t(t,n,i){this.SS=void 0,this.TS=void 0,this.Cd=void 0,this.SS=t,this.TS=n,this.Cd=i}var n=t.prototype;return n.bS=function(t){return nn(function(){return en(this,function(n){return[2,new Ef(this.SS.createSession(t),this.TS)]})}).call(this)},n.kS=function(t){return tt.resolve(this.SS.setServerCertificate(t))},n._n=function(t){return tt.resolve(t.setMediaKeys(this.SS))},n.ES=function(t){return tt.resolve(t.setMediaKeys(null))},n.hr=function(){return tt.resolve()},t}(),Nf=function(){function t(t,n,i){this.RS=void 0,this.mS=void 0,this.xS=void 0,this.RS=t,this.mS=n,this.xS=i}var n=t.prototype;return n.IS=function(){return nn(function(){var t;return en(this,function(n){switch(n.label){case 0:return[4,this.RS.createMediaKeys()];case 1:return t=n.sent(),[2,new Of(t,this.mS,this.xS)]}})}).call(this)},n.CS=function(){return this.xS},kt(t,[{key:"TS",get:function(){return this.RS.keySystem}}]),t}();function Pf(t){var n=t.trim(),i=n.indexOf(";");return i<0?n:n.substr(0,i).trim()}function Af(t,n,i,e){var r=!1;if(!(e.persistentState&&"optional"!==e.persistentState||e.distinctiveIdentifier&&"optional"!==e.distinctiveIdentifier)){var o={audioCapabilities:[],videoCapabilities:[],persistentState:e.persistentState||"optional",distinctiveIdentifier:e.distinctiveIdentifier||"optional",initDataTypes:e.initDataTypes,sessionTypes:["temporary"],label:e.label,DS:e.DS},u=!1;if(e.audioCapabilities){var s=e.audioCapabilities.filter(function(t){return Boolean(t.contentType)});s.length&&(o.audioCapabilities=s.filter(function(e){return Df(t,n,i,e)}),u=!0,o.audioCapabilities.length&&(r=!0))}if(e.videoCapabilities){var f=e.videoCapabilities.filter(function(t){return Boolean(t.contentType)});f.length&&(o.videoCapabilities=f.filter(function(e){return Df(t,n,i,e)}),u=!0,o.videoCapabilities.length&&(r=!0))}return u||(r=t(i,"video/mp4")),r?o:void 0}}function Df(t,n,i,e){return!!e.contentType&&(!(e.encryptionScheme&&!cn(n,e.encryptionScheme))&&(!e.robustness&&t(i,Pf(e.contentType))))}function Cf(t){if(t.videoCapabilities)for(var n,i=Rt(t.videoCapabilities);!(n=i()).done;){var e=n.value;if(e.contentType)return e.contentType}if(t.audioCapabilities)for(var r,o=Rt(t.audioCapabilities);!(r=o()).done;){var u=r.value;if(u.contentType)return u.contentType}}function xf(t){for(var n,i=[],e=Rt(t);!(n=e()).done;){var r=n.value;r.encryptionScheme&&i.push({contentType:r.contentType,robustness:r.robustness})}return t.concat(i)}function Bf(t){return!(!t.audioCapabilities||!t.audioCapabilities.some(Mf))||!(!t.videoCapabilities||!t.videoCapabilities.some(Mf))}function Mf(t){return!t.robustness}function Ff(t,n){for(var i,e=[],r=Rt(t);!(i=r()).done;){var o=i.value;o.robustness?e.push(o):e.push(jr({},o,{robustness:n}))}return e}x(),pt(),x(),pt();var Lf=function(){function t(){}return t.prototype.ew=function(t,n){return nn(function(){var i,e,r,o,u,s,f,h;return en(this,function(c){switch(c.label){case 0:for(n=n.filter(function(t){return!t.DS}),i=Rt(n);!(e=i()).done;)(r=e.value).audioCapabilities&&(r.audioCapabilities=xf(r.audioCapabilities)),r.videoCapabilities&&(r.videoCapabilities=xf(r.videoCapabilities));if(t!==io||!n.some(Bf))return[3,4];o=n.map(function(t){return function(t,n){return jr({},t,{videoCapabilities:t.videoCapabilities?Ff(t.videoCapabilities,n):void 0,audioCapabilities:t.audioCapabilities?Ff(t.audioCapabilities,n):void 0})}(t,"SW_SECURE_CRYPTO")}),c.label=1;case 1:return c.trys.push([1,3,,4]),[4,v.requestMediaKeySystemAccess(t,o)];case 2:return u=c.sent(),s=u.getConfiguration(),[2,new Nf(u,t,s)];case 3:return c.sent(),[3,4];case 4:return[4,v.requestMediaKeySystemAccess(t,n)];case 5:return f=c.sent(),h=f.getConfiguration(),[2,new Nf(f,t,h)]}})})()},t.LS=function(){return void 0!==v&&"function"==typeof v.requestMediaKeySystemAccess},t}();x(),pt(),x(),pt(),x(),pt(),x(),pt();var Uf=function(t){function n(n,i){var e;return(e=t.call(this)||this).XS=void 0,e.ZS=void 0,e.dS=void 0,e.FS=void 0,e.KS=void 0,e.US=void 0,e.VS=void 0,e.MS=void 0,e.yS=void 0,e.HS=void 0,e.Ts=void 0,e.zS=void 0,e.XS=n,e.ZS=i,e.dS=!1,e.KS=void 0,e.US=void 0,e.MS=void 0,e.yS=function(){e.dS=!0,e.FS.Hy(void 0),e.MS&&(e.MS.removeEventListener("mskeyclose",e.yS),e.MS.removeEventListener("mskeymessage",e.HS),e.MS.removeEventListener("mskeyerror",e.Ts),e.MS.removeEventListener("mskeyadded",e.zS))},e.HS=function(t){e.US&&(e.US.Hy(void 0),e.US=void 0),e.So(new Ao(e,"license-request",Jo(t.message).buffer,t.destinationURL||void 0))},e.Ts=function(){var t=e.MS&&e.MS.error;if(t){var n=new cu("Unknown CDM error",t.code,t.systemCode);if(e.US)e.US.zy(n),e.US=void 0;else if(e.KS)e.KS.zy(n),e.KS=void 0;else switch(n.Ky){case MSMediaKeyError.MS_MEDIA_KEYERR_OUTPUT:case MSMediaKeyError.MS_MEDIA_KEYERR_HARDWARECHANGE:e.YS("output-not-allowed");break;default:e.YS("internal-error")}}},e.zS=function(){e.US&&(e.YS("usable"),e.US.Hy(void 0),e.US=void 0),e.KS&&(e.YS("usable"),e.KS.Hy(void 0),e.KS=void 0)},e.FS=new su,e.VS=new uu,e}Tt(n,t);var i=n.prototype;return i.fS=function(t,n,i){return nn(function(){return en(this,function(t){switch(t.label){case 0:return this.WS(),this.US=new su,this.bS(Zo(n),i),[4,this.US.Yy];case 1:return t.sent(),[2]}})}).call(this)},i.bS=function(t,n){if(!t)throw new m("Expected initData to be defined but was "+t+".");var i,e=n&&n.playready&&n.playready.GS;return(i=n?this.XS.createSession(this.ZS,t,e):this.XS.createSession(this.ZS,t)).addEventListener("mskeyclose",this.yS),i.addEventListener("mskeymessage",this.HS),i.addEventListener("mskeyerror",this.Ts),i.addEventListener("mskeyadded",this.zS),this.MS=i,this.YS("status-pending"),i},i.Un=function(t){return nn(function(){return en(this,function(t){return this.WS(),[2,!0]})}).call(this)},i.er=function(t){return nn(function(){var n;return en(this,function(i){switch(i.label){case 0:if(this.KS=new su,this.WS(),!this.MS)return[2,tt.resolve()];if(0===(n=Zo(t)).byteLength)throw new m("Cannot call update with an empty response.");return this.MS.update(n),[4,this.KS.Yy];case 1:return i.sent(),[2]}})}).call(this)},i.Xs=function(){return!this.dS&&this.MS&&(this.dS=!0,this.MS.close()),this.FS.Yy},i.vS=function(){return nn(function(){return en(this,function(t){return this.WS(),[2]})}).call(this)},i.WS=function(){if(this.dS)throw new m("Already closing or closed.")},i.YS=function(t){this.VS.Zy(),this.VS.Gy(ou,t),this.So(new Po(this.VS))},kt(n,[{key:"cS",get:function(){return this.MS&&this.MS.sessionId||""}},{key:"oS",get:function(){return NaN}},{key:"hS",get:function(){return this.FS.Yy}},{key:"Sy",get:function(){return this.VS}}]),n}(ko),zf=function(){function t(t,n,i){this.XS=void 0,this.TS=void 0,this.Cd=void 0,this.ZS=void 0,this.XS=t,this.TS=n,this.Cd=i;var e=Cf(i)||"video/mp4";this.ZS=Pf(e)}var n=t.prototype;return n.bS=function(t){return nn(function(){return en(this,function(t){return[2,new Uf(this.XS,this.ZS)]})}).call(this)},n.kS=function(t){return tt.resolve(!1)},n._n=function(t){var n=this,i=function(){t.msSetMediaKeys(n.XS),t.removeEventListener("loadedmetadata",i)};return t.readyState>=1?t.msSetMediaKeys(this.XS):t.addEventListener("loadedmetadata",i),tt.resolve()},n.ES=function(t){return tt.resolve()},n.hr=function(){return tt.resolve()},t}(),Wf=function(){function t(t,n){this.mS=void 0,this.qS=void 0,this.mS=t,this.qS=n}var n=t.prototype;return n.CS=function(){return this.qS},n.IS=function(){var t=new c.MSMediaKeys(this.mS);return tt.resolve(new zf(t,this.mS,this.qS))},kt(t,[{key:"TS",get:function(){return this.mS}}]),t}(),Vf=function(){function t(){}return t.prototype.ew=function(t,n){try{return tt.resolve(function(t,n){if(!Hf())throw new m("Unsupported key system "+t);for(var i,e=Rt(n);!(i=e()).done;){var r=i.value,o=Af(qf,Oo,t,r);if(o)return new Wf(t,o)}throw new m("Unsupported key system configuration for "+t)}(t,n))}catch(t){return tt.reject(t)}},t.LS=function(){return Hf()},t}();function Hf(){return void 0!==c.MSMediaKeys&&"function"==typeof c.MSMediaKeys.isTypeSupported}function qf(t,n){return c.MSMediaKeys.isTypeSupported(t,n)}x(),pt(),x(),pt(),x(),pt(),x(),pt();var Xf=function(t){function n(n,i,e){var r;return(r=t.call(this)||this).$S=void 0,r.ZS=void 0,r.JS=void 0,r.FS=void 0,r.iT=void 0,r.VS=void 0,r.jS=void 0,r.tT=void 0,r.Ts=void 0,r.HS=void 0,r.zS=void 0,r.$S=n,r.ZS=i,r.JS=e,r.FS=new su,r.iT=void 0,r.VS=new uu,r.jS=void 0,r.tT=new su,r.Ts=function(){var t=r.jS&&r.jS.error;if(t){var n=new cu("Unknown CDM error",t.code,t.systemCode);r.iT?(r.iT.zy(n),r.iT=void 0):n.Ky===WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT?r.YS("output-not-allowed"):r.YS("internal-error"),r.So(new Do)}},r.HS=function(t){r.So(new Ao(r,"license-request",Jo(t.message).buffer,"this is a test string"===t.destinationURL?void 0:t.destinationURL))},r.zS=function(){r.iT&&(r.iT.Hy(void 0),r.iT=void 0),r.YS("usable")},r}Tt(n,t);var i=n.prototype;return i.fS=function(t,n,i){var e=i&&i.fairplay&&i.fairplay.QS;if(!e)throw new m("Expected FairPlay contentId to be defined but was "+e+".");var r=function(t,n,i){var e=Yo(t),r=2*e.length,o=2*n.length,u=new ArrayBuffer(4+r+4+o+4+i.byteLength),s=new DataView(u),f=new Qo;return qo(s,f,r,!0),Xo(s,f,e,!0),qo(s,f,o,!0),Xo(s,f,n,!0),qo(s,f,i.byteLength,!0),function(t,n,i){$o(t).set($o(i),n.ac),n.Dy(i.byteLength)}(s,f,i),new I(u)}(Zo(n),e,this.JS);return this.jS=this.$S.createSession(this.ZS,r),this.jS.addEventListener("webkitkeymessage",this.HS,!1),this.jS.addEventListener("webkitkeyadded",this.zS,!1),this.jS.addEventListener("webkitkeyerror",this.Ts,!1),this.YS("status-pending"),this.tT.Hy(this.jS),this.tT=new su,tt.resolve()},i.Un=function(t){return tt.resolve(!0)},i.er=function(t){return nn(function(){var n,i;return en(this,function(e){switch(e.label){case 0:if(0===(n=Zo(t)).byteLength)throw new m("Cannot call update with an empty response.");return this.iT=new su,(i=this.jS)?[3,2]:[4,this.tT.Yy];case 1:i=e.sent(),e.label=2;case 2:return i.update(n),[4,this.iT.Yy];case 3:return e.sent(),[2]}})}).call(this)},i.Xs=function(){var t,n=this.jS;return n&&(n.removeEventListener("webkitkeymessage",this.HS,!1),n.removeEventListener("webkitkeyadded",this.zS,!1),n.removeEventListener("webkitkeyerror",this.Ts,!1),n.close()),this.tT.Jg(),null==(t=this.iT)||t.Jg(),this.FS.Hy(void 0),this.FS.Yy},i.vS=function(){return tt.resolve(void 0)},i.YS=function(t){this.VS.Zy(),this.VS.Gy(ou,t),this.So(new Po(this.VS))},kt(n,[{key:"cS",get:function(){return this.jS?this.jS.sessionId:""}},{key:"oS",get:function(){return NaN}},{key:"hS",get:function(){return this.FS.Yy}},{key:"Sy",get:function(){return this.VS}}]),n}(ko);x(),pt(),x(),pt();var jf=function(t){return t[t.CONFIGURATION_ERROR=1e3]="CONFIGURATION_ERROR",t[t.LICENSE_ERROR=2e3]="LICENSE_ERROR",t[t.LICENSE_INVALID_DOMAIN=2001]="LICENSE_INVALID_DOMAIN",t[t.LICENSE_INVALID_SOURCE=2002]="LICENSE_INVALID_SOURCE",t[t.LICENSE_EXPIRED=2003]="LICENSE_EXPIRED",t[t.LICENSE_INVALID_FEATURE=2004]="LICENSE_INVALID_FEATURE",t[t.SOURCE_INVALID=3e3]="SOURCE_INVALID",t[t.SOURCE_NOT_SUPPORTED=3001]="SOURCE_NOT_SUPPORTED",t[t.MANIFEST_LOAD_ERROR=4e3]="MANIFEST_LOAD_ERROR",t[t.MANIFEST_CORS_ERROR=4001]="MANIFEST_CORS_ERROR",t[t.MANIFEST_PARSE_ERROR=4002]="MANIFEST_PARSE_ERROR",t[t.MEDIA_NOT_SUPPORTED=5e3]="MEDIA_NOT_SUPPORTED",t[t.MEDIA_LOAD_ERROR=5001]="MEDIA_LOAD_ERROR",t[t.MEDIA_DECODE_ERROR=5002]="MEDIA_DECODE_ERROR",t[t.MEDIA_AVPLAYER_ERROR=5003]="MEDIA_AVPLAYER_ERROR",t[t.MEDIA_ABORTED=5004]="MEDIA_ABORTED",t[t.NETWORK_ERROR=6e3]="NETWORK_ERROR",t[t.NETWORK_TIMEOUT=6001]="NETWORK_TIMEOUT",t[t.CONTENT_PROTECTION_ERROR=7e3]="CONTENT_PROTECTION_ERROR",t[t.CONTENT_PROTECTION_NOT_SUPPORTED=7001]="CONTENT_PROTECTION_NOT_SUPPORTED",t[t.CONTENT_PROTECTION_CONFIGURATION_MISSING=7002]="CONTENT_PROTECTION_CONFIGURATION_MISSING",t[t.CONTENT_PROTECTION_CONFIGURATION_INVALID=7003]="CONTENT_PROTECTION_CONFIGURATION_INVALID",t[t.CONTENT_PROTECTION_INITIALIZATION_INVALID=7004]="CONTENT_PROTECTION_INITIALIZATION_INVALID",t[t.CONTENT_PROTECTION_CERTIFICATE_ERROR=7005]="CONTENT_PROTECTION_CERTIFICATE_ERROR",t[t.CONTENT_PROTECTION_CERTIFICATE_INVALID=7006]="CONTENT_PROTECTION_CERTIFICATE_INVALID",t[t.CONTENT_PROTECTION_LICENSE_ERROR=7007]="CONTENT_PROTECTION_LICENSE_ERROR",t[t.CONTENT_PROTECTION_LICENSE_INVALID=7008]="CONTENT_PROTECTION_LICENSE_INVALID",t[t.CONTENT_PROTECTION_KEY_EXPIRED=7009]="CONTENT_PROTECTION_KEY_EXPIRED",t[t.CONTENT_PROTECTION_KEY_MISSING=7010]="CONTENT_PROTECTION_KEY_MISSING",t[t.CONTENT_PROTECTION_OUTPUT_RESTRICTED=7011]="CONTENT_PROTECTION_OUTPUT_RESTRICTED",t[t.CONTENT_PROTECTION_INTERNAL_ERROR=7012]="CONTENT_PROTECTION_INTERNAL_ERROR",t[t.SUBTITLE_LOAD_ERROR=8e3]="SUBTITLE_LOAD_ERROR",t[t.SUBTITLE_CORS_ERROR=8001]="SUBTITLE_CORS_ERROR",t[t.SUBTITLE_PARSE_ERROR=8002]="SUBTITLE_PARSE_ERROR",t[t.VR_PLATFORM_UNSUPPORTED=9e3]="VR_PLATFORM_UNSUPPORTED",t[t.VR_PRESENTATION_ERROR=9001]="VR_PRESENTATION_ERROR",t[t.AD_ERROR=1e4]="AD_ERROR",t[t.AD_BLOCKER_DETECTED=10001]="AD_BLOCKER_DETECTED",t[t.FULLSCREEN_ERROR=11e3]="FULLSCREEN_ERROR",t[t.PICTURE_IN_PICTURE_ERROR=11001]="PICTURE_IN_PICTURE_ERROR",t[t.CACHE_SOURCE_ERROR=12e3]="CACHE_SOURCE_ERROR",t[t.CACHE_CONTENT_PROTECTION_ERROR=12001]="CACHE_CONTENT_PROTECTION_ERROR",t[t.THEO_LIVE_UNKNOWN_ERROR=13e3]="THEO_LIVE_UNKNOWN_ERROR",t[t.THEO_LIVE_CHANNEL_NOT_FOUND=13001]="THEO_LIVE_CHANNEL_NOT_FOUND",t[t.THEO_LIVE_END_OF_DEMO=13002]="THEO_LIVE_END_OF_DEMO",t[t.THEO_LIVE_ANALYTICS_ERROR=13003]="THEO_LIVE_ANALYTICS_ERROR",t}({}),Yf=function(t){return t[t.CONFIGURATION=1]="CONFIGURATION",t[t.LICENSE=2]="LICENSE",t[t.SOURCE=3]="SOURCE",t[t.MANIFEST=4]="MANIFEST",t[t.MEDIA=5]="MEDIA",t[t.NETWORK=6]="NETWORK",t[t.CONTENT_PROTECTION=7]="CONTENT_PROTECTION",t[t.SUBTITLE=8]="SUBTITLE",t[t.VR=9]="VR",t[t.AD=10]="AD",t[t.FULLSCREEN=11]="FULLSCREEN",t[t.CACHE=12]="CACHE",t[t.THEOLIVE=13]="THEOLIVE",t}({});!function(t){t.fromCode=function(n){var i=y.floor(n/1e3);if(i in t)return i;throw new m("Invalid error code: "+n)}}(Yf||(Yf={}));var Kf=function(t){function n(n,i,e){var r;return(r=t.call(this,i,e)||this).code=void 0,r.code=n,r}return Tt(n,t),kt(n,[{key:"name",get:function(){return"THEOplayerError"}},{key:"category",get:function(){return Yf.fromCode(this.code)}}]),n}(wn),Gf=function(){function t(t,n,i){this.$S=void 0,this.TS=void 0,this.Cd=void 0,this.ZS=void 0,this.JS=void 0,this.$S=t,this.TS=n,this.Cd=i,this.JS=void 0;var e=Cf(i)||"video/mp4";this.ZS=Pf(e)}var n=t.prototype;return n.getInternalMediaKeys=function(){return this.$S},n.bS=function(t){return nn(function(){return en(this,function(t){if(!this.JS)throw new Kf(jf.CONTENT_PROTECTION_CERTIFICATE_ERROR,"No valid certificate was provided.");return[2,new Xf(this.$S,this.ZS,this.JS)]})}).call(this)},n.kS=function(t){return this.JS=Zo(t),tt.resolve(!0)},n._n=function(t){return t.webkitSetMediaKeys(this.$S),tt.resolve()},n.ES=function(t){return t.webkitSetMediaKeys(null),tt.resolve()},n.hr=function(){return tt.resolve()},t}(),$f=function(){function t(t,n){this.mS=void 0,this.qS=void 0,this.mS=t,this.qS=n}var n=t.prototype;return n.CS=function(){return this.qS},n.IS=function(){var t=new c.WebKitMediaKeys(this.mS);return tt.resolve(new Gf(t,this.mS,this.qS))},kt(t,[{key:"TS",get:function(){return this.mS}}]),t}(),Zf=function(){function t(){}return t.prototype.ew=function(t,n){try{return tt.resolve(function(t,n){if(t!==fo)throw new m(t+" is not supported with webkit-prefixed Encrypted Media Extensions.");if(!Jf())throw new m("Unsupported key system "+t);for(var i,e=Rt(n);!(i=e()).done;){var r=i.value,o=Af(Qf,No,t,r);if(o)return new $f(t,o)}throw new m("Unsupported key system configuration for "+t)}(t,n))}catch(t){return tt.reject(t)}},t.LS=function(){return Jf()},t}();function Jf(){return void 0!==c.WebKitMediaKeys&&"function"==typeof c.WebKitMediaKeys.isTypeSupported}function Qf(t,n){return c.WebKitMediaKeys.isTypeSupported(t,n)}x(),pt();var th=function(){function t(t){this.sT=void 0,this.sT=t}return t.prototype.ew=function(t,n){return nn(function(){var i,e,r;return en(this,function(o){switch(o.label){case 0:i=Rt(this.sT),o.label=1;case 1:if((e=i()).done)return[3,6];r=e.value,o.label=2;case 2:return o.trys.push([2,4,,5]),[4,r.ew(t,n)];case 3:return[2,o.sent()];case 4:return o.sent(),[3,5];case 5:return[3,1];case 6:throw new m("Unsupported key system configuration for "+t)}})}).call(this)},t}();x(),pt(),x(),pt(),x(),pt(),x(),pt(),x(),pt();var nh=function(){function t(t){var n=this;this.nT=[],this.rT=void 0,this.eT=new dn,this.aT=void 0,this.hT=function(){return 0===n.nT.length?n.aT?ih(n.aT,n.eT.jg).then(n.uT,n.uT):n.uT():n.nT.shift()().then(n.hT)},this.uT=function(){if(0!==n.nT.length)return n.hT();n.rT=void 0},this.aT=t}var n=t.prototype;return n.Zo=function(t,n){var i=this;return new tt(function(e){var r=dn.nm([i.eT.jg,n]),o=function(){r.Zg()};i.nT.push(function(){var n=ih(t,r.jg);return e(n),n.then(o,o)}),i.rT||(i.rT=i.hT())})},n.Jg=function(){return this.oT(!0)},n.kn=function(){return this.aT=void 0,this.oT(!1)},n.oT=function(t){var n=this.rT;return this.eT.Jg(),t&&(this.eT=new dn),tt.resolve(n)},t}();function ih(t,n){return new tt(function(i){return i(t(n))})}var eh=new nh,rh=function(t){function n(n){var i;return(i=t.call(this)||this).mS=void 0,i.US=void 0,i.iT=void 0,i.FS=void 0,i.ub=void 0,i.pT=void 0,i.mT=void 0,i.gT=void 0,i.vT=void 0,i._T=void 0,i.mS=n,i.US=void 0,i.iT=void 0,i.ub=!1,i.pT=void 0,i.vT=void 0,i.FS=new su,i.mT="",i._T=new su,i.gT=new uu,i}Tt(n,t);var i=n.prototype;return i.cT=function(){this.iT&&(this.YS("usable"),this.iT.Hy(void 0),this.iT=void 0)},i.dT=function(t){var n=new cu("Unknown CDM error",t.errorCode,t.systemCode);this.iT?(this.iT.zy(n),this.iT=void 0):this.US?(this.US.zy(n),this.US=void 0):n.Ky===WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT?this.YS("output-restricted"):1===n.qy?this.YS("expired"):this.YS("internal-error")},i.lT=function(t){0!==t.message.byteLength?(this.US&&(this.US.Hy(void 0),this.US=void 0),this.So(new Ao(this,"license-request",fu(this.mS,Jo(t.message).buffer),t.defaultURL||void 0))):this.US&&(this.US.zy("Empty key message"),this.US=void 0)},i.fT=function(t){this.vT||(this.vT=t,this._T.Hy(t))},i.Xs=function(){return nn(function(){return en(this,function(t){return this.throwIfClosed(),this.iT&&(this.iT.zy(void 0),this.iT=void 0),this.ub=!0,this.FS.Hy(void 0),[2]})}).call(this)},i.fS=function(t,n){return nn(function(){var t;return en(this,function(i){switch(i.label){case 0:return this.throwIfClosed(),this.US=new su,this.pT=Zo(n),(t=this.vT)?[3,2]:[4,this._T.Yy];case 1:t=i.sent(),i.label=2;case 2:return t.webkitGenerateKeyRequest(this.mS,this.pT),[4,this.US.Yy];case 3:return i.sent(),[2]}})}).call(this)},i.Un=function(t){return nn(function(){return en(this,function(t){return this.throwIfClosed(),[2,!1]})}).call(this)},i.vS=function(){return nn(function(){return en(this,function(t){return this.throwIfClosed(),[2]})}).call(this)},i.er=function(t){return nn(function(){var n;return en(this,function(i){switch(i.label){case 0:return n=this,this.throwIfClosed(),this.iT=new su,Ht.S_||Ht.w_?[2,eh.Zo(function(){return nn(function(){return en(this,function(n){switch(n.label){case 0:return[4,this.doUpdate(t)];case 1:return n.sent(),[2]}})}).call(n)})]:[4,this.doUpdate(t)];case 1:return i.sent(),[2]}})}).call(this)},i.doUpdate=function(t){return nn(function(){var n;return en(this,function(i){switch(i.label){case 0:return void 0===this.iT?[2]:(n=this.vT)?[3,2]:[4,this._T.Yy];case 1:n=i.sent(),i.label=2;case 2:return n.webkitAddKey(this.mS,Zo(t),this.pT,this.cS),[4,this.iT.Yy];case 3:return i.sent(),Ht.w_?[4,yn(500)]:[3,5];case 4:i.sent(),i.label=5;case 5:return[2]}})}).call(this)},i.throwIfClosed=function(){if(this.ub)throw new m("Already closing or closed.")},i.YS=function(t){this.gT.Zy(),this.gT.Gy(ou,t),this.So(new Po(this.gT))},i.wT=function(){return nn(function(){var t,n;return en(this,function(i){switch(i.label){case 0:return(n=this.vT)?[3,2]:[4,this._T.Yy];case 1:n=i.sent(),i.label=2;case 2:if(!(t=n).webkitCancelKeyRequest)return[3,7];i.label=3;case 3:return i.trys.push([3,4,5,7]),t.webkitCancelKeyRequest(this.mS,this.mT),[3,7];case 4:return i.sent(),[3,7];case 5:return[4,yn(500)];case 6:return i.sent(),[7];case 7:return[2]}})}).call(this)},kt(n,[{key:"Sy",get:function(){return this.gT}},{key:"cS",get:function(){return this.mT},set:function(t){this.mT=t}},{key:"hS",get:function(){return this.FS.Yy}},{key:"oS",get:function(){return NaN}}]),n}(ko),oh=function(){function t(t,n){var i=this;this.TS=void 0,this.Cd=void 0,this.vT=void 0,this.AT=void 0,this.ST=void 0,this.zS=void 0,this.yT=void 0,this.bT=void 0,this.TS=t,this.Cd=n,this.vT=void 0,this.AT=Kr(),this.ST=[],this.zS=function(t){var n=i.TT(t.sessionId);n&&n.cT()},this.yT=function(t){var n=i.TT(t.sessionId);n&&n.dT(t)},this.bT=function(t){var n=i.TT(t.sessionId);n&&n.lT(t)}}var n=t.prototype;return n._n=function(t){return this.vT=t,this.vT.addEventListener("webkitkeyadded",this.zS),this.vT.addEventListener("webkitkeyerror",this.yT),this.vT.addEventListener("webkitkeymessage",this.bT),this.AT.forEach(function(n,i){return n.fT(t)}),this.ST.forEach(function(n){return n.fT(t)}),tt.resolve()},n.ES=function(t){return t.removeEventListener("webkitkeyadded",this.zS),t.removeEventListener("webkitkeyerror",this.yT),t.removeEventListener("webkitkeymessage",this.bT),this.vT=void 0,tt.resolve()},n.hr=function(){return nn(function(){var t,n;return en(this,function(i){switch(i.label){case 0:t=this.AT.entries(),n=t.next(),i.label=1;case 1:return n.done?[3,3]:[4,n.value[1].wT()];case 2:return i.sent(),n=t.next(),[3,1];case 3:return this.AT.clear(),[2]}})}).call(this)},n.bS=function(t,n,i){return nn(function(){var t;return en(this,function(n){return t=new rh(this.TS),this.vT&&t.fT(this.vT),this.ST.push(t),[2,t]})}).call(this)},n.kS=function(t){return tt.resolve(!1)},n.TT=function(t){if(t){var n=this.AT.get(t);return n||((n=this.ST.shift())?(n.cS=t,this.AT.set(t,n),n):void 0)}},t}(),uh=function(){function t(t,n){this.TS=void 0,this.kT=void 0,this.TS=t,this.kT=n}var n=t.prototype;return n.IS=function(){return tt.resolve(new oh(this.TS,this.kT))},n.CS=function(){return this.kT},t}(),sh=function(){function t(){}return t.prototype.ew=function(t,n){try{return tt.resolve(function(t,n){if(!sh.LS())throw new m("Unsupported key system "+t);for(var i,e=Rt(n);!(i=e()).done;){var r=i.value,o=Af(fh,Oo,t,r);if(o)return new uh(t,o)}throw new m("Unsupported key system configuration for "+t)}(t,n))}catch(t){return tt.reject(t)}},t.LS=function(){return"undefined"!=typeof HTMLMediaElement&&void 0!==HTMLMediaElement.prototype.webkitGenerateKeyRequest&&void 0!==HTMLMediaElement.prototype.webkitAddKey&&void 0!==HTMLMediaElement.prototype.webkitCancelKeyRequest},t}();function fh(t,n){var i=Sn();return Boolean(i&&i.canPlayType&&""!==i.canPlayType(n,t))}x(),pt();var hh,ch=function(){function t(){}return t.prototype.ew=function(t,n){return t===io||t===Qr?tt.resolve(void 0):tt.reject(new g("DRM configuration not supported"))},t}();function ah(){return hh||(hh=function(){var t=[];Zf.LS()&&t.push(new Zf);Lf.LS()&&t.push(new Lf);Vf.LS()&&t.push(new Vf);sh.LS()&&t.push(new sh);Ht.k_&&t.push(new ch);return new th(t)}()),hh}x(),pt(),x(),pt();var vh=function(){function t(){this.ET=Kr()}var n=t.prototype;return n.Zy=function(t){this.ET.delete(t)},n.IT=function(){this.ET.clear()},n.Uy=function(t){return this.ET.get(t)},n.Gy=function(t,n){this.ET.set(t,n)},t}(),dh=function(){function t(){}return t.xT=function(){return t.Bg||(t.Bg=lh.LS()?new lh:new vh),t.Bg},t.Zy=function(n){t.xT().Zy(n)},t.IT=function(){t.xT().IT()},t.Uy=function(n){return t.xT().Uy(n)},t.Gy=function(n,i){t.xT().Gy(n,i)},t}();dh.Bg=void 0;var lh=function(t){function n(){return t.apply(this,arguments)||this}Tt(n,t);var i=n.prototype;return i.Zy=function(t){self.sessionStorage.removeItem(t)},i.IT=function(){self.sessionStorage.clear()},i.Uy=function(t){var n;return null!=(n=self.sessionStorage.getItem(t))?n:void 0},i.Gy=function(t,n){self.sessionStorage.setItem(t,n)},n.LS=function(){var t="foobar";try{return self.sessionStorage.setItem(t,t),self.sessionStorage.removeItem(t),!0}catch(t){return!1}},n}(dh);x(),pt(),x(),pt();var wh=function(){var t=self.Blob;if(t)try{new t;return function(t){return function(n,i){return new t(n,i)}}(t)}catch(t){}var n=self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder;if(n)return function(t){return function(n,i){var e=new t;if(n)for(var r,o=Rt(n);!(r=o()).done;){var u=r.value;e.append(u)}return e.getBlob(i&&i.type||"")}}(n)}();function bh(t,n,i){var e=wh([n],{type:"application/octet-stream"}),r=URL.createObjectURL(e),o=function(t,n){var i=t,e=i.indexOf("?");if(e>=0&&(i=i.substr(0,e)),i=i.substr(i.lastIndexOf("/")+1),n){var r=i.indexOf(".");r<0&&(r=i.length),i=i.substr(0,r)+n+i.substr(r)}return i}(t,i),u=a.createElement("a");u.href=r,u.download=o,a.body.appendChild(u),u.click(),a.body.removeChild(u),URL.revokeObjectURL(r)}x(),pt(),x(),pt(),x(),pt(),x(),pt(),x(),pt(),M(),x(),pt();var gh=function(t,n,i){return i=null!=t?E(P(t)):{},function(t,n,i,e){if(n&&"object"==typeof n||"function"==typeof n)for(var r,o=N(n),u=0,s=o.length;u<s;u++)r=o[u],A.call(t,r)||r===i||R(t,r,{get:function(t){return n[t]}.bind(null,r),enumerable:!(e=O(n,r))||e.enumerable});return t}(!n&&t&&t.__esModule?i:R(i,"default",{value:t,enumerable:!0}),t)}(_t());x(),pt();var mh=t,ph=$t(mh.ReadableStream)&&$t(mh.WritableStream)&&$t(mh.TransformStream)&&Gt(mh.ReadableStream.prototype.pipeThrough)&&!ui.Lm,yh=ph?mh.ReadableStream:gh.ReadableStream,_h=(ph?mh.WritableStream:gh.WritableStream,ph?mh.TransformStream:gh.TransformStream);ph&&mh.ByteLengthQueuingStrategy?mh.ByteLengthQueuingStrategy:gh.ByteLengthQueuingStrategy,ph&&mh.CountQueuingStrategy?mh.CountQueuingStrategy:gh.CountQueuingStrategy;function Sh(t){return function(t){return new yh({start:function(n){for(var i,e=Rt(t);!(i=e()).done;){var r=i.value;n.enqueue(r)}n.close()}})}([t])}function Th(t){return Sh(function(t){return new I(t)}(t))}function Ih(t,n){return function(t,n){var i=n,e=t.getReader(),r=new su,o=function(){u();var t=new bn;e.cancel(t).catch(Jt),r.zy(t)},u=function(){i&&(i.Yg(o),i=void 0)};i&&(i.Ug?o():i.zg(o));var s=[],f=function(t){return t.done?(u(),tt.resolve(s)):(s.push(t.value),tt.resolve(e.read()).then(f))};return tt.resolve(e.read()).then(f).then(function(t){u(),r.Hy(t)},function(t){u(),r.zy(t)}),r.Yy}(t,n).then(function(t){return eu(t).buffer})}function kh(t,n){var i=n,e=new _h,r=e.readable,o=e.writable,u=o.getWriter(),s=function(){i&&i.Jg()};return u.closed.then(s,s),t.then(function(t){return i=void 0,u.releaseLock(),t.pipeTo(o).catch(Jt)},function(t){return i=void 0,u.releaseLock(),o.abort(t).catch(Jt)}),r}function Eh(t){return Yo(new I(t))}function Rh(t){return Ko(t).buffer}x(),pt();var Oh="text/plain;charset=UTF-8",Nh=function(){function t(){}var n=t.prototype;return n.OT=function(t){return this.FT(t).then(JSON.parse)},n.VT=function(t,n){switch(t){case Cr.CT:return this.WT(n);case Cr.PT:return this.OT(n);case Cr.NT:return this.UT();case Cr.DT:return this.FT(n);default:throw new m}},t}();function Ph(t,n,i){if(B(t,Nh))return t;if(B(t,yh))return function(t,n){return new Dh({Kp:0,UT:t,GT:Ah(n)})}(t,i);var e=Ah(i),r=tt.resolve(t).then(function(t){return function(t,n){if(t){if("string"==typeof t)return{Kp:Cr.DT,XT:t,GT:n||Oh};if(B(t,ArrayBuffer)||nu(t))return{Kp:Cr.CT,XT:Uh(t),GT:n};if(function(t){return Kt(t)&&t.constructor&&t.constructor===p}(t)||Yt(t))return{Kp:Cr.PT,XT:t,GT:n};throw new m("Unsupported BodyInit type")}return{Kp:Cr.DT,XT:null,GT:n}}(t,e)});return new Dh({Kp:1,Yy:r,ZT:n})}function Ah(t){return(t.get("content-type")||"").toLowerCase()}var Dh=function(t){function n(n){var i;return(i=t.call(this)||this).zT=!1,i.KT=void 0,i.jT=new su,i.jT.Yy.catch(Jt),i.$T(n),i}Tt(n,t);var i=n.prototype;return i.qT=function(){return this.jT.Yy},i.FT=function(t){return this.QT(Ch,t)},i.OT=function(t){return this.QT(Bh,t)},i.WT=function(t){return this.QT(Fh,t)},i.UT=function(){return this.JT(function(t){return 0===t.Kp?t.UT:kh(t.Yy.then(Lh).then(Th),t.ZT)}(this.KT))},i.QT=function(t,n){if(this.zT)return tt.reject(new m("Already used"));this.zT=!0;var i=t(this.KT,n);return this.jT.$g(i.then(Jt)),i},i.JT=function(t){if(this.zT)throw new m("Already used");if(t.locked)throw new m("Body stream is locked");this.zT=!0;var n=new _h,i=tt.resolve(t.pipeTo(n.writable));return this.jT.$g(i),n.readable},i.$T=function(t){this.KT=t,1===t.Kp&&t.Yy.catch(Jt)},i.ek=function(){if(this.zT)throw new m("Already used");var t=function(t){if(0===t.Kp){var n=t.UT.tee(),i=n[0],e=n[1];return[{Kp:t.Kp,UT:i,GT:t.GT},{Kp:t.Kp,UT:e,GT:t.GT}]}var r=t.ZT.im(),o=r[0],u=r[1];return[{Kp:t.Kp,Yy:t.Yy,ZT:o},{Kp:t.Kp,Yy:t.Yy,ZT:u}]}(this.KT),i=t[0],e=t[1];return this.$T(i),new n(e)},kt(n,[{key:"HT",get:function(){return this.zT}},{key:"YT",get:function(){return 0===this.KT.Kp}}]),n}(Nh);function Ch(t,n){return 0===t.Kp?Ih(t.UT,n).then(Eh):(n&&t.ZT.$g(n),pn(t.Yy.then(xh),t.ZT))}function xh(t){switch(t.Kp){case Cr.DT:return tt.resolve(t.XT||"");case Cr.CT:return tt.resolve(t.XT).then(Eh);case Cr.PT:return tt.resolve(t.XT).then(JSON.stringify)}}function Bh(t,n){return 0===t.Kp?Ch(t,n).then(JSON.parse):(n&&t.ZT.$g(n),pn(t.Yy.then(Mh),t.ZT))}function Mh(t){return t.Kp===Cr.PT?tt.resolve(t.XT):xh(t).then(JSON.parse)}function Fh(t,n){return 0===t.Kp?Ih(t.UT,n):(n&&t.ZT.$g(n),pn(t.Yy.then(Lh),t.ZT))}function Lh(t){switch(t.Kp){case Cr.CT:return tt.resolve(t.XT);case Cr.DT:case Cr.PT:return xh(t).then(Rh)}}function Uh(t){return B(t,ArrayBuffer)?t:Jo($o(t)).buffer}var zh=function(t){function n(n){var i;return(i=t.call(this)||this).nk=void 0,i.nk=n,i}Tt(n,t);var i=n.prototype;return i.qT=function(){return this.nk.qT()},i.FT=function(t){return this.nk.FT(t)},i.OT=function(t){return this.nk.OT(t)},i.WT=function(t){return this.nk.WT(t)},i.UT=function(t){return this.nk.UT(t)},i.ek=function(){return this.nk.ek()},kt(n,[{key:"HT",get:function(){return this.nk.HT}},{key:"YT",get:function(){return this.nk.YT}}]),n}(Nh);var Wh=function(t){function n(n,i){var e,r,o,u,s,f;i?(r=i.lk,o=i.ck,u=i.rk,s=i.fk,f=i.vk):(r=[],o=Cr.DT,u=200,s="OK",f=!1);var h=n.dk,c=new xr(n.lk||r),a=n.ck||o,v=n._k||(i&&i.dk===h?i._k:h.Yu),d=i?i.nk:null,l=Ph(void 0!==n.hk?n.hk:d,n.ZT||new dn,c);return(e=t.call(this,l)||this).lk=void 0,e.dk=void 0,e._k=void 0,e.ck=void 0,e.rk=void 0,e.fk=void 0,e.vk=void 0,e.lk=c,e.dk=h,e._k=v,e.ck=a,e.rk=void 0!==n.rk?n.rk:u,e.fk=void 0!==n.fk?String(n.fk):s,e.vk=n.vk||f,e}Tt(n,t);var i=n.prototype;return i.hk=function(t){return this.VT(this.ck,t)},i.Ly=function(){return new n({hk:this.ek(),dk:this.dk},this)},n}(zh),Vh=function(){function t(){}var n=t.prototype;return n.dk=function(t){var n=function(t){return new Wh({hk:null,lk:{},dk:t,_k:t.Yu,ck:t.ck,rk:0,fk:Ro.Zw})}(new Ur(t));return tt.resolve(n)},n.Kk=function(t){},n.kn=function(){},t}();var Hh=function(){function t(t,n){void 0===n&&(n=!0),this.Jk=void 0,this.tE=void 0,this.Jk=t,this.tE=n}var n=t.prototype;return n.dk=function(t){var n=this.Qk(t);return this.Jk.dk(n)},n.Kk=function(t){return this.Jk.Kk(this.$k(t))},n.Qk=function(n){var i=new Ur(n);if(!this.tE){var e=t.iE(i.Yu);i=new Ur({Yu:e},i)}return i},n.$k=function(n){var i=n.Yu;return this.tE||(i=t.iE(i)),{Yu:i,XT:n.XT}},n.kn=function(){this.Jk.kn()},t.iE=function(t){return jt.Dp&&wo(t,"http://")?t.replace(":","s:"):t},kt(t,null,[{key:"qk",get:function(){return t.jk||(t.jk=new t(new Vh)),t.jk}}]),t}();Hh.jk=void 0,x(),pt(),x(),pt(),x(),pt(),x(),pt();var qh=function(t){function n(n,i,e){var r;return(r=t.call(this,n.dk,null!=e?e:function(t){return"Error while loading "+t.dk.Yu+", status code "+t.rk}(n),i)||this).oE=void 0,r.oE=n,r}return Tt(n,t),kt(n,[{key:"name",get:function(){return zr.eE}},{key:"hE",get:function(){return this.oE}}]),n}(Wr);x(),pt();var Xh=function(t){function n(n,i){return t.call(this,n,function(t){return"Request for "+t.Yu+" timed out after "+t.Vk+" seconds."}(n),i)||this}return Tt(n,t),kt(n,[{key:"name",get:function(){return zr.nE}}]),n}(Wr);x(),pt();var jh=self.fetch,Yh=self.Request,Kh=self.Response,Gh=self.Headers,$h=self.ReadableStream,Zh=self.AbortSignal,Jh=self.AbortController,Qh=Qt(function(){try{return Gt(jh)&&$t(Yh)&&$t(Kh)&&$t(Gh)&&"forEach"in Gh.prototype&&Or()}catch(t){return!1}}),tc=["http:","https:"];var nc=Qt(function(){try{return Qh()&&$t(Zh)&&$t(Jh)&&"signal"in Yh.prototype}catch(t){return!1}}),ic=Qt(function(){try{return Qh()&&$t($h)&&"body"in Kh.prototype&&!Ht.s_}catch(t){return!1}});function ec(t,n){var i,e=t.lk.has("content-length")?Number(t.lk.get("content-length")):void 0;return i=t.YT?function(t,n,i){return t.pipeThrough(new _h(new rc(n,i)))}(t.UT(),n,e):function(t,n,i){return nn(function(){var e,r;return en(this,function(o){switch(o.label){case 0:return[4,tt.resolve()];case 1:return o.sent(),n(0,i),[4,t];case 2:return e=o.sent(),r=e.byteLength,n(r,null!=i?i:r),[2,e]}})})()}(t.WT(),n,e),new Wh({hk:i,dk:t.dk},t)}x(),pt(),M(),x(),pt();var rc=function(){function t(t,n){this.uE=void 0,this.cE=void 0,this.aE=void 0,this.uE=t,this.cE=n,this.aE=0}var n=t.prototype;return n.transform=function(t,n){this.aE+=t.byteLength,this.uE(this.aE,this.cE),n.enqueue(t)},n.flush=function(t){var n;this.uE(this.aE,null!=(n=this.cE)?n:this.aE)},t}();var oc=function(){function t(t){this.hE=void 0,this.rE=void 0,this.eT=new dn,this.oE=void 0,this.lE=0,this.fE=!1,this.rE=t,this.eT.$g(t.jg),this.hE=this.dE()}var n=t.prototype;return n.dE=function(){return nn(function(){var t,n,i,e,r,o,u,s,f,h;return en(this,function(c){switch(c.label){case 0:t=this,(n=this.rE).Vk&&(this.lE=d(function(){t.fE=!0,t.eT.Jg()},n.Vk),this.eT.jg.Kg(function(){l(t.lE)}));try{i=jh(n.Yu,{method:n.Fk,headers:n.lk.BT(),body:n.XT,credentials:n.Xk?"include":"same-origin",signal:fc(this.eT.jg),mode:n.Hk,keepalive:n.Yk})}catch(t){throw new Vr(n,t)}c.label=1;case 1:return c.trys.push([1,3,,4]),[4,i];case 2:return e=c.sent(),[3,4];case 3:throw r=c.sent(),gn(o=this.vE(r))&&this.eT.Jg(),o;case 4:if(u=e.url||n.Yu,s=0===e.status&&"file:"===function(t){return jt.Dh(t).protocol}(u)?200:e.status,f=new uc(this,e,this.eT),!function(t){return t.rk>=200&&t.rk<=299||304===t.rk}(h=new Wh({hk:f,dk:n,ck:n.ck,lk:hc(e.headers),rk:s,fk:e.statusText,_k:u})))throw new qh(h);return n.Zk&&(h=ec(h,n.Zk)),[2,h]}})}).call(this)},n.vE=function(t){return function(t){return B(t,Wr)}(t)?t:gn(t)?this.fE?new Xh(this.rE):new bn(t.message,t):this.oE?new qh(this.oE,t):new Vr(this.rE,t)},t}(),uc=function(t){function n(n,i,e){var r;return(r=t.call(this)||this).gE=void 0,r._E=void 0,r.eT=void 0,r.jT=new su,r.gE=n,r._E=i,r.eT=e,r.jT.Yy.catch(Jt),r}Tt(n,t);var i=n.prototype;return i.qT=function(){return this.jT.Yy},i.FT=function(t){return this.QT(this._E.text(),t)},i.WT=function(t){return this.QT(this._E.arrayBuffer(),t)},i.UT=function(){var t=this._E.body;return t?this.JT(t):kh(this.WT().then(Th),this.eT)},i.ek=function(){var t=this._E.clone(),i=this.eT.im(),e=i[0],r=i[1];return this.eT=e,new n(this.gE,t,r)},i.QT=function(t,n){var i=this;n&&this.eT.$g(n);var e=mn(tt.resolve(t),this.eT.jg).catch(function(t){throw i.gE.vE(t)});return e=pn(e,this.eT),this.jT.$g(e.then(Jt)),e},i.JT=function(t){var n=this;return new yh(new cc(t,function(t){return n.gE.vE(t)},this.eT,this.jT),{highWaterMark:0})},kt(n,[{key:"HT",get:function(){return this._E.bodyUsed}},{key:"YT",get:function(){return Xt(this._E.body)}}]),n}(Nh),sc="abort";function fc(t){if(nc()){var n=new Jh;if(t.Ug)n.abort();else if(!t.Gg){var i=function(){e(),n.abort()},e=function(){n.signal.removeEventListener(sc,i),t.Yg(i),t.qg(e)};n.signal.addEventListener(sc,i),t.zg(i),t.Kg(e)}return n.signal}}function hc(t){if(function(t){return Kt(t)&&"function"==typeof t.forEach}(t)){var n=new xr;return t.forEach(function(t,i){Array.isArray(t)&&2===t.length?n.append(t[0],t[1]):n.append(i,t)}),n}return new xr(t)}var cc=function(){function t(t,n,i,e){this.mE=void 0,this.pE=void 0,this.eT=void 0,this.jT=void 0,this.Gd=void 0,this.mE=t,this.pE=n,this.eT=i,this.jT=e}var n=t.prototype;return n.start=function(t){this.Gd=this.mE.getReader()},n.pull=function(t){return nn(function(){var n,i,e;return en(this,function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,mn(this.Gd.read(),this.eT.jg)];case 1:return n=r.sent(),[3,3];case 2:return i=r.sent(),e=this.pE(i),this.jT.zy(e),this.eT.Jg(),this.Gd.cancel(e).catch(Jt),t.error(e),[2];case 3:return n.done?(this.jT.Hy(),this.eT.Jg(),t.close()):t.enqueue(n.value),[2]}})}).call(this)},n.cancel=function(t){return this.eT.Jg(),this.jT.zy(t),this.Gd.cancel(t)},t}();x(),pt();var ac=function(){function t(t){var n=this;this.yE=void 0,this.rE=void 0,this.eT=new dn,this.oE=void 0,this.wE=new su,this.PE=void 0,this.xE=!1,this.RE=function(){var t;n.bE(),null==(t=n.yE)||t.abort()},this.rE=t,this.eT.$g(t.jg),this.yE=new k,this.dE()}var n=t.prototype;return n.dE=function(){var t=this,n=this.yE,i=this.rE;if(i.jg.Ug)return this.bE();n.onreadystatechange=function(){return t.AE()},n.onprogress=function(n){return t.uE(n)},n.onload=function(){return t.SE()},n.onloadend=function(){return t.TE()},n.onerror=function(){return t.kE()},n.ontimeout=function(){return t.EE()},n.onabort=function(){return t.bE()},n.open(i.Fk,i.Yu,!0),n.withCredentials=Boolean(i.Xk),"responseType"in n&&i.ck&&(i.ck===Cr.DT?n.responseType="text":n.responseType="arraybuffer"),i.lk.forEach(function(t,i){n.setRequestHeader(i,t)}),i.Vk&&(n.timeout=i.Vk),this.eT.jg.zg(this.RE);var e=i.XT;e?n.send(e):n.send()},n.AE=function(){var t=this.yE;void 0!==t&&t.readyState>=2&&!this.xE&&(this.xE=!0,this.CE())},n.CE=function(){var t,n,i=this.yE,e=function(t){var n=new xr,i=t.replace(/\r?\n[\t ]+/g," ");return i.split(/\r?\n/).forEach(function(t){var i=t.split(":"),e=i.shift().trim();if(e){var r=i.join(":").trim();n.append(e,r)}}),n}(i.getAllResponseHeaders()||""),r=this.rE;this.PE=new su,this.oE=new Wh({dk:r,ck:r.ck,hk:this.PE.Yy,rk:i.status,fk:i.statusText,lk:e,_k:null!=(n=i.responseURL)?n:e.get("X-Request-URL")}),null==(t=this.wE)||t.Hy(this.oE)},n.SE=function(){var t,n=this.yE;if(void 0!==n){var i=n.response;if(!Xt(i)){var e=this.rE.ck;i=e===Cr.DT?n.responseText:e===Cr.CT?new ArrayBuffer(0):{}}null==(t=this.PE)||t.Hy(i)}},n.TE=function(){this.kn()},n.uE=function(t){void 0!==this.yE&&(null==this.rE.Zk||this.rE.Zk.call(this.rE,t.loaded,t.lengthComputable?t.total:void 0))},n.kE=function(){var t=new g("Network request failed");this.oE?this.Ts(new qh(this.oE,t)):this.Ts(new Vr(this.rE,t))},n.EE=function(){this.Ts(new Xh(this.rE))},n.bE=function(){this.Ts(new bn),this.kn()},n.Ts=function(t){var n,i;null==(n=null!=(i=this.PE)?i:this.wE)||n.zy(t)},n.kn=function(){this.yE=void 0,this.oE=void 0,this.wE=void 0,this.PE=void 0,this.eT.Zg()},kt(t,[{key:"hE",get:function(){return this.wE.Yy}}]),t}();x(),pt();var vc=function(){function t(){}var n=t.prototype;return n.dk=function(t){return function(t){if(!Qh()||!function(t){try{return tc.indexOf(new self.URL(t,self.location.href).protocol)>=0}catch(t){return!1}}(t.Yu))return!1;if(!ic()&&t.Zk)return!1;if(!t.zk&&t.Fk!==Fr.POST){if(Ht.S_&&Ht.d_<=68)return!1;if(Ht.w_)return!1}return!0}(t)?new oc(t).hE:new ac(t).hE},n.Kk=function(t){var n=c.navigator;if(n&&n.sendBeacon)n.sendBeacon(t.Yu,wh([t.XT],{type:t.GT}));else{var i=t.GT?{"Content-type":t.GT}:void 0;this.dk(new Ur({Fk:Fr.POST,Yu:t.Yu,XT:t.XT,lk:i,Hk:Lr.Lk})).then(function(t){!function(t){t.then(Jt,Jt)}(t.WT())},Jt)}},n.kn=function(){},t}();x(),pt(),x(),pt();var dc=function(t){return t[t.NE=1]="NE",t[t.DE=2]="DE",t[t.DT=3]="DT",t[t.BE=4]="BE",t[t.LE=9]="LE",t}({});var lc=function(){function t(){}return t.prototype.FE=function(t){var n,i=new DOMParser;try{n=i.parseFromString(t,"text/xml")}catch(t){throw new qr(t)}if(!n||n.getElementsByTagName("parsererror").length>0)throw new qr;return new _c(n)},t}(),wc=function(){function t(t){this.WE=void 0,this.WE=t}var n=t.prototype;return n.ZE=function(t){return this.WE.isEqualNode(t.WE)},n.HE=function(n){return new t(this.WE.cloneNode(n))},kt(t,[{key:"OE",get:function(){return dc.DE}},{key:"VE",get:function(){var t;return null!=(t=this.WE.localName)?t:Ic(this.WE.nodeName)}},{key:"l",get:function(){return this.WE.nodeName}},{key:"UE",get:function(){var t;return null!=(t=this.WE.namespaceURI)?t:void 0}},{key:"GE",get:function(){var t;return null!=(t=this.WE.prefix)?t:void 0}},{key:"XE",get:function(){return this.WE.nodeValue}}]),t}(),bc=function(){function t(t){this.KE=void 0,this.YE=void 0,this.KE=t}var n=t.prototype;return n.qE=function(t){return this.zE.filter(function(n){return Sc(n)&&n.jE===t})},n.QE=function(t,n){return this.zE.filter(function(i){return Sc(i)&&i.VE===n&&i.UE===t})},n.$E=function(t){this.KE.appendChild(t.JE),this.YE&&this.YE.push(t)},n.ZE=function(t){return this.KE.isEqualNode(t.JE)},kt(t,[{key:"zE",get:function(){return void 0===this.YE&&(this.YE=function(t){for(var n=[],i=0;i<t.length;i++){var e=Tc(t.item(i));e&&n.push(e)}return n}(this.KE.childNodes)),this.YE}},{key:"m",get:function(){return this.zE.filter(Sc)}},{key:"JE",get:function(){return this.KE}}]),t}(),gc=function(t){function n(n){return t.call(this,n)||this}Tt(n,t);var i=n.prototype;return i.sR=function(t){if(this.KE.hasAttribute(t))return this.KE.getAttribute(t)},i.eR=function(t,n){if(this.KE.hasAttributeNS(t,n))return this.KE.getAttributeNS(t,n)},i.nR=function(t){this.KE.removeAttribute(t)},i.rR=function(t,n){this.KE.removeAttributeNS(t,n)},i.hR=function(t,n){this.KE.setAttribute(t,n)},i.oR=function(t,n,i){this.KE.setAttributeNS(t,n,i)},i.HE=function(t){return new n(this.KE.cloneNode(t))},kt(n,[{key:"OE",get:function(){return dc.NE}},{key:"VE",get:function(){var t;return null!=(t=this.KE.localName)?t:Ic(this.KE.nodeName)}},{key:"UE",get:function(){var t;return null!=(t=this.KE.namespaceURI)?t:void 0}},{key:"GE",get:function(){var t;return null!=(t=this.KE.prefix)?t:void 0}},{key:"jE",get:function(){return this.KE.nodeName}},{key:"tR",get:function(){return function(t){for(var n=[],i=0;i<t.length;i++)n.push(new wc(t.item(i)));return n}(this.KE.attributes)}},{key:"iR",get:function(){return this.KE.textContent}}]),n}(bc),mc=function(){function t(t){this.KE=void 0,this.KE=t}return t.prototype.ZE=function(t){return this.hk===t.hk},kt(t,[{key:"hk",get:function(){return this.KE.nodeValue}},{key:"JE",get:function(){return this.KE}}]),t}(),pc=function(t){function n(n){return t.call(this,n)||this}return Tt(n,t),n.prototype.HE=function(t){return new n(this.KE.cloneNode(t))},kt(n,[{key:"OE",get:function(){return dc.DT}}]),n}(mc),yc=function(t){function n(n){return t.call(this,n)||this}return Tt(n,t),n.prototype.HE=function(t){return new n(this.KE.cloneNode(t))},kt(n,[{key:"OE",get:function(){return dc.BE}}]),n}(mc),_c=function(t){function n(n){return t.call(this,n)||this}return Tt(n,t),n.prototype.HE=function(t){return new n(this.KE.cloneNode(t))},kt(n,[{key:"OE",get:function(){return dc.LE}},{key:"aR",get:function(){return new gc(this.KE.documentElement)}}]),n}(bc);function Sc(t){return function(t){return 1===t.OE}(t)}function Tc(t){switch(t.nodeType){case dc.NE:return new gc(t);case dc.DT:return new pc(t);case dc.BE:return new yc(t)}}function Ic(t){var n=t.indexOf(":");return n<0?t:t.substr(n+1)}var kc=function(t){function n(){var n;return(n=t.apply(this,arguments)||this).uR=void 0,n.dR=ic(),n.fR=Ht.cg||Ht.s_,n._R=(Ht.cg||Ht.S_&&Ht.d_<=68||Ht.s_)&&!(Ht.w_&&Ht.b_<3),n.SR=void 0,n.kR=new lc,n}return Tt(n,t),n.prototype.FE=function(t){return this.kR.FE(t)},kt(n,[{key:"pp",get:function(){return this.uR||(this.uR=new To(ah())),this.uR}},{key:"cR",get:function(){return this.dR}},{key:"lR",get:function(){return this.fR}},{key:"vR",get:function(){return this._R}},{key:"gR",get:function(){return!1}},{key:"mR",get:function(){return dh.xT()}},{key:"pR",get:function(){return{wR:bh}}},{key:"yR",get:function(){return v.connection&&v.connection.effectiveType||Ar}},{key:"bR",get:function(){return v.connection&&v.connection.type||Dr}},{key:"AR",get:function(){return this.SR||(this.SR=new Hh(new vc)),this.SR}}]),n}(Er);Zt(new kc),x(),pt(),x(),pt();x(),pt(),x(),pt(),x(),pt();var Ec=function(t){return t.Pk="audio",t.Nk="video",t.FV="metadata",t}({});x(),pt(),x(),pt();var Rc=function(t){return t.wk="#EXTINF",t.lMt="#EXT-X-MAP",t.p="#EXTM3U",t.en="#EXT-X-VERSION",t.ui="#EXT-X-TARGETDURATION",t.TSt="#EXT-X-START",t.li="#EXT-X-INDEPENDENT-SEGMENTS",t.NT="#EXT-X-STREAM-INF",t.vr="#EXT-X-MEDIA-SEQUENCE",t.sf="#EXT-X-ENDLIST",t.ff="#EXT-X-MEDIA",t.af="#EXT-X-DISCONTINUITY",t.nv="#EXT-X-DISCONTINUITY-SEQUENCE",t.ev="#EXT-X-PLAYLIST-TYPE",t.sv="#EXT-X-KEY",t}({}),Oc=function(){function t(t,n){this.Kp="#EXTINF",this.cv=void 0,this.av=void 0,this.cv=t,this.av=n}return t.prototype.EC=function(){return this.Kp+":"+this.cv+",\n"+this.av},t}(),Nc=function(){function t(t){this.Kp="#EXT-X-MAP",this.av=void 0,this.av=t}return t.prototype.EC=function(){return this.Kp+':URI="'+this.av+'"'},t}(),Pc=function(){function t(){this.Kp="#EXTM3U"}return t.prototype.EC=function(){return this.Kp},t}(),Ac=function(){function t(t){this.Kp="#EXT-X-VERSION",this.pN=void 0,this.pN=t}return t.prototype.EC=function(){return this.Kp+":"+this.pN},t}(),Dc=function(){function t(t){this.Kp="#EXT-X-TARGETDURATION",this.eMt=void 0,this.eMt=t}return t.prototype.EC=function(){return this.Kp+":"+this.eMt},t}(),Cc=function(){function t(t){this.Kp="#EXT-X-START",this.nOt=void 0,this.nOt=t}return t.prototype.EC=function(){return this.Kp+":TIME-OFFSET="+this.nOt},t}(),xc=function(){function t(t,n,i){this.uri=void 0,this.keyFormat=void 0,this.keyFormatVersions=void 0,this.Kp=void 0,this.uri=t,this.keyFormat=n,this.keyFormatVersions=i,this.Kp="#EXT-X-KEY"}return t.prototype.EC=function(){return this.Kp+':METHOD=SAMPLE-AES,URI="'+this.uri+'",KEYFORMAT="'+this.keyFormat+'",KEYFORMATVERSIONS="'+this.keyFormatVersions+'"'},t}(),Bc=function(){function t(t){this.Kp="#EXT-X-STREAM-INF",this.oG=1,this.av=void 0,this.av=t}return t.prototype.EC=function(){return this.Kp+":BANDWIDTH="+this.oG+',AUDIO="audio"\n'+this.av},t}(),Mc=function(){function t(t){this.Kp="#EXT-X-MEDIA-SEQUENCE",this.OB=void 0,this.OB=t}return t.prototype.EC=function(){return this.Kp+":"+this.OB},t}(),Fc=function(){function t(t){this.Kp="#EXT-X-MEDIA",this.av=void 0,this.av=t}return t.prototype.EC=function(){var t=Kr();t.set("TYPE","AUDIO"),t.set("GROUP-ID",'"audio"'),t.set("NAME",'"audio"'),t.set("AUTOSELECT","YES"),t.set("DEFAULT","YES"),t.set("CHANNELS",'"2"'),t.set("URI",'"'+this.av+'"');var n=[];return t.forEach(function(t,i){return n.push(i+"="+t)}),this.Kp+":"+n.join(",")},t}();x(),pt();var Lc=function(){function t(t){this.Db=[],this.Db=t}var n=t.prototype;return n.uD=function(){return this.Db},n.dv=function(t){this.Db.push(t)},n.LVt=function(){for(var t,n="",i=Rt(this.uD());!(t=i()).done;){n+=t.value.EC()+"\n"}return n},n.Zg=function(){this.Db.length=0},t}(),Uc=function(t){function n(n,i){var e;return e=t.call(this,[new Pc,new Ac(8)])||this,i&&e.dv(new Bc("video/index.m3u8")),n&&e.dv(new Fc("audio/index.m3u8")),e}return Tt(n,t),n}(Lc);x(),pt(),x(),pt(),x(),pt();var zc=function(t){return t.Zit="HELLO",t.Hit="HI_THERE",t.zit="INITIALIZE",t.Yit="APPEND_INIT",t.Kit="APPEND_DATA",t.qit="ACK",t.jit="REMOVE",t.Qit="DESTROY_SESSION",t}({});x(),pt(),x(),pt();var Wc,Vc=new Array(256);for(Wc=0;Wc<256;Wc+=1)Vc[Wc]=(Wc<16?"0":"")+Wc.toString(16);function Hc(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var n=16*y.random()|0;return("x"===t?n:3&n|8).toString(16)})}x(),pt();var qc=function(t){function n(n){var i;return(i=t.call(this,"append")||this).hk=void 0,i.hk=n,i}return Tt(n,t),n}(Eo),Xc=function(t){function n(){var n;return(n=t.apply(this,arguments)||this).xRt=0,n.qm=new I(0),n.ub=!1,n.lv=!1,n}Tt(n,t);var i=n.prototype;return i._2=function(t,n){this.xRt+=n,this.qm=eu([this.qm,t]),this.So(new qc(t))},i.Xs=function(){this.hS||(this.So(new Eo("close")),this.ub=!0)},kt(n,[{key:"xR",get:function(){return this.xRt}},{key:"hk",get:function(){return this.qm}},{key:"hS",get:function(){return this.ub}},{key:"wv",get:function(){return this.lv},set:function(t){this.lv=t}}]),n}(ko),jc="sync-seg-",Yc=function(){function t(t,n){this.gv=!1,this.kv=!1,this.jv=void 0,this.Ad=void 0,this.o=jc+Hc(),this.jv=n?new Xc:void 0,this.Ad=t?new Xc:void 0}return t.prototype.Xs=function(){this.jv&&this.jv.Xs(),this.Ad&&this.Ad.Xs()},kt(t,[{key:"tw",get:function(){return this.gv},set:function(t){this.gv=t}},{key:"rw",get:function(){return this.kv},set:function(t){this.kv=t}}]),t}();x(),pt();var Kc=1.1,Gc=function(t){function n(n,i,e){var r;return(r=t.call(this,[new Pc,new Ac(8),new Dc(1),new Cc(0)])||this).aat=void 0,r.sw=void 0,r.bw=[],r.sbt=Kr(),r.crt=void 0,r.kw=0,r.tb=function(t){if(t.TO>=on)for(;r.bw.length>0;)r.nb()},e&&r.dv(new xc(e,"com.apple.streamingkeydelivery","1")),r.aat=n,r.crt=i,r.crt.wn("remove",r.tb),r.sw=new Mc(0),r.dv(r.sw),r}Tt(n,t);var i=n.prototype;return i.SCt=function(){return this.aat===Ec.Nk?this.crt.cb:this.aat===Ec.Pk?this.crt.ab:void 0},i.eat=function(t){return this.sbt.get(t)},i.Zg=function(){this.bw.length=0,this.sw.OB=0,this.sbt.clear(),this.kw=0},i.uD=function(){return this.lb(),[].concat(t.prototype.uD.call(this),this.bw)},i.lb=function(){for(var t,n=Rt(this.crt.tg());!(t=n()).done;){var i=t.value;if(!this.sbt.has(i.o)){var e=void 0;if(this.aat===Ec.Nk?(e=i.jv,i.rw=!0):(e=i.Ad,i.tw=!0),!e)return;this.sbt.set(i.o,e),e.wv&&this.bw.push(new Nc(i.o+"-init")),this.bw.push(new Oc(Kc,i.o)),this.kw+=Kc}}this.ng()},i.ng=function(){for(;this.kw>60;)this.nb()},i.nb=function(){var t=this.bw.shift();void 0!==t&&function(t){return t.Kp===Rc.wk}(t)&&(this.sbt.delete(t.av),this.kw-=t.cv,this.sw.OB++)},n}(Lc);var $c=function(t){function n(n){var i;return(i=t.call(this,"remove")||this).TO=void 0,i.TO=n,i}return Tt(n,t),n}(Eo),Zc=function(t){function n(n,i){var e;return(e=t.call(this)||this).ig=void 0,e.ug=void 0,e.sg=void 0,e.lg=void 0,e.bg=void 0,e.mg=void 0,e.kg=void 0,e.tm=void 0,e.rm=void 0,e.om=void 0,e.sm=void 0,e.ig=n,e.ug=i,e.sg=[],e.bg=[],e.mg=Kr(),e.kg=Kr(),e.tm=Kr(),e.rm=0,e}Tt(n,t);var i=n.prototype;return i.tg=function(){return this.lg?(this.sg=this.sg.filter(function(t){return!(t.rw&&t.tw)}),[].concat(this.sg,[this.lg],this.bg)):[]},i.w2=function(t){this.am(t)},i._2=function(t){this.am(t),this.bm(t),this.km(t)},i.vS=function(t){this.am(t),this.km(t)},i.Zg=function(){var t;null==(t=this.lg)||t.Xs(),this.lg=void 0,this.bg.forEach(function(t){return t.Xs()}),this.bg.length=0,this.sg.length=0,this.tm=Kr(),this.rm=0},i.bm=function(t){var n=t.startPts,i=t.totalDuration;this.kg.set(t.mediaType,n+i)},i.ip=function(){if(this.lg){this.lg.Xs(),this.sg.push(this.lg);var t=this.bg.shift(),n=new Yc(this.ig,this.ug);t?(this.lg=t,this.bg.push(n)):this.lg=n}},i.up=function(t){if(this.lg){var n=!this.lg.Ad||0===this.lg.Ad.xR,i=!this.lg.jv||0===this.lg.jv.xR,e=this.lg.Ad&&this.lg.Ad.wv,r=this.lg.jv&&this.lg.jv.wv,o=i&&(n&&!(this.lg.tw||this.lg.rw)||e),u=n&&(i&&!(this.lg.tw||this.lg.rw)||r);(t===Ec.Pk&&!u||t===Ec.Nk&&!o)&&(this.ip(),this.ip())}},i.am=function(t){var n=t.mediaType,i=t.kind,e=this.mg.get(n);if(void 0===e){if(i===zc.Yit||i===zc.Kit){var r=[t];this.mg.set(n,r)}}else e.push(t)},i.km=function(t){var n=this.ty(t);for(var i,e=Rt(n);!(i=e()).done;){var r=i.value;switch(r.kind){case zc.Yit:this.ny(r),this.tm=Kr(),this.rm=0;break;case zc.jit:this.hy(r);break;case zc.Kit:this.my(r)}}},i.ny=function(t){var n=t.mediaType;void 0===this.lg?(this.lg=new Yc(this.ig,this.ug),this.bg.push(new Yc(this.ig,this.ug))):this.up(n),n===Ec.Nk?(this.sm=t.segment,this.lg.jv.wv=!0):n===Ec.Pk&&(this.om=t.segment,this.lg.Ad.wv=!0)},i.my=function(t){var n,i,e=t.mediaType===Ec.Pk,r=t.totalDuration,o=null!=(n=this.tm.get(t.mediaType))?n:0;e?(this.lg.Ad._2(t.segment,r),i=o+this.lg.Ad.xR):(this.lg.jv._2(t.segment,r),i=o+this.lg.jv.xR),i>=this.rm+Kc&&(this.tm.set(t.mediaType,i),this.rm+=Kc,this.ip())},i.hy=function(t){this.kg.set(t.mediaType,void 0),this.up(t.mediaType),this.sg.length=0,this.So(new $c(t.endTime))},i.ty=function(t){var n=this;if(t.kind===zc.jit)return this.ky(t);var i=[];return this.mg.forEach(function(t){if(t&&t.length>0){var e=un(t,function(t){return t.kind===zc.jit});-1===e&&(e=t.length);for(var r,o=Rt(t.slice(0,e));!(r=o()).done;){var u=r.value;if(!cn(i,u)){var s,f=n.ky(u);if(f.length>0)(s=i).push.apply(s,[].concat(f));else if(u.kind===zc.Kit)break}}}}),i},i.ky=function(t){var n=this.mg.get(t.mediaType),i=function(t){return t===Ec.Nk?Ec.Pk:Ec.Nk}(t.mediaType);if(!(i===Ec.Nk?this.ug:this.ig))return n.splice(0,n.indexOf(t)+1);if(t.kind===zc.Yit)return[];var e=this.kg.get(i);if(void 0===e)return[];if(t.kind===zc.jit){var r=this.OS(i);if(r.length>0){var o=n.splice(0,n.indexOf(t));return n.splice(0,1),[].concat(o,r,[t])}return[]}if(t.startPts<=e){var u=n.splice(0,n.indexOf(t));n.splice(0,1);var s=this.AS(t,u,i);return[].concat(u,s,[t])}return[]},i.AS=function(t,n,i){var e=this.mg.get(i);if(!e)return[];var r=t.startPts+t.totalDuration,o=un(e,function(t){return t.kind===zc.jit}),u=o-1;-1===o&&(u=e.length-1);for(var s=u+1,f=0;f<=u&&s===u+1;f++){var h=e[f];h.kind===zc.Kit&&h.startPts>r&&(s=f)}var c=-1;return-1!==un(n,function(t){return t.kind===zc.Yit})&&(c=un(e,function(t){return t.kind===zc.Yit})),c>s&&(s=c+1),s>0?(e[s-1].kind===zc.Yit&&(s-=1),e.splice(0,s)):[]},i.OS=function(t){var n=this.mg.get(t);if(n){var i=un(n,function(t){return t.kind===zc.jit});if(i>=0)return n.splice(0,i+1)}return[]},i.BS=function(){var t="[MEDIABUFFER] endPTS: ";this.kg.forEach(function(n,i){t=t.concat(i+" = "+n+" ")}),jt.dp(t)},i.RT=function(t,n){var i=t+": [";null==n||n.forEach(function(t){i=i.concat(" "+t.kind+"("+t.mediaType+")")}),i=i.concat(" ]"),jt.dp(i)},kt(n,[{key:"ab",get:function(){var t;return null==(t=this.om)?void 0:t.slice()}},{key:"cb",get:function(){var t;return null==(t=this.sm)?void 0:t.slice()}}]),n}(ko);var Jc=function(){function t(t,n){this.tk=void 0,this.ik=void 0,this.uk=void 0,this.sk=void 0;var i=t.some(function(t){return t.match("audio")}),e=t.some(function(t){return t.match("video")});this.ik=new Zc(i,e),this.tk=new Uc(i,e),i&&(this.uk=new Gc(Ec.Pk,this.ik,n)),e&&(this.sk=new Gc(Ec.Nk,this.ik,n))}var n=t.prototype;return n.ak=function(t){var n,i,e=Qc(t);return e===Ec.Nk?null==(n=this.sk)?void 0:n.SCt():e===Ec.Pk?null==(i=this.uk)?void 0:i.SCt():void 0},n.eat=function(t){var n,i,e=t.split("/")[1],r=Qc(t);return r===Ec.Nk?null==(n=this.sk)?void 0:n.eat(e):r===Ec.Pk?null==(i=this.uk)?void 0:i.eat(e):void 0},n.w2=function(t){this.ik.w2(t)},n._2=function(t){this.ik._2(t)},n.Adt=function(t){this.ik.vS(t)},n.Zg=function(){var t,n;this.ik.Zg(),this.tk.Zg(),null==(t=this.uk)||t.Zg(),null==(n=this.sk)||n.Zg()},kt(t,[{key:"mk",get:function(){return this.tk}},{key:"kk",get:function(){return this.uk}},{key:"IE",get:function(){return this.sk}}]),t}();function Qc(t){return t.match(/video/)?Ec.Nk:Ec.Pk}var ta=function(){function t(t,n){var i=this;this.ME=void 0,this.TR=void 0,this.Mat=void 0,this.kYt=void 0,this.ME=t,this.TR=n,this.Mat=void 0,this.kYt=function(t){return nn(function(){var n,i;return en(this,function(e){switch((n=t.data).kind){case zc.zit:this.Mat=new Jc(n.mediaBufferConfigs,n.fairPlaySdkUri);break;case zc.Yit:this.Mat.w2(n);break;case zc.Kit:this.Mat._2(n);break;case zc.jit:this.Mat.Adt(n)}return i={kind:zc.qit},this.ME.postMessage(i),[2]})}).call(i)},this.ME.onmessage=this.kYt}var n=t.prototype;return n.LVt=function(t){return"master.m3u8"===t?this.Mat.mk:"video/index.m3u8"===t?this.Mat.IE:"audio/index.m3u8"===t?this.Mat.kk:void 0},n.CR=function(t){if(t.match(/m3u8/)){var n,i=null==(n=this.LVt(t))?void 0:n.LVt();return new Response(i,{headers:{"Content-Type":"application/x-mpegurl; charset=utf-8"}})}if(t.match(jc)){var e={"Content-Type":t.match(/video/)?"video/mp4":"audio/mp4"};if(t.match(/init/)){var r,o=null==(r=this.Mat)?void 0:r.ak(t);return new Response(o,{headers:e})}var u=this.iat(t);if(!u)return new Response(void 0,{status:404,statusText:"Not Found"});var s=function(t){var n,i=function(t){n.enqueue(t.hk)},e=function(){n.close(),t.mn("append",i),t.mn("close",e)};return new self.ReadableStream({start:function(r){(n=r).enqueue(t.hk),t.hS?n.close():(t.wn("append",i),t.wn("close",e))},cancel:function(){t.mn("append",i),t.mn("close",e)}})}(u);return new Response(s,{headers:e})}return new Response(void 0,{status:404,statusText:"Not Found"})},n.iat=function(t){return this.Mat.eat(t)},n.close=function(){var t;this.ME.close(),null==(t=this.Mat)||t.Zg()},t}(),na=function(){function t(){var t=this;this.X6=Kr(),this.sYt=void 0,this.kYt=function(n){var i=n.data;if(i.kind===zc.Zit){t.BR().catch(Jt);var e=i.port,r=Hc(),o=new ta(e,n.source.id);t.X6.set(r,o);var u=function(n){n.data.kind===zc.Qit&&(t.IN(r),e.removeEventListener("message",u))};e.addEventListener("message",u);var s={kind:zc.Hit,sessionId:r};e.postMessage(s)}},this.XP=function(n){if(wo(n.request.url,"https://theo.proxy")){var i=new URL(n.request.url).pathname.split("/"),e=i[1],r=i.slice(2).join("/"),o=t.X6.get(e);if(void 0===o){var u=new Response(void 0,{headers:{message:"Given session ["+e+"] not found."},status:404,statusText:"Not Found"});return void n.respondWith(u)}if(void 0===r){var s=new Response(void 0,{headers:{message:"No resource ["+r+"] provided."},status:404,statusText:"Not Found"});return void n.respondWith(s)}var f=o.CR(r);n.respondWith(f)}}}var n=t.prototype;return n.gr=function(t){this.sYt=t,t.addEventListener("message",this.kYt),t.addEventListener("fetch",this.XP)},n.IN=function(t){var n=this.X6.get(t);n&&n.close(),this.X6.delete(t)},n.BR=function(){return nn(function(){var t,n,i;return en(this,function(e){switch(e.label){case 0:return t=this,[4,this.sYt.clients.matchAll()];case 1:return n=e.sent(),i=n.map(function(t){return t.id}),this.X6.forEach(function(n,e){cn(i,n.TR)||t.IN(e)}),[2]}})}).call(this)},t}();na.ID=new na;var ia=self;ia.addEventListener("install",function(t){t.waitUntil(ia.skipWaiting())}),ia.addEventListener("activate",function(t){t.waitUntil(ia.clients.claim())}),na.ID.gr(ia)}("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof s?s:"undefined"!=typeof global?global:this);
|
|
31
31
|
//# sourceMappingURL=theoplayer.sw.js.map
|