@theoplayer/extended 4.8.0 → 4.9.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/theoplayer.sw.js DELETED
@@ -1,30 +0,0 @@
1
- /*!
2
- THEOplayer
3
-
4
- Usage of this software is limited by the THEOplayer License.
5
-
6
- It is prohibited to reverse engineer, decompile, translate,
7
- disassemble, decipher, decrypt, or otherwise attempt to
8
- discover the source code of this software.
9
-
10
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
11
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
12
- OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
13
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
14
- HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
15
- WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
16
- FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
17
- OTHER DEALINGS IN THE SOFTWARE.
18
-
19
- For more information, visit https://www.theoplayer.com or contact
20
- contact @ theoplayer . com
21
-
22
-
23
-
24
- THEOplayer is based on patented technology developed by
25
- THEO Technologies (https://www.theoplayer.com).
26
-
27
- Version: 2023.1.2 (4.8.0)
28
- Created: 2023-02-06T11:51:25.266Z
29
- */
30
- !function(t){!function(){"use strict";var n=t.window,i=t.document,e=(t.location,t.navigator),r=t.setTimeout,o=t.clearTimeout,u=t.setInterval,s=t.clearInterval,f=t.Error,h=t.TypeError,c=(t.SyntaxError,t.Object),a=t.Math,v=t.parseInt,d=t.parseFloat,l=t.isNaN,w=t.Uint8Array,b=(t.Worker,t.WorkerGlobalScope,t.XMLHttpRequest);var g=r;function m(t){return Boolean(t&&void 0!==t.length)}function p(){}function y(t){if(!(this instanceof y))throw new h("Promises must be constructed via new");if("function"!=typeof t)throw new h("not a function");this.ke=0,this.ye=!1,this.me=void 0,this.pe=[],R(t,this)}function _(t,n){for(;3===t.ke;)t=t.me;0!==t.ke?(t.ye=!0,y.Ae(function(){var i=1===t.ke?n.onFulfilled:n.onRejected;if(null!==i){var e;try{e=i(t.me)}catch(t){return void T(n.promise,t)}S(n.promise,e)}else(1===t.ke?S:T)(n.promise,t.me)})):t.pe.push(n)}function S(t,n){try{if(n===t)throw new h("A promise cannot be resolved with itself.");if(n&&("object"==typeof n||"function"==typeof n)){var i=n.then;if(n instanceof y)return t.ke=3,t.me=n,void E(t);if("function"==typeof i)return void R((e=i,r=n,function(){e.apply(r,arguments)}),t)}t.ke=1,t.me=n,E(t)}catch(n){T(t,n)}var e,r}function T(t,n){t.ke=2,t.me=n,E(t)}function E(t){2===t.ke&&0===t.pe.length&&y.Ae(function(){t.ye||y.Te(t.me)});for(var n=0,i=t.pe.length;n<i;n++)_(t,t.pe[n]);t.pe=null}function I(t,n,i){this.onFulfilled="function"==typeof t?t:null,this.onRejected="function"==typeof n?n:null,this.promise=i}function R(t,n){var i=!1;try{t(function(t){i||(i=!0,S(n,t))},function(t){i||(i=!0,T(n,t))})}catch(t){if(i)return;i=!0,T(n,t)}}y.prototype.catch=function(t){return this.then(null,t)},y.prototype.then=function(t,n){var i=new this.constructor(p);return _(this,new I(t,n,i)),i},y.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)})})},y.all=function(t){return new y(function(n,i){if(!m(t))return i(new h("Promise.all accepts an array"));var e=Array.prototype.slice.call(t);if(0===e.length)return n([]);var r=e.length;function o(t,u){try{if(u&&("object"==typeof u||"function"==typeof u)){var s=u.then;if("function"==typeof s)return void s.call(u,function(n){o(t,n)},i)}e[t]=u,0==--r&&n(e)}catch(t){i(t)}}for(var u=0;u<e.length;u++)o(u,e[u])})},y.allSettled=function(t){return new this(function(n,i){if(!t||void 0===t.length)return i(new h(typeof 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"==typeof 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])})},y.resolve=function(t){return t&&"object"==typeof t&&t.constructor===y?t:new y(function(n){n(t)})},y.reject=function(t){return new y(function(n,i){i(t)})},y.race=function(t){return new y(function(n,i){if(!m(t))return i(new h("Promise.race accepts an array"));for(var e=0,r=t.length;e<r;e++)y.resolve(t[e]).then(n,i)})},y.Ae="function"==typeof setImmediate&&function(t){setImmediate(t)}||function(t){g(t,0)},y.Te=function(t){"undefined"!=typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",t)};var k=function(){var n=t.Promise;if(void 0!==n)try{if(-1!==n.toString().indexOf("[native code]"))return n}catch(t){}}(),O=e?e.userAgent:"",N=O.match(/Firefox\/([0-9]+)/i),P=null!=N,A=N?Number(N[1]):0,D=O.match(/(Version)\/((\d+)\.(\d+)(?:\.(\d+))?).*Safari/),x=null!=D,C=D?Number(D[3]):0,B=function(){function t(t){this.Se=0,this.Ee=0,this.Wi=[],this.Ie=t}return t.prototype.Re=function(t){var n=this.length();this.Ne(n+1);var i=this.Ee+n&this.Ie-1;this.Wi[i]=t,this.Se=n+1},t.prototype.push=function(t){var n=this.length()+1;if(this.Ie<n)this.Re(t);else{var i=this.Ee+n-1,e=this.Ie-1;this.Wi[i&e]=t,this.Se=n}},t.prototype.shift=function(){var t=this.Ee,n=this.Wi[t];return this.Wi[t]=void 0,this.Ee=t+1&this.Ie-1,this.Se--,n},t.prototype.length=function(){return this.Se},t.prototype.Ne=function(t){this.Ie<t&&this.De(this.Ie<<1)},t.prototype.De=function(t){var n=this.Ie;this.Ie=t;var i=this.Ee+this.Se&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.Wi,0,n,i)},t}();var L="unhandledrejection",U=t.PromiseRejectionEvent,F=t.CustomEvent;function M(t){return new U(L,{reason:t,promise:k.reject(t).catch(function(){}),cancelable:!0})}function z(t){var n=new F(L,{detail:{reason:t},cancelable:!0});return c.defineProperty(n,"reason",{value:t}),n}function W(t){var n=i.createEvent("CustomEvent");return n.initCustomEvent(L,!1,!0,{reason:t}),n}var q,j,H,V,X,G,Y=function(t){return(Y=function(){try{var t=k.resolve(),n=new U(L,{reason:"error",promise:t});return L===n.type&&"error"===n.reason}catch(t){}return!1}()?M:function(){try{var t=new F(L,{detail:{reason:"error"}});return L===t.type&&"error"===t.detail.reason}catch(t){}return!1}()?z:W)(t)};if(k&&!(P&&A<60||x&&C<15))j=k;else{j=y;var K=null!==(q=function(){var n=t.queueMicrotask;if("function"==typeof n)return function(t){return n(t)};var i=k;if(i&&"function"==typeof i.resolve){var e=i.resolve();return function(t){return e.then(t)}}}())&&void 0!==q?q:y.Ae,$=(H=K,V=new B(16),X=!1,{Ce:function(t){V.push(t),X||(X=!0,H(G))},Pe:G=function(){for(;V.length()>0;)V.shift()();X=!1}});y.Ae=$.Ce,y.Te=function(n){try{var i=Y(n);if(!t.dispatchEvent(i)||i.defaultPrevented)return}catch(t){}r(function(){throw new f("Unhandled promise rejection: ".concat(n))},0)}}var J={exports:{}};!function(t){var n,i=c.prototype,e=i.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},o=r.iterator||"@@iterator",u=r.asyncIterator||"@@asyncIterator",s=r.toStringTag||"@@toStringTag";function a(t,n,i,e){var r=n&&n.prototype instanceof p?n:p,o=c.create(r.prototype),u=new A(e||[]);return o.jr=function(t,n,i){var e=d;return function(r,o){if(e===b)throw new f("Generator is already running");if(e===g){if("throw"===r)throw o;return x()}for(i.method=r,i.arg=o;;){var u=i.delegate;if(u){var s=O(u,i);if(s){if(s===m)continue;return s}}if("next"===i.method)i.sent=i.Qr=i.arg;else if("throw"===i.method){if(e===d)throw e=g,i.arg;i.dispatchException(i.arg)}else"return"===i.method&&i.abrupt("return",i.arg);e=b;var h=v(t,n,i);if("normal"===h.type){if(e=i.done?g:w,h.arg===m)continue;return{value:h.arg,done:i.done}}"throw"===h.type&&(e=g,i.method="throw",i.arg=h.arg)}}}(t,i,u),o}function v(t,n,i){try{return{type:"normal",arg:t.call(n,i)}}catch(t){return{type:"throw",arg:t}}}t.wrap=a;var d="suspendedStart",w="suspendedYield",b="executing",g="completed",m={};function p(){}function y(){}function _(){}var S={};S[o]=function(){return this};var T=c.getPrototypeOf,E=T&&T(T(D([])));E&&E!==i&&e.call(E,o)&&(S=E);var I=_.prototype=p.prototype=c.create(S);function R(t){["next","throw","return"].forEach(function(n){t[n]=function(t){return this.jr(n,t)}})}function k(t){var n;this.jr=function(i,r){function o(){return new j(function(n,o){!function n(i,r,o,u){var s=v(t[i],t,r);if("throw"!==s.type){var f=s.arg,h=f.value;return h&&"object"==typeof h&&e.call(h,"Kr")?j.resolve(h.Kr).then(function(t){n("next",t,o,u)},function(t){n("throw",t,o,u)}):j.resolve(h).then(function(t){f.value=t,o(f)},function(t){return n("throw",t,o,u)})}u(s.arg)}(i,r,n,o)})}return n=n?n.then(o,o):o()}}function O(t,i){var e=t.iterator[i.method];if(e===n){if(i.delegate=null,"throw"===i.method){if(t.iterator.return&&(i.method="return",i.arg=n,O(t,i),"throw"===i.method))return m;i.method="throw",i.arg=new h("The iterator does not provide a 'throw' method")}return m}var r=v(e,t.iterator,i.arg);if("throw"===r.type)return i.method="throw",i.arg=r.arg,i.delegate=null,m;var o=r.arg;return o?o.done?(i[t.resultName]=o.value,i.next=t.nextLoc,"return"!==i.method&&(i.method="next",i.arg=n),i.delegate=null,m):o:(i.method="throw",i.arg=new h("iterator result is not an object"),i.delegate=null,m)}function N(t){var n={tryLoc:t[0]};1 in t&&(n.catchLoc=t[1]),2 in t&&(n.finallyLoc=t[2],n.afterLoc=t[3]),this.tryEntries.push(n)}function P(t){var n=t.completion||{};n.type="normal",delete n.arg,t.completion=n}function A(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function D(t){if(t){var i=t[o];if(i)return i.call(t);if("function"==typeof t.next)return t;if(!l(t.length)){var r=-1,u=function i(){for(;++r<t.length;)if(e.call(t,r))return i.value=t[r],i.done=!1,i;return i.value=n,i.done=!0,i};return u.next=u}}return{next:x}}function x(){return{value:n,done:!0}}y.prototype=I.constructor=_,_.constructor=y,_[s]=y.displayName="GeneratorFunction",t.isGeneratorFunction=function(t){var n="function"==typeof t&&t.constructor;return!!n&&(n===y||"GeneratorFunction"===(n.displayName||n.name))},t.mark=function(t){return c.setPrototypeOf?c.setPrototypeOf(t,_):(t.__proto__=_,s in t||(t[s]="GeneratorFunction")),t.prototype=c.create(I),t},t.awrap=function(t){return{Kr:t}},R(k.prototype),k.prototype[u]=function(){return this},t.AsyncIterator=k,t.async=function(n,i,e,r){var o=new k(a(n,i,e,r));return t.isGeneratorFunction(i)?o:o.next().then(function(t){return t.done?t.value:o.next()})},R(I),I[s]="Generator",I[o]=function(){return this},I.toString=function(){return"[object Generator]"},t.keys=function(t){var n=[];for(var i in t)n.push(i);return n.reverse(),function i(){for(;n.length;){var e=n.pop();if(e in t)return i.value=e,i.done=!1,i}return i.done=!0,i}},t.values=D,A.prototype={constructor:A,reset:function(t){if(this.prev=0,this.next=0,this.sent=this.Qr=n,this.done=!1,this.delegate=null,this.method="next",this.arg=n,this.tryEntries.forEach(P),!t)for(var i in this)"t"===i.charAt(0)&&e.call(this,i)&&!l(+i.slice(1))&&(this[i]=n)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var i=this;function r(e,r){return s.type="throw",s.arg=t,i.next=e,r&&(i.method="next",i.arg=n),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var u=this.tryEntries[o],s=u.completion;if("root"===u.tryLoc)return r("end");if(u.tryLoc<=this.prev){var h=e.call(u,"catchLoc"),c=e.call(u,"finallyLoc");if(h&&c){if(this.prev<u.catchLoc)return r(u.catchLoc,!0);if(this.prev<u.finallyLoc)return r(u.finallyLoc)}else if(h){if(this.prev<u.catchLoc)return r(u.catchLoc,!0)}else{if(!c)throw new f("try statement without catch or finally");if(this.prev<u.finallyLoc)return r(u.finallyLoc)}}}},abrupt:function(t,n){for(var i=this.tryEntries.length-1;i>=0;--i){var r=this.tryEntries[i];if(r.tryLoc<=this.prev&&e.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=n&&n<=o.finallyLoc&&(o=null);var u=o?o.completion:{};return u.type=t,u.arg=n,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(u)},complete:function(t,n){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&n&&(this.next=n),m},finish:function(t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.finallyLoc===t)return this.complete(i.completion,i.afterLoc),P(i),m}},catch:function(t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc===t){var e=i.completion;if("throw"===e.type){var r=e.arg;P(i)}return r}}throw new f("illegal catch attempt")},delegateYield:function(t,i,e){return this.delegate={iterator:D(t),resultName:i,nextLoc:e},"next"===this.method&&(this.arg=n),m}}}(J.exports);var Z,Q=J.exports;function tt(t){Z=t}var nt={}.toString;var it=Array.isArray||function(t){return"[object Array]"===nt.call(t)};function et(t){return"object"==typeof t&&null!==t}var rt,ot=9007199254740991;function ut(t,n,i){for(var e=0;e<t.length;e+=1){var r=t[e];if(n.call(i,r,e,t))return e}return-1}function st(t,n){var i=t.indexOf(n);return-1!==i&&(function(t,n){t.splice(n,1)}(t,i),!0)}function ft(t,n){return-1!==t.indexOf(n)}function ht(t){t.length=0}!function(t){t[t.Ns=0]="Ns",t[t.Ds=1]="Ds",t[t.Cs=-1]="Cs"}(rt||(rt={}));var ct,at=function(){},vt="https://theo.proxy";function dt(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),c.defineProperty(t,e.key,e)}}function lt(t,n,i){return n&&dt(t.prototype,n),i&&dt(t,i),c.defineProperty(t,"prototype",{writable:!1}),t}function wt(){var t=c.create(null);return t.__=void 0,delete t.__,t}function bt(){return new pt}!function(t){t.ll="audio",t._l="video",t.RA="metadata"}(ct||(ct={}));var gt,mt,pt=("undefined"!=typeof Map&&"entries"in Map.prototype?Map:void 0)||(gt=function(){function t(t,n){this.data=void 0,this.keys=void 0,this.index=0,this.selector=void 0,this.data=t,this.selector=n,this.keys=c.keys(t)}var n=t.prototype;return n.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}(),function(){function t(){this.data=wt(),this.size=0}var n=t.prototype;return n.get=function(t){return this.data[t]},n.set=function(t,n){return this.has(t)||this.size++,this.data[t]=n,this},n.has=function(t){return t in this.data},n.delete=function(t){return!!this.has(t)&&(this.size--,delete this.data[t],!0)},n.clear=function(){this.data=wt(),this.size=0},n.keys=function(){return new gt(this.data,function(t,n){return n})},n.values=function(){return new gt(this.data,function(t,n){return t[n]})},n.entries=function(){return new gt(this.data,function(t,n){return[n,t[n]]})},n.forEach=function(t){for(var n in this.data)t(this.data[n],n)},t}());!function(t){t.$d="#EXTINF",t.Fwt="#EXT-X-MAP",t.mO="#EXTM3U",t.i="#EXT-X-VERSION",t.o="#EXT-X-TARGETDURATION",t.P5="#EXT-X-START",t.s="#EXT-X-INDEPENDENT-SEGMENTS",t.Qf="#EXT-X-STREAM-INF",t.h="#EXT-X-MEDIA-SEQUENCE",t.m="#EXT-X-ENDLIST",t.pO="#EXT-X-MEDIA",t.p="#EXT-X-DISCONTINUITY",t.S="#EXT-X-DISCONTINUITY-SEQUENCE",t.T="#EXT-X-PLAYLIST-TYPE"}(mt||(mt={}));var yt,_t=function(){function t(t,n){this.ds=mt.$d,this.k=void 0,this.O=void 0,this.k=t,this.O=n}return t.prototype.JI=function(){return this.ds+":"+this.k+",\n"+this.O},t}(),St=function(){function t(){this.ds=mt.mO}return t.prototype.JI=function(){return this.ds},t}(),Tt=function(){function t(t){this.ds=mt.i,this.eT=void 0,this.eT=t}return t.prototype.JI=function(){return this.ds+":"+this.eT},t}(),Et=function(){function t(t){this.ds=mt.o,this.Mkt=void 0,this.Mkt=t}return t.prototype.JI=function(){return this.ds+":"+this.Mkt},t}(),It=function(){function t(t){this.ds=mt.P5,this.kyt=void 0,this.kyt=t}return t.prototype.JI=function(){return this.ds+":TIME-OFFSET="+this.kyt},t}(),Rt=function(){function t(){this.ds=mt.s}return t.prototype.JI=function(){return this.ds},t}(),kt=function(){function t(t){this.ds=mt.Qf,this.cN=1,this.O=void 0,this.O=t}return t.prototype.JI=function(){return this.ds+":BANDWIDTH="+this.cN+',AUDIO="audio"\n'+this.O},t}(),Ot=function(){function t(t){this.ds=mt.h,this.zS=void 0,this.zS=t}return t.prototype.JI=function(){return this.ds+":"+this.zS},t}(),Nt=function(){function t(){this.ds=mt.p}return t.prototype.JI=function(){return this.ds},t}(),Pt=function(){function t(t){this.ds=mt.S,this.zS=void 0,this.zS=t}return t.prototype.JI=function(){return this.ds+":"+this.zS},t}();!function(t){t.zwt="VOD",t.mNt="EVENT"}(yt||(yt={}));var At=function(){function t(t){this.ds=mt.pO,this.O=void 0,this.O=t}return t.prototype.JI=function(){var t=bt();t.set("TYPE","AUDIO"),t.set("GROUP-ID",'"audio"'),t.set("NAME",'"audio"'),t.set("AUTOSELECT","YES"),t.set("DEFAULT","YES"),t.set("CHANNELS",'"2"'),t.set("URI",'"'+this.O+'"');var n=[];return t.forEach(function(t,i){return n.push(i+"="+t)}),this.ds+":"+n.join(",")},t}(),Dt=function(){function t(t){this.Xo=[],this.Xo=t}return t.prototype.P=function(){for(var t="",n=0,i=this.Xo;n<i.length;n++){t+=i[n].JI()+"\n"}return t},lt(t,[{key:"jT",get:function(){return this.Xo}}]),t}(),xt=function(){function t(){this.Xo=[];for(var t=[new St,new Tt(8)],n=0;n<t.length;n++){var i=t[n];this.A(i)}}var n=t.prototype;return n.A=function(t){this.Xo.push(t)},n.xs=function(){this.Xo.length=0},lt(t,[{key:"jT",get:function(){return new Dt(this.Xo)}}]),t}();function Ct(t,n){return(Ct=c.setPrototypeOf||function(t,n){return t.__proto__=n,t})(t,n)}function Bt(t,n){t.prototype=c.create(n.prototype),t.prototype.constructor=t,Ct(t,n)}function Lt(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}var Ut=function(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];f.apply(this,n)};(Ut.prototype=c.create(f.prototype)).constructor=Ut;var Ft,Mt=function(t){function n(n,i){var e;return(e=t.call(this)||this).cause=void 0,e.message=n||"Unknown error",e.cause=i,f.captureStackTrace&&f.captureStackTrace(Lt(e),e.constructor),e}return Bt(n,t),lt(n,[{key:"name",get:function(){return"BaseError"}}]),n}(Ut),zt=function(){function t(){this.Ps=!1,this.Os=!1,this.Bs=[],this.Ls=[]}var n=t.prototype;return n.Ms=function(){if(!this.Ps&&!this.Os){this.Ps=!0;for(var t=0,n=this.Bs.slice();t<n.length;t++){(0,n[t])()}this.xs()}},n.xs=function(){if(!this.Os){this.Os=!0;for(var t=0,n=this.Ls.slice();t<n.length;t++){(0,n[t])()}ht(this.Bs),ht(this.Ls)}},n.Us=function(t){this.Os||this.Bs.push(t)},n.Fs=function(t){this.Os||st(this.Bs,t)},n.Hs=function(t){this.Os||this.Ls.push(t)},n.Vs=function(t){this.Os||st(this.Ls,t)},t}(),Wt=function(){function t(){this.Xs=new zt}var n=t.prototype;return n.zs=function(){this.Xs.Ms()},n.xs=function(){this.Xs.xs()},n.qs=function(t){var n=this.Xs;if(!n.Ps)if(t.Ps)n.Ms();else if(!n.Os&&!t.Os){var i=function(){e(),n.Ms()},e=function e(){t.Fs(i),t.Vs(e),n.Fs(i),n.Vs(e)};t.Us(i),t.Hs(e),n.Us(i),n.Hs(e)}},n.Ws=function(){var n=new t,i=new t,e=n.Gs,r=i.Gs,o=this.Xs,u=function(){e.Ps&&r.Os||r.Ps&&e.Os?o.Ms():e.Os&&r.Os&&o.xs()};e.Us(u),r.Us(u),e.Hs(u),r.Hs(u),n.qs(o),i.qs(o);return o.Hs(function(){e.Fs(u),r.Fs(u),e.Vs(u),r.Vs(u)}),[n,i]},lt(t,[{key:"Gs",get:function(){return this.Xs}}]),t}(),qt=function(t){function n(n,i){return t.call(this,n||"Aborted",i)||this}return Bt(n,t),lt(n,[{key:"name",get:function(){return"AbortError"}}]),n}(Mt);function jt(t){return t instanceof f&&"AbortError"===t.name}function Ht(t,n){return t.then(function(t){return n.xs(),t},function(t){throw n.xs(),t})}j.resolve(),function(t){t.SZ="HELLO",t.EZ="HI_THERE",t.IZ="INITIALIZE",t.RZ="APPEND_INIT",t.NZ="APPEND_DATA",t.DZ="ACK",t.CZ="REMOVE",t.PZ="DESTROY_SESSION"}(Ft||(Ft={}));var Vt=null;try{Vt=new WebAssembly.Instance(new WebAssembly.Module(new w([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(t){}function Xt(t,n,i){this.low=0|t,this.high=0|n,this.unsigned=!!i}function Gt(t){return!0===(t&&t.Qn)}function Yt(t){var n=a.clz32(t&-t);return t?31-n:n}Xt.prototype.Qn,c.defineProperty(Xt.prototype,"Qn",{value:!0}),Xt.isLong=Gt;var Kt={},$t={};function Jt(t,n){var i,e,r;return n?(r=0<=(t>>>=0)&&t<256)&&(e=$t[t])?e:(i=Qt(t,0,!0),r&&($t[t]=i),i):(r=-128<=(t|=0)&&t<128)&&(e=Kt[t])?e:(i=Qt(t,t<0?-1:0,!1),r&&(Kt[t]=i),i)}function Zt(t,n){if(l(t))return n?hn:fn;if(n){if(t<0)return hn;if(t>=on)return ln}else{if(t<=-un)return wn;if(t+1>=un)return dn}return t<0?Zt(-t,n).neg():Qt(t%rn|0,t/rn|0,n)}function Qt(t,n,i){return new Xt(t,n,i)}Xt.fromInt=Jt,Xt.fromNumber=Zt,Xt.fromBits=Qt;var tn=a.pow;function nn(t,n,i){if(0===t.length)throw f("empty string");if("number"==typeof n?(i=n,n=!1):n=!!n,"NaN"===t||"Infinity"===t||"+Infinity"===t||"-Infinity"===t)return n?hn:fn;if((i=i||10)<2||36<i)throw RangeError("radix");var e;if((e=t.indexOf("-"))>0)throw f("interior hyphen");if(0===e)return nn(t.substring(1),n,i).neg();for(var r=Zt(tn(i,8)),o=fn,u=0;u<t.length;u+=8){var s=a.min(8,t.length-u),h=v(t.substring(u,u+s),i);if(s<8){var c=Zt(tn(i,s));o=o.mul(c).add(Zt(h))}else o=(o=o.mul(r)).add(Zt(h))}return o.unsigned=n,o}function en(t,n){return"number"==typeof t?Zt(t,n):"string"==typeof t?nn(t,n):Qt(t.low,t.high,"boolean"==typeof n?n:t.unsigned)}Xt.fromString=nn,Xt.fromValue=en;var rn=4294967296,on=rn*rn,un=on/2,sn=Jt(1<<24),fn=Jt(0);Xt.ZERO=fn;var hn=Jt(0,!0);Xt.UZERO=hn;var cn=Jt(1);Xt.ONE=cn;var an=Jt(1,!0);Xt.UONE=an;var vn=Jt(-1);Xt.NEG_ONE=vn;var dn=Qt(-1,2147483647,!1);Xt.MAX_VALUE=dn;var ln=Qt(-1,-1,!0);Xt.MAX_UNSIGNED_VALUE=ln;var wn=Qt(0,-2147483648,!1);Xt.MIN_VALUE=wn;var bn=Xt.prototype;function gn(){return Date.now()||(new Date).getTime()}bn.toInt=function(){return this.unsigned?this.low>>>0:this.low},bn.toNumber=function(){return this.unsigned?(this.high>>>0)*rn+(this.low>>>0):this.high*rn+(this.low>>>0)},bn.toString=function(t){if((t=t||10)<2||36<t)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative()){if(this.eq(wn)){var n=Zt(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=Zt(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}},bn.getHighBits=function(){return this.high},bn.getHighBitsUnsigned=function(){return this.high>>>0},bn.getLowBits=function(){return this.low},bn.getLowBitsUnsigned=function(){return this.low>>>0},bn.getNumBitsAbs=function(){if(this.isNegative())return this.eq(wn)?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},bn.isZero=function(){return 0===this.high&&0===this.low},bn.eqz=bn.isZero,bn.isNegative=function(){return!this.unsigned&&this.high<0},bn.isPositive=function(){return this.unsigned||this.high>=0},bn.isOdd=function(){return 1==(1&this.low)},bn.isEven=function(){return 0==(1&this.low)},bn.equals=function(t){return Gt(t)||(t=en(t)),(this.unsigned===t.unsigned||this.high>>>31!=1||t.high>>>31!=1)&&(this.high===t.high&&this.low===t.low)},bn.eq=bn.equals,bn.notEquals=function(t){return!this.eq(t)},bn.neq=bn.notEquals,bn.ne=bn.notEquals,bn.lessThan=function(t){return this.comp(t)<0},bn.lt=bn.lessThan,bn.lessThanOrEqual=function(t){return this.comp(t)<=0},bn.lte=bn.lessThanOrEqual,bn.le=bn.lessThanOrEqual,bn.greaterThan=function(t){return this.comp(t)>0},bn.gt=bn.greaterThan,bn.greaterThanOrEqual=function(t){return this.comp(t)>=0},bn.gte=bn.greaterThanOrEqual,bn.ge=bn.greaterThanOrEqual,bn.compare=function(t){if(Gt(t)||(t=en(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},bn.comp=bn.compare,bn.negate=function(){return!this.unsigned&&this.eq(wn)?wn:this.not().add(cn)},bn.neg=bn.negate,bn.add=function(t){Gt(t)||(t=en(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,Qt((c&=65535)<<16|(a&=65535),(f&=65535)<<16|(h&=65535),this.unsigned)},bn.subtract=function(t){return Gt(t)||(t=en(t)),this.add(t.neg())},bn.sub=bn.subtract,bn.multiply=function(t){if(this.isZero())return this;if(Gt(t)||(t=en(t)),Vt)return Qt(Vt.mul(this.low,this.high,t.low,t.high),Vt.get_high(),this.unsigned);if(t.isZero())return this.unsigned?hn:fn;if(this.eq(wn))return t.isOdd()?wn:fn;if(t.eq(wn))return this.isOdd()?wn:fn;if(this.isNegative())return t.isNegative()?this.neg().mul(t.neg()):this.neg().mul(t).neg();if(t.isNegative())return this.mul(t.neg()).neg();if(this.lt(sn)&&t.lt(sn))return Zt(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,Qt((a&=65535)<<16|(v&=65535),(h&=65535)<<16|(c&=65535),this.unsigned)},bn.mul=bn.multiply,bn.divide=function(t){if(Gt(t)||(t=en(t)),t.isZero())throw f("division by zero");var n,i,e;if(Vt)return this.unsigned||-2147483648!==this.high||-1!==t.low||-1!==t.high?Qt((this.unsigned?Vt.div_u:Vt.div_s)(this.low,this.high,t.low,t.high),Vt.get_high(),this.unsigned):this;if(this.isZero())return this.unsigned?hn:fn;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return hn;if(t.gt(this.shru(1)))return an;e=hn}else{if(this.eq(wn))return t.eq(cn)||t.eq(vn)?wn:t.eq(wn)?cn:(n=this.shr(1).div(t).shl(1)).eq(fn)?t.isNegative()?cn:vn:(i=this.sub(t.mul(n)),e=n.add(i.div(t)));if(t.eq(wn))return this.unsigned?hn:fn;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=fn}for(i=this;i.gte(t);){n=a.max(1,a.floor(i.toNumber()/t.toNumber()));for(var r=a.ceil(a.log(n)/a.LN2),o=r<=48?1:tn(2,r-48),u=Zt(n),s=u.mul(t);s.isNegative()||s.gt(i);)s=(u=Zt(n-=o,this.unsigned)).mul(t);u.isZero()&&(u=cn),e=e.add(u),i=i.sub(s)}return e},bn.div=bn.divide,bn.modulo=function(t){return Gt(t)||(t=en(t)),Vt?Qt((this.unsigned?Vt.rem_u:Vt.rem_s)(this.low,this.high,t.low,t.high),Vt.get_high(),this.unsigned):this.sub(this.div(t).mul(t))},bn.mod=bn.modulo,bn.rem=bn.modulo,bn.not=function(){return Qt(~this.low,~this.high,this.unsigned)},bn.countLeadingZeros=function(){return this.high?a.clz32(this.high):a.clz32(this.low)+32},bn.clz=bn.countLeadingZeros,bn.countTrailingZeros=function(){return this.low?Yt(this.low):Yt(this.high)+32},bn.ctz=bn.countTrailingZeros,bn.and=function(t){return Gt(t)||(t=en(t)),Qt(this.low&t.low,this.high&t.high,this.unsigned)},bn.or=function(t){return Gt(t)||(t=en(t)),Qt(this.low|t.low,this.high|t.high,this.unsigned)},bn.xor=function(t){return Gt(t)||(t=en(t)),Qt(this.low^t.low,this.high^t.high,this.unsigned)},bn.shiftLeft=function(t){return Gt(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?Qt(this.low<<t,this.high<<t|this.low>>>32-t,this.unsigned):Qt(0,this.low<<t-32,this.unsigned)},bn.shl=bn.shiftLeft,bn.shiftRight=function(t){return Gt(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?Qt(this.low>>>t|this.high<<32-t,this.high>>t,this.unsigned):Qt(this.high>>t-32,this.high>=0?0:-1,this.unsigned)},bn.shr=bn.shiftRight,bn.shiftRightUnsigned=function(t){return Gt(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?Qt(this.low>>>t|this.high<<32-t,this.high>>>t,this.unsigned):Qt(32===t?this.high:this.high>>>t-32,0,this.unsigned)},bn.shru=bn.shiftRightUnsigned,bn.shr_u=bn.shiftRightUnsigned,bn.rotateLeft=function(t){var n;return Gt(t)&&(t=t.toInt()),0==(t&=63)?this:32===t?Qt(this.high,this.low,this.unsigned):t<32?(n=32-t,Qt(this.low<<t|this.high>>>n,this.high<<t|this.low>>>n,this.unsigned)):(n=32-(t-=32),Qt(this.high<<t|this.low>>>n,this.low<<t|this.high>>>n,this.unsigned))},bn.rotl=bn.rotateLeft,bn.rotateRight=function(t){var n;return Gt(t)&&(t=t.toInt()),0==(t&=63)?this:32===t?Qt(this.high,this.low,this.unsigned):t<32?(n=32-t,Qt(this.high<<n|this.low>>>t,this.low<<n|this.high>>>t,this.unsigned)):(n=32-(t-=32),Qt(this.low<<n|this.high>>>t,this.high<<n|this.low>>>t,this.unsigned))},bn.rotr=bn.rotateRight,bn.toSigned=function(){return this.unsigned?Qt(this.low,this.high,!1):this},bn.toUnsigned=function(){return this.unsigned?this:Qt(this.low,this.high,!0)},bn.toBytes=function(t){return t?this.toBytesLE():this.toBytesBE()},bn.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]},bn.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]},Xt.fromBytes=function(t,n,i){return i?Xt.fromBytesLE(t,n):Xt.fromBytesBE(t,n)},Xt.fromBytesLE=function(t,n){return new Xt(t[0]|t[1]<<8|t[2]<<16|t[3]<<24,t[4]|t[5]<<8|t[6]<<16|t[7]<<24,n)},Xt.fromBytesBE=function(t,n){return new Xt(t[4]<<24|t[5]<<16|t[6]<<8|t[7],t[0]<<24|t[1]<<16|t[2]<<8|t[3],n)};Xt.fromNumber(ot);var mn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),pn=16383;function yn(t,n,i){for(var e,r,o,u=[],s=n;s<i;s+=3)u.push((e=t[s],r=t[s+1],o=t[s+2],mn[e>>2]+mn[(3&e)<<4|r>>4]+mn[(15&r)<<2|o>>6]+mn[63&o]));return u.join("")}var _n=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]","[object DataView]"],Sn=ArrayBuffer.isView||function(t){return t&&ft(_n,nt.call(t))};function Tn(t){var n=t.reduce(function(t,n){return t+n.byteLength},0);return function(t,n){for(var i=new w(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 En(t){return function(t){for(var n=t.length,i=n%3,e=[],r=n-i,o=0;o<r;o+=pn)e.push(yn(t,o,a.min(r,o+pn)));if(1===i){var u=t[n-1];e.push(mn[u>>2]+mn[(3&u)<<4]+"==")}else if(2===i){var s=t[n-2],f=t[n-1];e.push(mn[s>>2]+mn[(3&s)<<4|f>>4]+mn[(15&f)<<2]+"=")}return e.join("")}(new w(t))}var In=function(){function t(t){void 0===t&&(t=0),this.Mu=t}var n=t.prototype;return n.Lu=function(t){this.Mu+=t},n.xu=function(t){this.Mu=t},n.Uu=function(){return new t(this.Bu)},lt(t,[{key:"Bu",get:function(){return this.Mu}}]),t}();function Rn(t,n){return null!=t&&t.substr(0,n.length)===n}var kn=16384;function On(t){var n=t.length;if(n<=kn)return String.fromCharCode.apply(String,t);for(var i=[],e=0;e<n;e+=kn)i.push(String.fromCharCode.apply(String,t.slice(e,e+kn)));return i.join("")}function Nn(t){return 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 On(n)}(t)}function Pn(t){if(t>=55296&&t<=57343)throw new f("Lone surrogate U+"+t.toString(16).toUpperCase()+" is not a scalar value")}function An(t,n){return t>>n&63|128}function Dn(t,n){0!=(4294967168&t)?(0==(4294965248&t)?n.push(t>>6&31|192):0==(4294901760&t)?(Pn(t),n.push(t>>12&15|224),n.push(An(t,6))):0==(4292870144&t)&&(n.push(t>>18&7|240),n.push(An(t,12)),n.push(An(t,6))),n.push(63&t|128)):n.push(t)}function xn(t,n){if(n.Bu>=t.length)throw new f("Invalid byte index");var i=255&t[n.Bu];if(n.Lu(1),128==(192&i))return 63&i;throw new f("Invalid continuation byte")}function Cn(t,n){var i=n.Bu;if(i>t.length)throw new f("Invalid byte index");if(i===t.length)return!1;var e=255&t[i];if(n.Lu(1),0==(128&e))return e;if(192==(224&e)){var r=(31&e)<<6|xn(t,n);if(r>=128)return r;throw new f("Invalid continuation byte")}if(224==(240&e)){var o=(15&e)<<12|xn(t,n)<<6|xn(t,n);if(o>=2048)return Pn(o),o;throw new f("Invalid continuation byte")}if(240==(248&e)){var u=(7&e)<<18|xn(t,n)<<12|xn(t,n)<<6|xn(t,n);if(u>=65536&&u<=1114111)return u}throw new f("Invalid UTF-8 detected")}var Bn=65279;function Ln(t,n,i){void 0===i&&(i=!1);var e=t.getUint16(n.Bu,i);return n.Lu(2),e}function Un(t,n,i,e){void 0===e&&(e=!1),t.setUint16(n.Bu,i,e),n.Lu(2)}function Fn(t,n){return void 0===n&&(n=!1),function(t,n,i,e){for(var r=[];n.Bu+2<=t.byteLength;){var o=Ln(t,n,i);if(e&&!o)break;r.push(o)}return On(r)}(qn(t),new Xn,n,!1)}function Mn(t,n){void 0===n&&(n=!1);var i=new w(2*t.length);return function(t,n,i,e){void 0===e&&(e=!1);for(var r=i.length,o=0;o<r;o+=1)Un(t,n,i.charCodeAt(o),e)}(qn(i),new Xn,t,n),i}function zn(t){return Nn(function(t,n){var i,e=[],r=new Xn;if(!n){if(!1===(i=Cn(t,r)))return e;i===Bn||e.push(i)}for(;!1!==(i=Cn(t,r));)e.push(i);return e}(jn(t)))}function Wn(t){return new w(function(t){for(var n=[],i=0;i<t.length;i++)Dn(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 qn(t){return new DataView(t.buffer,t.byteOffset,t.byteLength)}function jn(t){return new w(t.buffer,t.byteOffset,t.byteLength)}function Hn(t){return t instanceof ArrayBuffer?new w(t):jn(t)}function Vn(t){if(t.slice)return t.slice(0);var n=new w(t.byteLength);return n.set(t,0),n}for(var Xn=function(){function t(t){void 0===t&&(t=0),this.Mu=t}var n=t.prototype;return n.Lu=function(t){this.Mu+=t},n.xu=function(t){this.Mu=t},n.Uu=function(){return new t(this.Bu)},n.Vu=function(){return new In(this.Bu<<3)},lt(t,[{key:"Bu",get:function(){return this.Mu}}]),t}(),Gn=new Array(256),Yn=0;Yn<256;Yn+=1)Gn[Yn]=(Yn<16?"0":"")+Yn.toString(16);function Kn(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var n=16*a.random()|0;return("x"===t?n:3&n|8).toString(16)})}function $n(t){return t&&"function"!=typeof t?t.slice():t}function Jn(t,n,i){if(i)if("function"==typeof i)i.call(t,n);else for(var e=0;e<i.length;e++){i[e].call(t,n)}}var Zn=function(){function t(t){var n=this;this.Ys=wt(),this.js=void 0,this.Qs=void 0,this.Ks=function(t){n.Zs(t)},this.Qs=t||this}var n=t.prototype;return n.Js=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.Ys[t];i?"function"==typeof i?this.Ys[t]=[i,n]:i.push(n):this.Ys[t]=n},n.tu=function(t){if("function"==typeof t){var n=this.js;n?"function"==typeof n?this.js=[n,t]:n.push(t):this.js=t}},n.nu=function(){this.Ys=wt(),this.js=void 0},n.Zs=function(t){var n=$n(this.Ys[t.type]),i=$n(this.js);Jn(this.Qs,t,n),Jn(this.Qs,t,i)},n.uu=function(t,n){if("function"==typeof n)if("string"==typeof t)this.ou(t,n);else for(var i=0;i<t.length;i++){var e=t[i];this.ou(e,n)}},n.ou=function(t,n){var i=this.Ys[t];i&&("function"==typeof i?i===n&&(this.Ys[t]=void 0):st(i,n))},n.au=function(t){if("string"==typeof t)this.Ys[t]=void 0;else for(var n=0;n<t.length;n++){var i=t[n];this.Ys[i]=void 0}},n.fu=function(t){var n=this.js;n&&("function"==typeof n?n===t&&(this.js=void 0):st(n,t))},n.vu=function(t,n){var i=this;return new j(function(e,r){if(n&&n.Ps)return r(new qt);var o=function(t){s(),e(t)},u=function(){s(),r(new qt)},s=function(){i.uu(t,o),n&&n.Fs(u)};i.Js(t,o),n&&n.Us(u)})},t}(),Qn=function(t,n){void 0===n&&(n=new Date),this.type=t,this.date=n},ti=function(t){function n(n){var i;return(i=t.call(this,"append")||this).Vi=void 0,i.Vi=n,i}return Bt(n,t),n}(Qn),ni=function(t){function n(n){var i;return(i=t.call(this)||this).zw=void 0,i.Pft=0,i.Wi=new w(0),i.mo=!1,i.D=!1,i.C=void 0,i.zw=n,i}Bt(n,t);var i=n.prototype;return i.vz=function(t,n){this.B&&0===this.Wi.length&&(this.Wi=this.C.slice()),this.Pft+=n,this.Wi=Tn([this.Wi,t]),this.Zs(new ti(t))},i.Ya=function(){this.tc||(this.Zs(new Qn("close")),this.mo=!0)},lt(n,[{key:"Ik",get:function(){return this.Pft}},{key:"Vi",get:function(){return this.Wi}},{key:"tc",get:function(){return this.mo}},{key:"B",get:function(){return this.D},set:function(t){this.D=t}},{key:"L",get:function(){return this.C},set:function(t){this.C=t}}]),n}(Zn),ii=function(){function t(t){this.W=!1,this.H=void 0,this.X=void 0,this.DEFAULT_SEGMENT_DURATION_IN_SECONDS=1.1,this.Vg="sync-seg-"+Kn(),this.tt=this.DEFAULT_SEGMENT_DURATION_IN_SECONDS,this.it=t;for(var n=0,i=this.it;n<i.length;n++){var e=i[n];if(e.match(/video/))this.H=new ni(this.et(e));else{if(!e.match(/audio/))throw new f("Unsupported MIME type.");this.X=new ni(this.et(e))}}}var n=t.prototype;return n.et=function(t){for(var n=0,i=this.it;n<i.length;n++){if(i[n]===t)return this.tt}},n.Ya=function(){this.H&&this.H.Ya(),this.X&&this.X.Ya()},lt(t,[{key:"rt",get:function(){return this.W},set:function(t){this.W=t}},{key:"st",get:function(){var t,n;return Boolean((null==(t=this.H)?void 0:t.B)||(null==(n=this.X)?void 0:n.B))}}]),t}(),ei=function(t){function n(n){var i;return(i=t.call(this,"remove")||this).Nm=void 0,i.Nm=n,i}return Bt(n,t),n}(Qn),ri=function(t){function n(n){var i;return(i=t.call(this)||this).ht=[],i.pt=void 0,i.tn=[],i.nn=bt(),i.en=bt(),i.rn=0,i.sn=0,i.it=n,i.pt=new ii(i.it),i.pt.X&&(i.pt.X.B=!0),i.pt.H&&(i.pt.H.B=!0),i.tn.push(new ii(i.it)),i}Bt(n,t);var i=n.prototype;return i.an=function(){var t=[].concat(this.ht,[this.pt],this.tn);return this.ht.length=0,t},i.vz=function(t){this.ln(t),this.bn(t),this.gn(t)},i.gz=function(t){this.ln(t)},i.Za=function(t){this.ln(t),this.gn(t)},i.xs=function(){this.pt.Ya(),this.tn.forEach(function(t){return t.Ya()}),this.ht.length=0},i.bn=function(t){var n=t.startPts,i=t.totalDuration;this.en.set(t.mimeType,n+i)},i.mn=function(){this.pt.Ya(),this.ht.push(this.pt);var t=this.tn.shift(),n=this.kn();t?(this.pt=t,this.tn.push(n)):this.pt=n},i.kn=function(){var t=new ii(this.it);return t.X&&(t.X.L=this.pt.X.L),t.H&&(t.H.L=this.pt.H.L),t},i.ti=function(t){var i=!this.pt.X||0===this.pt.X.Ik,e=!this.pt.H||0===this.pt.H.Ik,r=this.pt.X&&this.pt.X.B,o=this.pt.H&&this.pt.H.B,u=e&&(i&&!this.pt.rt||r),s=i&&(e&&!this.pt.rt||o);("audio"===n.ii(t)&&!s||"video"===n.ii(t)&&!u)&&(this.mn(),this.mn())},i.ln=function(t){var n=t.mimeType,i=t.kind,e=this.nn.get(n);void 0===e&&(i!==Ft.RZ&&i!==Ft.NZ||(e=[],this.nn.set(n,e))),void 0!==e&&e.push(t)},i.gn=function(t){for(var n=this.ui(t),i=0;i<n.length;i++){var e=n[i];switch(e.kind){case Ft.RZ:this.si(e),this.rn=0,this.sn=0;break;case Ft.CZ:this.fi(e);break;case Ft.NZ:this.hi(e)}}},i.si=function(t){var n=t.mimeType,i=t.segment;this.ti(n),n.match(/video/)?(this.pt.H.L=i,this.tn.forEach(function(t){t.H.L=i})):(this.pt.X.L=i,this.tn.forEach(function(t){t.X.L=i})),this.pt.X&&(this.pt.X.B=!0),this.pt.H&&(this.pt.H.B=!0)},i.hi=function(t){var n=t.mimeType.match(/audio/),i=t.totalDuration;if(n?this.pt.X.vz(t.segment,i):this.pt.H.vz(t.segment,i),n||1===this.it.length){this.rn+=i;var e=this.pt.et(t.mimeType);this.rn>=this.sn+e&&(this.sn+=e,this.mn())}},i.fi=function(t){this.en.set(t.mimeType,void 0),this.ti(t.mimeType),this.pt.X&&(this.pt.X.B=!0),this.pt.H&&(this.pt.H.B=!0),this.ht.length=0,this.Zs(new ei(t.endTime))},i.ui=function(t){var n=this;if(t.kind===Ft.CZ)return this.vi(t);var i=[];return this.nn.forEach(function(t){if(t&&t.length>0){var e=ut(t,function(t){return t.kind===Ft.CZ});-1===e&&(e=t.length);for(var r=t.slice(0,e),o=0;o<r.length;o++){var u=r[o];if(!ft(i,u)){var s=n.vi(u);if(s.length>0)i.push.apply(i,s);else if(u.kind===Ft.NZ)break}}}}),i},i.vi=function(t){for(var n,i=this.nn.get(t.mimeType),e=0,r=this.it;e<r.length;e++){var o=r[e];if(o!==t.mimeType){n=o;break}}if(!n)return i.splice(0,i.indexOf(t)+1);if(t.kind===Ft.RZ)return[];var u=this.en.get(n);if(void 0===u)return[];if(t.kind===Ft.CZ){var s=this.li(n);if(s.length>0){var f=i.splice(0,i.indexOf(t));return i.splice(0,1),[].concat(f,s,[t])}return[]}if(t.startPts<=u){var h=i.splice(0,i.indexOf(t));i.splice(0,1);var c=this.bi(t,h,n);return[].concat(h,c,[t])}return[]},i.bi=function(t,n,i){var e=this.nn.get(i);if(!e)return[];var r=t.startPts+t.totalDuration,o=ut(e,function(t){return t.kind===Ft.CZ}),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===Ft.NZ&&h.startPts>r&&(s=f)}var c=-1;return-1!==ut(n,function(t){return t.kind===Ft.RZ})&&(c=ut(e,function(t){return t.kind===Ft.RZ})),c>s&&(s=c+1),s>0?(e[s-1].kind===Ft.RZ&&(s-=1),e.splice(0,s)):[]},i.li=function(t){var n=this.nn.get(t);if(n){var i=ut(n,function(t){return t.kind===Ft.CZ});if(i>=0)return n.splice(0,i+1)}return[]},i.mi=function(){var t="[MEDIABUFFER] endPTS: ";this.en.forEach(function(i,e){t=t.concat(n.ii(e)+" = "+i+" ")}),Z.pr(t)},i.pi=function(){var t=this;Z.pr("[MEDIABUFFER] unsyncedMessageMap:"),this.nn.forEach(function(i,e){void 0!==i&&t.yi(n.ii(e),i)})},i.yi=function(t,i){var e=t+": [";null==i||i.forEach(function(t){e=e.concat(" "+t.kind+"("+n.ii(t.mimeType)+")")}),e=e.concat(" ]"),Z.pr(e)},n.ii=function(t){return t.match(/audio/)?"audio":"video"},n}(Zn);var oi=function(){function t(t,n,i){var e=this;this.ki=[],this.te=bt(),this.ie=0,this.wrt=void 0,this.ee=void 0,this.se=function(t){if(t.Nm>=ot)for(;e.ki.length>0;)e.he()},this.ce=n,this.ae=i,this.ee=[new St,new Tt(8),new Et(1),new Rt,new It(0)],this.wrt=t,this.wrt.Js("remove",this.se)}var n=t.prototype;return n.Ont=function(t,n){var i=this.te.get(t);if(i)if(n===ct._l){var e=i.H;if(e)return e}else{var r=i.X;if(r)return r}throw new f(t+" segment not available!")},n.xs=function(){this.ki.length=0,this.ce.zS=0,this.te.clear(),this.ie=0},n.jT=function(){return this.ve(),new Dt([].concat(this.ee,[this.ce,this.ae],this.ki))},n.ve=function(){for(var t=this.wrt.an(),n=0;n<t.length;n++){var i=t[n];if(!this.te.has(i.Vg)){i.rt=!0;var e=i.tt;i.st&&this.ki.push(new Nt),this.te.set(i.Vg,i),this.ki.push(new _t(e,i.Vg)),this.ie+=e}}this.de()},n.de=function(){for(;this.ie>60;)this.he()},n.he=function(){var t=this.ki.shift();void 0!==t&&(t.ds===mt.$d?(this.be(t),this.ie-=t.k,this.ce.zS++):function(t){return t.ds===mt.p}(t)&&this.ae.zS++)},n.be=function(t){this.te.delete(t.O)},t}(),ui=function(){function t(t){this.aJt=void 0,this.tr=void 0,this.nr=void 0,this.it=t,this.aJt=new xt,this.tr=new ri(this.it);for(var n=0,i=this.it;n<i.length;n++){var e=i[n];if(this.nr=new oi(this.tr,new Ot(0),new Pt(0)),e.match(/video/)){var r=new kt("video/index.m3u8");this.aJt.A(r)}else{if(!e.match(/audio/))throw new f("Unsupported MIME type.");var o=new At("audio/index.m3u8");this.aJt.A(o)}}}var n=t.prototype;return n.er=function(t){if("master.m3u8"===t){if(this.aJt)return this.aJt.jT;throw new f("Master playlist not ready yet")}if(this.nr)return this.nr.jT();throw new f("Media playlist not ready yet")},n.Ont=function(n){var i=n.split("/")[1];return this.nr.Ont(i,t.ur(n))},n.gz=function(t){this.tr.gz(t)},n.vz=function(t){this.tr.vz(t)},n.Bet=function(t){this.tr.Za(t)},n.xs=function(){this.tr.xs(),this.aJt.xs(),this.nr&&this.nr.xs()},t.ur=function(t){return t.match(/video/)?ct._l:ct.ll},t}();var si,fi=function(){function n(t,n){var i=this;this.oit=void 0,this.VIt=function(t){var n,e,r;return Q.async(function(o){for(;;)switch(o.prev=o.next){case 0:n=t.data,o.t0=n.kind,o.next=o.t0===Ft.IZ?4:o.t0===Ft.RZ?7:o.t0===Ft.NZ?9:o.t0===Ft.CZ?11:13;break;case 4:return e=n.mediaBufferConfigs,i.oit=new ui(e),o.abrupt("break",13);case 7:return i.oit.gz(n),o.abrupt("break",13);case 9:return i.oit.vz(n),o.abrupt("break",13);case 11:return i.oit.Bet(n),o.abrupt("break",13);case 13:r={kind:Ft.DZ},i.sr.postMessage(r);case 15:case"end":return o.stop()}},null,null,null,j)},this.sr=t,this.hr=n,this.sr.onmessage=this.VIt}var i=n.prototype;return i.cr=function(t){return this.oit.er(t)},i.ar=function(n){if(this.oit){if(n.match(/m3u8/)){var i=this.cr(n);return new Response(i.P(),{headers:{"Content-Type":"application/x-mpegurl; charset=utf-8"}})}var e={"Content-Type":n.match(/video/)?"video/mp4":"audio/mp4"},r=function(n){var i,e=function(t){i.enqueue(t.Vi)},r=function t(){i.close(),n.uu("append",e),n.uu("close",t)};return new t.ReadableStream({start:function(t){(i=t).enqueue(n.Vi),n.tc?i.close():(n.Js("append",e),n.Js("close",r))},cancel:function(){n.uu("append",e),n.uu("close",r),n.Ya()}})}(this.Dnt(n));return new Response(r,{headers:e})}throw new f("Stream not active.")},i.Dnt=function(t){return this.oit.Ont(t)},i.close=function(){this.sr.close(),this.oit&&this.oit.xs()},n}(),hi=function(){function t(){var t=this;this.qG=bt(),this.lIt=void 0,this.VIt=function(n){var i=n.data;switch(i.kind){case Ft.SZ:t.vr().catch(at);var e=i.port,r=Kn(),o=new fi(e,n.source.id);t.qG.set(r,o);e.addEventListener("message",function n(i){i.data.kind===Ft.PZ&&(t.lr(r),e.removeEventListener("message",n))});var u={kind:Ft.EZ,sessionId:r};e.postMessage(u)}},this.br=function(n){if(Rn(n.request.url,vt)){var i=new URL(n.request.url).pathname.split("/"),e=i[1],r=i.slice(2).join("/");if(void 0!==e&&void 0!==r){var o=t.qG.get(e);if(o)try{var u=o.ar(r);n.respondWith(u)}catch(t){n.respondWith(j.resolve(new Response(void 0,{headers:{message:"Segment not found"},status:404,statusText:"Not Found"})))}else n.respondWith(j.resolve(new Response(void 0,{headers:{message:"Given session ["+e+"] not found"},status:404,statusText:"Not Found"})))}else n.respondWith(j.resolve(new Response(void 0,{headers:{message:"No session ["+e+"] or resource ["+r+"] provided"},status:404,statusText:"Not Found"})))}}}var n=t.prototype;return n.Ry=function(t){this.lIt=t,t.addEventListener("message",this.VIt),t.addEventListener("fetch",this.br)},n.lr=function(t){var n=this.qG.get(t);n&&n.close(),this.qG.delete(t)},n.vr=function(){var t,n,i=this;return Q.async(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Q.awrap(this.lIt.clients.matchAll());case 2:t=e.sent,n=t.map(function(t){return t.id}),this.qG.forEach(function(t,e){ft(n,t.hr)||i.lr(e)});case 5:case"end":return e.stop()}},null,this,null,j)},t}();hi.mr=new hi,function(t){t.l="web",t.g="android",t.I="android-tv",t.R="ios",t.N="tvos",t.M="chromecast"}(si||(si={}));var ci=e?e.userAgent:"",ai=ci.match(/chrome\/([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)/i),vi=ci.match(/Edg\/([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)/i),di=ci.match(/Android ([0-9\.]+)/i),li=ci.match(/Windows NT ([0-9\.]+)/i),wi=ci.match(/(Version)\/((\d+)\.(\d+)(?:\.(\d+))?).*Safari/),bi=ci.match(/Firefox\/([0-9\.]+)/i),gi=ci.match(/OPR\/(\d+\.\d+)/i),mi=ci.match(/Tizen ([0-9\.]+)/i),pi=ci.match(/(iPhone OS|iPad OS|iPod OS|Mac OS X) (\d+)_(\d+)_?(\d+)?/),yi=function(){function n(){this.U=Boolean("ontouchstart"in t||t.DocumentTouch&&i instanceof t.DocumentTouch||e&&e.msMaxTouchPoints),this.F=/(mac\sos\sx)\s?([\w\s\.]+\w)*/i.test(ci)||/(macintosh|mac(?=_powerpc)\s)/i.test(ci),this.V=/Windows NT/i.test(ci),this.q=li?d(li[1]):0,this.G=/Android/i.test(ci),this.Y=di?d(di[1]):0,this.j=/windows phone (8|8\.1)/i.test(ci),this.K=/iPhone/i.test(ci),this.Z=/iPad/i.test(ci),this.J=this.F&&this.U&&!this.Z,this.nt=/iPod/i.test(ci),this.ut=/Mobile Safari/i.test(ci),this.ot=/EOSSTB/i.test(ci),this.ct=(this.K||this.Z||this.J||this.nt)&&!this.j,this.ft=pi?d(pi[2]):0,this.vt=this.j||this.ct||this.G||this.ut,this.dt=/CriOS/i.test(ci),this._t=Boolean(t.chrome&&/google/i.test(e.vendor))||this.dt,this.wt=this._t&&/Edg\//i.test(e.userAgent),this.kt=vi?v(vi[1],10):0,this.yt=Boolean(t.chrome||/Chrome/i.test(ci)||/CriOS/i.test(ci)),this.bt=ai?v(ai[1],10):0,this.At=/SMART-TV.*Tizen/i.test(ci),this.Tt=mi?d(mi[1]):0,this.St=/webos|web0s/i.test(ci),this.Et=/Edge\/\d+/i.test(ci),this.It=/Trident/i.test(ci),this.Rt=this.It&&!t.ActiveXObject&&"ActiveXObject"in t,this.Nt=/Vivaldi/i.test(ci),this.Dt=/Firefox/i.test(ci)&&!/Seamonkey/i.test(ci),this.Ct=bi?d(bi[1]):0,this.Pt=/Safari/i.test(ci)&&!/Chrome/i.test(ci)&&!this.j&&!this.At,this.Ot=wi?d(wi[2]):0,this.Bt=Boolean(gi),this.Lt=gi?d(gi[1]):0,this.Mt=/CrKey/.test(ci),this.xt=/\b(tv|smart-tv|smarttv|appletv|crkey|googletv|hbbtv|pov_tv|roku|viera|nettv|philipstv)\b/i.test(ci),this.Ut="web"===si.I,this.Ft="web"===si.g,this.Ht=this.Ft||this.Ut,this.Vt="web"===si.R,this.Xt="web"===si.N,this.zt="web"===si.M}return lt(n,[{key:"qt",get:function(){return this.U}},{key:"Wt",get:function(){return this.F}},{key:"Gt",get:function(){return this.V}},{key:"Yt",get:function(){return this.q}},{key:"jt",get:function(){return this.G}},{key:"Qt",get:function(){return this.Y}},{key:"Kt",get:function(){return this.j}},{key:"Zt",get:function(){return this.K}},{key:"Jt",get:function(){return this.Z}},{key:"$t",get:function(){return this.J}},{key:"in",get:function(){return this.nt}},{key:"un",get:function(){return this.ct}},{key:"hn",get:function(){return this.ft}},{key:"cn",get:function(){return this.ot}},{key:"fn",get:function(){return this.ut}},{key:"vn",get:function(){return this.vt}},{key:"dn",get:function(){return this.dt}},{key:"_n",get:function(){return this._t}},{key:"wn",get:function(){return this.bt}},{key:"yn",get:function(){return this.wt}},{key:"pn",get:function(){return this.kt}},{key:"An",get:function(){return this.At}},{key:"Tn",get:function(){return this.Tt}},{key:"Sn",get:function(){return this.St}},{key:"En",get:function(){return this.Et}},{key:"In",get:function(){return this.It}},{key:"Rn",get:function(){return this.Rt}},{key:"Nn",get:function(){return this.Nt}},{key:"Dn",get:function(){return this.Dt}},{key:"Cn",get:function(){return this.Ct}},{key:"Pn",get:function(){return this.Pt}},{key:"On",get:function(){return this.Ot}},{key:"Bn",get:function(){return this.Bt}},{key:"Ln",get:function(){return this.Lt}},{key:"Mn",get:function(){return this.Mt}},{key:"xn",get:function(){return this.xt}},{key:"Un",get:function(){return!(!this.Sn&&!this.An)&&this.wn<=56}},{key:"Fn",get:function(){return this.Ut}},{key:"Hn",get:function(){return this.Ft}},{key:"Vn",get:function(){return this.Ht}},{key:"Xn",get:function(){return this.Vt}},{key:"zn",get:function(){return this.Xt}},{key:"qn",get:function(){return this.zt}},{key:"Wn",get:function(){return this.yt}}]),n}();yi.Gn=new yi;var _i=yi.Gn,Si=!(_i.In&&!_i.Rn),Ti=t.console;function Ei(t){if(et(t))try{return JSON.stringify(t)}catch(t){}return t}function Ii(t){return t.map(Ei).join(" ")}function Ri(t){var n=Ti&&Ti[t];return n?n.bind&&Si?n.bind(Ti):function(){for(var n=arguments.length,i=new Array(n),e=0;e<n;e++)i[e]=arguments[e];Ti[t](Ii(i))}:void 0}var ki,Oi,Ni=Ri("log")||at,Pi=Ri("warn")||Ni.bind(void 0,"WARNING:"),Ai=Ri("error")||Ni.bind(void 0,"ERROR:"),Di=(ki=Ti&&Ti.assert)?ki.bind&&Si?ki.bind(Ti):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];Ti.assert(t,Ii(i))}:function(t){if(!t){for(var n=arguments.length,i=new Array(n>1?n-1:0),e=1;e<n;e++)i[e-1]=arguments[e];Ai.apply(void 0,["Assertion failed:"].concat(i))}};!function(t){t[t.Zn=1]="Zn",t[t.$n=2]="$n",t[t.Jn=3]="Jn",t[t.ni=4]="ni",t[t.ei=9]="ei"}(Oi||(Oi={}));var xi=function(t){function n(n){return t.call(this,"Invalid XML",n)||this}return Bt(n,t),n}(Mt),Ci=function(){function t(){}return t.prototype.ri=function(t){var n,i=new DOMParser;try{n=i.parseFromString(t,"text/xml")}catch(t){throw new xi(t)}if(!n||n.getElementsByTagName("parsererror").length>0)throw new xi;return new Wi(n)},t}(),Bi=function(){function t(t){this.oi=void 0,this.oi=t}var n=t.prototype;return n.ai=function(t){return this.oi.isEqualNode(t.oi)},n.ci=function(n){return new t(this.oi.cloneNode(n))},lt(t,[{key:"Kn",get:function(){return Oi.$n}},{key:"di",get:function(){var t;return null!=(t=this.oi.localName)?t:Hi(this.oi.nodeName)}},{key:"_i",get:function(){return this.oi.nodeName}},{key:"gi",get:function(){var t;return null!=(t=this.oi.namespaceURI)?t:void 0}},{key:"wi",get:function(){var t;return null!=(t=this.oi.prefix)?t:void 0}},{key:"Ai",get:function(){return this.oi.nodeValue}}]),t}(),Li=function(){function t(t){this.Ti=void 0,this.Si=void 0,this.Ti=t}var n=t.prototype;return n.Ei=function(t){return this.Ii.filter(function(n){return qi(n)&&n.Ri===t})},n.Ni=function(t,n){return this.Ii.filter(function(i){return qi(i)&&i.di===n&&i.gi===t})},n.Di=function(t){this.Ti.appendChild(t.Ci),this.Si&&this.Si.push(t)},n.ai=function(t){return this.Ti.isEqualNode(t.Ci)},lt(t,[{key:"Ii",get:function(){return void 0===this.Si&&(this.Si=function(t){for(var n=[],i=0;i<t.length;i++){var e=ji(t.item(i));e&&n.push(e)}return n}(this.Ti.childNodes)),this.Si}},{key:"Pi",get:function(){return this.Ii.filter(qi)}},{key:"Ci",get:function(){return this.Ti}}]),t}(),Ui=function(t){function n(n){return t.call(this,n)||this}Bt(n,t);var i=n.prototype;return i.Oi=function(t){if(this.Ti.hasAttribute(t))return this.Ti.getAttribute(t)},i.Bi=function(t,n){if(this.Ti.hasAttributeNS(t,n))return this.Ti.getAttributeNS(t,n)},i.Li=function(t){this.Ti.removeAttribute(t)},i.Mi=function(t,n){this.Ti.removeAttributeNS(t,n)},i.xi=function(t,n){this.Ti.setAttribute(t,n)},i.Ui=function(t,n,i){this.Ti.setAttributeNS(t,n,i)},i.ci=function(t){return new n(this.Ti.cloneNode(t))},lt(n,[{key:"Kn",get:function(){return Oi.Zn}},{key:"di",get:function(){var t;return null!=(t=this.Ti.localName)?t:Hi(this.Ti.nodeName)}},{key:"gi",get:function(){var t;return null!=(t=this.Ti.namespaceURI)?t:void 0}},{key:"wi",get:function(){var t;return null!=(t=this.Ti.prefix)?t:void 0}},{key:"Ri",get:function(){return this.Ti.nodeName}},{key:"Fi",get:function(){return function(t){for(var n=[],i=0;i<t.length;i++)n.push(new Bi(t.item(i)));return n}(this.Ti.attributes)}},{key:"Hi",get:function(){return this.Ti.textContent}}]),n}(Li),Fi=function(){function t(t){this.Ti=void 0,this.Ti=t}return t.prototype.ai=function(t){return this.Vi===t.Vi},lt(t,[{key:"Vi",get:function(){return this.Ti.nodeValue}},{key:"Ci",get:function(){return this.Ti}}]),t}(),Mi=function(t){function n(n){return t.call(this,n)||this}return Bt(n,t),n.prototype.ci=function(t){return new n(this.Ti.cloneNode(t))},lt(n,[{key:"Kn",get:function(){return Oi.Jn}}]),n}(Fi),zi=function(t){function n(n){return t.call(this,n)||this}return Bt(n,t),n.prototype.ci=function(t){return new n(this.Ti.cloneNode(t))},lt(n,[{key:"Kn",get:function(){return Oi.ni}}]),n}(Fi),Wi=function(t){function n(n){return t.call(this,n)||this}return Bt(n,t),n.prototype.ci=function(t){return new n(this.Ti.cloneNode(t))},lt(n,[{key:"Kn",get:function(){return Oi.ei}},{key:"Xi",get:function(){return new Ui(this.Ti.documentElement)}}]),n}(Li);function qi(t){return function(t){return t.Kn===Oi.Zn}(t)}function ji(t){switch(t.nodeType){case Oi.Zn:return new Ui(t);case Oi.Jn:return new Mi(t);case Oi.ni:return new zi(t)}}function Hi(t){var n=t.indexOf(":");return n<0?t:t.substr(n+1)}function Vi(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),c.defineProperty(t,e.key,e)}}function Xi(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){Gi(t,n,r,e);var o=t;t=e,e=o}return t}(t,n);return i!==t&&Gi(i,null,t.length,t),t}function Gi(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 Yi=/[a-zA-Z]/,Ki=/[0-9]/,$i=/[0-9a-fA-F]/,Ji=/^0x/i,Zi=/^[0-9]+$/,Qi=/^[0-9a-fA-F]+$/,te=/^[0-7]+$/,ne=c.prototype.toString,ie=Array.isArray||function(t){return"[object Array]"===ne.call(t)},ee="undefined"!=typeof Symbol&&"symbol"==typeof Symbol.iterator;function re(t){return ie(t)?t:Array.from(t)}function oe(t){return t>=65&&t<=90}function ue(t){return oe(t)||function(t){return t>=97&&t<=122}(t)}function se(t){return t>=48&&t<=57}function fe(t){return se(t)||ue(t)}function he(t){return se(t)||t>=65&&t<=70||t>=97&&t<=102}function ce(t){return oe(t)?t+32:t}function ae(t){return se(t)?t-48:t>=65&&t<=70?t-65+10:t>=97&&t<=102?t-97+10:-1}function ve(t,n){return void 0===n&&(n=!1),0<=t&&t<=9?t+48:10<=t&&t<=15?t+(n?87:55):-1}var de=a.min,le=String.fromCharCode,we=16384;function be(t){for(var n=t.length,i=[],e=0;e<n;e+=we){var r=de(e+we,n);i.push(le.apply(null,t.slice(e,r)))}return i.join("")}var ge=/[^\0-\x7E]/,me=/[\x2E\u3002\uFF0E\uFF61]/g,pe={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},ye=a.floor,_e=String.fromCharCode;function Se(t){throw new RangeError(pe[t])}function Te(t){for(var n=[],i=0,e=t.length;i<e;){var r=t.charCodeAt(i++);if(r>=55296&&r<=56319&&i<e){var o=t.charCodeAt(i++);56320==(64512&o)?n.push(((1023&r)<<10)+(1023&o)+65536):(n.push(r),i--)}else n.push(r)}return n}var Ee,Ie,Re,ke=function(t,n){return t+22+75*(t<26)-((0!=n)<<5)},Oe=function(t,n,i){var e=0;for(t=i?ye(t/700):t>>1,t+=ye(t/n);t>455;e+=36)t=ye(t/35);return ye(e+36*t/(t+38))},Ne=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 ge.test(t)?"xn--"+function(t){for(var n=[],i=(t=Te(t)).length,e=128,r=0,o=72,u=0,s=t;u<s.length;u++){var f=s[u];f<128&&n.push(_e(f))}var h=n.length,c=h;for(h&&n.push("-");c<i;){for(var a=2147483647,v=0,d=t;v<d.length;v++){var l=d[v];l>=e&&l<a&&(a=l)}var w=c+1;a-e>ye((2147483647-r)/w)&&Se("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>2147483647&&Se("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(_e(ke(_+S%T,0))),p=ye(S/T)}n.push(_e(ke(p,0))),o=Oe(r,w,c==h),r=0,++c}}++r,++e}return n.join("")}(t):t})};function Pe(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 be(n)}function Ae(t){if(t>=55296&&t<=57343)throw new f("Lone surrogate U+"+t.toString(16).toUpperCase()+" is not a scalar value")}function De(t,n){return t>>n&63|128}function xe(t,n){0!=(4294967168&t)?(0==(4294965248&t)?n.push(t>>6&31|192):0==(4294901760&t)?(Ae(t),n.push(t>>12&15|224),n.push(De(t,6))):0==(4292870144&t)&&(n.push(t>>18&7|240),n.push(De(t,12)),n.push(De(t,6))),n.push(63&t|128)):n.push(t)}function Ce(t){for(var n=[],i=0;i<t.length;i++){xe(t[i],n)}return n}function Be(){if(Re>=Ie)throw new f("Invalid byte index");var t=255&Ee[Re];if(Re++,128==(192&t))return 63&t;throw new f("Invalid continuation byte")}function Le(){var t,n;if(Re>Ie)throw new f("Invalid byte index");if(Re===Ie)return!1;if(t=255&Ee[Re],Re++,0==(128&t))return t;if(192==(224&t)){if((n=(31&t)<<6|Be())>=128)return n;throw new f("Invalid continuation byte")}if(224==(240&t)){if((n=(15&t)<<12|Be()<<6|Be())>=2048)return Ae(n),n;throw new f("Invalid continuation byte")}if(240==(248&t)&&(n=(7&t)<<18|Be()<<12|Be()<<6|Be())>=65536&&n<=1114111)return n;throw new f("Invalid UTF-8 detected")}function Ue(t){return[37,ve(t>>4),ve(15&t)]}function Fe(t){return function(t){return t>=0&&t<=31}(t)||t>126}function Me(t){return Fe(t)||32===t||34===t||60===t||62===t||96===t}function ze(t){return Me(t)||35===t||63===t||123===t||125===t}function We(t){return ze(t)||47===t||58===t||59===t||61===t||64===t||t>=91&&t<=94||124===t}function qe(t){return t<33||t>126||34===t||35===t||60===t||62===t}function je(t){return qe(t)||39===t}function He(t,n){if(!n(t))return[t];for(var i=Ce([t]),e=[],r=0;r<i.length;r++){var o=i[r];e.push.apply(e,Ue(o))}return e}function Ve(t,n){for(var i=[],e=0,r=Te(t);e<r.length;e++){var o=r[e];i.push.apply(i,He(o,n))}return Pe(i)}function Xe(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&&he(t[e+1])&&he(t[e+2])){var o=ae(t[e+1])<<4|ae(t[e+2]);n.push(o),e+=2}else n.push(r)}return n}(Ce(t))}function Ge(t){return Pe(function(t){Ee=t.slice(),Ie=Ee.length,Re=0;for(var n,i=[];!1!==(n=Le());)i.push(n);return i}(Xe(Te(t))))}function Ye(t){var n,i,e,r,o=t.length,u=[0,0,0,0,0,0,0,0],s=0,f=null,c=0;if(c<o&&":"===t[c]){if(!(c+1<o&&":"===t[c+1]))throw new h;c+=2,f=s+=1}for(;c<o;){if(8===s)throw new h("Too many groups");if(":"!==t[c]){for(var a=0,d=0;d<4&&c<o&&$i.test(t[c]);)a=a<<4|v(t[c],16),c+=1,d+=1;if("."===t[c]){if(0===d)throw new h;if(c-=d,s>6)throw new h;for(var l=0;c<o;){var w=null;if(l>0){if(!("."===t[c]&&l<4))throw new h;c+=1}if(!Ki.test(t[c]))throw new h;for(;c<o&&Ki.test(t[c]);){var b=v(t[c],10);if(null===w)w=b;else{if(0===w)throw new h;if((w=10*w+b)>255)throw new h}c+=1}u[s]=u[s]<<8|w,2!==(l+=1)&&4!==l||(s+=1)}if(4!==l)throw new h;break}if(":"===t[c]){if((c+=1)===o)throw new h}else if(c<o)throw new h;u[s]=a,s+=1}else{if(null!==f)throw new h("Too many :: groups");c+=1,f=s+=1}}if(null!==f){var g=s-f;for(s=7;0!==s&&g>0;)e=f+g-1,r=void 0,r=(n=u)[i=s],n[i]=n[e],n[e]=r,s-=1,g-=1}else if(8!==s)throw new h;return u}function Ke(t){var n=10,i=Zi;return Ji.test(t)?(t=t.slice(2),n=16,i=Qi):t.length>=2&&"0"===t[0]&&(t=t.slice(1),n=8,i=te),""===t?0:i.test(t)?v(t,n):void 0}var $e={zi:4},Je=/[\0\t\n\r #%/:?@\[\\\]]/,Ze=/[\0\t\n\r #/:?@\[\\\]]/;function Qe(t,n){if("["===t[0]){if("]"!==t[t.length-1])throw new h("Invalid IPv6 address");return{zi:2,qi:Ye(t.slice(1,-1))}}if(!n)return function(t){if(Ze.test(t))throw new h("Invalid code point in opaque host");var n=Ve(t,Fe);return""===n?$e:{zi:3,Wi:n}}(t);var i=function(t){return function(t){return Ne(t.toLowerCase())}(t)}(Ge(t));if(Je.test(i))throw new h("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=Ke(r);if(void 0===o)return;i.push(o)}for(var u=0;u<i.length-1;u++)if(i[u]>255)throw new h;if(i[i.length-1]>=a.pow(256,5-i.length))throw new h;for(var s=i.pop(),f=0;f<i.length;f++)s+=i[f]*a.pow(256,3-f);return s}}(i);return void 0!==e?{zi:1,qi:e}:""===i?$e:{zi:0,Gi:i}}function tr(t){switch(t.zi){case 0:return t.Gi;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.qi);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.qi)+"]";case 3:return t.Wi;case 4:return""}}var nr=/\+/g;function ir(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(nr," "),s=s.replace(nr," ");var f=Ge(u),h=Ge(s);i.push([f,h])}}return i}function er(t){for(var n="",i=0;i<t.length;i++){var e=t[i];i>0&&(n+="&"),n+=rr(Ce(Te(e[0])))+"="+rr(Ce(Te(e[1])))}return n}function rr(t){for(var n,i=[],e=0;e<t.length;e++){var r=t[e];32===r?i.push(43):42===(n=r)||45===n||46===n||95===n||fe(n)?i.push(r):i.push.apply(i,Ue(r))}return be(i)}var or=/(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])/;function ur(t){var n=""+t,i=or.exec(n);return i?function(t,n){for(var i=t.length,e=[],r=n;r<i;r++){var o=t.charCodeAt(r);if(fr(o))if(hr(o)||r===i-1)e.push(sr);else{var u=t.charCodeAt(r+1);hr(u)?(e.push(o,u),r++):e.push(sr)}else e.push(o)}return t.slice(0,n)+be(e)}(n,i.index):n}var sr=65533,fr=function(t){return 55296==(63488&t)},hr=function(t){return 0!=(1024&t)};function cr(t,n){var i=t[0],e=n[0];return i===e?0:i<e?-1:1}function ar(t){t.Yi.length=0}function vr(t,n){!function(t,n){for(var i=0;i<n.length;i++)t[i]=n[i];t.length=n.length}(t.Yi,ir(n))}function dr(t){if(t.ji){var n=er(t.Yi);""===n&&(n=null),t.ji.ji.Qi=n}}var lr=function(){function t(t){if(void 0===t&&(t=void 0),this.ji=null,null==t)this.Yi=[];else if("object"==typeof t||"function"==typeof t)if((o=t)instanceof lr&&ie(o.Yi)&&(!ee||o[Symbol.iterator]===wr))this.Yi=t.Yi.slice();else if(function(t){return null!=t&&(!!ie(t)||!!ee&&"function"==typeof t[Symbol.iterator])}(t)){this.Yi=[];for(var n=0,i=re(t);n<i.length;n++){var e=re(i[n]);if(2!==e.length)throw new h("Invalid name-value pair");this.Yi.push([ur(e[0]),ur(e[1])])}}else for(var r in this.Yi=[],t)c.prototype.hasOwnProperty.call(t,r)&&this.Yi.push([ur(r),ur(t[r])]);else(t=ur(t)).length>0&&"?"===t[0]&&(t=t.slice(1)),this.Yi=ir(t);var o}var n=t.prototype;return n.append=function(t,n){t=ur(t),n=ur(n),this.Yi.push([t,n]),dr(this)},n.delete=function(t){t=ur(t);for(var n=this.Yi,i=0;i<n.length;){n[i][0]===t?n.splice(i,1):i++}dr(this)},n.get=function(t){t=ur(t);for(var n=this.Yi,i=0;i<n.length;i++){var e=n[i];if(e[0]===t)return e[1]}return null},n.getAll=function(t){t=ur(t);for(var n=this.Yi,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=ur(t);for(var n=this.Yi,i=0;i<n.length;i++){if(n[i][0]===t)return!0}return!1},n.set=function(t,n){t=ur(t),n=ur(n);for(var i=this.Yi,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(){Xi(this.Yi,cr),dr(this)},n.toString=function(){return er(this.Yi)},n.entries=function(){return new pr(this.Yi,br)},n.keys=function(){return new pr(this.Yi,gr)},n.values=function(){return new pr(this.Yi,mr)},n.forEach=function(t){var n=this;this.Yi.forEach(function(i){return t(i[1],i[0],n)})},t}(),wr=lr.prototype.entries;ee&&(lr.prototype[Symbol.iterator]=wr);var br=function(t){return[t[0],t[1]]},gr=function(t){return t[0]},mr=function(t){return t[1]},pr=function(){function t(t,n){this.Ki=0,this.Yi=t,this.Zi=n}return t.prototype.next=function(){return this.Ki<this.Yi.length?{done:!1,value:this.Zi(this.Yi[this.Ki++])}:{done:!0,value:void 0}},t}(),yr="null";var _r=c.create(null);_r.ftp=21,_r.file=0,_r.gopher=70,_r.http=80,_r.https=443,_r.ws=80,_r.wss=443;var Sr=/^(?:\.|%2e)$/i,Tr=/^(?:\.|%2e){2}$/i;function Er(t){return Sr.test(t)}function Ir(t){return Tr.test(t)}function Rr(t){return void 0!==_r[t]}function kr(t){return Rr(t.Ji)}function Or(t){return""!==t.$i||""!==t.re}function Nr(t){var n=t.length;if(!(n>=2))return!1;if(!Ar(t.slice(0,2)))return!1;if(2!==n){var i=t[2];if(47!==i&&92!==i&&63!==i&&35!==i)return!1}return!0}function Pr(t){return 2===t.length&&Yi.test(t[0])&&(":"===t[1]||"|"===t[1])}function Ar(t){return 2===t.length&&Pr(be(t))}function Dr(t){return Pr(t)&&":"===t[1]}function xr(t){var n=t.ue;0!==n.length&&("file"===t.Ji&&1===n.length&&Dr(n[0])||n.pop())}function Cr(t){return null===t.oe||$e===t.oe||t.fe||"file"===t.Ji}var Br=-1,Lr=/\t|\n|\r/g,Ur=/^[\x00-\x1f ]+|[\x00-\x1f ]+$/g;function Fr(t,n,i,e){void 0===i&&(i=null),void 0===e&&(e=null),i||(i=new zr,t=t.replace(Ur,""));var r=null!==e?e:0;n=n||null;for(var o=[],u=!1,s=!1,f=!1,c=Te(t=t.replace(Lr,"")),a=c.length,d=0;d<=a;){var l=d<a?c[d]:Br;switch(r){case 0:if(!ue(l)){if(null===e){o.length=0,r=2;continue}throw new h("Invalid scheme")}o.push(ce(l)),r=1;break;case 1:if(fe(l)||43===l||45===l||46===l)o.push(ce(l));else{if(58!==l){if(null===e){o.length=0,r=2,d=0;continue}throw new h("Invalid scheme")}var w=Pe(o);if(null!==e){if(Rr(i.Ji)&&!Rr(w))return;if(!Rr(i.Ji)&&Rr(w))return;if((Or(i)||null!==i._e)&&"file"===w)return;if("file"===i.Ji&&(i.oe===$e||null===i.oe))return}if(i.Ji=w,null!==e)return void(kr(i)&&i._e===_r[i.Ji]&&(i._e=null));o.length=0,"file"===i.Ji?r=13:kr(i)&&n&&n.Ji===i.Ji?r=3:kr(i)?r=7:47===c[d+1]?(r=4,d+=1):(i.fe=!0,i.ue.push(""),r=18)}break;case 2:if(!n||n.fe&&35!==l)throw new h("Invalid scheme");n.fe&&35===l?(i.Ji=n.Ji,i.ue=n.ue.slice(),i.Qi=n.Qi,i.we="",i.fe=!0,r=20):"file"!==n.Ji?(r=5,d-=1):(r=13,d-=1);break;case 3:47===l&&47===c[d+1]?r=8:(r=5,d-=1);break;case 4:47===l?r=9:(r=17,d-=1);break;case 5:i.Ji=n.Ji,Br===l?(i.$i=n.$i,i.re=n.re,i.oe=n.oe,i._e=n._e,i.ue=n.ue.slice(),i.Qi=n.Qi):47===l?r=6:63===l?(i.$i=n.$i,i.re=n.re,i.oe=n.oe,i._e=n._e,i.ue=n.ue.slice(),i.Qi="",r=19):35===l?(i.$i=n.$i,i.re=n.re,i.oe=n.oe,i._e=n._e,i.ue=n.ue.slice(),i.Qi=n.Qi,i.we="",r=20):92===l&&kr(i)?r=6:(i.$i=n.$i,i.re=n.re,i.oe=n.oe,i._e=n._e,i.ue=n.ue.slice(),i.ue.pop(),r=17,d-=1);break;case 6:!kr(i)||47!==l&&92!==l?47===l?r=9:(i.$i=n.$i,i.re=n.re,i.oe=n.oe,i._e=n._e,r=17,d-=1):r=8;break;case 7:if(47!==l||47!==c[d+1]){r=8;continue}r=8,d+=1;break;case 8:47!==l&&92!==l&&(r=9,d-=1);break;case 9:if(64===l){u&&o.unshift(37,52,48),u=!0;for(var b=0;b<o.length;b++){var g=o[b];if(58!==g||f){var m=Pe(He(g,We));f?i.re+=m:i.$i+=m}else f=!0}o.length=0}else if(Br===l||47===l||63===l||35===l||kr(i)&&92===l){if(u&&0===o.length)throw new h("Invalid host");d-=o.length+1,o.length=0,r=10}else o.push(l);break;case 10:case 11:if(null!==e&&"file"===i.Ji)d-=1,r=15;else if(58!==l||s)if(Br===l||47===l||63===l||35===l||kr(i)&&92===l){if(d-=1,kr(i)&&0===o.length)throw new h("Invalid host");if(null!==e&&0===o.length&&(Or(i)||null!==i._e))return;var p=Qe(Pe(o),kr(i));if(i.oe=p,o.length=0,r=16,null!==e)return}else 91===l?s=!0:93===l&&(s=!1),o.push(l);else{if(0===o.length)throw new h("Invalid host");var y=Qe(Pe(o),kr(i));if(i.oe=y,o.length=0,r=12,11===e)return}break;case 12:if(se(l))o.push(l);else{if(!(Br===l||47===l||63===l||35===l||kr(i)&&92===l||null!==e))throw new h("Invalid port");if(0!==o.length){var _=v(Pe(o),10);if(_>65535)throw new h("Invalid port");i._e=_===_r[i.Ji]?null:_,o.length=0}if(null!==e)return;r=16,d-=1}break;case 13:i.Ji="file",47===l||92===l?r=14:n&&"file"===n.Ji?Br===l?(i.oe=n.oe,i.ue=n.ue.slice(),i.Qi=n.Qi):63===l?(i.oe=n.oe,i.ue=n.ue.slice(),i.Qi="",r=19):35===l?(i.oe=n.oe,i.ue=n.ue.slice(),i.Qi=n.Qi,i.we="",r=20):(Nr(c.slice(d))||(i.oe=n.oe,i.ue=n.ue.slice(),xr(i)),r=17,d-=1):(r=17,d-=1);break;case 14:47===l||92===l?r=15:(n&&"file"===n.Ji&&!Nr(c.slice(d))&&(Dr(n.ue[0])?i.ue.push(n.ue[0]):i.oe=n.oe),r=17,d-=1);break;case 15:if(Br===l||47===l||92===l||63===l||35===l)if(d-=1,null===e&&Ar(o))r=17;else if(0===o.length){if(i.oe=$e,null!==e)return;r=16}else{var S=Qe(Pe(o),kr(i));if(0===S.zi&&"localhost"===S.Gi&&(S=$e),i.oe=S,null!==e)return;o.length=0,r=16}else o.push(l);break;case 16:kr(i)?(r=17,47!==l&&92!==l&&(d-=1)):null===e&&63===l?(i.Qi="",r=19):null===e&&35===l?(i.we="",r=20):Br!==l&&(r=17,47!==l&&(d-=1));break;case 17:if(Br===l||47===l||kr(i)&&92===l||null===e&&(63===l||35===l)){var T=Pe(o);if(Ir(T)?(xr(i),47===l||kr(i)&&92===l||i.ue.push("")):!Er(T)||47===l||kr(i)&&92===l?Er(T)||("file"===i.Ji&&0===i.ue.length&&Ar(o)&&($e!==i.oe&&null!==i.oe&&(i.oe=$e),o[1]=58,T=Pe(o)),i.ue.push(T)):i.ue.push(""),o.length=0,"file"===i.Ji&&(Br===l||63===l||35===l))for(;i.ue.length>1&&""===i.ue[0];)i.ue.shift();63===l?(i.Qi="",r=19):35===l&&(i.we="",r=20)}else o.push.apply(o,He(l,ze));break;case 18:63===l?(i.Qi="",r=19):35===l?(i.we="",r=20):Br!==l&&(i.ue[0]+=Pe(He(l,Fe)));break;case 19:null===e&&35===l?(i.we="",r=20):Br!==l&&(i.Qi+=Pe(He(l,kr(i)?je:qe)));break;case 20:Br===l||0===l||(i.we+=Pe(He(l,Me)))}d++}return i}function Mr(t,n,i,e){try{Fr(t,n,i,e)}catch(t){}}var zr=function(){this.Ji="",this.$i="",this.re="",this.oe=null,this._e=null,this.ue=[],this.Qi=null,this.we=null,this.fe=!1};function Wr(t){switch(t.Ji){case"blob":var n;try{n=Fr(t.ue[0],null)}catch(t){return yr}return Wr(n);case"ftp":case"gopher":case"http":case"https":case"ws":case"wss":return i=t.Ji,e=t.oe,r=t._e,i+"://"+tr(e)+(null===r?"":":"+r);case"file":default:return yr}var i,e,r}var qr,jr,Hr=function(){function t(t,n){var i,e,r=null;if(null!=n)if(null!=(i=n)&&i instanceof Hr&&"object"==typeof i.ji)r=n.ji;else try{r=Fr(String(n),null)}catch(t){throw new h("Invalid base URL: "+t.message)}try{e=Fr(String(t),r)}catch(t){throw new h("Invalid URL: "+t.message)}var o=e.Qi;this.ji=e,this.Qi=function(t){var n=new lr;return null!==t&&vr(n,t),n}(o),this.Qi.ji=this}var n,i,e,r=t.prototype;return r.toString=function(){return this.href},r.toJSON=function(){return this.href},n=t,(i=[{key:"href",get:function(){return function(t,n){void 0===n&&(n=!1);var i=t.Ji+":";if(null!==t.oe?(i+="//",Or(t)&&(i+=t.$i,""!==t.re&&(i+=":"+t.re),i+="@"),i+=tr(t.oe),null!==t._e&&(i+=":"+t._e)):null===t.oe&&"file"===t.Ji&&(i+="//"),t.fe)i+=t.ue[0];else for(var e=0,r=t.ue;e<r.length;e++)i+="/"+r[e];return null!==t.Qi&&(i+="?"+t.Qi),n||null===t.we||(i+="#"+t.we),i}(this.ji)},set:function(t){var n;try{n=Fr(String(t),null)}catch(t){throw new h("Invalid URL: "+t.message)}this.ji=n,ar(this.Qi);var i=this.ji.Qi;null!==i&&vr(this.Qi,i)}},{key:"origin",get:function(){return Wr(this.ji)}},{key:"protocol",get:function(){return this.ji.Ji+":"},set:function(t){Mr(t+":",null,this.ji,0)}},{key:"username",get:function(){return this.ji.$i},set:function(t){Cr(this.ji)||(this.ji.$i=Ve(t,We))}},{key:"password",get:function(){return this.ji.re},set:function(t){Cr(this.ji)||(this.ji.re=Ve(t,We))}},{key:"host",get:function(){var t=this.ji,n=t.oe;if(null===n)return"";var i=t._e,e=tr(n);return null!==i&&(e+=":"+i),e},set:function(t){this.ji.fe||Mr(t,null,this.ji,10)}},{key:"hostname",get:function(){var t=this.ji.oe;return null===t?"":tr(t)},set:function(t){this.ji.fe||Mr(t,null,this.ji,11)}},{key:"port",get:function(){var t=this.ji._e;return null===t?"":""+t},set:function(t){Cr(this.ji)||(""===t?this.ji._e=null:Mr(t,null,this.ji,12))}},{key:"pathname",get:function(){var t=this.ji.ue;return this.ji.fe?t[0]:0===t.length?"":"/"+t.join("/")},set:function(t){this.ji.fe||(this.ji.ue.length=0,Mr(t,null,this.ji,16))}},{key:"search",get:function(){var t=this.ji.Qi;return null===t||""===t?"":"?"+t},set:function(t){t=ur(t);var n=this.ji;if(""===t)return n.Qi=null,void ar(this.Qi);"?"===t[0]&&(t=t.slice(1)),n.Qi="",Mr(t,null,n,19),vr(this.Qi,t)}},{key:"searchParams",get:function(){return this.Qi}},{key:"hash",get:function(){var t=this.ji.we;return null===t||""===t?"":"#"+t},set:function(t){""!==t?("#"===t[0]&&(t=t.slice(1)),this.ji.we="",Mr(t,null,this.ji,20)):this.ji.we=null}}])&&Vi(n.prototype,i),e&&Vi(n,e),t}();function Vr(t){return t.document&&t.document.baseURI||t.location.href||""}function Xr(){return void 0!==i?i.createElement("video"):void 0}function Gr(){return jr||(jr=Xr()),jr}var Yr=!!("ontouchstart"in t||t.DocumentTouch&&i instanceof t.DocumentTouch)||!(!e||!e.msMaxTouchPoints),Kr=Gr(),$r=!(!Kr||!Kr.webkitShowPlaybackTargetPicker),Jr=function(){function t(){this.Oe=void 0,this.Be=!1,this.qt=Yr,this.vn=!1,this.Le=!0}var i=t.prototype;return i.Me=function(){return 0},i.xe=function(t,n){return!0},i.Ue=function(t){return t>=1/6*2},lt(t,[{key:"Fe",get:function(){return void 0===this.Oe&&(this.Oe=this.Me()),this.Oe}},{key:"He",get:function(){return!_i.xn}},{key:"Ve",get:function(){}},{key:"Xe",get:function(){return n.devicePixelRatio||1}},{key:"ze",get:function(){return $r}},{key:"qe",get:function(){return!1}},{key:"We",get:function(){return!0}},{key:"Ge",get:function(){return _i.Pn||_i.un}},{key:"Ye",get:function(){return!0}},{key:"je",get:function(){return!0}},{key:"Qe",get:function(){return!1}},{key:"Ke",get:function(){}},{key:"Ze",get:function(){return!0}},{key:"Je",get:function(){return!1}}]),t}(),Zr=function(){var t=Xr();if(!t)return!1;var n=t.muted;return t.muted=!n,t.muted!==n}();!function(){if(_i.$t)return!1;var t=Xr();if(!t)return!1;var n=t.volume;t.volume=n/2+.1,t.volume}();var Qr=function(t){function n(n){var i;return(i=t.call(this)||this).$e=void 0,i.$e=n,i.$e&&(i.Be=i.$e.Be,i.qt=i.$e.qt,i.Le=Zr&&i.$e.Le),i}Bt(n,t);var i=n.prototype;return i.Me=function(){return this.$e?this.$e.Fe:t.prototype.Me.call(this)},i.xe=function(n,i){return this.$e?this.$e.xe(n,i):t.prototype.xe.call(this,n,i)},i.Ue=function(n){return this.$e?this.$e.Ue(n):t.prototype.Ue.call(this,n)},lt(n,[{key:"Ke",get:function(){var t;return null==(t=this.$e)?void 0:t.Ke}},{key:"Ze",get:function(){var t,n;return null==(t=null==(n=this.$e)?void 0:n.Ze)||t}}]),n}(Jr),to=function(t){function n(n){var i;return(i=t.call(this,n)||this).Be=!0,i.vn=!0,i}return Bt(n,t),lt(n,[{key:"Qe",get:function(){return _i.un}}]),n}(Qr),no=function(t){function n(){return t.apply(this,arguments)||this}return Bt(n,t),n.prototype.Me=function(){if(!qr.MediaSource)return 1},lt(n,[{key:"Qe",get:function(){return!0}}]),n}(to),io=function(t){function i(){for(var n,i=arguments.length,e=new Array(i),r=0;r<i;r++)e[r]=arguments[r];return(n=t.call.apply(t,[this].concat(e))||this).ir=void 0,n}return Bt(i,t),i.prototype.xe=function(n,i){return t.prototype.xe.call(this,n,i)},lt(i,[{key:"qe",get:function(){return _i.Tn<3}},{key:"We",get:function(){return _i.Tn>=3}},{key:"Ve",get:function(){var t=this;return n.tizen&&!this.ir&&n.tizen.systeminfo.getPropertyValue("DISPLAY",function(n){var i=n.resolutionWidth,e=n.resolutionHeight;1===i&&1===e||(t.ir={width:i,height:e})}),this.ir}},{key:"Je",get:function(){return _i.Tn<3}}]),i}(Qr),eo=function(t){function n(){return t.call(this)||this}return Bt(n,t),n}(Jr),ro=function(t){function n(){return t.apply(this,arguments)||this}return Bt(n,t),n.prototype.xe=function(t,n){if(t&&t.rr&&n&&n.rr){var i=oo(t.rr,"mp4a.40.2")&&oo(n.rr,"mp4a.40.5"),e=oo(t.rr,"mp4a.40.5")&&oo(n.rr,"mp4a.40.2"),r=oo(t.rr,"mp4a.40.2")&&oo(n.rr,"mp4a.40.34"),o=oo(t.rr,"mp4a.40.34")&&oo(n.rr,"mp4a.40.2"),u=oo(t.rr,"mp4a.40.5")&&oo(n.rr,"mp4a.40.34"),s=oo(t.rr,"mp4a.40.34")&&oo(n.rr,"mp4a.40.5");return!(i||e||r||o||u||s)}return!0},lt(n,[{key:"Ke",get:function(){if(_i.Wt)return 4096}}]),n}(eo);function oo(t,n){return t.indexOf(n)>-1}var uo,so=function(t){function n(){return t.apply(this,arguments)||this}return Bt(n,t),n.prototype.Ue=function(t){return t>=2},n}(eo),fo=function(t){function n(){var n;return(n=t.call(this)||this).Be=_i.On>=11,n.Le=_i.Pn&&!(_i.un&&_i.On<10),n}return Bt(n,t),n}(eo),ho=function(t){function i(){for(var n,i=arguments.length,e=new Array(i),r=0;r<i;r++)e[r]=arguments[r];return(n=t.call.apply(t,[this].concat(e))||this).ir=void 0,n}return Bt(i,t),lt(i,[{key:"Ve",get:function(){var t=this;return n.webOS&&!this.ir&&n.webOS.deviceInfo(function(n){t.ir={width:n.screenWidth,height:n.screenHeight}}),this.ir}},{key:"Ye",get:function(){return!1}}]),i}(Qr),co=function(t){function n(){return t.apply(this,arguments)||this}return Bt(n,t),lt(n,[{key:"Ze",get:function(){return!_i.Gt||(_i.yn?92!==_i.pn:_i.wn>=100)}}]),n}(eo),ao=function(t){function n(){return t.apply(this,arguments)||this}return Bt(n,t),lt(n,[{key:"Qe",get:function(){return!0}}]),n}(Qr),vo=function(){function n(){var n;this.dr=void 0,this._r=new Ci,this.gr=new lo,this.wr=(n=function(){if(_i.Dn)return new ro;if(_i.En||_i.In)return new so;if(_i.Pn)return new fo;if(_i._n)return new co;return new eo}(),_i.un?new no(n):_i.vn?new to(n):_i.An?new io(n):_i.Sn?new ho(n):_i.Wt?new ao(n):new Qr(n)),this.yr=function(){if(t.URL)try{var n=new t.URL("b","http://a");return n.pathname="c d","http://a/c%20d"===n.href}catch(t){}return!1}(),t.performance&&t.performance.now?this.dr=function(){return t.performance.now()}:this.dr=gn}var i=n.prototype;return i.pr=function(){Ni.apply(void 0,arguments)},i.Ar=function(){Pi.apply(void 0,arguments)},i.Tr=function(){Ai.apply(void 0,arguments)},i.Sr=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];Di.apply(void 0,[t].concat(i))},i.jn=function(t,n){return r(t,n)},i.Er=function(t,n){return u(t,n)},i.Yn=function(t){o(t)},i.Ir=function(t){s(t)},i.ri=function(t){return this._r.ri(t)},i.Rr=function(){return this.Nr.Rr()},i.Dr=function(){return this.Nr.Dr()},i.Cr=function(){return this.Nr.Cr()},i.Pr=function(){return this.Nr.Pr()},i.Or=function(){return this.Nr.Or()},i.Br=function(t,n){return this.Nr.Br(t,n)},i.Lr=function(t){return this.Nr.Lr(t)},i.Mr=function(t,n){var i;return void 0===n&&(n=Vr(qr)),i="object"!=typeof n||n instanceof Hr?n:n.href,new Hr(t,i)},i.xr=function(n,i){if(void 0===i&&(i=Vr(qr)),this.yr){var e="string"==typeof i?i:i.toString();return new t.URL(n,e).href}return this.Mr(n,i).href},lt(n,[{key:"Ur",get:function(){return this.gr}},{key:"Fr",get:function(){return this.wr}},{key:"Hr",get:function(){return{Vr:e&&e.userAgent.match(/Android /i)?"Android":"other",Xr:Boolean(e&&e.userAgent.match(/Android 8.0.0/i))}}},{key:"zr",get:function(){return t&&t.location&&"https:"===t.location.protocol}},{key:"qr",get:function(){return"languages"in e?e.languages.slice():[e.language]}}]),n}(),lo=function(){function t(){}return lt(t,[{key:"Wr",get:function(){return e.oscpu}},{key:"Fr",get:function(){return e.platform}},{key:"Gr",get:function(){return e.vendor}},{key:"Yr",get:function(){return e.vendorSub}}]),t}();function wo(){return(wo=c.assign||function(t){for(var n=1;n<arguments.length;n++){var i=arguments[n];for(var e in i)c.prototype.hasOwnProperty.call(i,e)&&(t[e]=i[e])}return t}).apply(this,arguments)}!function(t){t.rs="9a04f079-9840-4286-ab92-e65be0885f95",t.us="edef8ba9-79d6-4ace-a3c8-27dcd51d21ed",t.hs="1077efec-c0b2-4d02-ace3-3c1e52e2fb4b",t.fs="94ce86fb-07ff-4f43-adb8-93d2fa968ca2"}(uo||(uo={}));var bo,go=uo.rs,mo="urn:uuid:"+go,po="com.microsoft.playready",yo=uo.us,_o="urn:uuid:"+yo,So=uo.hs,To="urn:uuid:"+So,Eo=uo.fs,Io="urn:uuid:"+Eo,Ro="com.apple.fps.1_0";!function(t){t.rs="playready",t.us="widevine",t.fs="fairplay",t.hs="clearkey",t.vs="aes128"}(bo||(bo={}));var ko={ds:bo.rs,ls:po,_s:"cenc",gs:go,ys:mo,As:"PlayReady"},Oo={ds:bo.us,ls:"com.widevine.alpha",_s:"cenc",gs:yo,ys:_o,As:"Widevine"},No={ds:bo.fs,ls:Ro,_s:"skd",gs:Eo,ys:Io,As:"FairPlay"};bo.fs;var Po={ds:bo.hs,ls:"org.w3.clearkey",_s:"cenc",gs:So,ys:To,As:"ClearKey"},Ao=_i._n&&_i.wn>=42||_i.Dn&&_i.Cn>=38||_i.En||_i.Rn||_i.Bn&&_i.Ln>=29;function Do(t,n){return e="audio",null!=(i=t)&&-1!==i.indexOf(e)?{initDataTypes:["cenc"],audioCapabilities:[wo({contentType:t},n?{robustness:"SW_SECURE_CRYPTO"}:{})]}:{initDataTypes:["cenc"],videoCapabilities:[wo({contentType:t},n?{robustness:"SW_SECURE_CRYPTO"}:{})]};var i,e}var xo,Co=function(){function t(t){this.Ts=void 0,this.Ss=bt(),this.Es=void 0,this.Ts=t}var n=t.prototype;return n.Or=function(){return this.Lr(Oo)},n.Dr=function(){return this.Lr(Po)},n.Pr=function(){return this.Lr(ko)},n.Cr=function(){return this.Lr(No)},n.Lr=function(t){var n=t.ys,i=this.Ss.get(n);if(i)return i;var e=this.Br(t,'video/mp4; codecs="avc1.42000a"');return this.Ss.set(n,e),e},n.Br=function(t,n){return Q.async(function(i){for(;;)switch(i.prev=i.next){case 0:return i.prev=0,i.next=3,Q.awrap(this.Ts.Is(t.ls,[Do(n,!0)]));case 3:return i.abrupt("return",!0);case 6:return i.prev=6,i.t0=i.catch(0),i.prev=8,i.next=11,Q.awrap(this.Ts.Is(t.ls,[Do(n,!1)]));case 11:return i.abrupt("return",!0);case 14:return i.prev=14,i.t1=i.catch(8),i.abrupt("return",!1);case 17:case"end":return i.stop()}},null,this,[[0,6],[8,14]],j)},n.Rr=function(){return this.Es||(this.Es=this.Rs()),this.Es},n.Rs=function(){return Q.async(function(t){for(;;)switch(t.prev=t.next){case 0:if("https:"!==(void 0).protocol){t.next=2;break}case 2:if(Ao){t.next=4;break}return t.abrupt("return",!1);case 4:return t.next=6,Q.awrap(this.Dr());case 6:if(!t.sent){t.next=8;break}return t.abrupt("return",!1);case 8:return t.abrupt("return",!0);case 9:case"end":return t.stop()}},null,this,null,j)},t}(),Bo=["cenc"],Lo=function(t){function n(n){var i;return(i=t.call(this,"_u")||this).du=n,i}return Bt(n,t),n}(Qn),Uo=function(t){function n(n,i,e,r){var o;return(o=t.call(this,"wu")||this).du=n,o.yu=i,o.wu=e,o.mu=r,o}return Bt(n,t),n}(Qn);!function(t){t.bu="Au",t.Tu="Su"}(xo||(xo={}));var Fo=new w([0]).buffer,Mo=function(){function t(){this.Iu=void 0,this.Iu=[]}var n=t.prototype;return n.Ru=function(t){for(var n=0,i=this.Iu;n<i.length;n++){if(i[n][0]===t)return!0}return!1},n.Nu=function(t){for(var n=0,i=this.Iu;n<i.length;n++){var e=i[n];if(e[0]===t)return e[1]}},n.Du=function(t,n){this.Iu.forEach(function(n){return t(n[1],n[0])},n)},n.Cu=function(t,n){this.Iu.push([t,n])},n.Pu=function(){ht(this.Iu)},lt(t,[{key:"Ou",get:function(){return this.Iu.length}}]),t}(),zo=function(){function t(){var t=this;this.Xu=void 0,this.Wu=void 0,this.Gu=void 0,this.Xu=new j(function(n,i){t.Wu=n,t.Gu=i})}var n=t.prototype;return n.Yu=function(t){this.Wu&&(this.Wu(t),this.xs())},n.ju=function(t){this.Gu&&(this.Gu(t),this.xs())},n.zs=function(){this.Xu.catch(at),this.ju(new qt)},n.xs=function(){this.Wu=void 0,this.Gu=void 0},t}();function Wo(t,n){return t===po?function(t){if(t.byteLength<2*qo.length)return t;if(Fn(new DataView(t,0,2*qo.length),!0)===qo)return t;return n=t,Mn('<PlayReadyKeyMessage type="LicenseAcquisition"><LicenseAcquisition Version="1"><Challenge encoding="base64encoded">'+En(n)+'</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>',!0).buffer;var n}(n):n}var qo="<PlayReady";var jo=function(t){function n(n,i,e,r){var o;return(o=t.call(this,n,r)||this).Qu=void 0,o.Ku=void 0,o.Qu=i,o.Ku=e,o}return Bt(n,t),n}(Mt),Ho=function(t,n){return(Ho=c.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)c.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(t,n)};function Vo(t,n){if("function"!=typeof n&&null!==n)throw new h("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}Ho(t,n),t.prototype=null===n?c.create(n):(i.prototype=n.prototype,new i)}function Xo(t,n,i){return t.indexOf?t.indexOf(n,i):Array.prototype.indexOf.call(t,n,i)}function Go(t,n,i){return a.min(a.max(t,n),i)}function Yo(t,n){return t>>8-n}function Ko(t,n){return t&(1<<n)-1}!function(){function t(t,n){this.Zu=t,this.Ju=n}t.prototype.get=function(t){var n=this.Zu.get(t);if(0===this.Ju||void 0===n)return n;var i=this.Zu.get(t+1)||0,e=n&(1<<8-this.Ju)-1,r=i>>8-this.Ju;return(e<<this.Ju)+r},t.prototype.getBit=function(t){if(!(t<0)){var n=this.Zu.get(a.floor((t+this.Ju)/8));if(void 0!==n)return(n&1<<7-this.Ju-t%8)>0?1:0}},c.defineProperty(t.prototype,"bitLength",{get:function(){return this.Zu.bitLength-this.Ju},enumerable:!1,configurable:!0}),c.defineProperty(t.prototype,"length",{get:function(){return this.Zu.length},enumerable:!1,configurable:!0})}(),function(){function t(t){this.$u=t,this.uo=0,this.oo=0}c.defineProperty(t.prototype,"totalBitsRead",{get:function(){return 8*this.uo+this.oo},enumerable:!1,configurable:!0}),c.defineProperty(t.prototype,"done",{get:function(){return this.uo===this.$u.length&&0===this.oo},enumerable:!1,configurable:!0}),c.defineProperty(t.prototype,"location",{get:function(){return{byte:this.uo,bit:this.oo}},enumerable:!1,configurable:!0}),t.prototype.copy=function(){var n=new t(this.$u);return n.seek(this.uo,this.oo),n},t.prototype.canReadBits=function(t){return 8*this.uo+t+this.oo<=8*this.$u.length},t.prototype.canReadBytes=function(t){return 0===this.oo?this.uo+t<=this.$u.length:this.uo+t<this.$u.length},t.prototype.incBit=function(){this.oo++,this.oo>7&&(this.uo++,this.oo=0)},t.prototype.seek=function(t,n){this.uo=t,this.oo=n},t.prototype.peekBit=function(){if(!this.canReadBits(1))throw new f("Cannot read past end of buffer.");return this.$u.get(this.uo)>>7-this.oo&1},t.prototype.readBit=function(){var t=this.peekBit();return this.incBit(),t},t.prototype.readByte=function(){if(!this.canReadBytes(1))throw new f("Cannot read past end of buffer.");if(0===this.oo)return this.$u.get(this.uo++);var t=Ko(this.$u.get(this.uo),8-this.oo),n=Yo(this.$u.get(this.uo+1),this.oo);return this.uo++,t<<this.oo|n},t.prototype.readBits=function(t){if(!this.canReadBits(t))throw new f("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 f("The max bitlength that can be provided is 32.");if(!this.canReadBits(t))throw new f("Cannot read past end of buffer.");var n=0;if(0===this.oo&&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 f("The max bitlength that can be provided is 32.");if(!this.canReadBits(t))throw new f("Cannot read past end of buffer.");var n=this.readUInt(t);return 0===(n&1<<t-1)?n:n-a.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 f("Skipping over the buffer edge is not allowed.");var n=this.oo+t;this.uo+=n>>3,this.oo=7&n},t.prototype.readBool=function(){return this.readBit()>0},t.prototype.readString=function(t){if(!this.canReadBytes(t))throw new f("Cannot read past end of buffer.");for(var n=[],i=0;i<t;i++)n.push(this.readByte());return String.fromCharCode.apply(String,n)}}();var $o=function(t,n){return t===n?0:t<n?-1:t>n?1:l(t)?l(n)?0:1:-1},Jo=function(){function t(){this.ao=[],this.do=[],this.Se=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 f("The buffer length must be positive.");if(0!==i){if(0===this.do.length)this.do.push(0);else{var e=this.do[this.do.length-1]+this.ao[this.ao.length-1].length;this.do.push(e)}this.ao.push(t.subarray(n,n+i)),this.Se+=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.ao;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.ao=[],this.do=[],this.Se=0},t.prototype.get=function(t){if(!(t<0||t>=this.length)){var n=this.findContainingBufferIndex(t),i=t-this.do[n];return this.ao[n][i]}},c.defineProperty(t.prototype,"first",{get:function(){return this.get(0)},enumerable:!1,configurable:!0}),t.prototype.indexOf=function(t){if(this.ao.length<1)return-1;if(this.ao.length>1){var n=this.join();this.clear(),this.pushRange(n)}var i=this.ao[0];return"number"==typeof t?Xo(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=Xo(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=a.ceil((e+r)/2);i(t[o],n)<=0?e=o:r=o-1}return e}}}(this.do,t,$o)},t.prototype.join=function(){if(1===this.ao.length)return this.ao[0];var t=new w(this.length);return this.copyInternal(t,0),t},c.defineProperty(t.prototype,"length",{get:function(){return this.Se},enumerable:!1,configurable:!0}),c.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 f("Expected byteLength to be between 0 and 4 but was "+n);if(t<0||t>this.length-n)throw new f("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)*a.pow(2,8*(n-e-1));return i},t.prototype.slice=function(n,i){void 0===i&&(i=this.length);var e=Go(n,0,this.length),r=Go(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.ao[u],f=e,h=f-this.do[u];f+s.length-h<r;)o.pushRange(s,h,s.length-h),u+=1,h=(f+=s.length-h)-this.do[u],s=this.ao[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.ao.length-1,e=this.ao[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.ao[i]).length-1}else r-=1;n-=1}return this.slice(0,n+1)},t}(),Zo=function(){function t(n){this._o=n||t.BUFFER_CHUNK_SIZE,this.mo=!1,this.po=new Jo,this.$u=new w(this._o),this.Ao=0,this.To=0,this.oo=7}return t.prototype.closeByte=function(){this.$u[this.Ao++]=this.To,this.Ao>=this._o&&this.closeBuffer(),this.To=0,this.oo=7},t.prototype.closeBuffer=function(t){void 0===t&&(t=!0),0!==this.Ao&&(this.po.pushRange(this.$u,0,this.Ao),t&&(this.$u=new w(this._o)),this.Ao=0)},c.defineProperty(t.prototype,"isWritingStartBit",{get:function(){return 7===this.oo},enumerable:!1,configurable:!0}),t.prototype.close=function(){if(this.mo)throw new f("Cannot close a closed BitWriter.");return this.isWritingStartBit||this.closeByte(),this.closeBuffer(!1),this.mo=!0,this.po},t.prototype.writeBit=function(t){if(this.mo)throw new f("Cannot write to a closed BitWriter.");this.To|=t<<this.oo,0===this.oo?this.closeByte():this.oo--},t.prototype.writeByte=function(t){if(this.mo)throw new f("Cannot write to a closed BitWriter.");this.isWritingStartBit?(this.To=t,this.closeByte()):this.writeByteUnaligned(t)},t.prototype.writeByteUnaligned=function(t){var n=this.oo;this.To|=Yo(t,n+1),this.closeByte(),this.To=Ko(t,8-n)<<n+1,this.oo=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.mo)throw new f("Cannot write to a closed BitWriter.");this.isWritingStartBit?this.writeBytesAligned(t):this.writeBytesUnaligned(t)},t.prototype.writeBytesAligned=function(t){this.Ao+t.length<=this._o?(this.$u.set(t,this.Ao),this.Ao+=t.length,this.Ao===this._o&&this.closeBuffer()):(this.closeBuffer(),this.po.pushRange(t))},t.prototype.writeBytesUnaligned=function(t){if(0!==t.length){var n=this.oo;this.To|=Yo(t[0],n+1),this.closeByte();for(var i=1;i<t.length;i++){var e=Ko(t[i-1],8-n),r=Yo(t[i],n+1);this.To=e<<n+1|r,this.closeByte()}this.To=Ko(t[t.length-1],8-n)<<n+1,this.oo=n}},t.prototype.writeUInt=function(t,n){if(t<0)throw new f("Received a negative number.");if(n>32)throw new f("The max bitlength that can be provided is 32.");if(t>=a.pow(2,n))throw new f("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 f("The max bitlength that can be provided is 32.");if(a.abs(t)>=a.pow(2,n-1))throw new f("Signed integer "+t+" cannot be represented in "+n+" bit(s).");t<0?this.writeUInt(t+a.pow(2,n),n):this.writeUInt(t,n)},t.prototype.writeExponentialGolombCode=function(t){if(t<0)throw new f("Received a negative number.");for(var n=a.floor(a.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 w(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}(),Qo=function(){function t(t){this.rb=new Jo,this.So=t}return t.prototype.closeWriter=function(){void 0!==this.So&&(this.rb=this.rb.concat(this.So.close()),this.So=void 0)},c.defineProperty(t.prototype,"writer",{get:function(){return void 0===this.So&&(this.So=new Zo),this.So},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 f("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(a.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 Qo;return this.serializeCommonBoxHeader(t.writer),this.serializeBoxContent(t),t.toRangedBuffer()},t.LARGE_SIZE=a.pow(2,32),t}();function nu(t,n){return t instanceof Xt?64===n:t<a.pow(2,n)}function iu(t,n){return a.round(t*a.pow(2,n))}function eu(t,n){for(var i=0;i<n.length;i++)t.writeByte(n[i])}var ru=function(t){function n(n,i,e){var r=t.call(this,n)||this;if(r.version=i,!nu(i,8))throw new f("the provided version cannot fit in 8 bits.");return r.flags=e,r}return Vo(n,t),c.defineProperty(n.prototype,"flags",{get:function(){return this.Eo},set:function(t){this.Eo=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return 4},n.prototype.serializeFlags=function(t){if("number"!=typeof this.flags)throw new f("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);!function(t){function n(n,i){var e=t.call(this,n)||this;return e.data=i,e}Vo(n,t),n.prototype.getBoxContentSize=function(){return this.data.length},n.prototype.serializeBoxContent=function(t){t.concat(Jo.from(this.data))}}(tu);var ou=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 uu=16384;function su(t){var n=t.length;if(n<=uu)return String.fromCharCode.apply(String,t);for(var i=[],e=0;e<n;e+=uu)i.push(String.fromCharCode.apply(String,t.slice(e,e+uu)));return i.join("")}function fu(t,n){var i=t.getUint8(n.offset);return n.shift(1),i}function hu(t,n,i){var e,r=function(t,n,i){void 0===n&&(n=0);void 0===i&&(i=t.byteLength);return new w(t.buffer,t.byteOffset+n,i-n)}(new w((e=t).buffer,e.byteOffset,e.byteLength),n.offset,n.offset+i);return n.shift(r.byteLength),r}function cu(t,n,i){return n.offset+i<=t.byteLength}function au(t,n,i){void 0===i&&(i=!1);var e=t.getUint32(n.offset,i);return n.shift(4),e}function vu(t,n,i){void 0===i&&(i=!1);var e=au(t,n,i),r=au(t,n,i),o=i?r:e,u=i?e:r;return Xt.fromBits(u,o,!0)}function du(t,n,i){var e,r=hu(t,n,i);return su((e=r,[].slice.call(e)))}function lu(t,n){var i,e=fu(t,n);return 0==(128&e)?i=e:192==(224&e)?i=64*(31&e)+(63&fu(t,n)):224==(240&e)?i=4096*(15&e)+64*(63&fu(t,n))+(63&fu(t,n)):240==(248&e)&&(i=262144*(7&e)+4096*(63&fu(t,n))+64*(63&fu(t,n))+(63&fu(t,n))),i}function wu(t,n){return function(t,n,i){var e=[];(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)&&n.shift(3);for(;n.offset<t.byteLength;){var r=lu(t,n);if(void 0===r)break;if(i&&0===r)break;e.push(r)}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 su(n)}(e)}(t,n,!0)}var 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.prototype.toBit=function(){return new ou(this.offset<<3)},t}(),gu=function(){function t(t,n){this.data=t,this.cursor=n}return t.prototype.nextUint8=function(){return fu(this.data,this.cursor)},t.prototype.nextUint16=function(){return function(t,n,i){void 0===i&&(i=!1);var e=t.getUint16(n.offset,i);return n.shift(2),e}(this.data,this.cursor)},t.prototype.nextInt16=function(){return function(t,n,i){void 0===i&&(i=!1);var e=t.getInt16(n.offset,i);return n.shift(2),e}(this.data,this.cursor)},t.prototype.nextUint32=function(){return au(this.data,this.cursor)},t.prototype.nextInt32=function(){return function(t,n,i){void 0===i&&(i=!1);var e=t.getInt32(n.offset,i);return n.shift(4),e}(this.data,this.cursor)},t.prototype.nextInt64=function(){return function(t,n,i){void 0===i&&(i=!1);var e=au(t,n,i),r=au(t,n,i),o=i?r:e,u=i?e:r;return Xt.fromBits(u,o,!1)}(this.data,this.cursor)},t.prototype.nextUint64=function(){return vu(this.data,this.cursor)},t.prototype.nextUint8Array=function(t){return hu(this.data,this.cursor,t)},t.prototype.nextUint32Array=function(t){return function(t,n,i){for(var e=[],r=0;r<i;r++)e.push(au(t,n));return e}(this.data,this.cursor,t)},t.prototype.nextChars=function(t){return du(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 mu(t,n){return t.type===n}var pu=8;function yu(t,n){var i=n.offset,e=function(t,n){var i=n.offset;if(!cu(t,n,pu)){var e=n.offset+pu;return{complete:!1,neededOffset:e}}var r=au(t,n),o=du(t,n,4);if(1===r){if(!cu(t,n,8)){var e=n.offset+8;return n.seek(i),{complete:!1,neededOffset:e}}r=vu(t,n).toNumber()}if("uuid"===o){if(!cu(t,n,16)){var e=n.offset+16;return n.seek(i),{complete:!1,neededOffset:e}}o=du(t,n,16)}var u=n.offset;return{complete:!0,header:{type:o,size:r,headerSize:u-i}}}(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,h,c,a={type:r.type,offset:i,data:new gu((f=t,h=i,c=u,void 0===h&&(h=0),void 0===c&&(c=f.byteLength),new DataView(f.buffer,f.byteOffset+h,c-h)),new bu(r.headerSize))};return n.seek(u),{complete:!0,box:a}}!function(t){function n(){return t.call(this,"mdir")||this}Vo(n,t),n.prototype.serializeReserved=function(t){t.writer.writeString("appl"),t.writer.writeUInt(0,32),t.writer.writeUInt(0,32)}}(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 Vo(n,t),c.defineProperty(n.prototype,"handlerType",{get:function(){return this.Io},set:function(t){this.Io=t},enumerable:!1,configurable:!0}),n.prototype.serializeReserved=function(t){t.writer.writeUInt(0,32),t.writer.writeUInt(0,32),t.writer.writeUInt(0,32)},n.prototype.getBoxContentSize=function(){var n,i;return t.prototype.getBoxContentSize.call(this)+4+4+12+(null!==(i=null===(n=this.name)||void 0===n?void 0:n.length)&&void 0!==i?i:0)+1},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(0,32),n.writer.writeString(this.handlerType),this.serializeReserved(n),this.name&&n.writer.writeString(this.name),n.writer.writeByte(0)},n}(ru));var _u=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()},c.defineProperty(t.prototype,"tag",{get:function(){return this.Ro},set:function(t){if(!nu(t,8))throw new f("Provided tag does not fit in 8 bits.");this.Ro=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}();!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}Vo(n,t),c.defineProperty(n.prototype,"objectTypeIndication",{get:function(){return this.No},set:function(t){if(!nu(t,8))throw new f("Provided objectTypeIndication does not fit in 8 bits.");this.No=t},enumerable:!1,configurable:!0}),c.defineProperty(n.prototype,"streamType",{get:function(){return this.Do},set:function(t){if(!nu(t,6))throw new f("Provided streamType does not fit in 6 bits.");this.Do=t},enumerable:!1,configurable:!0}),c.defineProperty(n.prototype,"bufferSizeDb",{get:function(){return this.Co},set:function(t){if(!nu(t,24))throw new f("Provided bufferSizeDb does not fit in 24 bits.");this.Co=t},enumerable:!1,configurable:!0}),c.defineProperty(n.prototype,"maxBitrate",{get:function(){return this.Po},set:function(t){if(!nu(t,32))throw new f("Provided maxBitrate does not fit in 32 bits.");this.Po=t},enumerable:!1,configurable:!0}),c.defineProperty(n.prototype,"avgBitrate",{get:function(){return this.Oo},set:function(t){if(!nu(t,32))throw new f("Provided avgBitrate does not fit in 32 bits.");this.Oo=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)}}}(_u),function(t){function n(n,i){void 0===i&&(i={});var e=t.call(this,5,i.fixed28BitMode)||this;return e.data=n,e}Vo(n,t),n.prototype.getDescriptorSize=function(){return this.data.length},n.prototype.serializeDescriptorContent=function(t){t.concat(Jo.from(this.data))}}(_u);var Su=function(t){function n(n){void 0===n&&(n=!1);var i=t.call(this,6,n)||this;return i.predefined=2,i}return Vo(n,t),n.prototype.getDescriptorSize=function(){return 1},n.prototype.serializeDescriptorContent=function(t){t.writer.writeByte(this.predefined)},n}(_u);!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 Su(r.fixed28BitMode),o}Vo(n,t),c.defineProperty(n.prototype,"streamDependenceFlag",{get:function(){return void 0!==this.dependsOnEsId},enumerable:!1,configurable:!0}),c.defineProperty(n.prototype,"urlFlag",{get:function(){return void 0!==this.urlString},enumerable:!1,configurable:!0}),c.defineProperty(n.prototype,"ocrStreamFlag",{get:function(){return void 0!==this.ocrEsId},enumerable:!1,configurable:!0}),c.defineProperty(n.prototype,"esId",{get:function(){return this.Bo},set:function(t){if(!nu(t,16))throw new f("Provided esId does not fit in 16 bits.");this.Bo=t},enumerable:!1,configurable:!0}),c.defineProperty(n.prototype,"streamPriority",{get:function(){return this.Lo},set:function(t){if(!nu(t,5))throw new f("Provided streamPriority does not fit in 5 bits.");this.Lo=t},enumerable:!1,configurable:!0}),c.defineProperty(n.prototype,"dependsOnEsId",{get:function(){return this.Mo},set:function(t){if(t&&!nu(t,16))throw new f("Provided dependsOnEsId does not fit in 16 bits.");this.Mo=t},enumerable:!1,configurable:!0}),c.defineProperty(n.prototype,"ocrEsId",{get:function(){return this.xo},set:function(t){if(t&&!nu(t,16))throw new f("Provided ocrEsId does not fit in 16 bits.");this.xo=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)}}(_u);var Tu=function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n.boxes=[],n}return Vo(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),Eu=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return Vo(n,t),n.prototype.serializeBoxContent=function(t){},n.prototype.getBoxContentSize=function(){return 0},n}(Tu),Iu=function(t){function n(n,i){var e=t.call(this,n)||this;return e.dataReferenceIndex=i,e}return Vo(n,t),c.defineProperty(n.prototype,"dataReferenceIndex",{get:function(){return this.Uo},set:function(t){if(!nu(t,16))throw new f("Provided dataReferenceIndex does not fit in 16 bits.");this.Uo=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}(Eu),Ru=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 Vo(n,t),c.defineProperty(n.prototype,"channelCount",{get:function(){return this.Fo},set:function(t){if(!nu(t,16))throw new f("Provided channelCount does not fit in 16 bits.");this.Fo=t},enumerable:!1,configurable:!0}),c.defineProperty(n.prototype,"sampleSize",{get:function(){return this.Ho},set:function(t){if(!nu(t,16))throw new f("Provided sampleSize does not fit in 16 bits.");this.Ho=t},enumerable:!1,configurable:!0}),c.defineProperty(n.prototype,"sampleRate",{get:function(){return this.Vo},set:function(t){if(!nu(iu(t,16),32))throw new f("Provided rate does not fit in 32 bits (fixed 16.16).");this.Vo=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&&eu(n.writer,this.extra)},n}(Iu);!function(t){function n(n){var i=t.call(this,"stco",0,0)||this;return i.entries=n,i}Vo(n,t),c.defineProperty(n.prototype,"entries",{get:function(){return this.Xo},set:function(t){if(!nu(t.length,32))throw new f("Number of allowed entries cannot fit in 32 bits.");if(t.some(function(t){return!nu(t,32)}))throw new f("Not all entries can be represented in 32 bits.");this.Xo=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4+4*this.entries.length},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.entries.length,32);for(var i=0,e=this.entries;i<e.length;i++){var r=e[i];n.writer.writeUInt(r,32)}}}(ru),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}Vo(n,t),c.defineProperty(n.prototype,"cleanApertureWidthN",{get:function(){return this.zo},set:function(t){if(!nu(t,32))throw new f("Provided cleanApertureWidthN does not fit in 32 bits.");this.zo=t},enumerable:!1,configurable:!0}),c.defineProperty(n.prototype,"cleanApertureWidthD",{get:function(){return this.qo},set:function(t){if(!nu(t,32))throw new f("Provided cleanApertureWidthD does not fit in 32 bits.");this.qo=t},enumerable:!1,configurable:!0}),c.defineProperty(n.prototype,"cleanApertureHeightN",{get:function(){return this.Wo},set:function(t){if(!nu(t,32))throw new f("Provided cleanApertureHeightN does not fit in 32 bits.");this.Wo=t},enumerable:!1,configurable:!0}),c.defineProperty(n.prototype,"cleanApertureHeightD",{get:function(){return this.Go},set:function(t){if(!nu(t,32))throw new f("Provided cleanApertureHeightD does not fit in 32 bits.");this.Go=t},enumerable:!1,configurable:!0}),c.defineProperty(n.prototype,"horizOffN",{get:function(){return this.Yo},set:function(t){if(!nu(t,32))throw new f("Provided horizOffN does not fit in 32 bits.");this.Yo=t},enumerable:!1,configurable:!0}),c.defineProperty(n.prototype,"horizOffD",{get:function(){return this.jo},set:function(t){if(!nu(t,32))throw new f("Provided horizOffD does not fit in 32 bits.");this.jo=t},enumerable:!1,configurable:!0}),c.defineProperty(n.prototype,"vertOffN",{get:function(){return this.Qo},set:function(t){if(!nu(t,32))throw new f("Provided vertOffN does not fit in 32 bits.");this.Qo=t},enumerable:!1,configurable:!0}),c.defineProperty(n.prototype,"vertOffD",{get:function(){return this.Ko},set:function(t){if(!nu(t,32))throw new f("Provided vertOffD does not fit in 32 bits.");this.Ko=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}Vo(n,t),c.defineProperty(n.prototype,"entries",{get:function(){return this.Xo},set:function(t){if(!nu(t.length,32))throw new f("Number of allowed entries cannot fit in 32 bits.");if(t.some(function(t){return!nu(t.sampleCount,32)||!nu(t.sampleOffset,32)}))throw new f("Not all entries can be represented in 64 bits.");this.Xo=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4+8*this.entries.length},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.entries.length,32);for(var i=0,e=this.entries;i<e.length;i++){var r=e[i];n.writer.writeUInt(r.sampleCount,32),0===this.version?n.writer.writeUInt(r.sampleOffset,32):1===this.version&&n.writer.writeInt(r.sampleOffset,32)}}}(ru),function(t){function n(n){var i=t.call(this,"url ",0,void 0===n?1:0)||this;return i.location=n,i}Vo(n,t),c.defineProperty(n.prototype,"location",{get:function(){return this.Zo},set:function(t){this.flags=void 0===t?1:0,this.Zo=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){var n=t.prototype.getBoxContentSize.call(this);return this.location?n+this.location.length+1:n},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),this.location&&(n.writer.writeString(this.location),n.writer.writeByte(0))}}(ru),function(t){function n(n,i,e){var r=t.call(this,"urn ",0,e)||this;return r.name=n,r.location=i,r}Vo(n,t),c.defineProperty(n.prototype,"location",{get:function(){return this.Zo},set:function(t){if(1&this.flags)throw new f("The moov containment flag is set, a DataEntryUrlBox should be used instead.");this.Zo=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){var n=t.prototype.getBoxContentSize.call(this)+this.name.length+1;return this.location?n+this.location.length+1:n},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeString(this.name),n.writer.writeByte(0),this.location&&(n.writer.writeString(this.location),n.writer.writeByte(0))}}(ru),function(t){function n(){return t.call(this,"dinf")||this}Vo(n,t)}(Eu);var ku=function(t){function n(n,i,e){var r=t.call(this,n)||this;if(r.version=i,!nu(i,8))throw new f("the provided version cannot fit in 8 bits.");return r.flags=e,r}return Vo(n,t),c.defineProperty(n.prototype,"flags",{get:function(){return this.Eo},set:function(t){this.Eo=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return 4},n.prototype.serializeFlags=function(t){if("number"!=typeof this.flags)throw new f("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);!function(t){function n(){return t.call(this,"dref",0,0)||this}Vo(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)}}(ku);var Ou=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 Vo(n,t),c.defineProperty(n.prototype,"bitSize",{get:function(){return 0===this.version?32:64},enumerable:!1,configurable:!0}),c.defineProperty(n.prototype,"entries",{get:function(){return this.Xo},set:function(t){for(var n=0,i=t;n<i.length;n++){var e=i[n];if(!nu(e.segmentDuration,this.bitSize))throw new f("SegmentDuration of one of the entries does not fit in ".concat(this.bitSize," bits."));if(!nu(e.mediaTime,this.bitSize))throw new f("MediaTime of one of the entries does not fit in ".concat(this.bitSize," bits."));if(!nu(e.mediaRateInteger,16))throw new f("Provided mediaRateInteger does not fit in 16 bits.");if(e.mediaRateFraction&&!nu(e.mediaRateFraction,16))throw new f("Provided mediaRateFraction does not fit in 16 bits.")}this.Xo=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4+this.entries.length*(2*this.bitSize/8+2+2)},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.entries.length,32),this.serializeElstBoxContent(n)},n}(ru);!function(t){function n(n,i){return void 0===i&&(i=0),t.call(this,n,0,i)||this}Vo(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)}}}(Ou),function(t){function n(n,i){return void 0===i&&(i=0),t.call(this,n,1,i)||this}Vo(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)}}}(Ou),function(t){function n(){return t.call(this,"edts")||this}Vo(n,t)}(Eu);var Nu=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 Vo(n,t),c.defineProperty(n.prototype,"majorBrand",{get:function(){return this.Jo},set:function(t){if(4!==t.length)throw new f("the provided major brand does not conform to the 4 character requirement");this.Jo=t},enumerable:!1,configurable:!0}),c.defineProperty(n.prototype,"minorVersion",{get:function(){return this.$o},set:function(t){if(!nu(t,32))throw new f("the provided minor version does not fit in 32 bits.");this.$o=t},enumerable:!1,configurable:!0}),c.defineProperty(n.prototype,"compatibleBrands",{get:function(){return this.nh},set:function(t){if(t.some(function(t){return 4!==t.length}))throw new f("Some of the compatible brands do not conform to the 4 character requirement");this.nh=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);!function(t){function n(n,i,e){return t.call(this,"ftyp",n,i,e)||this}Vo(n,t)}(Nu),function(t){function n(n,i){void 0===i&&(i="free");var e=t.call(this,i)||this;return e.data=n,e}Vo(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(Jo.from(this.data))}}(tu);var Pu,Au=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 Vo(n,t),c.defineProperty(n.prototype,"creationTime",{get:function(){return this.ih},set:function(t){if(!nu(t,this.bitSize))throw new f("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.ih=t},enumerable:!1,configurable:!0}),c.defineProperty(n.prototype,"modificationTime",{get:function(){return this.eh},set:function(t){if(!nu(t,this.bitSize))throw new f("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.eh=t},enumerable:!1,configurable:!0}),c.defineProperty(n.prototype,"timescale",{get:function(){return this.rh},set:function(t){if(!nu(t,32))throw new f("Provided sequence number does not fit in 32 bits.");this.rh=t},enumerable:!1,configurable:!0}),c.defineProperty(n.prototype,"duration",{get:function(){return this.sh},set:function(t){if(!nu(t,this.bitSize))throw new f("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.sh=t},enumerable:!1,configurable:!0}),c.defineProperty(n.prototype,"language",{get:function(){return this.uh},set:function(t){if(!function(t){return/^[a-z]{3}$/.test(t)}(t))throw new f("Expected an ISO-639-2/T language code");this.uh=t},enumerable:!1,configurable:!0}),c.defineProperty(n.prototype,"bitSize",{get:function(){return 0===this.version?32:64},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.bitSize/8*3+4+2+2},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),this.serializeMdiaContent(n),n.writer.writeBit(0);for(var i=0,e=this.language;i<e.length;i++){var r=e[i];n.writer.writeUInt(r.charCodeAt(0)-96,5)}n.writer.writeUInt(0,16)},n}(ru);!function(t){function n(n,i,e){return void 0===e&&(e=0),t.call(this,n,i,0,e)||this}Vo(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)}}(Au),function(t){function n(n,i,e){return void 0===e&&(e=0),t.call(this,n,i,1,e)||this}Vo(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)}}(Au),function(t){function n(){return t.call(this,"mdia")||this}Vo(n,t)}(Eu),function(t){function n(){var n=t.call(this,"mdat")||this;return n.data=new Jo,n}Vo(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}Vo(n,t)}(Eu),function(t){function n(n){var i=t.call(this,"meta",0,0)||this;return i.handler=n,i}Vo(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())}}(ku),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"}(Pu||(Pu={}));var Du,xu,Cu={a:1,b:0,u:0,c:0,d:1,v:0,x:0,y:0,w:1};function Bu(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 Lu(t,n){var i,e,r,o;n.writer.writeUInt(null!==(i=t.isLeading)&&void 0!==i?i:Du.UNKNOWN,2),n.writer.writeUInt(null!==(e=t.sampleDependsOn)&&void 0!==e?e:xu.UNKNOWN,2),n.writer.writeUInt(null!==(r=t.sampleIsDependedOn)&&void 0!==r?r:xu.UNKNOWN,2),n.writer.writeUInt(null!==(o=t.sampleHasRedundancy)&&void 0!==o?o:xu.UNKNOWN,2)}function Uu(t,n){var i,e,r;n.writer.writeUInt(0,4),Lu(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"}(Du||(Du={})),function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.YES=1]="YES",t[t.NO=2]="NO",t[t.RESERVED=3]="RESERVED"}(xu||(xu={}));var Fu=function(){return function(){}}(),Mu=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 Vo(n,t),c.defineProperty(n.prototype,"systemId",{get:function(){return this.oh},set:function(t){if(16!==t.length)throw new f("Provided systemId length is not 16.");this.oh=t},enumerable:!1,configurable:!0}),c.defineProperty(n.prototype,"data",{get:function(){return this.Wi},set:function(t){if(!nu(t.length,32))throw new f("Provided data length does not fit in 32 bits.");this.Wi=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(Jo.from(this.systemId)),this.serializeVersionBoxContent(n),n.writer.writeUInt(this.data.length,32),n.concat(Jo.from(this.data))},n}(ru),zu=function(t){function n(n,i){return t.call(this,0,n,i)||this}return Vo(n,t),n}(Mu),Wu=function(t){function n(n,i,e){var r=t.call(this,1,n,i)||this;return r.kIds=e,r}return Vo(n,t),c.defineProperty(n.prototype,"kIds",{get:function(){return this.hh},set:function(t){if(!nu(t.length,32))throw new f("Provided kIds length cannot fit in 32 bits.");if(t.some(function(t){return 16!==t.length}))throw new f("Not all provided key ids are 16 bytes long.");this.hh=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(Jo.from(e))}},n}(Mu);var qu=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 Vo(n,t),c.defineProperty(n.prototype,"bitSize",{get:function(){return 0===this.version?32:64},enumerable:!1,configurable:!0}),c.defineProperty(n.prototype,"fragmentDuration",{get:function(){return this.ah},set:function(t){if(!nu(t,this.bitSize))throw new f("The provided fragmentDuration does not fit in ".concat(this.bitSize," bits."));this.ah=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.bitSize/8},n}(ru);!function(t){function n(n,i){return void 0===i&&(i=0),t.call(this,n,0,i)||this}Vo(n,t),n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.fragmentDuration,32)}}(qu),function(t){function n(n,i){return void 0===i&&(i=0),t.call(this,n,1,i)||this}Vo(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)}}(qu),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}Vo(n,t),c.defineProperty(n.prototype,"trackId",{get:function(){return this.fh},set:function(t){if(!nu(t,32))throw new f("Provided track id does not fit in 32 bits.");this.fh=t},enumerable:!1,configurable:!0}),c.defineProperty(n.prototype,"defaultSampleDescriptionIndex",{get:function(){return this.vh},set:function(t){if(!nu(t,32))throw new f("Provided default sample description index does not fit in 32 bits.");this.vh=t},enumerable:!1,configurable:!0}),c.defineProperty(n.prototype,"defaultSampleDuration",{get:function(){return this.dh},set:function(t){if(!nu(t,32))throw new f("Provided default sample duration does not fit in 32 bits.");this.dh=t},enumerable:!1,configurable:!0}),c.defineProperty(n.prototype,"defaultSampleSize",{get:function(){return this.lh},set:function(t){if(!nu(t,32))throw new f("Provided default sample size does not fit in 32 bits.");this.lh=t},enumerable:!1,configurable:!0}),c.defineProperty(n.prototype,"defaultSampleFlags",{get:function(){return this._h},set:function(t){if((null==t?void 0:t.samplePaddingValue)&&!nu(t.samplePaddingValue,3))throw new f("Provided sample padding value does not fit in 3 bits.");if((null==t?void 0:t.sampleDegradationPriority)&&!nu(t.sampleDegradationPriority,16))throw new f("Provided sample degradation priority does not fit in 16 bits.");this._h=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),Uu(null!==(i=this.defaultSampleFlags)&&void 0!==i?i:{},n)}}(ru),function(t){function n(){return t.call(this,"mvex")||this}Vo(n,t)}(Eu);var ju=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:Cu,c.gh=e,c}return Vo(n,t),c.defineProperty(n.prototype,"bitSize",{get:function(){return 0===this.version?32:64},enumerable:!1,configurable:!0}),c.defineProperty(n.prototype,"creationTime",{get:function(){return this.ih},set:function(t){if(!nu(t,this.bitSize))throw new f("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.ih=t},enumerable:!1,configurable:!0}),c.defineProperty(n.prototype,"modificationTime",{get:function(){return this.eh},set:function(t){if(!nu(t,this.bitSize))throw new f("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.eh=t},enumerable:!1,configurable:!0}),c.defineProperty(n.prototype,"timescale",{get:function(){return this.rh},set:function(t){if(!nu(t,32))throw new f("Provided sequence number does not fit in 32 bits.");this.rh=t},enumerable:!1,configurable:!0}),c.defineProperty(n.prototype,"duration",{get:function(){return this.sh},set:function(t){if(!nu(t,this.bitSize))throw new f("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.sh=t},enumerable:!1,configurable:!0}),c.defineProperty(n.prototype,"rate",{get:function(){return this.wh},set:function(t){if(!nu(iu(t,16),32))throw new f("Provided rate does not fit in 32 bits (fixed 16.16).");this.wh=t},enumerable:!1,configurable:!0}),c.defineProperty(n.prototype,"volume",{get:function(){return this.kh},set:function(t){if(!nu(iu(t,8),16))throw new f("Provided volume does not fit in 16 bits (fixed 8.8).");this.kh=t},enumerable:!1,configurable:!0}),c.defineProperty(n.prototype,"matrix",{get:function(){return this.yh},set:function(t){if(0!==t.u||0!==t.v||1!==t.w)throw new f("(u, v, w) does not match the required (0, 0, 1)");this.yh=t},enumerable:!1,configurable:!0}),c.defineProperty(n.prototype,"nextTrackId",{get:function(){return this.gh},set:function(t){if(0===t)throw new f("NextTrackId cannot be 0.");if(!nu(t,32))throw new f("NextTrackId cannot exceed 32 bits.");this.gh=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),Bu(this.matrix,n);for(var i=0;i<6;i++)n.writer.writeUInt(0,32);n.writer.writeUInt(this.nextTrackId,32)},n.DEFAULT_RATE=1,n.DEFAULT_VOLUME=1,n}(ru);!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}Vo(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)}}(ju),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}Vo(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)}}(ju);var Hu=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).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:Cu,a}return Vo(n,t),c.defineProperty(n.prototype,"bitSize",{get:function(){return 0===this.version?32:64},enumerable:!1,configurable:!0}),c.defineProperty(n.prototype,"creationTime",{get:function(){return this.ih},set:function(t){if(!nu(t,this.bitSize))throw new f("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.ih=t},enumerable:!1,configurable:!0}),c.defineProperty(n.prototype,"modificationTime",{get:function(){return this.eh},set:function(t){if(!nu(t,this.bitSize))throw new f("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.eh=t},enumerable:!1,configurable:!0}),c.defineProperty(n.prototype,"trackId",{get:function(){return this.fh},set:function(t){if(0===t)throw new f("trackId cannot be 0.");if(!nu(t,32))throw new f("trackId cannot exceed 32 bits.");this.fh=t},enumerable:!1,configurable:!0}),c.defineProperty(n.prototype,"duration",{get:function(){return this.sh},set:function(t){if(!nu(t,this.bitSize))throw new f("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.sh=t},enumerable:!1,configurable:!0}),c.defineProperty(n.prototype,"volume",{get:function(){return this.kh},set:function(t){if(!nu(iu(t,8),16))throw new f("Provided volume does not fit in 16 bits (fixed 8.8).");this.kh=t},enumerable:!1,configurable:!0}),c.defineProperty(n.prototype,"width",{get:function(){return this.ph},set:function(t){if(!nu(iu(t,16),32))throw new f("Provided width does not fit in 32 bits (fixed 16.16).");this.ph=t},enumerable:!1,configurable:!0}),c.defineProperty(n.prototype,"height",{get:function(){return this.Ah},set:function(t){if(!nu(iu(t,16),32))throw new f("Provided height does not fit in 32 bits (fixed 16.16).");this.Ah=t},enumerable:!1,configurable:!0}),c.defineProperty(n.prototype,"layer",{get:function(){return this.Th},set:function(t){if(!nu(t,16))throw new f("Provided layer does not fit in 16 bits.");this.Th=t},enumerable:!1,configurable:!0}),c.defineProperty(n.prototype,"alternateGroup",{get:function(){return this.Sh},set:function(t){if(!nu(t,16))throw new f("Provided alternateGroup does not fit in 16 bits.");this.Sh=t},enumerable:!1,configurable:!0}),c.defineProperty(n.prototype,"matrix",{get:function(){return this.yh},set:function(t){if(0!==t.u||0!==t.v||1!==t.w)throw new f("(u, v, w) does not match the required (0, 0, 1)");this.yh=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),Bu(this.matrix,n),n.writer.writeUInt(iu(this.width,16),32),n.writer.writeUInt(iu(this.height,16),32)},n}(ru);!function(t){function n(n,i,e,r,o,u){return t.call(this,0,n,i,e,r,o,u)||this}Vo(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)}}(Hu),function(t){function n(n,i,e,r,o,u){return t.call(this,1,n,i,e,r,o,u)||this}Vo(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)}}(Hu),function(t){function n(){return t.call(this,"trak")||this}Vo(n,t)}(Eu),function(t){function n(){return t.call(this,"moov")||this}Vo(n,t)}(Eu);var Vu=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 Vo(n,t),c.defineProperty(n.prototype,"bitSize",{get:function(){return 0===this.version?32:64},enumerable:!1,configurable:!0}),c.defineProperty(n.prototype,"baseMediaDecodeTime",{get:function(){return this.Eh},set:function(t){if(!nu(t,this.bitSize))throw new f("Provided baseMediaDecodeTime does not fit in ".concat(this.bitSize," bits."));this.Eh=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.bitSize/8},n}(ru);!function(t){function n(n,i){return void 0===i&&(i=0),t.call(this,n,0,i)||this}Vo(n,t),n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.baseMediaDecodeTime,32)}}(Vu),function(t){function n(n,i){return void 0===i&&(i=0),t.call(this,n,1,i)||this}Vo(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)}}(Vu),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}Vo(n,t),c.defineProperty(n.prototype,"trackId",{get:function(){return this.fh},set:function(t){if(!nu(t,32))throw new f("Provided track id does not fit in 32 bits.");this.fh=t},enumerable:!1,configurable:!0}),c.defineProperty(n.prototype,"baseDataOffset",{get:function(){return this.Ih},set:function(t){if(void 0===t&&this.flags.baseDataOffsetPresent)throw new f("The base data offset present flag is set.");if(void 0!==t&&!this.flags.baseDataOffsetPresent)throw new f("The base data offset present flag is not set.");if(t&&!nu(t,64))throw new f("Provided baseDataOffset does not fit in 32 bits.");this.Ih=t},enumerable:!1,configurable:!0}),c.defineProperty(n.prototype,"sampleDescriptionIndex",{get:function(){return this.Rh},set:function(t){if(void 0===t&&this.flags.sampleDescriptionIndexPresent)throw new f("The sample description index flag is set.");if(void 0!==t&&!this.flags.sampleDescriptionIndexPresent)throw new f("The sample description index flag is not set.");if(t&&!nu(t,32))throw new f("Provided sampleDescriptionIndex does not fit in 32 bits.");this.Rh=t},enumerable:!1,configurable:!0}),c.defineProperty(n.prototype,"defaultSampleDuration",{get:function(){return this.dh},set:function(t){if(void 0===t&&this.flags.defaultSampleDurationPresent)throw new f("The default sample duration present flag is set.");if(void 0!==t&&!this.flags.defaultSampleDurationPresent)throw new f("The default sample duration present flag is not set.");if(t&&!nu(t,32))throw new f("Provided defaultSampleDuration does not fit in 32 bits.");this.dh=t},enumerable:!1,configurable:!0}),c.defineProperty(n.prototype,"defaultSampleSize",{get:function(){return this.lh},set:function(t){if(void 0===t&&this.flags.defaultSampleSizePresent)throw new f("The default sample size present flag is set.");if(void 0!==t&&!this.flags.defaultSampleSizePresent)throw new f("The default sample size present flag is not set.");if(t&&!nu(t,32))throw new f("Provided defaultSampleSize does not fit in 32 bits.");this.lh=t},enumerable:!1,configurable:!0}),c.defineProperty(n.prototype,"defaultSampleFlags",{get:function(){return this._h},set:function(t){if(void 0===t&&this.flags.defaultSampleFlagsPresent)throw new f("The default sample flags present flag is set.");if(void 0!==t&&!this.flags.defaultSampleFlagsPresent)throw new f("The default sample flags present flag is not set.");if((null==t?void 0:t.samplePaddingValue)&&!nu(t.samplePaddingValue,3))throw new f("Provided sample padding value does not fit in 3 bits.");if((null==t?void 0:t.sampleDegradationPriority)&&!nu(t.sampleDegradationPriority,16))throw new f("Provided sample degradation priority does not fit in 16 bits.");this._h=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&&Uu(this.defaultSampleFlags,n)}}(ru),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}Vo(n,t),c.defineProperty(n.prototype,"dataOffset",{get:function(){return this.Nh},set:function(t){if(t&&!nu(t,32))throw new f("Provided data offset does not fit in 32 bits.");this.Nh=t},enumerable:!1,configurable:!0}),c.defineProperty(n.prototype,"firstSampleFlags",{get:function(){return this.Dh},set:function(t){if((null==t?void 0:t.samplePaddingValue)&&!nu(t.samplePaddingValue,3))throw new f("Provided sample padding value does not fit in 3 bits.");if((null==t?void 0:t.sampleDegradationPriority)&&!nu(t.sampleDegradationPriority,16))throw new f("Provided sample degradation priority does not fit in 16 bits.");this.Dh=t},enumerable:!1,configurable:!0}),c.defineProperty(n.prototype,"samples",{get:function(){return this.Ch},set:function(t){var n,i;if(!nu(t.length,32))throw new f("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 f("The sample duration present flag is set.");if(void 0!==o.duration&&!this.flags.sampleDurationPresent)throw new f("The sample duration present flag is not set.");if(o.duration&&!nu(o.duration,32))throw new f("Provided sample duration does not fit in 32 bits.");if(void 0===o.size&&this.flags.sampleSizePresent)throw new f("The sample size present flag is set.");if(void 0!==o.size&&!this.flags.sampleSizePresent)throw new f("The sample size present flag is not set.");if(o.size&&!nu(o.size,32))throw new f("Provided sample size does not fit in 32 bits.");if(void 0===o.flags&&this.flags.sampleFlagsPresent)throw new f("The sample flags present flag is set.");if(void 0!==o.flags&&!this.flags.sampleFlagsPresent)throw new f("The sample flags present flag is not set.");if((null===(n=o.flags)||void 0===n?void 0:n.samplePaddingValue)&&!nu(o.flags.samplePaddingValue,3))throw new f("Provided sample padding value does not fit in 3 bits.");if((null===(i=o.flags)||void 0===i?void 0:i.sampleDegradationPriority)&&!nu(o.flags.sampleDegradationPriority,16))throw new f("Provided sample degradation priority does not fit in 16 bits.");if(void 0===o.compositionTimeOffset&&this.flags.sampleCompositionTimeOffsetsPresent)throw new f("The sample compositionTimeOffset present flag is set.");if(void 0!==o.compositionTimeOffset&&!this.flags.sampleCompositionTimeOffsetsPresent)throw new f("The sample compositionTimeOffset present flag is not set.");if(o.compositionTimeOffset&&!nu(o.compositionTimeOffset,32))throw new f("Provided sample compositionTimeOffset does not fit in 32 bits.")}this.Ch=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&&Uu(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&&Uu(r.flags,n),this.flags.sampleCompositionTimeOffsetsPresent&&(0===this.version?n.writer.writeUInt(r.compositionTimeOffset,32):n.writer.writeInt(r.compositionTimeOffset,32))}}}(ru),function(t){function n(){return t.call(this,"traf")||this}Vo(n,t)}(Eu),function(t){function n(){return t.call(this,"moof")||this}Vo(n,t)}(Eu),function(t){function n(n){var i=t.call(this,"mfhd",0,0)||this;return i.sequenceNumber=n,i}Vo(n,t),c.defineProperty(n.prototype,"sequenceNumber",{get:function(){return this.Ph},set:function(t){if(!nu(t,32))throw new f("Provided sequence number does not fit in 32 bits.");this.Ph=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.sequenceNumber,32)}}(ru);var Xu=function(t){function n(n){var i=t.call(this,"frma")||this;return i.codingName=n,i}return Vo(n,t),c.defineProperty(n.prototype,"codingName",{get:function(){return this.Oh},set:function(t){if(4!==t.length)throw new f("Provided coding name was not 4 characters long.");this.Oh=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return 4},n.prototype.serializeBoxContent=function(t){t.writer.writeString(this.codingName)},n}(tu);!function(t){function n(n,i){var e=t.call(this,"pasp")||this;return e.hSpacing=n,e.vSpacing=i,e}Vo(n,t),c.defineProperty(n.prototype,"hSpacing",{get:function(){return this.Bh},set:function(t){if(!nu(t,32))throw new f("Provided hSpacing does not fit in 32 bits.");this.Bh=t},enumerable:!1,configurable:!0}),c.defineProperty(n.prototype,"vSpacing",{get:function(){return this.Lh},set:function(t){if(!nu(t,32))throw new f("Provided vSpacing does not fit in 32 bits.");this.Lh=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}Vo(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())}}(Eu),function(t){function n(n,i,e){var r=t.call(this,"sinf")||this;return r.schm=i,r.schi=e,r.frma=new Xu(n),r}Vo(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);var Gu=function(t){function n(n,i,e){var r=t.call(this,"saio",n,void 0===e?0:1)||this;return r.entries=i,r.explicitAuxInfoType=e,r}return Vo(n,t),c.defineProperty(n.prototype,"bitSize",{get:function(){return 0===this.version?32:64},enumerable:!1,configurable:!0}),c.defineProperty(n.prototype,"entries",{get:function(){return this.Xo},set:function(t){var n=this;if(!nu(t.length,32))throw new f("Number of entries provided does not fit in 32 bits.");if(t.some(function(t){return!nu(t,n.bitSize)}))throw new f("Not all provided entries fit in ".concat(this.bitSize," bits."));this.Xo=t},enumerable:!1,configurable:!0}),c.defineProperty(n.prototype,"explicitAuxInfoType",{get:function(){return this.Mh},set:function(t){if(void 0===t)this.flags=0;else{if(!nu(t.auxInfoType,32))throw new f("Provided auxInfoType does not fit in 32 bits.");if(!nu(t.auxInfoTypeParameter,32))throw new f("Provided auxInfoTypeParameter does not fit in 32 bits.");this.flags=1}this.Mh=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+(void 0===this.explicitAuxInfoType?0:8)+4+this.entries.length*this.bitSize/8},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),void 0!==this.explicitAuxInfoType&&(n.writer.writeUInt(this.explicitAuxInfoType.auxInfoType,32),n.writer.writeUInt(this.explicitAuxInfoType.auxInfoTypeParameter,32)),n.writer.writeUInt(this.entries.length,32),this.serializeSaioContent(n)},n}(ru);!function(t){function n(){return null!==t&&t.apply(this,arguments)||this}Vo(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)}}}(Gu),function(t){function n(){return null!==t&&t.apply(this,arguments)||this}Vo(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)}}}(Gu),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}Vo(n,t),c.defineProperty(n.prototype,"defaultSampleInfoSize",{get:function(){return this.Uh},set:function(t){if(!nu(t,8))throw new f("Provided defaultSampleInfoSize does not fit in a single byte.");this.Uh=t},enumerable:!1,configurable:!0}),c.defineProperty(n.prototype,"sampleInfoSizes",{get:function(){return this.Fh},set:function(t){if(!nu(t.length,32))throw new f("Number of sampleInfoSizes provided does not fit in 32 bits.");if(t.some(function(t){return!nu(t,8)}))throw new f("Not all provided sampleInfoSizes fit in a byte.");this.Fh=t},enumerable:!1,configurable:!0}),c.defineProperty(n.prototype,"explicitAuxInfoType",{get:function(){return this.Mh},set:function(t){if(void 0===t)this.flags=0;else{if(!nu(t.auxInfoType,32))throw new f("Provided auxInfoType does not fit in 32 bits.");if(!nu(t.auxInfoTypeParameter,32))throw new f("Provided auxInfoTypeParameter does not fit in 32 bits.");this.flags=1}this.Mh=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 f("Both a default size and specific sizes are provided. This is prohibited.");t.prototype.serializeBoxContent.call(this,n),void 0!==this.explicitAuxInfoType&&(n.writer.writeUInt(this.explicitAuxInfoType.auxInfoType,32),n.writer.writeUInt(this.explicitAuxInfoType.auxInfoTypeParameter,32)),n.writer.writeByte(this.defaultSampleInfoSize),n.writer.writeUInt(this.sampleInfoSizes.length,32);for(var i=0,e=this.sampleInfoSizes;i<e.length;i++){var r=e[i];n.writer.writeByte(r)}}}(ru),function(t){function n(n){var i=t.call(this,"sdtp",0,0)||this;return i.samples=n,i}Vo(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++){Lu(e[i],n)}}}(ru),function(t){function n(n){return t.call(this,"stsd",n,0)||this}Vo(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)}}(ku);var Yu=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 Vo(n,t),c.defineProperty(n.prototype,"groupingType",{get:function(){return this.Hh},set:function(t){if(4!==t.length)throw new f("The provided groupingType does not equal 4 characters.");this.Hh=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4+4},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeString(this.groupingType),this.serializeVersionBoxContent(n),n.writer.writeUInt(this.entries.length,32);for(var i=0,e=this.entries;i<e.length;i++){var r=e[i];this.serializeEntryBoxContent(n,r)}},n.prototype.serializeEntryBoxContent=function(t,n){n.serializeBoxContent(t)},n}(ru);!function(t){function n(n,i){return t.call(this,0,n,i)||this}Vo(n,t),n.prototype.serializeVersionBoxContent=function(t){}}(Yu),function(t){function n(n,i,e){var r=t.call(this,1,n,e)||this;return r.defaultLength=i,r}Vo(n,t),c.defineProperty(n.prototype,"defaultLength",{get:function(){return this.Vh},set:function(t){if(!nu(t,32))throw new f("The provided defaultLength does not fit in 32 bits.");this.Vh=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)}}(Yu),function(t){function n(n,i,e,r){void 0===r&&(r=0);var o=this;if(n<2)throw new f("This constructor is only meant for versions 2 and up.");return(o=t.call(this,n,i,e)||this).defaultSampleDescriptionIndex=r,o}Vo(n,t),c.defineProperty(n.prototype,"defaultSampleDescriptionIndex",{get:function(){return this.vh},set:function(t){if(!nu(t,32))throw new f("The provided defaultSampleDescriptionIndex does not fit in 32 bits.");this.vh=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)}}(Yu),function(t){function n(n){void 0===n&&(n=[]);var i=t.call(this,"stsz",0,0)||this;return i.sampleSizes=n,i}Vo(n,t),c.defineProperty(n.prototype,"sampleSizes",{get:function(){return this.Xh},set:function(t){if(!nu(t.length,32))throw new f("Number of allowed samples cannot fit in 32 bits.");if(t.some(function(t){return!nu(t,32)}))throw new f("Not all sampleSizes can be represented in 32 bits.");this.Xh=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4+4+4*this.sampleSizes.length},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(0,32),n.writer.writeUInt(this.sampleSizes.length,32);for(var i=0,e=this.sampleSizes;i<e.length;i++){var r=e[i];n.writer.writeUInt(r,32)}}}(ru),function(t){function n(n,i){void 0===n&&(n=0),void 0===i&&(i=0);var e=t.call(this,"stsz",0,0)||this;return e.defaultSampleSize=n,e.samples=i,e}Vo(n,t),c.defineProperty(n.prototype,"defaultSampleSize",{get:function(){return this.lh},set:function(t){if(!nu(t,32))throw new f("Provided defaultSampleSize does not fit in 32 bits.");this.lh=t},enumerable:!1,configurable:!0}),c.defineProperty(n.prototype,"samples",{get:function(){return this.Ch},set:function(t){if(!nu(t,32))throw new f("Number of allowed samples cannot fit in 32 bits.");this.Ch=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4+4},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.defaultSampleSize,32),n.writer.writeUInt(this.samples,32)}}(ru),function(t){function n(){return t.call(this,"stbl")||this}Vo(n,t)}(Eu),function(t){function n(n){var i=t.call(this,"stsc",0,0)||this;return i.entries=n,i}Vo(n,t),c.defineProperty(n.prototype,"entries",{get:function(){return this.Xo},set:function(t){if(!nu(t.length,32))throw new f("Number of allowed entries cannot fit in 32 bits.");if(t.some(function(t){return!nu(t.firstChunk,32)||!nu(t.sampleDescriptionIndex,32)||!nu(t.samplesPerChunk,32)}))throw new f("Not all entries can be represented in 96 bits.");this.Xo=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4+12*this.entries.length},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.entries.length,32);for(var i=0,e=this.entries;i<e.length;i++){var r=e[i];n.writer.writeUInt(r.firstChunk,32),n.writer.writeUInt(r.samplesPerChunk,32),n.writer.writeUInt(r.sampleDescriptionIndex,32)}}}(ru),function(t){function n(){return t.call(this,"schi")||this}Vo(n,t)}(Eu),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}Vo(n,t),c.defineProperty(n.prototype,"schemeType",{get:function(){return this.qh},set:function(t){if(4!==t.length)throw new f("The provided schemeType does not have a length of 4.");this.qh=t},enumerable:!1,configurable:!0}),c.defineProperty(n.prototype,"schemeVersion",{get:function(){return this.Wh},set:function(t){if(!nu(t,32))throw new f("The provided schemeVersion does not fit in 23 bits.");this.Wh=t},enumerable:!1,configurable:!0}),c.defineProperty(n.prototype,"schemeUri",{get:function(){return this.Gh},set:function(t){if(t&&4!==t.length)throw new f("The provided schemeUri does not have a length of 4.");this.flags=void 0===t?0:1,this.Gh=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4+4+(void 0===this.schemeUri?0:this.schemeUri.length+1)},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeString(this.schemeType),n.writer.writeUInt(this.schemeVersion,32),this.schemeUri&&(n.writer.writeString(this.schemeUri),n.writer.writeByte(0))}}(ru);var Ku=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 Vo(n,t),c.defineProperty(n.prototype,"bitSize",{get:function(){return 0===this.version?32:64},enumerable:!1,configurable:!0}),c.defineProperty(n.prototype,"referenceId",{get:function(){return this.Yh},set:function(t){if(!nu(t,32))throw new f("Provided referenceId does not fit in 32 bits.");this.Yh=t},enumerable:!1,configurable:!0}),c.defineProperty(n.prototype,"timescale",{get:function(){return this.rh},set:function(t){if(!nu(t,32))throw new f("Provided timescale does not fit in 32 bits.");this.rh=t},enumerable:!1,configurable:!0}),c.defineProperty(n.prototype,"earliestPresentationTime",{get:function(){return this.jh},set:function(t){if(!nu(t,this.bitSize))throw new f("Provided earliestPresentationTime does not fit in ".concat(this.bitSize," bits."));this.jh=t},enumerable:!1,configurable:!0}),c.defineProperty(n.prototype,"firstOffset",{get:function(){return this.Qh},set:function(t){if(!nu(t,this.bitSize))throw new f("Provided timescale does not fit in ".concat(this.bitSize," bits."));this.Qh=t},enumerable:!1,configurable:!0}),c.defineProperty(n.prototype,"references",{get:function(){return this.Kh},set:function(t){if(!nu(t.length,16))throw new f("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(!nu(e.referencedSize,31))throw new f("Provided referenced size does not fit in 31 bits.");if(!nu(e.subsegmentDuration,32))throw new f("Provided subsegment duration does not fit in 31 bits.");if(!nu(e.sapType,3))throw new f("Provided SAP type does not fit in 3 bits.");if(!nu(e.sapDeltaTime,28))throw new f("Provided SAP delta time does not fit in 28 bits.")}this.Kh=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4+4+this.bitSize/8*2+2+2+12*this.references.length},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.referenceId,32),n.writer.writeUInt(this.timescale,32),this.serializeSidxBoxContent(n),n.writer.writeUInt(0,16),n.writer.writeUInt(this.references.length,16);for(var i=0,e=this.references;i<e.length;i++){var r=e[i];n.writer.writeBit(r.referenceType),n.writer.writeUInt(r.referencedSize,31),n.writer.writeUInt(r.subsegmentDuration,32),n.writer.writeBool(r.startsWithSap),n.writer.writeUInt(r.sapType,3),n.writer.writeUInt(r.sapDeltaTime,28)}},n}(ru);!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}Vo(n,t),n.prototype.serializeSidxBoxContent=function(t){t.writer.writeUInt(this.earliestPresentationTime,32),t.writer.writeUInt(this.firstOffset,32)}}(Ku),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}Vo(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)}}(Ku),function(t){function n(n,i,e){return t.call(this,"styp",n,i,e)||this}Vo(n,t)}(Nu),function(t){function n(n){void 0===n&&(n=0);var i=t.call(this,"smhd",0,0)||this;return i.balance=n,i}Vo(n,t),c.defineProperty(n.prototype,"balance",{get:function(){return this.Zh},set:function(t){if(t<-1||t>1)throw new f("Provided balance does not fit in the allowed range [-1, 1].");if(!nu(iu(t,8),16))throw new f("Provided balance does not fit in 16 bits (fixed 8.8).");this.Zh=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+2+2},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(iu(this.balance,8),16),n.writer.writeUInt(0,16)}}(ru),function(t){function n(n){var i=t.call(this,"stss",0,0)||this;return i.entries=n,i}Vo(n,t),c.defineProperty(n.prototype,"entries",{get:function(){return this.Xo},set:function(t){if(!nu(t.length,32))throw new f("Number of allowed entries cannot fit in 32 bits.");if(t.some(function(t){return!nu(t,32)}))throw new f("Not all entries can be represented in 32 bits.");this.Xo=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4+4*this.entries.length},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.entries.length,32);for(var i=0,e=this.entries;i<e.length;i++){var r=e[i];n.writer.writeUInt(r,32)}}}(ru),function(t){function n(n){var i=t.call(this,"stts",0,0)||this;return i.entries=n,i}Vo(n,t),c.defineProperty(n.prototype,"entries",{get:function(){return this.Xo},set:function(t){if(!nu(t.length,32))throw new f("Number of allowed entries cannot fit in 32 bits.");if(t.some(function(t){return!nu(t.sampleCount,32)||!nu(t.sampleDelta,32)}))throw new f("Not all entries can be represented in 64 bits.");this.Xo=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4+8*this.entries.length},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.entries.length,32);for(var i=0,e=this.entries;i<e.length;i++){var r=e[i];n.writer.writeUInt(r.sampleCount,32),n.writer.writeUInt(r.sampleDelta,32)}}}(ru),function(t){function n(n){var i=t.call(this,"trep",0,0)||this;return i.trackId=n,i}Vo(n,t),c.defineProperty(n.prototype,"trackId",{get:function(){return this.fh},set:function(t){if(!nu(t,32))throw new f("The provided trackId does not fit in 32 bits.");this.fh=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)}}(ku),function(t){function n(){return t.call(this,"udta")||this}Vo(n,t)}(Eu);var $u={red:0,green:0,blue:0};!function(t){function n(n,i){void 0===n&&(n=0),void 0===i&&(i=$u);var e=t.call(this,"vmhd",0,1)||this;return e.graphicsMode=n,e.opColor=i,e}Vo(n,t),c.defineProperty(n.prototype,"opColor",{get:function(){return this.Jh},set:function(t){if(!nu(t.red,16)||!nu(t.green,16)||!nu(t.blue,16))throw new f("Not all colors could be represented in 16 bits.");this.Jh=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+2+6},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.graphicsMode,16),n.writer.writeUInt(this.opColor.red,16),n.writer.writeUInt(this.opColor.green,16),n.writer.writeUInt(this.opColor.blue,16)}}(ru);var Ju=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 Vo(n,t),c.defineProperty(n.prototype,"width",{get:function(){return this.ph},set:function(t){if(!nu(t,16))throw new f("Provided width does not fit in 16 bits.");this.ph=t},enumerable:!1,configurable:!0}),c.defineProperty(n.prototype,"height",{get:function(){return this.Ah},set:function(t){if(!nu(t,16))throw new f("Provided height does not fit in 16 bits.");this.Ah=t},enumerable:!1,configurable:!0}),c.defineProperty(n.prototype,"horizontalResolution",{get:function(){return this.$h},set:function(t){if(!nu(iu(t,16),32))throw new f("Provided horizontalResolution does not fit in 32 bits (fixed 16.16).");this.$h=t},enumerable:!1,configurable:!0}),c.defineProperty(n.prototype,"verticalResolution",{get:function(){return this.ea},set:function(t){if(!nu(iu(t,16),32))throw new f("Provided verticalResolution does not fit in 32 bits (fixed 16.16).");this.ea=t},enumerable:!1,configurable:!0}),c.defineProperty(n.prototype,"compressorName",{get:function(){return this.ra},set:function(t){if(t.length>31)throw new f("The provided compressorName should at most be 31 characters long.");this.ra=t},enumerable:!1,configurable:!0}),c.defineProperty(n.prototype,"frameCount",{get:function(){return this.ua},set:function(t){if(!nu(t,16))throw new f("Provided frameCount does not fit in 16 bits.");this.ua=t},enumerable:!1,configurable:!0}),c.defineProperty(n.prototype,"depth",{get:function(){return this.oa},set:function(t){if(!nu(t,16))throw new f("Provided depth does not fit in 16 bits.");this.oa=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&&eu(n.writer,this.extra)},n}(Iu);!function(t){function n(n){var i=t.call(this,"esds",0,0)||this;return i.esDescriptor=n,i}Vo(n,t),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+(this.esDescriptor instanceof w?this.esDescriptor.length:this.esDescriptor.getSize())},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),this.esDescriptor instanceof w?n.concat(Jo.from(this.esDescriptor)):this.esDescriptor.serialize(n)}}(ru),function(t){function n(n,i,e){var r=t.call(this,"mp4a",n,e)||this;return r.esd=i,r}Vo(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())}}(Ru),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}Vo(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)}}(Ju),function(t){function n(n,i){var e=t.call(this,"mp4s",n)||this;return e.esDescriptor=i,e}Vo(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)}}(Iu),function(t){function n(n){var i=t.call(this,"avcC")||this;return i.decoderConfig=n,i}Vo(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}c.defineProperty(t.prototype,"version",{get:function(){return this.va},set:function(t){if(!nu(t,8))throw new f("Provided version does not fit in 8 bits.");this.va=t},enumerable:!1,configurable:!0}),c.defineProperty(t.prototype,"profileIndication",{get:function(){return this._a},set:function(t){if(!nu(t,8))throw new f("Provided profileIndication does not fit in 8 bits.");this._a=t},enumerable:!1,configurable:!0}),c.defineProperty(t.prototype,"profileCompatibility",{get:function(){return this.ya},set:function(t){if(!nu(t,8))throw new f("Provided profileCompatibility does not fit in 8 bits.");this.ya=t},enumerable:!1,configurable:!0}),c.defineProperty(t.prototype,"levelIndication",{get:function(){return this.ma},set:function(t){if(!nu(t,8))throw new f("Provided levelIndication does not fit in 8 bits.");this.ma=t},enumerable:!1,configurable:!0}),c.defineProperty(t.prototype,"spsSets",{get:function(){return this.Aa},set:function(t){if(!nu(t.length,5))throw new f("Provided number of spsSets exceeds the max (32)");this.Aa=t},enumerable:!1,configurable:!0}),c.defineProperty(t.prototype,"ppsSets",{get:function(){return this.Ta},set:function(t){if(!nu(t.length,8))throw new f("Provided number of ppsSets exceeds the max (256)");this.Ta=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(Jo.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(Jo.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}Vo(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())}}(Ju),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}Vo(n,t),c.defineProperty(n.prototype,"bufferSizeDb",{get:function(){return this.Co},set:function(t){if(!nu(t,32))throw new f("Provided bufferSizeDb does not fit in 32 bits.");this.Co=t},enumerable:!1,configurable:!0}),c.defineProperty(n.prototype,"max",{get:function(){return this.Sa},set:function(t){if(!nu(t,32))throw new f("Provided max does not fit in 32 bits.");this.Sa=t},enumerable:!1,configurable:!0}),c.defineProperty(n.prototype,"avg",{get:function(){return this.Ea},set:function(t){if(!nu(t,32))throw new f("Provided avg does not fit in 32 bits.");this.Ea=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);var Zu=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 f("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 w(0),s}return Vo(n,t),c.defineProperty(n.prototype,"isProtected",{get:function(){return this.Ia},set:function(t){if(!nu(t,8))throw new f("Provided isProtected does not fit in 1 byte.");this.Ia=t},enumerable:!1,configurable:!0}),c.defineProperty(n.prototype,"perSampleIvSize",{get:function(){return this.Ra},set:function(t){if(![8,16].includes(t))throw new f("Provided perSampleIvSize does not match any allowed value [8, 16].");this.Ra=t,this.Na=new w(0)},enumerable:!1,configurable:!0}),c.defineProperty(n.prototype,"kId",{get:function(){return this.Da},set:function(t){if(16!==t.length)throw new f("Provided kId length is not 16.");this.Da=t},enumerable:!1,configurable:!0}),c.defineProperty(n.prototype,"constantIv",{get:function(){return this.Na},set:function(t){if(![8,16].includes(t.length))throw new f("Provided constant IV length does not match any allowed value [8, 16].");this.Na=t,this.Ra=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),eu(t.writer,this.kId),0===this.perSampleIvSize&&(t.writer.writeByte(this.constantIv.length),eu(t.writer,this.constantIv))},n}(ru);!function(t){function n(n){return t.call(this,0,n)||this}Vo(n,t)}(Zu);var Qu=function(t){function n(n){var i=t.call(this,1,n)||this;return i.cryptByteBlocks=n.cryptByteBlock,i.skipByteBlocks=n.skipByteBlock,i}return Vo(n,t),c.defineProperty(n.prototype,"cryptByteBlocks",{get:function(){return this.Ca},set:function(t){if(!nu(t,4))throw new f("Provided cryptByteBlocks does not fit in 4 bits.");this.Ca=t},enumerable:!1,configurable:!0}),c.defineProperty(n.prototype,"skipByteBlocks",{get:function(){return this.Pa},set:function(t){if(!nu(t,4))throw new f("Provided skipByteBlocks does not fit in 4 bits.");this.Pa=t},enumerable:!1,configurable:!0}),n.prototype.serializeVersionBoxContent=function(t){t.writer.writeUInt(this.cryptByteBlocks,4),t.writer.writeUInt(this.skipByteBlocks,4)},n}(Zu);function ts(t){return void 0!==t.iv}function ns(t){return void 0!==t.subsamples}!function(t){function n(n){var i=t.call(this)||this;return i.tencBox=new Qu(n),i}Vo(n,t),n.prototype.serializeBoxContent=function(t){this.tencBox.serializeOwnContent(t)},n.prototype.getBoxContentSize=function(){return this.tencBox.getTencHeaderSize()}}(Fu),function(t){function n(n){var i=t.call(this,"senc",0,{useSubsampleEncryption:!1})||this;return i.samples=n,i}Vo(n,t),c.defineProperty(n.prototype,"samples",{get:function(){return this.Ch},set:function(t){var n;if(!nu(t.length,32))throw new f("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(ts(r)&&![8,16].includes(r.iv.length))throw new f("IV of one of the provided samples did not satisfy the required length constraints. [8, 16]");if(void 0===n&&(n=ns(r)),!0===n&&!ns(r)||!1===n&&ns(r))throw new f("Mix of samples with and without subsamples detected.");if(ns(r)){if(!nu(r.subsamples.length,16))throw new f("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(!nu(s.clearData,16))throw new f("Subsample clearData of one of the provided samples does not fit in 16 bits.");if(!nu(s.protectedData,23))throw new f("Subsample protectedData of one of the provided samples does not fit in 23 bits.")}}}this.flags.useSubsampleEncryption=null!=n&&n,this.Ch=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];ts(r)&&(n+=r.iv.length),ns(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(ts(r)&&eu(n.writer,r.iv),ns(r)){n.writer.writeUInt(r.subsamples.length,16);for(var o=0,u=r.subsamples;o<u.length;o++){var s=u[o];n.writer.writeUInt(s.clearData,16),n.writer.writeUInt(s.protectedData,32)}}}},n.prototype.serializeFlags=function(t){t.writer.writeUInt(this.flags.useSubsampleEncryption?2:0,24)}}(ru),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}Vo(n,t),c.defineProperty(n.prototype,"timescale",{get:function(){return this.rh},set:function(t){if(!nu(t,32))throw new f("The provided timescale does not fit in 32 bits.");this.rh=t},enumerable:!1,configurable:!0}),c.defineProperty(n.prototype,"presentationTimeDelta",{get:function(){return this.Oa},set:function(t){if(!nu(t,32))throw new f("The provided presentationTimeDelta does not fit in 32 bits.");this.Oa=t},enumerable:!1,configurable:!0}),c.defineProperty(n.prototype,"eventDuration",{get:function(){return this.Ba},set:function(t){if(!nu(t,32))throw new f("The provided eventDuration does not fit in 32 bits.");this.Ba=t},enumerable:!1,configurable:!0}),c.defineProperty(n.prototype,"id",{get:function(){return this.La},set:function(t){if(!nu(t,32))throw new f("The provided id does not fit in 32 bits.");this.La=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(Jo.from(this.data))}}(ru);var is,es,rs=(is="pssh",es=function(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 Wu(i,s,e):new zu(i,s)},function(t){var n,i=function(t,n){for(var i=t.data,e=t.cursor;e.offset<i.byteLength;){var r=yu(i,e);if(!r.complete)return;if(mu(r.box,n))return r.box}}(new gu((n=t,new DataView(n.buffer,n.byteOffset,n.byteLength)),new bu),is);if(!i)throw new f("".concat(is," box not found"));return es(i)}),os=function(t){function n(n,i){var e;(e=t.call(this)||this).Ma=void 0,e.xa=!1,e.Ua=void 0,e.Fa=void 0,e.Ha=function(){e.Va()},e.Xa=function(t){e.Zs(new Uo(Lt(e),t.messageType,Wo(e.qa,t.message)))},e.Wa=function(){e.xa=!0,e.Ma.Ou>0&&(e.Ma.Pu(),e.Zs(new Lo(Lt(e)))),e.Ga.removeEventListener("keystatuseschange",e.Ha),e.Ga.removeEventListener("message",e.Xa)},e.Ga=n,e.qa=i,e.Ga.addEventListener("keystatuseschange",e.Ha),e.Ga.addEventListener("message",e.Xa),e.Ma=new Mo;var r=[];return e.Ga.closed&&r.push(j.resolve(e.Ga.closed)),e.Fa=new zo,r.push(e.Fa.Xu),e.Ua=j.race(r).then(e.Wa,e.Wa),e.Va(),e}Bt(n,t);var i=n.prototype;return i.Ya=function(){if(this.xa)return this.Ua;var t,n,i=[];return i.push(j.resolve(this.Ga.close())),i.push((t=1e3,new j(function(i,e){if(void 0!==n&&n.Ps)e(new qt);else{var r=Z.jn(function(){void 0!==n&&n.Fs(o),i()},t),o=function(){Z.Yn(r),e(new qt)};void 0!==n&&n.Us(o)}}))),this.Fa.Yu(j.race(i).catch(us)),this.xa=!0,this.Ua},i.Qa=function(t,n,i){if(_i.cn){var e=rs(Hn(n));if(1===e.version)n=new zu(e.systemId,e.data).serialize().join()}return j.resolve(this.Ga.generateRequest(t,n)).catch(us)},i.Ka=function(t){return j.resolve(this.Ga.load(t)).catch(us)},i.Za=function(){return j.resolve(this.Ga.remove()).catch(us)},i.Ja=function(t){return j.resolve(this.Ga.update(t)).catch(us)},i.Va=function(){var t=this;this.Ma.Pu(),this.Ga.keyStatuses.forEach(function(n,i){t.$a(i,n)}),this.Zs(new Lo(this))},i.$a=function(t,n){if("string"==typeof t){var i=t;t=n,n=i}var e=Hn(t);if(this.qa===po&&16===e.byteLength){var r=qn(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.qa===po&&"status-pending"===n&&(n="usable"),this.Ma.Cu(e,n)},lt(n,[{key:"tc",get:function(){return this.Ua}},{key:"nc",get:function(){return this.Ga.expiration}},{key:"ic",get:function(){return this.Ma}},{key:"ec",get:function(){return this.Ga.sessionId}}]),n}(Zn);function us(t){var n;if(t.message){var i=t.message.match(/^SystemCode:0x([0-9a-fA-F]+)$/);i&&(n=0|v(i[1],16))}throw new jo(t.message,void 0,n,t)}var ss=function(){function t(t,n,i){this.rc=t,this.uc=n,this.hc=i}var n=t.prototype;return n.ac=function(t){return Q.async(function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",new os(this.rc.createSession(t),this.uc));case 1:case"end":return n.stop()}},null,this,null,j)},n.cc=function(t){return j.resolve(this.rc.setServerCertificate(t))},n.fc=function(t){return j.resolve(t.setMediaKeys(this.rc))},n.vc=function(t){return j.resolve(t.setMediaKeys(null))},t}(),fs=function(){function t(t,n,i){this.dc=t,this.qa=n,this.lc=i}var n=t.prototype;return n._c=function(){var t;return Q.async(function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,Q.awrap(this.dc.createMediaKeys());case 2:return t=n.sent,n.abrupt("return",new ss(t,this.qa,this.lc));case 4:case"end":return n.stop()}},null,this,null,j)},n.gc=function(){return this.lc},lt(t,[{key:"uc",get:function(){return this.dc.keySystem}}]),t}();function hs(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,yc:e.yc},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 cs(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 cs(t,n,i,e)}),u=!0,o.videoCapabilities.length&&(r=!0))}return u||(r=t(i,"video/mp4")),r?o:void 0}}function cs(t,n,i,e){return!!e.contentType&&(!(e.encryptionScheme&&!ft(n,e.encryptionScheme))&&(!e.robustness&&t(i,(r=e.contentType,o=r.trim(),(u=o.indexOf(";"))<0?o:o.substr(0,u).trim()))));var r,o,u}function as(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 vs(t){return!(!t.audioCapabilities||!t.audioCapabilities.some(ds))||!(!t.videoCapabilities||!t.videoCapabilities.some(ds))}function ds(t){return!t.robustness}function ls(t,n){for(var i=[],e=0;e<t.length;e++){var r=t[e];r.robustness?i.push(r):i.push(wo({},r,{robustness:n}))}return i}var ws,bs,gs=function(){function t(){}return t.prototype.Is=function(t,n){var i,r,o,u,s,f,h,c;return Q.async(function(a){for(;;)switch(a.prev=a.next){case 0:for(n=n.filter(function(t){return!t.yc}),i=0,r=n;i<r.length;i++)(o=r[i]).audioCapabilities&&(o.audioCapabilities=as(o.audioCapabilities)),o.videoCapabilities&&(o.videoCapabilities=as(o.videoCapabilities));if("com.widevine.alpha"!==t||!n.some(vs)){a.next=14;break}return u=n.map(function(t){return i="SW_SECURE_CRYPTO",wo({},n=t,{videoCapabilities:n.videoCapabilities?ls(n.videoCapabilities,i):void 0,audioCapabilities:n.audioCapabilities?ls(n.audioCapabilities,i):void 0});var n,i}),a.prev=4,a.next=7,Q.awrap(e.requestMediaKeySystemAccess(t,u));case 7:return s=a.sent,f=s.getConfiguration(),a.abrupt("return",new fs(s,t,f));case 12:a.prev=12,a.t0=a.catch(4);case 14:return a.next=16,Q.awrap(e.requestMediaKeySystemAccess(t,n));case 16:return h=a.sent,c=h.getConfiguration(),a.abrupt("return",new fs(h,t,c));case 19:case"end":return a.stop()}},null,null,[[4,12]],j)},t.mc=function(){return void 0!==e&&"function"==typeof e.requestMediaKeySystemAccess},t}(),ms=function(){function t(){}return t.prototype.Is=function(t,n){try{return j.resolve(function(t,n){if(!ps())throw new h("Unsupported key system "+t)}(t))}catch(t){return j.reject(t)}},t.mc=function(){return ps()},t}();function ps(){return void 0!==qr.MSMediaKeys}!function(t){t[t.CONFIGURATION_ERROR=1e3]="CONFIGURATION_ERROR",t[t.LICENSE_ERROR=2e3]="LICENSE_ERROR",t[t.LICENSE_INVALID_DOMAIN=2001]="LICENSE_INVALID_DOMAIN",t[t.LICENSE_INVALID_SOURCE=2002]="LICENSE_INVALID_SOURCE",t[t.LICENSE_EXPIRED=2003]="LICENSE_EXPIRED",t[t.LICENSE_INVALID_FEATURE=2004]="LICENSE_INVALID_FEATURE",t[t.SOURCE_INVALID=3e3]="SOURCE_INVALID",t[t.SOURCE_NOT_SUPPORTED=3001]="SOURCE_NOT_SUPPORTED",t[t.MANIFEST_LOAD_ERROR=4e3]="MANIFEST_LOAD_ERROR",t[t.MANIFEST_CORS_ERROR=4001]="MANIFEST_CORS_ERROR",t[t.MANIFEST_PARSE_ERROR=4002]="MANIFEST_PARSE_ERROR",t[t.MEDIA_NOT_SUPPORTED=5e3]="MEDIA_NOT_SUPPORTED",t[t.MEDIA_LOAD_ERROR=5001]="MEDIA_LOAD_ERROR",t[t.MEDIA_DECODE_ERROR=5002]="MEDIA_DECODE_ERROR",t[t.MEDIA_AVPLAYER_ERROR=5003]="MEDIA_AVPLAYER_ERROR",t[t.MEDIA_ABORTED=5004]="MEDIA_ABORTED",t[t.NETWORK_ERROR=6e3]="NETWORK_ERROR",t[t.NETWORK_TIMEOUT=6001]="NETWORK_TIMEOUT",t[t.CONTENT_PROTECTION_ERROR=7e3]="CONTENT_PROTECTION_ERROR",t[t.CONTENT_PROTECTION_NOT_SUPPORTED=7001]="CONTENT_PROTECTION_NOT_SUPPORTED",t[t.CONTENT_PROTECTION_CONFIGURATION_MISSING=7002]="CONTENT_PROTECTION_CONFIGURATION_MISSING",t[t.CONTENT_PROTECTION_CONFIGURATION_INVALID=7003]="CONTENT_PROTECTION_CONFIGURATION_INVALID",t[t.CONTENT_PROTECTION_INITIALIZATION_INVALID=7004]="CONTENT_PROTECTION_INITIALIZATION_INVALID",t[t.CONTENT_PROTECTION_CERTIFICATE_ERROR=7005]="CONTENT_PROTECTION_CERTIFICATE_ERROR",t[t.CONTENT_PROTECTION_CERTIFICATE_INVALID=7006]="CONTENT_PROTECTION_CERTIFICATE_INVALID",t[t.CONTENT_PROTECTION_LICENSE_ERROR=7007]="CONTENT_PROTECTION_LICENSE_ERROR",t[t.CONTENT_PROTECTION_LICENSE_INVALID=7008]="CONTENT_PROTECTION_LICENSE_INVALID",t[t.CONTENT_PROTECTION_KEY_EXPIRED=7009]="CONTENT_PROTECTION_KEY_EXPIRED",t[t.CONTENT_PROTECTION_KEY_MISSING=7010]="CONTENT_PROTECTION_KEY_MISSING",t[t.CONTENT_PROTECTION_OUTPUT_RESTRICTED=7011]="CONTENT_PROTECTION_OUTPUT_RESTRICTED",t[t.CONTENT_PROTECTION_INTERNAL_ERROR=7012]="CONTENT_PROTECTION_INTERNAL_ERROR",t[t.SUBTITLE_LOAD_ERROR=8e3]="SUBTITLE_LOAD_ERROR",t[t.SUBTITLE_CORS_ERROR=8001]="SUBTITLE_CORS_ERROR",t[t.SUBTITLE_PARSE_ERROR=8002]="SUBTITLE_PARSE_ERROR",t[t.VR_PLATFORM_UNSUPPORTED=9e3]="VR_PLATFORM_UNSUPPORTED",t[t.VR_PRESENTATION_ERROR=9001]="VR_PRESENTATION_ERROR",t[t.AD_ERROR=1e4]="AD_ERROR",t[t.AD_BLOCKER_DETECTED=10001]="AD_BLOCKER_DETECTED",t[t.FULLSCREEN_ERROR=11e3]="FULLSCREEN_ERROR"}(ws||(ws={})),function(t){t[t.CONFIGURATION=1]="CONFIGURATION",t[t.LICENSE=2]="LICENSE",t[t.SOURCE=3]="SOURCE",t[t.MANIFEST=4]="MANIFEST",t[t.MEDIA=5]="MEDIA",t[t.NETWORK=6]="NETWORK",t[t.CONTENT_PROTECTION=7]="CONTENT_PROTECTION",t[t.SUBTITLE=8]="SUBTITLE",t[t.VR=9]="VR",t[t.AD=10]="AD",t[t.FULLSCREEN=11]="FULLSCREEN"}(bs||(bs={})),function(t){(bs||(bs={})).fromCode=function(t){var n=a.floor(t/1e3);if(n in bs)return n;throw new h("Invalid error code: "+t)}}();var ys=function(){function t(){}return t.prototype.Is=function(t,n){try{return j.resolve(function(t,n){if(t!==Ro)throw new h(t+" is not supported with webkit-prefixed Encrypted Media Extensions.");if(!_s())throw new h("Unsupported key system "+t)}(t))}catch(t){return j.reject(t)}},t.mc=function(){return _s()},t}();function _s(){return void 0!==qr.WebKitMediaKeys}var Ss,Ts=function(){function t(t){this.Vc=t}return t.prototype.Is=function(t,n){var i,e,r;return Q.async(function(o){for(;;)switch(o.prev=o.next){case 0:i=0,e=this.Vc;case 1:if(!(i<e.length)){o.next=14;break}return r=e[i],o.prev=3,o.next=6,Q.awrap(r.Is(t,n));case 6:return o.abrupt("return",o.sent);case 9:o.prev=9,o.t0=o.catch(3);case 11:i++,o.next=1;break;case 14:throw new h("Unsupported key system configuration for "+t);case 15:case"end":return o.stop()}},null,this,[[3,9]],j)},t}(),Es=function(t){function n(n){var i;return(i=t.call(this)||this).Ac=void 0,i.Lc=void 0,i.pc=void 0,i.mo=!1,i.Xc=void 0,i.zc=void 0,i.qc=void 0,i.Wc=void 0,i.Gc=void 0,i.qa=n,i.pc=new zo,i.zc="",i.Gc=new zo,i.qc=new Mo,i}Bt(n,t);var i=n.prototype;return i.Yc=function(){this.Lc&&(this.Nc("usable"),this.Lc.Yu(void 0),this.Lc=void 0)},i.jc=function(t){var n=new jo("Unknown CDM error",t.errorCode,t.systemCode);this.Lc?(this.Lc.ju(n),this.Lc=void 0):this.Ac?(this.Ac.ju(n),this.Ac=void 0):n.Qu===WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT?this.Nc("output-restricted"):1===n.Ku?this.Nc("expired"):this.Nc("internal-error")},i.Qc=function(t){0!==t.message.byteLength&&(this.Ac&&(this.Ac.Yu(void 0),this.Ac=void 0),this.Zs(new Uo(this,"license-request",Wo(this.qa,Vn(t.message).buffer),t.defaultURL||void 0)))},i.Kc=function(t){this.Wc||(this.Wc=t,this.Gc.Yu(t))},i.Ya=function(){return Q.async(function(t){for(;;)switch(t.prev=t.next){case 0:this.throwIfClosed(),this.mo=!0,this.pc.Yu(void 0);case 3:case"end":return t.stop()}},null,this,null,j)},i.Qa=function(t,n){return Q.async(function(t){for(;;)switch(t.prev=t.next){case 0:if(this.throwIfClosed(),this.Ac=new zo,this.Xc=Hn(n),t.t0=this.Wc,t.t0){t.next=8;break}return t.next=7,Q.awrap(this.Gc.Xu);case 7:t.t0=t.sent;case 8:return t.t0.webkitGenerateKeyRequest(this.qa,this.Xc),t.next=12,Q.awrap(this.Ac.Xu);case 12:case"end":return t.stop()}},null,this,null,j)},i.Ka=function(t){return Q.async(function(t){for(;;)switch(t.prev=t.next){case 0:return this.throwIfClosed(),t.abrupt("return",!1);case 2:case"end":return t.stop()}},null,this,null,j)},i.Za=function(){return Q.async(function(t){for(;;)switch(t.prev=t.next){case 0:this.throwIfClosed();case 1:case"end":return t.stop()}},null,this,null,j)},i.Ja=function(t){return Q.async(function(n){for(;;)switch(n.prev=n.next){case 0:if(this.throwIfClosed(),this.Lc=new zo,n.t0=this.Wc,n.t0){n.next=7;break}return n.next=6,Q.awrap(this.Gc.Xu);case 6:n.t0=n.sent;case 7:return n.t0.webkitAddKey(this.qa,Hn(t),this.Xc,this.ec),n.next=11,Q.awrap(this.Lc.Xu);case 11:case"end":return n.stop()}},null,this,null,j)},i.throwIfClosed=function(){if(this.mo)throw new h("Already closing or closed.")},i.Nc=function(t){this.qc.Pu(),this.qc.Cu(Fo,t),this.Zs(new Lo(this))},lt(n,[{key:"ic",get:function(){return this.qc}},{key:"ec",get:function(){return this.zc},set:function(t){this.zc=t}},{key:"tc",get:function(){return this.pc.Xu}},{key:"nc",get:function(){return NaN}}]),n}(Zn),Is=function(){function t(t,n){var i=this;this.Wc=void 0,this.Zc=bt(),this.Jc=[],this.Rc=function(t){var n=i.$c(t.sessionId);n&&n.Yc()},this.tf=function(t){var n=i.$c(t.sessionId);n&&n.jc(t)},this.nf=function(t){var n=i.$c(t.sessionId);n&&n.Qc(t)},this.uc=t,this.hc=n}var n=t.prototype;return n.fc=function(t){return this.Wc=t,this.Wc.addEventListener("webkitkeyadded",this.Rc),this.Wc.addEventListener("webkitkeyerror",this.tf),this.Wc.addEventListener("webkitkeymessage",this.nf),this.Zc.forEach(function(n,i){return n.Kc(t)}),this.Jc.forEach(function(n){return n.Kc(t)}),j.resolve()},n.vc=function(t){return t.removeEventListener("webkitkeyadded",this.Rc),t.removeEventListener("webkitkeyerror",this.tf),t.removeEventListener("webkitkeymessage",this.nf),this.Wc=void 0,j.resolve()},n.ac=function(t,n,i){var e;return Q.async(function(t){for(;;)switch(t.prev=t.next){case 0:return e=new Es(this.uc),this.Wc&&e.Kc(this.Wc),this.Jc.push(e),t.abrupt("return",e);case 4:case"end":return t.stop()}},null,this,null,j)},n.cc=function(t){return j.resolve(!1)},n.$c=function(t){if(t){var n=this.Zc.get(t);return n||((n=this.Jc.shift())?(n.ec=t,this.Zc.set(t,n),n):void 0)}},t}(),Rs=function(){function t(t,n){this.uc=t,this.if=n}var n=t.prototype;return n._c=function(){return j.resolve(new Is(this.uc,this.if))},n.gc=function(){return this.if},t}(),ks=function(){function t(){}return t.prototype.Is=function(t,n){try{return j.resolve(Os(t,n))}catch(t){return j.reject(t)}},t.mc=function(){return"undefined"!=typeof HTMLMediaElement&&void 0!==HTMLMediaElement.prototype.webkitGenerateKeyRequest&&void 0!==HTMLMediaElement.prototype.webkitAddKey&&void 0!==HTMLMediaElement.prototype.webkitCancelKeyRequest},t}();function Os(t,n){if(!ks.mc())throw new h("Unsupported key system "+t);for(var i=0;i<n.length;i++){var e=n[i],r=hs(Ns,Bo,t,e);if(r)return new Rs(t,r)}throw new h("Unsupported key system configuration for "+t)}function Ns(t,n){var i=Gr();return!(!i||!i.canPlayType||""===i.canPlayType(n,t))}function Ps(){return Ss||(Ss=function(){var t=[];ys.mc()&&t.push(new ys);gs.mc()&&t.push(new gs);ms.mc()&&t.push(new ms);ks.mc()&&t.push(new ks);return new Ts(t)}()),Ss}var As=function(){function t(){this.ef=bt()}var n=t.prototype;return n.Pu=function(t){this.ef.delete(t)},n.rf=function(){this.ef.clear()},n.Nu=function(t){return this.ef.get(t)},n.sf=function(t,n){this.ef.set(t,n)},t}(),Ds=function(){function t(){}return t.uf=function(){return t.Gn||(t.Gn=xs.mc()?new xs:new As),t.Gn},t.Pu=function(n){t.uf().Pu(n)},t.rf=function(){t.uf().rf()},t.Nu=function(n){return t.uf().Nu(n)},t.sf=function(n,i){t.uf().sf(n,i)},t}();Ds.Gn=void 0;var xs=function(n){function i(){return n.apply(this,arguments)||this}Bt(i,n),i.mc=function(){try{return t.sessionStorage.setItem("foobar","foobar"),t.sessionStorage.removeItem("foobar"),!0}catch(t){return!1}};var e=i.prototype;return e.Pu=function(n){t.sessionStorage.removeItem(n)},e.rf=function(){t.sessionStorage.clear()},e.Nu=function(n){return t.sessionStorage[n]},e.sf=function(n,i){t.sessionStorage[n]=i},i}(Ds);var Cs=function(){var n,i=t.Blob;if(i)try{return new i,n=i,function(t,i){return new n(t,i)}}catch(t){}var e,r=t.BlobBuilder||t.WebKitBlobBuilder||t.MozBlobBuilder||t.MSBlobBuilder;if(r)return e=r,function(t,n){var i=new e;if(t)for(var r=0;r<t.length;r++){var o=t[r];i.append(o)}return i.getBlob(n&&n.type||"")}}();function Bs(t,n,e){var r=Cs([n],{type:"application/octet-stream"}),o=URL.createObjectURL(r),u=function(t,n){var i=t,e=i.indexOf("?");if(e>=0&&(i=i.substr(0,e)),i=i.substr(i.lastIndexOf("/")+1),n){var r=i.indexOf(".");r<0&&(r=i.length),i=i.substr(0,r)+n+i.substr(r)}return i}(t,e),s=i.createElement("a");s.href=o,s.download=u,i.body.appendChild(s),s.click(),i.body.removeChild(s),URL.revokeObjectURL(o)}var Ls,Us;!function(t){t.hf="cf",t.vf="df",t.lf="contentprotectionerror",t._f="contentprotectionsuccess",t.gf="currentsourcechange",t.wf="destroy",t.kf="durationchange",t.yf="emptied",t.bu="encrypted",t.mf="ended",t.pf="bf",t.Af="loadstart",t.Tf="manifestupdate",t.Sf="nosupportedrepresentationfound",t.Ef="offline",t.If="online",t.Rf="pause",t.Nf="play",t.Df="progress",t.Cf="ratechange",t.Pf="representationchange",t.Of="resize",t.Bf="seeked",t.Lf="seeking",t.Mf="segmentnotfound",t.xf="Uf",t.Ff="Hf",t.Vf="sourcechange",t.Xf="timeupdate",t.zf="volumechange",t.qf="Wf",t.Gf="metricschange"}(Ls||(Ls={})),function(t){t.Yf="arraybuffer",t.jf="json",t.Qf="stream",t.Jn="text"}(Us||(Us={}));var Fs=function(){function t(n){var i=this;this.ns=void 0,this.ns={},n instanceof t?n.asList().forEach(function(t){var n=t[0],e=t[1];i.append(n,e)}):Array.isArray(n)?n.forEach(function(t){i.append(t[0],t[1])}):n&&c.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=Ms(i),e=zs(e);var r=i.toLowerCase();if(this.ns.hasOwnProperty(r)){var o=this.ns[r],u=o[1];o[1]=u?u+", "+e:e}else this.ns[r]=[i,e]},n.delete=function(t){var n=Ms(t).toLowerCase();delete this.ns[n]},n.get=function(t){var n=Ms(t).toLowerCase();return this.ns.hasOwnProperty(n)?this.ns[n][1]:null},n.has=function(t){var n=Ms(t).toLowerCase();return this.ns.hasOwnProperty(n)},n.set=function(t,n){var i=t,e=(i=Ms(i)).toLowerCase();this.ns[e]=[i,zs(n)]},n.forEach=function(t,n){for(var i in this.ns)this.ns.hasOwnProperty(i)&&t.call(n,this.ns[i][1],i,this)},n.asList=function(){var t=[];for(var n in this.ns)if(this.ns.hasOwnProperty(n)){var i=this.ns[n],e=i[0],r=i[1];t.push([e,r])}return t},n.Kf=function(){var t={};return this.forEach(function(n,i){t[i]=n}),t},n.Zf=function(t){var n=this;t.forEach(function(t,i){n.append(i,t)})},n.Jf=function(t){var n=this;t.forEach(function(t,i){n.set(i,t)})},t}();function Ms(t){var n=t;if("string"!=typeof n&&(n=String(n)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(n))throw new h("Invalid character in header field name");return n}function zs(t){var n=t;return"string"!=typeof n&&(n=String(n)),n}var Ws="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol:function(t){return"Symbol("+t+")"};function qs(){}var js=Number.isNaN||function(t){return t!=t},Hs=qs;function Vs(t){return"object"==typeof t&&null!==t||"function"==typeof t}function Xs(t){return t.slice()}function Gs(t){return!1!==function(t){if("number"!=typeof t)return!1;if(js(t))return!1;if(t<0)return!1;return!0}(t)&&t!==1/0}function Ys(t,n,i){if("function"!=typeof t)throw new h("Argument is not a function");return Function.prototype.apply.call(t,n,i)}function Ks(t,n,i,e){var r=t[n];if(void 0!==r){if("function"!=typeof r)throw new h(r+" is not a method");switch(i){case 0:return function(){return Js(r,t,e)};case 1:return function(n){var i=[n].concat(e);return Js(r,t,i)}}}return function(){return sf(void 0)}}function $s(t,n,i){var e=t[n];if(void 0!==e)return Ys(e,t,i)}function Js(t,n,i){try{return sf(Ys(t,n,i))}catch(t){return ff(t)}}function Zs(t){return t}function Qs(t){if(t=Number(t),js(t)||t<0)throw new RangeError("highWaterMark property of a queuing strategy must be non-negative and non-NaN");return t}function tf(t){if(void 0===t)return function(){return 1};if("function"!=typeof t)throw new h("size property of a queuing strategy must be a function");return function(n){return t(n)}}var nf=j,ef=j.prototype.then,rf=j.resolve.bind(nf),of=j.reject.bind(nf);function uf(t){return new nf(t)}function sf(t){return rf(t)}function ff(t){return of(t)}function hf(t,n,i){return ef.call(t,n,i)}function cf(t,n,i){hf(hf(t,n,i),void 0,Hs)}function af(t,n){cf(t,n)}function vf(t,n){cf(t,void 0,n)}function df(t,n,i){return hf(t,n,i)}function lf(t){hf(t,void 0,Hs)}var wf=function(){function t(){this.$f=0,this.tv=0,this.Ee={ev:[],rv:void 0},this.uv=this.Ee,this.$f=0,this.tv=0}return c.defineProperty(t.prototype,"length",{get:function(){return this.tv},enumerable:!0,configurable:!0}),t.prototype.push=function(t){var n=this.uv,i=n;16383===n.ev.length&&(i={ev:[],rv:void 0}),n.ev.push(t),i!==n&&(this.uv=i,n.rv=i),++this.tv},t.prototype.shift=function(){var t=this.Ee,n=t,i=this.$f,e=i+1,r=t.ev,o=r[i];return 16384===e&&(n=t.rv,e=0),--this.tv,this.$f=e,t!==n&&(this.Ee=n),r[i]=void 0,o},t.prototype.forEach=function(t){for(var n=this.$f,i=this.Ee,e=i.ev;!(n===e.length&&void 0===i.rv||n===e.length&&(n=0,0===(e=(i=i.rv).ev).length));)t(e[n]),++n},t.prototype.peek=function(){var t=this.Ee,n=this.$f;return t.ev[n]},t}();function bf(t,n,i){var e=null;!0===i&&(e=c.prototype);var r=c.create(e);return r.value=t,r.done=n,r}function gf(t,n){t.ov=!0,t.hv=n,n.fv=t,"readable"===n.ke?_f(t):"closed"===n.ke?function(t){_f(t),Ef(t)}(t):Sf(t,n.vv)}function mf(t,n){return Oc(t.hv,n)}function pf(t){"readable"===t.hv.ke?Tf(t,new h("Reader was released and can no longer be used to monitor the stream's closedness")):function(t,n){Sf(t,n)}(t,new h("Reader was released and can no longer be used to monitor the stream's closedness")),t.hv.fv=void 0,t.hv=void 0}function yf(t){return new h("Cannot "+t+" a stream using a released reader")}function _f(t){t.Ua=uf(function(n,i){t._v=n,t.wv=i})}function Sf(t,n){_f(t),Tf(t,n)}function Tf(t,n){lf(t.Ua),t.wv(n),t._v=void 0,t.wv=void 0}function Ef(t){t._v(void 0),t._v=void 0,t.wv=void 0}var If=Ws("[[CancelSteps]]"),Rf=Ws("[[PullSteps]]");function kf(t,n){void 0===n&&(n=!1);var i=new Cf(t);return i.ov=n,i}function Of(t){return uf(function(n,i){var e={Wu:n,Gu:i};t.fv.yv.push(e)})}function Nf(t,n,i){var e=t.fv;e.yv.shift().Wu(bf(n,i,e.ov))}function Pf(t){return t.fv.yv.length}function Af(t){var n=t.fv;return void 0!==n&&!!Bf(n)}var Df,xf,Cf=function(){function t(t){if(!1===Rc(t))throw new h("ReadableStreamDefaultReader can only be constructed with a ReadableStream instance");if(!0===kc(t))throw new h("This stream has already been locked for exclusive reading by another reader");gf(this,t),this.yv=new wf}return c.defineProperty(t.prototype,"closed",{get:function(){return Bf(this)?this.Ua:ff(Uf("closed"))},enumerable:!0,configurable:!0}),t.prototype.cancel=function(t){return Bf(this)?void 0===this.hv?ff(yf("cancel")):mf(this,t):ff(Uf("cancel"))},t.prototype.read=function(){return Bf(this)?void 0===this.hv?ff(yf("read from")):Lf(this):ff(Uf("read"))},t.prototype.releaseLock=function(){if(!Bf(this))throw Uf("releaseLock");if(void 0!==this.hv){if(this.yv.length>0)throw new h("Tried to release a reader lock when that reader has pending read() calls un-settled");pf(this)}},t}();function Bf(t){return!!Vs(t)&&!!c.prototype.hasOwnProperty.call(t,"yv")}function Lf(t){var n=t.hv;return n.mv=!0,"closed"===n.ke?sf(bf(void 0,!0,t.ov)):"errored"===n.ke?ff(n.vv):n.pv[Rf]()}function Uf(t){return new h("ReadableStreamDefaultReader.prototype."+t+" can only be used on a ReadableStreamDefaultReader")}"symbol"==typeof Ws.asyncIterator&&((Df={})[Ws.asyncIterator]=function(){return this},xf=Df,c.defineProperty(xf,Ws.asyncIterator,{enumerable:!1}));var Ff={next:function(){if(!1===Mf(this))return ff(zf("next"));var t=this.bv;return void 0===t.hv?ff(yf("iterate")):df(Lf(t),function(n){var i=n.done;return i&&pf(t),bf(n.value,i,!0)})},return:function(t){if(!1===Mf(this))return ff(zf("next"));var n=this.bv;if(void 0===n.hv)return ff(yf("finish iterating"));if(n.yv.length>0)return ff(new h("Tried to release a reader lock when that reader has pending read() calls un-settled"));if(!1===this.Av){var i=mf(n,t);return pf(n),df(i,function(){return bf(t,!0,!0)})}return pf(n),sf(bf(t,!0,!0))}};function Mf(t){return!!Vs(t)&&!!c.prototype.hasOwnProperty.call(t,"bv")}function zf(t){return new h("ReadableStreamAsyncIterator."+t+" can only be used on a ReadableSteamAsyncIterator")}function Wf(t){var n=t.Tv.shift();return t.Sv-=n.size,t.Sv<0&&(t.Sv=0),n.value}function qf(t,n,i){if(!Gs(i=Number(i)))throw new RangeError("Size must be a finite, non-NaN, non-negative number.");t.Tv.push({value:n,size:i}),t.Sv+=i}function jf(t){t.Tv=new wf,t.Sv=0}void 0!==xf&&c.setPrototypeOf(Ff,xf),c.defineProperty(Ff,"next",{enumerable:!1}),c.defineProperty(Ff,"return",{enumerable:!1});var Hf=Ws("[[AbortSteps]]"),Vf=Ws("[[ErrorSteps]]"),Xf=function(){function t(t,n){void 0===t&&(t={}),void 0===n&&(n={}),Yf(this);var i=n.size,e=n.highWaterMark;if(void 0!==t.type)throw new RangeError("Invalid type is specified");var r=tf(i);void 0===e&&(e=1),function(t,n,i,e){var r=c.create(vh.prototype);var o=Ks(n,"write",1,[r]),u=Ks(n,"close",0,[]),s=Ks(n,"abort",1,[]);dh(t,r,function(){return $s(n,"start",[r])},o,u,s,i,e)}(this,t,e=Qs(e),r)}return c.defineProperty(t.prototype,"locked",{get:function(){if(!1===Kf(this))throw yh("locked");return $f(this)},enumerable:!0,configurable:!0}),t.prototype.abort=function(t){return!1===Kf(this)?ff(yh("abort")):!0===$f(this)?ff(new h("Cannot abort a stream that already has a writer")):Jf(this,t)},t.prototype.close=function(){return!1===Kf(this)?ff(yh("close")):!0===$f(this)?ff(new h("Cannot close a stream that already has a writer")):!0===ih(this)?ff(new h("Cannot close an already-closing stream")):Zf(this)},t.prototype.getWriter=function(){if(!1===Kf(this))throw yh("getWriter");return Gf(this)},t}();function Gf(t){return new oh(t)}function Yf(t){t.ke="writable",t.vv=void 0,t.So=void 0,t.Ev=void 0,t.Iv=new wf,t.Rv=void 0,t.Nv=void 0,t.Dv=void 0,t.Cv=void 0,t.Pv=!1}function Kf(t){return!!Vs(t)&&!!c.prototype.hasOwnProperty.call(t,"Ev")}function $f(t){return void 0!==t.So}function Jf(t,n){var i=t.ke;if("closed"===i||"errored"===i)return sf(void 0);if(void 0!==t.Cv)return t.Cv.Ov;var e=!1;"erroring"===i&&(e=!0,n=void 0);var r=uf(function(i,r){t.Cv={Ov:void 0,Wu:i,Gu:r,Bv:n,Lv:e}});return t.Cv.Ov=r,!1===e&&th(t,n),r}function Zf(t){var n=t.ke;if("closed"===n||"errored"===n)return ff(new h("The stream (in "+n+" state) is not in the writable state and cannot be closed"));var i,e=uf(function(n,i){var e={Wu:n,Gu:i};t.Nv=e}),r=t.So;return void 0!==r&&!0===t.Pv&&"writable"===n&&Ah(r),qf(i=t.Ev,"close",0),bh(i),e}function Qf(t,n){"writable"!==t.ke?nh(t):th(t,n)}function th(t,n){var i=t.Ev;t.ke="erroring",t.vv=n;var e=t.So;void 0!==e&&hh(e,n),!1===function(t){if(void 0===t.Rv&&void 0===t.Dv)return!1;return!0}(t)&&!0===i.Mv&&nh(t)}function nh(t){t.ke="errored",t.Ev[Vf]();var n=t.vv;if(t.Iv.forEach(function(t){t.Gu(n)}),t.Iv=new wf,void 0!==t.Cv){var i=t.Cv;if(t.Cv=void 0,!0===i.Lv)return i.Gu(n),void eh(t);cf(t.Ev[Hf](i.Bv),function(){i.Wu(),eh(t)},function(n){i.Gu(n),eh(t)})}else eh(t)}function ih(t){return void 0!==t.Nv||void 0!==t.Dv}function eh(t){void 0!==t.Nv&&(t.Nv.Gu(t.vv),t.Nv=void 0);var n=t.So;void 0!==n&&Ih(n,t.vv)}function rh(t,n){var i=t.So;void 0!==i&&n!==t.Pv&&(!0===n?function(t){kh(t)}(i):Ah(i)),t.Pv=n}var oh=function(){function t(t){if(!1===Kf(t))throw new h("WritableStreamDefaultWriter can only be constructed with a WritableStream instance");if(!0===$f(t))throw new h("This stream has already been locked for exclusive writing by another writer");this.xv=t,t.So=this;var n,i=t.ke;if("writable"===i)!1===ih(t)&&!0===t.Pv?kh(this):Nh(this),Th(this);else if("erroring"===i)Oh(this,t.vv),Th(this);else if("closed"===i)Nh(this),Th(n=this),Rh(n);else{var e=t.vv;Oh(this,e),Eh(this,e)}}return c.defineProperty(t.prototype,"closed",{get:function(){return!1===uh(this)?ff(_h("closed")):this.Ua},enumerable:!0,configurable:!0}),c.defineProperty(t.prototype,"desiredSize",{get:function(){if(!1===uh(this))throw _h("desiredSize");if(void 0===this.xv)throw Sh("desiredSize");return function(t){var n=t.xv,i=n.ke;if("errored"===i||"erroring"===i)return null;if("closed"===i)return 0;return wh(n.Ev)}(this)},enumerable:!0,configurable:!0}),c.defineProperty(t.prototype,"ready",{get:function(){return!1===uh(this)?ff(_h("ready")):this.Uv},enumerable:!0,configurable:!0}),t.prototype.abort=function(t){return!1===uh(this)?ff(_h("abort")):void 0===this.xv?ff(Sh("abort")):function(t,n){return Jf(t.xv,n)}(this,t)},t.prototype.close=function(){if(!1===uh(this))return ff(_h("close"));var t=this.xv;return void 0===t?ff(Sh("close")):!0===ih(t)?ff(new h("Cannot close an already-closing stream")):sh(this)},t.prototype.releaseLock=function(){if(!1===uh(this))throw _h("releaseLock");void 0!==this.xv&&ch(this)},t.prototype.write=function(t){return!1===uh(this)?ff(_h("write")):void 0===this.xv?ff(Sh("write to")):ah(this,t)},t}();function uh(t){return!!Vs(t)&&!!c.prototype.hasOwnProperty.call(t,"xv")}function sh(t){return Zf(t.xv)}function fh(t,n){"pending"===t.Fv?Ih(t,n):function(t,n){Eh(t,n)}(t,n)}function hh(t,n){"pending"===t.Hv?Ph(t,n):function(t,n){Oh(t,n)}(t,n)}function ch(t){var n=t.xv,i=new h("Writer was released and can no longer be used to monitor the stream's closedness");hh(t,i),fh(t,i),n.So=void 0,t.xv=void 0}function ah(t,n){var i=t.xv,e=i.Ev,r=function(t,n){try{return t.Vv(n)}catch(n){return gh(t,n),1}}(e,n);if(i!==t.xv)return ff(Sh("write to"));var o=i.ke;if("errored"===o)return ff(i.vv);if(!0===ih(i)||"closed"===o)return ff(new h("The stream is closing or closed and cannot be written to"));if("erroring"===o)return ff(i.vv);var u=function(t){return uf(function(n,i){var e={Wu:n,Gu:i};t.Iv.push(e)})}(i);return function(t,n,i){var e={chunk:n};try{qf(t,e,i)}catch(n){return void gh(t,n)}var r=t.Xv;if(!1===ih(r)&&"writable"===r.ke){var o=mh(t);rh(r,o)}bh(t)}(e,n,r),u}var vh=function(){function t(){throw new h("WritableStreamDefaultController cannot be constructed explicitly")}return t.prototype.error=function(t){if(!1===function(t){if(!Vs(t))return!1;if(!c.prototype.hasOwnProperty.call(t,"Xv"))return!1;return!0}(this))throw new h("WritableStreamDefaultController.prototype.error can only be used on a WritableStreamDefaultController");"writable"===this.Xv.ke&&ph(this,t)},t.prototype[Hf]=function(t){var n=this.zv(t);return lh(this),n},t.prototype[Vf]=function(){jf(this)},t}();function dh(t,n,i,e,r,o,u,s){n.Xv=t,t.Ev=n,n.Tv=void 0,n.Sv=void 0,jf(n),n.Mv=!1,n.Vv=s,n.qv=u,n.Wv=e,n.Gv=r,n.zv=o;var f=mh(n);rh(t,f),cf(sf(i()),function(){n.Mv=!0,bh(n)},function(i){n.Mv=!0,Qf(t,i)})}function lh(t){t.Wv=void 0,t.Gv=void 0,t.zv=void 0,t.Vv=void 0}function wh(t){return t.qv-t.Sv}function bh(t){var n=t.Xv;if(!1!==t.Mv&&void 0===n.Rv)if("erroring"!==n.ke){if(0!==t.Tv.length){var i=t.Tv.peek().value;"close"===i?function(t){var n=t.Xv;(function(t){t.Dv=t.Nv,t.Nv=void 0})(n),Wf(t);var i=t.Gv();lh(t),cf(i,function(){!function(t){t.Dv.Wu(void 0),t.Dv=void 0,"erroring"===t.ke&&(t.vv=void 0,void 0!==t.Cv&&(t.Cv.Wu(),t.Cv=void 0)),t.ke="closed";var n=t.So;void 0!==n&&Rh(n)}(n)},function(t){!function(t,n){t.Dv.Gu(n),t.Dv=void 0,void 0!==t.Cv&&(t.Cv.Gu(n),t.Cv=void 0),Qf(t,n)}(n,t)})}(t):function(t,n){var i=t.Xv;(function(t){t.Rv=t.Iv.shift()})(i),cf(t.Wv(n),function(){!function(t){t.Rv.Wu(void 0),t.Rv=void 0}(i);var n=i.ke;if(Wf(t),!1===ih(i)&&"writable"===n){var e=mh(t);rh(i,e)}bh(t)},function(n){"writable"===i.ke&&lh(t),function(t,n){t.Rv.Gu(n),t.Rv=void 0,Qf(t,n)}(i,n)})}(t,i.chunk)}}else nh(n)}function gh(t,n){"writable"===t.Xv.ke&&ph(t,n)}function mh(t){return wh(t)<=0}function ph(t,n){var i=t.Xv;lh(t),th(i,n)}function yh(t){return new h("WritableStream.prototype."+t+" can only be used on a WritableStream")}function _h(t){return new h("WritableStreamDefaultWriter.prototype."+t+" can only be used on a WritableStreamDefaultWriter")}function Sh(t){return new h("Cannot "+t+" a stream using a released writer")}function Th(t){t.Ua=uf(function(n,i){t._v=n,t.wv=i,t.Fv="pending"})}function Eh(t,n){Th(t),Ih(t,n)}function Ih(t,n){lf(t.Ua),t.wv(n),t._v=void 0,t.wv=void 0,t.Fv="rejected"}function Rh(t){t._v(void 0),t._v=void 0,t.wv=void 0,t.Fv="resolved"}function kh(t){t.Uv=uf(function(n,i){t.Yv=n,t.Qv=i}),t.Hv="pending"}function Oh(t,n){kh(t),Ph(t,n)}function Nh(t){kh(t),Ah(t)}function Ph(t,n){lf(t.Uv),t.Qv(n),t.Yv=void 0,t.Qv=void 0,t.Hv="rejected"}function Ah(t){t.Yv(void 0),t.Yv=void 0,t.Qv=void 0,t.Hv="fulfilled"}function Dh(t){if("object"!=typeof t||null===t)return!1;try{return"boolean"==typeof t.aborted}catch(t){return!1}}var xh="undefined"!=typeof DOMException?DOMException:void 0;var Ch,Bh=function(t){if("function"!=typeof t&&"object"!=typeof t)return!1;try{return new t,!0}catch(t){return!1}}(xh)?xh:((Ch=function(t,n){this.message=t||"",this.name=n||"Error",f.captureStackTrace&&f.captureStackTrace(this,this.constructor)}).prototype=c.create(f.prototype),c.defineProperty(Ch.prototype,"constructor",{value:Ch,writable:!0,configurable:!0}),Ch);function Lh(t,n,i,e,r,o){var u=kf(t),s=Gf(n);t.mv=!0;var f=!1,c=sf(void 0);return uf(function(a,v){var d,l,w,b;if(void 0!==o){if(d=function(){var i=new Bh("Aborted","AbortError"),o=[];!1===e&&o.push(function(){return"writable"===n.ke?Jf(n,i):sf(void 0)}),!1===r&&o.push(function(){return"readable"===t.ke?Oc(t,i):sf(void 0)}),y(function(){return j.all(o.map(function(t){return t()}))},!0,i)},!0===o.aborted)return void d();o.addEventListener("abort",d)}if(p(t,u.Ua,function(t){!1===e?y(function(){return Jf(n,t)},!0,t):_(!0,t)}),p(n,s.Ua,function(n){!1===r?y(function(){return Oc(t,n)},!0,n):_(!0,n)}),l=t,w=u.Ua,b=function(){!1===i?y(function(){return function(t){var n=t.xv,i=n.ke;return!0===ih(n)||"closed"===i?sf(void 0):"errored"===i?ff(n.vv):sh(t)}(s)}):_()},"closed"===l.ke?b():af(w,b),!0===ih(n)||"closed"===n.ke){var g=new h("the destination writable stream closed before all data could be piped to it");!1===r?y(function(){return Oc(t,g)},!0,g):_(!0,g)}function m(){var t=c;return hf(c,function(){return t!==c?m():void 0})}function p(t,n,i){"errored"===t.ke?i(t.vv):vf(n,i)}function y(t,i,e){function r(){cf(t(),function(){return S(i,e)},function(t){return S(!0,t)})}!0!==f&&(f=!0,"writable"===n.ke&&!1===ih(n)?af(m(),r):r())}function _(t,i){!0!==f&&(f=!0,"writable"===n.ke&&!1===ih(n)?af(m(),function(){return S(t,i)}):S(t,i))}function S(t,n){ch(s),pf(u),void 0!==o&&o.removeEventListener("abort",d),t?v(n):a(void 0)}lf(uf(function(t,n){!function i(e){e?t():hf(!0===f?sf(!0):hf(s.Uv,function(){return hf(Lf(u),function(t){return!0===t.done||(c=hf(ah(s,t.value),void 0,qs),!1)})}),i,n)}(!1)}))})}var Uh=function(){function t(){throw new h}return c.defineProperty(t.prototype,"desiredSize",{get:function(){if(!1===Fh(this))throw Yh("desiredSize");return Vh(this)},enumerable:!0,configurable:!0}),t.prototype.close=function(){if(!1===Fh(this))throw Yh("close");if(!1===Xh(this))throw new h("The stream is not in a state that permits close");qh(this)},t.prototype.enqueue=function(t){if(!1===Fh(this))throw Yh("enqueue");if(!1===Xh(this))throw new h("The stream is not in a state that permits enqueue");return jh(this,t)},t.prototype.error=function(t){if(!1===Fh(this))throw Yh("error");Hh(this,t)},t.prototype[If]=function(t){jf(this);var n=this.Kv(t);return Wh(this),n},t.prototype[Rf]=function(){var t=this.Zv;if(this.Tv.length>0){var n=Wf(this);return!0===this.Jv&&0===this.Tv.length?(Wh(this),Nc(t)):Mh(this),sf(bf(n,!1,t.fv.ov))}var i=Of(t);return Mh(this),i},t}();function Fh(t){return!!Vs(t)&&!!c.prototype.hasOwnProperty.call(t,"Zv")}function Mh(t){!1!==zh(t)&&(!0!==t.$v?(t.$v=!0,cf(t.td(),function(){t.$v=!1,!0===t.ed&&(t.ed=!1,Mh(t))},function(n){Hh(t,n)})):t.ed=!0)}function zh(t){var n=t.Zv;return!1!==Xh(t)&&(!1!==t.Mv&&(!0===kc(n)&&Pf(n)>0||Vh(t)>0))}function Wh(t){t.td=void 0,t.Kv=void 0,t.Vv=void 0}function qh(t){var n=t.Zv;t.Jv=!0,0===t.Tv.length&&(Wh(t),Nc(n))}function jh(t,n){var i=t.Zv;if(!0===kc(i)&&Pf(i)>0)Nf(i,n,!1);else{var e=void 0;try{e=t.Vv(n)}catch(n){throw Hh(t,n),n}try{qf(t,n,e)}catch(n){throw Hh(t,n),n}}Mh(t)}function Hh(t,n){var i=t.Zv;"readable"===i.ke&&(jf(t),Wh(t),Pc(i,n))}function Vh(t){var n=t.Zv.ke;return"errored"===n?null:"closed"===n?0:t.qv-t.Sv}function Xh(t){var n=t.Zv.ke;return!1===t.Jv&&"readable"===n}function Gh(t,n,i,e,r,o,u){n.Zv=t,n.Tv=void 0,n.Sv=void 0,jf(n),n.Mv=!1,n.Jv=!1,n.ed=!1,n.$v=!1,n.Vv=u,n.qv=o,n.td=e,n.Kv=r,t.pv=n,cf(sf(i()),function(){n.Mv=!0,Mh(n)},function(t){Hh(n,t)})}function Yh(t){return new h("ReadableStreamDefaultController.prototype."+t+" can only be used on a ReadableStreamDefaultController")}var Kh=Number.isInteger||function(t){return"number"==typeof t&&isFinite(t)&&a.floor(t)===t},$h=function(){function t(){throw new h("ReadableStreamBYOBRequest cannot be used directly")}return c.defineProperty(t.prototype,"view",{get:function(){if(!1===Qh(this))throw wc("view");return this.rd},enumerable:!0,configurable:!0}),t.prototype.respond=function(t){if(!1===Qh(this))throw wc("respond");if(void 0===this.ud)throw new h("This BYOB request has been invalidated");this.rd.buffer,function(t,n){if(!1===Gs(n=Number(n)))throw new RangeError("bytesWritten must be a finite");hc(t,n)}(this.ud,t)},t.prototype.respondWithNewView=function(t){if(!1===Qh(this))throw wc("respond");if(void 0===this.ud)throw new h("This BYOB request has been invalidated");if(!ArrayBuffer.isView(t))throw new h("You can only respond with array buffer views");t.buffer,function(t,n){var i=t.od.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,hc(t,n.byteLength)}(this.ud,t)},t}(),Jh=function(){function t(){throw new h("ReadableByteStreamController constructor cannot be used directly")}return c.defineProperty(t.prototype,"byobRequest",{get:function(){if(!1===Zh(this))throw bc("byobRequest");if(void 0===this.hd&&this.od.length>0){var t=this.od.peek(),n=new w(t.buffer,t.byteOffset+t.bytesFilled,t.byteLength-t.bytesFilled),i=c.create($h.prototype);!function(t,n,i){t.ud=n,t.rd=i}(i,this,n),this.hd=i}return this.hd},enumerable:!0,configurable:!0}),c.defineProperty(t.prototype,"desiredSize",{get:function(){if(!1===Zh(this))throw bc("desiredSize");return dc(this)},enumerable:!0,configurable:!0}),t.prototype.close=function(){if(!1===Zh(this))throw bc("close");if(!0===this.Jv)throw new h("The stream has already been closed; do not close it again!");var t=this.fd.ke;if("readable"!==t)throw new h("The stream (in "+t+" state) is not in the readable state and cannot be closed");!function(t){var n=t.fd;if(t.Sv>0)return void(t.Jv=!0);if(t.od.length>0){var i=t.od.peek();if(i.bytesFilled>0){var e=new h("Insufficient bytes to fill elements in the given buffer");throw vc(t,e),e}}ac(t),Nc(n)}(this)},t.prototype.enqueue=function(t){if(!1===Zh(this))throw bc("enqueue");if(!0===this.Jv)throw new h("stream is closed or draining");var n=this.fd.ke;if("readable"!==n)throw new h("The stream (in "+n+" state) is not in the readable state and cannot be enqueued to");if(!ArrayBuffer.isView(t))throw new h("You can only enqueue array buffer views when using a ReadableByteStreamController");t.buffer,function(t,n){var i=t.fd,e=n.buffer,r=n.byteOffset,o=n.byteLength,u=Zs(e);if(!0===Af(i))if(0===Pf(i))ec(t,u,r,o);else{var s=new w(u,r,o);Nf(i,s,!1)}else!0===pc(i)?(ec(t,u,r,o),fc(t)):ec(t,u,r,o);tc(t)}(this,t)},t.prototype.error=function(t){if(!1===Zh(this))throw bc("error");vc(this,t)},t.prototype[If]=function(t){this.od.length>0&&(this.od.peek().bytesFilled=0);jf(this);var n=this.Kv(t);return ac(this),n},t.prototype[Rf]=function(){var t=this.fd;if(this.Sv>0){var n=this.Tv.shift();this.Sv-=n.byteLength,uc(this);var i=void 0;try{i=new w(n.buffer,n.byteOffset,n.byteLength)}catch(t){return ff(t)}return sf(bf(i,!1,t.fv.ov))}var e=this.vd;if(void 0!==e){var r=void 0;try{r=new ArrayBuffer(e)}catch(t){return ff(t)}var o={buffer:r,byteOffset:0,byteLength:e,bytesFilled:0,elementSize:1,ctor:w,readerType:"default"};this.od.push(o)}var u=Of(t);return tc(this),u},t}();function Zh(t){return!!Vs(t)&&!!c.prototype.hasOwnProperty.call(t,"fd")}function Qh(t){return!!Vs(t)&&!!c.prototype.hasOwnProperty.call(t,"ud")}function tc(t){!1!==function(t){var n=t.fd;if("readable"!==n.ke)return!1;if(!0===t.Jv)return!1;if(!1===t.Mv)return!1;if(!0===Af(n)&&Pf(n)>0)return!0;if(!0===pc(n)&&mc(n)>0)return!0;if(dc(t)>0)return!0;return!1}(t)&&(!0!==t.$v?(t.$v=!0,cf(t.td(),function(){t.$v=!1,!0===t.ed&&(t.ed=!1,tc(t))},function(n){vc(t,n)})):t.ed=!0)}function nc(t,n){var i=!1;"closed"===t.ke&&(i=!0);var e=ic(n);"default"===n.readerType?Nf(t,e,i):function(t,n,i){var e=t.fv;e.dd.shift().Wu(bf(n,i,e.ov))}(t,e,i)}function ic(t){var n=t.bytesFilled,i=t.elementSize;return new t.ctor(t.buffer,t.byteOffset,n/i)}function ec(t,n,i,e){t.Tv.push({buffer:n,byteOffset:i,byteLength:e}),t.Sv+=e}function rc(t,n){var i=n.elementSize,e=n.bytesFilled-n.bytesFilled%i,r=a.min(t.Sv,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,c,v,d,l,b=t.Tv;s>0;){var g=b.peek(),m=a.min(s,g.byteLength),p=n.byteOffset+n.bytesFilled;h=n.buffer,c=p,v=g.buffer,d=g.byteOffset,l=m,new w(h).set(new w(v,d,l),c),g.byteLength===m?b.shift():(g.byteOffset+=m,g.byteLength-=m),t.Sv-=m,oc(t,m,n),s-=m}return f}function oc(t,n,i){sc(t),i.bytesFilled+=n}function uc(t){0===t.Sv&&!0===t.Jv?(ac(t),Nc(t.fd)):tc(t)}function sc(t){void 0!==t.hd&&(t.hd.ud=void 0,t.hd.rd=void 0,t.hd=void 0)}function fc(t){for(;t.od.length>0;){if(0===t.Sv)return;var n=t.od.peek();!0===rc(t,n)&&(cc(t),nc(t.fd,n))}}function hc(t,n){var i=t.od.peek();if("closed"===t.fd.ke){if(0!==n)throw new h("bytesWritten must be 0 when calling respond() on a closed stream");!function(t,n){n.buffer=Zs(n.buffer);var i=t.fd;if(!0===pc(i))for(;mc(i)>0;)nc(i,cc(t))}(t,i)}else!function(t,n,i){if(i.bytesFilled+n>i.byteLength)throw new RangeError("bytesWritten out of range");if(oc(t,n,i),!(i.bytesFilled<i.elementSize)){cc(t);var e=i.bytesFilled%i.elementSize;if(e>0){var r=i.byteOffset+i.bytesFilled,o=i.buffer.slice(r-e,r);ec(t,o,0,o.byteLength)}i.buffer=Zs(i.buffer),i.bytesFilled-=e,nc(t.fd,i),fc(t)}}(t,n,i);tc(t)}function cc(t){var n=t.od.shift();return sc(t),n}function ac(t){t.td=void 0,t.Kv=void 0}function vc(t,n){var i=t.fd;"readable"===i.ke&&(!function(t){sc(t),t.od=new wf}(t),jf(t),ac(t),Pc(i,n))}function dc(t){var n=t.fd.ke;return"errored"===n?null:"closed"===n?0:t.qv-t.Sv}function lc(t,n,i){var e=c.create(Jh.prototype);var r=Ks(n,"pull",0,[e]),o=Ks(n,"cancel",1,[]),u=n.autoAllocateChunkSize;if(void 0!==u&&(u=Number(u),!1===Kh(u)||u<=0))throw new RangeError("autoAllocateChunkSize must be a positive integer");!function(t,n,i,e,r,o,u){n.fd=t,n.ed=!1,n.$v=!1,n.hd=void 0,n.Tv=n.Sv=void 0,jf(n),n.Jv=!1,n.Mv=!1,n.qv=Qs(o),n.td=e,n.Kv=r,n.vd=u,n.od=new wf,t.pv=n,cf(sf(i()),function(){n.Mv=!0,tc(n)},function(t){vc(n,t)})}(t,e,function(){return $s(n,"start",[e])},r,o,i,u)}function wc(t){return new h("ReadableStreamBYOBRequest.prototype."+t+" can only be used on a ReadableStreamBYOBRequest")}function bc(t){return new h("ReadableByteStreamController.prototype."+t+" can only be used on a ReadableByteStreamController")}function gc(t){return uf(function(n,i){var e={Wu:n,Gu:i};t.fv.dd.push(e)})}function mc(t){return t.fv.dd.length}function pc(t){var n=t.fv;return void 0!==n&&!!_c(n)}var yc=function(){function t(t){if(!Rc(t))throw new h("ReadableStreamBYOBReader can only be constructed with a ReadableStream instance given a byte source");if(!1===Zh(t.pv))throw new h("Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte source");if(kc(t))throw new h("This stream has already been locked for exclusive reading by another reader");gf(this,t),this.dd=new wf}return c.defineProperty(t.prototype,"closed",{get:function(){return _c(this)?this.Ua:ff(Sc("closed"))},enumerable:!0,configurable:!0}),t.prototype.cancel=function(t){return _c(this)?void 0===this.hv?ff(yf("cancel")):mf(this,t):ff(Sc("cancel"))},t.prototype.read=function(t){return _c(this)?void 0===this.hv?ff(yf("read from")):ArrayBuffer.isView(t)?(t.buffer,0===t.byteLength?ff(new h("view must have non-zero byteLength")):function(t,n){var i=t.hv;if(i.mv=!0,"errored"===i.ke)return ff(i.vv);return function(t,n){var i=t.fd,e=1;n.constructor!==DataView&&(e=n.constructor.BYTES_PER_ELEMENT);var r=n.constructor,o={buffer:Zs(n.buffer),byteOffset:n.byteOffset,byteLength:n.byteLength,bytesFilled:0,elementSize:e,ctor:r,readerType:"byob"};if(t.od.length>0)return t.od.push(o),gc(i);if("closed"===i.ke)return sf(bf(new r(o.buffer,o.byteOffset,0),!0,i.fv.ov));if(t.Sv>0){if(!0===rc(t,o)){var u=ic(o);return uc(t),sf(bf(u,!1,i.fv.ov))}if(!0===t.Jv){var s=new h("Insufficient bytes to fill elements in the given buffer");return vc(t,s),ff(s)}}t.od.push(o);var f=gc(i);return tc(t),f}(i.pv,n)}(this,t)):ff(new h("view must be an array buffer view")):ff(Sc("read"))},t.prototype.releaseLock=function(){if(!_c(this))throw Sc("releaseLock");if(void 0!==this.hv){if(this.dd.length>0)throw new h("Tried to release a reader lock when that reader has pending read() calls un-settled");pf(this)}},t}();function _c(t){return!!Vs(t)&&!!c.prototype.hasOwnProperty.call(t,"dd")}function Sc(t){return new h("ReadableStreamBYOBReader.prototype."+t+" can only be used on a ReadableStreamBYOBReader")}var Tc=function(){function t(t,n){void 0===t&&(t={}),void 0===n&&(n={}),Ic(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),lc(this,t,e=Qs(e))}else{if(void 0!==r)throw new RangeError("Invalid type is specified");var o=tf(i);void 0===e&&(e=1),function(t,n,i,e){var r=c.create(Uh.prototype),o=Ks(n,"pull",0,[r]),u=Ks(n,"cancel",1,[]);Gh(t,r,function(){return $s(n,"start",[r])},o,u,i,e)}(this,t,e=Qs(e),o)}}return c.defineProperty(t.prototype,"locked",{get:function(){if(!1===Rc(this))throw Ac("locked");return kc(this)},enumerable:!0,configurable:!0}),t.prototype.cancel=function(t){return!1===Rc(this)?ff(Ac("cancel")):!0===kc(this)?ff(new h("Cannot cancel a stream that already has a reader")):Oc(this,t)},t.prototype.getReader=function(t){var n=(void 0===t?{}:t).mode;if(!1===Rc(this))throw Ac("getReader");if(void 0===n)return kf(this,!0);if("byob"===(n=String(n)))return function(t,n){void 0===n&&(n=!1);var i=new yc(t);return i.ov=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===Rc(this))throw Ac("pipeThrough");if(!1===Kf(i))throw new h("writable argument to pipeThrough must be a WritableStream");if(!1===Rc(e))throw new h("readable argument to pipeThrough must be a ReadableStream");if(o=Boolean(o),u=Boolean(u),s=Boolean(s),void 0!==f&&!Dh(f))throw new h("ReadableStream.prototype.pipeThrough's signal option must be an AbortSignal");if(!0===kc(this))throw new h("ReadableStream.prototype.pipeThrough cannot be used on a locked ReadableStream");if(!0===$f(i))throw new h("ReadableStream.prototype.pipeThrough cannot be used on a locked WritableStream");return lf(Lh(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===Rc(this)?ff(Ac("pipeTo")):!1===Kf(t)?ff(new h("ReadableStream.prototype.pipeTo's first argument must be a WritableStream")):(e=Boolean(e),r=Boolean(r),o=Boolean(o),void 0===u||Dh(u)?!0===kc(this)?ff(new h("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream")):!0===$f(t)?ff(new h("ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream")):Lh(this,t,e,r,o,u):ff(new h("ReadableStream.prototype.pipeTo's signal option must be an AbortSignal")))},t.prototype.tee=function(){if(!1===Rc(this))throw Ac("tee");var t=function(t,n){var i,e,r,o,u,s=kf(t),f=!1,h=!1,c=!1,a=uf(function(t){u=t});function v(){return!0===f?sf(void 0):(f=!0,lf(df(Lf(s),function(t){if(f=!1,!0===t.done)return!1===h&&qh(r.pv),void(!1===c&&qh(o.pv));var n=t.value,i=n,e=n;!1===h&&jh(r.pv,i),!1===c&&jh(o.pv,e)})),sf(void 0))}function d(){}return r=Ec(d,v,function(n){if(h=!0,i=n,!0===c){var r=Xs([i,e]),o=Oc(t,r);u(o)}return a}),o=Ec(d,v,function(n){if(c=!0,e=n,!0===h){var r=Xs([i,e]),o=Oc(t,r);u(o)}return a}),vf(s.Ua,function(t){Hh(r.pv,t),Hh(o.pv,t)}),[r,o]}(this);return Xs(t)},t.prototype.getIterator=function(t){var n=(void 0===t?{}:t).preventCancel,i=void 0!==n&&n;if(!1===Rc(this))throw Ac("getIterator");return function(t,n){void 0===n&&(n=!1);var i=kf(t),e=c.create(Ff);return e.bv=i,e.Av=Boolean(n),e}(this,i)},t}();function Ec(t,n,i,e,r){void 0===e&&(e=1),void 0===r&&(r=function(){return 1});var o=c.create(Tc.prototype);return Ic(o),Gh(o,c.create(Uh.prototype),t,n,i,e,r),o}function Ic(t){t.ke="readable",t.fv=void 0,t.vv=void 0,t.mv=!1}function Rc(t){return!!Vs(t)&&!!c.prototype.hasOwnProperty.call(t,"pv")}function kc(t){return void 0!==t.fv}function Oc(t,n){return t.mv=!0,"closed"===t.ke?sf(void 0):"errored"===t.ke?ff(t.vv):(Nc(t),df(t.pv[If](n),qs))}function Nc(t){t.ke="closed";var n=t.fv;void 0!==n&&(Bf(n)&&(n.yv.forEach(function(t){t.Wu(bf(void 0,!0,n.ov))}),n.yv=new wf),Ef(n))}function Pc(t,n){t.ke="errored",t.vv=n;var i=t.fv;void 0!==i&&(Bf(i)?(i.yv.forEach(function(t){t.Gu(n)}),i.yv=new wf):(i.dd.forEach(function(t){t.Gu(n)}),i.dd=new wf),Tf(i,n))}function Ac(t){return new h("ReadableStream.prototype."+t+" can only be used on a ReadableStream")}"symbol"==typeof Ws.asyncIterator&&c.defineProperty(Tc.prototype,Ws.asyncIterator,{value:Tc.prototype.getIterator,enumerable:!1,writable:!0,configurable:!0});var Dc=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=tf(e);if(void 0===r&&(r=1),r=Qs(r),void 0!==t.readableType)throw new RangeError("Invalid readable type specified");var f,a=tf(o);void 0===u&&(u=0),u=Qs(u),function(t,n,i,e,r,o){function u(){return n}t.ld=function(t,n,i,e,r,o){void 0===r&&(r=1),void 0===o&&(o=function(){return 1});var u=c.create(Xf.prototype);return Yf(u),dh(u,c.create(vh.prototype),t,n,i,e,r,o),u}(u,function(n){return function(t,n){var i=t._d;if(!0===t.Pv){var e=t.wd;return df(e,function(){var e=t.ld,r=e.ke;if("erroring"===r)throw e.vv;return qc(i,n)})}return qc(i,n)}(t,n)},function(){return function(t){var n=t.kd,i=t._d,e=i.yd();return zc(i),df(e,function(){if("errored"===n.ke)throw n.vv;var t=n.pv;!0===Xh(t)&&qh(t)},function(i){throw Cc(t,i),n.vv})}(t)},function(n){return function(t,n){return Cc(t,n),sf(void 0)}(t,n)},i,e),t.kd=Ec(u,function(){return function(t){return Lc(t,!1),t.wd}(t)},function(n){return Bc(t,n),sf(void 0)},r,o),t.Pv=void 0,t.wd=void 0,t.md=void 0,Lc(t,!0),t._d=void 0}(this,uf(function(t){f=t}),r,s,u,a),function(t,n){var i=c.create(Fc.prototype),e=function(t){try{return Wc(i,t),sf(void 0)}catch(t){return ff(t)}},r=n.transform;if(void 0!==r){if("function"!=typeof r)throw new h("transform is not a method");e=function(t){return Js(r,n,[t,i])}}var o=Ks(n,"flush",0,[i]);!function(t,n,i,e){n.pd=t,t._d=n,n.bd=i,n.yd=e}(t,i,e,o)}(this,t);var v=$s(t,"start",[this._d]);f(v)}return c.defineProperty(t.prototype,"readable",{get:function(){if(!1===xc(this))throw Hc("readable");return this.kd},enumerable:!0,configurable:!0}),c.defineProperty(t.prototype,"writable",{get:function(){if(!1===xc(this))throw Hc("writable");return this.ld},enumerable:!0,configurable:!0}),t}();function xc(t){return!!Vs(t)&&!!c.prototype.hasOwnProperty.call(t,"_d")}function Cc(t,n){Hh(t.kd.pv,n),Bc(t,n)}function Bc(t,n){zc(t._d),gh(t.ld.Ev,n),!0===t.Pv&&Lc(t,!1)}function Lc(t,n){void 0!==t.wd&&t.md(),t.wd=uf(function(n){t.md=n}),t.Pv=n}var Uc,Fc=function(){function t(){throw new h("TransformStreamDefaultController instances cannot be created directly")}return c.defineProperty(t.prototype,"desiredSize",{get:function(){if(!1===Mc(this))throw jc("desiredSize");return Vh(this.pd.kd.pv)},enumerable:!0,configurable:!0}),t.prototype.enqueue=function(t){if(!1===Mc(this))throw jc("enqueue");Wc(this,t)},t.prototype.error=function(t){if(!1===Mc(this))throw jc("error");var n;n=t,Cc(this.pd,n)},t.prototype.terminate=function(){if(!1===Mc(this))throw jc("terminate");!function(t){var n=t.pd,i=n.kd.pv;!0===Xh(i)&&qh(i);var e=new h("TransformStream terminated");Bc(n,e)}(this)},t}();function Mc(t){return!!Vs(t)&&!!c.prototype.hasOwnProperty.call(t,"pd")}function zc(t){t.bd=void 0,t.yd=void 0}function Wc(t,n){var i=t.pd,e=i.kd.pv;if(!1===Xh(e))throw new h("Readable side is not in a state that permits enqueue");try{jh(e,n)}catch(t){throw Bc(i,t),i.kd.vv}(function(t){return!0!==zh(t)})(e)!==i.Pv&&Lc(i,!0)}function qc(t,n){return df(t.bd(n),void 0,function(n){throw Cc(t.pd,n),n})}function jc(t){return new h("TransformStreamDefaultController.prototype."+t+" can only be used on a TransformStreamDefaultController")}function Hc(t){return new h("TransformStream.prototype."+t+" can only be used on a TransformStream")}function Vc(t){return n=[t],new Tc({start:function(t){for(var i=0;i<n.length;i++){var e=n[i];t.enqueue(e)}t.close()}});var n}function Xc(t){return Vc(new w(t))}function Gc(t,n){return function(t,n){var i=n,e=t.getReader(),r=new zo,o=function(){u();var t=new qt;e.cancel(t).catch(at),r.ju(t)},u=function(){i&&(i.Fs(o),i=void 0)};i&&(i.Ps?o():i.Us(o));var s=[];return j.resolve(e.read()).then(function t(n){return n.done?(u(),j.resolve(s)):(s.push(n.value),j.resolve(e.read()).then(t))}).then(function(t){u(),r.Yu(t)},function(t){u(),r.ju(t)}),r.Xu}(t,n).then(function(t){return Tn(t).buffer})}function Yc(t,n){var i=n,e=new Dc,r=e.readable,o=e.writable,u=o.getWriter(),s=function(){i&&i.zs()};return u.closed.then(s,s),t.then(function(t){return i=void 0,u.releaseLock(),t.pipeTo(o).catch(at)},function(t){return i=void 0,u.releaseLock(),o.abort(t).catch(at)}),r}function Kc(t){return zn(new w(t))}function $c(t){return Wn(t).buffer}!function(t){t[t.Qf=0]="Qf",t[t.Td=1]="Td"}(Uc||(Uc={}));var Jc="content-type",Zc="text/plain;charset=UTF-8",Qc=function(){function t(){}var n=t.prototype;return n.Sd=function(t){return this.Ed(t).then(JSON.parse)},n.Id=function(t,n){switch(t){case Us.Yf:return this.Rd(n);case Us.jf:return this.Sd(n);case Us.Qf:return this.Nd();case Us.Jn:return this.Ed(n);default:throw new h}},t}();function ta(t,n,i){if(t instanceof Qc)return t;if(t instanceof Tc)return function(t,n){return new ia({ds:Uc.Qf,Nd:t,Dd:na(n)})}(t,i);var e=na(i),r=j.resolve(t).then(function(t){return function(t,n){if(t){if("string"==typeof t)return{ds:Us.Jn,Cd:t,Dd:n||Zc};if(t instanceof ArrayBuffer||Sn(t))return{ds:Us.Yf,Cd:ha(t),Dd:n};if(et(i=t)&&i.constructor&&i.constructor===c||it(t))return{ds:Us.jf,Cd:t,Dd:n};throw new h("Unsupported BodyInit type")}return{ds:Us.Jn,Cd:null,Dd:n};var i}(t,e)});return new ia({ds:Uc.Td,Xu:r,Pd:n})}function na(t){return(t.get(Jc)||"").toLowerCase()}var ia=function(t){function n(n){var i;return(i=t.call(this)||this).Od=!1,i.Bd=void 0,i.Ld=new zo,i.Ld.Xu.catch(at),i.Md(n),i}Bt(n,t);var i=n.prototype;return i.xd=function(){return this.Ld.Xu},i.Ed=function(t){return this.Ud(ea,t)},i.Sd=function(t){return this.Ud(oa,t)},i.Rd=function(t){return this.Ud(sa,t)},i.Nd=function(){return this.Fd((t=this.Bd).ds===Uc.Qf?t.Nd:Yc(t.Xu.then(fa).then(Xc),t.Pd));var t},i.Ud=function(t,n){if(this.Od)return j.reject(new h("Already used"));this.Od=!0;var i=t(this.Bd,n);return this.Ld.Yu(i.then(at)),i},i.Fd=function(t){if(this.Od)throw new h("Already used");if(t.locked)throw new h("Body stream is locked");this.Od=!0;var n=new Dc,i=j.resolve(t.pipeTo(n.writable));return this.Ld.Yu(i),n.readable},i.Md=function(t){this.Bd=t,t.ds===Uc.Td&&t.Xu.catch(at)},i.Hd=function(){if(this.Od)throw new h("Already used");var t=function(t){if(t.ds===Uc.Qf){var n=t.Nd.tee(),i=n[0],e=n[1];return[{ds:t.ds,Nd:i,Dd:t.Dd},{ds:t.ds,Nd:e,Dd:t.Dd}]}var r=t.Pd.Ws(),o=r[0],u=r[1];return[{ds:t.ds,Xu:t.Xu,Pd:o},{ds:t.ds,Xu:t.Xu,Pd:u}]}(this.Bd),i=t[0],e=t[1];return this.Md(i),new n(e)},lt(n,[{key:"Vd",get:function(){return this.Od}}]),n}(Qc);function ea(t,n){return t.ds===Uc.Qf?Gc(t.Nd,n).then(Kc):(n&&t.Pd.qs(n),Ht(t.Xu.then(ra),t.Pd))}function ra(t){switch(t.ds){case Us.Jn:return j.resolve(t.Cd||"");case Us.Yf:return j.resolve(t.Cd).then(Kc);case Us.jf:return j.resolve(t.Cd).then(JSON.stringify)}}function oa(t,n){return t.ds===Uc.Qf?ea(t,n).then(JSON.parse):(n&&t.Pd.qs(n),Ht(t.Xu.then(ua),t.Pd))}function ua(t){return t.ds===Us.jf?j.resolve(t.Cd):ra(t).then(JSON.parse)}function sa(t,n){return t.ds===Uc.Qf?Gc(t.Nd,n):(n&&t.Pd.qs(n),Ht(t.Xu.then(fa),t.Pd))}function fa(t){switch(t.ds){case Us.Yf:return j.resolve(t.Cd);case Us.Jn:case Us.jf:return ra(t).then($c)}}function ha(t){return t instanceof ArrayBuffer?t:Vn(jn(t)).buffer}function ca(t){return t.Xd>=200&&t.Xd<=299||304===t.Xd}var aa,va,da,la,wa=function(t){function n(n,i){var e,r,o,u,s,f;i?(r=i.zd,o=i.qd,u=i.Xd,s=i.Wd,f=i.Gd):(r=[],o=Us.Jn,u=200,s="OK",f=!1);var h=n.Yd,c=new Fs(n.zd||r),a=n.qd||o,v=n.jd||(i&&i.Yd===h?i.jd:h.Qd),d=i?i.Kd:null,l=ta(void 0!==n.Vi?n.Vi:d,n.Pd||new Wt,c);return(e=t.call(this,l)||this).zd=void 0,e.Yd=void 0,e.jd=void 0,e.qd=void 0,e.Xd=void 0,e.Wd=void 0,e.Gd=void 0,e.zd=c,e.Yd=h,e.jd=v,e.qd=a,e.Xd=void 0!==n.Xd?n.Xd:u,e.Wd=void 0!==n.Wd?String(n.Wd):s,e.Gd=n.Gd||f,e}Bt(n,t);var i=n.prototype;return i.Vi=function(t){return this.Id(this.qd,t)},i.Uu=function(){return new n({Vi:this.Hd(),Yd:this.Yd},this)},n}(function(t){function n(n){var i;return(i=t.call(this)||this).Kd=void 0,i.Kd=n,i}Bt(n,t);var i=n.prototype;return i.xd=function(){return this.Kd.xd()},i.Ed=function(t){return this.Kd.Ed(t)},i.Sd=function(t){return this.Kd.Sd(t)},i.Rd=function(t){return this.Kd.Rd(t)},i.Nd=function(){return this.Kd.Nd()},i.Hd=function(){return this.Kd.Hd()},lt(n,[{key:"Vd",get:function(){return this.Kd.Vd}}]),n}(Qc));!function(t){t.DELETE="DELETE",t.GET="GET",t.HEAD="HEAD",t.OPTIONS="OPTIONS",t.POST="POST",t.PUT="PUT"}(aa||(aa={})),function(t){t.Zd="",t.Jd="manifest",t.$d="segment",t.il="content-protection"}(va||(va={})),function(t){t.Zd="",t.ul="initialization-segment",t.ol="fairplay-license",t.hl="fairplay-certificate",t.al="widevine-license",t.cl="widevine-certificate",t.fl="playready-license",t.vl="clearkey-license",t.dl="aes128-key"}(da||(da={})),function(t){t.Zd="",t.ll="audio",t._l="video",t.Jn="text",t.wl="image"}(la||(la={}));var ba=function(t,n){this.Cd=void 0,this.zd=void 0,this.yl=void 0,this.qd=void 0,this.bl=void 0,this.Gs=void 0,this.ds=void 0,this.Al=void 0,this.Tl=void 0,this.Qd=void 0,this.Sl=void 0,this.El=void 0;var i,e,r,o,u,s,f,h,c,a,v,d=t.Qd;n?(i=n.Cd,e=n.zd,r=n.yl,o=n.qd,u=n.bl,s=n.Gs,f=n.ds,h=n.Al,c=n.Tl,a=n.Sl,v=n.El):(i=null,e={},r=aa.GET,o=Us.Jn,u=0,f=va.Zd,h=da.Zd,c=la.Zd,a=!1),this.Qd=d,this.Cd=t.Cd||i,this.zd=new Fs(t.zd||e),this.yl=t.yl||r,this.qd=t.qd||o,this.bl=void 0!==t.bl?Number(t.bl)||0:u,this.Gs=t.Gs||s||(new Wt).Gs,this.ds=t.ds||f,this.Al=t.Al||h,this.Tl=t.Tl||c,this.Sl=void 0!==t.Sl?Boolean(t.Sl):a,this.El=t.El||v},ga=function(){function t(){}var n=t.prototype;return n.Yd=function(t){var n=function(t){return new wa({Vi:null,zd:{},Yd:t,jd:t.Qd,qd:t.qd,Xd:0,Wd:Ls.Ef})}(new ba(t));return j.resolve(n)},n.Il=function(t){},n.Rl=function(){},t}();var ma,pa=function(){function t(t,n){void 0===n&&(n=!0),this.Nl=void 0,this.Dl=void 0,this.Nl=t,this.Dl=n}var n=t.prototype;return n.Yd=function(t){var n=this.Cl(t);return this.Nl.Yd(n)},n.Il=function(t){return this.Nl.Il(this.Pl(t))},n.Cl=function(n){var i=new ba(n);if(!this.Dl){var e=t.Ol(i.Qd);i=new ba({Qd:e},i)}return i},n.Pl=function(n){var i=n.Qd;return this.Dl||(i=t.Ol(i)),{Qd:i,Cd:n.Cd}},t.Ol=function(t){return Z.zr&&Rn(t,"http://")?t.replace(":","s:"):t},n.Rl=function(){this.Nl.Rl()},lt(t,null,[{key:"Bl",get:function(){return t.Ll||(t.Ll=new t(new ga)),t.Ll}}]),t}();pa.Ll=void 0,function(t){t.Ml="HttpOpenError",t.xl="HttpResponseError",t.Ul="HttpTimeoutError"}(ma||(ma={}));var ya=function(t){function n(n,i,e){var r;return(r=t.call(this,i,e)||this).Fl=void 0,r.Fl=n,r}return Bt(n,t),lt(n,[{key:"Yd",get:function(){return this.Fl}}]),n}(Mt);var _a=function(t){function n(n,i){return t.call(this,n,"Error while opening "+n.Qd+". Invalid URL.",i)||this}return Bt(n,t),lt(n,[{key:"name",get:function(){return ma.Ml}}]),n}(ya);var Sa=function(t){function n(n,i,e){var r;return(r=t.call(this,n.Yd,null!=e?e:function(t){return"Error while loading "+t.Yd.Qd+", status code "+t.Xd}(n),i)||this).Hl=void 0,r.Hl=n,r}return Bt(n,t),lt(n,[{key:"name",get:function(){return ma.xl}},{key:"Vl",get:function(){return this.Hl}}]),n}(ya);var Ta=function(t){function n(n,i){return t.call(this,n,function(t){return"Request for "+t.Qd+" timed out after "+t.bl+" seconds."}(n),i)||this}return Bt(n,t),lt(n,[{key:"name",get:function(){return ma.Ul}}]),n}(ya),Ea=function(t,n){return(Ea=c.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)n.hasOwnProperty(i)&&(t[i]=n[i])})(t,n)};function Ia(t,n){function i(){this.constructor=t}Ea(t,n),t.prototype=null===n?c.create(n):(i.prototype=n.prototype,new i)}var Ra="object"==typeof n?n:"object"==typeof t?t:"object"==typeof global?global:null;var ka=function(){var t=Ra.Blob;if(t)try{return new t,function(t,n){return new Ra.Blob(t,n)}}catch(t){}var n,i=Ra.BlobBuilder||Ra.WebKitBlobBuilder||Ra.MozBlobBuilder||Ra.MSBlobBuilder;return i?(n=i,function(t,i){var e=new n;if(t)for(var r=0,o=t;r<o.length;r++){var u=o[r];e.append(u)}return e.getBlob(i&&i.type||"")}):null}(),Oa="function"==typeof Tc?Tc:void 0;function Na(t){return t&&"function"==typeof t.getReader}function Pa(t){if("function"!=typeof t)return!1;try{var n=!1,i=new t({start:function(){n=!0}});return!!n&&Na(i)}catch(t){return!1}}var Aa=function(){function t(t,n){this.fv=t,this.Xl=n}return t.prototype.pull=function(t){var n=this;return this.fv.read().then(function(i){n.Xl&&n.Xl(i),i.done?t.close():t.enqueue(i.value)})},t.prototype.cancel=function(t){return this.fv.cancel(t)},t}();function Da(t,n){return n.constructor===t?n:new t(new Aa(n.getReader()),{highWaterMark:0})}var xa=function(){function t(t,n){this.zl=t,this.ql=n}return t.prototype.pull=function(t){return this.zl().then(function(n){t.enqueue(new w(n)),t.close()})},t.prototype.cancel=function(t){this.ql&&this.ql(t)},t}();function Ca(t,n,i){return new t(new xa(n,i),{highWaterMark:0})}var Ba={searchParams:"URLSearchParams"in Ra,iterable:"Symbol"in Ra&&"iterator"in Symbol,blob:"FileReader"in Ra&&!!ka,formData:"FormData"in Ra,arrayBuffer:"ArrayBuffer"in Ra,stream:Pa(Oa),streamRequest:"Request"in Ra&&"body"in Ra.Request.prototype,streamResponse:"Response"in Ra&&"body"in Ra.Response.prototype,abort:"AbortController"in Ra&&"Request"in Ra&&"signal"in Ra.Request.prototype,encoding:"TextEncoder"in Ra&&"TextDecoder"in Ra,url:"URL"in Ra&&function(t){try{return new Ra.URL(t).toString()===t}catch(t){return!1}}("http://example.com/"),firefox:"navigator"in Ra&&/Firefox\//.test(Ra.navigator.userAgent)};function La(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(t))throw new h("Invalid character in header field name");return t}function Ua(t){return"string"!=typeof t&&(t=String(t)),t}function Fa(t){var n={next:function(){var n=t.shift();return{done:void 0===n,value:n}}};return Ba.iterable&&(n[Symbol.iterator]=function(){return n}),n}var Ma=function(){function t(t){var n=this;this.ns={};var i,e=function(t,i){Array.isArray(t)&&2===t.length?n.append(t[0],t[1]):n.append(i,t)};(i=t)&&"function"==typeof i.forEach?t.forEach(e):!function(t){return Ba.iterable&&t&&t[Symbol.iterator]}(t)?t&&c.getOwnPropertyNames(t).forEach(function(i){n.append(i,t[i])}):Array.from(t).forEach(e)}return t.prototype.append=function(t,n){t=La(t),n=Ua(n);var i=t.toLowerCase();if(this.ns.hasOwnProperty(i)){var e=this.ns[i],r=e[1];e[1]=r?r+", "+n:n}else this.ns[i]=[t,n]},t.prototype.delete=function(t){var n=La(t).toLowerCase();delete this.ns[n]},t.prototype.get=function(t){var n=La(t).toLowerCase();return this.ns.hasOwnProperty(n)?this.ns[n][1]:null},t.prototype.has=function(t){var n=La(t).toLowerCase();return this.ns.hasOwnProperty(n)},t.prototype.set=function(t,n){var i=(t=La(t)).toLowerCase();this.ns[i]=[t,Ua(n)]},t.prototype.forEach=function(t,n){for(var i in this.ns)this.ns.hasOwnProperty(i)&&t.call(n,this.ns[i][1],i,this)},t.prototype.keys=function(){var t=[];return this.forEach(function(n,i){t.push(i)}),Fa(t)},t.prototype.values=function(){var t=[];return this.forEach(function(n){t.push(n)}),Fa(t)},t.prototype.entries=function(){var t=[];return this.forEach(function(n,i){t.push([i,n])}),Fa(t)},t.prototype.asList=function(){var t=[];for(var n in this.ns)if(this.ns.hasOwnProperty(n)){var i=this.ns[n],e=i[0],r=i[1];t.push([e,r])}return t},t}();function za(){}Ba.iterable&&(Ma.prototype[Symbol.iterator]=Ma.prototype.entries);var Wa,qa,ja,Ha=a.min,Va=String.fromCharCode,Xa=16384;function Ga(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 function(t){for(var n=t.length,i=[],e=0;e<n;e+=Xa){var r=Ha(e+Xa,n);i.push(Va.apply(null,t.slice(e,r)))}return i.join("")}(n)}function Ya(t){if(t>=55296&&t<=57343)throw new f("Lone surrogate U+"+t.toString(16).toUpperCase()+" is not a scalar value")}function Ka(t,n){return t>>n&63|128}function $a(t,n){0!=(4294967168&t)?(0==(4294965248&t)?n.push(t>>6&31|192):0==(4294901760&t)?(Ya(t),n.push(t>>12&15|224),n.push(Ka(t,6))):0==(4292870144&t)&&(n.push(t>>18&7|240),n.push(Ka(t,12)),n.push(Ka(t,6))),n.push(63&t|128)):n.push(t)}function Ja(){if(ja>=qa)throw new f("Invalid byte index");var t=255&Wa[ja];if(ja++,128==(192&t))return 63&t;throw new f("Invalid continuation byte")}function Za(){var t,n;if(ja>qa)throw new f("Invalid byte index");if(ja===qa)return!1;if(t=255&Wa[ja],ja++,0==(128&t))return t;if(192==(224&t)){if((n=(31&t)<<6|Ja())>=128)return n;throw new f("Invalid continuation byte")}if(224==(240&t)){if((n=(15&t)<<12|Ja()<<6|Ja())>=2048)return Ya(n),n;throw new f("Invalid continuation byte")}if(240==(248&t)&&(n=(7&t)<<18|Ja()<<12|Ja()<<6|Ja())>=65536&&n<=1114111)return n;throw new f("Invalid UTF-8 detected")}var Qa=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"];function tv(t){return t&&URLSearchParams.prototype.isPrototypeOf(t)}function nv(t){return t&&ArrayBuffer.prototype.isPrototypeOf(t)}function iv(t){return t&&DataView.prototype.isPrototypeOf(t)}var ev,rv=ArrayBuffer.isView||function(t){return t&&(Qa.indexOf(c.prototype.toString.call(t))>-1||iv(t))};function ov(t){if(t.bodyUsed)return j.reject(new h("Already used"));t.bodyUsed=!0}function uv(t){return new j(function(n,i){t.onload=function(){n(t.result)},t.onerror=function(){i(t.error)}})}function sv(t){return Ba.encoding?new Ra.TextDecoder("utf-8").decode(new w(t)):Ga(function(t){qa=(Wa=t).length,ja=0;for(var n,i=[];!1!==(n=Za());)i.push(n);return i}(new w(t)))}function fv(t){return Ba.encoding?(new Ra.TextEncoder).encode(t).buffer:new w(function(t){for(var n=[],i=0,e=t;i<e.length;i++)$a(e[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))).buffer}function hv(t){var n=t.getReader(),i=[],e=function(t){var r=t.done,o=t.value;return r?j.resolve(i):(i.push(o),n.read().then(e))};return n.read().then(e)}function cv(t){return hv(t).then(function(t){return function(t){for(var n=0,i=0,e=t;i<e.length;i++)n+=(f=e[i]).byteLength;for(var r=new w(n),o=0,u=0,s=t;u<s.length;u++){var f=s[u];r.set(f,o),o+=f.byteLength}return r}(t).buffer})}function av(t){return t.slice?t.slice(0):vv(new w(t))}function vv(t){if(t.slice)return t.slice(0).buffer;var n=new w(t.byteLength);return n.set(new w(t.buffer,t.byteOffset,t.byteLength)),n.buffer}function dv(t){var n=new FormData;return t.trim().split("&").forEach(function(t){if(t){var i=t.split("="),e=i.shift().replace(/\+/g," "),r=i.join("=").replace(/\+/g," ");n.append(decodeURIComponent(e),decodeURIComponent(r))}}),n}function lv(t){var n=t;if(n.bodyUsed)throw new h("Already used");if(n.Wl===ev.Gl){if(!n.Yl.tee)throw new f("could not clone ReadableStream body");var i=n.Yl.tee(),e=i[0],r=i[1];return n.body=e,n.Yl=e,n.jl=e,r}return n.Wl===ev.Yf?av(n.Yl):n.Wl===ev.Td?n.Yl.then(lv):n.jl}!function(t){t[t.Jn=0]="Jn",t[t.Ql=1]="Ql",t[t.Kl=2]="Kl",t[t.Yf=3]="Yf",t[t.Gl=4]="Gl",t[t.Td=5]="Td"}(ev||(ev={}));var wv=function(){function t(n,i){this.bodyUsed=!1;var e,r,o,u=this;if(this.jl=n||null,n)if("string"==typeof n)this.Wl=ev.Jn,this.Yl=n;else if((o=n)&&"function"==typeof o.then)this.Wl=ev.Td,this.Yl=j.resolve(n).then(function(n){return new t(n,i)}),this.Yl.catch(za);else if(Ba.blob&&function(t){return t&&Blob.prototype.isPrototypeOf(t)}(n))this.Wl=ev.Ql,this.Yl=n;else if(Ba.formData&&function(t){return t&&FormData.prototype.isPrototypeOf(t)}(n))this.Wl=ev.Kl,this.Yl=n;else if(Ba.searchParams&&tv(n))this.Wl=ev.Jn,this.Yl=n.toString();else if(Ba.arrayBuffer&&(nv(n)||rv(n)))iv(n)&&(this.jl=new w((r=n).buffer,r.byteOffset,r.byteLength)),this.Wl=ev.Yf,this.Yl=nv(e=n)?av(e):vv(e);else{if(!Ba.stream||!Na(n))throw new f("unsupported BodyInit type");n=Da(Oa,n),this.Wl=ev.Gl,this.Yl=n,this.jl=n}else this.Wl=ev.Jn,this.Yl="";this.Zl="",i.has("content-type")?this.Zl=(i.get("content-type")||"").toLowerCase():("string"==typeof n?this.Zl="text/plain;charset=UTF-8":u.Wl===ev.Ql&&u.Yl.type?this.Zl=u.Yl.type:Ba.searchParams&&tv(n)&&(this.Zl="application/x-www-form-urlencoded;charset=UTF-8"),this.Zl&&i.set("content-type",this.Zl)),Ba.stream&&(null==n?this.body=null:u.Wl===ev.Gl?this.body=u.Yl:this.body=Ca(Oa,function(){return u.arrayBuffer()},function(){u.bodyUsed=!0}))}return t.prototype.text=function(){var t,n,i,e=ov(this);return e||(this.Wl===ev.Ql?(t=this.Yl,n=new FileReader,i=uv(n),n.readAsText(t),i):this.Wl===ev.Yf?j.resolve(this.Yl).then(sv):this.Wl===ev.Gl?cv(this.Yl).then(sv):this.Wl===ev.Td?this.Yl.then(function(t){return t.text()}):this.Wl===ev.Kl?j.reject(new f("could not read FormData body as text")):j.resolve(this.Yl))},t.prototype.json=function(){return this.text().then(JSON.parse)},t}();Ba.blob&&(wv.prototype.blob=function(){var t,n,i=ov(this);return i||(this.Wl===ev.Ql?j.resolve(this.Yl):this.Wl===ev.Yf?j.resolve(ka([this.Yl],{type:this.Zl})):this.Wl===ev.Gl?(t=this.Yl,n=this.Zl,hv(t).then(function(t){return ka(t,{type:n||""})})):this.Wl===ev.Td?this.Yl.then(function(t){return t.blob()}):this.Wl===ev.Kl?j.reject(new f("could not read FormData body as Blob")):j.resolve(ka([this.Yl],{type:this.Zl})))}),Ba.arrayBuffer&&(wv.prototype.arrayBuffer=function(){var t,n,i;return this.Wl===ev.Yf?ov(this)||j.resolve(this.Yl):this.Wl===ev.Ql?ov(this)||(t=this.Yl,n=new FileReader,i=uv(n),n.readAsArrayBuffer(t),i):this.Wl===ev.Gl?cv(this.Yl):this.Wl===ev.Td?ov(this)||this.Yl.then(function(t){return t.arrayBuffer()}):this.Wl===ev.Kl?j.reject(new f("could not read FormData body as ArrayBuffer")):j.resolve(this.Yl).then(fv)}),Ba.formData&&(wv.prototype.formData=function(){return this.Wl===ev.Kl?ov(this)||j.resolve(this.Yl):this.text().then(dv)});var bv=[301,302,303,307,308],gv=function(t){function n(n,i){var e=this,r=new Ma((i=i||{}).headers);return(e=t.call(this,n||null,r)||this).type="default",e.status=void 0===i.status?200:i.status,e.ok=e.status>=200&&e.status<300,e.statusText=void 0!==i.statusText?String(i.statusText):"",e.headers=r,e.url=i.url||"",e}return Ia(n,t),n.prototype.clone=function(){return new n(lv(this),{status:this.status,statusText:this.statusText,headers:new Ma(this.headers),url:this.url})},n.error=function(){var t=new n(null,{status:0,statusText:""});return t.type="error",t},n.redirect=function(t,i){if(-1===bv.indexOf(i))throw new RangeError("Invalid status code");return new n(null,{status:i,headers:{location:t}})},n}(wv);var mv,pv=function(t,n){return t(n={exports:{}},n.exports),n.exports}(function(t,n){function e(t,n){if(!(t instanceof n))throw new h("Cannot call a class as a function")}function o(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),c.defineProperty(t,e.key,e)}}function u(t,n,i){return n&&o(t.prototype,n),i&&o(t,i),t}function s(t){return(s=c.setPrototypeOf?c.getPrototypeOf:function(t){return t.__proto__||c.getPrototypeOf(t)})(t)}function f(t,n){return(f=c.setPrototypeOf||function(t,n){return t.__proto__=n,t})(t,n)}function a(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function v(t,n,i){return(v="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,n,i){var e=function(t,n){for(;!c.prototype.hasOwnProperty.call(t,n)&&null!==(t=s(t)););return t}(t,n);if(e){var r=c.getOwnPropertyDescriptor(e,n);return r.get?r.get.call(i):r.value}})(t,n,i||t)}c.defineProperty(n,"__esModule",{value:!0});var d=function(){function t(){e(this,t),c.defineProperty(this,"listeners",{value:{},writable:!0,configurable:!0})}return u(t,[{key:"addEventListener",value:function(t,n){t in this.listeners||(this.listeners[t]=[]),this.listeners[t].push(n)}},{key:"removeEventListener",value:function(t,n){if(t in this.listeners)for(var i=this.listeners[t],e=0,r=i.length;e<r;e++)if(i[e]===n)return void i.splice(e,1)}},{key:"dispatchEvent",value:function(t){var n=this;if(t.type in this.listeners){for(var i=function(i){r(function(){return i.call(n,t)})},e=this.listeners[t.type],o=0,u=e.length;o<u;o++)i(e[o]);return!t.defaultPrevented}}}]),t}(),l=function(t){function n(){var t,i,r;return e(this,n),i=this,(t=!(r=s(n).call(this))||"object"!=typeof r&&"function"!=typeof r?a(i):r).listeners||d.call(a(t)),c.defineProperty(a(t),"aborted",{value:!1,writable:!0,configurable:!0}),c.defineProperty(a(t),"onabort",{value:null,writable:!0,configurable:!0}),t}return function(t,n){if("function"!=typeof n&&null!==n)throw new h("Super expression must either be null or a function");t.prototype=c.create(n&&n.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),n&&f(t,n)}(n,d),u(n,[{key:"toString",value:function(){return"[object AbortSignal]"}},{key:"dispatchEvent",value:function(t){"abort"===t.type&&(this.aborted=!0,"function"==typeof this.onabort&&this.onabort.call(this,t)),v(s(n.prototype),"dispatchEvent",this).call(this,t)}}]),n}(),w=function(){function t(){e(this,t),c.defineProperty(this,"signal",{value:new l,writable:!0,configurable:!0})}return u(t,[{key:"abort",value:function(){var t;try{t=new Event("abort")}catch(n){void 0!==i?i.createEvent?(t=i.createEvent("Event")).initEvent("abort",!1,!1):(t=i.createEventObject()).type="abort":t={type:"abort",bubbles:!1,cancelable:!1}}this.signal.dispatchEvent(t)}},{key:"toString",value:function(){return"[object AbortController]"}}]),t}();"undefined"!=typeof Symbol&&Symbol.toStringTag&&(w.prototype[Symbol.toStringTag]="AbortController",l.prototype[Symbol.toStringTag]="AbortSignal"),n.AbortSignal=l,n.AbortController=w,n.default=w});(mv=pv)&&mv.__esModule&&c.prototype.hasOwnProperty.call(mv,"default")&&mv.default,pv.AbortSignal;var yv=pv.AbortController,_v=Ra.DOMException;try{new _v}catch(t){(_v=function(t,n){f.call(this,t),this.name=n||"Error",f.captureStackTrace&&f.captureStackTrace(this,this.constructor)}).prototype=c.create(f.prototype),_v.prototype.constructor=_v}var Sv=yv;function Tv(t,n){if(!t.signal.aborted)if(n.aborted)t.abort();else{var i=function(){n.removeEventListener("abort",i),t.signal.removeEventListener("abort",i),t.abort()};n.addEventListener("abort",i),t.signal.addEventListener("abort",i)}}function Ev(t,n,i){return new j(function(e,r){if(n.signal.aborted)return t.catch(za),r(Iv());var o=function(){n.signal.removeEventListener("abort",o),r(Iv())};n.signal.addEventListener("abort",o),t.then(function(t){n.signal.removeEventListener("abort",o),e(t),i&&n.abort()},function(t){n.signal.removeEventListener("abort",o),r(t),i&&n.abort()})})}function Iv(){return new _v("Aborted","AbortError")}var Rv,kv="moz-chunked-arraybuffer";function Ov(t){try{var n=new b;return n.open("GET","https://test"),n.responseType=t,n.responseType===t}catch(t){}return!1}!function(t){t[t.UNSENT=0]="UNSENT",t[t.OPENED=1]="OPENED",t[t.HEADERS_RECEIVED=2]="HEADERS_RECEIVED",t[t.LOADING=3]="LOADING",t[t.DONE=4]="DONE"}(Rv||(Rv={}));var Nv=function(){function t(t,n){var i=this;this.Jl=!1,this.Fl=t,this.$l=n,this.t_=new b,this.n_=new j(function(t,n){i.i_=t,i.e_=n})}return t.prototype.send=function(){var t=this;return this.r_().then(function(n){return t.s_(n,t.$l),t.n_})},t.prototype.r_=function(){var t=this.Fl;return t.Wl===ev.Gl?t.arrayBuffer():j.resolve(t.jl)},t.prototype.u_=function(t){this.Fl.onprogress&&this.Fl.onprogress(t.loaded,t.lengthComputable?t.total:void 0)},t.prototype.o_=function(t){this.e_(t)},t.prototype.h_=function(){this.o_(new h("Network request failed"))},t.prototype.a_=function(){this.o_(new h("Network request failed"))},t.prototype.c_=function(){this.o_(Iv())},t.prototype.s_=function(t,n){var i=this,e=this.Fl,r=this.t_,o=function(){return i.f_()};if(e.signal.aborted)return this.c_();r.onreadystatechange=function(){if(r.readyState>=Rv.HEADERS_RECEIVED&&!i.Jl){var t=function(t){var n=new Ma;return t.replace(/\r?\n[\t ]+/g," ").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}(r.getAllResponseHeaders()||""),n={status:r.status,statusText:r.statusText,headers:t,url:r.responseURL||t.get("X-Request-URL")};i.Jl=!0,i.v_(n)}},r.onprogress=function(t){return i.u_(t)},r.onload=function(){return i.d_()},r.onerror=function(){return i.h_()},r.ontimeout=function(){return i.a_()},r.onabort=function(){return i.c_()},r.open(e.method,e.url,!0),r.withCredentials="include"===e.credentials,"responseType"in r&&n&&(r.responseType=n),e.headers.forEach(function(t,n){r.setRequestHeader(n,t)}),e.signal.addEventListener("abort",o),r.onloadend=function(){e.signal.removeEventListener("abort",o)},t?r.send(t):r.send()},t.prototype.f_=function(){this.c_(),this.t_.abort()},t}(),Pv=function(t){function n(n,i){var e=t.call(this,n,i)||this;return e.l_=void 0,e.__=void 0,e}return Ia(n,t),n.prototype.v_=function(t){var n=this;this.l_=new j(function(t,i){n.__=t,n.g_=i}),this.i_(new gv(this.l_,t))},n.prototype.d_=function(){var t=this.t_.response;if(null==t){var n=this.$l;""===n||"text"===n?t=this.t_.responseText:"document"===n?t=this.t_.responseXML:"arraybuffer"===n?t=new ArrayBuffer(0):"blob"===n&&(t=ka([]))}this.__(t)},n.prototype.o_=function(n){t.prototype.o_.call(this,n),this.g_&&this.g_(n)},n}(Nv),Av=function(t){function n(n){var i=t.call(this,n,kv)||this;return i.w_=void 0,i.k_=void 0,i.y_=!1,i}return Ia(n,t),n.prototype.v_=function(t){var n=this;this.w_=new Oa({start:function(t){n.k_=t},cancel:function(){n.y_=!0,n.f_()}}),this.i_(new gv(this.w_,t))},n.prototype.u_=function(n){this.y_||this.k_.enqueue(new w(this.t_.response)),t.prototype.u_.call(this,n)},n.prototype.d_=function(){this.k_.close()},n.prototype.o_=function(n){t.prototype.o_.call(this,n),this.k_&&!this.y_&&(this.y_=!0,this.k_.error(n))},n}(Nv),Dv=function(){var t=Ba.firefox&&Ov(kv);return Dv=function(){return t},t},xv=function(){var t;return t=Ba.arrayBuffer&&Ov("arraybuffer")?"arraybuffer":Ba.blob&&Ov("blob")?"blob":"",xv=function(){return t},t};function Cv(t){return(Ba.stream&&Dv()?new Av(t):new Pv(t,xv())).send()}var Bv=Ra.fetch,Lv=Ra.Request;Ra.Response;var Uv=Ra.AbortController;var Fv=["http:","https:"];var Mv=function(){try{if(Ba.streamRequest){var t=new Lv("about:blank",{body:"",method:"POST"}).body;if(t&&Pa(t.constructor))return t.constructor}}catch(t){}}();function zv(t,n,i){var e;if(Ba.stream){var r=void 0;if(Ba.streamResponse){var o=t.body;r=o&&Da(Oa,o)}else r=Ca(Oa,function(){return Ev(t.arrayBuffer(),n,!0)},function(){n.abort()});r&&i&&(r=function(t,n,i){var e=0;return function(t,n,i){return new t(new Aa(n.getReader(),i),{highWaterMark:0})}(Oa,t,function(t){var r=t.done,o=t.value;r?i=void 0===i?e:i:e+=o.byteLength,n(e,i)})}(r,i,Wv(t.headers))),e=r}else{var u=Ev(t.arrayBuffer(),n,!0);i&&(u=function(t,n,i){return j.resolve().then(function(){return n(0,i),t}).then(function(t){var e=t.byteLength;return n(e,i=void 0===i?e:i),t})}(u,i,Wv(t.headers))),e=u}return new gv(e,t)}function Wv(t){return t.has("content-length")?Number(t.get("content-length")):void 0}function qv(t){var n=new Sv;return t.signal&&Tv(n,t.signal),function(t,n){var i,e,r=t;if(i=r.Wl===ev.Gl?Ba.streamRequest&&Mv?j.resolve(Da(Mv,r.Yl)):Ev(t.arrayBuffer(),n,!1):Ev(j.resolve(t.jl),n,!1),Ba.abort){var o=new Uv;Tv(o,n.signal),e=o.signal}return i.then(function(n){return new Lv(t.url,{body:n||void 0,credentials:t.credentials,headers:(i=t.headers,(i instanceof Ma?i:new Ma(i)).asList()),method:t.method,mode:t.mode,referrer:t.referrer,referrerPolicy:t.referrerPolicy,signal:e});var i})}(t,n).then(function(i){return Bv(i).then(function(i){return zv(i,n,t.onprogress)})})}var jv=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];var Hv=function(t){function n(i,e){var r,o,u,s,f,c,a,v,d,l=this,w=(e=e||{}).body||null;if(i instanceof n){if(i.bodyUsed)throw new h("Already used");r=i.url,o=i.credentials,e.headers||(u=new Ma(i.headers)),s=i.method,f=i.mode,c=i.referrer,a=i.referrerPolicy,v=i.signal,d=i.onprogress,w||null==i.jl||(w=i.jl,i.bodyUsed=!0)}else r=String(i),o="same-origin",s="GET",f="cors",c="about:client",a="",v=null,d=null;if(!e.headers&&u||(u=new Ma(e.headers)),e&&(c="about:client",a=""),(l=t.call(this,w,u)||this).url=r,l.headers=u,l.credentials=e.credentials||o,l.method=function(t){var n=t.toUpperCase();return jv.indexOf(n)>-1?n:t}(e.method||s),l.mode=e.mode||f,l.signal=e.signal||v||(new Sv).signal,l.referrer=void 0!==e.referrer?e.referrer:c,l.referrerPolicy=void 0!==e.referrerPolicy?e.referrerPolicy:a,l.onprogress=e.onprogress||d,("GET"===l.method||"HEAD"===l.method)&&w)throw new h("Body not allowed for GET or HEAD requests");return l}return Ia(n,t),n.prototype.clone=function(){return new n(this,{body:lv(this)})},n}(wv),Vv="function"==typeof Bv&&Ba.stream&&Ba.streamResponse&&Ba.url;function Xv(t,n){return new j(function(i){var e=new Hv(t,n);i((Vv&&function(t){try{return Fv.indexOf(new Ra.URL(t,Ra.location.href).protocol)>=0}catch(t){return!1}}(e.url)?qv:Cv)(e))})}Xv.polyfill=!0;var Gv=function(){function t(t){this.Vl=void 0,this.Fl=void 0,this.m_=new Wt,this.Hl=void 0,this.p_=!1,this.Fl=t,this.m_.qs(t.Gs),this.Vl=this.b_()}var n=t.prototype;return n.b_=function(){var t,n,i,e,o,u,s,f,h=this;return Q.async(function(c){for(;;)switch(c.prev=c.next){case 0:(t=this.Fl).bl&&r(function(){h.p_=!0,h.m_.zs()},t.bl),c.prev=2,n=Xv(t.Qd,{method:t.yl,headers:t.zd.Kf(),body:t.Cd,credentials:t.Sl?"include":"same-origin",signal:$v(this.m_.Gs),onprogress:t.El}),c.next=9;break;case 6:throw c.prev=6,c.t0=c.catch(2),new _a(t,c.t0);case 9:return c.prev=9,c.next=12,Q.awrap(n);case 12:i=c.sent,c.next=20;break;case 15:throw c.prev=15,c.t1=c.catch(9),jt(e=this.A_(c.t1))&&this.m_.zs(),e;case 20:if(o=i.url||t.Qd,u=0===i.status&&"file:"===(a=o,Z.Mr(a).protocol)?200:i.status,s=new Yv(this,i,this.m_),f=new wa({Vi:s,Yd:t,qd:t.qd,zd:new Fs(i.headers.asList()),Xd:u,Wd:i.statusText,jd:o}),this.Hl=f,!ca(f)){c.next=29;break}return c.abrupt("return",f);case 29:throw new Sa(f);case 30:case"end":return c.stop()}var a},null,this,[[2,6],[9,15]],j)},n.A_=function(t){return jt(t)?this.p_?new Ta(this.Fl):new qt(t.message,t):this.Hl?new Sa(this.Hl,t):new _a(this.Fl,t)},t}(),Yv=function(t){function n(n,i,e){var r;return(r=t.call(this)||this).T_=void 0,r.S_=void 0,r.m_=void 0,r.Ld=new zo,r.T_=n,r.S_=i,r.m_=e,r.Ld.Xu.catch(at),r}Bt(n,t);var i=n.prototype;return i.xd=function(){return this.Ld.Xu},i.Ed=function(t){return this.Ud(this.S_.text(),t)},i.Rd=function(t){return this.Ud(this.S_.arrayBuffer(),t)},i.Nd=function(){var t=this.S_.body;return t?this.Fd(t):Yc(this.Rd().then(Xc),this.m_)},i.Hd=function(){var t=this.S_.clone(),i=this.m_.Ws(),e=i[0],r=i[1];return this.m_=e,new n(this.T_,t,r)},i.Ud=function(t,n){var i=this;n&&this.m_.qs(n);var e=j.resolve(t).catch(function(t){throw i.T_.A_(t)});return e=Ht(e,this.m_),this.Ld.Yu(e.then(at)),e},i.Fd=function(t){var n=this,i=new Dc,e=j.resolve(t.pipeTo(i.writable,{preventAbort:!0})).catch(function(t){var e=n.T_.A_(t);throw i.writable.abort(e).catch(at),e});return e=Ht(e,this.m_),this.Ld.Yu(e.then(at)),i.readable},lt(n,[{key:"Vd",get:function(){return this.S_.bodyUsed}}]),n}(Qc),Kv="abort";function $v(t){var n=new Sv;if(t.Ps)n.abort();else if(!t.Os){var i=function(){e(),n.abort()},e=function e(){n.signal.removeEventListener(Kv,i),t.Fs(i),t.Vs(e)};n.signal.addEventListener(Kv,i),t.Us(i),t.Hs(e)}return n.signal}var Jv=function(){function t(){}var n=t.prototype;return n.Yd=function(t){return new Gv(t).Vl},n.Il=function(t){var n=t.Dd?{"Content-type":t.Dd}:void 0;this.Yd(new ba({yl:aa.POST,Qd:t.Qd,Cd:t.Cd,zd:n})).then(at,at)},n.Rl=function(){},t}(),Zv=function(n){function i(){for(var i,e=arguments.length,r=new Array(e),o=0;o<e;o++)r[o]=arguments[o];return(i=n.call.apply(n,[this].concat(r))||this).E_=void 0,i.I_=function(){if(_i.cn)return!1;try{return"body"in t.Response.prototype}catch(t){return!1}}(),i.R_=_i.Un||_i.cn,i.N_=void 0,i}return Bt(i,n),lt(i,[{key:"Nr",get:function(){return this.E_||(this.E_=new Co(Ps())),this.E_}},{key:"D_",get:function(){return this.I_}},{key:"C_",get:function(){return this.R_}},{key:"P_",get:function(){return!1}},{key:"O_",get:function(){return Ds.uf()}},{key:"B_",get:function(){return{L_:Bs}}},{key:"M_",get:function(){return e.connection&&e.connection.effectiveType||"default"}},{key:"x_",get:function(){return e.connection&&e.connection.type||"unknown"}},{key:"U_",get:function(){return this.N_||(this.N_=new pa(new Jv)),this.N_}}]),i}(vo);tt(new Zv),tt(new Zv);var Qv=t;Qv.addEventListener("install",function(t){t.waitUntil(Qv.skipWaiting())}),Qv.addEventListener("activate",function(t){t.waitUntil(Qv.clients.claim())}),hi.mr.Ry(Qv)}()}("undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:this);