@theoplayer/theoads 8.5.0 → 8.6.0
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 +2 -2
- package/THEOplayer.chromeless.esm.js +3 -3
- package/THEOplayer.chromeless.js +3 -3
- package/THEOplayer.common.d.ts +308 -234
- package/THEOplayer.common.esm.js +3 -3
- package/THEOplayer.d.ts +2 -2
- 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/iframe.html +1 -1
- package/package.json +1 -1
- package/theoplayer.d.js +3 -3
- package/theoplayer.sw.js +3 -3
package/theoplayer.sw.js
CHANGED
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
THEOplayer is based on patented technology developed by
|
|
25
25
|
THEO Technologies (https://www.theoplayer.com).
|
|
26
26
|
|
|
27
|
-
Version: 8.
|
|
28
|
-
Created: 2024-
|
|
27
|
+
Version: 8.6.0
|
|
28
|
+
Created: 2024-12-04T18:55:33.534Z
|
|
29
29
|
*/
|
|
30
|
-
!function(t){"use strict";var n,i,e=t.window,r=t.document,o=(t.location,t.navigator),u=t.setTimeout,s=t.clearTimeout,f=t.setInterval,h=t.clearInterval,c=t.Error,a=t.TypeError,v=(t.SyntaxError,t.Object),d=t.Math,l=t.parseInt,w=t.parseFloat,b=t.isNaN,g=t.Uint8Array,m=(t.Worker,t.WorkerGlobalScope,t.XMLHttpRequest);"function"==typeof Symbol&&Symbol.iterator?n=Symbol:(i=0,(n=function(t){return"ttn"+t+"_"+ ++i}).iterator=n("Symbol.iterator"));var p=u;function y(t){return Boolean(t&&void 0!==t.length)}function _(){}function S(t){if(!(this instanceof S))throw new a("Promises must be constructed via new");if("function"!=typeof t)throw new a("not a function");this.ja=0,this.ntn=!1,this.sTt=void 0,this.itn=[],O(t,this)}function T(t,n){for(;3===t.ja;)t=t.sTt;0!==t.ja?(t.ntn=!0,S.rtn((function(){var i=1===t.ja?n.onFulfilled:n.onRejected;if(null!==i){var e;try{e=i(t.sTt)}catch(t){return void I(n.promise,t)}E(n.promise,e)}else(1===t.ja?E:I)(n.promise,t.sTt)}))):t.itn.push(n)}function E(t,n){try{if(n===t)throw new a("A promise cannot be resolved with itself.");if(n&&("object"==typeof n||"function"==typeof n)){var i=n.then;if(n instanceof S)return t.ja=3,t.sTt=n,void k(t);if("function"==typeof i)return void O(function(t,n){return function(){t.apply(n,arguments)}}(i,n),t)}t.ja=1,t.sTt=n,k(t)}catch(n){I(t,n)}}function I(t,n){t.ja=2,t.sTt=n,k(t)}function k(t){2===t.ja&&0===t.itn.length&&S.rtn((function(){t.ntn||S.etn(t.sTt)}));for(var n=0,i=t.itn.length;n<i;n++)T(t,t.itn[n]);t.itn=null}function R(t,n,i){this.onFulfilled="function"==typeof t?t:null,this.onRejected="function"==typeof n?n:null,this.promise=i}function O(t,n){var i=!1;try{t((function(t){i||(i=!0,E(n,t))}),(function(t){i||(i=!0,I(n,t))}))}catch(t){if(i)return;i=!0,I(n,t)}}S.prototype.catch=function(t){return this.then(null,t)},S.prototype.then=function(t,n){var i=new this.constructor(_);return T(this,new R(t,n,i)),i},S.prototype.finally=function(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)}))}))},S.all=function(t){return new S((function(n,i){if(!y(t))return i(new a("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"==typeof 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])}))},S.allSettled=function(t){return new this((function(i,e){if(!t||void 0===t.length)return e(new a((void 0===t?"undefined":function(t){return t&&void 0!==n&&t.constructor===n?"symbol":typeof t}(t))+" "+t+" is not iterable(cannot read property Symbol(Symbol.iterator))"));var r=Array.prototype.slice.call(t);if(0===r.length)return i([]);var o=r.length;function u(t,n){if(n&&("object"==typeof n||"function"==typeof n)){var e=n.then;if("function"==typeof e)return void e.call(n,(function(n){u(t,n)}),(function(n){r[t]={status:"rejected",reason:n},0==--o&&i(r)}))}r[t]={status:"fulfilled",value:n},0==--o&&i(r)}for(var s=0;s<r.length;s++)u(s,r[s])}))},S.resolve=function(t){return t&&"object"==typeof t&&t.constructor===S?t:new S((function(n){n(t)}))},S.reject=function(t){return new S((function(n,i){i(t)}))},S.race=function(t){return new S((function(n,i){if(!y(t))return i(new a("Promise.race accepts an array"));for(var e=0,r=t.length;e<r;e++)S.resolve(t[e]).then(n,i)}))},S.rtn="function"==typeof setImmediate&&function(t){setImmediate(t)}||function(t){p(t,0)},S.etn=function(t){"undefined"!=typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",t)};var N=function(){var t=self.Promise;if(void 0!==t)try{if(-1!==t.toString().indexOf("[native code]"))return t}catch(t){}}(),P=o?o.userAgent:"",A=P.match(/Firefox\/([0-9]+)/i),D=null!=A,C=A?Number(A[1]):0,x=P.match(/(Version)\/((\d+)\.(\d+)(?:\.(\d+))?).*Safari/),B=null!=x,M=x?Number(x[3]):0,L=function(){function t(t){this.XL=0,this.PV=0,this.Fx=[],this.utn=t}return t.prototype.stn=function(t){var n=this.length();this.otn(n+1);var i=this.PV+n&this.utn-1;this.Fx[i]=t,this.XL=n+1},t.prototype.push=function(t){var n=this.length()+1;if(this.utn<n)this.stn(t);else{var i=this.PV+n-1,e=this.utn-1;this.Fx[i&e]=t,this.XL=n}},t.prototype.shift=function(){var t=this.PV,n=this.Fx[t];return this.Fx[t]=void 0,this.PV=t+1&this.utn-1,this.XL--,n},t.prototype.length=function(){return this.XL},t.prototype.otn=function(t){this.utn<t&&this.atn(this.utn<<1)},t.prototype.atn=function(t){var n=this.utn;this.utn=t;var i=this.PV+this.XL&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.Fx,0,n,i)},t}();var U="unhandledrejection",F=self.PromiseRejectionEvent,z=self.CustomEvent;function W(t){return new F(U,{reason:t,promise:N.reject(t).catch((function(){})),cancelable:!0})}function q(t){var n=new z(U,{detail:{reason:t},cancelable:!0});return v.defineProperty(n,"reason",{value:t}),n}function V(t){var n=r.createEvent("CustomEvent");return n.initCustomEvent(U,!1,!0,{reason:t}),n}var H,X,j,Y,K,G,$,Z,J=function(t){return J=function(){try{var t=N.resolve(),n="error",i=new F(U,{reason:n,promise:t});return U===i.type&&n===i.reason}catch(t){}return!1}()?W:function(){try{var t="error",n=new z(U,{detail:{reason:t}});return U===n.type&&t===n.detail.reason}catch(t){}return!1}()?q:V,J(t)};function Q(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):X.resolve(f).then(e,r)}function tt(t){return function(){var n=this,i=arguments;return new X((function(e,r){var o=t.apply(n,i);function u(t){Q(o,e,r,u,s,"next",t)}function s(t){Q(o,e,r,u,s,"throw",t)}u(void 0)}))}}function nt(t,i){var e,r,o,u,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return u={next:f(0),throw:f(1),return:f(2)},"function"==typeof n&&(u[n.iterator]=function(){return this}),u;function f(n){return function(f){return function(n){if(e)throw new a("Generator is already executing.");for(;u&&(u=0,n[0]&&(s=0)),s;)try{if(e=1,r&&(o=2&n[0]?r.return:n[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,n[1])).done)return o;switch(r=0,o&&(n=[2&n[0],o.value]),n[0]){case 0:case 1:o=n;break;case 4:return s.label++,{value:n[1],done:!1};case 5:s.label++,r=n[1],n=[0];continue;case 7:n=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==n[0]&&2!==n[0])){s=0;continue}if(3===n[0]&&(!o||n[1]>o[0]&&n[1]<o[3])){s.label=n[1];break}if(6===n[0]&&s.label<o[1]){s.label=o[1],o=n;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(n);break}o[2]&&s.ops.pop(),s.trys.pop();continue}n=i.call(t,s)}catch(t){n=[6,t],r=0}finally{e=o=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}([n,f])}}}function it(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 et(t,n){if(t){if("string"==typeof t)return it(t,n);var i=v.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)?it(t,n):void 0}}function rt(t){return function(t){if(Array.isArray(t))return it(t)}(t)||function(t){if(void 0!==n&&null!=t[n.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||et(t)||function(){throw new a("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}N&&!(D&&C<60||B&&M<15)?X=N:(X=S,$=null!==(H=function(){var t=self.queueMicrotask;if("function"==typeof t)return function(n){return t(n)};var n=N;if(n&&"function"==typeof n.resolve){var i=n.resolve();return function(t){return i.then(t)}}}())&&void 0!==H?H:S.rtn,j=$,Y=new L(16),K=!1,(Z={H4:function(t){Y.push(t),K||(K=!0,j(G))},bG:G=function(){for(;Y.length()>0;)Y.shift()();K=!1}}).bG,S.rtn=Z.H4,S.etn=function(t){try{var n=J(t);if(!self.dispatchEvent(n)||n.defaultPrevented)return}catch(t){}u((function(){throw new c("Unhandled promise rejection: ".concat(t))}),0)});var ot={}.toString;function ut(t){return null!=t}var st=Array.isArray||function(t){return"[object Array]"===ot.call(t)};function ft(t){return"object"==typeof t&&null!==t}function ht(t){return"function"==typeof t}function ct(t){return ht(t)||ft(t)}var at,vt=9007199254740991;d.pow(2,-52);!function(t){t[t.Zr=0]="Zr",t[t.Jf=1]="Jf",t[t.$f=-1]="$f"}(at||(at={}));Array.prototype.find,Array.prototype.findLast;var dt="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},lt="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};function wt(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 bt(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 gt(t,n){return-1!==t.indexOf(n)}function mt(t){t.length=0}var pt;Array.prototype.flat,Array.prototype.flatMap;function yt(t){pt=t}var _t=function(){};function St(t){var n;return function(){return void 0!==t&&(n=t(),t=void 0),n}}var Tt;function Et(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),v.defineProperty(t,e.key,e)}}function It(t,n,i){return n&&Et(t.prototype,n),i&&Et(t,i),t}function kt(t,n){return kt=v.setPrototypeOf||function(t,n){return t.__proto__=n,t},kt(t,n)}function Rt(t,n){if("function"!=typeof n&&null!==n)throw new a("Super expression must either be null or a function");t.prototype=v.create(n&&n.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),n&&kt(t,n)}function Ot(t,i){return function(t){if(Array.isArray(t))return t}(t)||function(t,i){var e=null==t?null:void 0!==n&&t[n.iterator]||t["@@iterator"];if(null!=e){var r,o,u=[],s=!0,f=!1;try{for(e=e.call(t);!(s=(r=e.next()).done)&&(u.push(r.value),!i||u.length!==i);s=!0);}catch(t){f=!0,o=t}finally{try{s||null==e.return||e.return()}finally{if(f)throw o}}return u}}(t,i)||et(t,i)||function(){throw new a("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Nt(){var t=v.create(null);return t.t_=void 0,delete t.t_,t}function Pt(){return new Dt}!function(t){t.WA="audio",t.VA="video",t.ZA="metadata"}(Tt||(Tt={}));var At="undefined"!=typeof Map&&"entries"in Map.prototype?Map:void 0,Dt=At||function(){var t=function(){function t(t,n){this.index=0,this.data=t,this.selector=n,this.keys=v.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=Nt(),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=Nt(),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}()}();var Ct;At||function(){var t=function(){function t(t,n){this.i_=t,this.e_=n}return t.prototype.next=function(){var t=this.i_.next();return t.done?t:{value:this.e_(t.value),done:!1}},t}();(function(){function n(){this.mf=Pt()}var i=n.prototype;i.get=function(t){return this.mf.get(""+t)},i.set=function(t,n){return this.mf.set(""+t,n),this},i.has=function(t){return this.mf.has(""+t)},i.delete=function(t){return this.mf.delete(""+t)},i.clear=function(){this.mf.clear()},i.keys=function(){return new t(this.mf.keys(),(function(t){return Number(t)}))},i.values=function(){return this.mf.values()},i.entries=function(){return new t(this.mf.entries(),(function(t){var n=Ot(t,2),i=n[0],e=n[1];return[Number(i),e]}))},i.forEach=function(t){this.mf.forEach((function(n,i){t(n,Number(i))}))},It(n,[{key:"size",get:function(){return this.mf.size}}])})()}();!function(t){t.PD="#EXTINF",t.hPt="#EXT-X-MAP",t.PT="#EXTM3U",t.i="#EXT-X-VERSION",t.p="#EXT-X-TARGETDURATION",t.Ebt="#EXT-X-START",t.en="#EXT-X-INDEPENDENT-SEGMENTS",t.xD="#EXT-X-STREAM-INF",t.ui="#EXT-X-MEDIA-SEQUENCE",t.li="#EXT-X-ENDLIST",t.zT="#EXT-X-MEDIA",t.vr="#EXT-X-DISCONTINUITY",t.if="#EXT-X-DISCONTINUITY-SEQUENCE",t.ff="#EXT-X-PLAYLIST-TYPE",t.af="#EXT-X-KEY"}(Ct||(Ct={}));var xt,Bt=function(){function t(t,n){this.Av="#EXTINF",this.tv=t,this.nv=n}return t.prototype.Yp=function(){return this.Av+":"+this.tv+",\n"+this.nv},t}(),Mt=function(){function t(t){this.Av="#EXT-X-MAP",this.nv=t}return t.prototype.Yp=function(){return this.Av+':URI="'+this.nv+'"'},t}(),Lt=function(){function t(){this.Av="#EXTM3U"}return t.prototype.Yp=function(){return this.Av},t}(),Ut=function(){function t(t){this.Av="#EXT-X-VERSION",this.Gy=t}return t.prototype.Yp=function(){return this.Av+":"+this.Gy},t}(),Ft=function(){function t(t){this.Av="#EXT-X-TARGETDURATION",this._Rt=t}return t.prototype.Yp=function(){return this.Av+":"+this._Rt},t}(),zt=function(){function t(t){this.Av="#EXT-X-START",this.gPt=t}return t.prototype.Yp=function(){return this.Av+":TIME-OFFSET="+this.gPt},t}(),Wt=function(){function t(t,n,i){this.uri=t,this.keyFormat=n,this.keyFormatVersions=i,this.Av="#EXT-X-KEY"}return t.prototype.Yp=function(){return this.Av+':METHOD=SAMPLE-AES,URI="'+this.uri+'",KEYFORMAT="'+this.keyFormat+'",KEYFORMATVERSIONS="'+this.keyFormatVersions+'"'},t}(),qt=function(){function t(t){this.Av="#EXT-X-STREAM-INF",this.GP=1,this.nv=t}return t.prototype.Yp=function(){return this.Av+":BANDWIDTH="+this.GP+',AUDIO="audio"\n'+this.nv},t}(),Vt=function(){function t(t){this.Av="#EXT-X-MEDIA-SEQUENCE",this.Kb=t}return t.prototype.Yp=function(){return this.Av+":"+this.Kb},t}();!function(t){t.rPt="VOD",t.ev="EVENT"}(xt||(xt={}));var Ht=function(){function t(t){this.Av="#EXT-X-MEDIA",this.nv=t}return t.prototype.Yp=function(){var t=Pt();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.nv+'"');var n=[];return t.forEach((function(t,i){return n.push(i+"="+t)})),this.Av+":"+n.join(",")},t}(),Xt=function(){function t(t){this.bx=[],this.bx=t}var n=t.prototype;return n.OM=function(){return this.bx},n.sv=function(t){this.bx.push(t)},n.FBt=function(){for(var t="",n=0,i=this.OM();n<i.length;n++){t+=i[n].Yp()+"\n"}return t},n.h_=function(){this.bx.length=0},t}(),jt=function(t){function n(n,i){var e;return e=t.call(this,[new Lt,new Ut(8)])||this,i&&e.sv(new qt("video/index.m3u8")),n&&e.sv(new Ht("audio/index.m3u8")),e}return Rt(n,t),n}(Xt);function Yt(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}var Kt=function(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];c.apply(this,n)};(Kt.prototype=v.create(c.prototype)).constructor=Kt;var Gt=function(t){function n(n,i){var e;return(e=t.call(this)||this).message=n||"Unknown error",e.cause=i,c.captureStackTrace&&c.captureStackTrace(Yt(e),e.constructor),e}return Rt(n,t),It(n,[{key:"name",get:function(){return"BaseError"}}]),n}(Kt),$t=function(){function t(){this.n_=!1,this.r_=!1,this.o_=[],this.a_=[]}var n=t.prototype;return n.s_=function(){if(!this.n_&&!this.r_){this.n_=!0;for(var t=0,n=this.o_.slice();t<n.length;t++){(0,n[t])()}this.h_()}},n.h_=function(){if(!this.r_){this.r_=!0;for(var t=0,n=this.a_.slice();t<n.length;t++){(0,n[t])()}mt(this.o_),mt(this.a_)}},n.u_=function(t){this.r_||this.o_.push(t)},n.c_=function(t){this.r_||wt(this.o_,t)},n.l_=function(t){this.r_||this.a_.push(t)},n.d_=function(t){this.r_||wt(this.a_,t)},t}(),Zt=function(){function t(){this.__=new $t}var n=t.prototype;return n.g_=function(){this.__.s_()},n.h_=function(){this.__.h_()},n.w_=function(t){var n=this.__;if(!n.n_)if(t.n_)n.s_();else if(!n.r_&&!t.r_){var i=function(){e(),n.s_()},e=function(){t.c_(i),t.d_(e),n.c_(i),n.d_(e)};t.u_(i),t.l_(e),n.u_(i),n.l_(e)}},n.v_=function(){var n=new t,i=new t,e=n.f_,r=i.f_,o=this.__,u=function(){e.n_&&r.r_||r.n_&&e.r_?o.s_():e.r_&&r.r_&&o.h_()};e.u_(u),r.u_(u),e.l_(u),r.l_(u),n.w_(o),i.w_(o);return o.l_((function(){e.c_(u),r.c_(u),e.d_(u),r.d_(u)})),[n,i]},It(t,[{key:"f_",get:function(){return this.__}}]),t}(),Jt=function(t){function n(n,i){return t.call(this,n||"Aborted",i)}return Rt(n,t),It(n,[{key:"name",get:function(){return"AbortError"}}]),n}(Gt);function Qt(t){return t instanceof c&&"AbortError"===t.name}function tn(t,n){return n?new X((function(i,e){if(n.n_)return t.catch(_t),e(new Jt);var r=function(){n.c_(r),e(new Jt)};n.u_(r),t.then((function(t){n.c_(r),i(t)}),(function(t){n.c_(r),e(t)}))})):t}function nn(t,n){return t.then((function(t){return n.g_(),t}),(function(t){throw n.g_(),t}))}X.resolve();function en(t,n){return new X((function(i,e){if(void 0!==n&&n.n_)e(new Jt);else{var r=pt.A_((function(){void 0!==n&&n.c_(o),i()}),t),o=function(){pt.p_(r),e(new Jt)};void 0!==n&&n.u_(o)}}))}var rn,on=function(){function t(t){var n=this;this.tj=[],this.ij=void 0,this.$O=new Zt,this.ej=function(){return 0===n.tj.length?n.nj?un(n.nj,n.$O.f_).then(n.rj,n.rj):n.rj():n.tj.shift()().then(n.ej)},this.rj=function(){if(0!==n.tj.length)return n.ej();n.ij=void 0},this.nj=t}var n=t.prototype;return n.JO=function(t,n){var i=this;return new X((function(e){var r=new Zt;r.w_(i.$O.f_),n&&r.w_(n);var o=function(){r.h_()};i.tj.push((function(){var n=un(t,r.f_);return e(n),n.then(o,o)})),i.ij||(i.ij=i.ej())}))},n.g_=function(){return this.sj(!0)},n.gn=function(){return this.nj=void 0,this.sj(!1)},n.sj=function(t){var n=this.ij;return this.$O.g_(),t&&(this.$O=new Zt),X.resolve(n)},t}();function un(t,n){return new X((function(i){return i(t(n))}))}!function(t){t.A7="HELLO",t.y7="HI_THERE",t.M7="INITIALIZE",t.b7="APPEND_INIT",t.T7="APPEND_DATA",t.S7="ACK",t.N7="REMOVE",t.I7="DESTROY_SESSION"}(rn||(rn={}));var sn=null;try{sn=new WebAssembly.Instance(new WebAssembly.Module(new g([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(j){}function fn(t,n,i){this.low=0|t,this.high=0|n,this.unsigned=!!i}function hn(t){return!0===(t&&t.iy)}function cn(t){var n=d.clz32(t&-t);return t?31-n:n}fn.prototype.iy,v.defineProperty(fn.prototype,"iy",{value:!0}),fn.isLong=hn;var an={},vn={};function dn(t,n){var i,e,r;return n?(r=0<=(t>>>=0)&&t<256)&&(e=vn[t])?e:(i=wn(t,0,!0),r&&(vn[t]=i),i):(r=-128<=(t|=0)&&t<128)&&(e=an[t])?e:(i=wn(t,t<0?-1:0,!1),r&&(an[t]=i),i)}function ln(t,n){if(b(t))return n?En:Tn;if(n){if(t<0)return En;if(t>=yn)return Nn}else{if(t<=-_n)return Pn;if(t+1>=_n)return On}return t<0?ln(-t,n).neg():wn(t%pn|0,t/pn|0,n)}function wn(t,n,i){return new fn(t,n,i)}fn.fromInt=dn,fn.fromNumber=ln,fn.fromBits=wn;var bn=d.pow;function gn(t,n,i){if(0===t.length)throw c("empty string");if("number"==typeof n?(i=n,n=!1):n=!!n,"NaN"===t||"Infinity"===t||"+Infinity"===t||"-Infinity"===t)return n?En:Tn;if((i=i||10)<2||36<i)throw RangeError("radix");var e;if((e=t.indexOf("-"))>0)throw c("interior hyphen");if(0===e)return gn(t.substring(1),n,i).neg();for(var r=ln(bn(i,8)),o=Tn,u=0;u<t.length;u+=8){var s=d.min(8,t.length-u),f=l(t.substring(u,u+s),i);if(s<8){var h=ln(bn(i,s));o=o.mul(h).add(ln(f))}else o=(o=o.mul(r)).add(ln(f))}return o.unsigned=n,o}function mn(t,n){return"number"==typeof t?ln(t,n):"string"==typeof t?gn(t,n):wn(t.low,t.high,"boolean"==typeof n?n:t.unsigned)}fn.fromString=gn,fn.fromValue=mn;var pn=4294967296,yn=pn*pn,_n=yn/2,Sn=dn(1<<24),Tn=dn(0);fn.ZERO=Tn;var En=dn(0,!0);fn.UZERO=En;var In=dn(1);fn.ONE=In;var kn=dn(1,!0);fn.UONE=kn;var Rn=dn(-1);fn.NEG_ONE=Rn;var On=wn(-1,2147483647,!1);fn.MAX_VALUE=On;var Nn=wn(-1,-1,!0);fn.MAX_UNSIGNED_VALUE=Nn;var Pn=wn(0,-2147483648,!1);fn.MIN_VALUE=Pn;var An=fn.prototype;An.toInt=function(){return this.unsigned?this.low>>>0:this.low},An.toNumber=function(){return this.unsigned?(this.high>>>0)*pn+(this.low>>>0):this.high*pn+(this.low>>>0)},An.toString=function(t){if((t=t||10)<2||36<t)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative()){if(this.eq(Pn)){var n=ln(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=ln(bn(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}},An.getHighBits=function(){return this.high},An.getHighBitsUnsigned=function(){return this.high>>>0},An.getLowBits=function(){return this.low},An.getLowBitsUnsigned=function(){return this.low>>>0},An.getNumBitsAbs=function(){if(this.isNegative())return this.eq(Pn)?64:this.neg().getNumBitsAbs();for(var t=0!=this.high?this.high:this.low,n=31;n>0&&0==(t&1<<n);n--);return 0!=this.high?n+33:n+1},An.isZero=function(){return 0===this.high&&0===this.low},An.eqz=An.isZero,An.isNegative=function(){return!this.unsigned&&this.high<0},An.isPositive=function(){return this.unsigned||this.high>=0},An.isOdd=function(){return 1==(1&this.low)},An.isEven=function(){return 0==(1&this.low)},An.equals=function(t){return hn(t)||(t=mn(t)),(this.unsigned===t.unsigned||this.high>>>31!=1||t.high>>>31!=1)&&(this.high===t.high&&this.low===t.low)},An.eq=An.equals,An.notEquals=function(t){return!this.eq(t)},An.neq=An.notEquals,An.ne=An.notEquals,An.lessThan=function(t){return this.comp(t)<0},An.lt=An.lessThan,An.lessThanOrEqual=function(t){return this.comp(t)<=0},An.lte=An.lessThanOrEqual,An.le=An.lessThanOrEqual,An.greaterThan=function(t){return this.comp(t)>0},An.gt=An.greaterThan,An.greaterThanOrEqual=function(t){return this.comp(t)>=0},An.gte=An.greaterThanOrEqual,An.ge=An.greaterThanOrEqual,An.compare=function(t){if(hn(t)||(t=mn(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},An.comp=An.compare,An.negate=function(){return!this.unsigned&&this.eq(Pn)?Pn:this.not().add(In)},An.neg=An.negate,An.add=function(t){hn(t)||(t=mn(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,wn((c&=65535)<<16|(a&=65535),(f&=65535)<<16|(h&=65535),this.unsigned)},An.subtract=function(t){return hn(t)||(t=mn(t)),this.add(t.neg())},An.sub=An.subtract,An.multiply=function(t){if(this.isZero())return this;if(hn(t)||(t=mn(t)),sn)return wn(sn.mul(this.low,this.high,t.low,t.high),sn.get_high(),this.unsigned);if(t.isZero())return this.unsigned?En:Tn;if(this.eq(Pn))return t.isOdd()?Pn:Tn;if(t.eq(Pn))return this.isOdd()?Pn:Tn;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(Sn)&&t.lt(Sn))return ln(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,wn((a&=65535)<<16|(v&=65535),(h&=65535)<<16|(c&=65535),this.unsigned)},An.mul=An.multiply,An.divide=function(t){if(hn(t)||(t=mn(t)),t.isZero())throw c("division by zero");var n,i,e;if(sn)return this.unsigned||-2147483648!==this.high||-1!==t.low||-1!==t.high?wn((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?En:Tn;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return En;if(t.gt(this.shru(1)))return kn;e=En}else{if(this.eq(Pn))return t.eq(In)||t.eq(Rn)?Pn:t.eq(Pn)?In:(n=this.shr(1).div(t).shl(1)).eq(Tn)?t.isNegative()?In:Rn:(i=this.sub(t.mul(n)),e=n.add(i.div(t)));if(t.eq(Pn))return this.unsigned?En:Tn;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=Tn}for(i=this;i.gte(t);){n=d.max(1,d.floor(i.toNumber()/t.toNumber()));for(var r=d.ceil(d.log(n)/d.LN2),o=r<=48?1:bn(2,r-48),u=ln(n),s=u.mul(t);s.isNegative()||s.gt(i);)s=(u=ln(n-=o,this.unsigned)).mul(t);u.isZero()&&(u=In),e=e.add(u),i=i.sub(s)}return e},An.div=An.divide,An.modulo=function(t){return hn(t)||(t=mn(t)),sn?wn((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))},An.mod=An.modulo,An.rem=An.modulo,An.not=function(){return wn(~this.low,~this.high,this.unsigned)},An.countLeadingZeros=function(){return this.high?d.clz32(this.high):d.clz32(this.low)+32},An.clz=An.countLeadingZeros,An.countTrailingZeros=function(){return this.low?cn(this.low):cn(this.high)+32},An.ctz=An.countTrailingZeros,An.and=function(t){return hn(t)||(t=mn(t)),wn(this.low&t.low,this.high&t.high,this.unsigned)},An.or=function(t){return hn(t)||(t=mn(t)),wn(this.low|t.low,this.high|t.high,this.unsigned)},An.xor=function(t){return hn(t)||(t=mn(t)),wn(this.low^t.low,this.high^t.high,this.unsigned)},An.shiftLeft=function(t){return hn(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?wn(this.low<<t,this.high<<t|this.low>>>32-t,this.unsigned):wn(0,this.low<<t-32,this.unsigned)},An.shl=An.shiftLeft,An.shiftRight=function(t){return hn(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?wn(this.low>>>t|this.high<<32-t,this.high>>t,this.unsigned):wn(this.high>>t-32,this.high>=0?0:-1,this.unsigned)},An.shr=An.shiftRight,An.shiftRightUnsigned=function(t){return hn(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?wn(this.low>>>t|this.high<<32-t,this.high>>>t,this.unsigned):wn(32===t?this.high:this.high>>>t-32,0,this.unsigned)},An.shru=An.shiftRightUnsigned,An.shr_u=An.shiftRightUnsigned,An.rotateLeft=function(t){var n;return hn(t)&&(t=t.toInt()),0==(t&=63)?this:32===t?wn(this.high,this.low,this.unsigned):t<32?(n=32-t,wn(this.low<<t|this.high>>>n,this.high<<t|this.low>>>n,this.unsigned)):(n=32-(t-=32),wn(this.high<<t|this.low>>>n,this.low<<t|this.high>>>n,this.unsigned))},An.rotl=An.rotateLeft,An.rotateRight=function(t){var n;return hn(t)&&(t=t.toInt()),0==(t&=63)?this:32===t?wn(this.high,this.low,this.unsigned):t<32?(n=32-t,wn(this.high<<n|this.low>>>t,this.low<<n|this.high>>>t,this.unsigned)):(n=32-(t-=32),wn(this.low<<n|this.high>>>t,this.high<<n|this.low>>>t,this.unsigned))},An.rotr=An.rotateRight,An.toSigned=function(){return this.unsigned?wn(this.low,this.high,!1):this},An.toUnsigned=function(){return this.unsigned?this:wn(this.low,this.high,!0)},An.toBytes=function(t){return t?this.toBytesLE():this.toBytesBE()},An.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]},An.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]},fn.fromBytes=function(t,n,i){return i?fn.fromBytesLE(t,n):fn.fromBytesBE(t,n)},fn.fromBytesLE=function(t,n){return new fn(t[0]|t[1]<<8|t[2]<<16|t[3]<<24,t[4]|t[5]<<8|t[6]<<16|t[7]<<24,n)},fn.fromBytesBE=function(t,n){return new fn(t[4]<<24|t[5]<<16|t[6]<<8|t[7],t[0]<<24|t[1]<<16|t[2]<<8|t[3],n)};var Dn=fn;function Cn(){return Date.now()||(new Date).getTime()}Dn.fromNumber(vt);var xn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),Bn=16383;function Mn(t,n,i){return xn[t>>2]+xn[(3&t)<<4|n>>4]+xn[(15&n)<<2|i>>6]+xn[63&i]}function Ln(t,n,i){for(var e=[],r=n;r<i;r+=3)e.push(Mn(t[r],t[r+1],t[r+2]));return e.join("")}var Un=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]","[object DataView]"],Fn=ArrayBuffer.isView||function(t){return t&>(Un,ot.call(t))};function zn(t){var n=t.reduce((function(t,n){return t+n.byteLength}),0);return function(t,n){for(var i=new g(n),e=0,r=0;r<t.length;r++){var o=t[r];i.set(o,e),e+=o.byteLength}return i}(t,n)}function Wn(t){return function(t){for(var n=t.length,i=n%3,e=[],r=n-i,o=0;o<r;o+=Bn)e.push(Ln(t,o,d.min(r,o+Bn)));if(1===i){var u=t[n-1];e.push(xn[u>>2]+xn[(3&u)<<4]+"==")}else if(2===i){var s=t[n-2],f=t[n-1];e.push(xn[s>>2]+xn[(3&s)<<4|f>>4]+xn[(15&f)<<2]+"=")}return e.join("")}(new g(t))}var qn=function(){function t(t){void 0===t&&(t=0),this.Zu=t}var n=t.prototype;return n.KA=function(t){this.Zu+=t},n.JA=function(t){this.Zu=t},n.$A=function(){return new t(this.Ku)},It(t,[{key:"Ku",get:function(){return this.Zu}}]),t}();String.prototype.replaceAll;var Vn="function"==typeof String.prototype.startsWith?function(t,n){return ut(t)&&t.startsWith(n)}:function(t,n){return ut(t)&&t.substr(0,n.length)===n},Hn=(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==(1&i)&&(r+=e),0!=(i>>>=1);)e+=e;return r}),Xn=(String.prototype.padStart,String.prototype.padEnd,16384),jn="function"==typeof String.fromCodePoint?function(t){var n;return t.length<=Xn?(n=String).fromCodePoint.apply(n,rt(t)):Kn(t,String.fromCodePoint)}:function(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 Yn(n)};function Yn(t){var n;return t.length<=Xn?(n=String).fromCharCode.apply(n,rt(t)):Kn(t,String.fromCharCode)}function Kn(t,n){for(var i=[],e=0;e<t.length;e+=Xn)i.push(n.apply(void 0,rt(t.slice(e,e+Xn))));return i.join("")}function Gn(t){if(t>=55296&&t<=57343)throw new c("Lone surrogate U+"+t.toString(16).toUpperCase()+" is not a scalar value")}function $n(t,n){return t>>n&63|128}function Zn(t,n){0!=(4294967168&t)?(0==(4294965248&t)?n.push(t>>6&31|192):0==(4294901760&t)?(Gn(t),n.push(t>>12&15|224),n.push($n(t,6))):0==(4292870144&t)&&(n.push(t>>18&7|240),n.push($n(t,12)),n.push($n(t,6))),n.push(63&t|128)):n.push(t)}function Jn(t,n){if(n.Ku>=t.length)throw new c("Invalid byte index");var i=255&t[n.Ku];if(n.KA(1),128==(192&i))return 63&i;throw new c("Invalid continuation byte")}function Qn(t,n){var i=n.Ku;if(i>t.length)throw new c("Invalid byte index");if(i===t.length)return!1;var e=255&t[i];if(n.KA(1),0==(128&e))return e;if(192==(224&e)){var r=(31&e)<<6|Jn(t,n);if(r>=128)return r;throw new c("Invalid continuation byte")}if(224==(240&e)){var o=(15&e)<<12|Jn(t,n)<<6|Jn(t,n);if(o>=2048)return Gn(o),o;throw new c("Invalid continuation byte")}if(240==(248&e)){var u=(7&e)<<18|Jn(t,n)<<12|Jn(t,n)<<6|Jn(t,n);if(u>=65536&&u<=1114111)return u}throw new c("Invalid UTF-8 detected")}var ti=65279;function ni(t,n,i){void 0===i&&(i=!1);var e=t.getUint16(n.Ku,i);return n.KA(2),e}function ii(t,n,i,e){void 0===e&&(e=!1),t.setUint16(n.Ku,i,e),n.KA(2)}function ei(t,n,i,e){void 0===e&&(e=!1),t.setUint32(n.Ku,i,e),n.KA(4)}function ri(t,n,i,e){void 0===e&&(e=!1);for(var r=i.length,o=0;o<r;o+=1){ii(t,n,i.charCodeAt(o),e)}}function oi(t,n){return void 0===n&&(n=!1),function(t,n,i,e){for(var r=[];n.Ku+2<=t.byteLength;){var o=ni(t,n,i);if(e&&!o)break;r.push(o)}return Yn(r)}(fi(t),new di,n,!1)}function ui(t){return function(t){return jn(t)}(function(t,n){var i,e=[],r=new di;if(!n){if(!1===(i=Qn(t,r)))return e;i===ti||e.push(i)}for(;!1!==(i=Qn(t,r));)e.push(i);return e}(hi(t)))}function si(t){return new g(function(t){for(var n=[],i=0;i<t.length;i++)Zn(t[i],n);return n}(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 fi(t){return new DataView(t.buffer,t.byteOffset,t.byteLength)}function hi(t){return new g(t.buffer,t.byteOffset,t.byteLength)}function ci(t){return t instanceof ArrayBuffer?new g(t):hi(t)}function ai(t){if(t.slice)return t.slice(0);var n=new g(t.byteLength);return n.set(t,0),n}var vi,di=function(){function t(t){void 0===t&&(t=0),this.Zu=t}var n=t.prototype;return n.KA=function(t){this.Zu+=t},n.JA=function(t){this.Zu=t},n.$A=function(){return new t(this.Ku)},n.oy=function(){return new qn(this.Ku<<3)},It(t,[{key:"Ku",get:function(){return this.Zu}}]),t}(),li=new Array(256);for(vi=0;vi<256;vi+=1)li[vi]=(vi<16?"0":"")+vi.toString(16);function wi(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var n=16*d.random()|0;return("x"===t?n:3&n|8).toString(16)}))}function bi(t,n,i){if("function"==typeof i)i.call(t,n);else for(var e=0;e<i.length;e++){i[e].call(t,n)}}var gi=function(){function t(t){var n=this;this.M_=Nt(),this.S_=void 0,this.b_=0,this.Ds=function(t){n.Co(t)},this.N_=null!=t?t:this}var n=t.prototype;return n.yn=function(t,n){if("function"==typeof n)if("string"==typeof t)this.y_(t,n);else for(var i=0;i<t.length;i++){var e=t[i];this.y_(e,n)}},n.y_=function(t,n){var i=this.M_[t];void 0===i?this.M_[t]=n:"function"==typeof i?this.M_[t]=[i,n]:0===this.b_?i.push(n):this.M_[t]=i.concat(n)},n.T_=function(t){if("function"==typeof t){var n=this.S_;void 0===n?this.S_=t:"function"==typeof n?this.S_=[n,t]:0===this.b_?n.push(t):this.S_=n.concat(t)}},n.Vo=function(){this.M_=Nt(),this.S_=void 0},n.Co=function(t){this.b_++;var n=this.M_[t.type],i=this.S_;void 0!==n&&bi(this.N_,t,n),void 0!==i&&bi(this.N_,t,i),this.b_--},n.fn=function(t,n){if("function"==typeof n)if("string"==typeof t)this.I_(t,n);else for(var i=0;i<t.length;i++){var e=t[i];this.I_(e,n)}},n.I_=function(t,n){var i=this.M_[t];void 0!==i&&("function"==typeof i?i===n&&(this.M_[t]=void 0):0===this.b_?wt(i,n):this.M_[t]=bt(i,n))},n.D_=function(t){if("string"==typeof t)this.M_[t]=void 0;else for(var n=0;n<t.length;n++){var i=t[n];this.M_[i]=void 0}},n.E_=function(t){var n=this.S_;void 0!==n&&("function"==typeof n?n===t&&(this.S_=void 0):0===this.b_?wt(n,t):this.S_=bt(n,t))},n.k_=function(t,n){var i=this;return new X((function(e,r){if(n&&n.n_)return r(new Jt);var o=function(t){s(),e(t)},u=function(){s(),r(new Jt)},s=function(){i.fn(t,o),n&&n.c_(u)};i.yn(t,o),n&&n.u_(u)}))},t}(),mi=function(t,n){void 0===n&&(n=new Date),this.type=t,this.date=n},pi=function(t){function n(n){var i;return(i=t.call(this,"append")||this).ly=n,i}return Rt(n,t),n}(mi),yi=function(t){function n(){var n;return(n=t.apply(this,arguments)||this).YNt=0,n.Fx=new g(0),n.qL=!1,n.cv=!1,n}Rt(n,t);var i=n.prototype;return i.W$=function(t,n){this.YNt+=n,this.Fx=zn([this.Fx,t]),this.Co(new pi(t))},i.Ws=function(){this.JC||(this.Co(new mi("close")),this.qL=!0)},It(n,[{key:"O_",get:function(){return this.YNt}},{key:"ly",get:function(){return this.Fx}},{key:"JC",get:function(){return this.qL}},{key:"av",get:function(){return this.cv},set:function(t){this.cv=t}}]),n}(gi),_i="sync-seg-",Si=function(){function t(t,n){this.dv=!1,this.lv=!1,this.o=_i+wi(),this.wv=n?new yi:void 0,this.gv=t?new yi:void 0}return t.prototype.Ws=function(){this.wv&&this.wv.Ws(),this.gv&&this.gv.Ws()},It(t,[{key:"kv",get:function(){return this.dv},set:function(t){this.dv=t}},{key:"jv",get:function(){return this.lv},set:function(t){this.lv=t}}]),t}(),Ti=1.1,Ei=function(t){function n(n,i,e){var r;return(r=t.call(this,[new Lt,new Ut(8),new Ft(1),new zt(0)])||this).Ad=[],r.hyt=Pt(),r.tw=0,r.rw=function(t){if(t.IS>=vt)for(;r.Ad.length>0;)r.sw()},e&&r.sv(new Wt(e,"com.apple.streamingkeydelivery","1")),r.xat=n,r.Lrt=i,r.Lrt.yn("remove",r.rw),r.bw=new Vt(0),r.sv(r.bw),r}Rt(n,t);var i=n.prototype;return i.CEt=function(){return this.xat===Tt.VA?this.Lrt.kw:this.xat===Tt.WA?this.Lrt.tb:void 0},i.Iat=function(t){return this.hyt.get(t)},i.h_=function(){this.Ad.length=0,this.bw.Kb=0,this.hyt.clear(),this.tw=0},i.OM=function(){return this.nb(),rt(t.prototype.OM.call(this)).concat(rt(this.Ad))},i.nb=function(){for(var t=this.Lrt.cb(),n=0;n<t.length;n++){var i=t[n];if(!this.hyt.has(i.o)){var e=void 0;if(this.xat===Tt.VA?(e=i.wv,i.jv=!0):(e=i.gv,i.kv=!0),!e)return;this.hyt.set(i.o,e),e.av&&this.Ad.push(new Mt(i.o+"-init")),this.Ad.push(new Bt(Ti,i.o)),this.tw+=Ti}}this.ab()},i.ab=function(){for(;this.tw>60;)this.sw()},i.sw=function(){var t=this.Ad.shift();void 0!==t&&function(t){return t.Av===Ct.PD}(t)&&(this.hyt.delete(t.nv),this.tw-=t.tv,this.bw.Kb++)},n}(Xt);var Ii=function(t){function n(n){var i;return(i=t.call(this,"remove")||this).IS=n,i}return Rt(n,t),n}(mi),ki=function(t){function n(n,i){var e;return(e=t.call(this)||this).lb=n,e.tg=i,e.ng=[],e.ig=[],e.ug=Pt(),e.sg=Pt(),e.lg=Pt(),e.bg=0,e}Rt(n,t);var i=n.prototype;return i.cb=function(){return this.mg?(this.ng=this.ng.filter((function(t){return!(t.jv&&t.kv)})),rt(this.ng).concat([this.mg],rt(this.ig))):[]},i.Z$=function(t){this.kg(t)},i.W$=function(t){this.kg(t),this.tm(t),this.rm(t)},i.uS=function(t){this.kg(t),this.rm(t)},i.h_=function(){var t;null==(t=this.mg)||t.Ws(),this.mg=void 0,this.ig.forEach((function(t){return t.Ws()})),this.ig.length=0,this.ng.length=0,this.lg=Pt(),this.bg=0},i.tm=function(t){var n=t.startPts,i=t.totalDuration;this.sg.set(t.mediaType,n+i)},i.om=function(){if(this.mg){this.mg.Ws(),this.ng.push(this.mg);var t=this.ig.shift(),n=new Si(this.lb,this.tg);t?(this.mg=t,this.ig.push(n)):this.mg=n}},i.sm=function(t){if(this.mg){var n=!this.mg.gv||0===this.mg.gv.O_,i=!this.mg.wv||0===this.mg.wv.O_,e=this.mg.gv&&this.mg.gv.av,r=this.mg.wv&&this.mg.wv.av,o=i&&(n&&!(this.mg.kv||this.mg.jv)||e),u=n&&(i&&!(this.mg.kv||this.mg.jv)||r);(t===Tt.WA&&!u||t===Tt.VA&&!o)&&(this.om(),this.om())}},i.kg=function(t){var n=t.mediaType,i=t.kind,e=this.ug.get(n);if(void 0===e){if(i===rn.b7||i===rn.T7){var r=[t];this.ug.set(n,r)}}else e.push(t)},i.rm=function(t){var n=this.am(t);for(var i=0;i<n.length;i++){var e=n[i];switch(e.kind){case rn.b7:this.bm(e),this.lg=Pt(),this.bg=0;break;case rn.N7:this.km(e);break;case rn.T7:this.ip(e)}}},i.bm=function(t){var n=t.mediaType;void 0===this.mg?(this.mg=new Si(this.lb,this.tg),this.ig.push(new Si(this.lb,this.tg))):this.sm(n),n===Tt.VA?(this.up=t.segment,this.mg.wv.av=!0):n===Tt.WA&&(this.ty=t.segment,this.mg.gv.av=!0)},i.ip=function(t){var n,i,e=t.mediaType===Tt.WA,r=t.totalDuration,o=null!=(n=this.lg.get(t.mediaType))?n:0;e?(this.mg.gv.W$(t.segment,r),i=o+this.mg.gv.O_):(this.mg.wv.W$(t.segment,r),i=o+this.mg.wv.O_),i>=this.bg+Ti&&(this.lg.set(t.mediaType,i),this.bg+=Ti,this.om())},i.km=function(t){this.sg.set(t.mediaType,void 0),this.sm(t.mediaType),this.ng.length=0,this.Co(new Ii(t.endTime))},i.am=function(t){var n=this;if(t.kind===rn.N7)return this.ny(t);var i=[];return this.ug.forEach((function(t){if(t&&t.length>0){var e=dt(t,(function(t){return t.kind===rn.N7}));-1===e&&(e=t.length);for(var r=t.slice(0,e),o=0;o<r.length;o++){var u=r[o];if(!gt(i,u)){var s,f=n.ny(u);if(f.length>0)(s=i).push.apply(s,rt(f));else if(u.kind===rn.T7)break}}}})),i},i.ny=function(t){var n=this.ug.get(t.mediaType),i=function(t){return t===Tt.VA?Tt.WA:Tt.VA}(t.mediaType);if(!(i===Tt.VA?this.tg:this.lb))return n.splice(0,n.indexOf(t)+1);if(t.kind===rn.b7)return[];var e=this.sg.get(i);if(void 0===e)return[];if(t.kind===rn.N7){var r=this.hy(i);if(r.length>0){var o=n.splice(0,n.indexOf(t));return n.splice(0,1),rt(o).concat(rt(r),[t])}return[]}if(t.startPts<=e){var u=n.splice(0,n.indexOf(t));n.splice(0,1);var s=this.by(t,u,i);return rt(u).concat(rt(s),[t])}return[]},i.by=function(t,n,i){var e=this.ug.get(i);if(!e)return[];var r=t.startPts+t.totalDuration,o=dt(e,(function(t){return t.kind===rn.N7})),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===rn.T7&&h.startPts>r&&(s=f)}var c=-1;return-1!==dt(n,(function(t){return t.kind===rn.b7}))&&(c=dt(e,(function(t){return t.kind===rn.b7}))),c>s&&(s=c+1),s>0?(e[s-1].kind===rn.b7&&(s-=1),e.splice(0,s)):[]},i.hy=function(t){var n=this.ug.get(t);if(n){var i=dt(n,(function(t){return t.kind===rn.N7}));if(i>=0)return n.splice(0,i+1)}return[]},i.my=function(){var t="[MEDIABUFFER] endPTS: ";this.sg.forEach((function(n,i){t=t.concat(i+" = "+n+" ")})),pt.Wet(t)},i.ky=function(t,n){var i=t+": [";null==n||n.forEach((function(t){i=i.concat(" "+t.kind+"("+t.mediaType+")")})),i=i.concat(" ]"),pt.Wet(i)},It(n,[{key:"tb",get:function(){var t;return null==(t=this.ty)?void 0:t.slice()}},{key:"kw",get:function(){var t;return null==(t=this.up)?void 0:t.slice()}}]),n}(gi);var Ri=function(){function t(t,n){var i=t.some((function(t){return t.match("audio")})),e=t.some((function(t){return t.match("video")}));this.OS=new ki(i,e),this.AS=new jt(i,e),i&&(this.BS=new Ei(Tt.WA,this.OS,n)),e&&(this.RT=new Ei(Tt.VA,this.OS,n))}var n=t.prototype;return n.IE=function(t){var n,i,e=Oi(t);return e===Tt.VA?null==(n=this.RT)?void 0:n.CEt():e===Tt.WA?null==(i=this.BS)?void 0:i.CEt():void 0},n.Iat=function(t){var n,i,e=t.split("/")[1],r=Oi(t);return r===Tt.VA?null==(n=this.RT)?void 0:n.Iat(e):r===Tt.WA?null==(i=this.BS)?void 0:i.Iat(e):void 0},n.Z$=function(t){this.OS.Z$(t)},n.W$=function(t){this.OS.W$(t)},n.nlt=function(t){this.OS.uS(t)},n.h_=function(){var t,n;this.OS.h_(),this.AS.h_(),null==(t=this.BS)||t.h_(),null==(n=this.RT)||n.h_()},It(t,[{key:"ME",get:function(){return this.AS}},{key:"tk",get:function(){return this.BS}},{key:"ik",get:function(){return this.RT}}]),t}();function Oi(t){return t.match(/video/)?Tt.VA:Tt.WA}var Ni,Pi=function(){function t(t,n){this.uk=t,this.sk=n,this.sut=void 0;var i=this;this.$Wt=tt((function(t){var n,e;return nt(this,(function(r){switch((n=t.data).kind){case rn.M7:i.sut=new Ri(n.mediaBufferConfigs,n.fairPlaySdkUri);break;case rn.b7:i.sut.Z$(n);break;case rn.T7:i.sut.W$(n);break;case rn.N7:i.sut.nlt(n)}return e={kind:rn.S7},i.uk.postMessage(e),[2]}))})),this.uk.onmessage=this.$Wt}var n=t.prototype;return n.FBt=function(t){return"master.m3u8"===t?this.sut.ME:"video/index.m3u8"===t?this.sut.ik:"audio/index.m3u8"===t?this.sut.tk:void 0},n.ak=function(t){if(t.match(/m3u8/)){var n,i=null==(n=this.FBt(t))?void 0:n.FBt();return new Response(i,{headers:{"Content-Type":"application/x-mpegurl; charset=utf-8"}})}if(t.match(_i)){var e={"Content-Type":t.match(/video/)?"video/mp4":"audio/mp4"};if(t.match(/init/)){var r,o=null==(r=this.sut)?void 0:r.IE(t);return new Response(o,{headers:e})}var u=this.Sat(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.ly)},e=function(){n.close(),t.fn("append",i),t.fn("close",e)};return new self.ReadableStream({start:function(r){(n=r).enqueue(t.ly),t.JC?n.close():(t.yn("append",i),t.yn("close",e))},cancel:function(){t.fn("append",i),t.fn("close",e)}})}(u);return new Response(s,{headers:e})}return new Response(void 0,{status:404,statusText:"Not Found"})},n.Sat=function(t){return this.sut.Iat(t)},n.close=function(){var t;this.uk.close(),null==(t=this.sut)||t.h_()},t}(),Ai=function(){function t(){var t=this;this.x3=Pt(),this.$Wt=function(n){var i=n.data;if(i.kind===rn.A7){t.mk().catch(_t);var e=i.port,r=wi(),o=new Pi(e,n.source.id);t.x3.set(r,o);var u=function(n){n.data.kind===rn.I7&&(t.kk(r),e.removeEventListener("message",u))};e.addEventListener("message",u);var s={kind:rn.y7,sessionId:r};e.postMessage(s)}},this.TR=function(n){if(Vn(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.x3.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.ak(r);n.respondWith(f)}}}var n=t.prototype;return n.ur=function(t){this.kWt=t,t.addEventListener("message",this.$Wt),t.addEventListener("fetch",this.TR)},n.kk=function(t){var n=this.x3.get(t);n&&n.close(),this.x3.delete(t)},n.mk=function(){var t=this;return tt((function(){var n,i;return nt(this,(function(e){switch(e.label){case 0:return[4,t.kWt.clients.matchAll()];case 1:return n=e.sent(),i=n.map((function(t){return t.id})),t.x3.forEach((function(n,e){gt(i,n.sk)||t.kk(e)})),[2]}}))}))()},t}();Ai.CR=new Ai,function(t){t.pE="web",t.AE="android",t.yE="android-tv",t.bE="ios",t.TE="tvos",t.SE="chromecast",t.NE="theoliveweb"}(Ni||(Ni={}));var Di=o?o.userAgent:"",Ci=Di.match(/chrome\/([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)/i),xi=Di.match(/Edg\/([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)/i),Bi=Di.match(/Android ([0-9\.]+)/i),Mi=Di.match(/Windows NT ([0-9\.]+)/i),Li=Di.match(/(Version)\/((\d+)\.(\d+)(?:\.(\d+))?).*Safari/),Ui=Di.match(/Firefox\/([0-9\.]+)/i),Fi=Di.match(/OPR\/(\d+\.\d+)/i),zi=Di.match(/Tizen ([0-9\.]+)/i),Wi=Di.match(/(iPhone OS|iPad OS|iPod OS|Mac OS X) (\d+)_(\d+)_?(\d+)?/),qi=function(){function t(){this.DE=Boolean("ontouchstart"in self||self.DocumentTouch&&r instanceof self.DocumentTouch||o&&o.msMaxTouchPoints),this.kE=/(mac\sos\sx)\s?([\w\s\.]+\w)*/i.test(Di)||/(macintosh|mac(?=_powerpc)\s)/i.test(Di),this.xE=/Windows NT/i.test(Di),this.OE=Mi?w(Mi[1]):0,this.RE=/Android/i.test(Di),this.zE=Bi?w(Bi[1]):0,this.UE=/windows phone (8|8\.1)/i.test(Di),this.FE=/iPhone/i.test(Di),this.GE=/iPad/i.test(Di),this.WE=this.kE&&this.DE&&!this.GE,this.XE=/iPod/i.test(Di),this.nk=/Mobile Safari/i.test(Di),this.$E=/EOS\d*STB/i.test(Di),this.ek=/APP\d*STB/i.test(Di),this.ZE=(this.FE||this.GE||this.WE||this.XE)&&!this.UE,this.KE=Wi?w(Wi[2]):0,this.rk=this.UE||this.ZE||this.RE||this.nk,this.ck=/CriOS/i.test(Di),this.dk=Boolean(self.chrome&&/google/i.test(o.vendor))||this.ck,this.vk=this.dk&&/Edg\//i.test(o.userAgent),this.Ak=xi?l(xi[1],10):0,this._L=Boolean(self.chrome||/Chrome/i.test(Di)||/CriOS/i.test(Di)),this.gk=Ci?l(Ci[1],10):0,this.Mk=/SMART-TV.*Tizen/i.test(Di),this.Tk=zi?w(zi[1]):0,this._k=this.Tk>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.Tk):void 0,this.Nk=/webos|web0s/i.test(Di),this.Dk=/VIZIO/i.test(Di),this.Lk=/Edge\/\d+/i.test(Di),this.Ck=/Trident/i.test(Di),this.jk=this.Ck&&!self.ActiveXObject&&"ActiveXObject"in self,this.Pk=/Vivaldi/i.test(Di),this.Bk=/Firefox/i.test(Di)&&!/Seamonkey/i.test(Di),this.Qk=Ui?w(Ui[1]):0,this.Yk=/Safari/i.test(Di)&&!/Chrome/i.test(Di)&&!this.UE&&!this.Mk,this.Vk=Li?w(Li[2]):0,this.Hk=Boolean(Fi),this.Zk=Fi?w(Fi[1]):0,this.Kk=/CrKey/.test(Di),this.$k=/\b(tv|smart-tv|smarttv|appletv|crkey|googletv|hbbtv|pov_tv|roku|viera|nettv|philipstv|vizio)\b/i.test(Di),this.eL="web"===Ni.yE,this.nL="web"===Ni.AE,this.oL=this.nL||this.eL,this.aL="web"===Ni.bE,this.cL="web"===Ni.TE,this.dL="web"===Ni.SE}return It(t,[{key:"Je",get:function(){return this.DE}},{key:"EE",get:function(){return this.kE}},{key:"LE",get:function(){return this.xE}},{key:"CE",get:function(){return this.OE}},{key:"jE",get:function(){return this.RE}},{key:"PE",get:function(){return this.zE}},{key:"BE",get:function(){return this.UE}},{key:"QE",get:function(){return this.FE}},{key:"YE",get:function(){return this.GE}},{key:"VE",get:function(){return this.WE}},{key:"HE",get:function(){return this.XE}},{key:"Ga",get:function(){return this.ZE}},{key:"qE",get:function(){return this.KE}},{key:"JE",get:function(){return this.$E||this.ek}},{key:"td",get:function(){return this.nk}},{key:"Qs",get:function(){return this.rk}},{key:"hk",get:function(){return this.ck}},{key:"lk",get:function(){return this.dk}},{key:"fk",get:function(){var t;return null!=(t=this._k)?t:this.gk}},{key:"wk",get:function(){return this.vk}},{key:"pk",get:function(){return this.Ak}},{key:"yk",get:function(){return this.Mk}},{key:"bk",get:function(){return this.Tk}},{key:"Sk",get:function(){return this.Nk}},{key:"Ik",get:function(){return this.Dk}},{key:"Ek",get:function(){return this.Lk}},{key:"xk",get:function(){return this.Ck}},{key:"Ok",get:function(){return this.jk}},{key:"Rk",get:function(){return this.Pk}},{key:"zk",get:function(){return this.Bk}},{key:"Uk",get:function(){return this.Qk}},{key:"Fk",get:function(){return this.Yk}},{key:"Gk",get:function(){return this.Vk}},{key:"Wk",get:function(){return this.Hk}},{key:"Xk",get:function(){return this.Zk}},{key:"qk",get:function(){return this.Kk}},{key:"Jk",get:function(){return this.$k}},{key:"tL",get:function(){return!(!this.Sk&&!this.yk)&&this.fk<=56}},{key:"iL",get:function(){return this.eL}},{key:"sL",get:function(){return this.nL}},{key:"rL",get:function(){return this.oL}},{key:"hL",get:function(){return this.aL}},{key:"uL",get:function(){return this.cL}},{key:"lL",get:function(){return this.dL}},{key:"fL",get:function(){return this._L}}]),t}();qi.gL=new qi;var Vi=qi.gL,Hi=!(Vi.xk&&!Vi.Ok),Xi=self.console;function ji(t){if(ft(t))try{return JSON.stringify(t)}catch(t){}return t}function Yi(t){return t.map(ji).join(" ")}function Ki(t){var n=Xi&&Xi[t];return n?n.bind&&Hi?n.bind(Xi):function(){for(var n=arguments.length,i=new Array(n),e=0;e<n;e++)i[e]=arguments[e];Xi[t](Yi(i))}:void 0}var Gi=Ki("log")||_t,$i=Ki("warn")||Gi.bind(void 0,"WARNING:"),Zi=Ki("error")||Gi.bind(void 0,"ERROR:"),Ji=function(){var t=Xi&&Xi.assert;return t?t.bind&&Hi?t.bind(Xi):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];Xi.assert(t,Yi(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||Zi.apply(void 0,["Assertion failed:"].concat(rt(i)))}}();function Qi(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),v.defineProperty(t,e.key,e)}}function te(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){ne(t,n,r,e);var o=t;t=e,e=o}return t}(t,n);return i!==t&&ne(i,null,t.length,t),t}function ne(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++]}}var ie=/[a-zA-Z]/,ee=/[0-9]/,re=/[0-9a-fA-F]/,oe=/^0x/i,ue=/^[0-9]+$/,se=/^[0-9a-fA-F]+$/,fe=/^[0-7]+$/,he=v.prototype.toString,ce=Array.isArray||function(t){return"[object Array]"===he.call(t)},ae=void 0!==n&&"symbol"==typeof n.iterator;function ve(t){return ce(t)?t:Array.from(t)}function de(t,n,i){var e=t[n];t[n]=t[i],t[i]=e}function le(t){return t>=65&&t<=90}function we(t){return le(t)||function(t){return t>=97&&t<=122}(t)}function be(t){return t>=48&&t<=57}function ge(t){return be(t)||we(t)}function me(t){return be(t)||t>=65&&t<=70||t>=97&&t<=102}function pe(t){return le(t)?t+32:t}function ye(t){return be(t)?t-48:t>=65&&t<=70?t-65+10:t>=97&&t<=102?t-97+10:-1}function _e(t,n){return void 0===n&&(n=!1),0<=t&&t<=9?t+48:10<=t&&t<=15?t+(n?87:55):-1}var Se=d.min,Te=String.fromCharCode,Ee=16384;function Ie(t){for(var n=t.length,i=[],e=0;e<n;e+=Ee){var r=Se(e+Ee,n);i.push(Te.apply(null,t.slice(e,r)))}return i.join("")}var ke=2147483647,Re=/[^\0-\x7E]/,Oe=/[\x2E\u3002\uFF0E\uFF61]/g,Ne={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},Pe=d.floor,Ae=String.fromCharCode;function De(t){throw new RangeError(Ne[t])}function Ce(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 xe,Be,Me,Le=function(t,n){return t+22+75*(t<26)-((0!=n)<<5)},Ue=function(t,n,i){var e=0;for(t=i?Pe(t/700):t>>1,t+=Pe(t/n);t>455;e+=36)t=Pe(t/35);return Pe(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(Oe,".")).split("."),n).join(".");return e+r}(t,(function(t){return Re.test(t)?"xn--"+function(t){for(var n=[],i=(t=Ce(t)).length,e=128,r=0,o=72,u=0,s=t;u<s.length;u++){var f=s[u];f<128&&n.push(Ae(f))}var h=n.length,c=h;for(h&&n.push("-");c<i;){for(var a=ke,v=0,d=t;v<d.length;v++){var l=d[v];l>=e&&l<a&&(a=l)}var w=c+1;a-e>Pe((ke-r)/w)&&De("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>ke&&De("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(Ae(Le(_+S%T,0))),p=Pe(S/T)}n.push(Ae(Le(p,0))),o=Ue(r,w,c==h),r=0,++c}}++r,++e}return n.join("")}(t):t}))};function ze(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 Ie(n)}function We(t){if(t>=55296&&t<=57343)throw new c("Lone surrogate U+"+t.toString(16).toUpperCase()+" is not a scalar value")}function qe(t,n){return t>>n&63|128}function Ve(t,n){0!=(4294967168&t)?(0==(4294965248&t)?n.push(t>>6&31|192):0==(4294901760&t)?(We(t),n.push(t>>12&15|224),n.push(qe(t,6))):0==(4292870144&t)&&(n.push(t>>18&7|240),n.push(qe(t,12)),n.push(qe(t,6))),n.push(63&t|128)):n.push(t)}function He(t){for(var n=[],i=0;i<t.length;i++){Ve(t[i],n)}return n}function Xe(){if(Me>=Be)throw new c("Invalid byte index");var t=255&xe[Me];if(Me++,128==(192&t))return 63&t;throw new c("Invalid continuation byte")}function je(){var t,n;if(Me>Be)throw new c("Invalid byte index");if(Me===Be)return!1;if(t=255&xe[Me],Me++,0==(128&t))return t;if(192==(224&t)){if((n=(31&t)<<6|Xe())>=128)return n;throw new c("Invalid continuation byte")}if(224==(240&t)){if((n=(15&t)<<12|Xe()<<6|Xe())>=2048)return We(n),n;throw new c("Invalid continuation byte")}if(240==(248&t)&&(n=(7&t)<<18|Xe()<<12|Xe()<<6|Xe())>=65536&&n<=1114111)return n;throw new c("Invalid UTF-8 detected")}function Ye(t){return[37,_e(t>>4),_e(15&t)]}function Ke(t){return function(t){return t>=0&&t<=31}(t)||t>126}function Ge(t){return Ke(t)||32===t||34===t||60===t||62===t||96===t}function $e(t){return Ge(t)||35===t||63===t||123===t||125===t}function Ze(t){return $e(t)||47===t||58===t||59===t||61===t||64===t||t>=91&&t<=94||124===t}function Je(t){return t<33||t>126||34===t||35===t||60===t||62===t}function Qe(t){return Je(t)||39===t}function tr(t,n){if(!n(t))return[t];for(var i=He([t]),e=[],r=0;r<i.length;r++){var o=i[r];e.push.apply(e,Ye(o))}return e}function nr(t,n){for(var i=[],e=0,r=Ce(t);e<r.length;e++){var o=r[e];i.push.apply(i,tr(o,n))}return ze(i)}function ir(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&&me(t[e+1])&&me(t[e+2])){var o=ye(t[e+1])<<4|ye(t[e+2]);n.push(o),e+=2}else n.push(r)}return n}(He(t))}function er(t){return ze(function(t){xe=t.slice(),Be=xe.length,Me=0;for(var n,i=[];!1!==(n=je());)i.push(n);return i}(ir(Ce(t))))}function rr(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 a;o+=2,r=e+=1}for(;o<n;){if(8===e)throw new a("Too many groups");if(":"!==t[o]){for(var u=0,s=0;s<4&&o<n&&re.test(t[o]);)u=u<<4|l(t[o],16),o+=1,s+=1;if("."===t[o]){if(0===s)throw new a;if(o-=s,e>6)throw new a;for(var f=0;o<n;){var h=null;if(f>0){if(!("."===t[o]&&f<4))throw new a;o+=1}if(!ee.test(t[o]))throw new a;for(;o<n&&ee.test(t[o]);){var c=l(t[o],10);if(null===h)h=c;else{if(0===h)throw new a;if((h=10*h+c)>255)throw new a}o+=1}i[e]=i[e]<<8|h,2!==(f+=1)&&4!==f||(e+=1)}if(4!==f)throw new a;break}if(":"===t[o]){if((o+=1)===n)throw new a}else if(o<n)throw new a;i[e]=u,e+=1}else{if(null!==r)throw new a("Too many :: groups");o+=1,r=e+=1}}if(null!==r){var v=e-r;for(e=7;0!==e&&v>0;)de(i,e,r+v-1),e-=1,v-=1}else if(8!==e)throw new a;return i}function or(t){var n=10,i=ue;return oe.test(t)?(t=t.slice(2),n=16,i=se):t.length>=2&&"0"===t[0]&&(t=t.slice(1),n=8,i=fe),""===t?0:i.test(t)?l(t,n):void 0}var ur={B2:4},sr=/[\0\t\n\r #%/:?@\[\\\]]/,fr=/[\0\t\n\r #/:?@\[\\\]]/;function hr(t,n){if("["===t[0]){if("]"!==t[t.length-1])throw new a("Invalid IPv6 address");return{B2:2,met:rr(t.slice(1,-1))}}if(!n)return function(t){if(fr.test(t))throw new a("Invalid code point in opaque host");var n=nr(t,Ke);return""===n?ur:{B2:3,Fx:n}}(t);var i=function(t){var n=function(t){return Fe(t.toLowerCase())}(t);return n}(er(t));if(sr.test(i))throw new a("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=or(r);if(void 0===o)return;i.push(o)}for(var u=0;u<i.length-1;u++)if(i[u]>255)throw new a;if(i[i.length-1]>=d.pow(256,5-i.length))throw new a;for(var s=i.pop(),f=0;f<i.length;f++)s+=i[f]*d.pow(256,3-f);return s}}(i);return void 0!==e?{B2:1,met:e}:""===i?ur:{B2:0,pet:i}}function cr(t){switch(t.B2){case 0:return t.pet;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.met);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.met)+"]";case 3:return t.Fx;case 4:return""}}var ar=/\+/g;function vr(t){return 42===t||45===t||46===t||95===t||ge(t)}function dr(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(ar," "),s=s.replace(ar," ");var f=er(u),h=er(s);i.push([f,h])}}return i}function lr(t){for(var n="",i=0;i<t.length;i++){var e=t[i];i>0&&(n+="&"),n+=wr(He(Ce(e[0])))+"="+wr(He(Ce(e[1])))}return n}function wr(t){for(var n=[],i=0;i<t.length;i++){var e=t[i];32===e?n.push(43):vr(e)?n.push(e):n.push.apply(n,Ye(e))}return Ie(n)}var br=/(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])/;function gr(t){var n=""+t,i=br.exec(n);return i?function(t,n){for(var i=t.length,e=[],r=n;r<i;r++){var o=t.charCodeAt(r);if(pr(o))if(yr(o)||r===i-1)e.push(mr);else{var u=t.charCodeAt(r+1);yr(u)?(e.push(o,u),r++):e.push(mr)}else e.push(o)}return t.slice(0,n)+Ie(e)}(n,i.index):n}var mr=65533,pr=function(t){return 55296==(63488&t)},yr=function(t){return 0!=(1024&t)};function _r(t,n){var i=t[0],e=n[0];return i===e?0:i<e?-1:1}function Sr(t){t.pf.length=0}function Tr(t,n){!function(t,n){for(var i=0;i<n.length;i++)t[i]=n[i];t.length=n.length}(t.pf,dr(n))}function Er(t){if(t.Ju){var n=lr(t.pf);""===n&&(n=null),t.Ju.Ju.Aet=n}}var Ir=function(){function t(t){if(void 0===t&&(t=void 0),this.Ju=null,null==t)this.pf=[];else if("object"==typeof t||"function"==typeof t)if(function(t){return t instanceof Ir&&!!ce(t.pf)&&(!ae||t[n.iterator]===kr)}(t))this.pf=t.pf.slice();else if(function(t){return null!=t&&(!!ce(t)||!!ae&&"function"==typeof t[n.iterator])}(t)){this.pf=[];for(var i=0,e=ve(t);i<e.length;i++){var r=ve(e[i]);if(2!==r.length)throw new a("Invalid name-value pair");this.pf.push([gr(r[0]),gr(r[1])])}}else for(var o in this.pf=[],t)v.prototype.hasOwnProperty.call(t,o)&&this.pf.push([gr(o),gr(t[o])]);else(t=gr(t)).length>0&&"?"===t[0]&&(t=t.slice(1)),this.pf=dr(t)}var i=t.prototype;return i.append=function(t,n){t=gr(t),n=gr(n),this.pf.push([t,n]),Er(this)},i.delete=function(t){t=gr(t);for(var n=this.pf,i=0;i<n.length;){n[i][0]===t?n.splice(i,1):i++}Er(this)},i.get=function(t){t=gr(t);for(var n=this.pf,i=0;i<n.length;i++){var e=n[i];if(e[0]===t)return e[1]}return null},i.getAll=function(t){t=gr(t);for(var n=this.pf,i=[],e=0;e<n.length;e++){var r=n[e];r[0]===t&&i.push(r[1])}return i},i.has=function(t){t=gr(t);for(var n=this.pf,i=0;i<n.length;i++){if(n[i][0]===t)return!0}return!1},i.set=function(t,n){t=gr(t),n=gr(n);for(var i=this.pf,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]),Er(this)},i.sort=function(){te(this.pf,_r),Er(this)},i.toString=function(){return lr(this.pf)},i.entries=function(){return new Pr(this.pf,Rr)},i.keys=function(){return new Pr(this.pf,Or)},i.values=function(){return new Pr(this.pf,Nr)},i.forEach=function(t){var n=this;this.pf.forEach((function(i){return t(i[1],i[0],n)}))},t}(),kr=Ir.prototype.entries;ae&&(Ir.prototype[n.iterator]=kr);var Rr=function(t){return[t[0],t[1]]},Or=function(t){return t[0]},Nr=function(t){return t[1]},Pr=function(){function t(t,n){this.yet=0,this.pf=t,this.Met=n}return t.prototype.next=function(){return this.yet<this.pf.length?{done:!1,value:this.Met(this.pf[this.yet++])}:{done:!0,value:void 0}},t}(),Ar="null";var Dr=v.create(null);Dr.ftp=21,Dr.file=0,Dr.gopher=70,Dr.http=80,Dr.https=443,Dr.ws=80,Dr.wss=443;var Cr=/^(?:\.|%2e)$/i,xr=/^(?:\.|%2e){2}$/i;function Br(t){return Cr.test(t)}function Mr(t){return xr.test(t)}function Lr(t){return void 0!==Dr[t]}function Ur(t){return Lr(t.fP)}function Fr(t){return""!==t.bet||""!==t.Tet}function zr(t){var n=t.length;if(!(n>=2))return!1;if(!qr(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 Wr(t){return 2===t.length&&ie.test(t[0])&&(":"===t[1]||"|"===t[1])}function qr(t){return 2===t.length&&Wr(Ie(t))}function Vr(t){return Wr(t)&&":"===t[1]}function Hr(t){var n=t.Net;0!==n.length&&("file"===t.fP&&1===n.length&&Vr(n[0])||n.pop())}function Xr(t){return null===t.Iet||ur===t.Iet||t.Det||"file"===t.fP}var jr=-1,Yr=/\t|\n|\r/g,Kr=/^[\x00-\x1f ]+|[\x00-\x1f ]+$/g;function Gr(t,n,i,e){void 0===i&&(i=null),void 0===e&&(e=null),i||(i=new Zr,t=t.replace(Kr,""));var r=null!==e?e:0;n=n||null;for(var o=[],u=!1,s=!1,f=!1,h=Ce(t=t.replace(Yr,"")),c=h.length,v=0;v<=c;){var d=v<c?h[v]:jr;switch(r){case 0:if(!we(d)){if(null===e){o.length=0,r=2;continue}throw new a("Invalid scheme")}o.push(pe(d)),r=1;break;case 1:if(ge(d)||43===d||45===d||46===d)o.push(pe(d));else{if(58!==d){if(null===e){o.length=0,r=2,v=0;continue}throw new a("Invalid scheme")}var w=ze(o);if(null!==e){if(Lr(i.fP)&&!Lr(w))return;if(!Lr(i.fP)&&Lr(w))return;if((Fr(i)||null!==i.E7)&&"file"===w)return;if("file"===i.fP&&(i.Iet===ur||null===i.Iet))return}if(i.fP=w,null!==e)return void(Ur(i)&&i.E7===Dr[i.fP]&&(i.E7=null));o.length=0,"file"===i.fP?r=13:Ur(i)&&n&&n.fP===i.fP?r=3:Ur(i)?r=7:47===h[v+1]?(r=4,v+=1):(i.Det=!0,i.Net.push(""),r=18)}break;case 2:if(!n||n.Det&&35!==d)throw new a("Invalid scheme");n.Det&&35===d?(i.fP=n.fP,i.Net=n.Net.slice(),i.Aet=n.Aet,i.Eet="",i.Det=!0,r=20):"file"!==n.fP?(r=5,v-=1):(r=13,v-=1);break;case 3:47===d&&47===h[v+1]?r=8:(r=5,v-=1);break;case 4:47===d?r=9:(r=17,v-=1);break;case 5:i.fP=n.fP,jr===d?(i.bet=n.bet,i.Tet=n.Tet,i.Iet=n.Iet,i.E7=n.E7,i.Net=n.Net.slice(),i.Aet=n.Aet):47===d?r=6:63===d?(i.bet=n.bet,i.Tet=n.Tet,i.Iet=n.Iet,i.E7=n.E7,i.Net=n.Net.slice(),i.Aet="",r=19):35===d?(i.bet=n.bet,i.Tet=n.Tet,i.Iet=n.Iet,i.E7=n.E7,i.Net=n.Net.slice(),i.Aet=n.Aet,i.Eet="",r=20):92===d&&Ur(i)?r=6:(i.bet=n.bet,i.Tet=n.Tet,i.Iet=n.Iet,i.E7=n.E7,i.Net=n.Net.slice(),i.Net.pop(),r=17,v-=1);break;case 6:!Ur(i)||47!==d&&92!==d?47===d?r=9:(i.bet=n.bet,i.Tet=n.Tet,i.Iet=n.Iet,i.E7=n.E7,r=17,v-=1):r=8;break;case 7:if(47!==d||47!==h[v+1]){r=8;continue}r=8,v+=1;break;case 8:47!==d&&92!==d&&(r=9,v-=1);break;case 9:if(64===d){u&&o.unshift(37,52,48),u=!0;for(var b=0;b<o.length;b++){var g=o[b];if(58!==g||f){var m=ze(tr(g,Ze));f?i.Tet+=m:i.bet+=m}else f=!0}o.length=0}else if(jr===d||47===d||63===d||35===d||Ur(i)&&92===d){if(u&&0===o.length)throw new a("Invalid host");v-=o.length+1,o.length=0,r=10}else o.push(d);break;case 10:case 11:if(null!==e&&"file"===i.fP)v-=1,r=15;else if(58!==d||s)if(jr===d||47===d||63===d||35===d||Ur(i)&&92===d){if(v-=1,Ur(i)&&0===o.length)throw new a("Invalid host");if(null!==e&&0===o.length&&(Fr(i)||null!==i.E7))return;var p=hr(ze(o),Ur(i));if(i.Iet=p,o.length=0,r=16,null!==e)return}else 91===d?s=!0:93===d&&(s=!1),o.push(d);else{if(0===o.length)throw new a("Invalid host");var y=hr(ze(o),Ur(i));if(i.Iet=y,o.length=0,r=12,11===e)return}break;case 12:if(be(d))o.push(d);else{if(!(jr===d||47===d||63===d||35===d||Ur(i)&&92===d||null!==e))throw new a("Invalid port");if(0!==o.length){var _=l(ze(o),10);if(_>65535)throw new a("Invalid port");i.E7=_===Dr[i.fP]?null:_,o.length=0}if(null!==e)return;r=16,v-=1}break;case 13:i.fP="file",47===d||92===d?r=14:n&&"file"===n.fP?jr===d?(i.Iet=n.Iet,i.Net=n.Net.slice(),i.Aet=n.Aet):63===d?(i.Iet=n.Iet,i.Net=n.Net.slice(),i.Aet="",r=19):35===d?(i.Iet=n.Iet,i.Net=n.Net.slice(),i.Aet=n.Aet,i.Eet="",r=20):(zr(h.slice(v))||(i.Iet=n.Iet,i.Net=n.Net.slice(),Hr(i)),r=17,v-=1):(r=17,v-=1);break;case 14:47===d||92===d?r=15:(n&&"file"===n.fP&&!zr(h.slice(v))&&(Vr(n.Net[0])?i.Net.push(n.Net[0]):i.Iet=n.Iet),r=17,v-=1);break;case 15:if(jr===d||47===d||92===d||63===d||35===d)if(v-=1,null===e&&qr(o))r=17;else if(0===o.length){if(i.Iet=ur,null!==e)return;r=16}else{var S=hr(ze(o),Ur(i));if(0===S.B2&&"localhost"===S.pet&&(S=ur),i.Iet=S,null!==e)return;o.length=0,r=16}else o.push(d);break;case 16:Ur(i)?(r=17,47!==d&&92!==d&&(v-=1)):null===e&&63===d?(i.Aet="",r=19):null===e&&35===d?(i.Eet="",r=20):jr!==d&&(r=17,47!==d&&(v-=1));break;case 17:if(jr===d||47===d||Ur(i)&&92===d||null===e&&(63===d||35===d)){var T=ze(o);if(Mr(T)?(Hr(i),47===d||Ur(i)&&92===d||i.Net.push("")):!Br(T)||47===d||Ur(i)&&92===d?Br(T)||("file"===i.fP&&0===i.Net.length&&qr(o)&&(ur!==i.Iet&&null!==i.Iet&&(i.Iet=ur),o[1]=58,T=ze(o)),i.Net.push(T)):i.Net.push(""),o.length=0,"file"===i.fP&&(jr===d||63===d||35===d))for(;i.Net.length>1&&""===i.Net[0];)i.Net.shift();63===d?(i.Aet="",r=19):35===d&&(i.Eet="",r=20)}else o.push.apply(o,tr(d,$e));break;case 18:63===d?(i.Aet="",r=19):35===d?(i.Eet="",r=20):jr!==d&&(i.Net[0]+=ze(tr(d,Ke)));break;case 19:null===e&&35===d?(i.Eet="",r=20):jr!==d&&(i.Aet+=ze(tr(d,Ur(i)?Qe:Je)));break;case 20:jr===d||0===d||(i.Eet+=ze(tr(d,Ge)))}v++}return i}function $r(t,n,i,e){try{Gr(t,n,i,e)}catch(t){}}var Zr=function(){this.fP="",this.bet="",this.Tet="",this.Iet=null,this.E7=null,this.Net=[],this.Aet=null,this.Eet=null,this.Det=!1};function Jr(t){switch(t.fP){case"blob":var n;try{n=Gr(t.Net[0],null)}catch(t){return Ar}return Jr(n);case"ftp":case"gopher":case"http":case"https":case"ws":case"wss":return function(t,n,i){return t+"://"+cr(n)+(null===i?"":":"+i)}(t.fP,t.Iet,t.E7);default:return Ar}}var Qr,to,no=function(){function t(t,n){var i,e=null;if(null!=n)if(function(t){return null!=t&&t instanceof no&&"object"==typeof t.Ju}(n))e=n.Ju;else try{e=Gr(String(n),null)}catch(t){throw new a("Invalid base URL: "+t.message)}try{i=Gr(String(t),e)}catch(t){throw new a("Invalid URL: "+t.message)}var r=i.Aet;this.Ju=i,this.Aet=function(t){var n=new Ir;return null!==t&&Tr(n,t),n}(r),this.Aet.Ju=this}var n=t.prototype;return n.toString=function(){return this.href},n.toJSON=function(){return this.href},function(t,n,i){n&&Qi(t.prototype,n),i&&Qi(t,i)}(t,[{key:"href",get:function(){return function(t,n){void 0===n&&(n=!1);var i=t.fP+":";if(null!==t.Iet?(i+="//",Fr(t)&&(i+=t.bet,""!==t.Tet&&(i+=":"+t.Tet),i+="@"),i+=cr(t.Iet),null!==t.E7&&(i+=":"+t.E7)):null===t.Iet&&"file"===t.fP&&(i+="//"),t.Det)i+=t.Net[0];else for(var e=0,r=t.Net;e<r.length;e++)i+="/"+r[e];return null!==t.Aet&&(i+="?"+t.Aet),n||null===t.Eet||(i+="#"+t.Eet),i}(this.Ju)},set:function(t){var n;try{n=Gr(String(t),null)}catch(t){throw new a("Invalid URL: "+t.message)}this.Ju=n,Sr(this.Aet);var i=this.Ju.Aet;null!==i&&Tr(this.Aet,i)}},{key:"origin",get:function(){return Jr(this.Ju)}},{key:"protocol",get:function(){return this.Ju.fP+":"},set:function(t){$r(t+":",null,this.Ju,0)}},{key:"username",get:function(){return this.Ju.bet},set:function(t){Xr(this.Ju)||(this.Ju.bet=nr(t,Ze))}},{key:"password",get:function(){return this.Ju.Tet},set:function(t){Xr(this.Ju)||(this.Ju.Tet=nr(t,Ze))}},{key:"host",get:function(){var t=this.Ju,n=t.Iet;if(null===n)return"";var i=t.E7,e=cr(n);return null!==i&&(e+=":"+i),e},set:function(t){this.Ju.Det||$r(t,null,this.Ju,10)}},{key:"hostname",get:function(){var t=this.Ju.Iet;return null===t?"":cr(t)},set:function(t){this.Ju.Det||$r(t,null,this.Ju,11)}},{key:"port",get:function(){var t=this.Ju.E7;return null===t?"":""+t},set:function(t){Xr(this.Ju)||(""===t?this.Ju.E7=null:$r(t,null,this.Ju,12))}},{key:"pathname",get:function(){var t=this.Ju.Net;return this.Ju.Det?t[0]:0===t.length?"":"/"+t.join("/")},set:function(t){this.Ju.Det||(this.Ju.Net.length=0,$r(t,null,this.Ju,16))}},{key:"search",get:function(){var t=this.Ju.Aet;return null===t||""===t?"":"?"+t},set:function(t){t=gr(t);var n=this.Ju;if(""===t)return n.Aet=null,void Sr(this.Aet);"?"===t[0]&&(t=t.slice(1)),n.Aet="",$r(t,null,n,19),Tr(this.Aet,t)}},{key:"searchParams",get:function(){return this.Aet}},{key:"hash",get:function(){var t=this.Ju.Eet;return null===t||""===t?"":"#"+t},set:function(t){""!==t?("#"===t[0]&&(t=t.slice(1)),this.Ju.Eet="",$r(t,null,this.Ju,20)):this.Ju.Eet=null}}]),t}();function io(t){return t.document&&t.document.baseURI||t.location.href||""}function eo(){return void 0!==r?r.createElement("video"):void 0}function ro(){return to||(to=eo()),to}var oo=!!("ontouchstart"in self||self.DocumentTouch&&r instanceof self.DocumentTouch)||!(!o||!o.msMaxTouchPoints),uo=ro(),so=!(!uo||!uo.webkitShowPlaybackTargetPicker),fo=function(){function t(){this.Let=void 0,this.Fet=!1,this.Je=oo,this.Qs=!1,this.Mtt=!0}var n=t.prototype;return n.xet=function(){return 0},n.Uet=function(t,n){return!0},n.Qet=function(t){return t>=.3333333333333333},It(t,[{key:"ket",get:function(){return void 0===this.Let&&(this.Let=this.xet()),this.Let}},{key:"Cet",get:function(){return!Vi.Jk}},{key:"Oet",get:function(){if(e.screen)return{width:e.screen.width,height:e.screen.height}}},{key:"h5",get:function(){return e.devicePixelRatio||1}},{key:"jet",get:function(){return so}},{key:"V3",get:function(){return!1}},{key:"z3",get:function(){return!0}},{key:"ep",get:function(){return Vi.Fk||Vi.Ga}},{key:"Ret",get:function(){return!Vi.Ga}},{key:"DR",get:function(){return!0}},{key:"op",get:function(){return!0}},{key:"rp",get:function(){return!1}},{key:"Pet",get:function(){}},{key:"zet",get:function(){return!0}},{key:"E0",get:function(){return!1}},{key:"Bet",get:function(){return Vi.Ik}}]),t}(),ho=function(){var t=eo();if(!t)return!1;var n=t.muted;return t.muted=!n,t.muted!==n}();!function(){if(Vi.VE)return!1;var t=eo();if(!t)return!1;var n=t.volume;t.volume=n/2+.1,t.volume}();var co=function(t){function n(n){var i;return(i=t.call(this)||this).Yet=n,i.Yet&&(i.Fet=i.Yet.Fet,i.Je=i.Yet.Je,i.Mtt=ho&&i.Yet.Mtt),i}Rt(n,t);var i=n.prototype;return i.xet=function(){return this.Yet?this.Yet.ket:t.prototype.xet.call(this)},i.Uet=function(n,i){return this.Yet?this.Yet.Uet(n,i):t.prototype.Uet.call(this,n,i)},i.Qet=function(n){return this.Yet?this.Yet.Qet(n):t.prototype.Qet.call(this,n)},It(n,[{key:"Pet",get:function(){var t;return null==(t=this.Yet)?void 0:t.Pet}},{key:"zet",get:function(){var t,n;return null==(n=null==(t=this.Yet)?void 0:t.zet)||n}}]),n}(fo),ao=function(t){function n(n){var i;return(i=t.call(this,n)||this).Fet=!0,i.Qs=!0,i}return Rt(n,t),It(n,[{key:"rp",get:function(){return Vi.Ga}}]),n}(co);var vo=function(t){function n(){return t.apply(this,arguments)}return Rt(n,t),n.prototype.xet=function(){return function(t){return t&&ct(Qr.ManagedMediaSource)?Qr.ManagedMediaSource:ct(Qr.MediaSource)?Qr.MediaSource:void 0}(!0)?t.prototype.xet.call(this):1},It(n,[{key:"rp",get:function(){return!0}}]),n}(ao),lo=function(t){function n(){return t.apply(this,arguments)}return Rt(n,t),n.prototype.Uet=function(n,i){return t.prototype.Uet.call(this,n,i)},It(n,[{key:"V3",get:function(){return Vi.bk<3}},{key:"z3",get:function(){return Vi.bk>=3}},{key:"Oet",get:function(){var t=this;return e.tizen&&!this.Get&&e.tizen.systeminfo.getPropertyValue("DISPLAY",(function(n){var i=n.resolutionWidth,e=n.resolutionHeight;1===i&&1===e||(t.Get={width:i,height:e})})),this.Get}},{key:"E0",get:function(){return Vi.bk<3}}]),n}(co),wo=function(t){function n(){return t.call(this)}return Rt(n,t),n}(fo),bo=function(t){function n(){return t.apply(this,arguments)}return Rt(n,t),n.prototype.Uet=function(t,n){if(t&&t.Vet&&n&&n.Vet){var i=go(t.Vet,"mp4a.40.2")&&go(n.Vet,"mp4a.40.5"),e=go(t.Vet,"mp4a.40.5")&&go(n.Vet,"mp4a.40.2"),r=go(t.Vet,"mp4a.40.2")&&go(n.Vet,"mp4a.40.34"),o=go(t.Vet,"mp4a.40.34")&&go(n.Vet,"mp4a.40.2"),u=go(t.Vet,"mp4a.40.5")&&go(n.Vet,"mp4a.40.34"),s=go(t.Vet,"mp4a.40.34")&&go(n.Vet,"mp4a.40.5");return!(i||e||r||o||u||s)}return!0},It(n,[{key:"Pet",get:function(){if(Vi.EE)return 4096}}]),n}(wo);function go(t,n){return t.indexOf(n)>-1}var mo,po=function(t){function n(){return t.apply(this,arguments)}return Rt(n,t),n.prototype.Qet=function(t){return t>=2},n}(wo),yo=function(t){function n(){var n;return(n=t.call(this)||this).Fet=Vi.Gk>=11,n.Mtt=Vi.Fk&&!(Vi.Ga&&Vi.Gk<10),n}return Rt(n,t),n}(wo),_o=function(t){function n(){return t.apply(this,arguments)}return Rt(n,t),It(n,[{key:"Oet",get:function(){var t=this;return e.webOS&&!this.Get&&e.webOS.deviceInfo((function(n){t.Get={width:n.screenWidth,height:n.screenHeight}})),this.Get}},{key:"DR",get:function(){return!1}}]),n}(co),So=function(t){function n(){return t.apply(this,arguments)}return Rt(n,t),It(n,[{key:"zet",get:function(){return!Vi.LE||(Vi.wk?92!==Vi.pk:Vi.fk>=100)}}]),n}(wo),To=function(t){function n(){return t.apply(this,arguments)}return Rt(n,t),It(n,[{key:"rp",get:function(){return!0}}]),n}(co),Eo=function(){function t(){this.qet=new Io,this.Jet=function(){var t=function(){if(Vi.zk)return new bo;if(Vi.Ek||Vi.xk)return new po;if(Vi.Fk)return new yo;if(Vi.lk)return new So;return new wo}();return Vi.Ga?new vo(t):Vi.Qs?new ao(t):Vi.yk?new lo(t):Vi.Sk?new _o(t):Vi.EE?new To(t):new co(t)}(),this.Ket=ko(),self.performance&&self.performance.now?this.m_=function(){return self.performance.now()}:this.m_=Cn}var n=t.prototype;return n.Wet=function(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];Gi.apply(void 0,rt(n))},n.vp=function(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];$i.apply(void 0,rt(n))},n.Het=function(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];Zi.apply(void 0,rt(n))},n.Xet=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];Ji.apply(void 0,[t].concat(rt(i)))},n.A_=function(t,n){return u(t,n)},n._1=function(t,n){return f(t,n)},n.p_=function(t){s(t)},n.w1=function(t){h(t)},n.IO=function(){return this.Zet.IO()},n.CT=function(){return this.Zet.CT()},n.OT=function(){return this.Zet.OT()},n.xT=function(){return this.Zet.xT()},n.LT=function(){return this.Zet.LT()},n.bO=function(t,n){return this.Zet.bO(t,n)},n.yO=function(t){return this.Zet.yO(t)},n.Dh=function(t,n){var i;return void 0===n&&(n=io(Qr)),i="object"!=typeof n||n instanceof no?n:n.href,new no(t,i)},n.wp=function(t,n){if(void 0===n&&(n=io(Qr)),this.Ket){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},It(t,[{key:"AR",get:function(){return this.qet}},{key:"Ys",get:function(){return this.Jet}},{key:"np",get:function(){return{hp:o&&o.userAgent.match(/Android /i)?"Android":"other",sp:Boolean(o&&o.userAgent.match(/Android 8.0.0/i))}}},{key:"fH",get:function(){return self&&self.location&&"https:"===self.location.protocol}},{key:"$et",get:function(){return"languages"in o?o.languages.slice():[o.language]}}]),t}(),Io=function(){function t(){}return It(t,[{key:"yR",get:function(){return o.oscpu}},{key:"Ys",get:function(){return o.platform}},{key:"MR",get:function(){return o.vendor}},{key:"bR",get:function(){return o.vendorSub}}]),t}();function ko(){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}function Ro(){return Ro=v.assign||function(t){for(var n=1;n<arguments.length;n++){var i=arguments[n];for(var e in i)v.prototype.hasOwnProperty.call(i,e)&&(t[e]=i[e])}return t},Ro.apply(this,arguments)}!function(t){t.Dp="9a04f079-9840-4286-ab92-e65be0885f95",t.Ep="edef8ba9-79d6-4ace-a3c8-27dcd51d21ed",t.Lp="1077efec-c0b2-4d02-ace3-3c1e52e2fb4b",t.kp="94ce86fb-07ff-4f43-adb8-93d2fa968ca2"}(mo||(mo={}));var Oo,No="9a04f079-9840-4286-ab92-e65be0885f95",Po="urn:uuid:"+No,Ao="com.microsoft.playready",Do="edef8ba9-79d6-4ace-a3c8-27dcd51d21ed",Co="urn:uuid:"+Do,xo="com.widevine.alpha",Bo="1077efec-c0b2-4d02-ace3-3c1e52e2fb4b",Mo="urn:uuid:"+Bo,Lo="94ce86fb-07ff-4f43-adb8-93d2fa968ca2",Uo="urn:uuid:"+Lo,Fo="com.apple.fps.1_0";!function(t){t.Dp="playready",t.Ep="widevine",t.kp="fairplay",t.Lp="clearkey",t.xp="aes128"}(Oo||(Oo={}));var zo={Av:Oo.Dp,wL:Ao,vL:"cenc",mL:No,pL:Po,AL:"PlayReady"},Wo={Av:Oo.Ep,wL:xo,vL:"cenc",mL:Do,pL:Co,AL:"Widevine"},qo={Av:Oo.kp,wL:Fo,vL:"skd",mL:Lo,pL:Uo,AL:"FairPlay"},Vo=(Oo.kp,{Av:Oo.Lp,wL:"org.w3.clearkey",vL:"cenc",mL:Bo,pL:Mo,AL:"ClearKey"}),Ho=Vi.lk&&Vi.fk>=42||Vi.zk&&Vi.Uk>=38||Vi.Ek||Vi.Ok||Vi.Wk&&Vi.Xk>=29;function Xo(t,n){return function(t,n){return ut(t)&&-1!==t.indexOf(n)}(t,"audio")?{initDataTypes:["cenc"],audioCapabilities:[Ro({contentType:t},n?{robustness:"SW_SECURE_CRYPTO"}:{})]}:{initDataTypes:["cenc"],videoCapabilities:[Ro({contentType:t},n?{robustness:"SW_SECURE_CRYPTO"}:{})]}}var jo,Yo=function(){function t(t){this.MO=Pt(),this.DO=void 0,this.SO=t}var n=t.prototype;return n.LT=function(){return this.yO(Wo)},n.CT=function(){return this.yO(Vo)},n.xT=function(){return this.yO(zo)},n.OT=function(){return this.yO(qo)},n.yO=function(t){var n=t.pL,i=this.MO.get(n);if(i)return i;var e=this.bO(t,'video/mp4; codecs="avc1.42000a"');return this.MO.set(n,e),e},n.bO=function(t,n){var i=this;return tt((function(){return nt(this,(function(e){switch(e.label){case 0:return e.trys.push([0,2,,7]),[4,i.SO.TO(t.wL,[Xo(n,!0)])];case 1:return e.sent(),[2,!0];case 2:e.sent(),e.label=3;case 3:return e.trys.push([3,5,,6]),[4,i.SO.TO(t.wL,[Xo(n,!1)])];case 4:return e.sent(),[2,!0];case 5:return e.sent(),[2,!1];case 6:return[3,7];case 7:return[2]}}))}))()},n.IO=function(){return this.DO||(this.DO=this.EO()),this.DO},n.EO=function(){var t=this;return tt((function(){return nt(this,(function(n){switch(n.label){case 0:return"https:"===undefined.protocol?[2,!1]:Ho?[4,t.CT()]:[2,!1];case 1:return n.sent()?[2,!1]:[2,!0]}}))}))()},t}(),Ko=["cenc"],Go=["cbcs","cbcs-1-9"],$o=function(t){function n(n){var i;return(i=t.call(this,"yL")||this).ML=n,i}return Rt(n,t),n}(mi),Zo=function(t){function n(n,i,e,r){var o;return(o=t.call(this,"bL")||this).ML=n,o.TL=i,o.bL=e,o.SL=r,o}return Rt(n,t),n}(mi),Jo=function(t){function n(){return t.call(this,"lt")}return Rt(n,t),n}(mi);!function(t){t.Cv="NL",t.IL="DL"}(jo||(jo={}));var Qo=new g([0]).buffer,tu=function(){function t(){this.Xu=[]}var n=t.prototype;return n.kL=function(t){for(var n=0,i=this.Xu;n<i.length;n++){if(i[n][0]===t)return!0}return!1},n.LL=function(t){for(var n=0,i=this.Xu;n<i.length;n++){var e=i[n];if(e[0]===t)return e[1]}},n.xL=function(t,n){this.Xu.forEach((function(n){return t(n[1],n[0])}),n)},n.CL=function(t,n){this.Xu.push([t,n])},n.OL=function(){mt(this.Xu)},It(t,[{key:"By",get:function(){return this.Xu.length}}]),t}(),nu=function(){function t(){var t=this;this.zL=new X((function(n,i){t.lf=n,t.PL=i}))}var n=t.prototype;return n.jL=function(t){this.lf&&(this.lf(t),this.h_())},n.RL=function(t){this.PL&&(this.PL(t),this.h_())},n.g_=function(){this.zL.catch(_t),this.RL(new Jt)},n.w_=function(t){var n=this;t.then((function(t){return n.jL(t)}),(function(t){return n.RL(t)}))},n.h_=function(){this.lf=void 0,this.PL=void 0},t}();function iu(t,n){return t===Ao?function(t){if(t.byteLength<2*eu.length)return t;var n=new DataView(t,0,2*eu.length),i=oi(n,!0);if(i===eu)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+Wn(t)+i;return function(t,n){void 0===n&&(n=!1);var i=new g(2*t.length);return ri(fi(i),new di,t,n),i}(e,!0).buffer}(t)}(n):n}var eu="<PlayReady";var ru=function(t){function n(n,i,e,r){var o;return(o=t.call(this,n,r)||this).BL=i,o.UL=e,o}return Rt(n,t),n}(Gt),ou=function(t,n){return ou=v.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)v.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])},ou(t,n)};function uu(t,n){if("function"!=typeof n&&null!==n)throw new a("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}ou(t,n),t.prototype=null===n?v.create(n):(i.prototype=n.prototype,new i)}function su(t,n,i){return t.indexOf?t.indexOf(n,i):Array.prototype.indexOf.call(t,n,i)}(function(){function t(t,n){this.QL=t,this.FL=n}t.prototype.get=function(t){var n=this.QL.get(t);if(0===this.FL||void 0===n)return n;var i=this.QL.get(t+1)||0,e=n&(1<<8-this.FL)-1,r=i>>8-this.FL;return(e<<this.FL)+r},t.prototype.getBit=function(t){if(!(t<0)){var n=this.QL.get(d.floor((t+this.FL)/8));if(void 0!==n)return(n&1<<7-this.FL-t%8)>0?1:0}},v.defineProperty(t.prototype,"bitLength",{get:function(){return this.QL.bitLength-this.FL},enumerable:!1,configurable:!0}),v.defineProperty(t.prototype,"length",{get:function(){return this.QL.length},enumerable:!1,configurable:!0})})(),d.pow(2,-52);function fu(t,n,i){return d.min(d.max(t,n),i)}function hu(t,n){return t>>8-n}function cu(t,n){return t&(1<<n)-1}var au=function(){function t(t){this.YL=t,this.GL=0,this.VL=0}return v.defineProperty(t.prototype,"totalBitsRead",{get:function(){return 8*this.GL+this.VL},enumerable:!1,configurable:!0}),v.defineProperty(t.prototype,"done",{get:function(){return this.GL===this.YL.length&&0===this.VL},enumerable:!1,configurable:!0}),v.defineProperty(t.prototype,"location",{get:function(){return{byte:this.GL,bit:this.VL}},enumerable:!1,configurable:!0}),t.prototype.copy=function(){var n=new t(this.YL);return n.seek(this.GL,this.VL),n},t.prototype.canReadBits=function(t){return 8*this.GL+t+this.VL<=8*this.YL.length},t.prototype.canReadBytes=function(t){return 0===this.VL?this.GL+t<=this.YL.length:this.GL+t<this.YL.length},t.prototype.incBit=function(){this.VL++,this.VL>7&&(this.GL++,this.VL=0)},t.prototype.seek=function(t,n){this.GL=t,this.VL=n},t.prototype.peekBit=function(){if(!this.canReadBits(1))throw new c("Cannot read past end of buffer.");return this.YL.get(this.GL)>>7-this.VL&1},t.prototype.readBit=function(){var t=this.peekBit();return this.incBit(),t},t.prototype.readByte=function(){if(!this.canReadBytes(1))throw new c("Cannot read past end of buffer.");if(0===this.VL)return this.YL.get(this.GL++);var t=cu(this.YL.get(this.GL),8-this.VL),n=hu(this.YL.get(this.GL+1),this.VL);return this.GL++,t<<this.VL|n},t.prototype.readBits=function(t){if(!this.canReadBits(t))throw new c("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 c("The max bitlength that can be provided is 32.");if(!this.canReadBits(t))throw new c("Cannot read past end of buffer.");var n=0;if(0===this.VL&&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 c("The max bitlength that can be provided is 32.");if(!this.canReadBits(t))throw new c("Cannot read past end of buffer.");var n=this.readUInt(t);return 0===(n&1<<t-1)?n:n-d.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 c("Skipping over the buffer edge is not allowed.");var n=this.VL+t;this.GL+=n>>3,this.VL=7&n},t.prototype.readBool=function(){return this.readBit()>0},t.prototype.readString=function(t){if(!this.canReadBytes(t))throw new c("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}(),vu=function(t,n){return t===n?0:t<n?-1:t>n?1:b(t)?b(n)?0:1:-1},du=function(){function t(){this.WL=[],this.HL=[],this.XL=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 c("The buffer length must be positive.");if(0!==i){if(0===this.HL.length)this.HL.push(0);else{var e=this.HL[this.HL.length-1]+this.WL[this.WL.length-1].length;this.HL.push(e)}this.WL.push(t.subarray(n,n+i)),this.XL+=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.WL;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.WL=[],this.HL=[],this.XL=0},t.prototype.get=function(t){if(!(t<0||t>=this.length)){var n=this.findContainingBufferIndex(t),i=t-this.HL[n];return this.WL[n][i]}},v.defineProperty(t.prototype,"first",{get:function(){return this.get(0)},enumerable:!1,configurable:!0}),t.prototype.indexOf=function(t){if(this.WL.length<1)return-1;if(this.WL.length>1){var n=this.join();this.clear(),this.pushRange(n)}var i=this.WL[0];return"number"==typeof t?su(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=su(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=d.ceil((e+r)/2);i(t[o],n)<=0?e=o:r=o-1}return e}}}(this.HL,t,vu)},t.prototype.join=function(){if(1===this.WL.length)return this.WL[0];var t=new g(this.length);return this.copyInternal(t,0),t},v.defineProperty(t.prototype,"length",{get:function(){return this.XL},enumerable:!1,configurable:!0}),v.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 c("Expected byteLength to be between 0 and 4 but was "+n);if(t<0||t>this.length-n)throw new c("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)*d.pow(2,8*(n-e-1));return i},t.prototype.slice=function(n,i){void 0===i&&(i=this.length);var e=fu(n,0,this.length),r=fu(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.WL[u],f=e,h=f-this.HL[u];f+s.length-h<r;)o.pushRange(s,h,s.length-h),u+=1,h=(f+=s.length-h)-this.HL[u],s=this.WL[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.WL.length-1,e=this.WL[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.WL[i]).length-1}else r-=1;n-=1}return this.slice(0,n+1)},t}(),lu=function(){function t(n){this.ZL=n||t.BUFFER_CHUNK_SIZE,this.qL=!1,this.KL=new du,this.YL=new g(this.ZL),this.JL=0,this.$L=0,this.VL=7}return t.prototype.closeByte=function(){this.YL[this.JL++]=this.$L,this.JL>=this.ZL&&this.closeBuffer(),this.$L=0,this.VL=7},t.prototype.closeBuffer=function(t){void 0===t&&(t=!0),0!==this.JL&&(this.KL.pushRange(this.YL,0,this.JL),t&&(this.YL=new g(this.ZL)),this.JL=0)},v.defineProperty(t.prototype,"isWritingStartBit",{get:function(){return 7===this.VL},enumerable:!1,configurable:!0}),t.prototype.close=function(){if(this.qL)throw new c("Cannot close a closed BitWriter.");return this.isWritingStartBit||this.closeByte(),this.closeBuffer(!1),this.qL=!0,this.KL},t.prototype.writeBit=function(t){if(this.qL)throw new c("Cannot write to a closed BitWriter.");this.$L|=t<<this.VL,0===this.VL?this.closeByte():this.VL--},t.prototype.writeByte=function(t){if(this.qL)throw new c("Cannot write to a closed BitWriter.");this.isWritingStartBit?(this.$L=t,this.closeByte()):this.writeByteUnaligned(t)},t.prototype.writeByteUnaligned=function(t){var n=this.VL;this.$L|=hu(t,n+1),this.closeByte(),this.$L=cu(t,8-n)<<n+1,this.VL=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.qL)throw new c("Cannot write to a closed BitWriter.");this.isWritingStartBit?this.writeBytesAligned(t):this.writeBytesUnaligned(t)},t.prototype.writeBytesAligned=function(t){this.JL+t.length<=this.ZL?(this.YL.set(t,this.JL),this.JL+=t.length,this.JL===this.ZL&&this.closeBuffer()):(this.closeBuffer(),this.KL.pushRange(t))},t.prototype.writeBytesUnaligned=function(t){if(0!==t.length){var n=this.VL;this.$L|=hu(t[0],n+1),this.closeByte();for(var i=1;i<t.length;i++){var e=cu(t[i-1],8-n),r=hu(t[i],n+1);this.$L=e<<n+1|r,this.closeByte()}this.$L=cu(t[t.length-1],8-n)<<n+1,this.VL=n}},t.prototype.writeUInt=function(t,n){if(t<0)throw new c("Received a negative number.");if(n>32)throw new c("The max bitlength that can be provided is 32.");if(t>=d.pow(2,n))throw new c("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 c("The max bitlength that can be provided is 32.");if(d.abs(t)>=d.pow(2,n-1))throw new c("Signed integer "+t+" cannot be represented in "+n+" bit(s).");t<0?this.writeUInt(t+d.pow(2,n),n):this.writeUInt(t,n)},t.prototype.writeExponentialGolombCode=function(t){if(t<0)throw new c("Received a negative number.");for(var n=d.floor(d.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 g(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}(),wu=function(){function t(t){this.rb=new du,this.tx=t}return t.prototype.closeWriter=function(){void 0!==this.tx&&(this.rb=this.rb.concat(this.tx.close()),this.tx=void 0)},v.defineProperty(t.prototype,"writer",{get:function(){return void 0===this.tx&&(this.tx=new lu),this.tx},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}(),bu=function(){function t(t){if(this.boxType=t,4!==t.length&&16!==t.length)throw new c("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(d.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 wu;return this.serializeCommonBoxHeader(t.writer),this.serializeBoxContent(t),t.toRangedBuffer()},t.LARGE_SIZE=d.pow(2,32),t}();function gu(t,n){return t instanceof Dn?64===n:t<d.pow(2,n)}function mu(t,n){return d.round(t*d.pow(2,n))}function pu(t,n){for(var i=0;i<n.length;i++)t.writeByte(n[i])}function yu(t,n){return t/d.pow(2,n)}var _u=function(t){function n(n,i,e){var r=t.call(this,n)||this;if(r.version=i,!gu(i,8))throw new c("the provided version cannot fit in 8 bits.");return r.flags=e,r}return uu(n,t),v.defineProperty(n.prototype,"flags",{get:function(){return this.Kd},set:function(t){this.Kd=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return 4},n.prototype.serializeFlags=function(t){if("number"!=typeof this.flags)throw new c("Missing custom serializeFlags method.");t.writer.writeUInt(this.flags,24)},n.prototype.serializeBoxContent=function(t){t.writer.writeByte(this.version),this.serializeFlags(t)},n}(bu),Su=function(t){function n(n,i){var e=t.call(this,n)||this;return e.data=i,e}return uu(n,t),n.prototype.getBoxContentSize=function(){return this.data.length},n.prototype.serializeBoxContent=function(t){t.concat(du.from(this.data))},n}(bu),Tu=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}();var Eu=16384;function Iu(t){var n=t.length;if(n<=Eu)return String.fromCharCode.apply(String,t);for(var i=[],e=0;e<n;e+=Eu)i.push(String.fromCharCode.apply(String,t.slice(e,e+Eu)));return i.join("")}var ku=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 Ru(t,n){var i=t.getUint8(n.offset);return n.shift(1),i}function Ou(t,n,i){var e=Bu(Lu(t),n.offset,n.offset+i);return n.shift(e.byteLength),e}function Nu(t,n,i){return n.offset+i<=t.byteLength}function Pu(t,n,i){void 0===i&&(i=!1);var e=t.getUint32(n.offset,i);return n.shift(4),e}function Au(t,n,i){void 0===i&&(i=!1);var e=Pu(t,n,i),r=Pu(t,n,i),o=i?r:e,u=i?e:r;return Dn.fromBits(u,o,!0)}function Du(t,n,i){return Iu(function(t){return[].slice.call(t)}(Ou(t,n,i)))}function Cu(t,n){var i,e=Ru(t,n);return 0==(128&e)?i=e:192==(224&e)?i=64*(31&e)+(63&Ru(t,n)):224==(240&e)?i=4096*(15&e)+64*(63&Ru(t,n))+(63&Ru(t,n)):240==(248&e)&&(i=262144*(7&e)+4096*(63&Ru(t,n))+64*(63&Ru(t,n))+(63&Ru(t,n))),i}function xu(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=Cu(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 Iu(n)}(e)}(t,n,!0)}function Bu(t,n,i){return void 0===n&&(n=0),void 0===i&&(i=t.byteLength),new g(t.buffer,t.byteOffset+n,i-n)}function Mu(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 Lu(t){return new g(t.buffer,t.byteOffset,t.byteLength)}var Uu=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 Tu(this.offset<<3)},t}(),Fu=function(){function t(t,n){this.data=t,this.cursor=n}return t.prototype.nextUint8=function(){return Ru(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 Pu(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=Pu(t,n,i),r=Pu(t,n,i),o=i?r:e,u=i?e:r;return Dn.fromBits(u,o,!1)}(this.data,this.cursor)},t.prototype.nextUint64=function(){return Au(this.data,this.cursor)},t.prototype.nextUint8Array=function(t){return Ou(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(Pu(t,n));return e}(this.data,this.cursor,t)},t.prototype.nextChars=function(t){return Du(this.data,this.cursor,t)},t.prototype.nextUTF8String=function(){return xu(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 zu(t,n){return t.type===n}var Wu=8;function qu(t){var n=function(t,n){var i=[];for(;n.offset<t.byteLength;){var e=Vu(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 c("Data incomplete");return n.boxes}function Vu(t,n){var i=n.offset,e=function(t,n){var i=n.offset;if(!Nu(t,n,Wu)){return{complete:!1,neededOffset:o=n.offset+Wu}}var e=Pu(t,n),r=Du(t,n,4);if(1===e){if(!Nu(t,n,8)){var o=n.offset+8;return n.seek(i),{complete:!1,neededOffset:o}}e=Au(t,n).toNumber()}if("uuid"===r){if(!Nu(t,n,16)){o=n.offset+16;return n.seek(i),{complete:!1,neededOffset:o}}r=Du(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 Fu(Mu(t,i,u),new Uu(r.headerSize))};return n.seek(u),{complete:!0,box:f}}function Hu(t){return{version:t>>24,flags:new ku(16777215&t)}}function Xu(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 ju(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 Yu(t){var n=t.nextUint32Array(9);return{a:yu(n[0],16),b:yu(n[1],16),u:yu(n[2],30),c:yu(n[3],16),d:yu(n[4],16),v:yu(n[5],30),x:yu(n[6],16),y:yu(n[7],16),w:yu(n[8],30)}}function Ku(t){return new Su(t.type,Bu(Lu(t.data.data),t.data.cursor.offset))}var Gu=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 uu(n,t),v.defineProperty(n.prototype,"handlerType",{get:function(){return this.ix},set:function(t){this.ix=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}(_u);function $u(t){var n=t.data,i=Hu(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 Gu(o,u,e,r.raw)}!function(t){function n(){return t.call(this,"mdir")||this}uu(n,t),n.prototype.serializeReserved=function(t){t.writer.writeString("appl"),t.writer.writeUInt(0,32),t.writer.writeUInt(0,32)}}(Gu);var Zu=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()},v.defineProperty(t.prototype,"tag",{get:function(){return this.sx},set:function(t){if(!gu(t,8))throw new c("Provided tag does not fit in 8 bits.");this.sx=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}(),Ju=(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}uu(n,t),v.defineProperty(n.prototype,"objectTypeIndication",{get:function(){return this.nx},set:function(t){if(!gu(t,8))throw new c("Provided objectTypeIndication does not fit in 8 bits.");this.nx=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"streamType",{get:function(){return this.ox},set:function(t){if(!gu(t,6))throw new c("Provided streamType does not fit in 6 bits.");this.ox=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"bufferSizeDb",{get:function(){return this.hx},set:function(t){if(!gu(t,24))throw new c("Provided bufferSizeDb does not fit in 24 bits.");this.hx=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"maxBitrate",{get:function(){return this.ux},set:function(t){if(!gu(t,32))throw new c("Provided maxBitrate does not fit in 32 bits.");this.ux=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"avgBitrate",{get:function(){return this.lx},set:function(t){if(!gu(t,32))throw new c("Provided avgBitrate does not fit in 32 bits.");this.lx=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)}}}(Zu),function(t){function n(n,i){void 0===i&&(i={});var e=t.call(this,5,i.fixed28BitMode)||this;return e.data=n,e}uu(n,t),n.prototype.getDescriptorSize=function(){return this.data.length},n.prototype.serializeDescriptorContent=function(t){t.concat(du.from(this.data))}}(Zu),function(t){function n(n){void 0===n&&(n=!1);var i=t.call(this,6,n)||this;return i.predefined=2,i}return uu(n,t),n.prototype.getDescriptorSize=function(){return 1},n.prototype.serializeDescriptorContent=function(t){t.writer.writeByte(this.predefined)},n}(Zu)),Qu=(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 Ju(r.fixed28BitMode),o}uu(n,t),v.defineProperty(n.prototype,"streamDependenceFlag",{get:function(){return void 0!==this.dependsOnEsId},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"urlFlag",{get:function(){return void 0!==this.urlString},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"ocrStreamFlag",{get:function(){return void 0!==this.ocrEsId},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"esId",{get:function(){return this._x},set:function(t){if(!gu(t,16))throw new c("Provided esId does not fit in 16 bits.");this._x=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"streamPriority",{get:function(){return this.gx},set:function(t){if(!gu(t,5))throw new c("Provided streamPriority does not fit in 5 bits.");this.gx=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"dependsOnEsId",{get:function(){return this.wx},set:function(t){if(t&&!gu(t,16))throw new c("Provided dependsOnEsId does not fit in 16 bits.");this.wx=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"ocrEsId",{get:function(){return this.vx},set:function(t){if(t&&!gu(t,16))throw new c("Provided ocrEsId does not fit in 16 bits.");this.vx=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)}}(Zu),function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n.boxes=[],n}return uu(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}(bu)),ts=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return uu(n,t),n.prototype.serializeBoxContent=function(t){},n.prototype.getBoxContentSize=function(){return 0},n}(Qu),ns=function(t){function n(n,i){var e=t.call(this,n)||this;return e.dataReferenceIndex=i,e}return uu(n,t),v.defineProperty(n.prototype,"dataReferenceIndex",{get:function(){return this.mx},set:function(t){if(!gu(t,16))throw new c("Provided dataReferenceIndex does not fit in 16 bits.");this.mx=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}(ts),is=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 uu(n,t),v.defineProperty(n.prototype,"channelCount",{get:function(){return this.Ax},set:function(t){if(!gu(t,16))throw new c("Provided channelCount does not fit in 16 bits.");this.Ax=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"sampleSize",{get:function(){return this.yx},set:function(t){if(!gu(t,16))throw new c("Provided sampleSize does not fit in 16 bits.");this.yx=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"sampleRate",{get:function(){return this.Mx},set:function(t){if(!gu(mu(t,16),32))throw new c("Provided rate does not fit in 32 bits (fixed 16.16).");this.Mx=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(mu(this.sampleRate,16),32),this.extra&&pu(n.writer,this.extra)},n}(ns),es=(function(t){function n(n){var i=t.call(this,"stco",0,0)||this;return i.entries=n,i}uu(n,t),v.defineProperty(n.prototype,"entries",{get:function(){return this.bx},set:function(t){if(!gu(t.length,32))throw new c("Number of allowed entries cannot fit in 32 bits.");if(t.some((function(t){return!gu(t,32)})))throw new c("Not all entries can be represented in 32 bits.");this.bx=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)}}}(_u),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}uu(n,t),v.defineProperty(n.prototype,"cleanApertureWidthN",{get:function(){return this.Tx},set:function(t){if(!gu(t,32))throw new c("Provided cleanApertureWidthN does not fit in 32 bits.");this.Tx=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"cleanApertureWidthD",{get:function(){return this.Sx},set:function(t){if(!gu(t,32))throw new c("Provided cleanApertureWidthD does not fit in 32 bits.");this.Sx=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"cleanApertureHeightN",{get:function(){return this.Nx},set:function(t){if(!gu(t,32))throw new c("Provided cleanApertureHeightN does not fit in 32 bits.");this.Nx=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"cleanApertureHeightD",{get:function(){return this.Ix},set:function(t){if(!gu(t,32))throw new c("Provided cleanApertureHeightD does not fit in 32 bits.");this.Ix=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"horizOffN",{get:function(){return this.Dx},set:function(t){if(!gu(t,32))throw new c("Provided horizOffN does not fit in 32 bits.");this.Dx=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"horizOffD",{get:function(){return this.Ex},set:function(t){if(!gu(t,32))throw new c("Provided horizOffD does not fit in 32 bits.");this.Ex=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"vertOffN",{get:function(){return this.kx},set:function(t){if(!gu(t,32))throw new c("Provided vertOffN does not fit in 32 bits.");this.kx=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"vertOffD",{get:function(){return this.Lx},set:function(t){if(!gu(t,32))throw new c("Provided vertOffD does not fit in 32 bits.");this.Lx=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)}}(bu),function(t){function n(n,i){var e=t.call(this,"ctts",n,0)||this;return e.entries=i,e}uu(n,t),v.defineProperty(n.prototype,"entries",{get:function(){return this.bx},set:function(t){if(!gu(t.length,32))throw new c("Number of allowed entries cannot fit in 32 bits.");if(t.some((function(t){return!gu(t.sampleCount,32)||!gu(t.sampleOffset,32)})))throw new c("Not all entries can be represented in 64 bits.");this.bx=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)}}}(_u),function(t){function n(n){var i=t.call(this,"url ",0,void 0===n?1:0)||this;return i.location=n,i}uu(n,t),v.defineProperty(n.prototype,"location",{get:function(){return this.xx},set:function(t){this.flags=void 0===t?1:0,this.xx=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))}}(_u),function(t){function n(n,i,e){var r=t.call(this,"urn ",0,e)||this;return r.name=n,r.location=i,r}uu(n,t),v.defineProperty(n.prototype,"location",{get:function(){return this.xx},set:function(t){if(1&this.flags)throw new c("The moov containment flag is set, a DataEntryUrlBox should be used instead.");this.xx=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))}}(_u),function(t){function n(){return t.call(this,"dinf")||this}uu(n,t)}(ts),function(t){function n(n,i,e){var r=t.call(this,n)||this;if(r.version=i,!gu(i,8))throw new c("the provided version cannot fit in 8 bits.");return r.flags=e,r}return uu(n,t),v.defineProperty(n.prototype,"flags",{get:function(){return this.Kd},set:function(t){this.Kd=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return 4},n.prototype.serializeFlags=function(t){if("number"!=typeof this.flags)throw new c("Missing custom serializeFlags method.");t.writer.writeUInt(this.flags,24)},n.prototype.serializeBoxContent=function(t){t.writer.writeByte(this.version),this.serializeFlags(t)},n}(Qu)),rs=(function(t){function n(){return t.call(this,"dref",0,0)||this}uu(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)}}(es),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 uu(n,t),v.defineProperty(n.prototype,"bitSize",{get:function(){return 0===this.version?32:64},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"entries",{get:function(){return this.bx},set:function(t){for(var n=0,i=t;n<i.length;n++){var e=i[n];if(!gu(e.segmentDuration,this.bitSize))throw new c("SegmentDuration of one of the entries does not fit in ".concat(this.bitSize," bits."));if(!gu(e.mediaTime,this.bitSize))throw new c("MediaTime of one of the entries does not fit in ".concat(this.bitSize," bits."));if(!gu(e.mediaRateInteger,16))throw new c("Provided mediaRateInteger does not fit in 16 bits.");if(e.mediaRateFraction&&!gu(e.mediaRateFraction,16))throw new c("Provided mediaRateFraction does not fit in 16 bits.")}this.bx=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}(_u)),os=function(t){function n(n,i){return void 0===i&&(i=0),t.call(this,n,0,i)||this}return uu(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}(rs),us=function(t){function n(n,i){return void 0===i&&(i=0),t.call(this,n,1,i)||this}return uu(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}(rs);function ss(t){for(var n=t.data,i=Hu(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 os(u,r.raw):new us(u,r.raw)}var fs=function(t){function n(){return t.call(this,"edts")||this}return uu(n,t),n}(ts);function hs(t){for(var n=new fs,i=0,e=qu(t.data);i<e.length;i++){var r=e[i];zu(r,"elst")?n.boxes.push(ss(r)):n.boxes.push(Ku(r))}return n}var cs=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 uu(n,t),v.defineProperty(n.prototype,"majorBrand",{get:function(){return this.Cx},set:function(t){if(4!==t.length)throw new c("the provided major brand does not conform to the 4 character requirement");this.Cx=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"minorVersion",{get:function(){return this.Ox},set:function(t){if(!gu(t,32))throw new c("the provided minor version does not fit in 32 bits.");this.Ox=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"compatibleBrands",{get:function(){return this.jx},set:function(t){if(t.some((function(t){return 4!==t.length})))throw new c("Some of the compatible brands do not conform to the 4 character requirement");this.jx=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}(bu),as=(function(t){function n(n,i,e){return t.call(this,"ftyp",n,i,e)||this}uu(n,t)}(cs),function(t){function n(n,i){void 0===i&&(i="free");var e=t.call(this,i)||this;return e.data=n,e}uu(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(du.from(this.data))}}(bu),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 uu(n,t),v.defineProperty(n.prototype,"creationTime",{get:function(){return this.Rx},set:function(t){if(!gu(t,this.bitSize))throw new c("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.Rx=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"modificationTime",{get:function(){return this.Px},set:function(t){if(!gu(t,this.bitSize))throw new c("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.Px=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"timescale",{get:function(){return this.zx},set:function(t){if(!gu(t,32))throw new c("Provided sequence number does not fit in 32 bits.");this.zx=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"duration",{get:function(){return this.Bx},set:function(t){if(!gu(t,this.bitSize))throw new c("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.Bx=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"language",{get:function(){return this.Ux},set:function(t){if(!ws(t))throw new c("Expected an ISO-639-2/T language code");this.Ux=t},enumerable:!1,configurable:!0}),v.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}(_u)),vs=function(t){function n(n,i,e){return void 0===e&&(e=0),t.call(this,n,i,0,e)||this}return uu(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}(as),ds=function(t){function n(n,i,e){return void 0===e&&(e=0),t.call(this,n,i,1,e)||this}return uu(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}(as);function ls(t){var n=t.data,i=Hu(n.nextUint32()),e=i.version,r=i.flags,o=Xu(n,e),u=new au(du.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 ws(h)||(h="und"),n.skip(2),0===e?new vs(o,h,r.raw):new ds(o,h,r.raw)}function ws(t){return/^[a-z]{3}$/.test(t)}var bs=function(t){function n(){return t.call(this,"mdia")||this}return uu(n,t),n}(ts);function gs(t){for(var n=new bs,i=0,e=qu(t.data);i<e.length;i++){var r=e[i];zu(r,"mdhd")?n.boxes.push(ls(r)):zu(r,"hdlr")?n.boxes.push($u(r)):n.boxes.push(Ku(r))}return n}var ms;(function(t){function n(){var n=t.call(this,"mdat")||this;return n.data=new du,n}uu(n,t),n.prototype.getBoxContentSize=function(){return this.data.length},n.prototype.serializeBoxContent=function(t){t.concat(this.data)}})(bu),function(t){function n(){return t.call(this,"minf")||this}uu(n,t)}(ts),function(t){function n(n){var i=t.call(this,"meta",0,0)||this;return i.handler=n,i}uu(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())}}(es);!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"}(ms||(ms={}));var ps,ys,_s={a:1,b:0,u:0,c:0,d:1,v:0,x:0,y:0,w:1};function Ss(t,n){n.writer.writeUInt(mu(t.a,16),32),n.writer.writeUInt(mu(t.b,16),32),n.writer.writeUInt(mu(0,30),32),n.writer.writeUInt(mu(t.c,16),32),n.writer.writeUInt(mu(t.d,16),32),n.writer.writeUInt(mu(0,30),32),n.writer.writeUInt(mu(t.x,16),32),n.writer.writeUInt(mu(t.y,16),32),n.writer.writeUInt(mu(1,30),32)}function Ts(t,n){var i,e,r,o;n.writer.writeUInt(null!==(i=t.isLeading)&&void 0!==i?i:ps.UNKNOWN,2),n.writer.writeUInt(null!==(e=t.sampleDependsOn)&&void 0!==e?e:ys.UNKNOWN,2),n.writer.writeUInt(null!==(r=t.sampleIsDependedOn)&&void 0!==r?r:ys.UNKNOWN,2),n.writer.writeUInt(null!==(o=t.sampleHasRedundancy)&&void 0!==o?o:ys.UNKNOWN,2)}function Es(t,n){var i,e,r;n.writer.writeUInt(0,4),Ts(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)}!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"}(ps||(ps={})),function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.YES=1]="YES",t[t.NO=2]="NO",t[t.RESERVED=3]="RESERVED"}(ys||(ys={}));var Is=function(){},ks=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 uu(n,t),v.defineProperty(n.prototype,"systemId",{get:function(){return this.Qx},set:function(t){if(16!==t.length)throw new c("Provided systemId length is not 16.");this.Qx=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"data",{get:function(){return this.Fx},set:function(t){if(!gu(t.length,32))throw new c("Provided data length does not fit in 32 bits.");this.Fx=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(du.from(this.systemId)),this.serializeVersionBoxContent(n),n.writer.writeUInt(this.data.length,32),n.concat(du.from(this.data))},n}(_u),Rs=function(t){function n(n,i){return t.call(this,0,n,i)||this}return uu(n,t),n}(ks),Os=function(t){function n(n,i,e){var r=t.call(this,1,n,i)||this;return r.kIds=e,r}return uu(n,t),v.defineProperty(n.prototype,"kIds",{get:function(){return this.Yx},set:function(t){if(!gu(t.length,32))throw new c("Provided kIds length cannot fit in 32 bits.");if(t.some((function(t){return 16!==t.length})))throw new c("Not all provided key ids are 16 bytes long.");this.Yx=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(du.from(e))}},n}(ks);function Ns(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 Os(i,s,e):new Rs(i,s)}var Ps=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 uu(n,t),v.defineProperty(n.prototype,"bitSize",{get:function(){return 0===this.version?32:64},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"fragmentDuration",{get:function(){return this.Gx},set:function(t){if(!gu(t,this.bitSize))throw new c("The provided fragmentDuration does not fit in ".concat(this.bitSize," bits."));this.Gx=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.bitSize/8},n}(_u),As=function(t){function n(n,i){return void 0===i&&(i=0),t.call(this,n,0,i)||this}return uu(n,t),n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.fragmentDuration,32)},n}(Ps),Ds=function(t){function n(n,i){return void 0===i&&(i=0),t.call(this,n,1,i)||this}return uu(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}(Ps);function Cs(t){var n=t.data,i=Hu(n.nextUint32()),e=i.version,r=i.flags;return 0===e?new As(n.nextUint32(),r.raw):new Ds(n.nextUint64(),r.raw)}var xs=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 uu(n,t),v.defineProperty(n.prototype,"trackId",{get:function(){return this.Vx},set:function(t){if(!gu(t,32))throw new c("Provided track id does not fit in 32 bits.");this.Vx=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"defaultSampleDescriptionIndex",{get:function(){return this.Wx},set:function(t){if(!gu(t,32))throw new c("Provided default sample description index does not fit in 32 bits.");this.Wx=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"defaultSampleDuration",{get:function(){return this.Hx},set:function(t){if(!gu(t,32))throw new c("Provided default sample duration does not fit in 32 bits.");this.Hx=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"defaultSampleSize",{get:function(){return this.Xx},set:function(t){if(!gu(t,32))throw new c("Provided default sample size does not fit in 32 bits.");this.Xx=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"defaultSampleFlags",{get:function(){return this.Zx},set:function(t){if((null==t?void 0:t.samplePaddingValue)&&!gu(t.samplePaddingValue,3))throw new c("Provided sample padding value does not fit in 3 bits.");if((null==t?void 0:t.sampleDegradationPriority)&&!gu(t.sampleDegradationPriority,16))throw new c("Provided sample degradation priority does not fit in 16 bits.");this.Zx=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),Es(null!==(i=this.defaultSampleFlags)&&void 0!==i?i:{},n)},n}(_u);function Bs(t){var n=t.data,i=Hu(n.nextUint32()),e=i.version,r=i.flags,o=n.nextUint32(),u=n.nextUint32(),s=n.nextUint32(),f=n.nextUint32(),h=ju(new au(du.from(n.nextUint8Array(4))));return new xs(o,{sampleDescriptionIndex:u,sampleDuration:s,sampleSize:f,sampleFlags:h},e,r.raw)}var Ms=function(t){function n(){return t.call(this,"mvex")||this}return uu(n,t),n}(ts);function Ls(t){for(var n=new Ms,i=0,e=qu(t.data);i<e.length;i++){var r=e[i];zu(r,"mehd")?n.boxes.push(Cs(r)):zu(r,"trex")?n.boxes.push(Bs(r)):n.boxes.push(Ku(r))}return n}var Us=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:_s,c.qx=e,c}return uu(n,t),v.defineProperty(n.prototype,"bitSize",{get:function(){return 0===this.version?32:64},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"creationTime",{get:function(){return this.Rx},set:function(t){if(!gu(t,this.bitSize))throw new c("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.Rx=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"modificationTime",{get:function(){return this.Px},set:function(t){if(!gu(t,this.bitSize))throw new c("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.Px=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"timescale",{get:function(){return this.zx},set:function(t){if(!gu(t,32))throw new c("Provided sequence number does not fit in 32 bits.");this.zx=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"duration",{get:function(){return this.Bx},set:function(t){if(!gu(t,this.bitSize))throw new c("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.Bx=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"rate",{get:function(){return this.Kx},set:function(t){if(!gu(mu(t,16),32))throw new c("Provided rate does not fit in 32 bits (fixed 16.16).");this.Kx=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"volume",{get:function(){return this.Jx},set:function(t){if(!gu(mu(t,8),16))throw new c("Provided volume does not fit in 16 bits (fixed 8.8).");this.Jx=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"matrix",{get:function(){return this.$x},set:function(t){if(0!==t.u||0!==t.v||1!==t.w)throw new c("(u, v, w) does not match the required (0, 0, 1)");this.$x=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"nextTrackId",{get:function(){return this.qx},set:function(t){if(0===t)throw new c("NextTrackId cannot be 0.");if(!gu(t,32))throw new c("NextTrackId cannot exceed 32 bits.");this.qx=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(mu(this.rate,16),32),n.writer.writeUInt(mu(this.volume,8),16),n.writer.writeUInt(0,16),n.writer.writeUInt(0,32),n.writer.writeUInt(0,32),Ss(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}(_u),Fs=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 uu(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}(Us),zs=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 uu(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}(Us);function Ws(t){var n=t.data,i=Hu(n.nextUint32()),e=i.version,r=i.flags,o=Xu(n,e),u=yu(n.nextUint32(),16),s=yu(n.nextUint16(),8);n.skip(2),n.skip(8);var f=Yu(n);n.skip(24);var h=n.nextUint32();return 0===e?new Fs(o,h,{rate:u,volume:s,matrix:f},r.raw):new zs(o,h,{rate:u,volume:s,matrix:f},r.raw)}var qs=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:_s,a}return uu(n,t),v.defineProperty(n.prototype,"bitSize",{get:function(){return 0===this.version?32:64},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"creationTime",{get:function(){return this.Rx},set:function(t){if(!gu(t,this.bitSize))throw new c("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.Rx=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"modificationTime",{get:function(){return this.Px},set:function(t){if(!gu(t,this.bitSize))throw new c("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.Px=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"trackId",{get:function(){return this.Vx},set:function(t){if(0===t)throw new c("trackId cannot be 0.");if(!gu(t,32))throw new c("trackId cannot exceed 32 bits.");this.Vx=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"duration",{get:function(){return this.Bx},set:function(t){if(!gu(t,this.bitSize))throw new c("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.Bx=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"volume",{get:function(){return this.Jx},set:function(t){if(!gu(mu(t,8),16))throw new c("Provided volume does not fit in 16 bits (fixed 8.8).");this.Jx=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"width",{get:function(){return this.tC},set:function(t){if(!gu(mu(t,16),32))throw new c("Provided width does not fit in 32 bits (fixed 16.16).");this.tC=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"height",{get:function(){return this.iC},set:function(t){if(!gu(mu(t,16),32))throw new c("Provided height does not fit in 32 bits (fixed 16.16).");this.iC=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"layer",{get:function(){return this.eC},set:function(t){if(!gu(t,16))throw new c("Provided layer does not fit in 16 bits.");this.eC=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"alternateGroup",{get:function(){return this.sC},set:function(t){if(!gu(t,16))throw new c("Provided alternateGroup does not fit in 16 bits.");this.sC=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"matrix",{get:function(){return this.$x},set:function(t){if(0!==t.u||0!==t.v||1!==t.w)throw new c("(u, v, w) does not match the required (0, 0, 1)");this.$x=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(mu(this.volume,8),16),n.writer.writeUInt(0,16),Ss(this.matrix,n),n.writer.writeUInt(mu(this.width,16),32),n.writer.writeUInt(mu(this.height,16),32)},n}(_u),Vs=function(t){function n(n,i,e,r,o,u){return t.call(this,0,n,i,e,r,o,u)||this}return uu(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}(qs),Hs=function(t){function n(n,i,e,r,o,u){return t.call(this,1,n,i,e,r,o,u)||this}return uu(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}(qs);function Xs(t){var n,i,e,r,o=t.data,u=Hu(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=yu(o.nextInt16(),8);o.skip(2);var b=Yu(o),g=yu(o.nextUint32(),16),m=yu(o.nextUint32(),16);return 0===s?new Vs({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 Hs({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 js=function(t){function n(){return t.call(this,"trak")||this}return uu(n,t),n}(ts);function Ys(t){for(var n=new js,i=0,e=qu(t.data);i<e.length;i++){var r=e[i];zu(r,"tkhd")?n.boxes.push(Xs(r)):zu(r,"mdia")?n.boxes.push(gs(r)):zu(r,"edts")?n.boxes.push(hs(r)):n.boxes.push(Ku(r))}return n}var Ks=function(t){function n(){return t.call(this,"moov")||this}return uu(n,t),n}(ts);var Gs=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 uu(n,t),v.defineProperty(n.prototype,"bitSize",{get:function(){return 0===this.version?32:64},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"baseMediaDecodeTime",{get:function(){return this.nC},set:function(t){if(!gu(t,this.bitSize))throw new c("Provided baseMediaDecodeTime does not fit in ".concat(this.bitSize," bits."));this.nC=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.bitSize/8},n}(_u),$s=function(t){function n(n,i){return void 0===i&&(i=0),t.call(this,n,0,i)||this}return uu(n,t),n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.baseMediaDecodeTime,32)},n}(Gs),Zs=function(t){function n(n,i){return void 0===i&&(i=0),t.call(this,n,1,i)||this}return uu(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}(Gs);function Js(t){var n=t.data,i=Hu(n.nextUint32()),e=i.version,r=i.flags;return 0===e?new $s(n.nextUint32(),r.raw):new Zs(n.nextUint64(),r.raw)}var Qs=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 uu(n,t),v.defineProperty(n.prototype,"trackId",{get:function(){return this.Vx},set:function(t){if(!gu(t,32))throw new c("Provided track id does not fit in 32 bits.");this.Vx=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"baseDataOffset",{get:function(){return this.rC},set:function(t){if(void 0===t&&this.flags.baseDataOffsetPresent)throw new c("The base data offset present flag is set.");if(void 0!==t&&!this.flags.baseDataOffsetPresent)throw new c("The base data offset present flag is not set.");if(t&&!gu(t,64))throw new c("Provided baseDataOffset does not fit in 32 bits.");this.rC=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"sampleDescriptionIndex",{get:function(){return this.oC},set:function(t){if(void 0===t&&this.flags.sampleDescriptionIndexPresent)throw new c("The sample description index flag is set.");if(void 0!==t&&!this.flags.sampleDescriptionIndexPresent)throw new c("The sample description index flag is not set.");if(t&&!gu(t,32))throw new c("Provided sampleDescriptionIndex does not fit in 32 bits.");this.oC=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"defaultSampleDuration",{get:function(){return this.Hx},set:function(t){if(void 0===t&&this.flags.defaultSampleDurationPresent)throw new c("The default sample duration present flag is set.");if(void 0!==t&&!this.flags.defaultSampleDurationPresent)throw new c("The default sample duration present flag is not set.");if(t&&!gu(t,32))throw new c("Provided defaultSampleDuration does not fit in 32 bits.");this.Hx=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"defaultSampleSize",{get:function(){return this.Xx},set:function(t){if(void 0===t&&this.flags.defaultSampleSizePresent)throw new c("The default sample size present flag is set.");if(void 0!==t&&!this.flags.defaultSampleSizePresent)throw new c("The default sample size present flag is not set.");if(t&&!gu(t,32))throw new c("Provided defaultSampleSize does not fit in 32 bits.");this.Xx=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"defaultSampleFlags",{get:function(){return this.Zx},set:function(t){if(void 0===t&&this.flags.defaultSampleFlagsPresent)throw new c("The default sample flags present flag is set.");if(void 0!==t&&!this.flags.defaultSampleFlagsPresent)throw new c("The default sample flags present flag is not set.");if((null==t?void 0:t.samplePaddingValue)&&!gu(t.samplePaddingValue,3))throw new c("Provided sample padding value does not fit in 3 bits.");if((null==t?void 0:t.sampleDegradationPriority)&&!gu(t.sampleDegradationPriority,16))throw new c("Provided sample degradation priority does not fit in 16 bits.");this.Zx=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&&Es(this.defaultSampleFlags,n)},n}(_u);function tf(t){var n=t.data,i=n.nextUint8(),e=new au(du.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?ju(new au(du.from(n.nextUint8Array(4)))):void 0;return new Qs({trackId:a,defaultBaseIsMoof:r,durationIsEmpty:o,baseDataOffset:v,sampleDescriptionIndex:d,defaultSampleDuration:l,defaultSampleSize:w,defaultSampleFlags:b},i)}var nf=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 uu(n,t),v.defineProperty(n.prototype,"dataOffset",{get:function(){return this.hC},set:function(t){if(t&&!gu(t,32))throw new c("Provided data offset does not fit in 32 bits.");this.hC=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"firstSampleFlags",{get:function(){return this.aC},set:function(t){if((null==t?void 0:t.samplePaddingValue)&&!gu(t.samplePaddingValue,3))throw new c("Provided sample padding value does not fit in 3 bits.");if((null==t?void 0:t.sampleDegradationPriority)&&!gu(t.sampleDegradationPriority,16))throw new c("Provided sample degradation priority does not fit in 16 bits.");this.aC=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"samples",{get:function(){return this.uC},set:function(t){var n,i;if(!gu(t.length,32))throw new c("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 c("The sample duration present flag is set.");if(void 0!==o.duration&&!this.flags.sampleDurationPresent)throw new c("The sample duration present flag is not set.");if(o.duration&&!gu(o.duration,32))throw new c("Provided sample duration does not fit in 32 bits.");if(void 0===o.size&&this.flags.sampleSizePresent)throw new c("The sample size present flag is set.");if(void 0!==o.size&&!this.flags.sampleSizePresent)throw new c("The sample size present flag is not set.");if(o.size&&!gu(o.size,32))throw new c("Provided sample size does not fit in 32 bits.");if(void 0===o.flags&&this.flags.sampleFlagsPresent)throw new c("The sample flags present flag is set.");if(void 0!==o.flags&&!this.flags.sampleFlagsPresent)throw new c("The sample flags present flag is not set.");if((null===(n=o.flags)||void 0===n?void 0:n.samplePaddingValue)&&!gu(o.flags.samplePaddingValue,3))throw new c("Provided sample padding value does not fit in 3 bits.");if((null===(i=o.flags)||void 0===i?void 0:i.sampleDegradationPriority)&&!gu(o.flags.sampleDegradationPriority,16))throw new c("Provided sample degradation priority does not fit in 16 bits.");if(void 0===o.compositionTimeOffset&&this.flags.sampleCompositionTimeOffsetsPresent)throw new c("The sample compositionTimeOffset present flag is set.");if(void 0!==o.compositionTimeOffset&&!this.flags.sampleCompositionTimeOffsetsPresent)throw new c("The sample compositionTimeOffset present flag is not set.");if(o.compositionTimeOffset&&!gu(o.compositionTimeOffset,32))throw new c("Provided sample compositionTimeOffset does not fit in 32 bits.")}this.uC=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&&Es(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&&Es(r.flags,n),this.flags.sampleCompositionTimeOffsetsPresent&&(0===this.version?n.writer.writeUInt(r.compositionTimeOffset,32):n.writer.writeInt(r.compositionTimeOffset,32))}},n}(_u);function ef(t){var n=t.data,i=n.nextUint8(),e=new au(du.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=ju(new au(du.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=ju(new au(du.from(n.nextUint8Array(4))))),r&&(l.compositionTimeOffset=0===i?n.nextUint32():n.nextInt32()),v.push(l)}return new nf(i,a,v)}var rf=function(t){function n(){return t.call(this,"traf")||this}return uu(n,t),n}(ts);function of(t){for(var n=new rf,i=0,e=qu(t.data);i<e.length;i++){var r=e[i];zu(r,"tfhd")?n.boxes.push(tf(r)):zu(r,"tfdt")?n.boxes.push(Js(r)):zu(r,"trun")?n.boxes.push(ef(r)):n.boxes.push(Ku(r))}return n}var uf=function(t){function n(){return t.call(this,"moof")||this}return uu(n,t),n}(ts);!function(t){function n(n){var i=t.call(this,"mfhd",0,0)||this;return i.sequenceNumber=n,i}uu(n,t),v.defineProperty(n.prototype,"sequenceNumber",{get:function(){return this.cC},set:function(t){if(!gu(t,32))throw new c("Provided sequence number does not fit in 32 bits.");this.cC=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)}}(_u);var sf=function(t){function n(n){var i=t.call(this,"frma")||this;return i.codingName=n,i}return uu(n,t),v.defineProperty(n.prototype,"codingName",{get:function(){return this.lC},set:function(t){if(4!==t.length)throw new c("Provided coding name was not 4 characters long.");this.lC=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return 4},n.prototype.serializeBoxContent=function(t){t.writer.writeString(this.codingName)},n}(bu),ff=(function(t){function n(n,i){var e=t.call(this,"pasp")||this;return e.hSpacing=n,e.vSpacing=i,e}uu(n,t),v.defineProperty(n.prototype,"hSpacing",{get:function(){return this.dC},set:function(t){if(!gu(t,32))throw new c("Provided hSpacing does not fit in 32 bits.");this.dC=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"vSpacing",{get:function(){return this.fC},set:function(t){if(!gu(t,32))throw new c("Provided vSpacing does not fit in 32 bits.");this.fC=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)}}(bu),function(t){function n(n,i,e){var r=t.call(this,n)||this;return r.sample=i,r.sinf=e,r}uu(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())}}(ts),function(t){function n(n,i,e){var r=t.call(this,"sinf")||this;return r.schm=i,r.schi=e,r.frma=new sf(n),r}uu(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())}}(bu),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 uu(n,t),v.defineProperty(n.prototype,"bitSize",{get:function(){return 0===this.version?32:64},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"entries",{get:function(){return this.bx},set:function(t){var n=this;if(!gu(t.length,32))throw new c("Number of entries provided does not fit in 32 bits.");if(t.some((function(t){return!gu(t,n.bitSize)})))throw new c("Not all provided entries fit in ".concat(this.bitSize," bits."));this.bx=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"explicitAuxInfoType",{get:function(){return this._C},set:function(t){if(void 0===t)this.flags=0;else{if(!gu(t.auxInfoType,32))throw new c("Provided auxInfoType does not fit in 32 bits.");if(!gu(t.auxInfoTypeParameter,32))throw new c("Provided auxInfoTypeParameter does not fit in 32 bits.");this.flags=1}this._C=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}(_u)),hf=(function(t){function n(){return null!==t&&t.apply(this,arguments)||this}uu(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)}}}(ff),function(t){function n(){return null!==t&&t.apply(this,arguments)||this}uu(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)}}}(ff),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}uu(n,t),v.defineProperty(n.prototype,"defaultSampleInfoSize",{get:function(){return this.gC},set:function(t){if(!gu(t,8))throw new c("Provided defaultSampleInfoSize does not fit in a single byte.");this.gC=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"sampleInfoSizes",{get:function(){return this.wC},set:function(t){if(!gu(t.length,32))throw new c("Number of sampleInfoSizes provided does not fit in 32 bits.");if(t.some((function(t){return!gu(t,8)})))throw new c("Not all provided sampleInfoSizes fit in a byte.");this.wC=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"explicitAuxInfoType",{get:function(){return this._C},set:function(t){if(void 0===t)this.flags=0;else{if(!gu(t.auxInfoType,32))throw new c("Provided auxInfoType does not fit in 32 bits.");if(!gu(t.auxInfoTypeParameter,32))throw new c("Provided auxInfoTypeParameter does not fit in 32 bits.");this.flags=1}this._C=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 c("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)}}}(_u),function(t){function n(n){var i=t.call(this,"sdtp",0,0)||this;return i.samples=n,i}uu(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++){Ts(e[i],n)}}}(_u),function(t){function n(n){return t.call(this,"stsd",n,0)||this}uu(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)}}(es),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 uu(n,t),v.defineProperty(n.prototype,"groupingType",{get:function(){return this.vC},set:function(t){if(4!==t.length)throw new c("The provided groupingType does not equal 4 characters.");this.vC=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}(_u)),cf=(function(t){function n(n,i){return t.call(this,0,n,i)||this}uu(n,t),n.prototype.serializeVersionBoxContent=function(t){}}(hf),function(t){function n(n,i,e){var r=t.call(this,1,n,e)||this;return r.defaultLength=i,r}uu(n,t),v.defineProperty(n.prototype,"defaultLength",{get:function(){return this.mC},set:function(t){if(!gu(t,32))throw new c("The provided defaultLength does not fit in 32 bits.");this.mC=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)}}(hf),function(t){function n(n,i,e,r){void 0===r&&(r=0);var o=this;if(n<2)throw new c("This constructor is only meant for versions 2 and up.");return(o=t.call(this,n,i,e)||this).defaultSampleDescriptionIndex=r,o}uu(n,t),v.defineProperty(n.prototype,"defaultSampleDescriptionIndex",{get:function(){return this.Wx},set:function(t){if(!gu(t,32))throw new c("The provided defaultSampleDescriptionIndex does not fit in 32 bits.");this.Wx=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)}}(hf),function(t){function n(n){void 0===n&&(n=[]);var i=t.call(this,"stsz",0,0)||this;return i.sampleSizes=n,i}uu(n,t),v.defineProperty(n.prototype,"sampleSizes",{get:function(){return this.pC},set:function(t){if(!gu(t.length,32))throw new c("Number of allowed samples cannot fit in 32 bits.");if(t.some((function(t){return!gu(t,32)})))throw new c("Not all sampleSizes can be represented in 32 bits.");this.pC=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)}}}(_u),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}uu(n,t),v.defineProperty(n.prototype,"defaultSampleSize",{get:function(){return this.Xx},set:function(t){if(!gu(t,32))throw new c("Provided defaultSampleSize does not fit in 32 bits.");this.Xx=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"samples",{get:function(){return this.uC},set:function(t){if(!gu(t,32))throw new c("Number of allowed samples cannot fit in 32 bits.");this.uC=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)}}(_u),function(t){function n(){return t.call(this,"stbl")||this}uu(n,t)}(ts),function(t){function n(n){var i=t.call(this,"stsc",0,0)||this;return i.entries=n,i}uu(n,t),v.defineProperty(n.prototype,"entries",{get:function(){return this.bx},set:function(t){if(!gu(t.length,32))throw new c("Number of allowed entries cannot fit in 32 bits.");if(t.some((function(t){return!gu(t.firstChunk,32)||!gu(t.sampleDescriptionIndex,32)||!gu(t.samplesPerChunk,32)})))throw new c("Not all entries can be represented in 96 bits.");this.bx=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)}}}(_u),function(t){function n(){return t.call(this,"schi")||this}uu(n,t)}(ts),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}uu(n,t),v.defineProperty(n.prototype,"schemeType",{get:function(){return this.AC},set:function(t){if(4!==t.length)throw new c("The provided schemeType does not have a length of 4.");this.AC=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"schemeVersion",{get:function(){return this.yC},set:function(t){if(!gu(t,32))throw new c("The provided schemeVersion does not fit in 23 bits.");this.yC=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"schemeUri",{get:function(){return this.MC},set:function(t){if(t&&4!==t.length)throw new c("The provided schemeUri does not have a length of 4.");this.flags=void 0===t?0:1,this.MC=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))}}(_u),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 uu(n,t),v.defineProperty(n.prototype,"bitSize",{get:function(){return 0===this.version?32:64},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"referenceId",{get:function(){return this.bC},set:function(t){if(!gu(t,32))throw new c("Provided referenceId does not fit in 32 bits.");this.bC=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"timescale",{get:function(){return this.zx},set:function(t){if(!gu(t,32))throw new c("Provided timescale does not fit in 32 bits.");this.zx=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"earliestPresentationTime",{get:function(){return this.TC},set:function(t){if(!gu(t,this.bitSize))throw new c("Provided earliestPresentationTime does not fit in ".concat(this.bitSize," bits."));this.TC=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"firstOffset",{get:function(){return this.SC},set:function(t){if(!gu(t,this.bitSize))throw new c("Provided timescale does not fit in ".concat(this.bitSize," bits."));this.SC=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"references",{get:function(){return this.NC},set:function(t){if(!gu(t.length,16))throw new c("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(!gu(e.referencedSize,31))throw new c("Provided referenced size does not fit in 31 bits.");if(!gu(e.subsegmentDuration,32))throw new c("Provided subsegment duration does not fit in 31 bits.");if(!gu(e.sapType,3))throw new c("Provided SAP type does not fit in 3 bits.");if(!gu(e.sapDeltaTime,28))throw new c("Provided SAP delta time does not fit in 28 bits.")}this.NC=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}(_u)),af=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 uu(n,t),n.prototype.serializeSidxBoxContent=function(t){t.writer.writeUInt(this.earliestPresentationTime,32),t.writer.writeUInt(this.firstOffset,32)},n}(cf),vf=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 uu(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}(cf);(function(t){function n(n,i,e){return t.call(this,"styp",n,i,e)||this}uu(n,t)})(cs),function(t){function n(n){void 0===n&&(n=0);var i=t.call(this,"smhd",0,0)||this;return i.balance=n,i}uu(n,t),v.defineProperty(n.prototype,"balance",{get:function(){return this.IC},set:function(t){if(t<-1||t>1)throw new c("Provided balance does not fit in the allowed range [-1, 1].");if(!gu(mu(t,8),16))throw new c("Provided balance does not fit in 16 bits (fixed 8.8).");this.IC=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(mu(this.balance,8),16),n.writer.writeUInt(0,16)}}(_u),function(t){function n(n){var i=t.call(this,"stss",0,0)||this;return i.entries=n,i}uu(n,t),v.defineProperty(n.prototype,"entries",{get:function(){return this.bx},set:function(t){if(!gu(t.length,32))throw new c("Number of allowed entries cannot fit in 32 bits.");if(t.some((function(t){return!gu(t,32)})))throw new c("Not all entries can be represented in 32 bits.");this.bx=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)}}}(_u),function(t){function n(n){var i=t.call(this,"stts",0,0)||this;return i.entries=n,i}uu(n,t),v.defineProperty(n.prototype,"entries",{get:function(){return this.bx},set:function(t){if(!gu(t.length,32))throw new c("Number of allowed entries cannot fit in 32 bits.");if(t.some((function(t){return!gu(t.sampleCount,32)||!gu(t.sampleDelta,32)})))throw new c("Not all entries can be represented in 64 bits.");this.bx=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)}}}(_u),function(t){function n(n){var i=t.call(this,"trep",0,0)||this;return i.trackId=n,i}uu(n,t),v.defineProperty(n.prototype,"trackId",{get:function(){return this.Vx},set:function(t){if(!gu(t,32))throw new c("The provided trackId does not fit in 32 bits.");this.Vx=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)}}(es),function(t){function n(){return t.call(this,"udta")||this}uu(n,t)}(ts);var df={red:0,green:0,blue:0},lf=(function(t){function n(n,i){void 0===n&&(n=0),void 0===i&&(i=df);var e=t.call(this,"vmhd",0,1)||this;return e.graphicsMode=n,e.opColor=i,e}uu(n,t),v.defineProperty(n.prototype,"opColor",{get:function(){return this.DC},set:function(t){if(!gu(t.red,16)||!gu(t.green,16)||!gu(t.blue,16))throw new c("Not all colors could be represented in 16 bits.");this.DC=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)}}(_u),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 uu(n,t),v.defineProperty(n.prototype,"width",{get:function(){return this.tC},set:function(t){if(!gu(t,16))throw new c("Provided width does not fit in 16 bits.");this.tC=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"height",{get:function(){return this.iC},set:function(t){if(!gu(t,16))throw new c("Provided height does not fit in 16 bits.");this.iC=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"horizontalResolution",{get:function(){return this.EC},set:function(t){if(!gu(mu(t,16),32))throw new c("Provided horizontalResolution does not fit in 32 bits (fixed 16.16).");this.EC=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"verticalResolution",{get:function(){return this.kC},set:function(t){if(!gu(mu(t,16),32))throw new c("Provided verticalResolution does not fit in 32 bits (fixed 16.16).");this.kC=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"compressorName",{get:function(){return this.LC},set:function(t){if(t.length>31)throw new c("The provided compressorName should at most be 31 characters long.");this.LC=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"frameCount",{get:function(){return this.xC},set:function(t){if(!gu(t,16))throw new c("Provided frameCount does not fit in 16 bits.");this.xC=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"depth",{get:function(){return this.OC},set:function(t){if(!gu(t,16))throw new c("Provided depth does not fit in 16 bits.");this.OC=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(mu(this.horizontalResolution,16),32),n.writer.writeUInt(mu(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&&pu(n.writer,this.extra)},n}(ns)),wf=(function(t){function n(n){var i=t.call(this,"esds",0,0)||this;return i.esDescriptor=n,i}uu(n,t),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+(this.esDescriptor instanceof g?this.esDescriptor.length:this.esDescriptor.getSize())},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),this.esDescriptor instanceof g?n.concat(du.from(this.esDescriptor)):this.esDescriptor.serialize(n)}}(_u),function(t){function n(n,i,e){var r=t.call(this,"mp4a",n,e)||this;return r.esd=i,r}uu(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())}}(is),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}uu(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)}}(lf),function(t){function n(n,i){var e=t.call(this,"mp4s",n)||this;return e.esDescriptor=i,e}uu(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)}}(ns),function(t){function n(n){var i=t.call(this,"avcC")||this;return i.decoderConfig=n,i}uu(n,t),n.prototype.getBoxContentSize=function(){return this.decoderConfig.getSize()},n.prototype.serializeBoxContent=function(t){this.decoderConfig.serialize(t)}}(bu),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}v.defineProperty(t.prototype,"version",{get:function(){return this.jC},set:function(t){if(!gu(t,8))throw new c("Provided version does not fit in 8 bits.");this.jC=t},enumerable:!1,configurable:!0}),v.defineProperty(t.prototype,"profileIndication",{get:function(){return this.RC},set:function(t){if(!gu(t,8))throw new c("Provided profileIndication does not fit in 8 bits.");this.RC=t},enumerable:!1,configurable:!0}),v.defineProperty(t.prototype,"profileCompatibility",{get:function(){return this.zC},set:function(t){if(!gu(t,8))throw new c("Provided profileCompatibility does not fit in 8 bits.");this.zC=t},enumerable:!1,configurable:!0}),v.defineProperty(t.prototype,"levelIndication",{get:function(){return this.BC},set:function(t){if(!gu(t,8))throw new c("Provided levelIndication does not fit in 8 bits.");this.BC=t},enumerable:!1,configurable:!0}),v.defineProperty(t.prototype,"spsSets",{get:function(){return this.QC},set:function(t){if(!gu(t.length,5))throw new c("Provided number of spsSets exceeds the max (32)");this.QC=t},enumerable:!1,configurable:!0}),v.defineProperty(t.prototype,"ppsSets",{get:function(){return this.FC},set:function(t){if(!gu(t.length,8))throw new c("Provided number of ppsSets exceeds the max (256)");this.FC=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(du.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(du.from(u))}}}(),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}uu(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())}}(lf),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}uu(n,t),v.defineProperty(n.prototype,"bufferSizeDb",{get:function(){return this.hx},set:function(t){if(!gu(t,32))throw new c("Provided bufferSizeDb does not fit in 32 bits.");this.hx=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"max",{get:function(){return this.yf},set:function(t){if(!gu(t,32))throw new c("Provided max does not fit in 32 bits.");this.yf=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"avg",{get:function(){return this.YC},set:function(t){if(!gu(t,32))throw new c("Provided avg does not fit in 32 bits.");this.YC=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)}}(bu),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 c("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 g(0),s}return uu(n,t),v.defineProperty(n.prototype,"isProtected",{get:function(){return this.GC},set:function(t){if(!gu(t,8))throw new c("Provided isProtected does not fit in 1 byte.");this.GC=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"perSampleIvSize",{get:function(){return this.VC},set:function(t){if(![8,16].includes(t))throw new c("Provided perSampleIvSize does not match any allowed value [8, 16].");this.VC=t,this.WC=new g(0)},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"kId",{get:function(){return this.HC},set:function(t){if(16!==t.length)throw new c("Provided kId length is not 16.");this.HC=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"constantIv",{get:function(){return this.WC},set:function(t){if(![8,16].includes(t.length))throw new c("Provided constant IV length does not match any allowed value [8, 16].");this.WC=t,this.VC=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),pu(t.writer,this.kId),0===this.perSampleIvSize&&(t.writer.writeByte(this.constantIv.length),pu(t.writer,this.constantIv))},n}(_u)),bf=(function(t){function n(n){return t.call(this,0,n)||this}uu(n,t)}(wf),function(t){function n(n){var i=t.call(this,1,n)||this;return i.cryptByteBlocks=n.cryptByteBlock,i.skipByteBlocks=n.skipByteBlock,i}return uu(n,t),v.defineProperty(n.prototype,"cryptByteBlocks",{get:function(){return this.XC},set:function(t){if(!gu(t,4))throw new c("Provided cryptByteBlocks does not fit in 4 bits.");this.XC=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"skipByteBlocks",{get:function(){return this.ZC},set:function(t){if(!gu(t,4))throw new c("Provided skipByteBlocks does not fit in 4 bits.");this.ZC=t},enumerable:!1,configurable:!0}),n.prototype.serializeVersionBoxContent=function(t){t.writer.writeUInt(this.cryptByteBlocks,4),t.writer.writeUInt(this.skipByteBlocks,4)},n}(wf));!function(t){function n(n){var i=t.call(this)||this;return i.tencBox=new bf(n),i}uu(n,t),n.prototype.serializeBoxContent=function(t){this.tencBox.serializeOwnContent(t)},n.prototype.getBoxContentSize=function(){return this.tencBox.getTencHeaderSize()}}(Is);function gf(t){return void 0!==t.iv}function mf(t){return void 0!==t.subsamples}(function(t){function n(n){var i=t.call(this,"senc",0,{useSubsampleEncryption:!1})||this;return i.samples=n,i}uu(n,t),v.defineProperty(n.prototype,"samples",{get:function(){return this.uC},set:function(t){var n;if(!gu(t.length,32))throw new c("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(gf(r)&&![8,16].includes(r.iv.length))throw new c("IV of one of the provided samples did not satisfy the required length constraints. [8, 16]");if(void 0===n&&(n=mf(r)),!0===n&&!mf(r)||!1===n&&mf(r))throw new c("Mix of samples with and without subsamples detected.");if(mf(r)){if(!gu(r.subsamples.length,16))throw new c("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(!gu(s.clearData,16))throw new c("Subsample clearData of one of the provided samples does not fit in 16 bits.");if(!gu(s.protectedData,23))throw new c("Subsample protectedData of one of the provided samples does not fit in 23 bits.")}}}this.flags.useSubsampleEncryption=null!=n&&n,this.uC=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];gf(r)&&(n+=r.iv.length),mf(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(gf(r)&&pu(n.writer,r.iv),mf(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)}})(_u),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}uu(n,t),v.defineProperty(n.prototype,"timescale",{get:function(){return this.zx},set:function(t){if(!gu(t,32))throw new c("The provided timescale does not fit in 32 bits.");this.zx=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"presentationTimeDelta",{get:function(){return this.qC},set:function(t){if(!gu(t,32))throw new c("The provided presentationTimeDelta does not fit in 32 bits.");this.qC=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"eventDuration",{get:function(){return this.KC},set:function(t){if(!gu(t,32))throw new c("The provided eventDuration does not fit in 32 bits.");this.KC=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"id",{get:function(){return this.fS},set:function(t){if(!gu(t,32))throw new c("The provided id does not fit in 32 bits.");this.fS=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(du.from(this.data))}}(_u),function(){function t(){this.boxes=[]}t.prototype.serialize=function(){for(var t=new wu,n=0,i=this.boxes;n<i.length;n++){var e=i[n];t.concat(e.serialize())}return t.toRangedBuffer()}}();function pf(t,n){return function(i){var e=new Fu(function(t){return new DataView(t.buffer,t.byteOffset,t.byteLength)}(i),new Uu),r=function(t,n){for(var i=t.data,e=t.cursor;e.offset<i.byteLength;){var r=Vu(i,e);if(!r.complete)return;if(zu(r.box,n))return r.box}}(e,t);if(!r)throw new c("".concat(t," box not found"));return n(r)}}pf("moov",(function(t){for(var n=new Ks,i=0,e=qu(t.data);i<e.length;i++){var r=e[i];zu(r,"mvhd")?n.boxes.push(Ws(r)):zu(r,"trak")?n.boxes.push(Ys(r)):zu(r,"mvex")?n.boxes.push(Ls(r)):zu(r,"pssh")?n.boxes.push(Ns(r)):n.boxes.push(Ku(r))}return n})),pf("sidx",(function(t){var n,i,e=t.data,r=Hu(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 au(du.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 af(s,f,n,i,c,u.raw):new vf(s,f,n,i,c,u.raw)})),pf("moof",(function(t){for(var n=new uf,i=0,e=qu(t.data);i<e.length;i++){var r=e[i];zu(r,"traf")?n.boxes.push(of(r)):zu(r,"pssh")?n.boxes.push(Ns(r)):n.boxes.push(Ku(r))}return n}));var yf=pf("pssh",Ns),_f=function(t){function n(n,i){var e;(e=t.call(this)||this).iO=n,e.Fp=i,e.rO=!1,e.cO=function(){e.aO()},e.lO=function(t){e.Co(new Zo(Yt(e),t.messageType,iu(e.Fp,t.message)))},e.dO=function(){e.rO=!0,e.sO.By>0&&(e.sO.OL(),e.Co(new $o(Yt(e)))),e.iO.removeEventListener("keystatuseschange",e.cO),e.iO.removeEventListener("message",e.lO)},e.iO.addEventListener("keystatuseschange",e.cO),e.iO.addEventListener("message",e.lO),e.sO=new tu;var r=[];return e.iO.closed&&r.push(X.resolve(e.iO.closed)),e.oO=new nu,r.push(e.oO.zL),e.$C=X.race(r).then(e.dO,e.dO),e.aO(),e}Rt(n,t);var i=n.prototype;return i.Ws=function(){if(this.rO)return this.$C;var t=[];return t.push(X.resolve(this.iO.close())),t.push(en(1e3)),this.oO.w_(X.race(t).catch(Sf)),this.rO=!0,this.$C},i.hO=function(t,n,i){if(Vi.JE){var e=yf(ci(n));if(1===e.version)n=new Rs(e.systemId,e.data).serialize().join()}return X.resolve(this.iO.generateRequest(t,n)).catch(Sf)},i.$n=function(t){return X.resolve(this.iO.load(t)).catch(Sf)},i.uS=function(){return X.resolve(this.iO.remove()).catch(Sf)},i.Yn=function(t){return X.resolve(this.iO.update(t)).catch(Sf)},i.aO=function(){var t=this;this.sO.OL(),this.iO.keyStatuses.forEach((function(n,i){t.uO(i,n)})),this.Co(new $o(this))},i.uO=function(t,n){if("string"==typeof t){var i=t;t=n,n=i}var e=ci(t);if(this.Fp===Ao&&16===e.byteLength){var r=fi(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.Fp===Ao&&"status-pending"===n&&(n="usable"),this.sO.CL(e,n)},It(n,[{key:"JC",get:function(){return this.$C}},{key:"tO",get:function(){return this.iO.expiration}},{key:"eO",get:function(){return this.sO}},{key:"nO",get:function(){return this.iO.sessionId}}]),n}(gi);function Sf(t){var n;if(t.message){var i=t.message.match(/^SystemCode:0x([0-9a-fA-F]+)$/);i&&(n=0|l(i[1],16))}throw new ru(t.message,void 0,n,t)}var Tf=function(){function t(t,n,i){this._O=t,this.Qp=n,this.wd=i}var n=t.prototype;return n.fO=function(t){var n=this;return tt((function(){return nt(this,(function(i){return[2,new _f(n._O.createSession(t),n.Qp)]}))}))()},n.gO=function(t){return X.resolve(this._O.setServerCertificate(t))},n.bn=function(t){return X.resolve(t.setMediaKeys(this._O))},n.wO=function(t){return X.resolve(t.setMediaKeys(null))},n.tr=function(){return X.resolve()},t}(),Ef=function(){function t(t,n,i){this.vO=t,this.Fp=n,this.pO=i}var n=t.prototype;return n.mO=function(){var t=this;return tt((function(){var n;return nt(this,(function(i){switch(i.label){case 0:return[4,t.vO.createMediaKeys()];case 1:return n=i.sent(),[2,new Tf(n,t.Fp,t.pO)]}}))}))()},n.AO=function(){return this.pO},It(t,[{key:"Qp",get:function(){return this.vO.keySystem}}]),t}();function If(t){var n=t.trim(),i=n.indexOf(";");return i<0?n:n.substr(0,i).trim()}function kf(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,kO:e.kO},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 Rf(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 Rf(t,n,i,e)})),u=!0,o.videoCapabilities.length&&(r=!0))}return u||(r=t(i,"video/mp4")),r?o:void 0}}function Rf(t,n,i,e){return!!e.contentType&&(!(e.encryptionScheme&&!gt(n,e.encryptionScheme))&&(!e.robustness&&t(i,If(e.contentType))))}function Of(t){if(t.videoCapabilities)for(var n=0,i=t.videoCapabilities;n<i.length;n++){var e=i[n];if(e.contentType)return e.contentType}if(t.audioCapabilities)for(var r=0,o=t.audioCapabilities;r<o.length;r++){var u=o[r];if(u.contentType)return u.contentType}}function Nf(t){for(var n=[],i=0;i<t.length;i++){var e=t[i];e.encryptionScheme&&n.push({contentType:e.contentType,robustness:e.robustness})}return t.concat(n)}function Pf(t){return!(!t.audioCapabilities||!t.audioCapabilities.some(Af))||!(!t.videoCapabilities||!t.videoCapabilities.some(Af))}function Af(t){return!t.robustness}function Df(t,n){for(var i=[],e=0;e<t.length;e++){var r=t[e];r.robustness?i.push(r):i.push(Ro({},r,{robustness:n}))}return i}var Cf=function(){function t(){}return t.prototype.TO=function(t,n){return tt((function(){var i,e,r,u,s,f,h;return nt(this,(function(c){switch(c.label){case 0:for(n=n.filter((function(t){return!t.kO})),i=0;i<n.length;i++)(e=n[i]).audioCapabilities&&(e.audioCapabilities=Nf(e.audioCapabilities)),e.videoCapabilities&&(e.videoCapabilities=Nf(e.videoCapabilities));if(t!==xo||!n.some(Pf))return[3,4];r=n.map((function(t){return function(t,n){return Ro({},t,{videoCapabilities:t.videoCapabilities?Df(t.videoCapabilities,n):void 0,audioCapabilities:t.audioCapabilities?Df(t.audioCapabilities,n):void 0})}(t,"SW_SECURE_CRYPTO")})),c.label=1;case 1:return c.trys.push([1,3,,4]),[4,o.requestMediaKeySystemAccess(t,r)];case 2:return u=c.sent(),s=u.getConfiguration(),[2,new Ef(u,t,s)];case 3:return c.sent(),[3,4];case 4:return[4,o.requestMediaKeySystemAccess(t,n)];case 5:return f=c.sent(),h=f.getConfiguration(),[2,new Ef(f,t,h)]}}))}))()},t.LO=function(){return void 0!==o&&"function"==typeof o.requestMediaKeySystemAccess},t}(),xf=function(t){function n(n,i){var e;return(e=t.call(this)||this).zO=n,e.BO=i,e.rO=!1,e.YO=void 0,e.RO=void 0,e.xO=void 0,e.dO=function(){e.rO=!0,e.CO.jL(void 0),e.xO&&(e.xO.removeEventListener("mskeyclose",e.dO),e.xO.removeEventListener("mskeymessage",e.UO),e.xO.removeEventListener("mskeyerror",e.Ss),e.xO.removeEventListener("mskeyadded",e.QO))},e.UO=function(t){e.RO&&(e.RO.jL(void 0),e.RO=void 0),e.Co(new Zo(Yt(e),"license-request",ai(t.message).buffer,t.destinationURL||void 0))},e.Ss=function(){var t=e.xO&&e.xO.error;if(t){var n=new ru("Unknown CDM error",t.code,t.systemCode);if(e.RO)e.RO.RL(n),e.RO=void 0;else if(e.YO)e.YO.RL(n),e.YO=void 0;else switch(n.BL){case MSMediaKeyError.MS_MEDIA_KEYERR_OUTPUT:case MSMediaKeyError.MS_MEDIA_KEYERR_HARDWARECHANGE:e.FO("output-not-allowed");break;default:e.FO("internal-error")}}},e.QO=function(){e.RO&&(e.FO("usable"),e.RO.jL(void 0),e.RO=void 0),e.YO&&(e.FO("usable"),e.YO.jL(void 0),e.YO=void 0)},e.CO=new nu,e.OO=new tu,e}Rt(n,t);var i=n.prototype;return i.hO=function(t,n,i){var e=this;return tt((function(){return nt(this,(function(t){switch(t.label){case 0:return e.jO(),e.RO=new nu,e.fO(ci(n),i),[4,e.RO.zL];case 1:return t.sent(),[2]}}))}))()},i.fO=function(t,n){if(!t)throw new a("Expected initData to be defined but was "+t+".");var i,e=n&&n.playready&&n.playready.PO;return(i=n?this.zO.createSession(this.BO,t,e):this.zO.createSession(this.BO,t)).addEventListener("mskeyclose",this.dO),i.addEventListener("mskeymessage",this.UO),i.addEventListener("mskeyerror",this.Ss),i.addEventListener("mskeyadded",this.QO),this.xO=i,this.FO("status-pending"),i},i.$n=function(t){var n=this;return tt((function(){return nt(this,(function(t){return n.jO(),[2,!0]}))}))()},i.Yn=function(t){var n=this;return tt((function(){var i;return nt(this,(function(e){switch(e.label){case 0:if(n.YO=new nu,n.jO(),!n.xO)return[2,X.resolve()];if(0===(i=ci(t)).byteLength)throw new a("Cannot call update with an empty response.");return n.xO.update(i),[4,n.YO.zL];case 1:return e.sent(),[2]}}))}))()},i.Ws=function(){return!this.rO&&this.xO&&(this.rO=!0,this.xO.close()),this.CO.zL},i.uS=function(){var t=this;return tt((function(){return nt(this,(function(n){return t.jO(),[2]}))}))()},i.jO=function(){if(this.rO)throw new a("Already closing or closed.")},i.FO=function(t){this.OO.OL(),this.OO.CL(Qo,t),this.Co(new $o(this))},It(n,[{key:"nO",get:function(){return this.xO&&this.xO.sessionId||""}},{key:"tO",get:function(){return NaN}},{key:"JC",get:function(){return this.CO.zL}},{key:"eO",get:function(){return this.OO}}]),n}(gi),Bf=function(){function t(t,n,i){this.zO=t,this.Qp=n,this.wd=i;var e=Of(i)||"video/mp4";this.BO=If(e)}var n=t.prototype;return n.fO=function(t){var n=this;return tt((function(){return nt(this,(function(t){return[2,new xf(n.zO,n.BO)]}))}))()},n.gO=function(t){return X.resolve(!1)},n.bn=function(t){var n=this,i=function(){t.msSetMediaKeys(n.zO),t.removeEventListener("loadedmetadata",i)};return t.readyState>=1?t.msSetMediaKeys(this.zO):t.addEventListener("loadedmetadata",i),X.resolve()},n.wO=function(t){return X.resolve()},n.tr=function(){return X.resolve()},t}(),Mf=function(){function t(t,n){this.Fp=t,this.GO=n}var n=t.prototype;return n.AO=function(){return this.GO},n.mO=function(){var t=new Qr.MSMediaKeys(this.Fp);return X.resolve(new Bf(t,this.Fp,this.GO))},It(t,[{key:"Qp",get:function(){return this.Fp}}]),t}(),Lf=function(){function t(){}return t.prototype.TO=function(t,n){try{return X.resolve(function(t,n){if(!Uf())throw new a("Unsupported key system "+t);for(var i=0;i<n.length;i++){var e=n[i],r=kf(Ff,Ko,t,e);if(r)return new Mf(t,r)}throw new a("Unsupported key system configuration for "+t)}(t,n))}catch(t){return X.reject(t)}},t.LO=function(){return Uf()},t}();function Uf(){return void 0!==Qr.MSMediaKeys&&"function"==typeof Qr.MSMediaKeys.isTypeSupported}function Ff(t,n){return Qr.MSMediaKeys.isTypeSupported(t,n)}var zf,Wf,qf=function(t){function n(n,i,e){var r;return(r=t.call(this)||this).XO=n,r.BO=i,r.HO=e,r.CO=new nu,r.qO=void 0,r.OO=new tu,r.VO=void 0,r.ZO=new nu,r.Ss=function(){var t=r.VO&&r.VO.error;if(t){var n=new ru("Unknown CDM error",t.code,t.systemCode);r.qO?(r.qO.RL(n),r.qO=void 0):n.BL===WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT?r.FO("output-not-allowed"):r.FO("internal-error"),r.Co(new Jo)}},r.UO=function(t){r.Co(new Zo(Yt(r),"license-request",ai(t.message).buffer,"this is a test string"===t.destinationURL?void 0:t.destinationURL))},r.QO=function(){r.qO&&(r.qO.jL(void 0),r.qO=void 0),r.FO("usable")},r}Rt(n,t);var i=n.prototype;return i.hO=function(t,n,i){var e=i&&i.fairplay&&i.fairplay.WO;if(!e)throw new a("Expected FairPlay contentId to be defined but was "+e+".");var r=function(t,n,i){var e=ui(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 di;return ei(s,f,r,!0),ri(s,f,e,!0),ei(s,f,o,!0),ri(s,f,n,!0),ei(s,f,i.byteLength,!0),function(t,n,i){hi(t).set(hi(i),n.Ku),n.KA(i.byteLength)}(s,f,i),new g(u)}(ci(n),e,this.HO);return this.VO=this.XO.createSession(this.BO,r),this.VO.addEventListener("webkitkeymessage",this.UO,!1),this.VO.addEventListener("webkitkeyadded",this.QO,!1),this.VO.addEventListener("webkitkeyerror",this.Ss,!1),this.FO("status-pending"),this.ZO.jL(this.VO),this.ZO=new nu,X.resolve()},i.$n=function(t){return X.resolve(!0)},i.Yn=function(t){var n=this;return tt((function(){var i,e;return nt(this,(function(r){switch(r.label){case 0:if(0===(i=ci(t)).byteLength)throw new a("Cannot call update with an empty response.");return n.qO=new nu,(e=n.VO)?[3,2]:[4,n.ZO.zL];case 1:e=r.sent(),r.label=2;case 2:return e.update(i),[4,n.qO.zL];case 3:return r.sent(),[2]}}))}))()},i.Ws=function(){var t,n=this.VO;return n&&(n.removeEventListener("webkitkeymessage",this.UO,!1),n.removeEventListener("webkitkeyadded",this.QO,!1),n.removeEventListener("webkitkeyerror",this.Ss,!1),n.close()),this.ZO.g_(),null==(t=this.qO)||t.g_(),this.CO.jL(void 0),this.CO.zL},i.uS=function(){return X.resolve(void 0)},i.FO=function(t){this.OO.OL(),this.OO.CL(Qo,t),this.Co(new $o(this))},It(n,[{key:"nO",get:function(){return this.VO?this.VO.sessionId:""}},{key:"tO",get:function(){return NaN}},{key:"JC",get:function(){return this.CO.zL}},{key:"eO",get:function(){return this.OO}}]),n}(gi);!function(t){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.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"}(zf||(zf={})),function(t){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"}(Wf||(Wf={})),function(t){t.fromCode=function(n){var i=d.floor(n/1e3);if(i in t)return i;throw new a("Invalid error code: "+n)}}(Wf||(Wf={}));var Vf=function(t){function n(n,i,e){var r;return(r=t.call(this,i,e)||this).code=n,r}return Rt(n,t),It(n,[{key:"name",get:function(){return"THEOplayerError"}},{key:"category",get:function(){return Wf.fromCode(this.code)}}]),n}(Gt),Hf=function(){function t(t,n,i){this.XO=t,this.Qp=n,this.wd=i,this.HO=void 0;var e=Of(i)||"video/mp4";this.BO=If(e)}var n=t.prototype;return n.getInternalMediaKeys=function(){return this.XO},n.fO=function(t){var n=this;return tt((function(){return nt(this,(function(t){if(!n.HO)throw new Vf(zf.CONTENT_PROTECTION_CERTIFICATE_ERROR,"No valid certificate was provided.");return[2,new qf(n.XO,n.BO,n.HO)]}))}))()},n.gO=function(t){return this.HO=ci(t),X.resolve(!0)},n.bn=function(t){return t.webkitSetMediaKeys(this.XO),X.resolve()},n.wO=function(t){return t.webkitSetMediaKeys(null),X.resolve()},n.tr=function(){return X.resolve()},t}(),Xf=function(){function t(t,n){this.Fp=t,this.GO=n}var n=t.prototype;return n.AO=function(){return this.GO},n.mO=function(){var t=new Qr.WebKitMediaKeys(this.Fp);return X.resolve(new Hf(t,this.Fp,this.GO))},It(t,[{key:"Qp",get:function(){return this.Fp}}]),t}(),jf=function(){function t(){}return t.prototype.TO=function(t,n){try{return X.resolve(function(t,n){if(t!==Fo)throw new a(t+" is not supported with webkit-prefixed Encrypted Media Extensions.");if(!Yf())throw new a("Unsupported key system "+t);for(var i=0;i<n.length;i++){var e=n[i],r=kf(Kf,Go,t,e);if(r)return new Xf(t,r)}throw new a("Unsupported key system configuration for "+t)}(t,n))}catch(t){return X.reject(t)}},t.LO=function(){return Yf()},t}();function Yf(){return void 0!==Qr.WebKitMediaKeys&&"function"==typeof Qr.WebKitMediaKeys.isTypeSupported}function Kf(t,n){return Qr.WebKitMediaKeys.isTypeSupported(t,n)}var Gf,$f=function(){function t(t){this.KO=t}return t.prototype.TO=function(t,n){var i=this;return tt((function(){var e,r,o;return nt(this,(function(u){switch(u.label){case 0:e=0,r=i.KO,u.label=1;case 1:if(!(e<r.length))return[3,6];o=r[e],u.label=2;case 2:return u.trys.push([2,4,,5]),[4,o.TO(t,n)];case 3:return[2,u.sent()];case 4:return u.sent(),[3,5];case 5:return e++,[3,1];case 6:throw new a("Unsupported key system configuration for "+t)}}))}))()},t}(),Zf=new on,Jf=function(t){function n(n){var i;return(i=t.call(this)||this).Fp=n,i.RO=void 0,i.qO=void 0,i.qL=!1,i.wj=void 0,i.lj=void 0,i.CO=new nu,i.gj="",i.dj=new nu,i._j=new tu,i}Rt(n,t);var i=n.prototype;return i.hj=function(){this.qO&&(this.FO("usable"),this.qO.jL(void 0),this.qO=void 0)},i.aj=function(t){var n=new ru("Unknown CDM error",t.errorCode,t.systemCode);this.qO?(this.qO.RL(n),this.qO=void 0):this.RO?(this.RO.RL(n),this.RO=void 0):n.BL===WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT?this.FO("output-restricted"):1===n.UL?this.FO("expired"):this.FO("internal-error")},i.uj=function(t){0!==t.message.byteLength?(this.RO&&(this.RO.jL(void 0),this.RO=void 0),this.Co(new Zo(this,"license-request",iu(this.Fp,ai(t.message).buffer),t.defaultURL||void 0))):this.RO&&(this.RO.RL("Empty key message"),this.RO=void 0)},i.cj=function(t){this.lj||(this.lj=t,this.dj.jL(t))},i.Ws=function(){var t=this;return tt((function(){return nt(this,(function(n){return t.throwIfClosed(),t.qO&&(t.qO.RL(void 0),t.qO=void 0),t.qL=!0,t.CO.jL(void 0),[2]}))}))()},i.hO=function(t,n){var i=this;return tt((function(){var t;return nt(this,(function(e){switch(e.label){case 0:return i.throwIfClosed(),i.RO=new nu,i.wj=ci(n),(t=i.lj)?[3,2]:[4,i.dj.zL];case 1:t=e.sent(),e.label=2;case 2:return t.webkitGenerateKeyRequest(i.Fp,i.wj),[4,i.RO.zL];case 3:return e.sent(),[2]}}))}))()},i.$n=function(t){var n=this;return tt((function(){return nt(this,(function(t){return n.throwIfClosed(),[2,!1]}))}))()},i.uS=function(){var t=this;return tt((function(){return nt(this,(function(n){return t.throwIfClosed(),[2]}))}))()},i.Yn=function(t){var n=this;return tt((function(){return nt(this,(function(i){switch(i.label){case 0:return n.throwIfClosed(),n.qO=new nu,Vi.Sk||Vi.yk?[2,Zf.JO(tt((function(){return nt(this,(function(i){switch(i.label){case 0:return[4,n.doUpdate(t)];case 1:return i.sent(),[2]}}))})))]:[4,n.doUpdate(t)];case 1:return i.sent(),[2]}}))}))()},i.doUpdate=function(t){var n=this;return tt((function(){var i;return nt(this,(function(e){switch(e.label){case 0:return void 0===n.qO?[2]:(i=n.lj)?[3,2]:[4,n.dj.zL];case 1:i=e.sent(),e.label=2;case 2:return i.webkitAddKey(n.Fp,ci(t),n.wj,n.nO),[4,n.qO.zL];case 3:return e.sent(),Vi.yk?[4,en(500)]:[3,5];case 4:e.sent(),e.label=5;case 5:return[2]}}))}))()},i.throwIfClosed=function(){if(this.qL)throw new a("Already closing or closed.")},i.FO=function(t){this._j.OL(),this._j.CL(Qo,t),this.Co(new $o(this))},i.vj=function(){var t=this;return tt((function(){var n,i;return nt(this,(function(e){switch(e.label){case 0:return(i=t.lj)?[3,2]:[4,t.dj.zL];case 1:i=e.sent(),e.label=2;case 2:if(!(n=i).webkitCancelKeyRequest)return[3,7];e.label=3;case 3:return e.trys.push([3,4,5,7]),n.webkitCancelKeyRequest(t.Fp,t.gj),[3,7];case 4:return e.sent(),[3,7];case 5:return[4,en(500)];case 6:return e.sent(),[7];case 7:return[2]}}))}))()},It(n,[{key:"eO",get:function(){return this._j}},{key:"nO",get:function(){return this.gj},set:function(t){this.gj=t}},{key:"JC",get:function(){return this.CO.zL}},{key:"tO",get:function(){return NaN}}]),n}(gi),Qf=function(){function t(t,n){var i=this;this.Qp=t,this.wd=n,this.lj=void 0,this.Aj=Pt(),this.yj=[],this.QO=function(t){var n=i.Mj(t.sessionId);n&&n.hj()},this.mj=function(t){var n=i.Mj(t.sessionId);n&&n.aj(t)},this.pj=function(t){var n=i.Mj(t.sessionId);n&&n.uj(t)}}var n=t.prototype;return n.bn=function(t){return this.lj=t,this.lj.addEventListener("webkitkeyadded",this.QO),this.lj.addEventListener("webkitkeyerror",this.mj),this.lj.addEventListener("webkitkeymessage",this.pj),this.Aj.forEach((function(n,i){return n.cj(t)})),this.yj.forEach((function(n){return n.cj(t)})),X.resolve()},n.wO=function(t){return t.removeEventListener("webkitkeyadded",this.QO),t.removeEventListener("webkitkeyerror",this.mj),t.removeEventListener("webkitkeymessage",this.pj),this.lj=void 0,X.resolve()},n.tr=function(){var t=this;return tt((function(){var n,i;return nt(this,(function(e){switch(e.label){case 0:n=t.Aj.entries(),i=n.next(),e.label=1;case 1:return i.done?[3,3]:[4,i.value[1].vj()];case 2:return e.sent(),i=n.next(),[3,1];case 3:return t.Aj.clear(),[2]}}))}))()},n.fO=function(t,n,i){var e=this;return tt((function(){var t;return nt(this,(function(n){return t=new Jf(e.Qp),e.lj&&t.cj(e.lj),e.yj.push(t),[2,t]}))}))()},n.gO=function(t){return X.resolve(!1)},n.Mj=function(t){if(t){var n=this.Aj.get(t);return n||((n=this.yj.shift())?(n.nO=t,this.Aj.set(t,n),n):void 0)}},t}(),th=function(){function t(t,n){this.Qp=t,this.bj=n}var n=t.prototype;return n.mO=function(){return X.resolve(new Qf(this.Qp,this.bj))},n.AO=function(){return this.bj},t}(),nh=function(){function t(){}return t.prototype.TO=function(t,n){try{return X.resolve(function(t,n){if(!nh.LO())throw new a("Unsupported key system "+t);for(var i=0;i<n.length;i++){var e=n[i],r=kf(ih,Ko,t,e);if(r)return new th(t,r)}throw new a("Unsupported key system configuration for "+t)}(t,n))}catch(t){return X.reject(t)}},t.LO=function(){return"undefined"!=typeof HTMLMediaElement&&void 0!==HTMLMediaElement.prototype.webkitGenerateKeyRequest&&void 0!==HTMLMediaElement.prototype.webkitAddKey&&void 0!==HTMLMediaElement.prototype.webkitCancelKeyRequest},t}();function ih(t,n){var i=ro();return!(!i||!i.canPlayType||""===i.canPlayType(n,t))}function eh(){return Gf||(Gf=function(){var t=[];jf.LO()&&t.push(new jf);Cf.LO()&&t.push(new Cf);Lf.LO()&&t.push(new Lf);nh.LO()&&t.push(new nh);return new $f(t)}()),Gf}var rh=function(){function t(){this.jF=Pt()}var n=t.prototype;return n.OL=function(t){this.jF.delete(t)},n.RF=function(){this.jF.clear()},n.LL=function(t){return this.jF.get(t)},n.EP=function(t,n){this.jF.set(t,n)},t}(),oh=function(){function t(){}return t.PF=function(){return t.gL||(t.gL=uh.LO()?new uh:new rh),t.gL},t.OL=function(n){t.PF().OL(n)},t.RF=function(){t.PF().RF()},t.LL=function(n){return t.PF().LL(n)},t.EP=function(n,i){t.PF().EP(n,i)},t}();oh.gL=void 0;var uh=function(t){function n(){return t.apply(this,arguments)}Rt(n,t);var i=n.prototype;return i.OL=function(t){self.sessionStorage.removeItem(t)},i.RF=function(){self.sessionStorage.clear()},i.LL=function(t){var n;return null!=(n=self.sessionStorage.getItem(t))?n:void 0},i.EP=function(t,n){self.sessionStorage.setItem(t,n)},n.LO=function(){var t="foobar";try{return self.sessionStorage.setItem(t,t),self.sessionStorage.removeItem(t),!0}catch(t){return!1}},n}(oh);var sh=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=0;r<n.length;r++){var o=n[r];e.append(o)}return e.getBlob(i&&i.type||"")}}(n)}();function fh(t,n,i){var e=sh([n],{type:"application/octet-stream"}),o=URL.createObjectURL(e),u=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),s=r.createElement("a");s.href=o,s.download=u,r.body.appendChild(s),s.click(),r.body.removeChild(s),URL.revokeObjectURL(o)}var hh,ch;!function(t){t.Mv="bv",t.Tv="Sv",t.Nv="contentprotectionerror",t.Iv="contentprotectionsuccess",t.Dv="currentsourcechange",t.Ev="destroy",t.Lv="durationchange",t.xv="emptied",t.Cv="encrypted",t.Ov="ended",t.Rv="Pv",t.zv="Bv",t.Uv="Qv",t.Fv="Yv",t.Gv="loadstart",t.Vv="manifestupdate",t.Wv="nosupportedrepresentationfound",t.Hv="offline",t.Xv="online",t.Sh="pause",t.jh="play",t.Zv="progress",t.qv="ratechange",t.Kv="representationchange",t.Jv="resize",t.$v="seeked",t.im="seeking",t.nm="segmentnotfound",t.hm="um",t.lm="dm",t.lo="sourcechange",t.fm="timeupdate",t._m="volumechange",t.gm="wm",t.vm="metricschange"}(hh||(hh={})),function(t){t.kD="arraybuffer",t.LD="json",t.xD="stream",t.Ru="text"}(ch||(ch={}));var ah=function(){function t(n){var i=this;this.mf={},n instanceof t?n.asList().forEach((function(t){var n=Ot(t,2),e=n[0],r=n[1];i.append(e,r)})):Array.isArray(n)?n.forEach((function(t){var n=Ot(t,2),e=n[0],r=n[1];i.append(e,r)})):n&&v.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=vh(i),e=dh(e);var r=i.toLowerCase();if(this.mf.hasOwnProperty(r)){var o=this.mf[r],u=o[1];o[1]=u?u+", "+e:e}else this.mf[r]=[i,e]},n.delete=function(t){var n=vh(t).toLowerCase();delete this.mf[n]},n.get=function(t){var n=vh(t).toLowerCase();return this.mf.hasOwnProperty(n)?this.mf[n][1]:null},n.has=function(t){var n=vh(t).toLowerCase();return this.mf.hasOwnProperty(n)},n.set=function(t,n){var i=t,e=(i=vh(i)).toLowerCase();this.mf[e]=[i,dh(n)]},n.forEach=function(t,n){for(var i in this.mf)this.mf.hasOwnProperty(i)&&t.call(n,this.mf[i][1],i,this)},n.asList=function(){var t=[];for(var n in this.mf)if(this.mf.hasOwnProperty(n)){var i=Ot(this.mf[n],2),e=i[0],r=i[1];t.push([e,r])}return t},n.CD=function(){var t={};return this.forEach((function(n,i){t[i]=n})),t},n.OD=function(t){var n=this;t.forEach((function(t,i){n.append(i,t)}))},n.jD=function(t){var n=this;t.forEach((function(t,i){n.set(i,t)}))},t}();function vh(t){var n=t;if("string"!=typeof n&&(n=String(n)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(n))throw new a("Invalid character in header field name");return n}function dh(t){var n=t;return"string"!=typeof n&&(n=String(n)),n}var lh="function"==typeof n&&"symbol"==typeof n.iterator?n:function(t){return"Symbol("+t+")"};function wh(){}var bh=Number.isNaN||function(t){return t!=t},gh=wh;function mh(t){return"object"==typeof t&&null!==t||"function"==typeof t}function ph(t){return t.slice()}function yh(t,n,i,e,r){new g(t).set(new g(i,e,r),n)}function _h(t){return!1!==function(t){if("number"!=typeof t)return!1;if(bh(t))return!1;if(t<0)return!1;return!0}(t)&&t!==1/0}function Sh(t,n,i){if("function"!=typeof t)throw new a("Argument is not a function");return Function.prototype.apply.call(t,n,i)}function Th(t,n,i,e){var r=t[n];if(void 0!==r){if("function"!=typeof r)throw new a(r+" is not a method");switch(i){case 0:return function(){return Ih(r,t,e)};case 1:return function(n){var i=[n].concat(e);return Ih(r,t,i)}}}return function(){return Ch(void 0)}}function Eh(t,n,i){var e=t[n];if(void 0!==e)return Sh(e,t,i)}function Ih(t,n,i){try{return Ch(Sh(t,n,i))}catch(t){return xh(t)}}function kh(t){if(t=Number(t),bh(t)||t<0)throw new RangeError("highWaterMark property of a queuing strategy must be non-negative and non-NaN");return t}function Rh(t){if(void 0===t)return function(){return 1};if("function"!=typeof t)throw new a("size property of a queuing strategy must be a function");return function(n){return t(n)}}var Oh=X,Nh=X.prototype.then,Ph=X.resolve.bind(Oh),Ah=X.reject.bind(Oh);function Dh(t){return new Oh(t)}function Ch(t){return Ph(t)}function xh(t){return Ah(t)}function Bh(t,n,i){return Nh.call(t,n,i)}function Mh(t,n,i){Bh(Bh(t,n,i),void 0,gh)}function Lh(t,n){Mh(t,n)}function Uh(t,n){Mh(t,void 0,n)}function Fh(t,n,i){return Bh(t,n,i)}function zh(t){Bh(t,void 0,gh)}var Wh=function(){function t(){this.jV=0,this.RV=0,this.PV={zV:[],BV:void 0},this.QV=this.PV,this.jV=0,this.RV=0}return v.defineProperty(t.prototype,"length",{get:function(){return this.RV},enumerable:!0,configurable:!0}),t.prototype.push=function(t){var n=this.QV,i=n;16383===n.zV.length&&(i={zV:[],BV:void 0}),n.zV.push(t),i!==n&&(this.QV=i,n.BV=i),++this.RV},t.prototype.shift=function(){var t=this.PV,n=t,i=this.jV,e=i+1,r=t.zV,o=r[i];return 16384===e&&(n=t.BV,e=0),--this.RV,this.jV=e,t!==n&&(this.PV=n),r[i]=void 0,o},t.prototype.forEach=function(t){for(var n=this.jV,i=this.PV,e=i.zV;!(n===e.length&&void 0===i.BV||n===e.length&&(n=0,0===(e=(i=i.BV).zV).length));)t(e[n]),++n},t.prototype.peek=function(){var t=this.PV,n=this.jV;return t.zV[n]},t}();function qh(t,n,i){var e=null;!0===i&&(e=v.prototype);var r=v.create(e);return r.value=t,r.done=n,r}function Vh(t,n){t.FV=!0,t.YV=n,n.GV=t,"readable"===n.ja?Yh(t):"closed"===n.ja?function(t){Yh(t),$h(t)}(t):Kh(t,n.VV)}function Hh(t,n){return Qa(t.YV,n)}function Xh(t){"readable"===t.YV.ja?Gh(t,new a("Reader was released and can no longer be used to monitor the stream's closedness")):function(t,n){Kh(t,n)}(t,new a("Reader was released and can no longer be used to monitor the stream's closedness")),t.YV.GV=void 0,t.YV=void 0}function jh(t){return new a("Cannot "+t+" a stream using a released reader")}function Yh(t){t.$C=Dh((function(n,i){t.WV=n,t.HV=i}))}function Kh(t,n){Yh(t),Gh(t,n)}function Gh(t,n){zh(t.$C),t.HV(n),t.WV=void 0,t.HV=void 0}function $h(t){t.WV(void 0),t.WV=void 0,t.HV=void 0}var Zh=lh("[[CancelSteps]]"),Jh=lh("[[PullSteps]]");function Qh(t,n){void 0===n&&(n=!1);var i=new uc(t);return i.FV=n,i}function tc(t){var n=Dh((function(n,i){var e={lf:n,PL:i};t.GV.XV.push(e)}));return n}function nc(t,n,i){var e=t.GV;e.XV.shift().lf(qh(n,i,e.FV))}function ic(t){return t.GV.XV.length}function ec(t){var n=t.GV;return void 0!==n&&!!sc(n)}var rc,oc,uc=function(){function t(t){if(!1===Za(t))throw new a("ReadableStreamDefaultReader can only be constructed with a ReadableStream instance");if(!0===Ja(t))throw new a("This stream has already been locked for exclusive reading by another reader");Vh(this,t),this.XV=new Wh}return v.defineProperty(t.prototype,"closed",{get:function(){return sc(this)?this.$C:xh(hc("closed"))},enumerable:!0,configurable:!0}),t.prototype.cancel=function(t){return sc(this)?void 0===this.YV?xh(jh("cancel")):Hh(this,t):xh(hc("cancel"))},t.prototype.read=function(){return sc(this)?void 0===this.YV?xh(jh("read from")):fc(this):xh(hc("read"))},t.prototype.releaseLock=function(){if(!sc(this))throw hc("releaseLock");if(void 0!==this.YV){if(this.XV.length>0)throw new a("Tried to release a reader lock when that reader has pending read() calls un-settled");Xh(this)}},t}();function sc(t){return!!mh(t)&&!!v.prototype.hasOwnProperty.call(t,"XV")}function fc(t){var n=t.YV;return n.ZV=!0,"closed"===n.ja?Ch(qh(void 0,!0,t.FV)):"errored"===n.ja?xh(n.VV):n.qV[Jh]()}function hc(t){return new a("ReadableStreamDefaultReader.prototype."+t+" can only be used on a ReadableStreamDefaultReader")}"symbol"==typeof lh.asyncIterator&&((rc={})[lh.asyncIterator]=function(){return this},oc=rc,v.defineProperty(oc,lh.asyncIterator,{enumerable:!1}));var cc={next:function(){if(!1===ac(this))return xh(vc("next"));var t=this.KV;return void 0===t.YV?xh(jh("iterate")):Fh(fc(t),(function(n){var i=n.done;return i&&Xh(t),qh(n.value,i,!0)}))},return:function(t){if(!1===ac(this))return xh(vc("next"));var n=this.KV;if(void 0===n.YV)return xh(jh("finish iterating"));if(n.XV.length>0)return xh(new a("Tried to release a reader lock when that reader has pending read() calls un-settled"));if(!1===this.JV){var i=Hh(n,t);return Xh(n),Fh(i,(function(){return qh(t,!0,!0)}))}return Xh(n),Ch(qh(t,!0,!0))}};function ac(t){return!!mh(t)&&!!v.prototype.hasOwnProperty.call(t,"KV")}function vc(t){return new a("ReadableStreamAsyncIterator."+t+" can only be used on a ReadableSteamAsyncIterator")}function dc(t){var n=t.$V.shift();return t.tW-=n.size,t.tW<0&&(t.tW=0),n.value}function lc(t,n,i){if(!_h(i=Number(i)))throw new RangeError("Size must be a finite, non-NaN, non-negative number.");t.$V.push({value:n,size:i}),t.tW+=i}function wc(t){t.$V=new Wh,t.tW=0}void 0!==oc&&v.setPrototypeOf(cc,oc),v.defineProperty(cc,"next",{enumerable:!1}),v.defineProperty(cc,"return",{enumerable:!1});var bc=lh("[[AbortSteps]]"),gc=lh("[[ErrorSteps]]"),mc=function(){function t(t,n){void 0===t&&(t={}),void 0===n&&(n={}),yc(this);var i=n.size,e=n.highWaterMark;if(void 0!==t.type)throw new RangeError("Invalid type is specified");var r=Rh(i);void 0===e&&(e=1),function(t,n,i,e){var r=v.create(Uc.prototype);function o(){return Eh(n,"start",[r])}var u=Th(n,"write",1,[r]),s=Th(n,"close",0,[]),f=Th(n,"abort",1,[]);Fc(t,r,o,u,s,f,i,e)}(this,t,e=kh(e),r)}return v.defineProperty(t.prototype,"locked",{get:function(){if(!1===_c(this))throw jc("locked");return Sc(this)},enumerable:!0,configurable:!0}),t.prototype.abort=function(t){return!1===_c(this)?xh(jc("abort")):!0===Sc(this)?xh(new a("Cannot abort a stream that already has a writer")):Tc(this,t)},t.prototype.close=function(){return!1===_c(this)?xh(jc("close")):!0===Sc(this)?xh(new a("Cannot close a stream that already has a writer")):!0===Oc(this)?xh(new a("Cannot close an already-closing stream")):Ec(this)},t.prototype.getWriter=function(){if(!1===_c(this))throw jc("getWriter");return pc(this)},t}();function pc(t){return new Ac(t)}function yc(t){t.ja="writable",t.VV=void 0,t.tx=void 0,t.iW=void 0,t.eW=new Wh,t.sW=void 0,t.nW=void 0,t.rW=void 0,t.oW=void 0,t.hW=!1}function _c(t){return!!mh(t)&&!!v.prototype.hasOwnProperty.call(t,"iW")}function Sc(t){return void 0!==t.tx}function Tc(t,n){var i=t.ja;if("closed"===i||"errored"===i)return Ch(void 0);if(void 0!==t.oW)return t.oW.aW;var e=!1;"erroring"===i&&(e=!0,n=void 0);var r=Dh((function(i,r){t.oW={aW:void 0,lf:i,PL:r,uW:n,cW:e}}));return t.oW.aW=r,!1===e&&kc(t,n),r}function Ec(t){var n=t.ja;if("closed"===n||"errored"===n)return xh(new a("The stream (in "+n+" state) is not in the writable state and cannot be closed"));var i=Dh((function(n,i){var e={lf:n,PL:i};t.nW=e})),e=t.tx;return void 0!==e&&!0===t.hW&&"writable"===n&&ea(e),function(t){lc(t,"close",0),qc(t)}(t.iW),i}function Ic(t,n){"writable"!==t.ja?Rc(t):kc(t,n)}function kc(t,n){var i=t.iW;t.ja="erroring",t.VV=n;var e=t.tx;void 0!==e&&Bc(e,n),!1===function(t){if(void 0===t.sW&&void 0===t.rW)return!1;return!0}(t)&&!0===i.lW&&Rc(t)}function Rc(t){t.ja="errored",t.iW[gc]();var n=t.VV;if(t.eW.forEach((function(t){t.PL(n)})),t.eW=new Wh,void 0!==t.oW){var i=t.oW;if(t.oW=void 0,!0===i.cW)return i.PL(n),void Nc(t);Mh(t.iW[bc](i.uW),(function(){i.lf(),Nc(t)}),(function(n){i.PL(n),Nc(t)}))}else Nc(t)}function Oc(t){return void 0!==t.nW||void 0!==t.rW}function Nc(t){void 0!==t.nW&&(t.nW.PL(t.VV),t.nW=void 0);var n=t.tx;void 0!==n&&Zc(n,t.VV)}function Pc(t,n){var i=t.tx;void 0!==i&&n!==t.hW&&(!0===n?function(t){Qc(t)}(i):ea(i)),t.hW=n}var Ac=function(){function t(t){if(!1===_c(t))throw new a("WritableStreamDefaultWriter can only be constructed with a WritableStream instance");if(!0===Sc(t))throw new a("This stream has already been locked for exclusive writing by another writer");this.dW=t,t.tx=this;var n=t.ja;if("writable"===n)!1===Oc(t)&&!0===t.hW?Qc(this):na(this),Gc(this);else if("erroring"===n)ta(this,t.VV),Gc(this);else if("closed"===n)na(this),function(t){Gc(t),Jc(t)}(this);else{var i=t.VV;ta(this,i),$c(this,i)}}return v.defineProperty(t.prototype,"closed",{get:function(){return!1===Dc(this)?xh(Yc("closed")):this.$C},enumerable:!0,configurable:!0}),v.defineProperty(t.prototype,"desiredSize",{get:function(){if(!1===Dc(this))throw Yc("desiredSize");if(void 0===this.dW)throw Kc("desiredSize");return function(t){var n=t.dW,i=n.ja;if("errored"===i||"erroring"===i)return null;if("closed"===i)return 0;return Wc(n.iW)}(this)},enumerable:!0,configurable:!0}),v.defineProperty(t.prototype,"ready",{get:function(){return!1===Dc(this)?xh(Yc("ready")):this.fW},enumerable:!0,configurable:!0}),t.prototype.abort=function(t){return!1===Dc(this)?xh(Yc("abort")):void 0===this.dW?xh(Kc("abort")):function(t,n){var i=t.dW;return Tc(i,n)}(this,t)},t.prototype.close=function(){if(!1===Dc(this))return xh(Yc("close"));var t=this.dW;return void 0===t?xh(Kc("close")):!0===Oc(t)?xh(new a("Cannot close an already-closing stream")):Cc(this)},t.prototype.releaseLock=function(){if(!1===Dc(this))throw Yc("releaseLock");void 0!==this.dW&&Mc(this)},t.prototype.write=function(t){return!1===Dc(this)?xh(Yc("write")):void 0===this.dW?xh(Kc("write to")):Lc(this,t)},t}();function Dc(t){return!!mh(t)&&!!v.prototype.hasOwnProperty.call(t,"dW")}function Cc(t){return Ec(t.dW)}function xc(t,n){"pending"===t._W?Zc(t,n):function(t,n){$c(t,n)}(t,n)}function Bc(t,n){"pending"===t.gW?ia(t,n):function(t,n){ta(t,n)}(t,n)}function Mc(t){var n=t.dW,i=new a("Writer was released and can no longer be used to monitor the stream's closedness");Bc(t,i),xc(t,i),n.tx=void 0,t.dW=void 0}function Lc(t,n){var i=t.dW,e=i.iW,r=function(t,n){try{return t.wW(n)}catch(n){return Vc(t,n),1}}(e,n);if(i!==t.dW)return xh(Kc("write to"));var o=i.ja;if("errored"===o)return xh(i.VV);if(!0===Oc(i)||"closed"===o)return xh(new a("The stream is closing or closed and cannot be written to"));if("erroring"===o)return xh(i.VV);var u=function(t){var n=Dh((function(n,i){var e={lf:n,PL:i};t.eW.push(e)}));return n}(i);return function(t,n,i){var e={chunk:n};try{lc(t,e,i)}catch(n){return void Vc(t,n)}var r=t.vW;if(!1===Oc(r)&&"writable"===r.ja){Pc(r,Hc(t))}qc(t)}(e,n,r),u}var Uc=function(){function t(){throw new a("WritableStreamDefaultController cannot be constructed explicitly")}return t.prototype.error=function(t){if(!1===function(t){if(!mh(t))return!1;if(!v.prototype.hasOwnProperty.call(t,"vW"))return!1;return!0}(this))throw new a("WritableStreamDefaultController.prototype.error can only be used on a WritableStreamDefaultController");"writable"===this.vW.ja&&Xc(this,t)},t.prototype[bc]=function(t){var n=this.mW(t);return zc(this),n},t.prototype[gc]=function(){wc(this)},t}();function Fc(t,n,i,e,r,o,u,s){n.vW=t,t.iW=n,n.$V=void 0,n.tW=void 0,wc(n),n.lW=!1,n.wW=s,n.pW=u,n.AW=e,n.yW=r,n.mW=o;var f=Hc(n);Pc(t,f),Mh(Ch(i()),(function(){n.lW=!0,qc(n)}),(function(i){n.lW=!0,Ic(t,i)}))}function zc(t){t.AW=void 0,t.yW=void 0,t.mW=void 0,t.wW=void 0}function Wc(t){return t.pW-t.tW}function qc(t){var n=t.vW;if(!1!==t.lW&&void 0===n.sW)if("erroring"!==n.ja){if(0!==t.$V.length){var i=function(t){return t.$V.peek().value}(t);"close"===i?function(t){var n=t.vW;(function(t){t.rW=t.nW,t.nW=void 0})(n),dc(t);var i=t.yW();zc(t),Mh(i,(function(){!function(t){t.rW.lf(void 0),t.rW=void 0,"erroring"===t.ja&&(t.VV=void 0,void 0!==t.oW&&(t.oW.lf(),t.oW=void 0)),t.ja="closed";var n=t.tx;void 0!==n&&Jc(n)}(n)}),(function(t){!function(t,n){t.rW.PL(n),t.rW=void 0,void 0!==t.oW&&(t.oW.PL(n),t.oW=void 0),Ic(t,n)}(n,t)}))}(t):function(t,n){var i=t.vW;!function(t){t.sW=t.eW.shift()}(i);var e=t.AW(n);Mh(e,(function(){!function(t){t.sW.lf(void 0),t.sW=void 0}(i);var n=i.ja;if(dc(t),!1===Oc(i)&&"writable"===n){var e=Hc(t);Pc(i,e)}qc(t)}),(function(n){"writable"===i.ja&&zc(t),function(t,n){t.sW.PL(n),t.sW=void 0,Ic(t,n)}(i,n)}))}(t,i.chunk)}}else Rc(n)}function Vc(t,n){"writable"===t.vW.ja&&Xc(t,n)}function Hc(t){return Wc(t)<=0}function Xc(t,n){var i=t.vW;zc(t),kc(i,n)}function jc(t){return new a("WritableStream.prototype."+t+" can only be used on a WritableStream")}function Yc(t){return new a("WritableStreamDefaultWriter.prototype."+t+" can only be used on a WritableStreamDefaultWriter")}function Kc(t){return new a("Cannot "+t+" a stream using a released writer")}function Gc(t){t.$C=Dh((function(n,i){t.WV=n,t.HV=i,t._W="pending"}))}function $c(t,n){Gc(t),Zc(t,n)}function Zc(t,n){zh(t.$C),t.HV(n),t.WV=void 0,t.HV=void 0,t._W="rejected"}function Jc(t){t.WV(void 0),t.WV=void 0,t.HV=void 0,t._W="resolved"}function Qc(t){t.fW=Dh((function(n,i){t.MW=n,t.bW=i})),t.gW="pending"}function ta(t,n){Qc(t),ia(t,n)}function na(t){Qc(t),ea(t)}function ia(t,n){zh(t.fW),t.bW(n),t.MW=void 0,t.bW=void 0,t.gW="rejected"}function ea(t){t.MW(void 0),t.MW=void 0,t.bW=void 0,t.gW="fulfilled"}function ra(t){if("object"!=typeof t||null===t)return!1;try{return"boolean"==typeof t.aborted}catch(t){return!1}}var oa="undefined"!=typeof DOMException?DOMException:void 0;var ua=function(t){if("function"!=typeof t&&"object"!=typeof t)return!1;try{return new t,!0}catch(t){return!1}}(oa)?oa:function(){var t=function(t,n){this.message=t||"",this.name=n||"Error",c.captureStackTrace&&c.captureStackTrace(this,this.constructor)};return t.prototype=v.create(c.prototype),v.defineProperty(t.prototype,"constructor",{value:t,writable:!0,configurable:!0}),t}();function sa(t,n,i,e,r,o){var u=Qh(t),s=pc(n);t.ZV=!0;var f=!1,h=Ch(void 0);return Dh((function(c,v){var d,l,w,b;if(void 0!==o){if(d=function(){var i=new ua("Aborted","AbortError"),o=[];!1===e&&o.push((function(){return"writable"===n.ja?Tc(n,i):Ch(void 0)})),!1===r&&o.push((function(){return"readable"===t.ja?Qa(t,i):Ch(void 0)})),y((function(){return X.all(o.map((function(t){return t()})))}),!0,i)},!0===o.aborted)return void d();o.addEventListener("abort",d)}if(p(t,u.$C,(function(t){!1===e?y((function(){return Tc(n,t)}),!0,t):_(!0,t)})),p(n,s.$C,(function(n){!1===r?y((function(){return Qa(t,n)}),!0,n):_(!0,n)})),l=t,w=u.$C,b=function(){!1===i?y((function(){return function(t){var n=t.dW,i=n.ja;return!0===Oc(n)||"closed"===i?Ch(void 0):"errored"===i?xh(n.VV):Cc(t)}(s)})):_()},"closed"===l.ja?b():Lh(w,b),!0===Oc(n)||"closed"===n.ja){var g=new a("the destination writable stream closed before all data could be piped to it");!1===r?y((function(){return Qa(t,g)}),!0,g):_(!0,g)}function m(){var t=h;return Bh(h,(function(){return t!==h?m():void 0}))}function p(t,n,i){"errored"===t.ja?i(t.VV):Uh(n,i)}function y(t,i,e){function r(){Mh(t(),(function(){return S(i,e)}),(function(t){return S(!0,t)}))}!0!==f&&(f=!0,"writable"===n.ja&&!1===Oc(n)?Lh(m(),r):r())}function _(t,i){!0!==f&&(f=!0,"writable"===n.ja&&!1===Oc(n)?Lh(m(),(function(){return S(t,i)})):S(t,i))}function S(t,n){Mc(s),Xh(u),void 0!==o&&o.removeEventListener("abort",d),t?v(n):c(void 0)}zh(Dh((function(t,n){!function i(e){e?t():Bh(!0===f?Ch(!0):Bh(s.fW,(function(){return Bh(fc(u),(function(t){return!0===t.done||(h=Bh(Lc(s,t.value),void 0,wh),!1)}))})),i,n)}(!1)})))}))}var fa=function(){function t(){throw new a}return v.defineProperty(t.prototype,"desiredSize",{get:function(){if(!1===ha(this))throw pa("desiredSize");return ba(this)},enumerable:!0,configurable:!0}),t.prototype.close=function(){if(!1===ha(this))throw pa("close");if(!1===ga(this))throw new a("The stream is not in a state that permits close");da(this)},t.prototype.enqueue=function(t){if(!1===ha(this))throw pa("enqueue");if(!1===ga(this))throw new a("The stream is not in a state that permits enqueue");return la(this,t)},t.prototype.error=function(t){if(!1===ha(this))throw pa("error");wa(this,t)},t.prototype[Zh]=function(t){wc(this);var n=this.TW(t);return va(this),n},t.prototype[Jh]=function(){var t=this.SW;if(this.$V.length>0){var n=dc(this);return!0===this.NW&&0===this.$V.length?(va(this),tv(t)):ca(this),Ch(qh(n,!1,t.GV.FV))}var i=tc(t);return ca(this),i},t}();function ha(t){return!!mh(t)&&!!v.prototype.hasOwnProperty.call(t,"SW")}function ca(t){!1!==aa(t)&&(!0!==t.IW?(t.IW=!0,Mh(t.DW(),(function(){t.IW=!1,!0===t.EW&&(t.EW=!1,ca(t))}),(function(n){wa(t,n)}))):t.EW=!0)}function aa(t){var n=t.SW;return!1!==ga(t)&&(!1!==t.lW&&(!0===Ja(n)&&ic(n)>0||ba(t)>0))}function va(t){t.DW=void 0,t.TW=void 0,t.wW=void 0}function da(t){var n=t.SW;t.NW=!0,0===t.$V.length&&(va(t),tv(n))}function la(t,n){var i=t.SW;if(!0===Ja(i)&&ic(i)>0)nc(i,n,!1);else{var e=void 0;try{e=t.wW(n)}catch(n){throw wa(t,n),n}try{lc(t,n,e)}catch(n){throw wa(t,n),n}}ca(t)}function wa(t,n){var i=t.SW;"readable"===i.ja&&(wc(t),va(t),nv(i,n))}function ba(t){var n=t.SW.ja;return"errored"===n?null:"closed"===n?0:t.pW-t.tW}function ga(t){var n=t.SW.ja;return!1===t.NW&&"readable"===n}function ma(t,n,i,e,r,o,u){n.SW=t,n.$V=void 0,n.tW=void 0,wc(n),n.lW=!1,n.NW=!1,n.EW=!1,n.IW=!1,n.wW=u,n.pW=o,n.DW=e,n.TW=r,t.qV=n,Mh(Ch(i()),(function(){n.lW=!0,ca(n)}),(function(t){wa(n,t)}))}function pa(t){return new a("ReadableStreamDefaultController.prototype."+t+" can only be used on a ReadableStreamDefaultController")}var ya=Number.isInteger||function(t){return"number"==typeof t&&isFinite(t)&&d.floor(t)===t},_a=function(){function t(){throw new a("ReadableStreamBYOBRequest cannot be used directly")}return v.defineProperty(t.prototype,"view",{get:function(){if(!1===Ea(this))throw za("view");return this.VI},enumerable:!0,configurable:!0}),t.prototype.respond=function(t){if(!1===Ea(this))throw za("respond");if(void 0===this.kW)throw new a("This BYOB request has been invalidated");this.VI.buffer,function(t,n){if(n=Number(n),!1===_h(n))throw new RangeError("bytesWritten must be a finite");xa(t,n)}(this.kW,t)},t.prototype.respondWithNewView=function(t){if(!1===Ea(this))throw za("respond");if(void 0===this.kW)throw new a("This BYOB request has been invalidated");if(!ArrayBuffer.isView(t))throw new a("You can only respond with array buffer views");t.buffer,function(t,n){var i=t.LW.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,xa(t,n.byteLength)}(this.kW,t)},t}(),Sa=function(){function t(){throw new a("ReadableByteStreamController constructor cannot be used directly")}return v.defineProperty(t.prototype,"byobRequest",{get:function(){if(!1===Ta(this))throw Wa("byobRequest");if(void 0===this.xW&&this.LW.length>0){var t=this.LW.peek(),n=new g(t.buffer,t.byteOffset+t.bytesFilled,t.byteLength-t.bytesFilled),i=v.create(_a.prototype);!function(t,n,i){t.kW=n,t.VI=i}(i,this,n),this.xW=i}return this.xW},enumerable:!0,configurable:!0}),v.defineProperty(t.prototype,"desiredSize",{get:function(){if(!1===Ta(this))throw Wa("desiredSize");return Ua(this)},enumerable:!0,configurable:!0}),t.prototype.close=function(){if(!1===Ta(this))throw Wa("close");if(!0===this.NW)throw new a("The stream has already been closed; do not close it again!");var t=this.OW.ja;if("readable"!==t)throw new a("The stream (in "+t+" state) is not in the readable state and cannot be closed");!function(t){var n=t.OW;if(t.tW>0)return void(t.NW=!0);if(t.LW.length>0){if(t.LW.peek().bytesFilled>0){var i=new a("Insufficient bytes to fill elements in the given buffer");throw La(t,i),i}}Ma(t),tv(n)}(this)},t.prototype.enqueue=function(t){if(!1===Ta(this))throw Wa("enqueue");if(!0===this.NW)throw new a("stream is closed or draining");var n=this.OW.ja;if("readable"!==n)throw new a("The stream (in "+n+" state) is not in the readable state and cannot be enqueued to");if(!ArrayBuffer.isView(t))throw new a("You can only enqueue array buffer views when using a ReadableByteStreamController");t.buffer,function(t,n){var i=t.OW,e=n.buffer,r=n.byteOffset,o=n.byteLength,u=e;if(!0===ec(i)){if(0===ic(i))Oa(t,u,r,o);else nc(i,new g(u,r,o),!1)}else!0===Ha(i)?(Oa(t,u,r,o),Ca(t)):Oa(t,u,r,o);Ia(t)}(this,t)},t.prototype.error=function(t){if(!1===Ta(this))throw Wa("error");La(this,t)},t.prototype[Zh]=function(t){this.LW.length>0&&(this.LW.peek().bytesFilled=0);wc(this);var n=this.TW(t);return Ma(this),n},t.prototype[Jh]=function(){var t=this.OW;if(this.tW>0){var n=this.$V.shift();this.tW-=n.byteLength,Aa(this);var i=void 0;try{i=new g(n.buffer,n.byteOffset,n.byteLength)}catch(t){return xh(t)}return Ch(qh(i,!1,t.GV.FV))}var e=this.jW;if(void 0!==e){var r=void 0;try{r=new ArrayBuffer(e)}catch(t){return xh(t)}var o={buffer:r,byteOffset:0,byteLength:e,bytesFilled:0,elementSize:1,ctor:g,readerType:"default"};this.LW.push(o)}var u=tc(t);return Ia(this),u},t}();function Ta(t){return!!mh(t)&&!!v.prototype.hasOwnProperty.call(t,"OW")}function Ea(t){return!!mh(t)&&!!v.prototype.hasOwnProperty.call(t,"kW")}function Ia(t){var n=function(t){var n=t.OW;if("readable"!==n.ja)return!1;if(!0===t.NW)return!1;if(!1===t.lW)return!1;if(!0===ec(n)&&ic(n)>0)return!0;if(!0===Ha(n)&&Va(n)>0)return!0;var i=Ua(t);if(i>0)return!0;return!1}(t);!1!==n&&(!0!==t.IW?(t.IW=!0,Mh(t.DW(),(function(){t.IW=!1,!0===t.EW&&(t.EW=!1,Ia(t))}),(function(n){La(t,n)}))):t.EW=!0)}function ka(t,n){var i=!1;"closed"===t.ja&&(i=!0);var e=Ra(n);"default"===n.readerType?nc(t,e,i):function(t,n,i){var e=t.GV,r=e.RW.shift();r.lf(qh(n,i,e.FV))}(t,e,i)}function Ra(t){var n=t.bytesFilled,i=t.elementSize;return new t.ctor(t.buffer,t.byteOffset,n/i)}function Oa(t,n,i,e){t.$V.push({buffer:n,byteOffset:i,byteLength:e}),t.tW+=e}function Na(t,n){var i=n.elementSize,e=n.bytesFilled-n.bytesFilled%i,r=d.min(t.tW,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 h=t.$V;s>0;){var c=h.peek(),a=d.min(s,c.byteLength),v=n.byteOffset+n.bytesFilled;yh(n.buffer,v,c.buffer,c.byteOffset,a),c.byteLength===a?h.shift():(c.byteOffset+=a,c.byteLength-=a),t.tW-=a,Pa(t,a,n),s-=a}return f}function Pa(t,n,i){Da(t),i.bytesFilled+=n}function Aa(t){0===t.tW&&!0===t.NW?(Ma(t),tv(t.OW)):Ia(t)}function Da(t){void 0!==t.xW&&(t.xW.kW=void 0,t.xW.VI=void 0,t.xW=void 0)}function Ca(t){for(;t.LW.length>0;){if(0===t.tW)return;var n=t.LW.peek();!0===Na(t,n)&&(Ba(t),ka(t.OW,n))}}function xa(t,n){var i=t.LW.peek();if("closed"===t.OW.ja){if(0!==n)throw new a("bytesWritten must be 0 when calling respond() on a closed stream");!function(t,n){n.buffer=n.buffer;var i=t.OW;if(!0===Ha(i))for(;Va(i)>0;)ka(i,Ba(t))}(t,i)}else!function(t,n,i){if(i.bytesFilled+n>i.byteLength)throw new RangeError("bytesWritten out of range");if(Pa(t,n,i),!(i.bytesFilled<i.elementSize)){Ba(t);var e=i.bytesFilled%i.elementSize;if(e>0){var r=i.byteOffset+i.bytesFilled,o=i.buffer.slice(r-e,r);Oa(t,o,0,o.byteLength)}i.buffer=i.buffer,i.bytesFilled-=e,ka(t.OW,i),Ca(t)}}(t,n,i);Ia(t)}function Ba(t){var n=t.LW.shift();return Da(t),n}function Ma(t){t.DW=void 0,t.TW=void 0}function La(t,n){var i=t.OW;"readable"===i.ja&&(!function(t){Da(t),t.LW=new Wh}(t),wc(t),Ma(t),nv(i,n))}function Ua(t){var n=t.OW.ja;return"errored"===n?null:"closed"===n?0:t.pW-t.tW}function Fa(t,n,i){var e=v.create(Sa.prototype);var r=Th(n,"pull",0,[e]),o=Th(n,"cancel",1,[]),u=n.autoAllocateChunkSize;if(void 0!==u&&(u=Number(u),!1===ya(u)||u<=0))throw new RangeError("autoAllocateChunkSize must be a positive integer");!function(t,n,i,e,r,o,u){n.OW=t,n.EW=!1,n.IW=!1,n.xW=void 0,n.$V=n.tW=void 0,wc(n),n.NW=!1,n.lW=!1,n.pW=kh(o),n.DW=e,n.TW=r,n.jW=u,n.LW=new Wh,t.qV=n,Mh(Ch(i()),(function(){n.lW=!0,Ia(n)}),(function(t){La(n,t)}))}(t,e,(function(){return Eh(n,"start",[e])}),r,o,i,u)}function za(t){return new a("ReadableStreamBYOBRequest.prototype."+t+" can only be used on a ReadableStreamBYOBRequest")}function Wa(t){return new a("ReadableByteStreamController.prototype."+t+" can only be used on a ReadableByteStreamController")}function qa(t){var n=Dh((function(n,i){var e={lf:n,PL:i};t.GV.RW.push(e)}));return n}function Va(t){return t.GV.RW.length}function Ha(t){var n=t.GV;return void 0!==n&&!!ja(n)}var Xa=function(){function t(t){if(!Za(t))throw new a("ReadableStreamBYOBReader can only be constructed with a ReadableStream instance given a byte source");if(!1===Ta(t.qV))throw new a("Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte source");if(Ja(t))throw new a("This stream has already been locked for exclusive reading by another reader");Vh(this,t),this.RW=new Wh}return v.defineProperty(t.prototype,"closed",{get:function(){return ja(this)?this.$C:xh(Ya("closed"))},enumerable:!0,configurable:!0}),t.prototype.cancel=function(t){return ja(this)?void 0===this.YV?xh(jh("cancel")):Hh(this,t):xh(Ya("cancel"))},t.prototype.read=function(t){return ja(this)?void 0===this.YV?xh(jh("read from")):ArrayBuffer.isView(t)?(t.buffer,0===t.byteLength?xh(new a("view must have non-zero byteLength")):function(t,n){var i=t.YV;if(i.ZV=!0,"errored"===i.ja)return xh(i.VV);return function(t,n){var i=t.OW,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.LW.length>0)return t.LW.push(o),qa(i);if("closed"===i.ja)return Ch(qh(new r(o.buffer,o.byteOffset,0),!0,i.GV.FV));if(t.tW>0){if(!0===Na(t,o)){var u=Ra(o);return Aa(t),Ch(qh(u,!1,i.GV.FV))}if(!0===t.NW){var s=new a("Insufficient bytes to fill elements in the given buffer");return La(t,s),xh(s)}}t.LW.push(o);var f=qa(i);return Ia(t),f}(i.qV,n)}(this,t)):xh(new a("view must be an array buffer view")):xh(Ya("read"))},t.prototype.releaseLock=function(){if(!ja(this))throw Ya("releaseLock");if(void 0!==this.YV){if(this.RW.length>0)throw new a("Tried to release a reader lock when that reader has pending read() calls un-settled");Xh(this)}},t}();function ja(t){return!!mh(t)&&!!v.prototype.hasOwnProperty.call(t,"RW")}function Ya(t){return new a("ReadableStreamBYOBReader.prototype."+t+" can only be used on a ReadableStreamBYOBReader")}var Ka=function(){function t(t,n){void 0===t&&(t={}),void 0===n&&(n={}),$a(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),Fa(this,t,e=kh(e))}else{if(void 0!==r)throw new RangeError("Invalid type is specified");var o=Rh(i);void 0===e&&(e=1),function(t,n,i,e){var r=v.create(fa.prototype),o=Th(n,"pull",0,[r]),u=Th(n,"cancel",1,[]);ma(t,r,(function(){return Eh(n,"start",[r])}),o,u,i,e)}(this,t,e=kh(e),o)}}return v.defineProperty(t.prototype,"locked",{get:function(){if(!1===Za(this))throw iv("locked");return Ja(this)},enumerable:!0,configurable:!0}),t.prototype.cancel=function(t){return!1===Za(this)?xh(iv("cancel")):!0===Ja(this)?xh(new a("Cannot cancel a stream that already has a reader")):Qa(this,t)},t.prototype.getReader=function(t){var n=(void 0===t?{}:t).mode;if(!1===Za(this))throw iv("getReader");if(void 0===n)return Qh(this,!0);if("byob"===(n=String(n)))return function(t,n){void 0===n&&(n=!1);var i=new Xa(t);return i.FV=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===Za(this))throw iv("pipeThrough");if(!1===_c(i))throw new a("writable argument to pipeThrough must be a WritableStream");if(!1===Za(e))throw new a("readable argument to pipeThrough must be a ReadableStream");if(o=Boolean(o),u=Boolean(u),s=Boolean(s),void 0!==f&&!ra(f))throw new a("ReadableStream.prototype.pipeThrough's signal option must be an AbortSignal");if(!0===Ja(this))throw new a("ReadableStream.prototype.pipeThrough cannot be used on a locked ReadableStream");if(!0===Sc(i))throw new a("ReadableStream.prototype.pipeThrough cannot be used on a locked WritableStream");return zh(sa(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===Za(this)?xh(iv("pipeTo")):!1===_c(t)?xh(new a("ReadableStream.prototype.pipeTo's first argument must be a WritableStream")):(e=Boolean(e),r=Boolean(r),o=Boolean(o),void 0===u||ra(u)?!0===Ja(this)?xh(new a("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream")):!0===Sc(t)?xh(new a("ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream")):sa(this,t,e,r,o,u):xh(new a("ReadableStream.prototype.pipeTo's signal option must be an AbortSignal")))},t.prototype.tee=function(){if(!1===Za(this))throw iv("tee");var t=function(t,n){var i,e,r,o,u,s=Qh(t),f=!1,h=!1,c=!1,a=Dh((function(t){u=t}));function v(){return!0===f||(f=!0,zh(Fh(fc(s),(function(t){if(f=!1,!0===t.done)return!1===h&&da(r.qV),void(!1===c&&da(o.qV));var n=t.value,i=n,e=n;!1===h&&la(r.qV,i),!1===c&&la(o.qV,e)})))),Ch(void 0)}function d(){}return r=Ga(d,v,(function(n){if(h=!0,i=n,!0===c){var r=ph([i,e]),o=Qa(t,r);u(o)}return a})),o=Ga(d,v,(function(n){if(c=!0,e=n,!0===h){var r=ph([i,e]),o=Qa(t,r);u(o)}return a})),Uh(s.$C,(function(t){wa(r.qV,t),wa(o.qV,t)})),[r,o]}(this);return ph(t)},t.prototype.getIterator=function(t){var n=(void 0===t?{}:t).preventCancel,i=void 0!==n&&n;if(!1===Za(this))throw iv("getIterator");return function(t,n){void 0===n&&(n=!1);var i=Qh(t),e=v.create(cc);return e.KV=i,e.JV=Boolean(n),e}(this,i)},t}();function Ga(t,n,i,e,r){void 0===e&&(e=1),void 0===r&&(r=function(){return 1});var o=v.create(Ka.prototype);return $a(o),ma(o,v.create(fa.prototype),t,n,i,e,r),o}function $a(t){t.ja="readable",t.GV=void 0,t.VV=void 0,t.ZV=!1}function Za(t){return!!mh(t)&&!!v.prototype.hasOwnProperty.call(t,"qV")}function Ja(t){return void 0!==t.GV}function Qa(t,n){return t.ZV=!0,"closed"===t.ja?Ch(void 0):"errored"===t.ja?xh(t.VV):(tv(t),Fh(t.qV[Zh](n),wh))}function tv(t){t.ja="closed";var n=t.GV;void 0!==n&&(sc(n)&&(n.XV.forEach((function(t){t.lf(qh(void 0,!0,n.FV))})),n.XV=new Wh),$h(n))}function nv(t,n){t.ja="errored",t.VV=n;var i=t.GV;void 0!==i&&(sc(i)?(i.XV.forEach((function(t){t.PL(n)})),i.XV=new Wh):(i.RW.forEach((function(t){t.PL(n)})),i.RW=new Wh),Gh(i,n))}function iv(t){return new a("ReadableStream.prototype."+t+" can only be used on a ReadableStream")}"symbol"==typeof lh.asyncIterator&&v.defineProperty(Ka.prototype,lh.asyncIterator,{value:Ka.prototype.getIterator,enumerable:!1,writable:!0,configurable:!0});(function(){function t(t){var n=t.highWaterMark;this.highWaterMark=n}t.prototype.size=function(t){return t.byteLength}})(),function(){function t(t){var n=t.highWaterMark;this.highWaterMark=n}t.prototype.size=function(){return 1}}();var ev=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=Rh(e);if(void 0===r&&(r=1),r=kh(r),void 0!==t.readableType)throw new RangeError("Invalid readable type specified");var f,h=Rh(o);void 0===u&&(u=0),u=kh(u),function(t,n,i,e,r,o){function u(){return n}function s(n){return function(t,n){var i=t.PW;if(!0===t.hW){return Fh(t.zW,(function(){var e=t.BW;if("erroring"===e.ja)throw e.VV;return dv(i,n)}))}return dv(i,n)}(t,n)}function f(n){return function(t,n){return ov(t,n),Ch(void 0)}(t,n)}function h(){return function(t){var n=t.UW,i=t.PW,e=i.QW();return av(i),Fh(e,(function(){if("errored"===n.ja)throw n.VV;var t=n.qV;!0===ga(t)&&da(t)}),(function(i){throw ov(t,i),n.VV}))}(t)}function c(){return function(t){return sv(t,!1),t.zW}(t)}function a(n){return uv(t,n),Ch(void 0)}t.BW=function(t,n,i,e,r,o){void 0===r&&(r=1),void 0===o&&(o=function(){return 1});var u=v.create(mc.prototype);return yc(u),Fc(u,v.create(Uc.prototype),t,n,i,e,r,o),u}(u,s,h,f,i,e),t.UW=Ga(u,c,a,r,o),t.hW=void 0,t.zW=void 0,t.FW=void 0,sv(t,!0),t.PW=void 0}(this,Dh((function(t){f=t})),r,s,u,h),function(t,n){var i=v.create(hv.prototype),e=function(t){try{return vv(i,t),Ch(void 0)}catch(t){return xh(t)}},r=n.transform;if(void 0!==r){if("function"!=typeof r)throw new a("transform is not a method");e=function(t){return Ih(r,n,[t,i])}}var o=Th(n,"flush",0,[i]);!function(t,n,i,e){n.YW=t,t.PW=n,n.GW=i,n.QW=e}(t,i,e,o)}(this,t);var c=Eh(t,"start",[this.PW]);f(c)}return v.defineProperty(t.prototype,"readable",{get:function(){if(!1===rv(this))throw wv("readable");return this.UW},enumerable:!0,configurable:!0}),v.defineProperty(t.prototype,"writable",{get:function(){if(!1===rv(this))throw wv("writable");return this.BW},enumerable:!0,configurable:!0}),t}();function rv(t){return!!mh(t)&&!!v.prototype.hasOwnProperty.call(t,"PW")}function ov(t,n){wa(t.UW.qV,n),uv(t,n)}function uv(t,n){av(t.PW),Vc(t.BW.iW,n),!0===t.hW&&sv(t,!1)}function sv(t,n){void 0!==t.zW&&t.FW(),t.zW=Dh((function(n){t.FW=n})),t.hW=n}var fv,hv=function(){function t(){throw new a("TransformStreamDefaultController instances cannot be created directly")}return v.defineProperty(t.prototype,"desiredSize",{get:function(){if(!1===cv(this))throw lv("desiredSize");return ba(this.YW.UW.qV)},enumerable:!0,configurable:!0}),t.prototype.enqueue=function(t){if(!1===cv(this))throw lv("enqueue");vv(this,t)},t.prototype.error=function(t){if(!1===cv(this))throw lv("error");!function(t,n){ov(t.YW,n)}(this,t)},t.prototype.terminate=function(){if(!1===cv(this))throw lv("terminate");!function(t){var n=t.YW,i=n.UW.qV;!0===ga(i)&&da(i);var e=new a("TransformStream terminated");uv(n,e)}(this)},t}();function cv(t){return!!mh(t)&&!!v.prototype.hasOwnProperty.call(t,"YW")}function av(t){t.GW=void 0,t.QW=void 0}function vv(t,n){var i=t.YW,e=i.UW.qV;if(!1===ga(e))throw new a("Readable side is not in a state that permits enqueue");try{la(e,n)}catch(t){throw uv(i,t),i.UW.VV}var r=function(t){return!0!==aa(t)}(e);r!==i.hW&&sv(i,!0)}function dv(t,n){return Fh(t.GW(n),void 0,(function(n){throw ov(t.YW,n),n}))}function lv(t){return new a("TransformStreamDefaultController.prototype."+t+" can only be used on a TransformStreamDefaultController")}function wv(t){return new a("TransformStream.prototype."+t+" can only be used on a TransformStream")}function bv(t){return function(t){return new Ka({start:function(n){for(var i=0;i<t.length;i++){var e=t[i];n.enqueue(e)}n.close()}})}([t])}function gv(t){return bv(function(t){return new g(t)}(t))}function mv(t,n){return function(t,n){var i=n,e=t.getReader(),r=new nu,o=function(){u();var t=new Jt;e.cancel(t).catch(_t),r.RL(t)},u=function(){i&&(i.c_(o),i=void 0)};i&&(i.n_?o():i.u_(o));var s=[],f=function(t){return t.done?(u(),X.resolve(s)):(s.push(t.value),X.resolve(e.read()).then(f))};return X.resolve(e.read()).then(f).then((function(t){u(),r.jL(t)}),(function(t){u(),r.RL(t)})),r.zL}(t,n).then((function(t){return zn(t).buffer}))}function pv(t,n){var i=n,e=new ev,r=e.readable,o=e.writable,u=o.getWriter(),s=function(){i&&i.g_()};return u.closed.then(s,s),t.then((function(t){return i=void 0,u.releaseLock(),t.pipeTo(o).catch(_t)}),(function(t){return i=void 0,u.releaseLock(),o.abort(t).catch(_t)})),r}function yv(t){return ui(new g(t))}function _v(t){return si(t).buffer}!function(t){t[t.xD=0]="xD",t[t.VW=1]="VW"}(fv||(fv={}));var Sv="content-type",Tv="text/plain;charset=UTF-8",Ev=function(){function t(){}var n=t.prototype;return n.SR=function(t){return this.fE(t).then(JSON.parse)},n.sR=function(t,n){switch(t){case ch.kD:return this.GR(n);case ch.LD:return this.SR(n);case ch.xD:return this.WW();case ch.Ru:return this.fE(n);default:throw new a}},t}();function Iv(t,n,i){if(t instanceof Ev)return t;if(t instanceof Ka)return function(t,n){return new Rv({Av:0,WW:t,Nz:kv(n)})}(t,i);var e=kv(i),r=X.resolve(t).then((function(t){return function(t,n){if(t){if("string"==typeof t)return{Av:ch.Ru,KD:t,Nz:n||Tv};if(t instanceof ArrayBuffer||Fn(t))return{Av:ch.kD,KD:xv(t),Nz:n};if(function(t){return ft(t)&&t.constructor&&t.constructor===v}(t)||st(t))return{Av:ch.LD,KD:t,Nz:n};throw new a("Unsupported BodyInit type")}return{Av:ch.Ru,KD:null,Nz:n}}(t,e)}));return new Rv({Av:1,zL:r,HW:n})}function kv(t){return(t.get(Sv)||"").toLowerCase()}var Rv=function(t){function n(n){var i;return(i=t.call(this)||this).ZW=!1,i.$W=new nu,i.$W.zL.catch(_t),i.eH(n),i}Rt(n,t);var i=n.prototype;return i.JW=function(){return this.$W.zL},i.fE=function(t){return this.tH(Ov,t)},i.SR=function(t){return this.tH(Pv,t)},i.GR=function(t){return this.tH(Dv,t)},i.WW=function(){return this.iH(function(t){return 0===t.Av?t.WW:pv(t.zL.then(Cv).then(gv),t.HW)}(this.KW))},i.tH=function(t,n){if(this.ZW)return X.reject(new a("Already used"));this.ZW=!0;var i=t(this.KW,n);return this.$W.w_(i.then(_t)),i},i.iH=function(t){if(this.ZW)throw new a("Already used");if(t.locked)throw new a("Body stream is locked");this.ZW=!0;var n=new ev,i=X.resolve(t.pipeTo(n.writable));return this.$W.w_(i),n.readable},i.eH=function(t){this.KW=t,1===t.Av&&t.zL.catch(_t)},i.sH=function(){if(this.ZW)throw new a("Already used");var t=function(t){if(0===t.Av){var n=Ot(t.WW.tee(),2),i=n[0],e=n[1];return[{Av:t.Av,WW:i,Nz:t.Nz},{Av:t.Av,WW:e,Nz:t.Nz}]}var r=Ot(t.HW.v_(),2),o=r[0],u=r[1];return[{Av:t.Av,zL:t.zL,HW:o},{Av:t.Av,zL:t.zL,HW:u}]}(this.KW),i=t[0],e=t[1];return this.eH(i),new n(e)},It(n,[{key:"XW",get:function(){return this.ZW}},{key:"qW",get:function(){return 0===this.KW.Av}}]),n}(Ev);function Ov(t,n){return 0===t.Av?mv(t.WW,n).then(yv):(n&&t.HW.w_(n),nn(t.zL.then(Nv),t.HW))}function Nv(t){switch(t.Av){case ch.Ru:return X.resolve(t.KD||"");case ch.kD:return X.resolve(t.KD).then(yv);case ch.LD:return X.resolve(t.KD).then(JSON.stringify)}}function Pv(t,n){return 0===t.Av?Ov(t,n).then(JSON.parse):(n&&t.HW.w_(n),nn(t.zL.then(Av),t.HW))}function Av(t){return t.Av===ch.LD?X.resolve(t.KD):Nv(t).then(JSON.parse)}function Dv(t,n){return 0===t.Av?mv(t.WW,n):(n&&t.HW.w_(n),nn(t.zL.then(Cv),t.HW))}function Cv(t){switch(t.Av){case ch.kD:return X.resolve(t.KD);case ch.Ru:case ch.LD:return Nv(t).then(_v)}}function xv(t){return t instanceof ArrayBuffer?t:ai(hi(t)).buffer}var Bv=function(t){function n(n){var i;return(i=t.call(this)||this).nH=n,i}Rt(n,t);var i=n.prototype;return i.JW=function(){return this.nH.JW()},i.fE=function(t){return this.nH.fE(t)},i.SR=function(t){return this.nH.SR(t)},i.GR=function(t){return this.nH.GR(t)},i.WW=function(t){return this.nH.WW(t)},i.sH=function(){return this.nH.sH()},It(n,[{key:"XW",get:function(){return this.nH.XW}},{key:"qW",get:function(){return this.nH.qW}}]),n}(Ev);var Mv,Lv,Uv,Fv,zv,Wv=function(t){function n(n,i){var e,r,o,u,s,f;i?(r=i.JD,o=i.tE,u=i.vD,s=i.NR,f=i.rH):(r=[],o=ch.Ru,u=200,s="OK",f=!1);var h=n.fD,c=new ah(n.JD||r),a=n.tE||o,v=n._E||(i&&i.fD===h?i._E:h.zu),d=i?i.nH:null,l=Iv(void 0!==n.ly?n.ly:d,n.HW||new Zt,c);return(e=t.call(this,l)||this).JD=c,e.fD=h,e._E=v,e.tE=a,e.vD=void 0!==n.vD?n.vD:u,e.NR=void 0!==n.NR?String(n.NR):s,e.rH=n.rH||f,e}Rt(n,t);var i=n.prototype;return i.ly=function(t){return this.sR(this.tE,t)},i.$A=function(){return new n({ly:this.sH(),fD:this.fD},this)},n}(Bv);!function(t){t.DELETE="DELETE",t.GET="GET",t.HEAD="HEAD",t.OPTIONS="OPTIONS",t.POST="POST",t.PUT="PUT"}(Mv||(Mv={})),function(t){t.UT="",t.RD="manifest",t.PD="segment",t.zD="preload-hint",t.BD="content-protection"}(Lv||(Lv={})),function(t){t.UT="",t.UD="initialization-segment",t.QD="fairplay-license",t.FD="fairplay-certificate",t.YD="widevine-license",t.GD="widevine-certificate",t.VD="playready-license",t.WD="clearkey-license",t.HD="aes128-key"}(Uv||(Uv={})),function(t){t.UT="",t.WA="audio",t.VA="video",t.Ru="text",t.BT="image"}(Fv||(Fv={})),function(t){t.XD="same-origin",t.mp="no-cors",t.ZD="cors",t.qD="navigate"}(zv||(zv={}));var qv=function(t,n){var i,e,r,o,u,s,f,h,c,a,v,d,l,w,b,g,m,p,y=t.zu;n?(i=n.KD,e=n.JD,r=n.$D,o=n.tE,u=n.mD,s=n.iE,f=n.f_,h=n.Av,c=n.eE,a=n.sE,v=n.nE,d=n.rE,l=n._v,w=n.oE,b=n.hE):(i=null,e={},r="GET",o=ch.Ru,u=0,s=0,h="",c="",a="",v=!1,l=void 0,w=!1,b=void 0),this.zu=y,this.KD=t.KD||i,this.JD=new ah(t.JD||e),this.$D=t.$D||r,this.tE=t.tE||o,this.mD=void 0!==t.mD?Number(t.mD)||0:u,this.iE=void 0!==t.iE?Number(t.iE)||0:s,this.f_=t.f_||f||(new Zt).f_,this.Av=t.Av||h,this.eE=t.eE||c,this.sE=t.sE||a,this.nE=void 0!==t.nE?Boolean(t.nE):v,this.rE=t.rE||d,this._v=null!=(g=t._v)?g:l,this.oE=null!=(m=t.oE)?m:w,this.hE=null!=(p=t.hE)?p:b},Vv=function(){function t(){}var n=t.prototype;return n.fD=function(t){var n=function(t){return new Wv({ly:null,JD:{},fD:t,_E:t.zu,tE:t.tE,vD:0,NR:hh.Hv})}(new qv(t));return X.resolve(n)},n.IG=function(t){},n.gn=function(){},t}();var Hv,Xv=function(){function t(t,n){void 0===n&&(n=!0),this.uH=t,this.lH=n}var n=t.prototype;return n.fD=function(t){var n=this.aH(t);return this.uH.fD(n)},n.IG=function(t){return this.uH.IG(this.cH(t))},n.aH=function(n){var i=new qv(n);if(!this.lH){var e=t.dH(i.zu);i=new qv({zu:e},i)}return i},n.cH=function(n){var i=n.zu;return this.lH||(i=t.dH(i)),{zu:i,KD:n.KD}},n.gn=function(){this.uH.gn()},t.dH=function(t){return pt.fH&&Vn(t,"http://")?t.replace(":","s:"):t},It(t,null,[{key:"oH",get:function(){return t.hH||(t.hH=new t(new Vv)),t.hH}}]),t}();Xv.hH=void 0,function(t){t.cD="HttpOpenError",t.lD="HttpResponseError",t.dD="HttpTimeoutError"}(Hv||(Hv={}));var jv=function(t){function n(n,i,e){var r;return(r=t.call(this,i,e)||this)._D=n,r}return Rt(n,t),It(n,[{key:"fD",get:function(){return this._D}}]),n}(Gt);var Yv=function(t){function n(n,i){return t.call(this,n,function(t){return"Error while opening "+t+". Invalid URL."}(n.zu),i)}return Rt(n,t),It(n,[{key:"name",get:function(){return Hv.cD}}]),n}(jv);var Kv=function(t){function n(n,i,e){var r;return(r=t.call(this,n.fD,null!=e?e:function(t){return"Error while loading "+t.fD.zu+", status code "+t.vD}(n),i)||this).wD=n,r}return Rt(n,t),It(n,[{key:"name",get:function(){return Hv.lD}},{key:"gD",get:function(){return this.wD}}]),n}(jv);var Gv=function(t){function n(n,i){return t.call(this,n,function(t){return"Request for "+t.zu+" timed out after "+t.mD+" seconds."}(n),i)}return Rt(n,t),It(n,[{key:"name",get:function(){return Hv.dD}}]),n}(jv),$v=self.fetch,Zv=self.Request,Jv=self.Response,Qv=self.Headers,td=self.ReadableStream,nd=self.AbortSignal,id=self.AbortController,ed=St((function(){try{return ht($v)&&ct(Zv)&&ct(Jv)&&ct(Qv)&&"forEach"in Qv.prototype&&ko()}catch(t){return!1}})),rd=["http:","https:"];var od=St((function(){try{return ed()&&ct(nd)&&ct(id)&&"signal"in Zv.prototype}catch(t){return!1}})),ud=St((function(){try{return ed()&&ct(td)&&"body"in Jv.prototype&&!Vi.JE}catch(t){return!1}}));function sd(t,n){var i,e=t.JD.has("content-length")?Number(t.JD.get("content-length")):void 0;return i=t.qW?function(t,n,i){return t.pipeThrough(new ev(new fd(n,i)))}(t.WW(),n,e):function(t,n,i){return hd.apply(this,arguments)}(t.GR(),n,e),new Wv({ly:i,fD:t.fD},t)}var fd=function(){function t(t,n){this.ist=t,this.sst=n,this.tst=0}var n=t.prototype;return n.transform=function(t,n){this.tst+=t.byteLength,this.ist(this.tst,this.sst),n.enqueue(t)},n.flush=function(t){var n;this.ist(this.tst,null!=(n=this.sst)?n:this.tst)},t}();function hd(){return hd=tt((function(t,n,i){var e,r;return nt(this,(function(o){switch(o.label){case 0:return[4,X.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]}}))})),hd.apply(this,arguments)}var cd=function(){function t(t){this.$O=new Zt,this.wD=void 0,this.Dm=0,this.rst=!1,this._D=t,this.$O.w_(t.f_),this.gD=this.nst()}var n=t.prototype;return n.nst=function(){var t=this;return tt((function(){var n,i,e,r,o,f,h,c,a;return nt(this,(function(v){switch(v.label){case 0:(n=t._D).mD&&(t.Dm=u((function(){t.rst=!0,t.$O.g_()}),n.mD),t.$O.f_.l_((function(){s(t.Dm)})));try{i=$v(n.zu,{method:n.$D,headers:n.JD.CD(),body:n.KD,credentials:n.nE?"include":"same-origin",signal:dd(t.$O.f_),mode:n._v,keepalive:n.hE})}catch(t){throw new Yv(n,t)}v.label=1;case 1:return v.trys.push([1,3,,4]),[4,i];case 2:return e=v.sent(),[3,4];case 3:throw r=v.sent(),Qt(o=t.ost(r))&&t.$O.g_(),o;case 4:if(f=e.url||n.zu,h=0===e.status&&"file:"===function(t){return pt.Dh(t).protocol}(f)?200:e.status,c=new ad(t,e,t.$O),!function(t){return t.vD>=200&&t.vD<=299||304===t.vD}(a=new Wv({ly:c,fD:n,tE:n.tE,JD:ld(e.headers),vD:h,NR:e.statusText,_E:f})))throw new Kv(a);return n.rE&&(a=sd(a,n.rE)),[2,a]}}))}))()},n.ost=function(t){return function(t){return t instanceof jv}(t)?t:Qt(t)?this.rst?new Gv(this._D):new Jt(t.message,t):this.wD?new Kv(this.wD,t):new Yv(this._D,t)},t}(),ad=function(t){function n(n,i,e){var r;return(r=t.call(this)||this).$W=new nu,r.ast=n,r.hst=i,r.$O=e,r.$W.zL.catch(_t),r}Rt(n,t);var i=n.prototype;return i.JW=function(){return this.$W.zL},i.fE=function(t){return this.tH(this.hst.text(),t)},i.GR=function(t){return this.tH(this.hst.arrayBuffer(),t)},i.WW=function(){var t=this.hst.body;return t?this.iH(t):pv(this.GR().then(gv),this.$O)},i.sH=function(){var t=this.hst.clone(),i=Ot(this.$O.v_(),2),e=i[0],r=i[1];return this.$O=e,new n(this.ast,t,r)},i.tH=function(t,n){var i=this;n&&this.$O.w_(n);var e=tn(X.resolve(t),this.$O.f_).catch((function(t){throw i.ast.ost(t)}));return e=nn(e,this.$O),this.$W.w_(e.then(_t)),e},i.iH=function(t){var n=this;return new Ka(new bd(t,(function(t){return n.ast.ost(t)}),this.$O,this.$W),{highWaterMark:0})},It(n,[{key:"XW",get:function(){return this.hst.bodyUsed}},{key:"qW",get:function(){return ut(this.hst.body)}}]),n}(Ev),vd="abort";function dd(t){if(od()){var n=new id;if(t.n_)n.abort();else if(!t.r_){var i=function(){e(),n.abort()},e=function(){n.signal.removeEventListener(vd,i),t.c_(i),t.d_(e)};n.signal.addEventListener(vd,i),t.u_(i),t.l_(e)}return n.signal}}function ld(t){if(function(t){return ft(t)&&"function"==typeof t.forEach}(t)){var n=new ah;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 ah(t)}var wd,bd=function(){function t(t,n,i,e){this.ust=t,this.cst=n,this.$O=i,this.$W=e}var n=t.prototype;return n.start=function(t){this.GV=this.ust.getReader()},n.pull=function(t){var n=this;return tt((function(){var i,e,r;return nt(this,(function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),[4,tn(n.GV.read(),n.$O.f_)];case 1:return i=o.sent(),[3,3];case 2:return e=o.sent(),r=n.cst(e),n.$W.RL(r),n.$O.g_(),n.GV.cancel(r).catch(_t),t.error(r),[2];case 3:return i.done?(n.$W.jL(),n.$O.g_(),t.close()):t.enqueue(i.value),[2]}}))}))()},n.cancel=function(t){return this.$O.g_(),this.$W.RL(t),this.GV.cancel(t)},t}();!function(t){t[t.UNSENT=0]="UNSENT",t[t.OPENED=1]="OPENED",t[t.HEADERS_RECEIVED=2]="HEADERS_RECEIVED",t[t.LOADING=3]="LOADING",t[t.DONE=4]="DONE"}(wd||(wd={}));var gd=function(){function t(t){var n=this;this.$O=new Zt,this.wD=void 0,this.lst=new nu,this.pst=!1,this.mst=function(){var t;n.fst(),null==(t=n.dst)||t.abort()},this._D=t,this.$O.w_(t.f_),this.dst=new m,this.nst()}var n=t.prototype;return n.nst=function(){var t=this,n=this.dst,i=this._D;if(i.f_.n_)return this.fst();n.onreadystatechange=function(){return t._st()},n.onprogress=function(n){return t.ist(n)},n.onload=function(){return t.gst()},n.onloadend=function(){return t.wst()},n.onerror=function(){return t.Dq()},n.ontimeout=function(){return t.vst()},n.onabort=function(){return t.fst()},n.open(i.$D,i.zu,!0),n.withCredentials=Boolean(i.nE),"responseType"in n&&i.tE&&(i.tE===ch.Ru?n.responseType="text":n.responseType="arraybuffer"),i.JD.forEach((function(t,i){n.setRequestHeader(i,t)})),i.mD&&(n.timeout=i.mD),this.$O.f_.u_(this.mst);var e=i.KD;e?n.send(e):n.send()},n._st=function(){var t=this.dst;void 0!==t&&t.readyState>=2&&!this.pst&&(this.pst=!0,this.Ast())},n.Ast=function(){var t,n,i=this.dst,e=function(t){var n=new ah,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._D;this.yst=new nu,this.wD=new Wv({fD:r,tE:r.tE,ly:this.yst.zL,vD:i.status,NR:i.statusText,JD:e,_E:null!=(n=i.responseURL)?n:e.get("X-Request-URL")}),null==(t=this.lst)||t.jL(this.wD)},n.gst=function(){var t,n=this.dst;if(void 0!==n){var i=n.response;if(!ut(i)){var e=this._D.tE;i=e===ch.Ru?n.responseText:e===ch.kD?new ArrayBuffer(0):{}}null==(t=this.yst)||t.jL(i)}},n.wst=function(){this.gn()},n.ist=function(t){void 0!==this.dst&&(null==this._D.rE||this._D.rE.call(this._D,t.loaded,t.lengthComputable?t.total:void 0))},n.Dq=function(){var t=new c("Network request failed");this.wD?this.Ss(new Kv(this.wD,t)):this.Ss(new Yv(this._D,t))},n.vst=function(){this.Ss(new Gv(this._D))},n.fst=function(){this.Ss(new Jt),this.gn()},n.Ss=function(t){var n,i;null==(n=null!=(i=this.yst)?i:this.lst)||n.RL(t)},n.gn=function(){this.dst=void 0,this.wD=void 0,this.lst=void 0,this.yst=void 0,this.$O.h_()},It(t,[{key:"gD",get:function(){return this.lst.zL}}]),t}();var md,pd=function(){function t(){}var n=t.prototype;return n.fD=function(t){return function(t){if(!ed()||!function(t){try{return rd.indexOf(new self.URL(t,self.location.href).protocol)>=0}catch(t){return!1}}(t.zu))return!1;if(!ud()&&t.rE)return!1;if(!t.oE){if(Vi.Sk&&Vi.fk<=68)return!1;if(Vi.yk)return!1}return!0}(t)?new cd(t).gD:new gd(t).gD},n.IG=function(t){var n=t.Nz?{"Content-type":t.Nz}:void 0;this.fD(new qv({$D:Mv.POST,zu:t.zu,KD:t.KD,JD:n,_v:zv.mp})).then((function(t){!function(t){t.then(_t,_t)}(t.GR())}),_t)},n.gn=function(){},t}();!function(t){t[t.BI=1]="BI",t[t.UI=2]="UI",t[t.Ru=3]="Ru",t[t.QI=4]="QI",t[t.FI=9]="FI"}(md||(md={}));var yd=function(t){function n(n){return t.call(this,"Invalid XML",n)}return Rt(n,t),n}(Gt),_d=function(){function t(){}return t.prototype.iD=function(t){var n,i=new DOMParser;try{n=i.parseFromString(t,"text/xml")}catch(t){throw new yd(t)}if(!n||n.getElementsByTagName("parsererror").length>0)throw new yd;return new Od(n)},t}(),Sd=function(){function t(t){this.Mst=t}var n=t.prototype;return n.RI=function(t){return this.Mst.isEqualNode(t.Mst)},n.GI=function(n){return new t(this.Mst.cloneNode(n))},It(t,[{key:"zI",get:function(){return md.UI}},{key:"tD",get:function(){var t;return null!=(t=this.Mst.localName)?t:Ad(this.Mst.nodeName)}},{key:"l",get:function(){return this.Mst.nodeName}},{key:"bst",get:function(){var t;return null!=(t=this.Mst.namespaceURI)?t:void 0}},{key:"Tst",get:function(){var t;return null!=(t=this.Mst.prefix)?t:void 0}},{key:"lT",get:function(){return this.Mst.nodeValue}}]),t}(),Td=function(){function t(t){this.Sst=void 0,this.Nst=t}var n=t.prototype;return n.JI=function(t){return this.rD.filter((function(n){return Nd(n)&&n.WR===t}))},n.KI=function(t,n){return this.rD.filter((function(i){return Nd(i)&&i.tD===n&&i.bst===t}))},n.oD=function(t){this.Nst.appendChild(t.DI),this.Sst&&this.Sst.push(t)},n.RI=function(t){return this.Nst.isEqualNode(t.DI)},It(t,[{key:"rD",get:function(){return void 0===this.Sst&&(this.Sst=function(t){for(var n=[],i=0;i<t.length;i++){var e=Pd(t.item(i));e&&n.push(e)}return n}(this.Nst.childNodes)),this.Sst}},{key:"m",get:function(){return this.rD.filter(Nd)}},{key:"DI",get:function(){return this.Nst}}]),t}(),Ed=function(t){function n(n){return t.call(this,n)}Rt(n,t);var i=n.prototype;return i.sD=function(t){if(this.Nst.hasAttribute(t))return this.Nst.getAttribute(t)},i.nD=function(t,n){if(this.Nst.hasAttributeNS(t,n))return this.Nst.getAttributeNS(t,n)},i.XI=function(t){this.Nst.removeAttribute(t)},i.Ist=function(t,n){this.Nst.removeAttributeNS(t,n)},i.Dst=function(t,n){this.Nst.setAttribute(t,n)},i.Est=function(t,n,i){this.Nst.setAttributeNS(t,n,i)},i.GI=function(t){return new n(this.Nst.cloneNode(t))},It(n,[{key:"zI",get:function(){return md.BI}},{key:"tD",get:function(){var t;return null!=(t=this.Nst.localName)?t:Ad(this.Nst.nodeName)}},{key:"bst",get:function(){var t;return null!=(t=this.Nst.namespaceURI)?t:void 0}},{key:"Tst",get:function(){var t;return null!=(t=this.Nst.prefix)?t:void 0}},{key:"WR",get:function(){return this.Nst.nodeName}},{key:"$I",get:function(){return function(t){for(var n=[],i=0;i<t.length;i++)n.push(new Sd(t.item(i)));return n}(this.Nst.attributes)}},{key:"PR",get:function(){return this.Nst.textContent}}]),n}(Td),Id=function(){function t(t){this.Nst=t}return t.prototype.RI=function(t){return this.ly===t.ly},It(t,[{key:"ly",get:function(){return this.Nst.nodeValue}},{key:"DI",get:function(){return this.Nst}}]),t}(),kd=function(t){function n(n){return t.call(this,n)}return Rt(n,t),n.prototype.GI=function(t){return new n(this.Nst.cloneNode(t))},It(n,[{key:"zI",get:function(){return md.Ru}}]),n}(Id),Rd=function(t){function n(n){return t.call(this,n)}return Rt(n,t),n.prototype.GI=function(t){return new n(this.Nst.cloneNode(t))},It(n,[{key:"zI",get:function(){return md.QI}}]),n}(Id),Od=function(t){function n(n){return t.call(this,n)}return Rt(n,t),n.prototype.GI=function(t){return new n(this.Nst.cloneNode(t))},It(n,[{key:"zI",get:function(){return md.FI}},{key:"eD",get:function(){return new Ed(this.Nst.documentElement)}}]),n}(Td);function Nd(t){return function(t){return 1===t.zI}(t)}function Pd(t){switch(t.nodeType){case md.BI:return new Ed(t);case md.Ru:return new kd(t);case md.QI:return new Rd(t)}}function Ad(t){var n=t.indexOf(":");return n<0?t:t.substr(n+1)}var Dd=function(t){function n(){var n;return(n=t.apply(this,arguments)||this).kst=void 0,n.xst=ud(),n.Cst=Vi.tL||Vi.JE,n.Ost=(Vi.tL||Vi.Sk&&Vi.fk<=68||Vi.JE)&&!(Vi.yk&&Vi.bk<3),n.Ust=void 0,n.Qst=new _d,n}return Rt(n,t),n.prototype.iD=function(t){return this.Qst.iD(t)},It(n,[{key:"Zet",get:function(){return this.kst||(this.kst=new Yo(eh())),this.kst}},{key:"Lst",get:function(){return this.xst}},{key:"o1",get:function(){return this.Cst}},{key:"N1",get:function(){return this.Ost}},{key:"jst",get:function(){return!1}},{key:"NP",get:function(){return oh.PF()}},{key:"Rst",get:function(){return{Pst:fh}}},{key:"zst",get:function(){return o.connection&&o.connection.effectiveType||"default"}},{key:"Bst",get:function(){return o.connection&&o.connection.type||"unknown"}},{key:"Hj",get:function(){return this.Ust||(this.Ust=new Xv(new pd)),this.Ust}}]),n}(Eo);yt(new Dd),yt(new Dd);var Cd=self;Cd.addEventListener("install",(function(t){t.waitUntil(Cd.skipWaiting())})),Cd.addEventListener("activate",(function(t){t.waitUntil(Cd.clients.claim())})),Ai.CR.ur(Cd)}("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=t.window,h=t.document,c=(t.location,t.navigator),a=t.setTimeout,v=t.clearTimeout,d=t.setInterval,l=t.clearInterval,w=t.Error,b=t.TypeError,g=(t.SyntaxError,t.Object),m=t.Math,p=t.parseInt,y=t.parseFloat,_=t.isNaN,S=t.Uint8Array,T=(t.Worker,t.WorkerGlobalScope,t.XMLHttpRequest);function E(t){return t&&void 0!==n&&t.constructor===n?"symbol":typeof t}"function"==typeof Symbol&&Symbol.iterator?(n=Symbol,i=Symbol.iterator,e=null!=(o=Symbol.dispose)?o:n("Symbol.dispose"),r=null!=(u=Symbol.asyncDispose)?u:n("Symbol.asyncDispose")):(s=0,i=(n=function(t){return"ul"+t+"_"+ ++s})("Symbol.iterator"),e=n("Symbol.dispose"),r=n("Symbol.asyncDispose"),n.iterator=i,n.dispose=e,n.asyncDispose=r);var I=a;function k(t){return Boolean(t&&void 0!==t.length)}function R(){}function O(t){if(!(this instanceof O))throw new b("Promises must be constructed via new");if("function"!=typeof t)throw new b("not a function");this.wa=0,this.ttn=!1,this.Sbt=void 0,this.ntn=[],x(t,this)}function N(t,n){for(;3===t.wa;)t=t.Sbt;0!==t.wa?(t.ttn=!0,O.itn((function(){var i=1===t.wa?n.onFulfilled:n.onRejected;if(null!==i){var e;try{e=i(t.Sbt)}catch(t){return void A(n.promise,t)}P(n.promise,e)}else(1===t.wa?P:A)(n.promise,t.Sbt)}))):t.ntn.push(n)}function P(t,n){try{if(n===t)throw new b("A promise cannot be resolved with itself.");if(n&&("object"===(void 0===n?"undefined":E(n))||"function"==typeof n)){var i=n.then;if(n instanceof O)return t.wa=3,t.Sbt=n,void D(t);if("function"==typeof i)return void x(function(t,n){return function(){t.apply(n,arguments)}}(i,n),t)}t.wa=1,t.Sbt=n,D(t)}catch(n){A(t,n)}}function A(t,n){t.wa=2,t.Sbt=n,D(t)}function D(t){2===t.wa&&0===t.ntn.length&&O.itn((function(){t.ttn||O.rtn(t.Sbt)}));for(var n=0,i=t.ntn.length;n<i;n++)N(t,t.ntn[n]);t.ntn=null}function C(t,n,i){this.onFulfilled="function"==typeof t?t:null,this.onRejected="function"==typeof n?n:null,this.promise=i}function x(t,n){var i=!1;try{t((function(t){i||(i=!0,P(n,t))}),(function(t){i||(i=!0,A(n,t))}))}catch(t){if(i)return;i=!0,A(n,t)}}O.prototype.catch=function(t){return this.then(null,t)},O.prototype.then=function(t,n){var i=new this.constructor(R);return N(this,new C(t,n,i)),i},O.prototype.finally=function(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)}))}))},O.all=function(t){return new O((function(n,i){if(!k(t))return i(new b("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":E(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])}))},O.allSettled=function(t){return new this((function(n,i){if(!t||void 0===t.length)return i(new b((void 0===t?"undefined":E(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":E(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])}))},O.resolve=function(t){return t&&"object"===(void 0===t?"undefined":E(t))&&t.constructor===O?t:new O((function(n){n(t)}))},O.reject=function(t){return new O((function(n,i){i(t)}))},O.race=function(t){return new O((function(n,i){if(!k(t))return i(new b("Promise.race accepts an array"));for(var e=0,r=t.length;e<r;e++)O.resolve(t[e]).then(n,i)}))},O.itn="function"==typeof setImmediate&&function(t){setImmediate(t)}||function(t){I(t,0)},O.rtn=function(t){"undefined"!=typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",t)};var B=function(){var t=self.Promise;if(void 0!==t)try{if(-1!==t.toString().indexOf("[native code]"))return t}catch(t){}}(),M=c?c.userAgent:"",U=M.match(/Firefox\/([0-9]+)/i),L=null!=U,F=U?Number(U[1]):0,z=M.match(/(Version)\/((\d+)\.(\d+)(?:\.(\d+))?).*Safari/),W=null!=z,q=z?Number(z[3]):0,H=function(){function t(t){this.gx=0,this.yV=0,this.sC=[],this.etn=t}return t.prototype.utn=function(t){var n=this.length();this.stn(n+1);var i=this.yV+n&this.etn-1;this.sC[i]=t,this.gx=n+1},t.prototype.push=function(t){var n=this.length()+1;if(this.etn<n)this.utn(t);else{var i=this.yV+n-1,e=this.etn-1;this.sC[i&e]=t,this.gx=n}},t.prototype.shift=function(){var t=this.yV,n=this.sC[t];return this.sC[t]=void 0,this.yV=t+1&this.etn-1,this.gx--,n},t.prototype.length=function(){return this.gx},t.prototype.stn=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.yV+this.gx&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.sC,0,n,i)},t}();var V="unhandledrejection",X=self.PromiseRejectionEvent,j=self.CustomEvent;function Y(t){return new X(V,{reason:t,promise:B.reject(t).catch((function(){})),cancelable:!0})}function K(t){var n=new j(V,{detail:{reason:t},cancelable:!0});return g.defineProperty(n,"reason",{value:t}),n}function G(t){var n=h.createEvent("CustomEvent");return n.initCustomEvent(V,!1,!0,{reason:t}),n}var $,Z,J,Q,tt,nt,it,et,rt=function(t){return rt=function(){try{var t=B.resolve(),n="error",i=new X(V,{reason:n,promise:t});return V===i.type&&n===i.reason}catch(t){}return!1}()?Y:function(){try{var t="error",n=new j(V,{detail:{reason:t}});return V===n.type&&t===n.detail.reason}catch(t){}return!1}()?K:G,rt(t)};function ot(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):Z.resolve(f).then(e,r)}function ut(t){return function(){var n=this,i=arguments;return new Z((function(e,r){var o=t.apply(n,i);function u(t){ot(o,e,r,u,s,"next",t)}function s(t){ot(o,e,r,u,s,"throw",t)}u(void 0)}))}}function st(t,e){var r,o,u,s={label:0,sent:function(){if(1&u[0])throw u[1];return u[1]},trys:[],ops:[]},f=g.create(("function"==typeof Iterator?Iterator:g).prototype);return f.next=h(0),f.throw=h(1),f.return=h(2),"function"==typeof n&&(f[i]=function(){return this}),f;function h(n){return function(i){return function(n){if(r)throw new b("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=e.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,i])}}}function ft(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 ht(t,n){if(t){if("string"==typeof t)return ft(t,n);var i=g.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)?ft(t,n):void 0}}function ct(t){return function(t){if(Array.isArray(t))return ft(t)}(t)||function(t){if(void 0!==n&&null!=t[i]||null!=t["@@iterator"])return Array.from(t)}(t)||ht(t)||function(){throw new b("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}B&&!(L&&F<60||W&&q<15)?Z=B:(Z=O,it=null!==($=function(){var t=self.queueMicrotask;if("function"==typeof t)return function(n){return t(n)};var n=B;if(n&&"function"==typeof n.resolve){var i=n.resolve();return function(t){return i.then(t)}}}())&&void 0!==$?$:O.itn,J=it,Q=new H(16),tt=!1,(et={y4:function(t){Q.push(t),tt||(tt=!0,J(nt))},aG:nt=function(){for(;Q.length()>0;)Q.shift()();tt=!1}}).aG,O.itn=et.y4,O.rtn=function(t){try{var n=rt(t);if(!self.dispatchEvent(n)||n.defaultPrevented)return}catch(t){}a((function(){throw new w("Unhandled promise rejection: ".concat(t))}),0)});var at={}.toString;function vt(t){return null!=t}var dt=Array.isArray||function(t){return"[object Array]"===at.call(t)};function lt(t){return"object"===(void 0===t?"undefined":E(t))&&null!==t}function wt(t){return"function"==typeof t}function bt(t){return wt(t)||lt(t)}var gt=9007199254740991,mt=(m.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}),pt="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};function yt(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 _t(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 St(t,n){return-1!==t.indexOf(n)}function Tt(t){t.length=0}var Et;Array.prototype.flat,Array.prototype.flatMap;function It(t){Et=t}var kt=function(){};function Rt(t){var n;return function(){return void 0!==t&&(n=t(),t=void 0),n}}function Ot(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),g.defineProperty(t,e.key,e)}}function Nt(t,n,i){return n&&Ot(t.prototype,n),i&&Ot(t,i),t}var Pt=function(t){return t.jM="audio",t.OM="video",t.DD="metadata",t}({});function At(t,n){return At=g.setPrototypeOf||function(t,n){return t.__proto__=n,t},At(t,n)}function Dt(t,n){if("function"!=typeof n&&null!==n)throw new b("Super expression must either be null or a function");t.prototype=g.create(n&&n.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),n&&At(t,n)}function Ct(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:void 0!==n&&t[i]||t["@@iterator"];if(null!=r){var o,u,s=[],f=!0,h=!1;try{for(r=r.call(t);!(f=(o=r.next()).done)&&(s.push(o.value),!e||s.length!==e);f=!0);}catch(t){h=!0,u=t}finally{try{f||null==r.return||r.return()}finally{if(h)throw u}}return s}}(t,e)||ht(t,e)||function(){throw new b("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function xt(){var t=g.create(null);return t.Uf=void 0,delete t.Uf,t}function Bt(){return new Ut}var Mt="undefined"!=typeof Map&&"entries"in Map.prototype?Map:void 0,Ut=Mt||function(){var t=function(){function t(t,n){this.index=0,this.data=t,this.selector=n,this.keys=g.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=xt(),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=xt(),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}()}();Mt||function(){var t=function(){function t(t,n){this.Qf=t,this.Ff=n}return t.prototype.next=function(){var t=this.Qf.next();return t.done?t:{value:this.Ff(t.value),done:!1}},t}();(function(){function n(){this.$d=Bt()}var i=n.prototype;i.get=function(t){return this.$d.get(""+t)},i.set=function(t,n){return this.$d.set(""+t,n),this},i.has=function(t){return this.$d.has(""+t)},i.delete=function(t){return this.$d.delete(""+t)},i.clear=function(){this.$d.clear()},i.keys=function(){return new t(this.$d.keys(),(function(t){return Number(t)}))},i.values=function(){return this.$d.values()},i.entries=function(){return new t(this.$d.entries(),(function(t){var n=Ct(t,2),i=n[0],e=n[1];return[Number(i),e]}))},i.forEach=function(t){this.$d.forEach((function(n,i){t(n,Number(i))}))},Nt(n,[{key:"size",get:function(){return this.$d.size}}])})()}();var Lt=function(t){return t.$D="#EXTINF",t.jOt="#EXT-X-MAP",t.i="#EXTM3U",t.p="#EXT-X-VERSION",t.en="#EXT-X-TARGETDURATION",t.KMt="#EXT-X-START",t.ui="#EXT-X-INDEPENDENT-SEGMENTS",t.XD="#EXT-X-STREAM-INF",t.li="#EXT-X-MEDIA-SEQUENCE",t.vr="#EXT-X-ENDLIST",t.if="#EXT-X-MEDIA",t.sf="#EXT-X-DISCONTINUITY",t.ff="#EXT-X-DISCONTINUITY-SEQUENCE",t.af="#EXT-X-PLAYLIST-TYPE",t.tv="#EXT-X-KEY",t}({}),Ft=function(){function t(t,n){this.ow="#EXTINF",this.nv=t,this.ev=n}return t.prototype.Yw=function(){return this.ow+":"+this.nv+",\n"+this.ev},t}(),zt=function(){function t(t){this.ow="#EXT-X-MAP",this.ev=t}return t.prototype.Yw=function(){return this.ow+':URI="'+this.ev+'"'},t}(),Wt=function(){function t(){this.ow="#EXTM3U"}return t.prototype.Yw=function(){return this.ow},t}(),qt=function(){function t(t){this.ow="#EXT-X-VERSION",this.Bp=t}return t.prototype.Yw=function(){return this.ow+":"+this.Bp},t}(),Ht=function(){function t(t){this.ow="#EXT-X-TARGETDURATION",this.SOt=t}return t.prototype.Yw=function(){return this.ow+":"+this.SOt},t}(),Vt=function(){function t(t){this.ow="#EXT-X-START",this.NRt=t}return t.prototype.Yw=function(){return this.ow+":TIME-OFFSET="+this.NRt},t}(),Xt=function(){function t(t,n,i){this.uri=t,this.keyFormat=n,this.keyFormatVersions=i,this.ow="#EXT-X-KEY"}return t.prototype.Yw=function(){return this.ow+':METHOD=SAMPLE-AES,URI="'+this.uri+'",KEYFORMAT="'+this.keyFormat+'",KEYFORMATVERSIONS="'+this.keyFormatVersions+'"'},t}(),jt=function(){function t(t){this.ow="#EXT-X-STREAM-INF",this.rz=1,this.ev=t}return t.prototype.Yw=function(){return this.ow+":BANDWIDTH="+this.rz+',AUDIO="audio"\n'+this.ev},t}(),Yt=function(){function t(t){this.ow="#EXT-X-MEDIA-SEQUENCE",this.qy=t}return t.prototype.Yw=function(){return this.ow+":"+this.qy},t}(),Kt=function(){function t(t){this.ow="#EXT-X-MEDIA",this.ev=t}return t.prototype.Yw=function(){var t=Bt();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.ev+'"');var n=[];return t.forEach((function(t,i){return n.push(i+"="+t)})),this.ow+":"+n.join(",")},t}(),Gt=function(){function t(t){this.zx=[],this.zx=t}var n=t.prototype;return n.EA=function(){return this.zx},n.sv=function(t){this.zx.push(t)},n.$zt=function(){for(var t="",n=0,i=this.EA();n<i.length;n++){t+=i[n].Yw()+"\n"}return t},n.Hf=function(){this.zx.length=0},t}(),$t=function(t){function n(n,i){var e;return e=t.call(this,[new Wt,new qt(8)])||this,i&&e.sv(new jt("video/index.m3u8")),n&&e.sv(new Kt("audio/index.m3u8")),e}return Dt(n,t),n}(Gt),Zt=function(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];w.apply(this,n)};(Zt.prototype=g.create(w.prototype)).constructor=Zt;var Jt=function(t){function n(n,i){var e;return(e=t.call(this)||this).message=n||"Unknown error",e.cause=i,w.captureStackTrace&&w.captureStackTrace(e,e.constructor),e}return Dt(n,t),Nt(n,[{key:"name",get:function(){return"BaseError"}}]),n}(Zt),Qt=function(){function t(){this.Gf=!1,this.Vf=!1,this.Wf=[],this.Xf=[]}var n=t.prototype;return n.Yf=function(){if(!this.Gf&&!this.Vf){this.Gf=!0;for(var t=0,n=this.Wf.slice();t<n.length;t++){(0,n[t])()}this.Hf()}},n.Hf=function(){if(!this.Vf){this.Vf=!0;for(var t=0,n=this.Xf.slice();t<n.length;t++){(0,n[t])()}Tt(this.Wf),Tt(this.Xf)}},n.Zf=function(t){this.Vf||this.Wf.push(t)},n.qf=function(t){this.Vf||yt(this.Wf,t)},n.Kf=function(t){this.Vf||this.Xf.push(t)},n.Jf=function(t){this.Vf||yt(this.Xf,t)},t}(),tn=function(){function t(){this.t_=new Qt}var n=t.prototype;return n.i_=function(){this.t_.Yf()},n.Hf=function(){this.t_.Hf()},n.e_=function(t){var n=this.t_;if(!n.Gf)if(t.Gf)n.Yf();else if(!n.Vf&&!t.Vf){var i=function(){e(),n.Yf()},e=function(){t.qf(i),t.Jf(e),n.qf(i),n.Jf(e)};t.Zf(i),t.Kf(e),n.Zf(i),n.Kf(e)}},n.s_=function(){var n=new t,i=new t,e=n.$f,r=i.$f,o=this.t_,u=function(){e.Gf&&r.Vf||r.Gf&&e.Vf?o.Yf():e.Vf&&r.Vf&&o.Hf()};e.Zf(u),r.Zf(u),e.Kf(u),r.Kf(u),n.e_(o),i.e_(o);return o.Kf((function(){e.qf(u),r.qf(u),e.Jf(u),r.Jf(u)})),[n,i]},Nt(t,[{key:"$f",get:function(){return this.t_}}]),t}(),nn=function(t){function n(n,i){return t.call(this,n||"Aborted",i)||this}return Dt(n,t),Nt(n,[{key:"name",get:function(){return"AbortError"}}]),n}(Jt);function en(t){return t instanceof w&&"AbortError"===t.name}function rn(t,n){return n?new Z((function(i,e){if(n.Gf)return t.catch(kt),e(new nn);var r=function(){n.qf(r),e(new nn)};n.Zf(r),t.then((function(t){n.qf(r),i(t)}),(function(t){n.qf(r),e(t)}))})):t}function on(t,n){return t.then((function(t){return n.i_(),t}),(function(t){throw n.i_(),t}))}Z.resolve();function un(t,n){return new Z((function(i,e){if(void 0!==n&&n.Gf)e(new nn);else{var r=Et.o_((function(){void 0!==n&&n.qf(o),i()}),t),o=function(){Et.r_(r),e(new nn)};void 0!==n&&n.Zf(o)}}))}var sn=function(){function t(t){var n=this;this.wO=[],this.mO=void 0,this.vO=new tn,this.pO=function(){return 0===n.wO.length?n.yO?fn(n.yO,n.vO.$f).then(n.MO,n.MO):n.MO():n.wO.shift()().then(n.pO)},this.MO=function(){if(0!==n.wO.length)return n.pO();n.mO=void 0},this.yO=t}var n=t.prototype;return n.gO=function(t,n){var i=this;return new Z((function(e){var r=new tn;r.e_(i.vO.$f),n&&r.e_(n);var o=function(){r.Hf()};i.wO.push((function(){var n=fn(t,r.$f);return e(n),n.then(o,o)})),i.mO||(i.mO=i.pO())}))},n.i_=function(){return this.AO(!0)},n.gn=function(){return this.yO=void 0,this.AO(!1)},n.AO=function(t){var n=this.mO;return this.vO.i_(),t&&(this.vO=new tn),Z.resolve(n)},t}();function fn(t,n){return new Z((function(i){return i(t(n))}))}var hn=function(t){return t.K8="HELLO",t.J8="HI_THERE",t.t7="INITIALIZE",t.i7="APPEND_INIT",t.e7="APPEND_DATA",t.s7="ACK",t.n7="REMOVE",t.r7="DESTROY_SESSION",t}({}),cn=null;try{cn=new WebAssembly.Instance(new WebAssembly.Module(new S([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(J){}function an(t,n,i){this.low=0|t,this.high=0|n,this.unsigned=!!i}function vn(t){return!0===(t&&t.rp)}function dn(t){var n=m.clz32(t&-t);return t?31-n:n}an.prototype.rp,g.defineProperty(an.prototype,"rp",{value:!0}),an.isLong=vn;var ln={},wn={};function bn(t,n){var i,e,r;return n?(r=0<=(t>>>=0)&&t<256)&&(e=wn[t])?e:(i=mn(t,0,!0),r&&(wn[t]=i),i):(r=-128<=(t|=0)&&t<128)&&(e=ln[t])?e:(i=mn(t,t<0?-1:0,!1),r&&(ln[t]=i),i)}function gn(t,n){if(_(t))return n?Rn:kn;if(n){if(t<0)return Rn;if(t>=Tn)return Dn}else{if(t<=-En)return Cn;if(t+1>=En)return An}return t<0?gn(-t,n).neg():mn(t%Sn|0,t/Sn|0,n)}function mn(t,n,i){return new an(t,n,i)}an.fromInt=bn,an.fromNumber=gn,an.fromBits=mn;var pn=m.pow;function yn(t,n,i){if(0===t.length)throw w("empty string");if("number"==typeof n?(i=n,n=!1):n=!!n,"NaN"===t||"Infinity"===t||"+Infinity"===t||"-Infinity"===t)return n?Rn:kn;if((i=i||10)<2||36<i)throw RangeError("radix");var e;if((e=t.indexOf("-"))>0)throw w("interior hyphen");if(0===e)return yn(t.substring(1),n,i).neg();for(var r=gn(pn(i,8)),o=kn,u=0;u<t.length;u+=8){var s=m.min(8,t.length-u),f=p(t.substring(u,u+s),i);if(s<8){var h=gn(pn(i,s));o=o.mul(h).add(gn(f))}else o=(o=o.mul(r)).add(gn(f))}return o.unsigned=n,o}function _n(t,n){return"number"==typeof t?gn(t,n):"string"==typeof t?yn(t,n):mn(t.low,t.high,"boolean"==typeof n?n:t.unsigned)}an.fromString=yn,an.fromValue=_n;var Sn=4294967296,Tn=Sn*Sn,En=Tn/2,In=bn(1<<24),kn=bn(0);an.ZERO=kn;var Rn=bn(0,!0);an.UZERO=Rn;var On=bn(1);an.ONE=On;var Nn=bn(1,!0);an.UONE=Nn;var Pn=bn(-1);an.NEG_ONE=Pn;var An=mn(-1,2147483647,!1);an.MAX_VALUE=An;var Dn=mn(-1,-1,!0);an.MAX_UNSIGNED_VALUE=Dn;var Cn=mn(0,-2147483648,!1);an.MIN_VALUE=Cn;var xn=an.prototype;xn.toInt=function(){return this.unsigned?this.low>>>0:this.low},xn.toNumber=function(){return this.unsigned?(this.high>>>0)*Sn+(this.low>>>0):this.high*Sn+(this.low>>>0)},xn.toString=function(t){if((t=t||10)<2||36<t)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative()){if(this.eq(Cn)){var n=gn(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=gn(pn(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}},xn.getHighBits=function(){return this.high},xn.getHighBitsUnsigned=function(){return this.high>>>0},xn.getLowBits=function(){return this.low},xn.getLowBitsUnsigned=function(){return this.low>>>0},xn.getNumBitsAbs=function(){if(this.isNegative())return this.eq(Cn)?64:this.neg().getNumBitsAbs();for(var t=0!=this.high?this.high:this.low,n=31;n>0&&0==(t&1<<n);n--);return 0!=this.high?n+33:n+1},xn.isZero=function(){return 0===this.high&&0===this.low},xn.eqz=xn.isZero,xn.isNegative=function(){return!this.unsigned&&this.high<0},xn.isPositive=function(){return this.unsigned||this.high>=0},xn.isOdd=function(){return 1==(1&this.low)},xn.isEven=function(){return 0==(1&this.low)},xn.equals=function(t){return vn(t)||(t=_n(t)),(this.unsigned===t.unsigned||this.high>>>31!=1||t.high>>>31!=1)&&(this.high===t.high&&this.low===t.low)},xn.eq=xn.equals,xn.notEquals=function(t){return!this.eq(t)},xn.neq=xn.notEquals,xn.ne=xn.notEquals,xn.lessThan=function(t){return this.comp(t)<0},xn.lt=xn.lessThan,xn.lessThanOrEqual=function(t){return this.comp(t)<=0},xn.lte=xn.lessThanOrEqual,xn.le=xn.lessThanOrEqual,xn.greaterThan=function(t){return this.comp(t)>0},xn.gt=xn.greaterThan,xn.greaterThanOrEqual=function(t){return this.comp(t)>=0},xn.gte=xn.greaterThanOrEqual,xn.ge=xn.greaterThanOrEqual,xn.compare=function(t){if(vn(t)||(t=_n(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},xn.comp=xn.compare,xn.negate=function(){return!this.unsigned&&this.eq(Cn)?Cn:this.not().add(On)},xn.neg=xn.negate,xn.add=function(t){vn(t)||(t=_n(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,mn((c&=65535)<<16|(a&=65535),(f&=65535)<<16|(h&=65535),this.unsigned)},xn.subtract=function(t){return vn(t)||(t=_n(t)),this.add(t.neg())},xn.sub=xn.subtract,xn.multiply=function(t){if(this.isZero())return this;if(vn(t)||(t=_n(t)),cn)return mn(cn.mul(this.low,this.high,t.low,t.high),cn.get_high(),this.unsigned);if(t.isZero())return this.unsigned?Rn:kn;if(this.eq(Cn))return t.isOdd()?Cn:kn;if(t.eq(Cn))return this.isOdd()?Cn:kn;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(In)&&t.lt(In))return gn(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,mn((a&=65535)<<16|(v&=65535),(h&=65535)<<16|(c&=65535),this.unsigned)},xn.mul=xn.multiply,xn.divide=function(t){if(vn(t)||(t=_n(t)),t.isZero())throw w("division by zero");var n,i,e;if(cn)return this.unsigned||-2147483648!==this.high||-1!==t.low||-1!==t.high?mn((this.unsigned?cn.div_u:cn.div_s)(this.low,this.high,t.low,t.high),cn.get_high(),this.unsigned):this;if(this.isZero())return this.unsigned?Rn:kn;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return Rn;if(t.gt(this.shru(1)))return Nn;e=Rn}else{if(this.eq(Cn))return t.eq(On)||t.eq(Pn)?Cn:t.eq(Cn)?On:(n=this.shr(1).div(t).shl(1)).eq(kn)?t.isNegative()?On:Pn:(i=this.sub(t.mul(n)),e=n.add(i.div(t)));if(t.eq(Cn))return this.unsigned?Rn:kn;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=kn}for(i=this;i.gte(t);){n=m.max(1,m.floor(i.toNumber()/t.toNumber()));for(var r=m.ceil(m.log(n)/m.LN2),o=r<=48?1:pn(2,r-48),u=gn(n),s=u.mul(t);s.isNegative()||s.gt(i);)s=(u=gn(n-=o,this.unsigned)).mul(t);u.isZero()&&(u=On),e=e.add(u),i=i.sub(s)}return e},xn.div=xn.divide,xn.modulo=function(t){return vn(t)||(t=_n(t)),cn?mn((this.unsigned?cn.rem_u:cn.rem_s)(this.low,this.high,t.low,t.high),cn.get_high(),this.unsigned):this.sub(this.div(t).mul(t))},xn.mod=xn.modulo,xn.rem=xn.modulo,xn.not=function(){return mn(~this.low,~this.high,this.unsigned)},xn.countLeadingZeros=function(){return this.high?m.clz32(this.high):m.clz32(this.low)+32},xn.clz=xn.countLeadingZeros,xn.countTrailingZeros=function(){return this.low?dn(this.low):dn(this.high)+32},xn.ctz=xn.countTrailingZeros,xn.and=function(t){return vn(t)||(t=_n(t)),mn(this.low&t.low,this.high&t.high,this.unsigned)},xn.or=function(t){return vn(t)||(t=_n(t)),mn(this.low|t.low,this.high|t.high,this.unsigned)},xn.xor=function(t){return vn(t)||(t=_n(t)),mn(this.low^t.low,this.high^t.high,this.unsigned)},xn.shiftLeft=function(t){return vn(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?mn(this.low<<t,this.high<<t|this.low>>>32-t,this.unsigned):mn(0,this.low<<t-32,this.unsigned)},xn.shl=xn.shiftLeft,xn.shiftRight=function(t){return vn(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?mn(this.low>>>t|this.high<<32-t,this.high>>t,this.unsigned):mn(this.high>>t-32,this.high>=0?0:-1,this.unsigned)},xn.shr=xn.shiftRight,xn.shiftRightUnsigned=function(t){return vn(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?mn(this.low>>>t|this.high<<32-t,this.high>>>t,this.unsigned):mn(32===t?this.high:this.high>>>t-32,0,this.unsigned)},xn.shru=xn.shiftRightUnsigned,xn.shr_u=xn.shiftRightUnsigned,xn.rotateLeft=function(t){var n;return vn(t)&&(t=t.toInt()),0==(t&=63)?this:32===t?mn(this.high,this.low,this.unsigned):t<32?(n=32-t,mn(this.low<<t|this.high>>>n,this.high<<t|this.low>>>n,this.unsigned)):(n=32-(t-=32),mn(this.high<<t|this.low>>>n,this.low<<t|this.high>>>n,this.unsigned))},xn.rotl=xn.rotateLeft,xn.rotateRight=function(t){var n;return vn(t)&&(t=t.toInt()),0==(t&=63)?this:32===t?mn(this.high,this.low,this.unsigned):t<32?(n=32-t,mn(this.high<<n|this.low>>>t,this.low<<n|this.high>>>t,this.unsigned)):(n=32-(t-=32),mn(this.low<<n|this.high>>>t,this.high<<n|this.low>>>t,this.unsigned))},xn.rotr=xn.rotateRight,xn.toSigned=function(){return this.unsigned?mn(this.low,this.high,!1):this},xn.toUnsigned=function(){return this.unsigned?this:mn(this.low,this.high,!0)},xn.toBytes=function(t){return t?this.toBytesLE():this.toBytesBE()},xn.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]},xn.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]},an.fromBytes=function(t,n,i){return i?an.fromBytesLE(t,n):an.fromBytesBE(t,n)},an.fromBytesLE=function(t,n){return new an(t[0]|t[1]<<8|t[2]<<16|t[3]<<24,t[4]|t[5]<<8|t[6]<<16|t[7]<<24,n)},an.fromBytesBE=function(t,n){return new an(t[4]<<24|t[5]<<16|t[6]<<8|t[7],t[0]<<24|t[1]<<16|t[2]<<8|t[3],n)};var Bn=an;function Mn(){return Date.now()||(new Date).getTime()}Bn.fromNumber(gt);var Un="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),Ln=16383;function Fn(t,n,i){return Un[t>>2]+Un[(3&t)<<4|n>>4]+Un[(15&n)<<2|i>>6]+Un[63&i]}function zn(t,n,i){for(var e=[],r=n;r<i;r+=3)e.push(Fn(t[r],t[r+1],t[r+2]));return e.join("")}var Wn=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]","[object DataView]"],qn=ArrayBuffer.isView||function(t){return t&&St(Wn,at.call(t))};function Hn(t){var n=t.reduce((function(t,n){return t+n.byteLength}),0);return function(t,n){for(var i=new S(n),e=0,r=0;r<t.length;r++){var o=t[r];i.set(o,e),e+=o.byteLength}return i}(t,n)}function Vn(t){return function(t){for(var n=t.length,i=n%3,e=[],r=n-i,o=0;o<r;o+=Ln)e.push(zn(t,o,m.min(r,o+Ln)));if(1===i){var u=t[n-1];e.push(Un[u>>2]+Un[(3&u)<<4]+"==")}else if(2===i){var s=t[n-2],f=t[n-1];e.push(Un[s>>2]+Un[(3&s)<<4|f>>4]+Un[(15&f)<<2]+"=")}return e.join("")}(new S(t))}var Xn=function(){function t(t){void 0===t&&(t=0),this.Hu=t}var n=t.prototype;return n.ep=function(t){this.Hu+=t},n.sp=function(t){this.Hu=t},n.np=function(){return new t(this.Lu)},Nt(t,[{key:"Lu",get:function(){return this.Hu}}]),t}();String.prototype.replaceAll;var jn="function"==typeof String.prototype.startsWith?function(t,n){return vt(t)&&t.startsWith(n)}:function(t,n){return vt(t)&&t.substr(0,n.length)===n},Yn=(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==(1&i)&&(r+=e),0!=(i>>>=1);)e+=e;return r}),Kn=(String.prototype.padStart,String.prototype.padEnd,16384),Gn="function"==typeof String.fromCodePoint?function(t){var n;return t.length<=Kn?(n=String).fromCodePoint.apply(n,ct(t)):Zn(t,String.fromCodePoint)}:function(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 $n(n)};function $n(t){var n;return t.length<=Kn?(n=String).fromCharCode.apply(n,ct(t)):Zn(t,String.fromCharCode)}function Zn(t,n){for(var i=[],e=0;e<t.length;e+=Kn)i.push(n.apply(void 0,ct(t.slice(e,e+Kn))));return i.join("")}function Jn(t){if(t>=55296&&t<=57343)throw new w("Lone surrogate U+"+t.toString(16).toUpperCase()+" is not a scalar value")}function Qn(t,n){return t>>n&63|128}function ti(t,n){0!=(4294967168&t)?(0==(4294965248&t)?n.push(t>>6&31|192):0==(4294901760&t)?(Jn(t),n.push(t>>12&15|224),n.push(Qn(t,6))):0==(4292870144&t)&&(n.push(t>>18&7|240),n.push(Qn(t,12)),n.push(Qn(t,6))),n.push(63&t|128)):n.push(t)}function ni(t,n){if(n.Lu>=t.length)throw new w("Invalid byte index");var i=255&t[n.Lu];if(n.ep(1),128==(192&i))return 63&i;throw new w("Invalid continuation byte")}function ii(t,n){var i=n.Lu;if(i>t.length)throw new w("Invalid byte index");if(i===t.length)return!1;var e=255&t[i];if(n.ep(1),0==(128&e))return e;if(192==(224&e)){var r=(31&e)<<6|ni(t,n);if(r>=128)return r;throw new w("Invalid continuation byte")}if(224==(240&e)){var o=(15&e)<<12|ni(t,n)<<6|ni(t,n);if(o>=2048)return Jn(o),o;throw new w("Invalid continuation byte")}if(240==(248&e)){var u=(7&e)<<18|ni(t,n)<<12|ni(t,n)<<6|ni(t,n);if(u>=65536&&u<=1114111)return u}throw new w("Invalid UTF-8 detected")}var ei=65279;function ri(t,n,i){void 0===i&&(i=!1);var e=t.getUint16(n.Lu,i);return n.ep(2),e}function oi(t,n,i,e){void 0===e&&(e=!1),t.setUint16(n.Lu,i,e),n.ep(2)}function ui(t,n,i,e){void 0===e&&(e=!1),t.setUint32(n.Lu,i,e),n.ep(4)}function si(t,n,i,e){void 0===e&&(e=!1);for(var r=i.length,o=0;o<r;o+=1){oi(t,n,i.charCodeAt(o),e)}}function fi(t,n){return void 0===n&&(n=!1),function(t,n,i,e){for(var r=[];n.Lu+2<=t.byteLength;){var o=ri(t,n,i);if(e&&!o)break;r.push(o)}return $n(r)}(ai(t),new bi,n,!1)}function hi(t){return function(t){return Gn(t)}(function(t,n){var i,e=[],r=new bi;if(!n){if(!1===(i=ii(t,r)))return e;i===ei||e.push(i)}for(;!1!==(i=ii(t,r));)e.push(i);return e}(vi(t)))}function ci(t){return new S(function(t){for(var n=[],i=0;i<t.length;i++)ti(t[i],n);return n}(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 ai(t){return new DataView(t.buffer,t.byteOffset,t.byteLength)}function vi(t){return new S(t.buffer,t.byteOffset,t.byteLength)}function di(t){return t instanceof ArrayBuffer?new S(t):vi(t)}function li(t){if(t.slice)return t.slice(0);var n=new S(t.byteLength);return n.set(t,0),n}var wi,bi=function(){function t(t){void 0===t&&(t=0),this.Hu=t}var n=t.prototype;return n.ep=function(t){this.Hu+=t},n.sp=function(t){this.Hu=t},n.np=function(){return new t(this.Lu)},n.ap=function(){return new Xn(this.Lu<<3)},Nt(t,[{key:"Lu",get:function(){return this.Hu}}]),t}(),gi=new Array(256);for(wi=0;wi<256;wi+=1)gi[wi]=(wi<16?"0":"")+wi.toString(16);function mi(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var n=16*m.random()|0;return("x"===t?n:3&n|8).toString(16)}))}function pi(t,n,i){if("function"==typeof i)i.call(t,n);else for(var e=0;e<i.length;e++){i[e].call(t,n)}}var yi=function(){function t(t){var n=this;this.a_=xt(),this.l_=void 0,this.u_=0,this.Ds=function(t){n.yo(t)},this.d_=null!=t?t:this}var n=t.prototype;return n.yn=function(t,n){if("function"==typeof n)if("string"==typeof t)this.h_(t,n);else for(var i=0;i<t.length;i++){var e=t[i];this.h_(e,n)}},n.h_=function(t,n){var i=this.a_[t];void 0===i?this.a_[t]=n:"function"==typeof i?this.a_[t]=[i,n]:0===this.u_?i.push(n):this.a_[t]=i.concat(n)},n.c_=function(t){if("function"==typeof t){var n=this.l_;void 0===n?this.l_=t:"function"==typeof n?this.l_=[n,t]:0===this.u_?n.push(t):this.l_=n.concat(t)}},n.Bo=function(){this.a_=xt(),this.l_=void 0},n.yo=function(t){this.u_++;var n=this.a_[t.type],i=this.l_;void 0!==n&&pi(this.d_,t,n),void 0!==i&&pi(this.d_,t,i),this.u_--},n.fn=function(t,n){if("function"==typeof n)if("string"==typeof t)this.f_(t,n);else for(var i=0;i<t.length;i++){var e=t[i];this.f_(e,n)}},n.f_=function(t,n){var i=this.a_[t];void 0!==i&&("function"==typeof i?i===n&&(this.a_[t]=void 0):0===this.u_?yt(i,n):this.a_[t]=_t(i,n))},n.__=function(t){if("string"==typeof t)this.a_[t]=void 0;else for(var n=0;n<t.length;n++){var i=t[n];this.a_[i]=void 0}},n.g_=function(t){var n=this.l_;void 0!==n&&("function"==typeof n?n===t&&(this.l_=void 0):0===this.u_?yt(n,t):this.l_=_t(n,t))},n.v_=function(t,n){var i=this;return new Z((function(e,r){if(n&&n.Gf)return r(new nn);var o=function(t){s(),e(t)},u=function(){s(),r(new nn)},s=function(){i.fn(t,o),n&&n.qf(u)};i.yn(t,o),n&&n.Zf(u)}))},t}(),_i=function(t,n){void 0===n&&(n=new Date),this.type=t,this.date=n},Si=function(t){function n(n){var i;return(i=t.call(this,"append")||this).lp=n,i}return Dt(n,t),n}(_i),Ti=function(t){function n(){var n;return(n=t.apply(this,arguments)||this)._Nt=0,n.sC=new S(0),n.wx=!1,n.cv=!1,n}Dt(n,t);var i=n.prototype;return i.M$=function(t,n){this._Nt+=n,this.sC=Hn([this.sC,t]),this.yo(new Si(t))},i.Ws=function(){this.gj||(this.yo(new _i("close")),this.wx=!0)},Nt(n,[{key:"A_",get:function(){return this._Nt}},{key:"lp",get:function(){return this.sC}},{key:"gj",get:function(){return this.wx}},{key:"av",get:function(){return this.cv},set:function(t){this.cv=t}}]),n}(yi),Ei="sync-seg-",Ii=function(){function t(t,n){this.dv=!1,this.lv=!1,this.o=Ei+mi(),this.wv=n?new Ti:void 0,this.gv=t?new Ti:void 0}return t.prototype.Ws=function(){this.wv&&this.wv.Ws(),this.gv&&this.gv.Ws()},Nt(t,[{key:"kv",get:function(){return this.dv},set:function(t){this.dv=t}},{key:"jv",get:function(){return this.lv},set:function(t){this.lv=t}}]),t}(),ki=1.1,Ri=function(t){function n(n,i,e){var r;return(r=t.call(this,[new Wt,new qt(8),new Ht(1),new Vt(0)])||this).gd=[],r.EAt=Bt(),r.Ad=0,r.tw=function(t){if(t.VS>=gt)for(;r.gd.length>0;)r.rw()},e&&r.sv(new Xt(e,"com.apple.streamingkeydelivery","1")),r.oat=n,r.drt=i,r.drt.yn("remove",r.tw),r.sw=new Yt(0),r.sv(r.sw),r}Dt(n,t);var i=n.prototype;return i.rEt=function(){return this.oat===Pt.OM?this.drt.bw:this.oat===Pt.jM?this.drt.kw:void 0},i.eat=function(t){return this.EAt.get(t)},i.Hf=function(){this.gd.length=0,this.sw.qy=0,this.EAt.clear(),this.Ad=0},i.EA=function(){return this.tb(),ct(t.prototype.EA.call(this)).concat(ct(this.gd))},i.tb=function(){for(var t=this.drt.nb(),n=0;n<t.length;n++){var i=t[n];if(!this.EAt.has(i.o)){var e=void 0;if(this.oat===Pt.OM?(e=i.wv,i.jv=!0):(e=i.gv,i.kv=!0),!e)return;this.EAt.set(i.o,e),e.av&&this.gd.push(new zt(i.o+"-init")),this.gd.push(new Ft(ki,i.o)),this.Ad+=ki}}this.cb()},i.cb=function(){for(;this.Ad>60;)this.rw()},i.rw=function(){var t=this.gd.shift();void 0!==t&&function(t){return t.ow===Lt.$D}(t)&&(this.EAt.delete(t.ev),this.Ad-=t.nv,this.sw.qy++)},n}(Gt);var Oi=function(t){function n(n){var i;return(i=t.call(this,"remove")||this).VS=n,i}return Dt(n,t),n}(_i),Ni=function(t){function n(n,i){var e;return(e=t.call(this)||this).ab=n,e.lb=i,e.tg=[],e.ng=[],e.ig=Bt(),e.ug=Bt(),e.sg=Bt(),e.lg=0,e}Dt(n,t);var i=n.prototype;return i.nb=function(){return this.bg?(this.tg=this.tg.filter((function(t){return!(t.jv&&t.kv)})),ct(this.tg).concat([this.bg],ct(this.ng))):[]},i.S$=function(t){this.mg(t)},i.M$=function(t){this.mg(t),this.kg(t),this.tm(t)},i.SS=function(t){this.mg(t),this.tm(t)},i.Hf=function(){var t;null==(t=this.bg)||t.Ws(),this.bg=void 0,this.ng.forEach((function(t){return t.Ws()})),this.ng.length=0,this.tg.length=0,this.sg=Bt(),this.lg=0},i.kg=function(t){var n=t.startPts,i=t.totalDuration;this.ug.set(t.mediaType,n+i)},i.rm=function(){if(this.bg){this.bg.Ws(),this.tg.push(this.bg);var t=this.ng.shift(),n=new Ii(this.ab,this.lb);t?(this.bg=t,this.ng.push(n)):this.bg=n}},i.om=function(t){if(this.bg){var n=!this.bg.gv||0===this.bg.gv.A_,i=!this.bg.wv||0===this.bg.wv.A_,e=this.bg.gv&&this.bg.gv.av,r=this.bg.wv&&this.bg.wv.av,o=i&&(n&&!(this.bg.kv||this.bg.jv)||e),u=n&&(i&&!(this.bg.kv||this.bg.jv)||r);(t===Pt.jM&&!u||t===Pt.OM&&!o)&&(this.rm(),this.rm())}},i.mg=function(t){var n=t.mediaType,i=t.kind,e=this.ig.get(n);if(void 0===e){if(i===hn.i7||i===hn.e7){var r=[t];this.ig.set(n,r)}}else e.push(t)},i.tm=function(t){var n=this.sm(t);for(var i=0;i<n.length;i++){var e=n[i];switch(e.kind){case hn.i7:this.am(e),this.sg=Bt(),this.lg=0;break;case hn.n7:this.bm(e);break;case hn.e7:this.km(e)}}},i.am=function(t){var n=t.mediaType;void 0===this.bg?(this.bg=new Ii(this.ab,this.lb),this.ng.push(new Ii(this.ab,this.lb))):this.om(n),n===Pt.OM?(this.ip=t.segment,this.bg.wv.av=!0):n===Pt.jM&&(this.up=t.segment,this.bg.gv.av=!0)},i.km=function(t){var n,i,e=t.mediaType===Pt.jM,r=t.totalDuration,o=null!=(n=this.sg.get(t.mediaType))?n:0;e?(this.bg.gv.M$(t.segment,r),i=o+this.bg.gv.A_):(this.bg.wv.M$(t.segment,r),i=o+this.bg.wv.A_),i>=this.lg+ki&&(this.sg.set(t.mediaType,i),this.lg+=ki,this.rm())},i.bm=function(t){this.ug.set(t.mediaType,void 0),this.om(t.mediaType),this.tg.length=0,this.yo(new Oi(t.endTime))},i.sm=function(t){var n=this;if(t.kind===hn.n7)return this.ty(t);var i=[];return this.ig.forEach((function(t){if(t&&t.length>0){var e=mt(t,(function(t){return t.kind===hn.n7}));-1===e&&(e=t.length);for(var r=t.slice(0,e),o=0;o<r.length;o++){var u=r[o];if(!St(i,u)){var s,f=n.ty(u);if(f.length>0)(s=i).push.apply(s,ct(f));else if(u.kind===hn.e7)break}}}})),i},i.ty=function(t){var n=this.ig.get(t.mediaType),i=function(t){return t===Pt.OM?Pt.jM:Pt.OM}(t.mediaType);if(!(i===Pt.OM?this.lb:this.ab))return n.splice(0,n.indexOf(t)+1);if(t.kind===hn.i7)return[];var e=this.ug.get(i);if(void 0===e)return[];if(t.kind===hn.n7){var r=this.ny(i);if(r.length>0){var o=n.splice(0,n.indexOf(t));return n.splice(0,1),ct(o).concat(ct(r),[t])}return[]}if(t.startPts<=e){var u=n.splice(0,n.indexOf(t));n.splice(0,1);var s=this.hy(t,u,i);return ct(u).concat(ct(s),[t])}return[]},i.hy=function(t,n,i){var e=this.ig.get(i);if(!e)return[];var r=t.startPts+t.totalDuration,o=mt(e,(function(t){return t.kind===hn.n7})),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===hn.e7&&h.startPts>r&&(s=f)}var c=-1;return-1!==mt(n,(function(t){return t.kind===hn.i7}))&&(c=mt(e,(function(t){return t.kind===hn.i7}))),c>s&&(s=c+1),s>0?(e[s-1].kind===hn.i7&&(s-=1),e.splice(0,s)):[]},i.ny=function(t){var n=this.ig.get(t);if(n){var i=mt(n,(function(t){return t.kind===hn.n7}));if(i>=0)return n.splice(0,i+1)}return[]},i.by=function(){var t="[MEDIABUFFER] endPTS: ";this.ug.forEach((function(n,i){t=t.concat(i+" = "+n+" ")})),Et.Iet(t)},i.my=function(t,n){var i=t+": [";null==n||n.forEach((function(t){i=i.concat(" "+t.kind+"("+t.mediaType+")")})),i=i.concat(" ]"),Et.Iet(i)},Nt(n,[{key:"kw",get:function(){var t;return null==(t=this.up)?void 0:t.slice()}},{key:"bw",get:function(){var t;return null==(t=this.ip)?void 0:t.slice()}}]),n}(yi);var Pi=function(){function t(t,n){var i=t.some((function(t){return t.match("audio")})),e=t.some((function(t){return t.match("video")}));this.ky=new Ni(i,e),this.OS=new $t(i,e),i&&(this.AS=new Ri(Pt.jM,this.ky,n)),e&&(this.BS=new Ri(Pt.OM,this.ky,n))}var n=t.prototype;return n.RT=function(t){var n,i,e=Ai(t);return e===Pt.OM?null==(n=this.BS)?void 0:n.rEt():e===Pt.jM?null==(i=this.AS)?void 0:i.rEt():void 0},n.eat=function(t){var n,i,e=t.split("/")[1],r=Ai(t);return r===Pt.OM?null==(n=this.BS)?void 0:n.eat(e):r===Pt.jM?null==(i=this.AS)?void 0:i.eat(e):void 0},n.S$=function(t){this.ky.S$(t)},n.M$=function(t){this.ky.M$(t)},n.Rct=function(t){this.ky.SS(t)},n.Hf=function(){var t,n;this.ky.Hf(),this.OS.Hf(),null==(t=this.AS)||t.Hf(),null==(n=this.BS)||n.Hf()},Nt(t,[{key:"IE",get:function(){return this.OS}},{key:"ME",get:function(){return this.AS}},{key:"tk",get:function(){return this.BS}}]),t}();function Ai(t){return t.match(/video/)?Pt.OM:Pt.jM}var Di=function(){function t(t,n){var i=this;this.ik=t,this.uk=n,this.Oat=void 0,this.cWt=ut((function(t){var n,e;return st(this,(function(r){switch((n=t.data).kind){case hn.t7:i.Oat=new Pi(n.mediaBufferConfigs,n.fairPlaySdkUri);break;case hn.i7:i.Oat.S$(n);break;case hn.e7:i.Oat.M$(n);break;case hn.n7:i.Oat.Rct(n)}return e={kind:hn.s7},i.ik.postMessage(e),[2]}))})),this.ik.onmessage=this.cWt}var n=t.prototype;return n.$zt=function(t){return"master.m3u8"===t?this.Oat.IE:"video/index.m3u8"===t?this.Oat.tk:"audio/index.m3u8"===t?this.Oat.ME:void 0},n.sk=function(t){if(t.match(/m3u8/)){var n,i=null==(n=this.$zt(t))?void 0:n.$zt();return new Response(i,{headers:{"Content-Type":"application/x-mpegurl; charset=utf-8"}})}if(t.match(Ei)){var e={"Content-Type":t.match(/video/)?"video/mp4":"audio/mp4"};if(t.match(/init/)){var r,o=null==(r=this.Oat)?void 0:r.RT(t);return new Response(o,{headers:e})}var u=this.$ht(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.lp)},e=function(){n.close(),t.fn("append",i),t.fn("close",e)};return new self.ReadableStream({start:function(r){(n=r).enqueue(t.lp),t.gj?n.close():(t.yn("append",i),t.yn("close",e))},cancel:function(){t.fn("append",i),t.fn("close",e)}})}(u);return new Response(s,{headers:e})}return new Response(void 0,{status:404,statusText:"Not Found"})},n.$ht=function(t){return this.Oat.eat(t)},n.close=function(){var t;this.ik.close(),null==(t=this.Oat)||t.Hf()},t}(),Ci=function(){function t(){var t=this;this.n3=Bt(),this.cWt=function(n){var i=n.data;if(i.kind===hn.K8){t.ak().catch(kt);var e=i.port,r=mi(),o=new Di(e,n.source.id);t.n3.set(r,o);var u=function(n){n.data.kind===hn.r7&&(t.mk(r),e.removeEventListener("message",u))};e.addEventListener("message",u);var s={kind:hn.J8,sessionId:r};e.postMessage(s)}},this.kk=function(n){if(jn(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.n3.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.sk(r);n.respondWith(f)}}}var n=t.prototype;return n.ur=function(t){this.QVt=t,t.addEventListener("message",this.cWt),t.addEventListener("fetch",this.kk)},n.mk=function(t){var n=this.n3.get(t);n&&n.close(),this.n3.delete(t)},n.ak=function(){var t=this;return ut((function(){var n,i;return st(this,(function(e){switch(e.label){case 0:return[4,t.QVt.clients.matchAll()];case 1:return n=e.sent(),i=n.map((function(t){return t.id})),t.n3.forEach((function(n,e){St(i,n.uk)||t.mk(e)})),[2]}}))}))()},t}();Ci.TR=new Ci;var xi=function(t){return t.RE="web",t.PE="android",t.zE="android-tv",t.BE="ios",t.UE="tvos",t.QE="chromecast",t.FE="theoliveweb",t}({});var Bi=c?c.userAgent:"",Mi=Bi.match(/chrome\/([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)/i),Ui=Bi.match(/Edg\/([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)/i),Li=Bi.match(/Android ([0-9\.]+)/i),Fi=Bi.match(/Windows NT ([0-9\.]+)/i),zi=Bi.match(/(Version)\/((\d+)\.(\d+)(?:\.(\d+))?).*Safari/),Wi=Bi.match(/Firefox\/([0-9\.]+)/i),qi=Bi.match(/OPR\/(\d+\.\d+)/i),Hi=Bi.match(/Tizen ([0-9\.]+)/i),Vi=Bi.match(/(iPhone OS|iPad OS|iPod OS|Mac OS X) (\d+)_(\d+)_?(\d+)?/),Xi=function(){function t(){this.YE=Boolean("ontouchstart"in self||self.DocumentTouch&&h instanceof self.DocumentTouch||c&&c.msMaxTouchPoints),this.VE=/(mac\sos\sx)\s?([\w\s\.]+\w)*/i.test(Bi)||/(macintosh|mac(?=_powerpc)\s)/i.test(Bi),this.HE=/Windows NT/i.test(Bi),this.ZE=Fi?y(Fi[1]):0,this.KE=/Android/i.test(Bi),this.$E=Li?y(Li[1]):0,this.nk=/windows phone (8|8\.1)/i.test(Bi),this.hk=/iPhone/i.test(Bi),this.lk=/iPad/i.test(Bi),this.fk=this.VE&&this.YE&&!this.lk,this.gk=/iPod/i.test(Bi),this.bk=/Mobile Safari/i.test(Bi),this.yk=/EOS\d*STB/i.test(Bi),this.Mk=/APP\d*STB/i.test(Bi),this.vk=(this.hk||this.lk||this.fk||this.gk)&&!this.nk,this.pk=Vi?y(Vi[2]):0,this.Tk=this.nk||this.vk||this.KE||this.bk,this.Nk=/CriOS/i.test(Bi),this.Dk=Boolean(self.chrome&&/google/i.test(c.vendor))||this.Nk,this.jk=this.Dk&&/Edg\//i.test(c.userAgent),this.Rk=Ui?p(Ui[1],10):0,this.EL=Boolean(self.chrome||/Chrome/i.test(Bi)||/CriOS/i.test(Bi)),this.xk=Mi?p(Mi[1],10):0,this.zk=/SMART-TV.*Tizen/i.test(Bi),this.Uk=Hi?y(Hi[1]):0,this.Lk=this.Uk>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.Uk):void 0,this.Fk=/webos|web0s/i.test(Bi),this.Gk=/VIZIO/i.test(Bi),this.Wk=/Edge\/\d+/i.test(Bi),this.Xk=/Trident/i.test(Bi),this.qk=this.Xk&&!self.ActiveXObject&&"ActiveXObject"in self,this.Jk=/Vivaldi/i.test(Bi),this.tL=/Firefox/i.test(Bi)&&!/Seamonkey/i.test(Bi),this.eL=Wi?y(Wi[1]):0,this.nL=/Safari/i.test(Bi)&&!/Chrome/i.test(Bi)&&!this.nk&&!this.zk,this.oL=zi?y(zi[2]):0,this.aL=Boolean(qi),this.cL=qi?y(qi[1]):0,this.dL=/CrKey/.test(Bi),this._L=/\b(tv|smart-tv|smarttv|appletv|crkey|googletv|hbbtv|pov_tv|roku|viera|nettv|philipstv|vizio)\b/i.test(Bi),this.wL="web"===xi.zE,this.pL="web"===xi.PE,this.yL=this.pL||this.wL,this.bL="web"===xi.BE,this.SL="web"===xi.UE,this.IL="web"===xi.QE}return Nt(t,[{key:"Je",get:function(){return this.YE}},{key:"GE",get:function(){return this.VE}},{key:"WE",get:function(){return this.HE}},{key:"XE",get:function(){return this.ZE}},{key:"qE",get:function(){return this.KE}},{key:"JE",get:function(){return this.$E}},{key:"ek",get:function(){return this.nk}},{key:"rk",get:function(){return this.hk}},{key:"ck",get:function(){return this.lk}},{key:"dk",get:function(){return this.fk}},{key:"_k",get:function(){return this.gk}},{key:"Ua",get:function(){return this.vk}},{key:"wk",get:function(){return this.pk}},{key:"Ak",get:function(){return this.yk||this.Mk}},{key:"ql",get:function(){return this.bk}},{key:"Qs",get:function(){return this.Tk}},{key:"Sk",get:function(){return this.Nk}},{key:"Ik",get:function(){return this.Dk}},{key:"Ek",get:function(){var t;return null!=(t=this.Lk)?t:this.xk}},{key:"Ck",get:function(){return this.jk}},{key:"Ok",get:function(){return this.Rk}},{key:"Pk",get:function(){return this.zk}},{key:"Bk",get:function(){return this.Uk}},{key:"Qk",get:function(){return this.Fk}},{key:"Yk",get:function(){return this.Gk}},{key:"Vk",get:function(){return this.Wk}},{key:"Hk",get:function(){return this.Xk}},{key:"Zk",get:function(){return this.qk}},{key:"Kk",get:function(){return this.Jk}},{key:"$k",get:function(){return this.tL}},{key:"iL",get:function(){return this.eL}},{key:"sL",get:function(){return this.nL}},{key:"rL",get:function(){return this.oL}},{key:"hL",get:function(){return this.aL}},{key:"uL",get:function(){return this.cL}},{key:"lL",get:function(){return this.dL}},{key:"fL",get:function(){return this._L}},{key:"gL",get:function(){return!(!this.Qk&&!this.Pk)&&this.Ek<=56}},{key:"vL",get:function(){return this.wL}},{key:"mL",get:function(){return this.pL}},{key:"AL",get:function(){return this.yL}},{key:"ML",get:function(){return this.bL}},{key:"TL",get:function(){return this.SL}},{key:"NL",get:function(){return this.IL}},{key:"DL",get:function(){return this.EL}}]),t}();Xi.kL=new Xi;var ji=Xi.kL,Yi=!(ji.Hk&&!ji.Zk),Ki=self.console;function Gi(t){if(lt(t))try{return JSON.stringify(t)}catch(t){}return t}function $i(t){return t.map(Gi).join(" ")}function Zi(t){var n=Ki&&Ki[t];return n?n.bind&&Yi?n.bind(Ki):function(){for(var n=arguments.length,i=new Array(n),e=0;e<n;e++)i[e]=arguments[e];Ki[t]($i(i))}:void 0}var Ji=Zi("log")||kt,Qi=Zi("warn")||Ji.bind(void 0,"WARNING:"),te=Zi("error")||Ji.bind(void 0,"ERROR:"),ne=function(){var t=Ki&&Ki.assert;return t?t.bind&&Yi?t.bind(Ki):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];Ki.assert(t,$i(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||te.apply(void 0,["Assertion failed:"].concat(ct(i)))}}();function ie(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),g.defineProperty(t,e.key,e)}}function ee(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){re(t,n,r,e);var o=t;t=e,e=o}return t}(t,n);return i!==t&&re(i,null,t.length,t),t}function re(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++]}}var oe=/[a-zA-Z]/,ue=/[0-9]/,se=/[0-9a-fA-F]/,fe=/^0x/i,he=/^[0-9]+$/,ce=/^[0-9a-fA-F]+$/,ae=/^[0-7]+$/,ve=g.prototype.toString,de=Array.isArray||function(t){return"[object Array]"===ve.call(t)},le=void 0!==n&&"symbol"==typeof i;function we(t){return de(t)?t:Array.from(t)}function be(t,n,i){var e=t[n];t[n]=t[i],t[i]=e}function ge(t){return t>=65&&t<=90}function me(t){return ge(t)||function(t){return t>=97&&t<=122}(t)}function pe(t){return t>=48&&t<=57}function ye(t){return pe(t)||me(t)}function _e(t){return pe(t)||t>=65&&t<=70||t>=97&&t<=102}function Se(t){return ge(t)?t+32:t}function Te(t){return pe(t)?t-48:t>=65&&t<=70?t-65+10:t>=97&&t<=102?t-97+10:-1}function Ee(t,n){return void 0===n&&(n=!1),0<=t&&t<=9?t+48:10<=t&&t<=15?t+(n?87:55):-1}var Ie=m.min,ke=String.fromCharCode,Re=16384;function Oe(t){for(var n=t.length,i=[],e=0;e<n;e+=Re){var r=Ie(e+Re,n);i.push(ke.apply(null,t.slice(e,r)))}return i.join("")}var Ne=2147483647,Pe=/[^\0-\x7E]/,Ae=/[\x2E\u3002\uFF0E\uFF61]/g,De={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},Ce=m.floor,xe=String.fromCharCode;function Be(t){throw new RangeError(De[t])}function Me(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 Ue,Le,Fe,ze=function(t,n){return t+22+75*(t<26)-((0!=n)<<5)},We=function(t,n,i){var e=0;for(t=i?Ce(t/700):t>>1,t+=Ce(t/n);t>455;e+=36)t=Ce(t/35);return Ce(e+36*t/(t+38))},qe=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(Ae,".")).split("."),n).join(".");return e+r}(t,(function(t){return Pe.test(t)?"xn--"+function(t){for(var n=[],i=(t=Me(t)).length,e=128,r=0,o=72,u=0,s=t;u<s.length;u++){var f=s[u];f<128&&n.push(xe(f))}var h=n.length,c=h;for(h&&n.push("-");c<i;){for(var a=Ne,v=0,d=t;v<d.length;v++){var l=d[v];l>=e&&l<a&&(a=l)}var w=c+1;a-e>Ce((Ne-r)/w)&&Be("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>Ne&&Be("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(xe(ze(_+S%T,0))),p=Ce(S/T)}n.push(xe(ze(p,0))),o=We(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 Oe(n)}function Ve(t){if(t>=55296&&t<=57343)throw new w("Lone surrogate U+"+t.toString(16).toUpperCase()+" is not a scalar value")}function Xe(t,n){return t>>n&63|128}function je(t,n){0!=(4294967168&t)?(0==(4294965248&t)?n.push(t>>6&31|192):0==(4294901760&t)?(Ve(t),n.push(t>>12&15|224),n.push(Xe(t,6))):0==(4292870144&t)&&(n.push(t>>18&7|240),n.push(Xe(t,12)),n.push(Xe(t,6))),n.push(63&t|128)):n.push(t)}function Ye(t){for(var n=[],i=0;i<t.length;i++){je(t[i],n)}return n}function Ke(){if(Fe>=Le)throw new w("Invalid byte index");var t=255&Ue[Fe];if(Fe++,128==(192&t))return 63&t;throw new w("Invalid continuation byte")}function Ge(){var t,n;if(Fe>Le)throw new w("Invalid byte index");if(Fe===Le)return!1;if(t=255&Ue[Fe],Fe++,0==(128&t))return t;if(192==(224&t)){if((n=(31&t)<<6|Ke())>=128)return n;throw new w("Invalid continuation byte")}if(224==(240&t)){if((n=(15&t)<<12|Ke()<<6|Ke())>=2048)return Ve(n),n;throw new w("Invalid continuation byte")}if(240==(248&t)&&(n=(7&t)<<18|Ke()<<12|Ke()<<6|Ke())>=65536&&n<=1114111)return n;throw new w("Invalid UTF-8 detected")}function $e(t){return[37,Ee(t>>4),Ee(15&t)]}function Ze(t){return function(t){return t>=0&&t<=31}(t)||t>126}function Je(t){return Ze(t)||32===t||34===t||60===t||62===t||96===t}function Qe(t){return Je(t)||35===t||63===t||123===t||125===t}function tr(t){return Qe(t)||47===t||58===t||59===t||61===t||64===t||t>=91&&t<=94||124===t}function nr(t){return t<33||t>126||34===t||35===t||60===t||62===t}function ir(t){return nr(t)||39===t}function er(t,n){if(!n(t))return[t];for(var i=Ye([t]),e=[],r=0;r<i.length;r++){var o=i[r];e.push.apply(e,$e(o))}return e}function rr(t,n){for(var i=[],e=0,r=Me(t);e<r.length;e++){var o=r[e];i.push.apply(i,er(o,n))}return He(i)}function or(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&&_e(t[e+1])&&_e(t[e+2])){var o=Te(t[e+1])<<4|Te(t[e+2]);n.push(o),e+=2}else n.push(r)}return n}(Ye(t))}function ur(t){return He(function(t){Ue=t.slice(),Le=Ue.length,Fe=0;for(var n,i=[];!1!==(n=Ge());)i.push(n);return i}(or(Me(t))))}function sr(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 b;o+=2,r=e+=1}for(;o<n;){if(8===e)throw new b("Too many groups");if(":"!==t[o]){for(var u=0,s=0;s<4&&o<n&&se.test(t[o]);)u=u<<4|p(t[o],16),o+=1,s+=1;if("."===t[o]){if(0===s)throw new b;if(o-=s,e>6)throw new b;for(var f=0;o<n;){var h=null;if(f>0){if(!("."===t[o]&&f<4))throw new b;o+=1}if(!ue.test(t[o]))throw new b;for(;o<n&&ue.test(t[o]);){var c=p(t[o],10);if(null===h)h=c;else{if(0===h)throw new b;if((h=10*h+c)>255)throw new b}o+=1}i[e]=i[e]<<8|h,2!==(f+=1)&&4!==f||(e+=1)}if(4!==f)throw new b;break}if(":"===t[o]){if((o+=1)===n)throw new b}else if(o<n)throw new b;i[e]=u,e+=1}else{if(null!==r)throw new b("Too many :: groups");o+=1,r=e+=1}}if(null!==r){var a=e-r;for(e=7;0!==e&&a>0;)be(i,e,r+a-1),e-=1,a-=1}else if(8!==e)throw new b;return i}function fr(t){var n=10,i=he;return fe.test(t)?(t=t.slice(2),n=16,i=ce):t.length>=2&&"0"===t[0]&&(t=t.slice(1),n=8,i=ae),""===t?0:i.test(t)?p(t,n):void 0}var hr={a2:4},cr=/[\0\t\n\r #%/:?@\[\\\]]/,ar=/[\0\t\n\r #/:?@\[\\\]]/;function vr(t,n){if("["===t[0]){if("]"!==t[t.length-1])throw new b("Invalid IPv6 address");return{a2:2,Zit:sr(t.slice(1,-1))}}if(!n)return function(t){if(ar.test(t))throw new b("Invalid code point in opaque host");var n=rr(t,Ze);return""===n?hr:{a2:3,sC:n}}(t);var i=function(t){var n=function(t){return qe(t.toLowerCase())}(t);return n}(ur(t));if(cr.test(i))throw new b("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=fr(r);if(void 0===o)return;i.push(o)}for(var u=0;u<i.length-1;u++)if(i[u]>255)throw new b;if(i[i.length-1]>=m.pow(256,5-i.length))throw new b;for(var s=i.pop(),f=0;f<i.length;f++)s+=i[f]*m.pow(256,3-f);return s}}(i);return void 0!==e?{a2:1,Zit:e}:""===i?hr:{a2:0,qit:i}}function dr(t){switch(t.a2){case 0:return t.qit;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.Zit);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.Zit)+"]";case 3:return t.sC;case 4:return""}}var lr=/\+/g;function wr(t){return 42===t||45===t||46===t||95===t||ye(t)}function br(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(lr," "),s=s.replace(lr," ");var f=ur(u),h=ur(s);i.push([f,h])}}return i}function gr(t){for(var n="",i=0;i<t.length;i++){var e=t[i];i>0&&(n+="&"),n+=mr(Ye(Me(e[0])))+"="+mr(Ye(Me(e[1])))}return n}function mr(t){for(var n=[],i=0;i<t.length;i++){var e=t[i];32===e?n.push(43):wr(e)?n.push(e):n.push.apply(n,$e(e))}return Oe(n)}var pr=/(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])/;function yr(t){var n=""+t,i=pr.exec(n);return i?function(t,n){for(var i=t.length,e=[],r=n;r<i;r++){var o=t.charCodeAt(r);if(Sr(o))if(Tr(o)||r===i-1)e.push(_r);else{var u=t.charCodeAt(r+1);Tr(u)?(e.push(o,u),r++):e.push(_r)}else e.push(o)}return t.slice(0,n)+Oe(e)}(n,i.index):n}var _r=65533,Sr=function(t){return 55296==(63488&t)},Tr=function(t){return 0!=(1024&t)};function Er(t,n){var i=t[0],e=n[0];return i===e?0:i<e?-1:1}function Ir(t){t.tf.length=0}function kr(t,n){!function(t,n){for(var i=0;i<n.length;i++)t[i]=n[i];t.length=n.length}(t.tf,br(n))}function Rr(t){if(t.Vu){var n=gr(t.tf);""===n&&(n=null),t.Vu.Vu.Kit=n}}var Or=function(){function t(t){if(void 0===t&&(t=void 0),this.Vu=null,null==t)this.tf=[];else if("object"==typeof t||"function"==typeof t)if(function(t){return t instanceof Or&&!!de(t.tf)&&(!le||t[i]===Nr)}(t))this.tf=t.tf.slice();else if(function(t){return null!=t&&(!!de(t)||!!le&&"function"==typeof t[i])}(t)){this.tf=[];for(var n=0,e=we(t);n<e.length;n++){var r=we(e[n]);if(2!==r.length)throw new b("Invalid name-value pair");this.tf.push([yr(r[0]),yr(r[1])])}}else for(var o in this.tf=[],t)g.prototype.hasOwnProperty.call(t,o)&&this.tf.push([yr(o),yr(t[o])]);else(t=yr(t)).length>0&&"?"===t[0]&&(t=t.slice(1)),this.tf=br(t)}var n=t.prototype;return n.append=function(t,n){t=yr(t),n=yr(n),this.tf.push([t,n]),Rr(this)},n.delete=function(t){t=yr(t);for(var n=this.tf,i=0;i<n.length;){n[i][0]===t?n.splice(i,1):i++}Rr(this)},n.get=function(t){t=yr(t);for(var n=this.tf,i=0;i<n.length;i++){var e=n[i];if(e[0]===t)return e[1]}return null},n.getAll=function(t){t=yr(t);for(var n=this.tf,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=yr(t);for(var n=this.tf,i=0;i<n.length;i++){if(n[i][0]===t)return!0}return!1},n.set=function(t,n){t=yr(t),n=yr(n);for(var i=this.tf,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]),Rr(this)},n.sort=function(){ee(this.tf,Er),Rr(this)},n.toString=function(){return gr(this.tf)},n.entries=function(){return new Cr(this.tf,Pr)},n.keys=function(){return new Cr(this.tf,Ar)},n.values=function(){return new Cr(this.tf,Dr)},n.forEach=function(t){var n=this;this.tf.forEach((function(i){return t(i[1],i[0],n)}))},t}(),Nr=Or.prototype.entries;le&&(Or.prototype[i]=Nr);var Pr=function(t){return[t[0],t[1]]},Ar=function(t){return t[0]},Dr=function(t){return t[1]},Cr=function(){function t(t,n){this.Jit=0,this.tf=t,this.$it=n}return t.prototype.next=function(){return this.Jit<this.tf.length?{done:!1,value:this.$it(this.tf[this.Jit++])}:{done:!0,value:void 0}},t}(),xr="null";var Br=g.create(null);Br.ftp=21,Br.file=0,Br.gopher=70,Br.http=80,Br.https=443,Br.ws=80,Br.wss=443;var Mr=/^(?:\.|%2e)$/i,Ur=/^(?:\.|%2e){2}$/i;function Lr(t){return Mr.test(t)}function Fr(t){return Ur.test(t)}function zr(t){return void 0!==Br[t]}function Wr(t){return zr(t.IP)}function qr(t){return""!==t.tet||""!==t.iet}function Hr(t){var n=t.length;if(!(n>=2))return!1;if(!Xr(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&&oe.test(t[0])&&(":"===t[1]||"|"===t[1])}function Xr(t){return 2===t.length&&Vr(Oe(t))}function jr(t){return Vr(t)&&":"===t[1]}function Yr(t){var n=t.eet;0!==n.length&&("file"===t.IP&&1===n.length&&jr(n[0])||n.pop())}function Kr(t){return null===t.net||hr===t.net||t.ret||"file"===t.IP}var Gr=-1,$r=/\t|\n|\r/g,Zr=/^[\x00-\x1f ]+|[\x00-\x1f ]+$/g;function Jr(t,n,i,e){void 0===i&&(i=null),void 0===e&&(e=null),i||(i=new to,t=t.replace(Zr,""));var r=null!==e?e:0;n=n||null;for(var o=[],u=!1,s=!1,f=!1,h=Me(t=t.replace($r,"")),c=h.length,a=0;a<=c;){var v=a<c?h[a]:Gr;switch(r){case 0:if(!me(v)){if(null===e){o.length=0,r=2;continue}throw new b("Invalid scheme")}o.push(Se(v)),r=1;break;case 1:if(ye(v)||43===v||45===v||46===v)o.push(Se(v));else{if(58!==v){if(null===e){o.length=0,r=2,a=0;continue}throw new b("Invalid scheme")}var d=He(o);if(null!==e){if(zr(i.IP)&&!zr(d))return;if(!zr(i.IP)&&zr(d))return;if((qr(i)||null!==i.h7)&&"file"===d)return;if("file"===i.IP&&(i.net===hr||null===i.net))return}if(i.IP=d,null!==e)return void(Wr(i)&&i.h7===Br[i.IP]&&(i.h7=null));o.length=0,"file"===i.IP?r=13:Wr(i)&&n&&n.IP===i.IP?r=3:Wr(i)?r=7:47===h[a+1]?(r=4,a+=1):(i.ret=!0,i.eet.push(""),r=18)}break;case 2:if(!n||n.ret&&35!==v)throw new b("Invalid scheme");n.ret&&35===v?(i.IP=n.IP,i.eet=n.eet.slice(),i.Kit=n.Kit,i.oet="",i.ret=!0,r=20):"file"!==n.IP?(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.IP=n.IP,Gr===v?(i.tet=n.tet,i.iet=n.iet,i.net=n.net,i.h7=n.h7,i.eet=n.eet.slice(),i.Kit=n.Kit):47===v?r=6:63===v?(i.tet=n.tet,i.iet=n.iet,i.net=n.net,i.h7=n.h7,i.eet=n.eet.slice(),i.Kit="",r=19):35===v?(i.tet=n.tet,i.iet=n.iet,i.net=n.net,i.h7=n.h7,i.eet=n.eet.slice(),i.Kit=n.Kit,i.oet="",r=20):92===v&&Wr(i)?r=6:(i.tet=n.tet,i.iet=n.iet,i.net=n.net,i.h7=n.h7,i.eet=n.eet.slice(),i.eet.pop(),r=17,a-=1);break;case 6:!Wr(i)||47!==v&&92!==v?47===v?r=9:(i.tet=n.tet,i.iet=n.iet,i.net=n.net,i.h7=n.h7,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 g=He(er(w,tr));f?i.iet+=g:i.tet+=g}else f=!0}o.length=0}else if(Gr===v||47===v||63===v||35===v||Wr(i)&&92===v){if(u&&0===o.length)throw new b("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.IP)a-=1,r=15;else if(58!==v||s)if(Gr===v||47===v||63===v||35===v||Wr(i)&&92===v){if(a-=1,Wr(i)&&0===o.length)throw new b("Invalid host");if(null!==e&&0===o.length&&(qr(i)||null!==i.h7))return;var m=vr(He(o),Wr(i));if(i.net=m,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 b("Invalid host");var y=vr(He(o),Wr(i));if(i.net=y,o.length=0,r=12,11===e)return}break;case 12:if(pe(v))o.push(v);else{if(!(Gr===v||47===v||63===v||35===v||Wr(i)&&92===v||null!==e))throw new b("Invalid port");if(0!==o.length){var _=p(He(o),10);if(_>65535)throw new b("Invalid port");i.h7=_===Br[i.IP]?null:_,o.length=0}if(null!==e)return;r=16,a-=1}break;case 13:i.IP="file",47===v||92===v?r=14:n&&"file"===n.IP?Gr===v?(i.net=n.net,i.eet=n.eet.slice(),i.Kit=n.Kit):63===v?(i.net=n.net,i.eet=n.eet.slice(),i.Kit="",r=19):35===v?(i.net=n.net,i.eet=n.eet.slice(),i.Kit=n.Kit,i.oet="",r=20):(Hr(h.slice(a))||(i.net=n.net,i.eet=n.eet.slice(),Yr(i)),r=17,a-=1):(r=17,a-=1);break;case 14:47===v||92===v?r=15:(n&&"file"===n.IP&&!Hr(h.slice(a))&&(jr(n.eet[0])?i.eet.push(n.eet[0]):i.net=n.net),r=17,a-=1);break;case 15:if(Gr===v||47===v||92===v||63===v||35===v)if(a-=1,null===e&&Xr(o))r=17;else if(0===o.length){if(i.net=hr,null!==e)return;r=16}else{var S=vr(He(o),Wr(i));if(0===S.a2&&"localhost"===S.qit&&(S=hr),i.net=S,null!==e)return;o.length=0,r=16}else o.push(v);break;case 16:Wr(i)?(r=17,47!==v&&92!==v&&(a-=1)):null===e&&63===v?(i.Kit="",r=19):null===e&&35===v?(i.oet="",r=20):Gr!==v&&(r=17,47!==v&&(a-=1));break;case 17:if(Gr===v||47===v||Wr(i)&&92===v||null===e&&(63===v||35===v)){var T=He(o);if(Fr(T)?(Yr(i),47===v||Wr(i)&&92===v||i.eet.push("")):!Lr(T)||47===v||Wr(i)&&92===v?Lr(T)||("file"===i.IP&&0===i.eet.length&&Xr(o)&&(hr!==i.net&&null!==i.net&&(i.net=hr),o[1]=58,T=He(o)),i.eet.push(T)):i.eet.push(""),o.length=0,"file"===i.IP&&(Gr===v||63===v||35===v))for(;i.eet.length>1&&""===i.eet[0];)i.eet.shift();63===v?(i.Kit="",r=19):35===v&&(i.oet="",r=20)}else o.push.apply(o,er(v,Qe));break;case 18:63===v?(i.Kit="",r=19):35===v?(i.oet="",r=20):Gr!==v&&(i.eet[0]+=He(er(v,Ze)));break;case 19:null===e&&35===v?(i.oet="",r=20):Gr!==v&&(i.Kit+=He(er(v,Wr(i)?ir:nr)));break;case 20:Gr===v||0===v||(i.oet+=He(er(v,Je)))}a++}return i}function Qr(t,n,i,e){try{Jr(t,n,i,e)}catch(t){}}var to=function(){this.IP="",this.tet="",this.iet="",this.net=null,this.h7=null,this.eet=[],this.Kit=null,this.oet=null,this.ret=!1};function no(t){switch(t.IP){case"blob":var n;try{n=Jr(t.eet[0],null)}catch(t){return xr}return no(n);case"ftp":case"gopher":case"http":case"https":case"ws":case"wss":return function(t,n,i){return t+"://"+dr(n)+(null===i?"":":"+i)}(t.IP,t.net,t.h7);default:return xr}}var io,eo,ro=function(){function t(t,n){var i,e=null;if(null!=n)if(function(t){return null!=t&&t instanceof ro&&"object"==typeof t.Vu}(n))e=n.Vu;else try{e=Jr(String(n),null)}catch(t){throw new b("Invalid base URL: "+t.message)}try{i=Jr(String(t),e)}catch(t){throw new b("Invalid URL: "+t.message)}var r=i.Kit;this.Vu=i,this.Kit=function(t){var n=new Or;return null!==t&&kr(n,t),n}(r),this.Kit.Vu=this}var n=t.prototype;return n.toString=function(){return this.href},n.toJSON=function(){return this.href},function(t,n,i){n&&ie(t.prototype,n),i&&ie(t,i)}(t,[{key:"href",get:function(){return function(t,n){void 0===n&&(n=!1);var i=t.IP+":";if(null!==t.net?(i+="//",qr(t)&&(i+=t.tet,""!==t.iet&&(i+=":"+t.iet),i+="@"),i+=dr(t.net),null!==t.h7&&(i+=":"+t.h7)):null===t.net&&"file"===t.IP&&(i+="//"),t.ret)i+=t.eet[0];else for(var e=0,r=t.eet;e<r.length;e++)i+="/"+r[e];return null!==t.Kit&&(i+="?"+t.Kit),n||null===t.oet||(i+="#"+t.oet),i}(this.Vu)},set:function(t){var n;try{n=Jr(String(t),null)}catch(t){throw new b("Invalid URL: "+t.message)}this.Vu=n,Ir(this.Kit);var i=this.Vu.Kit;null!==i&&kr(this.Kit,i)}},{key:"origin",get:function(){return no(this.Vu)}},{key:"protocol",get:function(){return this.Vu.IP+":"},set:function(t){Qr(t+":",null,this.Vu,0)}},{key:"username",get:function(){return this.Vu.tet},set:function(t){Kr(this.Vu)||(this.Vu.tet=rr(t,tr))}},{key:"password",get:function(){return this.Vu.iet},set:function(t){Kr(this.Vu)||(this.Vu.iet=rr(t,tr))}},{key:"host",get:function(){var t=this.Vu,n=t.net;if(null===n)return"";var i=t.h7,e=dr(n);return null!==i&&(e+=":"+i),e},set:function(t){this.Vu.ret||Qr(t,null,this.Vu,10)}},{key:"hostname",get:function(){var t=this.Vu.net;return null===t?"":dr(t)},set:function(t){this.Vu.ret||Qr(t,null,this.Vu,11)}},{key:"port",get:function(){var t=this.Vu.h7;return null===t?"":""+t},set:function(t){Kr(this.Vu)||(""===t?this.Vu.h7=null:Qr(t,null,this.Vu,12))}},{key:"pathname",get:function(){var t=this.Vu.eet;return this.Vu.ret?t[0]:0===t.length?"":"/"+t.join("/")},set:function(t){this.Vu.ret||(this.Vu.eet.length=0,Qr(t,null,this.Vu,16))}},{key:"search",get:function(){var t=this.Vu.Kit;return null===t||""===t?"":"?"+t},set:function(t){t=yr(t);var n=this.Vu;if(""===t)return n.Kit=null,void Ir(this.Kit);"?"===t[0]&&(t=t.slice(1)),n.Kit="",Qr(t,null,n,19),kr(this.Kit,t)}},{key:"searchParams",get:function(){return this.Kit}},{key:"hash",get:function(){var t=this.Vu.oet;return null===t||""===t?"":"#"+t},set:function(t){""!==t?("#"===t[0]&&(t=t.slice(1)),this.Vu.oet="",Qr(t,null,this.Vu,20)):this.Vu.oet=null}}]),t}();function oo(t){return t.document&&t.document.baseURI||t.location.href||""}function uo(){return void 0!==h?h.createElement("video"):void 0}function so(){return eo||(eo=uo()),eo}var fo=!!("ontouchstart"in self||self.DocumentTouch&&h instanceof self.DocumentTouch)||!(!c||!c.msMaxTouchPoints),ho=so(),co=!(!ho||!ho.webkitShowPlaybackTargetPicker),ao=function(){function t(){this.aet=void 0,this.Met=!1,this.Je=fo,this.Qs=!1,this.J7=!0}var n=t.prototype;return n.uet=function(){return 0},n.Aet=function(t,n){return!0},n.yet=function(t){return t>=.3333333333333333},Nt(t,[{key:"het",get:function(){return void 0===this.aet&&(this.aet=this.uet()),this.aet}},{key:"cet",get:function(){return!ji.fL}},{key:"let",get:function(){if(f.screen)return{width:f.screen.width,height:f.screen.height}}},{key:"Y3",get:function(){return f.devicePixelRatio||1}},{key:"det",get:function(){return co}},{key:"M3",get:function(){return!1}},{key:"g3",get:function(){return!0}},{key:"tS",get:function(){return ji.sL||ji.Ua}},{key:"fet",get:function(){return!ji.Ua}},{key:"WR",get:function(){return!0}},{key:"_et",get:function(){return!0}},{key:"vet",get:function(){return!1}},{key:"wet",get:function(){}},{key:"met",get:function(){return!0}},{key:"r0",get:function(){return!1}},{key:"pet",get:function(){return ji.Yk}}]),t}(),vo=function(){var t=uo();if(!t)return!1;var n=t.muted;return t.muted=!n,t.muted!==n}();!function(){if(ji.dk)return!1;var t=uo();if(!t)return!1;var n=t.volume;t.volume=n/2+.1,t.volume}();var lo=function(t){function n(n){var i;return(i=t.call(this)||this).bet=n,i.bet&&(i.Met=i.bet.Met,i.Je=i.bet.Je,i.J7=vo&&i.bet.J7),i}Dt(n,t);var i=n.prototype;return i.uet=function(){return this.bet?this.bet.het:t.prototype.uet.call(this)},i.Aet=function(n,i){return this.bet?this.bet.Aet(n,i):t.prototype.Aet.call(this,n,i)},i.yet=function(n){return this.bet?this.bet.yet(n):t.prototype.yet.call(this,n)},Nt(n,[{key:"wet",get:function(){var t;return null==(t=this.bet)?void 0:t.wet}},{key:"met",get:function(){var t,n;return null==(n=null==(t=this.bet)?void 0:t.met)||n}}]),n}(ao),wo=function(t){function n(n){var i;return(i=t.call(this,n)||this).Met=!0,i.Qs=!0,i}return Dt(n,t),Nt(n,[{key:"vet",get:function(){return ji.Ua}}]),n}(lo);var bo=function(t){function n(){return t.apply(this,arguments)||this}return Dt(n,t),n.prototype.uet=function(){return function(t){return t&&bt(io.ManagedMediaSource)?io.ManagedMediaSource:bt(io.MediaSource)?io.MediaSource:void 0}(!0)?t.prototype.uet.call(this):1},Nt(n,[{key:"vet",get:function(){return!0}}]),n}(wo),go=function(t){function n(){return t.apply(this,arguments)||this}return Dt(n,t),n.prototype.Aet=function(n,i){return t.prototype.Aet.call(this,n,i)},Nt(n,[{key:"M3",get:function(){return ji.Bk<3}},{key:"g3",get:function(){return ji.Bk>=3}},{key:"let",get:function(){var t=this;return f.tizen&&!this.Tet&&f.tizen.systeminfo.getPropertyValue("DISPLAY",(function(n){var i=n.resolutionWidth,e=n.resolutionHeight;1===i&&1===e||(t.Tet={width:i,height:e})})),this.Tet}},{key:"r0",get:function(){return ji.Bk<3}}]),n}(lo),mo=function(t){function n(){return t.call(this)||this}return Dt(n,t),n}(ao),po=function(t){function n(){return t.apply(this,arguments)||this}return Dt(n,t),n.prototype.Aet=function(t,n){if(t&&t.Net&&n&&n.Net){var i=yo(t.Net,"mp4a.40.2")&&yo(n.Net,"mp4a.40.5"),e=yo(t.Net,"mp4a.40.5")&&yo(n.Net,"mp4a.40.2"),r=yo(t.Net,"mp4a.40.2")&&yo(n.Net,"mp4a.40.34"),o=yo(t.Net,"mp4a.40.34")&&yo(n.Net,"mp4a.40.2"),u=yo(t.Net,"mp4a.40.5")&&yo(n.Net,"mp4a.40.34"),s=yo(t.Net,"mp4a.40.34")&&yo(n.Net,"mp4a.40.5");return!(i||e||r||o||u||s)}return!0},Nt(n,[{key:"wet",get:function(){if(ji.GE)return 4096}}]),n}(mo);function yo(t,n){return t.indexOf(n)>-1}var _o=function(t){function n(){return t.apply(this,arguments)||this}return Dt(n,t),n.prototype.yet=function(t){return t>=2},n}(mo),So=function(t){function n(){var n;return(n=t.call(this)||this).Met=ji.rL>=11,n.J7=ji.sL&&!(ji.Ua&&ji.rL<10),n}return Dt(n,t),n}(mo),To=function(t){function n(){return t.apply(this,arguments)||this}return Dt(n,t),Nt(n,[{key:"let",get:function(){var t=this;return f.webOS&&!this.Tet&&f.webOS.deviceInfo((function(n){t.Tet={width:n.screenWidth,height:n.screenHeight}})),this.Tet}},{key:"WR",get:function(){return!1}}]),n}(lo),Eo=function(t){function n(){return t.apply(this,arguments)||this}return Dt(n,t),Nt(n,[{key:"met",get:function(){return!ji.WE||(ji.Ck?92!==ji.Ok:ji.Ek>=100)}}]),n}(mo),Io=function(t){function n(){return t.apply(this,arguments)||this}return Dt(n,t),Nt(n,[{key:"vet",get:function(){return!0}}]),n}(lo),ko=function(){function t(){this.Let=new Ro,this.Cet=function(){var t=function(){if(ji.$k)return new po;if(ji.Vk||ji.Hk)return new _o;if(ji.sL)return new So;if(ji.Ik)return new Eo;return new mo}();return ji.Ua?new bo(t):ji.Qs?new wo(t):ji.Pk?new go(t):ji.Qk?new To(t):ji.GE?new Io(t):new lo(t)}(),this.xet=Oo(),self.performance&&self.performance.now?this.n_=function(){return self.performance.now()}:this.n_=Mn}var n=t.prototype;return n.Iet=function(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];Ji.apply(void 0,ct(n))},n.Nw=function(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];Qi.apply(void 0,ct(n))},n.Det=function(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];te.apply(void 0,ct(n))},n.Eet=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];ne.apply(void 0,[t].concat(ct(i)))},n.o_=function(t,n){return a(t,n)},n.FT=function(t,n){return d(t,n)},n.r_=function(t){v(t)},n.GT=function(t){l(t)},n.Gj=function(){return this.ket.Gj()},n.xM=function(){return this.ket.xM()},n.CM=function(){return this.ket.CM()},n.LM=function(){return this.ket.LM()},n.kM=function(){return this.ket.kM()},n.Qj=function(t,n){return this.ket.Qj(t,n)},n.Bj=function(t){return this.ket.Bj(t)},n.Ah=function(t,n){var i;return void 0===n&&(n=oo(io)),i="object"!==(void 0===n?"undefined":E(n))||n instanceof ro?n:n.href,new ro(t,i)},n.dw=function(t,n){if(void 0===n&&(n=oo(io)),this.xet){var i=function(t){return"string"==typeof t}(n)?n:n.toString();return new self.URL(t,i).href}return this.Ah(t,n).href},Nt(t,[{key:"PR",get:function(){return this.Let}},{key:"Ys",get:function(){return this.Cet}},{key:"jet",get:function(){return{Oet:c&&c.userAgent.match(/Android /i)?"Android":"other",Ret:Boolean(c&&c.userAgent.match(/Android 8.0.0/i))}}},{key:"KW",get:function(){return self&&self.location&&"https:"===self.location.protocol}},{key:"Pet",get:function(){return"languages"in c?c.languages.slice():[c.language]}}]),t}(),Ro=function(){function t(){}return Nt(t,[{key:"zR",get:function(){return c.oscpu}},{key:"Ys",get:function(){return c.platform}},{key:"UR",get:function(){return c.vendor}},{key:"QR",get:function(){return c.vendorSub}}]),t}();function Oo(){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}function No(){return No=g.assign||function(t){for(var n=1;n<arguments.length;n++){var i=arguments[n];for(var e in i)g.prototype.hasOwnProperty.call(i,e)&&(t[e]=i[e])}return t},No.apply(this,arguments)}var Po="9a04f079-9840-4286-ab92-e65be0885f95",Ao="urn:uuid:"+Po,Do="com.microsoft.playready",Co="edef8ba9-79d6-4ace-a3c8-27dcd51d21ed",xo="urn:uuid:"+Co,Bo="com.widevine.alpha",Mo="1077efec-c0b2-4d02-ace3-3c1e52e2fb4b",Uo="urn:uuid:"+Mo,Lo="94ce86fb-07ff-4f43-adb8-93d2fa968ca2",Fo="urn:uuid:"+Lo,zo="com.apple.fps.1_0",Wo=function(t){return t.Iw="playready",t.Dw="widevine",t.Ew="fairplay",t.Lw="clearkey",t.xw="aes128",t}({}),qo={ow:Wo.Iw,LL:Do,xL:"cenc",CL:Po,jL:Ao,OL:"PlayReady"},Ho={ow:Wo.Dw,LL:Bo,xL:"cenc",CL:Co,jL:xo,OL:"Widevine"},Vo={ow:Wo.Ew,LL:zo,xL:"skd",CL:Lo,jL:Fo,OL:"FairPlay"},Xo=(Wo.Ew,{ow:Wo.Lw,LL:"org.w3.clearkey",xL:"cenc",CL:Mo,jL:Uo,OL:"ClearKey"}),jo=ji.Ik&&ji.Ek>=42||ji.$k&&ji.iL>=38||ji.Vk||ji.Zk||ji.hL&&ji.uL>=29;function Yo(t,n){return function(t,n){return vt(t)&&-1!==t.indexOf(n)}(t,"audio")?{initDataTypes:["cenc"],audioCapabilities:[No({contentType:t},n?{robustness:"SW_SECURE_CRYPTO"}:{})]}:{initDataTypes:["cenc"],videoCapabilities:[No({contentType:t},n?{robustness:"SW_SECURE_CRYPTO"}:{})]}}var Ko=function(){function t(t){this.Uj=Bt(),this.Vj=void 0,this.Yj=t}var n=t.prototype;return n.kM=function(){return this.Bj(Ho)},n.xM=function(){return this.Bj(Xo)},n.LM=function(){return this.Bj(qo)},n.CM=function(){return this.Bj(Vo)},n.Bj=function(t){var n=t.jL,i=this.Uj.get(n);if(i)return i;var e=this.Qj(t,'video/mp4; codecs="avc1.42000a"');return this.Uj.set(n,e),e},n.Qj=function(t,n){var i=this;return ut((function(){return st(this,(function(e){switch(e.label){case 0:return e.trys.push([0,2,,7]),[4,i.Yj.Fj(t.LL,[Yo(n,!0)])];case 1:return e.sent(),[2,!0];case 2:e.sent(),e.label=3;case 3:return e.trys.push([3,5,,6]),[4,i.Yj.Fj(t.LL,[Yo(n,!1)])];case 4:return e.sent(),[2,!0];case 5:return e.sent(),[2,!1];case 6:return[3,7];case 7:return[2]}}))}))()},n.Gj=function(){return this.Vj||(this.Vj=this.Wj()),this.Vj},n.Wj=function(){var t=this;return ut((function(){return st(this,(function(n){switch(n.label){case 0:return"https:"===undefined.protocol?[2,!1]:jo?[4,t.xM()]:[2,!1];case 1:return n.sent()?[2,!1]:[2,!0]}}))}))()},t}(),Go=["cenc"],$o=["cbcs","cbcs-1-9"],Zo=function(t){function n(n){var i;return(i=t.call(this,"RL")||this).PL=n,i}return Dt(n,t),n}(_i),Jo=function(t){function n(n,i,e,r){var o;return(o=t.call(this,"zL")||this).PL=n,o.BL=i,o.zL=e,o.UL=r,o}return Dt(n,t),n}(_i),Qo=function(t){function n(){return t.call(this,"lt")||this}return Dt(n,t),n}(_i),tu=new S([0]).buffer,nu=function(){function t(){this.Ou=[]}var n=t.prototype;return n.VL=function(t){for(var n=0,i=this.Ou;n<i.length;n++){if(i[n][0]===t)return!0}return!1},n.WL=function(t){for(var n=0,i=this.Ou;n<i.length;n++){var e=i[n];if(e[0]===t)return e[1]}},n.HL=function(t,n){this.Ou.forEach((function(n){return t(n[1],n[0])}),n)},n.XL=function(t,n){this.Ou.push([t,n])},n.ZL=function(){Tt(this.Ou)},Nt(t,[{key:"jp",get:function(){return this.Ou.length}}]),t}(),iu=function(){function t(){var t=this;this.$L=new Z((function(n,i){t.Hd=n,t.JL=i}))}var n=t.prototype;return n.qL=function(t){this.Hd&&(this.Hd(t),this.Hf())},n.KL=function(t){this.JL&&(this.JL(t),this.Hf())},n.i_=function(){this.$L.catch(kt),this.KL(new nn)},n.e_=function(t){var n=this;t.then((function(t){return n.qL(t)}),(function(t){return n.KL(t)}))},n.Hf=function(){this.Hd=void 0,this.JL=void 0},t}();function eu(t,n){return t===Do?function(t){if(t.byteLength<2*ru.length)return t;var n=new DataView(t,0,2*ru.length),i=fi(n,!0);if(i===ru)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+Vn(t)+i;return function(t,n){void 0===n&&(n=!1);var i=new S(2*t.length);return si(ai(i),new bi,t,n),i}(e,!0).buffer}(t)}(n):n}var ru="<PlayReady";var ou=function(t){function n(n,i,e,r){var o;return(o=t.call(this,n,r)||this).tx=i,o.ix=e,o}return Dt(n,t),n}(Jt),uu=function(t,n){return uu=g.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)g.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])},uu(t,n)};function su(t,n){if("function"!=typeof n&&null!==n)throw new b("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}uu(t,n),t.prototype=null===n?g.create(n):(i.prototype=n.prototype,new i)}function fu(t,n,i){return t.indexOf?t.indexOf(n,i):Array.prototype.indexOf.call(t,n,i)}(function(){function t(t,n){this.sx=t,this.nx=n}t.prototype.get=function(t){var n=this.sx.get(t);if(0===this.nx||void 0===n)return n;var i=this.sx.get(t+1)||0,e=n&(1<<8-this.nx)-1,r=i>>8-this.nx;return(e<<this.nx)+r},t.prototype.getBit=function(t){if(!(t<0)){var n=this.sx.get(m.floor((t+this.nx)/8));if(void 0!==n)return(n&1<<7-this.nx-t%8)>0?1:0}},g.defineProperty(t.prototype,"bitLength",{get:function(){return this.sx.bitLength-this.nx},enumerable:!1,configurable:!0}),g.defineProperty(t.prototype,"length",{get:function(){return this.sx.length},enumerable:!1,configurable:!0})})(),m.pow(2,-52);function hu(t,n,i){return m.min(m.max(t,n),i)}function cu(t,n){return t>>8-n}function au(t,n){return t&(1<<n)-1}var vu=function(){function t(t){this.ox=t,this.hx=0,this.ux=0}return g.defineProperty(t.prototype,"totalBitsRead",{get:function(){return 8*this.hx+this.ux},enumerable:!1,configurable:!0}),g.defineProperty(t.prototype,"done",{get:function(){return this.hx===this.ox.length&&0===this.ux},enumerable:!1,configurable:!0}),g.defineProperty(t.prototype,"location",{get:function(){return{byte:this.hx,bit:this.ux}},enumerable:!1,configurable:!0}),t.prototype.copy=function(){var n=new t(this.ox);return n.seek(this.hx,this.ux),n},t.prototype.canReadBits=function(t){return 8*this.hx+t+this.ux<=8*this.ox.length},t.prototype.canReadBytes=function(t){return 0===this.ux?this.hx+t<=this.ox.length:this.hx+t<this.ox.length},t.prototype.incBit=function(){this.ux++,this.ux>7&&(this.hx++,this.ux=0)},t.prototype.seek=function(t,n){this.hx=t,this.ux=n},t.prototype.peekBit=function(){if(!this.canReadBits(1))throw new w("Cannot read past end of buffer.");return this.ox.get(this.hx)>>7-this.ux&1},t.prototype.readBit=function(){var t=this.peekBit();return this.incBit(),t},t.prototype.readByte=function(){if(!this.canReadBytes(1))throw new w("Cannot read past end of buffer.");if(0===this.ux)return this.ox.get(this.hx++);var t=au(this.ox.get(this.hx),8-this.ux),n=cu(this.ox.get(this.hx+1),this.ux);return this.hx++,t<<this.ux|n},t.prototype.readBits=function(t){if(!this.canReadBits(t))throw new w("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 w("The max bitlength that can be provided is 32.");if(!this.canReadBits(t))throw new w("Cannot read past end of buffer.");var n=0;if(0===this.ux&&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 w("The max bitlength that can be provided is 32.");if(!this.canReadBits(t))throw new w("Cannot read past end of buffer.");var n=this.readUInt(t);return 0===(n&1<<t-1)?n:n-m.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 w("Skipping over the buffer edge is not allowed.");var n=this.ux+t;this.hx+=n>>3,this.ux=7&n},t.prototype.readBool=function(){return this.readBit()>0},t.prototype.readString=function(t){if(!this.canReadBytes(t))throw new w("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}(),du=function(t,n){return t===n?0:t<n?-1:t>n?1:_(t)?_(n)?0:1:-1},lu=function(){function t(){this.lx=[],this._x=[],this.gx=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 w("The buffer length must be positive.");if(0!==i){if(0===this._x.length)this._x.push(0);else{var e=this._x[this._x.length-1]+this.lx[this.lx.length-1].length;this._x.push(e)}this.lx.push(t.subarray(n,n+i)),this.gx+=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.lx;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.lx=[],this._x=[],this.gx=0},t.prototype.get=function(t){if(!(t<0||t>=this.length)){var n=this.findContainingBufferIndex(t),i=t-this._x[n];return this.lx[n][i]}},g.defineProperty(t.prototype,"first",{get:function(){return this.get(0)},enumerable:!1,configurable:!0}),t.prototype.indexOf=function(t){if(this.lx.length<1)return-1;if(this.lx.length>1){var n=this.join();this.clear(),this.pushRange(n)}var i=this.lx[0];return"number"==typeof t?fu(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=fu(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=m.ceil((e+r)/2);i(t[o],n)<=0?e=o:r=o-1}return e}}}(this._x,t,du)},t.prototype.join=function(){if(1===this.lx.length)return this.lx[0];var t=new S(this.length);return this.copyInternal(t,0),t},g.defineProperty(t.prototype,"length",{get:function(){return this.gx},enumerable:!1,configurable:!0}),g.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 w("Expected byteLength to be between 0 and 4 but was "+n);if(t<0||t>this.length-n)throw new w("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)*m.pow(2,8*(n-e-1));return i},t.prototype.slice=function(n,i){void 0===i&&(i=this.length);var e=hu(n,0,this.length),r=hu(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.lx[u],f=e,h=f-this._x[u];f+s.length-h<r;)o.pushRange(s,h,s.length-h),u+=1,h=(f+=s.length-h)-this._x[u],s=this.lx[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.lx.length-1,e=this.lx[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.lx[i]).length-1}else r-=1;n-=1}return this.slice(0,n+1)},t}(),wu=function(){function t(n){this.vx=n||t.BUFFER_CHUNK_SIZE,this.wx=!1,this.mx=new lu,this.ox=new S(this.vx),this.Ax=0,this.yx=0,this.ux=7}return t.prototype.closeByte=function(){this.ox[this.Ax++]=this.yx,this.Ax>=this.vx&&this.closeBuffer(),this.yx=0,this.ux=7},t.prototype.closeBuffer=function(t){void 0===t&&(t=!0),0!==this.Ax&&(this.mx.pushRange(this.ox,0,this.Ax),t&&(this.ox=new S(this.vx)),this.Ax=0)},g.defineProperty(t.prototype,"isWritingStartBit",{get:function(){return 7===this.ux},enumerable:!1,configurable:!0}),t.prototype.close=function(){if(this.wx)throw new w("Cannot close a closed BitWriter.");return this.isWritingStartBit||this.closeByte(),this.closeBuffer(!1),this.wx=!0,this.mx},t.prototype.writeBit=function(t){if(this.wx)throw new w("Cannot write to a closed BitWriter.");this.yx|=t<<this.ux,0===this.ux?this.closeByte():this.ux--},t.prototype.writeByte=function(t){if(this.wx)throw new w("Cannot write to a closed BitWriter.");this.isWritingStartBit?(this.yx=t,this.closeByte()):this.writeByteUnaligned(t)},t.prototype.writeByteUnaligned=function(t){var n=this.ux;this.yx|=cu(t,n+1),this.closeByte(),this.yx=au(t,8-n)<<n+1,this.ux=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.wx)throw new w("Cannot write to a closed BitWriter.");this.isWritingStartBit?this.writeBytesAligned(t):this.writeBytesUnaligned(t)},t.prototype.writeBytesAligned=function(t){this.Ax+t.length<=this.vx?(this.ox.set(t,this.Ax),this.Ax+=t.length,this.Ax===this.vx&&this.closeBuffer()):(this.closeBuffer(),this.mx.pushRange(t))},t.prototype.writeBytesUnaligned=function(t){if(0!==t.length){var n=this.ux;this.yx|=cu(t[0],n+1),this.closeByte();for(var i=1;i<t.length;i++){var e=au(t[i-1],8-n),r=cu(t[i],n+1);this.yx=e<<n+1|r,this.closeByte()}this.yx=au(t[t.length-1],8-n)<<n+1,this.ux=n}},t.prototype.writeUInt=function(t,n){if(t<0)throw new w("Received a negative number.");if(n>32)throw new w("The max bitlength that can be provided is 32.");if(t>=m.pow(2,n))throw new w("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 w("The max bitlength that can be provided is 32.");if(m.abs(t)>=m.pow(2,n-1))throw new w("Signed integer "+t+" cannot be represented in "+n+" bit(s).");t<0?this.writeUInt(t+m.pow(2,n),n):this.writeUInt(t,n)},t.prototype.writeExponentialGolombCode=function(t){if(t<0)throw new w("Received a negative number.");for(var n=m.floor(m.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 S(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}(),bu=function(){function t(t){this.rb=new lu,this.Mx=t}return t.prototype.closeWriter=function(){void 0!==this.Mx&&(this.rb=this.rb.concat(this.Mx.close()),this.Mx=void 0)},g.defineProperty(t.prototype,"writer",{get:function(){return void 0===this.Mx&&(this.Mx=new wu),this.Mx},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}(),gu=function(){function t(t){if(this.boxType=t,4!==t.length&&16!==t.length)throw new w("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(m.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 bu;return this.serializeCommonBoxHeader(t.writer),this.serializeBoxContent(t),t.toRangedBuffer()},t.LARGE_SIZE=m.pow(2,32),t}();function mu(t,n){return t instanceof Bn?64===n:t<m.pow(2,n)}function pu(t,n){return m.round(t*m.pow(2,n))}function yu(t,n){for(var i=0;i<n.length;i++)t.writeByte(n[i])}function _u(t,n){return t/m.pow(2,n)}var Su=function(t){function n(n,i,e){var r=t.call(this,n)||this;if(r.version=i,!mu(i,8))throw new w("the provided version cannot fit in 8 bits.");return r.flags=e,r}return su(n,t),g.defineProperty(n.prototype,"flags",{get:function(){return this.Rd},set:function(t){this.Rd=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return 4},n.prototype.serializeFlags=function(t){if("number"!=typeof this.flags)throw new w("Missing custom serializeFlags method.");t.writer.writeUInt(this.flags,24)},n.prototype.serializeBoxContent=function(t){t.writer.writeByte(this.version),this.serializeFlags(t)},n}(gu),Tu=function(t){function n(n,i){var e=t.call(this,n)||this;return e.data=i,e}return su(n,t),n.prototype.getBoxContentSize=function(){return this.data.length},n.prototype.serializeBoxContent=function(t){t.concat(lu.from(this.data))},n}(gu),Eu=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}();var Iu=16384;function ku(t){var n=t.length;if(n<=Iu)return String.fromCharCode.apply(String,t);for(var i=[],e=0;e<n;e+=Iu)i.push(String.fromCharCode.apply(String,t.slice(e,e+Iu)));return i.join("")}var Ru=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 Ou(t,n){var i=t.getUint8(n.offset);return n.shift(1),i}function Nu(t,n,i){var e=Mu(Lu(t),n.offset,n.offset+i);return n.shift(e.byteLength),e}function Pu(t,n,i){return n.offset+i<=t.byteLength}function Au(t,n,i){void 0===i&&(i=!1);var e=t.getUint32(n.offset,i);return n.shift(4),e}function Du(t,n,i){void 0===i&&(i=!1);var e=Au(t,n,i),r=Au(t,n,i),o=i?r:e,u=i?e:r;return Bn.fromBits(u,o,!0)}function Cu(t,n,i){return ku(function(t){return[].slice.call(t)}(Nu(t,n,i)))}function xu(t,n){var i,e=Ou(t,n);return 0==(128&e)?i=e:192==(224&e)?i=64*(31&e)+(63&Ou(t,n)):224==(240&e)?i=4096*(15&e)+64*(63&Ou(t,n))+(63&Ou(t,n)):240==(248&e)&&(i=262144*(7&e)+4096*(63&Ou(t,n))+64*(63&Ou(t,n))+(63&Ou(t,n))),i}function Bu(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=xu(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 ku(n)}(e)}(t,n,!0)}function Mu(t,n,i){return void 0===n&&(n=0),void 0===i&&(i=t.byteLength),new S(t.buffer,t.byteOffset+n,i-n)}function Uu(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 Lu(t){return new S(t.buffer,t.byteOffset,t.byteLength)}var Fu=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 Eu(this.offset<<3)},t}(),zu=function(){function t(t,n){this.data=t,this.cursor=n}return t.prototype.nextUint8=function(){return Ou(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 Au(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=Au(t,n,i),r=Au(t,n,i),o=i?r:e,u=i?e:r;return Bn.fromBits(u,o,!1)}(this.data,this.cursor)},t.prototype.nextUint64=function(){return Du(this.data,this.cursor)},t.prototype.nextUint8Array=function(t){return Nu(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(Au(t,n));return e}(this.data,this.cursor,t)},t.prototype.nextChars=function(t){return Cu(this.data,this.cursor,t)},t.prototype.nextUTF8String=function(){return Bu(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 Wu(t,n){return t.type===n}var qu=8;function Hu(t){var n=function(t,n){var i=[];for(;n.offset<t.byteLength;){var e=Vu(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 w("Data incomplete");return n.boxes}function Vu(t,n){var i=n.offset,e=function(t,n){var i=n.offset;if(!Pu(t,n,qu)){return{complete:!1,neededOffset:o=n.offset+qu}}var e=Au(t,n),r=Cu(t,n,4);if(1===e){if(!Pu(t,n,8)){var o=n.offset+8;return n.seek(i),{complete:!1,neededOffset:o}}e=Du(t,n).toNumber()}if("uuid"===r){if(!Pu(t,n,16)){o=n.offset+16;return n.seek(i),{complete:!1,neededOffset:o}}r=Cu(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 zu(Uu(t,i,u),new Fu(r.headerSize))};return n.seek(u),{complete:!0,box:f}}function Xu(t){return{version:t>>24,flags:new Ru(16777215&t)}}function ju(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 Yu(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 Ku(t){var n=t.nextUint32Array(9);return{a:_u(n[0],16),b:_u(n[1],16),u:_u(n[2],30),c:_u(n[3],16),d:_u(n[4],16),v:_u(n[5],30),x:_u(n[6],16),y:_u(n[7],16),w:_u(n[8],30)}}function Gu(t){return new Tu(t.type,Mu(Lu(t.data.data),t.data.cursor.offset))}var $u=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 su(n,t),g.defineProperty(n.prototype,"handlerType",{get:function(){return this.bx},set:function(t){this.bx=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}(Su);function Zu(t){var n=t.data,i=Xu(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 $u(o,u,e,r.raw)}!function(t){function n(){return t.call(this,"mdir")||this}su(n,t),n.prototype.serializeReserved=function(t){t.writer.writeString("appl"),t.writer.writeUInt(0,32),t.writer.writeUInt(0,32)}}($u);var Ju=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()},g.defineProperty(t.prototype,"tag",{get:function(){return this.Tx},set:function(t){if(!mu(t,8))throw new w("Provided tag does not fit in 8 bits.");this.Tx=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}(),Qu=(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}su(n,t),g.defineProperty(n.prototype,"objectTypeIndication",{get:function(){return this.Sx},set:function(t){if(!mu(t,8))throw new w("Provided objectTypeIndication does not fit in 8 bits.");this.Sx=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"streamType",{get:function(){return this.Nx},set:function(t){if(!mu(t,6))throw new w("Provided streamType does not fit in 6 bits.");this.Nx=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"bufferSizeDb",{get:function(){return this.Ix},set:function(t){if(!mu(t,24))throw new w("Provided bufferSizeDb does not fit in 24 bits.");this.Ix=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"maxBitrate",{get:function(){return this.Dx},set:function(t){if(!mu(t,32))throw new w("Provided maxBitrate does not fit in 32 bits.");this.Dx=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"avgBitrate",{get:function(){return this.Ex},set:function(t){if(!mu(t,32))throw new w("Provided avgBitrate does not fit in 32 bits.");this.Ex=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)}}}(Ju),function(t){function n(n,i){void 0===i&&(i={});var e=t.call(this,5,i.fixed28BitMode)||this;return e.data=n,e}su(n,t),n.prototype.getDescriptorSize=function(){return this.data.length},n.prototype.serializeDescriptorContent=function(t){t.concat(lu.from(this.data))}}(Ju),function(t){function n(n){void 0===n&&(n=!1);var i=t.call(this,6,n)||this;return i.predefined=2,i}return su(n,t),n.prototype.getDescriptorSize=function(){return 1},n.prototype.serializeDescriptorContent=function(t){t.writer.writeByte(this.predefined)},n}(Ju)),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 Qu(r.fixed28BitMode),o}su(n,t),g.defineProperty(n.prototype,"streamDependenceFlag",{get:function(){return void 0!==this.dependsOnEsId},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"urlFlag",{get:function(){return void 0!==this.urlString},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"ocrStreamFlag",{get:function(){return void 0!==this.ocrEsId},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"esId",{get:function(){return this.kx},set:function(t){if(!mu(t,16))throw new w("Provided esId does not fit in 16 bits.");this.kx=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"streamPriority",{get:function(){return this.Lx},set:function(t){if(!mu(t,5))throw new w("Provided streamPriority does not fit in 5 bits.");this.Lx=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"dependsOnEsId",{get:function(){return this.xx},set:function(t){if(t&&!mu(t,16))throw new w("Provided dependsOnEsId does not fit in 16 bits.");this.xx=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"ocrEsId",{get:function(){return this.Cx},set:function(t){if(t&&!mu(t,16))throw new w("Provided ocrEsId does not fit in 16 bits.");this.Cx=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)}}(Ju),function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n.boxes=[],n}return su(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}(gu)),ns=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return su(n,t),n.prototype.serializeBoxContent=function(t){},n.prototype.getBoxContentSize=function(){return 0},n}(ts),is=function(t){function n(n,i){var e=t.call(this,n)||this;return e.dataReferenceIndex=i,e}return su(n,t),g.defineProperty(n.prototype,"dataReferenceIndex",{get:function(){return this.jx},set:function(t){if(!mu(t,16))throw new w("Provided dataReferenceIndex does not fit in 16 bits.");this.jx=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}(ns),es=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 su(n,t),g.defineProperty(n.prototype,"channelCount",{get:function(){return this.Ox},set:function(t){if(!mu(t,16))throw new w("Provided channelCount does not fit in 16 bits.");this.Ox=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"sampleSize",{get:function(){return this.Rx},set:function(t){if(!mu(t,16))throw new w("Provided sampleSize does not fit in 16 bits.");this.Rx=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"sampleRate",{get:function(){return this.Px},set:function(t){if(!mu(pu(t,16),32))throw new w("Provided rate does not fit in 32 bits (fixed 16.16).");this.Px=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(pu(this.sampleRate,16),32),this.extra&&yu(n.writer,this.extra)},n}(is),rs=(function(t){function n(n){var i=t.call(this,"stco",0,0)||this;return i.entries=n,i}su(n,t),g.defineProperty(n.prototype,"entries",{get:function(){return this.zx},set:function(t){if(!mu(t.length,32))throw new w("Number of allowed entries cannot fit in 32 bits.");if(t.some((function(t){return!mu(t,32)})))throw new w("Not all entries can be represented in 32 bits.");this.zx=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)}}}(Su),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}su(n,t),g.defineProperty(n.prototype,"cleanApertureWidthN",{get:function(){return this.Bx},set:function(t){if(!mu(t,32))throw new w("Provided cleanApertureWidthN does not fit in 32 bits.");this.Bx=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"cleanApertureWidthD",{get:function(){return this.Ux},set:function(t){if(!mu(t,32))throw new w("Provided cleanApertureWidthD does not fit in 32 bits.");this.Ux=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"cleanApertureHeightN",{get:function(){return this.Qx},set:function(t){if(!mu(t,32))throw new w("Provided cleanApertureHeightN does not fit in 32 bits.");this.Qx=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"cleanApertureHeightD",{get:function(){return this.Fx},set:function(t){if(!mu(t,32))throw new w("Provided cleanApertureHeightD does not fit in 32 bits.");this.Fx=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"horizOffN",{get:function(){return this.Yx},set:function(t){if(!mu(t,32))throw new w("Provided horizOffN does not fit in 32 bits.");this.Yx=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"horizOffD",{get:function(){return this.Gx},set:function(t){if(!mu(t,32))throw new w("Provided horizOffD does not fit in 32 bits.");this.Gx=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"vertOffN",{get:function(){return this.Vx},set:function(t){if(!mu(t,32))throw new w("Provided vertOffN does not fit in 32 bits.");this.Vx=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"vertOffD",{get:function(){return this.Wx},set:function(t){if(!mu(t,32))throw new w("Provided vertOffD does not fit in 32 bits.");this.Wx=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)}}(gu),function(t){function n(n,i){var e=t.call(this,"ctts",n,0)||this;return e.entries=i,e}su(n,t),g.defineProperty(n.prototype,"entries",{get:function(){return this.zx},set:function(t){if(!mu(t.length,32))throw new w("Number of allowed entries cannot fit in 32 bits.");if(t.some((function(t){return!mu(t.sampleCount,32)||!mu(t.sampleOffset,32)})))throw new w("Not all entries can be represented in 64 bits.");this.zx=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)}}}(Su),function(t){function n(n){var i=t.call(this,"url ",0,void 0===n?1:0)||this;return i.location=n,i}su(n,t),g.defineProperty(n.prototype,"location",{get:function(){return this.Hx},set:function(t){this.flags=void 0===t?1:0,this.Hx=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))}}(Su),function(t){function n(n,i,e){var r=t.call(this,"urn ",0,e)||this;return r.name=n,r.location=i,r}su(n,t),g.defineProperty(n.prototype,"location",{get:function(){return this.Hx},set:function(t){if(1&this.flags)throw new w("The moov containment flag is set, a DataEntryUrlBox should be used instead.");this.Hx=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))}}(Su),function(t){function n(){return t.call(this,"dinf")||this}su(n,t)}(ns),function(t){function n(n,i,e){var r=t.call(this,n)||this;if(r.version=i,!mu(i,8))throw new w("the provided version cannot fit in 8 bits.");return r.flags=e,r}return su(n,t),g.defineProperty(n.prototype,"flags",{get:function(){return this.Rd},set:function(t){this.Rd=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return 4},n.prototype.serializeFlags=function(t){if("number"!=typeof this.flags)throw new w("Missing custom serializeFlags method.");t.writer.writeUInt(this.flags,24)},n.prototype.serializeBoxContent=function(t){t.writer.writeByte(this.version),this.serializeFlags(t)},n}(ts)),os=(function(t){function n(){return t.call(this,"dref",0,0)||this}su(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)}}(rs),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 su(n,t),g.defineProperty(n.prototype,"bitSize",{get:function(){return 0===this.version?32:64},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"entries",{get:function(){return this.zx},set:function(t){for(var n=0,i=t;n<i.length;n++){var e=i[n];if(!mu(e.segmentDuration,this.bitSize))throw new w("SegmentDuration of one of the entries does not fit in ".concat(this.bitSize," bits."));if(!mu(e.mediaTime,this.bitSize))throw new w("MediaTime of one of the entries does not fit in ".concat(this.bitSize," bits."));if(!mu(e.mediaRateInteger,16))throw new w("Provided mediaRateInteger does not fit in 16 bits.");if(e.mediaRateFraction&&!mu(e.mediaRateFraction,16))throw new w("Provided mediaRateFraction does not fit in 16 bits.")}this.zx=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}(Su)),us=function(t){function n(n,i){return void 0===i&&(i=0),t.call(this,n,0,i)||this}return su(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}(os),ss=function(t){function n(n,i){return void 0===i&&(i=0),t.call(this,n,1,i)||this}return su(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}(os);function fs(t){for(var n=t.data,i=Xu(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 us(u,r.raw):new ss(u,r.raw)}var hs=function(t){function n(){return t.call(this,"edts")||this}return su(n,t),n}(ns);function cs(t){for(var n=new hs,i=0,e=Hu(t.data);i<e.length;i++){var r=e[i];Wu(r,"elst")?n.boxes.push(fs(r)):n.boxes.push(Gu(r))}return n}var as=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 su(n,t),g.defineProperty(n.prototype,"majorBrand",{get:function(){return this.Xx},set:function(t){if(4!==t.length)throw new w("the provided major brand does not conform to the 4 character requirement");this.Xx=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"minorVersion",{get:function(){return this.Zx},set:function(t){if(!mu(t,32))throw new w("the provided minor version does not fit in 32 bits.");this.Zx=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"compatibleBrands",{get:function(){return this.qx},set:function(t){if(t.some((function(t){return 4!==t.length})))throw new w("Some of the compatible brands do not conform to the 4 character requirement");this.qx=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}(gu),vs=(function(t){function n(n,i,e){return t.call(this,"ftyp",n,i,e)||this}su(n,t)}(as),function(t){function n(n,i){void 0===i&&(i="free");var e=t.call(this,i)||this;return e.data=n,e}su(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(lu.from(this.data))}}(gu),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 su(n,t),g.defineProperty(n.prototype,"creationTime",{get:function(){return this.Kx},set:function(t){if(!mu(t,this.bitSize))throw new w("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.Kx=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"modificationTime",{get:function(){return this.Jx},set:function(t){if(!mu(t,this.bitSize))throw new w("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.Jx=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"timescale",{get:function(){return this.$x},set:function(t){if(!mu(t,32))throw new w("Provided sequence number does not fit in 32 bits.");this.$x=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"duration",{get:function(){return this.tC},set:function(t){if(!mu(t,this.bitSize))throw new w("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.tC=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"language",{get:function(){return this.iC},set:function(t){if(!bs(t))throw new w("Expected an ISO-639-2/T language code");this.iC=t},enumerable:!1,configurable:!0}),g.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}(Su)),ds=function(t){function n(n,i,e){return void 0===e&&(e=0),t.call(this,n,i,0,e)||this}return su(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}(vs),ls=function(t){function n(n,i,e){return void 0===e&&(e=0),t.call(this,n,i,1,e)||this}return su(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}(vs);function ws(t){var n=t.data,i=Xu(n.nextUint32()),e=i.version,r=i.flags,o=ju(n,e),u=new vu(lu.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 bs(h)||(h="und"),n.skip(2),0===e?new ds(o,h,r.raw):new ls(o,h,r.raw)}function bs(t){return/^[a-z]{3}$/.test(t)}var gs=function(t){function n(){return t.call(this,"mdia")||this}return su(n,t),n}(ns);function ms(t){for(var n=new gs,i=0,e=Hu(t.data);i<e.length;i++){var r=e[i];Wu(r,"mdhd")?n.boxes.push(ws(r)):Wu(r,"hdlr")?n.boxes.push(Zu(r)):n.boxes.push(Gu(r))}return n}var ps;(function(t){function n(){var n=t.call(this,"mdat")||this;return n.data=new lu,n}su(n,t),n.prototype.getBoxContentSize=function(){return this.data.length},n.prototype.serializeBoxContent=function(t){t.concat(this.data)}})(gu),function(t){function n(){return t.call(this,"minf")||this}su(n,t)}(ns),function(t){function n(n){var i=t.call(this,"meta",0,0)||this;return i.handler=n,i}su(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())}}(rs);!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"}(ps||(ps={}));var ys,_s,Ss={a:1,b:0,u:0,c:0,d:1,v:0,x:0,y:0,w:1};function Ts(t,n){n.writer.writeUInt(pu(t.a,16),32),n.writer.writeUInt(pu(t.b,16),32),n.writer.writeUInt(pu(0,30),32),n.writer.writeUInt(pu(t.c,16),32),n.writer.writeUInt(pu(t.d,16),32),n.writer.writeUInt(pu(0,30),32),n.writer.writeUInt(pu(t.x,16),32),n.writer.writeUInt(pu(t.y,16),32),n.writer.writeUInt(pu(1,30),32)}function Es(t,n){var i,e,r,o;n.writer.writeUInt(null!==(i=t.isLeading)&&void 0!==i?i:ys.UNKNOWN,2),n.writer.writeUInt(null!==(e=t.sampleDependsOn)&&void 0!==e?e:_s.UNKNOWN,2),n.writer.writeUInt(null!==(r=t.sampleIsDependedOn)&&void 0!==r?r:_s.UNKNOWN,2),n.writer.writeUInt(null!==(o=t.sampleHasRedundancy)&&void 0!==o?o:_s.UNKNOWN,2)}function Is(t,n){var i,e,r;n.writer.writeUInt(0,4),Es(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)}!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"}(ys||(ys={})),function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.YES=1]="YES",t[t.NO=2]="NO",t[t.RESERVED=3]="RESERVED"}(_s||(_s={}));var ks=function(){},Rs=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 su(n,t),g.defineProperty(n.prototype,"systemId",{get:function(){return this.eC},set:function(t){if(16!==t.length)throw new w("Provided systemId length is not 16.");this.eC=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"data",{get:function(){return this.sC},set:function(t){if(!mu(t.length,32))throw new w("Provided data length does not fit in 32 bits.");this.sC=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(lu.from(this.systemId)),this.serializeVersionBoxContent(n),n.writer.writeUInt(this.data.length,32),n.concat(lu.from(this.data))},n}(Su),Os=function(t){function n(n,i){return t.call(this,0,n,i)||this}return su(n,t),n}(Rs),Ns=function(t){function n(n,i,e){var r=t.call(this,1,n,i)||this;return r.kIds=e,r}return su(n,t),g.defineProperty(n.prototype,"kIds",{get:function(){return this.nC},set:function(t){if(!mu(t.length,32))throw new w("Provided kIds length cannot fit in 32 bits.");if(t.some((function(t){return 16!==t.length})))throw new w("Not all provided key ids are 16 bytes long.");this.nC=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(lu.from(e))}},n}(Rs);function Ps(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 Ns(i,s,e):new Os(i,s)}var As=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 su(n,t),g.defineProperty(n.prototype,"bitSize",{get:function(){return 0===this.version?32:64},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"fragmentDuration",{get:function(){return this.rC},set:function(t){if(!mu(t,this.bitSize))throw new w("The provided fragmentDuration does not fit in ".concat(this.bitSize," bits."));this.rC=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.bitSize/8},n}(Su),Ds=function(t){function n(n,i){return void 0===i&&(i=0),t.call(this,n,0,i)||this}return su(n,t),n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.fragmentDuration,32)},n}(As),Cs=function(t){function n(n,i){return void 0===i&&(i=0),t.call(this,n,1,i)||this}return su(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}(As);function xs(t){var n=t.data,i=Xu(n.nextUint32()),e=i.version,r=i.flags;return 0===e?new Ds(n.nextUint32(),r.raw):new Cs(n.nextUint64(),r.raw)}var Bs=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 su(n,t),g.defineProperty(n.prototype,"trackId",{get:function(){return this.oC},set:function(t){if(!mu(t,32))throw new w("Provided track id does not fit in 32 bits.");this.oC=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"defaultSampleDescriptionIndex",{get:function(){return this.hC},set:function(t){if(!mu(t,32))throw new w("Provided default sample description index does not fit in 32 bits.");this.hC=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"defaultSampleDuration",{get:function(){return this.aC},set:function(t){if(!mu(t,32))throw new w("Provided default sample duration does not fit in 32 bits.");this.aC=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"defaultSampleSize",{get:function(){return this.uC},set:function(t){if(!mu(t,32))throw new w("Provided default sample size does not fit in 32 bits.");this.uC=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"defaultSampleFlags",{get:function(){return this.cC},set:function(t){if((null==t?void 0:t.samplePaddingValue)&&!mu(t.samplePaddingValue,3))throw new w("Provided sample padding value does not fit in 3 bits.");if((null==t?void 0:t.sampleDegradationPriority)&&!mu(t.sampleDegradationPriority,16))throw new w("Provided sample degradation priority does not fit in 16 bits.");this.cC=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),Is(null!==(i=this.defaultSampleFlags)&&void 0!==i?i:{},n)},n}(Su);function Ms(t){var n=t.data,i=Xu(n.nextUint32()),e=i.version,r=i.flags,o=n.nextUint32(),u=n.nextUint32(),s=n.nextUint32(),f=n.nextUint32(),h=Yu(new vu(lu.from(n.nextUint8Array(4))));return new Bs(o,{sampleDescriptionIndex:u,sampleDuration:s,sampleSize:f,sampleFlags:h},e,r.raw)}var Us=function(t){function n(){return t.call(this,"mvex")||this}return su(n,t),n}(ns);function Ls(t){for(var n=new Us,i=0,e=Hu(t.data);i<e.length;i++){var r=e[i];Wu(r,"mehd")?n.boxes.push(xs(r)):Wu(r,"trex")?n.boxes.push(Ms(r)):n.boxes.push(Gu(r))}return n}var Fs=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:Ss,c.lC=e,c}return su(n,t),g.defineProperty(n.prototype,"bitSize",{get:function(){return 0===this.version?32:64},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"creationTime",{get:function(){return this.Kx},set:function(t){if(!mu(t,this.bitSize))throw new w("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.Kx=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"modificationTime",{get:function(){return this.Jx},set:function(t){if(!mu(t,this.bitSize))throw new w("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.Jx=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"timescale",{get:function(){return this.$x},set:function(t){if(!mu(t,32))throw new w("Provided sequence number does not fit in 32 bits.");this.$x=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"duration",{get:function(){return this.tC},set:function(t){if(!mu(t,this.bitSize))throw new w("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.tC=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"rate",{get:function(){return this.dC},set:function(t){if(!mu(pu(t,16),32))throw new w("Provided rate does not fit in 32 bits (fixed 16.16).");this.dC=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"volume",{get:function(){return this.fC},set:function(t){if(!mu(pu(t,8),16))throw new w("Provided volume does not fit in 16 bits (fixed 8.8).");this.fC=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"matrix",{get:function(){return this._C},set:function(t){if(0!==t.u||0!==t.v||1!==t.w)throw new w("(u, v, w) does not match the required (0, 0, 1)");this._C=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"nextTrackId",{get:function(){return this.lC},set:function(t){if(0===t)throw new w("NextTrackId cannot be 0.");if(!mu(t,32))throw new w("NextTrackId cannot exceed 32 bits.");this.lC=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(pu(this.rate,16),32),n.writer.writeUInt(pu(this.volume,8),16),n.writer.writeUInt(0,16),n.writer.writeUInt(0,32),n.writer.writeUInt(0,32),Ts(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}(Su),zs=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 su(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}(Fs),Ws=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 su(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}(Fs);function qs(t){var n=t.data,i=Xu(n.nextUint32()),e=i.version,r=i.flags,o=ju(n,e),u=_u(n.nextUint32(),16),s=_u(n.nextUint16(),8);n.skip(2),n.skip(8);var f=Ku(n);n.skip(24);var h=n.nextUint32();return 0===e?new zs(o,h,{rate:u,volume:s,matrix:f},r.raw):new Ws(o,h,{rate:u,volume:s,matrix:f},r.raw)}var Hs=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:Ss,a}return su(n,t),g.defineProperty(n.prototype,"bitSize",{get:function(){return 0===this.version?32:64},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"creationTime",{get:function(){return this.Kx},set:function(t){if(!mu(t,this.bitSize))throw new w("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.Kx=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"modificationTime",{get:function(){return this.Jx},set:function(t){if(!mu(t,this.bitSize))throw new w("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.Jx=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"trackId",{get:function(){return this.oC},set:function(t){if(0===t)throw new w("trackId cannot be 0.");if(!mu(t,32))throw new w("trackId cannot exceed 32 bits.");this.oC=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"duration",{get:function(){return this.tC},set:function(t){if(!mu(t,this.bitSize))throw new w("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.tC=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"volume",{get:function(){return this.fC},set:function(t){if(!mu(pu(t,8),16))throw new w("Provided volume does not fit in 16 bits (fixed 8.8).");this.fC=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"width",{get:function(){return this.gC},set:function(t){if(!mu(pu(t,16),32))throw new w("Provided width does not fit in 32 bits (fixed 16.16).");this.gC=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"height",{get:function(){return this.vC},set:function(t){if(!mu(pu(t,16),32))throw new w("Provided height does not fit in 32 bits (fixed 16.16).");this.vC=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"layer",{get:function(){return this.wC},set:function(t){if(!mu(t,16))throw new w("Provided layer does not fit in 16 bits.");this.wC=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"alternateGroup",{get:function(){return this.mC},set:function(t){if(!mu(t,16))throw new w("Provided alternateGroup does not fit in 16 bits.");this.mC=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"matrix",{get:function(){return this._C},set:function(t){if(0!==t.u||0!==t.v||1!==t.w)throw new w("(u, v, w) does not match the required (0, 0, 1)");this._C=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(pu(this.volume,8),16),n.writer.writeUInt(0,16),Ts(this.matrix,n),n.writer.writeUInt(pu(this.width,16),32),n.writer.writeUInt(pu(this.height,16),32)},n}(Su),Vs=function(t){function n(n,i,e,r,o,u){return t.call(this,0,n,i,e,r,o,u)||this}return su(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}(Hs),Xs=function(t){function n(n,i,e,r,o,u){return t.call(this,1,n,i,e,r,o,u)||this}return su(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}(Hs);function js(t){var n,i,e,r,o=t.data,u=Xu(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=_u(o.nextInt16(),8);o.skip(2);var b=Ku(o),g=_u(o.nextUint32(),16),m=_u(o.nextUint32(),16);return 0===s?new Vs({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 Xs({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 Ys=function(t){function n(){return t.call(this,"trak")||this}return su(n,t),n}(ns);function Ks(t){for(var n=new Ys,i=0,e=Hu(t.data);i<e.length;i++){var r=e[i];Wu(r,"tkhd")?n.boxes.push(js(r)):Wu(r,"mdia")?n.boxes.push(ms(r)):Wu(r,"edts")?n.boxes.push(cs(r)):n.boxes.push(Gu(r))}return n}var Gs=function(t){function n(){return t.call(this,"moov")||this}return su(n,t),n}(ns);var $s=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 su(n,t),g.defineProperty(n.prototype,"bitSize",{get:function(){return 0===this.version?32:64},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"baseMediaDecodeTime",{get:function(){return this.pC},set:function(t){if(!mu(t,this.bitSize))throw new w("Provided baseMediaDecodeTime does not fit in ".concat(this.bitSize," bits."));this.pC=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.bitSize/8},n}(Su),Zs=function(t){function n(n,i){return void 0===i&&(i=0),t.call(this,n,0,i)||this}return su(n,t),n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.baseMediaDecodeTime,32)},n}($s),Js=function(t){function n(n,i){return void 0===i&&(i=0),t.call(this,n,1,i)||this}return su(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}($s);function Qs(t){var n=t.data,i=Xu(n.nextUint32()),e=i.version,r=i.flags;return 0===e?new Zs(n.nextUint32(),r.raw):new Js(n.nextUint64(),r.raw)}var tf=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 su(n,t),g.defineProperty(n.prototype,"trackId",{get:function(){return this.oC},set:function(t){if(!mu(t,32))throw new w("Provided track id does not fit in 32 bits.");this.oC=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"baseDataOffset",{get:function(){return this.AC},set:function(t){if(void 0===t&&this.flags.baseDataOffsetPresent)throw new w("The base data offset present flag is set.");if(void 0!==t&&!this.flags.baseDataOffsetPresent)throw new w("The base data offset present flag is not set.");if(t&&!mu(t,64))throw new w("Provided baseDataOffset does not fit in 32 bits.");this.AC=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"sampleDescriptionIndex",{get:function(){return this.yC},set:function(t){if(void 0===t&&this.flags.sampleDescriptionIndexPresent)throw new w("The sample description index flag is set.");if(void 0!==t&&!this.flags.sampleDescriptionIndexPresent)throw new w("The sample description index flag is not set.");if(t&&!mu(t,32))throw new w("Provided sampleDescriptionIndex does not fit in 32 bits.");this.yC=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"defaultSampleDuration",{get:function(){return this.aC},set:function(t){if(void 0===t&&this.flags.defaultSampleDurationPresent)throw new w("The default sample duration present flag is set.");if(void 0!==t&&!this.flags.defaultSampleDurationPresent)throw new w("The default sample duration present flag is not set.");if(t&&!mu(t,32))throw new w("Provided defaultSampleDuration does not fit in 32 bits.");this.aC=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"defaultSampleSize",{get:function(){return this.uC},set:function(t){if(void 0===t&&this.flags.defaultSampleSizePresent)throw new w("The default sample size present flag is set.");if(void 0!==t&&!this.flags.defaultSampleSizePresent)throw new w("The default sample size present flag is not set.");if(t&&!mu(t,32))throw new w("Provided defaultSampleSize does not fit in 32 bits.");this.uC=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"defaultSampleFlags",{get:function(){return this.cC},set:function(t){if(void 0===t&&this.flags.defaultSampleFlagsPresent)throw new w("The default sample flags present flag is set.");if(void 0!==t&&!this.flags.defaultSampleFlagsPresent)throw new w("The default sample flags present flag is not set.");if((null==t?void 0:t.samplePaddingValue)&&!mu(t.samplePaddingValue,3))throw new w("Provided sample padding value does not fit in 3 bits.");if((null==t?void 0:t.sampleDegradationPriority)&&!mu(t.sampleDegradationPriority,16))throw new w("Provided sample degradation priority does not fit in 16 bits.");this.cC=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&&Is(this.defaultSampleFlags,n)},n}(Su);function nf(t){var n=t.data,i=n.nextUint8(),e=new vu(lu.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?Yu(new vu(lu.from(n.nextUint8Array(4)))):void 0;return new tf({trackId:a,defaultBaseIsMoof:r,durationIsEmpty:o,baseDataOffset:v,sampleDescriptionIndex:d,defaultSampleDuration:l,defaultSampleSize:w,defaultSampleFlags:b},i)}var ef=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 su(n,t),g.defineProperty(n.prototype,"dataOffset",{get:function(){return this.MC},set:function(t){if(t&&!mu(t,32))throw new w("Provided data offset does not fit in 32 bits.");this.MC=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"firstSampleFlags",{get:function(){return this.bC},set:function(t){if((null==t?void 0:t.samplePaddingValue)&&!mu(t.samplePaddingValue,3))throw new w("Provided sample padding value does not fit in 3 bits.");if((null==t?void 0:t.sampleDegradationPriority)&&!mu(t.sampleDegradationPriority,16))throw new w("Provided sample degradation priority does not fit in 16 bits.");this.bC=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"samples",{get:function(){return this.TC},set:function(t){var n,i;if(!mu(t.length,32))throw new w("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 w("The sample duration present flag is set.");if(void 0!==o.duration&&!this.flags.sampleDurationPresent)throw new w("The sample duration present flag is not set.");if(o.duration&&!mu(o.duration,32))throw new w("Provided sample duration does not fit in 32 bits.");if(void 0===o.size&&this.flags.sampleSizePresent)throw new w("The sample size present flag is set.");if(void 0!==o.size&&!this.flags.sampleSizePresent)throw new w("The sample size present flag is not set.");if(o.size&&!mu(o.size,32))throw new w("Provided sample size does not fit in 32 bits.");if(void 0===o.flags&&this.flags.sampleFlagsPresent)throw new w("The sample flags present flag is set.");if(void 0!==o.flags&&!this.flags.sampleFlagsPresent)throw new w("The sample flags present flag is not set.");if((null===(n=o.flags)||void 0===n?void 0:n.samplePaddingValue)&&!mu(o.flags.samplePaddingValue,3))throw new w("Provided sample padding value does not fit in 3 bits.");if((null===(i=o.flags)||void 0===i?void 0:i.sampleDegradationPriority)&&!mu(o.flags.sampleDegradationPriority,16))throw new w("Provided sample degradation priority does not fit in 16 bits.");if(void 0===o.compositionTimeOffset&&this.flags.sampleCompositionTimeOffsetsPresent)throw new w("The sample compositionTimeOffset present flag is set.");if(void 0!==o.compositionTimeOffset&&!this.flags.sampleCompositionTimeOffsetsPresent)throw new w("The sample compositionTimeOffset present flag is not set.");if(o.compositionTimeOffset&&!mu(o.compositionTimeOffset,32))throw new w("Provided sample compositionTimeOffset does not fit in 32 bits.")}this.TC=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&&Is(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&&Is(r.flags,n),this.flags.sampleCompositionTimeOffsetsPresent&&(0===this.version?n.writer.writeUInt(r.compositionTimeOffset,32):n.writer.writeInt(r.compositionTimeOffset,32))}},n}(Su);function rf(t){var n=t.data,i=n.nextUint8(),e=new vu(lu.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=Yu(new vu(lu.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=Yu(new vu(lu.from(n.nextUint8Array(4))))),r&&(l.compositionTimeOffset=0===i?n.nextUint32():n.nextInt32()),v.push(l)}return new ef(i,a,v)}var of=function(t){function n(){return t.call(this,"traf")||this}return su(n,t),n}(ns);function uf(t){for(var n=new of,i=0,e=Hu(t.data);i<e.length;i++){var r=e[i];Wu(r,"tfhd")?n.boxes.push(nf(r)):Wu(r,"tfdt")?n.boxes.push(Qs(r)):Wu(r,"trun")?n.boxes.push(rf(r)):n.boxes.push(Gu(r))}return n}var sf=function(t){function n(){return t.call(this,"moof")||this}return su(n,t),n}(ns);!function(t){function n(n){var i=t.call(this,"mfhd",0,0)||this;return i.sequenceNumber=n,i}su(n,t),g.defineProperty(n.prototype,"sequenceNumber",{get:function(){return this.SC},set:function(t){if(!mu(t,32))throw new w("Provided sequence number does not fit in 32 bits.");this.SC=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)}}(Su);var ff=function(t){function n(n){var i=t.call(this,"frma")||this;return i.codingName=n,i}return su(n,t),g.defineProperty(n.prototype,"codingName",{get:function(){return this.NC},set:function(t){if(4!==t.length)throw new w("Provided coding name was not 4 characters long.");this.NC=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return 4},n.prototype.serializeBoxContent=function(t){t.writer.writeString(this.codingName)},n}(gu),hf=(function(t){function n(n,i){var e=t.call(this,"pasp")||this;return e.hSpacing=n,e.vSpacing=i,e}su(n,t),g.defineProperty(n.prototype,"hSpacing",{get:function(){return this.IC},set:function(t){if(!mu(t,32))throw new w("Provided hSpacing does not fit in 32 bits.");this.IC=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"vSpacing",{get:function(){return this.DC},set:function(t){if(!mu(t,32))throw new w("Provided vSpacing does not fit in 32 bits.");this.DC=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)}}(gu),function(t){function n(n,i,e){var r=t.call(this,n)||this;return r.sample=i,r.sinf=e,r}su(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())}}(ns),function(t){function n(n,i,e){var r=t.call(this,"sinf")||this;return r.schm=i,r.schi=e,r.frma=new ff(n),r}su(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())}}(gu),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 su(n,t),g.defineProperty(n.prototype,"bitSize",{get:function(){return 0===this.version?32:64},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"entries",{get:function(){return this.zx},set:function(t){var n=this;if(!mu(t.length,32))throw new w("Number of entries provided does not fit in 32 bits.");if(t.some((function(t){return!mu(t,n.bitSize)})))throw new w("Not all provided entries fit in ".concat(this.bitSize," bits."));this.zx=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"explicitAuxInfoType",{get:function(){return this.EC},set:function(t){if(void 0===t)this.flags=0;else{if(!mu(t.auxInfoType,32))throw new w("Provided auxInfoType does not fit in 32 bits.");if(!mu(t.auxInfoTypeParameter,32))throw new w("Provided auxInfoTypeParameter does not fit in 32 bits.");this.flags=1}this.EC=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}(Su)),cf=(function(t){function n(){return null!==t&&t.apply(this,arguments)||this}su(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)}}}(hf),function(t){function n(){return null!==t&&t.apply(this,arguments)||this}su(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)}}}(hf),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}su(n,t),g.defineProperty(n.prototype,"defaultSampleInfoSize",{get:function(){return this.kC},set:function(t){if(!mu(t,8))throw new w("Provided defaultSampleInfoSize does not fit in a single byte.");this.kC=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"sampleInfoSizes",{get:function(){return this.LC},set:function(t){if(!mu(t.length,32))throw new w("Number of sampleInfoSizes provided does not fit in 32 bits.");if(t.some((function(t){return!mu(t,8)})))throw new w("Not all provided sampleInfoSizes fit in a byte.");this.LC=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"explicitAuxInfoType",{get:function(){return this.EC},set:function(t){if(void 0===t)this.flags=0;else{if(!mu(t.auxInfoType,32))throw new w("Provided auxInfoType does not fit in 32 bits.");if(!mu(t.auxInfoTypeParameter,32))throw new w("Provided auxInfoTypeParameter does not fit in 32 bits.");this.flags=1}this.EC=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 w("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)}}}(Su),function(t){function n(n){var i=t.call(this,"sdtp",0,0)||this;return i.samples=n,i}su(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++){Es(e[i],n)}}}(Su),function(t){function n(n){return t.call(this,"stsd",n,0)||this}su(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)}}(rs),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 su(n,t),g.defineProperty(n.prototype,"groupingType",{get:function(){return this.xC},set:function(t){if(4!==t.length)throw new w("The provided groupingType does not equal 4 characters.");this.xC=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}(Su)),af=(function(t){function n(n,i){return t.call(this,0,n,i)||this}su(n,t),n.prototype.serializeVersionBoxContent=function(t){}}(cf),function(t){function n(n,i,e){var r=t.call(this,1,n,e)||this;return r.defaultLength=i,r}su(n,t),g.defineProperty(n.prototype,"defaultLength",{get:function(){return this.jC},set:function(t){if(!mu(t,32))throw new w("The provided defaultLength does not fit in 32 bits.");this.jC=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)}}(cf),function(t){function n(n,i,e,r){void 0===r&&(r=0);var o=this;if(n<2)throw new w("This constructor is only meant for versions 2 and up.");return(o=t.call(this,n,i,e)||this).defaultSampleDescriptionIndex=r,o}su(n,t),g.defineProperty(n.prototype,"defaultSampleDescriptionIndex",{get:function(){return this.hC},set:function(t){if(!mu(t,32))throw new w("The provided defaultSampleDescriptionIndex does not fit in 32 bits.");this.hC=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)}}(cf),function(t){function n(n){void 0===n&&(n=[]);var i=t.call(this,"stsz",0,0)||this;return i.sampleSizes=n,i}su(n,t),g.defineProperty(n.prototype,"sampleSizes",{get:function(){return this.OC},set:function(t){if(!mu(t.length,32))throw new w("Number of allowed samples cannot fit in 32 bits.");if(t.some((function(t){return!mu(t,32)})))throw new w("Not all sampleSizes can be represented in 32 bits.");this.OC=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)}}}(Su),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}su(n,t),g.defineProperty(n.prototype,"defaultSampleSize",{get:function(){return this.uC},set:function(t){if(!mu(t,32))throw new w("Provided defaultSampleSize does not fit in 32 bits.");this.uC=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"samples",{get:function(){return this.TC},set:function(t){if(!mu(t,32))throw new w("Number of allowed samples cannot fit in 32 bits.");this.TC=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)}}(Su),function(t){function n(){return t.call(this,"stbl")||this}su(n,t)}(ns),function(t){function n(n){var i=t.call(this,"stsc",0,0)||this;return i.entries=n,i}su(n,t),g.defineProperty(n.prototype,"entries",{get:function(){return this.zx},set:function(t){if(!mu(t.length,32))throw new w("Number of allowed entries cannot fit in 32 bits.");if(t.some((function(t){return!mu(t.firstChunk,32)||!mu(t.sampleDescriptionIndex,32)||!mu(t.samplesPerChunk,32)})))throw new w("Not all entries can be represented in 96 bits.");this.zx=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)}}}(Su),function(t){function n(){return t.call(this,"schi")||this}su(n,t)}(ns),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}su(n,t),g.defineProperty(n.prototype,"schemeType",{get:function(){return this.RC},set:function(t){if(4!==t.length)throw new w("The provided schemeType does not have a length of 4.");this.RC=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"schemeVersion",{get:function(){return this.zC},set:function(t){if(!mu(t,32))throw new w("The provided schemeVersion does not fit in 23 bits.");this.zC=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"schemeUri",{get:function(){return this.BC},set:function(t){if(t&&4!==t.length)throw new w("The provided schemeUri does not have a length of 4.");this.flags=void 0===t?0:1,this.BC=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))}}(Su),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 su(n,t),g.defineProperty(n.prototype,"bitSize",{get:function(){return 0===this.version?32:64},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"referenceId",{get:function(){return this.QC},set:function(t){if(!mu(t,32))throw new w("Provided referenceId does not fit in 32 bits.");this.QC=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"timescale",{get:function(){return this.$x},set:function(t){if(!mu(t,32))throw new w("Provided timescale does not fit in 32 bits.");this.$x=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"earliestPresentationTime",{get:function(){return this.FC},set:function(t){if(!mu(t,this.bitSize))throw new w("Provided earliestPresentationTime does not fit in ".concat(this.bitSize," bits."));this.FC=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"firstOffset",{get:function(){return this.YC},set:function(t){if(!mu(t,this.bitSize))throw new w("Provided timescale does not fit in ".concat(this.bitSize," bits."));this.YC=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"references",{get:function(){return this.GC},set:function(t){if(!mu(t.length,16))throw new w("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(!mu(e.referencedSize,31))throw new w("Provided referenced size does not fit in 31 bits.");if(!mu(e.subsegmentDuration,32))throw new w("Provided subsegment duration does not fit in 31 bits.");if(!mu(e.sapType,3))throw new w("Provided SAP type does not fit in 3 bits.");if(!mu(e.sapDeltaTime,28))throw new w("Provided SAP delta time does not fit in 28 bits.")}this.GC=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}(Su)),vf=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 su(n,t),n.prototype.serializeSidxBoxContent=function(t){t.writer.writeUInt(this.earliestPresentationTime,32),t.writer.writeUInt(this.firstOffset,32)},n}(af),df=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 su(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}(af);(function(t){function n(n,i,e){return t.call(this,"styp",n,i,e)||this}su(n,t)})(as),function(t){function n(n){void 0===n&&(n=0);var i=t.call(this,"smhd",0,0)||this;return i.balance=n,i}su(n,t),g.defineProperty(n.prototype,"balance",{get:function(){return this.VC},set:function(t){if(t<-1||t>1)throw new w("Provided balance does not fit in the allowed range [-1, 1].");if(!mu(pu(t,8),16))throw new w("Provided balance does not fit in 16 bits (fixed 8.8).");this.VC=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(pu(this.balance,8),16),n.writer.writeUInt(0,16)}}(Su),function(t){function n(n){var i=t.call(this,"stss",0,0)||this;return i.entries=n,i}su(n,t),g.defineProperty(n.prototype,"entries",{get:function(){return this.zx},set:function(t){if(!mu(t.length,32))throw new w("Number of allowed entries cannot fit in 32 bits.");if(t.some((function(t){return!mu(t,32)})))throw new w("Not all entries can be represented in 32 bits.");this.zx=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)}}}(Su),function(t){function n(n){var i=t.call(this,"stts",0,0)||this;return i.entries=n,i}su(n,t),g.defineProperty(n.prototype,"entries",{get:function(){return this.zx},set:function(t){if(!mu(t.length,32))throw new w("Number of allowed entries cannot fit in 32 bits.");if(t.some((function(t){return!mu(t.sampleCount,32)||!mu(t.sampleDelta,32)})))throw new w("Not all entries can be represented in 64 bits.");this.zx=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)}}}(Su),function(t){function n(n){var i=t.call(this,"trep",0,0)||this;return i.trackId=n,i}su(n,t),g.defineProperty(n.prototype,"trackId",{get:function(){return this.oC},set:function(t){if(!mu(t,32))throw new w("The provided trackId does not fit in 32 bits.");this.oC=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)}}(rs),function(t){function n(){return t.call(this,"udta")||this}su(n,t)}(ns);var lf={red:0,green:0,blue:0},wf=(function(t){function n(n,i){void 0===n&&(n=0),void 0===i&&(i=lf);var e=t.call(this,"vmhd",0,1)||this;return e.graphicsMode=n,e.opColor=i,e}su(n,t),g.defineProperty(n.prototype,"opColor",{get:function(){return this.WC},set:function(t){if(!mu(t.red,16)||!mu(t.green,16)||!mu(t.blue,16))throw new w("Not all colors could be represented in 16 bits.");this.WC=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)}}(Su),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 su(n,t),g.defineProperty(n.prototype,"width",{get:function(){return this.gC},set:function(t){if(!mu(t,16))throw new w("Provided width does not fit in 16 bits.");this.gC=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"height",{get:function(){return this.vC},set:function(t){if(!mu(t,16))throw new w("Provided height does not fit in 16 bits.");this.vC=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"horizontalResolution",{get:function(){return this.HC},set:function(t){if(!mu(pu(t,16),32))throw new w("Provided horizontalResolution does not fit in 32 bits (fixed 16.16).");this.HC=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"verticalResolution",{get:function(){return this.XC},set:function(t){if(!mu(pu(t,16),32))throw new w("Provided verticalResolution does not fit in 32 bits (fixed 16.16).");this.XC=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"compressorName",{get:function(){return this.ZC},set:function(t){if(t.length>31)throw new w("The provided compressorName should at most be 31 characters long.");this.ZC=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"frameCount",{get:function(){return this.qC},set:function(t){if(!mu(t,16))throw new w("Provided frameCount does not fit in 16 bits.");this.qC=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"depth",{get:function(){return this.KC},set:function(t){if(!mu(t,16))throw new w("Provided depth does not fit in 16 bits.");this.KC=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(pu(this.horizontalResolution,16),32),n.writer.writeUInt(pu(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&&yu(n.writer,this.extra)},n}(is)),bf=(function(t){function n(n){var i=t.call(this,"esds",0,0)||this;return i.esDescriptor=n,i}su(n,t),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+(this.esDescriptor instanceof S?this.esDescriptor.length:this.esDescriptor.getSize())},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),this.esDescriptor instanceof S?n.concat(lu.from(this.esDescriptor)):this.esDescriptor.serialize(n)}}(Su),function(t){function n(n,i,e){var r=t.call(this,"mp4a",n,e)||this;return r.esd=i,r}su(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())}}(es),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}su(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)}}(wf),function(t){function n(n,i){var e=t.call(this,"mp4s",n)||this;return e.esDescriptor=i,e}su(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)}}(is),function(t){function n(n){var i=t.call(this,"avcC")||this;return i.decoderConfig=n,i}su(n,t),n.prototype.getBoxContentSize=function(){return this.decoderConfig.getSize()},n.prototype.serializeBoxContent=function(t){this.decoderConfig.serialize(t)}}(gu),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}g.defineProperty(t.prototype,"version",{get:function(){return this.JC},set:function(t){if(!mu(t,8))throw new w("Provided version does not fit in 8 bits.");this.JC=t},enumerable:!1,configurable:!0}),g.defineProperty(t.prototype,"profileIndication",{get:function(){return this.$C},set:function(t){if(!mu(t,8))throw new w("Provided profileIndication does not fit in 8 bits.");this.$C=t},enumerable:!1,configurable:!0}),g.defineProperty(t.prototype,"profileCompatibility",{get:function(){return this.tj},set:function(t){if(!mu(t,8))throw new w("Provided profileCompatibility does not fit in 8 bits.");this.tj=t},enumerable:!1,configurable:!0}),g.defineProperty(t.prototype,"levelIndication",{get:function(){return this.ij},set:function(t){if(!mu(t,8))throw new w("Provided levelIndication does not fit in 8 bits.");this.ij=t},enumerable:!1,configurable:!0}),g.defineProperty(t.prototype,"spsSets",{get:function(){return this.ej},set:function(t){if(!mu(t.length,5))throw new w("Provided number of spsSets exceeds the max (32)");this.ej=t},enumerable:!1,configurable:!0}),g.defineProperty(t.prototype,"ppsSets",{get:function(){return this.sj},set:function(t){if(!mu(t.length,8))throw new w("Provided number of ppsSets exceeds the max (256)");this.sj=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(lu.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(lu.from(u))}}}(),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}su(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())}}(wf),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}su(n,t),g.defineProperty(n.prototype,"bufferSizeDb",{get:function(){return this.Ix},set:function(t){if(!mu(t,32))throw new w("Provided bufferSizeDb does not fit in 32 bits.");this.Ix=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"max",{get:function(){return this.nf},set:function(t){if(!mu(t,32))throw new w("Provided max does not fit in 32 bits.");this.nf=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"avg",{get:function(){return this.nj},set:function(t){if(!mu(t,32))throw new w("Provided avg does not fit in 32 bits.");this.nj=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)}}(gu),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 w("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 S(0),s}return su(n,t),g.defineProperty(n.prototype,"isProtected",{get:function(){return this.rj},set:function(t){if(!mu(t,8))throw new w("Provided isProtected does not fit in 1 byte.");this.rj=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"perSampleIvSize",{get:function(){return this.hj},set:function(t){if(![8,16].includes(t))throw new w("Provided perSampleIvSize does not match any allowed value [8, 16].");this.hj=t,this.aj=new S(0)},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"kId",{get:function(){return this.uj},set:function(t){if(16!==t.length)throw new w("Provided kId length is not 16.");this.uj=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"constantIv",{get:function(){return this.aj},set:function(t){if(![8,16].includes(t.length))throw new w("Provided constant IV length does not match any allowed value [8, 16].");this.aj=t,this.hj=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),yu(t.writer,this.kId),0===this.perSampleIvSize&&(t.writer.writeByte(this.constantIv.length),yu(t.writer,this.constantIv))},n}(Su)),gf=(function(t){function n(n){return t.call(this,0,n)||this}su(n,t)}(bf),function(t){function n(n){var i=t.call(this,1,n)||this;return i.cryptByteBlocks=n.cryptByteBlock,i.skipByteBlocks=n.skipByteBlock,i}return su(n,t),g.defineProperty(n.prototype,"cryptByteBlocks",{get:function(){return this.cj},set:function(t){if(!mu(t,4))throw new w("Provided cryptByteBlocks does not fit in 4 bits.");this.cj=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"skipByteBlocks",{get:function(){return this.lj},set:function(t){if(!mu(t,4))throw new w("Provided skipByteBlocks does not fit in 4 bits.");this.lj=t},enumerable:!1,configurable:!0}),n.prototype.serializeVersionBoxContent=function(t){t.writer.writeUInt(this.cryptByteBlocks,4),t.writer.writeUInt(this.skipByteBlocks,4)},n}(bf));!function(t){function n(n){var i=t.call(this)||this;return i.tencBox=new gf(n),i}su(n,t),n.prototype.serializeBoxContent=function(t){this.tencBox.serializeOwnContent(t)},n.prototype.getBoxContentSize=function(){return this.tencBox.getTencHeaderSize()}}(ks);function mf(t){return void 0!==t.iv}function pf(t){return void 0!==t.subsamples}(function(t){function n(n){var i=t.call(this,"senc",0,{useSubsampleEncryption:!1})||this;return i.samples=n,i}su(n,t),g.defineProperty(n.prototype,"samples",{get:function(){return this.TC},set:function(t){var n;if(!mu(t.length,32))throw new w("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(mf(r)&&![8,16].includes(r.iv.length))throw new w("IV of one of the provided samples did not satisfy the required length constraints. [8, 16]");if(void 0===n&&(n=pf(r)),!0===n&&!pf(r)||!1===n&&pf(r))throw new w("Mix of samples with and without subsamples detected.");if(pf(r)){if(!mu(r.subsamples.length,16))throw new w("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(!mu(s.clearData,16))throw new w("Subsample clearData of one of the provided samples does not fit in 16 bits.");if(!mu(s.protectedData,23))throw new w("Subsample protectedData of one of the provided samples does not fit in 23 bits.")}}}this.flags.useSubsampleEncryption=null!=n&&n,this.TC=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];mf(r)&&(n+=r.iv.length),pf(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(mf(r)&&yu(n.writer,r.iv),pf(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)}})(Su),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}su(n,t),g.defineProperty(n.prototype,"timescale",{get:function(){return this.$x},set:function(t){if(!mu(t,32))throw new w("The provided timescale does not fit in 32 bits.");this.$x=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"presentationTimeDelta",{get:function(){return this.dj},set:function(t){if(!mu(t,32))throw new w("The provided presentationTimeDelta does not fit in 32 bits.");this.dj=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"eventDuration",{get:function(){return this._j},set:function(t){if(!mu(t,32))throw new w("The provided eventDuration does not fit in 32 bits.");this._j=t},enumerable:!1,configurable:!0}),g.defineProperty(n.prototype,"id",{get:function(){return this.ES},set:function(t){if(!mu(t,32))throw new w("The provided id does not fit in 32 bits.");this.ES=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(lu.from(this.data))}}(Su),function(){function t(){this.boxes=[]}t.prototype.serialize=function(){for(var t=new bu,n=0,i=this.boxes;n<i.length;n++){var e=i[n];t.concat(e.serialize())}return t.toRangedBuffer()}}();function yf(t,n){return function(i){var e=new zu(function(t){return new DataView(t.buffer,t.byteOffset,t.byteLength)}(i),new Fu),r=function(t,n){for(var i=t.data,e=t.cursor;e.offset<i.byteLength;){var r=Vu(i,e);if(!r.complete)return;if(Wu(r.box,n))return r.box}}(e,t);if(!r)throw new w("".concat(t," box not found"));return n(r)}}yf("moov",(function(t){for(var n=new Gs,i=0,e=Hu(t.data);i<e.length;i++){var r=e[i];Wu(r,"mvhd")?n.boxes.push(qs(r)):Wu(r,"trak")?n.boxes.push(Ks(r)):Wu(r,"mvex")?n.boxes.push(Ls(r)):Wu(r,"pssh")?n.boxes.push(Ps(r)):n.boxes.push(Gu(r))}return n})),yf("sidx",(function(t){var n,i,e=t.data,r=Xu(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 vu(lu.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 vf(s,f,n,i,c,u.raw):new df(s,f,n,i,c,u.raw)})),yf("moof",(function(t){for(var n=new sf,i=0,e=Hu(t.data);i<e.length;i++){var r=e[i];Wu(r,"traf")?n.boxes.push(uf(r)):Wu(r,"pssh")?n.boxes.push(Ps(r)):n.boxes.push(Gu(r))}return n}));var _f=yf("pssh",Ps),Sf=function(t){function n(n,i){var e;(e=t.call(this)||this).mj=n,e.Fw=i,e.Mj=!1,e.Ij=function(){e.Sj()},e.Dj=function(t){e.yo(new Jo(e,t.messageType,eu(e.Fw,t.message)))},e.Ej=function(){e.Mj=!0,e.Aj.jp>0&&(e.Aj.ZL(),e.yo(new Zo(e))),e.mj.removeEventListener("keystatuseschange",e.Ij),e.mj.removeEventListener("message",e.Dj)},e.mj.addEventListener("keystatuseschange",e.Ij),e.mj.addEventListener("message",e.Dj),e.Aj=new nu;var r=[];return e.mj.closed&&r.push(Z.resolve(e.mj.closed)),e.bj=new iu,r.push(e.bj.$L),e.vj=Z.race(r).then(e.Ej,e.Ej),e.Sj(),e}Dt(n,t);var i=n.prototype;return i.Ws=function(){if(this.Mj)return this.vj;var t=[];return t.push(Z.resolve(this.mj.close())),t.push(un(1e3)),this.bj.e_(Z.race(t).catch(Tf)),this.Mj=!0,this.vj},i.Tj=function(t,n,i){if(ji.Ak){var e=_f(di(n));if(1===e.version)n=new Os(e.systemId,e.data).serialize().join()}return Z.resolve(this.mj.generateRequest(t,n)).catch(Tf)},i.$n=function(t){return Z.resolve(this.mj.load(t)).catch(Tf)},i.SS=function(){return Z.resolve(this.mj.remove()).catch(Tf)},i.Yn=function(t){return Z.resolve(this.mj.update(t)).catch(Tf)},i.Sj=function(){var t=this;this.Aj.ZL(),this.mj.keyStatuses.forEach((function(n,i){t.Nj(i,n)})),this.yo(new Zo(this))},i.Nj=function(t,n){if("string"==typeof t){var i=t;t=n,n=i}var e=di(t);if(this.Fw===Do&&16===e.byteLength){var r=ai(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.Fw===Do&&"status-pending"===n&&(n="usable"),this.Aj.XL(e,n)},Nt(n,[{key:"gj",get:function(){return this.vj}},{key:"wj",get:function(){return this.mj.expiration}},{key:"pj",get:function(){return this.Aj}},{key:"yj",get:function(){return this.mj.sessionId}}]),n}(yi);function Tf(t){var n;if(t.message){var i=t.message.match(/^SystemCode:0x([0-9a-fA-F]+)$/);i&&(n=0|p(i[1],16))}throw new ou(t.message,void 0,n,t)}var Ef=function(){function t(t,n,i){this.xj=t,this.Qw=n,this.sd=i}var n=t.prototype;return n.Lj=function(t){var n=this;return ut((function(){return st(this,(function(i){return[2,new Sf(n.xj.createSession(t),n.Qw)]}))}))()},n.Cj=function(t){return Z.resolve(this.xj.setServerCertificate(t))},n.bn=function(t){return Z.resolve(t.setMediaKeys(this.xj))},n.jj=function(t){return Z.resolve(t.setMediaKeys(null))},n.tr=function(){return Z.resolve()},t}(),If=function(){function t(t,n,i){this.Oj=t,this.Fw=n,this.Pj=i}var n=t.prototype;return n.Rj=function(){var t=this;return ut((function(){var n;return st(this,(function(i){switch(i.label){case 0:return[4,t.Oj.createMediaKeys()];case 1:return n=i.sent(),[2,new Ef(n,t.Fw,t.Pj)]}}))}))()},n.zj=function(){return this.Pj},Nt(t,[{key:"Qw",get:function(){return this.Oj.keySystem}}]),t}();function kf(t){var n=t.trim(),i=n.indexOf(";");return i<0?n:n.substr(0,i).trim()}function Rf(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,Hj:e.Hj},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 Of(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 Of(t,n,i,e)})),u=!0,o.videoCapabilities.length&&(r=!0))}return u||(r=t(i,"video/mp4")),r?o:void 0}}function Of(t,n,i,e){return!!e.contentType&&(!(e.encryptionScheme&&!St(n,e.encryptionScheme))&&(!e.robustness&&t(i,kf(e.contentType))))}function Nf(t){if(t.videoCapabilities)for(var n=0,i=t.videoCapabilities;n<i.length;n++){var e=i[n];if(e.contentType)return e.contentType}if(t.audioCapabilities)for(var r=0,o=t.audioCapabilities;r<o.length;r++){var u=o[r];if(u.contentType)return u.contentType}}function Pf(t){for(var n=[],i=0;i<t.length;i++){var e=t[i];e.encryptionScheme&&n.push({contentType:e.contentType,robustness:e.robustness})}return t.concat(n)}function Af(t){return!(!t.audioCapabilities||!t.audioCapabilities.some(Df))||!(!t.videoCapabilities||!t.videoCapabilities.some(Df))}function Df(t){return!t.robustness}function Cf(t,n){for(var i=[],e=0;e<t.length;e++){var r=t[e];r.robustness?i.push(r):i.push(No({},r,{robustness:n}))}return i}var xf=function(){function t(){}return t.prototype.Fj=function(t,n){return ut((function(){var i,e,r,o,u,s,f;return st(this,(function(h){switch(h.label){case 0:for(n=n.filter((function(t){return!t.Hj})),i=0;i<n.length;i++)(e=n[i]).audioCapabilities&&(e.audioCapabilities=Pf(e.audioCapabilities)),e.videoCapabilities&&(e.videoCapabilities=Pf(e.videoCapabilities));if(t!==Bo||!n.some(Af))return[3,4];r=n.map((function(t){return function(t,n){return No({},t,{videoCapabilities:t.videoCapabilities?Cf(t.videoCapabilities,n):void 0,audioCapabilities:t.audioCapabilities?Cf(t.audioCapabilities,n):void 0})}(t,"SW_SECURE_CRYPTO")})),h.label=1;case 1:return h.trys.push([1,3,,4]),[4,c.requestMediaKeySystemAccess(t,r)];case 2:return o=h.sent(),u=o.getConfiguration(),[2,new If(o,t,u)];case 3:return h.sent(),[3,4];case 4:return[4,c.requestMediaKeySystemAccess(t,n)];case 5:return s=h.sent(),f=s.getConfiguration(),[2,new If(s,t,f)]}}))}))()},t.Xj=function(){return void 0!==c&&"function"==typeof c.requestMediaKeySystemAccess},t}(),Bf=function(t){function n(n,i){var e;return(e=t.call(this)||this).iO=n,e.eO=i,e.Mj=!1,e.oO=void 0,e.$j=void 0,e.Zj=void 0,e.Ej=function(){e.Mj=!0,e.qj.qL(void 0),e.Zj&&(e.Zj.removeEventListener("mskeyclose",e.Ej),e.Zj.removeEventListener("mskeymessage",e.sO),e.Zj.removeEventListener("mskeyerror",e.Ss),e.Zj.removeEventListener("mskeyadded",e.nO))},e.sO=function(t){e.$j&&(e.$j.qL(void 0),e.$j=void 0),e.yo(new Jo(e,"license-request",li(t.message).buffer,t.destinationURL||void 0))},e.Ss=function(){var t=e.Zj&&e.Zj.error;if(t){var n=new ou("Unknown CDM error",t.code,t.systemCode);if(e.$j)e.$j.KL(n),e.$j=void 0;else if(e.oO)e.oO.KL(n),e.oO=void 0;else switch(n.tx){case MSMediaKeyError.MS_MEDIA_KEYERR_OUTPUT:case MSMediaKeyError.MS_MEDIA_KEYERR_HARDWARECHANGE:e.rO("output-not-allowed");break;default:e.rO("internal-error")}}},e.nO=function(){e.$j&&(e.rO("usable"),e.$j.qL(void 0),e.$j=void 0),e.oO&&(e.rO("usable"),e.oO.qL(void 0),e.oO=void 0)},e.qj=new iu,e.Kj=new nu,e}Dt(n,t);var i=n.prototype;return i.Tj=function(t,n,i){var e=this;return ut((function(){return st(this,(function(t){switch(t.label){case 0:return e.Jj(),e.$j=new iu,e.Lj(di(n),i),[4,e.$j.$L];case 1:return t.sent(),[2]}}))}))()},i.Lj=function(t,n){if(!t)throw new b("Expected initData to be defined but was "+t+".");var i,e=n&&n.playready&&n.playready.tO;return(i=n?this.iO.createSession(this.eO,t,e):this.iO.createSession(this.eO,t)).addEventListener("mskeyclose",this.Ej),i.addEventListener("mskeymessage",this.sO),i.addEventListener("mskeyerror",this.Ss),i.addEventListener("mskeyadded",this.nO),this.Zj=i,this.rO("status-pending"),i},i.$n=function(t){var n=this;return ut((function(){return st(this,(function(t){return n.Jj(),[2,!0]}))}))()},i.Yn=function(t){var n=this;return ut((function(){var i;return st(this,(function(e){switch(e.label){case 0:if(n.oO=new iu,n.Jj(),!n.Zj)return[2,Z.resolve()];if(0===(i=di(t)).byteLength)throw new b("Cannot call update with an empty response.");return n.Zj.update(i),[4,n.oO.$L];case 1:return e.sent(),[2]}}))}))()},i.Ws=function(){return!this.Mj&&this.Zj&&(this.Mj=!0,this.Zj.close()),this.qj.$L},i.SS=function(){var t=this;return ut((function(){return st(this,(function(n){return t.Jj(),[2]}))}))()},i.Jj=function(){if(this.Mj)throw new b("Already closing or closed.")},i.rO=function(t){this.Kj.ZL(),this.Kj.XL(tu,t),this.yo(new Zo(this))},Nt(n,[{key:"yj",get:function(){return this.Zj&&this.Zj.sessionId||""}},{key:"wj",get:function(){return NaN}},{key:"gj",get:function(){return this.qj.$L}},{key:"pj",get:function(){return this.Kj}}]),n}(yi),Mf=function(){function t(t,n,i){this.iO=t,this.Qw=n,this.sd=i;var e=Nf(i)||"video/mp4";this.eO=kf(e)}var n=t.prototype;return n.Lj=function(t){var n=this;return ut((function(){return st(this,(function(t){return[2,new Bf(n.iO,n.eO)]}))}))()},n.Cj=function(t){return Z.resolve(!1)},n.bn=function(t){var n=this,i=function(){t.msSetMediaKeys(n.iO),t.removeEventListener("loadedmetadata",i)};return t.readyState>=1?t.msSetMediaKeys(this.iO):t.addEventListener("loadedmetadata",i),Z.resolve()},n.jj=function(t){return Z.resolve()},n.tr=function(){return Z.resolve()},t}(),Uf=function(){function t(t,n){this.Fw=t,this.hO=n}var n=t.prototype;return n.zj=function(){return this.hO},n.Rj=function(){var t=new io.MSMediaKeys(this.Fw);return Z.resolve(new Mf(t,this.Fw,this.hO))},Nt(t,[{key:"Qw",get:function(){return this.Fw}}]),t}(),Lf=function(){function t(){}return t.prototype.Fj=function(t,n){try{return Z.resolve(function(t,n){if(!Ff())throw new b("Unsupported key system "+t);for(var i=0;i<n.length;i++){var e=n[i],r=Rf(zf,Go,t,e);if(r)return new Uf(t,r)}throw new b("Unsupported key system configuration for "+t)}(t,n))}catch(t){return Z.reject(t)}},t.Xj=function(){return Ff()},t}();function Ff(){return void 0!==io.MSMediaKeys&&"function"==typeof io.MSMediaKeys.isTypeSupported}function zf(t,n){return io.MSMediaKeys.isTypeSupported(t,n)}var Wf=function(t){function n(n,i,e){var r;return(r=t.call(this)||this).lO=n,r.eO=i,r.cO=e,r.qj=new iu,r.fO=void 0,r.Kj=new nu,r.aO=void 0,r.dO=new iu,r.Ss=function(){var t=r.aO&&r.aO.error;if(t){var n=new ou("Unknown CDM error",t.code,t.systemCode);r.fO?(r.fO.KL(n),r.fO=void 0):n.tx===WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT?r.rO("output-not-allowed"):r.rO("internal-error"),r.yo(new Qo)}},r.sO=function(t){r.yo(new Jo(r,"license-request",li(t.message).buffer,"this is a test string"===t.destinationURL?void 0:t.destinationURL))},r.nO=function(){r.fO&&(r.fO.qL(void 0),r.fO=void 0),r.rO("usable")},r}Dt(n,t);var i=n.prototype;return i.Tj=function(t,n,i){var e=i&&i.fairplay&&i.fairplay.uO;if(!e)throw new b("Expected FairPlay contentId to be defined but was "+e+".");var r=function(t,n,i){var e=hi(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 bi;return ui(s,f,r,!0),si(s,f,e,!0),ui(s,f,o,!0),si(s,f,n,!0),ui(s,f,i.byteLength,!0),function(t,n,i){vi(t).set(vi(i),n.Lu),n.ep(i.byteLength)}(s,f,i),new S(u)}(di(n),e,this.cO);return this.aO=this.lO.createSession(this.eO,r),this.aO.addEventListener("webkitkeymessage",this.sO,!1),this.aO.addEventListener("webkitkeyadded",this.nO,!1),this.aO.addEventListener("webkitkeyerror",this.Ss,!1),this.rO("status-pending"),this.dO.qL(this.aO),this.dO=new iu,Z.resolve()},i.$n=function(t){return Z.resolve(!0)},i.Yn=function(t){var n=this;return ut((function(){var i,e;return st(this,(function(r){switch(r.label){case 0:if(0===(i=di(t)).byteLength)throw new b("Cannot call update with an empty response.");return n.fO=new iu,(e=n.aO)?[3,2]:[4,n.dO.$L];case 1:e=r.sent(),r.label=2;case 2:return e.update(i),[4,n.fO.$L];case 3:return r.sent(),[2]}}))}))()},i.Ws=function(){var t,n=this.aO;return n&&(n.removeEventListener("webkitkeymessage",this.sO,!1),n.removeEventListener("webkitkeyadded",this.nO,!1),n.removeEventListener("webkitkeyerror",this.Ss,!1),n.close()),this.dO.i_(),null==(t=this.fO)||t.i_(),this.qj.qL(void 0),this.qj.$L},i.SS=function(){return Z.resolve(void 0)},i.rO=function(t){this.Kj.ZL(),this.Kj.XL(tu,t),this.yo(new Zo(this))},Nt(n,[{key:"yj",get:function(){return this.aO?this.aO.sessionId:""}},{key:"wj",get:function(){return NaN}},{key:"gj",get:function(){return this.qj.$L}},{key:"pj",get:function(){return this.Kj}}]),n}(yi);var qf=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.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}({}),Hf=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=m.floor(n/1e3);if(i in t)return i;throw new b("Invalid error code: "+n)}}(Hf||(Hf={}));var Vf=function(t){function n(n,i,e){var r;return(r=t.call(this,i,e)||this).code=n,r}return Dt(n,t),Nt(n,[{key:"name",get:function(){return"THEOplayerError"}},{key:"category",get:function(){return Hf.fromCode(this.code)}}]),n}(Jt),Xf=function(){function t(t,n,i){this.lO=t,this.Qw=n,this.sd=i,this.cO=void 0;var e=Nf(i)||"video/mp4";this.eO=kf(e)}var n=t.prototype;return n.getInternalMediaKeys=function(){return this.lO},n.Lj=function(t){var n=this;return ut((function(){return st(this,(function(t){if(!n.cO)throw new Vf(qf.CONTENT_PROTECTION_CERTIFICATE_ERROR,"No valid certificate was provided.");return[2,new Wf(n.lO,n.eO,n.cO)]}))}))()},n.Cj=function(t){return this.cO=di(t),Z.resolve(!0)},n.bn=function(t){return t.webkitSetMediaKeys(this.lO),Z.resolve()},n.jj=function(t){return t.webkitSetMediaKeys(null),Z.resolve()},n.tr=function(){return Z.resolve()},t}(),jf=function(){function t(t,n){this.Fw=t,this.hO=n}var n=t.prototype;return n.zj=function(){return this.hO},n.Rj=function(){var t=new io.WebKitMediaKeys(this.Fw);return Z.resolve(new Xf(t,this.Fw,this.hO))},Nt(t,[{key:"Qw",get:function(){return this.Fw}}]),t}(),Yf=function(){function t(){}return t.prototype.Fj=function(t,n){try{return Z.resolve(function(t,n){if(t!==zo)throw new b(t+" is not supported with webkit-prefixed Encrypted Media Extensions.");if(!Kf())throw new b("Unsupported key system "+t);for(var i=0;i<n.length;i++){var e=n[i],r=Rf(Gf,$o,t,e);if(r)return new jf(t,r)}throw new b("Unsupported key system configuration for "+t)}(t,n))}catch(t){return Z.reject(t)}},t.Xj=function(){return Kf()},t}();function Kf(){return void 0!==io.WebKitMediaKeys&&"function"==typeof io.WebKitMediaKeys.isTypeSupported}function Gf(t,n){return io.WebKitMediaKeys.isTypeSupported(t,n)}var $f,Zf=function(){function t(t){this._O=t}return t.prototype.Fj=function(t,n){var i=this;return ut((function(){var e,r,o;return st(this,(function(u){switch(u.label){case 0:e=0,r=i._O,u.label=1;case 1:if(!(e<r.length))return[3,6];o=r[e],u.label=2;case 2:return u.trys.push([2,4,,5]),[4,o.Fj(t,n)];case 3:return[2,u.sent()];case 4:return u.sent(),[3,5];case 5:return e++,[3,1];case 6:throw new b("Unsupported key system configuration for "+t)}}))}))()},t}(),Jf=new sn,Qf=function(t){function n(n){var i;return(i=t.call(this)||this).Fw=n,i.$j=void 0,i.fO=void 0,i.wx=!1,i.xO=void 0,i.DO=void 0,i.qj=new iu,i.LO="",i.EO=new iu,i.kO=new nu,i}Dt(n,t);var i=n.prototype;return i.bO=function(){this.fO&&(this.rO("usable"),this.fO.qL(void 0),this.fO=void 0)},i.TO=function(t){var n=new ou("Unknown CDM error",t.errorCode,t.systemCode);this.fO?(this.fO.KL(n),this.fO=void 0):this.$j?(this.$j.KL(n),this.$j=void 0):n.tx===WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT?this.rO("output-restricted"):1===n.ix?this.rO("expired"):this.rO("internal-error")},i.SO=function(t){0!==t.message.byteLength?(this.$j&&(this.$j.qL(void 0),this.$j=void 0),this.yo(new Jo(this,"license-request",eu(this.Fw,li(t.message).buffer),t.defaultURL||void 0))):this.$j&&(this.$j.KL("Empty key message"),this.$j=void 0)},i.IO=function(t){this.DO||(this.DO=t,this.EO.qL(t))},i.Ws=function(){var t=this;return ut((function(){return st(this,(function(n){return t.throwIfClosed(),t.fO&&(t.fO.KL(void 0),t.fO=void 0),t.wx=!0,t.qj.qL(void 0),[2]}))}))()},i.Tj=function(t,n){var i=this;return ut((function(){var t;return st(this,(function(e){switch(e.label){case 0:return i.throwIfClosed(),i.$j=new iu,i.xO=di(n),(t=i.DO)?[3,2]:[4,i.EO.$L];case 1:t=e.sent(),e.label=2;case 2:return t.webkitGenerateKeyRequest(i.Fw,i.xO),[4,i.$j.$L];case 3:return e.sent(),[2]}}))}))()},i.$n=function(t){var n=this;return ut((function(){return st(this,(function(t){return n.throwIfClosed(),[2,!1]}))}))()},i.SS=function(){var t=this;return ut((function(){return st(this,(function(n){return t.throwIfClosed(),[2]}))}))()},i.Yn=function(t){var n=this;return ut((function(){return st(this,(function(i){switch(i.label){case 0:return n.throwIfClosed(),n.fO=new iu,ji.Qk||ji.Pk?[2,Jf.gO(ut((function(){return st(this,(function(i){switch(i.label){case 0:return[4,n.doUpdate(t)];case 1:return i.sent(),[2]}}))})))]:[4,n.doUpdate(t)];case 1:return i.sent(),[2]}}))}))()},i.doUpdate=function(t){var n=this;return ut((function(){var i;return st(this,(function(e){switch(e.label){case 0:return void 0===n.fO?[2]:(i=n.DO)?[3,2]:[4,n.EO.$L];case 1:i=e.sent(),e.label=2;case 2:return i.webkitAddKey(n.Fw,di(t),n.xO,n.yj),[4,n.fO.$L];case 3:return e.sent(),ji.Pk?[4,un(500)]:[3,5];case 4:e.sent(),e.label=5;case 5:return[2]}}))}))()},i.throwIfClosed=function(){if(this.wx)throw new b("Already closing or closed.")},i.rO=function(t){this.kO.ZL(),this.kO.XL(tu,t),this.yo(new Zo(this))},i.CO=function(){var t=this;return ut((function(){var n,i;return st(this,(function(e){switch(e.label){case 0:return(i=t.DO)?[3,2]:[4,t.EO.$L];case 1:i=e.sent(),e.label=2;case 2:if(!(n=i).webkitCancelKeyRequest)return[3,7];e.label=3;case 3:return e.trys.push([3,4,5,7]),n.webkitCancelKeyRequest(t.Fw,t.LO),[3,7];case 4:return e.sent(),[3,7];case 5:return[4,un(500)];case 6:return e.sent(),[7];case 7:return[2]}}))}))()},Nt(n,[{key:"pj",get:function(){return this.kO}},{key:"yj",get:function(){return this.LO},set:function(t){this.LO=t}},{key:"gj",get:function(){return this.qj.$L}},{key:"wj",get:function(){return NaN}}]),n}(yi),th=function(){function t(t,n){var i=this;this.Qw=t,this.sd=n,this.DO=void 0,this.RO=Bt(),this.PO=[],this.nO=function(t){var n=i.zO(t.sessionId);n&&n.bO()},this.jO=function(t){var n=i.zO(t.sessionId);n&&n.TO(t)},this.OO=function(t){var n=i.zO(t.sessionId);n&&n.SO(t)}}var n=t.prototype;return n.bn=function(t){return this.DO=t,this.DO.addEventListener("webkitkeyadded",this.nO),this.DO.addEventListener("webkitkeyerror",this.jO),this.DO.addEventListener("webkitkeymessage",this.OO),this.RO.forEach((function(n,i){return n.IO(t)})),this.PO.forEach((function(n){return n.IO(t)})),Z.resolve()},n.jj=function(t){return t.removeEventListener("webkitkeyadded",this.nO),t.removeEventListener("webkitkeyerror",this.jO),t.removeEventListener("webkitkeymessage",this.OO),this.DO=void 0,Z.resolve()},n.tr=function(){var t=this;return ut((function(){var n,i;return st(this,(function(e){switch(e.label){case 0:n=t.RO.entries(),i=n.next(),e.label=1;case 1:return i.done?[3,3]:[4,i.value[1].CO()];case 2:return e.sent(),i=n.next(),[3,1];case 3:return t.RO.clear(),[2]}}))}))()},n.Lj=function(t,n,i){var e=this;return ut((function(){var t;return st(this,(function(n){return t=new Qf(e.Qw),e.DO&&t.IO(e.DO),e.PO.push(t),[2,t]}))}))()},n.Cj=function(t){return Z.resolve(!1)},n.zO=function(t){if(t){var n=this.RO.get(t);return n||((n=this.PO.shift())?(n.yj=t,this.RO.set(t,n),n):void 0)}},t}(),nh=function(){function t(t,n){this.Qw=t,this.BO=n}var n=t.prototype;return n.Rj=function(){return Z.resolve(new th(this.Qw,this.BO))},n.zj=function(){return this.BO},t}(),ih=function(){function t(){}return t.prototype.Fj=function(t,n){try{return Z.resolve(function(t,n){if(!ih.Xj())throw new b("Unsupported key system "+t);for(var i=0;i<n.length;i++){var e=n[i],r=Rf(eh,Go,t,e);if(r)return new nh(t,r)}throw new b("Unsupported key system configuration for "+t)}(t,n))}catch(t){return Z.reject(t)}},t.Xj=function(){return"undefined"!=typeof HTMLMediaElement&&void 0!==HTMLMediaElement.prototype.webkitGenerateKeyRequest&&void 0!==HTMLMediaElement.prototype.webkitAddKey&&void 0!==HTMLMediaElement.prototype.webkitCancelKeyRequest},t}();function eh(t,n){var i=so();return!(!i||!i.canPlayType||""===i.canPlayType(n,t))}function rh(){return $f||($f=function(){var t=[];Yf.Xj()&&t.push(new Yf);xf.Xj()&&t.push(new xf);Lf.Xj()&&t.push(new Lf);ih.Xj()&&t.push(new ih);return new Zf(t)}()),$f}var oh=function(){function t(){this.AF=Bt()}var n=t.prototype;return n.ZL=function(t){this.AF.delete(t)},n.yF=function(){this.AF.clear()},n.WL=function(t){return this.AF.get(t)},n.YP=function(t,n){this.AF.set(t,n)},t}(),uh=function(){function t(){}return t.MF=function(){return t.kL||(t.kL=sh.Xj()?new sh:new oh),t.kL},t.ZL=function(n){t.MF().ZL(n)},t.yF=function(){t.MF().yF()},t.WL=function(n){return t.MF().WL(n)},t.YP=function(n,i){t.MF().YP(n,i)},t}();uh.kL=void 0;var sh=function(t){function n(){return t.apply(this,arguments)||this}Dt(n,t);var i=n.prototype;return i.ZL=function(t){self.sessionStorage.removeItem(t)},i.yF=function(){self.sessionStorage.clear()},i.WL=function(t){var n;return null!=(n=self.sessionStorage.getItem(t))?n:void 0},i.YP=function(t,n){self.sessionStorage.setItem(t,n)},n.Xj=function(){var t="foobar";try{return self.sessionStorage.setItem(t,t),self.sessionStorage.removeItem(t),!0}catch(t){return!1}},n}(uh);var fh=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=0;r<n.length;r++){var o=n[r];e.append(o)}return e.getBlob(i&&i.type||"")}}(n)}();function hh(t,n,i){var e=fh([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=h.createElement("a");u.href=r,u.download=o,h.body.appendChild(u),u.click(),h.body.removeChild(u),URL.revokeObjectURL(r)}var ch=function(t){return t.BM="UM",t.QM="FM",t.YM="contentprotectionerror",t.GM="contentprotectionsuccess",t.VM="currentsourcechange",t.WM="destroy",t.HM="durationchange",t.XM="emptied",t.ZM="encrypted",t.qM="ended",t.KM="JM",t.$M="ib",t.eb="sb",t.ob="hb",t.ub="loadstart",t.fb="manifestupdate",t._b="nosupportedrepresentationfound",t.gb="offline",t.vb="online",t.wb="pause",t.so="play",t.mb="progress",t.pb="ratechange",t.Ab="representationchange",t.yb="resize",t.Mb="seeked",t.bb="seeking",t.Tb="segmentnotfound",t.Sb="Nb",t.Ib="Db",t.ro="sourcechange",t.Eb="timeupdate",t.kb="volumechange",t.Lb="xb",t.Cb="metricschange",t}({}),ah=function(t){return t.WD="arraybuffer",t.HD="json",t.XD="stream",t.RM="text",t}({}),vh=function(){function t(n){var i=this;this.$d={},n instanceof t?n.asList().forEach((function(t){var n=Ct(t,2),e=n[0],r=n[1];i.append(e,r)})):Array.isArray(n)?n.forEach((function(t){var n=Ct(t,2),e=n[0],r=n[1];i.append(e,r)})):n&&g.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=dh(i),e=lh(e);var r=i.toLowerCase();if(this.$d.hasOwnProperty(r)){var o=this.$d[r],u=o[1];o[1]=u?u+", "+e:e}else this.$d[r]=[i,e]},n.delete=function(t){var n=dh(t).toLowerCase();delete this.$d[n]},n.get=function(t){var n=dh(t).toLowerCase();return this.$d.hasOwnProperty(n)?this.$d[n][1]:null},n.has=function(t){var n=dh(t).toLowerCase();return this.$d.hasOwnProperty(n)},n.set=function(t,n){var i=t,e=(i=dh(i)).toLowerCase();this.$d[e]=[i,lh(n)]},n.forEach=function(t,n){for(var i in this.$d)this.$d.hasOwnProperty(i)&&t.call(n,this.$d[i][1],i,this)},n.asList=function(){var t=[];for(var n in this.$d)if(this.$d.hasOwnProperty(n)){var i=Ct(this.$d[n],2),e=i[0],r=i[1];t.push([e,r])}return t},n.ZD=function(){var t={};return this.forEach((function(n,i){t[i]=n})),t},n.qD=function(t){var n=this;t.forEach((function(t,i){n.append(i,t)}))},n.KD=function(t){var n=this;t.forEach((function(t,i){n.set(i,t)}))},t}();function dh(t){var n=t;if("string"!=typeof n&&(n=String(n)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(n))throw new b("Invalid character in header field name");return n}function lh(t){var n=t;return"string"!=typeof n&&(n=String(n)),n}var wh="function"==typeof n&&"symbol"==typeof i?n:function(t){return"Symbol("+t+")"};function bh(){}var gh=Number.isNaN||function(t){return t!=t},mh=bh;function ph(t){return"object"==typeof t&&null!==t||"function"==typeof t}function yh(t){return t.slice()}function _h(t,n,i,e,r){new S(t).set(new S(i,e,r),n)}function Sh(t){return!1!==function(t){if("number"!=typeof t)return!1;if(gh(t))return!1;if(t<0)return!1;return!0}(t)&&t!==1/0}function Th(t,n,i){if("function"!=typeof t)throw new b("Argument is not a function");return Function.prototype.apply.call(t,n,i)}function Eh(t,n,i,e){var r=t[n];if(void 0!==r){if("function"!=typeof r)throw new b(r+" is not a method");switch(i){case 0:return function(){return kh(r,t,e)};case 1:return function(n){var i=[n].concat(e);return kh(r,t,i)}}}return function(){return xh(void 0)}}function Ih(t,n,i){var e=t[n];if(void 0!==e)return Th(e,t,i)}function kh(t,n,i){try{return xh(Th(t,n,i))}catch(t){return Bh(t)}}function Rh(t){if(t=Number(t),gh(t)||t<0)throw new RangeError("highWaterMark property of a queuing strategy must be non-negative and non-NaN");return t}function Oh(t){if(void 0===t)return function(){return 1};if("function"!=typeof t)throw new b("size property of a queuing strategy must be a function");return function(n){return t(n)}}var Nh=Z,Ph=Z.prototype.then,Ah=Z.resolve.bind(Nh),Dh=Z.reject.bind(Nh);function Ch(t){return new Nh(t)}function xh(t){return Ah(t)}function Bh(t){return Dh(t)}function Mh(t,n,i){return Ph.call(t,n,i)}function Uh(t,n,i){Mh(Mh(t,n,i),void 0,mh)}function Lh(t,n){Uh(t,n)}function Fh(t,n){Uh(t,void 0,n)}function zh(t,n,i){return Mh(t,n,i)}function Wh(t){Mh(t,void 0,mh)}var qh=function(){function t(){this.pV=0,this.AV=0,this.yV={MV:[],bV:void 0},this.TV=this.yV,this.pV=0,this.AV=0}return g.defineProperty(t.prototype,"length",{get:function(){return this.AV},enumerable:!0,configurable:!0}),t.prototype.push=function(t){var n=this.TV,i=n;16383===n.MV.length&&(i={MV:[],bV:void 0}),n.MV.push(t),i!==n&&(this.TV=i,n.bV=i),++this.AV},t.prototype.shift=function(){var t=this.yV,n=t,i=this.pV,e=i+1,r=t.MV,o=r[i];return 16384===e&&(n=t.bV,e=0),--this.AV,this.pV=e,t!==n&&(this.yV=n),r[i]=void 0,o},t.prototype.forEach=function(t){for(var n=this.pV,i=this.yV,e=i.MV;!(n===e.length&&void 0===i.bV||n===e.length&&(n=0,0===(e=(i=i.bV).MV).length));)t(e[n]),++n},t.prototype.peek=function(){var t=this.yV,n=this.pV;return t.MV[n]},t}();function Hh(t,n,i){var e=null;!0===i&&(e=g.prototype);var r=g.create(e);return r.value=t,r.done=n,r}function Vh(t,n){t.SV=!0,t.NV=n,n.DV=t,"readable"===n.wa?Kh(t):"closed"===n.wa?function(t){Kh(t),Zh(t)}(t):Gh(t,n.EV)}function Xh(t,n){return tv(t.NV,n)}function jh(t){"readable"===t.NV.wa?$h(t,new b("Reader was released and can no longer be used to monitor the stream's closedness")):function(t,n){Gh(t,n)}(t,new b("Reader was released and can no longer be used to monitor the stream's closedness")),t.NV.DV=void 0,t.NV=void 0}function Yh(t){return new b("Cannot "+t+" a stream using a released reader")}function Kh(t){t.vj=Ch((function(n,i){t.kV=n,t.LV=i}))}function Gh(t,n){Kh(t),$h(t,n)}function $h(t,n){Wh(t.vj),t.LV(n),t.kV=void 0,t.LV=void 0}function Zh(t){t.kV(void 0),t.kV=void 0,t.LV=void 0}var Jh=wh("[[CancelSteps]]"),Qh=wh("[[PullSteps]]");function tc(t,n){void 0===n&&(n=!1);var i=new sc(t);return i.SV=n,i}function nc(t){var n=Ch((function(n,i){var e={Hd:n,JL:i};t.DV.xV.push(e)}));return n}function ic(t,n,i){var e=t.DV;e.xV.shift().Hd(Hh(n,i,e.SV))}function ec(t){return t.DV.xV.length}function rc(t){var n=t.DV;return void 0!==n&&!!fc(n)}var oc,uc,sc=function(){function t(t){if(!1===Ja(t))throw new b("ReadableStreamDefaultReader can only be constructed with a ReadableStream instance");if(!0===Qa(t))throw new b("This stream has already been locked for exclusive reading by another reader");Vh(this,t),this.xV=new qh}return g.defineProperty(t.prototype,"closed",{get:function(){return fc(this)?this.vj:Bh(cc("closed"))},enumerable:!0,configurable:!0}),t.prototype.cancel=function(t){return fc(this)?void 0===this.NV?Bh(Yh("cancel")):Xh(this,t):Bh(cc("cancel"))},t.prototype.read=function(){return fc(this)?void 0===this.NV?Bh(Yh("read from")):hc(this):Bh(cc("read"))},t.prototype.releaseLock=function(){if(!fc(this))throw cc("releaseLock");if(void 0!==this.NV){if(this.xV.length>0)throw new b("Tried to release a reader lock when that reader has pending read() calls un-settled");jh(this)}},t}();function fc(t){return!!ph(t)&&!!g.prototype.hasOwnProperty.call(t,"xV")}function hc(t){var n=t.NV;return n.CV=!0,"closed"===n.wa?xh(Hh(void 0,!0,t.SV)):"errored"===n.wa?Bh(n.EV):n.jV[Qh]()}function cc(t){return new b("ReadableStreamDefaultReader.prototype."+t+" can only be used on a ReadableStreamDefaultReader")}"symbol"==typeof wh.asyncIterator&&((oc={})[wh.asyncIterator]=function(){return this},uc=oc,g.defineProperty(uc,wh.asyncIterator,{enumerable:!1}));var ac={next:function(){if(!1===vc(this))return Bh(dc("next"));var t=this.OV;return void 0===t.NV?Bh(Yh("iterate")):zh(hc(t),(function(n){var i=n.done;return i&&jh(t),Hh(n.value,i,!0)}))},return:function(t){if(!1===vc(this))return Bh(dc("next"));var n=this.OV;if(void 0===n.NV)return Bh(Yh("finish iterating"));if(n.xV.length>0)return Bh(new b("Tried to release a reader lock when that reader has pending read() calls un-settled"));if(!1===this.RV){var i=Xh(n,t);return jh(n),zh(i,(function(){return Hh(t,!0,!0)}))}return jh(n),xh(Hh(t,!0,!0))}};function vc(t){return!!ph(t)&&!!g.prototype.hasOwnProperty.call(t,"OV")}function dc(t){return new b("ReadableStreamAsyncIterator."+t+" can only be used on a ReadableSteamAsyncIterator")}function lc(t){var n=t.PV.shift();return t.zV-=n.size,t.zV<0&&(t.zV=0),n.value}function wc(t,n,i){if(!Sh(i=Number(i)))throw new RangeError("Size must be a finite, non-NaN, non-negative number.");t.PV.push({value:n,size:i}),t.zV+=i}function bc(t){t.PV=new qh,t.zV=0}void 0!==uc&&g.setPrototypeOf(ac,uc),g.defineProperty(ac,"next",{enumerable:!1}),g.defineProperty(ac,"return",{enumerable:!1});var gc=wh("[[AbortSteps]]"),mc=wh("[[ErrorSteps]]"),pc=function(){function t(t,n){void 0===t&&(t={}),void 0===n&&(n={}),_c(this);var i=n.size,e=n.highWaterMark;if(void 0!==t.type)throw new RangeError("Invalid type is specified");var r=Oh(i);void 0===e&&(e=1),function(t,n,i,e){var r=g.create(Fc.prototype);function o(){return Ih(n,"start",[r])}var u=Eh(n,"write",1,[r]),s=Eh(n,"close",0,[]),f=Eh(n,"abort",1,[]);zc(t,r,o,u,s,f,i,e)}(this,t,e=Rh(e),r)}return g.defineProperty(t.prototype,"locked",{get:function(){if(!1===Sc(this))throw Yc("locked");return Tc(this)},enumerable:!0,configurable:!0}),t.prototype.abort=function(t){return!1===Sc(this)?Bh(Yc("abort")):!0===Tc(this)?Bh(new b("Cannot abort a stream that already has a writer")):Ec(this,t)},t.prototype.close=function(){return!1===Sc(this)?Bh(Yc("close")):!0===Tc(this)?Bh(new b("Cannot close a stream that already has a writer")):!0===Nc(this)?Bh(new b("Cannot close an already-closing stream")):Ic(this)},t.prototype.getWriter=function(){if(!1===Sc(this))throw Yc("getWriter");return yc(this)},t}();function yc(t){return new Dc(t)}function _c(t){t.wa="writable",t.EV=void 0,t.Mx=void 0,t.BV=void 0,t.QV=new qh,t.FV=void 0,t.YV=void 0,t.GV=void 0,t.VV=void 0,t.WV=!1}function Sc(t){return!!ph(t)&&!!g.prototype.hasOwnProperty.call(t,"BV")}function Tc(t){return void 0!==t.Mx}function Ec(t,n){var i=t.wa;if("closed"===i||"errored"===i)return xh(void 0);if(void 0!==t.VV)return t.VV.HV;var e=!1;"erroring"===i&&(e=!0,n=void 0);var r=Ch((function(i,r){t.VV={HV:void 0,Hd:i,JL:r,XV:n,ZV:e}}));return t.VV.HV=r,!1===e&&Rc(t,n),r}function Ic(t){var n=t.wa;if("closed"===n||"errored"===n)return Bh(new b("The stream (in "+n+" state) is not in the writable state and cannot be closed"));var i=Ch((function(n,i){var e={Hd:n,JL:i};t.YV=e})),e=t.Mx;return void 0!==e&&!0===t.WV&&"writable"===n&&ra(e),function(t){wc(t,"close",0),Hc(t)}(t.BV),i}function kc(t,n){"writable"!==t.wa?Oc(t):Rc(t,n)}function Rc(t,n){var i=t.BV;t.wa="erroring",t.EV=n;var e=t.Mx;void 0!==e&&Mc(e,n),!1===function(t){if(void 0===t.FV&&void 0===t.GV)return!1;return!0}(t)&&!0===i.qV&&Oc(t)}function Oc(t){t.wa="errored",t.BV[mc]();var n=t.EV;if(t.QV.forEach((function(t){t.JL(n)})),t.QV=new qh,void 0!==t.VV){var i=t.VV;if(t.VV=void 0,!0===i.ZV)return i.JL(n),void Pc(t);Uh(t.BV[gc](i.XV),(function(){i.Hd(),Pc(t)}),(function(n){i.JL(n),Pc(t)}))}else Pc(t)}function Nc(t){return void 0!==t.YV||void 0!==t.GV}function Pc(t){void 0!==t.YV&&(t.YV.JL(t.EV),t.YV=void 0);var n=t.Mx;void 0!==n&&Jc(n,t.EV)}function Ac(t,n){var i=t.Mx;void 0!==i&&n!==t.WV&&(!0===n?function(t){ta(t)}(i):ra(i)),t.WV=n}var Dc=function(){function t(t){if(!1===Sc(t))throw new b("WritableStreamDefaultWriter can only be constructed with a WritableStream instance");if(!0===Tc(t))throw new b("This stream has already been locked for exclusive writing by another writer");this.KV=t,t.Mx=this;var n=t.wa;if("writable"===n)!1===Nc(t)&&!0===t.WV?ta(this):ia(this),$c(this);else if("erroring"===n)na(this,t.EV),$c(this);else if("closed"===n)ia(this),function(t){$c(t),Qc(t)}(this);else{var i=t.EV;na(this,i),Zc(this,i)}}return g.defineProperty(t.prototype,"closed",{get:function(){return!1===Cc(this)?Bh(Kc("closed")):this.vj},enumerable:!0,configurable:!0}),g.defineProperty(t.prototype,"desiredSize",{get:function(){if(!1===Cc(this))throw Kc("desiredSize");if(void 0===this.KV)throw Gc("desiredSize");return function(t){var n=t.KV,i=n.wa;if("errored"===i||"erroring"===i)return null;if("closed"===i)return 0;return qc(n.BV)}(this)},enumerable:!0,configurable:!0}),g.defineProperty(t.prototype,"ready",{get:function(){return!1===Cc(this)?Bh(Kc("ready")):this.JV},enumerable:!0,configurable:!0}),t.prototype.abort=function(t){return!1===Cc(this)?Bh(Kc("abort")):void 0===this.KV?Bh(Gc("abort")):function(t,n){var i=t.KV;return Ec(i,n)}(this,t)},t.prototype.close=function(){if(!1===Cc(this))return Bh(Kc("close"));var t=this.KV;return void 0===t?Bh(Gc("close")):!0===Nc(t)?Bh(new b("Cannot close an already-closing stream")):xc(this)},t.prototype.releaseLock=function(){if(!1===Cc(this))throw Kc("releaseLock");void 0!==this.KV&&Uc(this)},t.prototype.write=function(t){return!1===Cc(this)?Bh(Kc("write")):void 0===this.KV?Bh(Gc("write to")):Lc(this,t)},t}();function Cc(t){return!!ph(t)&&!!g.prototype.hasOwnProperty.call(t,"KV")}function xc(t){return Ic(t.KV)}function Bc(t,n){"pending"===t.$V?Jc(t,n):function(t,n){Zc(t,n)}(t,n)}function Mc(t,n){"pending"===t.tW?ea(t,n):function(t,n){na(t,n)}(t,n)}function Uc(t){var n=t.KV,i=new b("Writer was released and can no longer be used to monitor the stream's closedness");Mc(t,i),Bc(t,i),n.Mx=void 0,t.KV=void 0}function Lc(t,n){var i=t.KV,e=i.BV,r=function(t,n){try{return t.iW(n)}catch(n){return Vc(t,n),1}}(e,n);if(i!==t.KV)return Bh(Gc("write to"));var o=i.wa;if("errored"===o)return Bh(i.EV);if(!0===Nc(i)||"closed"===o)return Bh(new b("The stream is closing or closed and cannot be written to"));if("erroring"===o)return Bh(i.EV);var u=function(t){var n=Ch((function(n,i){var e={Hd:n,JL:i};t.QV.push(e)}));return n}(i);return function(t,n,i){var e={chunk:n};try{wc(t,e,i)}catch(n){return void Vc(t,n)}var r=t.eW;if(!1===Nc(r)&&"writable"===r.wa){Ac(r,Xc(t))}Hc(t)}(e,n,r),u}var Fc=function(){function t(){throw new b("WritableStreamDefaultController cannot be constructed explicitly")}return t.prototype.error=function(t){if(!1===function(t){if(!ph(t))return!1;if(!g.prototype.hasOwnProperty.call(t,"eW"))return!1;return!0}(this))throw new b("WritableStreamDefaultController.prototype.error can only be used on a WritableStreamDefaultController");"writable"===this.eW.wa&&jc(this,t)},t.prototype[gc]=function(t){var n=this.sW(t);return Wc(this),n},t.prototype[mc]=function(){bc(this)},t}();function zc(t,n,i,e,r,o,u,s){n.eW=t,t.BV=n,n.PV=void 0,n.zV=void 0,bc(n),n.qV=!1,n.iW=s,n.nW=u,n.rW=e,n.oW=r,n.sW=o;var f=Xc(n);Ac(t,f),Uh(xh(i()),(function(){n.qV=!0,Hc(n)}),(function(i){n.qV=!0,kc(t,i)}))}function Wc(t){t.rW=void 0,t.oW=void 0,t.sW=void 0,t.iW=void 0}function qc(t){return t.nW-t.zV}function Hc(t){var n=t.eW;if(!1!==t.qV&&void 0===n.FV)if("erroring"!==n.wa){if(0!==t.PV.length){var i=function(t){return t.PV.peek().value}(t);"close"===i?function(t){var n=t.eW;(function(t){t.GV=t.YV,t.YV=void 0})(n),lc(t);var i=t.oW();Wc(t),Uh(i,(function(){!function(t){t.GV.Hd(void 0),t.GV=void 0,"erroring"===t.wa&&(t.EV=void 0,void 0!==t.VV&&(t.VV.Hd(),t.VV=void 0)),t.wa="closed";var n=t.Mx;void 0!==n&&Qc(n)}(n)}),(function(t){!function(t,n){t.GV.JL(n),t.GV=void 0,void 0!==t.VV&&(t.VV.JL(n),t.VV=void 0),kc(t,n)}(n,t)}))}(t):function(t,n){var i=t.eW;!function(t){t.FV=t.QV.shift()}(i);var e=t.rW(n);Uh(e,(function(){!function(t){t.FV.Hd(void 0),t.FV=void 0}(i);var n=i.wa;if(lc(t),!1===Nc(i)&&"writable"===n){var e=Xc(t);Ac(i,e)}Hc(t)}),(function(n){"writable"===i.wa&&Wc(t),function(t,n){t.FV.JL(n),t.FV=void 0,kc(t,n)}(i,n)}))}(t,i.chunk)}}else Oc(n)}function Vc(t,n){"writable"===t.eW.wa&&jc(t,n)}function Xc(t){return qc(t)<=0}function jc(t,n){var i=t.eW;Wc(t),Rc(i,n)}function Yc(t){return new b("WritableStream.prototype."+t+" can only be used on a WritableStream")}function Kc(t){return new b("WritableStreamDefaultWriter.prototype."+t+" can only be used on a WritableStreamDefaultWriter")}function Gc(t){return new b("Cannot "+t+" a stream using a released writer")}function $c(t){t.vj=Ch((function(n,i){t.kV=n,t.LV=i,t.$V="pending"}))}function Zc(t,n){$c(t),Jc(t,n)}function Jc(t,n){Wh(t.vj),t.LV(n),t.kV=void 0,t.LV=void 0,t.$V="rejected"}function Qc(t){t.kV(void 0),t.kV=void 0,t.LV=void 0,t.$V="resolved"}function ta(t){t.JV=Ch((function(n,i){t.hW=n,t.aW=i})),t.tW="pending"}function na(t,n){ta(t),ea(t,n)}function ia(t){ta(t),ra(t)}function ea(t,n){Wh(t.JV),t.aW(n),t.hW=void 0,t.aW=void 0,t.tW="rejected"}function ra(t){t.hW(void 0),t.hW=void 0,t.aW=void 0,t.tW="fulfilled"}function oa(t){if("object"!=typeof t||null===t)return!1;try{return"boolean"==typeof t.aborted}catch(t){return!1}}var ua="undefined"!=typeof DOMException?DOMException:void 0;var sa=function(t){if("function"!=typeof t&&"object"!=typeof t)return!1;try{return new t,!0}catch(t){return!1}}(ua)?ua:function(){var t=function(t,n){this.message=t||"",this.name=n||"Error",w.captureStackTrace&&w.captureStackTrace(this,this.constructor)};return t.prototype=g.create(w.prototype),g.defineProperty(t.prototype,"constructor",{value:t,writable:!0,configurable:!0}),t}();function fa(t,n,i,e,r,o){var u=tc(t),s=yc(n);t.CV=!0;var f=!1,h=xh(void 0);return Ch((function(c,a){var v,d,l,w;if(void 0!==o){if(v=function(){var i=new sa("Aborted","AbortError"),o=[];!1===e&&o.push((function(){return"writable"===n.wa?Ec(n,i):xh(void 0)})),!1===r&&o.push((function(){return"readable"===t.wa?tv(t,i):xh(void 0)})),y((function(){return Z.all(o.map((function(t){return t()})))}),!0,i)},!0===o.aborted)return void v();o.addEventListener("abort",v)}if(p(t,u.vj,(function(t){!1===e?y((function(){return Ec(n,t)}),!0,t):_(!0,t)})),p(n,s.vj,(function(n){!1===r?y((function(){return tv(t,n)}),!0,n):_(!0,n)})),d=t,l=u.vj,w=function(){!1===i?y((function(){return function(t){var n=t.KV,i=n.wa;return!0===Nc(n)||"closed"===i?xh(void 0):"errored"===i?Bh(n.EV):xc(t)}(s)})):_()},"closed"===d.wa?w():Lh(l,w),!0===Nc(n)||"closed"===n.wa){var g=new b("the destination writable stream closed before all data could be piped to it");!1===r?y((function(){return tv(t,g)}),!0,g):_(!0,g)}function m(){var t=h;return Mh(h,(function(){return t!==h?m():void 0}))}function p(t,n,i){"errored"===t.wa?i(t.EV):Fh(n,i)}function y(t,i,e){function r(){Uh(t(),(function(){return S(i,e)}),(function(t){return S(!0,t)}))}!0!==f&&(f=!0,"writable"===n.wa&&!1===Nc(n)?Lh(m(),r):r())}function _(t,i){!0!==f&&(f=!0,"writable"===n.wa&&!1===Nc(n)?Lh(m(),(function(){return S(t,i)})):S(t,i))}function S(t,n){Uc(s),jh(u),void 0!==o&&o.removeEventListener("abort",v),t?a(n):c(void 0)}Wh(Ch((function(t,n){!function i(e){e?t():Mh(!0===f?xh(!0):Mh(s.JV,(function(){return Mh(hc(u),(function(t){return!0===t.done||(h=Mh(Lc(s,t.value),void 0,bh),!1)}))})),i,n)}(!1)})))}))}var ha=function(){function t(){throw new b}return g.defineProperty(t.prototype,"desiredSize",{get:function(){if(!1===ca(this))throw ya("desiredSize");return ga(this)},enumerable:!0,configurable:!0}),t.prototype.close=function(){if(!1===ca(this))throw ya("close");if(!1===ma(this))throw new b("The stream is not in a state that permits close");la(this)},t.prototype.enqueue=function(t){if(!1===ca(this))throw ya("enqueue");if(!1===ma(this))throw new b("The stream is not in a state that permits enqueue");return wa(this,t)},t.prototype.error=function(t){if(!1===ca(this))throw ya("error");ba(this,t)},t.prototype[Jh]=function(t){bc(this);var n=this.uW(t);return da(this),n},t.prototype[Qh]=function(){var t=this.cW;if(this.PV.length>0){var n=lc(this);return!0===this.lW&&0===this.PV.length?(da(this),nv(t)):aa(this),xh(Hh(n,!1,t.DV.SV))}var i=nc(t);return aa(this),i},t}();function ca(t){return!!ph(t)&&!!g.prototype.hasOwnProperty.call(t,"cW")}function aa(t){!1!==va(t)&&(!0!==t.dW?(t.dW=!0,Uh(t.fW(),(function(){t.dW=!1,!0===t._W&&(t._W=!1,aa(t))}),(function(n){ba(t,n)}))):t._W=!0)}function va(t){var n=t.cW;return!1!==ma(t)&&(!1!==t.qV&&(!0===Qa(n)&&ec(n)>0||ga(t)>0))}function da(t){t.fW=void 0,t.uW=void 0,t.iW=void 0}function la(t){var n=t.cW;t.lW=!0,0===t.PV.length&&(da(t),nv(n))}function wa(t,n){var i=t.cW;if(!0===Qa(i)&&ec(i)>0)ic(i,n,!1);else{var e=void 0;try{e=t.iW(n)}catch(n){throw ba(t,n),n}try{wc(t,n,e)}catch(n){throw ba(t,n),n}}aa(t)}function ba(t,n){var i=t.cW;"readable"===i.wa&&(bc(t),da(t),iv(i,n))}function ga(t){var n=t.cW.wa;return"errored"===n?null:"closed"===n?0:t.nW-t.zV}function ma(t){var n=t.cW.wa;return!1===t.lW&&"readable"===n}function pa(t,n,i,e,r,o,u){n.cW=t,n.PV=void 0,n.zV=void 0,bc(n),n.qV=!1,n.lW=!1,n._W=!1,n.dW=!1,n.iW=u,n.nW=o,n.fW=e,n.uW=r,t.jV=n,Uh(xh(i()),(function(){n.qV=!0,aa(n)}),(function(t){ba(n,t)}))}function ya(t){return new b("ReadableStreamDefaultController.prototype."+t+" can only be used on a ReadableStreamDefaultController")}var _a=Number.isInteger||function(t){return"number"==typeof t&&isFinite(t)&&m.floor(t)===t},Sa=function(){function t(){throw new b("ReadableStreamBYOBRequest cannot be used directly")}return g.defineProperty(t.prototype,"view",{get:function(){if(!1===Ia(this))throw Wa("view");return this.hD},enumerable:!0,configurable:!0}),t.prototype.respond=function(t){if(!1===Ia(this))throw Wa("respond");if(void 0===this.gW)throw new b("This BYOB request has been invalidated");this.hD.buffer,function(t,n){if(n=Number(n),!1===Sh(n))throw new RangeError("bytesWritten must be a finite");Ba(t,n)}(this.gW,t)},t.prototype.respondWithNewView=function(t){if(!1===Ia(this))throw Wa("respond");if(void 0===this.gW)throw new b("This BYOB request has been invalidated");if(!ArrayBuffer.isView(t))throw new b("You can only respond with array buffer views");t.buffer,function(t,n){var i=t.vW.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,Ba(t,n.byteLength)}(this.gW,t)},t}(),Ta=function(){function t(){throw new b("ReadableByteStreamController constructor cannot be used directly")}return g.defineProperty(t.prototype,"byobRequest",{get:function(){if(!1===Ea(this))throw qa("byobRequest");if(void 0===this.wW&&this.vW.length>0){var t=this.vW.peek(),n=new S(t.buffer,t.byteOffset+t.bytesFilled,t.byteLength-t.bytesFilled),i=g.create(Sa.prototype);!function(t,n,i){t.gW=n,t.hD=i}(i,this,n),this.wW=i}return this.wW},enumerable:!0,configurable:!0}),g.defineProperty(t.prototype,"desiredSize",{get:function(){if(!1===Ea(this))throw qa("desiredSize");return Fa(this)},enumerable:!0,configurable:!0}),t.prototype.close=function(){if(!1===Ea(this))throw qa("close");if(!0===this.lW)throw new b("The stream has already been closed; do not close it again!");var t=this.mW.wa;if("readable"!==t)throw new b("The stream (in "+t+" state) is not in the readable state and cannot be closed");!function(t){var n=t.mW;if(t.zV>0)return void(t.lW=!0);if(t.vW.length>0){if(t.vW.peek().bytesFilled>0){var i=new b("Insufficient bytes to fill elements in the given buffer");throw La(t,i),i}}Ua(t),nv(n)}(this)},t.prototype.enqueue=function(t){if(!1===Ea(this))throw qa("enqueue");if(!0===this.lW)throw new b("stream is closed or draining");var n=this.mW.wa;if("readable"!==n)throw new b("The stream (in "+n+" state) is not in the readable state and cannot be enqueued to");if(!ArrayBuffer.isView(t))throw new b("You can only enqueue array buffer views when using a ReadableByteStreamController");t.buffer,function(t,n){var i=t.mW,e=n.buffer,r=n.byteOffset,o=n.byteLength,u=e;if(!0===rc(i)){if(0===ec(i))Na(t,u,r,o);else ic(i,new S(u,r,o),!1)}else!0===Xa(i)?(Na(t,u,r,o),xa(t)):Na(t,u,r,o);ka(t)}(this,t)},t.prototype.error=function(t){if(!1===Ea(this))throw qa("error");La(this,t)},t.prototype[Jh]=function(t){this.vW.length>0&&(this.vW.peek().bytesFilled=0);bc(this);var n=this.uW(t);return Ua(this),n},t.prototype[Qh]=function(){var t=this.mW;if(this.zV>0){var n=this.PV.shift();this.zV-=n.byteLength,Da(this);var i=void 0;try{i=new S(n.buffer,n.byteOffset,n.byteLength)}catch(t){return Bh(t)}return xh(Hh(i,!1,t.DV.SV))}var e=this.pW;if(void 0!==e){var r=void 0;try{r=new ArrayBuffer(e)}catch(t){return Bh(t)}var o={buffer:r,byteOffset:0,byteLength:e,bytesFilled:0,elementSize:1,ctor:S,readerType:"default"};this.vW.push(o)}var u=nc(t);return ka(this),u},t}();function Ea(t){return!!ph(t)&&!!g.prototype.hasOwnProperty.call(t,"mW")}function Ia(t){return!!ph(t)&&!!g.prototype.hasOwnProperty.call(t,"gW")}function ka(t){var n=function(t){var n=t.mW;if("readable"!==n.wa)return!1;if(!0===t.lW)return!1;if(!1===t.qV)return!1;if(!0===rc(n)&&ec(n)>0)return!0;if(!0===Xa(n)&&Va(n)>0)return!0;var i=Fa(t);if(i>0)return!0;return!1}(t);!1!==n&&(!0!==t.dW?(t.dW=!0,Uh(t.fW(),(function(){t.dW=!1,!0===t._W&&(t._W=!1,ka(t))}),(function(n){La(t,n)}))):t._W=!0)}function Ra(t,n){var i=!1;"closed"===t.wa&&(i=!0);var e=Oa(n);"default"===n.readerType?ic(t,e,i):function(t,n,i){var e=t.DV,r=e.AW.shift();r.Hd(Hh(n,i,e.SV))}(t,e,i)}function Oa(t){var n=t.bytesFilled,i=t.elementSize;return new t.ctor(t.buffer,t.byteOffset,n/i)}function Na(t,n,i,e){t.PV.push({buffer:n,byteOffset:i,byteLength:e}),t.zV+=e}function Pa(t,n){var i=n.elementSize,e=n.bytesFilled-n.bytesFilled%i,r=m.min(t.zV,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 h=t.PV;s>0;){var c=h.peek(),a=m.min(s,c.byteLength),v=n.byteOffset+n.bytesFilled;_h(n.buffer,v,c.buffer,c.byteOffset,a),c.byteLength===a?h.shift():(c.byteOffset+=a,c.byteLength-=a),t.zV-=a,Aa(t,a,n),s-=a}return f}function Aa(t,n,i){Ca(t),i.bytesFilled+=n}function Da(t){0===t.zV&&!0===t.lW?(Ua(t),nv(t.mW)):ka(t)}function Ca(t){void 0!==t.wW&&(t.wW.gW=void 0,t.wW.hD=void 0,t.wW=void 0)}function xa(t){for(;t.vW.length>0;){if(0===t.zV)return;var n=t.vW.peek();!0===Pa(t,n)&&(Ma(t),Ra(t.mW,n))}}function Ba(t,n){var i=t.vW.peek();if("closed"===t.mW.wa){if(0!==n)throw new b("bytesWritten must be 0 when calling respond() on a closed stream");!function(t,n){n.buffer=n.buffer;var i=t.mW;if(!0===Xa(i))for(;Va(i)>0;)Ra(i,Ma(t))}(t,i)}else!function(t,n,i){if(i.bytesFilled+n>i.byteLength)throw new RangeError("bytesWritten out of range");if(Aa(t,n,i),!(i.bytesFilled<i.elementSize)){Ma(t);var e=i.bytesFilled%i.elementSize;if(e>0){var r=i.byteOffset+i.bytesFilled,o=i.buffer.slice(r-e,r);Na(t,o,0,o.byteLength)}i.buffer=i.buffer,i.bytesFilled-=e,Ra(t.mW,i),xa(t)}}(t,n,i);ka(t)}function Ma(t){var n=t.vW.shift();return Ca(t),n}function Ua(t){t.fW=void 0,t.uW=void 0}function La(t,n){var i=t.mW;"readable"===i.wa&&(!function(t){Ca(t),t.vW=new qh}(t),bc(t),Ua(t),iv(i,n))}function Fa(t){var n=t.mW.wa;return"errored"===n?null:"closed"===n?0:t.nW-t.zV}function za(t,n,i){var e=g.create(Ta.prototype);var r=Eh(n,"pull",0,[e]),o=Eh(n,"cancel",1,[]),u=n.autoAllocateChunkSize;if(void 0!==u&&(u=Number(u),!1===_a(u)||u<=0))throw new RangeError("autoAllocateChunkSize must be a positive integer");!function(t,n,i,e,r,o,u){n.mW=t,n._W=!1,n.dW=!1,n.wW=void 0,n.PV=n.zV=void 0,bc(n),n.lW=!1,n.qV=!1,n.nW=Rh(o),n.fW=e,n.uW=r,n.pW=u,n.vW=new qh,t.jV=n,Uh(xh(i()),(function(){n.qV=!0,ka(n)}),(function(t){La(n,t)}))}(t,e,(function(){return Ih(n,"start",[e])}),r,o,i,u)}function Wa(t){return new b("ReadableStreamBYOBRequest.prototype."+t+" can only be used on a ReadableStreamBYOBRequest")}function qa(t){return new b("ReadableByteStreamController.prototype."+t+" can only be used on a ReadableByteStreamController")}function Ha(t){var n=Ch((function(n,i){var e={Hd:n,JL:i};t.DV.AW.push(e)}));return n}function Va(t){return t.DV.AW.length}function Xa(t){var n=t.DV;return void 0!==n&&!!Ya(n)}var ja=function(){function t(t){if(!Ja(t))throw new b("ReadableStreamBYOBReader can only be constructed with a ReadableStream instance given a byte source");if(!1===Ea(t.jV))throw new b("Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte source");if(Qa(t))throw new b("This stream has already been locked for exclusive reading by another reader");Vh(this,t),this.AW=new qh}return g.defineProperty(t.prototype,"closed",{get:function(){return Ya(this)?this.vj:Bh(Ka("closed"))},enumerable:!0,configurable:!0}),t.prototype.cancel=function(t){return Ya(this)?void 0===this.NV?Bh(Yh("cancel")):Xh(this,t):Bh(Ka("cancel"))},t.prototype.read=function(t){return Ya(this)?void 0===this.NV?Bh(Yh("read from")):ArrayBuffer.isView(t)?(t.buffer,0===t.byteLength?Bh(new b("view must have non-zero byteLength")):function(t,n){var i=t.NV;if(i.CV=!0,"errored"===i.wa)return Bh(i.EV);return function(t,n){var i=t.mW,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.vW.length>0)return t.vW.push(o),Ha(i);if("closed"===i.wa)return xh(Hh(new r(o.buffer,o.byteOffset,0),!0,i.DV.SV));if(t.zV>0){if(!0===Pa(t,o)){var u=Oa(o);return Da(t),xh(Hh(u,!1,i.DV.SV))}if(!0===t.lW){var s=new b("Insufficient bytes to fill elements in the given buffer");return La(t,s),Bh(s)}}t.vW.push(o);var f=Ha(i);return ka(t),f}(i.jV,n)}(this,t)):Bh(new b("view must be an array buffer view")):Bh(Ka("read"))},t.prototype.releaseLock=function(){if(!Ya(this))throw Ka("releaseLock");if(void 0!==this.NV){if(this.AW.length>0)throw new b("Tried to release a reader lock when that reader has pending read() calls un-settled");jh(this)}},t}();function Ya(t){return!!ph(t)&&!!g.prototype.hasOwnProperty.call(t,"AW")}function Ka(t){return new b("ReadableStreamBYOBReader.prototype."+t+" can only be used on a ReadableStreamBYOBReader")}var Ga=function(){function t(t,n){void 0===t&&(t={}),void 0===n&&(n={}),Za(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),za(this,t,e=Rh(e))}else{if(void 0!==r)throw new RangeError("Invalid type is specified");var o=Oh(i);void 0===e&&(e=1),function(t,n,i,e){var r=g.create(ha.prototype),o=Eh(n,"pull",0,[r]),u=Eh(n,"cancel",1,[]);pa(t,r,(function(){return Ih(n,"start",[r])}),o,u,i,e)}(this,t,e=Rh(e),o)}}return g.defineProperty(t.prototype,"locked",{get:function(){if(!1===Ja(this))throw ev("locked");return Qa(this)},enumerable:!0,configurable:!0}),t.prototype.cancel=function(t){return!1===Ja(this)?Bh(ev("cancel")):!0===Qa(this)?Bh(new b("Cannot cancel a stream that already has a reader")):tv(this,t)},t.prototype.getReader=function(t){var n=(void 0===t?{}:t).mode;if(!1===Ja(this))throw ev("getReader");if(void 0===n)return tc(this,!0);if("byob"===(n=String(n)))return function(t,n){void 0===n&&(n=!1);var i=new ja(t);return i.SV=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===Ja(this))throw ev("pipeThrough");if(!1===Sc(i))throw new b("writable argument to pipeThrough must be a WritableStream");if(!1===Ja(e))throw new b("readable argument to pipeThrough must be a ReadableStream");if(o=Boolean(o),u=Boolean(u),s=Boolean(s),void 0!==f&&!oa(f))throw new b("ReadableStream.prototype.pipeThrough's signal option must be an AbortSignal");if(!0===Qa(this))throw new b("ReadableStream.prototype.pipeThrough cannot be used on a locked ReadableStream");if(!0===Tc(i))throw new b("ReadableStream.prototype.pipeThrough cannot be used on a locked WritableStream");return Wh(fa(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===Ja(this)?Bh(ev("pipeTo")):!1===Sc(t)?Bh(new b("ReadableStream.prototype.pipeTo's first argument must be a WritableStream")):(e=Boolean(e),r=Boolean(r),o=Boolean(o),void 0===u||oa(u)?!0===Qa(this)?Bh(new b("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream")):!0===Tc(t)?Bh(new b("ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream")):fa(this,t,e,r,o,u):Bh(new b("ReadableStream.prototype.pipeTo's signal option must be an AbortSignal")))},t.prototype.tee=function(){if(!1===Ja(this))throw ev("tee");var t=function(t,n){var i,e,r,o,u,s=tc(t),f=!1,h=!1,c=!1,a=Ch((function(t){u=t}));function v(){return!0===f||(f=!0,Wh(zh(hc(s),(function(t){if(f=!1,!0===t.done)return!1===h&&la(r.jV),void(!1===c&&la(o.jV));var n=t.value,i=n,e=n;!1===h&&wa(r.jV,i),!1===c&&wa(o.jV,e)})))),xh(void 0)}function d(){}return r=$a(d,v,(function(n){if(h=!0,i=n,!0===c){var r=yh([i,e]),o=tv(t,r);u(o)}return a})),o=$a(d,v,(function(n){if(c=!0,e=n,!0===h){var r=yh([i,e]),o=tv(t,r);u(o)}return a})),Fh(s.vj,(function(t){ba(r.jV,t),ba(o.jV,t)})),[r,o]}(this);return yh(t)},t.prototype.getIterator=function(t){var n=(void 0===t?{}:t).preventCancel,i=void 0!==n&&n;if(!1===Ja(this))throw ev("getIterator");return function(t,n){void 0===n&&(n=!1);var i=tc(t),e=g.create(ac);return e.OV=i,e.RV=Boolean(n),e}(this,i)},t}();function $a(t,n,i,e,r){void 0===e&&(e=1),void 0===r&&(r=function(){return 1});var o=g.create(Ga.prototype);return Za(o),pa(o,g.create(ha.prototype),t,n,i,e,r),o}function Za(t){t.wa="readable",t.DV=void 0,t.EV=void 0,t.CV=!1}function Ja(t){return!!ph(t)&&!!g.prototype.hasOwnProperty.call(t,"jV")}function Qa(t){return void 0!==t.DV}function tv(t,n){return t.CV=!0,"closed"===t.wa?xh(void 0):"errored"===t.wa?Bh(t.EV):(nv(t),zh(t.jV[Jh](n),bh))}function nv(t){t.wa="closed";var n=t.DV;void 0!==n&&(fc(n)&&(n.xV.forEach((function(t){t.Hd(Hh(void 0,!0,n.SV))})),n.xV=new qh),Zh(n))}function iv(t,n){t.wa="errored",t.EV=n;var i=t.DV;void 0!==i&&(fc(i)?(i.xV.forEach((function(t){t.JL(n)})),i.xV=new qh):(i.AW.forEach((function(t){t.JL(n)})),i.AW=new qh),$h(i,n))}function ev(t){return new b("ReadableStream.prototype."+t+" can only be used on a ReadableStream")}"symbol"==typeof wh.asyncIterator&&g.defineProperty(Ga.prototype,wh.asyncIterator,{value:Ga.prototype.getIterator,enumerable:!1,writable:!0,configurable:!0});(function(){function t(t){var n=t.highWaterMark;this.highWaterMark=n}t.prototype.size=function(t){return t.byteLength}})(),function(){function t(t){var n=t.highWaterMark;this.highWaterMark=n}t.prototype.size=function(){return 1}}();var rv=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=Oh(e);if(void 0===r&&(r=1),r=Rh(r),void 0!==t.readableType)throw new RangeError("Invalid readable type specified");var f,h=Oh(o);void 0===u&&(u=0),u=Rh(u),function(t,n,i,e,r,o){function u(){return n}function s(n){return function(t,n){var i=t.yW;if(!0===t.WV){return zh(t.MW,(function(){var e=t.bW;if("erroring"===e.wa)throw e.EV;return dv(i,n)}))}return dv(i,n)}(t,n)}function f(n){return function(t,n){return uv(t,n),xh(void 0)}(t,n)}function h(){return function(t){var n=t.TW,i=t.yW,e=i.SW();return av(i),zh(e,(function(){if("errored"===n.wa)throw n.EV;var t=n.jV;!0===ma(t)&&la(t)}),(function(i){throw uv(t,i),n.EV}))}(t)}function c(){return function(t){return fv(t,!1),t.MW}(t)}function a(n){return sv(t,n),xh(void 0)}t.bW=function(t,n,i,e,r,o){void 0===r&&(r=1),void 0===o&&(o=function(){return 1});var u=g.create(pc.prototype);return _c(u),zc(u,g.create(Fc.prototype),t,n,i,e,r,o),u}(u,s,h,f,i,e),t.TW=$a(u,c,a,r,o),t.WV=void 0,t.MW=void 0,t.NW=void 0,fv(t,!0),t.yW=void 0}(this,Ch((function(t){f=t})),r,s,u,h),function(t,n){var i=g.create(hv.prototype),e=function(t){try{return vv(i,t),xh(void 0)}catch(t){return Bh(t)}},r=n.transform;if(void 0!==r){if("function"!=typeof r)throw new b("transform is not a method");e=function(t){return kh(r,n,[t,i])}}var o=Eh(n,"flush",0,[i]);!function(t,n,i,e){n.IW=t,t.yW=n,n.DW=i,n.SW=e}(t,i,e,o)}(this,t);var c=Ih(t,"start",[this.yW]);f(c)}return g.defineProperty(t.prototype,"readable",{get:function(){if(!1===ov(this))throw wv("readable");return this.TW},enumerable:!0,configurable:!0}),g.defineProperty(t.prototype,"writable",{get:function(){if(!1===ov(this))throw wv("writable");return this.bW},enumerable:!0,configurable:!0}),t}();function ov(t){return!!ph(t)&&!!g.prototype.hasOwnProperty.call(t,"yW")}function uv(t,n){ba(t.TW.jV,n),sv(t,n)}function sv(t,n){av(t.yW),Vc(t.bW.BV,n),!0===t.WV&&fv(t,!1)}function fv(t,n){void 0!==t.MW&&t.NW(),t.MW=Ch((function(n){t.NW=n})),t.WV=n}var hv=function(){function t(){throw new b("TransformStreamDefaultController instances cannot be created directly")}return g.defineProperty(t.prototype,"desiredSize",{get:function(){if(!1===cv(this))throw lv("desiredSize");return ga(this.IW.TW.jV)},enumerable:!0,configurable:!0}),t.prototype.enqueue=function(t){if(!1===cv(this))throw lv("enqueue");vv(this,t)},t.prototype.error=function(t){if(!1===cv(this))throw lv("error");!function(t,n){uv(t.IW,n)}(this,t)},t.prototype.terminate=function(){if(!1===cv(this))throw lv("terminate");!function(t){var n=t.IW,i=n.TW.jV;!0===ma(i)&&la(i);var e=new b("TransformStream terminated");sv(n,e)}(this)},t}();function cv(t){return!!ph(t)&&!!g.prototype.hasOwnProperty.call(t,"IW")}function av(t){t.DW=void 0,t.SW=void 0}function vv(t,n){var i=t.IW,e=i.TW.jV;if(!1===ma(e))throw new b("Readable side is not in a state that permits enqueue");try{wa(e,n)}catch(t){throw sv(i,t),i.TW.EV}var r=function(t){return!0!==va(t)}(e);r!==i.WV&&fv(i,!0)}function dv(t,n){return zh(t.DW(n),void 0,(function(n){throw uv(t.IW,n),n}))}function lv(t){return new b("TransformStreamDefaultController.prototype."+t+" can only be used on a TransformStreamDefaultController")}function wv(t){return new b("TransformStream.prototype."+t+" can only be used on a TransformStream")}function bv(t){return function(t){return new Ga({start:function(n){for(var i=0;i<t.length;i++){var e=t[i];n.enqueue(e)}n.close()}})}([t])}function gv(t){return bv(function(t){return new S(t)}(t))}function mv(t,n){return function(t,n){var i=n,e=t.getReader(),r=new iu,o=function(){u();var t=new nn;e.cancel(t).catch(kt),r.KL(t)},u=function(){i&&(i.qf(o),i=void 0)};i&&(i.Gf?o():i.Zf(o));var s=[],f=function(t){return t.done?(u(),Z.resolve(s)):(s.push(t.value),Z.resolve(e.read()).then(f))};return Z.resolve(e.read()).then(f).then((function(t){u(),r.qL(t)}),(function(t){u(),r.KL(t)})),r.$L}(t,n).then((function(t){return Hn(t).buffer}))}function pv(t,n){var i=n,e=new rv,r=e.readable,o=e.writable,u=o.getWriter(),s=function(){i&&i.i_()};return u.closed.then(s,s),t.then((function(t){return i=void 0,u.releaseLock(),t.pipeTo(o).catch(kt)}),(function(t){return i=void 0,u.releaseLock(),o.abort(t).catch(kt)})),r}function yv(t){return hi(new S(t))}function _v(t){return ci(t).buffer}var Sv="content-type",Tv="text/plain;charset=UTF-8",Ev=function(){function t(){}var n=t.prototype;return n.FR=function(t){return this.kE(t).then(JSON.parse)},n.mR=function(t,n){switch(t){case ah.WD:return this.oP(n);case ah.HD:return this.FR(n);case ah.XD:return this.EW();case ah.RM:return this.kE(n);default:throw new b}},t}();function Iv(t,n,i){if(t instanceof Ev)return t;if(t instanceof Ga)return function(t,n){return new Rv({ow:0,EW:t,Fz:kv(n)})}(t,i);var e=kv(i),r=Z.resolve(t).then((function(t){return function(t,n){if(t){if("string"==typeof t)return{ow:ah.RM,fE:t,Fz:n||Tv};if(t instanceof ArrayBuffer||qn(t))return{ow:ah.WD,fE:xv(t),Fz:n};if(function(t){return lt(t)&&t.constructor&&t.constructor===g}(t)||dt(t))return{ow:ah.HD,fE:t,Fz:n};throw new b("Unsupported BodyInit type")}return{ow:ah.RM,fE:null,Fz:n}}(t,e)}));return new Rv({ow:1,$L:r,kW:n})}function kv(t){return(t.get(Sv)||"").toLowerCase()}var Rv=function(t){function n(n){var i;return(i=t.call(this)||this).xW=!1,i.PW=new iu,i.PW.$L.catch(kt),i.UW(n),i}Dt(n,t);var i=n.prototype;return i.RW=function(){return this.PW.$L},i.kE=function(t){return this.zW(Ov,t)},i.FR=function(t){return this.zW(Pv,t)},i.oP=function(t){return this.zW(Dv,t)},i.EW=function(){return this.BW(function(t){return 0===t.ow?t.EW:pv(t.$L.then(Cv).then(gv),t.kW)}(this.OW))},i.zW=function(t,n){if(this.xW)return Z.reject(new b("Already used"));this.xW=!0;var i=t(this.OW,n);return this.PW.e_(i.then(kt)),i},i.BW=function(t){if(this.xW)throw new b("Already used");if(t.locked)throw new b("Body stream is locked");this.xW=!0;var n=new rv,i=Z.resolve(t.pipeTo(n.writable));return this.PW.e_(i),n.readable},i.UW=function(t){this.OW=t,1===t.ow&&t.$L.catch(kt)},i.QW=function(){if(this.xW)throw new b("Already used");var t=function(t){if(0===t.ow){var n=Ct(t.EW.tee(),2),i=n[0],e=n[1];return[{ow:t.ow,EW:i,Fz:t.Fz},{ow:t.ow,EW:e,Fz:t.Fz}]}var r=Ct(t.kW.s_(),2),o=r[0],u=r[1];return[{ow:t.ow,$L:t.$L,kW:o},{ow:t.ow,$L:t.$L,kW:u}]}(this.OW),i=t[0],e=t[1];return this.UW(i),new n(e)},Nt(n,[{key:"LW",get:function(){return this.xW}},{key:"jW",get:function(){return 0===this.OW.ow}}]),n}(Ev);function Ov(t,n){return 0===t.ow?mv(t.EW,n).then(yv):(n&&t.kW.e_(n),on(t.$L.then(Nv),t.kW))}function Nv(t){switch(t.ow){case ah.RM:return Z.resolve(t.fE||"");case ah.WD:return Z.resolve(t.fE).then(yv);case ah.HD:return Z.resolve(t.fE).then(JSON.stringify)}}function Pv(t,n){return 0===t.ow?Ov(t,n).then(JSON.parse):(n&&t.kW.e_(n),on(t.$L.then(Av),t.kW))}function Av(t){return t.ow===ah.HD?Z.resolve(t.fE):Nv(t).then(JSON.parse)}function Dv(t,n){return 0===t.ow?mv(t.EW,n):(n&&t.kW.e_(n),on(t.$L.then(Cv),t.kW))}function Cv(t){switch(t.ow){case ah.WD:return Z.resolve(t.fE);case ah.RM:case ah.HD:return Nv(t).then(_v)}}function xv(t){return t instanceof ArrayBuffer?t:li(vi(t)).buffer}var Bv=function(t){function n(n){var i;return(i=t.call(this)||this).FW=n,i}Dt(n,t);var i=n.prototype;return i.RW=function(){return this.FW.RW()},i.kE=function(t){return this.FW.kE(t)},i.FR=function(t){return this.FW.FR(t)},i.oP=function(t){return this.FW.oP(t)},i.EW=function(t){return this.FW.EW(t)},i.QW=function(){return this.FW.QW()},Nt(n,[{key:"LW",get:function(){return this.FW.LW}},{key:"jW",get:function(){return this.FW.jW}}]),n}(Ev);var Mv=function(t){function n(n,i){var e,r,o,u,s,f;i?(r=i._E,o=i.vE,u=i.PD,s=i.YR,f=i.YW):(r=[],o=ah.RM,u=200,s="OK",f=!1);var h=n.CD,c=new vh(n._E||r),a=n.vE||o,v=n.LE||(i&&i.CD===h?i.LE:h.Iu),d=i?i.FW:null,l=Iv(void 0!==n.lp?n.lp:d,n.kW||new tn,c);return(e=t.call(this,l)||this)._E=c,e.CD=h,e.LE=v,e.vE=a,e.PD=void 0!==n.PD?n.PD:u,e.YR=void 0!==n.YR?String(n.YR):s,e.YW=n.YW||f,e}Dt(n,t);var i=n.prototype;return i.lp=function(t){return this.mR(this.vE,t)},i.np=function(){return new n({lp:this.QW(),CD:this.CD},this)},n}(Bv),Uv=function(t){return t.DELETE="DELETE",t.GET="GET",t.HEAD="HEAD",t.OPTIONS="OPTIONS",t.POST="POST",t.PUT="PUT",t}({}),Lv=function(t){return t.cE="same-origin",t.fw="no-cors",t.lE="cors",t.dE="navigate",t}({}),Fv=function(t,n){var i,e,r,o,u,s,f,h,c,a,v,d,l,w,b,g,m,p,y=t.Iu;n?(i=n.fE,e=n._E,r=n.gE,o=n.vE,u=n.zD,s=n.wE,f=n.$f,h=n.ow,c=n.mE,a=n.pE,v=n.AE,d=n.yE,l=n.iw,w=n.bE,b=n.TE):(i=null,e={},r="GET",o=ah.RM,u=0,s=0,h="",c="",a="",v=!1,l=void 0,w=!1,b=void 0),this.Iu=y,this.fE=t.fE||i,this._E=new vh(t._E||e),this.gE=t.gE||r,this.vE=t.vE||o,this.zD=void 0!==t.zD?Number(t.zD)||0:u,this.wE=void 0!==t.wE?Number(t.wE)||0:s,this.$f=t.$f||f||(new tn).$f,this.ow=t.ow||h,this.mE=t.mE||c,this.pE=t.pE||a,this.AE=void 0!==t.AE?Boolean(t.AE):v,this.yE=t.yE||d,this.iw=null!=(g=t.iw)?g:l,this.bE=null!=(m=t.bE)?m:w,this.TE=null!=(p=t.TE)?p:b},zv=function(){function t(){}var n=t.prototype;return n.CD=function(t){var n=function(t){return new Mv({lp:null,_E:{},CD:t,LE:t.Iu,vE:t.vE,PD:0,YR:ch.gb})}(new Fv(t));return Z.resolve(n)},n.dG=function(t){},n.gn=function(){},t}();var Wv=function(){function t(t,n){void 0===n&&(n=!0),this.HW=t,this.ZW=n}var n=t.prototype;return n.CD=function(t){var n=this.WW(t);return this.HW.CD(n)},n.dG=function(t){return this.HW.dG(this.XW(t))},n.WW=function(n){var i=new Fv(n);if(!this.ZW){var e=t.qW(i.Iu);i=new Fv({Iu:e},i)}return i},n.XW=function(n){var i=n.Iu;return this.ZW||(i=t.qW(i)),{Iu:i,fE:n.fE}},n.gn=function(){this.HW.gn()},t.qW=function(t){return Et.KW&&jn(t,"http://")?t.replace(":","s:"):t},Nt(t,null,[{key:"GW",get:function(){return t.VW||(t.VW=new t(new zv)),t.VW}}]),t}();Wv.VW=void 0;var qv=function(t){return t.kD="HttpOpenError",t.LD="HttpResponseError",t.xD="HttpTimeoutError",t}({}),Hv=function(t){function n(n,i,e){var r;return(r=t.call(this,i,e)||this).jD=n,r}return Dt(n,t),Nt(n,[{key:"CD",get:function(){return this.jD}}]),n}(Jt);var Vv=function(t){function n(n,i){return t.call(this,n,function(t){return"Error while opening "+t+". Invalid URL."}(n.Iu),i)||this}return Dt(n,t),Nt(n,[{key:"name",get:function(){return qv.kD}}]),n}(Hv);var Xv=function(t){function n(n,i,e){var r;return(r=t.call(this,n.CD,null!=e?e:function(t){return"Error while loading "+t.CD.Iu+", status code "+t.PD}(n),i)||this).RD=n,r}return Dt(n,t),Nt(n,[{key:"name",get:function(){return qv.LD}},{key:"OD",get:function(){return this.RD}}]),n}(Hv);var jv=function(t){function n(n,i){return t.call(this,n,function(t){return"Request for "+t.Iu+" timed out after "+t.zD+" seconds."}(n),i)||this}return Dt(n,t),Nt(n,[{key:"name",get:function(){return qv.xD}}]),n}(Hv),Yv=self.fetch,Kv=self.Request,Gv=self.Response,$v=self.Headers,Zv=self.ReadableStream,Jv=self.AbortSignal,Qv=self.AbortController,td=Rt((function(){try{return wt(Yv)&&bt(Kv)&&bt(Gv)&&bt($v)&&"forEach"in $v.prototype&&Oo()}catch(t){return!1}})),nd=["http:","https:"];var id=Rt((function(){try{return td()&&bt(Jv)&&bt(Qv)&&"signal"in Kv.prototype}catch(t){return!1}})),ed=Rt((function(){try{return td()&&bt(Zv)&&"body"in Gv.prototype&&!ji.Ak}catch(t){return!1}}));function rd(t,n){var i,e=t._E.has("content-length")?Number(t._E.get("content-length")):void 0;return i=t.jW?function(t,n,i){return t.pipeThrough(new rv(new od(n,i)))}(t.EW(),n,e):function(t,n,i){return ud.apply(this,arguments)}(t.oP(),n,e),new Mv({lp:i,CD:t.CD},t)}var od=function(){function t(t,n){this.zet=t,this.Bet=n,this.x3=0}var n=t.prototype;return n.transform=function(t,n){this.x3+=t.byteLength,this.zet(this.x3,this.Bet),n.enqueue(t)},n.flush=function(t){var n;this.zet(this.x3,null!=(n=this.Bet)?n:this.x3)},t}();function ud(){return ud=ut((function(t,n,i){var e,r;return st(this,(function(o){switch(o.label){case 0:return[4,Z.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]}}))})),ud.apply(this,arguments)}var sd=function(){function t(t){this.vO=new tn,this.RD=void 0,this.zT=0,this.Qet=!1,this.jD=t,this.vO.e_(t.$f),this.OD=this.Uet()}var n=t.prototype;return n.Uet=function(){var t=this;return ut((function(){var n,i,e,r,o,u,s,f,h;return st(this,(function(c){switch(c.label){case 0:(n=t.jD).zD&&(t.zT=a((function(){t.Qet=!0,t.vO.i_()}),n.zD),t.vO.$f.Kf((function(){v(t.zT)})));try{i=Yv(n.Iu,{method:n.gE,headers:n._E.ZD(),body:n.fE,credentials:n.AE?"include":"same-origin",signal:cd(t.vO.$f),mode:n.iw,keepalive:n.TE})}catch(t){throw new Vv(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(),en(o=t.Fet(r))&&t.vO.i_(),o;case 4:if(u=e.url||n.Iu,s=0===e.status&&"file:"===function(t){return Et.Ah(t).protocol}(u)?200:e.status,f=new fd(t,e,t.vO),!function(t){return t.PD>=200&&t.PD<=299||304===t.PD}(h=new Mv({lp:f,CD:n,vE:n.vE,_E:ad(e.headers),PD:s,YR:e.statusText,LE:u})))throw new Xv(h);return n.yE&&(h=rd(h,n.yE)),[2,h]}}))}))()},n.Fet=function(t){return function(t){return t instanceof Hv}(t)?t:en(t)?this.Qet?new jv(this.jD):new nn(t.message,t):this.RD?new Xv(this.RD,t):new Vv(this.jD,t)},t}(),fd=function(t){function n(n,i,e){var r;return(r=t.call(this)||this).PW=new iu,r.Get=n,r.Yet=i,r.vO=e,r.PW.$L.catch(kt),r}Dt(n,t);var i=n.prototype;return i.RW=function(){return this.PW.$L},i.kE=function(t){return this.zW(this.Yet.text(),t)},i.oP=function(t){return this.zW(this.Yet.arrayBuffer(),t)},i.EW=function(){var t=this.Yet.body;return t?this.BW(t):pv(this.oP().then(gv),this.vO)},i.QW=function(){var t=this.Yet.clone(),i=Ct(this.vO.s_(),2),e=i[0],r=i[1];return this.vO=e,new n(this.Get,t,r)},i.zW=function(t,n){var i=this;n&&this.vO.e_(n);var e=rn(Z.resolve(t),this.vO.$f).catch((function(t){throw i.Get.Fet(t)}));return e=on(e,this.vO),this.PW.e_(e.then(kt)),e},i.BW=function(t){var n=this;return new Ga(new vd(t,(function(t){return n.Get.Fet(t)}),this.vO,this.PW),{highWaterMark:0})},Nt(n,[{key:"LW",get:function(){return this.Yet.bodyUsed}},{key:"jW",get:function(){return vt(this.Yet.body)}}]),n}(Ev),hd="abort";function cd(t){if(id()){var n=new Qv;if(t.Gf)n.abort();else if(!t.Vf){var i=function(){e(),n.abort()},e=function(){n.signal.removeEventListener(hd,i),t.qf(i),t.Jf(e)};n.signal.addEventListener(hd,i),t.Zf(i),t.Kf(e)}return n.signal}}function ad(t){if(function(t){return lt(t)&&"function"==typeof t.forEach}(t)){var n=new vh;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 vh(t)}var vd=function(){function t(t,n,i,e){this.Vet=t,this.Wet=n,this.vO=i,this.PW=e}var n=t.prototype;return n.start=function(t){this.DV=this.Vet.getReader()},n.pull=function(t){var n=this;return ut((function(){var i,e,r;return st(this,(function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),[4,rn(n.DV.read(),n.vO.$f)];case 1:return i=o.sent(),[3,3];case 2:return e=o.sent(),r=n.Wet(e),n.PW.KL(r),n.vO.i_(),n.DV.cancel(r).catch(kt),t.error(r),[2];case 3:return i.done?(n.PW.qL(),n.vO.i_(),t.close()):t.enqueue(i.value),[2]}}))}))()},n.cancel=function(t){return this.vO.i_(),this.PW.KL(t),this.DV.cancel(t)},t}(),dd=function(){function t(t){var n=this;this.vO=new tn,this.RD=void 0,this.Het=new iu,this.ist=!1,this.tst=function(){var t;n.Zet(),null==(t=n.Xet)||t.abort()},this.jD=t,this.vO.e_(t.$f),this.Xet=new T,this.Uet()}var n=t.prototype;return n.Uet=function(){var t=this,n=this.Xet,i=this.jD;if(i.$f.Gf)return this.Zet();n.onreadystatechange=function(){return t.qet()},n.onprogress=function(n){return t.zet(n)},n.onload=function(){return t.Ket()},n.onloadend=function(){return t.Jet()},n.onerror=function(){return t._q()},n.ontimeout=function(){return t.$et()},n.onabort=function(){return t.Zet()},n.open(i.gE,i.Iu,!0),n.withCredentials=Boolean(i.AE),"responseType"in n&&i.vE&&(i.vE===ah.RM?n.responseType="text":n.responseType="arraybuffer"),i._E.forEach((function(t,i){n.setRequestHeader(i,t)})),i.zD&&(n.timeout=i.zD),this.vO.$f.Zf(this.tst);var e=i.fE;e?n.send(e):n.send()},n.qet=function(){var t=this.Xet;void 0!==t&&t.readyState>=2&&!this.ist&&(this.ist=!0,this.sst())},n.sst=function(){var t,n,i=this.Xet,e=function(t){var n=new vh,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.jD;this.nst=new iu,this.RD=new Mv({CD:r,vE:r.vE,lp:this.nst.$L,PD:i.status,YR:i.statusText,_E:e,LE:null!=(n=i.responseURL)?n:e.get("X-Request-URL")}),null==(t=this.Het)||t.qL(this.RD)},n.Ket=function(){var t,n=this.Xet;if(void 0!==n){var i=n.response;if(!vt(i)){var e=this.jD.vE;i=e===ah.RM?n.responseText:e===ah.WD?new ArrayBuffer(0):{}}null==(t=this.nst)||t.qL(i)}},n.Jet=function(){this.gn()},n.zet=function(t){void 0!==this.Xet&&(null==this.jD.yE||this.jD.yE.call(this.jD,t.loaded,t.lengthComputable?t.total:void 0))},n._q=function(){var t=new w("Network request failed");this.RD?this.Ss(new Xv(this.RD,t)):this.Ss(new Vv(this.jD,t))},n.$et=function(){this.Ss(new jv(this.jD))},n.Zet=function(){this.Ss(new nn),this.gn()},n.Ss=function(t){var n,i;null==(n=null!=(i=this.nst)?i:this.Het)||n.KL(t)},n.gn=function(){this.Xet=void 0,this.RD=void 0,this.Het=void 0,this.nst=void 0,this.vO.Hf()},Nt(t,[{key:"OD",get:function(){return this.Het.$L}}]),t}();var ld=function(){function t(){}var n=t.prototype;return n.CD=function(t){return function(t){if(!td()||!function(t){try{return nd.indexOf(new self.URL(t,self.location.href).protocol)>=0}catch(t){return!1}}(t.Iu))return!1;if(!ed()&&t.yE)return!1;if(!t.bE){if(ji.Qk&&ji.Ek<=68)return!1;if(ji.Pk)return!1}return!0}(t)?new sd(t).OD:new dd(t).OD},n.dG=function(t){var n=t.Fz?{"Content-type":t.Fz}:void 0;this.CD(new Fv({gE:Uv.POST,Iu:t.Iu,fE:t.fE,_E:n,iw:Lv.fw})).then((function(t){!function(t){t.then(kt,kt)}(t.oP())}),kt)},n.gn=function(){},t}();var wd=function(t){return t[t.tD=1]="tD",t[t.iD=2]="iD",t[t.RM=3]="RM",t[t.eD=4]="eD",t[t.sD=9]="sD",t}({});var bd=function(t){function n(n){return t.call(this,"Invalid XML",n)||this}return Dt(n,t),n}(Jt),gd=function(){function t(){}return t.prototype.wD=function(t){var n,i=new DOMParser;try{n=i.parseFromString(t,"text/xml")}catch(t){throw new bd(t)}if(!n||n.getElementsByTagName("parsererror").length>0)throw new bd;return new Ed(n)},t}(),md=function(){function t(t){this.rst=t}var n=t.prototype;return n.$I=function(t){return this.rst.isEqualNode(t.rst)},n.oD=function(n){return new t(this.rst.cloneNode(n))},Nt(t,[{key:"nD",get:function(){return wd.iD}},{key:"vD",get:function(){var t;return null!=(t=this.rst.localName)?t:Rd(this.rst.nodeName)}},{key:"l",get:function(){return this.rst.nodeName}},{key:"ost",get:function(){var t;return null!=(t=this.rst.namespaceURI)?t:void 0}},{key:"hst",get:function(){var t;return null!=(t=this.rst.prefix)?t:void 0}},{key:"cM",get:function(){return this.rst.nodeValue}}]),t}(),pd=function(){function t(t){this.ast=void 0,this.ust=t}var n=t.prototype;return n._D=function(t){return this.MD.filter((function(n){return Id(n)&&n.hP===t}))},n.fD=function(t,n){return this.MD.filter((function(i){return Id(i)&&i.vD===n&&i.ost===t}))},n.bD=function(t){this.ust.appendChild(t.VI),this.ast&&this.ast.push(t)},n.$I=function(t){return this.ust.isEqualNode(t.VI)},Nt(t,[{key:"MD",get:function(){return void 0===this.ast&&(this.ast=function(t){for(var n=[],i=0;i<t.length;i++){var e=kd(t.item(i));e&&n.push(e)}return n}(this.ust.childNodes)),this.ast}},{key:"m",get:function(){return this.MD.filter(Id)}},{key:"VI",get:function(){return this.ust}}]),t}(),yd=function(t){function n(n){return t.call(this,n)||this}Dt(n,t);var i=n.prototype;return i.pD=function(t){if(this.ust.hasAttribute(t))return this.ust.getAttribute(t)},i.yD=function(t,n){if(this.ust.hasAttributeNS(t,n))return this.ust.getAttributeNS(t,n)},i.cD=function(t){this.ust.removeAttribute(t)},i.cst=function(t,n){this.ust.removeAttributeNS(t,n)},i.lst=function(t,n){this.ust.setAttribute(t,n)},i.dst=function(t,n,i){this.ust.setAttributeNS(t,n,i)},i.oD=function(t){return new n(this.ust.cloneNode(t))},Nt(n,[{key:"nD",get:function(){return wd.tD}},{key:"vD",get:function(){var t;return null!=(t=this.ust.localName)?t:Rd(this.ust.nodeName)}},{key:"ost",get:function(){var t;return null!=(t=this.ust.namespaceURI)?t:void 0}},{key:"hst",get:function(){var t;return null!=(t=this.ust.prefix)?t:void 0}},{key:"hP",get:function(){return this.ust.nodeName}},{key:"gD",get:function(){return function(t){for(var n=[],i=0;i<t.length;i++)n.push(new md(t.item(i)));return n}(this.ust.attributes)}},{key:"tP",get:function(){return this.ust.textContent}}]),n}(pd),_d=function(){function t(t){this.ust=t}return t.prototype.$I=function(t){return this.lp===t.lp},Nt(t,[{key:"lp",get:function(){return this.ust.nodeValue}},{key:"VI",get:function(){return this.ust}}]),t}(),Sd=function(t){function n(n){return t.call(this,n)||this}return Dt(n,t),n.prototype.oD=function(t){return new n(this.ust.cloneNode(t))},Nt(n,[{key:"nD",get:function(){return wd.RM}}]),n}(_d),Td=function(t){function n(n){return t.call(this,n)||this}return Dt(n,t),n.prototype.oD=function(t){return new n(this.ust.cloneNode(t))},Nt(n,[{key:"nD",get:function(){return wd.eD}}]),n}(_d),Ed=function(t){function n(n){return t.call(this,n)||this}return Dt(n,t),n.prototype.oD=function(t){return new n(this.ust.cloneNode(t))},Nt(n,[{key:"nD",get:function(){return wd.sD}},{key:"mD",get:function(){return new yd(this.ust.documentElement)}}]),n}(pd);function Id(t){return function(t){return 1===t.nD}(t)}function kd(t){switch(t.nodeType){case wd.tD:return new yd(t);case wd.RM:return new Sd(t);case wd.eD:return new Td(t)}}function Rd(t){var n=t.indexOf(":");return n<0?t:t.substr(n+1)}var Od=function(t){function n(){var n;return(n=t.apply(this,arguments)||this).fst=void 0,n.gst=ed(),n.vst=ji.gL||ji.Ak,n.wst=(ji.gL||ji.Qk&&ji.Ek<=68||ji.Ak)&&!(ji.Pk&&ji.Bk<3),n.bst=void 0,n.Tst=new gd,n}return Dt(n,t),n.prototype.wD=function(t){return this.Tst.wD(t)},Nt(n,[{key:"ket",get:function(){return this.fst||(this.fst=new Ko(rh())),this.fst}},{key:"_st",get:function(){return this.gst}},{key:"O0",get:function(){return this.vst}},{key:"q0",get:function(){return this.wst}},{key:"mst",get:function(){return!1}},{key:"UP",get:function(){return uh.MF()}},{key:"pst",get:function(){return{Ast:hh}}},{key:"yst",get:function(){return c.connection&&c.connection.effectiveType||"default"}},{key:"Mst",get:function(){return c.connection&&c.connection.type||"unknown"}},{key:"aR",get:function(){return this.bst||(this.bst=new Wv(new ld)),this.bst}}]),n}(ko);It(new Od),It(new Od);var Nd=self;Nd.addEventListener("install",(function(t){t.waitUntil(Nd.skipWaiting())})),Nd.addEventListener("activate",(function(t){t.waitUntil(Nd.clients.claim())})),Ci.TR.ur(Nd)}("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof s?s:"undefined"!=typeof global?global:this);
|