@theoplayer/theoads 8.9.0 → 8.11.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/README.md +1 -1
- package/THEOplayer.chromeless.d.ts +1 -1
- package/THEOplayer.chromeless.esm.js +2 -2
- package/THEOplayer.chromeless.js +3 -3
- package/THEOplayer.common.d.ts +30 -0
- package/THEOplayer.common.esm.js +3 -3
- package/THEOplayer.d.ts +1 -1
- package/THEOplayer.esm.js +3 -3
- package/THEOplayer.js +3 -3
- package/THEOplayer.transmux.asmjs.js +3 -3
- package/THEOplayer.transmux.js +3 -3
- package/package.json +1 -1
- package/theoplayer.d.js +3 -3
- package/theoplayer.sw.js +3 -3
package/theoplayer.sw.js
CHANGED
|
@@ -24,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: 2025-
|
|
27
|
+
Version: 8.11.0
|
|
28
|
+
Created: 2025-02-12T15:48:42.368Z
|
|
29
29
|
*/
|
|
30
|
-
!function(t){"use strict";var n,i,e,r,o,u,s,f,h,c=t.window,a=t.document,v=(t.location,t.navigator),d=t.setTimeout,l=t.clearTimeout,w=t.setInterval,b=t.clearInterval,g=t.Error,m=t.TypeError,p=(t.SyntaxError,t.Object),y=t.Math,_=t.parseInt,S=t.parseFloat,T=t.isNaN,E=t.Uint8Array,I=(t.Worker,t.WorkerGlobalScope,t.XMLHttpRequest);function k(t){return t&&void 0!==n&&t.constructor===n?"symbol":typeof t}"function"==typeof Symbol&&Symbol.iterator?(n=Symbol,i=null!=(u=Symbol.for)?u:Symbol,e=Symbol.iterator,r=null!=(s=Symbol.dispose)?s:i("Symbol.dispose"),o=null!=(f=Symbol.asyncDispose)?f:i("Symbol.asyncDispose")):(h=0,i=function(t){return"ul"+t},e=(n=function(t){return"ul"+t+"_"+ ++h}).for("Symbol.iterator"),r=n.for("Symbol.dispose"),o=n.for("Symbol.asyncDispose"),n.for=i,n.iterator=e,n.dispose=r,n.asyncDispose=o);var R=d;function O(t){return Boolean(t&&void 0!==t.length)}function N(){}function P(t){if(!(this instanceof P))throw new m("Promises must be constructed via new");if("function"!=typeof t)throw new m("not a function");this.Ea=0,this.ttn=!1,this.yTt=void 0,this.ntn=[],M(t,this)}function A(t,n){for(;3===t.Ea;)t=t.yTt;0!==t.Ea?(t.ttn=!0,P.itn((function(){var i=1===t.Ea?n.onFulfilled:n.onRejected;if(null!==i){var e;try{e=i(t.yTt)}catch(t){return void C(n.promise,t)}D(n.promise,e)}else(1===t.Ea?D:C)(n.promise,t.yTt)}))):t.ntn.push(n)}function D(t,n){try{if(n===t)throw new m("A promise cannot be resolved with itself.");if(n&&("object"===(void 0===n?"undefined":k(n))||"function"==typeof n)){var i=n.then;if(n instanceof P)return t.Ea=3,t.yTt=n,void x(t);if("function"==typeof i)return void M(function(t,n){return function(){t.apply(n,arguments)}}(i,n),t)}t.Ea=1,t.yTt=n,x(t)}catch(n){C(t,n)}}function C(t,n){t.Ea=2,t.yTt=n,x(t)}function x(t){2===t.Ea&&0===t.ntn.length&&P.itn((function(){t.ttn||P.rtn(t.yTt)}));for(var n=0,i=t.ntn.length;n<i;n++)A(t,t.ntn[n]);t.ntn=null}function B(t,n,i){this.onFulfilled="function"==typeof t?t:null,this.onRejected="function"==typeof n?n:null,this.promise=i}function M(t,n){var i=!1;try{t((function(t){i||(i=!0,D(n,t))}),(function(t){i||(i=!0,C(n,t))}))}catch(t){if(i)return;i=!0,C(n,t)}}P.prototype.catch=function(t){return this.then(null,t)},P.prototype.then=function(t,n){var i=new this.constructor(N);return A(this,new B(t,n,i)),i},P.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)}))}))},P.all=function(t){return new P((function(n,i){if(!O(t))return i(new m("Promise.all accepts an array"));var e=Array.prototype.slice.call(t);if(0===e.length)return n([]);var r=e.length;function o(t,u){try{if(u&&("object"===(void 0===u?"undefined":k(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])}))},P.allSettled=function(t){return new this((function(n,i){if(!t||void 0===t.length)return i(new m((void 0===t?"undefined":k(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":k(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])}))},P.resolve=function(t){return t&&"object"===(void 0===t?"undefined":k(t))&&t.constructor===P?t:new P((function(n){n(t)}))},P.reject=function(t){return new P((function(n,i){i(t)}))},P.race=function(t){return new P((function(n,i){if(!O(t))return i(new m("Promise.race accepts an array"));for(var e=0,r=t.length;e<r;e++)P.resolve(t[e]).then(n,i)}))},P.itn="function"==typeof setImmediate&&function(t){setImmediate(t)}||function(t){R(t,0)},P.rtn=function(t){"undefined"!=typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",t)};var U=function(){var t=self.Promise;if(void 0!==t)try{if(-1!==t.toString().indexOf("[native code]"))return t}catch(t){}}(),L=v?v.userAgent:"",F=L.match(/Firefox\/([0-9]+)/i),z=null!=F,W=F?Number(F[1]):0,q=L.match(/(Version)\/((\d+)\.(\d+)(?:\.(\d+))?).*Safari/),H=null!=q,V=q?Number(q[3]):0,X=function(){function t(t){this.Kx=0,this.iW=0,this.QC=[],this.etn=t}return t.prototype.utn=function(t){var n=this.length();this.stn(n+1);var i=this.iW+n&this.etn-1;this.QC[i]=t,this.Kx=n+1},t.prototype.push=function(t){var n=this.length()+1;if(this.etn<n)this.utn(t);else{var i=this.iW+n-1,e=this.etn-1;this.QC[i&e]=t,this.Kx=n}},t.prototype.shift=function(){var t=this.iW,n=this.QC[t];return this.QC[t]=void 0,this.iW=t+1&this.etn-1,this.Kx--,n},t.prototype.length=function(){return this.Kx},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.iW+this.Kx&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.QC,0,n,i)},t}();var j="unhandledrejection",Y=self.PromiseRejectionEvent,K=self.CustomEvent;function G(t){return new Y(j,{reason:t,promise:U.reject(t).catch((function(){})),cancelable:!0})}function $(t){var n=new K(j,{detail:{reason:t},cancelable:!0});return p.defineProperty(n,"reason",{value:t}),n}function Z(t){var n=a.createEvent("CustomEvent");return n.initCustomEvent(j,!1,!0,{reason:t}),n}var J,Q,tt,nt,it,et,rt,ot,ut=function(t){return ut=function(){try{var t=U.resolve(),n="error",i=new Y(j,{reason:n,promise:t});return j===i.type&&n===i.reason}catch(t){}return!1}()?G:function(){try{var t="error",n=new K(j,{detail:{reason:t}});return j===n.type&&t===n.detail.reason}catch(t){}return!1}()?$:Z,ut(t)};function st(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):Q.resolve(f).then(e,r)}function ft(t){return function(){var n=this,i=arguments;return new Q((function(e,r){var o=t.apply(n,i);function u(t){st(o,e,r,u,s,"next",t)}function s(t){st(o,e,r,u,s,"throw",t)}u(void 0)}))}}function ht(t,i){var r,o,u,s={label:0,sent:function(){if(1&u[0])throw u[1];return u[1]},trys:[],ops:[]},f=p.create(("function"==typeof Iterator?Iterator:p).prototype);return f.next=h(0),f.throw=h(1),f.return=h(2),"function"==typeof n&&(f[e]=function(){return this}),f;function h(n){return function(e){return function(n){if(r)throw new m("Generator is already executing.");for(;f&&(f=0,n[0]&&(s=0)),s;)try{if(r=1,o&&(u=2&n[0]?o.return:n[0]?o.throw||((u=o.return)&&u.call(o),0):o.next)&&!(u=u.call(o,n[1])).done)return u;switch(o=0,u&&(n=[2&n[0],u.value]),n[0]){case 0:case 1:u=n;break;case 4:return s.label++,{value:n[1],done:!1};case 5:s.label++,o=n[1],n=[0];continue;case 7:n=s.ops.pop(),s.trys.pop();continue;default:if(!(u=s.trys,(u=u.length>0&&u[u.length-1])||6!==n[0]&&2!==n[0])){s=0;continue}if(3===n[0]&&(!u||n[1]>u[0]&&n[1]<u[3])){s.label=n[1];break}if(6===n[0]&&s.label<u[1]){s.label=u[1],u=n;break}if(u&&s.label<u[2]){s.label=u[2],s.ops.push(n);break}u[2]&&s.ops.pop(),s.trys.pop();continue}n=i.call(t,s)}catch(t){n=[6,t],o=0}finally{r=u=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}([n,e])}}}U&&!(z&&W<60||H&&V<15)?Q=U:(Q=P,rt=null!==(J=function(){var t=self.queueMicrotask;if("function"==typeof t)return function(n){return t(n)};var n=U;if(n&&"function"==typeof n.resolve){var i=n.resolve();return function(t){return i.then(t)}}}())&&void 0!==J?J:P.itn,tt=rt,nt=new X(16),it=!1,(ot={h3:function(t){nt.push(t),it||(it=!0,tt(et))},IG:et=function(){for(;nt.length()>0;)nt.shift()();it=!1}}).IG,P.itn=ot.h3,P.rtn=function(t){try{var n=ut(t);if(!self.dispatchEvent(n)||n.defaultPrevented)return}catch(t){}d((function(){throw new g("Unhandled promise rejection: ".concat(t))}),0)});var ct="function"==typeof SuppressedError?SuppressedError:function(t,n,i){var e=new g(i);return e.name="SuppressedError",e.error=t,e.suppressed=n,e};function at(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 vt(t,n){if(t){if("string"==typeof t)return at(t,n);var i=p.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(i):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?at(t,n):void 0}}function dt(t){return function(t){if(Array.isArray(t))return at(t)}(t)||function(t){if(void 0!==n&&null!=t[e]||null!=t["@@iterator"])return Array.from(t)}(t)||vt(t)||function(){throw new m("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var lt={}.toString;function wt(t){return null!=t}var bt=Array.isArray||function(t){return"[object Array]"===lt.call(t)};function gt(t){return"object"===(void 0===t?"undefined":k(t))&&null!==t}function mt(t){return"function"==typeof t}function pt(t){return mt(t)||gt(t)}var yt=9007199254740991,_t=(y.pow(2,-52),Array.prototype.find,Array.prototype.findLast,"function"==typeof Array.prototype.findIndex?function(t,n){return t.findIndex(n)}:function(t,n){for(var i=0;i<t.length;i+=1){if(n(t[i],i,t))return i}return-1}),St="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 Tt(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 Et(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 It(t,n){return-1!==t.indexOf(n)}function kt(t){t.length=0}var Rt;Array.prototype.flat,Array.prototype.flatMap;function Ot(t){Rt=t}var Nt=function(){};function Pt(t){var n;return function(){return void 0!==t&&(n=t(),t=void 0),n}}function At(t,n){for(var i=0;i<n.length;i++){var e=n[i];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),p.defineProperty(t,e.key,e)}}function Dt(t,n,i){return n&&At(t.prototype,n),i&&At(t,i),t}var Ct=function(t){return t._b="audio",t.gb="video",t.hE="metadata",t}({});function xt(t,n){return xt=p.setPrototypeOf||function(t,n){return t.__proto__=n,t},xt(t,n)}function Bt(t,n){if("function"!=typeof n&&null!==n)throw new m("Super expression must either be null or a function");t.prototype=p.create(n&&n.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),n&&xt(t,n)}function Mt(t,i){return function(t){if(Array.isArray(t))return t}(t)||function(t,i){var r=null==t?null:void 0!==n&&t[e]||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),!i||s.length!==i);f=!0);}catch(t){h=!0,u=t}finally{try{f||null==r.return||r.return()}finally{if(h)throw u}}return s}}(t,i)||vt(t,i)||function(){throw new m("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ut(){var t=p.create(null);return t.Kf=void 0,delete t.Kf,t}function Lt(){return new zt}var Ft="undefined"!=typeof Map&&"entries"in Map.prototype?Map:void 0,zt=Ft||function(){var t=function(){function t(t,n){this.index=0,this.data=t,this.selector=n,this.keys=p.keys(t)}return t.prototype.next=function(){var t=this.index;return t<this.keys.length?(this.index++,{value:this.selector(this.data,this.keys[t]),done:!1}):{value:void 0,done:!0}},t}();return function(){function n(){this.data=Ut(),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=Ut(),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}()}();Ft||function(){var t=function(){function t(t,n){this.Jf=t,this.$f=n}return t.prototype.next=function(){var t=this.Jf.next();return t.done?t:{value:this.$f(t.value),done:!1}},t}();(function(){function n(){this.gf=Lt()}var i=n.prototype;i.get=function(t){return this.gf.get(""+t)},i.set=function(t,n){return this.gf.set(""+t,n),this},i.has=function(t){return this.gf.has(""+t)},i.delete=function(t){return this.gf.delete(""+t)},i.clear=function(){this.gf.clear()},i.keys=function(){return new t(this.gf.keys(),(function(t){return Number(t)}))},i.values=function(){return this.gf.values()},i.entries=function(){return new t(this.gf.entries(),(function(t){var n=Mt(t,2),i=n[0],e=n[1];return[Number(i),e]}))},i.forEach=function(t){this.gf.forEach((function(n,i){t(n,Number(i))}))},Dt(n,[{key:"size",get:function(){return this.gf.size}}])})()}();var Wt=function(t){return t.jE="#EXTINF",t.jPt="#EXT-X-MAP",t.i="#EXTM3U",t.p="#EXT-X-VERSION",t.en="#EXT-X-TARGETDURATION",t.Hbt="#EXT-X-START",t.ui="#EXT-X-INDEPENDENT-SEGMENTS",t.EE="#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}({}),qt=function(){function t(t,n){this.pw="#EXTINF",this.nv=t,this.ev=n}return t.prototype.nm=function(){return this.pw+":"+this.nv+",\n"+this.ev},t}(),Ht=function(){function t(t){this.pw="#EXT-X-MAP",this.ev=t}return t.prototype.nm=function(){return this.pw+':URI="'+this.ev+'"'},t}(),Vt=function(){function t(){this.pw="#EXTM3U"}return t.prototype.nm=function(){return this.pw},t}(),Xt=function(){function t(t){this.pw="#EXT-X-VERSION",this.oA=t}return t.prototype.nm=function(){return this.pw+":"+this.oA},t}(),jt=function(){function t(t){this.pw="#EXT-X-TARGETDURATION",this.SPt=t}return t.prototype.nm=function(){return this.pw+":"+this.SPt},t}(),Yt=function(){function t(t){this.pw="#EXT-X-START",this.NRt=t}return t.prototype.nm=function(){return this.pw+":TIME-OFFSET="+this.NRt},t}(),Kt=function(){function t(t,n,i){this.uri=t,this.keyFormat=n,this.keyFormatVersions=i,this.pw="#EXT-X-KEY"}return t.prototype.nm=function(){return this.pw+':METHOD=SAMPLE-AES,URI="'+this.uri+'",KEYFORMAT="'+this.keyFormat+'",KEYFORMATVERSIONS="'+this.keyFormatVersions+'"'},t}(),Gt=function(){function t(t){this.pw="#EXT-X-STREAM-INF",this.Fz=1,this.ev=t}return t.prototype.nm=function(){return this.pw+":BANDWIDTH="+this.Fz+',AUDIO="audio"\n'+this.ev},t}(),$t=function(){function t(t){this.pw="#EXT-X-MEDIA-SEQUENCE",this.bM=t}return t.prototype.nm=function(){return this.pw+":"+this.bM},t}(),Zt=function(){function t(t){this.pw="#EXT-X-MEDIA",this.ev=t}return t.prototype.nm=function(){var t=Lt();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.pw+":"+n.join(",")},t}(),Jt=function(){function t(t){this.pC=[],this.pC=t}var n=t.prototype;return n.qA=function(){return this.pC},n.sv=function(t){this.pC.push(t)},n.$Bt=function(){for(var t="",n=0,i=this.qA();n<i.length;n++){t+=i[n].nm()+"\n"}return t},n.c_=function(){this.pC.length=0},t}(),Qt=function(t){function n(n,i){var e;return e=t.call(this,[new Vt,new Xt(8)])||this,i&&e.sv(new Gt("video/index.m3u8")),n&&e.sv(new Zt("audio/index.m3u8")),e}return Bt(n,t),n}(Jt),tn=function(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];g.apply(this,n)};(tn.prototype=p.create(g.prototype)).constructor=tn;var nn=function(t){function n(n,i){var e;return(e=t.call(this)||this).message=n||"Unknown error",e.cause=i,g.captureStackTrace&&g.captureStackTrace(e,e.constructor),e}return Bt(n,t),Dt(n,[{key:"name",get:function(){return"BaseError"}}]),n}(tn),en=function(t){function n(n,i){return t.call(this,n||"Aborted",i)||this}return Bt(n,t),Dt(n,[{key:"name",get:function(){return"AbortError"}}]),n}(nn);function rn(t){return t instanceof g&&"AbortError"===t.name}function on(t,n){return n?new Q((function(i,e){if(n.s_)return t.catch(Nt),e(new en);var r=function(){n.n_(r),e(new en)};n.r_(r),t.then((function(t){n.n_(r),i(t)}),(function(t){n.n_(r),e(t)}))})):t}function un(t,n){return sn.apply(this,arguments)}function sn(){return sn=ft((function(t,n){var i,e;return ht(this,(function(u){switch(u.label){case 0:i={stack:[],error:void 0,hasError:!1},u.label=1;case 1:return u.trys.push([1,3,4,5]),function(t,n,i){if(null!=n){if("object"!=typeof n&&"function"!=typeof n)throw new m("Object expected.");var e,u;if(i){if(!o)throw new m("Symbol.asyncDispose is not defined.");e=n[o]}if(void 0===e){if(!r)throw new m("Symbol.dispose is not defined.");e=n[r],i&&(u=e)}if("function"!=typeof e)throw new m("Object not disposable.");u&&(e=function(){try{u.call(this)}catch(t){return Q.reject(t)}}),t.stack.push({value:n,dispose:e,async:i})}else i&&t.stack.push({async:!0});return n}(i,n,!1),[4,t];case 2:return[2,u.sent()];case 3:return e=u.sent(),i.error=e,i.hasError=!0,[3,5];case 4:return function(t){function n(n){t.error=t.hasError?new ct(n,t.error,"An error was suppressed during disposal."):n,t.hasError=!0}var i,e=0;(function r(){for(;i=t.stack.pop();)try{if(!i.async&&1===e)return e=0,t.stack.push(i),Q.resolve().then(r);if(i.dispose){var o=i.dispose.call(i.value);if(i.async)return e|=2,Q.resolve(o).then(r,(function(t){return n(t),r()}))}else e|=1}catch(t){n(t)}if(1===e)return t.hasError?Q.reject(t.error):Q.resolve();if(t.hasError)throw t.error})()}(i),[7];case 5:return[2]}}))})),sn.apply(this,arguments)}var fn=function(){function t(){this.s_=!1,this.a_=!1,this.u_=[],this.l_=[]}var n=t.prototype;return n.h_=function(){if(!this.s_&&!this.a_){this.s_=!0;for(var t=0,n=this.u_.slice();t<n.length;t++){(0,n[t])()}this.c_()}},n.c_=function(){if(!this.a_){this.a_=!0;for(var t=0,n=this.l_.slice();t<n.length;t++){(0,n[t])()}kt(this.u_),kt(this.l_)}},n.r_=function(t){this.a_||this.u_.push(t)},n.n_=function(t){this.a_||Tt(this.u_,t)},n.d_=function(t){this.a_||this.l_.push(t)},n.f_=function(t){this.a_||Tt(this.l_,t)},t}(),hn=function(){function t(){this.__=new fn}var n=t.prototype;return n.g_=function(){this.__.h_()},n.c_=function(){this.__.c_()},n.v_=function(t){var n=this.__;if(!n.s_)if(t.s_)n.h_();else if(!n.a_&&!t.a_){var i=function(){e(),n.h_()},e=function(){t.n_(i),t.f_(e),n.n_(i),n.f_(e)};t.r_(i),t.d_(e),n.r_(i),n.d_(e)}},n.w_=function(){var n=new t,i=new t,e=n.o_,r=i.o_,o=this.__,u=function(){e.s_&&r.a_||r.s_&&e.a_?o.h_():e.a_&&r.a_&&o.c_()};e.r_(u),r.r_(u),e.d_(u),r.d_(u),n.v_(o),i.v_(o);return o.d_((function(){e.n_(u),r.n_(u),e.f_(u),r.f_(u)})),[n,i]},n[r]=function(){this.g_()},t.m_=function(n){for(var i=new t,e=0;e<n.length;e++){var r=n[e];void 0!==r&&i.v_(r)}return i},Dt(t,[{key:"o_",get:function(){return this.__}}]),t}();Q.resolve();function cn(t,n){return new Q((function(i,e){if(void 0!==n&&n.s_)e(new en);else{var r=Rt.e_((function(){void 0!==n&&n.n_(o),i()}),t),o=function(){Rt.i_(r),e(new en)};void 0!==n&&n.r_(o)}}))}var an=function(){function t(t){var n=this;this.KO=[],this.JO=void 0,this.qO=new hn,this.$O=function(){return 0===n.KO.length?n.iP?vn(n.iP,n.qO.o_).then(n.eP,n.eP):n.eP():n.KO.shift()().then(n.$O)},this.eP=function(){if(0!==n.KO.length)return n.$O();n.JO=void 0},this.iP=t}var n=t.prototype;return n.Wo=function(t,n){var i=this;return new Q((function(e){var r=hn.m_([i.qO.o_,n]),o=function(){r.c_()};i.KO.push((function(){var n=vn(t,r.o_);return e(n),n.then(o,o)})),i.JO||(i.JO=i.$O())}))},n.g_=function(){return this.tP(!0)},n.gn=function(){return this.iP=void 0,this.tP(!1)},n.tP=function(t){var n=this.JO;return this.qO.g_(),t&&(this.qO=new hn),Q.resolve(n)},t}();function vn(t,n){return new Q((function(i){return i(t(n))}))}var dn=function(t){return t.W7="HELLO",t.H7="HI_THERE",t.X7="INITIALIZE",t.Z7="APPEND_INIT",t.q7="APPEND_DATA",t.K7="ACK",t.J7="REMOVE",t.ttt="DESTROY_SESSION",t}({}),ln=null;try{ln=new WebAssembly.Instance(new WebAssembly.Module(new E([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(tt){}function wn(t,n,i){this.low=0|t,this.high=0|n,this.unsigned=!!i}function bn(t){return!0===(t&&t.Ip)}function gn(t){var n=y.clz32(t&-t);return t?31-n:n}wn.prototype.Ip,p.defineProperty(wn.prototype,"Ip",{value:!0}),wn.isLong=bn;var mn={},pn={};function yn(t,n){var i,e,r;return n?(r=0<=(t>>>=0)&&t<256)&&(e=pn[t])?e:(i=Sn(t,0,!0),r&&(pn[t]=i),i):(r=-128<=(t|=0)&&t<128)&&(e=mn[t])?e:(i=Sn(t,t<0?-1:0,!1),r&&(mn[t]=i),i)}function _n(t,n){if(T(t))return n?An:Pn;if(n){if(t<0)return An;if(t>=Rn)return Mn}else{if(t<=-On)return Un;if(t+1>=On)return Bn}return t<0?_n(-t,n).neg():Sn(t%kn|0,t/kn|0,n)}function Sn(t,n,i){return new wn(t,n,i)}wn.fromInt=yn,wn.fromNumber=_n,wn.fromBits=Sn;var Tn=y.pow;function En(t,n,i){if(0===t.length)throw g("empty string");if("number"==typeof n?(i=n,n=!1):n=!!n,"NaN"===t||"Infinity"===t||"+Infinity"===t||"-Infinity"===t)return n?An:Pn;if((i=i||10)<2||36<i)throw RangeError("radix");var e;if((e=t.indexOf("-"))>0)throw g("interior hyphen");if(0===e)return En(t.substring(1),n,i).neg();for(var r=_n(Tn(i,8)),o=Pn,u=0;u<t.length;u+=8){var s=y.min(8,t.length-u),f=_(t.substring(u,u+s),i);if(s<8){var h=_n(Tn(i,s));o=o.mul(h).add(_n(f))}else o=(o=o.mul(r)).add(_n(f))}return o.unsigned=n,o}function In(t,n){return"number"==typeof t?_n(t,n):"string"==typeof t?En(t,n):Sn(t.low,t.high,"boolean"==typeof n?n:t.unsigned)}wn.fromString=En,wn.fromValue=In;var kn=4294967296,Rn=kn*kn,On=Rn/2,Nn=yn(1<<24),Pn=yn(0);wn.ZERO=Pn;var An=yn(0,!0);wn.UZERO=An;var Dn=yn(1);wn.ONE=Dn;var Cn=yn(1,!0);wn.UONE=Cn;var xn=yn(-1);wn.NEG_ONE=xn;var Bn=Sn(-1,2147483647,!1);wn.MAX_VALUE=Bn;var Mn=Sn(-1,-1,!0);wn.MAX_UNSIGNED_VALUE=Mn;var Un=Sn(0,-2147483648,!1);wn.MIN_VALUE=Un;var Ln=wn.prototype;Ln.toInt=function(){return this.unsigned?this.low>>>0:this.low},Ln.toNumber=function(){return this.unsigned?(this.high>>>0)*kn+(this.low>>>0):this.high*kn+(this.low>>>0)},Ln.toString=function(t){if((t=t||10)<2||36<t)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative()){if(this.eq(Un)){var n=_n(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=_n(Tn(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}},Ln.getHighBits=function(){return this.high},Ln.getHighBitsUnsigned=function(){return this.high>>>0},Ln.getLowBits=function(){return this.low},Ln.getLowBitsUnsigned=function(){return this.low>>>0},Ln.getNumBitsAbs=function(){if(this.isNegative())return this.eq(Un)?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},Ln.isZero=function(){return 0===this.high&&0===this.low},Ln.eqz=Ln.isZero,Ln.isNegative=function(){return!this.unsigned&&this.high<0},Ln.isPositive=function(){return this.unsigned||this.high>=0},Ln.isOdd=function(){return 1==(1&this.low)},Ln.isEven=function(){return 0==(1&this.low)},Ln.equals=function(t){return bn(t)||(t=In(t)),(this.unsigned===t.unsigned||this.high>>>31!=1||t.high>>>31!=1)&&(this.high===t.high&&this.low===t.low)},Ln.eq=Ln.equals,Ln.notEquals=function(t){return!this.eq(t)},Ln.neq=Ln.notEquals,Ln.ne=Ln.notEquals,Ln.lessThan=function(t){return this.comp(t)<0},Ln.lt=Ln.lessThan,Ln.lessThanOrEqual=function(t){return this.comp(t)<=0},Ln.lte=Ln.lessThanOrEqual,Ln.le=Ln.lessThanOrEqual,Ln.greaterThan=function(t){return this.comp(t)>0},Ln.gt=Ln.greaterThan,Ln.greaterThanOrEqual=function(t){return this.comp(t)>=0},Ln.gte=Ln.greaterThanOrEqual,Ln.ge=Ln.greaterThanOrEqual,Ln.compare=function(t){if(bn(t)||(t=In(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},Ln.comp=Ln.compare,Ln.negate=function(){return!this.unsigned&&this.eq(Un)?Un:this.not().add(Dn)},Ln.neg=Ln.negate,Ln.add=function(t){bn(t)||(t=In(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,Sn((c&=65535)<<16|(a&=65535),(f&=65535)<<16|(h&=65535),this.unsigned)},Ln.subtract=function(t){return bn(t)||(t=In(t)),this.add(t.neg())},Ln.sub=Ln.subtract,Ln.multiply=function(t){if(this.isZero())return this;if(bn(t)||(t=In(t)),ln)return Sn(ln.mul(this.low,this.high,t.low,t.high),ln.get_high(),this.unsigned);if(t.isZero())return this.unsigned?An:Pn;if(this.eq(Un))return t.isOdd()?Un:Pn;if(t.eq(Un))return this.isOdd()?Un:Pn;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(Nn)&&t.lt(Nn))return _n(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,Sn((a&=65535)<<16|(v&=65535),(h&=65535)<<16|(c&=65535),this.unsigned)},Ln.mul=Ln.multiply,Ln.divide=function(t){if(bn(t)||(t=In(t)),t.isZero())throw g("division by zero");var n,i,e;if(ln)return this.unsigned||-2147483648!==this.high||-1!==t.low||-1!==t.high?Sn((this.unsigned?ln.div_u:ln.div_s)(this.low,this.high,t.low,t.high),ln.get_high(),this.unsigned):this;if(this.isZero())return this.unsigned?An:Pn;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return An;if(t.gt(this.shru(1)))return Cn;e=An}else{if(this.eq(Un))return t.eq(Dn)||t.eq(xn)?Un:t.eq(Un)?Dn:(n=this.shr(1).div(t).shl(1)).eq(Pn)?t.isNegative()?Dn:xn:(i=this.sub(t.mul(n)),e=n.add(i.div(t)));if(t.eq(Un))return this.unsigned?An:Pn;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=Pn}for(i=this;i.gte(t);){n=y.max(1,y.floor(i.toNumber()/t.toNumber()));for(var r=y.ceil(y.log(n)/y.LN2),o=r<=48?1:Tn(2,r-48),u=_n(n),s=u.mul(t);s.isNegative()||s.gt(i);)s=(u=_n(n-=o,this.unsigned)).mul(t);u.isZero()&&(u=Dn),e=e.add(u),i=i.sub(s)}return e},Ln.div=Ln.divide,Ln.modulo=function(t){return bn(t)||(t=In(t)),ln?Sn((this.unsigned?ln.rem_u:ln.rem_s)(this.low,this.high,t.low,t.high),ln.get_high(),this.unsigned):this.sub(this.div(t).mul(t))},Ln.mod=Ln.modulo,Ln.rem=Ln.modulo,Ln.not=function(){return Sn(~this.low,~this.high,this.unsigned)},Ln.countLeadingZeros=function(){return this.high?y.clz32(this.high):y.clz32(this.low)+32},Ln.clz=Ln.countLeadingZeros,Ln.countTrailingZeros=function(){return this.low?gn(this.low):gn(this.high)+32},Ln.ctz=Ln.countTrailingZeros,Ln.and=function(t){return bn(t)||(t=In(t)),Sn(this.low&t.low,this.high&t.high,this.unsigned)},Ln.or=function(t){return bn(t)||(t=In(t)),Sn(this.low|t.low,this.high|t.high,this.unsigned)},Ln.xor=function(t){return bn(t)||(t=In(t)),Sn(this.low^t.low,this.high^t.high,this.unsigned)},Ln.shiftLeft=function(t){return bn(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?Sn(this.low<<t,this.high<<t|this.low>>>32-t,this.unsigned):Sn(0,this.low<<t-32,this.unsigned)},Ln.shl=Ln.shiftLeft,Ln.shiftRight=function(t){return bn(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?Sn(this.low>>>t|this.high<<32-t,this.high>>t,this.unsigned):Sn(this.high>>t-32,this.high>=0?0:-1,this.unsigned)},Ln.shr=Ln.shiftRight,Ln.shiftRightUnsigned=function(t){return bn(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?Sn(this.low>>>t|this.high<<32-t,this.high>>>t,this.unsigned):Sn(32===t?this.high:this.high>>>t-32,0,this.unsigned)},Ln.shru=Ln.shiftRightUnsigned,Ln.shr_u=Ln.shiftRightUnsigned,Ln.rotateLeft=function(t){var n;return bn(t)&&(t=t.toInt()),0==(t&=63)?this:32===t?Sn(this.high,this.low,this.unsigned):t<32?(n=32-t,Sn(this.low<<t|this.high>>>n,this.high<<t|this.low>>>n,this.unsigned)):(n=32-(t-=32),Sn(this.high<<t|this.low>>>n,this.low<<t|this.high>>>n,this.unsigned))},Ln.rotl=Ln.rotateLeft,Ln.rotateRight=function(t){var n;return bn(t)&&(t=t.toInt()),0==(t&=63)?this:32===t?Sn(this.high,this.low,this.unsigned):t<32?(n=32-t,Sn(this.high<<n|this.low>>>t,this.low<<n|this.high>>>t,this.unsigned)):(n=32-(t-=32),Sn(this.low<<n|this.high>>>t,this.high<<n|this.low>>>t,this.unsigned))},Ln.rotr=Ln.rotateRight,Ln.toSigned=function(){return this.unsigned?Sn(this.low,this.high,!1):this},Ln.toUnsigned=function(){return this.unsigned?this:Sn(this.low,this.high,!0)},Ln.toBytes=function(t){return t?this.toBytesLE():this.toBytesBE()},Ln.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]},Ln.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]},wn.fromBytes=function(t,n,i){return i?wn.fromBytesLE(t,n):wn.fromBytesBE(t,n)},wn.fromBytesLE=function(t,n){return new wn(t[0]|t[1]<<8|t[2]<<16|t[3]<<24,t[4]|t[5]<<8|t[6]<<16|t[7]<<24,n)},wn.fromBytesBE=function(t,n){return new wn(t[4]<<24|t[5]<<16|t[6]<<8|t[7],t[0]<<24|t[1]<<16|t[2]<<8|t[3],n)};var Fn=wn;function zn(){return Date.now()||(new Date).getTime()}Fn.fromNumber(yt);var Wn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),qn=16383;function Hn(t,n,i){return Wn[t>>2]+Wn[(3&t)<<4|n>>4]+Wn[(15&n)<<2|i>>6]+Wn[63&i]}function Vn(t,n,i){for(var e=[],r=n;r<i;r+=3)e.push(Hn(t[r],t[r+1],t[r+2]));return e.join("")}var Xn=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]","[object DataView]"],jn=ArrayBuffer.isView||function(t){return t&&It(Xn,lt.call(t))};function Yn(t,n){return t===n||function(t,n){if(t===n)return!0;if(t.byteLength!==n.byteLength)return!1;if(t.buffer===n.buffer&&t.byteOffset===n.byteOffset)return!0;for(var i=0;i<t.length;i+=1)if(t[i]!==n[i])return!1;return!0}(mi(t),mi(n))}function Kn(t){var n=t.reduce((function(t,n){return t+n.byteLength}),0);return function(t,n){for(var i=new E(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 Gn(t){return function(t){for(var n=t.length,i=n%3,e=[],r=n-i,o=0;o<r;o+=qn)e.push(Vn(t,o,y.min(r,o+qn)));if(1===i){var u=t[n-1];e.push(Wn[u>>2]+Wn[(3&u)<<4]+"==")}else if(2===i){var s=t[n-2],f=t[n-1];e.push(Wn[s>>2]+Wn[(3&s)<<4|f>>4]+Wn[(15&f)<<2]+"=")}return e.join("")}(new E(t))}var $n=function(){function t(t){void 0===t&&(t=0),this.ic=t}var n=t.prototype;return n.Tp=function(t){this.ic+=t},n.Sp=function(t){this.ic=t},n.Np=function(){return new t(this.tc)},Dt(t,[{key:"tc",get:function(){return this.ic}}]),t}();String.prototype.replaceAll;var Zn="function"==typeof String.prototype.startsWith?function(t,n){return wt(t)&&t.startsWith(n)}:function(t,n){return wt(t)&&t.substr(0,n.length)===n},Jn=(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}),Qn=(String.prototype.padStart,String.prototype.padEnd,16384),ti="function"==typeof String.fromCodePoint?function(t){var n;return t.length<=Qn?(n=String).fromCodePoint.apply(n,dt(t)):ii(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 ni(n)};function ni(t){var n;return t.length<=Qn?(n=String).fromCharCode.apply(n,dt(t)):ii(t,String.fromCharCode)}function ii(t,n){for(var i=[],e=0;e<t.length;e+=Qn)i.push(n.apply(void 0,dt(t.slice(e,e+Qn))));return i.join("")}function ei(t){if(t>=55296&&t<=57343)throw new g("Lone surrogate U+"+t.toString(16).toUpperCase()+" is not a scalar value")}function ri(t,n){return t>>n&63|128}function oi(t,n){0!=(4294967168&t)?(0==(4294965248&t)?n.push(t>>6&31|192):0==(4294901760&t)?(ei(t),n.push(t>>12&15|224),n.push(ri(t,6))):0==(4292870144&t)&&(n.push(t>>18&7|240),n.push(ri(t,12)),n.push(ri(t,6))),n.push(63&t|128)):n.push(t)}function ui(t,n){if(n.tc>=t.length)throw new g("Invalid byte index");var i=255&t[n.tc];if(n.Tp(1),128==(192&i))return 63&i;throw new g("Invalid continuation byte")}function si(t,n){var i=n.tc;if(i>t.length)throw new g("Invalid byte index");if(i===t.length)return!1;var e=255&t[i];if(n.Tp(1),0==(128&e))return e;if(192==(224&e)){var r=(31&e)<<6|ui(t,n);if(r>=128)return r;throw new g("Invalid continuation byte")}if(224==(240&e)){var o=(15&e)<<12|ui(t,n)<<6|ui(t,n);if(o>=2048)return ei(o),o;throw new g("Invalid continuation byte")}if(240==(248&e)){var u=(7&e)<<18|ui(t,n)<<12|ui(t,n)<<6|ui(t,n);if(u>=65536&&u<=1114111)return u}throw new g("Invalid UTF-8 detected")}var fi=65279;function hi(t,n,i){void 0===i&&(i=!1);var e=t.getUint16(n.tc,i);return n.Tp(2),e}function ci(t,n,i,e){void 0===e&&(e=!1),t.setUint16(n.tc,i,e),n.Tp(2)}function ai(t,n,i,e){void 0===e&&(e=!1),t.setUint32(n.tc,i,e),n.Tp(4)}function vi(t,n,i,e){void 0===e&&(e=!1);for(var r=i.length,o=0;o<r;o+=1){ci(t,n,i.charCodeAt(o),e)}}function di(t,n){return void 0===n&&(n=!1),function(t,n,i,e){for(var r=[];n.tc+2<=t.byteLength;){var o=hi(t,n,i);if(e&&!o)break;r.push(o)}return ni(r)}(bi(t),new _i,n,!1)}function li(t){return function(t){return ti(t)}(function(t,n){var i,e=[],r=new _i;if(!n){if(!1===(i=si(t,r)))return e;i===fi||e.push(i)}for(;!1!==(i=si(t,r));)e.push(i);return e}(gi(t)))}function wi(t){return new E(function(t){for(var n=[],i=0;i<t.length;i++)oi(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 bi(t){return new DataView(t.buffer,t.byteOffset,t.byteLength)}function gi(t){return new E(t.buffer,t.byteOffset,t.byteLength)}function mi(t){return t instanceof ArrayBuffer?new E(t):gi(t)}function pi(t){if(t.slice)return t.slice(0);var n=new E(t.byteLength);return n.set(t,0),n}var yi,_i=function(){function t(t){void 0===t&&(t=0),this.ic=t}var n=t.prototype;return n.Tp=function(t){this.ic+=t},n.Sp=function(t){this.ic=t},n.Np=function(){return new t(this.tc)},n.kp=function(){return new $n(this.tc<<3)},Dt(t,[{key:"tc",get:function(){return this.ic}}]),t}(),Si=new Array(256);for(yi=0;yi<256;yi+=1)Si[yi]=(yi<16?"0":"")+yi.toString(16);function Ti(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var n=16*y.random()|0;return("x"===t?n:3&n|8).toString(16)}))}function Ei(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 Ii=function(){function t(t){var n=this;this.A_=Ut(),this.b_=void 0,this.y_=0,this.Ds=function(t){n.yo(t)},this.T_=null!=t?t:this}var n=t.prototype;return n.yn=function(t,n){if("function"==typeof n)if("string"==typeof t)this.p_(t,n);else for(var i=0;i<t.length;i++){var e=t[i];this.p_(e,n)}},n.p_=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.y_?i.push(n):this.A_[t]=i.concat(n)},n.M_=function(t){if("function"==typeof t){var n=this.b_;void 0===n?this.b_=t:"function"==typeof n?this.b_=[n,t]:0===this.y_?n.push(t):this.b_=n.concat(t)}},n.Bo=function(){this.A_=Ut(),this.b_=void 0},n.yo=function(t){this.y_++;var n=this.A_[t.type],i=this.b_;void 0!==n&&Ei(this.T_,t,n),void 0!==i&&Ei(this.T_,t,i),this.y_--},n.fn=function(t,n){if("function"==typeof n)if("string"==typeof t)this.S_(t,n);else for(var i=0;i<t.length;i++){var e=t[i];this.S_(e,n)}},n.S_=function(t,n){var i=this.A_[t];void 0!==i&&("function"==typeof i?i===n&&(this.A_[t]=void 0):0===this.y_?Tt(i,n):this.A_[t]=Et(i,n))},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.I_=function(t){var n=this.b_;void 0!==n&&("function"==typeof n?n===t&&(this.b_=void 0):0===this.y_?Tt(n,t):this.b_=Et(n,t))},n.D_=function(t,n){var i=this;return new Q((function(e,r){if(n&&n.s_)return r(new en);var o=function(t){s(),e(t)},u=function(){s(),r(new en)},s=function(){i.fn(t,o),n&&n.n_(u)};i.yn(t,o),n&&n.r_(u)}))},t}(),ki=function(t,n){void 0===n&&(n=new Date),this.type=t,this.date=n},Ri=function(t){function n(n){var i;return(i=t.call(this,"append")||this).xp=n,i}return Bt(n,t),n}(ki),Oi=function(t){function n(){var n;return(n=t.apply(this,arguments)||this).cIt=0,n.QC=new E(0),n.$x=!1,n.cv=!1,n}Bt(n,t);var i=n.prototype;return i.o0=function(t,n){this.cIt+=n,this.QC=Kn([this.QC,t]),this.yo(new Ri(t))},i.Ws=function(){this.Kj||(this.yo(new ki("close")),this.$x=!0)},Dt(n,[{key:"x_",get:function(){return this.cIt}},{key:"xp",get:function(){return this.QC}},{key:"Kj",get:function(){return this.$x}},{key:"av",get:function(){return this.cv},set:function(t){this.cv=t}}]),n}(Ii),Ni="sync-seg-",Pi=function(){function t(t,n){this.dv=!1,this.lv=!1,this.o=Ni+Ti(),this.wv=n?new Oi:void 0,this.gv=t?new Oi:void 0}return t.prototype.Ws=function(){this.wv&&this.wv.Ws(),this.gv&&this.gv.Ws()},Dt(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}(),Ai=1.1,Di=function(t){function n(n,i,e){var r;return(r=t.call(this,[new Vt,new Xt(8),new jt(1),new Yt(0)])||this).Ad=[],r.Syt=Lt(),r.tw=0,r.rw=function(t){if(t.TN>=yt)for(;r.Ad.length>0;)r.sw()},e&&r.sv(new Kt(e,"com.apple.streamingkeydelivery","1")),r.sut=n,r.rot=i,r.rot.yn("remove",r.rw),r.bw=new $t(0),r.sv(r.bw),r}Bt(n,t);var i=n.prototype;return i.ikt=function(){return this.sut===Ct.gb?this.rot.kw:this.sut===Ct._b?this.rot.tb:void 0},i.$at=function(t){return this.Syt.get(t)},i.c_=function(){this.Ad.length=0,this.bw.bM=0,this.Syt.clear(),this.tw=0},i.qA=function(){return this.nb(),dt(t.prototype.qA.call(this)).concat(dt(this.Ad))},i.nb=function(){for(var t=this.rot.cb(),n=0;n<t.length;n++){var i=t[n];if(!this.Syt.has(i.o)){var e=void 0;if(this.sut===Ct.gb?(e=i.wv,i.jv=!0):(e=i.gv,i.kv=!0),!e)return;this.Syt.set(i.o,e),e.av&&this.Ad.push(new Ht(i.o+"-init")),this.Ad.push(new qt(Ai,i.o)),this.tw+=Ai}}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.pw===Wt.jE}(t)&&(this.Syt.delete(t.ev),this.tw-=t.nv,this.bw.bM++)},n}(Jt);var Ci=function(t){function n(n){var i;return(i=t.call(this,"remove")||this).TN=n,i}return Bt(n,t),n}(ki),xi=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=Lt(),e.sg=Lt(),e.lg=Lt(),e.bg=0,e}Bt(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)})),dt(this.ng).concat([this.mg],dt(this.ig))):[]},i.u0=function(t){this.kg(t)},i.o0=function(t){this.kg(t),this.tm(t),this.rm(t)},i.aN=function(t){this.kg(t),this.rm(t)},i.c_=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=Lt(),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 Pi(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.x_,i=!this.mg.wv||0===this.mg.wv.x_,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===Ct._b&&!u||t===Ct.gb&&!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===dn.Z7||i===dn.q7){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 dn.Z7:this.bm(e),this.lg=Lt(),this.bg=0;break;case dn.J7:this.km(e);break;case dn.q7:this.ip(e)}}},i.bm=function(t){var n=t.mediaType;void 0===this.mg?(this.mg=new Pi(this.lb,this.tg),this.ig.push(new Pi(this.lb,this.tg))):this.sm(n),n===Ct.gb?(this.up=t.segment,this.mg.wv.av=!0):n===Ct._b&&(this.ty=t.segment,this.mg.gv.av=!0)},i.ip=function(t){var n,i,e=t.mediaType===Ct._b,r=t.totalDuration,o=null!=(n=this.lg.get(t.mediaType))?n:0;e?(this.mg.gv.o0(t.segment,r),i=o+this.mg.gv.x_):(this.mg.wv.o0(t.segment,r),i=o+this.mg.wv.x_),i>=this.bg+Ai&&(this.lg.set(t.mediaType,i),this.bg+=Ai,this.om())},i.km=function(t){this.sg.set(t.mediaType,void 0),this.sm(t.mediaType),this.ng.length=0,this.yo(new Ci(t.endTime))},i.am=function(t){var n=this;if(t.kind===dn.J7)return this.ny(t);var i=[];return this.ug.forEach((function(t){if(t&&t.length>0){var e=_t(t,(function(t){return t.kind===dn.J7}));-1===e&&(e=t.length);for(var r=t.slice(0,e),o=0;o<r.length;o++){var u=r[o];if(!It(i,u)){var s,f=n.ny(u);if(f.length>0)(s=i).push.apply(s,dt(f));else if(u.kind===dn.q7)break}}}})),i},i.ny=function(t){var n=this.ug.get(t.mediaType),i=function(t){return t===Ct.gb?Ct._b:Ct.gb}(t.mediaType);if(!(i===Ct.gb?this.tg:this.lb))return n.splice(0,n.indexOf(t)+1);if(t.kind===dn.Z7)return[];var e=this.sg.get(i);if(void 0===e)return[];if(t.kind===dn.J7){var r=this.hy(i);if(r.length>0){var o=n.splice(0,n.indexOf(t));return n.splice(0,1),dt(o).concat(dt(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 dt(u).concat(dt(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=_t(e,(function(t){return t.kind===dn.J7})),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===dn.q7&&h.startPts>r&&(s=f)}var c=-1;return-1!==_t(n,(function(t){return t.kind===dn.Z7}))&&(c=_t(e,(function(t){return t.kind===dn.Z7}))),c>s&&(s=c+1),s>0?(e[s-1].kind===dn.Z7&&(s-=1),e.splice(0,s)):[]},i.hy=function(t){var n=this.ug.get(t);if(n){var i=_t(n,(function(t){return t.kind===dn.J7}));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+" ")})),Rt.pst(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(" ]"),Rt.pst(i)},Dt(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}(Ii);var Bi=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 xi(i,e),this.AS=new Qt(i,e),i&&(this.BS=new Di(Ct._b,this.OS,n)),e&&(this.RT=new Di(Ct.gb,this.OS,n))}var n=t.prototype;return n.IE=function(t){var n,i,e=Mi(t);return e===Ct.gb?null==(n=this.RT)?void 0:n.ikt():e===Ct._b?null==(i=this.BS)?void 0:i.ikt():void 0},n.$at=function(t){var n,i,e=t.split("/")[1],r=Mi(t);return r===Ct.gb?null==(n=this.RT)?void 0:n.$at(e):r===Ct._b?null==(i=this.BS)?void 0:i.$at(e):void 0},n.u0=function(t){this.OS.u0(t)},n.o0=function(t){this.OS.o0(t)},n.Llt=function(t){this.OS.aN(t)},n.c_=function(){var t,n;this.OS.c_(),this.AS.c_(),null==(t=this.BS)||t.c_(),null==(n=this.RT)||n.c_()},Dt(t,[{key:"ME",get:function(){return this.AS}},{key:"tk",get:function(){return this.BS}},{key:"ik",get:function(){return this.RT}}]),t}();function Mi(t){return t.match(/video/)?Ct.gb:Ct._b}var Ui=function(){function t(t,n){var i=this;this.uk=t,this.sk=n,this.kut=void 0,this.cHt=ft((function(t){var n,e;return ht(this,(function(r){switch((n=t.data).kind){case dn.X7:i.kut=new Bi(n.mediaBufferConfigs,n.fairPlaySdkUri);break;case dn.Z7:i.kut.u0(n);break;case dn.q7:i.kut.o0(n);break;case dn.J7:i.kut.Llt(n)}return e={kind:dn.K7},i.uk.postMessage(e),[2]}))})),this.uk.onmessage=this.cHt}var n=t.prototype;return n.$Bt=function(t){return"master.m3u8"===t?this.kut.ME:"video/index.m3u8"===t?this.kut.ik:"audio/index.m3u8"===t?this.kut.tk:void 0},n.ak=function(t){if(t.match(/m3u8/)){var n,i=null==(n=this.$Bt(t))?void 0:n.$Bt();return new Response(i,{headers:{"Content-Type":"application/x-mpegurl; charset=utf-8"}})}if(t.match(Ni)){var e={"Content-Type":t.match(/video/)?"video/mp4":"audio/mp4"};if(t.match(/init/)){var r,o=null==(r=this.kut)?void 0:r.IE(t);return new Response(o,{headers:e})}var u=this.Kat(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.xp)},e=function(){n.close(),t.fn("append",i),t.fn("close",e)};return new self.ReadableStream({start:function(r){(n=r).enqueue(t.xp),t.Kj?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.Kat=function(t){return this.kut.$at(t)},n.close=function(){var t;this.uk.close(),null==(t=this.kut)||t.c_()},t}(),Li=function(){function t(){var t=this;this.Q3=Lt(),this.cHt=function(n){var i=n.data;if(i.kind===dn.W7){t.mk().catch(Nt);var e=i.port,r=Ti(),o=new Ui(e,n.source.id);t.Q3.set(r,o);var u=function(n){n.data.kind===dn.ttt&&(t.kk(r),e.removeEventListener("message",u))};e.addEventListener("message",u);var s={kind:dn.H7,sessionId:r};e.postMessage(s)}},this.TR=function(n){if(Zn(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.Q3.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.QWt=t,t.addEventListener("message",this.cHt),t.addEventListener("fetch",this.TR)},n.kk=function(t){var n=this.Q3.get(t);n&&n.close(),this.Q3.delete(t)},n.mk=function(){var t=this;return ft((function(){var n,i;return ht(this,(function(e){switch(e.label){case 0:return[4,t.QWt.clients.matchAll()];case 1:return n=e.sent(),i=n.map((function(t){return t.id})),t.Q3.forEach((function(n,e){It(i,n.sk)||t.kk(e)})),[2]}}))}))()},t}();Li.CR=new Li;var Fi=function(t){return t.Mk="web",t.bk="android",t.Tk="android-tv",t.Sk="ios",t.Nk="tvos",t.Ik="chromecast",t.Dk="theoliveweb",t}({});var zi=v?v.userAgent:"",Wi=zi.match(/chrome\/([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)/i),qi=zi.match(/Edg\/([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)/i),Hi=zi.match(/Android ([0-9\.]+)/i),Vi=zi.match(/Windows NT ([0-9\.]+)/i),Xi=zi.match(/(Version)\/((\d+)\.(\d+)(?:\.(\d+))?).*Safari/),ji=zi.match(/Firefox\/([0-9\.]+)/i),Yi=zi.match(/OPR\/(\d+\.\d+)/i),Ki=zi.match(/Tizen ([0-9\.]+)/i),Gi=zi.match(/(iPhone OS|iPad OS|iPod OS|Mac OS X) (\d+)_(\d+)_?(\d+)?/),$i=function(){function t(){this.Ek=Boolean("ontouchstart"in self||self.DocumentTouch&&a instanceof self.DocumentTouch||v&&v.msMaxTouchPoints),this.xk=/(mac\sos\sx)\s?([\w\s\.]+\w)*/i.test(zi)||/(macintosh|mac(?=_powerpc)\s)/i.test(zi),this.jk=/Windows NT/i.test(zi),this.Pk=Vi?S(Vi[1]):0,this.zk=/Android/i.test(zi),this.Uk=Hi?S(Hi[1]):0,this.Fk=/windows phone (8|8\.1)/i.test(zi),this.Gk=/iPhone/i.test(zi),this.Wk=/iPad/i.test(zi),this.Xk=this.xk&&this.Ek&&!this.Wk,this.qk=/iPod/i.test(zi),this.sL=/Mobile Safari/i.test(zi),this.iL=/EOS\d*STB/i.test(zi),this.eL=/APP\d*STB/i.test(zi),this.Kk=(this.Gk||this.Wk||this.Xk||this.qk)&&!this.Fk,this.$k=Gi?S(Gi[2]):0,this.nL=this.Fk||this.Kk||this.zk||this.sL,this.oL=/CriOS/i.test(zi),this.aL=Boolean(self.chrome&&/google/i.test(v.vendor))||this.oL,this.fL=this.aL&&/Edg\//i.test(v.userAgent),this.gL=qi?_(qi[1],10):0,this.vx=Boolean(/CriOS/i.test(zi)),this.gx=Boolean(self.chrome||/Chrome/i.test(zi)||this.vx),this.lL=Wi?_(Wi[1],10):0,this.mL=/SMART-TV.*Tizen/i.test(zi),this.AL=Ki?S(Ki[1]):0,this.cL=this.AL>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.AL):void 0,this.ML=/webos|web0s/i.test(zi),this.TL=/VIZIO/i.test(zi),this.NL=/Edge\/\d+/i.test(zi),this.DL=/Trident/i.test(zi),this.kL=this.DL&&!self.ActiveXObject&&"ActiveXObject"in self,this.xL=/Vivaldi/i.test(zi),this.jL=/Firefox/i.test(zi)&&!/Seamonkey/i.test(zi),this.PL=ji?S(ji[1]):0,this.zL=/Safari/i.test(zi)&&!/Chrome/i.test(zi)&&!this.Fk&&!this.mL,this.UL=Xi?S(Xi[2]):0,this.FL=Boolean(Yi),this.GL=Yi?S(Yi[1]):0,this.WL=/CrKey/.test(zi),this.XL=/\b(tv|smart-tv|smarttv|appletv|crkey|googletv|hbbtv|pov_tv|roku|viera|nettv|philipstv|vizio)\b/i.test(zi),this.KL="web"===Fi.Tk,this.$L="web"===Fi.bk,this.ix=this.$L||this.KL,this.nx="web"===Fi.Sk,this.hx="web"===Fi.Nk,this.lx="web"===Fi.Ik}return Dt(t,[{key:"Je",get:function(){return this.Ek}},{key:"Lk",get:function(){return this.xk}},{key:"Ck",get:function(){return this.jk}},{key:"Ok",get:function(){return this.Pk}},{key:"Rk",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:"Ka",get:function(){return this.Kk}},{key:"Jk",get:function(){return this.$k}},{key:"tL",get:function(){return this.iL||this.eL}},{key:"nd",get:function(){return this.sL}},{key:"Qs",get:function(){return this.nL}},{key:"rL",get:function(){return this.oL}},{key:"hL",get:function(){return this.aL}},{key:"uL",get:function(){var t;return null!=(t=this.cL)?t:this.lL}},{key:"dL",get:function(){return this.fL}},{key:"_L",get:function(){var t;return(null==(t=c.chrome)?void 0:t.webview)&&this.gL>0}},{key:"vL",get:function(){return this.gL}},{key:"wL",get:function(){return this.mL}},{key:"pL",get:function(){return this.AL}},{key:"yL",get:function(){return this.ML}},{key:"bL",get:function(){return this.TL}},{key:"SL",get:function(){return this.NL}},{key:"IL",get:function(){return this.DL}},{key:"EL",get:function(){return this.kL}},{key:"LL",get:function(){return this.xL}},{key:"CL",get:function(){return this.jL}},{key:"OL",get:function(){return this.PL}},{key:"RL",get:function(){return this.zL}},{key:"BL",get:function(){return this.UL}},{key:"QL",get:function(){return this.FL}},{key:"YL",get:function(){return this.GL}},{key:"VL",get:function(){return this.WL}},{key:"HL",get:function(){return this.XL}},{key:"ZL",get:function(){return!(!this.yL&&!this.wL)&&this.uL<=56}},{key:"qL",get:function(){return this.KL}},{key:"JL",get:function(){return this.$L}},{key:"tx",get:function(){return this.ix}},{key:"sx",get:function(){return this.nx}},{key:"ox",get:function(){return this.hx}},{key:"ux",get:function(){return this.lx}},{key:"_x",get:function(){return this.gx}},{key:"IS_IOS_CHROME",get:function(){return this.vx}}]),t}();$i.wx=new $i;var Zi=$i.wx,Ji=!(Zi.IL&&!Zi.EL),Qi=self.console;function te(t){if(gt(t))try{return JSON.stringify(t)}catch(t){}return t}function ne(t){return t.map(te).join(" ")}function ie(t){var n=Qi&&Qi[t];return n?n.bind&&Ji?n.bind(Qi):function(){for(var n=arguments.length,i=new Array(n),e=0;e<n;e++)i[e]=arguments[e];Qi[t](ne(i))}:void 0}var ee=ie("log")||Nt,re=ie("warn")||ee.bind(void 0,"WARNING:"),oe=ie("error")||ee.bind(void 0,"ERROR:"),ue=function(){var t=Qi&&Qi.assert;return t?t.bind&&Ji?t.bind(Qi):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];Qi.assert(t,ne(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||oe.apply(void 0,["Assertion failed:"].concat(dt(i)))}}();function se(t,n){for(var i=0;i<n.length;i++){var e=n[i];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),p.defineProperty(t,e.key,e)}}function fe(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){he(t,n,r,e);var o=t;t=e,e=o}return t}(t,n);return i!==t&&he(i,null,t.length,t),t}function he(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 ce=/[a-zA-Z]/,ae=/[0-9]/,ve=/[0-9a-fA-F]/,de=/^0x/i,le=/^[0-9]+$/,we=/^[0-9a-fA-F]+$/,be=/^[0-7]+$/,ge=p.prototype.toString,me=Array.isArray||function(t){return"[object Array]"===ge.call(t)},pe=void 0!==n&&"symbol"==typeof e;function ye(t){return me(t)?t:Array.from(t)}function _e(t,n,i){var e=t[n];t[n]=t[i],t[i]=e}function Se(t){return t>=65&&t<=90}function Te(t){return Se(t)||function(t){return t>=97&&t<=122}(t)}function Ee(t){return t>=48&&t<=57}function Ie(t){return Ee(t)||Te(t)}function ke(t){return Ee(t)||t>=65&&t<=70||t>=97&&t<=102}function Re(t){return Se(t)?t+32:t}function Oe(t){return Ee(t)?t-48:t>=65&&t<=70?t-65+10:t>=97&&t<=102?t-97+10:-1}function Ne(t,n){return void 0===n&&(n=!1),0<=t&&t<=9?t+48:10<=t&&t<=15?t+(n?87:55):-1}var Pe=y.min,Ae=String.fromCharCode,De=16384;function Ce(t){for(var n=t.length,i=[],e=0;e<n;e+=De){var r=Pe(e+De,n);i.push(Ae.apply(null,t.slice(e,r)))}return i.join("")}var xe=2147483647,Be=/[^\0-\x7E]/,Me=/[\x2E\u3002\uFF0E\uFF61]/g,Ue={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},Le=y.floor,Fe=String.fromCharCode;function ze(t){throw new RangeError(Ue[t])}function We(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 qe,He,Ve,Xe=function(t,n){return t+22+75*(t<26)-((0!=n)<<5)},je=function(t,n,i){var e=0;for(t=i?Le(t/700):t>>1,t+=Le(t/n);t>455;e+=36)t=Le(t/35);return Le(e+36*t/(t+38))},Ye=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(Me,".")).split("."),n).join(".");return e+r}(t,(function(t){return Be.test(t)?"xn--"+function(t){for(var n=[],i=(t=We(t)).length,e=128,r=0,o=72,u=0,s=t;u<s.length;u++){var f=s[u];f<128&&n.push(Fe(f))}var h=n.length,c=h;for(h&&n.push("-");c<i;){for(var a=xe,v=0,d=t;v<d.length;v++){var l=d[v];l>=e&&l<a&&(a=l)}var w=c+1;a-e>Le((xe-r)/w)&&ze("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>xe&&ze("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(Fe(Xe(_+S%T,0))),p=Le(S/T)}n.push(Fe(Xe(p,0))),o=je(r,w,c==h),r=0,++c}}++r,++e}return n.join("")}(t):t}))};function Ke(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 Ce(n)}function Ge(t){if(t>=55296&&t<=57343)throw new g("Lone surrogate U+"+t.toString(16).toUpperCase()+" is not a scalar value")}function $e(t,n){return t>>n&63|128}function Ze(t,n){0!=(4294967168&t)?(0==(4294965248&t)?n.push(t>>6&31|192):0==(4294901760&t)?(Ge(t),n.push(t>>12&15|224),n.push($e(t,6))):0==(4292870144&t)&&(n.push(t>>18&7|240),n.push($e(t,12)),n.push($e(t,6))),n.push(63&t|128)):n.push(t)}function Je(t){for(var n=[],i=0;i<t.length;i++){Ze(t[i],n)}return n}function Qe(){if(Ve>=He)throw new g("Invalid byte index");var t=255&qe[Ve];if(Ve++,128==(192&t))return 63&t;throw new g("Invalid continuation byte")}function tr(){var t,n;if(Ve>He)throw new g("Invalid byte index");if(Ve===He)return!1;if(t=255&qe[Ve],Ve++,0==(128&t))return t;if(192==(224&t)){if((n=(31&t)<<6|Qe())>=128)return n;throw new g("Invalid continuation byte")}if(224==(240&t)){if((n=(15&t)<<12|Qe()<<6|Qe())>=2048)return Ge(n),n;throw new g("Invalid continuation byte")}if(240==(248&t)&&(n=(7&t)<<18|Qe()<<12|Qe()<<6|Qe())>=65536&&n<=1114111)return n;throw new g("Invalid UTF-8 detected")}function nr(t){return[37,Ne(t>>4),Ne(15&t)]}function ir(t){return function(t){return t>=0&&t<=31}(t)||t>126}function er(t){return ir(t)||32===t||34===t||60===t||62===t||96===t}function rr(t){return er(t)||35===t||63===t||123===t||125===t}function or(t){return rr(t)||47===t||58===t||59===t||61===t||64===t||t>=91&&t<=94||124===t}function ur(t){return t<33||t>126||34===t||35===t||60===t||62===t}function sr(t){return ur(t)||39===t}function fr(t,n){if(!n(t))return[t];for(var i=Je([t]),e=[],r=0;r<i.length;r++){var o=i[r];e.push.apply(e,nr(o))}return e}function hr(t,n){for(var i=[],e=0,r=We(t);e<r.length;e++){var o=r[e];i.push.apply(i,fr(o,n))}return Ke(i)}function cr(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&&ke(t[e+1])&&ke(t[e+2])){var o=Oe(t[e+1])<<4|Oe(t[e+2]);n.push(o),e+=2}else n.push(r)}return n}(Je(t))}function ar(t){return Ke(function(t){qe=t.slice(),He=qe.length,Ve=0;for(var n,i=[];!1!==(n=tr());)i.push(n);return i}(cr(We(t))))}function vr(t){var n=t.length,i=[0,0,0,0,0,0,0,0],e=0,r=null,o=0;if(o<n&&":"===t[o]){if(!(o+1<n&&":"===t[o+1]))throw new m;o+=2,r=e+=1}for(;o<n;){if(8===e)throw new m("Too many groups");if(":"!==t[o]){for(var u=0,s=0;s<4&&o<n&&ve.test(t[o]);)u=u<<4|_(t[o],16),o+=1,s+=1;if("."===t[o]){if(0===s)throw new m;if(o-=s,e>6)throw new m;for(var f=0;o<n;){var h=null;if(f>0){if(!("."===t[o]&&f<4))throw new m;o+=1}if(!ae.test(t[o]))throw new m;for(;o<n&&ae.test(t[o]);){var c=_(t[o],10);if(null===h)h=c;else{if(0===h)throw new m;if((h=10*h+c)>255)throw new m}o+=1}i[e]=i[e]<<8|h,2!==(f+=1)&&4!==f||(e+=1)}if(4!==f)throw new m;break}if(":"===t[o]){if((o+=1)===n)throw new m}else if(o<n)throw new m;i[e]=u,e+=1}else{if(null!==r)throw new m("Too many :: groups");o+=1,r=e+=1}}if(null!==r){var a=e-r;for(e=7;0!==e&&a>0;)_e(i,e,r+a-1),e-=1,a-=1}else if(8!==e)throw new m;return i}function dr(t){var n=10,i=le;return de.test(t)?(t=t.slice(2),n=16,i=we):t.length>=2&&"0"===t[0]&&(t=t.slice(1),n=8,i=be),""===t?0:i.test(t)?_(t,n):void 0}var lr={K2:4},wr=/[\0\t\n\r #%/:?@\[\\\]]/,br=/[\0\t\n\r #/:?@\[\\\]]/;function gr(t,n){if("["===t[0]){if("]"!==t[t.length-1])throw new m("Invalid IPv6 address");return{K2:2,Yet:vr(t.slice(1,-1))}}if(!n)return function(t){if(br.test(t))throw new m("Invalid code point in opaque host");var n=hr(t,ir);return""===n?lr:{K2:3,QC:n}}(t);var i=function(t){var n=function(t){return Ye(t.toLowerCase())}(t);return n}(ar(t));if(wr.test(i))throw new m("Invalid code point in host");var e=function(t){var n=t.split(".");if(""===n[n.length-1]&&n.pop(),!(n.length>4)){for(var i=[],e=0;e<n.length;e++){var r=n[e];if(""===r)return;var o=dr(r);if(void 0===o)return;i.push(o)}for(var u=0;u<i.length-1;u++)if(i[u]>255)throw new m;if(i[i.length-1]>=y.pow(256,5-i.length))throw new m;for(var s=i.pop(),f=0;f<i.length;f++)s+=i[f]*y.pow(256,3-f);return s}}(i);return void 0!==e?{K2:1,Yet:e}:""===i?lr:{K2:0,Get:i}}function mr(t){switch(t.K2){case 0:return t.Get;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.Yet);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.Yet)+"]";case 3:return t.QC;case 4:return""}}var pr=/\+/g;function yr(t){return 42===t||45===t||46===t||95===t||Ie(t)}function _r(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(pr," "),s=s.replace(pr," ");var f=ar(u),h=ar(s);i.push([f,h])}}return i}function Sr(t){for(var n="",i=0;i<t.length;i++){var e=t[i];i>0&&(n+="&"),n+=Tr(Je(We(e[0])))+"="+Tr(Je(We(e[1])))}return n}function Tr(t){for(var n=[],i=0;i<t.length;i++){var e=t[i];32===e?n.push(43):yr(e)?n.push(e):n.push.apply(n,nr(e))}return Ce(n)}var Er=/(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])/;function Ir(t){var n=""+t,i=Er.exec(n);return i?function(t,n){for(var i=t.length,e=[],r=n;r<i;r++){var o=t.charCodeAt(r);if(Rr(o))if(Or(o)||r===i-1)e.push(kr);else{var u=t.charCodeAt(r+1);Or(u)?(e.push(o,u),r++):e.push(kr)}else e.push(o)}return t.slice(0,n)+Ce(e)}(n,i.index):n}var kr=65533,Rr=function(t){return 55296==(63488&t)},Or=function(t){return 0!=(1024&t)};function Nr(t,n){var i=t[0],e=n[0];return i===e?0:i<e?-1:1}function Pr(t){t.vf.length=0}function Ar(t,n){!function(t,n){for(var i=0;i<n.length;i++)t[i]=n[i];t.length=n.length}(t.vf,_r(n))}function Dr(t){if(t.Yu){var n=Sr(t.vf);""===n&&(n=null),t.Yu.Yu.Vet=n}}var Cr=function(){function t(t){if(void 0===t&&(t=void 0),this.Yu=null,null==t)this.vf=[];else if("object"==typeof t||"function"==typeof t)if(function(t){return t instanceof Cr&&!!me(t.vf)&&(!pe||t[e]===xr)}(t))this.vf=t.vf.slice();else if(function(t){return null!=t&&(!!me(t)||!!pe&&"function"==typeof t[e])}(t)){this.vf=[];for(var n=0,i=ye(t);n<i.length;n++){var r=ye(i[n]);if(2!==r.length)throw new m("Invalid name-value pair");this.vf.push([Ir(r[0]),Ir(r[1])])}}else for(var o in this.vf=[],t)p.prototype.hasOwnProperty.call(t,o)&&this.vf.push([Ir(o),Ir(t[o])]);else(t=Ir(t)).length>0&&"?"===t[0]&&(t=t.slice(1)),this.vf=_r(t)}var n=t.prototype;return n.append=function(t,n){t=Ir(t),n=Ir(n),this.vf.push([t,n]),Dr(this)},n.delete=function(t){t=Ir(t);for(var n=this.vf,i=0;i<n.length;){n[i][0]===t?n.splice(i,1):i++}Dr(this)},n.get=function(t){t=Ir(t);for(var n=this.vf,i=0;i<n.length;i++){var e=n[i];if(e[0]===t)return e[1]}return null},n.getAll=function(t){t=Ir(t);for(var n=this.vf,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=Ir(t);for(var n=this.vf,i=0;i<n.length;i++){if(n[i][0]===t)return!0}return!1},n.set=function(t,n){t=Ir(t),n=Ir(n);for(var i=this.vf,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]),Dr(this)},n.sort=function(){fe(this.vf,Nr),Dr(this)},n.toString=function(){return Sr(this.vf)},n.entries=function(){return new Lr(this.vf,Br)},n.keys=function(){return new Lr(this.vf,Mr)},n.values=function(){return new Lr(this.vf,Ur)},n.forEach=function(t){var n=this;this.vf.forEach((function(i){return t(i[1],i[0],n)}))},t}(),xr=Cr.prototype.entries;pe&&(Cr.prototype[e]=xr);var Br=function(t){return[t[0],t[1]]},Mr=function(t){return t[0]},Ur=function(t){return t[1]},Lr=function(){function t(t,n){this.Wet=0,this.vf=t,this.Het=n}return t.prototype.next=function(){return this.Wet<this.vf.length?{done:!1,value:this.Het(this.vf[this.Wet++])}:{done:!0,value:void 0}},t}(),Fr="null";var zr=p.create(null);zr.ftp=21,zr.file=0,zr.gopher=70,zr.http=80,zr.https=443,zr.ws=80,zr.wss=443;var Wr=/^(?:\.|%2e)$/i,qr=/^(?:\.|%2e){2}$/i;function Hr(t){return Wr.test(t)}function Vr(t){return qr.test(t)}function Xr(t){return void 0!==zr[t]}function jr(t){return Xr(t.lz)}function Yr(t){return""!==t.Xet||""!==t.Zet}function Kr(t){var n=t.length;if(!(n>=2))return!1;if(!$r(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 Gr(t){return 2===t.length&&ce.test(t[0])&&(":"===t[1]||"|"===t[1])}function $r(t){return 2===t.length&&Gr(Ce(t))}function Zr(t){return Gr(t)&&":"===t[1]}function Jr(t){var n=t.qet;0!==n.length&&("file"===t.lz&&1===n.length&&Zr(n[0])||n.pop())}function Qr(t){return null===t.Ket||lr===t.Ket||t.Jet||"file"===t.lz}var to=-1,no=/\t|\n|\r/g,io=/^[\x00-\x1f ]+|[\x00-\x1f ]+$/g;function eo(t,n,i,e){void 0===i&&(i=null),void 0===e&&(e=null),i||(i=new oo,t=t.replace(io,""));var r=null!==e?e:0;n=n||null;for(var o=[],u=!1,s=!1,f=!1,h=We(t=t.replace(no,"")),c=h.length,a=0;a<=c;){var v=a<c?h[a]:to;switch(r){case 0:if(!Te(v)){if(null===e){o.length=0,r=2;continue}throw new m("Invalid scheme")}o.push(Re(v)),r=1;break;case 1:if(Ie(v)||43===v||45===v||46===v)o.push(Re(v));else{if(58!==v){if(null===e){o.length=0,r=2,a=0;continue}throw new m("Invalid scheme")}var d=Ke(o);if(null!==e){if(Xr(i.lz)&&!Xr(d))return;if(!Xr(i.lz)&&Xr(d))return;if((Yr(i)||null!==i.ett)&&"file"===d)return;if("file"===i.lz&&(i.Ket===lr||null===i.Ket))return}if(i.lz=d,null!==e)return void(jr(i)&&i.ett===zr[i.lz]&&(i.ett=null));o.length=0,"file"===i.lz?r=13:jr(i)&&n&&n.lz===i.lz?r=3:jr(i)?r=7:47===h[a+1]?(r=4,a+=1):(i.Jet=!0,i.qet.push(""),r=18)}break;case 2:if(!n||n.Jet&&35!==v)throw new m("Invalid scheme");n.Jet&&35===v?(i.lz=n.lz,i.qet=n.qet.slice(),i.Vet=n.Vet,i.$et="",i.Jet=!0,r=20):"file"!==n.lz?(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.lz=n.lz,to===v?(i.Xet=n.Xet,i.Zet=n.Zet,i.Ket=n.Ket,i.ett=n.ett,i.qet=n.qet.slice(),i.Vet=n.Vet):47===v?r=6:63===v?(i.Xet=n.Xet,i.Zet=n.Zet,i.Ket=n.Ket,i.ett=n.ett,i.qet=n.qet.slice(),i.Vet="",r=19):35===v?(i.Xet=n.Xet,i.Zet=n.Zet,i.Ket=n.Ket,i.ett=n.ett,i.qet=n.qet.slice(),i.Vet=n.Vet,i.$et="",r=20):92===v&&jr(i)?r=6:(i.Xet=n.Xet,i.Zet=n.Zet,i.Ket=n.Ket,i.ett=n.ett,i.qet=n.qet.slice(),i.qet.pop(),r=17,a-=1);break;case 6:!jr(i)||47!==v&&92!==v?47===v?r=9:(i.Xet=n.Xet,i.Zet=n.Zet,i.Ket=n.Ket,i.ett=n.ett,r=17,a-=1):r=8;break;case 7:if(47!==v||47!==h[a+1]){r=8;continue}r=8,a+=1;break;case 8:47!==v&&92!==v&&(r=9,a-=1);break;case 9:if(64===v){u&&o.unshift(37,52,48),u=!0;for(var l=0;l<o.length;l++){var w=o[l];if(58!==w||f){var b=Ke(fr(w,or));f?i.Zet+=b:i.Xet+=b}else f=!0}o.length=0}else if(to===v||47===v||63===v||35===v||jr(i)&&92===v){if(u&&0===o.length)throw new m("Invalid host");a-=o.length+1,o.length=0,r=10}else o.push(v);break;case 10:case 11:if(null!==e&&"file"===i.lz)a-=1,r=15;else if(58!==v||s)if(to===v||47===v||63===v||35===v||jr(i)&&92===v){if(a-=1,jr(i)&&0===o.length)throw new m("Invalid host");if(null!==e&&0===o.length&&(Yr(i)||null!==i.ett))return;var g=gr(Ke(o),jr(i));if(i.Ket=g,o.length=0,r=16,null!==e)return}else 91===v?s=!0:93===v&&(s=!1),o.push(v);else{if(0===o.length)throw new m("Invalid host");var p=gr(Ke(o),jr(i));if(i.Ket=p,o.length=0,r=12,11===e)return}break;case 12:if(Ee(v))o.push(v);else{if(!(to===v||47===v||63===v||35===v||jr(i)&&92===v||null!==e))throw new m("Invalid port");if(0!==o.length){var y=_(Ke(o),10);if(y>65535)throw new m("Invalid port");i.ett=y===zr[i.lz]?null:y,o.length=0}if(null!==e)return;r=16,a-=1}break;case 13:i.lz="file",47===v||92===v?r=14:n&&"file"===n.lz?to===v?(i.Ket=n.Ket,i.qet=n.qet.slice(),i.Vet=n.Vet):63===v?(i.Ket=n.Ket,i.qet=n.qet.slice(),i.Vet="",r=19):35===v?(i.Ket=n.Ket,i.qet=n.qet.slice(),i.Vet=n.Vet,i.$et="",r=20):(Kr(h.slice(a))||(i.Ket=n.Ket,i.qet=n.qet.slice(),Jr(i)),r=17,a-=1):(r=17,a-=1);break;case 14:47===v||92===v?r=15:(n&&"file"===n.lz&&!Kr(h.slice(a))&&(Zr(n.qet[0])?i.qet.push(n.qet[0]):i.Ket=n.Ket),r=17,a-=1);break;case 15:if(to===v||47===v||92===v||63===v||35===v)if(a-=1,null===e&&$r(o))r=17;else if(0===o.length){if(i.Ket=lr,null!==e)return;r=16}else{var S=gr(Ke(o),jr(i));if(0===S.K2&&"localhost"===S.Get&&(S=lr),i.Ket=S,null!==e)return;o.length=0,r=16}else o.push(v);break;case 16:jr(i)?(r=17,47!==v&&92!==v&&(a-=1)):null===e&&63===v?(i.Vet="",r=19):null===e&&35===v?(i.$et="",r=20):to!==v&&(r=17,47!==v&&(a-=1));break;case 17:if(to===v||47===v||jr(i)&&92===v||null===e&&(63===v||35===v)){var T=Ke(o);if(Vr(T)?(Jr(i),47===v||jr(i)&&92===v||i.qet.push("")):!Hr(T)||47===v||jr(i)&&92===v?Hr(T)||("file"===i.lz&&0===i.qet.length&&$r(o)&&(lr!==i.Ket&&null!==i.Ket&&(i.Ket=lr),o[1]=58,T=Ke(o)),i.qet.push(T)):i.qet.push(""),o.length=0,"file"===i.lz&&(to===v||63===v||35===v))for(;i.qet.length>1&&""===i.qet[0];)i.qet.shift();63===v?(i.Vet="",r=19):35===v&&(i.$et="",r=20)}else o.push.apply(o,fr(v,rr));break;case 18:63===v?(i.Vet="",r=19):35===v?(i.$et="",r=20):to!==v&&(i.qet[0]+=Ke(fr(v,ir)));break;case 19:null===e&&35===v?(i.$et="",r=20):to!==v&&(i.Vet+=Ke(fr(v,jr(i)?sr:ur)));break;case 20:to===v||0===v||(i.$et+=Ke(fr(v,er)))}a++}return i}function ro(t,n,i,e){try{eo(t,n,i,e)}catch(t){}}var oo=function(){this.lz="",this.Xet="",this.Zet="",this.Ket=null,this.ett=null,this.qet=[],this.Vet=null,this.$et=null,this.Jet=!1};function uo(t){switch(t.lz){case"blob":var n;try{n=eo(t.qet[0],null)}catch(t){return Fr}return uo(n);case"ftp":case"gopher":case"http":case"https":case"ws":case"wss":return function(t,n,i){return t+"://"+mr(n)+(null===i?"":":"+i)}(t.lz,t.Ket,t.ett);default:return Fr}}var so,fo,ho=function(){function t(t,n){var i,e=null;if(null!=n)if(function(t){return null!=t&&t instanceof ho&&"object"==typeof t.Yu}(n))e=n.Yu;else try{e=eo(String(n),null)}catch(t){throw new m("Invalid base URL: "+t.message)}try{i=eo(String(t),e)}catch(t){throw new m("Invalid URL: "+t.message)}var r=i.Vet;this.Yu=i,this.Vet=function(t){var n=new Cr;return null!==t&&Ar(n,t),n}(r),this.Vet.Yu=this}var n=t.prototype;return n.toString=function(){return this.href},n.toJSON=function(){return this.href},function(t,n,i){n&&se(t.prototype,n),i&&se(t,i)}(t,[{key:"href",get:function(){return function(t,n){void 0===n&&(n=!1);var i=t.lz+":";if(null!==t.Ket?(i+="//",Yr(t)&&(i+=t.Xet,""!==t.Zet&&(i+=":"+t.Zet),i+="@"),i+=mr(t.Ket),null!==t.ett&&(i+=":"+t.ett)):null===t.Ket&&"file"===t.lz&&(i+="//"),t.Jet)i+=t.qet[0];else for(var e=0,r=t.qet;e<r.length;e++)i+="/"+r[e];return null!==t.Vet&&(i+="?"+t.Vet),n||null===t.$et||(i+="#"+t.$et),i}(this.Yu)},set:function(t){var n;try{n=eo(String(t),null)}catch(t){throw new m("Invalid URL: "+t.message)}this.Yu=n,Pr(this.Vet);var i=this.Yu.Vet;null!==i&&Ar(this.Vet,i)}},{key:"origin",get:function(){return uo(this.Yu)}},{key:"protocol",get:function(){return this.Yu.lz+":"},set:function(t){ro(t+":",null,this.Yu,0)}},{key:"username",get:function(){return this.Yu.Xet},set:function(t){Qr(this.Yu)||(this.Yu.Xet=hr(t,or))}},{key:"password",get:function(){return this.Yu.Zet},set:function(t){Qr(this.Yu)||(this.Yu.Zet=hr(t,or))}},{key:"host",get:function(){var t=this.Yu,n=t.Ket;if(null===n)return"";var i=t.ett,e=mr(n);return null!==i&&(e+=":"+i),e},set:function(t){this.Yu.Jet||ro(t,null,this.Yu,10)}},{key:"hostname",get:function(){var t=this.Yu.Ket;return null===t?"":mr(t)},set:function(t){this.Yu.Jet||ro(t,null,this.Yu,11)}},{key:"port",get:function(){var t=this.Yu.ett;return null===t?"":""+t},set:function(t){Qr(this.Yu)||(""===t?this.Yu.ett=null:ro(t,null,this.Yu,12))}},{key:"pathname",get:function(){var t=this.Yu.qet;return this.Yu.Jet?t[0]:0===t.length?"":"/"+t.join("/")},set:function(t){this.Yu.Jet||(this.Yu.qet.length=0,ro(t,null,this.Yu,16))}},{key:"search",get:function(){var t=this.Yu.Vet;return null===t||""===t?"":"?"+t},set:function(t){t=Ir(t);var n=this.Yu;if(""===t)return n.Vet=null,void Pr(this.Vet);"?"===t[0]&&(t=t.slice(1)),n.Vet="",ro(t,null,n,19),Ar(this.Vet,t)}},{key:"searchParams",get:function(){return this.Vet}},{key:"hash",get:function(){var t=this.Yu.$et;return null===t||""===t?"":"#"+t},set:function(t){""!==t?("#"===t[0]&&(t=t.slice(1)),this.Yu.$et="",ro(t,null,this.Yu,20)):this.Yu.$et=null}}]),t}();function co(t){return t.document&&t.document.baseURI||t.location.href||""}function ao(){return void 0!==a?a.createElement("video"):void 0}function vo(){return fo||(fo=ao()),fo}var lo=!!("ontouchstart"in self||self.DocumentTouch&&a instanceof self.DocumentTouch)||!(!v||!v.msMaxTouchPoints),wo=vo(),bo=!(!wo||!wo.webkitShowPlaybackTargetPicker),go=function(){function t(){this.ist=void 0,this.gst=!1,this.Je=lo,this.Qs=!1,this.Htt=!0}var n=t.prototype;return n.sst=function(){return 0},n.fst=function(t,n){return!0},n._st=function(t){return t>=.3333333333333333},Dt(t,[{key:"tst",get:function(){return void 0===this.ist&&(this.ist=this.sst()),this.ist}},{key:"nst",get:function(){return!Zi.HL}},{key:"rst",get:function(){if(c.screen)return{width:c.screen.width,height:c.screen.height}}},{key:"C5",get:function(){return c.devicePixelRatio||1}},{key:"ost",get:function(){return bo}},{key:"d5",get:function(){return!1}},{key:"o5",get:function(){return!0}},{key:"kS",get:function(){return!(!Zi.RL&&!Zi.Ka)||!!Zi.bL}},{key:"LS",get:function(){return Zi.bL}},{key:"hst",get:function(){return!Zi.Ka}},{key:"MR",get:function(){return!0}},{key:"ast",get:function(){return!0}},{key:"ust",get:function(){return!1}},{key:"cst",get:function(){}},{key:"lst",get:function(){return!0}},{key:"F0",get:function(){return!1}},{key:"dst",get:function(){return Zi.bL}}]),t}(),mo=function(){var t=ao();if(!t)return!1;var n=t.muted;return t.muted=!n,t.muted!==n}();!function(){if(Zi.Hk)return!1;var t=ao();if(!t)return!1;var n=t.volume;t.volume=n/2+.1,t.volume}();var po=function(t){function n(n){var i;return(i=t.call(this)||this).vst=n,i.vst&&(i.gst=i.vst.gst,i.Je=i.vst.Je,i.Htt=mo&&i.vst.Htt),i}Bt(n,t);var i=n.prototype;return i.sst=function(){return this.vst?this.vst.tst:t.prototype.sst.call(this)},i.fst=function(n,i){return this.vst?this.vst.fst(n,i):t.prototype.fst.call(this,n,i)},i._st=function(n){return this.vst?this.vst._st(n):t.prototype._st.call(this,n)},Dt(n,[{key:"cst",get:function(){var t;return null==(t=this.vst)?void 0:t.cst}},{key:"lst",get:function(){var t,n;return null==(n=null==(t=this.vst)?void 0:t.lst)||n}}]),n}(go),yo=function(t){function n(n){var i;return(i=t.call(this,n)||this).gst=!0,i.Qs=!0,i}return Bt(n,t),Dt(n,[{key:"ust",get:function(){return Zi.Ka}}]),n}(po);var _o=function(t){function n(){return t.apply(this,arguments)||this}return Bt(n,t),n.prototype.sst=function(){return function(t){return t&&pt(so.ManagedMediaSource)?so.ManagedMediaSource:pt(so.MediaSource)?so.MediaSource:void 0}(!0)?t.prototype.sst.call(this):1},Dt(n,[{key:"ust",get:function(){return!0}}]),n}(yo),So=function(t){function n(){return t.apply(this,arguments)||this}return Bt(n,t),n.prototype.fst=function(n,i){return t.prototype.fst.call(this,n,i)},Dt(n,[{key:"d5",get:function(){return Zi.pL<3}},{key:"o5",get:function(){return Zi.pL>=3}},{key:"rst",get:function(){var t=this;return c.tizen&&!this.wst&&c.tizen.systeminfo.getPropertyValue("DISPLAY",(function(n){var i=n.resolutionWidth,e=n.resolutionHeight;1===i&&1===e||(t.wst={width:i,height:e})})),this.wst}},{key:"F0",get:function(){return Zi.pL<3}}]),n}(po),To=function(t){function n(){return t.call(this)||this}return Bt(n,t),n}(go),Eo=function(t){function n(){return t.apply(this,arguments)||this}return Bt(n,t),n.prototype.fst=function(t,n){if(t&&t.mst&&n&&n.mst){var i=Io(t.mst,"mp4a.40.2")&&Io(n.mst,"mp4a.40.5"),e=Io(t.mst,"mp4a.40.5")&&Io(n.mst,"mp4a.40.2"),r=Io(t.mst,"mp4a.40.2")&&Io(n.mst,"mp4a.40.34"),o=Io(t.mst,"mp4a.40.34")&&Io(n.mst,"mp4a.40.2"),u=Io(t.mst,"mp4a.40.5")&&Io(n.mst,"mp4a.40.34"),s=Io(t.mst,"mp4a.40.34")&&Io(n.mst,"mp4a.40.5");return!(i||e||r||o||u||s)}return!0},Dt(n,[{key:"cst",get:function(){if(Zi.Lk)return 4096}}]),n}(To);function Io(t,n){return t.indexOf(n)>-1}var ko=function(t){function n(){return t.apply(this,arguments)||this}return Bt(n,t),n.prototype._st=function(t){return t>=2},n}(To),Ro=function(t){function n(){var n;return(n=t.call(this)||this).gst=Zi.BL>=11,n.Htt=Zi.RL&&!(Zi.Ka&&Zi.BL<10),n}return Bt(n,t),n}(To),Oo=function(t){function n(){return t.apply(this,arguments)||this}return Bt(n,t),Dt(n,[{key:"rst",get:function(){var t=this;return c.webOS&&!this.wst&&c.webOS.deviceInfo((function(n){t.wst={width:n.screenWidth,height:n.screenHeight}})),this.wst}},{key:"MR",get:function(){return!1}}]),n}(po),No=function(t){function n(){return t.apply(this,arguments)||this}return Bt(n,t),Dt(n,[{key:"lst",get:function(){return!Zi.Ck||(Zi.dL?92!==Zi.vL:Zi.uL>=100)}}]),n}(To),Po=function(t){function n(){return t.apply(this,arguments)||this}return Bt(n,t),Dt(n,[{key:"ust",get:function(){return!0}}]),n}(po),Ao=function(){function t(){this.bst=new Do,this.Sst=function(){var t=function(){if(Zi.CL)return new Eo;if(Zi.SL||Zi.IL)return new ko;if(Zi.RL)return new Ro;if(Zi.hL)return new No;return new To}();return Zi.Ka?new _o(t):Zi.Qs?new yo(t):Zi.wL?new So(t):Zi.yL?new Oo(t):Zi.Lk?new Po(t):new po(t)}(),this.Tst=Co(),self.performance&&self.performance.now?this.t_=function(){return self.performance.now()}:this.t_=zn}var n=t.prototype;return n.pst=function(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];ee.apply(void 0,dt(n))},n.Bw=function(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];re.apply(void 0,dt(n))},n.Ast=function(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];oe.apply(void 0,dt(n))},n.yst=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];ue.apply(void 0,[t].concat(dt(i)))},n.e_=function(t,n){return d(t,n)},n.wS=function(t,n){return w(t,n)},n.i_=function(t){l(t)},n.pS=function(t){b(t)},n.TO=function(){return this.Mst.TO()},n.ub=function(){return this.Mst.ub()},n.fb=function(){return this.Mst.fb()},n.hb=function(){return this.Mst.hb()},n.ob=function(){return this.Mst.ob()},n.yO=function(t,n){return this.Mst.yO(t,n)},n.pO=function(t){return this.Mst.pO(t)},n.Ah=function(t,n){var i;return void 0===n&&(n=co(so)),i="object"!==(void 0===n?"undefined":k(n))||n instanceof ho?n:n.href,new ho(t,i)},n.Nw=function(t,n){if(void 0===n&&(n=co(so)),this.Tst){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},Dt(t,[{key:"gR",get:function(){return this.bst}},{key:"Ys",get:function(){return this.Sst}},{key:"Nst",get:function(){return{Ist:v&&v.userAgent.match(/Android /i)?"Android":"other",Dst:Boolean(v&&v.userAgent.match(/Android 8.0.0/i))}}},{key:"EH",get:function(){return self&&self.location&&"https:"===self.location.protocol}},{key:"Est",get:function(){return"languages"in v?v.languages.slice():[v.language]}}]),t}(),Do=function(){function t(){}return Dt(t,[{key:"vR",get:function(){return v.oscpu}},{key:"Ys",get:function(){return v.platform}},{key:"wR",get:function(){return v.vendor}},{key:"mR",get:function(){return v.vendorSub}}]),t}();function Co(){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 xo(){return xo=p.assign||function(t){for(var n=1;n<arguments.length;n++){var i=arguments[n];for(var e in i)p.prototype.hasOwnProperty.call(i,e)&&(t[e]=i[e])}return t},xo.apply(this,arguments)}var Bo="9a04f079-9840-4286-ab92-e65be0885f95",Mo="urn:uuid:"+Bo,Uo="com.microsoft.playready",Lo="edef8ba9-79d6-4ace-a3c8-27dcd51d21ed",Fo="urn:uuid:"+Lo,zo="com.widevine.alpha",Wo="1077efec-c0b2-4d02-ace3-3c1e52e2fb4b",qo="urn:uuid:"+Wo,Ho="94ce86fb-07ff-4f43-adb8-93d2fa968ca2",Vo="urn:uuid:"+Ho,Xo="com.apple.fps.1_0",jo=function(t){return t.Uw="playready",t.Qw="widevine",t.Fw="fairplay",t.Yw="clearkey",t.Gw="aes128",t}({}),Yo={pw:jo.Uw,mx:Uo,Ax:"cenc",yx:Bo,Mx:Mo,bx:"PlayReady"},Ko={pw:jo.Qw,mx:zo,Ax:"cenc",yx:Lo,Mx:Fo,bx:"Widevine"},Go={pw:jo.Fw,mx:Xo,Ax:"skd",yx:Ho,Mx:Vo,bx:"FairPlay"},$o=(jo.Fw,{pw:jo.Yw,mx:"org.w3.clearkey",Ax:"cenc",yx:Wo,Mx:qo,bx:"ClearKey"}),Zo=Zi.hL&&Zi.uL>=42||Zi.CL&&Zi.OL>=38||Zi.SL||Zi.EL||Zi.QL&&Zi.YL>=29;function Jo(t,n){return function(t,n){return wt(t)&&-1!==t.indexOf(n)}(t,"audio")?{initDataTypes:["cenc"],audioCapabilities:[xo({contentType:t},n?{robustness:"SW_SECURE_CRYPTO"}:{})]}:{initDataTypes:["cenc"],videoCapabilities:[xo({contentType:t},n?{robustness:"SW_SECURE_CRYPTO"}:{})]}}var Qo=function(){function t(t){this.AO=Lt(),this.SO=void 0,this.bO=t}var n=t.prototype;return n.ob=function(){return this.pO(Ko)},n.ub=function(){return this.pO($o)},n.hb=function(){return this.pO(Yo)},n.fb=function(){return this.pO(Go)},n.pO=function(t){var n=t.Mx,i=this.AO.get(n);if(i)return i;var e=this.yO(t,'video/mp4; codecs="avc1.42000a"');return this.AO.set(n,e),e},n.yO=function(t,n){var i=this;return ft((function(){return ht(this,(function(e){switch(e.label){case 0:return e.trys.push([0,2,,7]),[4,i.bO.MO(t.mx,[Jo(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.bO.MO(t.mx,[Jo(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.TO=function(){return this.SO||(this.SO=this.IO()),this.SO},n.IO=function(){var t=this;return ft((function(){return ht(this,(function(n){switch(n.label){case 0:return"https:"===undefined.protocol?[2,!1]:Zo?[4,t.ub()]:[2,!1];case 1:return n.sent()?[2,!1]:[2,!0]}}))}))()},t}(),tu=function(t){return t.pb="Ab",t.yb="Mb",t.bb="contentprotectionerror",t.Tb="contentprotectionsuccess",t.Sb="currentsourcechange",t.Nb="destroy",t.Ib="durationchange",t.Db="emptied",t.Eb="encrypted",t.kb="ended",t.Lb="xb",t.Cb="jb",t.Ob="Pb",t.Rb="zb",t.Bb="loadstart",t.Ub="manifestupdate",t.Qb="nosupportedrepresentationfound",t.Fb="offline",t.Yb="online",t.Gb="pause",t.so="play",t.Vb="progress",t.Wb="ratechange",t.Hb="representationchange",t.Xb="resize",t.Zb="seeked",t.qb="seeking",t.Kb="segmentnotfound",t.Jb="$b",t.tT="iT",t.ro="sourcechange",t.eT="timeupdate",t.sT="volumechange",t.nT="rT",t.oT="hT",t.aT="metricschange",t}({}),nu=["cenc"],iu=["cbcs","cbcs-1-9"],eu=function(t){function n(n){var i;return(i=t.call(this,tu.oT)||this).Tx=n,i}return Bt(n,t),n}(ki),ru=function(t){function n(n,i,e,r){var o;return(o=t.call(this,"Sx")||this).Nx=n,o.Ix=i,o.Sx=e,o.Dx=r,o}return Bt(n,t),n}(ki),ou=function(t){function n(){return t.call(this,"lt")||this}return Bt(n,t),n}(ki),uu=new E([0]).buffer,su=function(){function t(){this.Qu=[]}var n=t.prototype;return n.Cx=function(t){for(var n=0,i=this.Qu;n<i.length;n++){if(Yn(i[n][0],t))return!0}return!1},n.jx=function(t){for(var n=0,i=this.Qu;n<i.length;n++){var e=i[n];if(Yn(e[0],t))return e[1]}},n.Ox=function(t,n){for(var i=0,e=this.Qu;i<e.length;i++){var r=e[i];if(Yn(r[0],t))return void(r[1]=n)}this.Qu.push([t,n])},n.Px=function(t,n){this.Qu.forEach((function(n){return t(n[1],n[0])}),n)},n.Rx=function(){kt(this.Qu)},Dt(t,[{key:"iA",get:function(){return this.Qu.length}}]),t}(),fu=function(){function t(){var t=this;this.Qx=new Q((function(n,i){t.hf=n,t.Ux=i}))}var n=t.prototype;return n.zx=function(t){this.hf&&(this.hf(t),this.c_())},n.Bx=function(t){this.Ux&&(this.Ux(t),this.c_())},n.g_=function(){this.Qx.catch(Nt),this.Bx(new en)},n.v_=function(t){var n=this;t.then((function(t){return n.zx(t)}),(function(t){return n.Bx(t)}))},n.c_=function(){this.hf=void 0,this.Ux=void 0},t}();function hu(t,n){return t===Uo?function(t){if(t.byteLength<2*cu.length)return t;var n=new DataView(t,0,2*cu.length),i=di(n,!0);if(i===cu)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+Gn(t)+i;return function(t,n){void 0===n&&(n=!1);var i=new E(2*t.length);return vi(bi(i),new _i,t,n),i}(e,!0).buffer}(t)}(n):n}var cu="<PlayReady";var au=function(t){function n(n,i,e,r){var o;return(o=t.call(this,n,r)||this).Fx=i,o.Yx=e,o}return Bt(n,t),n}(nn),vu=function(t,n){return vu=p.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)p.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])},vu(t,n)};function du(t,n){if("function"!=typeof n&&null!==n)throw new m("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}vu(t,n),t.prototype=null===n?p.create(n):(i.prototype=n.prototype,new i)}function lu(t,n,i){return t.indexOf?t.indexOf(n,i):Array.prototype.indexOf.call(t,n,i)}(function(){function t(t,n){this.Gx=t,this.Vx=n}t.prototype.get=function(t){var n=this.Gx.get(t);if(0===this.Vx||void 0===n)return n;var i=this.Gx.get(t+1)||0,e=n&(1<<8-this.Vx)-1,r=i>>8-this.Vx;return(e<<this.Vx)+r},t.prototype.getBit=function(t){if(!(t<0)){var n=this.Gx.get(y.floor((t+this.Vx)/8));if(void 0!==n)return(n&1<<7-this.Vx-t%8)>0?1:0}},p.defineProperty(t.prototype,"bitLength",{get:function(){return this.Gx.bitLength-this.Vx},enumerable:!1,configurable:!0}),p.defineProperty(t.prototype,"length",{get:function(){return this.Gx.length},enumerable:!1,configurable:!0})})(),y.pow(2,-52);function wu(t,n,i){return y.min(y.max(t,n),i)}function bu(t,n){return t>>8-n}function gu(t,n){return t&(1<<n)-1}var mu=function(){function t(t){this.Wx=t,this.Hx=0,this.Xx=0}return p.defineProperty(t.prototype,"totalBitsRead",{get:function(){return 8*this.Hx+this.Xx},enumerable:!1,configurable:!0}),p.defineProperty(t.prototype,"done",{get:function(){return this.Hx===this.Wx.length&&0===this.Xx},enumerable:!1,configurable:!0}),p.defineProperty(t.prototype,"location",{get:function(){return{byte:this.Hx,bit:this.Xx}},enumerable:!1,configurable:!0}),t.prototype.copy=function(){var n=new t(this.Wx);return n.seek(this.Hx,this.Xx),n},t.prototype.canReadBits=function(t){return 8*this.Hx+t+this.Xx<=8*this.Wx.length},t.prototype.canReadBytes=function(t){return 0===this.Xx?this.Hx+t<=this.Wx.length:this.Hx+t<this.Wx.length},t.prototype.incBit=function(){this.Xx++,this.Xx>7&&(this.Hx++,this.Xx=0)},t.prototype.seek=function(t,n){this.Hx=t,this.Xx=n},t.prototype.peekBit=function(){if(!this.canReadBits(1))throw new g("Cannot read past end of buffer.");return this.Wx.get(this.Hx)>>7-this.Xx&1},t.prototype.readBit=function(){var t=this.peekBit();return this.incBit(),t},t.prototype.readByte=function(){if(!this.canReadBytes(1))throw new g("Cannot read past end of buffer.");if(0===this.Xx)return this.Wx.get(this.Hx++);var t=gu(this.Wx.get(this.Hx),8-this.Xx),n=bu(this.Wx.get(this.Hx+1),this.Xx);return this.Hx++,t<<this.Xx|n},t.prototype.readBits=function(t){if(!this.canReadBits(t))throw new g("Cannot read past end of buffer.");for(var n=[],i=0;i<t;i++)n.push(this.readBit());return n},t.prototype.readUInt=function(t){if(t>32)throw new g("The max bitlength that can be provided is 32.");if(!this.canReadBits(t))throw new g("Cannot read past end of buffer.");var n=0;if(0===this.Xx&&t%8==0)for(var i=t-8;i>=0;i-=8)n|=this.readByte()<<i;else for(i=t-1;i>=0;i--)n|=this.readBit()<<i;return n},t.prototype.readInt=function(t){if(t>32)throw new g("The max bitlength that can be provided is 32.");if(!this.canReadBits(t))throw new g("Cannot read past end of buffer.");var n=this.readUInt(t);return 0===(n&1<<t-1)?n:n-y.pow(2,t)},t.prototype.readExponentialGolombCode=function(){for(var t=0;0===this.readBit();)t++;var n=1<<t;return n+=this.readUInt(t)-1},t.prototype.readSignedExponentialGolombCode=function(){var t=this.readExponentialGolombCode();return 1&t?(t+1)/2:-t/2},t.prototype.skipBits=function(t){if(!this.canReadBits(t))throw new g("Skipping over the buffer edge is not allowed.");var n=this.Xx+t;this.Hx+=n>>3,this.Xx=7&n},t.prototype.readBool=function(){return this.readBit()>0},t.prototype.readString=function(t){if(!this.canReadBytes(t))throw new g("Cannot read past end of buffer.");for(var n=[],i=0;i<t;i++)n.push(this.readByte());return String.fromCharCode.apply(String,n)},t}(),pu=function(t,n){return t===n?0:t<n?-1:t>n?1:T(t)?T(n)?0:1:-1},yu=function(){function t(){this.Zx=[],this.qx=[],this.Kx=0}return t.from=function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];for(var e=new t,r=0,o=n;r<o.length;r++){var u=o[r];e.pushRange(u)}return e},t.prototype.pushRange=function(t,n,i){if(void 0===n&&(n=0),void 0===i&&(i=t.length),i<0)throw new g("The buffer length must be positive.");if(0!==i){if(0===this.qx.length)this.qx.push(0);else{var e=this.qx[this.qx.length-1]+this.Zx[this.Zx.length-1].length;this.qx.push(e)}this.Zx.push(t.subarray(n,n+i)),this.Kx+=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.Zx;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.Zx=[],this.qx=[],this.Kx=0},t.prototype.get=function(t){if(!(t<0||t>=this.length)){var n=this.findContainingBufferIndex(t),i=t-this.qx[n];return this.Zx[n][i]}},p.defineProperty(t.prototype,"first",{get:function(){return this.get(0)},enumerable:!1,configurable:!0}),t.prototype.indexOf=function(t){if(this.Zx.length<1)return-1;if(this.Zx.length>1){var n=this.join();this.clear(),this.pushRange(n)}var i=this.Zx[0];return"number"==typeof t?lu(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=lu(t,i,o))<0||o>r);o++){for(var u=o+1,s=o+e,f=1;u<s&&t[u]===n[f];u++,f++);if(u===s)return o}return-1}(i,t)},t.prototype.findContainingBufferIndex=function(t){return function(t,n,i){if(0!==t.length){var e=0,r=t.length-1;if(1!==i(t[e],n)){if(1===i(n,t[r]))return r;for(;e!==r;){var o=y.ceil((e+r)/2);i(t[o],n)<=0?e=o:r=o-1}return e}}}(this.qx,t,pu)},t.prototype.join=function(){if(1===this.Zx.length)return this.Zx[0];var t=new E(this.length);return this.copyInternal(t,0),t},p.defineProperty(t.prototype,"length",{get:function(){return this.Kx},enumerable:!1,configurable:!0}),p.defineProperty(t.prototype,"bitLength",{get:function(){return 8*this.length},enumerable:!1,configurable:!0}),t.prototype.readUIntBE=function(t,n){if(n<=0||n>4)throw new g("Expected byteLength to be between 0 and 4 but was "+n);if(t<0||t>this.length-n)throw new g("Offset must be between 0 and buffer.length - byteLength, but was "+t+" (max allowed "+(this.length-n)+")");if(1===n)return this.get(t);for(var i=0,e=0;e<n;e++)i+=this.get(t+e)*y.pow(2,8*(n-e-1));return i},t.prototype.slice=function(n,i){void 0===i&&(i=this.length);var e=wu(n,0,this.length),r=wu(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.Zx[u],f=e,h=f-this.qx[u];f+s.length-h<r;)o.pushRange(s,h,s.length-h),u+=1,h=(f+=s.length-h)-this.qx[u],s=this.Zx[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.Zx.length-1,e=this.Zx[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.Zx[i]).length-1}else r-=1;n-=1}return this.slice(0,n+1)},t}(),_u=function(){function t(n){this.Jx=n||t.BUFFER_CHUNK_SIZE,this.$x=!1,this.tC=new yu,this.Wx=new E(this.Jx),this.iC=0,this.eC=0,this.Xx=7}return t.prototype.closeByte=function(){this.Wx[this.iC++]=this.eC,this.iC>=this.Jx&&this.closeBuffer(),this.eC=0,this.Xx=7},t.prototype.closeBuffer=function(t){void 0===t&&(t=!0),0!==this.iC&&(this.tC.pushRange(this.Wx,0,this.iC),t&&(this.Wx=new E(this.Jx)),this.iC=0)},p.defineProperty(t.prototype,"isWritingStartBit",{get:function(){return 7===this.Xx},enumerable:!1,configurable:!0}),t.prototype.close=function(){if(this.$x)throw new g("Cannot close a closed BitWriter.");return this.isWritingStartBit||this.closeByte(),this.closeBuffer(!1),this.$x=!0,this.tC},t.prototype.writeBit=function(t){if(this.$x)throw new g("Cannot write to a closed BitWriter.");this.eC|=t<<this.Xx,0===this.Xx?this.closeByte():this.Xx--},t.prototype.writeByte=function(t){if(this.$x)throw new g("Cannot write to a closed BitWriter.");this.isWritingStartBit?(this.eC=t,this.closeByte()):this.writeByteUnaligned(t)},t.prototype.writeByteUnaligned=function(t){var n=this.Xx;this.eC|=bu(t,n+1),this.closeByte(),this.eC=gu(t,8-n)<<n+1,this.Xx=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.$x)throw new g("Cannot write to a closed BitWriter.");this.isWritingStartBit?this.writeBytesAligned(t):this.writeBytesUnaligned(t)},t.prototype.writeBytesAligned=function(t){this.iC+t.length<=this.Jx?(this.Wx.set(t,this.iC),this.iC+=t.length,this.iC===this.Jx&&this.closeBuffer()):(this.closeBuffer(),this.tC.pushRange(t))},t.prototype.writeBytesUnaligned=function(t){if(0!==t.length){var n=this.Xx;this.eC|=bu(t[0],n+1),this.closeByte();for(var i=1;i<t.length;i++){var e=gu(t[i-1],8-n),r=bu(t[i],n+1);this.eC=e<<n+1|r,this.closeByte()}this.eC=gu(t[t.length-1],8-n)<<n+1,this.Xx=n}},t.prototype.writeUInt=function(t,n){if(t<0)throw new g("Received a negative number.");if(n>32)throw new g("The max bitlength that can be provided is 32.");if(t>=y.pow(2,n))throw new g("Uint "+t+" cannot be represented in "+n+" bit(s).");if(this.isWritingStartBit&&n%8==0)for(var i=n-8;i>=0;i-=8)this.writeByte(t>>i&255);else for(i=n-1;i>=0;i--)this.writeBool((t&1<<i)>0)},t.prototype.writeInt=function(t,n){if(n>32)throw new g("The max bitlength that can be provided is 32.");if(y.abs(t)>=y.pow(2,n-1))throw new g("Signed integer "+t+" cannot be represented in "+n+" bit(s).");t<0?this.writeUInt(t+y.pow(2,n),n):this.writeUInt(t,n)},t.prototype.writeExponentialGolombCode=function(t){if(t<0)throw new g("Received a negative number.");for(var n=y.floor(y.log2(t+1))+1,i=0;i<n-1;i++)this.writeBit(0);this.writeUInt(t+1,n)},t.prototype.writeSignedExponentialGolombCode=function(t){0===t?this.writeExponentialGolombCode(0):t<0?this.writeExponentialGolombCode(-2*t):this.writeExponentialGolombCode(2*t-1)},t.prototype.padByte=function(t){for(;!this.isWritingStartBit;)this.writeBit(t)},t.prototype.writeBool=function(t){this.writeBit(t?1:0)},t.prototype.writeString=function(t){for(var n=function(t){for(var n=new E(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}(),Su=function(){function t(t){this.rb=new yu,this.sC=t}return t.prototype.closeWriter=function(){void 0!==this.sC&&(this.rb=this.rb.concat(this.sC.close()),this.sC=void 0)},p.defineProperty(t.prototype,"writer",{get:function(){return void 0===this.sC&&(this.sC=new _u),this.sC},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}(),Tu=function(){function t(t){if(this.boxType=t,4!==t.length&&16!==t.length)throw new g("The provided box type does not conform to either a 4 character type or a 16 byte uuid.")}return t.prototype.serializeCommonBoxHeader=function(n){var i=this.getSize(),e=i>=t.LARGE_SIZE/8,r=16===this.boxType.length;n.writeUInt(e?1:i,32),n.writeString(r?"uuid":this.boxType),e&&(n.writeUInt(y.floor(i/t.LARGE_SIZE),32),n.writeUInt(i%t.LARGE_SIZE,32)),r&&n.writeString(this.boxType)},t.prototype.getSize=function(){var n=8+(this.boxType.length>4?16:0),i=this.getBoxContentSize()+n;return i>=t.LARGE_SIZE/8&&(i+=8),i},t.prototype.serialize=function(){var t=new Su;return this.serializeCommonBoxHeader(t.writer),this.serializeBoxContent(t),t.toRangedBuffer()},t.LARGE_SIZE=y.pow(2,32),t}();function Eu(t,n){return t instanceof Fn?64===n:t<y.pow(2,n)}function Iu(t,n){return y.round(t*y.pow(2,n))}function ku(t,n){for(var i=0;i<n.length;i++)t.writeByte(n[i])}function Ru(t,n){return t/y.pow(2,n)}var Ou=function(t){function n(n,i,e){var r=t.call(this,n)||this;if(r.version=i,!Eu(i,8))throw new g("the provided version cannot fit in 8 bits.");return r.flags=e,r}return du(n,t),p.defineProperty(n.prototype,"flags",{get:function(){return this.Hd},set:function(t){this.Hd=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return 4},n.prototype.serializeFlags=function(t){if("number"!=typeof this.flags)throw new g("Missing custom serializeFlags method.");t.writer.writeUInt(this.flags,24)},n.prototype.serializeBoxContent=function(t){t.writer.writeByte(this.version),this.serializeFlags(t)},n}(Tu),Nu=function(t){function n(n,i){var e=t.call(this,n)||this;return e.data=i,e}return du(n,t),n.prototype.getBoxContentSize=function(){return this.data.length},n.prototype.serializeBoxContent=function(t){t.concat(yu.from(this.data))},n}(Tu),Pu=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 Au=16384;function Du(t){var n=t.length;if(n<=Au)return String.fromCharCode.apply(String,t);for(var i=[],e=0;e<n;e+=Au)i.push(String.fromCharCode.apply(String,t.slice(e,e+Au)));return i.join("")}var Cu=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 xu(t,n){var i=t.getUint8(n.offset);return n.shift(1),i}function Bu(t,n,i){var e=qu(Vu(t),n.offset,n.offset+i);return n.shift(e.byteLength),e}function Mu(t,n,i){return n.offset+i<=t.byteLength}function Uu(t,n,i){void 0===i&&(i=!1);var e=t.getUint32(n.offset,i);return n.shift(4),e}function Lu(t,n,i){void 0===i&&(i=!1);var e=Uu(t,n,i),r=Uu(t,n,i),o=i?r:e,u=i?e:r;return Fn.fromBits(u,o,!0)}function Fu(t,n,i){return Du(function(t){return[].slice.call(t)}(Bu(t,n,i)))}function zu(t,n){var i,e=xu(t,n);return 0==(128&e)?i=e:192==(224&e)?i=64*(31&e)+(63&xu(t,n)):224==(240&e)?i=4096*(15&e)+64*(63&xu(t,n))+(63&xu(t,n)):240==(248&e)&&(i=262144*(7&e)+4096*(63&xu(t,n))+64*(63&xu(t,n))+(63&xu(t,n))),i}function Wu(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=zu(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 Du(n)}(e)}(t,n,!0)}function qu(t,n,i){return void 0===n&&(n=0),void 0===i&&(i=t.byteLength),new E(t.buffer,t.byteOffset+n,i-n)}function Hu(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 Vu(t){return new E(t.buffer,t.byteOffset,t.byteLength)}var Xu=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 Pu(this.offset<<3)},t}(),ju=function(){function t(t,n){this.data=t,this.cursor=n}return t.prototype.nextUint8=function(){return xu(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 Uu(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=Uu(t,n,i),r=Uu(t,n,i),o=i?r:e,u=i?e:r;return Fn.fromBits(u,o,!1)}(this.data,this.cursor)},t.prototype.nextUint64=function(){return Lu(this.data,this.cursor)},t.prototype.nextUint8Array=function(t){return Bu(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(Uu(t,n));return e}(this.data,this.cursor,t)},t.prototype.nextChars=function(t){return Fu(this.data,this.cursor,t)},t.prototype.nextUTF8String=function(){return Wu(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 Yu(t,n){return t.type===n}var Ku=8;function Gu(t){var n=function(t,n){var i=[];for(;n.offset<t.byteLength;){var e=$u(t,n);if(!e.complete)return{complete:!1,boxes:i};i.push(e.box)}return{complete:!0,boxes:i}}(t.data,t.cursor);if(!n.complete)throw new g("Data incomplete");return n.boxes}function $u(t,n){var i=n.offset,e=function(t,n){var i=n.offset;if(!Mu(t,n,Ku)){return{complete:!1,neededOffset:o=n.offset+Ku}}var e=Uu(t,n),r=Fu(t,n,4);if(1===e){if(!Mu(t,n,8)){var o=n.offset+8;return n.seek(i),{complete:!1,neededOffset:o}}e=Lu(t,n).toNumber()}if("uuid"===r){if(!Mu(t,n,16)){o=n.offset+16;return n.seek(i),{complete:!1,neededOffset:o}}r=Fu(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 ju(Hu(t,i,u),new Xu(r.headerSize))};return n.seek(u),{complete:!0,box:f}}function Zu(t){return{version:t>>24,flags:new Cu(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 Qu(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 ts(t){var n=t.nextUint32Array(9);return{a:Ru(n[0],16),b:Ru(n[1],16),u:Ru(n[2],30),c:Ru(n[3],16),d:Ru(n[4],16),v:Ru(n[5],30),x:Ru(n[6],16),y:Ru(n[7],16),w:Ru(n[8],30)}}function ns(t){return new Nu(t.type,qu(Vu(t.data.data),t.data.cursor.offset))}var is=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 du(n,t),p.defineProperty(n.prototype,"handlerType",{get:function(){return this.nC},set:function(t){this.nC=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}(Ou);function es(t){var n=t.data,i=Zu(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 is(o,u,e,r.raw)}!function(t){function n(){return t.call(this,"mdir")||this}du(n,t),n.prototype.serializeReserved=function(t){t.writer.writeString("appl"),t.writer.writeUInt(0,32),t.writer.writeUInt(0,32)}}(is);var rs=function(){function t(t,n){void 0===n&&(n=!1),this.fixed28BitMode=n,this.tag=t}return t.prototype.encodeSize=function(t){for(var n=[];t>0;)n.length>0&&(n[n.length-1]+=128),n.push(t%128),t>>=7;if(this.fixed28BitMode)for(;n.length<4;)n.push(128);return n.reverse()},p.defineProperty(t.prototype,"tag",{get:function(){return this.rC},set:function(t){if(!Eu(t,8))throw new g("Provided tag does not fit in 8 bits.");this.rC=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}(),os=(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}du(n,t),p.defineProperty(n.prototype,"objectTypeIndication",{get:function(){return this.oC},set:function(t){if(!Eu(t,8))throw new g("Provided objectTypeIndication does not fit in 8 bits.");this.oC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"streamType",{get:function(){return this.hC},set:function(t){if(!Eu(t,6))throw new g("Provided streamType does not fit in 6 bits.");this.hC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"bufferSizeDb",{get:function(){return this.aC},set:function(t){if(!Eu(t,24))throw new g("Provided bufferSizeDb does not fit in 24 bits.");this.aC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"maxBitrate",{get:function(){return this.uC},set:function(t){if(!Eu(t,32))throw new g("Provided maxBitrate does not fit in 32 bits.");this.uC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"avgBitrate",{get:function(){return this.cC},set:function(t){if(!Eu(t,32))throw new g("Provided avgBitrate does not fit in 32 bits.");this.cC=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)}}}(rs),function(t){function n(n,i){void 0===i&&(i={});var e=t.call(this,5,i.fixed28BitMode)||this;return e.data=n,e}du(n,t),n.prototype.getDescriptorSize=function(){return this.data.length},n.prototype.serializeDescriptorContent=function(t){t.concat(yu.from(this.data))}}(rs),function(t){function n(n){void 0===n&&(n=!1);var i=t.call(this,6,n)||this;return i.predefined=2,i}return du(n,t),n.prototype.getDescriptorSize=function(){return 1},n.prototype.serializeDescriptorContent=function(t){t.writer.writeByte(this.predefined)},n}(rs)),us=(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 os(r.fixed28BitMode),o}du(n,t),p.defineProperty(n.prototype,"streamDependenceFlag",{get:function(){return void 0!==this.dependsOnEsId},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"urlFlag",{get:function(){return void 0!==this.urlString},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"ocrStreamFlag",{get:function(){return void 0!==this.ocrEsId},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"esId",{get:function(){return this.lC},set:function(t){if(!Eu(t,16))throw new g("Provided esId does not fit in 16 bits.");this.lC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"streamPriority",{get:function(){return this.dC},set:function(t){if(!Eu(t,5))throw new g("Provided streamPriority does not fit in 5 bits.");this.dC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"dependsOnEsId",{get:function(){return this.fC},set:function(t){if(t&&!Eu(t,16))throw new g("Provided dependsOnEsId does not fit in 16 bits.");this.fC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"ocrEsId",{get:function(){return this._C},set:function(t){if(t&&!Eu(t,16))throw new g("Provided ocrEsId does not fit in 16 bits.");this._C=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)}}(rs),function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n.boxes=[],n}return du(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}(Tu)),ss=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return du(n,t),n.prototype.serializeBoxContent=function(t){},n.prototype.getBoxContentSize=function(){return 0},n}(us),fs=function(t){function n(n,i){var e=t.call(this,n)||this;return e.dataReferenceIndex=i,e}return du(n,t),p.defineProperty(n.prototype,"dataReferenceIndex",{get:function(){return this.gC},set:function(t){if(!Eu(t,16))throw new g("Provided dataReferenceIndex does not fit in 16 bits.");this.gC=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}(ss),hs=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 du(n,t),p.defineProperty(n.prototype,"channelCount",{get:function(){return this.vC},set:function(t){if(!Eu(t,16))throw new g("Provided channelCount does not fit in 16 bits.");this.vC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"sampleSize",{get:function(){return this.wC},set:function(t){if(!Eu(t,16))throw new g("Provided sampleSize does not fit in 16 bits.");this.wC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"sampleRate",{get:function(){return this.mC},set:function(t){if(!Eu(Iu(t,16),32))throw new g("Provided rate does not fit in 32 bits (fixed 16.16).");this.mC=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){var n,i;return t.prototype.getBoxContentSize.call(this)+8+2+2+2+2+(void 0!==this.sampleRate?4:0)+(null!==(i=null===(n=this.extra)||void 0===n?void 0:n.length)&&void 0!==i?i:0)},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(0,32),n.writer.writeUInt(0,32),n.writer.writeUInt(this.channelCount,16),n.writer.writeUInt(this.sampleSize,16),n.writer.writeUInt(0,16),n.writer.writeUInt(0,16),n.writer.writeUInt(Iu(this.sampleRate,16),32),this.extra&&ku(n.writer,this.extra)},n}(fs),cs=(function(t){function n(n){var i=t.call(this,"stco",0,0)||this;return i.entries=n,i}du(n,t),p.defineProperty(n.prototype,"entries",{get:function(){return this.pC},set:function(t){if(!Eu(t.length,32))throw new g("Number of allowed entries cannot fit in 32 bits.");if(t.some((function(t){return!Eu(t,32)})))throw new g("Not all entries 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*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)}}}(Ou),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}du(n,t),p.defineProperty(n.prototype,"cleanApertureWidthN",{get:function(){return this.AC},set:function(t){if(!Eu(t,32))throw new g("Provided cleanApertureWidthN does not fit in 32 bits.");this.AC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"cleanApertureWidthD",{get:function(){return this.yC},set:function(t){if(!Eu(t,32))throw new g("Provided cleanApertureWidthD does not fit in 32 bits.");this.yC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"cleanApertureHeightN",{get:function(){return this.MC},set:function(t){if(!Eu(t,32))throw new g("Provided cleanApertureHeightN does not fit in 32 bits.");this.MC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"cleanApertureHeightD",{get:function(){return this.bC},set:function(t){if(!Eu(t,32))throw new g("Provided cleanApertureHeightD does not fit in 32 bits.");this.bC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"horizOffN",{get:function(){return this.TC},set:function(t){if(!Eu(t,32))throw new g("Provided horizOffN does not fit in 32 bits.");this.TC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"horizOffD",{get:function(){return this.SC},set:function(t){if(!Eu(t,32))throw new g("Provided horizOffD does not fit in 32 bits.");this.SC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"vertOffN",{get:function(){return this.NC},set:function(t){if(!Eu(t,32))throw new g("Provided vertOffN does not fit in 32 bits.");this.NC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"vertOffD",{get:function(){return this.IC},set:function(t){if(!Eu(t,32))throw new g("Provided vertOffD does not fit in 32 bits.");this.IC=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)}}(Tu),function(t){function n(n,i){var e=t.call(this,"ctts",n,0)||this;return e.entries=i,e}du(n,t),p.defineProperty(n.prototype,"entries",{get:function(){return this.pC},set:function(t){if(!Eu(t.length,32))throw new g("Number of allowed entries cannot fit in 32 bits.");if(t.some((function(t){return!Eu(t.sampleCount,32)||!Eu(t.sampleOffset,32)})))throw new g("Not all entries can be represented in 64 bits.");this.pC=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)}}}(Ou),function(t){function n(n){var i=t.call(this,"url ",0,void 0===n?1:0)||this;return i.location=n,i}du(n,t),p.defineProperty(n.prototype,"location",{get:function(){return this.DC},set:function(t){this.flags=void 0===t?1:0,this.DC=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))}}(Ou),function(t){function n(n,i,e){var r=t.call(this,"urn ",0,e)||this;return r.name=n,r.location=i,r}du(n,t),p.defineProperty(n.prototype,"location",{get:function(){return this.DC},set:function(t){if(1&this.flags)throw new g("The moov containment flag is set, a DataEntryUrlBox should be used instead.");this.DC=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))}}(Ou),function(t){function n(){return t.call(this,"dinf")||this}du(n,t)}(ss),function(t){function n(n,i,e){var r=t.call(this,n)||this;if(r.version=i,!Eu(i,8))throw new g("the provided version cannot fit in 8 bits.");return r.flags=e,r}return du(n,t),p.defineProperty(n.prototype,"flags",{get:function(){return this.Hd},set:function(t){this.Hd=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return 4},n.prototype.serializeFlags=function(t){if("number"!=typeof this.flags)throw new g("Missing custom serializeFlags method.");t.writer.writeUInt(this.flags,24)},n.prototype.serializeBoxContent=function(t){t.writer.writeByte(this.version),this.serializeFlags(t)},n}(us)),as=(function(t){function n(){return t.call(this,"dref",0,0)||this}du(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)}}(cs),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 du(n,t),p.defineProperty(n.prototype,"bitSize",{get:function(){return 0===this.version?32:64},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"entries",{get:function(){return this.pC},set:function(t){for(var n=0,i=t;n<i.length;n++){var e=i[n];if(!Eu(e.segmentDuration,this.bitSize))throw new g("SegmentDuration of one of the entries does not fit in ".concat(this.bitSize," bits."));if(!Eu(e.mediaTime,this.bitSize))throw new g("MediaTime of one of the entries does not fit in ".concat(this.bitSize," bits."));if(!Eu(e.mediaRateInteger,16))throw new g("Provided mediaRateInteger does not fit in 16 bits.");if(e.mediaRateFraction&&!Eu(e.mediaRateFraction,16))throw new g("Provided mediaRateFraction does not fit in 16 bits.")}this.pC=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}(Ou)),vs=function(t){function n(n,i){return void 0===i&&(i=0),t.call(this,n,0,i)||this}return du(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}(as),ds=function(t){function n(n,i){return void 0===i&&(i=0),t.call(this,n,1,i)||this}return du(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}(as);function ls(t){for(var n=t.data,i=Zu(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 vs(u,r.raw):new ds(u,r.raw)}var ws=function(t){function n(){return t.call(this,"edts")||this}return du(n,t),n}(ss);function bs(t){for(var n=new ws,i=0,e=Gu(t.data);i<e.length;i++){var r=e[i];Yu(r,"elst")?n.boxes.push(ls(r)):n.boxes.push(ns(r))}return n}var gs=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 du(n,t),p.defineProperty(n.prototype,"majorBrand",{get:function(){return this.EC},set:function(t){if(4!==t.length)throw new g("the provided major brand does not conform to the 4 character requirement");this.EC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"minorVersion",{get:function(){return this.kC},set:function(t){if(!Eu(t,32))throw new g("the provided minor version does not fit in 32 bits.");this.kC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"compatibleBrands",{get:function(){return this.LC},set:function(t){if(t.some((function(t){return 4!==t.length})))throw new g("Some of the compatible brands do not conform to the 4 character requirement");this.LC=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}(Tu),ms=(function(t){function n(n,i,e){return t.call(this,"ftyp",n,i,e)||this}du(n,t)}(gs),function(t){function n(n,i){void 0===i&&(i="free");var e=t.call(this,i)||this;return e.data=n,e}du(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(yu.from(this.data))}}(Tu),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 du(n,t),p.defineProperty(n.prototype,"creationTime",{get:function(){return this.xC},set:function(t){if(!Eu(t,this.bitSize))throw new g("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.xC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"modificationTime",{get:function(){return this.jC},set:function(t){if(!Eu(t,this.bitSize))throw new g("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.jC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"timescale",{get:function(){return this.OC},set:function(t){if(!Eu(t,32))throw new g("Provided sequence number does not fit in 32 bits.");this.OC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"duration",{get:function(){return this.RC},set:function(t){if(!Eu(t,this.bitSize))throw new g("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.RC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"language",{get:function(){return this.zC},set:function(t){if(!Ss(t))throw new g("Expected an ISO-639-2/T language code");this.zC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"bitSize",{get:function(){return 0===this.version?32:64},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.bitSize/8*3+4+2+2},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),this.serializeMdiaContent(n),n.writer.writeBit(0);for(var i=0,e=this.language;i<e.length;i++){var r=e[i];n.writer.writeUInt(r.charCodeAt(0)-96,5)}n.writer.writeUInt(0,16)},n}(Ou)),ps=function(t){function n(n,i,e){return void 0===e&&(e=0),t.call(this,n,i,0,e)||this}return du(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}(ms),ys=function(t){function n(n,i,e){return void 0===e&&(e=0),t.call(this,n,i,1,e)||this}return du(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}(ms);function _s(t){var n=t.data,i=Zu(n.nextUint32()),e=i.version,r=i.flags,o=Ju(n,e),u=new mu(yu.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 Ss(h)||(h="und"),n.skip(2),0===e?new ps(o,h,r.raw):new ys(o,h,r.raw)}function Ss(t){return/^[a-z]{3}$/.test(t)}var Ts=function(t){function n(){return t.call(this,"mdia")||this}return du(n,t),n}(ss);function Es(t){for(var n=new Ts,i=0,e=Gu(t.data);i<e.length;i++){var r=e[i];Yu(r,"mdhd")?n.boxes.push(_s(r)):Yu(r,"hdlr")?n.boxes.push(es(r)):n.boxes.push(ns(r))}return n}var Is;(function(t){function n(){var n=t.call(this,"mdat")||this;return n.data=new yu,n}du(n,t),n.prototype.getBoxContentSize=function(){return this.data.length},n.prototype.serializeBoxContent=function(t){t.concat(this.data)}})(Tu),function(t){function n(){return t.call(this,"minf")||this}du(n,t)}(ss),function(t){function n(n){var i=t.call(this,"meta",0,0)||this;return i.handler=n,i}du(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())}}(cs);!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"}(Is||(Is={}));var ks,Rs,Os={a:1,b:0,u:0,c:0,d:1,v:0,x:0,y:0,w:1};function Ns(t,n){n.writer.writeUInt(Iu(t.a,16),32),n.writer.writeUInt(Iu(t.b,16),32),n.writer.writeUInt(Iu(0,30),32),n.writer.writeUInt(Iu(t.c,16),32),n.writer.writeUInt(Iu(t.d,16),32),n.writer.writeUInt(Iu(0,30),32),n.writer.writeUInt(Iu(t.x,16),32),n.writer.writeUInt(Iu(t.y,16),32),n.writer.writeUInt(Iu(1,30),32)}function Ps(t,n){var i,e,r,o;n.writer.writeUInt(null!==(i=t.isLeading)&&void 0!==i?i:ks.UNKNOWN,2),n.writer.writeUInt(null!==(e=t.sampleDependsOn)&&void 0!==e?e:Rs.UNKNOWN,2),n.writer.writeUInt(null!==(r=t.sampleIsDependedOn)&&void 0!==r?r:Rs.UNKNOWN,2),n.writer.writeUInt(null!==(o=t.sampleHasRedundancy)&&void 0!==o?o:Rs.UNKNOWN,2)}function As(t,n){var i,e,r;n.writer.writeUInt(0,4),Ps(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"}(ks||(ks={})),function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.YES=1]="YES",t[t.NO=2]="NO",t[t.RESERVED=3]="RESERVED"}(Rs||(Rs={}));var Ds=function(){},Cs=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 du(n,t),p.defineProperty(n.prototype,"systemId",{get:function(){return this.BC},set:function(t){if(16!==t.length)throw new g("Provided systemId length is not 16.");this.BC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"data",{get:function(){return this.QC},set:function(t){if(!Eu(t.length,32))throw new g("Provided data length does not fit in 32 bits.");this.QC=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(yu.from(this.systemId)),this.serializeVersionBoxContent(n),n.writer.writeUInt(this.data.length,32),n.concat(yu.from(this.data))},n}(Ou),xs=function(t){function n(n,i){return t.call(this,0,n,i)||this}return du(n,t),n}(Cs),Bs=function(t){function n(n,i,e){var r=t.call(this,1,n,i)||this;return r.kIds=e,r}return du(n,t),p.defineProperty(n.prototype,"kIds",{get:function(){return this.FC},set:function(t){if(!Eu(t.length,32))throw new g("Provided kIds length cannot fit in 32 bits.");if(t.some((function(t){return 16!==t.length})))throw new g("Not all provided key ids are 16 bytes long.");this.FC=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(yu.from(e))}},n}(Cs);function Ms(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 Bs(i,s,e):new xs(i,s)}var Us=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 du(n,t),p.defineProperty(n.prototype,"bitSize",{get:function(){return 0===this.version?32:64},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"fragmentDuration",{get:function(){return this.YC},set:function(t){if(!Eu(t,this.bitSize))throw new g("The provided fragmentDuration does not fit in ".concat(this.bitSize," bits."));this.YC=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.bitSize/8},n}(Ou),Ls=function(t){function n(n,i){return void 0===i&&(i=0),t.call(this,n,0,i)||this}return du(n,t),n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.fragmentDuration,32)},n}(Us),Fs=function(t){function n(n,i){return void 0===i&&(i=0),t.call(this,n,1,i)||this}return du(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}(Us);function zs(t){var n=t.data,i=Zu(n.nextUint32()),e=i.version,r=i.flags;return 0===e?new Ls(n.nextUint32(),r.raw):new Fs(n.nextUint64(),r.raw)}var Ws=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 du(n,t),p.defineProperty(n.prototype,"trackId",{get:function(){return this.GC},set:function(t){if(!Eu(t,32))throw new g("Provided track id does not fit in 32 bits.");this.GC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"defaultSampleDescriptionIndex",{get:function(){return this.VC},set:function(t){if(!Eu(t,32))throw new g("Provided default sample description index does not fit in 32 bits.");this.VC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"defaultSampleDuration",{get:function(){return this.WC},set:function(t){if(!Eu(t,32))throw new g("Provided default sample duration does not fit in 32 bits.");this.WC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"defaultSampleSize",{get:function(){return this.HC},set:function(t){if(!Eu(t,32))throw new g("Provided default sample size does not fit in 32 bits.");this.HC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"defaultSampleFlags",{get:function(){return this.XC},set:function(t){if((null==t?void 0:t.samplePaddingValue)&&!Eu(t.samplePaddingValue,3))throw new g("Provided sample padding value does not fit in 3 bits.");if((null==t?void 0:t.sampleDegradationPriority)&&!Eu(t.sampleDegradationPriority,16))throw new g("Provided sample degradation priority does not fit in 16 bits.");this.XC=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),As(null!==(i=this.defaultSampleFlags)&&void 0!==i?i:{},n)},n}(Ou);function qs(t){var n=t.data,i=Zu(n.nextUint32()),e=i.version,r=i.flags,o=n.nextUint32(),u=n.nextUint32(),s=n.nextUint32(),f=n.nextUint32(),h=Qu(new mu(yu.from(n.nextUint8Array(4))));return new Ws(o,{sampleDescriptionIndex:u,sampleDuration:s,sampleSize:f,sampleFlags:h},e,r.raw)}var Hs=function(t){function n(){return t.call(this,"mvex")||this}return du(n,t),n}(ss);function Vs(t){for(var n=new Hs,i=0,e=Gu(t.data);i<e.length;i++){var r=e[i];Yu(r,"mehd")?n.boxes.push(zs(r)):Yu(r,"trex")?n.boxes.push(qs(r)):n.boxes.push(ns(r))}return n}var Xs=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:Os,c.ZC=e,c}return du(n,t),p.defineProperty(n.prototype,"bitSize",{get:function(){return 0===this.version?32:64},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"creationTime",{get:function(){return this.xC},set:function(t){if(!Eu(t,this.bitSize))throw new g("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.xC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"modificationTime",{get:function(){return this.jC},set:function(t){if(!Eu(t,this.bitSize))throw new g("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.jC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"timescale",{get:function(){return this.OC},set:function(t){if(!Eu(t,32))throw new g("Provided sequence number does not fit in 32 bits.");this.OC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"duration",{get:function(){return this.RC},set:function(t){if(!Eu(t,this.bitSize))throw new g("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.RC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"rate",{get:function(){return this.qC},set:function(t){if(!Eu(Iu(t,16),32))throw new g("Provided rate does not fit in 32 bits (fixed 16.16).");this.qC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"volume",{get:function(){return this.KC},set:function(t){if(!Eu(Iu(t,8),16))throw new g("Provided volume does not fit in 16 bits (fixed 8.8).");this.KC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"matrix",{get:function(){return this.JC},set:function(t){if(0!==t.u||0!==t.v||1!==t.w)throw new g("(u, v, w) does not match the required (0, 0, 1)");this.JC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"nextTrackId",{get:function(){return this.ZC},set:function(t){if(0===t)throw new g("NextTrackId cannot be 0.");if(!Eu(t,32))throw new g("NextTrackId cannot exceed 32 bits.");this.ZC=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.bitSize/8*3+4+4+2+2+8+36+24+4},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),this.serializeMvhdContent(n),n.writer.writeUInt(Iu(this.rate,16),32),n.writer.writeUInt(Iu(this.volume,8),16),n.writer.writeUInt(0,16),n.writer.writeUInt(0,32),n.writer.writeUInt(0,32),Ns(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}(Ou),js=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 du(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}(Xs),Ys=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 du(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}(Xs);function Ks(t){var n=t.data,i=Zu(n.nextUint32()),e=i.version,r=i.flags,o=Ju(n,e),u=Ru(n.nextUint32(),16),s=Ru(n.nextUint16(),8);n.skip(2),n.skip(8);var f=ts(n);n.skip(24);var h=n.nextUint32();return 0===e?new js(o,h,{rate:u,volume:s,matrix:f},r.raw):new Ys(o,h,{rate:u,volume:s,matrix:f},r.raw)}var Gs=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:Os,a}return du(n,t),p.defineProperty(n.prototype,"bitSize",{get:function(){return 0===this.version?32:64},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"creationTime",{get:function(){return this.xC},set:function(t){if(!Eu(t,this.bitSize))throw new g("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.xC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"modificationTime",{get:function(){return this.jC},set:function(t){if(!Eu(t,this.bitSize))throw new g("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.jC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"trackId",{get:function(){return this.GC},set:function(t){if(0===t)throw new g("trackId cannot be 0.");if(!Eu(t,32))throw new g("trackId cannot exceed 32 bits.");this.GC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"duration",{get:function(){return this.RC},set:function(t){if(!Eu(t,this.bitSize))throw new g("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.RC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"volume",{get:function(){return this.KC},set:function(t){if(!Eu(Iu(t,8),16))throw new g("Provided volume does not fit in 16 bits (fixed 8.8).");this.KC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"width",{get:function(){return this.$C},set:function(t){if(!Eu(Iu(t,16),32))throw new g("Provided width does not fit in 32 bits (fixed 16.16).");this.$C=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"height",{get:function(){return this.tj},set:function(t){if(!Eu(Iu(t,16),32))throw new g("Provided height does not fit in 32 bits (fixed 16.16).");this.tj=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"layer",{get:function(){return this.ij},set:function(t){if(!Eu(t,16))throw new g("Provided layer does not fit in 16 bits.");this.ij=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"alternateGroup",{get:function(){return this.ej},set:function(t){if(!Eu(t,16))throw new g("Provided alternateGroup does not fit in 16 bits.");this.ej=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"matrix",{get:function(){return this.JC},set:function(t){if(0!==t.u||0!==t.v||1!==t.w)throw new g("(u, v, w) does not match the required (0, 0, 1)");this.JC=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.bitSize/8*3+4+4+8+2+2+2+2+36+4+4},n.prototype.serializeFlags=function(t){t.writer.writeUInt(0,20),t.writer.writeBool(this.flags.trackSizeIsAspectRatio),t.writer.writeBool(this.flags.trackInPreview),t.writer.writeBool(this.flags.trackInMovie),t.writer.writeBool(this.flags.trackEnabled)},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),this.serializeTkhdContent(n),n.writer.writeUInt(0,32),n.writer.writeUInt(0,32),n.writer.writeUInt(this.layer,16),n.writer.writeUInt(this.alternateGroup,16),n.writer.writeUInt(Iu(this.volume,8),16),n.writer.writeUInt(0,16),Ns(this.matrix,n),n.writer.writeUInt(Iu(this.width,16),32),n.writer.writeUInt(Iu(this.height,16),32)},n}(Ou),$s=function(t){function n(n,i,e,r,o,u){return t.call(this,0,n,i,e,r,o,u)||this}return du(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}(Gs),Zs=function(t){function n(n,i,e,r,o,u){return t.call(this,1,n,i,e,r,o,u)||this}return du(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}(Gs);function Js(t){var n,i,e,r,o=t.data,u=Zu(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=Ru(o.nextInt16(),8);o.skip(2);var b=ts(o),g=Ru(o.nextUint32(),16),m=Ru(o.nextUint32(),16);return 0===s?new $s({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 Zs({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 Qs=function(t){function n(){return t.call(this,"trak")||this}return du(n,t),n}(ss);function tf(t){for(var n=new Qs,i=0,e=Gu(t.data);i<e.length;i++){var r=e[i];Yu(r,"tkhd")?n.boxes.push(Js(r)):Yu(r,"mdia")?n.boxes.push(Es(r)):Yu(r,"edts")?n.boxes.push(bs(r)):n.boxes.push(ns(r))}return n}var nf=function(t){function n(){return t.call(this,"moov")||this}return du(n,t),n}(ss);var ef=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 du(n,t),p.defineProperty(n.prototype,"bitSize",{get:function(){return 0===this.version?32:64},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"baseMediaDecodeTime",{get:function(){return this.sj},set:function(t){if(!Eu(t,this.bitSize))throw new g("Provided baseMediaDecodeTime does not fit in ".concat(this.bitSize," bits."));this.sj=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.bitSize/8},n}(Ou),rf=function(t){function n(n,i){return void 0===i&&(i=0),t.call(this,n,0,i)||this}return du(n,t),n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.baseMediaDecodeTime,32)},n}(ef),of=function(t){function n(n,i){return void 0===i&&(i=0),t.call(this,n,1,i)||this}return du(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}(ef);function uf(t){var n=t.data,i=Zu(n.nextUint32()),e=i.version,r=i.flags;return 0===e?new rf(n.nextUint32(),r.raw):new of(n.nextUint64(),r.raw)}var sf=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 du(n,t),p.defineProperty(n.prototype,"trackId",{get:function(){return this.GC},set:function(t){if(!Eu(t,32))throw new g("Provided track id does not fit in 32 bits.");this.GC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"baseDataOffset",{get:function(){return this.nj},set:function(t){if(void 0===t&&this.flags.baseDataOffsetPresent)throw new g("The base data offset present flag is set.");if(void 0!==t&&!this.flags.baseDataOffsetPresent)throw new g("The base data offset present flag is not set.");if(t&&!Eu(t,64))throw new g("Provided baseDataOffset does not fit in 32 bits.");this.nj=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"sampleDescriptionIndex",{get:function(){return this.rj},set:function(t){if(void 0===t&&this.flags.sampleDescriptionIndexPresent)throw new g("The sample description index flag is set.");if(void 0!==t&&!this.flags.sampleDescriptionIndexPresent)throw new g("The sample description index flag is not set.");if(t&&!Eu(t,32))throw new g("Provided sampleDescriptionIndex does not fit in 32 bits.");this.rj=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"defaultSampleDuration",{get:function(){return this.WC},set:function(t){if(void 0===t&&this.flags.defaultSampleDurationPresent)throw new g("The default sample duration present flag is set.");if(void 0!==t&&!this.flags.defaultSampleDurationPresent)throw new g("The default sample duration present flag is not set.");if(t&&!Eu(t,32))throw new g("Provided defaultSampleDuration does not fit in 32 bits.");this.WC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"defaultSampleSize",{get:function(){return this.HC},set:function(t){if(void 0===t&&this.flags.defaultSampleSizePresent)throw new g("The default sample size present flag is set.");if(void 0!==t&&!this.flags.defaultSampleSizePresent)throw new g("The default sample size present flag is not set.");if(t&&!Eu(t,32))throw new g("Provided defaultSampleSize does not fit in 32 bits.");this.HC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"defaultSampleFlags",{get:function(){return this.XC},set:function(t){if(void 0===t&&this.flags.defaultSampleFlagsPresent)throw new g("The default sample flags present flag is set.");if(void 0!==t&&!this.flags.defaultSampleFlagsPresent)throw new g("The default sample flags present flag is not set.");if((null==t?void 0:t.samplePaddingValue)&&!Eu(t.samplePaddingValue,3))throw new g("Provided sample padding value does not fit in 3 bits.");if((null==t?void 0:t.sampleDegradationPriority)&&!Eu(t.sampleDegradationPriority,16))throw new g("Provided sample degradation priority does not fit in 16 bits.");this.XC=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&&As(this.defaultSampleFlags,n)},n}(Ou);function ff(t){var n=t.data,i=n.nextUint8(),e=new mu(yu.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?Qu(new mu(yu.from(n.nextUint8Array(4)))):void 0;return new sf({trackId:a,defaultBaseIsMoof:r,durationIsEmpty:o,baseDataOffset:v,sampleDescriptionIndex:d,defaultSampleDuration:l,defaultSampleSize:w,defaultSampleFlags:b},i)}var hf=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 du(n,t),p.defineProperty(n.prototype,"dataOffset",{get:function(){return this.hj},set:function(t){if(t&&!Eu(t,32))throw new g("Provided data offset does not fit in 32 bits.");this.hj=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"firstSampleFlags",{get:function(){return this.aj},set:function(t){if((null==t?void 0:t.samplePaddingValue)&&!Eu(t.samplePaddingValue,3))throw new g("Provided sample padding value does not fit in 3 bits.");if((null==t?void 0:t.sampleDegradationPriority)&&!Eu(t.sampleDegradationPriority,16))throw new g("Provided sample degradation priority does not fit in 16 bits.");this.aj=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"samples",{get:function(){return this.uj},set:function(t){var n,i;if(!Eu(t.length,32))throw new g("The sample count cannot be represented in 32 bits.");for(var e=0,r=t;e<r.length;e++){var o=r[e];if(void 0===o.duration&&this.flags.sampleDurationPresent)throw new g("The sample duration present flag is set.");if(void 0!==o.duration&&!this.flags.sampleDurationPresent)throw new g("The sample duration present flag is not set.");if(o.duration&&!Eu(o.duration,32))throw new g("Provided sample duration does not fit in 32 bits.");if(void 0===o.size&&this.flags.sampleSizePresent)throw new g("The sample size present flag is set.");if(void 0!==o.size&&!this.flags.sampleSizePresent)throw new g("The sample size present flag is not set.");if(o.size&&!Eu(o.size,32))throw new g("Provided sample size does not fit in 32 bits.");if(void 0===o.flags&&this.flags.sampleFlagsPresent)throw new g("The sample flags present flag is set.");if(void 0!==o.flags&&!this.flags.sampleFlagsPresent)throw new g("The sample flags present flag is not set.");if((null===(n=o.flags)||void 0===n?void 0:n.samplePaddingValue)&&!Eu(o.flags.samplePaddingValue,3))throw new g("Provided sample padding value does not fit in 3 bits.");if((null===(i=o.flags)||void 0===i?void 0:i.sampleDegradationPriority)&&!Eu(o.flags.sampleDegradationPriority,16))throw new g("Provided sample degradation priority does not fit in 16 bits.");if(void 0===o.compositionTimeOffset&&this.flags.sampleCompositionTimeOffsetsPresent)throw new g("The sample compositionTimeOffset present flag is set.");if(void 0!==o.compositionTimeOffset&&!this.flags.sampleCompositionTimeOffsetsPresent)throw new g("The sample compositionTimeOffset present flag is not set.");if(o.compositionTimeOffset&&!Eu(o.compositionTimeOffset,32))throw new g("Provided sample compositionTimeOffset does not fit in 32 bits.")}this.uj=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&&As(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&&As(r.flags,n),this.flags.sampleCompositionTimeOffsetsPresent&&(0===this.version?n.writer.writeUInt(r.compositionTimeOffset,32):n.writer.writeInt(r.compositionTimeOffset,32))}},n}(Ou);function cf(t){var n=t.data,i=n.nextUint8(),e=new mu(yu.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=Qu(new mu(yu.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=Qu(new mu(yu.from(n.nextUint8Array(4))))),r&&(l.compositionTimeOffset=0===i?n.nextUint32():n.nextInt32()),v.push(l)}return new hf(i,a,v)}var af=function(t){function n(){return t.call(this,"traf")||this}return du(n,t),n}(ss);function vf(t){for(var n=new af,i=0,e=Gu(t.data);i<e.length;i++){var r=e[i];Yu(r,"tfhd")?n.boxes.push(ff(r)):Yu(r,"tfdt")?n.boxes.push(uf(r)):Yu(r,"trun")?n.boxes.push(cf(r)):n.boxes.push(ns(r))}return n}var df=function(t){function n(){return t.call(this,"moof")||this}return du(n,t),n}(ss);!function(t){function n(n){var i=t.call(this,"mfhd",0,0)||this;return i.sequenceNumber=n,i}du(n,t),p.defineProperty(n.prototype,"sequenceNumber",{get:function(){return this.cj},set:function(t){if(!Eu(t,32))throw new g("Provided sequence number does not fit in 32 bits.");this.cj=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)}}(Ou);var lf=function(t){function n(n){var i=t.call(this,"frma")||this;return i.codingName=n,i}return du(n,t),p.defineProperty(n.prototype,"codingName",{get:function(){return this.lj},set:function(t){if(4!==t.length)throw new g("Provided coding name was not 4 characters long.");this.lj=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return 4},n.prototype.serializeBoxContent=function(t){t.writer.writeString(this.codingName)},n}(Tu),wf=(function(t){function n(n,i){var e=t.call(this,"pasp")||this;return e.hSpacing=n,e.vSpacing=i,e}du(n,t),p.defineProperty(n.prototype,"hSpacing",{get:function(){return this.dj},set:function(t){if(!Eu(t,32))throw new g("Provided hSpacing does not fit in 32 bits.");this.dj=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"vSpacing",{get:function(){return this._j},set:function(t){if(!Eu(t,32))throw new g("Provided vSpacing does not fit in 32 bits.");this._j=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)}}(Tu),function(t){function n(n,i,e){var r=t.call(this,n)||this;return r.sample=i,r.sinf=e,r}du(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())}}(ss),function(t){function n(n,i,e){var r=t.call(this,"sinf")||this;return r.schm=i,r.schi=e,r.frma=new lf(n),r}du(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())}}(Tu),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 du(n,t),p.defineProperty(n.prototype,"bitSize",{get:function(){return 0===this.version?32:64},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"entries",{get:function(){return this.pC},set:function(t){var n=this;if(!Eu(t.length,32))throw new g("Number of entries provided does not fit in 32 bits.");if(t.some((function(t){return!Eu(t,n.bitSize)})))throw new g("Not all provided entries fit in ".concat(this.bitSize," bits."));this.pC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"explicitAuxInfoType",{get:function(){return this.gj},set:function(t){if(void 0===t)this.flags=0;else{if(!Eu(t.auxInfoType,32))throw new g("Provided auxInfoType does not fit in 32 bits.");if(!Eu(t.auxInfoTypeParameter,32))throw new g("Provided auxInfoTypeParameter does not fit in 32 bits.");this.flags=1}this.gj=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}(Ou)),bf=(function(t){function n(){return null!==t&&t.apply(this,arguments)||this}du(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)}}}(wf),function(t){function n(){return null!==t&&t.apply(this,arguments)||this}du(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)}}}(wf),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}du(n,t),p.defineProperty(n.prototype,"defaultSampleInfoSize",{get:function(){return this.vj},set:function(t){if(!Eu(t,8))throw new g("Provided defaultSampleInfoSize does not fit in a single byte.");this.vj=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"sampleInfoSizes",{get:function(){return this.wj},set:function(t){if(!Eu(t.length,32))throw new g("Number of sampleInfoSizes provided does not fit in 32 bits.");if(t.some((function(t){return!Eu(t,8)})))throw new g("Not all provided sampleInfoSizes fit in a byte.");this.wj=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"explicitAuxInfoType",{get:function(){return this.gj},set:function(t){if(void 0===t)this.flags=0;else{if(!Eu(t.auxInfoType,32))throw new g("Provided auxInfoType does not fit in 32 bits.");if(!Eu(t.auxInfoTypeParameter,32))throw new g("Provided auxInfoTypeParameter does not fit in 32 bits.");this.flags=1}this.gj=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+(void 0===this.explicitAuxInfoType?0:8)+1+4+(0!==this.defaultSampleInfoSize?0:this.sampleInfoSizes.length)},n.prototype.serializeBoxContent=function(n){if(0!==this.defaultSampleInfoSize&&this.sampleInfoSizes.length>0)throw new g("Both a default size and specific sizes are provided. This is prohibited.");t.prototype.serializeBoxContent.call(this,n),void 0!==this.explicitAuxInfoType&&(n.writer.writeUInt(this.explicitAuxInfoType.auxInfoType,32),n.writer.writeUInt(this.explicitAuxInfoType.auxInfoTypeParameter,32)),n.writer.writeByte(this.defaultSampleInfoSize),n.writer.writeUInt(this.sampleInfoSizes.length,32);for(var i=0,e=this.sampleInfoSizes;i<e.length;i++){var r=e[i];n.writer.writeByte(r)}}}(Ou),function(t){function n(n){var i=t.call(this,"sdtp",0,0)||this;return i.samples=n,i}du(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++){Ps(e[i],n)}}}(Ou),function(t){function n(n){return t.call(this,"stsd",n,0)||this}du(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)}}(cs),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 du(n,t),p.defineProperty(n.prototype,"groupingType",{get:function(){return this.mj},set:function(t){if(4!==t.length)throw new g("The provided groupingType does not equal 4 characters.");this.mj=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}(Ou)),gf=(function(t){function n(n,i){return t.call(this,0,n,i)||this}du(n,t),n.prototype.serializeVersionBoxContent=function(t){}}(bf),function(t){function n(n,i,e){var r=t.call(this,1,n,e)||this;return r.defaultLength=i,r}du(n,t),p.defineProperty(n.prototype,"defaultLength",{get:function(){return this.pj},set:function(t){if(!Eu(t,32))throw new g("The provided defaultLength does not fit in 32 bits.");this.pj=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)}}(bf),function(t){function n(n,i,e,r){void 0===r&&(r=0);var o=this;if(n<2)throw new g("This constructor is only meant for versions 2 and up.");return(o=t.call(this,n,i,e)||this).defaultSampleDescriptionIndex=r,o}du(n,t),p.defineProperty(n.prototype,"defaultSampleDescriptionIndex",{get:function(){return this.VC},set:function(t){if(!Eu(t,32))throw new g("The provided defaultSampleDescriptionIndex does not fit in 32 bits.");this.VC=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)}}(bf),function(t){function n(n){void 0===n&&(n=[]);var i=t.call(this,"stsz",0,0)||this;return i.sampleSizes=n,i}du(n,t),p.defineProperty(n.prototype,"sampleSizes",{get:function(){return this.Aj},set:function(t){if(!Eu(t.length,32))throw new g("Number of allowed samples cannot fit in 32 bits.");if(t.some((function(t){return!Eu(t,32)})))throw new g("Not all sampleSizes can be represented in 32 bits.");this.Aj=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)}}}(Ou),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}du(n,t),p.defineProperty(n.prototype,"defaultSampleSize",{get:function(){return this.HC},set:function(t){if(!Eu(t,32))throw new g("Provided defaultSampleSize does not fit in 32 bits.");this.HC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"samples",{get:function(){return this.uj},set:function(t){if(!Eu(t,32))throw new g("Number of allowed samples cannot fit in 32 bits.");this.uj=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)}}(Ou),function(t){function n(){return t.call(this,"stbl")||this}du(n,t)}(ss),function(t){function n(n){var i=t.call(this,"stsc",0,0)||this;return i.entries=n,i}du(n,t),p.defineProperty(n.prototype,"entries",{get:function(){return this.pC},set:function(t){if(!Eu(t.length,32))throw new g("Number of allowed entries cannot fit in 32 bits.");if(t.some((function(t){return!Eu(t.firstChunk,32)||!Eu(t.sampleDescriptionIndex,32)||!Eu(t.samplesPerChunk,32)})))throw new g("Not all entries can be represented in 96 bits.");this.pC=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)}}}(Ou),function(t){function n(){return t.call(this,"schi")||this}du(n,t)}(ss),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}du(n,t),p.defineProperty(n.prototype,"schemeType",{get:function(){return this.yj},set:function(t){if(4!==t.length)throw new g("The provided schemeType does not have a length of 4.");this.yj=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"schemeVersion",{get:function(){return this.Mj},set:function(t){if(!Eu(t,32))throw new g("The provided schemeVersion does not fit in 23 bits.");this.Mj=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"schemeUri",{get:function(){return this.bj},set:function(t){if(t&&4!==t.length)throw new g("The provided schemeUri does not have a length of 4.");this.flags=void 0===t?0:1,this.bj=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))}}(Ou),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 du(n,t),p.defineProperty(n.prototype,"bitSize",{get:function(){return 0===this.version?32:64},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"referenceId",{get:function(){return this.Tj},set:function(t){if(!Eu(t,32))throw new g("Provided referenceId does not fit in 32 bits.");this.Tj=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"timescale",{get:function(){return this.OC},set:function(t){if(!Eu(t,32))throw new g("Provided timescale does not fit in 32 bits.");this.OC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"earliestPresentationTime",{get:function(){return this.Sj},set:function(t){if(!Eu(t,this.bitSize))throw new g("Provided earliestPresentationTime does not fit in ".concat(this.bitSize," bits."));this.Sj=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"firstOffset",{get:function(){return this.Nj},set:function(t){if(!Eu(t,this.bitSize))throw new g("Provided timescale does not fit in ".concat(this.bitSize," bits."));this.Nj=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"references",{get:function(){return this.Ij},set:function(t){if(!Eu(t.length,16))throw new g("The number of provided reference items does not fit in 16 bits.");for(var n=0,i=t;n<i.length;n++){var e=i[n];if(!Eu(e.referencedSize,31))throw new g("Provided referenced size does not fit in 31 bits.");if(!Eu(e.subsegmentDuration,32))throw new g("Provided subsegment duration does not fit in 31 bits.");if(!Eu(e.sapType,3))throw new g("Provided SAP type does not fit in 3 bits.");if(!Eu(e.sapDeltaTime,28))throw new g("Provided SAP delta time does not fit in 28 bits.")}this.Ij=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}(Ou)),mf=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 du(n,t),n.prototype.serializeSidxBoxContent=function(t){t.writer.writeUInt(this.earliestPresentationTime,32),t.writer.writeUInt(this.firstOffset,32)},n}(gf),pf=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 du(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}(gf);(function(t){function n(n,i,e){return t.call(this,"styp",n,i,e)||this}du(n,t)})(gs),function(t){function n(n){void 0===n&&(n=0);var i=t.call(this,"smhd",0,0)||this;return i.balance=n,i}du(n,t),p.defineProperty(n.prototype,"balance",{get:function(){return this.Dj},set:function(t){if(t<-1||t>1)throw new g("Provided balance does not fit in the allowed range [-1, 1].");if(!Eu(Iu(t,8),16))throw new g("Provided balance does not fit in 16 bits (fixed 8.8).");this.Dj=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+2+2},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(Iu(this.balance,8),16),n.writer.writeUInt(0,16)}}(Ou),function(t){function n(n){var i=t.call(this,"stss",0,0)||this;return i.entries=n,i}du(n,t),p.defineProperty(n.prototype,"entries",{get:function(){return this.pC},set:function(t){if(!Eu(t.length,32))throw new g("Number of allowed entries cannot fit in 32 bits.");if(t.some((function(t){return!Eu(t,32)})))throw new g("Not all entries 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*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)}}}(Ou),function(t){function n(n){var i=t.call(this,"stts",0,0)||this;return i.entries=n,i}du(n,t),p.defineProperty(n.prototype,"entries",{get:function(){return this.pC},set:function(t){if(!Eu(t.length,32))throw new g("Number of allowed entries cannot fit in 32 bits.");if(t.some((function(t){return!Eu(t.sampleCount,32)||!Eu(t.sampleDelta,32)})))throw new g("Not all entries can be represented in 64 bits.");this.pC=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)}}}(Ou),function(t){function n(n){var i=t.call(this,"trep",0,0)||this;return i.trackId=n,i}du(n,t),p.defineProperty(n.prototype,"trackId",{get:function(){return this.GC},set:function(t){if(!Eu(t,32))throw new g("The provided trackId does not fit in 32 bits.");this.GC=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)}}(cs),function(t){function n(){return t.call(this,"udta")||this}du(n,t)}(ss);var yf={red:0,green:0,blue:0},_f=(function(t){function n(n,i){void 0===n&&(n=0),void 0===i&&(i=yf);var e=t.call(this,"vmhd",0,1)||this;return e.graphicsMode=n,e.opColor=i,e}du(n,t),p.defineProperty(n.prototype,"opColor",{get:function(){return this.Ej},set:function(t){if(!Eu(t.red,16)||!Eu(t.green,16)||!Eu(t.blue,16))throw new g("Not all colors could be represented in 16 bits.");this.Ej=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)}}(Ou),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 du(n,t),p.defineProperty(n.prototype,"width",{get:function(){return this.$C},set:function(t){if(!Eu(t,16))throw new g("Provided width does not fit in 16 bits.");this.$C=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"height",{get:function(){return this.tj},set:function(t){if(!Eu(t,16))throw new g("Provided height does not fit in 16 bits.");this.tj=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"horizontalResolution",{get:function(){return this.Lj},set:function(t){if(!Eu(Iu(t,16),32))throw new g("Provided horizontalResolution does not fit in 32 bits (fixed 16.16).");this.Lj=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"verticalResolution",{get:function(){return this.xj},set:function(t){if(!Eu(Iu(t,16),32))throw new g("Provided verticalResolution does not fit in 32 bits (fixed 16.16).");this.xj=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"compressorName",{get:function(){return this.Cj},set:function(t){if(t.length>31)throw new g("The provided compressorName should at most be 31 characters long.");this.Cj=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"frameCount",{get:function(){return this.jj},set:function(t){if(!Eu(t,16))throw new g("Provided frameCount does not fit in 16 bits.");this.jj=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"depth",{get:function(){return this.Oj},set:function(t){if(!Eu(t,16))throw new g("Provided depth does not fit in 16 bits.");this.Oj=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){var n,i,e,r,o,u;return t.prototype.getBoxContentSize.call(this)+2+2+12+2+2+4+4+4+2+32+2+2+(null!==(i=null===(n=this.clap)||void 0===n?void 0:n.getSize())&&void 0!==i?i:0)+(null!==(r=null===(e=this.pasp)||void 0===e?void 0:e.getSize())&&void 0!==r?r:0)+(null!==(u=null===(o=this.extra)||void 0===o?void 0:o.length)&&void 0!==u?u:0)},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(0,16),n.writer.writeUInt(0,16),n.writer.writeUInt(0,32),n.writer.writeUInt(0,32),n.writer.writeUInt(0,32),n.writer.writeUInt(this.width,16),n.writer.writeUInt(this.height,16),n.writer.writeUInt(Iu(this.horizontalResolution,16),32),n.writer.writeUInt(Iu(this.verticalResolution,16),32),n.writer.writeUInt(0,32),n.writer.writeUInt(this.frameCount,16),n.writer.writeByte(this.compressorName.length),n.writer.writeString(this.compressorName);for(var i=0;i<31-this.compressorName.length;i++)n.writer.writeByte(0);n.writer.writeUInt(this.depth,16),n.writer.writeInt(-1,16),this.clap&&n.concat(this.clap.serialize()),this.pasp&&n.concat(this.pasp.serialize()),this.extra&&ku(n.writer,this.extra)},n}(fs)),Sf=(function(t){function n(n){var i=t.call(this,"esds",0,0)||this;return i.esDescriptor=n,i}du(n,t),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+(this.esDescriptor instanceof E?this.esDescriptor.length:this.esDescriptor.getSize())},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),this.esDescriptor instanceof E?n.concat(yu.from(this.esDescriptor)):this.esDescriptor.serialize(n)}}(Ou),function(t){function n(n,i,e){var r=t.call(this,"mp4a",n,e)||this;return r.esd=i,r}du(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())}}(hs),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}du(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)}}(_f),function(t){function n(n,i){var e=t.call(this,"mp4s",n)||this;return e.esDescriptor=i,e}du(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)}}(fs),function(t){function n(n){var i=t.call(this,"avcC")||this;return i.decoderConfig=n,i}du(n,t),n.prototype.getBoxContentSize=function(){return this.decoderConfig.getSize()},n.prototype.serializeBoxContent=function(t){this.decoderConfig.serialize(t)}}(Tu),function(){function t(t,n,i,e,r,o){void 0===o&&(o=1),this.lengthSizeMinusOne=i,this.version=o,this.profileIndication=t.indication,this.profileCompatibility=t.compatibility,this.levelIndication=n,this.spsSets=e,this.ppsSets=r}p.defineProperty(t.prototype,"version",{get:function(){return this.Pj},set:function(t){if(!Eu(t,8))throw new g("Provided version does not fit in 8 bits.");this.Pj=t},enumerable:!1,configurable:!0}),p.defineProperty(t.prototype,"profileIndication",{get:function(){return this.Rj},set:function(t){if(!Eu(t,8))throw new g("Provided profileIndication does not fit in 8 bits.");this.Rj=t},enumerable:!1,configurable:!0}),p.defineProperty(t.prototype,"profileCompatibility",{get:function(){return this.zj},set:function(t){if(!Eu(t,8))throw new g("Provided profileCompatibility does not fit in 8 bits.");this.zj=t},enumerable:!1,configurable:!0}),p.defineProperty(t.prototype,"levelIndication",{get:function(){return this.Bj},set:function(t){if(!Eu(t,8))throw new g("Provided levelIndication does not fit in 8 bits.");this.Bj=t},enumerable:!1,configurable:!0}),p.defineProperty(t.prototype,"spsSets",{get:function(){return this.Uj},set:function(t){if(!Eu(t.length,5))throw new g("Provided number of spsSets exceeds the max (32)");this.Uj=t},enumerable:!1,configurable:!0}),p.defineProperty(t.prototype,"ppsSets",{get:function(){return this.Qj},set:function(t){if(!Eu(t.length,8))throw new g("Provided number of ppsSets exceeds the max (256)");this.Qj=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(yu.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(yu.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}du(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())}}(_f),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}du(n,t),p.defineProperty(n.prototype,"bufferSizeDb",{get:function(){return this.aC},set:function(t){if(!Eu(t,32))throw new g("Provided bufferSizeDb does not fit in 32 bits.");this.aC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"max",{get:function(){return this.mf},set:function(t){if(!Eu(t,32))throw new g("Provided max does not fit in 32 bits.");this.mf=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"avg",{get:function(){return this.Fj},set:function(t){if(!Eu(t,32))throw new g("Provided avg does not fit in 32 bits.");this.Fj=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)}}(Tu),function(t){function n(n,i){var e,r,o,u,s=this;if(s=t.call(this,"tenc",n,0)||this,i.perSampleIvSize>0&&(null!==(r=null===(e=i.constantIv)||void 0===e?void 0:e.length)&&void 0!==r?r:0)>0)throw new g("Either perSampleSize should be > 0 or constantIv should be defined. Not both.");return s.kId=i.kId,s.isProtected=null!==(o=i.isProtected)&&void 0!==o?o:1,i.perSampleIvSize>0?s.perSampleIvSize=i.perSampleIvSize:s.constantIv=null!==(u=i.constantIv)&&void 0!==u?u:new E(0),s}return du(n,t),p.defineProperty(n.prototype,"isProtected",{get:function(){return this.Yj},set:function(t){if(!Eu(t,8))throw new g("Provided isProtected does not fit in 1 byte.");this.Yj=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"perSampleIvSize",{get:function(){return this.Gj},set:function(t){if(![8,16].includes(t))throw new g("Provided perSampleIvSize does not match any allowed value [8, 16].");this.Gj=t,this.Vj=new E(0)},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"kId",{get:function(){return this.Wj},set:function(t){if(16!==t.length)throw new g("Provided kId length is not 16.");this.Wj=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"constantIv",{get:function(){return this.Vj},set:function(t){if(![8,16].includes(t.length))throw new g("Provided constant IV length does not match any allowed value [8, 16].");this.Vj=t,this.Gj=0},enumerable:!1,configurable:!0}),n.prototype.getTencHeaderSize=function(){return 20+(this.constantIv.length>0?1+this.constantIv.length:0)},n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.getTencHeaderSize()},n.prototype.serializeVersionBoxContent=function(t){t.writer.writeByte(0)},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),this.serializeOwnContent(n)},n.prototype.serializeOwnContent=function(t){t.writer.writeByte(0),this.serializeVersionBoxContent(t),t.writer.writeByte(this.isProtected),t.writer.writeByte(this.perSampleIvSize),ku(t.writer,this.kId),0===this.perSampleIvSize&&(t.writer.writeByte(this.constantIv.length),ku(t.writer,this.constantIv))},n}(Ou)),Tf=(function(t){function n(n){return t.call(this,0,n)||this}du(n,t)}(Sf),function(t){function n(n){var i=t.call(this,1,n)||this;return i.cryptByteBlocks=n.cryptByteBlock,i.skipByteBlocks=n.skipByteBlock,i}return du(n,t),p.defineProperty(n.prototype,"cryptByteBlocks",{get:function(){return this.Hj},set:function(t){if(!Eu(t,4))throw new g("Provided cryptByteBlocks does not fit in 4 bits.");this.Hj=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"skipByteBlocks",{get:function(){return this.Xj},set:function(t){if(!Eu(t,4))throw new g("Provided skipByteBlocks does not fit in 4 bits.");this.Xj=t},enumerable:!1,configurable:!0}),n.prototype.serializeVersionBoxContent=function(t){t.writer.writeUInt(this.cryptByteBlocks,4),t.writer.writeUInt(this.skipByteBlocks,4)},n}(Sf));!function(t){function n(n){var i=t.call(this)||this;return i.tencBox=new Tf(n),i}du(n,t),n.prototype.serializeBoxContent=function(t){this.tencBox.serializeOwnContent(t)},n.prototype.getBoxContentSize=function(){return this.tencBox.getTencHeaderSize()}}(Ds);function Ef(t){return void 0!==t.iv}function If(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}du(n,t),p.defineProperty(n.prototype,"samples",{get:function(){return this.uj},set:function(t){var n;if(!Eu(t.length,32))throw new g("The number of samples provided does not fit in 32 bits.");for(var i=0,e=t;i<e.length;i++){var r=e[i];if(Ef(r)&&![8,16].includes(r.iv.length))throw new g("IV of one of the provided samples did not satisfy the required length constraints. [8, 16]");if(void 0===n&&(n=If(r)),!0===n&&!If(r)||!1===n&&If(r))throw new g("Mix of samples with and without subsamples detected.");if(If(r)){if(!Eu(r.subsamples.length,16))throw new g("Subsample length of one of the provided samples does not fit in 16 bits.");for(var o=0,u=r.subsamples;o<u.length;o++){var s=u[o];if(!Eu(s.clearData,16))throw new g("Subsample clearData of one of the provided samples does not fit in 16 bits.");if(!Eu(s.protectedData,23))throw new g("Subsample protectedData of one of the provided samples does not fit in 23 bits.")}}}this.flags.useSubsampleEncryption=null!=n&&n,this.uj=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];Ef(r)&&(n+=r.iv.length),If(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(Ef(r)&&ku(n.writer,r.iv),If(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)}})(Ou),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}du(n,t),p.defineProperty(n.prototype,"timescale",{get:function(){return this.OC},set:function(t){if(!Eu(t,32))throw new g("The provided timescale does not fit in 32 bits.");this.OC=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"presentationTimeDelta",{get:function(){return this.Zj},set:function(t){if(!Eu(t,32))throw new g("The provided presentationTimeDelta does not fit in 32 bits.");this.Zj=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"eventDuration",{get:function(){return this.qj},set:function(t){if(!Eu(t,32))throw new g("The provided eventDuration does not fit in 32 bits.");this.qj=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"id",{get:function(){return this.dN},set:function(t){if(!Eu(t,32))throw new g("The provided id does not fit in 32 bits.");this.dN=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(yu.from(this.data))}}(Ou),function(){function t(){this.boxes=[]}t.prototype.serialize=function(){for(var t=new Su,n=0,i=this.boxes;n<i.length;n++){var e=i[n];t.concat(e.serialize())}return t.toRangedBuffer()}}();function kf(t,n){return function(i){var e=new ju(function(t){return new DataView(t.buffer,t.byteOffset,t.byteLength)}(i),new Xu),r=function(t,n){for(var i=t.data,e=t.cursor;e.offset<i.byteLength;){var r=$u(i,e);if(!r.complete)return;if(Yu(r.box,n))return r.box}}(e,t);if(!r)throw new g("".concat(t," box not found"));return n(r)}}kf("moov",(function(t){for(var n=new nf,i=0,e=Gu(t.data);i<e.length;i++){var r=e[i];Yu(r,"mvhd")?n.boxes.push(Ks(r)):Yu(r,"trak")?n.boxes.push(tf(r)):Yu(r,"mvex")?n.boxes.push(Vs(r)):Yu(r,"pssh")?n.boxes.push(Ms(r)):n.boxes.push(ns(r))}return n})),kf("sidx",(function(t){var n,i,e=t.data,r=Zu(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 mu(yu.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 mf(s,f,n,i,c,u.raw):new pf(s,f,n,i,c,u.raw)})),kf("moof",(function(t){for(var n=new df,i=0,e=Gu(t.data);i<e.length;i++){var r=e[i];Yu(r,"traf")?n.boxes.push(vf(r)):Yu(r,"pssh")?n.boxes.push(Ms(r)):n.boxes.push(ns(r))}return n}));var Rf=kf("pssh",Ms),Of=function(t){function n(n,i){var e;(e=t.call(this)||this).tO=n,e.im=i,e.sO=!1,e.aO=function(){e.oO()},e.uO=function(t){e.yo(new ru(e,t.messageType,hu(e.im,t.message)))},e.cO=function(){e.sO=!0,e.iO.iA>0&&(e.iO.Rx(),e.yo(new eu(e.iO))),e.tO.removeEventListener("keystatuseschange",e.aO),e.tO.removeEventListener("message",e.uO)},e.tO.addEventListener("keystatuseschange",e.aO),e.tO.addEventListener("message",e.uO),e.iO=new su;var r=[];return e.tO.closed&&r.push(Q.resolve(e.tO.closed)),e.nO=new fu,r.push(e.nO.Qx),e.Jj=Q.race(r).then(e.cO,e.cO),e.oO(),e}Bt(n,t);var i=n.prototype;return i.Ws=function(){if(this.sO)return this.Jj;var t=[];return t.push(Q.resolve(this.tO.close())),t.push(cn(1e3)),this.nO.v_(Q.race(t).catch(Nf)),this.sO=!0,this.Jj},i.rO=function(t,n,i){if(Zi.tL){var e=Rf(mi(n));if(1===e.version)n=new xs(e.systemId,e.data).serialize().join()}return Q.resolve(this.tO.generateRequest(t,n)).catch(Nf)},i.$n=function(t){return Q.resolve(this.tO.load(t)).catch(Nf)},i.aN=function(){return Q.resolve(this.tO.remove()).catch(Nf)},i.Yn=function(t){return Q.resolve(this.tO.update(t)).catch(Nf)},i.oO=function(){var t=this;this.iO.Rx(),this.tO.keyStatuses.forEach((function(n,i){t.hO(i,n)})),this.yo(new eu(this.iO))},i.hO=function(t,n){if("string"==typeof t){var i=t;t=n,n=i}var e=mi(t);if(this.im===Uo&&16===e.byteLength){var r=bi(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.im===Uo&&"status-pending"===n&&(n="usable"),this.iO.Ox(e,n)},Dt(n,[{key:"Kj",get:function(){return this.Jj}},{key:"$j",get:function(){return this.tO.expiration}},{key:"Tx",get:function(){return this.iO}},{key:"eO",get:function(){return this.tO.sessionId}}]),n}(Ii);function Nf(t){var n;if(t.message){var i=t.message.match(/^SystemCode:0x([0-9a-fA-F]+)$/);i&&(n=0|_(i[1],16))}throw new au(t.message,void 0,n,t)}var Pf=function(){function t(t,n,i){this.dO=t,this.$w=n,this.md=i}var n=t.prototype;return n.lO=function(t){var n=this;return ft((function(){return ht(this,(function(i){return[2,new Of(n.dO.createSession(t),n.$w)]}))}))()},n.fO=function(t){return Q.resolve(this.dO.setServerCertificate(t))},n.bn=function(t){return Q.resolve(t.setMediaKeys(this.dO))},n._O=function(t){return Q.resolve(t.setMediaKeys(null))},n.tr=function(){return Q.resolve()},t}(),Af=function(){function t(t,n,i){this.gO=t,this.im=n,this.wO=i}var n=t.prototype;return n.vO=function(){var t=this;return ft((function(){var n;return ht(this,(function(i){switch(i.label){case 0:return[4,t.gO.createMediaKeys()];case 1:return n=i.sent(),[2,new Pf(n,t.im,t.wO)]}}))}))()},n.mO=function(){return this.wO},Dt(t,[{key:"$w",get:function(){return this.gO.keySystem}}]),t}();function Df(t){var n=t.trim(),i=n.indexOf(";");return i<0?n:n.substr(0,i).trim()}function Cf(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,DO:e.DO},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 xf(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 xf(t,n,i,e)})),u=!0,o.videoCapabilities.length&&(r=!0))}return u||(r=t(i,"video/mp4")),r?o:void 0}}function xf(t,n,i,e){return!!e.contentType&&(!(e.encryptionScheme&&!It(n,e.encryptionScheme))&&(!e.robustness&&t(i,Df(e.contentType))))}function Bf(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 Mf(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 Uf(t){return!(!t.audioCapabilities||!t.audioCapabilities.some(Lf))||!(!t.videoCapabilities||!t.videoCapabilities.some(Lf))}function Lf(t){return!t.robustness}function Ff(t,n){for(var i=[],e=0;e<t.length;e++){var r=t[e];r.robustness?i.push(r):i.push(xo({},r,{robustness:n}))}return i}var zf=function(){function t(){}return t.prototype.MO=function(t,n){return ft((function(){var i,e,r,o,u,s,f;return ht(this,(function(h){switch(h.label){case 0:for(n=n.filter((function(t){return!t.DO})),i=0;i<n.length;i++)(e=n[i]).audioCapabilities&&(e.audioCapabilities=Mf(e.audioCapabilities)),e.videoCapabilities&&(e.videoCapabilities=Mf(e.videoCapabilities));if(t!==zo||!n.some(Uf))return[3,4];r=n.map((function(t){return function(t,n){return xo({},t,{videoCapabilities:t.videoCapabilities?Ff(t.videoCapabilities,n):void 0,audioCapabilities:t.audioCapabilities?Ff(t.audioCapabilities,n):void 0})}(t,"SW_SECURE_CRYPTO")})),h.label=1;case 1:return h.trys.push([1,3,,4]),[4,v.requestMediaKeySystemAccess(t,r)];case 2:return o=h.sent(),u=o.getConfiguration(),[2,new Af(o,t,u)];case 3:return h.sent(),[3,4];case 4:return[4,v.requestMediaKeySystemAccess(t,n)];case 5:return s=h.sent(),f=s.getConfiguration(),[2,new Af(s,t,f)]}}))}))()},t.EO=function(){return void 0!==v&&"function"==typeof v.requestMediaKeySystemAccess},t}(),Wf=function(t){function n(n,i){var e;return(e=t.call(this)||this).PO=n,e.RO=i,e.sO=!1,e.QO=void 0,e.jO=void 0,e.kO=void 0,e.cO=function(){e.sO=!0,e.LO.zx(void 0),e.kO&&(e.kO.removeEventListener("mskeyclose",e.cO),e.kO.removeEventListener("mskeymessage",e.zO),e.kO.removeEventListener("mskeyerror",e.Ss),e.kO.removeEventListener("mskeyadded",e.BO))},e.zO=function(t){e.jO&&(e.jO.zx(void 0),e.jO=void 0),e.yo(new ru(e,"license-request",pi(t.message).buffer,t.destinationURL||void 0))},e.Ss=function(){var t=e.kO&&e.kO.error;if(t){var n=new au("Unknown CDM error",t.code,t.systemCode);if(e.jO)e.jO.Bx(n),e.jO=void 0;else if(e.QO)e.QO.Bx(n),e.QO=void 0;else switch(n.Fx){case MSMediaKeyError.MS_MEDIA_KEYERR_OUTPUT:case MSMediaKeyError.MS_MEDIA_KEYERR_HARDWARECHANGE:e.UO("output-not-allowed");break;default:e.UO("internal-error")}}},e.BO=function(){e.jO&&(e.UO("usable"),e.jO.zx(void 0),e.jO=void 0),e.QO&&(e.UO("usable"),e.QO.zx(void 0),e.QO=void 0)},e.LO=new fu,e.xO=new su,e}Bt(n,t);var i=n.prototype;return i.rO=function(t,n,i){var e=this;return ft((function(){return ht(this,(function(t){switch(t.label){case 0:return e.CO(),e.jO=new fu,e.lO(mi(n),i),[4,e.jO.Qx];case 1:return t.sent(),[2]}}))}))()},i.lO=function(t,n){if(!t)throw new m("Expected initData to be defined but was "+t+".");var i,e=n&&n.playready&&n.playready.OO;return(i=n?this.PO.createSession(this.RO,t,e):this.PO.createSession(this.RO,t)).addEventListener("mskeyclose",this.cO),i.addEventListener("mskeymessage",this.zO),i.addEventListener("mskeyerror",this.Ss),i.addEventListener("mskeyadded",this.BO),this.kO=i,this.UO("status-pending"),i},i.$n=function(t){var n=this;return ft((function(){return ht(this,(function(t){return n.CO(),[2,!0]}))}))()},i.Yn=function(t){var n=this;return ft((function(){var i;return ht(this,(function(e){switch(e.label){case 0:if(n.QO=new fu,n.CO(),!n.kO)return[2,Q.resolve()];if(0===(i=mi(t)).byteLength)throw new m("Cannot call update with an empty response.");return n.kO.update(i),[4,n.QO.Qx];case 1:return e.sent(),[2]}}))}))()},i.Ws=function(){return!this.sO&&this.kO&&(this.sO=!0,this.kO.close()),this.LO.Qx},i.aN=function(){var t=this;return ft((function(){return ht(this,(function(n){return t.CO(),[2]}))}))()},i.CO=function(){if(this.sO)throw new m("Already closing or closed.")},i.UO=function(t){this.xO.Rx(),this.xO.Ox(uu,t),this.yo(new eu(this.xO))},Dt(n,[{key:"eO",get:function(){return this.kO&&this.kO.sessionId||""}},{key:"$j",get:function(){return NaN}},{key:"Kj",get:function(){return this.LO.Qx}},{key:"Tx",get:function(){return this.xO}}]),n}(Ii),qf=function(){function t(t,n,i){this.PO=t,this.$w=n,this.md=i;var e=Bf(i)||"video/mp4";this.RO=Df(e)}var n=t.prototype;return n.lO=function(t){var n=this;return ft((function(){return ht(this,(function(t){return[2,new Wf(n.PO,n.RO)]}))}))()},n.fO=function(t){return Q.resolve(!1)},n.bn=function(t){var n=this,i=function(){t.msSetMediaKeys(n.PO),t.removeEventListener("loadedmetadata",i)};return t.readyState>=1?t.msSetMediaKeys(this.PO):t.addEventListener("loadedmetadata",i),Q.resolve()},n._O=function(t){return Q.resolve()},n.tr=function(){return Q.resolve()},t}(),Hf=function(){function t(t,n){this.im=t,this.FO=n}var n=t.prototype;return n.mO=function(){return this.FO},n.vO=function(){var t=new so.MSMediaKeys(this.im);return Q.resolve(new qf(t,this.im,this.FO))},Dt(t,[{key:"$w",get:function(){return this.im}}]),t}(),Vf=function(){function t(){}return t.prototype.MO=function(t,n){try{return Q.resolve(function(t,n){if(!Xf())throw new m("Unsupported key system "+t);for(var i=0;i<n.length;i++){var e=n[i],r=Cf(jf,nu,t,e);if(r)return new Hf(t,r)}throw new m("Unsupported key system configuration for "+t)}(t,n))}catch(t){return Q.reject(t)}},t.EO=function(){return Xf()},t}();function Xf(){return void 0!==so.MSMediaKeys&&"function"==typeof so.MSMediaKeys.isTypeSupported}function jf(t,n){return so.MSMediaKeys.isTypeSupported(t,n)}var Yf=function(t){function n(n,i,e){var r;return(r=t.call(this)||this).WO=n,r.RO=i,r.VO=e,r.LO=new fu,r.XO=void 0,r.xO=new su,r.YO=void 0,r.HO=new fu,r.Ss=function(){var t=r.YO&&r.YO.error;if(t){var n=new au("Unknown CDM error",t.code,t.systemCode);r.XO?(r.XO.Bx(n),r.XO=void 0):n.Fx===WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT?r.UO("output-not-allowed"):r.UO("internal-error"),r.yo(new ou)}},r.zO=function(t){r.yo(new ru(r,"license-request",pi(t.message).buffer,"this is a test string"===t.destinationURL?void 0:t.destinationURL))},r.BO=function(){r.XO&&(r.XO.zx(void 0),r.XO=void 0),r.UO("usable")},r}Bt(n,t);var i=n.prototype;return i.rO=function(t,n,i){var e=i&&i.fairplay&&i.fairplay.GO;if(!e)throw new m("Expected FairPlay contentId to be defined but was "+e+".");var r=function(t,n,i){var e=li(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 _i;return ai(s,f,r,!0),vi(s,f,e,!0),ai(s,f,o,!0),vi(s,f,n,!0),ai(s,f,i.byteLength,!0),function(t,n,i){gi(t).set(gi(i),n.tc),n.Tp(i.byteLength)}(s,f,i),new E(u)}(mi(n),e,this.VO);return this.YO=this.WO.createSession(this.RO,r),this.YO.addEventListener("webkitkeymessage",this.zO,!1),this.YO.addEventListener("webkitkeyadded",this.BO,!1),this.YO.addEventListener("webkitkeyerror",this.Ss,!1),this.UO("status-pending"),this.HO.zx(this.YO),this.HO=new fu,Q.resolve()},i.$n=function(t){return Q.resolve(!0)},i.Yn=function(t){var n=this;return ft((function(){var i,e;return ht(this,(function(r){switch(r.label){case 0:if(0===(i=mi(t)).byteLength)throw new m("Cannot call update with an empty response.");return n.XO=new fu,(e=n.YO)?[3,2]:[4,n.HO.Qx];case 1:e=r.sent(),r.label=2;case 2:return e.update(i),[4,n.XO.Qx];case 3:return r.sent(),[2]}}))}))()},i.Ws=function(){var t,n=this.YO;return n&&(n.removeEventListener("webkitkeymessage",this.zO,!1),n.removeEventListener("webkitkeyadded",this.BO,!1),n.removeEventListener("webkitkeyerror",this.Ss,!1),n.close()),this.HO.g_(),null==(t=this.XO)||t.g_(),this.LO.zx(void 0),this.LO.Qx},i.aN=function(){return Q.resolve(void 0)},i.UO=function(t){this.xO.Rx(),this.xO.Ox(uu,t),this.yo(new eu(this.xO))},Dt(n,[{key:"eO",get:function(){return this.YO?this.YO.sessionId:""}},{key:"$j",get:function(){return NaN}},{key:"Kj",get:function(){return this.LO.Qx}},{key:"Tx",get:function(){return this.xO}}]),n}(Ii);var Kf=function(t){return t[t.CONFIGURATION_ERROR=1e3]="CONFIGURATION_ERROR",t[t.LICENSE_ERROR=2e3]="LICENSE_ERROR",t[t.LICENSE_INVALID_DOMAIN=2001]="LICENSE_INVALID_DOMAIN",t[t.LICENSE_INVALID_SOURCE=2002]="LICENSE_INVALID_SOURCE",t[t.LICENSE_EXPIRED=2003]="LICENSE_EXPIRED",t[t.LICENSE_INVALID_FEATURE=2004]="LICENSE_INVALID_FEATURE",t[t.SOURCE_INVALID=3e3]="SOURCE_INVALID",t[t.SOURCE_NOT_SUPPORTED=3001]="SOURCE_NOT_SUPPORTED",t[t.MANIFEST_LOAD_ERROR=4e3]="MANIFEST_LOAD_ERROR",t[t.MANIFEST_CORS_ERROR=4001]="MANIFEST_CORS_ERROR",t[t.MANIFEST_PARSE_ERROR=4002]="MANIFEST_PARSE_ERROR",t[t.MEDIA_NOT_SUPPORTED=5e3]="MEDIA_NOT_SUPPORTED",t[t.MEDIA_LOAD_ERROR=5001]="MEDIA_LOAD_ERROR",t[t.MEDIA_DECODE_ERROR=5002]="MEDIA_DECODE_ERROR",t[t.MEDIA_AVPLAYER_ERROR=5003]="MEDIA_AVPLAYER_ERROR",t[t.MEDIA_ABORTED=5004]="MEDIA_ABORTED",t[t.NETWORK_ERROR=6e3]="NETWORK_ERROR",t[t.NETWORK_TIMEOUT=6001]="NETWORK_TIMEOUT",t[t.CONTENT_PROTECTION_ERROR=7e3]="CONTENT_PROTECTION_ERROR",t[t.CONTENT_PROTECTION_NOT_SUPPORTED=7001]="CONTENT_PROTECTION_NOT_SUPPORTED",t[t.CONTENT_PROTECTION_CONFIGURATION_MISSING=7002]="CONTENT_PROTECTION_CONFIGURATION_MISSING",t[t.CONTENT_PROTECTION_CONFIGURATION_INVALID=7003]="CONTENT_PROTECTION_CONFIGURATION_INVALID",t[t.CONTENT_PROTECTION_INITIALIZATION_INVALID=7004]="CONTENT_PROTECTION_INITIALIZATION_INVALID",t[t.CONTENT_PROTECTION_CERTIFICATE_ERROR=7005]="CONTENT_PROTECTION_CERTIFICATE_ERROR",t[t.CONTENT_PROTECTION_CERTIFICATE_INVALID=7006]="CONTENT_PROTECTION_CERTIFICATE_INVALID",t[t.CONTENT_PROTECTION_LICENSE_ERROR=7007]="CONTENT_PROTECTION_LICENSE_ERROR",t[t.CONTENT_PROTECTION_LICENSE_INVALID=7008]="CONTENT_PROTECTION_LICENSE_INVALID",t[t.CONTENT_PROTECTION_KEY_EXPIRED=7009]="CONTENT_PROTECTION_KEY_EXPIRED",t[t.CONTENT_PROTECTION_KEY_MISSING=7010]="CONTENT_PROTECTION_KEY_MISSING",t[t.CONTENT_PROTECTION_OUTPUT_RESTRICTED=7011]="CONTENT_PROTECTION_OUTPUT_RESTRICTED",t[t.CONTENT_PROTECTION_INTERNAL_ERROR=7012]="CONTENT_PROTECTION_INTERNAL_ERROR",t[t.SUBTITLE_LOAD_ERROR=8e3]="SUBTITLE_LOAD_ERROR",t[t.SUBTITLE_CORS_ERROR=8001]="SUBTITLE_CORS_ERROR",t[t.SUBTITLE_PARSE_ERROR=8002]="SUBTITLE_PARSE_ERROR",t[t.VR_PLATFORM_UNSUPPORTED=9e3]="VR_PLATFORM_UNSUPPORTED",t[t.VR_PRESENTATION_ERROR=9001]="VR_PRESENTATION_ERROR",t[t.AD_ERROR=1e4]="AD_ERROR",t[t.AD_BLOCKER_DETECTED=10001]="AD_BLOCKER_DETECTED",t[t.FULLSCREEN_ERROR=11e3]="FULLSCREEN_ERROR",t[t.PICTURE_IN_PICTURE_ERROR=11001]="PICTURE_IN_PICTURE_ERROR",t[t.CACHE_SOURCE_ERROR=12e3]="CACHE_SOURCE_ERROR",t[t.CACHE_CONTENT_PROTECTION_ERROR=12001]="CACHE_CONTENT_PROTECTION_ERROR",t[t.THEO_LIVE_UNKNOWN_ERROR=13e3]="THEO_LIVE_UNKNOWN_ERROR",t[t.THEO_LIVE_CHANNEL_NOT_FOUND=13001]="THEO_LIVE_CHANNEL_NOT_FOUND",t[t.THEO_LIVE_END_OF_DEMO=13002]="THEO_LIVE_END_OF_DEMO",t[t.THEO_LIVE_ANALYTICS_ERROR=13003]="THEO_LIVE_ANALYTICS_ERROR",t}({}),Gf=function(t){return t[t.CONFIGURATION=1]="CONFIGURATION",t[t.LICENSE=2]="LICENSE",t[t.SOURCE=3]="SOURCE",t[t.MANIFEST=4]="MANIFEST",t[t.MEDIA=5]="MEDIA",t[t.NETWORK=6]="NETWORK",t[t.CONTENT_PROTECTION=7]="CONTENT_PROTECTION",t[t.SUBTITLE=8]="SUBTITLE",t[t.VR=9]="VR",t[t.AD=10]="AD",t[t.FULLSCREEN=11]="FULLSCREEN",t[t.CACHE=12]="CACHE",t[t.THEOLIVE=13]="THEOLIVE",t}({});!function(t){t.fromCode=function(n){var i=y.floor(n/1e3);if(i in t)return i;throw new m("Invalid error code: "+n)}}(Gf||(Gf={}));var $f=function(t){function n(n,i,e){var r;return(r=t.call(this,i,e)||this).code=n,r}return Bt(n,t),Dt(n,[{key:"name",get:function(){return"THEOplayerError"}},{key:"category",get:function(){return Gf.fromCode(this.code)}}]),n}(nn),Zf=function(){function t(t,n,i){this.WO=t,this.$w=n,this.md=i,this.VO=void 0;var e=Bf(i)||"video/mp4";this.RO=Df(e)}var n=t.prototype;return n.getInternalMediaKeys=function(){return this.WO},n.lO=function(t){var n=this;return ft((function(){return ht(this,(function(t){if(!n.VO)throw new $f(Kf.CONTENT_PROTECTION_CERTIFICATE_ERROR,"No valid certificate was provided.");return[2,new Yf(n.WO,n.RO,n.VO)]}))}))()},n.fO=function(t){return this.VO=mi(t),Q.resolve(!0)},n.bn=function(t){return t.webkitSetMediaKeys(this.WO),Q.resolve()},n._O=function(t){return t.webkitSetMediaKeys(null),Q.resolve()},n.tr=function(){return Q.resolve()},t}(),Jf=function(){function t(t,n){this.im=t,this.FO=n}var n=t.prototype;return n.mO=function(){return this.FO},n.vO=function(){var t=new so.WebKitMediaKeys(this.im);return Q.resolve(new Zf(t,this.im,this.FO))},Dt(t,[{key:"$w",get:function(){return this.im}}]),t}(),Qf=function(){function t(){}return t.prototype.MO=function(t,n){try{return Q.resolve(function(t,n){if(t!==Xo)throw new m(t+" is not supported with webkit-prefixed Encrypted Media Extensions.");if(!th())throw new m("Unsupported key system "+t);for(var i=0;i<n.length;i++){var e=n[i],r=Cf(nh,iu,t,e);if(r)return new Jf(t,r)}throw new m("Unsupported key system configuration for "+t)}(t,n))}catch(t){return Q.reject(t)}},t.EO=function(){return th()},t}();function th(){return void 0!==so.WebKitMediaKeys&&"function"==typeof so.WebKitMediaKeys.isTypeSupported}function nh(t,n){return so.WebKitMediaKeys.isTypeSupported(t,n)}var ih,eh=function(){function t(t){this.ZO=t}return t.prototype.MO=function(t,n){var i=this;return ft((function(){var e,r,o;return ht(this,(function(u){switch(u.label){case 0:e=0,r=i.ZO,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.MO(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 m("Unsupported key system configuration for "+t)}}))}))()},t}(),rh=new an,oh=function(t){function n(n){var i;return(i=t.call(this)||this).im=n,i.jO=void 0,i.XO=void 0,i.$x=!1,i.lP=void 0,i.hP=void 0,i.LO=new fu,i.cP="",i.aP=new fu,i.uP=new su,i}Bt(n,t);var i=n.prototype;return i.sP=function(){this.XO&&(this.UO("usable"),this.XO.zx(void 0),this.XO=void 0)},i.nP=function(t){var n=new au("Unknown CDM error",t.errorCode,t.systemCode);this.XO?(this.XO.Bx(n),this.XO=void 0):this.jO?(this.jO.Bx(n),this.jO=void 0):n.Fx===WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT?this.UO("output-restricted"):1===n.Yx?this.UO("expired"):this.UO("internal-error")},i.rP=function(t){0!==t.message.byteLength?(this.jO&&(this.jO.zx(void 0),this.jO=void 0),this.yo(new ru(this,"license-request",hu(this.im,pi(t.message).buffer),t.defaultURL||void 0))):this.jO&&(this.jO.Bx("Empty key message"),this.jO=void 0)},i.oP=function(t){this.hP||(this.hP=t,this.aP.zx(t))},i.Ws=function(){var t=this;return ft((function(){return ht(this,(function(n){return t.throwIfClosed(),t.XO&&(t.XO.Bx(void 0),t.XO=void 0),t.$x=!0,t.LO.zx(void 0),[2]}))}))()},i.rO=function(t,n){var i=this;return ft((function(){var t;return ht(this,(function(e){switch(e.label){case 0:return i.throwIfClosed(),i.jO=new fu,i.lP=mi(n),(t=i.hP)?[3,2]:[4,i.aP.Qx];case 1:t=e.sent(),e.label=2;case 2:return t.webkitGenerateKeyRequest(i.im,i.lP),[4,i.jO.Qx];case 3:return e.sent(),[2]}}))}))()},i.$n=function(t){var n=this;return ft((function(){return ht(this,(function(t){return n.throwIfClosed(),[2,!1]}))}))()},i.aN=function(){var t=this;return ft((function(){return ht(this,(function(n){return t.throwIfClosed(),[2]}))}))()},i.Yn=function(t){var n=this;return ft((function(){return ht(this,(function(i){switch(i.label){case 0:return n.throwIfClosed(),n.XO=new fu,Zi.yL||Zi.wL?[2,rh.Wo(ft((function(){return ht(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 ft((function(){var i;return ht(this,(function(e){switch(e.label){case 0:return void 0===n.XO?[2]:(i=n.hP)?[3,2]:[4,n.aP.Qx];case 1:i=e.sent(),e.label=2;case 2:return i.webkitAddKey(n.im,mi(t),n.lP,n.eO),[4,n.XO.Qx];case 3:return e.sent(),Zi.wL?[4,cn(500)]:[3,5];case 4:e.sent(),e.label=5;case 5:return[2]}}))}))()},i.throwIfClosed=function(){if(this.$x)throw new m("Already closing or closed.")},i.UO=function(t){this.uP.Rx(),this.uP.Ox(uu,t),this.yo(new eu(this.uP))},i.dP=function(){var t=this;return ft((function(){var n,i;return ht(this,(function(e){switch(e.label){case 0:return(i=t.hP)?[3,2]:[4,t.aP.Qx];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.im,t.cP),[3,7];case 4:return e.sent(),[3,7];case 5:return[4,cn(500)];case 6:return e.sent(),[7];case 7:return[2]}}))}))()},Dt(n,[{key:"Tx",get:function(){return this.uP}},{key:"eO",get:function(){return this.cP},set:function(t){this.cP=t}},{key:"Kj",get:function(){return this.LO.Qx}},{key:"$j",get:function(){return NaN}}]),n}(Ii),uh=function(){function t(t,n){var i=this;this.$w=t,this.md=n,this.hP=void 0,this.gP=Lt(),this.vP=[],this.BO=function(t){var n=i.wP(t.sessionId);n&&n.sP()},this.fP=function(t){var n=i.wP(t.sessionId);n&&n.nP(t)},this._P=function(t){var n=i.wP(t.sessionId);n&&n.rP(t)}}var n=t.prototype;return n.bn=function(t){return this.hP=t,this.hP.addEventListener("webkitkeyadded",this.BO),this.hP.addEventListener("webkitkeyerror",this.fP),this.hP.addEventListener("webkitkeymessage",this._P),this.gP.forEach((function(n,i){return n.oP(t)})),this.vP.forEach((function(n){return n.oP(t)})),Q.resolve()},n._O=function(t){return t.removeEventListener("webkitkeyadded",this.BO),t.removeEventListener("webkitkeyerror",this.fP),t.removeEventListener("webkitkeymessage",this._P),this.hP=void 0,Q.resolve()},n.tr=function(){var t=this;return ft((function(){var n,i;return ht(this,(function(e){switch(e.label){case 0:n=t.gP.entries(),i=n.next(),e.label=1;case 1:return i.done?[3,3]:[4,i.value[1].dP()];case 2:return e.sent(),i=n.next(),[3,1];case 3:return t.gP.clear(),[2]}}))}))()},n.lO=function(t,n,i){var e=this;return ft((function(){var t;return ht(this,(function(n){return t=new oh(e.$w),e.hP&&t.oP(e.hP),e.vP.push(t),[2,t]}))}))()},n.fO=function(t){return Q.resolve(!1)},n.wP=function(t){if(t){var n=this.gP.get(t);return n||((n=this.vP.shift())?(n.eO=t,this.gP.set(t,n),n):void 0)}},t}(),sh=function(){function t(t,n){this.$w=t,this.mP=n}var n=t.prototype;return n.vO=function(){return Q.resolve(new uh(this.$w,this.mP))},n.mO=function(){return this.mP},t}(),fh=function(){function t(){}return t.prototype.MO=function(t,n){try{return Q.resolve(function(t,n){if(!fh.EO())throw new m("Unsupported key system "+t);for(var i=0;i<n.length;i++){var e=n[i],r=Cf(hh,nu,t,e);if(r)return new sh(t,r)}throw new m("Unsupported key system configuration for "+t)}(t,n))}catch(t){return Q.reject(t)}},t.EO=function(){return"undefined"!=typeof HTMLMediaElement&&void 0!==HTMLMediaElement.prototype.webkitGenerateKeyRequest&&void 0!==HTMLMediaElement.prototype.webkitAddKey&&void 0!==HTMLMediaElement.prototype.webkitCancelKeyRequest},t}();function hh(t,n){var i=vo();return!(!i||!i.canPlayType||""===i.canPlayType(n,t))}function ch(){return ih||(ih=function(){var t=[];Qf.EO()&&t.push(new Qf);zf.EO()&&t.push(new zf);Vf.EO()&&t.push(new Vf);fh.EO()&&t.push(new fh);return new eh(t)}()),ih}var ah=function(){function t(){this.BF=Lt()}var n=t.prototype;return n.Rx=function(t){this.BF.delete(t)},n.UF=function(){this.BF.clear()},n.jx=function(t){return this.BF.get(t)},n.Ox=function(t,n){this.BF.set(t,n)},t}(),vh=function(){function t(){}return t.QF=function(){return t.wx||(t.wx=dh.EO()?new dh:new ah),t.wx},t.Rx=function(n){t.QF().Rx(n)},t.UF=function(){t.QF().UF()},t.jx=function(n){return t.QF().jx(n)},t.Ox=function(n,i){t.QF().Ox(n,i)},t}();vh.wx=void 0;var dh=function(t){function n(){return t.apply(this,arguments)||this}Bt(n,t);var i=n.prototype;return i.Rx=function(t){self.sessionStorage.removeItem(t)},i.UF=function(){self.sessionStorage.clear()},i.jx=function(t){var n;return null!=(n=self.sessionStorage.getItem(t))?n:void 0},i.Ox=function(t,n){self.sessionStorage.setItem(t,n)},n.EO=function(){var t="foobar";try{return self.sessionStorage.setItem(t,t),self.sessionStorage.removeItem(t),!0}catch(t){return!1}},n}(vh);var lh=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 wh(t,n,i){var e=lh([n],{type:"application/octet-stream"}),r=URL.createObjectURL(e),o=function(t,n){var i=t,e=i.indexOf("?");if(e>=0&&(i=i.substr(0,e)),i=i.substr(i.lastIndexOf("/")+1),n){var r=i.indexOf(".");r<0&&(r=i.length),i=i.substr(0,r)+n+i.substr(r)}return i}(t,i),u=a.createElement("a");u.href=r,u.download=o,a.body.appendChild(u),u.click(),a.body.removeChild(u),URL.revokeObjectURL(r)}var bh=function(t){return t.NE="arraybuffer",t.DE="json",t.EE="stream",t.vb="text",t}({}),gh=function(){function t(n){var i=this;this.gf={},n instanceof t?n.asList().forEach((function(t){var n=Mt(t,2),e=n[0],r=n[1];i.append(e,r)})):Array.isArray(n)?n.forEach((function(t){var n=Mt(t,2),e=n[0],r=n[1];i.append(e,r)})):n&&p.getOwnPropertyNames(n).forEach((function(t){i.append(t,n[t])}))}var n=t.prototype;return n.append=function(t,n){var i=t,e=n;i=mh(i),e=ph(e);var r=i.toLowerCase();if(this.gf.hasOwnProperty(r)){var o=this.gf[r],u=o[1];o[1]=u?u+", "+e:e}else this.gf[r]=[i,e]},n.delete=function(t){var n=mh(t).toLowerCase();delete this.gf[n]},n.get=function(t){var n=mh(t).toLowerCase();return this.gf.hasOwnProperty(n)?this.gf[n][1]:null},n.has=function(t){var n=mh(t).toLowerCase();return this.gf.hasOwnProperty(n)},n.set=function(t,n){var i=t,e=(i=mh(i)).toLowerCase();this.gf[e]=[i,ph(n)]},n.forEach=function(t,n){for(var i in this.gf)this.gf.hasOwnProperty(i)&&t.call(n,this.gf[i][1],i,this)},n.asList=function(){var t=[];for(var n in this.gf)if(this.gf.hasOwnProperty(n)){var i=Mt(this.gf[n],2),e=i[0],r=i[1];t.push([e,r])}return t},n.kE=function(){var t={};return this.forEach((function(n,i){t[i]=n})),t},n.LE=function(t){var n=this;t.forEach((function(t,i){n.append(i,t)}))},n.xE=function(t){var n=this;t.forEach((function(t,i){n.set(i,t)}))},t}();function mh(t){var n=t;if("string"!=typeof n&&(n=String(n)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(n))throw new m("Invalid character in header field name");return n}function ph(t){var n=t;return"string"!=typeof n&&(n=String(n)),n}var yh="function"==typeof n&&"symbol"==typeof e?n:function(t){return"Symbol("+t+")"};function _h(){}var Sh=Number.isNaN||function(t){return t!=t},Th=_h;function Eh(t){return"object"==typeof t&&null!==t||"function"==typeof t}function Ih(t){return t.slice()}function kh(t,n,i,e,r){new E(t).set(new E(i,e,r),n)}function Rh(t){return!1!==function(t){if("number"!=typeof t)return!1;if(Sh(t))return!1;if(t<0)return!1;return!0}(t)&&t!==1/0}function Oh(t,n,i){if("function"!=typeof t)throw new m("Argument is not a function");return Function.prototype.apply.call(t,n,i)}function Nh(t,n,i,e){var r=t[n];if(void 0!==r){if("function"!=typeof r)throw new m(r+" is not a method");switch(i){case 0:return function(){return Ah(r,t,e)};case 1:return function(n){var i=[n].concat(e);return Ah(r,t,i)}}}return function(){return Fh(void 0)}}function Ph(t,n,i){var e=t[n];if(void 0!==e)return Oh(e,t,i)}function Ah(t,n,i){try{return Fh(Oh(t,n,i))}catch(t){return zh(t)}}function Dh(t){if(t=Number(t),Sh(t)||t<0)throw new RangeError("highWaterMark property of a queuing strategy must be non-negative and non-NaN");return t}function Ch(t){if(void 0===t)return function(){return 1};if("function"!=typeof t)throw new m("size property of a queuing strategy must be a function");return function(n){return t(n)}}var xh=Q,Bh=Q.prototype.then,Mh=Q.resolve.bind(xh),Uh=Q.reject.bind(xh);function Lh(t){return new xh(t)}function Fh(t){return Mh(t)}function zh(t){return Uh(t)}function Wh(t,n,i){return Bh.call(t,n,i)}function qh(t,n,i){Wh(Wh(t,n,i),void 0,Th)}function Hh(t,n){qh(t,n)}function Vh(t,n){qh(t,void 0,n)}function Xh(t,n,i){return Wh(t,n,i)}function jh(t){Wh(t,void 0,Th)}var Yh=function(){function t(){this.$V=0,this.tW=0,this.iW={eW:[],sW:void 0},this.nW=this.iW,this.$V=0,this.tW=0}return p.defineProperty(t.prototype,"length",{get:function(){return this.tW},enumerable:!0,configurable:!0}),t.prototype.push=function(t){var n=this.nW,i=n;16383===n.eW.length&&(i={eW:[],sW:void 0}),n.eW.push(t),i!==n&&(this.nW=i,n.sW=i),++this.tW},t.prototype.shift=function(){var t=this.iW,n=t,i=this.$V,e=i+1,r=t.eW,o=r[i];return 16384===e&&(n=t.sW,e=0),--this.tW,this.$V=e,t!==n&&(this.iW=n),r[i]=void 0,o},t.prototype.forEach=function(t){for(var n=this.$V,i=this.iW,e=i.eW;!(n===e.length&&void 0===i.sW||n===e.length&&(n=0,0===(e=(i=i.sW).eW).length));)t(e[n]),++n},t.prototype.peek=function(){var t=this.iW,n=this.$V;return t.eW[n]},t}();function Kh(t,n,i){var e=null;!0===i&&(e=p.prototype);var r=p.create(e);return r.value=t,r.done=n,r}function Gh(t,n){t.rW=!0,t.oW=n,n.hW=t,"readable"===n.Ea?Qh(t):"closed"===n.Ea?function(t){Qh(t),ic(t)}(t):tc(t,n.aW)}function $h(t,n){return ov(t.oW,n)}function Zh(t){"readable"===t.oW.Ea?nc(t,new m("Reader was released and can no longer be used to monitor the stream's closedness")):function(t,n){tc(t,n)}(t,new m("Reader was released and can no longer be used to monitor the stream's closedness")),t.oW.hW=void 0,t.oW=void 0}function Jh(t){return new m("Cannot "+t+" a stream using a released reader")}function Qh(t){t.Jj=Lh((function(n,i){t.uW=n,t.cW=i}))}function tc(t,n){Qh(t),nc(t,n)}function nc(t,n){jh(t.Jj),t.cW(n),t.uW=void 0,t.cW=void 0}function ic(t){t.uW(void 0),t.uW=void 0,t.cW=void 0}var ec=yh("[[CancelSteps]]"),rc=yh("[[PullSteps]]");function oc(t,n){void 0===n&&(n=!1);var i=new vc(t);return i.rW=n,i}function uc(t){var n=Lh((function(n,i){var e={hf:n,Ux:i};t.hW.lW.push(e)}));return n}function sc(t,n,i){var e=t.hW;e.lW.shift().hf(Kh(n,i,e.rW))}function fc(t){return t.hW.lW.length}function hc(t){var n=t.hW;return void 0!==n&&!!dc(n)}var cc,ac,vc=function(){function t(t){if(!1===ev(t))throw new m("ReadableStreamDefaultReader can only be constructed with a ReadableStream instance");if(!0===rv(t))throw new m("This stream has already been locked for exclusive reading by another reader");Gh(this,t),this.lW=new Yh}return p.defineProperty(t.prototype,"closed",{get:function(){return dc(this)?this.Jj:zh(wc("closed"))},enumerable:!0,configurable:!0}),t.prototype.cancel=function(t){return dc(this)?void 0===this.oW?zh(Jh("cancel")):$h(this,t):zh(wc("cancel"))},t.prototype.read=function(){return dc(this)?void 0===this.oW?zh(Jh("read from")):lc(this):zh(wc("read"))},t.prototype.releaseLock=function(){if(!dc(this))throw wc("releaseLock");if(void 0!==this.oW){if(this.lW.length>0)throw new m("Tried to release a reader lock when that reader has pending read() calls un-settled");Zh(this)}},t}();function dc(t){return!!Eh(t)&&!!p.prototype.hasOwnProperty.call(t,"lW")}function lc(t){var n=t.oW;return n.dW=!0,"closed"===n.Ea?Fh(Kh(void 0,!0,t.rW)):"errored"===n.Ea?zh(n.aW):n.fW[rc]()}function wc(t){return new m("ReadableStreamDefaultReader.prototype."+t+" can only be used on a ReadableStreamDefaultReader")}"symbol"==typeof yh.asyncIterator&&((cc={})[yh.asyncIterator]=function(){return this},ac=cc,p.defineProperty(ac,yh.asyncIterator,{enumerable:!1}));var bc={next:function(){if(!1===gc(this))return zh(mc("next"));var t=this._W;return void 0===t.oW?zh(Jh("iterate")):Xh(lc(t),(function(n){var i=n.done;return i&&Zh(t),Kh(n.value,i,!0)}))},return:function(t){if(!1===gc(this))return zh(mc("next"));var n=this._W;if(void 0===n.oW)return zh(Jh("finish iterating"));if(n.lW.length>0)return zh(new m("Tried to release a reader lock when that reader has pending read() calls un-settled"));if(!1===this.gW){var i=$h(n,t);return Zh(n),Xh(i,(function(){return Kh(t,!0,!0)}))}return Zh(n),Fh(Kh(t,!0,!0))}};function gc(t){return!!Eh(t)&&!!p.prototype.hasOwnProperty.call(t,"_W")}function mc(t){return new m("ReadableStreamAsyncIterator."+t+" can only be used on a ReadableSteamAsyncIterator")}function pc(t){var n=t.vW.shift();return t.wW-=n.size,t.wW<0&&(t.wW=0),n.value}function yc(t,n,i){if(!Rh(i=Number(i)))throw new RangeError("Size must be a finite, non-NaN, non-negative number.");t.vW.push({value:n,size:i}),t.wW+=i}function _c(t){t.vW=new Yh,t.wW=0}void 0!==ac&&p.setPrototypeOf(bc,ac),p.defineProperty(bc,"next",{enumerable:!1}),p.defineProperty(bc,"return",{enumerable:!1});var Sc=yh("[[AbortSteps]]"),Tc=yh("[[ErrorSteps]]"),Ec=function(){function t(t,n){void 0===t&&(t={}),void 0===n&&(n={}),kc(this);var i=n.size,e=n.highWaterMark;if(void 0!==t.type)throw new RangeError("Invalid type is specified");var r=Ch(i);void 0===e&&(e=1),function(t,n,i,e){var r=p.create(Vc.prototype);function o(){return Ph(n,"start",[r])}var u=Nh(n,"write",1,[r]),s=Nh(n,"close",0,[]),f=Nh(n,"abort",1,[]);Xc(t,r,o,u,s,f,i,e)}(this,t,e=Dh(e),r)}return p.defineProperty(t.prototype,"locked",{get:function(){if(!1===Rc(this))throw Jc("locked");return Oc(this)},enumerable:!0,configurable:!0}),t.prototype.abort=function(t){return!1===Rc(this)?zh(Jc("abort")):!0===Oc(this)?zh(new m("Cannot abort a stream that already has a writer")):Nc(this,t)},t.prototype.close=function(){return!1===Rc(this)?zh(Jc("close")):!0===Oc(this)?zh(new m("Cannot close a stream that already has a writer")):!0===xc(this)?zh(new m("Cannot close an already-closing stream")):Pc(this)},t.prototype.getWriter=function(){if(!1===Rc(this))throw Jc("getWriter");return Ic(this)},t}();function Ic(t){return new Uc(t)}function kc(t){t.Ea="writable",t.aW=void 0,t.sC=void 0,t.mW=void 0,t.pW=new Yh,t.AW=void 0,t.yW=void 0,t.MW=void 0,t.bW=void 0,t.TW=!1}function Rc(t){return!!Eh(t)&&!!p.prototype.hasOwnProperty.call(t,"mW")}function Oc(t){return void 0!==t.sC}function Nc(t,n){var i=t.Ea;if("closed"===i||"errored"===i)return Fh(void 0);if(void 0!==t.bW)return t.bW.SW;var e=!1;"erroring"===i&&(e=!0,n=void 0);var r=Lh((function(i,r){t.bW={SW:void 0,hf:i,Ux:r,NW:n,IW:e}}));return t.bW.SW=r,!1===e&&Dc(t,n),r}function Pc(t){var n=t.Ea;if("closed"===n||"errored"===n)return zh(new m("The stream (in "+n+" state) is not in the writable state and cannot be closed"));var i=Lh((function(n,i){var e={hf:n,Ux:i};t.yW=e})),e=t.sC;return void 0!==e&&!0===t.TW&&"writable"===n&&ha(e),function(t){yc(t,"close",0),Kc(t)}(t.mW),i}function Ac(t,n){"writable"!==t.Ea?Cc(t):Dc(t,n)}function Dc(t,n){var i=t.mW;t.Ea="erroring",t.aW=n;var e=t.sC;void 0!==e&&Wc(e,n),!1===function(t){if(void 0===t.AW&&void 0===t.MW)return!1;return!0}(t)&&!0===i.DW&&Cc(t)}function Cc(t){t.Ea="errored",t.mW[Tc]();var n=t.aW;if(t.pW.forEach((function(t){t.Ux(n)})),t.pW=new Yh,void 0!==t.bW){var i=t.bW;if(t.bW=void 0,!0===i.IW)return i.Ux(n),void Bc(t);qh(t.mW[Sc](i.NW),(function(){i.hf(),Bc(t)}),(function(n){i.Ux(n),Bc(t)}))}else Bc(t)}function xc(t){return void 0!==t.yW||void 0!==t.MW}function Bc(t){void 0!==t.yW&&(t.yW.Ux(t.aW),t.yW=void 0);var n=t.sC;void 0!==n&&ea(n,t.aW)}function Mc(t,n){var i=t.sC;void 0!==i&&n!==t.TW&&(!0===n?function(t){oa(t)}(i):ha(i)),t.TW=n}var Uc=function(){function t(t){if(!1===Rc(t))throw new m("WritableStreamDefaultWriter can only be constructed with a WritableStream instance");if(!0===Oc(t))throw new m("This stream has already been locked for exclusive writing by another writer");this.EW=t,t.sC=this;var n=t.Ea;if("writable"===n)!1===xc(t)&&!0===t.TW?oa(this):sa(this),na(this);else if("erroring"===n)ua(this,t.aW),na(this);else if("closed"===n)sa(this),function(t){na(t),ra(t)}(this);else{var i=t.aW;ua(this,i),ia(this,i)}}return p.defineProperty(t.prototype,"closed",{get:function(){return!1===Lc(this)?zh(Qc("closed")):this.Jj},enumerable:!0,configurable:!0}),p.defineProperty(t.prototype,"desiredSize",{get:function(){if(!1===Lc(this))throw Qc("desiredSize");if(void 0===this.EW)throw ta("desiredSize");return function(t){var n=t.EW,i=n.Ea;if("errored"===i||"erroring"===i)return null;if("closed"===i)return 0;return Yc(n.mW)}(this)},enumerable:!0,configurable:!0}),p.defineProperty(t.prototype,"ready",{get:function(){return!1===Lc(this)?zh(Qc("ready")):this.kW},enumerable:!0,configurable:!0}),t.prototype.abort=function(t){return!1===Lc(this)?zh(Qc("abort")):void 0===this.EW?zh(ta("abort")):function(t,n){var i=t.EW;return Nc(i,n)}(this,t)},t.prototype.close=function(){if(!1===Lc(this))return zh(Qc("close"));var t=this.EW;return void 0===t?zh(ta("close")):!0===xc(t)?zh(new m("Cannot close an already-closing stream")):Fc(this)},t.prototype.releaseLock=function(){if(!1===Lc(this))throw Qc("releaseLock");void 0!==this.EW&&qc(this)},t.prototype.write=function(t){return!1===Lc(this)?zh(Qc("write")):void 0===this.EW?zh(ta("write to")):Hc(this,t)},t}();function Lc(t){return!!Eh(t)&&!!p.prototype.hasOwnProperty.call(t,"EW")}function Fc(t){return Pc(t.EW)}function zc(t,n){"pending"===t.LW?ea(t,n):function(t,n){ia(t,n)}(t,n)}function Wc(t,n){"pending"===t.xW?fa(t,n):function(t,n){ua(t,n)}(t,n)}function qc(t){var n=t.EW,i=new m("Writer was released and can no longer be used to monitor the stream's closedness");Wc(t,i),zc(t,i),n.sC=void 0,t.EW=void 0}function Hc(t,n){var i=t.EW,e=i.mW,r=function(t,n){try{return t.jW(n)}catch(n){return Gc(t,n),1}}(e,n);if(i!==t.EW)return zh(ta("write to"));var o=i.Ea;if("errored"===o)return zh(i.aW);if(!0===xc(i)||"closed"===o)return zh(new m("The stream is closing or closed and cannot be written to"));if("erroring"===o)return zh(i.aW);var u=function(t){var n=Lh((function(n,i){var e={hf:n,Ux:i};t.pW.push(e)}));return n}(i);return function(t,n,i){var e={chunk:n};try{yc(t,e,i)}catch(n){return void Gc(t,n)}var r=t.OW;if(!1===xc(r)&&"writable"===r.Ea){Mc(r,$c(t))}Kc(t)}(e,n,r),u}var Vc=function(){function t(){throw new m("WritableStreamDefaultController cannot be constructed explicitly")}return t.prototype.error=function(t){if(!1===function(t){if(!Eh(t))return!1;if(!p.prototype.hasOwnProperty.call(t,"OW"))return!1;return!0}(this))throw new m("WritableStreamDefaultController.prototype.error can only be used on a WritableStreamDefaultController");"writable"===this.OW.Ea&&Zc(this,t)},t.prototype[Sc]=function(t){var n=this.PW(t);return jc(this),n},t.prototype[Tc]=function(){_c(this)},t}();function Xc(t,n,i,e,r,o,u,s){n.OW=t,t.mW=n,n.vW=void 0,n.wW=void 0,_c(n),n.DW=!1,n.jW=s,n.RW=u,n.zW=e,n.BW=r,n.PW=o;var f=$c(n);Mc(t,f),qh(Fh(i()),(function(){n.DW=!0,Kc(n)}),(function(i){n.DW=!0,Ac(t,i)}))}function jc(t){t.zW=void 0,t.BW=void 0,t.PW=void 0,t.jW=void 0}function Yc(t){return t.RW-t.wW}function Kc(t){var n=t.OW;if(!1!==t.DW&&void 0===n.AW)if("erroring"!==n.Ea){if(0!==t.vW.length){var i=function(t){return t.vW.peek().value}(t);"close"===i?function(t){var n=t.OW;(function(t){t.MW=t.yW,t.yW=void 0})(n),pc(t);var i=t.BW();jc(t),qh(i,(function(){!function(t){t.MW.hf(void 0),t.MW=void 0,"erroring"===t.Ea&&(t.aW=void 0,void 0!==t.bW&&(t.bW.hf(),t.bW=void 0)),t.Ea="closed";var n=t.sC;void 0!==n&&ra(n)}(n)}),(function(t){!function(t,n){t.MW.Ux(n),t.MW=void 0,void 0!==t.bW&&(t.bW.Ux(n),t.bW=void 0),Ac(t,n)}(n,t)}))}(t):function(t,n){var i=t.OW;!function(t){t.AW=t.pW.shift()}(i);var e=t.zW(n);qh(e,(function(){!function(t){t.AW.hf(void 0),t.AW=void 0}(i);var n=i.Ea;if(pc(t),!1===xc(i)&&"writable"===n){var e=$c(t);Mc(i,e)}Kc(t)}),(function(n){"writable"===i.Ea&&jc(t),function(t,n){t.AW.Ux(n),t.AW=void 0,Ac(t,n)}(i,n)}))}(t,i.chunk)}}else Cc(n)}function Gc(t,n){"writable"===t.OW.Ea&&Zc(t,n)}function $c(t){return Yc(t)<=0}function Zc(t,n){var i=t.OW;jc(t),Dc(i,n)}function Jc(t){return new m("WritableStream.prototype."+t+" can only be used on a WritableStream")}function Qc(t){return new m("WritableStreamDefaultWriter.prototype."+t+" can only be used on a WritableStreamDefaultWriter")}function ta(t){return new m("Cannot "+t+" a stream using a released writer")}function na(t){t.Jj=Lh((function(n,i){t.uW=n,t.cW=i,t.LW="pending"}))}function ia(t,n){na(t),ea(t,n)}function ea(t,n){jh(t.Jj),t.cW(n),t.uW=void 0,t.cW=void 0,t.LW="rejected"}function ra(t){t.uW(void 0),t.uW=void 0,t.cW=void 0,t.LW="resolved"}function oa(t){t.kW=Lh((function(n,i){t.UW=n,t.QW=i})),t.xW="pending"}function ua(t,n){oa(t),fa(t,n)}function sa(t){oa(t),ha(t)}function fa(t,n){jh(t.kW),t.QW(n),t.UW=void 0,t.QW=void 0,t.xW="rejected"}function ha(t){t.UW(void 0),t.UW=void 0,t.QW=void 0,t.xW="fulfilled"}function ca(t){if("object"!=typeof t||null===t)return!1;try{return"boolean"==typeof t.aborted}catch(t){return!1}}var aa="undefined"!=typeof DOMException?DOMException:void 0;var va=function(t){if("function"!=typeof t&&"object"!=typeof t)return!1;try{return new t,!0}catch(t){return!1}}(aa)?aa:function(){var t=function(t,n){this.message=t||"",this.name=n||"Error",g.captureStackTrace&&g.captureStackTrace(this,this.constructor)};return t.prototype=p.create(g.prototype),p.defineProperty(t.prototype,"constructor",{value:t,writable:!0,configurable:!0}),t}();function da(t,n,i,e,r,o){var u=oc(t),s=Ic(n);t.dW=!0;var f=!1,h=Fh(void 0);return Lh((function(c,a){var v,d,l,w;if(void 0!==o){if(v=function(){var i=new va("Aborted","AbortError"),o=[];!1===e&&o.push((function(){return"writable"===n.Ea?Nc(n,i):Fh(void 0)})),!1===r&&o.push((function(){return"readable"===t.Ea?ov(t,i):Fh(void 0)})),y((function(){return Q.all(o.map((function(t){return t()})))}),!0,i)},!0===o.aborted)return void v();o.addEventListener("abort",v)}if(p(t,u.Jj,(function(t){!1===e?y((function(){return Nc(n,t)}),!0,t):_(!0,t)})),p(n,s.Jj,(function(n){!1===r?y((function(){return ov(t,n)}),!0,n):_(!0,n)})),d=t,l=u.Jj,w=function(){!1===i?y((function(){return function(t){var n=t.EW,i=n.Ea;return!0===xc(n)||"closed"===i?Fh(void 0):"errored"===i?zh(n.aW):Fc(t)}(s)})):_()},"closed"===d.Ea?w():Hh(l,w),!0===xc(n)||"closed"===n.Ea){var b=new m("the destination writable stream closed before all data could be piped to it");!1===r?y((function(){return ov(t,b)}),!0,b):_(!0,b)}function g(){var t=h;return Wh(h,(function(){return t!==h?g():void 0}))}function p(t,n,i){"errored"===t.Ea?i(t.aW):Vh(n,i)}function y(t,i,e){function r(){qh(t(),(function(){return S(i,e)}),(function(t){return S(!0,t)}))}!0!==f&&(f=!0,"writable"===n.Ea&&!1===xc(n)?Hh(g(),r):r())}function _(t,i){!0!==f&&(f=!0,"writable"===n.Ea&&!1===xc(n)?Hh(g(),(function(){return S(t,i)})):S(t,i))}function S(t,n){qc(s),Zh(u),void 0!==o&&o.removeEventListener("abort",v),t?a(n):c(void 0)}jh(Lh((function(t,n){!function i(e){e?t():Wh(!0===f?Fh(!0):Wh(s.kW,(function(){return Wh(lc(u),(function(t){return!0===t.done||(h=Wh(Hc(s,t.value),void 0,_h),!1)}))})),i,n)}(!1)})))}))}var la=function(){function t(){throw new m}return p.defineProperty(t.prototype,"desiredSize",{get:function(){if(!1===wa(this))throw Ia("desiredSize");return Sa(this)},enumerable:!0,configurable:!0}),t.prototype.close=function(){if(!1===wa(this))throw Ia("close");if(!1===Ta(this))throw new m("The stream is not in a state that permits close");pa(this)},t.prototype.enqueue=function(t){if(!1===wa(this))throw Ia("enqueue");if(!1===Ta(this))throw new m("The stream is not in a state that permits enqueue");return ya(this,t)},t.prototype.error=function(t){if(!1===wa(this))throw Ia("error");_a(this,t)},t.prototype[ec]=function(t){_c(this);var n=this.FW(t);return ma(this),n},t.prototype[rc]=function(){var t=this.YW;if(this.vW.length>0){var n=pc(this);return!0===this.GW&&0===this.vW.length?(ma(this),uv(t)):ba(this),Fh(Kh(n,!1,t.hW.rW))}var i=uc(t);return ba(this),i},t}();function wa(t){return!!Eh(t)&&!!p.prototype.hasOwnProperty.call(t,"YW")}function ba(t){!1!==ga(t)&&(!0!==t.VW?(t.VW=!0,qh(t.WW(),(function(){t.VW=!1,!0===t.HW&&(t.HW=!1,ba(t))}),(function(n){_a(t,n)}))):t.HW=!0)}function ga(t){var n=t.YW;return!1!==Ta(t)&&(!1!==t.DW&&(!0===rv(n)&&fc(n)>0||Sa(t)>0))}function ma(t){t.WW=void 0,t.FW=void 0,t.jW=void 0}function pa(t){var n=t.YW;t.GW=!0,0===t.vW.length&&(ma(t),uv(n))}function ya(t,n){var i=t.YW;if(!0===rv(i)&&fc(i)>0)sc(i,n,!1);else{var e=void 0;try{e=t.jW(n)}catch(n){throw _a(t,n),n}try{yc(t,n,e)}catch(n){throw _a(t,n),n}}ba(t)}function _a(t,n){var i=t.YW;"readable"===i.Ea&&(_c(t),ma(t),sv(i,n))}function Sa(t){var n=t.YW.Ea;return"errored"===n?null:"closed"===n?0:t.RW-t.wW}function Ta(t){var n=t.YW.Ea;return!1===t.GW&&"readable"===n}function Ea(t,n,i,e,r,o,u){n.YW=t,n.vW=void 0,n.wW=void 0,_c(n),n.DW=!1,n.GW=!1,n.HW=!1,n.VW=!1,n.jW=u,n.RW=o,n.WW=e,n.FW=r,t.fW=n,qh(Fh(i()),(function(){n.DW=!0,ba(n)}),(function(t){_a(n,t)}))}function Ia(t){return new m("ReadableStreamDefaultController.prototype."+t+" can only be used on a ReadableStreamDefaultController")}var ka=Number.isInteger||function(t){return"number"==typeof t&&isFinite(t)&&y.floor(t)===t},Ra=function(){function t(){throw new m("ReadableStreamBYOBRequest cannot be used directly")}return p.defineProperty(t.prototype,"view",{get:function(){if(!1===Pa(this))throw ja("view");return this.FD},enumerable:!0,configurable:!0}),t.prototype.respond=function(t){if(!1===Pa(this))throw ja("respond");if(void 0===this.XW)throw new m("This BYOB request has been invalidated");this.FD.buffer,function(t,n){if(n=Number(n),!1===Rh(n))throw new RangeError("bytesWritten must be a finite");za(t,n)}(this.XW,t)},t.prototype.respondWithNewView=function(t){if(!1===Pa(this))throw ja("respond");if(void 0===this.XW)throw new m("This BYOB request has been invalidated");if(!ArrayBuffer.isView(t))throw new m("You can only respond with array buffer views");t.buffer,function(t,n){var i=t.ZW.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,za(t,n.byteLength)}(this.XW,t)},t}(),Oa=function(){function t(){throw new m("ReadableByteStreamController constructor cannot be used directly")}return p.defineProperty(t.prototype,"byobRequest",{get:function(){if(!1===Na(this))throw Ya("byobRequest");if(void 0===this.qW&&this.ZW.length>0){var t=this.ZW.peek(),n=new E(t.buffer,t.byteOffset+t.bytesFilled,t.byteLength-t.bytesFilled),i=p.create(Ra.prototype);!function(t,n,i){t.XW=n,t.FD=i}(i,this,n),this.qW=i}return this.qW},enumerable:!0,configurable:!0}),p.defineProperty(t.prototype,"desiredSize",{get:function(){if(!1===Na(this))throw Ya("desiredSize");return Va(this)},enumerable:!0,configurable:!0}),t.prototype.close=function(){if(!1===Na(this))throw Ya("close");if(!0===this.GW)throw new m("The stream has already been closed; do not close it again!");var t=this.KW.Ea;if("readable"!==t)throw new m("The stream (in "+t+" state) is not in the readable state and cannot be closed");!function(t){var n=t.KW;if(t.wW>0)return void(t.GW=!0);if(t.ZW.length>0){if(t.ZW.peek().bytesFilled>0){var i=new m("Insufficient bytes to fill elements in the given buffer");throw Ha(t,i),i}}qa(t),uv(n)}(this)},t.prototype.enqueue=function(t){if(!1===Na(this))throw Ya("enqueue");if(!0===this.GW)throw new m("stream is closed or draining");var n=this.KW.Ea;if("readable"!==n)throw new m("The stream (in "+n+" state) is not in the readable state and cannot be enqueued to");if(!ArrayBuffer.isView(t))throw new m("You can only enqueue array buffer views when using a ReadableByteStreamController");t.buffer,function(t,n){var i=t.KW,e=n.buffer,r=n.byteOffset,o=n.byteLength,u=e;if(!0===hc(i)){if(0===fc(i))xa(t,u,r,o);else sc(i,new E(u,r,o),!1)}else!0===$a(i)?(xa(t,u,r,o),Fa(t)):xa(t,u,r,o);Aa(t)}(this,t)},t.prototype.error=function(t){if(!1===Na(this))throw Ya("error");Ha(this,t)},t.prototype[ec]=function(t){this.ZW.length>0&&(this.ZW.peek().bytesFilled=0);_c(this);var n=this.FW(t);return qa(this),n},t.prototype[rc]=function(){var t=this.KW;if(this.wW>0){var n=this.vW.shift();this.wW-=n.byteLength,Ua(this);var i=void 0;try{i=new E(n.buffer,n.byteOffset,n.byteLength)}catch(t){return zh(t)}return Fh(Kh(i,!1,t.hW.rW))}var e=this.JW;if(void 0!==e){var r=void 0;try{r=new ArrayBuffer(e)}catch(t){return zh(t)}var o={buffer:r,byteOffset:0,byteLength:e,bytesFilled:0,elementSize:1,ctor:E,readerType:"default"};this.ZW.push(o)}var u=uc(t);return Aa(this),u},t}();function Na(t){return!!Eh(t)&&!!p.prototype.hasOwnProperty.call(t,"KW")}function Pa(t){return!!Eh(t)&&!!p.prototype.hasOwnProperty.call(t,"XW")}function Aa(t){var n=function(t){var n=t.KW;if("readable"!==n.Ea)return!1;if(!0===t.GW)return!1;if(!1===t.DW)return!1;if(!0===hc(n)&&fc(n)>0)return!0;if(!0===$a(n)&&Ga(n)>0)return!0;var i=Va(t);if(i>0)return!0;return!1}(t);!1!==n&&(!0!==t.VW?(t.VW=!0,qh(t.WW(),(function(){t.VW=!1,!0===t.HW&&(t.HW=!1,Aa(t))}),(function(n){Ha(t,n)}))):t.HW=!0)}function Da(t,n){var i=!1;"closed"===t.Ea&&(i=!0);var e=Ca(n);"default"===n.readerType?sc(t,e,i):function(t,n,i){var e=t.hW,r=e.$W.shift();r.hf(Kh(n,i,e.rW))}(t,e,i)}function Ca(t){var n=t.bytesFilled,i=t.elementSize;return new t.ctor(t.buffer,t.byteOffset,n/i)}function xa(t,n,i,e){t.vW.push({buffer:n,byteOffset:i,byteLength:e}),t.wW+=e}function Ba(t,n){var i=n.elementSize,e=n.bytesFilled-n.bytesFilled%i,r=y.min(t.wW,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.vW;s>0;){var c=h.peek(),a=y.min(s,c.byteLength),v=n.byteOffset+n.bytesFilled;kh(n.buffer,v,c.buffer,c.byteOffset,a),c.byteLength===a?h.shift():(c.byteOffset+=a,c.byteLength-=a),t.wW-=a,Ma(t,a,n),s-=a}return f}function Ma(t,n,i){La(t),i.bytesFilled+=n}function Ua(t){0===t.wW&&!0===t.GW?(qa(t),uv(t.KW)):Aa(t)}function La(t){void 0!==t.qW&&(t.qW.XW=void 0,t.qW.FD=void 0,t.qW=void 0)}function Fa(t){for(;t.ZW.length>0;){if(0===t.wW)return;var n=t.ZW.peek();!0===Ba(t,n)&&(Wa(t),Da(t.KW,n))}}function za(t,n){var i=t.ZW.peek();if("closed"===t.KW.Ea){if(0!==n)throw new m("bytesWritten must be 0 when calling respond() on a closed stream");!function(t,n){n.buffer=n.buffer;var i=t.KW;if(!0===$a(i))for(;Ga(i)>0;)Da(i,Wa(t))}(t,i)}else!function(t,n,i){if(i.bytesFilled+n>i.byteLength)throw new RangeError("bytesWritten out of range");if(Ma(t,n,i),!(i.bytesFilled<i.elementSize)){Wa(t);var e=i.bytesFilled%i.elementSize;if(e>0){var r=i.byteOffset+i.bytesFilled,o=i.buffer.slice(r-e,r);xa(t,o,0,o.byteLength)}i.buffer=i.buffer,i.bytesFilled-=e,Da(t.KW,i),Fa(t)}}(t,n,i);Aa(t)}function Wa(t){var n=t.ZW.shift();return La(t),n}function qa(t){t.WW=void 0,t.FW=void 0}function Ha(t,n){var i=t.KW;"readable"===i.Ea&&(!function(t){La(t),t.ZW=new Yh}(t),_c(t),qa(t),sv(i,n))}function Va(t){var n=t.KW.Ea;return"errored"===n?null:"closed"===n?0:t.RW-t.wW}function Xa(t,n,i){var e=p.create(Oa.prototype);var r=Nh(n,"pull",0,[e]),o=Nh(n,"cancel",1,[]),u=n.autoAllocateChunkSize;if(void 0!==u&&(u=Number(u),!1===ka(u)||u<=0))throw new RangeError("autoAllocateChunkSize must be a positive integer");!function(t,n,i,e,r,o,u){n.KW=t,n.HW=!1,n.VW=!1,n.qW=void 0,n.vW=n.wW=void 0,_c(n),n.GW=!1,n.DW=!1,n.RW=Dh(o),n.WW=e,n.FW=r,n.JW=u,n.ZW=new Yh,t.fW=n,qh(Fh(i()),(function(){n.DW=!0,Aa(n)}),(function(t){Ha(n,t)}))}(t,e,(function(){return Ph(n,"start",[e])}),r,o,i,u)}function ja(t){return new m("ReadableStreamBYOBRequest.prototype."+t+" can only be used on a ReadableStreamBYOBRequest")}function Ya(t){return new m("ReadableByteStreamController.prototype."+t+" can only be used on a ReadableByteStreamController")}function Ka(t){var n=Lh((function(n,i){var e={hf:n,Ux:i};t.hW.$W.push(e)}));return n}function Ga(t){return t.hW.$W.length}function $a(t){var n=t.hW;return void 0!==n&&!!Ja(n)}var Za=function(){function t(t){if(!ev(t))throw new m("ReadableStreamBYOBReader can only be constructed with a ReadableStream instance given a byte source");if(!1===Na(t.fW))throw new m("Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte source");if(rv(t))throw new m("This stream has already been locked for exclusive reading by another reader");Gh(this,t),this.$W=new Yh}return p.defineProperty(t.prototype,"closed",{get:function(){return Ja(this)?this.Jj:zh(Qa("closed"))},enumerable:!0,configurable:!0}),t.prototype.cancel=function(t){return Ja(this)?void 0===this.oW?zh(Jh("cancel")):$h(this,t):zh(Qa("cancel"))},t.prototype.read=function(t){return Ja(this)?void 0===this.oW?zh(Jh("read from")):ArrayBuffer.isView(t)?(t.buffer,0===t.byteLength?zh(new m("view must have non-zero byteLength")):function(t,n){var i=t.oW;if(i.dW=!0,"errored"===i.Ea)return zh(i.aW);return function(t,n){var i=t.KW,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.ZW.length>0)return t.ZW.push(o),Ka(i);if("closed"===i.Ea)return Fh(Kh(new r(o.buffer,o.byteOffset,0),!0,i.hW.rW));if(t.wW>0){if(!0===Ba(t,o)){var u=Ca(o);return Ua(t),Fh(Kh(u,!1,i.hW.rW))}if(!0===t.GW){var s=new m("Insufficient bytes to fill elements in the given buffer");return Ha(t,s),zh(s)}}t.ZW.push(o);var f=Ka(i);return Aa(t),f}(i.fW,n)}(this,t)):zh(new m("view must be an array buffer view")):zh(Qa("read"))},t.prototype.releaseLock=function(){if(!Ja(this))throw Qa("releaseLock");if(void 0!==this.oW){if(this.$W.length>0)throw new m("Tried to release a reader lock when that reader has pending read() calls un-settled");Zh(this)}},t}();function Ja(t){return!!Eh(t)&&!!p.prototype.hasOwnProperty.call(t,"$W")}function Qa(t){return new m("ReadableStreamBYOBReader.prototype."+t+" can only be used on a ReadableStreamBYOBReader")}var tv=function(){function t(t,n){void 0===t&&(t={}),void 0===n&&(n={}),iv(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),Xa(this,t,e=Dh(e))}else{if(void 0!==r)throw new RangeError("Invalid type is specified");var o=Ch(i);void 0===e&&(e=1),function(t,n,i,e){var r=p.create(la.prototype),o=Nh(n,"pull",0,[r]),u=Nh(n,"cancel",1,[]);Ea(t,r,(function(){return Ph(n,"start",[r])}),o,u,i,e)}(this,t,e=Dh(e),o)}}return p.defineProperty(t.prototype,"locked",{get:function(){if(!1===ev(this))throw fv("locked");return rv(this)},enumerable:!0,configurable:!0}),t.prototype.cancel=function(t){return!1===ev(this)?zh(fv("cancel")):!0===rv(this)?zh(new m("Cannot cancel a stream that already has a reader")):ov(this,t)},t.prototype.getReader=function(t){var n=(void 0===t?{}:t).mode;if(!1===ev(this))throw fv("getReader");if(void 0===n)return oc(this,!0);if("byob"===(n=String(n)))return function(t,n){void 0===n&&(n=!1);var i=new Za(t);return i.rW=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===ev(this))throw fv("pipeThrough");if(!1===Rc(i))throw new m("writable argument to pipeThrough must be a WritableStream");if(!1===ev(e))throw new m("readable argument to pipeThrough must be a ReadableStream");if(o=Boolean(o),u=Boolean(u),s=Boolean(s),void 0!==f&&!ca(f))throw new m("ReadableStream.prototype.pipeThrough's signal option must be an AbortSignal");if(!0===rv(this))throw new m("ReadableStream.prototype.pipeThrough cannot be used on a locked ReadableStream");if(!0===Oc(i))throw new m("ReadableStream.prototype.pipeThrough cannot be used on a locked WritableStream");return jh(da(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===ev(this)?zh(fv("pipeTo")):!1===Rc(t)?zh(new m("ReadableStream.prototype.pipeTo's first argument must be a WritableStream")):(e=Boolean(e),r=Boolean(r),o=Boolean(o),void 0===u||ca(u)?!0===rv(this)?zh(new m("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream")):!0===Oc(t)?zh(new m("ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream")):da(this,t,e,r,o,u):zh(new m("ReadableStream.prototype.pipeTo's signal option must be an AbortSignal")))},t.prototype.tee=function(){if(!1===ev(this))throw fv("tee");var t=function(t,n){var i,e,r,o,u,s=oc(t),f=!1,h=!1,c=!1,a=Lh((function(t){u=t}));function v(){return!0===f||(f=!0,jh(Xh(lc(s),(function(t){if(f=!1,!0===t.done)return!1===h&&pa(r.fW),void(!1===c&&pa(o.fW));var n=t.value,i=n,e=n;!1===h&&ya(r.fW,i),!1===c&&ya(o.fW,e)})))),Fh(void 0)}function d(){}return r=nv(d,v,(function(n){if(h=!0,i=n,!0===c){var r=Ih([i,e]),o=ov(t,r);u(o)}return a})),o=nv(d,v,(function(n){if(c=!0,e=n,!0===h){var r=Ih([i,e]),o=ov(t,r);u(o)}return a})),Vh(s.Jj,(function(t){_a(r.fW,t),_a(o.fW,t)})),[r,o]}(this);return Ih(t)},t.prototype.getIterator=function(t){var n=(void 0===t?{}:t).preventCancel,i=void 0!==n&&n;if(!1===ev(this))throw fv("getIterator");return function(t,n){void 0===n&&(n=!1);var i=oc(t),e=p.create(bc);return e._W=i,e.gW=Boolean(n),e}(this,i)},t}();function nv(t,n,i,e,r){void 0===e&&(e=1),void 0===r&&(r=function(){return 1});var o=p.create(tv.prototype);return iv(o),Ea(o,p.create(la.prototype),t,n,i,e,r),o}function iv(t){t.Ea="readable",t.hW=void 0,t.aW=void 0,t.dW=!1}function ev(t){return!!Eh(t)&&!!p.prototype.hasOwnProperty.call(t,"fW")}function rv(t){return void 0!==t.hW}function ov(t,n){return t.dW=!0,"closed"===t.Ea?Fh(void 0):"errored"===t.Ea?zh(t.aW):(uv(t),Xh(t.fW[ec](n),_h))}function uv(t){t.Ea="closed";var n=t.hW;void 0!==n&&(dc(n)&&(n.lW.forEach((function(t){t.hf(Kh(void 0,!0,n.rW))})),n.lW=new Yh),ic(n))}function sv(t,n){t.Ea="errored",t.aW=n;var i=t.hW;void 0!==i&&(dc(i)?(i.lW.forEach((function(t){t.Ux(n)})),i.lW=new Yh):(i.$W.forEach((function(t){t.Ux(n)})),i.$W=new Yh),nc(i,n))}function fv(t){return new m("ReadableStream.prototype."+t+" can only be used on a ReadableStream")}"symbol"==typeof yh.asyncIterator&&p.defineProperty(tv.prototype,yh.asyncIterator,{value:tv.prototype.getIterator,enumerable:!1,writable:!0,configurable:!0});var hv=function(){function t(t){var n=t.highWaterMark;this.highWaterMark=n}return t.prototype.size=function(t){return t.byteLength},t}(),cv=function(){function t(t){var n=t.highWaterMark;this.highWaterMark=n}return t.prototype.size=function(){return 1},t}(),av=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=Ch(e);if(void 0===r&&(r=1),r=Dh(r),void 0!==t.readableType)throw new RangeError("Invalid readable type specified");var f,h=Ch(o);void 0===u&&(u=0),u=Dh(u),function(t,n,i,e,r,o){function u(){return n}function s(n){return function(t,n){var i=t.tH;if(!0===t.TW){return Xh(t.iH,(function(){var e=t.eH;if("erroring"===e.Ea)throw e.aW;return yv(i,n)}))}return yv(i,n)}(t,n)}function f(n){return function(t,n){return dv(t,n),Fh(void 0)}(t,n)}function h(){return function(t){var n=t.sH,i=t.tH,e=i.nH();return mv(i),Xh(e,(function(){if("errored"===n.Ea)throw n.aW;var t=n.fW;!0===Ta(t)&&pa(t)}),(function(i){throw dv(t,i),n.aW}))}(t)}function c(){return function(t){return wv(t,!1),t.iH}(t)}function a(n){return lv(t,n),Fh(void 0)}t.eH=function(t,n,i,e,r,o){void 0===r&&(r=1),void 0===o&&(o=function(){return 1});var u=p.create(Ec.prototype);return kc(u),Xc(u,p.create(Vc.prototype),t,n,i,e,r,o),u}(u,s,h,f,i,e),t.sH=nv(u,c,a,r,o),t.TW=void 0,t.iH=void 0,t.rH=void 0,wv(t,!0),t.tH=void 0}(this,Lh((function(t){f=t})),r,s,u,h),function(t,n){var i=p.create(bv.prototype),e=function(t){try{return pv(i,t),Fh(void 0)}catch(t){return zh(t)}},r=n.transform;if(void 0!==r){if("function"!=typeof r)throw new m("transform is not a method");e=function(t){return Ah(r,n,[t,i])}}var o=Nh(n,"flush",0,[i]);!function(t,n,i,e){n.oH=t,t.tH=n,n.hH=i,n.nH=e}(t,i,e,o)}(this,t);var c=Ph(t,"start",[this.tH]);f(c)}return p.defineProperty(t.prototype,"readable",{get:function(){if(!1===vv(this))throw Sv("readable");return this.sH},enumerable:!0,configurable:!0}),p.defineProperty(t.prototype,"writable",{get:function(){if(!1===vv(this))throw Sv("writable");return this.eH},enumerable:!0,configurable:!0}),t}();function vv(t){return!!Eh(t)&&!!p.prototype.hasOwnProperty.call(t,"tH")}function dv(t,n){_a(t.sH.fW,n),lv(t,n)}function lv(t,n){mv(t.tH),Gc(t.eH.mW,n),!0===t.TW&&wv(t,!1)}function wv(t,n){void 0!==t.iH&&t.rH(),t.iH=Lh((function(n){t.rH=n})),t.TW=n}var bv=function(){function t(){throw new m("TransformStreamDefaultController instances cannot be created directly")}return p.defineProperty(t.prototype,"desiredSize",{get:function(){if(!1===gv(this))throw _v("desiredSize");return Sa(this.oH.sH.fW)},enumerable:!0,configurable:!0}),t.prototype.enqueue=function(t){if(!1===gv(this))throw _v("enqueue");pv(this,t)},t.prototype.error=function(t){if(!1===gv(this))throw _v("error");!function(t,n){dv(t.oH,n)}(this,t)},t.prototype.terminate=function(){if(!1===gv(this))throw _v("terminate");!function(t){var n=t.oH,i=n.sH.fW;!0===Ta(i)&&pa(i);var e=new m("TransformStream terminated");lv(n,e)}(this)},t}();function gv(t){return!!Eh(t)&&!!p.prototype.hasOwnProperty.call(t,"oH")}function mv(t){t.hH=void 0,t.nH=void 0}function pv(t,n){var i=t.oH,e=i.sH.fW;if(!1===Ta(e))throw new m("Readable side is not in a state that permits enqueue");try{ya(e,n)}catch(t){throw lv(i,t),i.sH.aW}var r=function(t){return!0!==ga(t)}(e);r!==i.TW&&wv(i,!0)}function yv(t,n){return Xh(t.hH(n),void 0,(function(n){throw dv(t.oH,n),n}))}function _v(t){return new m("TransformStreamDefaultController.prototype."+t+" can only be used on a TransformStreamDefaultController")}function Sv(t){return new m("TransformStream.prototype."+t+" can only be used on a TransformStream")}var Tv=t,Ev=pt(Tv.ReadableStream)&&pt(Tv.WritableStream)&&pt(Tv.TransformStream)&&mt(Tv.ReadableStream.prototype.pipeThrough),Iv=Ev?Tv.ReadableStream:tv,kv=(Ev&&Tv.WritableStream,Ev?Tv.TransformStream:av);Ev&&Tv.ByteLengthQueuingStrategy&&Tv.ByteLengthQueuingStrategy,Ev&&Tv.CountQueuingStrategy&&Tv.CountQueuingStrategy;function Rv(t){return function(t){return new Iv({start:function(n){for(var i=0;i<t.length;i++){var e=t[i];n.enqueue(e)}n.close()}})}([t])}function Ov(t){return Rv(function(t){return new E(t)}(t))}function Nv(t,n){return function(t,n){var i=n,e=t.getReader(),r=new fu,o=function(){u();var t=new en;e.cancel(t).catch(Nt),r.Bx(t)},u=function(){i&&(i.n_(o),i=void 0)};i&&(i.s_?o():i.r_(o));var s=[],f=function(t){return t.done?(u(),Q.resolve(s)):(s.push(t.value),Q.resolve(e.read()).then(f))};return Q.resolve(e.read()).then(f).then((function(t){u(),r.zx(t)}),(function(t){u(),r.Bx(t)})),r.Qx}(t,n).then((function(t){return Kn(t).buffer}))}function Pv(t,n){var i=n,e=new kv,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(Nt)}),(function(t){return i=void 0,u.releaseLock(),o.abort(t).catch(Nt)})),r}function Av(t){return li(new E(t))}function Dv(t){return wi(t).buffer}var Cv="content-type",xv="text/plain;charset=UTF-8",Bv=function(){function t(){}var n=t.prototype;return n.pR=function(t){return this.gk(t).then(JSON.parse)},n.JP=function(t,n){switch(t){case bh.NE:return this.zR(n);case bh.DE:return this.pR(n);case bh.EE:return this.aH();case bh.vb:return this.gk(n);default:throw new m}},t}();function Mv(t,n,i){if(t instanceof Bv)return t;if(t instanceof Iv)return function(t,n){return new Lv({pw:0,aH:t,MB:Uv(n)})}(t,i);var e=Uv(i),r=Q.resolve(t).then((function(t){return function(t,n){if(t){if("string"==typeof t)return{pw:bh.vb,XE:t,MB:n||xv};if(t instanceof ArrayBuffer||jn(t))return{pw:bh.NE,XE:Xv(t),MB:n};if(function(t){return gt(t)&&t.constructor&&t.constructor===p}(t)||bt(t))return{pw:bh.DE,XE:t,MB:n};throw new m("Unsupported BodyInit type")}return{pw:bh.vb,XE:null,MB:n}}(t,e)}));return new Lv({pw:1,Qx:r,uH:n})}function Uv(t){return(t.get(Cv)||"").toLowerCase()}var Lv=function(t){function n(n){var i;return(i=t.call(this)||this).lH=!1,i.gH=new fu,i.gH.Qx.catch(Nt),i.mH(n),i}Bt(n,t);var i=n.prototype;return i._H=function(){return this.gH.Qx},i.gk=function(t){return this.vH(Fv,t)},i.pR=function(t){return this.vH(Wv,t)},i.zR=function(t){return this.vH(Hv,t)},i.aH=function(){return this.wH(function(t){return 0===t.pw?t.aH:Pv(t.Qx.then(Vv).then(Ov),t.uH)}(this.fH))},i.vH=function(t,n){if(this.lH)return Q.reject(new m("Already used"));this.lH=!0;var i=t(this.fH,n);return this.gH.v_(i.then(Nt)),i},i.wH=function(t){if(this.lH)throw new m("Already used");if(t.locked)throw new m("Body stream is locked");this.lH=!0;var n=new kv,i=Q.resolve(t.pipeTo(n.writable));return this.gH.v_(i),n.readable},i.mH=function(t){this.fH=t,1===t.pw&&t.Qx.catch(Nt)},i.pH=function(){if(this.lH)throw new m("Already used");var t=function(t){if(0===t.pw){var n=Mt(t.aH.tee(),2),i=n[0],e=n[1];return[{pw:t.pw,aH:i,MB:t.MB},{pw:t.pw,aH:e,MB:t.MB}]}var r=Mt(t.uH.w_(),2),o=r[0],u=r[1];return[{pw:t.pw,Qx:t.Qx,uH:o},{pw:t.pw,Qx:t.Qx,uH:u}]}(this.fH),i=t[0],e=t[1];return this.mH(i),new n(e)},Dt(n,[{key:"cH",get:function(){return this.lH}},{key:"dH",get:function(){return 0===this.fH.pw}}]),n}(Bv);function Fv(t,n){return 0===t.pw?Nv(t.aH,n).then(Av):(n&&t.uH.v_(n),un(t.Qx.then(zv),t.uH))}function zv(t){switch(t.pw){case bh.vb:return Q.resolve(t.XE||"");case bh.NE:return Q.resolve(t.XE).then(Av);case bh.DE:return Q.resolve(t.XE).then(JSON.stringify)}}function Wv(t,n){return 0===t.pw?Fv(t,n).then(JSON.parse):(n&&t.uH.v_(n),un(t.Qx.then(qv),t.uH))}function qv(t){return t.pw===bh.DE?Q.resolve(t.XE):zv(t).then(JSON.parse)}function Hv(t,n){return 0===t.pw?Nv(t.aH,n):(n&&t.uH.v_(n),un(t.Qx.then(Vv),t.uH))}function Vv(t){switch(t.pw){case bh.NE:return Q.resolve(t.XE);case bh.vb:case bh.DE:return zv(t).then(Dv)}}function Xv(t){return t instanceof ArrayBuffer?t:pi(gi(t)).buffer}var jv=function(t){function n(n){var i;return(i=t.call(this)||this).AH=n,i}Bt(n,t);var i=n.prototype;return i._H=function(){return this.AH._H()},i.gk=function(t){return this.AH.gk(t)},i.pR=function(t){return this.AH.pR(t)},i.zR=function(t){return this.AH.zR(t)},i.aH=function(t){return this.AH.aH(t)},i.pH=function(){return this.AH.pH()},Dt(n,[{key:"cH",get:function(){return this.AH.cH}},{key:"dH",get:function(){return this.AH.dH}}]),n}(Bv);var Yv=function(t){function n(n,i){var e,r,o,u,s,f;i?(r=i.ZE,o=i.KE,u=i.vE,s=i.AR,f=i.yH):(r=[],o=bh.vb,u=200,s="OK",f=!1);var h=n.dE,c=new gh(n.ZE||r),a=n.KE||o,v=n.vk||(i&&i.dE===h?i.vk:h.Hu),d=i?i.AH:null,l=Mv(void 0!==n.xp?n.xp:d,n.uH||new hn,c);return(e=t.call(this,l)||this).ZE=c,e.dE=h,e.vk=v,e.KE=a,e.vE=void 0!==n.vE?n.vE:u,e.AR=void 0!==n.AR?String(n.AR):s,e.yH=n.yH||f,e}Bt(n,t);var i=n.prototype;return i.xp=function(t){return this.JP(this.KE,t)},i.Np=function(){return new n({xp:this.pH(),dE:this.dE},this)},n}(jv),Kv=function(t){return t.DELETE="DELETE",t.GET="GET",t.HEAD="HEAD",t.OPTIONS="OPTIONS",t.POST="POST",t.PUT="PUT",t}({}),Gv=function(t){return t.VE="same-origin",t.Iw="no-cors",t.WE="cors",t.HE="navigate",t}({}),$v=function(t,n){var i,e,r,o,u,s,f,h,c,a,v,d,l,w,b,g,m,p,y=t.Hu;n?(i=n.XE,e=n.ZE,r=n.qE,o=n.KE,u=n.wE,s=n.JE,f=n.o_,h=n.pw,c=n.$E,a=n.ek,v=n.nk,d=n.rk,l=n.gw,w=n.hk,b=n.ck):(i=null,e={},r="GET",o=bh.vb,u=0,s=0,h="",c="",a="",v=!1,l=void 0,w=!1,b=void 0),this.Hu=y,this.XE=t.XE||i,this.ZE=new gh(t.ZE||e),this.qE=t.qE||r,this.KE=t.KE||o,this.wE=void 0!==t.wE?Number(t.wE)||0:u,this.JE=void 0!==t.JE?Number(t.JE)||0:s,this.o_=t.o_||f||(new hn).o_,this.pw=t.pw||h,this.$E=t.$E||c,this.ek=t.ek||a,this.nk=void 0!==t.nk?Boolean(t.nk):v,this.rk=t.rk||d,this.gw=null!=(g=t.gw)?g:l,this.hk=null!=(m=t.hk)?m:w,this.ck=null!=(p=t.ck)?p:b},Zv=function(){function t(){}var n=t.prototype;return n.dE=function(t){var n=function(t){return new Yv({xp:null,ZE:{},dE:t,vk:t.Hu,KE:t.KE,vE:0,AR:tu.Fb})}(new $v(t));return Q.resolve(n)},n.xG=function(t){},n.gn=function(){},t}();var Jv=function(){function t(t,n){void 0===n&&(n=!0),this.SH=t,this.IH=n}var n=t.prototype;return n.dE=function(t){var n=this.TH(t);return this.SH.dE(n)},n.xG=function(t){return this.SH.xG(this.NH(t))},n.TH=function(n){var i=new $v(n);if(!this.IH){var e=t.DH(i.Hu);i=new $v({Hu:e},i)}return i},n.NH=function(n){var i=n.Hu;return this.IH||(i=t.DH(i)),{Hu:i,XE:n.XE}},n.gn=function(){this.SH.gn()},t.DH=function(t){return Rt.EH&&Zn(t,"http://")?t.replace(":","s:"):t},Dt(t,null,[{key:"MH",get:function(){return t.bH||(t.bH=new t(new Zv)),t.bH}}]),t}();Jv.bH=void 0;var Qv=function(t){return t.uE="HttpOpenError",t.cE="HttpResponseError",t.lE="HttpTimeoutError",t}({}),td=function(t){function n(n,i,e){var r;return(r=t.call(this,i,e)||this).fE=n,r}return Bt(n,t),Dt(n,[{key:"dE",get:function(){return this.fE}}]),n}(nn);var nd=function(t){function n(n,i){return t.call(this,n,function(t){return"Error while opening "+t+". Invalid URL."}(n.Hu),i)||this}return Bt(n,t),Dt(n,[{key:"name",get:function(){return Qv.uE}}]),n}(td);var id=function(t){function n(n,i,e){var r;return(r=t.call(this,n.dE,null!=e?e:function(t){return"Error while loading "+t.dE.Hu+", status code "+t.vE}(n),i)||this).gE=n,r}return Bt(n,t),Dt(n,[{key:"name",get:function(){return Qv.cE}},{key:"_E",get:function(){return this.gE}}]),n}(td);var ed=function(t){function n(n,i){return t.call(this,n,function(t){return"Request for "+t.Hu+" timed out after "+t.wE+" seconds."}(n),i)||this}return Bt(n,t),Dt(n,[{key:"name",get:function(){return Qv.lE}}]),n}(td),rd=self.fetch,od=self.Request,ud=self.Response,sd=self.Headers,fd=self.ReadableStream,hd=self.AbortSignal,cd=self.AbortController,ad=Pt((function(){try{return mt(rd)&&pt(od)&&pt(ud)&&pt(sd)&&"forEach"in sd.prototype&&Co()}catch(t){return!1}})),vd=["http:","https:"];var dd=Pt((function(){try{return ad()&&pt(hd)&&pt(cd)&&"signal"in od.prototype}catch(t){return!1}})),ld=Pt((function(){try{return ad()&&pt(fd)&&"body"in ud.prototype&&!Zi.tL}catch(t){return!1}}));function wd(t,n){var i,e=t.ZE.has("content-length")?Number(t.ZE.get("content-length")):void 0;return i=t.dH?function(t,n,i){return t.pipeThrough(new kv(new bd(n,i)))}(t.aH(),n,e):function(t,n,i){return gd.apply(this,arguments)}(t.zR(),n,e),new Yv({xp:i,dE:t.dE},t)}var bd=function(){function t(t,n){this.kst=t,this.Lst=n,this.M5=0}var n=t.prototype;return n.transform=function(t,n){this.M5+=t.byteLength,this.kst(this.M5,this.Lst),n.enqueue(t)},n.flush=function(t){var n;this.kst(this.M5,null!=(n=this.Lst)?n:this.M5)},t}();function gd(){return gd=ft((function(t,n,i){var e,r;return ht(this,(function(o){switch(o.label){case 0:return[4,Q.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]}}))})),gd.apply(this,arguments)}var md=function(){function t(t){this.qO=new hn,this.gE=void 0,this.fS=0,this.Cst=!1,this.fE=t,this.qO.v_(t.o_),this._E=this.xst()}var n=t.prototype;return n.xst=function(){var t=this;return ft((function(){var n,i,e,r,o,u,s,f,h;return ht(this,(function(c){switch(c.label){case 0:(n=t.fE).wE&&(t.fS=d((function(){t.Cst=!0,t.qO.g_()}),n.wE),t.qO.o_.d_((function(){l(t.fS)})));try{i=rd(n.Hu,{method:n.qE,headers:n.ZE.kE(),body:n.XE,credentials:n.nk?"include":"same-origin",signal:_d(t.qO.o_),mode:n.gw,keepalive:n.ck})}catch(t){throw new nd(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(),rn(o=t.jst(r))&&t.qO.g_(),o;case 4:if(u=e.url||n.Hu,s=0===e.status&&"file:"===function(t){return Rt.Ah(t).protocol}(u)?200:e.status,f=new pd(t,e,t.qO),!function(t){return t.vE>=200&&t.vE<=299||304===t.vE}(h=new Yv({xp:f,dE:n,KE:n.KE,ZE:Sd(e.headers),vE:s,AR:e.statusText,vk:u})))throw new id(h);return n.rk&&(h=wd(h,n.rk)),[2,h]}}))}))()},n.jst=function(t){return function(t){return t instanceof td}(t)?t:rn(t)?this.Cst?new ed(this.fE):new en(t.message,t):this.gE?new id(this.gE,t):new nd(this.fE,t)},t}(),pd=function(t){function n(n,i,e){var r;return(r=t.call(this)||this).gH=new fu,r.Pst=n,r.Ost=i,r.qO=e,r.gH.Qx.catch(Nt),r}Bt(n,t);var i=n.prototype;return i._H=function(){return this.gH.Qx},i.gk=function(t){return this.vH(this.Ost.text(),t)},i.zR=function(t){return this.vH(this.Ost.arrayBuffer(),t)},i.aH=function(){var t=this.Ost.body;return t?this.wH(t):Pv(this.zR().then(Ov),this.qO)},i.pH=function(){var t=this.Ost.clone(),i=Mt(this.qO.w_(),2),e=i[0],r=i[1];return this.qO=e,new n(this.Pst,t,r)},i.vH=function(t,n){var i=this;n&&this.qO.v_(n);var e=on(Q.resolve(t),this.qO.o_).catch((function(t){throw i.Pst.jst(t)}));return e=un(e,this.qO),this.gH.v_(e.then(Nt)),e},i.wH=function(t){var n=this;return new Iv(new Td(t,(function(t){return n.Pst.jst(t)}),this.qO,this.gH),{highWaterMark:0})},Dt(n,[{key:"cH",get:function(){return this.Ost.bodyUsed}},{key:"dH",get:function(){return wt(this.Ost.body)}}]),n}(Bv),yd="abort";function _d(t){if(dd()){var n=new cd;if(t.s_)n.abort();else if(!t.a_){var i=function(){e(),n.abort()},e=function(){n.signal.removeEventListener(yd,i),t.n_(i),t.f_(e)};n.signal.addEventListener(yd,i),t.r_(i),t.d_(e)}return n.signal}}function Sd(t){if(function(t){return gt(t)&&"function"==typeof t.forEach}(t)){var n=new gh;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 gh(t)}var Td=function(){function t(t,n,i,e){this.Rst=t,this.zst=n,this.qO=i,this.gH=e}var n=t.prototype;return n.start=function(t){this.hW=this.Rst.getReader()},n.pull=function(t){var n=this;return ft((function(){var i,e,r;return ht(this,(function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),[4,on(n.hW.read(),n.qO.o_)];case 1:return i=o.sent(),[3,3];case 2:return e=o.sent(),r=n.zst(e),n.gH.Bx(r),n.qO.g_(),n.hW.cancel(r).catch(Nt),t.error(r),[2];case 3:return i.done?(n.gH.zx(),n.qO.g_(),t.close()):t.enqueue(i.value),[2]}}))}))()},n.cancel=function(t){return this.qO.g_(),this.gH.Bx(t),this.hW.cancel(t)},t}(),Ed=function(){function t(t){var n=this;this.qO=new hn,this.gE=void 0,this.Bst=new fu,this.Hst=!1,this.Wst=function(){var t;n.Qst(),null==(t=n.Ust)||t.abort()},this.fE=t,this.qO.v_(t.o_),this.Ust=new I,this.xst()}var n=t.prototype;return n.xst=function(){var t=this,n=this.Ust,i=this.fE;if(i.o_.s_)return this.Qst();n.onreadystatechange=function(){return t.Fst()},n.onprogress=function(n){return t.kst(n)},n.onload=function(){return t.Yst()},n.onloadend=function(){return t.Gst()},n.onerror=function(){return t.Vq()},n.ontimeout=function(){return t.Vst()},n.onabort=function(){return t.Qst()},n.open(i.qE,i.Hu,!0),n.withCredentials=Boolean(i.nk),"responseType"in n&&i.KE&&(i.KE===bh.vb?n.responseType="text":n.responseType="arraybuffer"),i.ZE.forEach((function(t,i){n.setRequestHeader(i,t)})),i.wE&&(n.timeout=i.wE),this.qO.o_.r_(this.Wst);var e=i.XE;e?n.send(e):n.send()},n.Fst=function(){var t=this.Ust;void 0!==t&&t.readyState>=2&&!this.Hst&&(this.Hst=!0,this.Xst())},n.Xst=function(){var t,n,i=this.Ust,e=function(t){var n=new gh,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.fE;this.Zst=new fu,this.gE=new Yv({dE:r,KE:r.KE,xp:this.Zst.Qx,vE:i.status,AR:i.statusText,ZE:e,vk:null!=(n=i.responseURL)?n:e.get("X-Request-URL")}),null==(t=this.Bst)||t.zx(this.gE)},n.Yst=function(){var t,n=this.Ust;if(void 0!==n){var i=n.response;if(!wt(i)){var e=this.fE.KE;i=e===bh.vb?n.responseText:e===bh.NE?new ArrayBuffer(0):{}}null==(t=this.Zst)||t.zx(i)}},n.Gst=function(){this.gn()},n.kst=function(t){void 0!==this.Ust&&(null==this.fE.rk||this.fE.rk.call(this.fE,t.loaded,t.lengthComputable?t.total:void 0))},n.Vq=function(){var t=new g("Network request failed");this.gE?this.Ss(new id(this.gE,t)):this.Ss(new nd(this.fE,t))},n.Vst=function(){this.Ss(new ed(this.fE))},n.Qst=function(){this.Ss(new en),this.gn()},n.Ss=function(t){var n,i;null==(n=null!=(i=this.Zst)?i:this.Bst)||n.Bx(t)},n.gn=function(){this.Ust=void 0,this.gE=void 0,this.Bst=void 0,this.Zst=void 0,this.qO.c_()},Dt(t,[{key:"_E",get:function(){return this.Bst.Qx}}]),t}();var Id=function(){function t(){}var n=t.prototype;return n.dE=function(t){return function(t){if(!ad()||!function(t){try{return vd.indexOf(new self.URL(t,self.location.href).protocol)>=0}catch(t){return!1}}(t.Hu))return!1;if(!ld()&&t.rk)return!1;if(!t.hk){if(Zi.yL&&Zi.uL<=68)return!1;if(Zi.wL)return!1}return!0}(t)?new md(t)._E:new Ed(t)._E},n.xG=function(t){var n=t.MB?{"Content-type":t.MB}:void 0;this.dE(new $v({qE:Kv.POST,Hu:t.Hu,XE:t.XE,ZE:n,gw:Gv.Iw})).then((function(t){!function(t){t.then(Nt,Nt)}(t.zR())}),Nt)},n.gn=function(){},t}();var kd=function(t){return t[t.OD=1]="OD",t[t.PD=2]="PD",t[t.vb=3]="vb",t[t.RD=4]="RD",t[t.zD=9]="zD",t}({});var Rd=function(t){function n(n){return t.call(this,"Invalid XML",n)||this}return Bt(n,t),n}(nn),Od=function(){function t(){}return t.prototype.JD=function(t){var n,i=new DOMParser;try{n=i.parseFromString(t,"text/xml")}catch(t){throw new Rd(t)}if(!n||n.getElementsByTagName("parsererror").length>0)throw new Rd;return new Bd(n)},t}(),Nd=function(){function t(t){this.qst=t}var n=t.prototype;return n.jD=function(t){return this.qst.isEqualNode(t.qst)},n.QD=function(n){return new t(this.qst.cloneNode(n))},Dt(t,[{key:"BD",get:function(){return kd.PD}},{key:"KD",get:function(){var t;return null!=(t=this.qst.localName)?t:Ld(this.qst.nodeName)}},{key:"l",get:function(){return this.qst.nodeName}},{key:"Kst",get:function(){var t;return null!=(t=this.qst.namespaceURI)?t:void 0}},{key:"Jst",get:function(){var t;return null!=(t=this.qst.prefix)?t:void 0}},{key:"RM",get:function(){return this.qst.nodeValue}}]),t}(),Pd=function(){function t(t){this.$st=void 0,this.tnt=t}var n=t.prototype;return n.ZD=function(t){return this.eE.filter((function(n){return Md(n)&&n.UR===t}))},n.XD=function(t,n){return this.eE.filter((function(i){return Md(i)&&i.KD===n&&i.Kst===t}))},n.sE=function(t){this.tnt.appendChild(t.SD),this.$st&&this.$st.push(t)},n.jD=function(t){return this.tnt.isEqualNode(t.SD)},Dt(t,[{key:"eE",get:function(){return void 0===this.$st&&(this.$st=function(t){for(var n=[],i=0;i<t.length;i++){var e=Ud(t.item(i));e&&n.push(e)}return n}(this.tnt.childNodes)),this.$st}},{key:"m",get:function(){return this.eE.filter(Md)}},{key:"SD",get:function(){return this.tnt}}]),t}(),Ad=function(t){function n(n){return t.call(this,n)||this}Bt(n,t);var i=n.prototype;return i.tE=function(t){if(this.tnt.hasAttribute(t))return this.tnt.getAttribute(t)},i.iE=function(t,n){if(this.tnt.hasAttributeNS(t,n))return this.tnt.getAttributeNS(t,n)},i.VD=function(t){this.tnt.removeAttribute(t)},i.int=function(t,n){this.tnt.removeAttributeNS(t,n)},i.ent=function(t,n){this.tnt.setAttribute(t,n)},i.snt=function(t,n,i){this.tnt.setAttributeNS(t,n,i)},i.QD=function(t){return new n(this.tnt.cloneNode(t))},Dt(n,[{key:"BD",get:function(){return kd.OD}},{key:"KD",get:function(){var t;return null!=(t=this.tnt.localName)?t:Ld(this.tnt.nodeName)}},{key:"Kst",get:function(){var t;return null!=(t=this.tnt.namespaceURI)?t:void 0}},{key:"Jst",get:function(){var t;return null!=(t=this.tnt.prefix)?t:void 0}},{key:"UR",get:function(){return this.tnt.nodeName}},{key:"qD",get:function(){return function(t){for(var n=[],i=0;i<t.length;i++)n.push(new Nd(t.item(i)));return n}(this.tnt.attributes)}},{key:"LR",get:function(){return this.tnt.textContent}}]),n}(Pd),Dd=function(){function t(t){this.tnt=t}return t.prototype.jD=function(t){return this.xp===t.xp},Dt(t,[{key:"xp",get:function(){return this.tnt.nodeValue}},{key:"SD",get:function(){return this.tnt}}]),t}(),Cd=function(t){function n(n){return t.call(this,n)||this}return Bt(n,t),n.prototype.QD=function(t){return new n(this.tnt.cloneNode(t))},Dt(n,[{key:"BD",get:function(){return kd.vb}}]),n}(Dd),xd=function(t){function n(n){return t.call(this,n)||this}return Bt(n,t),n.prototype.QD=function(t){return new n(this.tnt.cloneNode(t))},Dt(n,[{key:"BD",get:function(){return kd.RD}}]),n}(Dd),Bd=function(t){function n(n){return t.call(this,n)||this}return Bt(n,t),n.prototype.QD=function(t){return new n(this.tnt.cloneNode(t))},Dt(n,[{key:"BD",get:function(){return kd.zD}},{key:"$D",get:function(){return new Ad(this.tnt.documentElement)}}]),n}(Pd);function Md(t){return function(t){return 1===t.BD}(t)}function Ud(t){switch(t.nodeType){case kd.OD:return new Ad(t);case kd.vb:return new Cd(t);case kd.RD:return new xd(t)}}function Ld(t){var n=t.indexOf(":");return n<0?t:t.substr(n+1)}var Fd=function(t){function n(){var n;return(n=t.apply(this,arguments)||this).nnt=void 0,n.ont=ld(),n.hnt=Zi.ZL||Zi.tL,n.ant=(Zi.ZL||Zi.yL&&Zi.uL<=68||Zi.tL)&&!(Zi.wL&&Zi.pL<3),n._nt=void 0,n.gnt=new Od,n}return Bt(n,t),n.prototype.JD=function(t){return this.gnt.JD(t)},Dt(n,[{key:"Mst",get:function(){return this.nnt||(this.nnt=new Qo(ch())),this.nnt}},{key:"rnt",get:function(){return this.ont}},{key:"M1",get:function(){return this.hnt}},{key:"B1",get:function(){return this.ant}},{key:"unt",get:function(){return!1}},{key:"Sz",get:function(){return vh.QF()}},{key:"cnt",get:function(){return{lnt:wh}}},{key:"dnt",get:function(){return v.connection&&v.connection.effectiveType||"default"}},{key:"fnt",get:function(){return v.connection&&v.connection.type||"unknown"}},{key:"QP",get:function(){return this._nt||(this._nt=new Jv(new Id)),this._nt}}]),n}(Ao);Ot(new Fd),Ot(new Fd);var zd=self;zd.addEventListener("install",(function(t){t.waitUntil(zd.skipWaiting())})),zd.addEventListener("activate",(function(t){t.waitUntil(zd.clients.claim())})),Li.CR.ur(zd)}("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof s?s:"undefined"!=typeof global?global:this);
|
|
30
|
+
!function(t){"use strict";var n,i,e,r,o,u,s,f,h,c=t.window,a=t.document,v=(t.location,t.navigator),d=t.setTimeout,l=t.clearTimeout,w=t.setInterval,b=t.clearInterval,g=t.Error,m=t.TypeError,p=(t.SyntaxError,t.Object),y=t.Math,_=t.parseInt,S=t.parseFloat,T=t.isNaN,E=t.Uint8Array,I=(t.Worker,t.WorkerGlobalScope,t.XMLHttpRequest);function k(t){return t&&void 0!==n&&t.constructor===n?"symbol":typeof t}"function"==typeof Symbol&&Symbol.iterator?(n=Symbol,i=null!=(u=Symbol.for)?u:Symbol,e=Symbol.iterator,r=null!=(s=Symbol.dispose)?s:i("Symbol.dispose"),o=null!=(f=Symbol.asyncDispose)?f:i("Symbol.asyncDispose")):(h=0,n=function(t){return"ul"+t+"_"+ ++h},e=(i=function(t){return"ul"+t})("Symbol.iterator"),r=i("Symbol.dispose"),o=i("Symbol.asyncDispose"),n.for=i,n.iterator=e,n.dispose=r,n.asyncDispose=o);var R=d;function O(t){return Boolean(t&&void 0!==t.length)}function N(){}function P(t){if(!(this instanceof P))throw new m("Promises must be constructed via new");if("function"!=typeof t)throw new m("not a function");this.Ea=0,this.ttn=!1,this.OTt=void 0,this.ntn=[],M(t,this)}function A(t,n){for(;3===t.Ea;)t=t.OTt;0!==t.Ea?(t.ttn=!0,P.itn((function(){var i=1===t.Ea?n.onFulfilled:n.onRejected;if(null!==i){var e;try{e=i(t.OTt)}catch(t){return void C(n.promise,t)}D(n.promise,e)}else(1===t.Ea?D:C)(n.promise,t.OTt)}))):t.ntn.push(n)}function D(t,n){try{if(n===t)throw new m("A promise cannot be resolved with itself.");if(n&&("object"===(void 0===n?"undefined":k(n))||"function"==typeof n)){var i=n.then;if(n instanceof P)return t.Ea=3,t.OTt=n,void x(t);if("function"==typeof i)return void M(function(t,n){return function(){t.apply(n,arguments)}}(i,n),t)}t.Ea=1,t.OTt=n,x(t)}catch(n){C(t,n)}}function C(t,n){t.Ea=2,t.OTt=n,x(t)}function x(t){2===t.Ea&&0===t.ntn.length&&P.itn((function(){t.ttn||P.rtn(t.OTt)}));for(var n=0,i=t.ntn.length;n<i;n++)A(t,t.ntn[n]);t.ntn=null}function B(t,n,i){this.onFulfilled="function"==typeof t?t:null,this.onRejected="function"==typeof n?n:null,this.promise=i}function M(t,n){var i=!1;try{t((function(t){i||(i=!0,D(n,t))}),(function(t){i||(i=!0,C(n,t))}))}catch(t){if(i)return;i=!0,C(n,t)}}P.prototype.catch=function(t){return this.then(null,t)},P.prototype.then=function(t,n){var i=new this.constructor(N);return A(this,new B(t,n,i)),i},P.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)}))}))},P.all=function(t){return new P((function(n,i){if(!O(t))return i(new m("Promise.all accepts an array"));var e=Array.prototype.slice.call(t);if(0===e.length)return n([]);var r=e.length;function o(t,u){try{if(u&&("object"===(void 0===u?"undefined":k(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])}))},P.allSettled=function(t){return new this((function(n,i){if(!t||void 0===t.length)return i(new m((void 0===t?"undefined":k(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":k(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])}))},P.resolve=function(t){return t&&"object"===(void 0===t?"undefined":k(t))&&t.constructor===P?t:new P((function(n){n(t)}))},P.reject=function(t){return new P((function(n,i){i(t)}))},P.race=function(t){return new P((function(n,i){if(!O(t))return i(new m("Promise.race accepts an array"));for(var e=0,r=t.length;e<r;e++)P.resolve(t[e]).then(n,i)}))},P.itn="function"==typeof setImmediate&&function(t){setImmediate(t)}||function(t){R(t,0)},P.rtn=function(t){"undefined"!=typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",t)};var U=function(){var t=self.Promise;if(void 0!==t)try{if(-1!==t.toString().indexOf("[native code]"))return t}catch(t){}}(),L=v?v.userAgent:"",F=L.match(/Firefox\/([0-9]+)/i),z=null!=F,W=F?Number(F[1]):0,H=L.match(/(Version)\/((\d+)\.(\d+)(?:\.(\d+))?).*Safari/),V=null!=H,q=H?Number(H[3]):0,X=function(){function t(t){this._A=0,this.sT=0,this.Hv=[],this.etn=t}return t.prototype.utn=function(t){var n=this.length();this.stn(n+1);var i=this.sT+n&this.etn-1;this.Hv[i]=t,this._A=n+1},t.prototype.push=function(t){var n=this.length()+1;if(this.etn<n)this.utn(t);else{var i=this.sT+n-1,e=this.etn-1;this.Hv[i&e]=t,this._A=n}},t.prototype.shift=function(){var t=this.sT,n=this.Hv[t];return this.Hv[t]=void 0,this.sT=t+1&this.etn-1,this._A--,n},t.prototype.length=function(){return this._A},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.sT+this._A&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.Hv,0,n,i)},t}();var j="unhandledrejection",Y=self.PromiseRejectionEvent,K=self.CustomEvent;function G(t){return new Y(j,{reason:t,promise:U.reject(t).catch((function(){})),cancelable:!0})}function $(t){var n=new K(j,{detail:{reason:t},cancelable:!0});return p.defineProperty(n,"reason",{value:t}),n}function Z(t){var n=a.createEvent("CustomEvent");return n.initCustomEvent(j,!1,!0,{reason:t}),n}var J,Q,tt,nt,it,et,rt,ot,ut=function(t){return ut=function(){try{var t=U.resolve(),n="error",i=new Y(j,{reason:n,promise:t});return j===i.type&&n===i.reason}catch(t){}return!1}()?G:function(){try{var t="error",n=new K(j,{detail:{reason:t}});return j===n.type&&t===n.detail.reason}catch(t){}return!1}()?$:Z,ut(t)};function st(t,n){return st=p.setPrototypeOf||function(t,n){return t.__proto__=n,t},st(t,n)}function ft(t,n){if("function"!=typeof n&&null!==n)throw new m("Super expression must either be null or a function");t.prototype=p.create(n&&n.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),n&&st(t,n)}function ht(t,n){for(var i=0;i<n.length;i++){var e=n[i];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),p.defineProperty(t,e.key,e)}}function ct(t,n,i){return n&&ht(t.prototype,n),i&&ht(t,i),t}U&&!(z&&W<60||V&&q<15)?Q=U:(Q=P,rt=null!==(J=function(){var t=self.queueMicrotask;if("function"==typeof t)return function(n){return t(n)};var n=U;if(n&&"function"==typeof n.resolve){var i=n.resolve();return function(t){return i.then(t)}}}())&&void 0!==J?J:P.itn,tt=rt,nt=new X(16),it=!1,(ot={o6:function(t){nt.push(t),it||(it=!0,tt(et))},rH:et=function(){for(;nt.length()>0;)nt.shift()();it=!1}}).rH,P.itn=ot.o6,P.rtn=function(t){try{var n=ut(t);if(!self.dispatchEvent(n)||n.defaultPrevented)return}catch(t){}d((function(){throw new g("Unhandled promise rejection: ".concat(t))}),0)});var at=function(t){return t.qf="web",t.Kf="android",t.Jf="android-tv",t.$f="ios",t.eg="tvos",t.rg="chromecast",t.og="theoliveweb",t}({});var vt=v?v.userAgent:"",dt=vt.match(/chrome\/([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)/i),lt=vt.match(/Edg\/([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)/i),wt=vt.match(/Android ([0-9\.]+)/i),bt=vt.match(/Windows NT ([0-9\.]+)/i),gt=vt.match(/(Version)\/((\d+)\.(\d+)(?:\.(\d+))?).*Safari/),mt=vt.match(/Firefox\/([0-9\.]+)/i),pt=vt.match(/OPR\/(\d+\.\d+)/i),yt=vt.match(/Tizen ([0-9\.]+)/i),_t=vt.match(/(iPhone OS|iPad OS|iPod OS|Mac OS X) (\d+)_(\d+)_?(\d+)?/),St=vt.match(/HbbTV\/([0-9.]+)/i),Tt=function(){function t(){this.hg=Boolean("ontouchstart"in self||self.DocumentTouch&&a instanceof self.DocumentTouch||v&&v.msMaxTouchPoints),this.cg=/(mac\sos\sx)\s?([\w\s\.]+\w)*/i.test(vt)||/(macintosh|mac(?=_powerpc)\s)/i.test(vt),this.fg=/Windows NT/i.test(vt),this._g=bt?S(bt[1]):0,this.wg=/Android/i.test(vt),this.Ag=wt?S(wt[1]):0,this.Mg=/windows phone (8|8\.1)/i.test(vt),this.Sg=/iPhone/i.test(vt),this.Ig=/iPad/i.test(vt),this.Eg=this.cg&&this.hg&&!this.Ig,this.xg=/iPod/i.test(vt),this.Bg=/Mobile Safari/i.test(vt),this.Pg=/EOS\d*STB/i.test(vt),this.zg=/APP\d*STB/i.test(vt),this.Cg=(this.Sg||this.Ig||this.Eg||this.xg)&&!this.Mg,this.Og=_t?S(_t[2]):0,this.Ug=this.Mg||this.Cg||this.wg||this.Bg,this.Fg=/CriOS/i.test(vt),this.Vg=Boolean(self.chrome&&/google/i.test(v.vendor))||this.Fg,this.Xg=this.Vg&&/Edg\//i.test(v.userAgent),this.Kg=lt?_(lt[1],10):0,this.q_=Boolean(/CriOS/i.test(vt)),this.X_=Boolean(self.chrome||/Chrome/i.test(vt)||this.q_),this.Zg=dt?_(dt[1],10):0,this.t_=/SMART-TV.*Tizen/i.test(vt),this.e_=yt?S(yt[1]):0,this.Wg=this.e_>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.e_):void 0,this.n_=/webos|web0s/i.test(vt),this.o_=/HbbTV/i.test(vt),this.a_=!!St&&function(t){if(!t)return!1;var n=t.split(".").map(Number);return 3===n.length&&1===n[0]&&2===n[1]}(St[1]),this.c_=/VIZIO/i.test(vt),this.d_=/Edge\/\d+/i.test(vt),this.g_=/Trident/i.test(vt),this.v_=this.g_&&!self.ActiveXObject&&"ActiveXObject"in self,this.m_=/Vivaldi/i.test(vt),this.A_=/Firefox/i.test(vt)&&!/Seamonkey/i.test(vt),this.b_=mt?S(mt[1]):0,this.T_=/Safari/i.test(vt)&&!/Chrome/i.test(vt)&&!this.Mg&&!this.t_,this.N_=gt?S(gt[2]):0,this.D_=Boolean(pt),this.k_=pt?S(pt[1]):0,this.x_=/CrKey/.test(vt),this.j_=/\b(tv|smart-tv|smarttv|appletv|crkey|googletv|hbbtv|pov_tv|roku|viera|nettv|philipstv|vizio)\b/i.test(vt),this.P_="web"===at.Jf,this.B_="web"===at.Kf,this.Q_=this.B_||this.P_,this.Y_="web"===at.$f,this.G_="web"===at.eg,this.Z_="web"===at.rg}return ct(t,[{key:"Je",get:function(){return this.hg}},{key:"ag",get:function(){return this.cg}},{key:"dg",get:function(){return this.fg}},{key:"gg",get:function(){return this._g}},{key:"vg",get:function(){return this.wg}},{key:"pg",get:function(){return this.Ag}},{key:"yg",get:function(){return this.Mg}},{key:"Tg",get:function(){return this.Sg}},{key:"Ng",get:function(){return this.Ig}},{key:"Dg",get:function(){return this.Eg}},{key:"Lg",get:function(){return this.xg}},{key:"Ka",get:function(){return this.Cg}},{key:"jg",get:function(){return this.Og}},{key:"Rg",get:function(){return this.Pg||this.zg}},{key:"nd",get:function(){return this.Bg}},{key:"Qs",get:function(){return this.Ug}},{key:"Qg",get:function(){return this.Fg}},{key:"Yg",get:function(){return this.Vg}},{key:"Gg",get:function(){var t;return null!=(t=this.Wg)?t:this.Zg}},{key:"Hg",get:function(){return this.Xg}},{key:"qg",get:function(){var t;return(null==(t=c.chrome)?void 0:t.webview)&&this.Kg>0}},{key:"Jg",get:function(){return this.Kg}},{key:"$g",get:function(){return this.t_}},{key:"i_",get:function(){return this.e_}},{key:"s_",get:function(){return this.n_}},{key:"r_",get:function(){return this.o_}},{key:"h_",get:function(){return this.a_}},{key:"u_",get:function(){return this.c_}},{key:"l_",get:function(){return this.d_}},{key:"f_",get:function(){return this.g_}},{key:"__",get:function(){return this.v_}},{key:"w_",get:function(){return this.m_}},{key:"p_",get:function(){return this.A_}},{key:"y_",get:function(){return this.b_}},{key:"M_",get:function(){return this.T_}},{key:"S_",get:function(){return this.N_}},{key:"I_",get:function(){return this.D_}},{key:"E_",get:function(){return this.k_}},{key:"L_",get:function(){return this.x_}},{key:"C_",get:function(){return this.j_}},{key:"O_",get:function(){return!(!this.s_&&!this.$g)&&this.Gg<=56}},{key:"R_",get:function(){return this.P_}},{key:"z_",get:function(){return this.B_}},{key:"U_",get:function(){return this.Q_}},{key:"F_",get:function(){return this.Y_}},{key:"V_",get:function(){return this.G_}},{key:"W_",get:function(){return this.Z_}},{key:"H_",get:function(){return this.X_}},{key:"IS_IOS_CHROME",get:function(){return this.q_}}]),t}();Tt.K_=new Tt;var Et=Tt.K_,It={}.toString;function kt(t){return null!=t}var Rt,Ot=Array.isArray||function(t){return"[object Array]"===It.call(t)};function Nt(t){return"object"===(void 0===t?"undefined":k(t))&&null!==t}function Pt(t){return"function"==typeof t}function At(t){return Pt(t)||Nt(t)}function Dt(t){Rt=t}var Ct=function(){};function xt(t){var n;return function(){return void 0!==t&&(n=t(),t=void 0),n}}function Bt(){return void 0!==a?a.createElement("video"):void 0}var Mt=xt(Bt),Ut=(xt((function(){return"undefined"!=typeof HTMLVideoElement&&Mt()instanceof HTMLVideoElement})),null);try{Ut=new WebAssembly.Instance(new WebAssembly.Module(new E([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(tt){}function Lt(t,n,i){this.low=0|t,this.high=0|n,this.unsigned=!!i}function Ft(t){return!0===(t&&t.hv)}function zt(t){var n=y.clz32(t&-t);return t?31-n:n}Lt.prototype.hv,p.defineProperty(Lt.prototype,"hv",{value:!0}),Lt.isLong=Ft;var Wt={},Ht={};function Vt(t,n){var i,e,r;return n?(r=0<=(t>>>=0)&&t<256)&&(e=Ht[t])?e:(i=Xt(t,0,!0),r&&(Ht[t]=i),i):(r=-128<=(t|=0)&&t<128)&&(e=Wt[t])?e:(i=Xt(t,t<0?-1:0,!1),r&&(Wt[t]=i),i)}function qt(t,n){if(T(t))return n?tn:Qt;if(n){if(t<0)return tn;if(t>=$t)return un}else{if(t<=-Zt)return sn;if(t+1>=Zt)return on}return t<0?qt(-t,n).neg():Xt(t%Gt|0,t/Gt|0,n)}function Xt(t,n,i){return new Lt(t,n,i)}Lt.fromInt=Vt,Lt.fromNumber=qt,Lt.fromBits=Xt;var jt=y.pow;function Yt(t,n,i){if(0===t.length)throw g("empty string");if("number"==typeof n?(i=n,n=!1):n=!!n,"NaN"===t||"Infinity"===t||"+Infinity"===t||"-Infinity"===t)return n?tn:Qt;if((i=i||10)<2||36<i)throw RangeError("radix");var e;if((e=t.indexOf("-"))>0)throw g("interior hyphen");if(0===e)return Yt(t.substring(1),n,i).neg();for(var r=qt(jt(i,8)),o=Qt,u=0;u<t.length;u+=8){var s=y.min(8,t.length-u),f=_(t.substring(u,u+s),i);if(s<8){var h=qt(jt(i,s));o=o.mul(h).add(qt(f))}else o=(o=o.mul(r)).add(qt(f))}return o.unsigned=n,o}function Kt(t,n){return"number"==typeof t?qt(t,n):"string"==typeof t?Yt(t,n):Xt(t.low,t.high,"boolean"==typeof n?n:t.unsigned)}Lt.fromString=Yt,Lt.fromValue=Kt;var Gt=4294967296,$t=Gt*Gt,Zt=$t/2,Jt=Vt(1<<24),Qt=Vt(0);Lt.ZERO=Qt;var tn=Vt(0,!0);Lt.UZERO=tn;var nn=Vt(1);Lt.ONE=nn;var en=Vt(1,!0);Lt.UONE=en;var rn=Vt(-1);Lt.NEG_ONE=rn;var on=Xt(-1,2147483647,!1);Lt.MAX_VALUE=on;var un=Xt(-1,-1,!0);Lt.MAX_UNSIGNED_VALUE=un;var sn=Xt(0,-2147483648,!1);Lt.MIN_VALUE=sn;var fn=Lt.prototype;fn.toInt=function(){return this.unsigned?this.low>>>0:this.low},fn.toNumber=function(){return this.unsigned?(this.high>>>0)*Gt+(this.low>>>0):this.high*Gt+(this.low>>>0)},fn.toString=function(t){if((t=t||10)<2||36<t)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative()){if(this.eq(sn)){var n=qt(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=qt(jt(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}},fn.getHighBits=function(){return this.high},fn.getHighBitsUnsigned=function(){return this.high>>>0},fn.getLowBits=function(){return this.low},fn.getLowBitsUnsigned=function(){return this.low>>>0},fn.getNumBitsAbs=function(){if(this.isNegative())return this.eq(sn)?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},fn.isZero=function(){return 0===this.high&&0===this.low},fn.eqz=fn.isZero,fn.isNegative=function(){return!this.unsigned&&this.high<0},fn.isPositive=function(){return this.unsigned||this.high>=0},fn.isOdd=function(){return 1==(1&this.low)},fn.isEven=function(){return 0==(1&this.low)},fn.equals=function(t){return Ft(t)||(t=Kt(t)),(this.unsigned===t.unsigned||this.high>>>31!=1||t.high>>>31!=1)&&(this.high===t.high&&this.low===t.low)},fn.eq=fn.equals,fn.notEquals=function(t){return!this.eq(t)},fn.neq=fn.notEquals,fn.ne=fn.notEquals,fn.lessThan=function(t){return this.comp(t)<0},fn.lt=fn.lessThan,fn.lessThanOrEqual=function(t){return this.comp(t)<=0},fn.lte=fn.lessThanOrEqual,fn.le=fn.lessThanOrEqual,fn.greaterThan=function(t){return this.comp(t)>0},fn.gt=fn.greaterThan,fn.greaterThanOrEqual=function(t){return this.comp(t)>=0},fn.gte=fn.greaterThanOrEqual,fn.ge=fn.greaterThanOrEqual,fn.compare=function(t){if(Ft(t)||(t=Kt(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},fn.comp=fn.compare,fn.negate=function(){return!this.unsigned&&this.eq(sn)?sn:this.not().add(nn)},fn.neg=fn.negate,fn.add=function(t){Ft(t)||(t=Kt(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,Xt((c&=65535)<<16|(a&=65535),(f&=65535)<<16|(h&=65535),this.unsigned)},fn.subtract=function(t){return Ft(t)||(t=Kt(t)),this.add(t.neg())},fn.sub=fn.subtract,fn.multiply=function(t){if(this.isZero())return this;if(Ft(t)||(t=Kt(t)),Ut)return Xt(Ut.mul(this.low,this.high,t.low,t.high),Ut.get_high(),this.unsigned);if(t.isZero())return this.unsigned?tn:Qt;if(this.eq(sn))return t.isOdd()?sn:Qt;if(t.eq(sn))return this.isOdd()?sn:Qt;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(Jt)&&t.lt(Jt))return qt(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,Xt((a&=65535)<<16|(v&=65535),(h&=65535)<<16|(c&=65535),this.unsigned)},fn.mul=fn.multiply,fn.divide=function(t){if(Ft(t)||(t=Kt(t)),t.isZero())throw g("division by zero");var n,i,e;if(Ut)return this.unsigned||-2147483648!==this.high||-1!==t.low||-1!==t.high?Xt((this.unsigned?Ut.div_u:Ut.div_s)(this.low,this.high,t.low,t.high),Ut.get_high(),this.unsigned):this;if(this.isZero())return this.unsigned?tn:Qt;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return tn;if(t.gt(this.shru(1)))return en;e=tn}else{if(this.eq(sn))return t.eq(nn)||t.eq(rn)?sn:t.eq(sn)?nn:(n=this.shr(1).div(t).shl(1)).eq(Qt)?t.isNegative()?nn:rn:(i=this.sub(t.mul(n)),e=n.add(i.div(t)));if(t.eq(sn))return this.unsigned?tn:Qt;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=Qt}for(i=this;i.gte(t);){n=y.max(1,y.floor(i.toNumber()/t.toNumber()));for(var r=y.ceil(y.log(n)/y.LN2),o=r<=48?1:jt(2,r-48),u=qt(n),s=u.mul(t);s.isNegative()||s.gt(i);)s=(u=qt(n-=o,this.unsigned)).mul(t);u.isZero()&&(u=nn),e=e.add(u),i=i.sub(s)}return e},fn.div=fn.divide,fn.modulo=function(t){return Ft(t)||(t=Kt(t)),Ut?Xt((this.unsigned?Ut.rem_u:Ut.rem_s)(this.low,this.high,t.low,t.high),Ut.get_high(),this.unsigned):this.sub(this.div(t).mul(t))},fn.mod=fn.modulo,fn.rem=fn.modulo,fn.not=function(){return Xt(~this.low,~this.high,this.unsigned)},fn.countLeadingZeros=function(){return this.high?y.clz32(this.high):y.clz32(this.low)+32},fn.clz=fn.countLeadingZeros,fn.countTrailingZeros=function(){return this.low?zt(this.low):zt(this.high)+32},fn.ctz=fn.countTrailingZeros,fn.and=function(t){return Ft(t)||(t=Kt(t)),Xt(this.low&t.low,this.high&t.high,this.unsigned)},fn.or=function(t){return Ft(t)||(t=Kt(t)),Xt(this.low|t.low,this.high|t.high,this.unsigned)},fn.xor=function(t){return Ft(t)||(t=Kt(t)),Xt(this.low^t.low,this.high^t.high,this.unsigned)},fn.shiftLeft=function(t){return Ft(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?Xt(this.low<<t,this.high<<t|this.low>>>32-t,this.unsigned):Xt(0,this.low<<t-32,this.unsigned)},fn.shl=fn.shiftLeft,fn.shiftRight=function(t){return Ft(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?Xt(this.low>>>t|this.high<<32-t,this.high>>t,this.unsigned):Xt(this.high>>t-32,this.high>=0?0:-1,this.unsigned)},fn.shr=fn.shiftRight,fn.shiftRightUnsigned=function(t){return Ft(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?Xt(this.low>>>t|this.high<<32-t,this.high>>>t,this.unsigned):Xt(32===t?this.high:this.high>>>t-32,0,this.unsigned)},fn.shru=fn.shiftRightUnsigned,fn.shr_u=fn.shiftRightUnsigned,fn.rotateLeft=function(t){var n;return Ft(t)&&(t=t.toInt()),0==(t&=63)?this:32===t?Xt(this.high,this.low,this.unsigned):t<32?(n=32-t,Xt(this.low<<t|this.high>>>n,this.high<<t|this.low>>>n,this.unsigned)):(n=32-(t-=32),Xt(this.high<<t|this.low>>>n,this.low<<t|this.high>>>n,this.unsigned))},fn.rotl=fn.rotateLeft,fn.rotateRight=function(t){var n;return Ft(t)&&(t=t.toInt()),0==(t&=63)?this:32===t?Xt(this.high,this.low,this.unsigned):t<32?(n=32-t,Xt(this.high<<n|this.low>>>t,this.low<<n|this.high>>>t,this.unsigned)):(n=32-(t-=32),Xt(this.low<<n|this.high>>>t,this.high<<n|this.low>>>t,this.unsigned))},fn.rotr=fn.rotateRight,fn.toSigned=function(){return this.unsigned?Xt(this.low,this.high,!1):this},fn.toUnsigned=function(){return this.unsigned?this:Xt(this.low,this.high,!0)},fn.toBytes=function(t){return t?this.toBytesLE():this.toBytesBE()},fn.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]},fn.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]},Lt.fromBytes=function(t,n,i){return i?Lt.fromBytesLE(t,n):Lt.fromBytesBE(t,n)},Lt.fromBytesLE=function(t,n){return new Lt(t[0]|t[1]<<8|t[2]<<16|t[3]<<24,t[4]|t[5]<<8|t[6]<<16|t[7]<<24,n)},Lt.fromBytesBE=function(t,n){return new Lt(t[4]<<24|t[5]<<16|t[6]<<8|t[7],t[0]<<24|t[1]<<16|t[2]<<8|t[3],n)};var hn=Lt,cn=9007199254740991;y.pow(2,-52);function an(){return Date.now()||(new Date).getTime()}hn.fromNumber(cn);var vn=!!("ontouchstart"in self||self.DocumentTouch&&a instanceof self.DocumentTouch)||!(!v||!v.msMaxTouchPoints),dn=Mt(),ln=!(!dn||!dn.webkitShowPlaybackTargetPicker),wn=function(){function t(){this.fv=void 0,this.zv=!1,this.Je=vn,this.Qs=!1,this.Bv=!0}var n=t.prototype;return n._v=function(){return 0},n.Rv=function(t,n){return!0},n.Pv=function(t){return t>=.3333333333333333},ct(t,[{key:"uv",get:function(){return void 0===this.fv&&(this.fv=this._v()),this.fv}},{key:"vv",get:function(){return!Et.C_}},{key:"mv",get:function(){if(c.screen)return{width:c.screen.width,height:c.screen.height}}},{key:"pv",get:function(){return c.devicePixelRatio||1}},{key:"Av",get:function(){return ln}},{key:"yv",get:function(){return!1}},{key:"bv",get:function(){return!0}},{key:"Mv",get:function(){return!(!Et.M_&&!Et.Ka)||!!Et.u_}},{key:"Tv",get:function(){return Et.u_}},{key:"Sv",get:function(){return!Et.Ka}},{key:"Nv",get:function(){return!0}},{key:"Iv",get:function(){return!0}},{key:"Dv",get:function(){return!1}},{key:"Ev",get:function(){}},{key:"Lv",get:function(){return!0}},{key:"xv",get:function(){return!1}},{key:"Cv",get:function(){return Et.u_}},{key:"Ov",get:function(){return!1}}]),t}(),bn=function(t){function n(){return t.call(this)||this}return ft(n,t),n}(wn),gn=function(t){function n(){return t.apply(this,arguments)||this}return ft(n,t),n.prototype.Rv=function(t,n){if(t&&t.Uv&&n&&n.Uv){var i=mn(t.Uv,"mp4a.40.2")&&mn(n.Uv,"mp4a.40.5"),e=mn(t.Uv,"mp4a.40.5")&&mn(n.Uv,"mp4a.40.2"),r=mn(t.Uv,"mp4a.40.2")&&mn(n.Uv,"mp4a.40.34"),o=mn(t.Uv,"mp4a.40.34")&&mn(n.Uv,"mp4a.40.2"),u=mn(t.Uv,"mp4a.40.5")&&mn(n.Uv,"mp4a.40.34"),s=mn(t.Uv,"mp4a.40.34")&&mn(n.Uv,"mp4a.40.5");return!(i||e||r||o||u||s)}return!0},ct(n,[{key:"Ev",get:function(){if(Et.ag)return 4096}}]),n}(bn);function mn(t,n){return t.indexOf(n)>-1}var pn,yn=function(t){function n(){return t.apply(this,arguments)||this}return ft(n,t),n.prototype.Pv=function(t){return t>=2},n}(bn),_n=function(t){function n(){var n;return(n=t.call(this)||this).zv=Et.S_>=11,n.Bv=Et.M_&&!(Et.Ka&&Et.S_<10),n}return ft(n,t),ct(n,[{key:"Ov",get:function(){return Et.S_<17}}]),n}(bn),Sn=function(t){function n(){return t.apply(this,arguments)||this}return ft(n,t),ct(n,[{key:"Lv",get:function(){return!Et.dg||(Et.Hg?92!==Et.Jg:Et.Gg>=100)}}]),n}(bn);var Tn=function(){var t=Bt();if(!t)return!1;var n=t.muted;return t.muted=!n,t.muted!==n}();!function(){if(Et.Dg)return!1;var t=Bt();if(!t)return!1;var n=t.volume;t.volume=n/2+.1,t.volume}();var En,In=function(t){function n(n){var i;return(i=t.call(this)||this).Qv=n,i.zv=i.Qv.zv,i.Je=i.Qv.Je,i.Bv=Tn&&i.Qv.Bv,i}ft(n,t);var i=n.prototype;return i._v=function(){return this.Qv.uv},i.Rv=function(t,n){return this.Qv.Rv(t,n)},i.Pv=function(t){return this.Qv.Pv(t)},ct(n,[{key:"Ev",get:function(){return this.Qv.Ev}},{key:"Lv",get:function(){return this.Qv.Lv}},{key:"Ov",get:function(){return this.Qv.Ov}}]),n}(wn),kn=function(t){function n(n){var i;return(i=t.call(this,n)||this).zv=!0,i.Qs=!0,i}return ft(n,t),ct(n,[{key:"Dv",get:function(){return Et.Ka}}]),n}(In);var Rn=function(t){function n(){return t.apply(this,arguments)||this}return ft(n,t),n.prototype._v=function(){return function(t){return t&&At(En.ManagedMediaSource)?En.ManagedMediaSource:At(En.MediaSource)?En.MediaSource:void 0}(!0)?t.prototype._v.call(this):1},ct(n,[{key:"Dv",get:function(){return!0}}]),n}(kn),On=function(t){function n(){return t.apply(this,arguments)||this}return ft(n,t),n.prototype.Rv=function(n,i){return t.prototype.Rv.call(this,n,i)},ct(n,[{key:"yv",get:function(){return Et.i_<3}},{key:"bv",get:function(){return Et.i_>=3}},{key:"mv",get:function(){var t=this;return c.tizen&&!this.Gv&&c.tizen.systeminfo.getPropertyValue("DISPLAY",(function(n){var i=n.resolutionWidth,e=n.resolutionHeight;1===i&&1===e||(t.Gv={width:i,height:e})})),this.Gv}},{key:"xv",get:function(){return Et.i_<3}}]),n}(In),Nn=function(t){function n(){return t.apply(this,arguments)||this}return ft(n,t),ct(n,[{key:"mv",get:function(){var t=this;return c.webOS&&!this.Gv&&c.webOS.deviceInfo((function(n){t.Gv={width:n.screenWidth,height:n.screenHeight}})),this.Gv}},{key:"Nv",get:function(){return!1}}]),n}(In),Pn=function(t){function n(){return t.apply(this,arguments)||this}return ft(n,t),ct(n,[{key:"Dv",get:function(){return!0}}]),n}(In);function An(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 Dn(t,n){if(t){if("string"==typeof t)return An(t,n);var i=p.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(i):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?An(t,n):void 0}}function Cn(t){return function(t){if(Array.isArray(t))return An(t)}(t)||function(t){if(void 0!==n&&null!=t[e]||null!=t["@@iterator"])return Array.from(t)}(t)||Dn(t)||function(){throw new m("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}!function(t){pn=t}(function(){var t=function(){if(Et.p_)return new gn;if(Et.l_||Et.f_)return new yn;if(Et.M_)return new _n;if(Et.Yg)return new Sn;return new bn}();return Et.Ka?new Rn(t):Et.Qs?new kn(t):Et.$g?new On(t):Et.s_?new Nn(t):Et.ag?new Pn(t):new In(t)}());var xn=!(Et.f_&&!Et.__),Bn=self.console;function Mn(t){if(Nt(t))try{return JSON.stringify(t)}catch(t){}return t}function Un(t){return t.map(Mn).join(" ")}function Ln(t){var n=Bn&&Bn[t];return n?n.bind&&xn?n.bind(Bn):function(){for(var n=arguments.length,i=new Array(n),e=0;e<n;e++)i[e]=arguments[e];Bn[t](Un(i))}:void 0}var Fn=Ln("log")||Ct,zn=Ln("warn")||Fn.bind(void 0,"WARNING:"),Wn=Ln("error")||Fn.bind(void 0,"ERROR:"),Hn=function(){var t=Bn&&Bn.assert;return t?t.bind&&xn?t.bind(Bn):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];Bn.assert(t,Un(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||Wn.apply(void 0,["Assertion failed:"].concat(Cn(i)))}}();function Vn(t,n){for(var i=0;i<n.length;i++){var e=n[i];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),p.defineProperty(t,e.key,e)}}function qn(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){Xn(t,n,r,e);var o=t;t=e,e=o}return t}(t,n);return i!==t&&Xn(i,null,t.length,t),t}function Xn(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 jn=/[a-zA-Z]/,Yn=/[0-9]/,Kn=/[0-9a-fA-F]/,Gn=/^0x/i,$n=/^[0-9]+$/,Zn=/^[0-9a-fA-F]+$/,Jn=/^[0-7]+$/,Qn=p.prototype.toString,ti=Array.isArray||function(t){return"[object Array]"===Qn.call(t)},ni=void 0!==n&&"symbol"==typeof e;function ii(t){return ti(t)?t:Array.from(t)}function ei(t,n,i){var e=t[n];t[n]=t[i],t[i]=e}function ri(t){return t>=65&&t<=90}function oi(t){return ri(t)||function(t){return t>=97&&t<=122}(t)}function ui(t){return t>=48&&t<=57}function si(t){return ui(t)||oi(t)}function fi(t){return ui(t)||t>=65&&t<=70||t>=97&&t<=102}function hi(t){return ri(t)?t+32:t}function ci(t){return ui(t)?t-48:t>=65&&t<=70?t-65+10:t>=97&&t<=102?t-97+10:-1}function ai(t,n){return void 0===n&&(n=!1),0<=t&&t<=9?t+48:10<=t&&t<=15?t+(n?87:55):-1}var vi=y.min,di=String.fromCharCode,li=16384;function wi(t){for(var n=t.length,i=[],e=0;e<n;e+=li){var r=vi(e+li,n);i.push(di.apply(null,t.slice(e,r)))}return i.join("")}var bi=2147483647,gi=/[^\0-\x7E]/,mi=/[\x2E\u3002\uFF0E\uFF61]/g,pi={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},yi=y.floor,_i=String.fromCharCode;function Si(t){throw new RangeError(pi[t])}function Ti(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 Ei,Ii,ki,Ri=function(t,n){return t+22+75*(t<26)-((0!=n)<<5)},Oi=function(t,n,i){var e=0;for(t=i?yi(t/700):t>>1,t+=yi(t/n);t>455;e+=36)t=yi(t/35);return yi(e+36*t/(t+38))},Ni=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(mi,".")).split("."),n).join(".");return e+r}(t,(function(t){return gi.test(t)?"xn--"+function(t){for(var n=[],i=(t=Ti(t)).length,e=128,r=0,o=72,u=0,s=t;u<s.length;u++){var f=s[u];f<128&&n.push(_i(f))}var h=n.length,c=h;for(h&&n.push("-");c<i;){for(var a=bi,v=0,d=t;v<d.length;v++){var l=d[v];l>=e&&l<a&&(a=l)}var w=c+1;a-e>yi((bi-r)/w)&&Si("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>bi&&Si("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(_i(Ri(_+S%T,0))),p=yi(S/T)}n.push(_i(Ri(p,0))),o=Oi(r,w,c==h),r=0,++c}}++r,++e}return n.join("")}(t):t}))};function Pi(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 wi(n)}function Ai(t){if(t>=55296&&t<=57343)throw new g("Lone surrogate U+"+t.toString(16).toUpperCase()+" is not a scalar value")}function Di(t,n){return t>>n&63|128}function Ci(t,n){0!=(4294967168&t)?(0==(4294965248&t)?n.push(t>>6&31|192):0==(4294901760&t)?(Ai(t),n.push(t>>12&15|224),n.push(Di(t,6))):0==(4292870144&t)&&(n.push(t>>18&7|240),n.push(Di(t,12)),n.push(Di(t,6))),n.push(63&t|128)):n.push(t)}function xi(t){for(var n=[],i=0;i<t.length;i++){Ci(t[i],n)}return n}function Bi(){if(ki>=Ii)throw new g("Invalid byte index");var t=255&Ei[ki];if(ki++,128==(192&t))return 63&t;throw new g("Invalid continuation byte")}function Mi(){var t,n;if(ki>Ii)throw new g("Invalid byte index");if(ki===Ii)return!1;if(t=255&Ei[ki],ki++,0==(128&t))return t;if(192==(224&t)){if((n=(31&t)<<6|Bi())>=128)return n;throw new g("Invalid continuation byte")}if(224==(240&t)){if((n=(15&t)<<12|Bi()<<6|Bi())>=2048)return Ai(n),n;throw new g("Invalid continuation byte")}if(240==(248&t)&&(n=(7&t)<<18|Bi()<<12|Bi()<<6|Bi())>=65536&&n<=1114111)return n;throw new g("Invalid UTF-8 detected")}function Ui(t){return[37,ai(t>>4),ai(15&t)]}function Li(t){return function(t){return t>=0&&t<=31}(t)||t>126}function Fi(t){return Li(t)||32===t||34===t||60===t||62===t||96===t}function zi(t){return Fi(t)||35===t||63===t||123===t||125===t}function Wi(t){return zi(t)||47===t||58===t||59===t||61===t||64===t||t>=91&&t<=94||124===t}function Hi(t){return t<33||t>126||34===t||35===t||60===t||62===t}function Vi(t){return Hi(t)||39===t}function qi(t,n){if(!n(t))return[t];for(var i=xi([t]),e=[],r=0;r<i.length;r++){var o=i[r];e.push.apply(e,Ui(o))}return e}function Xi(t,n){for(var i=[],e=0,r=Ti(t);e<r.length;e++){var o=r[e];i.push.apply(i,qi(o,n))}return Pi(i)}function ji(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&&fi(t[e+1])&&fi(t[e+2])){var o=ci(t[e+1])<<4|ci(t[e+2]);n.push(o),e+=2}else n.push(r)}return n}(xi(t))}function Yi(t){return Pi(function(t){Ei=t.slice(),Ii=Ei.length,ki=0;for(var n,i=[];!1!==(n=Mi());)i.push(n);return i}(ji(Ti(t))))}function Ki(t){var n=t.length,i=[0,0,0,0,0,0,0,0],e=0,r=null,o=0;if(o<n&&":"===t[o]){if(!(o+1<n&&":"===t[o+1]))throw new m;o+=2,r=e+=1}for(;o<n;){if(8===e)throw new m("Too many groups");if(":"!==t[o]){for(var u=0,s=0;s<4&&o<n&&Kn.test(t[o]);)u=u<<4|_(t[o],16),o+=1,s+=1;if("."===t[o]){if(0===s)throw new m;if(o-=s,e>6)throw new m;for(var f=0;o<n;){var h=null;if(f>0){if(!("."===t[o]&&f<4))throw new m;o+=1}if(!Yn.test(t[o]))throw new m;for(;o<n&&Yn.test(t[o]);){var c=_(t[o],10);if(null===h)h=c;else{if(0===h)throw new m;if((h=10*h+c)>255)throw new m}o+=1}i[e]=i[e]<<8|h,2!==(f+=1)&&4!==f||(e+=1)}if(4!==f)throw new m;break}if(":"===t[o]){if((o+=1)===n)throw new m}else if(o<n)throw new m;i[e]=u,e+=1}else{if(null!==r)throw new m("Too many :: groups");o+=1,r=e+=1}}if(null!==r){var a=e-r;for(e=7;0!==e&&a>0;)ei(i,e,r+a-1),e-=1,a-=1}else if(8!==e)throw new m;return i}function Gi(t){var n=10,i=$n;return Gn.test(t)?(t=t.slice(2),n=16,i=Zn):t.length>=2&&"0"===t[0]&&(t=t.slice(1),n=8,i=Jn),""===t?0:i.test(t)?_(t,n):void 0}var $i={Wv:4},Zi=/[\0\t\n\r #%/:?@\[\\\]]/,Ji=/[\0\t\n\r #/:?@\[\\\]]/;function Qi(t,n){if("["===t[0]){if("]"!==t[t.length-1])throw new m("Invalid IPv6 address");return{Wv:2,Zv:Ki(t.slice(1,-1))}}if(!n)return function(t){if(Ji.test(t))throw new m("Invalid code point in opaque host");var n=Xi(t,Li);return""===n?$i:{Wv:3,Hv:n}}(t);var i=function(t){var n=function(t){return Ni(t.toLowerCase())}(t);return n}(Yi(t));if(Zi.test(i))throw new m("Invalid code point in host");var e=function(t){var n=t.split(".");if(""===n[n.length-1]&&n.pop(),!(n.length>4)){for(var i=[],e=0;e<n.length;e++){var r=n[e];if(""===r)return;var o=Gi(r);if(void 0===o)return;i.push(o)}for(var u=0;u<i.length-1;u++)if(i[u]>255)throw new m;if(i[i.length-1]>=y.pow(256,5-i.length))throw new m;for(var s=i.pop(),f=0;f<i.length;f++)s+=i[f]*y.pow(256,3-f);return s}}(i);return void 0!==e?{Wv:1,Zv:e}:""===i?$i:{Wv:0,Xv:i}}function te(t){switch(t.Wv){case 0:return t.Xv;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.Zv);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.Zv)+"]";case 3:return t.Hv;case 4:return""}}var ne=/\+/g;function ie(t){return 42===t||45===t||46===t||95===t||si(t)}function ee(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(ne," "),s=s.replace(ne," ");var f=Yi(u),h=Yi(s);i.push([f,h])}}return i}function re(t){for(var n="",i=0;i<t.length;i++){var e=t[i];i>0&&(n+="&"),n+=oe(xi(Ti(e[0])))+"="+oe(xi(Ti(e[1])))}return n}function oe(t){for(var n=[],i=0;i<t.length;i++){var e=t[i];32===e?n.push(43):ie(e)?n.push(e):n.push.apply(n,Ui(e))}return wi(n)}var ue=/(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])/;function se(t){var n=""+t,i=ue.exec(n);return i?function(t,n){for(var i=t.length,e=[],r=n;r<i;r++){var o=t.charCodeAt(r);if(he(o))if(ce(o)||r===i-1)e.push(fe);else{var u=t.charCodeAt(r+1);ce(u)?(e.push(o,u),r++):e.push(fe)}else e.push(o)}return t.slice(0,n)+wi(e)}(n,i.index):n}var fe=65533,he=function(t){return 55296==(63488&t)},ce=function(t){return 0!=(1024&t)};function ae(t,n){var i=t[0],e=n[0];return i===e?0:i<e?-1:1}function ve(t){t.vf.length=0}function de(t,n){!function(t,n){for(var i=0;i<n.length;i++)t[i]=n[i];t.length=n.length}(t.vf,ee(n))}function le(t){if(t.Yu){var n=re(t.vf);""===n&&(n=null),t.Yu.Yu.qv=n}}var we=function(){function t(t){if(void 0===t&&(t=void 0),this.Yu=null,null==t)this.vf=[];else if("object"==typeof t||"function"==typeof t)if(function(t){return t instanceof we&&!!ti(t.vf)&&(!ni||t[e]===be)}(t))this.vf=t.vf.slice();else if(function(t){return null!=t&&(!!ti(t)||!!ni&&"function"==typeof t[e])}(t)){this.vf=[];for(var n=0,i=ii(t);n<i.length;n++){var r=ii(i[n]);if(2!==r.length)throw new m("Invalid name-value pair");this.vf.push([se(r[0]),se(r[1])])}}else for(var o in this.vf=[],t)p.prototype.hasOwnProperty.call(t,o)&&this.vf.push([se(o),se(t[o])]);else(t=se(t)).length>0&&"?"===t[0]&&(t=t.slice(1)),this.vf=ee(t)}var n=t.prototype;return n.append=function(t,n){t=se(t),n=se(n),this.vf.push([t,n]),le(this)},n.delete=function(t){t=se(t);for(var n=this.vf,i=0;i<n.length;){n[i][0]===t?n.splice(i,1):i++}le(this)},n.get=function(t){t=se(t);for(var n=this.vf,i=0;i<n.length;i++){var e=n[i];if(e[0]===t)return e[1]}return null},n.getAll=function(t){t=se(t);for(var n=this.vf,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=se(t);for(var n=this.vf,i=0;i<n.length;i++){if(n[i][0]===t)return!0}return!1},n.set=function(t,n){t=se(t),n=se(n);for(var i=this.vf,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]),le(this)},n.sort=function(){qn(this.vf,ae),le(this)},n.toString=function(){return re(this.vf)},n.entries=function(){return new ye(this.vf,ge)},n.keys=function(){return new ye(this.vf,me)},n.values=function(){return new ye(this.vf,pe)},n.forEach=function(t){var n=this;this.vf.forEach((function(i){return t(i[1],i[0],n)}))},t}(),be=we.prototype.entries;ni&&(we.prototype[e]=be);var ge=function(t){return[t[0],t[1]]},me=function(t){return t[0]},pe=function(t){return t[1]},ye=function(){function t(t,n){this.Kv=0,this.vf=t,this.Jv=n}return t.prototype.next=function(){return this.Kv<this.vf.length?{done:!1,value:this.Jv(this.vf[this.Kv++])}:{done:!0,value:void 0}},t}(),_e="null";var Se=p.create(null);Se.ftp=21,Se.file=0,Se.gopher=70,Se.http=80,Se.https=443,Se.ws=80,Se.wss=443;var Te=/^(?:\.|%2e)$/i,Ee=/^(?:\.|%2e){2}$/i;function Ie(t){return Te.test(t)}function ke(t){return Ee.test(t)}function Re(t){return void 0!==Se[t]}function Oe(t){return Re(t.$v)}function Ne(t){return""!==t.iw||""!==t.ew}function Pe(t){var n=t.length;if(!(n>=2))return!1;if(!De(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 Ae(t){return 2===t.length&&jn.test(t[0])&&(":"===t[1]||"|"===t[1])}function De(t){return 2===t.length&&Ae(wi(t))}function Ce(t){return Ae(t)&&":"===t[1]}function xe(t){var n=t.nw;0!==n.length&&("file"===t.$v&&1===n.length&&Ce(n[0])||n.pop())}function Be(t){return null===t.ow||$i===t.ow||t.hw||"file"===t.$v}var Me=-1,Ue=/\t|\n|\r/g,Le=/^[\x00-\x1f ]+|[\x00-\x1f ]+$/g;function Fe(t,n,i,e){void 0===i&&(i=null),void 0===e&&(e=null),i||(i=new We,t=t.replace(Le,""));var r=null!==e?e:0;n=n||null;for(var o=[],u=!1,s=!1,f=!1,h=Ti(t=t.replace(Ue,"")),c=h.length,a=0;a<=c;){var v=a<c?h[a]:Me;switch(r){case 0:if(!oi(v)){if(null===e){o.length=0,r=2;continue}throw new m("Invalid scheme")}o.push(hi(v)),r=1;break;case 1:if(si(v)||43===v||45===v||46===v)o.push(hi(v));else{if(58!==v){if(null===e){o.length=0,r=2,a=0;continue}throw new m("Invalid scheme")}var d=Pi(o);if(null!==e){if(Re(i.$v)&&!Re(d))return;if(!Re(i.$v)&&Re(d))return;if((Ne(i)||null!==i.aw)&&"file"===d)return;if("file"===i.$v&&(i.ow===$i||null===i.ow))return}if(i.$v=d,null!==e)return void(Oe(i)&&i.aw===Se[i.$v]&&(i.aw=null));o.length=0,"file"===i.$v?r=13:Oe(i)&&n&&n.$v===i.$v?r=3:Oe(i)?r=7:47===h[a+1]?(r=4,a+=1):(i.hw=!0,i.nw.push(""),r=18)}break;case 2:if(!n||n.hw&&35!==v)throw new m("Invalid scheme");n.hw&&35===v?(i.$v=n.$v,i.nw=n.nw.slice(),i.qv=n.qv,i.uw="",i.hw=!0,r=20):"file"!==n.$v?(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.$v=n.$v,Me===v?(i.iw=n.iw,i.ew=n.ew,i.ow=n.ow,i.aw=n.aw,i.nw=n.nw.slice(),i.qv=n.qv):47===v?r=6:63===v?(i.iw=n.iw,i.ew=n.ew,i.ow=n.ow,i.aw=n.aw,i.nw=n.nw.slice(),i.qv="",r=19):35===v?(i.iw=n.iw,i.ew=n.ew,i.ow=n.ow,i.aw=n.aw,i.nw=n.nw.slice(),i.qv=n.qv,i.uw="",r=20):92===v&&Oe(i)?r=6:(i.iw=n.iw,i.ew=n.ew,i.ow=n.ow,i.aw=n.aw,i.nw=n.nw.slice(),i.nw.pop(),r=17,a-=1);break;case 6:!Oe(i)||47!==v&&92!==v?47===v?r=9:(i.iw=n.iw,i.ew=n.ew,i.ow=n.ow,i.aw=n.aw,r=17,a-=1):r=8;break;case 7:if(47!==v||47!==h[a+1]){r=8;continue}r=8,a+=1;break;case 8:47!==v&&92!==v&&(r=9,a-=1);break;case 9:if(64===v){u&&o.unshift(37,52,48),u=!0;for(var l=0;l<o.length;l++){var w=o[l];if(58!==w||f){var b=Pi(qi(w,Wi));f?i.ew+=b:i.iw+=b}else f=!0}o.length=0}else if(Me===v||47===v||63===v||35===v||Oe(i)&&92===v){if(u&&0===o.length)throw new m("Invalid host");a-=o.length+1,o.length=0,r=10}else o.push(v);break;case 10:case 11:if(null!==e&&"file"===i.$v)a-=1,r=15;else if(58!==v||s)if(Me===v||47===v||63===v||35===v||Oe(i)&&92===v){if(a-=1,Oe(i)&&0===o.length)throw new m("Invalid host");if(null!==e&&0===o.length&&(Ne(i)||null!==i.aw))return;var g=Qi(Pi(o),Oe(i));if(i.ow=g,o.length=0,r=16,null!==e)return}else 91===v?s=!0:93===v&&(s=!1),o.push(v);else{if(0===o.length)throw new m("Invalid host");var p=Qi(Pi(o),Oe(i));if(i.ow=p,o.length=0,r=12,11===e)return}break;case 12:if(ui(v))o.push(v);else{if(!(Me===v||47===v||63===v||35===v||Oe(i)&&92===v||null!==e))throw new m("Invalid port");if(0!==o.length){var y=_(Pi(o),10);if(y>65535)throw new m("Invalid port");i.aw=y===Se[i.$v]?null:y,o.length=0}if(null!==e)return;r=16,a-=1}break;case 13:i.$v="file",47===v||92===v?r=14:n&&"file"===n.$v?Me===v?(i.ow=n.ow,i.nw=n.nw.slice(),i.qv=n.qv):63===v?(i.ow=n.ow,i.nw=n.nw.slice(),i.qv="",r=19):35===v?(i.ow=n.ow,i.nw=n.nw.slice(),i.qv=n.qv,i.uw="",r=20):(Pe(h.slice(a))||(i.ow=n.ow,i.nw=n.nw.slice(),xe(i)),r=17,a-=1):(r=17,a-=1);break;case 14:47===v||92===v?r=15:(n&&"file"===n.$v&&!Pe(h.slice(a))&&(Ce(n.nw[0])?i.nw.push(n.nw[0]):i.ow=n.ow),r=17,a-=1);break;case 15:if(Me===v||47===v||92===v||63===v||35===v)if(a-=1,null===e&&De(o))r=17;else if(0===o.length){if(i.ow=$i,null!==e)return;r=16}else{var S=Qi(Pi(o),Oe(i));if(0===S.Wv&&"localhost"===S.Xv&&(S=$i),i.ow=S,null!==e)return;o.length=0,r=16}else o.push(v);break;case 16:Oe(i)?(r=17,47!==v&&92!==v&&(a-=1)):null===e&&63===v?(i.qv="",r=19):null===e&&35===v?(i.uw="",r=20):Me!==v&&(r=17,47!==v&&(a-=1));break;case 17:if(Me===v||47===v||Oe(i)&&92===v||null===e&&(63===v||35===v)){var T=Pi(o);if(ke(T)?(xe(i),47===v||Oe(i)&&92===v||i.nw.push("")):!Ie(T)||47===v||Oe(i)&&92===v?Ie(T)||("file"===i.$v&&0===i.nw.length&&De(o)&&($i!==i.ow&&null!==i.ow&&(i.ow=$i),o[1]=58,T=Pi(o)),i.nw.push(T)):i.nw.push(""),o.length=0,"file"===i.$v&&(Me===v||63===v||35===v))for(;i.nw.length>1&&""===i.nw[0];)i.nw.shift();63===v?(i.qv="",r=19):35===v&&(i.uw="",r=20)}else o.push.apply(o,qi(v,zi));break;case 18:63===v?(i.qv="",r=19):35===v?(i.uw="",r=20):Me!==v&&(i.nw[0]+=Pi(qi(v,Li)));break;case 19:null===e&&35===v?(i.uw="",r=20):Me!==v&&(i.qv+=Pi(qi(v,Oe(i)?Vi:Hi)));break;case 20:Me===v||0===v||(i.uw+=Pi(qi(v,Fi)))}a++}return i}function ze(t,n,i,e){try{Fe(t,n,i,e)}catch(t){}}var We=function(){this.$v="",this.iw="",this.ew="",this.ow=null,this.aw=null,this.nw=[],this.qv=null,this.uw=null,this.hw=!1};function He(t){switch(t.$v){case"blob":var n;try{n=Fe(t.nw[0],null)}catch(t){return _e}return He(n);case"ftp":case"gopher":case"http":case"https":case"ws":case"wss":return function(t,n,i){return t+"://"+te(n)+(null===i?"":":"+i)}(t.$v,t.ow,t.aw);default:return _e}}var Ve=function(){function t(t,n){var i,e=null;if(null!=n)if(function(t){return null!=t&&t instanceof Ve&&"object"==typeof t.Yu}(n))e=n.Yu;else try{e=Fe(String(n),null)}catch(t){throw new m("Invalid base URL: "+t.message)}try{i=Fe(String(t),e)}catch(t){throw new m("Invalid URL: "+t.message)}var r=i.qv;this.Yu=i,this.qv=function(t){var n=new we;return null!==t&&de(n,t),n}(r),this.qv.Yu=this}var n=t.prototype;return n.toString=function(){return this.href},n.toJSON=function(){return this.href},function(t,n,i){n&&Vn(t.prototype,n),i&&Vn(t,i)}(t,[{key:"href",get:function(){return function(t,n){void 0===n&&(n=!1);var i=t.$v+":";if(null!==t.ow?(i+="//",Ne(t)&&(i+=t.iw,""!==t.ew&&(i+=":"+t.ew),i+="@"),i+=te(t.ow),null!==t.aw&&(i+=":"+t.aw)):null===t.ow&&"file"===t.$v&&(i+="//"),t.hw)i+=t.nw[0];else for(var e=0,r=t.nw;e<r.length;e++)i+="/"+r[e];return null!==t.qv&&(i+="?"+t.qv),n||null===t.uw||(i+="#"+t.uw),i}(this.Yu)},set:function(t){var n;try{n=Fe(String(t),null)}catch(t){throw new m("Invalid URL: "+t.message)}this.Yu=n,ve(this.qv);var i=this.Yu.qv;null!==i&&de(this.qv,i)}},{key:"origin",get:function(){return He(this.Yu)}},{key:"protocol",get:function(){return this.Yu.$v+":"},set:function(t){ze(t+":",null,this.Yu,0)}},{key:"username",get:function(){return this.Yu.iw},set:function(t){Be(this.Yu)||(this.Yu.iw=Xi(t,Wi))}},{key:"password",get:function(){return this.Yu.ew},set:function(t){Be(this.Yu)||(this.Yu.ew=Xi(t,Wi))}},{key:"host",get:function(){var t=this.Yu,n=t.ow;if(null===n)return"";var i=t.aw,e=te(n);return null!==i&&(e+=":"+i),e},set:function(t){this.Yu.hw||ze(t,null,this.Yu,10)}},{key:"hostname",get:function(){var t=this.Yu.ow;return null===t?"":te(t)},set:function(t){this.Yu.hw||ze(t,null,this.Yu,11)}},{key:"port",get:function(){var t=this.Yu.aw;return null===t?"":""+t},set:function(t){Be(this.Yu)||(""===t?this.Yu.aw=null:ze(t,null,this.Yu,12))}},{key:"pathname",get:function(){var t=this.Yu.nw;return this.Yu.hw?t[0]:0===t.length?"":"/"+t.join("/")},set:function(t){this.Yu.hw||(this.Yu.nw.length=0,ze(t,null,this.Yu,16))}},{key:"search",get:function(){var t=this.Yu.qv;return null===t||""===t?"":"?"+t},set:function(t){t=se(t);var n=this.Yu;if(""===t)return n.qv=null,void ve(this.qv);"?"===t[0]&&(t=t.slice(1)),n.qv="",ze(t,null,n,19),de(this.qv,t)}},{key:"searchParams",get:function(){return this.qv}},{key:"hash",get:function(){var t=this.Yu.uw;return null===t||""===t?"":"#"+t},set:function(t){""!==t?("#"===t[0]&&(t=t.slice(1)),this.Yu.uw="",ze(t,null,this.Yu,20)):this.Yu.uw=null}}]),t}();function qe(t){return t.document&&t.document.baseURI||t.location.href||""}var Xe=function(){function t(){this.Iw=new je,this.Lw=pn,this.Ew=Ye(),self.performance&&self.performance.now?this.J_=function(){return self.performance.now()}:this.J_=an}var n=t.prototype;return n.cw=function(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];Fn.apply(void 0,Cn(n))},n.lw=function(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];zn.apply(void 0,Cn(n))},n.dw=function(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];Wn.apply(void 0,Cn(n))},n.fw=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];Hn.apply(void 0,[t].concat(Cn(i)))},n.ov=function(t,n){return d(t,n)},n.gw=function(t,n){return w(t,n)},n.rv=function(t){l(t)},n._w=function(t){b(t)},n.ww=function(){return this.mw.ww()},n.pw=function(){return this.mw.pw()},n.Aw=function(){return this.mw.Aw()},n.yw=function(){return this.mw.yw()},n.Mw=function(){return this.mw.Mw()},n.Tw=function(t,n){return this.mw.Tw(t,n)},n.Sw=function(t){return this.mw.Sw(t)},n.Ah=function(t,n){var i;return void 0===n&&(n=qe(En)),i="object"!==(void 0===n?"undefined":k(n))||n instanceof Ve?n:n.href,new Ve(t,i)},n.Dw=function(t,n){if(void 0===n&&(n=qe(En)),this.Ew){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},ct(t,[{key:"Nw",get:function(){return this.Iw}},{key:"Ys",get:function(){return this.Lw}},{key:"xw",get:function(){return{Cw:v&&v.userAgent.match(/Android /i)?"Android":"other",jw:Boolean(v&&v.userAgent.match(/Android 8.0.0/i))}}},{key:"Ow",get:function(){return self&&self.location&&"https:"===self.location.protocol}},{key:"Rw",get:function(){return"languages"in v?v.languages.slice():[v.language]}}]),t}(),je=function(){function t(){}return ct(t,[{key:"Pw",get:function(){return v.oscpu}},{key:"Ys",get:function(){return v.platform}},{key:"zw",get:function(){return v.vendor}},{key:"Bw",get:function(){return v.vendorSub}}]),t}();function Ye(){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}var Ke=function(){function t(){}var n=t.prototype;return n.Mw=function(){return Q.resolve(!1)},n.pw=function(){return Q.resolve(!1)},n.yw=function(){return Q.resolve(!1)},n.Aw=function(){return Q.resolve(!1)},n.Sw=function(t){return Q.resolve(!1)},n.Tw=function(t,n){return Q.resolve(!1)},n.ww=function(){return Q.resolve(!1)},t}(),Ge=function(){function t(){}var n=t.prototype;return n.WM=function(){},n.iA=function(t){},n.Jp=function(t){},n.$p=function(t,n){},t}(),$e="default",Ze="unknown",Je=function(t){return t.HM="arraybuffer",t.XM="json",t.qM="stream",t.KM="text",t}({});function Qe(t,i){return function(t){if(Array.isArray(t))return t}(t)||function(t,i){var r=null==t?null:void 0!==n&&t[e]||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),!i||s.length!==i);f=!0);}catch(t){h=!0,u=t}finally{try{f||null==r.return||r.return()}finally{if(h)throw u}}return s}}(t,i)||Dn(t,i)||function(){throw new m("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var tr=function(){function t(n){var i=this;this._f={},n instanceof t?n.asList().forEach((function(t){var n=Qe(t,2),e=n[0],r=n[1];i.append(e,r)})):Array.isArray(n)?n.forEach((function(t){var n=Qe(t,2),e=n[0],r=n[1];i.append(e,r)})):n&&p.getOwnPropertyNames(n).forEach((function(t){i.append(t,n[t])}))}var n=t.prototype;return n.append=function(t,n){var i=t,e=n;i=nr(i),e=ir(e);var r=i.toLowerCase();if(this._f.hasOwnProperty(r)){var o=this._f[r],u=o[1];o[1]=u?u+", "+e:e}else this._f[r]=[i,e]},n.delete=function(t){var n=nr(t).toLowerCase();delete this._f[n]},n.get=function(t){var n=nr(t).toLowerCase();return this._f.hasOwnProperty(n)?this._f[n][1]:null},n.has=function(t){var n=nr(t).toLowerCase();return this._f.hasOwnProperty(n)},n.set=function(t,n){var i=t,e=(i=nr(i)).toLowerCase();this._f[e]=[i,ir(n)]},n.forEach=function(t,n){for(var i in this._f)this._f.hasOwnProperty(i)&&t.call(n,this._f[i][1],i,this)},n.asList=function(){var t=[];for(var n in this._f)if(this._f.hasOwnProperty(n)){var i=Qe(this._f[n],2),e=i[0],r=i[1];t.push([e,r])}return t},n.JM=function(){var t={};return this.forEach((function(n,i){t[i]=n})),t},n.$M=function(t){var n=this;t.forEach((function(t,i){n.append(i,t)}))},n.tT=function(t){var n=this;t.forEach((function(t,i){n.set(i,t)}))},t}();function nr(t){var n=t;if("string"!=typeof n&&(n=String(n)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(n))throw new m("Invalid character in header field name");return n}function ir(t){var n=t;return"string"!=typeof n&&(n=String(n)),n}function er(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):Q.resolve(f).then(e,r)}function rr(t){return function(){var n=this,i=arguments;return new Q((function(e,r){var o=t.apply(n,i);function u(t){er(o,e,r,u,s,"next",t)}function s(t){er(o,e,r,u,s,"throw",t)}u(void 0)}))}}function or(t,i){var r,o,u,s={label:0,sent:function(){if(1&u[0])throw u[1];return u[1]},trys:[],ops:[]},f=p.create(("function"==typeof Iterator?Iterator:p).prototype);return f.next=h(0),f.throw=h(1),f.return=h(2),"function"==typeof n&&(f[e]=function(){return this}),f;function h(n){return function(e){return function(n){if(r)throw new m("Generator is already executing.");for(;f&&(f=0,n[0]&&(s=0)),s;)try{if(r=1,o&&(u=2&n[0]?o.return:n[0]?o.throw||((u=o.return)&&u.call(o),0):o.next)&&!(u=u.call(o,n[1])).done)return u;switch(o=0,u&&(n=[2&n[0],u.value]),n[0]){case 0:case 1:u=n;break;case 4:return s.label++,{value:n[1],done:!1};case 5:s.label++,o=n[1],n=[0];continue;case 7:n=s.ops.pop(),s.trys.pop();continue;default:if(!(u=s.trys,(u=u.length>0&&u[u.length-1])||6!==n[0]&&2!==n[0])){s=0;continue}if(3===n[0]&&(!u||n[1]>u[0]&&n[1]<u[3])){s.label=n[1];break}if(6===n[0]&&s.label<u[1]){s.label=u[1],u=n;break}if(u&&s.label<u[2]){s.label=u[2],s.ops.push(n);break}u[2]&&s.ops.pop(),s.trys.pop();continue}n=i.call(t,s)}catch(t){n=[6,t],o=0}finally{r=u=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}([n,e])}}}var ur="function"==typeof SuppressedError?SuppressedError:function(t,n,i){var e=new g(i);return e.name="SuppressedError",e.error=t,e.suppressed=n,e};Array.prototype.find,Array.prototype.findLast;var sr="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},fr="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 hr(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 cr(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 ar(t,n){return-1!==t.indexOf(n)}function vr(t){t.length=0}Array.prototype.flat,Array.prototype.flatMap;var dr=function(){function t(){this.gm=!1,this.Am=!1,this.ym=[],this.Tm=[]}var n=t.prototype;return n.pm=function(){if(!this.gm&&!this.Am){this.gm=!0;for(var t=0,n=this.ym.slice();t<n.length;t++){(0,n[t])()}this.Mm()}},n.Mm=function(){if(!this.Am){this.Am=!0;for(var t=0,n=this.Tm.slice();t<n.length;t++){(0,n[t])()}vr(this.ym),vr(this.Tm)}},n.vm=function(t){this.Am||this.ym.push(t)},n._m=function(t){this.Am||hr(this.ym,t)},n.Sm=function(t){this.Am||this.Tm.push(t)},n.Nm=function(t){this.Am||hr(this.Tm,t)},t}(),lr=function(){function t(){this.Im=new dr}var n=t.prototype;return n.Dm=function(){this.Im.pm()},n.Mm=function(){this.Im.Mm()},n.Em=function(t){var n=this.Im;if(!n.gm)if(t.gm)n.pm();else if(!n.Am&&!t.Am){var i=function(){e(),n.pm()},e=function(){t._m(i),t.Nm(e),n._m(i),n.Nm(e)};t.vm(i),t.Sm(e),n.vm(i),n.Sm(e)}},n.Lm=function(){var n=new t,i=new t,e=n.wm,r=i.wm,o=this.Im,u=function(){e.gm&&r.Am||r.gm&&e.Am?o.pm():e.Am&&r.Am&&o.Mm()};e.vm(u),r.vm(u),e.Sm(u),r.Sm(u),n.Em(o),i.Em(o);return o.Sm((function(){e._m(u),r._m(u),e.Nm(u),r.Nm(u)})),[n,i]},n[r]=function(){this.Dm()},t.xm=function(n){for(var i=new t,e=0;e<n.length;e++){var r=n[e];void 0!==r&&i.Em(r)}return i},ct(t,[{key:"wm",get:function(){return this.Im}}]),t}(),wr=function(t){return t.DELETE="DELETE",t.GET="GET",t.HEAD="HEAD",t.OPTIONS="OPTIONS",t.POST="POST",t.PUT="PUT",t}({}),br=function(t){return t.sN="same-origin",t.nN="no-cors",t.rN="cors",t.oN="navigate",t}({}),gr=function(t,n){var i,e,r,o,u,s,f,h,c,a,v,d,l,w,b,g,m,p,y=t.Hu;n?(i=n.wS,e=n.RS,r=n.hN,o=n.CS,u=n.aN,s=n.uN,f=n.wm,h=n.Hw,c=n.cN,a=n.lN,v=n.dN,d=n.fN,l=n.gN,w=n._N,b=n.vN):(i=null,e={},r="GET",o=Je.KM,u=0,s=0,h="",c="",a="",v=!1,l=void 0,w=!1,b=void 0),this.Hu=y,this.wS=t.wS||i,this.RS=new tr(t.RS||e),this.hN=t.hN||r,this.CS=t.CS||o,this.aN=void 0!==t.aN?Number(t.aN)||0:u,this.uN=void 0!==t.uN?Number(t.uN)||0:s,this.wm=t.wm||f||(new lr).wm,this.Hw=t.Hw||h,this.cN=t.cN||c,this.lN=t.lN||a,this.dN=void 0!==t.dN?Boolean(t.dN):v,this.fN=t.fN||d,this.gN=null!=(g=t.gN)?g:l,this._N=null!=(m=t._N)?m:w,this.vN=null!=(p=t.vN)?p:b},mr=function(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];g.apply(this,n)};(mr.prototype=p.create(g.prototype)).constructor=mr;var pr=function(t){function n(n,i){var e;return(e=t.call(this)||this).message=n||"Unknown error",e.cause=i,g.captureStackTrace&&g.captureStackTrace(e,e.constructor),e}return ft(n,t),ct(n,[{key:"name",get:function(){return"BaseError"}}]),n}(mr),yr=function(t){return t.SN="HttpOpenError",t.NN="HttpResponseError",t.DN="HttpTimeoutError",t}({}),_r=function(t){function n(n,i,e){var r;return(r=t.call(this,i,e)||this).EN=n,r}return ft(n,t),ct(n,[{key:"jS",get:function(){return this.EN}}]),n}(pr);var Sr=function(t){function n(n,i){return t.call(this,n,function(t){return"Error while opening "+t+". Invalid URL."}(n.Hu),i)||this}return ft(n,t),ct(n,[{key:"name",get:function(){return yr.SN}}]),n}(_r),Tr=function(){function t(){}var n=t.prototype;return n.jS=function(t){return Q.reject(new Sr(new gr(t)))},n.wN=function(t){},n.gn=function(){},t}(),Er=function(t){function n(n){return t.call(this,"Invalid XML",n)||this}return ft(n,t),n}(pr),Ir=function(t){function n(){var n;return(n=t.apply(this,arguments)||this).LI=new Ke,n.dU=new Tr,n.i=new Ge,n}return ft(n,t),n.prototype.oI=function(t){throw new Er},ct(n,[{key:"mw",get:function(){return this.LI}},{key:"xI",get:function(){return!1}},{key:"jI",get:function(){return!1}},{key:"BI",get:function(){return!1}},{key:"RI",get:function(){return!1}},{key:"UI",get:function(){return this.i}},{key:"QI",get:function(){return{FI:Ct}}},{key:"YI",get:function(){return $e}},{key:"VI",get:function(){return Ze}},{key:"GI",get:function(){return this.dU}}]),n}(Xe);function kr(){return kr=p.assign||function(t){for(var n=1;n<arguments.length;n++){var i=arguments[n];for(var e in i)p.prototype.hasOwnProperty.call(i,e)&&(t[e]=i[e])}return t},kr.apply(this,arguments)}function Rr(){var t=p.create(null);return t.Uw=void 0,delete t.Uw,t}function Or(){return new Pr}Dt(new Ir);var Nr="undefined"!=typeof Map&&"entries"in Map.prototype?Map:void 0,Pr=Nr||function(){var t=function(){function t(t,n){this.index=0,this.data=t,this.selector=n,this.keys=p.keys(t)}return t.prototype.next=function(){var t=this.index;return t<this.keys.length?(this.index++,{value:this.selector(this.data,this.keys[t]),done:!1}):{value:void 0,done:!0}},t}();return function(){function n(){this.data=Rr(),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=Rr(),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}()}();Nr||function(){var t=function(){function t(t,n){this.Qw=t,this.Fw=n}return t.prototype.next=function(){var t=this.Qw.next();return t.done?t:{value:this.Fw(t.value),done:!1}},t}();(function(){function n(){this._f=Or()}var i=n.prototype;i.get=function(t){return this._f.get(""+t)},i.set=function(t,n){return this._f.set(""+t,n),this},i.has=function(t){return this._f.has(""+t)},i.delete=function(t){return this._f.delete(""+t)},i.clear=function(){this._f.clear()},i.keys=function(){return new t(this._f.keys(),(function(t){return Number(t)}))},i.values=function(){return this._f.values()},i.entries=function(){return new t(this._f.entries(),(function(t){var n=Qe(t,2),i=n[0],e=n[1];return[Number(i),e]}))},i.forEach=function(t){this._f.forEach((function(n,i){t(n,Number(i))}))},ct(n,[{key:"size",get:function(){return this._f.size}}])})()}();var Ar="9a04f079-9840-4286-ab92-e65be0885f95",Dr="urn:uuid:"+Ar,Cr="com.microsoft.playready",xr="edef8ba9-79d6-4ace-a3c8-27dcd51d21ed",Br="urn:uuid:"+xr,Mr="com.widevine.alpha",Ur="1077efec-c0b2-4d02-ace3-3c1e52e2fb4b",Lr="urn:uuid:"+Ur,Fr="94ce86fb-07ff-4f43-adb8-93d2fa968ca2",zr="urn:uuid:"+Fr,Wr="com.apple.fps.1_0",Hr=function(t){return t.Yw="playready",t.Vw="widevine",t.Ww="fairplay",t.Gw="clearkey",t.Zw="aes128",t}({}),Vr={Hw:Hr.Yw,Xw:Cr,qw:"cenc",Kw:Ar,Jw:Dr,$w:"PlayReady"},qr={Hw:Hr.Vw,Xw:Mr,qw:"cenc",Kw:xr,Jw:Br,$w:"Widevine"},Xr={Hw:Hr.Ww,Xw:Wr,qw:"skd",Kw:Fr,Jw:zr,$w:"FairPlay"},jr=(Hr.Ww,{Hw:Hr.Gw,Xw:"org.w3.clearkey",qw:"cenc",Kw:Ur,Jw:Lr,$w:"ClearKey"});String.prototype.replaceAll;var Yr="function"==typeof String.prototype.startsWith?function(t,n){return kt(t)&&t.startsWith(n)}:function(t,n){return kt(t)&&t.substr(0,n.length)===n},Kr=(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}),Gr=(String.prototype.padStart,String.prototype.padEnd,16384),$r="function"==typeof String.fromCodePoint?function(t){var n;return t.length<=Gr?(n=String).fromCodePoint.apply(n,Cn(t)):Jr(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 Zr(n)};function Zr(t){var n;return t.length<=Gr?(n=String).fromCharCode.apply(n,Cn(t)):Jr(t,String.fromCharCode)}function Jr(t,n){for(var i=[],e=0;e<t.length;e+=Gr)i.push(n.apply(void 0,Cn(t.slice(e,e+Gr))));return i.join("")}var Qr=Et.Yg&&Et.Gg>=42||Et.p_&&Et.y_>=38||Et.l_||Et.__||Et.I_&&Et.E_>=29;function to(t,n){return function(t,n){return kt(t)&&-1!==t.indexOf(n)}(t,"audio")?{initDataTypes:["cenc"],audioCapabilities:[kr({contentType:t},n?{robustness:"SW_SECURE_CRYPTO"}:{})]}:{initDataTypes:["cenc"],videoCapabilities:[kr({contentType:t},n?{robustness:"SW_SECURE_CRYPTO"}:{})]}}var no=function(){function t(t){this.im=Or(),this.um=void 0,this.hm=t}var n=t.prototype;return n.Mw=function(){return this.Sw(qr)},n.pw=function(){return this.Sw(jr)},n.yw=function(){return this.Sw(Vr)},n.Aw=function(){return this.Sw(Xr)},n.Sw=function(t){var n=t.Jw,i=this.im.get(n);if(i)return i;var e=this.Tw(t,'video/mp4; codecs="avc1.42000a"');return this.im.set(n,e),e},n.Tw=function(t,n){var i=this;return rr((function(){return or(this,(function(e){switch(e.label){case 0:return e.trys.push([0,2,,7]),[4,i.hm.nm(t.Xw,[to(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.hm.nm(t.Xw,[to(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.ww=function(){return this.um||(this.um=this.lm()),this.um},n.lm=function(){var t=this;return rr((function(){return or(this,(function(n){switch(n.label){case 0:return"https:"===undefined.protocol?[2,!1]:Qr?[4,t.pw()]:[2,!1];case 1:return n.sent()?[2,!1]:[2,!0]}}))}))()},t}(),io=function(t){function n(n,i){return t.call(this,n||"Aborted",i)||this}return ft(n,t),ct(n,[{key:"name",get:function(){return"AbortError"}}]),n}(pr);function eo(t){return t instanceof g&&"AbortError"===t.name}function ro(t,n){return n?new Q((function(i,e){if(n.gm)return t.catch(Ct),e(new io);var r=function(){n._m(r),e(new io)};n.vm(r),t.then((function(t){n._m(r),i(t)}),(function(t){n._m(r),e(t)}))})):t}function oo(t,n){return uo.apply(this,arguments)}function uo(){return uo=rr((function(t,n){var i,e;return or(this,(function(u){switch(u.label){case 0:i={stack:[],error:void 0,hasError:!1},u.label=1;case 1:return u.trys.push([1,3,4,5]),function(t,n,i){if(null!=n){if("object"!=typeof n&&"function"!=typeof n)throw new m("Object expected.");var e,u;if(i){if(!o)throw new m("Symbol.asyncDispose is not defined.");e=n[o]}if(void 0===e){if(!r)throw new m("Symbol.dispose is not defined.");e=n[r],i&&(u=e)}if("function"!=typeof e)throw new m("Object not disposable.");u&&(e=function(){try{u.call(this)}catch(t){return Q.reject(t)}}),t.stack.push({value:n,dispose:e,async:i})}else i&&t.stack.push({async:!0});return n}(i,n,!1),[4,t];case 2:return[2,u.sent()];case 3:return e=u.sent(),i.error=e,i.hasError=!0,[3,5];case 4:return function(t){function n(n){t.error=t.hasError?new ur(n,t.error,"An error was suppressed during disposal."):n,t.hasError=!0}var i,e=0;(function r(){for(;i=t.stack.pop();)try{if(!i.async&&1===e)return e=0,t.stack.push(i),Q.resolve().then(r);if(i.dispose){var o=i.dispose.call(i.value);if(i.async)return e|=2,Q.resolve(o).then(r,(function(t){return n(t),r()}))}else e|=1}catch(t){n(t)}if(1===e)return t.hasError?Q.reject(t.error):Q.resolve();if(t.hasError)throw t.error})()}(i),[7];case 5:return[2]}}))})),uo.apply(this,arguments)}Q.resolve();function so(t,n){return new Q((function(i,e){if(void 0!==n&&n.gm)e(new io);else{var r=Rt.ov((function(){void 0!==n&&n._m(o),i()}),t),o=function(){Rt.rv(r),e(new io)};void 0!==n&&n.vm(o)}}))}function fo(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 ho=function(){function t(t){var n=this;this.jm=Rr(),this.Pm=void 0,this.Om=0,this.Ds=function(t){n.yo(t)},this.zm=null!=t?t:this}var n=t.prototype;return n.yn=function(t,n){if("function"==typeof n)if("string"==typeof t)this.Cm(t,n);else for(var i=0;i<t.length;i++){var e=t[i];this.Cm(e,n)}},n.Cm=function(t,n){var i=this.jm[t];void 0===i?this.jm[t]=n:"function"==typeof i?this.jm[t]=[i,n]:0===this.Om?i.push(n):this.jm[t]=i.concat(n)},n.Rm=function(t){if("function"==typeof t){var n=this.Pm;void 0===n?this.Pm=t:"function"==typeof n?this.Pm=[n,t]:0===this.Om?n.push(t):this.Pm=n.concat(t)}},n.Bo=function(){this.jm=Rr(),this.Pm=void 0},n.yo=function(t){this.Om++;var n=this.jm[t.type],i=this.Pm;void 0!==n&&fo(this.zm,t,n),void 0!==i&&fo(this.zm,t,i),this.Om--},n.fn=function(t,n){if("function"==typeof n)if("string"==typeof t)this.Bm(t,n);else for(var i=0;i<t.length;i++){var e=t[i];this.Bm(e,n)}},n.Bm=function(t,n){var i=this.jm[t];void 0!==i&&("function"==typeof i?i===n&&(this.jm[t]=void 0):0===this.Om?hr(i,n):this.jm[t]=cr(i,n))},n.Um=function(t){if("string"==typeof t)this.jm[t]=void 0;else for(var n=0;n<t.length;n++){var i=t[n];this.jm[i]=void 0}},n.Qm=function(t){var n=this.Pm;void 0!==n&&("function"==typeof n?n===t&&(this.Pm=void 0):0===this.Om?hr(n,t):this.Pm=cr(n,t))},n.Fm=function(t,n){var i=this;return new Q((function(e,r){if(n&&n.gm)return r(new io);var o=function(t){s(),e(t)},u=function(){s(),r(new io)},s=function(){i.fn(t,o),n&&n._m(u)};i.yn(t,o),n&&n.vm(u)}))},t}(),co=function(t,n){void 0===n&&(n=new Date),this.type=t,this.date=n},ao=function(t){return t.Ym="Vm",t.Gm="Wm",t.Zm="contentprotectionerror",t.Hm="contentprotectionsuccess",t.Xm="currentsourcechange",t.qm="destroy",t.Km="durationchange",t.Jm="emptied",t.$m="encrypted",t.tp="ended",t.ep="sp",t.np="rp",t.op="hp",t.ap="cp",t.lp="loadstart",t.dp="manifestupdate",t.fp="nosupportedrepresentationfound",t.gp="offline",t._p="online",t.vp="pause",t.so="play",t.wp="progress",t.mp="ratechange",t.pp="representationchange",t.Ap="resize",t.yp="seeked",t.bp="seeking",t.Mp="segmentnotfound",t.Tp="Sp",t.Np="Ip",t.ro="sourcechange",t.Dp="timeupdate",t.Ep="volumechange",t.kp="Lp",t.xp="Cp",t.jp="metricschange",t}({}),vo=["cenc"],lo=["cbcs","cbcs-1-9"],wo=function(t){function n(n){var i;return(i=t.call(this,ao.xp)||this).Op=n,i}return ft(n,t),n}(co),bo=function(t){function n(n,i,e,r){var o;return(o=t.call(this,"Rp")||this).Pp=n,o.zp=i,o.Rp=e,o.Bp=r,o}return ft(n,t),n}(co),go=function(t){function n(){return t.call(this,"lt")||this}return ft(n,t),n}(co),mo="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),po=16383;function yo(t,n,i){return mo[t>>2]+mo[(3&t)<<4|n>>4]+mo[(15&n)<<2|i>>6]+mo[63&i]}function _o(t,n,i){for(var e=[],r=n;r<i;r+=3)e.push(yo(t[r],t[r+1],t[r+2]));return e.join("")}var So=function(){function t(t){void 0===t&&(t=0),this.ic=t}var n=t.prototype;return n.Vp=function(t){this.ic+=t},n.Gp=function(t){this.ic=t},n.Wp=function(){return new t(this.tc)},ct(t,[{key:"tc",get:function(){return this.ic}}]),t}();function To(t){if(t>=55296&&t<=57343)throw new g("Lone surrogate U+"+t.toString(16).toUpperCase()+" is not a scalar value")}function Eo(t,n){return t>>n&63|128}function Io(t,n){0!=(4294967168&t)?(0==(4294965248&t)?n.push(t>>6&31|192):0==(4294901760&t)?(To(t),n.push(t>>12&15|224),n.push(Eo(t,6))):0==(4292870144&t)&&(n.push(t>>18&7|240),n.push(Eo(t,12)),n.push(Eo(t,6))),n.push(63&t|128)):n.push(t)}function ko(t,n){if(n.tc>=t.length)throw new g("Invalid byte index");var i=255&t[n.tc];if(n.Vp(1),128==(192&i))return 63&i;throw new g("Invalid continuation byte")}function Ro(t,n){var i=n.tc;if(i>t.length)throw new g("Invalid byte index");if(i===t.length)return!1;var e=255&t[i];if(n.Vp(1),0==(128&e))return e;if(192==(224&e)){var r=(31&e)<<6|ko(t,n);if(r>=128)return r;throw new g("Invalid continuation byte")}if(224==(240&e)){var o=(15&e)<<12|ko(t,n)<<6|ko(t,n);if(o>=2048)return To(o),o;throw new g("Invalid continuation byte")}if(240==(248&e)){var u=(7&e)<<18|ko(t,n)<<12|ko(t,n)<<6|ko(t,n);if(u>=65536&&u<=1114111)return u}throw new g("Invalid UTF-8 detected")}var Oo=65279;function No(t,n,i){void 0===i&&(i=!1);var e=t.getUint16(n.tc,i);return n.Vp(2),e}function Po(t,n,i,e){void 0===e&&(e=!1),t.setUint16(n.tc,i,e),n.Vp(2)}function Ao(t,n,i,e){void 0===e&&(e=!1),t.setUint32(n.tc,i,e),n.Vp(4)}function Do(t,n,i,e){void 0===e&&(e=!1);for(var r=i.length,o=0;o<r;o+=1){Po(t,n,i.charCodeAt(o),e)}}function Co(t,n){return void 0===n&&(n=!1),function(t,n,i,e){for(var r=[];n.tc+2<=t.byteLength;){var o=No(t,n,i);if(e&&!o)break;r.push(o)}return Zr(r)}(Mo(t),new zo,n,!1)}function xo(t){return function(t){return $r(t)}(function(t,n){var i,e=[],r=new zo;if(!n){if(!1===(i=Ro(t,r)))return e;i===Oo||e.push(i)}for(;!1!==(i=Ro(t,r));)e.push(i);return e}(Uo(t)))}function Bo(t){return new E(function(t){for(var n=[],i=0;i<t.length;i++)Io(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 Mo(t){return new DataView(t.buffer,t.byteOffset,t.byteLength)}function Uo(t){return new E(t.buffer,t.byteOffset,t.byteLength)}function Lo(t){return t instanceof ArrayBuffer?new E(t):Uo(t)}function Fo(t){if(t.slice)return t.slice(0);var n=new E(t.byteLength);return n.set(t,0),n}var zo=function(){function t(t){void 0===t&&(t=0),this.ic=t}var n=t.prototype;return n.Vp=function(t){this.ic+=t},n.Gp=function(t){this.ic=t},n.Wp=function(){return new t(this.tc)},n.Xp=function(){return new So(this.tc<<3)},ct(t,[{key:"tc",get:function(){return this.ic}}]),t}(),Wo=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]","[object DataView]"],Ho=ArrayBuffer.isView||function(t){return t&&ar(Wo,It.call(t))};function Vo(t,n){return t===n||function(t,n){if(t===n)return!0;if(t.byteLength!==n.byteLength)return!1;if(t.buffer===n.buffer&&t.byteOffset===n.byteOffset)return!0;for(var i=0;i<t.length;i+=1)if(t[i]!==n[i])return!1;return!0}(Lo(t),Lo(n))}function qo(t){var n=t.reduce((function(t,n){return t+n.byteLength}),0);return function(t,n){for(var i=new E(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 Xo(t){return function(t){for(var n=t.length,i=n%3,e=[],r=n-i,o=0;o<r;o+=po)e.push(_o(t,o,y.min(r,o+po)));if(1===i){var u=t[n-1];e.push(mo[u>>2]+mo[(3&u)<<4]+"==")}else if(2===i){var s=t[n-2],f=t[n-1];e.push(mo[s>>2]+mo[(3&s)<<4|f>>4]+mo[(15&f)<<2]+"=")}return e.join("")}(new E(t))}var jo=new E([0]).buffer,Yo=function(){function t(){this.Qu=[]}var n=t.prototype;return n.Kp=function(t){for(var n=0,i=this.Qu;n<i.length;n++){if(Vo(i[n][0],t))return!0}return!1},n.Jp=function(t){for(var n=0,i=this.Qu;n<i.length;n++){var e=i[n];if(Vo(e[0],t))return e[1]}},n.$p=function(t,n){for(var i=0,e=this.Qu;i<e.length;i++){var r=e[i];if(Vo(r[0],t))return void(r[1]=n)}this.Qu.push([t,n])},n.tA=function(t,n){this.Qu.forEach((function(n){return t(n[1],n[0])}),n)},n.iA=function(){vr(this.Qu)},ct(t,[{key:"qp",get:function(){return this.Qu.length}}]),t}(),Ko=function(){function t(){var t=this;this.rA=new Q((function(n,i){t.hf=n,t.nA=i}))}var n=t.prototype;return n.eA=function(t){this.hf&&(this.hf(t),this.Mm())},n.sA=function(t){this.nA&&(this.nA(t),this.Mm())},n.Dm=function(){this.rA.catch(Ct),this.sA(new io)},n.Em=function(t){var n=this;t.then((function(t){return n.eA(t)}),(function(t){return n.sA(t)}))},n.Mm=function(){this.hf=void 0,this.nA=void 0},t}();function Go(t,n){return t===Cr?function(t){if(t.byteLength<2*$o.length)return t;var n=new DataView(t,0,2*$o.length),i=Co(n,!0);if(i===$o)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+Xo(t)+i;return function(t,n){void 0===n&&(n=!1);var i=new E(2*t.length);return Do(Mo(i),new zo,t,n),i}(e,!0).buffer}(t)}(n):n}var $o="<PlayReady";var Zo=function(t){function n(n,i,e,r){var o;return(o=t.call(this,n,r)||this).oA=i,o.hA=e,o}return ft(n,t),n}(pr),Jo=function(t,n){return Jo=p.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)p.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])},Jo(t,n)};function Qo(t,n){if("function"!=typeof n&&null!==n)throw new m("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}Jo(t,n),t.prototype=null===n?p.create(n):(i.prototype=n.prototype,new i)}function tu(t,n,i){return t.indexOf?t.indexOf(n,i):Array.prototype.indexOf.call(t,n,i)}(function(){function t(t,n){this.aA=t,this.uA=n}t.prototype.get=function(t){var n=this.aA.get(t);if(0===this.uA||void 0===n)return n;var i=this.aA.get(t+1)||0,e=n&(1<<8-this.uA)-1,r=i>>8-this.uA;return(e<<this.uA)+r},t.prototype.getBit=function(t){if(!(t<0)){var n=this.aA.get(y.floor((t+this.uA)/8));if(void 0!==n)return(n&1<<7-this.uA-t%8)>0?1:0}},p.defineProperty(t.prototype,"bitLength",{get:function(){return this.aA.bitLength-this.uA},enumerable:!1,configurable:!0}),p.defineProperty(t.prototype,"length",{get:function(){return this.aA.length},enumerable:!1,configurable:!0})})(),y.pow(2,-52);function nu(t,n,i){return y.min(y.max(t,n),i)}function iu(t,n){return t>>8-n}function eu(t,n){return t&(1<<n)-1}var ru=function(){function t(t){this.cA=t,this.lA=0,this.dA=0}return p.defineProperty(t.prototype,"totalBitsRead",{get:function(){return 8*this.lA+this.dA},enumerable:!1,configurable:!0}),p.defineProperty(t.prototype,"done",{get:function(){return this.lA===this.cA.length&&0===this.dA},enumerable:!1,configurable:!0}),p.defineProperty(t.prototype,"location",{get:function(){return{byte:this.lA,bit:this.dA}},enumerable:!1,configurable:!0}),t.prototype.copy=function(){var n=new t(this.cA);return n.seek(this.lA,this.dA),n},t.prototype.canReadBits=function(t){return 8*this.lA+t+this.dA<=8*this.cA.length},t.prototype.canReadBytes=function(t){return 0===this.dA?this.lA+t<=this.cA.length:this.lA+t<this.cA.length},t.prototype.incBit=function(){this.dA++,this.dA>7&&(this.lA++,this.dA=0)},t.prototype.seek=function(t,n){this.lA=t,this.dA=n},t.prototype.peekBit=function(){if(!this.canReadBits(1))throw new g("Cannot read past end of buffer.");return this.cA.get(this.lA)>>7-this.dA&1},t.prototype.readBit=function(){var t=this.peekBit();return this.incBit(),t},t.prototype.readByte=function(){if(!this.canReadBytes(1))throw new g("Cannot read past end of buffer.");if(0===this.dA)return this.cA.get(this.lA++);var t=eu(this.cA.get(this.lA),8-this.dA),n=iu(this.cA.get(this.lA+1),this.dA);return this.lA++,t<<this.dA|n},t.prototype.readBits=function(t){if(!this.canReadBits(t))throw new g("Cannot read past end of buffer.");for(var n=[],i=0;i<t;i++)n.push(this.readBit());return n},t.prototype.readUInt=function(t){if(t>32)throw new g("The max bitlength that can be provided is 32.");if(!this.canReadBits(t))throw new g("Cannot read past end of buffer.");var n=0;if(0===this.dA&&t%8==0)for(var i=t-8;i>=0;i-=8)n|=this.readByte()<<i;else for(i=t-1;i>=0;i--)n|=this.readBit()<<i;return n},t.prototype.readInt=function(t){if(t>32)throw new g("The max bitlength that can be provided is 32.");if(!this.canReadBits(t))throw new g("Cannot read past end of buffer.");var n=this.readUInt(t);return 0===(n&1<<t-1)?n:n-y.pow(2,t)},t.prototype.readExponentialGolombCode=function(){for(var t=0;0===this.readBit();)t++;var n=1<<t;return n+=this.readUInt(t)-1},t.prototype.readSignedExponentialGolombCode=function(){var t=this.readExponentialGolombCode();return 1&t?(t+1)/2:-t/2},t.prototype.skipBits=function(t){if(!this.canReadBits(t))throw new g("Skipping over the buffer edge is not allowed.");var n=this.dA+t;this.lA+=n>>3,this.dA=7&n},t.prototype.readBool=function(){return this.readBit()>0},t.prototype.readString=function(t){if(!this.canReadBytes(t))throw new g("Cannot read past end of buffer.");for(var n=[],i=0;i<t;i++)n.push(this.readByte());return String.fromCharCode.apply(String,n)},t}(),ou=function(t,n){return t===n?0:t<n?-1:t>n?1:T(t)?T(n)?0:1:-1},uu=function(){function t(){this.fA=[],this.gA=[],this._A=0}return t.from=function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];for(var e=new t,r=0,o=n;r<o.length;r++){var u=o[r];e.pushRange(u)}return e},t.prototype.pushRange=function(t,n,i){if(void 0===n&&(n=0),void 0===i&&(i=t.length),i<0)throw new g("The buffer length must be positive.");if(0!==i){if(0===this.gA.length)this.gA.push(0);else{var e=this.gA[this.gA.length-1]+this.fA[this.fA.length-1].length;this.gA.push(e)}this.fA.push(t.subarray(n,n+i)),this._A+=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.fA;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.fA=[],this.gA=[],this._A=0},t.prototype.get=function(t){if(!(t<0||t>=this.length)){var n=this.findContainingBufferIndex(t),i=t-this.gA[n];return this.fA[n][i]}},p.defineProperty(t.prototype,"first",{get:function(){return this.get(0)},enumerable:!1,configurable:!0}),t.prototype.indexOf=function(t){if(this.fA.length<1)return-1;if(this.fA.length>1){var n=this.join();this.clear(),this.pushRange(n)}var i=this.fA[0];return"number"==typeof t?tu(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=tu(t,i,o))<0||o>r);o++){for(var u=o+1,s=o+e,f=1;u<s&&t[u]===n[f];u++,f++);if(u===s)return o}return-1}(i,t)},t.prototype.findContainingBufferIndex=function(t){return function(t,n,i){if(0!==t.length){var e=0,r=t.length-1;if(1!==i(t[e],n)){if(1===i(n,t[r]))return r;for(;e!==r;){var o=y.ceil((e+r)/2);i(t[o],n)<=0?e=o:r=o-1}return e}}}(this.gA,t,ou)},t.prototype.join=function(){if(1===this.fA.length)return this.fA[0];var t=new E(this.length);return this.copyInternal(t,0),t},p.defineProperty(t.prototype,"length",{get:function(){return this._A},enumerable:!1,configurable:!0}),p.defineProperty(t.prototype,"bitLength",{get:function(){return 8*this.length},enumerable:!1,configurable:!0}),t.prototype.readUIntBE=function(t,n){if(n<=0||n>4)throw new g("Expected byteLength to be between 0 and 4 but was "+n);if(t<0||t>this.length-n)throw new g("Offset must be between 0 and buffer.length - byteLength, but was "+t+" (max allowed "+(this.length-n)+")");if(1===n)return this.get(t);for(var i=0,e=0;e<n;e++)i+=this.get(t+e)*y.pow(2,8*(n-e-1));return i},t.prototype.slice=function(n,i){void 0===i&&(i=this.length);var e=nu(n,0,this.length),r=nu(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.fA[u],f=e,h=f-this.gA[u];f+s.length-h<r;)o.pushRange(s,h,s.length-h),u+=1,h=(f+=s.length-h)-this.gA[u],s=this.fA[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.fA.length-1,e=this.fA[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.fA[i]).length-1}else r-=1;n-=1}return this.slice(0,n+1)},t}(),su=function(){function t(n){this.vA=n||t.BUFFER_CHUNK_SIZE,this.wA=!1,this.mA=new uu,this.cA=new E(this.vA),this.pA=0,this.AA=0,this.dA=7}return t.prototype.closeByte=function(){this.cA[this.pA++]=this.AA,this.pA>=this.vA&&this.closeBuffer(),this.AA=0,this.dA=7},t.prototype.closeBuffer=function(t){void 0===t&&(t=!0),0!==this.pA&&(this.mA.pushRange(this.cA,0,this.pA),t&&(this.cA=new E(this.vA)),this.pA=0)},p.defineProperty(t.prototype,"isWritingStartBit",{get:function(){return 7===this.dA},enumerable:!1,configurable:!0}),t.prototype.close=function(){if(this.wA)throw new g("Cannot close a closed BitWriter.");return this.isWritingStartBit||this.closeByte(),this.closeBuffer(!1),this.wA=!0,this.mA},t.prototype.writeBit=function(t){if(this.wA)throw new g("Cannot write to a closed BitWriter.");this.AA|=t<<this.dA,0===this.dA?this.closeByte():this.dA--},t.prototype.writeByte=function(t){if(this.wA)throw new g("Cannot write to a closed BitWriter.");this.isWritingStartBit?(this.AA=t,this.closeByte()):this.writeByteUnaligned(t)},t.prototype.writeByteUnaligned=function(t){var n=this.dA;this.AA|=iu(t,n+1),this.closeByte(),this.AA=eu(t,8-n)<<n+1,this.dA=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.wA)throw new g("Cannot write to a closed BitWriter.");this.isWritingStartBit?this.writeBytesAligned(t):this.writeBytesUnaligned(t)},t.prototype.writeBytesAligned=function(t){this.pA+t.length<=this.vA?(this.cA.set(t,this.pA),this.pA+=t.length,this.pA===this.vA&&this.closeBuffer()):(this.closeBuffer(),this.mA.pushRange(t))},t.prototype.writeBytesUnaligned=function(t){if(0!==t.length){var n=this.dA;this.AA|=iu(t[0],n+1),this.closeByte();for(var i=1;i<t.length;i++){var e=eu(t[i-1],8-n),r=iu(t[i],n+1);this.AA=e<<n+1|r,this.closeByte()}this.AA=eu(t[t.length-1],8-n)<<n+1,this.dA=n}},t.prototype.writeUInt=function(t,n){if(t<0)throw new g("Received a negative number.");if(n>32)throw new g("The max bitlength that can be provided is 32.");if(t>=y.pow(2,n))throw new g("Uint "+t+" cannot be represented in "+n+" bit(s).");if(this.isWritingStartBit&&n%8==0)for(var i=n-8;i>=0;i-=8)this.writeByte(t>>i&255);else for(i=n-1;i>=0;i--)this.writeBool((t&1<<i)>0)},t.prototype.writeInt=function(t,n){if(n>32)throw new g("The max bitlength that can be provided is 32.");if(y.abs(t)>=y.pow(2,n-1))throw new g("Signed integer "+t+" cannot be represented in "+n+" bit(s).");t<0?this.writeUInt(t+y.pow(2,n),n):this.writeUInt(t,n)},t.prototype.writeExponentialGolombCode=function(t){if(t<0)throw new g("Received a negative number.");for(var n=y.floor(y.log2(t+1))+1,i=0;i<n-1;i++)this.writeBit(0);this.writeUInt(t+1,n)},t.prototype.writeSignedExponentialGolombCode=function(t){0===t?this.writeExponentialGolombCode(0):t<0?this.writeExponentialGolombCode(-2*t):this.writeExponentialGolombCode(2*t-1)},t.prototype.padByte=function(t){for(;!this.isWritingStartBit;)this.writeBit(t)},t.prototype.writeBool=function(t){this.writeBit(t?1:0)},t.prototype.writeString=function(t){for(var n=function(t){for(var n=new E(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}(),fu=function(){function t(t){this.rb=new uu,this.yA=t}return t.prototype.closeWriter=function(){void 0!==this.yA&&(this.rb=this.rb.concat(this.yA.close()),this.yA=void 0)},p.defineProperty(t.prototype,"writer",{get:function(){return void 0===this.yA&&(this.yA=new su),this.yA},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}(),hu=function(){function t(t){if(this.boxType=t,4!==t.length&&16!==t.length)throw new g("The provided box type does not conform to either a 4 character type or a 16 byte uuid.")}return t.prototype.serializeCommonBoxHeader=function(n){var i=this.getSize(),e=i>=t.LARGE_SIZE/8,r=16===this.boxType.length;n.writeUInt(e?1:i,32),n.writeString(r?"uuid":this.boxType),e&&(n.writeUInt(y.floor(i/t.LARGE_SIZE),32),n.writeUInt(i%t.LARGE_SIZE,32)),r&&n.writeString(this.boxType)},t.prototype.getSize=function(){var n=8+(this.boxType.length>4?16:0),i=this.getBoxContentSize()+n;return i>=t.LARGE_SIZE/8&&(i+=8),i},t.prototype.serialize=function(){var t=new fu;return this.serializeCommonBoxHeader(t.writer),this.serializeBoxContent(t),t.toRangedBuffer()},t.LARGE_SIZE=y.pow(2,32),t}();function cu(t,n){return t instanceof hn?64===n:t<y.pow(2,n)}function au(t,n){return y.round(t*y.pow(2,n))}function vu(t,n){for(var i=0;i<n.length;i++)t.writeByte(n[i])}function du(t,n){return t/y.pow(2,n)}var lu=function(t){function n(n,i,e){var r=t.call(this,n)||this;if(r.version=i,!cu(i,8))throw new g("the provided version cannot fit in 8 bits.");return r.flags=e,r}return Qo(n,t),p.defineProperty(n.prototype,"flags",{get:function(){return this.Zd},set:function(t){this.Zd=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return 4},n.prototype.serializeFlags=function(t){if("number"!=typeof this.flags)throw new g("Missing custom serializeFlags method.");t.writer.writeUInt(this.flags,24)},n.prototype.serializeBoxContent=function(t){t.writer.writeByte(this.version),this.serializeFlags(t)},n}(hu),wu=function(t){function n(n,i){var e=t.call(this,n)||this;return e.data=i,e}return Qo(n,t),n.prototype.getBoxContentSize=function(){return this.data.length},n.prototype.serializeBoxContent=function(t){t.concat(uu.from(this.data))},n}(hu),bu=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 gu=16384;function mu(t){var n=t.length;if(n<=gu)return String.fromCharCode.apply(String,t);for(var i=[],e=0;e<n;e+=gu)i.push(String.fromCharCode.apply(String,t.slice(e,e+gu)));return i.join("")}var pu=function(){function t(t){this.raw=t}return t.prototype.isSet=function(t){return function(t,n){return(t&n)===n}(this.raw,t)},t}();function yu(t,n){var i=t.getUint8(n.offset);return n.shift(1),i}function _u(t,n,i){var e=Ou(Pu(t),n.offset,n.offset+i);return n.shift(e.byteLength),e}function Su(t,n,i){return n.offset+i<=t.byteLength}function Tu(t,n,i){void 0===i&&(i=!1);var e=t.getUint32(n.offset,i);return n.shift(4),e}function Eu(t,n,i){void 0===i&&(i=!1);var e=Tu(t,n,i),r=Tu(t,n,i),o=i?r:e,u=i?e:r;return hn.fromBits(u,o,!0)}function Iu(t,n,i){return mu(function(t){return[].slice.call(t)}(_u(t,n,i)))}function ku(t,n){var i,e=yu(t,n);return 0==(128&e)?i=e:192==(224&e)?i=64*(31&e)+(63&yu(t,n)):224==(240&e)?i=4096*(15&e)+64*(63&yu(t,n))+(63&yu(t,n)):240==(248&e)&&(i=262144*(7&e)+4096*(63&yu(t,n))+64*(63&yu(t,n))+(63&yu(t,n))),i}function Ru(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=ku(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 mu(n)}(e)}(t,n,!0)}function Ou(t,n,i){return void 0===n&&(n=0),void 0===i&&(i=t.byteLength),new E(t.buffer,t.byteOffset+n,i-n)}function Nu(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 Pu(t){return new E(t.buffer,t.byteOffset,t.byteLength)}var Au=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 bu(this.offset<<3)},t}(),Du=function(){function t(t,n){this.data=t,this.cursor=n}return t.prototype.nextUint8=function(){return yu(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 Tu(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=Tu(t,n,i),r=Tu(t,n,i),o=i?r:e,u=i?e:r;return hn.fromBits(u,o,!1)}(this.data,this.cursor)},t.prototype.nextUint64=function(){return Eu(this.data,this.cursor)},t.prototype.nextUint8Array=function(t){return _u(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(Tu(t,n));return e}(this.data,this.cursor,t)},t.prototype.nextChars=function(t){return Iu(this.data,this.cursor,t)},t.prototype.nextUTF8String=function(){return Ru(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 Cu(t,n){return t.type===n}var xu=8;function Bu(t){var n=function(t,n){var i=[];for(;n.offset<t.byteLength;){var e=Mu(t,n);if(!e.complete)return{complete:!1,boxes:i};i.push(e.box)}return{complete:!0,boxes:i}}(t.data,t.cursor);if(!n.complete)throw new g("Data incomplete");return n.boxes}function Mu(t,n){var i=n.offset,e=function(t,n){var i=n.offset;if(!Su(t,n,xu)){return{complete:!1,neededOffset:o=n.offset+xu}}var e=Tu(t,n),r=Iu(t,n,4);if(1===e){if(!Su(t,n,8)){var o=n.offset+8;return n.seek(i),{complete:!1,neededOffset:o}}e=Eu(t,n).toNumber()}if("uuid"===r){if(!Su(t,n,16)){o=n.offset+16;return n.seek(i),{complete:!1,neededOffset:o}}r=Iu(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 Du(Nu(t,i,u),new Au(r.headerSize))};return n.seek(u),{complete:!0,box:f}}function Uu(t){return{version:t>>24,flags:new pu(16777215&t)}}function Lu(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 Fu(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 zu(t){var n=t.nextUint32Array(9);return{a:du(n[0],16),b:du(n[1],16),u:du(n[2],30),c:du(n[3],16),d:du(n[4],16),v:du(n[5],30),x:du(n[6],16),y:du(n[7],16),w:du(n[8],30)}}function Wu(t){return new wu(t.type,Ou(Pu(t.data.data),t.data.cursor.offset))}var Hu=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 Qo(n,t),p.defineProperty(n.prototype,"handlerType",{get:function(){return this.bA},set:function(t){this.bA=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}(lu);function Vu(t){var n=t.data,i=Uu(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 Hu(o,u,e,r.raw)}!function(t){function n(){return t.call(this,"mdir")||this}Qo(n,t),n.prototype.serializeReserved=function(t){t.writer.writeString("appl"),t.writer.writeUInt(0,32),t.writer.writeUInt(0,32)}}(Hu);var qu=function(){function t(t,n){void 0===n&&(n=!1),this.fixed28BitMode=n,this.tag=t}return t.prototype.encodeSize=function(t){for(var n=[];t>0;)n.length>0&&(n[n.length-1]+=128),n.push(t%128),t>>=7;if(this.fixed28BitMode)for(;n.length<4;)n.push(128);return n.reverse()},p.defineProperty(t.prototype,"tag",{get:function(){return this.MA},set:function(t){if(!cu(t,8))throw new g("Provided tag does not fit in 8 bits.");this.MA=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}(),Xu=(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}Qo(n,t),p.defineProperty(n.prototype,"objectTypeIndication",{get:function(){return this.TA},set:function(t){if(!cu(t,8))throw new g("Provided objectTypeIndication does not fit in 8 bits.");this.TA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"streamType",{get:function(){return this.SA},set:function(t){if(!cu(t,6))throw new g("Provided streamType does not fit in 6 bits.");this.SA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"bufferSizeDb",{get:function(){return this.NA},set:function(t){if(!cu(t,24))throw new g("Provided bufferSizeDb does not fit in 24 bits.");this.NA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"maxBitrate",{get:function(){return this.IA},set:function(t){if(!cu(t,32))throw new g("Provided maxBitrate does not fit in 32 bits.");this.IA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"avgBitrate",{get:function(){return this.DA},set:function(t){if(!cu(t,32))throw new g("Provided avgBitrate does not fit in 32 bits.");this.DA=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)}}}(qu),function(t){function n(n,i){void 0===i&&(i={});var e=t.call(this,5,i.fixed28BitMode)||this;return e.data=n,e}Qo(n,t),n.prototype.getDescriptorSize=function(){return this.data.length},n.prototype.serializeDescriptorContent=function(t){t.concat(uu.from(this.data))}}(qu),function(t){function n(n){void 0===n&&(n=!1);var i=t.call(this,6,n)||this;return i.predefined=2,i}return Qo(n,t),n.prototype.getDescriptorSize=function(){return 1},n.prototype.serializeDescriptorContent=function(t){t.writer.writeByte(this.predefined)},n}(qu)),ju=(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 Xu(r.fixed28BitMode),o}Qo(n,t),p.defineProperty(n.prototype,"streamDependenceFlag",{get:function(){return void 0!==this.dependsOnEsId},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"urlFlag",{get:function(){return void 0!==this.urlString},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"ocrStreamFlag",{get:function(){return void 0!==this.ocrEsId},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"esId",{get:function(){return this.EA},set:function(t){if(!cu(t,16))throw new g("Provided esId does not fit in 16 bits.");this.EA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"streamPriority",{get:function(){return this.kA},set:function(t){if(!cu(t,5))throw new g("Provided streamPriority does not fit in 5 bits.");this.kA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"dependsOnEsId",{get:function(){return this.LA},set:function(t){if(t&&!cu(t,16))throw new g("Provided dependsOnEsId does not fit in 16 bits.");this.LA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"ocrEsId",{get:function(){return this.xA},set:function(t){if(t&&!cu(t,16))throw new g("Provided ocrEsId does not fit in 16 bits.");this.xA=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)}}(qu),function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n.boxes=[],n}return Qo(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}(hu)),Yu=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return Qo(n,t),n.prototype.serializeBoxContent=function(t){},n.prototype.getBoxContentSize=function(){return 0},n}(ju),Ku=function(t){function n(n,i){var e=t.call(this,n)||this;return e.dataReferenceIndex=i,e}return Qo(n,t),p.defineProperty(n.prototype,"dataReferenceIndex",{get:function(){return this.CA},set:function(t){if(!cu(t,16))throw new g("Provided dataReferenceIndex does not fit in 16 bits.");this.CA=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}(Yu),Gu=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 Qo(n,t),p.defineProperty(n.prototype,"channelCount",{get:function(){return this.jA},set:function(t){if(!cu(t,16))throw new g("Provided channelCount does not fit in 16 bits.");this.jA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"sampleSize",{get:function(){return this.OA},set:function(t){if(!cu(t,16))throw new g("Provided sampleSize does not fit in 16 bits.");this.OA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"sampleRate",{get:function(){return this.RA},set:function(t){if(!cu(au(t,16),32))throw new g("Provided rate does not fit in 32 bits (fixed 16.16).");this.RA=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(au(this.sampleRate,16),32),this.extra&&vu(n.writer,this.extra)},n}(Ku),$u=(function(t){function n(n){var i=t.call(this,"stco",0,0)||this;return i.entries=n,i}Qo(n,t),p.defineProperty(n.prototype,"entries",{get:function(){return this.PA},set:function(t){if(!cu(t.length,32))throw new g("Number of allowed entries cannot fit in 32 bits.");if(t.some((function(t){return!cu(t,32)})))throw new g("Not all entries can be represented in 32 bits.");this.PA=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)}}}(lu),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}Qo(n,t),p.defineProperty(n.prototype,"cleanApertureWidthN",{get:function(){return this.zA},set:function(t){if(!cu(t,32))throw new g("Provided cleanApertureWidthN does not fit in 32 bits.");this.zA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"cleanApertureWidthD",{get:function(){return this.BA},set:function(t){if(!cu(t,32))throw new g("Provided cleanApertureWidthD does not fit in 32 bits.");this.BA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"cleanApertureHeightN",{get:function(){return this.UA},set:function(t){if(!cu(t,32))throw new g("Provided cleanApertureHeightN does not fit in 32 bits.");this.UA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"cleanApertureHeightD",{get:function(){return this.QA},set:function(t){if(!cu(t,32))throw new g("Provided cleanApertureHeightD does not fit in 32 bits.");this.QA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"horizOffN",{get:function(){return this.FA},set:function(t){if(!cu(t,32))throw new g("Provided horizOffN does not fit in 32 bits.");this.FA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"horizOffD",{get:function(){return this.YA},set:function(t){if(!cu(t,32))throw new g("Provided horizOffD does not fit in 32 bits.");this.YA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"vertOffN",{get:function(){return this.VA},set:function(t){if(!cu(t,32))throw new g("Provided vertOffN does not fit in 32 bits.");this.VA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"vertOffD",{get:function(){return this.GA},set:function(t){if(!cu(t,32))throw new g("Provided vertOffD does not fit in 32 bits.");this.GA=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)}}(hu),function(t){function n(n,i){var e=t.call(this,"ctts",n,0)||this;return e.entries=i,e}Qo(n,t),p.defineProperty(n.prototype,"entries",{get:function(){return this.PA},set:function(t){if(!cu(t.length,32))throw new g("Number of allowed entries cannot fit in 32 bits.");if(t.some((function(t){return!cu(t.sampleCount,32)||!cu(t.sampleOffset,32)})))throw new g("Not all entries can be represented in 64 bits.");this.PA=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)}}}(lu),function(t){function n(n){var i=t.call(this,"url ",0,void 0===n?1:0)||this;return i.location=n,i}Qo(n,t),p.defineProperty(n.prototype,"location",{get:function(){return this.WA},set:function(t){this.flags=void 0===t?1:0,this.WA=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))}}(lu),function(t){function n(n,i,e){var r=t.call(this,"urn ",0,e)||this;return r.name=n,r.location=i,r}Qo(n,t),p.defineProperty(n.prototype,"location",{get:function(){return this.WA},set:function(t){if(1&this.flags)throw new g("The moov containment flag is set, a DataEntryUrlBox should be used instead.");this.WA=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))}}(lu),function(t){function n(){return t.call(this,"dinf")||this}Qo(n,t)}(Yu),function(t){function n(n,i,e){var r=t.call(this,n)||this;if(r.version=i,!cu(i,8))throw new g("the provided version cannot fit in 8 bits.");return r.flags=e,r}return Qo(n,t),p.defineProperty(n.prototype,"flags",{get:function(){return this.Zd},set:function(t){this.Zd=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return 4},n.prototype.serializeFlags=function(t){if("number"!=typeof this.flags)throw new g("Missing custom serializeFlags method.");t.writer.writeUInt(this.flags,24)},n.prototype.serializeBoxContent=function(t){t.writer.writeByte(this.version),this.serializeFlags(t)},n}(ju)),Zu=(function(t){function n(){return t.call(this,"dref",0,0)||this}Qo(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)}}($u),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 Qo(n,t),p.defineProperty(n.prototype,"bitSize",{get:function(){return 0===this.version?32:64},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"entries",{get:function(){return this.PA},set:function(t){for(var n=0,i=t;n<i.length;n++){var e=i[n];if(!cu(e.segmentDuration,this.bitSize))throw new g("SegmentDuration of one of the entries does not fit in ".concat(this.bitSize," bits."));if(!cu(e.mediaTime,this.bitSize))throw new g("MediaTime of one of the entries does not fit in ".concat(this.bitSize," bits."));if(!cu(e.mediaRateInteger,16))throw new g("Provided mediaRateInteger does not fit in 16 bits.");if(e.mediaRateFraction&&!cu(e.mediaRateFraction,16))throw new g("Provided mediaRateFraction does not fit in 16 bits.")}this.PA=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}(lu)),Ju=function(t){function n(n,i){return void 0===i&&(i=0),t.call(this,n,0,i)||this}return Qo(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}(Zu),Qu=function(t){function n(n,i){return void 0===i&&(i=0),t.call(this,n,1,i)||this}return Qo(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}(Zu);function ts(t){for(var n=t.data,i=Uu(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 Ju(u,r.raw):new Qu(u,r.raw)}var ns=function(t){function n(){return t.call(this,"edts")||this}return Qo(n,t),n}(Yu);function is(t){for(var n=new ns,i=0,e=Bu(t.data);i<e.length;i++){var r=e[i];Cu(r,"elst")?n.boxes.push(ts(r)):n.boxes.push(Wu(r))}return n}var es=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 Qo(n,t),p.defineProperty(n.prototype,"majorBrand",{get:function(){return this.ZA},set:function(t){if(4!==t.length)throw new g("the provided major brand does not conform to the 4 character requirement");this.ZA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"minorVersion",{get:function(){return this.HA},set:function(t){if(!cu(t,32))throw new g("the provided minor version does not fit in 32 bits.");this.HA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"compatibleBrands",{get:function(){return this.XA},set:function(t){if(t.some((function(t){return 4!==t.length})))throw new g("Some of the compatible brands do not conform to the 4 character requirement");this.XA=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}(hu),rs=(function(t){function n(n,i,e){return t.call(this,"ftyp",n,i,e)||this}Qo(n,t)}(es),function(t){function n(n,i){void 0===i&&(i="free");var e=t.call(this,i)||this;return e.data=n,e}Qo(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(uu.from(this.data))}}(hu),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 Qo(n,t),p.defineProperty(n.prototype,"creationTime",{get:function(){return this.qA},set:function(t){if(!cu(t,this.bitSize))throw new g("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.qA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"modificationTime",{get:function(){return this.KA},set:function(t){if(!cu(t,this.bitSize))throw new g("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.KA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"timescale",{get:function(){return this.JA},set:function(t){if(!cu(t,32))throw new g("Provided sequence number does not fit in 32 bits.");this.JA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"duration",{get:function(){return this.$A},set:function(t){if(!cu(t,this.bitSize))throw new g("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.$A=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"language",{get:function(){return this.iy},set:function(t){if(!fs(t))throw new g("Expected an ISO-639-2/T language code");this.iy=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"bitSize",{get:function(){return 0===this.version?32:64},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.bitSize/8*3+4+2+2},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),this.serializeMdiaContent(n),n.writer.writeBit(0);for(var i=0,e=this.language;i<e.length;i++){var r=e[i];n.writer.writeUInt(r.charCodeAt(0)-96,5)}n.writer.writeUInt(0,16)},n}(lu)),os=function(t){function n(n,i,e){return void 0===e&&(e=0),t.call(this,n,i,0,e)||this}return Qo(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}(rs),us=function(t){function n(n,i,e){return void 0===e&&(e=0),t.call(this,n,i,1,e)||this}return Qo(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}(rs);function ss(t){var n=t.data,i=Uu(n.nextUint32()),e=i.version,r=i.flags,o=Lu(n,e),u=new ru(uu.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 fs(h)||(h="und"),n.skip(2),0===e?new os(o,h,r.raw):new us(o,h,r.raw)}function fs(t){return/^[a-z]{3}$/.test(t)}var hs=function(t){function n(){return t.call(this,"mdia")||this}return Qo(n,t),n}(Yu);function cs(t){for(var n=new hs,i=0,e=Bu(t.data);i<e.length;i++){var r=e[i];Cu(r,"mdhd")?n.boxes.push(ss(r)):Cu(r,"hdlr")?n.boxes.push(Vu(r)):n.boxes.push(Wu(r))}return n}var as;(function(t){function n(){var n=t.call(this,"mdat")||this;return n.data=new uu,n}Qo(n,t),n.prototype.getBoxContentSize=function(){return this.data.length},n.prototype.serializeBoxContent=function(t){t.concat(this.data)}})(hu),function(t){function n(){return t.call(this,"minf")||this}Qo(n,t)}(Yu),function(t){function n(n){var i=t.call(this,"meta",0,0)||this;return i.handler=n,i}Qo(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())}}($u);!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"}(as||(as={}));var vs,ds,ls={a:1,b:0,u:0,c:0,d:1,v:0,x:0,y:0,w:1};function ws(t,n){n.writer.writeUInt(au(t.a,16),32),n.writer.writeUInt(au(t.b,16),32),n.writer.writeUInt(au(0,30),32),n.writer.writeUInt(au(t.c,16),32),n.writer.writeUInt(au(t.d,16),32),n.writer.writeUInt(au(0,30),32),n.writer.writeUInt(au(t.x,16),32),n.writer.writeUInt(au(t.y,16),32),n.writer.writeUInt(au(1,30),32)}function bs(t,n){var i,e,r,o;n.writer.writeUInt(null!==(i=t.isLeading)&&void 0!==i?i:vs.UNKNOWN,2),n.writer.writeUInt(null!==(e=t.sampleDependsOn)&&void 0!==e?e:ds.UNKNOWN,2),n.writer.writeUInt(null!==(r=t.sampleIsDependedOn)&&void 0!==r?r:ds.UNKNOWN,2),n.writer.writeUInt(null!==(o=t.sampleHasRedundancy)&&void 0!==o?o:ds.UNKNOWN,2)}function gs(t,n){var i,e,r;n.writer.writeUInt(0,4),bs(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"}(vs||(vs={})),function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.YES=1]="YES",t[t.NO=2]="NO",t[t.RESERVED=3]="RESERVED"}(ds||(ds={}));var ms=function(){},ps=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 Qo(n,t),p.defineProperty(n.prototype,"systemId",{get:function(){return this.ey},set:function(t){if(16!==t.length)throw new g("Provided systemId length is not 16.");this.ey=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"data",{get:function(){return this.Hv},set:function(t){if(!cu(t.length,32))throw new g("Provided data length does not fit in 32 bits.");this.Hv=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(uu.from(this.systemId)),this.serializeVersionBoxContent(n),n.writer.writeUInt(this.data.length,32),n.concat(uu.from(this.data))},n}(lu),ys=function(t){function n(n,i){return t.call(this,0,n,i)||this}return Qo(n,t),n}(ps),_s=function(t){function n(n,i,e){var r=t.call(this,1,n,i)||this;return r.kIds=e,r}return Qo(n,t),p.defineProperty(n.prototype,"kIds",{get:function(){return this.sy},set:function(t){if(!cu(t.length,32))throw new g("Provided kIds length cannot fit in 32 bits.");if(t.some((function(t){return 16!==t.length})))throw new g("Not all provided key ids are 16 bytes long.");this.sy=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(uu.from(e))}},n}(ps);function Ss(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 _s(i,s,e):new ys(i,s)}var Ts=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 Qo(n,t),p.defineProperty(n.prototype,"bitSize",{get:function(){return 0===this.version?32:64},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"fragmentDuration",{get:function(){return this.oy},set:function(t){if(!cu(t,this.bitSize))throw new g("The provided fragmentDuration does not fit in ".concat(this.bitSize," bits."));this.oy=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.bitSize/8},n}(lu),Es=function(t){function n(n,i){return void 0===i&&(i=0),t.call(this,n,0,i)||this}return Qo(n,t),n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.fragmentDuration,32)},n}(Ts),Is=function(t){function n(n,i){return void 0===i&&(i=0),t.call(this,n,1,i)||this}return Qo(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}(Ts);function ks(t){var n=t.data,i=Uu(n.nextUint32()),e=i.version,r=i.flags;return 0===e?new Es(n.nextUint32(),r.raw):new Is(n.nextUint64(),r.raw)}var Rs=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 Qo(n,t),p.defineProperty(n.prototype,"trackId",{get:function(){return this.uy},set:function(t){if(!cu(t,32))throw new g("Provided track id does not fit in 32 bits.");this.uy=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"defaultSampleDescriptionIndex",{get:function(){return this.ly},set:function(t){if(!cu(t,32))throw new g("Provided default sample description index does not fit in 32 bits.");this.ly=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"defaultSampleDuration",{get:function(){return this.gy},set:function(t){if(!cu(t,32))throw new g("Provided default sample duration does not fit in 32 bits.");this.gy=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"defaultSampleSize",{get:function(){return this._y},set:function(t){if(!cu(t,32))throw new g("Provided default sample size does not fit in 32 bits.");this._y=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"defaultSampleFlags",{get:function(){return this.vy},set:function(t){if((null==t?void 0:t.samplePaddingValue)&&!cu(t.samplePaddingValue,3))throw new g("Provided sample padding value does not fit in 3 bits.");if((null==t?void 0:t.sampleDegradationPriority)&&!cu(t.sampleDegradationPriority,16))throw new g("Provided sample degradation priority does not fit in 16 bits.");this.vy=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),gs(null!==(i=this.defaultSampleFlags)&&void 0!==i?i:{},n)},n}(lu);function Os(t){var n=t.data,i=Uu(n.nextUint32()),e=i.version,r=i.flags,o=n.nextUint32(),u=n.nextUint32(),s=n.nextUint32(),f=n.nextUint32(),h=Fu(new ru(uu.from(n.nextUint8Array(4))));return new Rs(o,{sampleDescriptionIndex:u,sampleDuration:s,sampleSize:f,sampleFlags:h},e,r.raw)}var Ns=function(t){function n(){return t.call(this,"mvex")||this}return Qo(n,t),n}(Yu);function Ps(t){for(var n=new Ns,i=0,e=Bu(t.data);i<e.length;i++){var r=e[i];Cu(r,"mehd")?n.boxes.push(ks(r)):Cu(r,"trex")?n.boxes.push(Os(r)):n.boxes.push(Wu(r))}return n}var As=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:ls,c.wy=e,c}return Qo(n,t),p.defineProperty(n.prototype,"bitSize",{get:function(){return 0===this.version?32:64},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"creationTime",{get:function(){return this.qA},set:function(t){if(!cu(t,this.bitSize))throw new g("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.qA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"modificationTime",{get:function(){return this.KA},set:function(t){if(!cu(t,this.bitSize))throw new g("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.KA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"timescale",{get:function(){return this.JA},set:function(t){if(!cu(t,32))throw new g("Provided sequence number does not fit in 32 bits.");this.JA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"duration",{get:function(){return this.$A},set:function(t){if(!cu(t,this.bitSize))throw new g("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.$A=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"rate",{get:function(){return this.py},set:function(t){if(!cu(au(t,16),32))throw new g("Provided rate does not fit in 32 bits (fixed 16.16).");this.py=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"volume",{get:function(){return this.Ay},set:function(t){if(!cu(au(t,8),16))throw new g("Provided volume does not fit in 16 bits (fixed 8.8).");this.Ay=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"matrix",{get:function(){return this.yy},set:function(t){if(0!==t.u||0!==t.v||1!==t.w)throw new g("(u, v, w) does not match the required (0, 0, 1)");this.yy=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"nextTrackId",{get:function(){return this.wy},set:function(t){if(0===t)throw new g("NextTrackId cannot be 0.");if(!cu(t,32))throw new g("NextTrackId cannot exceed 32 bits.");this.wy=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(au(this.rate,16),32),n.writer.writeUInt(au(this.volume,8),16),n.writer.writeUInt(0,16),n.writer.writeUInt(0,32),n.writer.writeUInt(0,32),ws(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}(lu),Ds=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 Qo(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}(As),Cs=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 Qo(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}(As);function xs(t){var n=t.data,i=Uu(n.nextUint32()),e=i.version,r=i.flags,o=Lu(n,e),u=du(n.nextUint32(),16),s=du(n.nextUint16(),8);n.skip(2),n.skip(8);var f=zu(n);n.skip(24);var h=n.nextUint32();return 0===e?new Ds(o,h,{rate:u,volume:s,matrix:f},r.raw):new Cs(o,h,{rate:u,volume:s,matrix:f},r.raw)}var Bs=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:ls,a}return Qo(n,t),p.defineProperty(n.prototype,"bitSize",{get:function(){return 0===this.version?32:64},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"creationTime",{get:function(){return this.qA},set:function(t){if(!cu(t,this.bitSize))throw new g("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.qA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"modificationTime",{get:function(){return this.KA},set:function(t){if(!cu(t,this.bitSize))throw new g("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.KA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"trackId",{get:function(){return this.uy},set:function(t){if(0===t)throw new g("trackId cannot be 0.");if(!cu(t,32))throw new g("trackId cannot exceed 32 bits.");this.uy=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"duration",{get:function(){return this.$A},set:function(t){if(!cu(t,this.bitSize))throw new g("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.$A=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"volume",{get:function(){return this.Ay},set:function(t){if(!cu(au(t,8),16))throw new g("Provided volume does not fit in 16 bits (fixed 8.8).");this.Ay=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"width",{get:function(){return this.My},set:function(t){if(!cu(au(t,16),32))throw new g("Provided width does not fit in 32 bits (fixed 16.16).");this.My=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"height",{get:function(){return this.Ty},set:function(t){if(!cu(au(t,16),32))throw new g("Provided height does not fit in 32 bits (fixed 16.16).");this.Ty=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"layer",{get:function(){return this.Sy},set:function(t){if(!cu(t,16))throw new g("Provided layer does not fit in 16 bits.");this.Sy=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"alternateGroup",{get:function(){return this.Ny},set:function(t){if(!cu(t,16))throw new g("Provided alternateGroup does not fit in 16 bits.");this.Ny=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"matrix",{get:function(){return this.yy},set:function(t){if(0!==t.u||0!==t.v||1!==t.w)throw new g("(u, v, w) does not match the required (0, 0, 1)");this.yy=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(au(this.volume,8),16),n.writer.writeUInt(0,16),ws(this.matrix,n),n.writer.writeUInt(au(this.width,16),32),n.writer.writeUInt(au(this.height,16),32)},n}(lu),Ms=function(t){function n(n,i,e,r,o,u){return t.call(this,0,n,i,e,r,o,u)||this}return Qo(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}(Bs),Us=function(t){function n(n,i,e,r,o,u){return t.call(this,1,n,i,e,r,o,u)||this}return Qo(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}(Bs);function Ls(t){var n,i,e,r,o=t.data,u=Uu(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=du(o.nextInt16(),8);o.skip(2);var b=zu(o),g=du(o.nextUint32(),16),m=du(o.nextUint32(),16);return 0===s?new Ms({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 Us({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 Fs=function(t){function n(){return t.call(this,"trak")||this}return Qo(n,t),n}(Yu);function zs(t){for(var n=new Fs,i=0,e=Bu(t.data);i<e.length;i++){var r=e[i];Cu(r,"tkhd")?n.boxes.push(Ls(r)):Cu(r,"mdia")?n.boxes.push(cs(r)):Cu(r,"edts")?n.boxes.push(is(r)):n.boxes.push(Wu(r))}return n}var Ws=function(t){function n(){return t.call(this,"moov")||this}return Qo(n,t),n}(Yu);var Hs=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 Qo(n,t),p.defineProperty(n.prototype,"bitSize",{get:function(){return 0===this.version?32:64},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"baseMediaDecodeTime",{get:function(){return this.Iy},set:function(t){if(!cu(t,this.bitSize))throw new g("Provided baseMediaDecodeTime does not fit in ".concat(this.bitSize," bits."));this.Iy=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.bitSize/8},n}(lu),Vs=function(t){function n(n,i){return void 0===i&&(i=0),t.call(this,n,0,i)||this}return Qo(n,t),n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.baseMediaDecodeTime,32)},n}(Hs),qs=function(t){function n(n,i){return void 0===i&&(i=0),t.call(this,n,1,i)||this}return Qo(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}(Hs);function Xs(t){var n=t.data,i=Uu(n.nextUint32()),e=i.version,r=i.flags;return 0===e?new Vs(n.nextUint32(),r.raw):new qs(n.nextUint64(),r.raw)}var js=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 Qo(n,t),p.defineProperty(n.prototype,"trackId",{get:function(){return this.uy},set:function(t){if(!cu(t,32))throw new g("Provided track id does not fit in 32 bits.");this.uy=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"baseDataOffset",{get:function(){return this.Dy},set:function(t){if(void 0===t&&this.flags.baseDataOffsetPresent)throw new g("The base data offset present flag is set.");if(void 0!==t&&!this.flags.baseDataOffsetPresent)throw new g("The base data offset present flag is not set.");if(t&&!cu(t,64))throw new g("Provided baseDataOffset does not fit in 32 bits.");this.Dy=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"sampleDescriptionIndex",{get:function(){return this.Ey},set:function(t){if(void 0===t&&this.flags.sampleDescriptionIndexPresent)throw new g("The sample description index flag is set.");if(void 0!==t&&!this.flags.sampleDescriptionIndexPresent)throw new g("The sample description index flag is not set.");if(t&&!cu(t,32))throw new g("Provided sampleDescriptionIndex does not fit in 32 bits.");this.Ey=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"defaultSampleDuration",{get:function(){return this.gy},set:function(t){if(void 0===t&&this.flags.defaultSampleDurationPresent)throw new g("The default sample duration present flag is set.");if(void 0!==t&&!this.flags.defaultSampleDurationPresent)throw new g("The default sample duration present flag is not set.");if(t&&!cu(t,32))throw new g("Provided defaultSampleDuration does not fit in 32 bits.");this.gy=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"defaultSampleSize",{get:function(){return this._y},set:function(t){if(void 0===t&&this.flags.defaultSampleSizePresent)throw new g("The default sample size present flag is set.");if(void 0!==t&&!this.flags.defaultSampleSizePresent)throw new g("The default sample size present flag is not set.");if(t&&!cu(t,32))throw new g("Provided defaultSampleSize does not fit in 32 bits.");this._y=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"defaultSampleFlags",{get:function(){return this.vy},set:function(t){if(void 0===t&&this.flags.defaultSampleFlagsPresent)throw new g("The default sample flags present flag is set.");if(void 0!==t&&!this.flags.defaultSampleFlagsPresent)throw new g("The default sample flags present flag is not set.");if((null==t?void 0:t.samplePaddingValue)&&!cu(t.samplePaddingValue,3))throw new g("Provided sample padding value does not fit in 3 bits.");if((null==t?void 0:t.sampleDegradationPriority)&&!cu(t.sampleDegradationPriority,16))throw new g("Provided sample degradation priority does not fit in 16 bits.");this.vy=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&&gs(this.defaultSampleFlags,n)},n}(lu);function Ys(t){var n=t.data,i=n.nextUint8(),e=new ru(uu.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?Fu(new ru(uu.from(n.nextUint8Array(4)))):void 0;return new js({trackId:a,defaultBaseIsMoof:r,durationIsEmpty:o,baseDataOffset:v,sampleDescriptionIndex:d,defaultSampleDuration:l,defaultSampleSize:w,defaultSampleFlags:b},i)}var Ks=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 Qo(n,t),p.defineProperty(n.prototype,"dataOffset",{get:function(){return this.Ly},set:function(t){if(t&&!cu(t,32))throw new g("Provided data offset does not fit in 32 bits.");this.Ly=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"firstSampleFlags",{get:function(){return this.xy},set:function(t){if((null==t?void 0:t.samplePaddingValue)&&!cu(t.samplePaddingValue,3))throw new g("Provided sample padding value does not fit in 3 bits.");if((null==t?void 0:t.sampleDegradationPriority)&&!cu(t.sampleDegradationPriority,16))throw new g("Provided sample degradation priority does not fit in 16 bits.");this.xy=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"samples",{get:function(){return this.Cy},set:function(t){var n,i;if(!cu(t.length,32))throw new g("The sample count cannot be represented in 32 bits.");for(var e=0,r=t;e<r.length;e++){var o=r[e];if(void 0===o.duration&&this.flags.sampleDurationPresent)throw new g("The sample duration present flag is set.");if(void 0!==o.duration&&!this.flags.sampleDurationPresent)throw new g("The sample duration present flag is not set.");if(o.duration&&!cu(o.duration,32))throw new g("Provided sample duration does not fit in 32 bits.");if(void 0===o.size&&this.flags.sampleSizePresent)throw new g("The sample size present flag is set.");if(void 0!==o.size&&!this.flags.sampleSizePresent)throw new g("The sample size present flag is not set.");if(o.size&&!cu(o.size,32))throw new g("Provided sample size does not fit in 32 bits.");if(void 0===o.flags&&this.flags.sampleFlagsPresent)throw new g("The sample flags present flag is set.");if(void 0!==o.flags&&!this.flags.sampleFlagsPresent)throw new g("The sample flags present flag is not set.");if((null===(n=o.flags)||void 0===n?void 0:n.samplePaddingValue)&&!cu(o.flags.samplePaddingValue,3))throw new g("Provided sample padding value does not fit in 3 bits.");if((null===(i=o.flags)||void 0===i?void 0:i.sampleDegradationPriority)&&!cu(o.flags.sampleDegradationPriority,16))throw new g("Provided sample degradation priority does not fit in 16 bits.");if(void 0===o.compositionTimeOffset&&this.flags.sampleCompositionTimeOffsetsPresent)throw new g("The sample compositionTimeOffset present flag is set.");if(void 0!==o.compositionTimeOffset&&!this.flags.sampleCompositionTimeOffsetsPresent)throw new g("The sample compositionTimeOffset present flag is not set.");if(o.compositionTimeOffset&&!cu(o.compositionTimeOffset,32))throw new g("Provided sample compositionTimeOffset does not fit in 32 bits.")}this.Cy=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&&gs(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&&gs(r.flags,n),this.flags.sampleCompositionTimeOffsetsPresent&&(0===this.version?n.writer.writeUInt(r.compositionTimeOffset,32):n.writer.writeInt(r.compositionTimeOffset,32))}},n}(lu);function Gs(t){var n=t.data,i=n.nextUint8(),e=new ru(uu.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=Fu(new ru(uu.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=Fu(new ru(uu.from(n.nextUint8Array(4))))),r&&(l.compositionTimeOffset=0===i?n.nextUint32():n.nextInt32()),v.push(l)}return new Ks(i,a,v)}var $s=function(t){function n(){return t.call(this,"traf")||this}return Qo(n,t),n}(Yu);function Zs(t){for(var n=new $s,i=0,e=Bu(t.data);i<e.length;i++){var r=e[i];Cu(r,"tfhd")?n.boxes.push(Ys(r)):Cu(r,"tfdt")?n.boxes.push(Xs(r)):Cu(r,"trun")?n.boxes.push(Gs(r)):n.boxes.push(Wu(r))}return n}var Js=function(t){function n(){return t.call(this,"moof")||this}return Qo(n,t),n}(Yu);!function(t){function n(n){var i=t.call(this,"mfhd",0,0)||this;return i.sequenceNumber=n,i}Qo(n,t),p.defineProperty(n.prototype,"sequenceNumber",{get:function(){return this.jy},set:function(t){if(!cu(t,32))throw new g("Provided sequence number does not fit in 32 bits.");this.jy=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)}}(lu);var Qs=function(t){function n(n){var i=t.call(this,"frma")||this;return i.codingName=n,i}return Qo(n,t),p.defineProperty(n.prototype,"codingName",{get:function(){return this.Oy},set:function(t){if(4!==t.length)throw new g("Provided coding name was not 4 characters long.");this.Oy=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return 4},n.prototype.serializeBoxContent=function(t){t.writer.writeString(this.codingName)},n}(hu),tf=(function(t){function n(n,i){var e=t.call(this,"pasp")||this;return e.hSpacing=n,e.vSpacing=i,e}Qo(n,t),p.defineProperty(n.prototype,"hSpacing",{get:function(){return this.Ry},set:function(t){if(!cu(t,32))throw new g("Provided hSpacing does not fit in 32 bits.");this.Ry=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"vSpacing",{get:function(){return this.Py},set:function(t){if(!cu(t,32))throw new g("Provided vSpacing does not fit in 32 bits.");this.Py=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)}}(hu),function(t){function n(n,i,e){var r=t.call(this,n)||this;return r.sample=i,r.sinf=e,r}Qo(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())}}(Yu),function(t){function n(n,i,e){var r=t.call(this,"sinf")||this;return r.schm=i,r.schi=e,r.frma=new Qs(n),r}Qo(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())}}(hu),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 Qo(n,t),p.defineProperty(n.prototype,"bitSize",{get:function(){return 0===this.version?32:64},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"entries",{get:function(){return this.PA},set:function(t){var n=this;if(!cu(t.length,32))throw new g("Number of entries provided does not fit in 32 bits.");if(t.some((function(t){return!cu(t,n.bitSize)})))throw new g("Not all provided entries fit in ".concat(this.bitSize," bits."));this.PA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"explicitAuxInfoType",{get:function(){return this.zy},set:function(t){if(void 0===t)this.flags=0;else{if(!cu(t.auxInfoType,32))throw new g("Provided auxInfoType does not fit in 32 bits.");if(!cu(t.auxInfoTypeParameter,32))throw new g("Provided auxInfoTypeParameter does not fit in 32 bits.");this.flags=1}this.zy=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}(lu)),nf=(function(t){function n(){return null!==t&&t.apply(this,arguments)||this}Qo(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)}}}(tf),function(t){function n(){return null!==t&&t.apply(this,arguments)||this}Qo(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)}}}(tf),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}Qo(n,t),p.defineProperty(n.prototype,"defaultSampleInfoSize",{get:function(){return this.By},set:function(t){if(!cu(t,8))throw new g("Provided defaultSampleInfoSize does not fit in a single byte.");this.By=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"sampleInfoSizes",{get:function(){return this.Uy},set:function(t){if(!cu(t.length,32))throw new g("Number of sampleInfoSizes provided does not fit in 32 bits.");if(t.some((function(t){return!cu(t,8)})))throw new g("Not all provided sampleInfoSizes fit in a byte.");this.Uy=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"explicitAuxInfoType",{get:function(){return this.zy},set:function(t){if(void 0===t)this.flags=0;else{if(!cu(t.auxInfoType,32))throw new g("Provided auxInfoType does not fit in 32 bits.");if(!cu(t.auxInfoTypeParameter,32))throw new g("Provided auxInfoTypeParameter does not fit in 32 bits.");this.flags=1}this.zy=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+(void 0===this.explicitAuxInfoType?0:8)+1+4+(0!==this.defaultSampleInfoSize?0:this.sampleInfoSizes.length)},n.prototype.serializeBoxContent=function(n){if(0!==this.defaultSampleInfoSize&&this.sampleInfoSizes.length>0)throw new g("Both a default size and specific sizes are provided. This is prohibited.");t.prototype.serializeBoxContent.call(this,n),void 0!==this.explicitAuxInfoType&&(n.writer.writeUInt(this.explicitAuxInfoType.auxInfoType,32),n.writer.writeUInt(this.explicitAuxInfoType.auxInfoTypeParameter,32)),n.writer.writeByte(this.defaultSampleInfoSize),n.writer.writeUInt(this.sampleInfoSizes.length,32);for(var i=0,e=this.sampleInfoSizes;i<e.length;i++){var r=e[i];n.writer.writeByte(r)}}}(lu),function(t){function n(n){var i=t.call(this,"sdtp",0,0)||this;return i.samples=n,i}Qo(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++){bs(e[i],n)}}}(lu),function(t){function n(n){return t.call(this,"stsd",n,0)||this}Qo(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)}}($u),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 Qo(n,t),p.defineProperty(n.prototype,"groupingType",{get:function(){return this.Qy},set:function(t){if(4!==t.length)throw new g("The provided groupingType does not equal 4 characters.");this.Qy=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}(lu)),ef=(function(t){function n(n,i){return t.call(this,0,n,i)||this}Qo(n,t),n.prototype.serializeVersionBoxContent=function(t){}}(nf),function(t){function n(n,i,e){var r=t.call(this,1,n,e)||this;return r.defaultLength=i,r}Qo(n,t),p.defineProperty(n.prototype,"defaultLength",{get:function(){return this.Fy},set:function(t){if(!cu(t,32))throw new g("The provided defaultLength does not fit in 32 bits.");this.Fy=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)}}(nf),function(t){function n(n,i,e,r){void 0===r&&(r=0);var o=this;if(n<2)throw new g("This constructor is only meant for versions 2 and up.");return(o=t.call(this,n,i,e)||this).defaultSampleDescriptionIndex=r,o}Qo(n,t),p.defineProperty(n.prototype,"defaultSampleDescriptionIndex",{get:function(){return this.ly},set:function(t){if(!cu(t,32))throw new g("The provided defaultSampleDescriptionIndex does not fit in 32 bits.");this.ly=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)}}(nf),function(t){function n(n){void 0===n&&(n=[]);var i=t.call(this,"stsz",0,0)||this;return i.sampleSizes=n,i}Qo(n,t),p.defineProperty(n.prototype,"sampleSizes",{get:function(){return this.Yy},set:function(t){if(!cu(t.length,32))throw new g("Number of allowed samples cannot fit in 32 bits.");if(t.some((function(t){return!cu(t,32)})))throw new g("Not all sampleSizes can be represented in 32 bits.");this.Yy=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)}}}(lu),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}Qo(n,t),p.defineProperty(n.prototype,"defaultSampleSize",{get:function(){return this._y},set:function(t){if(!cu(t,32))throw new g("Provided defaultSampleSize does not fit in 32 bits.");this._y=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"samples",{get:function(){return this.Cy},set:function(t){if(!cu(t,32))throw new g("Number of allowed samples cannot fit in 32 bits.");this.Cy=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)}}(lu),function(t){function n(){return t.call(this,"stbl")||this}Qo(n,t)}(Yu),function(t){function n(n){var i=t.call(this,"stsc",0,0)||this;return i.entries=n,i}Qo(n,t),p.defineProperty(n.prototype,"entries",{get:function(){return this.PA},set:function(t){if(!cu(t.length,32))throw new g("Number of allowed entries cannot fit in 32 bits.");if(t.some((function(t){return!cu(t.firstChunk,32)||!cu(t.sampleDescriptionIndex,32)||!cu(t.samplesPerChunk,32)})))throw new g("Not all entries can be represented in 96 bits.");this.PA=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)}}}(lu),function(t){function n(){return t.call(this,"schi")||this}Qo(n,t)}(Yu),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}Qo(n,t),p.defineProperty(n.prototype,"schemeType",{get:function(){return this.Vy},set:function(t){if(4!==t.length)throw new g("The provided schemeType does not have a length of 4.");this.Vy=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"schemeVersion",{get:function(){return this.Gy},set:function(t){if(!cu(t,32))throw new g("The provided schemeVersion does not fit in 23 bits.");this.Gy=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"schemeUri",{get:function(){return this.Wy},set:function(t){if(t&&4!==t.length)throw new g("The provided schemeUri does not have a length of 4.");this.flags=void 0===t?0:1,this.Wy=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))}}(lu),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 Qo(n,t),p.defineProperty(n.prototype,"bitSize",{get:function(){return 0===this.version?32:64},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"referenceId",{get:function(){return this.Zy},set:function(t){if(!cu(t,32))throw new g("Provided referenceId does not fit in 32 bits.");this.Zy=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"timescale",{get:function(){return this.JA},set:function(t){if(!cu(t,32))throw new g("Provided timescale does not fit in 32 bits.");this.JA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"earliestPresentationTime",{get:function(){return this.Hy},set:function(t){if(!cu(t,this.bitSize))throw new g("Provided earliestPresentationTime does not fit in ".concat(this.bitSize," bits."));this.Hy=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"firstOffset",{get:function(){return this.Xy},set:function(t){if(!cu(t,this.bitSize))throw new g("Provided timescale does not fit in ".concat(this.bitSize," bits."));this.Xy=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"references",{get:function(){return this.qy},set:function(t){if(!cu(t.length,16))throw new g("The number of provided reference items does not fit in 16 bits.");for(var n=0,i=t;n<i.length;n++){var e=i[n];if(!cu(e.referencedSize,31))throw new g("Provided referenced size does not fit in 31 bits.");if(!cu(e.subsegmentDuration,32))throw new g("Provided subsegment duration does not fit in 31 bits.");if(!cu(e.sapType,3))throw new g("Provided SAP type does not fit in 3 bits.");if(!cu(e.sapDeltaTime,28))throw new g("Provided SAP delta time does not fit in 28 bits.")}this.qy=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}(lu)),rf=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 Qo(n,t),n.prototype.serializeSidxBoxContent=function(t){t.writer.writeUInt(this.earliestPresentationTime,32),t.writer.writeUInt(this.firstOffset,32)},n}(ef),of=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 Qo(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}(ef);(function(t){function n(n,i,e){return t.call(this,"styp",n,i,e)||this}Qo(n,t)})(es),function(t){function n(n){void 0===n&&(n=0);var i=t.call(this,"smhd",0,0)||this;return i.balance=n,i}Qo(n,t),p.defineProperty(n.prototype,"balance",{get:function(){return this.Ky},set:function(t){if(t<-1||t>1)throw new g("Provided balance does not fit in the allowed range [-1, 1].");if(!cu(au(t,8),16))throw new g("Provided balance does not fit in 16 bits (fixed 8.8).");this.Ky=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(au(this.balance,8),16),n.writer.writeUInt(0,16)}}(lu),function(t){function n(n){var i=t.call(this,"stss",0,0)||this;return i.entries=n,i}Qo(n,t),p.defineProperty(n.prototype,"entries",{get:function(){return this.PA},set:function(t){if(!cu(t.length,32))throw new g("Number of allowed entries cannot fit in 32 bits.");if(t.some((function(t){return!cu(t,32)})))throw new g("Not all entries can be represented in 32 bits.");this.PA=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)}}}(lu),function(t){function n(n){var i=t.call(this,"stts",0,0)||this;return i.entries=n,i}Qo(n,t),p.defineProperty(n.prototype,"entries",{get:function(){return this.PA},set:function(t){if(!cu(t.length,32))throw new g("Number of allowed entries cannot fit in 32 bits.");if(t.some((function(t){return!cu(t.sampleCount,32)||!cu(t.sampleDelta,32)})))throw new g("Not all entries can be represented in 64 bits.");this.PA=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)}}}(lu),function(t){function n(n){var i=t.call(this,"trep",0,0)||this;return i.trackId=n,i}Qo(n,t),p.defineProperty(n.prototype,"trackId",{get:function(){return this.uy},set:function(t){if(!cu(t,32))throw new g("The provided trackId does not fit in 32 bits.");this.uy=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)}}($u),function(t){function n(){return t.call(this,"udta")||this}Qo(n,t)}(Yu);var uf={red:0,green:0,blue:0},sf=(function(t){function n(n,i){void 0===n&&(n=0),void 0===i&&(i=uf);var e=t.call(this,"vmhd",0,1)||this;return e.graphicsMode=n,e.opColor=i,e}Qo(n,t),p.defineProperty(n.prototype,"opColor",{get:function(){return this.Jy},set:function(t){if(!cu(t.red,16)||!cu(t.green,16)||!cu(t.blue,16))throw new g("Not all colors could be represented in 16 bits.");this.Jy=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)}}(lu),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 Qo(n,t),p.defineProperty(n.prototype,"width",{get:function(){return this.My},set:function(t){if(!cu(t,16))throw new g("Provided width does not fit in 16 bits.");this.My=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"height",{get:function(){return this.Ty},set:function(t){if(!cu(t,16))throw new g("Provided height does not fit in 16 bits.");this.Ty=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"horizontalResolution",{get:function(){return this.$y},set:function(t){if(!cu(au(t,16),32))throw new g("Provided horizontalResolution does not fit in 32 bits (fixed 16.16).");this.$y=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"verticalResolution",{get:function(){return this.ib},set:function(t){if(!cu(au(t,16),32))throw new g("Provided verticalResolution does not fit in 32 bits (fixed 16.16).");this.ib=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"compressorName",{get:function(){return this.eb},set:function(t){if(t.length>31)throw new g("The provided compressorName should at most be 31 characters long.");this.eb=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"frameCount",{get:function(){return this.sb},set:function(t){if(!cu(t,16))throw new g("Provided frameCount does not fit in 16 bits.");this.sb=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"depth",{get:function(){return this.ob},set:function(t){if(!cu(t,16))throw new g("Provided depth does not fit in 16 bits.");this.ob=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(au(this.horizontalResolution,16),32),n.writer.writeUInt(au(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&&vu(n.writer,this.extra)},n}(Ku)),ff=(function(t){function n(n){var i=t.call(this,"esds",0,0)||this;return i.esDescriptor=n,i}Qo(n,t),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+(this.esDescriptor instanceof E?this.esDescriptor.length:this.esDescriptor.getSize())},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),this.esDescriptor instanceof E?n.concat(uu.from(this.esDescriptor)):this.esDescriptor.serialize(n)}}(lu),function(t){function n(n,i,e){var r=t.call(this,"mp4a",n,e)||this;return r.esd=i,r}Qo(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())}}(Gu),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}Qo(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)}}(sf),function(t){function n(n,i){var e=t.call(this,"mp4s",n)||this;return e.esDescriptor=i,e}Qo(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)}}(Ku),function(t){function n(n){var i=t.call(this,"avcC")||this;return i.decoderConfig=n,i}Qo(n,t),n.prototype.getBoxContentSize=function(){return this.decoderConfig.getSize()},n.prototype.serializeBoxContent=function(t){this.decoderConfig.serialize(t)}}(hu),function(){function t(t,n,i,e,r,o){void 0===o&&(o=1),this.lengthSizeMinusOne=i,this.version=o,this.profileIndication=t.indication,this.profileCompatibility=t.compatibility,this.levelIndication=n,this.spsSets=e,this.ppsSets=r}p.defineProperty(t.prototype,"version",{get:function(){return this.hb},set:function(t){if(!cu(t,8))throw new g("Provided version does not fit in 8 bits.");this.hb=t},enumerable:!1,configurable:!0}),p.defineProperty(t.prototype,"profileIndication",{get:function(){return this.ub},set:function(t){if(!cu(t,8))throw new g("Provided profileIndication does not fit in 8 bits.");this.ub=t},enumerable:!1,configurable:!0}),p.defineProperty(t.prototype,"profileCompatibility",{get:function(){return this.fb},set:function(t){if(!cu(t,8))throw new g("Provided profileCompatibility does not fit in 8 bits.");this.fb=t},enumerable:!1,configurable:!0}),p.defineProperty(t.prototype,"levelIndication",{get:function(){return this.gb},set:function(t){if(!cu(t,8))throw new g("Provided levelIndication does not fit in 8 bits.");this.gb=t},enumerable:!1,configurable:!0}),p.defineProperty(t.prototype,"spsSets",{get:function(){return this._b},set:function(t){if(!cu(t.length,5))throw new g("Provided number of spsSets exceeds the max (32)");this._b=t},enumerable:!1,configurable:!0}),p.defineProperty(t.prototype,"ppsSets",{get:function(){return this.vb},set:function(t){if(!cu(t.length,8))throw new g("Provided number of ppsSets exceeds the max (256)");this.vb=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(uu.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(uu.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}Qo(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())}}(sf),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}Qo(n,t),p.defineProperty(n.prototype,"bufferSizeDb",{get:function(){return this.NA},set:function(t){if(!cu(t,32))throw new g("Provided bufferSizeDb does not fit in 32 bits.");this.NA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"max",{get:function(){return this.mf},set:function(t){if(!cu(t,32))throw new g("Provided max does not fit in 32 bits.");this.mf=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"avg",{get:function(){return this.wb},set:function(t){if(!cu(t,32))throw new g("Provided avg does not fit in 32 bits.");this.wb=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)}}(hu),function(t){function n(n,i){var e,r,o,u,s=this;if(s=t.call(this,"tenc",n,0)||this,i.perSampleIvSize>0&&(null!==(r=null===(e=i.constantIv)||void 0===e?void 0:e.length)&&void 0!==r?r:0)>0)throw new g("Either perSampleSize should be > 0 or constantIv should be defined. Not both.");return s.kId=i.kId,s.isProtected=null!==(o=i.isProtected)&&void 0!==o?o:1,i.perSampleIvSize>0?s.perSampleIvSize=i.perSampleIvSize:s.constantIv=null!==(u=i.constantIv)&&void 0!==u?u:new E(0),s}return Qo(n,t),p.defineProperty(n.prototype,"isProtected",{get:function(){return this.mb},set:function(t){if(!cu(t,8))throw new g("Provided isProtected does not fit in 1 byte.");this.mb=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"perSampleIvSize",{get:function(){return this.pb},set:function(t){if(![8,16].includes(t))throw new g("Provided perSampleIvSize does not match any allowed value [8, 16].");this.pb=t,this.Ab=new E(0)},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"kId",{get:function(){return this.yb},set:function(t){if(16!==t.length)throw new g("Provided kId length is not 16.");this.yb=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"constantIv",{get:function(){return this.Ab},set:function(t){if(![8,16].includes(t.length))throw new g("Provided constant IV length does not match any allowed value [8, 16].");this.Ab=t,this.pb=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),vu(t.writer,this.kId),0===this.perSampleIvSize&&(t.writer.writeByte(this.constantIv.length),vu(t.writer,this.constantIv))},n}(lu)),hf=(function(t){function n(n){return t.call(this,0,n)||this}Qo(n,t)}(ff),function(t){function n(n){var i=t.call(this,1,n)||this;return i.cryptByteBlocks=n.cryptByteBlock,i.skipByteBlocks=n.skipByteBlock,i}return Qo(n,t),p.defineProperty(n.prototype,"cryptByteBlocks",{get:function(){return this.bb},set:function(t){if(!cu(t,4))throw new g("Provided cryptByteBlocks does not fit in 4 bits.");this.bb=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"skipByteBlocks",{get:function(){return this.Mb},set:function(t){if(!cu(t,4))throw new g("Provided skipByteBlocks does not fit in 4 bits.");this.Mb=t},enumerable:!1,configurable:!0}),n.prototype.serializeVersionBoxContent=function(t){t.writer.writeUInt(this.cryptByteBlocks,4),t.writer.writeUInt(this.skipByteBlocks,4)},n}(ff));!function(t){function n(n){var i=t.call(this)||this;return i.tencBox=new hf(n),i}Qo(n,t),n.prototype.serializeBoxContent=function(t){this.tencBox.serializeOwnContent(t)},n.prototype.getBoxContentSize=function(){return this.tencBox.getTencHeaderSize()}}(ms);function cf(t){return void 0!==t.iv}function af(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}Qo(n,t),p.defineProperty(n.prototype,"samples",{get:function(){return this.Cy},set:function(t){var n;if(!cu(t.length,32))throw new g("The number of samples provided does not fit in 32 bits.");for(var i=0,e=t;i<e.length;i++){var r=e[i];if(cf(r)&&![8,16].includes(r.iv.length))throw new g("IV of one of the provided samples did not satisfy the required length constraints. [8, 16]");if(void 0===n&&(n=af(r)),!0===n&&!af(r)||!1===n&&af(r))throw new g("Mix of samples with and without subsamples detected.");if(af(r)){if(!cu(r.subsamples.length,16))throw new g("Subsample length of one of the provided samples does not fit in 16 bits.");for(var o=0,u=r.subsamples;o<u.length;o++){var s=u[o];if(!cu(s.clearData,16))throw new g("Subsample clearData of one of the provided samples does not fit in 16 bits.");if(!cu(s.protectedData,23))throw new g("Subsample protectedData of one of the provided samples does not fit in 23 bits.")}}}this.flags.useSubsampleEncryption=null!=n&&n,this.Cy=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];cf(r)&&(n+=r.iv.length),af(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(cf(r)&&vu(n.writer,r.iv),af(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)}})(lu),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}Qo(n,t),p.defineProperty(n.prototype,"timescale",{get:function(){return this.JA},set:function(t){if(!cu(t,32))throw new g("The provided timescale does not fit in 32 bits.");this.JA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"presentationTimeDelta",{get:function(){return this.Tb},set:function(t){if(!cu(t,32))throw new g("The provided presentationTimeDelta does not fit in 32 bits.");this.Tb=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"eventDuration",{get:function(){return this.Sb},set:function(t){if(!cu(t,32))throw new g("The provided eventDuration does not fit in 32 bits.");this.Sb=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"id",{get:function(){return this.Nb},set:function(t){if(!cu(t,32))throw new g("The provided id does not fit in 32 bits.");this.Nb=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(uu.from(this.data))}}(lu),function(){function t(){this.boxes=[]}t.prototype.serialize=function(){for(var t=new fu,n=0,i=this.boxes;n<i.length;n++){var e=i[n];t.concat(e.serialize())}return t.toRangedBuffer()}}();function vf(t,n){return function(i){var e=new Du(function(t){return new DataView(t.buffer,t.byteOffset,t.byteLength)}(i),new Au),r=function(t,n){for(var i=t.data,e=t.cursor;e.offset<i.byteLength;){var r=Mu(i,e);if(!r.complete)return;if(Cu(r.box,n))return r.box}}(e,t);if(!r)throw new g("".concat(t," box not found"));return n(r)}}vf("moov",(function(t){for(var n=new Ws,i=0,e=Bu(t.data);i<e.length;i++){var r=e[i];Cu(r,"mvhd")?n.boxes.push(xs(r)):Cu(r,"trak")?n.boxes.push(zs(r)):Cu(r,"mvex")?n.boxes.push(Ps(r)):Cu(r,"pssh")?n.boxes.push(Ss(r)):n.boxes.push(Wu(r))}return n})),vf("sidx",(function(t){var n,i,e=t.data,r=Uu(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 ru(uu.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 rf(s,f,n,i,c,u.raw):new of(s,f,n,i,c,u.raw)})),vf("moof",(function(t){for(var n=new Js,i=0,e=Bu(t.data);i<e.length;i++){var r=e[i];Cu(r,"traf")?n.boxes.push(Zs(r)):Cu(r,"pssh")?n.boxes.push(Ss(r)):n.boxes.push(Wu(r))}return n}));var df=vf("pssh",Ss),lf=function(t){function n(n,i){var e;(e=t.call(this)||this).kb=n,e.Bb=i,e.Cb=!1,e.Ub=function(){e.Pb()},e.Qb=function(t){e.yo(new bo(e,t.messageType,Go(e.Bb,t.message)))},e.Fb=function(){e.Cb=!0,e.Lb.qp>0&&(e.Lb.iA(),e.yo(new wo(e.Lb))),e.kb.removeEventListener("keystatuseschange",e.Ub),e.kb.removeEventListener("message",e.Qb)},e.kb.addEventListener("keystatuseschange",e.Ub),e.kb.addEventListener("message",e.Qb),e.Lb=new Yo;var r=[];return e.kb.closed&&r.push(Q.resolve(e.kb.closed)),e.jb=new Ko,r.push(e.jb.rA),e.Db=Q.race(r).then(e.Fb,e.Fb),e.Pb(),e}ft(n,t);var i=n.prototype;return i.Ws=function(){if(this.Cb)return this.Db;var t=[];return t.push(Q.resolve(this.kb.close())),t.push(so(1e3)),this.jb.Em(Q.race(t).catch(wf)),this.Cb=!0,this.Db},i.Ob=function(t,n,i){if(Et.Rg){var e=df(Lo(n));if(1===e.version)n=new ys(e.systemId,e.data).serialize().join()}return Q.resolve(this.kb.generateRequest(t,n)).catch(wf)},i.$n=function(t){return Q.resolve(this.kb.load(t)).catch(wf)},i.Rb=function(){return Q.resolve(this.kb.remove()).catch(wf)},i.Yn=function(t){return Q.resolve(this.kb.update(t)).catch(wf)},i.Pb=function(){var t=this;this.Lb.iA(),this.kb.keyStatuses.forEach((function(n,i){t.zb(i,n)})),this.yo(new wo(this.Lb))},i.zb=function(t,n){if("string"==typeof t){var i=t;t=n,n=i}var e=Lo(t);if(this.Bb===Cr&&16===e.byteLength){var r=Mo(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.Bb===Cr&&"status-pending"===n&&(n="usable"),this.Lb.$p(e,n)},ct(n,[{key:"Ib",get:function(){return this.Db}},{key:"Eb",get:function(){return this.kb.expiration}},{key:"Op",get:function(){return this.Lb}},{key:"xb",get:function(){return this.kb.sessionId}}]),n}(ho);function wf(t){var n;if(t.message){var i=t.message.match(/^SystemCode:0x([0-9a-fA-F]+)$/);i&&(n=0|_(i[1],16))}throw new Zo(t.message,void 0,n,t)}var bf=function(){function t(t,n,i){this.Vb=t,this.Gb=n,this.md=i}var n=t.prototype;return n.Yb=function(t){var n=this;return rr((function(){return or(this,(function(i){return[2,new lf(n.Vb.createSession(t),n.Gb)]}))}))()},n.Wb=function(t){return Q.resolve(this.Vb.setServerCertificate(t))},n.bn=function(t){return Q.resolve(t.setMediaKeys(this.Vb))},n.Zb=function(t){return Q.resolve(t.setMediaKeys(null))},n.tr=function(){return Q.resolve()},t}(),gf=function(){function t(t,n,i){this.Hb=t,this.Bb=n,this.qb=i}var n=t.prototype;return n.Xb=function(){var t=this;return rr((function(){var n;return or(this,(function(i){switch(i.label){case 0:return[4,t.Hb.createMediaKeys()];case 1:return n=i.sent(),[2,new bf(n,t.Bb,t.qb)]}}))}))()},n.Kb=function(){return this.qb},ct(t,[{key:"Gb",get:function(){return this.Hb.keySystem}}]),t}();function mf(t){var n=t.trim(),i=n.indexOf(";");return i<0?n:n.substr(0,i).trim()}function pf(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,tM:e.tM},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 yf(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 yf(t,n,i,e)})),u=!0,o.videoCapabilities.length&&(r=!0))}return u||(r=t(i,"video/mp4")),r?o:void 0}}function yf(t,n,i,e){return!!e.contentType&&(!(e.encryptionScheme&&!ar(n,e.encryptionScheme))&&(!e.robustness&&t(i,mf(e.contentType))))}function _f(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 Sf(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 Tf(t){return!(!t.audioCapabilities||!t.audioCapabilities.some(Ef))||!(!t.videoCapabilities||!t.videoCapabilities.some(Ef))}function Ef(t){return!t.robustness}function If(t,n){for(var i=[],e=0;e<t.length;e++){var r=t[e];r.robustness?i.push(r):i.push(kr({},r,{robustness:n}))}return i}var kf=function(){function t(){}return t.prototype.nm=function(t,n){return rr((function(){var i,e,r,o,u,s,f;return or(this,(function(h){switch(h.label){case 0:for(n=n.filter((function(t){return!t.tM})),i=0;i<n.length;i++)(e=n[i]).audioCapabilities&&(e.audioCapabilities=Sf(e.audioCapabilities)),e.videoCapabilities&&(e.videoCapabilities=Sf(e.videoCapabilities));if(t!==Mr||!n.some(Tf))return[3,4];r=n.map((function(t){return function(t,n){return kr({},t,{videoCapabilities:t.videoCapabilities?If(t.videoCapabilities,n):void 0,audioCapabilities:t.audioCapabilities?If(t.audioCapabilities,n):void 0})}(t,"SW_SECURE_CRYPTO")})),h.label=1;case 1:return h.trys.push([1,3,,4]),[4,v.requestMediaKeySystemAccess(t,r)];case 2:return o=h.sent(),u=o.getConfiguration(),[2,new gf(o,t,u)];case 3:return h.sent(),[3,4];case 4:return[4,v.requestMediaKeySystemAccess(t,n)];case 5:return s=h.sent(),f=s.getConfiguration(),[2,new gf(s,t,f)]}}))}))()},t.iM=function(){return void 0!==v&&"function"==typeof v.requestMediaKeySystemAccess},t}(),Rf=function(t){function n(n,i){var e;return(e=t.call(this)||this).aM=n,e.uM=i,e.Cb=!1,e.fM=void 0,e.oM=void 0,e.eM=void 0,e.Fb=function(){e.Cb=!0,e.sM.eA(void 0),e.eM&&(e.eM.removeEventListener("mskeyclose",e.Fb),e.eM.removeEventListener("mskeymessage",e.cM),e.eM.removeEventListener("mskeyerror",e.Ss),e.eM.removeEventListener("mskeyadded",e.lM))},e.cM=function(t){e.oM&&(e.oM.eA(void 0),e.oM=void 0),e.yo(new bo(e,"license-request",Fo(t.message).buffer,t.destinationURL||void 0))},e.Ss=function(){var t=e.eM&&e.eM.error;if(t){var n=new Zo("Unknown CDM error",t.code,t.systemCode);if(e.oM)e.oM.sA(n),e.oM=void 0;else if(e.fM)e.fM.sA(n),e.fM=void 0;else switch(n.oA){case MSMediaKeyError.MS_MEDIA_KEYERR_OUTPUT:case MSMediaKeyError.MS_MEDIA_KEYERR_HARDWARECHANGE:e.dM("output-not-allowed");break;default:e.dM("internal-error")}}},e.lM=function(){e.oM&&(e.dM("usable"),e.oM.eA(void 0),e.oM=void 0),e.fM&&(e.dM("usable"),e.fM.eA(void 0),e.fM=void 0)},e.sM=new Ko,e.nM=new Yo,e}ft(n,t);var i=n.prototype;return i.Ob=function(t,n,i){var e=this;return rr((function(){return or(this,(function(t){switch(t.label){case 0:return e.rM(),e.oM=new Ko,e.Yb(Lo(n),i),[4,e.oM.rA];case 1:return t.sent(),[2]}}))}))()},i.Yb=function(t,n){if(!t)throw new m("Expected initData to be defined but was "+t+".");var i,e=n&&n.playready&&n.playready.hM;return(i=n?this.aM.createSession(this.uM,t,e):this.aM.createSession(this.uM,t)).addEventListener("mskeyclose",this.Fb),i.addEventListener("mskeymessage",this.cM),i.addEventListener("mskeyerror",this.Ss),i.addEventListener("mskeyadded",this.lM),this.eM=i,this.dM("status-pending"),i},i.$n=function(t){var n=this;return rr((function(){return or(this,(function(t){return n.rM(),[2,!0]}))}))()},i.Yn=function(t){var n=this;return rr((function(){var i;return or(this,(function(e){switch(e.label){case 0:if(n.fM=new Ko,n.rM(),!n.eM)return[2,Q.resolve()];if(0===(i=Lo(t)).byteLength)throw new m("Cannot call update with an empty response.");return n.eM.update(i),[4,n.fM.rA];case 1:return e.sent(),[2]}}))}))()},i.Ws=function(){return!this.Cb&&this.eM&&(this.Cb=!0,this.eM.close()),this.sM.rA},i.Rb=function(){var t=this;return rr((function(){return or(this,(function(n){return t.rM(),[2]}))}))()},i.rM=function(){if(this.Cb)throw new m("Already closing or closed.")},i.dM=function(t){this.nM.iA(),this.nM.$p(jo,t),this.yo(new wo(this.nM))},ct(n,[{key:"xb",get:function(){return this.eM&&this.eM.sessionId||""}},{key:"Eb",get:function(){return NaN}},{key:"Ib",get:function(){return this.sM.rA}},{key:"Op",get:function(){return this.nM}}]),n}(ho),Of=function(){function t(t,n,i){this.aM=t,this.Gb=n,this.md=i;var e=_f(i)||"video/mp4";this.uM=mf(e)}var n=t.prototype;return n.Yb=function(t){var n=this;return rr((function(){return or(this,(function(t){return[2,new Rf(n.aM,n.uM)]}))}))()},n.Wb=function(t){return Q.resolve(!1)},n.bn=function(t){var n=this,i=function(){t.msSetMediaKeys(n.aM),t.removeEventListener("loadedmetadata",i)};return t.readyState>=1?t.msSetMediaKeys(this.aM):t.addEventListener("loadedmetadata",i),Q.resolve()},n.Zb=function(t){return Q.resolve()},n.tr=function(){return Q.resolve()},t}(),Nf=function(){function t(t,n){this.Bb=t,this.gM=n}var n=t.prototype;return n.Kb=function(){return this.gM},n.Xb=function(){var t=new En.MSMediaKeys(this.Bb);return Q.resolve(new Of(t,this.Bb,this.gM))},ct(t,[{key:"Gb",get:function(){return this.Bb}}]),t}(),Pf=function(){function t(){}return t.prototype.nm=function(t,n){try{return Q.resolve(function(t,n){if(!Af())throw new m("Unsupported key system "+t);for(var i=0;i<n.length;i++){var e=n[i],r=pf(Df,vo,t,e);if(r)return new Nf(t,r)}throw new m("Unsupported key system configuration for "+t)}(t,n))}catch(t){return Q.reject(t)}},t.iM=function(){return Af()},t}();function Af(){return void 0!==En.MSMediaKeys&&"function"==typeof En.MSMediaKeys.isTypeSupported}function Df(t,n){return En.MSMediaKeys.isTypeSupported(t,n)}var Cf=function(t){function n(n,i,e){var r;return(r=t.call(this)||this).mM=n,r.uM=i,r.wM=e,r.sM=new Ko,r.AM=void 0,r.nM=new Yo,r._M=void 0,r.pM=new Ko,r.Ss=function(){var t=r._M&&r._M.error;if(t){var n=new Zo("Unknown CDM error",t.code,t.systemCode);r.AM?(r.AM.sA(n),r.AM=void 0):n.oA===WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT?r.dM("output-not-allowed"):r.dM("internal-error"),r.yo(new go)}},r.cM=function(t){r.yo(new bo(r,"license-request",Fo(t.message).buffer,"this is a test string"===t.destinationURL?void 0:t.destinationURL))},r.lM=function(){r.AM&&(r.AM.eA(void 0),r.AM=void 0),r.dM("usable")},r}ft(n,t);var i=n.prototype;return i.Ob=function(t,n,i){var e=i&&i.fairplay&&i.fairplay.vM;if(!e)throw new m("Expected FairPlay contentId to be defined but was "+e+".");var r=function(t,n,i){var e=xo(t),r=2*e.length,o=2*n.length,u=new ArrayBuffer(4+r+4+o+4+i.byteLength),s=new DataView(u),f=new zo;return Ao(s,f,r,!0),Do(s,f,e,!0),Ao(s,f,o,!0),Do(s,f,n,!0),Ao(s,f,i.byteLength,!0),function(t,n,i){Uo(t).set(Uo(i),n.tc),n.Vp(i.byteLength)}(s,f,i),new E(u)}(Lo(n),e,this.wM);return this._M=this.mM.createSession(this.uM,r),this._M.addEventListener("webkitkeymessage",this.cM,!1),this._M.addEventListener("webkitkeyadded",this.lM,!1),this._M.addEventListener("webkitkeyerror",this.Ss,!1),this.dM("status-pending"),this.pM.eA(this._M),this.pM=new Ko,Q.resolve()},i.$n=function(t){return Q.resolve(!0)},i.Yn=function(t){var n=this;return rr((function(){var i,e;return or(this,(function(r){switch(r.label){case 0:if(0===(i=Lo(t)).byteLength)throw new m("Cannot call update with an empty response.");return n.AM=new Ko,(e=n._M)?[3,2]:[4,n.pM.rA];case 1:e=r.sent(),r.label=2;case 2:return e.update(i),[4,n.AM.rA];case 3:return r.sent(),[2]}}))}))()},i.Ws=function(){var t,n=this._M;return n&&(n.removeEventListener("webkitkeymessage",this.cM,!1),n.removeEventListener("webkitkeyadded",this.lM,!1),n.removeEventListener("webkitkeyerror",this.Ss,!1),n.close()),this.pM.Dm(),null==(t=this.AM)||t.Dm(),this.sM.eA(void 0),this.sM.rA},i.Rb=function(){return Q.resolve(void 0)},i.dM=function(t){this.nM.iA(),this.nM.$p(jo,t),this.yo(new wo(this.nM))},ct(n,[{key:"xb",get:function(){return this._M?this._M.sessionId:""}},{key:"Eb",get:function(){return NaN}},{key:"Ib",get:function(){return this.sM.rA}},{key:"Op",get:function(){return this.nM}}]),n}(ho);var xf=function(t){return t[t.CONFIGURATION_ERROR=1e3]="CONFIGURATION_ERROR",t[t.LICENSE_ERROR=2e3]="LICENSE_ERROR",t[t.LICENSE_INVALID_DOMAIN=2001]="LICENSE_INVALID_DOMAIN",t[t.LICENSE_INVALID_SOURCE=2002]="LICENSE_INVALID_SOURCE",t[t.LICENSE_EXPIRED=2003]="LICENSE_EXPIRED",t[t.LICENSE_INVALID_FEATURE=2004]="LICENSE_INVALID_FEATURE",t[t.SOURCE_INVALID=3e3]="SOURCE_INVALID",t[t.SOURCE_NOT_SUPPORTED=3001]="SOURCE_NOT_SUPPORTED",t[t.MANIFEST_LOAD_ERROR=4e3]="MANIFEST_LOAD_ERROR",t[t.MANIFEST_CORS_ERROR=4001]="MANIFEST_CORS_ERROR",t[t.MANIFEST_PARSE_ERROR=4002]="MANIFEST_PARSE_ERROR",t[t.MEDIA_NOT_SUPPORTED=5e3]="MEDIA_NOT_SUPPORTED",t[t.MEDIA_LOAD_ERROR=5001]="MEDIA_LOAD_ERROR",t[t.MEDIA_DECODE_ERROR=5002]="MEDIA_DECODE_ERROR",t[t.MEDIA_AVPLAYER_ERROR=5003]="MEDIA_AVPLAYER_ERROR",t[t.MEDIA_ABORTED=5004]="MEDIA_ABORTED",t[t.NETWORK_ERROR=6e3]="NETWORK_ERROR",t[t.NETWORK_TIMEOUT=6001]="NETWORK_TIMEOUT",t[t.CONTENT_PROTECTION_ERROR=7e3]="CONTENT_PROTECTION_ERROR",t[t.CONTENT_PROTECTION_NOT_SUPPORTED=7001]="CONTENT_PROTECTION_NOT_SUPPORTED",t[t.CONTENT_PROTECTION_CONFIGURATION_MISSING=7002]="CONTENT_PROTECTION_CONFIGURATION_MISSING",t[t.CONTENT_PROTECTION_CONFIGURATION_INVALID=7003]="CONTENT_PROTECTION_CONFIGURATION_INVALID",t[t.CONTENT_PROTECTION_INITIALIZATION_INVALID=7004]="CONTENT_PROTECTION_INITIALIZATION_INVALID",t[t.CONTENT_PROTECTION_CERTIFICATE_ERROR=7005]="CONTENT_PROTECTION_CERTIFICATE_ERROR",t[t.CONTENT_PROTECTION_CERTIFICATE_INVALID=7006]="CONTENT_PROTECTION_CERTIFICATE_INVALID",t[t.CONTENT_PROTECTION_LICENSE_ERROR=7007]="CONTENT_PROTECTION_LICENSE_ERROR",t[t.CONTENT_PROTECTION_LICENSE_INVALID=7008]="CONTENT_PROTECTION_LICENSE_INVALID",t[t.CONTENT_PROTECTION_KEY_EXPIRED=7009]="CONTENT_PROTECTION_KEY_EXPIRED",t[t.CONTENT_PROTECTION_KEY_MISSING=7010]="CONTENT_PROTECTION_KEY_MISSING",t[t.CONTENT_PROTECTION_OUTPUT_RESTRICTED=7011]="CONTENT_PROTECTION_OUTPUT_RESTRICTED",t[t.CONTENT_PROTECTION_INTERNAL_ERROR=7012]="CONTENT_PROTECTION_INTERNAL_ERROR",t[t.SUBTITLE_LOAD_ERROR=8e3]="SUBTITLE_LOAD_ERROR",t[t.SUBTITLE_CORS_ERROR=8001]="SUBTITLE_CORS_ERROR",t[t.SUBTITLE_PARSE_ERROR=8002]="SUBTITLE_PARSE_ERROR",t[t.VR_PLATFORM_UNSUPPORTED=9e3]="VR_PLATFORM_UNSUPPORTED",t[t.VR_PRESENTATION_ERROR=9001]="VR_PRESENTATION_ERROR",t[t.AD_ERROR=1e4]="AD_ERROR",t[t.AD_BLOCKER_DETECTED=10001]="AD_BLOCKER_DETECTED",t[t.FULLSCREEN_ERROR=11e3]="FULLSCREEN_ERROR",t[t.PICTURE_IN_PICTURE_ERROR=11001]="PICTURE_IN_PICTURE_ERROR",t[t.CACHE_SOURCE_ERROR=12e3]="CACHE_SOURCE_ERROR",t[t.CACHE_CONTENT_PROTECTION_ERROR=12001]="CACHE_CONTENT_PROTECTION_ERROR",t[t.THEO_LIVE_UNKNOWN_ERROR=13e3]="THEO_LIVE_UNKNOWN_ERROR",t[t.THEO_LIVE_CHANNEL_NOT_FOUND=13001]="THEO_LIVE_CHANNEL_NOT_FOUND",t[t.THEO_LIVE_END_OF_DEMO=13002]="THEO_LIVE_END_OF_DEMO",t[t.THEO_LIVE_ANALYTICS_ERROR=13003]="THEO_LIVE_ANALYTICS_ERROR",t}({}),Bf=function(t){return t[t.CONFIGURATION=1]="CONFIGURATION",t[t.LICENSE=2]="LICENSE",t[t.SOURCE=3]="SOURCE",t[t.MANIFEST=4]="MANIFEST",t[t.MEDIA=5]="MEDIA",t[t.NETWORK=6]="NETWORK",t[t.CONTENT_PROTECTION=7]="CONTENT_PROTECTION",t[t.SUBTITLE=8]="SUBTITLE",t[t.VR=9]="VR",t[t.AD=10]="AD",t[t.FULLSCREEN=11]="FULLSCREEN",t[t.CACHE=12]="CACHE",t[t.THEOLIVE=13]="THEOLIVE",t}({});!function(t){t.fromCode=function(n){var i=y.floor(n/1e3);if(i in t)return i;throw new m("Invalid error code: "+n)}}(Bf||(Bf={}));var Mf=function(t){function n(n,i,e){var r;return(r=t.call(this,i,e)||this).code=n,r}return ft(n,t),ct(n,[{key:"name",get:function(){return"THEOplayerError"}},{key:"category",get:function(){return Bf.fromCode(this.code)}}]),n}(pr),Uf=function(){function t(t,n,i){this.mM=t,this.Gb=n,this.md=i,this.wM=void 0;var e=_f(i)||"video/mp4";this.uM=mf(e)}var n=t.prototype;return n.getInternalMediaKeys=function(){return this.mM},n.Yb=function(t){var n=this;return rr((function(){return or(this,(function(t){if(!n.wM)throw new Mf(xf.CONTENT_PROTECTION_CERTIFICATE_ERROR,"No valid certificate was provided.");return[2,new Cf(n.mM,n.uM,n.wM)]}))}))()},n.Wb=function(t){return this.wM=Lo(t),Q.resolve(!0)},n.bn=function(t){return t.webkitSetMediaKeys(this.mM),Q.resolve()},n.Zb=function(t){return t.webkitSetMediaKeys(null),Q.resolve()},n.tr=function(){return Q.resolve()},t}(),Lf=function(){function t(t,n){this.Bb=t,this.gM=n}var n=t.prototype;return n.Kb=function(){return this.gM},n.Xb=function(){var t=new En.WebKitMediaKeys(this.Bb);return Q.resolve(new Uf(t,this.Bb,this.gM))},ct(t,[{key:"Gb",get:function(){return this.Bb}}]),t}(),Ff=function(){function t(){}return t.prototype.nm=function(t,n){try{return Q.resolve(function(t,n){if(t!==Wr)throw new m(t+" is not supported with webkit-prefixed Encrypted Media Extensions.");if(!zf())throw new m("Unsupported key system "+t);for(var i=0;i<n.length;i++){var e=n[i],r=pf(Wf,lo,t,e);if(r)return new Lf(t,r)}throw new m("Unsupported key system configuration for "+t)}(t,n))}catch(t){return Q.reject(t)}},t.iM=function(){return zf()},t}();function zf(){return void 0!==En.WebKitMediaKeys&&"function"==typeof En.WebKitMediaKeys.isTypeSupported}function Wf(t,n){return En.WebKitMediaKeys.isTypeSupported(t,n)}var Hf=function(){function t(t){this.yM=t}return t.prototype.nm=function(t,n){var i=this;return rr((function(){var e,r,o;return or(this,(function(u){switch(u.label){case 0:e=0,r=i.yM,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.nm(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 m("Unsupported key system configuration for "+t)}}))}))()},t}(),Vf=function(){function t(t){var n=this;this.MM=[],this.TM=void 0,this.bM=new lr,this.SM=function(){return 0===n.MM.length?n.IM?qf(n.IM,n.bM.wm).then(n.DM,n.DM):n.DM():n.MM.shift()().then(n.SM)},this.DM=function(){if(0!==n.MM.length)return n.SM();n.TM=void 0},this.IM=t}var n=t.prototype;return n.Wo=function(t,n){var i=this;return new Q((function(e){var r=lr.xm([i.bM.wm,n]),o=function(){r.Mm()};i.MM.push((function(){var n=qf(t,r.wm);return e(n),n.then(o,o)})),i.TM||(i.TM=i.SM())}))},n.Dm=function(){return this.NM(!0)},n.gn=function(){return this.IM=void 0,this.NM(!1)},n.NM=function(t){var n=this.TM;return this.bM.Dm(),t&&(this.bM=new lr),Q.resolve(n)},t}();function qf(t,n){return new Q((function(i){return i(t(n))}))}var Xf=new Vf,jf=function(t){function n(n){var i;return(i=t.call(this)||this).Bb=n,i.oM=void 0,i.AM=void 0,i.wA=!1,i.PM=void 0,i.CM=void 0,i.sM=new Ko,i.RM="",i.jM=new Ko,i.OM=new Yo,i}ft(n,t);var i=n.prototype;return i.EM=function(){this.AM&&(this.dM("usable"),this.AM.eA(void 0),this.AM=void 0)},i.kM=function(t){var n=new Zo("Unknown CDM error",t.errorCode,t.systemCode);this.AM?(this.AM.sA(n),this.AM=void 0):this.oM?(this.oM.sA(n),this.oM=void 0):n.oA===WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT?this.dM("output-restricted"):1===n.hA?this.dM("expired"):this.dM("internal-error")},i.LM=function(t){0!==t.message.byteLength?(this.oM&&(this.oM.eA(void 0),this.oM=void 0),this.yo(new bo(this,"license-request",Go(this.Bb,Fo(t.message).buffer),t.defaultURL||void 0))):this.oM&&(this.oM.sA("Empty key message"),this.oM=void 0)},i.xM=function(t){this.CM||(this.CM=t,this.jM.eA(t))},i.Ws=function(){var t=this;return rr((function(){return or(this,(function(n){return t.throwIfClosed(),t.AM&&(t.AM.sA(void 0),t.AM=void 0),t.wA=!0,t.sM.eA(void 0),[2]}))}))()},i.Ob=function(t,n){var i=this;return rr((function(){var t;return or(this,(function(e){switch(e.label){case 0:return i.throwIfClosed(),i.oM=new Ko,i.PM=Lo(n),(t=i.CM)?[3,2]:[4,i.jM.rA];case 1:t=e.sent(),e.label=2;case 2:return t.webkitGenerateKeyRequest(i.Bb,i.PM),[4,i.oM.rA];case 3:return e.sent(),[2]}}))}))()},i.$n=function(t){var n=this;return rr((function(){return or(this,(function(t){return n.throwIfClosed(),[2,!1]}))}))()},i.Rb=function(){var t=this;return rr((function(){return or(this,(function(n){return t.throwIfClosed(),[2]}))}))()},i.Yn=function(t){var n=this;return rr((function(){return or(this,(function(i){switch(i.label){case 0:return n.throwIfClosed(),n.AM=new Ko,Et.s_||Et.$g?[2,Xf.Wo(rr((function(){return or(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 rr((function(){var i;return or(this,(function(e){switch(e.label){case 0:return void 0===n.AM?[2]:(i=n.CM)?[3,2]:[4,n.jM.rA];case 1:i=e.sent(),e.label=2;case 2:return i.webkitAddKey(n.Bb,Lo(t),n.PM,n.xb),[4,n.AM.rA];case 3:return e.sent(),Et.$g?[4,so(500)]:[3,5];case 4:e.sent(),e.label=5;case 5:return[2]}}))}))()},i.throwIfClosed=function(){if(this.wA)throw new m("Already closing or closed.")},i.dM=function(t){this.OM.iA(),this.OM.$p(jo,t),this.yo(new wo(this.OM))},i.zM=function(){var t=this;return rr((function(){var n,i;return or(this,(function(e){switch(e.label){case 0:return(i=t.CM)?[3,2]:[4,t.jM.rA];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.Bb,t.RM),[3,7];case 4:return e.sent(),[3,7];case 5:return[4,so(500)];case 6:return e.sent(),[7];case 7:return[2]}}))}))()},ct(n,[{key:"Op",get:function(){return this.OM}},{key:"xb",get:function(){return this.RM},set:function(t){this.RM=t}},{key:"Ib",get:function(){return this.sM.rA}},{key:"Eb",get:function(){return NaN}}]),n}(ho),Yf=function(){function t(t,n){var i=this;this.Gb=t,this.md=n,this.CM=void 0,this.QM=Or(),this.FM=[],this.lM=function(t){var n=i.YM(t.sessionId);n&&n.EM()},this.BM=function(t){var n=i.YM(t.sessionId);n&&n.kM(t)},this.UM=function(t){var n=i.YM(t.sessionId);n&&n.LM(t)}}var n=t.prototype;return n.bn=function(t){return this.CM=t,this.CM.addEventListener("webkitkeyadded",this.lM),this.CM.addEventListener("webkitkeyerror",this.BM),this.CM.addEventListener("webkitkeymessage",this.UM),this.QM.forEach((function(n,i){return n.xM(t)})),this.FM.forEach((function(n){return n.xM(t)})),Q.resolve()},n.Zb=function(t){return t.removeEventListener("webkitkeyadded",this.lM),t.removeEventListener("webkitkeyerror",this.BM),t.removeEventListener("webkitkeymessage",this.UM),this.CM=void 0,Q.resolve()},n.tr=function(){var t=this;return rr((function(){var n,i;return or(this,(function(e){switch(e.label){case 0:n=t.QM.entries(),i=n.next(),e.label=1;case 1:return i.done?[3,3]:[4,i.value[1].zM()];case 2:return e.sent(),i=n.next(),[3,1];case 3:return t.QM.clear(),[2]}}))}))()},n.Yb=function(t,n,i){var e=this;return rr((function(){var t;return or(this,(function(n){return t=new jf(e.Gb),e.CM&&t.xM(e.CM),e.FM.push(t),[2,t]}))}))()},n.Wb=function(t){return Q.resolve(!1)},n.YM=function(t){if(t){var n=this.QM.get(t);return n||((n=this.FM.shift())?(n.xb=t,this.QM.set(t,n),n):void 0)}},t}(),Kf=function(){function t(t,n){this.Gb=t,this.VM=n}var n=t.prototype;return n.Xb=function(){return Q.resolve(new Yf(this.Gb,this.VM))},n.Kb=function(){return this.VM},t}(),Gf=function(){function t(){}return t.prototype.nm=function(t,n){try{return Q.resolve(function(t,n){if(!Gf.iM())throw new m("Unsupported key system "+t);for(var i=0;i<n.length;i++){var e=n[i],r=pf($f,vo,t,e);if(r)return new Kf(t,r)}throw new m("Unsupported key system configuration for "+t)}(t,n))}catch(t){return Q.reject(t)}},t.iM=function(){return"undefined"!=typeof HTMLMediaElement&&void 0!==HTMLMediaElement.prototype.webkitGenerateKeyRequest&&void 0!==HTMLMediaElement.prototype.webkitAddKey&&void 0!==HTMLMediaElement.prototype.webkitCancelKeyRequest},t}();function $f(t,n){var i=Mt();return!(!i||!i.canPlayType||""===i.canPlayType(n,t))}var Zf,Jf=function(){function t(){}return t.prototype.nm=function(t,n){return t===Mr||t===Cr?Q.resolve(void 0):Q.reject(new g("DRM configuration not supported"))},t}();function Qf(){return Zf||(Zf=function(){var t=[];Ff.iM()&&t.push(new Ff);kf.iM()&&t.push(new kf);Pf.iM()&&t.push(new Pf);Gf.iM()&&t.push(new Gf);Et.r_&&t.push(new Jf);return new Hf(t)}()),Zf}var th=function(){function t(){this.GM=Or()}var n=t.prototype;return n.iA=function(t){this.GM.delete(t)},n.WM=function(){this.GM.clear()},n.Jp=function(t){return this.GM.get(t)},n.$p=function(t,n){this.GM.set(t,n)},t}(),nh=function(){function t(){}return t.ZM=function(){return t.K_||(t.K_=ih.iM()?new ih:new th),t.K_},t.iA=function(n){t.ZM().iA(n)},t.WM=function(){t.ZM().WM()},t.Jp=function(n){return t.ZM().Jp(n)},t.$p=function(n,i){t.ZM().$p(n,i)},t}();nh.K_=void 0;var ih=function(t){function n(){return t.apply(this,arguments)||this}ft(n,t);var i=n.prototype;return i.iA=function(t){self.sessionStorage.removeItem(t)},i.WM=function(){self.sessionStorage.clear()},i.Jp=function(t){var n;return null!=(n=self.sessionStorage.getItem(t))?n:void 0},i.$p=function(t,n){self.sessionStorage.setItem(t,n)},n.iM=function(){var t="foobar";try{return self.sessionStorage.setItem(t,t),self.sessionStorage.removeItem(t),!0}catch(t){return!1}},n}(nh);var eh=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 rh(t,n,i){var e=eh([n],{type:"application/octet-stream"}),r=URL.createObjectURL(e),o=function(t,n){var i=t,e=i.indexOf("?");if(e>=0&&(i=i.substr(0,e)),i=i.substr(i.lastIndexOf("/")+1),n){var r=i.indexOf(".");r<0&&(r=i.length),i=i.substr(0,r)+n+i.substr(r)}return i}(t,i),u=a.createElement("a");u.href=r,u.download=o,a.body.appendChild(u),u.click(),a.body.removeChild(u),URL.revokeObjectURL(r)}var oh="function"==typeof n&&"symbol"==typeof e?n:function(t){return"Symbol("+t+")"};function uh(){}var sh=Number.isNaN||function(t){return t!=t},fh=uh;function hh(t){return"object"==typeof t&&null!==t||"function"==typeof t}function ch(t){return t.slice()}function ah(t,n,i,e,r){new E(t).set(new E(i,e,r),n)}function vh(t){return!1!==function(t){if("number"!=typeof t)return!1;if(sh(t))return!1;if(t<0)return!1;return!0}(t)&&t!==1/0}function dh(t,n,i){if("function"!=typeof t)throw new m("Argument is not a function");return Function.prototype.apply.call(t,n,i)}function lh(t,n,i,e){var r=t[n];if(void 0!==r){if("function"!=typeof r)throw new m(r+" is not a method");switch(i){case 0:return function(){return bh(r,t,e)};case 1:return function(n){var i=[n].concat(e);return bh(r,t,i)}}}return function(){return Eh(void 0)}}function wh(t,n,i){var e=t[n];if(void 0!==e)return dh(e,t,i)}function bh(t,n,i){try{return Eh(dh(t,n,i))}catch(t){return Ih(t)}}function gh(t){if(t=Number(t),sh(t)||t<0)throw new RangeError("highWaterMark property of a queuing strategy must be non-negative and non-NaN");return t}function mh(t){if(void 0===t)return function(){return 1};if("function"!=typeof t)throw new m("size property of a queuing strategy must be a function");return function(n){return t(n)}}var ph=Q,yh=Q.prototype.then,_h=Q.resolve.bind(ph),Sh=Q.reject.bind(ph);function Th(t){return new ph(t)}function Eh(t){return _h(t)}function Ih(t){return Sh(t)}function kh(t,n,i){return yh.call(t,n,i)}function Rh(t,n,i){kh(kh(t,n,i),void 0,fh)}function Oh(t,n){Rh(t,n)}function Nh(t,n){Rh(t,void 0,n)}function Ph(t,n,i){return kh(t,n,i)}function Ah(t){kh(t,void 0,fh)}var Dh=function(){function t(){this.iT=0,this.eT=0,this.sT={nT:[],rT:void 0},this.oT=this.sT,this.iT=0,this.eT=0}return p.defineProperty(t.prototype,"length",{get:function(){return this.eT},enumerable:!0,configurable:!0}),t.prototype.push=function(t){var n=this.oT,i=n;16383===n.nT.length&&(i={nT:[],rT:void 0}),n.nT.push(t),i!==n&&(this.oT=i,n.rT=i),++this.eT},t.prototype.shift=function(){var t=this.sT,n=t,i=this.iT,e=i+1,r=t.nT,o=r[i];return 16384===e&&(n=t.rT,e=0),--this.eT,this.iT=e,t!==n&&(this.sT=n),r[i]=void 0,o},t.prototype.forEach=function(t){for(var n=this.iT,i=this.sT,e=i.nT;!(n===e.length&&void 0===i.rT||n===e.length&&(n=0,0===(e=(i=i.rT).nT).length));)t(e[n]),++n},t.prototype.peek=function(){var t=this.sT,n=this.iT;return t.nT[n]},t}();function Ch(t,n,i){var e=null;!0===i&&(e=p.prototype);var r=p.create(e);return r.value=t,r.done=n,r}function xh(t,n){t.hT=!0,t.aT=n,n.uT=t,"readable"===n.Ea?Lh(t):"closed"===n.Ea?function(t){Lh(t),Wh(t)}(t):Fh(t,n.cT)}function Bh(t,n){return qa(t.aT,n)}function Mh(t){"readable"===t.aT.Ea?zh(t,new m("Reader was released and can no longer be used to monitor the stream's closedness")):function(t,n){Fh(t,n)}(t,new m("Reader was released and can no longer be used to monitor the stream's closedness")),t.aT.uT=void 0,t.aT=void 0}function Uh(t){return new m("Cannot "+t+" a stream using a released reader")}function Lh(t){t.Db=Th((function(n,i){t.lT=n,t.dT=i}))}function Fh(t,n){Lh(t),zh(t,n)}function zh(t,n){Ah(t.Db),t.dT(n),t.lT=void 0,t.dT=void 0}function Wh(t){t.lT(void 0),t.lT=void 0,t.dT=void 0}var Hh=oh("[[CancelSteps]]"),Vh=oh("[[PullSteps]]");function qh(t,n){void 0===n&&(n=!1);var i=new Zh(t);return i.hT=n,i}function Xh(t){var n=Th((function(n,i){var e={hf:n,nA:i};t.uT.fT.push(e)}));return n}function jh(t,n,i){var e=t.uT;e.fT.shift().hf(Ch(n,i,e.hT))}function Yh(t){return t.uT.fT.length}function Kh(t){var n=t.uT;return void 0!==n&&!!Jh(n)}var Gh,$h,Zh=function(){function t(t){if(!1===Ha(t))throw new m("ReadableStreamDefaultReader can only be constructed with a ReadableStream instance");if(!0===Va(t))throw new m("This stream has already been locked for exclusive reading by another reader");xh(this,t),this.fT=new Dh}return p.defineProperty(t.prototype,"closed",{get:function(){return Jh(this)?this.Db:Ih(tc("closed"))},enumerable:!0,configurable:!0}),t.prototype.cancel=function(t){return Jh(this)?void 0===this.aT?Ih(Uh("cancel")):Bh(this,t):Ih(tc("cancel"))},t.prototype.read=function(){return Jh(this)?void 0===this.aT?Ih(Uh("read from")):Qh(this):Ih(tc("read"))},t.prototype.releaseLock=function(){if(!Jh(this))throw tc("releaseLock");if(void 0!==this.aT){if(this.fT.length>0)throw new m("Tried to release a reader lock when that reader has pending read() calls un-settled");Mh(this)}},t}();function Jh(t){return!!hh(t)&&!!p.prototype.hasOwnProperty.call(t,"fT")}function Qh(t){var n=t.aT;return n.gT=!0,"closed"===n.Ea?Eh(Ch(void 0,!0,t.hT)):"errored"===n.Ea?Ih(n.cT):n._T[Vh]()}function tc(t){return new m("ReadableStreamDefaultReader.prototype."+t+" can only be used on a ReadableStreamDefaultReader")}"symbol"==typeof oh.asyncIterator&&((Gh={})[oh.asyncIterator]=function(){return this},$h=Gh,p.defineProperty($h,oh.asyncIterator,{enumerable:!1}));var nc={next:function(){if(!1===ic(this))return Ih(ec("next"));var t=this.vT;return void 0===t.aT?Ih(Uh("iterate")):Ph(Qh(t),(function(n){var i=n.done;return i&&Mh(t),Ch(n.value,i,!0)}))},return:function(t){if(!1===ic(this))return Ih(ec("next"));var n=this.vT;if(void 0===n.aT)return Ih(Uh("finish iterating"));if(n.fT.length>0)return Ih(new m("Tried to release a reader lock when that reader has pending read() calls un-settled"));if(!1===this.wT){var i=Bh(n,t);return Mh(n),Ph(i,(function(){return Ch(t,!0,!0)}))}return Mh(n),Eh(Ch(t,!0,!0))}};function ic(t){return!!hh(t)&&!!p.prototype.hasOwnProperty.call(t,"vT")}function ec(t){return new m("ReadableStreamAsyncIterator."+t+" can only be used on a ReadableSteamAsyncIterator")}function rc(t){var n=t.mT.shift();return t.pT-=n.size,t.pT<0&&(t.pT=0),n.value}function oc(t,n,i){if(!vh(i=Number(i)))throw new RangeError("Size must be a finite, non-NaN, non-negative number.");t.mT.push({value:n,size:i}),t.pT+=i}function uc(t){t.mT=new Dh,t.pT=0}void 0!==$h&&p.setPrototypeOf(nc,$h),p.defineProperty(nc,"next",{enumerable:!1}),p.defineProperty(nc,"return",{enumerable:!1});var sc=oh("[[AbortSteps]]"),fc=oh("[[ErrorSteps]]"),hc=function(){function t(t,n){void 0===t&&(t={}),void 0===n&&(n={}),ac(this);var i=n.size,e=n.highWaterMark;if(void 0!==t.type)throw new RangeError("Invalid type is specified");var r=mh(i);void 0===e&&(e=1),function(t,n,i,e){var r=p.create(Nc.prototype);function o(){return wh(n,"start",[r])}var u=lh(n,"write",1,[r]),s=lh(n,"close",0,[]),f=lh(n,"abort",1,[]);Pc(t,r,o,u,s,f,i,e)}(this,t,e=gh(e),r)}return p.defineProperty(t.prototype,"locked",{get:function(){if(!1===vc(this))throw Uc("locked");return dc(this)},enumerable:!0,configurable:!0}),t.prototype.abort=function(t){return!1===vc(this)?Ih(Uc("abort")):!0===dc(this)?Ih(new m("Cannot abort a stream that already has a writer")):lc(this,t)},t.prototype.close=function(){return!1===vc(this)?Ih(Uc("close")):!0===dc(this)?Ih(new m("Cannot close a stream that already has a writer")):!0===pc(this)?Ih(new m("Cannot close an already-closing stream")):wc(this)},t.prototype.getWriter=function(){if(!1===vc(this))throw Uc("getWriter");return cc(this)},t}();function cc(t){return new Sc(t)}function ac(t){t.Ea="writable",t.cT=void 0,t.yA=void 0,t.AT=void 0,t.yT=new Dh,t.bT=void 0,t.MT=void 0,t.TT=void 0,t.ST=void 0,t.NT=!1}function vc(t){return!!hh(t)&&!!p.prototype.hasOwnProperty.call(t,"AT")}function dc(t){return void 0!==t.yA}function lc(t,n){var i=t.Ea;if("closed"===i||"errored"===i)return Eh(void 0);if(void 0!==t.ST)return t.ST.IT;var e=!1;"erroring"===i&&(e=!0,n=void 0);var r=Th((function(i,r){t.ST={IT:void 0,hf:i,nA:r,DT:n,ET:e}}));return t.ST.IT=r,!1===e&&gc(t,n),r}function wc(t){var n=t.Ea;if("closed"===n||"errored"===n)return Ih(new m("The stream (in "+n+" state) is not in the writable state and cannot be closed"));var i=Th((function(n,i){var e={hf:n,nA:i};t.MT=e})),e=t.yA;return void 0!==e&&!0===t.NT&&"writable"===n&&Kc(e),function(t){oc(t,"close",0),Cc(t)}(t.AT),i}function bc(t,n){"writable"!==t.Ea?mc(t):gc(t,n)}function gc(t,n){var i=t.AT;t.Ea="erroring",t.cT=n;var e=t.yA;void 0!==e&&kc(e,n),!1===function(t){if(void 0===t.bT&&void 0===t.TT)return!1;return!0}(t)&&!0===i.kT&&mc(t)}function mc(t){t.Ea="errored",t.AT[fc]();var n=t.cT;if(t.yT.forEach((function(t){t.nA(n)})),t.yT=new Dh,void 0!==t.ST){var i=t.ST;if(t.ST=void 0,!0===i.ET)return i.nA(n),void yc(t);Rh(t.AT[sc](i.DT),(function(){i.hf(),yc(t)}),(function(n){i.nA(n),yc(t)}))}else yc(t)}function pc(t){return void 0!==t.MT||void 0!==t.TT}function yc(t){void 0!==t.MT&&(t.MT.nA(t.cT),t.MT=void 0);var n=t.yA;void 0!==n&&Hc(n,t.cT)}function _c(t,n){var i=t.yA;void 0!==i&&n!==t.NT&&(!0===n?function(t){qc(t)}(i):Kc(i)),t.NT=n}var Sc=function(){function t(t){if(!1===vc(t))throw new m("WritableStreamDefaultWriter can only be constructed with a WritableStream instance");if(!0===dc(t))throw new m("This stream has already been locked for exclusive writing by another writer");this.LT=t,t.yA=this;var n=t.Ea;if("writable"===n)!1===pc(t)&&!0===t.NT?qc(this):jc(this),zc(this);else if("erroring"===n)Xc(this,t.cT),zc(this);else if("closed"===n)jc(this),function(t){zc(t),Vc(t)}(this);else{var i=t.cT;Xc(this,i),Wc(this,i)}}return p.defineProperty(t.prototype,"closed",{get:function(){return!1===Tc(this)?Ih(Lc("closed")):this.Db},enumerable:!0,configurable:!0}),p.defineProperty(t.prototype,"desiredSize",{get:function(){if(!1===Tc(this))throw Lc("desiredSize");if(void 0===this.LT)throw Fc("desiredSize");return function(t){var n=t.LT,i=n.Ea;if("errored"===i||"erroring"===i)return null;if("closed"===i)return 0;return Dc(n.AT)}(this)},enumerable:!0,configurable:!0}),p.defineProperty(t.prototype,"ready",{get:function(){return!1===Tc(this)?Ih(Lc("ready")):this.xT},enumerable:!0,configurable:!0}),t.prototype.abort=function(t){return!1===Tc(this)?Ih(Lc("abort")):void 0===this.LT?Ih(Fc("abort")):function(t,n){var i=t.LT;return lc(i,n)}(this,t)},t.prototype.close=function(){if(!1===Tc(this))return Ih(Lc("close"));var t=this.LT;return void 0===t?Ih(Fc("close")):!0===pc(t)?Ih(new m("Cannot close an already-closing stream")):Ec(this)},t.prototype.releaseLock=function(){if(!1===Tc(this))throw Lc("releaseLock");void 0!==this.LT&&Rc(this)},t.prototype.write=function(t){return!1===Tc(this)?Ih(Lc("write")):void 0===this.LT?Ih(Fc("write to")):Oc(this,t)},t}();function Tc(t){return!!hh(t)&&!!p.prototype.hasOwnProperty.call(t,"LT")}function Ec(t){return wc(t.LT)}function Ic(t,n){"pending"===t.CT?Hc(t,n):function(t,n){Wc(t,n)}(t,n)}function kc(t,n){"pending"===t.jT?Yc(t,n):function(t,n){Xc(t,n)}(t,n)}function Rc(t){var n=t.LT,i=new m("Writer was released and can no longer be used to monitor the stream's closedness");kc(t,i),Ic(t,i),n.yA=void 0,t.LT=void 0}function Oc(t,n){var i=t.LT,e=i.AT,r=function(t,n){try{return t.OT(n)}catch(n){return xc(t,n),1}}(e,n);if(i!==t.LT)return Ih(Fc("write to"));var o=i.Ea;if("errored"===o)return Ih(i.cT);if(!0===pc(i)||"closed"===o)return Ih(new m("The stream is closing or closed and cannot be written to"));if("erroring"===o)return Ih(i.cT);var u=function(t){var n=Th((function(n,i){var e={hf:n,nA:i};t.yT.push(e)}));return n}(i);return function(t,n,i){var e={chunk:n};try{oc(t,e,i)}catch(n){return void xc(t,n)}var r=t.PT;if(!1===pc(r)&&"writable"===r.Ea){_c(r,Bc(t))}Cc(t)}(e,n,r),u}var Nc=function(){function t(){throw new m("WritableStreamDefaultController cannot be constructed explicitly")}return t.prototype.error=function(t){if(!1===function(t){if(!hh(t))return!1;if(!p.prototype.hasOwnProperty.call(t,"PT"))return!1;return!0}(this))throw new m("WritableStreamDefaultController.prototype.error can only be used on a WritableStreamDefaultController");"writable"===this.PT.Ea&&Mc(this,t)},t.prototype[sc]=function(t){var n=this.zT(t);return Ac(this),n},t.prototype[fc]=function(){uc(this)},t}();function Pc(t,n,i,e,r,o,u,s){n.PT=t,t.AT=n,n.mT=void 0,n.pT=void 0,uc(n),n.kT=!1,n.OT=s,n.BT=u,n.UT=e,n.QT=r,n.zT=o;var f=Bc(n);_c(t,f),Rh(Eh(i()),(function(){n.kT=!0,Cc(n)}),(function(i){n.kT=!0,bc(t,i)}))}function Ac(t){t.UT=void 0,t.QT=void 0,t.zT=void 0,t.OT=void 0}function Dc(t){return t.BT-t.pT}function Cc(t){var n=t.PT;if(!1!==t.kT&&void 0===n.bT)if("erroring"!==n.Ea){if(0!==t.mT.length){var i=function(t){return t.mT.peek().value}(t);"close"===i?function(t){var n=t.PT;(function(t){t.TT=t.MT,t.MT=void 0})(n),rc(t);var i=t.QT();Ac(t),Rh(i,(function(){!function(t){t.TT.hf(void 0),t.TT=void 0,"erroring"===t.Ea&&(t.cT=void 0,void 0!==t.ST&&(t.ST.hf(),t.ST=void 0)),t.Ea="closed";var n=t.yA;void 0!==n&&Vc(n)}(n)}),(function(t){!function(t,n){t.TT.nA(n),t.TT=void 0,void 0!==t.ST&&(t.ST.nA(n),t.ST=void 0),bc(t,n)}(n,t)}))}(t):function(t,n){var i=t.PT;!function(t){t.bT=t.yT.shift()}(i);var e=t.UT(n);Rh(e,(function(){!function(t){t.bT.hf(void 0),t.bT=void 0}(i);var n=i.Ea;if(rc(t),!1===pc(i)&&"writable"===n){var e=Bc(t);_c(i,e)}Cc(t)}),(function(n){"writable"===i.Ea&&Ac(t),function(t,n){t.bT.nA(n),t.bT=void 0,bc(t,n)}(i,n)}))}(t,i.chunk)}}else mc(n)}function xc(t,n){"writable"===t.PT.Ea&&Mc(t,n)}function Bc(t){return Dc(t)<=0}function Mc(t,n){var i=t.PT;Ac(t),gc(i,n)}function Uc(t){return new m("WritableStream.prototype."+t+" can only be used on a WritableStream")}function Lc(t){return new m("WritableStreamDefaultWriter.prototype."+t+" can only be used on a WritableStreamDefaultWriter")}function Fc(t){return new m("Cannot "+t+" a stream using a released writer")}function zc(t){t.Db=Th((function(n,i){t.lT=n,t.dT=i,t.CT="pending"}))}function Wc(t,n){zc(t),Hc(t,n)}function Hc(t,n){Ah(t.Db),t.dT(n),t.lT=void 0,t.dT=void 0,t.CT="rejected"}function Vc(t){t.lT(void 0),t.lT=void 0,t.dT=void 0,t.CT="resolved"}function qc(t){t.xT=Th((function(n,i){t.FT=n,t.YT=i})),t.jT="pending"}function Xc(t,n){qc(t),Yc(t,n)}function jc(t){qc(t),Kc(t)}function Yc(t,n){Ah(t.xT),t.YT(n),t.FT=void 0,t.YT=void 0,t.jT="rejected"}function Kc(t){t.FT(void 0),t.FT=void 0,t.YT=void 0,t.jT="fulfilled"}function Gc(t){if("object"!=typeof t||null===t)return!1;try{return"boolean"==typeof t.aborted}catch(t){return!1}}var $c="undefined"!=typeof DOMException?DOMException:void 0;var Zc=function(t){if("function"!=typeof t&&"object"!=typeof t)return!1;try{return new t,!0}catch(t){return!1}}($c)?$c:function(){var t=function(t,n){this.message=t||"",this.name=n||"Error",g.captureStackTrace&&g.captureStackTrace(this,this.constructor)};return t.prototype=p.create(g.prototype),p.defineProperty(t.prototype,"constructor",{value:t,writable:!0,configurable:!0}),t}();function Jc(t,n,i,e,r,o){var u=qh(t),s=cc(n);t.gT=!0;var f=!1,h=Eh(void 0);return Th((function(c,a){var v,d,l,w;if(void 0!==o){if(v=function(){var i=new Zc("Aborted","AbortError"),o=[];!1===e&&o.push((function(){return"writable"===n.Ea?lc(n,i):Eh(void 0)})),!1===r&&o.push((function(){return"readable"===t.Ea?qa(t,i):Eh(void 0)})),y((function(){return Q.all(o.map((function(t){return t()})))}),!0,i)},!0===o.aborted)return void v();o.addEventListener("abort",v)}if(p(t,u.Db,(function(t){!1===e?y((function(){return lc(n,t)}),!0,t):_(!0,t)})),p(n,s.Db,(function(n){!1===r?y((function(){return qa(t,n)}),!0,n):_(!0,n)})),d=t,l=u.Db,w=function(){!1===i?y((function(){return function(t){var n=t.LT,i=n.Ea;return!0===pc(n)||"closed"===i?Eh(void 0):"errored"===i?Ih(n.cT):Ec(t)}(s)})):_()},"closed"===d.Ea?w():Oh(l,w),!0===pc(n)||"closed"===n.Ea){var b=new m("the destination writable stream closed before all data could be piped to it");!1===r?y((function(){return qa(t,b)}),!0,b):_(!0,b)}function g(){var t=h;return kh(h,(function(){return t!==h?g():void 0}))}function p(t,n,i){"errored"===t.Ea?i(t.cT):Nh(n,i)}function y(t,i,e){function r(){Rh(t(),(function(){return S(i,e)}),(function(t){return S(!0,t)}))}!0!==f&&(f=!0,"writable"===n.Ea&&!1===pc(n)?Oh(g(),r):r())}function _(t,i){!0!==f&&(f=!0,"writable"===n.Ea&&!1===pc(n)?Oh(g(),(function(){return S(t,i)})):S(t,i))}function S(t,n){Rc(s),Mh(u),void 0!==o&&o.removeEventListener("abort",v),t?a(n):c(void 0)}Ah(Th((function(t,n){!function i(e){e?t():kh(!0===f?Eh(!0):kh(s.xT,(function(){return kh(Qh(u),(function(t){return!0===t.done||(h=kh(Oc(s,t.value),void 0,uh),!1)}))})),i,n)}(!1)})))}))}var Qc=function(){function t(){throw new m}return p.defineProperty(t.prototype,"desiredSize",{get:function(){if(!1===ta(this))throw ca("desiredSize");return sa(this)},enumerable:!0,configurable:!0}),t.prototype.close=function(){if(!1===ta(this))throw ca("close");if(!1===fa(this))throw new m("The stream is not in a state that permits close");ra(this)},t.prototype.enqueue=function(t){if(!1===ta(this))throw ca("enqueue");if(!1===fa(this))throw new m("The stream is not in a state that permits enqueue");return oa(this,t)},t.prototype.error=function(t){if(!1===ta(this))throw ca("error");ua(this,t)},t.prototype[Hh]=function(t){uc(this);var n=this.VT(t);return ea(this),n},t.prototype[Vh]=function(){var t=this.GT;if(this.mT.length>0){var n=rc(this);return!0===this.WT&&0===this.mT.length?(ea(this),Xa(t)):na(this),Eh(Ch(n,!1,t.uT.hT))}var i=Xh(t);return na(this),i},t}();function ta(t){return!!hh(t)&&!!p.prototype.hasOwnProperty.call(t,"GT")}function na(t){!1!==ia(t)&&(!0!==t.ZT?(t.ZT=!0,Rh(t.HT(),(function(){t.ZT=!1,!0===t.XT&&(t.XT=!1,na(t))}),(function(n){ua(t,n)}))):t.XT=!0)}function ia(t){var n=t.GT;return!1!==fa(t)&&(!1!==t.kT&&(!0===Va(n)&&Yh(n)>0||sa(t)>0))}function ea(t){t.HT=void 0,t.VT=void 0,t.OT=void 0}function ra(t){var n=t.GT;t.WT=!0,0===t.mT.length&&(ea(t),Xa(n))}function oa(t,n){var i=t.GT;if(!0===Va(i)&&Yh(i)>0)jh(i,n,!1);else{var e=void 0;try{e=t.OT(n)}catch(n){throw ua(t,n),n}try{oc(t,n,e)}catch(n){throw ua(t,n),n}}na(t)}function ua(t,n){var i=t.GT;"readable"===i.Ea&&(uc(t),ea(t),ja(i,n))}function sa(t){var n=t.GT.Ea;return"errored"===n?null:"closed"===n?0:t.BT-t.pT}function fa(t){var n=t.GT.Ea;return!1===t.WT&&"readable"===n}function ha(t,n,i,e,r,o,u){n.GT=t,n.mT=void 0,n.pT=void 0,uc(n),n.kT=!1,n.WT=!1,n.XT=!1,n.ZT=!1,n.OT=u,n.BT=o,n.HT=e,n.VT=r,t._T=n,Rh(Eh(i()),(function(){n.kT=!0,na(n)}),(function(t){ua(n,t)}))}function ca(t){return new m("ReadableStreamDefaultController.prototype."+t+" can only be used on a ReadableStreamDefaultController")}var aa=Number.isInteger||function(t){return"number"==typeof t&&isFinite(t)&&y.floor(t)===t},va=function(){function t(){throw new m("ReadableStreamBYOBRequest cannot be used directly")}return p.defineProperty(t.prototype,"view",{get:function(){if(!1===wa(this))throw Aa("view");return this.qT},enumerable:!0,configurable:!0}),t.prototype.respond=function(t){if(!1===wa(this))throw Aa("respond");if(void 0===this.KT)throw new m("This BYOB request has been invalidated");this.qT.buffer,function(t,n){if(n=Number(n),!1===vh(n))throw new RangeError("bytesWritten must be a finite");Ia(t,n)}(this.KT,t)},t.prototype.respondWithNewView=function(t){if(!1===wa(this))throw Aa("respond");if(void 0===this.KT)throw new m("This BYOB request has been invalidated");if(!ArrayBuffer.isView(t))throw new m("You can only respond with array buffer views");t.buffer,function(t,n){var i=t.JT.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,Ia(t,n.byteLength)}(this.KT,t)},t}(),da=function(){function t(){throw new m("ReadableByteStreamController constructor cannot be used directly")}return p.defineProperty(t.prototype,"byobRequest",{get:function(){if(!1===la(this))throw Da("byobRequest");if(void 0===this.$T&&this.JT.length>0){var t=this.JT.peek(),n=new E(t.buffer,t.byteOffset+t.bytesFilled,t.byteLength-t.bytesFilled),i=p.create(va.prototype);!function(t,n,i){t.KT=n,t.qT=i}(i,this,n),this.$T=i}return this.$T},enumerable:!0,configurable:!0}),p.defineProperty(t.prototype,"desiredSize",{get:function(){if(!1===la(this))throw Da("desiredSize");return Na(this)},enumerable:!0,configurable:!0}),t.prototype.close=function(){if(!1===la(this))throw Da("close");if(!0===this.WT)throw new m("The stream has already been closed; do not close it again!");var t=this.tS.Ea;if("readable"!==t)throw new m("The stream (in "+t+" state) is not in the readable state and cannot be closed");!function(t){var n=t.tS;if(t.pT>0)return void(t.WT=!0);if(t.JT.length>0){if(t.JT.peek().bytesFilled>0){var i=new m("Insufficient bytes to fill elements in the given buffer");throw Oa(t,i),i}}Ra(t),Xa(n)}(this)},t.prototype.enqueue=function(t){if(!1===la(this))throw Da("enqueue");if(!0===this.WT)throw new m("stream is closed or draining");var n=this.tS.Ea;if("readable"!==n)throw new m("The stream (in "+n+" state) is not in the readable state and cannot be enqueued to");if(!ArrayBuffer.isView(t))throw new m("You can only enqueue array buffer views when using a ReadableByteStreamController");t.buffer,function(t,n){var i=t.tS,e=n.buffer,r=n.byteOffset,o=n.byteLength,u=e;if(!0===Kh(i)){if(0===Yh(i))pa(t,u,r,o);else jh(i,new E(u,r,o),!1)}else!0===Ba(i)?(pa(t,u,r,o),Ea(t)):pa(t,u,r,o);ba(t)}(this,t)},t.prototype.error=function(t){if(!1===la(this))throw Da("error");Oa(this,t)},t.prototype[Hh]=function(t){this.JT.length>0&&(this.JT.peek().bytesFilled=0);uc(this);var n=this.VT(t);return Ra(this),n},t.prototype[Vh]=function(){var t=this.tS;if(this.pT>0){var n=this.mT.shift();this.pT-=n.byteLength,Sa(this);var i=void 0;try{i=new E(n.buffer,n.byteOffset,n.byteLength)}catch(t){return Ih(t)}return Eh(Ch(i,!1,t.uT.hT))}var e=this.iS;if(void 0!==e){var r=void 0;try{r=new ArrayBuffer(e)}catch(t){return Ih(t)}var o={buffer:r,byteOffset:0,byteLength:e,bytesFilled:0,elementSize:1,ctor:E,readerType:"default"};this.JT.push(o)}var u=Xh(t);return ba(this),u},t}();function la(t){return!!hh(t)&&!!p.prototype.hasOwnProperty.call(t,"tS")}function wa(t){return!!hh(t)&&!!p.prototype.hasOwnProperty.call(t,"KT")}function ba(t){var n=function(t){var n=t.tS;if("readable"!==n.Ea)return!1;if(!0===t.WT)return!1;if(!1===t.kT)return!1;if(!0===Kh(n)&&Yh(n)>0)return!0;if(!0===Ba(n)&&xa(n)>0)return!0;var i=Na(t);if(i>0)return!0;return!1}(t);!1!==n&&(!0!==t.ZT?(t.ZT=!0,Rh(t.HT(),(function(){t.ZT=!1,!0===t.XT&&(t.XT=!1,ba(t))}),(function(n){Oa(t,n)}))):t.XT=!0)}function ga(t,n){var i=!1;"closed"===t.Ea&&(i=!0);var e=ma(n);"default"===n.readerType?jh(t,e,i):function(t,n,i){var e=t.uT,r=e.eS.shift();r.hf(Ch(n,i,e.hT))}(t,e,i)}function ma(t){var n=t.bytesFilled,i=t.elementSize;return new t.ctor(t.buffer,t.byteOffset,n/i)}function pa(t,n,i,e){t.mT.push({buffer:n,byteOffset:i,byteLength:e}),t.pT+=e}function ya(t,n){var i=n.elementSize,e=n.bytesFilled-n.bytesFilled%i,r=y.min(t.pT,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.mT;s>0;){var c=h.peek(),a=y.min(s,c.byteLength),v=n.byteOffset+n.bytesFilled;ah(n.buffer,v,c.buffer,c.byteOffset,a),c.byteLength===a?h.shift():(c.byteOffset+=a,c.byteLength-=a),t.pT-=a,_a(t,a,n),s-=a}return f}function _a(t,n,i){Ta(t),i.bytesFilled+=n}function Sa(t){0===t.pT&&!0===t.WT?(Ra(t),Xa(t.tS)):ba(t)}function Ta(t){void 0!==t.$T&&(t.$T.KT=void 0,t.$T.qT=void 0,t.$T=void 0)}function Ea(t){for(;t.JT.length>0;){if(0===t.pT)return;var n=t.JT.peek();!0===ya(t,n)&&(ka(t),ga(t.tS,n))}}function Ia(t,n){var i=t.JT.peek();if("closed"===t.tS.Ea){if(0!==n)throw new m("bytesWritten must be 0 when calling respond() on a closed stream");!function(t,n){n.buffer=n.buffer;var i=t.tS;if(!0===Ba(i))for(;xa(i)>0;)ga(i,ka(t))}(t,i)}else!function(t,n,i){if(i.bytesFilled+n>i.byteLength)throw new RangeError("bytesWritten out of range");if(_a(t,n,i),!(i.bytesFilled<i.elementSize)){ka(t);var e=i.bytesFilled%i.elementSize;if(e>0){var r=i.byteOffset+i.bytesFilled,o=i.buffer.slice(r-e,r);pa(t,o,0,o.byteLength)}i.buffer=i.buffer,i.bytesFilled-=e,ga(t.tS,i),Ea(t)}}(t,n,i);ba(t)}function ka(t){var n=t.JT.shift();return Ta(t),n}function Ra(t){t.HT=void 0,t.VT=void 0}function Oa(t,n){var i=t.tS;"readable"===i.Ea&&(!function(t){Ta(t),t.JT=new Dh}(t),uc(t),Ra(t),ja(i,n))}function Na(t){var n=t.tS.Ea;return"errored"===n?null:"closed"===n?0:t.BT-t.pT}function Pa(t,n,i){var e=p.create(da.prototype);var r=lh(n,"pull",0,[e]),o=lh(n,"cancel",1,[]),u=n.autoAllocateChunkSize;if(void 0!==u&&(u=Number(u),!1===aa(u)||u<=0))throw new RangeError("autoAllocateChunkSize must be a positive integer");!function(t,n,i,e,r,o,u){n.tS=t,n.XT=!1,n.ZT=!1,n.$T=void 0,n.mT=n.pT=void 0,uc(n),n.WT=!1,n.kT=!1,n.BT=gh(o),n.HT=e,n.VT=r,n.iS=u,n.JT=new Dh,t._T=n,Rh(Eh(i()),(function(){n.kT=!0,ba(n)}),(function(t){Oa(n,t)}))}(t,e,(function(){return wh(n,"start",[e])}),r,o,i,u)}function Aa(t){return new m("ReadableStreamBYOBRequest.prototype."+t+" can only be used on a ReadableStreamBYOBRequest")}function Da(t){return new m("ReadableByteStreamController.prototype."+t+" can only be used on a ReadableByteStreamController")}function Ca(t){var n=Th((function(n,i){var e={hf:n,nA:i};t.uT.eS.push(e)}));return n}function xa(t){return t.uT.eS.length}function Ba(t){var n=t.uT;return void 0!==n&&!!Ua(n)}var Ma=function(){function t(t){if(!Ha(t))throw new m("ReadableStreamBYOBReader can only be constructed with a ReadableStream instance given a byte source");if(!1===la(t._T))throw new m("Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte source");if(Va(t))throw new m("This stream has already been locked for exclusive reading by another reader");xh(this,t),this.eS=new Dh}return p.defineProperty(t.prototype,"closed",{get:function(){return Ua(this)?this.Db:Ih(La("closed"))},enumerable:!0,configurable:!0}),t.prototype.cancel=function(t){return Ua(this)?void 0===this.aT?Ih(Uh("cancel")):Bh(this,t):Ih(La("cancel"))},t.prototype.read=function(t){return Ua(this)?void 0===this.aT?Ih(Uh("read from")):ArrayBuffer.isView(t)?(t.buffer,0===t.byteLength?Ih(new m("view must have non-zero byteLength")):function(t,n){var i=t.aT;if(i.gT=!0,"errored"===i.Ea)return Ih(i.cT);return function(t,n){var i=t.tS,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.JT.length>0)return t.JT.push(o),Ca(i);if("closed"===i.Ea)return Eh(Ch(new r(o.buffer,o.byteOffset,0),!0,i.uT.hT));if(t.pT>0){if(!0===ya(t,o)){var u=ma(o);return Sa(t),Eh(Ch(u,!1,i.uT.hT))}if(!0===t.WT){var s=new m("Insufficient bytes to fill elements in the given buffer");return Oa(t,s),Ih(s)}}t.JT.push(o);var f=Ca(i);return ba(t),f}(i._T,n)}(this,t)):Ih(new m("view must be an array buffer view")):Ih(La("read"))},t.prototype.releaseLock=function(){if(!Ua(this))throw La("releaseLock");if(void 0!==this.aT){if(this.eS.length>0)throw new m("Tried to release a reader lock when that reader has pending read() calls un-settled");Mh(this)}},t}();function Ua(t){return!!hh(t)&&!!p.prototype.hasOwnProperty.call(t,"eS")}function La(t){return new m("ReadableStreamBYOBReader.prototype."+t+" can only be used on a ReadableStreamBYOBReader")}var Fa=function(){function t(t,n){void 0===t&&(t={}),void 0===n&&(n={}),Wa(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),Pa(this,t,e=gh(e))}else{if(void 0!==r)throw new RangeError("Invalid type is specified");var o=mh(i);void 0===e&&(e=1),function(t,n,i,e){var r=p.create(Qc.prototype),o=lh(n,"pull",0,[r]),u=lh(n,"cancel",1,[]);ha(t,r,(function(){return wh(n,"start",[r])}),o,u,i,e)}(this,t,e=gh(e),o)}}return p.defineProperty(t.prototype,"locked",{get:function(){if(!1===Ha(this))throw Ya("locked");return Va(this)},enumerable:!0,configurable:!0}),t.prototype.cancel=function(t){return!1===Ha(this)?Ih(Ya("cancel")):!0===Va(this)?Ih(new m("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===Ha(this))throw Ya("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 Ma(t);return i.hT=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===Ha(this))throw Ya("pipeThrough");if(!1===vc(i))throw new m("writable argument to pipeThrough must be a WritableStream");if(!1===Ha(e))throw new m("readable argument to pipeThrough must be a ReadableStream");if(o=Boolean(o),u=Boolean(u),s=Boolean(s),void 0!==f&&!Gc(f))throw new m("ReadableStream.prototype.pipeThrough's signal option must be an AbortSignal");if(!0===Va(this))throw new m("ReadableStream.prototype.pipeThrough cannot be used on a locked ReadableStream");if(!0===dc(i))throw new m("ReadableStream.prototype.pipeThrough cannot be used on a locked WritableStream");return Ah(Jc(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===Ha(this)?Ih(Ya("pipeTo")):!1===vc(t)?Ih(new m("ReadableStream.prototype.pipeTo's first argument must be a WritableStream")):(e=Boolean(e),r=Boolean(r),o=Boolean(o),void 0===u||Gc(u)?!0===Va(this)?Ih(new m("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream")):!0===dc(t)?Ih(new m("ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream")):Jc(this,t,e,r,o,u):Ih(new m("ReadableStream.prototype.pipeTo's signal option must be an AbortSignal")))},t.prototype.tee=function(){if(!1===Ha(this))throw Ya("tee");var t=function(t,n){var i,e,r,o,u,s=qh(t),f=!1,h=!1,c=!1,a=Th((function(t){u=t}));function v(){return!0===f||(f=!0,Ah(Ph(Qh(s),(function(t){if(f=!1,!0===t.done)return!1===h&&ra(r._T),void(!1===c&&ra(o._T));var n=t.value,i=n,e=n;!1===h&&oa(r._T,i),!1===c&&oa(o._T,e)})))),Eh(void 0)}function d(){}return r=za(d,v,(function(n){if(h=!0,i=n,!0===c){var r=ch([i,e]),o=qa(t,r);u(o)}return a})),o=za(d,v,(function(n){if(c=!0,e=n,!0===h){var r=ch([i,e]),o=qa(t,r);u(o)}return a})),Nh(s.Db,(function(t){ua(r._T,t),ua(o._T,t)})),[r,o]}(this);return ch(t)},t.prototype.getIterator=function(t){var n=(void 0===t?{}:t).preventCancel,i=void 0!==n&&n;if(!1===Ha(this))throw Ya("getIterator");return function(t,n){void 0===n&&(n=!1);var i=qh(t),e=p.create(nc);return e.vT=i,e.wT=Boolean(n),e}(this,i)},t}();function za(t,n,i,e,r){void 0===e&&(e=1),void 0===r&&(r=function(){return 1});var o=p.create(Fa.prototype);return Wa(o),ha(o,p.create(Qc.prototype),t,n,i,e,r),o}function Wa(t){t.Ea="readable",t.uT=void 0,t.cT=void 0,t.gT=!1}function Ha(t){return!!hh(t)&&!!p.prototype.hasOwnProperty.call(t,"_T")}function Va(t){return void 0!==t.uT}function qa(t,n){return t.gT=!0,"closed"===t.Ea?Eh(void 0):"errored"===t.Ea?Ih(t.cT):(Xa(t),Ph(t._T[Hh](n),uh))}function Xa(t){t.Ea="closed";var n=t.uT;void 0!==n&&(Jh(n)&&(n.fT.forEach((function(t){t.hf(Ch(void 0,!0,n.hT))})),n.fT=new Dh),Wh(n))}function ja(t,n){t.Ea="errored",t.cT=n;var i=t.uT;void 0!==i&&(Jh(i)?(i.fT.forEach((function(t){t.nA(n)})),i.fT=new Dh):(i.eS.forEach((function(t){t.nA(n)})),i.eS=new Dh),zh(i,n))}function Ya(t){return new m("ReadableStream.prototype."+t+" can only be used on a ReadableStream")}"symbol"==typeof oh.asyncIterator&&p.defineProperty(Fa.prototype,oh.asyncIterator,{value:Fa.prototype.getIterator,enumerable:!1,writable:!0,configurable:!0});var Ka=function(){function t(t){var n=t.highWaterMark;this.highWaterMark=n}return t.prototype.size=function(t){return t.byteLength},t}(),Ga=function(){function t(t){var n=t.highWaterMark;this.highWaterMark=n}return t.prototype.size=function(){return 1},t}(),$a=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=mh(e);if(void 0===r&&(r=1),r=gh(r),void 0!==t.readableType)throw new RangeError("Invalid readable type specified");var f,h=mh(o);void 0===u&&(u=0),u=gh(u),function(t,n,i,e,r,o){function u(){return n}function s(n){return function(t,n){var i=t.sS;if(!0===t.NT){return Ph(t.nS,(function(){var e=t.rS;if("erroring"===e.Ea)throw e.cT;return ov(i,n)}))}return ov(i,n)}(t,n)}function f(n){return function(t,n){return Ja(t,n),Eh(void 0)}(t,n)}function h(){return function(t){var n=t.oS,i=t.sS,e=i.hS();return ev(i),Ph(e,(function(){if("errored"===n.Ea)throw n.cT;var t=n._T;!0===fa(t)&&ra(t)}),(function(i){throw Ja(t,i),n.cT}))}(t)}function c(){return function(t){return tv(t,!1),t.nS}(t)}function a(n){return Qa(t,n),Eh(void 0)}t.rS=function(t,n,i,e,r,o){void 0===r&&(r=1),void 0===o&&(o=function(){return 1});var u=p.create(hc.prototype);return ac(u),Pc(u,p.create(Nc.prototype),t,n,i,e,r,o),u}(u,s,h,f,i,e),t.oS=za(u,c,a,r,o),t.NT=void 0,t.nS=void 0,t.aS=void 0,tv(t,!0),t.sS=void 0}(this,Th((function(t){f=t})),r,s,u,h),function(t,n){var i=p.create(nv.prototype),e=function(t){try{return rv(i,t),Eh(void 0)}catch(t){return Ih(t)}},r=n.transform;if(void 0!==r){if("function"!=typeof r)throw new m("transform is not a method");e=function(t){return bh(r,n,[t,i])}}var o=lh(n,"flush",0,[i]);!function(t,n,i,e){n.uS=t,t.sS=n,n.cS=i,n.hS=e}(t,i,e,o)}(this,t);var c=wh(t,"start",[this.sS]);f(c)}return p.defineProperty(t.prototype,"readable",{get:function(){if(!1===Za(this))throw sv("readable");return this.oS},enumerable:!0,configurable:!0}),p.defineProperty(t.prototype,"writable",{get:function(){if(!1===Za(this))throw sv("writable");return this.rS},enumerable:!0,configurable:!0}),t}();function Za(t){return!!hh(t)&&!!p.prototype.hasOwnProperty.call(t,"sS")}function Ja(t,n){ua(t.oS._T,n),Qa(t,n)}function Qa(t,n){ev(t.sS),xc(t.rS.AT,n),!0===t.NT&&tv(t,!1)}function tv(t,n){void 0!==t.nS&&t.aS(),t.nS=Th((function(n){t.aS=n})),t.NT=n}var nv=function(){function t(){throw new m("TransformStreamDefaultController instances cannot be created directly")}return p.defineProperty(t.prototype,"desiredSize",{get:function(){if(!1===iv(this))throw uv("desiredSize");return sa(this.uS.oS._T)},enumerable:!0,configurable:!0}),t.prototype.enqueue=function(t){if(!1===iv(this))throw uv("enqueue");rv(this,t)},t.prototype.error=function(t){if(!1===iv(this))throw uv("error");!function(t,n){Ja(t.uS,n)}(this,t)},t.prototype.terminate=function(){if(!1===iv(this))throw uv("terminate");!function(t){var n=t.uS,i=n.oS._T;!0===fa(i)&&ra(i);var e=new m("TransformStream terminated");Qa(n,e)}(this)},t}();function iv(t){return!!hh(t)&&!!p.prototype.hasOwnProperty.call(t,"uS")}function ev(t){t.cS=void 0,t.hS=void 0}function rv(t,n){var i=t.uS,e=i.oS._T;if(!1===fa(e))throw new m("Readable side is not in a state that permits enqueue");try{oa(e,n)}catch(t){throw Qa(i,t),i.oS.cT}var r=function(t){return!0!==ia(t)}(e);r!==i.NT&&tv(i,!0)}function ov(t,n){return Ph(t.cS(n),void 0,(function(n){throw Ja(t.uS,n),n}))}function uv(t){return new m("TransformStreamDefaultController.prototype."+t+" can only be used on a TransformStreamDefaultController")}function sv(t){return new m("TransformStream.prototype."+t+" can only be used on a TransformStream")}var fv=t,hv=At(fv.ReadableStream)&&At(fv.WritableStream)&&At(fv.TransformStream)&&Pt(fv.ReadableStream.prototype.pipeThrough)&&!pn.Ov,cv=hv?fv.ReadableStream:Fa,av=(hv&&fv.WritableStream,hv?fv.TransformStream:$a);hv&&fv.ByteLengthQueuingStrategy&&fv.ByteLengthQueuingStrategy,hv&&fv.CountQueuingStrategy&&fv.CountQueuingStrategy;function vv(t){return function(t){return new cv({start:function(n){for(var i=0;i<t.length;i++){var e=t[i];n.enqueue(e)}n.close()}})}([t])}function dv(t){return vv(function(t){return new E(t)}(t))}function lv(t,n){return function(t,n){var i=n,e=t.getReader(),r=new Ko,o=function(){u();var t=new io;e.cancel(t).catch(Ct),r.sA(t)},u=function(){i&&(i._m(o),i=void 0)};i&&(i.gm?o():i.vm(o));var s=[],f=function(t){return t.done?(u(),Q.resolve(s)):(s.push(t.value),Q.resolve(e.read()).then(f))};return Q.resolve(e.read()).then(f).then((function(t){u(),r.eA(t)}),(function(t){u(),r.sA(t)})),r.rA}(t,n).then((function(t){return qo(t).buffer}))}function wv(t,n){var i=n,e=new av,r=e.readable,o=e.writable,u=o.getWriter(),s=function(){i&&i.Dm()};return u.closed.then(s,s),t.then((function(t){return i=void 0,u.releaseLock(),t.pipeTo(o).catch(Ct)}),(function(t){return i=void 0,u.releaseLock(),o.abort(t).catch(Ct)})),r}function bv(t){return xo(new E(t))}function gv(t){return Bo(t).buffer}var mv="content-type",pv="text/plain;charset=UTF-8",yv=function(){function t(){}var n=t.prototype;return n.lS=function(t){return this.dS(t).then(JSON.parse)},n.fS=function(t,n){switch(t){case Je.HM:return this.gS(n);case Je.XM:return this.lS(n);case Je.qM:return this._S();case Je.KM:return this.dS(n);default:throw new m}},t}();function _v(t,n,i){if(t instanceof yv)return t;if(t instanceof cv)return function(t,n){return new Tv({Hw:0,_S:t,vS:Sv(n)})}(t,i);var e=Sv(i),r=Q.resolve(t).then((function(t){return function(t,n){if(t){if("string"==typeof t)return{Hw:Je.KM,wS:t,vS:n||pv};if(t instanceof ArrayBuffer||Ho(t))return{Hw:Je.HM,wS:Pv(t),vS:n};if(function(t){return Nt(t)&&t.constructor&&t.constructor===p}(t)||Ot(t))return{Hw:Je.XM,wS:t,vS:n};throw new m("Unsupported BodyInit type")}return{Hw:Je.KM,wS:null,vS:n}}(t,e)}));return new Tv({Hw:1,rA:r,mS:n})}function Sv(t){return(t.get(mv)||"").toLowerCase()}var Tv=function(t){function n(n){var i;return(i=t.call(this)||this).yS=!1,i.SS=new Ko,i.SS.rA.catch(Ct),i.DS(n),i}ft(n,t);var i=n.prototype;return i.TS=function(){return this.SS.rA},i.dS=function(t){return this.NS(Ev,t)},i.lS=function(t){return this.NS(kv,t)},i.gS=function(t){return this.NS(Ov,t)},i._S=function(){return this.IS(function(t){return 0===t.Hw?t._S:wv(t.rA.then(Nv).then(dv),t.mS)}(this.MS))},i.NS=function(t,n){if(this.yS)return Q.reject(new m("Already used"));this.yS=!0;var i=t(this.MS,n);return this.SS.Em(i.then(Ct)),i},i.IS=function(t){if(this.yS)throw new m("Already used");if(t.locked)throw new m("Body stream is locked");this.yS=!0;var n=new av,i=Q.resolve(t.pipeTo(n.writable));return this.SS.Em(i),n.readable},i.DS=function(t){this.MS=t,1===t.Hw&&t.rA.catch(Ct)},i.ES=function(){if(this.yS)throw new m("Already used");var t=function(t){if(0===t.Hw){var n=Qe(t._S.tee(),2),i=n[0],e=n[1];return[{Hw:t.Hw,_S:i,vS:t.vS},{Hw:t.Hw,_S:e,vS:t.vS}]}var r=Qe(t.mS.Lm(),2),o=r[0],u=r[1];return[{Hw:t.Hw,rA:t.rA,mS:o},{Hw:t.Hw,rA:t.rA,mS:u}]}(this.MS),i=t[0],e=t[1];return this.DS(i),new n(e)},ct(n,[{key:"pS",get:function(){return this.yS}},{key:"bS",get:function(){return 0===this.MS.Hw}}]),n}(yv);function Ev(t,n){return 0===t.Hw?lv(t._S,n).then(bv):(n&&t.mS.Em(n),oo(t.rA.then(Iv),t.mS))}function Iv(t){switch(t.Hw){case Je.KM:return Q.resolve(t.wS||"");case Je.HM:return Q.resolve(t.wS).then(bv);case Je.XM:return Q.resolve(t.wS).then(JSON.stringify)}}function kv(t,n){return 0===t.Hw?Ev(t,n).then(JSON.parse):(n&&t.mS.Em(n),oo(t.rA.then(Rv),t.mS))}function Rv(t){return t.Hw===Je.XM?Q.resolve(t.wS):Iv(t).then(JSON.parse)}function Ov(t,n){return 0===t.Hw?lv(t._S,n):(n&&t.mS.Em(n),oo(t.rA.then(Nv),t.mS))}function Nv(t){switch(t.Hw){case Je.HM:return Q.resolve(t.wS);case Je.KM:case Je.XM:return Iv(t).then(gv)}}function Pv(t){return t instanceof ArrayBuffer?t:Fo(Uo(t)).buffer}var Av=function(t){function n(n){var i;return(i=t.call(this)||this).kS=n,i}ft(n,t);var i=n.prototype;return i.TS=function(){return this.kS.TS()},i.dS=function(t){return this.kS.dS(t)},i.lS=function(t){return this.kS.lS(t)},i.gS=function(t){return this.kS.gS(t)},i._S=function(t){return this.kS._S(t)},i.ES=function(){return this.kS.ES()},ct(n,[{key:"pS",get:function(){return this.kS.pS}},{key:"bS",get:function(){return this.kS.bS}}]),n}(yv);var Dv=function(t){function n(n,i){var e,r,o,u,s,f;i?(r=i.RS,o=i.CS,u=i.LS,s=i.PS,f=i.zS):(r=[],o=Je.KM,u=200,s="OK",f=!1);var h=n.jS,c=new tr(n.RS||r),a=n.CS||o,v=n.US||(i&&i.jS===h?i.US:h.Hu),d=i?i.kS:null,l=_v(void 0!==n.xS?n.xS:d,n.mS||new lr,c);return(e=t.call(this,l)||this).RS=c,e.jS=h,e.US=v,e.CS=a,e.LS=void 0!==n.LS?n.LS:u,e.PS=void 0!==n.PS?String(n.PS):s,e.zS=n.zS||f,e}ft(n,t);var i=n.prototype;return i.xS=function(t){return this.fS(this.CS,t)},i.Wp=function(){return new n({xS:this.ES(),jS:this.jS},this)},n}(Av),Cv=function(){function t(){}var n=t.prototype;return n.jS=function(t){var n=function(t){return new Dv({xS:null,RS:{},jS:t,US:t.Hu,CS:t.CS,LS:0,PS:ao.gp})}(new gr(t));return Q.resolve(n)},n.wN=function(t){},n.gn=function(){},t}();var xv=function(){function t(t,n){void 0===n&&(n=!0),this.yN=t,this.MN=n}var n=t.prototype;return n.jS=function(t){var n=this.AN(t);return this.yN.jS(n)},n.wN=function(t){return this.yN.wN(this.bN(t))},n.AN=function(n){var i=new gr(n);if(!this.MN){var e=t.TN(i.Hu);i=new gr({Hu:e},i)}return i},n.bN=function(n){var i=n.Hu;return this.MN||(i=t.TN(i)),{Hu:i,wS:n.wS}},n.gn=function(){this.yN.gn()},t.TN=function(t){return Rt.Ow&&Yr(t,"http://")?t.replace(":","s:"):t},ct(t,null,[{key:"mN",get:function(){return t.pN||(t.pN=new t(new Cv)),t.pN}}]),t}();xv.pN=void 0;var Bv=function(t){function n(n,i,e){var r;return(r=t.call(this,n.jS,null!=e?e:function(t){return"Error while loading "+t.jS.Hu+", status code "+t.LS}(n),i)||this).LN=n,r}return ft(n,t),ct(n,[{key:"name",get:function(){return yr.NN}},{key:"kN",get:function(){return this.LN}}]),n}(_r);var Mv=function(t){function n(n,i){return t.call(this,n,function(t){return"Request for "+t.Hu+" timed out after "+t.aN+" seconds."}(n),i)||this}return ft(n,t),ct(n,[{key:"name",get:function(){return yr.DN}}]),n}(_r),Uv=self.fetch,Lv=self.Request,Fv=self.Response,zv=self.Headers,Wv=self.ReadableStream,Hv=self.AbortSignal,Vv=self.AbortController,qv=xt((function(){try{return Pt(Uv)&&At(Lv)&&At(Fv)&&At(zv)&&"forEach"in zv.prototype&&Ye()}catch(t){return!1}})),Xv=["http:","https:"];var jv=xt((function(){try{return qv()&&At(Hv)&&At(Vv)&&"signal"in Lv.prototype}catch(t){return!1}})),Yv=xt((function(){try{return qv()&&At(Wv)&&"body"in Fv.prototype&&!Et.Rg}catch(t){return!1}}));function Kv(t,n){var i,e=t.RS.has("content-length")?Number(t.RS.get("content-length")):void 0;return i=t.bS?function(t,n,i){return t.pipeThrough(new av(new Gv(n,i)))}(t._S(),n,e):function(t,n,i){return $v.apply(this,arguments)}(t.gS(),n,e),new Dv({xS:i,jS:t.jS},t)}var Gv=function(){function t(t,n){this.CN=t,this.jN=n,this.xN=0}var n=t.prototype;return n.transform=function(t,n){this.xN+=t.byteLength,this.CN(this.xN,this.jN),n.enqueue(t)},n.flush=function(t){var n;this.CN(this.xN,null!=(n=this.jN)?n:this.xN)},t}();function $v(){return $v=rr((function(t,n,i){var e,r;return or(this,(function(o){switch(o.label){case 0:return[4,Q.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]}}))})),$v.apply(this,arguments)}var Zv=function(){function t(t){this.bM=new lr,this.LN=void 0,this.RN=0,this.PN=!1,this.EN=t,this.bM.Em(t.wm),this.kN=this.ON()}var n=t.prototype;return n.ON=function(){var t=this;return rr((function(){var n,i,e,r,o,u,s,f,h;return or(this,(function(c){switch(c.label){case 0:(n=t.EN).aN&&(t.RN=d((function(){t.PN=!0,t.bM.Dm()}),n.aN),t.bM.wm.Sm((function(){l(t.RN)})));try{i=Uv(n.Hu,{method:n.hN,headers:n.RS.JM(),body:n.wS,credentials:n.dN?"include":"same-origin",signal:td(t.bM.wm),mode:n.gN,keepalive:n.vN})}catch(t){throw new Sr(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(),eo(o=t.zN(r))&&t.bM.Dm(),o;case 4:if(u=e.url||n.Hu,s=0===e.status&&"file:"===function(t){return Rt.Ah(t).protocol}(u)?200:e.status,f=new Jv(t,e,t.bM),!function(t){return t.LS>=200&&t.LS<=299||304===t.LS}(h=new Dv({xS:f,jS:n,CS:n.CS,RS:nd(e.headers),LS:s,PS:e.statusText,US:u})))throw new Bv(h);return n.fN&&(h=Kv(h,n.fN)),[2,h]}}))}))()},n.zN=function(t){return function(t){return t instanceof _r}(t)?t:eo(t)?this.PN?new Mv(this.EN):new io(t.message,t):this.LN?new Bv(this.LN,t):new Sr(this.EN,t)},t}(),Jv=function(t){function n(n,i,e){var r;return(r=t.call(this)||this).SS=new Ko,r.UN=n,r.BN=i,r.bM=e,r.SS.rA.catch(Ct),r}ft(n,t);var i=n.prototype;return i.TS=function(){return this.SS.rA},i.dS=function(t){return this.NS(this.BN.text(),t)},i.gS=function(t){return this.NS(this.BN.arrayBuffer(),t)},i._S=function(){var t=this.BN.body;return t?this.IS(t):wv(this.gS().then(dv),this.bM)},i.ES=function(){var t=this.BN.clone(),i=Qe(this.bM.Lm(),2),e=i[0],r=i[1];return this.bM=e,new n(this.UN,t,r)},i.NS=function(t,n){var i=this;n&&this.bM.Em(n);var e=ro(Q.resolve(t),this.bM.wm).catch((function(t){throw i.UN.zN(t)}));return e=oo(e,this.bM),this.SS.Em(e.then(Ct)),e},i.IS=function(t){var n=this;return new cv(new id(t,(function(t){return n.UN.zN(t)}),this.bM,this.SS),{highWaterMark:0})},ct(n,[{key:"pS",get:function(){return this.BN.bodyUsed}},{key:"bS",get:function(){return kt(this.BN.body)}}]),n}(yv),Qv="abort";function td(t){if(jv()){var n=new Vv;if(t.gm)n.abort();else if(!t.Am){var i=function(){e(),n.abort()},e=function(){n.signal.removeEventListener(Qv,i),t._m(i),t.Nm(e)};n.signal.addEventListener(Qv,i),t.vm(i),t.Sm(e)}return n.signal}}function nd(t){if(function(t){return Nt(t)&&"function"==typeof t.forEach}(t)){var n=new tr;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 tr(t)}var id=function(){function t(t,n,i,e){this.QN=t,this.FN=n,this.bM=i,this.SS=e}var n=t.prototype;return n.start=function(t){this.uT=this.QN.getReader()},n.pull=function(t){var n=this;return rr((function(){var i,e,r;return or(this,(function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),[4,ro(n.uT.read(),n.bM.wm)];case 1:return i=o.sent(),[3,3];case 2:return e=o.sent(),r=n.FN(e),n.SS.sA(r),n.bM.Dm(),n.uT.cancel(r).catch(Ct),t.error(r),[2];case 3:return i.done?(n.SS.eA(),n.bM.Dm(),t.close()):t.enqueue(i.value),[2]}}))}))()},n.cancel=function(t){return this.bM.Dm(),this.SS.sA(t),this.uT.cancel(t)},t}(),ed=function(){function t(t){var n=this;this.bM=new lr,this.LN=void 0,this.YN=new Ko,this.JN=!1,this.KN=function(){var t;n.GN(),null==(t=n.VN)||t.abort()},this.EN=t,this.bM.Em(t.wm),this.VN=new I,this.ON()}var n=t.prototype;return n.ON=function(){var t=this,n=this.VN,i=this.EN;if(i.wm.gm)return this.GN();n.onreadystatechange=function(){return t.WN()},n.onprogress=function(n){return t.CN(n)},n.onload=function(){return t.ZN()},n.onloadend=function(){return t.HN()},n.onerror=function(){return t.XN()},n.ontimeout=function(){return t.qN()},n.onabort=function(){return t.GN()},n.open(i.hN,i.Hu,!0),n.withCredentials=Boolean(i.dN),"responseType"in n&&i.CS&&(i.CS===Je.KM?n.responseType="text":n.responseType="arraybuffer"),i.RS.forEach((function(t,i){n.setRequestHeader(i,t)})),i.aN&&(n.timeout=i.aN),this.bM.wm.vm(this.KN);var e=i.wS;e?n.send(e):n.send()},n.WN=function(){var t=this.VN;void 0!==t&&t.readyState>=2&&!this.JN&&(this.JN=!0,this.$N())},n.$N=function(){var t,n,i=this.VN,e=function(t){var n=new tr,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.EN;this.tI=new Ko,this.LN=new Dv({jS:r,CS:r.CS,xS:this.tI.rA,LS:i.status,PS:i.statusText,RS:e,US:null!=(n=i.responseURL)?n:e.get("X-Request-URL")}),null==(t=this.YN)||t.eA(this.LN)},n.ZN=function(){var t,n=this.VN;if(void 0!==n){var i=n.response;if(!kt(i)){var e=this.EN.CS;i=e===Je.KM?n.responseText:e===Je.HM?new ArrayBuffer(0):{}}null==(t=this.tI)||t.eA(i)}},n.HN=function(){this.gn()},n.CN=function(t){void 0!==this.VN&&(null==this.EN.fN||this.EN.fN.call(this.EN,t.loaded,t.lengthComputable?t.total:void 0))},n.XN=function(){var t=new g("Network request failed");this.LN?this.Ss(new Bv(this.LN,t)):this.Ss(new Sr(this.EN,t))},n.qN=function(){this.Ss(new Mv(this.EN))},n.GN=function(){this.Ss(new io),this.gn()},n.Ss=function(t){var n,i;null==(n=null!=(i=this.tI)?i:this.YN)||n.sA(t)},n.gn=function(){this.VN=void 0,this.LN=void 0,this.YN=void 0,this.tI=void 0,this.bM.Mm()},ct(t,[{key:"kN",get:function(){return this.YN.rA}}]),t}();var rd=function(){function t(){}var n=t.prototype;return n.jS=function(t){return function(t){if(!qv()||!function(t){try{return Xv.indexOf(new self.URL(t,self.location.href).protocol)>=0}catch(t){return!1}}(t.Hu))return!1;if(!Yv()&&t.fN)return!1;if(!t._N){if(Et.s_&&Et.Gg<=68)return!1;if(Et.$g)return!1}return!0}(t)?new Zv(t).kN:new ed(t).kN},n.wN=function(t){var n=t.vS?{"Content-type":t.vS}:void 0;this.jS(new gr({hN:wr.POST,Hu:t.Hu,wS:t.wS,RS:n,gN:br.nN})).then((function(t){!function(t){t.then(Ct,Ct)}(t.gS())}),Ct)},n.gn=function(){},t}();var od=function(t){return t[t.iI=1]="iI",t[t.eI=2]="eI",t[t.KM=3]="KM",t[t.sI=4]="sI",t[t.nI=9]="nI",t}({});var ud=function(){function t(){}return t.prototype.oI=function(t){var n,i=new DOMParser;try{n=i.parseFromString(t,"text/xml")}catch(t){throw new Er(t)}if(!n||n.getElementsByTagName("parsererror").length>0)throw new Er;return new dd(n)},t}(),sd=function(){function t(t){this.aI=t}var n=t.prototype;return n.dI=function(t){return this.aI.isEqualNode(t.aI)},n.fI=function(n){return new t(this.aI.cloneNode(n))},ct(t,[{key:"rI",get:function(){return od.eI}},{key:"hI",get:function(){var t;return null!=(t=this.aI.localName)?t:bd(this.aI.nodeName)}},{key:"l",get:function(){return this.aI.nodeName}},{key:"uI",get:function(){var t;return null!=(t=this.aI.namespaceURI)?t:void 0}},{key:"cI",get:function(){var t;return null!=(t=this.aI.prefix)?t:void 0}},{key:"lI",get:function(){return this.aI.nodeValue}}]),t}(),fd=function(){function t(t){this._I=void 0,this.vI=t}var n=t.prototype;return n.wI=function(t){return this.gI.filter((function(n){return ld(n)&&n.mI===t}))},n.pI=function(t,n){return this.gI.filter((function(i){return ld(i)&&i.hI===n&&i.uI===t}))},n.yI=function(t){this.vI.appendChild(t.AI),this._I&&this._I.push(t)},n.dI=function(t){return this.vI.isEqualNode(t.AI)},ct(t,[{key:"gI",get:function(){return void 0===this._I&&(this._I=function(t){for(var n=[],i=0;i<t.length;i++){var e=wd(t.item(i));e&&n.push(e)}return n}(this.vI.childNodes)),this._I}},{key:"m",get:function(){return this.gI.filter(ld)}},{key:"AI",get:function(){return this.vI}}]),t}(),hd=function(t){function n(n){return t.call(this,n)||this}ft(n,t);var i=n.prototype;return i.TI=function(t){if(this.vI.hasAttribute(t))return this.vI.getAttribute(t)},i.SI=function(t,n){if(this.vI.hasAttributeNS(t,n))return this.vI.getAttributeNS(t,n)},i.NI=function(t){this.vI.removeAttribute(t)},i.II=function(t,n){this.vI.removeAttributeNS(t,n)},i.DI=function(t,n){this.vI.setAttribute(t,n)},i.EI=function(t,n,i){this.vI.setAttributeNS(t,n,i)},i.fI=function(t){return new n(this.vI.cloneNode(t))},ct(n,[{key:"rI",get:function(){return od.iI}},{key:"hI",get:function(){var t;return null!=(t=this.vI.localName)?t:bd(this.vI.nodeName)}},{key:"uI",get:function(){var t;return null!=(t=this.vI.namespaceURI)?t:void 0}},{key:"cI",get:function(){var t;return null!=(t=this.vI.prefix)?t:void 0}},{key:"mI",get:function(){return this.vI.nodeName}},{key:"bI",get:function(){return function(t){for(var n=[],i=0;i<t.length;i++)n.push(new sd(t.item(i)));return n}(this.vI.attributes)}},{key:"MI",get:function(){return this.vI.textContent}}]),n}(fd),cd=function(){function t(t){this.vI=t}return t.prototype.dI=function(t){return this.xS===t.xS},ct(t,[{key:"xS",get:function(){return this.vI.nodeValue}},{key:"AI",get:function(){return this.vI}}]),t}(),ad=function(t){function n(n){return t.call(this,n)||this}return ft(n,t),n.prototype.fI=function(t){return new n(this.vI.cloneNode(t))},ct(n,[{key:"rI",get:function(){return od.KM}}]),n}(cd),vd=function(t){function n(n){return t.call(this,n)||this}return ft(n,t),n.prototype.fI=function(t){return new n(this.vI.cloneNode(t))},ct(n,[{key:"rI",get:function(){return od.sI}}]),n}(cd),dd=function(t){function n(n){return t.call(this,n)||this}return ft(n,t),n.prototype.fI=function(t){return new n(this.vI.cloneNode(t))},ct(n,[{key:"rI",get:function(){return od.nI}},{key:"kI",get:function(){return new hd(this.vI.documentElement)}}]),n}(fd);function ld(t){return function(t){return 1===t.rI}(t)}function wd(t){switch(t.nodeType){case od.iI:return new hd(t);case od.KM:return new ad(t);case od.sI:return new vd(t)}}function bd(t){var n=t.indexOf(":");return n<0?t:t.substr(n+1)}var gd=function(t){function n(){var n;return(n=t.apply(this,arguments)||this).LI=void 0,n.CI=Yv(),n.OI=Et.O_||Et.Rg,n.zI=(Et.O_||Et.s_&&Et.Gg<=68||Et.Rg)&&!(Et.$g&&Et.i_<3),n.WI=void 0,n.ZI=new ud,n}return ft(n,t),n.prototype.oI=function(t){return this.ZI.oI(t)},ct(n,[{key:"mw",get:function(){return this.LI||(this.LI=new no(Qf())),this.LI}},{key:"xI",get:function(){return this.CI}},{key:"jI",get:function(){return this.OI}},{key:"RI",get:function(){return this.zI}},{key:"BI",get:function(){return!1}},{key:"UI",get:function(){return nh.ZM()}},{key:"QI",get:function(){return{FI:rh}}},{key:"YI",get:function(){return v.connection&&v.connection.effectiveType||$e}},{key:"VI",get:function(){return v.connection&&v.connection.type||Ze}},{key:"GI",get:function(){return this.WI||(this.WI=new xv(new rd)),this.WI}}]),n}(Xe);Dt(new gd);var md,pd=function(t){return t.tN="audio",t.iN="video",t.tU="metadata",t}({}),yd=function(t){return t.YS="#EXTINF",t.HRt="#EXT-X-MAP",t.p="#EXTM3U",t.en="#EXT-X-VERSION",t.ui="#EXT-X-TARGETDURATION",t.hTt="#EXT-X-START",t.li="#EXT-X-INDEPENDENT-SEGMENTS",t.qM="#EXT-X-STREAM-INF",t.vr="#EXT-X-MEDIA-SEQUENCE",t.if="#EXT-X-ENDLIST",t.sf="#EXT-X-MEDIA",t.ff="#EXT-X-DISCONTINUITY",t.af="#EXT-X-DISCONTINUITY-SEQUENCE",t.tv="#EXT-X-PLAYLIST-TYPE",t.nv="#EXT-X-KEY",t}({}),_d=function(){function t(t,n){this.Hw="#EXTINF",this.ev=t,this.sv=n}return t.prototype.Gk=function(){return this.Hw+":"+this.ev+",\n"+this.sv},t}(),Sd=function(){function t(t){this.Hw="#EXT-X-MAP",this.sv=t}return t.prototype.Gk=function(){return this.Hw+':URI="'+this.sv+'"'},t}(),Td=function(){function t(){this.Hw="#EXTM3U"}return t.prototype.Gk=function(){return this.Hw},t}(),Ed=function(){function t(t){this.Hw="#EXT-X-VERSION",this.Rx=t}return t.prototype.Gk=function(){return this.Hw+":"+this.Rx},t}(),Id=function(){function t(t){this.Hw="#EXT-X-TARGETDURATION",this.BRt=t}return t.prototype.Gk=function(){return this.Hw+":"+this.BRt},t}(),kd=function(){function t(t){this.Hw="#EXT-X-START",this.UPt=t}return t.prototype.Gk=function(){return this.Hw+":TIME-OFFSET="+this.UPt},t}(),Rd=function(){function t(t,n,i){this.uri=t,this.keyFormat=n,this.keyFormatVersions=i,this.Hw="#EXT-X-KEY"}return t.prototype.Gk=function(){return this.Hw+':METHOD=SAMPLE-AES,URI="'+this.uri+'",KEYFORMAT="'+this.keyFormat+'",KEYFORMATVERSIONS="'+this.keyFormatVersions+'"'},t}(),Od=function(){function t(t){this.Hw="#EXT-X-STREAM-INF",this.mF=1,this.sv=t}return t.prototype.Gk=function(){return this.Hw+":BANDWIDTH="+this.mF+',AUDIO="audio"\n'+this.sv},t}(),Nd=function(){function t(t){this.Hw="#EXT-X-MEDIA-SEQUENCE",this.Hj=t}return t.prototype.Gk=function(){return this.Hw+":"+this.Hj},t}(),Pd=function(){function t(t){this.Hw="#EXT-X-MEDIA",this.sv=t}return t.prototype.Gk=function(){var t=Or();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.sv+'"');var n=[];return t.forEach((function(t,i){return n.push(i+"="+t)})),this.Hw+":"+n.join(",")},t}(),Ad=function(){function t(t){this.PA=[],this.PA=t}var n=t.prototype;return n.NC=function(){return this.PA},n.cv=function(t){this.PA.push(t)},n.fUt=function(){for(var t="",n=0,i=this.NC();n<i.length;n++){t+=i[n].Gk()+"\n"}return t},n.Mm=function(){this.PA.length=0},t}(),Dd=function(t){function n(n,i){var e;return e=t.call(this,[new Td,new Ed(8)])||this,i&&e.cv(new Od("video/index.m3u8")),n&&e.cv(new Pd("audio/index.m3u8")),e}return ft(n,t),n}(Ad),Cd=function(t){return t.Bit="HELLO",t.Uit="HI_THERE",t.Qit="INITIALIZE",t.Fit="APPEND_INIT",t.Yit="APPEND_DATA",t.Vit="ACK",t.Git="REMOVE",t.Wit="DESTROY_SESSION",t}({}),xd=new Array(256);for(md=0;md<256;md+=1)xd[md]=(md<16?"0":"")+md.toString(16);function Bd(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var n=16*y.random()|0;return("x"===t?n:3&n|8).toString(16)}))}var Md=function(t){function n(n){var i;return(i=t.call(this,"append")||this).xS=n,i}return ft(n,t),n}(co),Ud=function(t){function n(){var n;return(n=t.apply(this,arguments)||this).TIt=0,n.Hv=new E(0),n.wA=!1,n.av=!1,n}ft(n,t);var i=n.prototype;return i.c2=function(t,n){this.TIt+=n,this.Hv=qo([this.Hv,t]),this.yo(new Md(t))},i.Ws=function(){this.Ib||(this.yo(new co("close")),this.wA=!0)},ct(n,[{key:"KI",get:function(){return this.TIt}},{key:"xS",get:function(){return this.Hv}},{key:"Ib",get:function(){return this.wA}},{key:"dv",get:function(){return this.av},set:function(t){this.av=t}}]),n}(ho),Ld="sync-seg-",Fd=function(){function t(t,n){this.lv=!1,this.wv=!1,this.o=Ld+Bd(),this.gv=n?new Ud:void 0,this.kv=t?new Ud:void 0}return t.prototype.Ws=function(){this.gv&&this.gv.Ws(),this.kv&&this.kv.Ws()},ct(t,[{key:"jv",get:function(){return this.lv},set:function(t){this.lv=t}},{key:"Ad",get:function(){return this.wv},set:function(t){this.wv=t}}]),t}(),zd=1.1,Wd=function(t){function n(n,i,e){var r;return(r=t.call(this,[new Td,new Ed(8),new Id(1),new kd(0)])||this).tw=[],r.Byt=Or(),r.rw=0,r.sw=function(t){if(t.RP>=cn)for(;r.tw.length>0;)r.bw()},e&&r.cv(new Rd(e,"com.apple.streamingkeydelivery","1")),r.mut=n,r.Aot=i,r.Aot.yn("remove",r.sw),r.kw=new Nd(0),r.cv(r.kw),r}ft(n,t);var i=n.prototype;return i._kt=function(){return this.mut===pd.iN?this.Aot.tb:this.mut===pd.tN?this.Aot.nb:void 0},i.gut=function(t){return this.Byt.get(t)},i.Mm=function(){this.tw.length=0,this.kw.Hj=0,this.Byt.clear(),this.rw=0},i.NC=function(){return this.cb(),Cn(t.prototype.NC.call(this)).concat(Cn(this.tw))},i.cb=function(){for(var t=this.Aot.ab(),n=0;n<t.length;n++){var i=t[n];if(!this.Byt.has(i.o)){var e=void 0;if(this.mut===pd.iN?(e=i.gv,i.Ad=!0):(e=i.kv,i.jv=!0),!e)return;this.Byt.set(i.o,e),e.dv&&this.tw.push(new Sd(i.o+"-init")),this.tw.push(new _d(zd,i.o)),this.rw+=zd}}this.lb()},i.lb=function(){for(;this.rw>60;)this.bw()},i.bw=function(){var t=this.tw.shift();void 0!==t&&function(t){return t.Hw===yd.YS}(t)&&(this.Byt.delete(t.sv),this.rw-=t.ev,this.kw.Hj++)},n}(Ad);var Hd=function(t){function n(n){var i;return(i=t.call(this,"remove")||this).RP=n,i}return ft(n,t),n}(co),Vd=function(t){function n(n,i){var e;return(e=t.call(this)||this).tg=n,e.ng=i,e.ig=[],e.ug=[],e.sg=Or(),e.lg=Or(),e.bg=Or(),e.mg=0,e}ft(n,t);var i=n.prototype;return i.ab=function(){return this.kg?(this.ig=this.ig.filter((function(t){return!(t.Ad&&t.jv)})),Cn(this.ig).concat([this.kg],Cn(this.ug))):[]},i.f2=function(t){this.tm(t)},i.c2=function(t){this.tm(t),this.rm(t),this.om(t)},i.Rb=function(t){this.tm(t),this.om(t)},i.Mm=function(){var t;null==(t=this.kg)||t.Ws(),this.kg=void 0,this.ug.forEach((function(t){return t.Ws()})),this.ug.length=0,this.ig.length=0,this.bg=Or(),this.mg=0},i.rm=function(t){var n=t.startPts,i=t.totalDuration;this.lg.set(t.mediaType,n+i)},i.sm=function(){if(this.kg){this.kg.Ws(),this.ig.push(this.kg);var t=this.ug.shift(),n=new Fd(this.tg,this.ng);t?(this.kg=t,this.ug.push(n)):this.kg=n}},i.am=function(t){if(this.kg){var n=!this.kg.kv||0===this.kg.kv.KI,i=!this.kg.gv||0===this.kg.gv.KI,e=this.kg.kv&&this.kg.kv.dv,r=this.kg.gv&&this.kg.gv.dv,o=i&&(n&&!(this.kg.jv||this.kg.Ad)||e),u=n&&(i&&!(this.kg.jv||this.kg.Ad)||r);(t===pd.tN&&!u||t===pd.iN&&!o)&&(this.sm(),this.sm())}},i.tm=function(t){var n=t.mediaType,i=t.kind,e=this.sg.get(n);if(void 0===e){if(i===Cd.Fit||i===Cd.Yit){var r=[t];this.sg.set(n,r)}}else e.push(t)},i.om=function(t){var n=this.bm(t);for(var i=0;i<n.length;i++){var e=n[i];switch(e.kind){case Cd.Fit:this.km(e),this.bg=Or(),this.mg=0;break;case Cd.Git:this.ip(e);break;case Cd.Yit:this.up(e)}}},i.km=function(t){var n=t.mediaType;void 0===this.kg?(this.kg=new Fd(this.tg,this.ng),this.ug.push(new Fd(this.tg,this.ng))):this.am(n),n===pd.iN?(this.ty=t.segment,this.kg.gv.dv=!0):n===pd.tN&&(this.ny=t.segment,this.kg.kv.dv=!0)},i.up=function(t){var n,i,e=t.mediaType===pd.tN,r=t.totalDuration,o=null!=(n=this.bg.get(t.mediaType))?n:0;e?(this.kg.kv.c2(t.segment,r),i=o+this.kg.kv.KI):(this.kg.gv.c2(t.segment,r),i=o+this.kg.gv.KI),i>=this.mg+zd&&(this.bg.set(t.mediaType,i),this.mg+=zd,this.sm())},i.ip=function(t){this.lg.set(t.mediaType,void 0),this.am(t.mediaType),this.ig.length=0,this.yo(new Hd(t.endTime))},i.bm=function(t){var n=this;if(t.kind===Cd.Git)return this.hy(t);var i=[];return this.sg.forEach((function(t){if(t&&t.length>0){var e=sr(t,(function(t){return t.kind===Cd.Git}));-1===e&&(e=t.length);for(var r=t.slice(0,e),o=0;o<r.length;o++){var u=r[o];if(!ar(i,u)){var s,f=n.hy(u);if(f.length>0)(s=i).push.apply(s,Cn(f));else if(u.kind===Cd.Yit)break}}}})),i},i.hy=function(t){var n=this.sg.get(t.mediaType),i=function(t){return t===pd.iN?pd.tN:pd.iN}(t.mediaType);if(!(i===pd.iN?this.ng:this.tg))return n.splice(0,n.indexOf(t)+1);if(t.kind===Cd.Fit)return[];var e=this.lg.get(i);if(void 0===e)return[];if(t.kind===Cd.Git){var r=this.by(i);if(r.length>0){var o=n.splice(0,n.indexOf(t));return n.splice(0,1),Cn(o).concat(Cn(r),[t])}return[]}if(t.startPts<=e){var u=n.splice(0,n.indexOf(t));n.splice(0,1);var s=this.my(t,u,i);return Cn(u).concat(Cn(s),[t])}return[]},i.my=function(t,n,i){var e=this.sg.get(i);if(!e)return[];var r=t.startPts+t.totalDuration,o=sr(e,(function(t){return t.kind===Cd.Git})),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===Cd.Yit&&h.startPts>r&&(s=f)}var c=-1;return-1!==sr(n,(function(t){return t.kind===Cd.Fit}))&&(c=sr(e,(function(t){return t.kind===Cd.Fit}))),c>s&&(s=c+1),s>0?(e[s-1].kind===Cd.Fit&&(s-=1),e.splice(0,s)):[]},i.by=function(t){var n=this.sg.get(t);if(n){var i=sr(n,(function(t){return t.kind===Cd.Git}));if(i>=0)return n.splice(0,i+1)}return[]},i.ky=function(){var t="[MEDIABUFFER] endPTS: ";this.lg.forEach((function(n,i){t=t.concat(i+" = "+n+" ")})),Rt.cw(t)},i.OS=function(t,n){var i=t+": [";null==n||n.forEach((function(t){i=i.concat(" "+t.kind+"("+t.mediaType+")")})),i=i.concat(" ]"),Rt.cw(i)},ct(n,[{key:"nb",get:function(){var t;return null==(t=this.ny)?void 0:t.slice()}},{key:"tb",get:function(){var t;return null==(t=this.ty)?void 0:t.slice()}}]),n}(ho);var qd=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.AS=new Vd(i,e),this.BS=new Dd(i,e),i&&(this.RT=new Wd(pd.tN,this.AS,n)),e&&(this.IE=new Wd(pd.iN,this.AS,n))}var n=t.prototype;return n.ME=function(t){var n,i,e=Xd(t);return e===pd.iN?null==(n=this.IE)?void 0:n._kt():e===pd.tN?null==(i=this.RT)?void 0:i._kt():void 0},n.gut=function(t){var n,i,e=t.split("/")[1],r=Xd(t);return r===pd.iN?null==(n=this.IE)?void 0:n.gut(e):r===pd.tN?null==(i=this.RT)?void 0:i.gut(e):void 0},n.f2=function(t){this.AS.f2(t)},n.c2=function(t){this.AS.c2(t)},n.Glt=function(t){this.AS.Rb(t)},n.Mm=function(){var t,n;this.AS.Mm(),this.BS.Mm(),null==(t=this.RT)||t.Mm(),null==(n=this.IE)||n.Mm()},ct(t,[{key:"tk",get:function(){return this.BS}},{key:"ik",get:function(){return this.RT}},{key:"uk",get:function(){return this.IE}}]),t}();function Xd(t){return t.match(/video/)?pd.iN:pd.tN}var jd=function(){function t(t,n){var i=this;this.sk=t,this.ak=n,this.Vut=void 0,this.TZt=rr((function(t){var n,e;return or(this,(function(r){switch((n=t.data).kind){case Cd.Qit:i.Vut=new qd(n.mediaBufferConfigs,n.fairPlaySdkUri);break;case Cd.Fit:i.Vut.f2(n);break;case Cd.Yit:i.Vut.c2(n);break;case Cd.Git:i.Vut.Glt(n)}return e={kind:Cd.Vit},i.sk.postMessage(e),[2]}))})),this.sk.onmessage=this.TZt}var n=t.prototype;return n.fUt=function(t){return"master.m3u8"===t?this.Vut.tk:"video/index.m3u8"===t?this.Vut.uk:"audio/index.m3u8"===t?this.Vut.ik:void 0},n.mk=function(t){if(t.match(/m3u8/)){var n,i=null==(n=this.fUt(t))?void 0:n.fUt();return new Response(i,{headers:{"Content-Type":"application/x-mpegurl; charset=utf-8"}})}if(t.match(Ld)){var e={"Content-Type":t.match(/video/)?"video/mp4":"audio/mp4"};if(t.match(/init/)){var r,o=null==(r=this.Vut)?void 0:r.ME(t);return new Response(o,{headers:e})}var u=this.lut(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.xS)},e=function(){n.close(),t.fn("append",i),t.fn("close",e)};return new self.ReadableStream({start:function(r){(n=r).enqueue(t.xS),t.Ib?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.lut=function(t){return this.Vut.gut(t)},n.close=function(){var t;this.sk.close(),null==(t=this.Vut)||t.Mm()},t}(),Yd=function(){function t(){var t=this;this.P6=Or(),this.TZt=function(n){var i=n.data;if(i.kind===Cd.Bit){t.kk().catch(Ct);var e=i.port,r=Bd(),o=new jd(e,n.source.id);t.P6.set(r,o);var u=function(n){n.data.kind===Cd.Wit&&(t.TR(r),e.removeEventListener("message",u))};e.addEventListener("message",u);var s={kind:Cd.Uit,sessionId:r};e.postMessage(s)}},this.CR=function(n){if(Yr(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.P6.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.mk(r);n.respondWith(f)}}}var n=t.prototype;return n.ur=function(t){this.iZt=t,t.addEventListener("message",this.TZt),t.addEventListener("fetch",this.CR)},n.TR=function(t){var n=this.P6.get(t);n&&n.close(),this.P6.delete(t)},n.kk=function(){var t=this;return rr((function(){var n,i;return or(this,(function(e){switch(e.label){case 0:return[4,t.iZt.clients.matchAll()];case 1:return n=e.sent(),i=n.map((function(t){return t.id})),t.P6.forEach((function(n,e){ar(i,n.ak)||t.TR(e)})),[2]}}))}))()},t}();Yd.BR=new Yd;var Kd=self;Kd.addEventListener("install",(function(t){t.waitUntil(Kd.skipWaiting())})),Kd.addEventListener("activate",(function(t){t.waitUntil(Kd.clients.claim())})),Yd.BR.ur(Kd)}("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof s?s:"undefined"!=typeof global?global:this);
|