vendor: 5,494 bytes, lines 1-2
1/*! For license information please see ardplayer-919.799806cc.chunk.1790327383738.js.LICENSE.txt */ 2(()=>{var t={66927(t,e,r){"use strict";var i=r(18794),n=r(42272),s=TypeError;t.exports=function(t){if(i(t))return t;throw new s(n(t)+" is not a function")}},86299(t,e,r){"use strict";var i=r(30658),n=String,s=TypeError;t.exports=function(t){if(i(t))return t;throw new s("Can't set "+n(t)+" as a prototype")}},48831(t,e,r){"use strict";var i=r(12793).has;t.exports=function(t){return i(t),t}},18924(t,e,r){"use strict";var i=r(27080),n=r(40475),s=r(29100).f,o=i("unscopables"),a=Array.prototype;void 0===a[o]&&s(a,o,{configurable:!0,value:n(null)}),t.exports=function(t){a[o][t]=!0}},11468(t,e,r){"use strict";var i=r(21688),n=TypeError;t.exports=function(t,e){if(i(e,t))return t;throw new n("Incorrect invocation")}},42293(t,e,r){"use strict";var i=r(98861),n=String,s=TypeError;t.exports=function(t){if(void 0===t||i(t))return t;throw new s(n(t)+" is not an object or undefined")}},84464(t,e,r){"use strict";var i=r(98861),n=String,s=TypeError;t.exports=function(t){if(i(t))return t;throw new s(n(t)+" is not an object")}},53919(t,e,r){"use strict";var i=r(87964),n=TypeError;t.exports=function(t){if("Uint8Array"===i(t))return t;throw new n("Argument is not an Uint8Array")}},99010(t){"use strict";t.exports="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView},79635(t,e,r){"use strict";var i=r(4127),n=r(70079),s=r(52911),o=i.ArrayBuffer,a=i.TypeError;t.exports=o&&n(o.prototype,"byteLength","get")||function(t){if("ArrayBuffer"!==s(t))throw new a("ArrayBuffer expected");return t.byteLength}},68827(t,e,r){"use strict";var i=r(4127),n=r(99010),s=r(79635),o=i.DataView;t.exports=function(t){if(!n||0!==s(t))return!1;try{return new o(t),!1}catch(t){return!0}}},63074(t,e,r){"use strict";var i=r(68827),n=TypeError;t.exports=function(t){if(i(t))throw new n("ArrayBuffer is detached");return t}},11977(t,e,r){"use strict";var i,n,s,o=r(99010),a=r(41175),u=r(4127),c=r(18794),f=r(98861),h=r(71324),l=r(87964),g=r(42272),p=r(50298),d=r(7255),m=r(80707),y=r(21688),b=r(76068),v=r(44792),w=r(27080),E=r(33699),T=r(74852),A=T.enforce,S=T.get,I=u.Int8Array,O=I&&I.prototype,x=u.Uint8ClampedArray,P=x&&x.prototype,R=I&&b(I),D=O&&b(O),U=Object.prototype,N=u.TypeError,C=w("toStringTag"),M=E("TYPED_ARRAY_TAG"),L="TypedArrayConstructor",F=o&&!!v&&"Opera"!==l(u.opera),$=!1,k={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},B={BigInt64Array:8,BigUint64Array:8},X=function(t){var e=b(t);if(f(e)){var r=S(e);return r&&h(r,L)?r[L]:X(e)}},z=function(t){if(!f(t))return!1;var e=l(t);return h(k,e)||h(B,e)};for(i in k)(s=(n=u[i])&&n.prototype)?A(s)[L]=n:F=!1;for(i in B)(s=(n=u[i])&&n.prototype)&&(A(s)[L]=n);if((!F||!c(R)||R===Function.prototype)&&(R=function(){throw new N("Incorrect invocation")},F))for(i in k)u[i]&&v(u[i],R);if((!F||!D||D===U)&&(D=R.prototype,F))for(i in k)u[i]&&v(u[i].prototype,D);if(F&&b(P)!==D&&v(P,D),a&&!h(D,C))for(i in $=!0,m(D,C,{configurable:!0,get:function(){return f(this)?this[M]:void 0}}),k)u[i]&&p(u[i].prototype,M,i);t.exports={NATIVE_ARRAY_BUFFER_VIEWS:F,TYPED_ARRAY_TAG:$&&M,aTypedArray:function(t){if(z(t))return t;throw new N("Target is not a typed array")},aTypedArrayConstructor:function(t){if(c(t)&&(!v||y(R,t)))return t;throw new N(g(t)+" is not a typed array constructor")},exportTypedArrayMethod:function(t,e,r,i){if(a){if(r)for(var n in k){var s=u[n];if(s&&h(s.prototype,t))try{delete s.prototype[t]}catch(r){try{s.prototype[t]=e}catch(t){}}}D[t]&&!r||d(D,t,r?e:F&&O[t]||e,i)}},exportTypedArrayStaticMethod:function(t,e,r){var i,n;if(a){if(v){if(r)for(i in k)if((n=u[i])&&h(n,t))try{delete n[t]}catch(t){}if(R[t]&&!r)return;try{return d(R,t,r?e:F&&R[t]||e)}catch(t){}}for(i in k)!(n=u[i])||n[t]&&!r||d(n,t,e)}},getTypedArrayConstructor:X,isView:function(t){if(!f(t))return!1;var e=l(t);return"DataView"===e||h(k,e)||h(B,e)},isTypedArray:z,TypedArray:R,TypedArrayPrototype:D}},35460(t,e,r){"use strict";var i=r(99630),n=r(98977),s=r(95807),o=function(t){return function(e,r,o){var a=i(e),u=s(a);if(0===u)return!t&&-1;var c,f=n(o,u);if(t&&r!=r){for(;u>f;)if((c=a[f++])!=c)return!0}else for(;u>f;f++)if((t||f in a)&&a[f]===r)return t||f||0;return!t&&-1}};t.exports={includes:o(!0),indexOf:o(!1)}},69786(t,e,r){"use strict";var i=r(41175),n=r(82001),s=TypeError,o=Object.getOwnPropertyDescriptor,a=i&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(t){return t instanceof TypeError}}();t.exports=a?function(t,e){if(n(t)&&!o(t,"length").writable)throw new s("Cannot set read only .length");return t.length=e}:function(t,e){return t.length=e}},72850(t){"use strict";var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",r=e+"+/",i=e+"-_",n=function(t){for(var e={},r=0;r<64;r++)e[t.charAt(r)]=r;return e};t.exports={i2c:r,c2i:n(r),i2cUrl:i,c2iUrl:n(i)}},73666(t,e,r){"use strict";var i=r(84464),n=r(4090);t.exports=function(t,e,r,s){try{return s?e(i(r)[0],r[1]):e(r)}catch(e){n(t,"throw",e)}}},52911(t,e,r){"use strict";var i=r(63027),n=i({}.toString),s=i("".slice);t.exports=function(t){return s(n(t),8,-1)}},87964(t,e,r){"use strict";var i=r(37167),n=r(18794),s=r(52911),o=r(27080)("toStringTag"),a=Object,u="Arguments"===s(function(){return arguments}());t.exports=i?s:function(t){var e,r,i;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=function(t,e){try{return t[e]}catch(t){}}
vendor: 9,422 bytes, line 2
2(e=a(t),o))?r:u?s(e):"Object"===(i=s(e))&&n(e.callee)?"Arguments":i}},92491(t,e,r){"use strict";var i=r(71324),n=r(76162),s=r(76150),o=r(29100);t.exports=function(t,e,r){for(var a=n(e),u=o.f,c=s.f,f=0;f<a.length;f++){var h=a[f];i(t,h)||r&&i(r,h)||u(t,h,c(e,h))}}},84678(t,e,r){"use strict";var i=r(94892);t.exports=!i(function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype})},89566(t){"use strict";t.exports=function(t,e){return{value:t,done:e}}},50298(t,e,r){"use strict";var i=r(41175),n=r(29100),s=r(41513);t.exports=i?function(t,e,r){return n.f(t,e,s(1,r))}:function(t,e,r){return t[e]=r,t}},41513(t){"use strict";t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},74119(t,e,r){"use strict";var i=r(41175),n=r(29100),s=r(41513);t.exports=function(t,e,r){i?n.f(t,e,s(0,r)):t[e]=r}},80707(t,e,r){"use strict";var i=r(98904),n=r(29100);t.exports=function(t,e,r){return r.get&&i(r.get,e,{getter:!0}),r.set&&i(r.set,e,{setter:!0}),n.f(t,e,r)}},7255(t,e,r){"use strict";var i=r(18794),n=r(29100),s=r(98904),o=r(26564);t.exports=function(t,e,r,a){a||(a={});var u=a.enumerable,c=void 0!==a.name?a.name:e;if(i(r)&&s(r,c,a),a.global)u?t[e]=r:o(e,r);else{try{a.unsafe?t[e]&&(u=!0):delete t[e]}catch(t){}u?t[e]=r:n.f(t,e,{value:r,enumerable:!1,configurable:!a.nonConfigurable,writable:!a.nonWritable})}return t}},98498(t,e,r){"use strict";var i=r(7255);t.exports=function(t,e,r){for(var n in e)i(t,n,e[n],r);return t}},26564(t,e,r){"use strict";var i=r(4127),n=Object.defineProperty;t.exports=function(t,e){try{n(i,t,{value:e,configurable:!0,writable:!0})}catch(r){i[t]=e}return e}},41175(t,e,r){"use strict";var i=r(94892);t.exports=!i(function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})},68752(t,e,r){"use strict";var i=r(4127),n=r(98861),s=i.document,o=n(s)&&n(s.createElement);t.exports=function(t){return o?s.createElement(t):{}}},12504(t){"use strict";var e=TypeError;t.exports=function(t){if(t>9007199254740991)throw new e("Maximum allowed index exceeded");return t}},1976(t){"use strict";t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},74298(t,e,r){"use strict";var i=r(4127).navigator,n=i&&i.userAgent;t.exports=n?String(n):""},95422(t,e,r){"use strict";var i,n,s=r(4127),o=r(74298),a=s.process,u=s.Deno,c=a&&a.versions||u&&u.version,f=c&&c.v8;f&&(n=(i=f.split("."))[0]>0&&i[0]<4?1:+(i[0]+i[1])),!n&&o&&(!(i=o.match(/Edge\/(\d+)/))||i[1]>=74)&&(i=o.match(/Chrome\/(\d+)/))&&(n=+i[1]),t.exports=n},11187(t,e,r){"use strict";var i=r(4127),n=r(76150).f,s=r(50298),o=r(7255),a=r(26564),u=r(92491),c=r(17191);t.exports=function(t,e){var r,f,h,l,g,p=t.target,d=t.global,m=t.stat;if(r=d?i:m?i[p]||a(p,{}):i[p]&&i[p].prototype)for(f in e){if(l=e[f],h=t.dontCallGetSet?(g=n(r,f))&&g.value:r[f],!c(d?f:p+(m?".":"#")+f,t.forced)&&void 0!==h){if(typeof l==typeof h)continue;u(l,h)}(t.sham||h&&h.sham)&&s(l,"sham",!0),o(r,f,l,t)}}},94892(t){"use strict";t.exports=function(t){try{return!!t()}catch(t){return!0}}},63160(t,e,r){"use strict";var i=r(45825),n=Function.prototype,s=n.apply,o=n.call;t.exports="object"==typeof Reflect&&Reflect.apply||(i?o.bind(s):function(){return o.apply(s,arguments)})},1079(t,e,r){"use strict";var i=r(13449),n=r(66927),s=r(45825),o=i(i.bind);t.exports=function(t,e){return n(t),void 0===e?t:s?o(t,e):function(){return t.apply(e,arguments)}}},45825(t,e,r){"use strict";var i=r(94892);t.exports=!i(function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")})},65418(t,e,r){"use strict";var i=r(45825),n=Function.prototype.call;t.exports=i?n.bind(n):function(){return n.apply(n,arguments)}},16993(t,e,r){"use strict";var i=r(41175),n=r(71324),s=Function.prototype,o=i&&Object.getOwnPropertyDescriptor,a=n(s,"name"),u=a&&"something"===function(){}.name,c=a&&(!i||i&&o(s,"name").configurable);t.exports={EXISTS:a,PROPER:u,CONFIGURABLE:c}},70079(t,e,r){"use strict";var i=r(63027),n=r(66927);t.exports=function(t,e,r){try{return i(n(Object.getOwnPropertyDescriptor(t,e)[r]))}catch(t){}}},13449(t,e,r){"use strict";var i=r(52911),n=r(63027);t.exports=function(t){if("Function"===i(t))return n(t)}},63027(t,e,r){"use strict";var i=r(45825),n=Function.prototype,s=n.call,o=i&&n.bind.bind(s,s);t.exports=i?o:function(t){return function(){return s.apply(t,arguments)}}},88035(t){"use strict";var e=TypeError;t.exports=function(t){var r=t&&t.alphabet;if(void 0===r||"base64"===r||"base64url"===r)return r||"base64";throw new e("Incorrect `alphabet` option")}},60878(t,e,r){"use strict";var i=r(4127),n=r(18794);t.exports=function(t,e){return arguments.length<2?(r=i[t],n(r)?r:void 0):i[t]&&i[t][e];var r}},49060(t){"use strict";t.exports=function(t){return{iterator:t,next:t.next,done:!1}}},92248(t,e,r){"use strict";var i=r(65418),n=r(18794),s=r(84464),o=r(42272),a=r(54188),u=TypeError;t.exports=function(t,e){var r=arguments.length<2?a(t):e;if(n(r))return s(i(r,t));throw new u(o(t)+" is not iterable")}},54188(t,e,r){"use strict";var i=r(52911),n=r(53600),s=r(64215),o=r(27080)("iterator"),a=Array.prototype;t.exports=function(t){if(!n(t))return s(t,o)||s(t,"@@iterator")||("Arguments"===i(t)?a[o]:void 0)}},64215(t,e,r){"use strict";var i=r(66927),n=r(53600);t.exports=function(t,e){var r=t[e];return n(r)?void 0:i(r)}},11052(t,e,r){"use strict";var i=r(66927),n=r(84464),s=r(65418),o=r(51402),a=r(49060),u="Invalid size",c=RangeError,f=TypeError,h=Math.max,l=function(t,e){this.set=t,this.size=h(e,0),this.has=i(t.has),this.keys=i(t.keys)};l.prototype={getIterator:function(){return a(n(s(this.keys,this.set)))},includes:function(t){return s(this.has,this.set,t)}},t.exports=function(t){n(t);var e=+t.size;if(e!=e)throw new f(u);var r=o(e);if(r<0)throw new c(u);return new l(t,r)}},4127(t){"use strict";var e=function(t){return t&&t.Math===Math&&t};t.exports=e("object"==typeof globalThis&&globalThis)||e("object"==typeof window&&window)||e("object"==typeof self&&self)||e("object"==typeof globalThis&&globalThis)||e("object"==typeof this&&this)||function(){return this}()||Function("return this")()},71324(t,e,r){"use strict";var i=r(63027),n=r(16674),s=i({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,e){return s(n(t),e)}},45730(t){"use strict";t.exports={}},60048(t,e,r){"use strict";var i=r(60878);t.exports=i("document","documentElement")},23696(t,e,r){"use strict";var i=r(41175),n=r(94892),s=r(68752);t.exports=!i&&!n(function(){return 7!==Object.defineProperty(s("div"),"a",{get:function(){return 7}}).a})},52466(t,e,r){"use strict";var i=r(63027),n=r(94892),s=r(52911),o=Object,a=i("".split);t.exports=n(function(){return!o("z").propertyIsEnumerable(0)})?function(t){return"String"===s(t)?a(t,""):o(t)}:o},83335(t,e,r){"use strict";var i=r(63027),n=r(18794),s=r(352),o=i(Function.toString);n(s.inspectSource)||(s.inspectSource=function(t){return o(t)}),t.exports=s.inspectSource},74852(t,e,r){"use strict";var i,n,s,o=r(90567),a=r(4127),u=r(98861),c=r(50298),f=r(71324),h=r(352),l=r(99690),g=r(45730),p="Object already initialized",d=a.TypeError,m=a.WeakMap;if(o||h.state){var y=h.state||(h.state=new m);y.get=y.get,y.has=y.has,y.set=y.set,i=function(t,e){if(y.has(t))throw new d(p);return e.facade=t,y.set(t,e),e},n=function(t){return y.get(t)||{}},s=function(t){return y.has(t)}}else{var b=l("state");g[b]=!0,i=function(t,e){if(f(t,b))throw new d(p);return e.facade=t,c(t,b,e),e},n=function(t){return f(t,b)?t[b]:{}},s=function(t){return f(t,b)}}t.exports={set:i,get:n,has:s,enforce:function(t){return s(t)?n(t):i(t,{})},getterFor:function(t){return function(e){var r;if(!u(e)||(r=n(e)).type!==t)throw new d("Incompatible receiver, "+t+" required");return r}}}},64916(t,e,r){"use strict";var i=r(27080),n=r(30510),s=i("iterator"),o=Array.prototype;t.exports=function(t){return void 0!==t&&(n.Array===t||o[s]===t)}},82001(t,e,r){"use strict";var i=r(52911);t.exports=Array.isArray||function(t){return"Array"===i(t)}},74830(t,e,r){"use strict";var i=r(87964);t.exports=function(t){var e=i(t);return"BigInt64Array"===e||"BigUint64Array"===e}},18794(t){"use strict";var e="object"==typeof document&&document.all;t.exports=void 0===e&&void 0!==e?function(t){return"function"==typeof t||t===e}:function(t){return"function"==typeof t}},17191(t,e,r){"use strict";var i=r(94892),n=r(18794),s=/#|\.prototype\./,o=function(t,e){var r=u[a(t)];return r===f||r!==c&&(n(e)?i(e):!!e)},a=o.normalize=function(t){return String(t).replace(s,".").toLowerCase()},u=o.data={},c=o.NATIVE="N",f=o.POLYFILL="P";t.exports=o},53600(t){"use strict";t.exports=function(t){return null==t}},98861(t,e,r){"use strict";var i=r(18794);t.exports=function(t){return"object"==typeof t?null!==t:i(t)}},30658(t,e,r){"use strict";var i=r(98861);t.exports=function(t){return i(t)||null===t}},64400(t){"use strict";t.exports=!1},11898(t,e,r){"use strict";var i=r(60878),n=r(18794),s=r(21688),o=r(70535),a=Object;t.exports=o?function(t){return"symbol"==typeof t}:function(t){var e=i("Symbol");return n(e)&&s(e.prototype,a(t))}},87118(t,e,r){"use strict";var i=r(65418);t.exports=function(t,e,r){for(var n,s,o=r?t:t.iterator,a=t.next;!(n=i(a,o)).done;)if(void 0!==(s=e(n.value)))return s}},2711(t,e,r){"use strict";var i=r(1079),n=r(65418),s=r(84464),o=r(42272),a=r(64916),u=r(95807),c=r(21688),f=r(92248),h=r(54188),l=r(4090),g=TypeError,p=function(t,e){this.stopped=t,this.result=e},d=p.prototype;
2t.exports=function(t,e,r){var m,y,b,v,w,E,T,A=r&&r.that,S=!(!r||!r.AS_ENTRIES),I=!(!r||!r.IS_RECORD),O=!(!r||!r.IS_ITERATOR),x=!(!r||!r.INTERRUPTED),P=i(e,A),R=function(t){var e=m;return m=void 0,e&&l(e,"normal"),new p(!0,t)},D=function(t){return S?(s(t),x?P(t[0],t[1],R):P(t[0],t[1])):x?P(t,R):P(t)};if(I)m=t.iterator;else if(O)m=t;else{if(!(y=h(t)))throw new g(o(t)+" is not iterable");if(a(y)){for(b=0,v=u(t);v>b;b++)if((w=D(t[b]))&&c(d,w))return w;return new p(!1)}m=f(t,y)}for(E=I?t.next:m.next;!(T=n(E,m)).done;){var U=T.value;try{w=D(U)}catch(t){if(!m)throw t;l(m,"throw",t)}if("object"==typeof w&&w&&c(d,w))return w}return new p(!1)}},44430(t){"use strict";t.exports=function(t){t.iterator=t.next=t.nextHandler=t.mapper=t.predicate=t.inner=t.iterables=t.iters=t.openIters=t.padding=t.finishResults=t.buffer=null}},38772(t,e,r){"use strict";var i=r(4090);t.exports=function(t,e,r){for(var n=t.length-1;n>=0;n--)if(void 0!==t[n])try{r=i(t[n].iterator,e,r)}catch(t){e="throw",r=t}if("throw"===e)throw r;return r}},4090(t,e,r){"use strict";var i=r(65418),n=r(84464),s=r(64215);t.exports=function(t,e,r){var o,a;n(t);try{if(!(o=s(t,"return"))){if("throw"===e)throw r;return r}o=i(o,t)}catch(t){a=!0,o=t}if("throw"===e)throw r;if(a)throw o;return n(o),r}},95521(t,e,r){"use strict";var i=r(65418),n=r(40475),s=r(50298),o=r(98498),a=r(27080),u=r(74852),c=r(64215),f=r(22636).IteratorPrototype,h=r(89566),l=r(4090),g=r(38772),p=r(44430),d=a("toStringTag"),m="IteratorHelper",y="WrapForValidIterator",b="normal",v="throw",w=u.set,E=function(t){var e=u.getterFor(t?y:m);return o(n(f),{next:function(){var r=e(this);if(t)return r.nextHandler();if(r.done)return h(void 0,!0);try{var i=r.nextHandler();return r.done&&p(r),r.returnHandlerResult?i:h(i,r.done)}catch(t){throw r.done=!0,p(r),t}},return:function(){var r=e(this),n=r.iterator,s=r.inner,o=r.openIters,a=r.done;if(r.done=!0,t){var u=c(n,"return");return u?i(u,n):h(void 0,!0)}if(p(r),a)return h(void 0,!0);if(s)try{l(s.iterator,b)}catch(t){return l(n,v,t)}if(o)try{g(o,b)}catch(t){if(n)return l(n,v,t);throw t}return n&&l(n,b),h(void 0,!0)}})},T=E(!0),A=E(!1);s(A,d,"Iterator Helper"),t.exports=function(t,e,r){var i=function(i,n){n?(n.iterator=i.iterator,n.next=i.next):n=i,n.type=e?y:m,n.returnHandlerResult=!!r,n.nextHandler=t,n.counter=0,n.done=!1,w(this,n)};return i.prototype=e?T:A,i}},40909(t){"use strict";t.exports=function(t,e){var r="function"==typeof Iterator&&Iterator.prototype[t];if(r)try{r.call({next:null},e).next()}catch(t){return!0}}},47280(t,e,r){"use strict";var i=r(4127);t.exports=function(t,e){var r=i.Iterator,n=r&&r.prototype,s=n&&n[t],o=!1;if(s)try{s.call({next:function(){return{done:!0}},return:function(){o=!0}},-1)}catch(t){t instanceof e||(o=!1)}if(!o)return s}},22636(t,e,r){"use strict";var i,n,s,o=r(94892),a=r(18794),u=r(98861),c=r(40475),f=r(76068),h=r(7255),l=r(27080),g=r(64400),p=l("iterator"),d=!1;[].keys&&("next"in(s=[].keys())?(n=f(f(s)))!==Object.prototype&&(i=n):d=!0),!u(i)||o(function(){var t={};return i[p].call(t)!==t})?i={}:g&&(i=c(i)),a(i[p])||h(i,p,function(){return this}),t.exports={IteratorPrototype:i,BUGGY_SAFARI_ITERATORS:d}},30510(t){"use strict";t.exports=Object.create?Object.create(null):{}},95807(t,e,r){"use strict";var i=r(82737);t.exports=function(t){return i(t.length)}},98904(t,e,r){"use strict";var i=r(63027),n=r(94892),s=r(18794),o=r(71324),a=r(41175),u=r(16993).CONFIGURABLE,c=r(83335),f=r(74852),h=f.enforce,l=f.get,g=String,p=Object.defineProperty,d=i("".slice),m=i("".replace),y=i([].join),b=a&&!n(function(){return 8!==p(function(){},"length",{value:8}).length}),v=String(String).split("String"),w=t.exports=function(t,e,r){"Symbol("===d(g(e),0,7)&&(e="["+m(g(e),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),r&&r.getter&&(e="get "+e),r&&r.setter&&(e="set "+e),(!o(t,"name")||u&&t.name!==e)&&(a?p(t,"name",{value:e,configurable:!0}):t.name=e),b&&r&&o(r,"arity")&&t.length!==r.arity&&p(t,"length",{value:r.arity});try{r&&o(r,"constructor")&&r.constructor?a&&p(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var i=h(t);return o(i,"source")||(i.source=y(v,"string"==typeof e?e:"")),t};Function.prototype.toString=w(function(){return s(this)&&l(this).source||c(this)},"toString")},47352(t){"use strict";var e=Math.ceil,r=Math.floor;t.exports=Math.trunc||function(t){var i=+t;return(i>0?r:e)(i)}},40475(t,e,r){"use strict";var i,n=r(84464),s=r(56236),o=r(1976),a=r(45730),u=r(60048),c=r(68752),f=r(99690),h="prototype",l="script",g=f("IE_PROTO"),p=function(){},d=function(t){return"<"+l+">"+t+"</"+l+">"},m=function(t){t.write(d("")),t.close();var e=t.parentWindow.Object;return t=null,e},y=function(){try{i=new ActiveXObject("htmlfile")}catch(t){}var t,e,r;y="undefined"!=typeof document?document.domain&&i?m(i):(e=c("iframe"),r="java"+l+":",e.style.display="none",u.appendChild(e),e.src=String(r),(t=e.contentWindow.document).open(),t.write(d("document.F=Object")),t.close(),t.F):m(i);for(var n=o.length;n--;)delete y[h][o[n]];return y()};
vendor: 9,522 bytes, line 2
2a[g]=!0,t.exports=Object.create||function(t,e){var r;return null!==t?(p[h]=n(t),r=new p,p[h]=null,r[g]=t):r=y(),void 0===e?r:s.f(r,e)}},56236(t,e,r){"use strict";var i=r(41175),n=r(8549),s=r(29100),o=r(84464),a=r(99630),u=r(16251);e.f=i&&!n?Object.defineProperties:function(t,e){o(t);for(var r,i=a(e),n=u(e),c=n.length,f=0;c>f;)s.f(t,r=n[f++],i[r]);return t}},29100(t,e,r){"use strict";var i=r(41175),n=r(23696),s=r(8549),o=r(84464),a=r(43750),u=TypeError,c=Object.defineProperty,f=Object.getOwnPropertyDescriptor,h="enumerable",l="configurable",g="writable";e.f=i?s?function(t,e,r){if(o(t),e=a(e),o(r),"function"==typeof t&&"prototype"===e&&"value"in r&&g in r&&!r[g]){var i=f(t,e);i&&i[g]&&(t[e]=r.value,r={configurable:l in r?r[l]:i[l],enumerable:h in r?r[h]:i[h],writable:!1})}return c(t,e,r)}:c:function(t,e,r){if(o(t),e=a(e),o(r),n)try{return c(t,e,r)}catch(t){}if("get"in r||"set"in r)throw new u("Accessors not supported");return"value"in r&&(t[e]=r.value),t}},76150(t,e,r){"use strict";var i=r(41175),n=r(65418),s=r(43214),o=r(41513),a=r(99630),u=r(43750),c=r(71324),f=r(23696),h=Object.getOwnPropertyDescriptor;e.f=i?h:function(t,e){if(t=a(t),e=u(e),f)try{return h(t,e)}catch(t){}if(c(t,e))return o(!n(s.f,t,e),t[e])}},98331(t,e,r){"use strict";var i=r(20581),n=r(1976).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return i(t,n)}},80706(t,e){"use strict";e.f=Object.getOwnPropertySymbols},76068(t,e,r){"use strict";var i=r(71324),n=r(18794),s=r(16674),o=r(99690),a=r(84678),u=o("IE_PROTO"),c=Object,f=c.prototype;t.exports=a?c.getPrototypeOf:function(t){var e=s(t);if(i(e,u))return e[u];var r=e.constructor;return n(r)&&e instanceof r?r.prototype:e instanceof c?f:null}},21688(t,e,r){"use strict";var i=r(63027);t.exports=i({}.isPrototypeOf)},20581(t,e,r){"use strict";var i=r(63027),n=r(71324),s=r(99630),o=r(35460).indexOf,a=r(45730),u=i([].push);t.exports=function(t,e){var r,i=s(t),c=0,f=[];for(r in i)!n(a,r)&&n(i,r)&&u(f,r);for(;e.length>c;)n(i,r=e[c++])&&(~o(f,r)||u(f,r));return f}},16251(t,e,r){"use strict";var i=r(20581),n=r(1976);t.exports=Object.keys||function(t){return i(t,n)}},43214(t,e){"use strict";var r={}.propertyIsEnumerable,i=Object.getOwnPropertyDescriptor,n=i&&!r.call({1:2},1);e.f=n?function(t){var e=i(this,t);return!!e&&e.enumerable}:r},44792(t,e,r){"use strict";var i=r(70079),n=r(98861),s=r(7263),o=r(86299);t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,r={};try{(t=i(Object.prototype,"__proto__","set"))(r,[]),e=r instanceof Array}catch(t){}return function(r,i){return s(r),o(i),n(r)?(e?t(r,i):r.__proto__=i,r):r}}():void 0)},95269(t,e,r){"use strict";var i=r(65418),n=r(18794),s=r(98861),o=TypeError;t.exports=function(t,e){var r,a;if("string"===e&&n(r=t.toString)&&!s(a=i(r,t)))return a;if(n(r=t.valueOf)&&!s(a=i(r,t)))return a;if("string"!==e&&n(r=t.toString)&&!s(a=i(r,t)))return a;throw new o("Can't convert object to primitive value")}},76162(t,e,r){"use strict";var i=r(60878),n=r(63027),s=r(98331),o=r(80706),a=r(84464),u=n([].concat);t.exports=i("Reflect","ownKeys")||function(t){var e=s.f(a(t)),r=o.f;return r?u(e,r(t)):e}},7263(t,e,r){"use strict";var i=r(53600),n=TypeError;t.exports=function(t){if(i(t))throw new n("Can't call method on "+t);return t}},96321(t,e,r){"use strict";var i=r(12793),n=r(70386),s=i.Set,o=i.add;t.exports=function(t){var e=new s;return n(t,function(t){o(e,t)}),e}},76545(t,e,r){"use strict";var i=r(48831),n=r(12793),s=r(96321),o=r(67135),a=r(11052),u=r(70386),c=r(87118),f=n.has,h=n.remove;t.exports=function(t){var e=i(this),r=a(t),n=s(e);return o(n)<=r.size?u(n,function(t){r.includes(t)&&h(n,t)}):c(r.getIterator(),function(t){f(n,t)&&h(n,t)}),n}},12793(t,e,r){"use strict";var i=r(63027),n=Set.prototype;t.exports={Set,add:i(n.add),has:i(n.has),remove:i(n.delete),proto:n}},32179(t,e,r){"use strict";var i=r(48831),n=r(12793),s=r(67135),o=r(11052),a=r(70386),u=r(87118),c=n.Set,f=n.add,h=n.has;t.exports=function(t){var e=i(this),r=o(t),n=new c;return s(e)>r.size?u(r.getIterator(),function(t){h(e,t)&&f(n,t)}):a(e,function(t){r.includes(t)&&f(n,t)}),n}},73092(t,e,r){"use strict";var i=r(48831),n=r(12793).has,s=r(67135),o=r(11052),a=r(70386),u=r(87118),c=r(4090);t.exports=function(t){var e=i(this),r=o(t);if(s(e)<=r.size)return!1!==a(e,function(t){if(r.includes(t))return!1},!0);var f=r.getIterator();return!1!==u(f,function(t){if(n(e,t))return c(f.iterator,"normal",!1)})}},86243(t,e,r){"use strict";var i=r(48831),n=r(67135),s=r(70386),o=r(11052);t.exports=function(t){var e=i(this),r=o(t);return!(n(e)>r.size)&&!1!==s(e,function(t){if(!r.includes(t))return!1},!0)}},25954(t,e,r){"use strict";var i=r(48831),n=r(12793).has,s=r(67135),o=r(11052),a=r(87118),u=r(4090);t.exports=function(t){var e=i(this),r=o(t);if(s(e)<r.size)return!1;var c=r.getIterator();return!1!==a(c,function(t){if(!n(e,t))return u(c.iterator,"normal",!1)})}},70386(t,e,r){"use strict";var i=r(63027),n=r(87118),s=r(12793),o=s.Set,a=s.proto,u=i(a.forEach),c=i(a.keys),f=c(new o).next;t.exports=function(t,e,r){return r?n({iterator:c(t),next:f},e):u(t,e)}},42405(t,e,r){"use strict";var i=r(60878),n=function(t){return{size:t,has:function(){return!1},keys:function(){return{next:function(){return{done:!0}}}}}},s=function(t){return{size:t,has:function(){return!0},keys:function(){throw new Error("e")}}};t.exports=function(t,e){var r=i("Set");try{(new r)[t](n(0));try{return(new r)[t](n(-1)),!1}catch(i){if(!e)return!0;try{return(new r)[t](s(-1/0)),!1}catch(i){return e(new r([1,2])[t](s(1/0)))}}}catch(t){return!1}}},45758(t){"use strict";t.exports=function(t){try{var e=new Set,r={size:0,has:function(){return!0},keys:function(){return Object.defineProperty({},"next",{get:function(){return e.clear(),e.add(4),function(){return{done:!0}}}})}},i=e[t](r);return 1===i.size&&4===i.values().next().value}catch(t){return!1}}},67135(t,e,r){"use strict";var i=r(70079),n=r(12793);t.exports=i(n.proto,"size","get")||function(t){return t.size}},84851(t,e,r){"use strict";var i=r(48831),n=r(12793),s=r(96321),o=r(11052),a=r(87118),u=n.add,c=n.has,f=n.remove;t.exports=function(t){var e=i(this),r=o(t).getIterator(),n=s(e);return a(r,function(t){c(e,t)?f(n,t):u(n,t)}),n}},16471(t,e,r){"use strict";var i=r(48831),n=r(12793).add,s=r(96321),o=r(11052),a=r(87118);t.exports=function(t){var e=i(this),r=o(t).getIterator(),u=s(e);return a(r,function(t){n(u,t)}),u}},99690(t,e,r){"use strict";var i=r(35384),n=r(33699),s=i("keys");t.exports=function(t){return s[t]||(s[t]=n(t))}},352(t,e,r){"use strict";var i=r(64400),n=r(4127),s=r(26564),o="__core-js_shared__",a=t.exports=n[o]||s(o,{});(a.versions||(a.versions=[])).push({version:"3.50.0",mode:i?"pure":"global",copyright:"© 2013â2025 Denis Pushkarev (zloirock.ru), 2025â2026 CoreJS Company (core-js.io). All rights reserved.",license:"https://github.com/zloirock/core-js/blob/v3.50.0/LICENSE",source:"https://github.com/zloirock/core-js"})},35384(t,e,r){"use strict";var i=r(352),n=Object.create||Object;t.exports=function(t,e){return i[t]||(i[t]=e||n(null))}},47974(t,e,r){"use strict";var i=r(95422),n=r(94892),s=r(4127).String;t.exports=!!Object.getOwnPropertySymbols&&!n(function(){var t=Symbol("symbol detection");return!s(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&i&&i<41})},98977(t,e,r){"use strict";var i=r(51402),n=Math.max,s=Math.min;t.exports=function(t,e){var r=i(t);return r<0?n(r+e,0):s(r,e)}},71835(t,e,r){"use strict";var i=r(22732),n=TypeError;t.exports=function(t){var e=i(t,"number");if("number"==typeof e)throw new n("Can't convert number to bigint");return BigInt(e)}},99630(t,e,r){"use strict";var i=r(52466),n=r(7263);t.exports=function(t){return i(n(t))}},51402(t,e,r){"use strict";var i=r(47352);t.exports=function(t){var e=+t;return e!=e||0===e?0:i(e)}},82737(t,e,r){"use strict";var i=r(51402),n=Math.min;t.exports=function(t){var e=i(t);return e>0?n(e,9007199254740991):0}},16674(t,e,r){"use strict";var i=r(7263),n=Object;t.exports=function(t){return n(i(t))}},22732(t,e,r){"use strict";var i=r(65418),n=r(98861),s=r(11898),o=r(64215),a=r(95269),u=r(27080),c=TypeError,f=u("toPrimitive");t.exports=function(t,e){if(!n(t)||s(t))return t;var r,u=o(t,f);if(u){if(void 0===e&&(e="default"),r=i(u,t,e),!n(r)||s(r))return r;throw new c("Can't convert object to primitive value")}return void 0===e&&(e="number"),a(t,e)}},43750(t,e,r){"use strict";var i=r(22732),n=r(11898);t.exports=function(t){var e=i(t,"string");return n(e)?e:e+""}},37167(t,e,r){"use strict";var i={};i[r(27080)("toStringTag")]="z",t.exports="[object z]"===String(i)},42272(t){"use strict";var e=String;t.exports=function(t){try{return e(t)}catch(t){return"Object"}}},33699(t,e,r){"use strict";var i=r(63027),n=0,s=Math.random(),o=i(1.1.toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+o(++n+s,36)}},70535(t,e,r){"use strict";var i=r(47974);t.exports=i&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},8549(t,e,r){"use strict";var i=r(41175),n=r(94892);t.exports=i&&n(function(){return 42!==Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype})},90567(t,e,r){"use strict";var i=r(4127),n=r(18794),s=i.WeakMap;t.exports=n(s)&&/native code/.test(String(s))},27080(t,e,r){"use strict";var i=r(4127),n=r(35384),s=r(71324),o=r(33699),a=r(47974),u=r(70535),c=i.Symbol,f=n("wks"),h=u?c.for||c:c&&c.withoutSetter||o;t.exports=function(t){return s(f,t)||(f[t]=a&&s(c,t)?c[t]:h("Symbol."+t)),f[t]}},97700(t,e,r){"use strict";var i=r(11187),n=r(35460).includes,s=r(94892),o=r(18924),a=s(function(){return!Array(1).includes()}
vendor: 5,255 bytes, line 2
2),u=s(function(){return[,1].includes(void 0,1)});i({target:"Array",proto:!0,forced:a||u},{includes:function(t){return n(this,t,arguments.length>1?arguments[1]:void 0)}}),o("includes")},99921(t,e,r){"use strict";var i=r(11187),n=r(16674),s=r(95807),o=r(69786),a=r(12504);i({target:"Array",proto:!0,arity:1,forced:r(94892)(function(){return 4294967297!==[].push.call({length:4294967296},1)})||!function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(t){return t instanceof TypeError}}()},{push:function(t){var e=n(this),r=s(e),i=arguments.length;a(r+i);for(var u=0;u<i;u++)e[r]=arguments[u],r++;return o(e,r),r}})},47144(t,e,r){"use strict";var i=r(11187),n=r(4127),s=r(11468),o=r(84464),a=r(18794),u=r(76068),c=r(80707),f=r(74119),h=r(94892),l=r(71324),g=r(27080),p=r(22636).IteratorPrototype,d=r(41175),m=r(64400),y="constructor",b="Iterator",v=g("toStringTag"),w=TypeError,E=n[b],T=m||!a(E)||E.prototype!==p||!h(function(){E({})}),A=function(){if(s(this,p),u(this)===p)throw new w("Abstract class Iterator not directly constructable")},S=function(t,e){d?c(p,t,{configurable:!0,get:function(){return e},set:function(e){if(o(this),this===p)throw new w("You can't redefine this property");l(this,t)?this[t]=e:f(this,t,e)}}):p[t]=e};l(p,v)||S(v,b),!T&&l(p,y)&&p[y]!==Object||S(y,A),A.prototype=p,i({global:!0,constructor:!0,forced:T},{Iterator:A})},25744(t,e,r){"use strict";var i=r(11187),n=r(65418),s=r(66927),o=r(84464),a=r(49060),u=r(95521),c=r(73666),f=r(64400),h=r(4090),l=r(40909),g=r(47280),p=!f&&!l("filter",function(){}),d=!f&&!p&&g("filter",TypeError),m=f||p||d,y=u(function(){for(var t,e,r=this.iterator,i=this.predicate,s=this.next;;){if(t=o(n(s,r)),this.done=!!t.done)return;if(e=t.value,c(r,i,[e,this.counter++],!0))return e}});i({target:"Iterator",proto:!0,real:!0,forced:m},{filter:function(t){o(this);try{s(t)}catch(t){h(this,"throw",t)}return d?n(d,this,t):new y(a(this),{predicate:t})}})},65337(t,e,r){"use strict";var i=r(11187),n=r(65418),s=r(2711),o=r(66927),a=r(84464),u=r(49060),c=r(4090),f=r(47280)("find",TypeError);i({target:"Iterator",proto:!0,real:!0,forced:f},{find:function(t){a(this);try{o(t)}catch(t){c(this,"throw",t)}if(f)return n(f,this,t);var e=u(this),r=0;return s(e,function(e,i){if(t(e,r++))return i(e)},{IS_RECORD:!0,INTERRUPTED:!0}).result}})},8021(t,e,r){"use strict";var i=r(11187),n=r(65418),s=r(2711),o=r(66927),a=r(84464),u=r(49060),c=r(4090),f=r(47280)("forEach",TypeError);i({target:"Iterator",proto:!0,real:!0,forced:f},{forEach:function(t){a(this);try{o(t)}catch(t){c(this,"throw",t)}if(f)return n(f,this,t);var e=u(this),r=0;s(e,function(e){t(e,r++)},{IS_RECORD:!0})}})},89542(t,e,r){"use strict";var i=r(11187),n=r(65418),s=r(66927),o=r(84464),a=r(49060),u=r(95521),c=r(73666),f=r(4090),h=r(40909),l=r(47280),g=r(64400),p=!g&&!h("map",function(){}),d=!g&&!p&&l("map",TypeError),m=g||p||d,y=u(function(){var t=this.iterator,e=o(n(this.next,t));if(!(this.done=!!e.done))return c(t,this.mapper,[e.value,this.counter++],!0)});i({target:"Iterator",proto:!0,real:!0,forced:m},{map:function(t){o(this);try{s(t)}catch(t){f(this,"throw",t)}return d?n(d,this,t):new y(a(this),{mapper:t})}})},61696(t,e,r){"use strict";var i=r(11187),n=r(2711),s=r(66927),o=r(84464),a=r(49060),u=r(4090),c=r(47280),f=r(63160),h=r(94892),l=TypeError,g=h(function(){[].keys().reduce(function(){},void 0)}),p=!g&&c("reduce",l);i({target:"Iterator",proto:!0,real:!0,forced:g||p},{reduce:function(t){o(this);try{s(t)}catch(t){u(this,"throw",t)}var e=arguments.length<2,r=e?void 0:arguments[1];if(p)return f(p,this,e?[t]:[t,r]);var i=a(this),c=0;if(n(i,function(i){e?(e=!1,r=i):r=t(r,i,c),c++},{IS_RECORD:!0}),e)throw new l("Reduce of empty iterator with no initial value");return r}})},24791(t,e,r){"use strict";var i=r(11187),n=r(76545),s=r(94892);i({target:"Set",proto:!0,real:!0,forced:!r(42405)("difference",function(t){return 0===t.size})||s(function(){var t={size:1,has:function(){return!0},keys:function(){var t=0;return{next:function(){var r=t++>1;return e.has(1)&&e.clear(),{done:r,value:2}}}}},e=new Set([1,2,3,4]);return 3!==e.difference(t).size})},{difference:n})},53457(t,e,r){"use strict";var i=r(11187),n=r(94892),s=r(32179);i({target:"Set",proto:!0,real:!0,forced:!r(42405)("intersection",function(t){return 2===t.size&&t.has(1)&&t.has(2)})||n(function(){return"3,2"!==String(Array.from(new Set([1,2,3]).intersection(new Set([3,2]))))})},{intersection:s})},73532(t,e,r){"use strict";var i=r(11187),n=r(73092);i({target:"Set",proto:!0,real:!0,forced:!r(42405)("isDisjointFrom",function(t){return!t})},{isDisjointFrom:n})},34737(t,e,r){"use strict";var i=r(11187),n=r(86243);i({target:"Set",proto:!0,real:!0,forced:!r(42405)("isSubsetOf",function(t){return t})},{isSubsetOf:n})},4666(t,e,r){"use strict";var i=r(11187),n=r(25954);i({target:"Set",proto:!0,real:!0,forced:!r(42405)("isSupersetOf",function(t){return!t})},{isSupersetOf:n})},77809(t,e,r){"use strict";var i=r(11187),n=r(84851),s=r(45758);i({target:"Set",proto:!0,real:!0,forced:!r(42405)("symmetricDifference")||!s("symmetricDifference")},{symmetricDifference:n})},92653(t,e,r){"use strict";var i=r(11187),n=r(16471),s=r(45758);i({target:"Set",proto:!0,real:!0,forced:!r(42405)("union")||!s("union")},{union:n})},34602(t,e,r){"use strict";
2var i=r(11977),n=r(74830),s=r(95807),o=r(51402),a=r(71835),u=i.aTypedArray,c=i.getTypedArrayConstructor,f=i.exportTypedArrayMethod,h=RangeError,l=function(){try{new Int8Array(1).with(2,{valueOf:function(){throw 8}})}catch(t){return 8===t}}(),g=l&&function(){try{new Int8Array(1).with(-.5,1)}catch(t){return!0}}();f("with",{with:function(t,e){var r=u(this),i=s(r),f=o(t),l=f<0?i+f:f,g=n(r)?a(e):+e;if(l>=i||l<0)throw new h("Incorrect index");for(var p=new(c(r))(i),d=0;d<i;d++)p[d]=d===l?g:r[d];return p}}.with,!l||g)},29319(t,e,r){"use strict";var i=r(11187),n=r(4127),s=r(63027),o=r(42293),a=r(53919),u=r(63074),c=r(72850),f=r(88035),h=c.i2c,l=c.i2cUrl,g=Math.floor,p=Math.ceil,d=s("".charAt),m=n.Uint8Array,y=n.Array,b=s([].join),v=!m||!m.prototype.toBase64||!function(){try{(new m).toBase64(null)}catch(t){return!0}}();m&&i({target:"Uint8Array",proto:!0,forced:v},{toBase64:function(){var t=a(this),e=arguments.length?o(arguments[0]):void 0,r="base64"===f(e)?h:l,i=!!e&&!!e.omitPadding;u(this.buffer);for(var n,s=0,c=t.length,m=y(i?4*g(c/3)+(c%3?c%3+1:0):4*p(c/3)),v=0,w=function(t){return d(r,n>>6*t&63)};s+2<c;s+=3)n=(t[s]<<16)+(t[s+1]<<8)+t[s+2],m[v++]=w(3),m[v++]=w(2),m[v++]=w(1),m[v++]=w(0);return s+2===c?(n=(t[s]<<16)+(t[s+1]<<8),m[v++]=w(3),m[v++]=w(2),m[v++]=w(1),i||(m[v++]="=")):s+1===c&&(n=t[s]<<16,m[v++]=w(3),m[v++]=w(2),i||(m[v++]="=",m[v++]="=")),b(m,"")}})},87199(t,e,r){"use strict";var i=r(11187),n=r(4127),s=r(63027),o=r(53919),a=r(63074),u=s(1.1.toString),c=s([].join),f=Array,h=n.Uint8Array,l=!h||!h.prototype.toHex||!function(){try{return"ffffffffffffffff"===new h([255,255,255,255,255,255,255,255]).toHex()}catch(t){return!1}}();h&&i({target:"Uint8Array",proto:!0,forced:l},{toHex:function(){o(this),a(this.buffer);for(var t=f(this.length),e=0,r=this.length;e<r;e++){var i=u(this[e],16);t[e]=1===i.length?"0"+i:i}return c(t,"")}})},88019(t,e,r){"use strict";r(47144)},1909(t,e,r){"use strict";r(25744)},67288(t,e,r){"use strict";r(65337)},75328(t,e,r){"use strict";r(8021)},32145(t,e,r){"use strict";r(89542)},65081(t,e,r){"use strict";r(61696)},41118(t,e,r){"use strict";r(24791)},51960(t,e,r){"use strict";r(53457)},75409(t,e,r){"use strict";r(73532)},11176(t,e,r){"use strict";r(34737)},91543(t,e,r){"use strict";r(4666)},85628(t,e,r){"use strict";r(77809)},19254(t,e,r){"use strict";r(92653)},97978(t,e,r){"use strict";r(29319)},15900(t,e,r){"use strict";r(87199)}};const e={};function r(i){const n=e[i];if(void 0!==n)return n.exports;const s=e[i]={exports:{}};return t[i].call(s.exports,s,s.exports,r),s.exports}r(97700),r(99921),r(34602),r(88019),r(1909),r(67288),r(75328),r(32145),r(65081),r(41118),r(51960),r(75409),r(11176),r(91543),r(85628),r(19254),r(97978),r(15900),(()=>{var t={1852(t,e){"use strict";e.byteLength=function(t){var e=a(t),r=e[0],i=e[1];return 3*(r+i)/4-i},e.toByteArray=function(t){var e,r,s=a(t),o=s[0],u=s[1],c=new n(function(t,e,r){return 3*(e+r)/4-r}(0,o,u)),f=0,h=u>0?o-4:o;for(r=0;r<h;r+=4)e=i[t.charCodeAt(r)]<<18|i[t.charCodeAt(r+1)]<<12|i[t.charCodeAt(r+2)]<<6|i[t.charCodeAt(r+3)],c[f++]=e>>16&255,c[f++]=e>>8&255,c[f++]=255&e;return 2===u&&(e=i[t.charCodeAt(r)]<<2|i[t.charCodeAt(r+1)]>>4,c[f++]=255&e),1===u&&(e=i[t.charCodeAt(r)]<<10|i[t.charCodeAt(r+1)]<<4|i[t.charCodeAt(r+2)]>>2,c[f++]=e>>8&255,c[f++]=255&e),c},e.fromByteArray=function(t){for(var e,i=t.length,n=i%3,s=[],o=16383,a=0,u=i-n;a<u;a+=o)s.push(c(t,a,a+o>u?u:a+o));return 1===n?(e=t[i-1],s.push(r[e>>2]+r[e<<4&63]+"==")):2===n&&(e=(t[i-2]<<8)+t[i-1],s.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"=")),s.join("")};for(var r=[],i=[],n="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0;o<64;++o)r[o]=s[o],i[s.charCodeAt(o)]=o;function a(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function u(t){return r[t>>18&63]+r[t>>12&63]+r[t>>6&63]+r[63&t]}function c(t,e,r){for(var i,n=[],s=e;s<r;s+=3)i=(t[s]<<16&16711680)+(t[s+1]<<8&65280)+(255&t[s+2]),n.push(u(i));return n.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},4030(t,e,r){"use strict";var i=r(1852),n=r(8821),s="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=u,e.INSPECT_MAX_BYTES=50;var o=2147483647;function a(t){if(t>
vendor: 9,923 bytes, line 2
2o)throw new RangeError('The value "'+t+'" is invalid for option "size"');var e=new Uint8Array(t);return Object.setPrototypeOf(e,u.prototype),e}function u(t,e,r){if("number"==typeof t){if("string"==typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return h(t)}return c(t,e,r)}function c(t,e,r){if("string"==typeof t)return function(t,e){if("string"==typeof e&&""!==e||(e="utf8"),!u.isEncoding(e))throw new TypeError("Unknown encoding: "+e);var r=0|d(t,e),i=a(r),n=i.write(t,e);return n!==r&&(i=i.slice(0,n)),i}(t,e);if(ArrayBuffer.isView(t))return function(t){if(z(t,Uint8Array)){var e=new Uint8Array(t);return g(e.buffer,e.byteOffset,e.byteLength)}return l(t)}(t);if(null==t)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(z(t,ArrayBuffer)||t&&z(t.buffer,ArrayBuffer))return g(t,e,r);if("undefined"!=typeof SharedArrayBuffer&&(z(t,SharedArrayBuffer)||t&&z(t.buffer,SharedArrayBuffer)))return g(t,e,r);if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');var i=t.valueOf&&t.valueOf();if(null!=i&&i!==t)return u.from(i,e,r);var n=function(t){if(u.isBuffer(t)){var e=0|p(t.length),r=a(e);return 0===r.length||t.copy(r,0,0,e),r}return void 0!==t.length?"number"!=typeof t.length||j(t.length)?a(0):l(t):"Buffer"===t.type&&Array.isArray(t.data)?l(t.data):void 0}(t);if(n)return n;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return u.from(t[Symbol.toPrimitive]("string"),e,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function f(t){if("number"!=typeof t)throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function h(t){return f(t),a(t<0?0:0|p(t))}function l(t){for(var e=t.length<0?0:0|p(t.length),r=a(e),i=0;i<e;i+=1)r[i]=255&t[i];return r}function g(t,e,r){if(e<0||t.byteLength<e)throw new RangeError('"offset" is outside of buffer bounds');if(t.byteLength<e+(r||0))throw new RangeError('"length" is outside of buffer bounds');var i;return i=void 0===e&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,e):new Uint8Array(t,e,r),Object.setPrototypeOf(i,u.prototype),i}function p(t){if(t>=o)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return 0|t}function d(t,e){if(u.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||z(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);var r=t.length,i=arguments.length>2&&!0===arguments[2];if(!i&&0===r)return 0;for(var n=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return k(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return B(t).length;default:if(n)return i?-1:k(t).length;e=(""+e).toLowerCase(),n=!0}}function m(t,e,r){var i=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return D(this,e,r);case"utf8":case"utf-8":return O(this,e,r);case"ascii":return P(this,e,r);case"latin1":case"binary":return R(this,e,r);case"base64":return I(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return U(this,e,r);default:if(i)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),i=!0}}function y(t,e,r){var i=t[e];t[e]=t[r],t[r]=i}function b(t,e,r,i,n){if(0===t.length)return-1;if("string"==typeof r?(i=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),j(r=+r)&&(r=n?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(n)return-1;r=t.length-1}else if(r<0){if(!n)return-1;r=0}if("string"==typeof e&&(e=u.from(e,i)),u.isBuffer(e))return 0===e.length?-1:v(t,e,r,i,n);if("number"==typeof e)return e&=255,"function"==typeof Uint8Array.prototype.indexOf?n?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):v(t,[e],r,i,n);throw new TypeError("val must be string, number or Buffer")}function v(t,e,r,i,n){var s,o=1,a=t.length,u=e.length;if(void 0!==i&&("ucs2"===(i=String(i).toLowerCase())||"ucs-2"===i||"utf16le"===i||"utf-16le"===i)){if(t.length<2||e.length<2)return-1;o=2,a/=2,u/=2,r/=2}function c(t,e){return 1===o?t[e]:t.readUInt16BE(e*o)}if(n){var f=-1;for(s=r;s<a;s++)if(c(t,s)===c(e,-1===f?0:s-f)){if(-1===f&&(f=s),s-f+1===u)return f*o}else-1!==f&&(s-=s-f),f=-1}else for(r+u>a&&(r=a-u),s=r;s>=0;s--){for(var h=!0,l=0;l<u;l++)if(c(t,s+l)!==c(e,l)){h=!1;break}if(h)return s}return-1}function w(t,e,r,i){r=Number(r)||0;var n=t.length-r;i?(i=Number(i))>n&&(i=n):i=n;var s=e.length;i>s/2&&(i=s/2);for(var o=0;o<i;++o){var a=parseInt(e.substr(2*o,2),16);if(j(a))return o;t[r+o]=a}return o}function E(t,e,r,i){return X(k(e,t.length-r),t,r,i)}function T(t,e,r,i){return X(function(t){for(var e=[],r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}(e),t,r,i)}function A(t,e,r,i){return X(B(e),t,r,i)}function S(t,e,r,i){return X(function(t,e){for(var r,i,n,s=[],o=0;o<t.length&&!((e-=2)<0);++o)i=(r=t.charCodeAt(o))>>8,n=r%256,s.push(n),s.push(i);return s}(e,t.length-r),t,r,i)}function I(t,e,r){return 0===e&&r===t.length?i.fromByteArray(t):i.fromByteArray(t.slice(e,r))}function O(t,e,r){r=Math.min(t.length,r);for(var i=[],n=e;n<r;){var s,o,a,u,c=t[n],f=null,h=c>239?4:c>223?3:c>191?2:1;if(n+h<=r)switch(h){case 1:c<128&&(f=c);break;case 2:128==(192&(s=t[n+1]))&&(u=(31&c)<<6|63&s)>127&&(f=u);break;case 3:s=t[n+1],o=t[n+2],128==(192&s)&&128==(192&o)&&(u=(15&c)<<12|(63&s)<<6|63&o)>2047&&(u<55296||u>57343)&&(f=u);break;case 4:s=t[n+1],o=t[n+2],a=t[n+3],128==(192&s)&&128==(192&o)&&128==(192&a)&&(u=(15&c)<<18|(63&s)<<12|(63&o)<<6|63&a)>65535&&u<1114112&&(f=u)}null===f?(f=65533,h=1):f>65535&&(f-=65536,i.push(f>>>10&1023|55296),f=56320|1023&f),i.push(f),n+=h}return function(t){var e=t.length;if(e<=x)return String.fromCharCode.apply(String,t);for(var r="",i=0;i<e;)r+=String.fromCharCode.apply(String,t.slice(i,i+=x));return r}(i)}u.TYPED_ARRAY_SUPPORT=function(){try{var t=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(t,e),42===t.foo()}catch(t){return!1}}(),u.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(u.prototype,"parent",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.buffer}}),Object.defineProperty(u.prototype,"offset",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.byteOffset}}),u.poolSize=8192,u.from=function(t,e,r){return c(t,e,r)},Object.setPrototypeOf(u.prototype,Uint8Array.prototype),Object.setPrototypeOf(u,Uint8Array),u.alloc=function(t,e,r){return function(t,e,r){return f(t),t<=0?a(t):void 0!==e?"string"==typeof r?a(t).fill(e,r):a(t).fill(e):a(t)}(t,e,r)},u.allocUnsafe=function(t){return h(t)},u.allocUnsafeSlow=function(t){return h(t)},u.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==u.prototype},u.compare=function(t,e){if(z(t,Uint8Array)&&(t=u.from(t,t.offset,t.byteLength)),z(e,Uint8Array)&&(e=u.from(e,e.offset,e.byteLength)),!u.isBuffer(t)||!u.isBuffer(e))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===e)return 0;for(var r=t.length,i=e.length,n=0,s=Math.min(r,i);n<s;++n)if(t[n]!==e[n]){r=t[n],i=e[n];break}return r<i?-1:i<r?1:0},u.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},u.concat=function(t,e){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return u.alloc(0);var r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;var i=u.allocUnsafe(e),n=0;for(r=0;r<t.length;++r){var s=t[r];if(z(s,Uint8Array))n+s.length>i.length?u.from(s).copy(i,n):Uint8Array.prototype.set.call(i,s,n);else{if(!u.isBuffer(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(i,n)}n+=s.length}return i},u.byteLength=d,u.prototype._isBuffer=!0,u.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)y(this,e,e+1);return this},u.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)y(this,e,e+3),y(this,e+1,e+2);return this},u.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)y(this,e,e+7),y(this,e+1,e+6),y(this,e+2,e+5),y(this,e+3,e+4);return this},u.prototype.toString=function(){var t=this.length;return 0===t?"":0===arguments.length?O(this,0,t):m.apply(this,arguments)},u.prototype.toLocaleString=u.prototype.toString,u.prototype.equals=function(t){if(!u.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===u.compare(this,t)},u.prototype.inspect=function(){var t="",r=e.INSPECT_MAX_BYTES;return t=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(t+=" ... "),"<Buffer "+t+">"},s&&(u.prototype[s]=u.prototype.inspect),u.prototype.compare=function(t,e,r,i,n){if(z(t,Uint8Array)&&(t=u.from(t,t.offset,t.byteLength)),!u.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);
vendor: 9,222 bytes, line 2
2if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===i&&(i=0),void 0===n&&(n=this.length),e<0||r>t.length||i<0||n>this.length)throw new RangeError("out of range index");if(i>=n&&e>=r)return 0;if(i>=n)return-1;if(e>=r)return 1;if(this===t)return 0;for(var s=(n>>>=0)-(i>>>=0),o=(r>>>=0)-(e>>>=0),a=Math.min(s,o),c=this.slice(i,n),f=t.slice(e,r),h=0;h<a;++h)if(c[h]!==f[h]){s=c[h],o=f[h];break}return s<o?-1:o<s?1:0},u.prototype.includes=function(t,e,r){return-1!==this.indexOf(t,e,r)},u.prototype.indexOf=function(t,e,r){return b(this,t,e,r,!0)},u.prototype.lastIndexOf=function(t,e,r){return b(this,t,e,r,!1)},u.prototype.write=function(t,e,r,i){if(void 0===e)i="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)i=e,r=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e>>>=0,isFinite(r)?(r>>>=0,void 0===i&&(i="utf8")):(i=r,r=void 0)}var n=this.length-e;if((void 0===r||r>n)&&(r=n),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var s=!1;;)switch(i){case"hex":return w(this,t,e,r);case"utf8":case"utf-8":return E(this,t,e,r);case"ascii":case"latin1":case"binary":return T(this,t,e,r);case"base64":return A(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,t,e,r);default:if(s)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),s=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var x=4096;function P(t,e,r){var i="";r=Math.min(t.length,r);for(var n=e;n<r;++n)i+=String.fromCharCode(127&t[n]);return i}function R(t,e,r){var i="";r=Math.min(t.length,r);for(var n=e;n<r;++n)i+=String.fromCharCode(t[n]);return i}function D(t,e,r){var i=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>i)&&(r=i);for(var n="",s=e;s<r;++s)n+=V[t[s]];return n}function U(t,e,r){for(var i=t.slice(e,r),n="",s=0;s<i.length-1;s+=2)n+=String.fromCharCode(i[s]+256*i[s+1]);return n}function N(t,e,r){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}function C(t,e,r,i,n,s){if(!u.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>n||e<s)throw new RangeError('"value" argument is out of bounds');if(r+i>t.length)throw new RangeError("Index out of range")}function M(t,e,r,i,n,s){if(r+i>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function L(t,e,r,i,s){return e=+e,r>>>=0,s||M(t,0,r,4),n.write(t,e,r,i,23,4),r+4}function F(t,e,r,i,s){return e=+e,r>>>=0,s||M(t,0,r,8),n.write(t,e,r,i,52,8),r+8}u.prototype.slice=function(t,e){var r=this.length;(t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e<t&&(e=t);var i=this.subarray(t,e);return Object.setPrototypeOf(i,u.prototype),i},u.prototype.readUintLE=u.prototype.readUIntLE=function(t,e,r){t>>>=0,e>>>=0,r||N(t,e,this.length);for(var i=this[t],n=1,s=0;++s<e&&(n*=256);)i+=this[t+s]*n;return i},u.prototype.readUintBE=u.prototype.readUIntBE=function(t,e,r){t>>>=0,e>>>=0,r||N(t,e,this.length);for(var i=this[t+--e],n=1;e>0&&(n*=256);)i+=this[t+--e]*n;return i},u.prototype.readUint8=u.prototype.readUInt8=function(t,e){return t>>>=0,e||N(t,1,this.length),this[t]},u.prototype.readUint16LE=u.prototype.readUInt16LE=function(t,e){return t>>>=0,e||N(t,2,this.length),this[t]|this[t+1]<<8},u.prototype.readUint16BE=u.prototype.readUInt16BE=function(t,e){return t>>>=0,e||N(t,2,this.length),this[t]<<8|this[t+1]},u.prototype.readUint32LE=u.prototype.readUInt32LE=function(t,e){return t>>>=0,e||N(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},u.prototype.readUint32BE=u.prototype.readUInt32BE=function(t,e){return t>>>=0,e||N(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},u.prototype.readIntLE=function(t,e,r){t>>>=0,e>>>=0,r||N(t,e,this.length);for(var i=this[t],n=1,s=0;++s<e&&(n*=256);)i+=this[t+s]*n;return i>=(n*=128)&&(i-=Math.pow(2,8*e)),i},u.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||N(t,e,this.length);for(var i=e,n=1,s=this[t+--i];i>0&&(n*=256);)s+=this[t+--i]*n;return s>=(n*=128)&&(s-=Math.pow(2,8*e)),s},u.prototype.readInt8=function(t,e){return t>>>=0,e||N(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},u.prototype.readInt16LE=function(t,e){t>>>=0,e||N(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(t,e){t>>>=0,e||N(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(t,e){return t>>>=0,e||N(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},u.prototype.readInt32BE=function(t,e){return t>>>=0,e||N(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},u.prototype.readFloatLE=function(t,e){return t>>>=0,e||N(t,4,this.length),n.read(this,t,!0,23,4)},u.prototype.readFloatBE=function(t,e){return t>>>=0,e||N(t,4,this.length),n.read(this,t,!1,23,4)},u.prototype.readDoubleLE=function(t,e){return t>>>=0,e||N(t,8,this.length),n.read(this,t,!0,52,8)},u.prototype.readDoubleBE=function(t,e){return t>>>=0,e||N(t,8,this.length),n.read(this,t,!1,52,8)},u.prototype.writeUintLE=u.prototype.writeUIntLE=function(t,e,r,i){t=+t,e>>>=0,r>>>=0,i||C(this,t,e,r,Math.pow(2,8*r)-1,0);var n=1,s=0;for(this[e]=255&t;++s<r&&(n*=256);)this[e+s]=t/n&255;return e+r},u.prototype.writeUintBE=u.prototype.writeUIntBE=function(t,e,r,i){t=+t,e>>>=0,r>>>=0,i||C(this,t,e,r,Math.pow(2,8*r)-1,0);var n=r-1,s=1;for(this[e+n]=255&t;--n>=0&&(s*=256);)this[e+n]=t/s&255;return e+r},u.prototype.writeUint8=u.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||C(this,t,e,1,255,0),this[e]=255&t,e+1},u.prototype.writeUint16LE=u.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||C(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},u.prototype.writeUint16BE=u.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||C(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},u.prototype.writeUint32LE=u.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||C(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},u.prototype.writeUint32BE=u.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||C(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},u.prototype.writeIntLE=function(t,e,r,i){if(t=+t,e>>>=0,!i){var n=Math.pow(2,8*r-1);C(this,t,e,r,n-1,-n)}var s=0,o=1,a=0;for(this[e]=255&t;++s<r&&(o*=256);)t<0&&0===a&&0!==this[e+s-1]&&(a=1),this[e+s]=(t/o|0)-a&255;return e+r},u.prototype.writeIntBE=function(t,e,r,i){if(t=+t,e>>>=0,!i){var n=Math.pow(2,8*r-1);C(this,t,e,r,n-1,-n)}var s=r-1,o=1,a=0;for(this[e+s]=255&t;--s>=0&&(o*=256);)t<0&&0===a&&0!==this[e+s+1]&&(a=1),this[e+s]=(t/o|0)-a&255;return e+r},u.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||C(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},u.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||C(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},u.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||C(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},u.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||C(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},u.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||C(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},u.prototype.writeFloatLE=function(t,e,r){return L(this,t,e,!0,r)},u.prototype.writeFloatBE=function(t,e,r){return L(this,t,e,!1,r)},u.prototype.writeDoubleLE=function(t,e,r){return F(this,t,e,!0,r)},u.prototype.writeDoubleBE=function(t,e,r){return F(this,t,e,!1,r)},u.prototype.copy=function(t,e,r,i){if(!u.isBuffer(t))throw new TypeError("argument should be a Buffer");if(r||(r=0),i||0===i||(i=this.length),e>=t.length&&(e=t.length),e||(e=0),i>0&&i<r&&(i=r),i===r)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),t.length-e<i-r&&(i=t.length-e+r);var n=i-r;return this===t&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(e,r,i):Uint8Array.prototype.set.call(t,this.subarray(r,i),e),n},u.prototype.fill=function(t,e,r,i){if("string"==typeof t){if("string"==typeof e?(i=e,e=0,r=this.length):"string"==typeof r&&(i=r,r=this.length),void 0!==i&&"string"!=typeof i)throw new TypeError("encoding must be a string");if("string"==typeof i&&!u.isEncoding(i))throw new TypeError("Unknown encoding: "+i);if(1===t.length){var n=t.charCodeAt(0);("utf8"===i&&n<128||"latin1"===i)&&(t=n)}}else"number"==typeof t?t&=255:"boolean"==typeof t&&(t=Number(t));if(e<0||this.length<e||this.length<r)throw new RangeError("Out of range index");if(r<=e)return this;var s;if(e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(s=e;s<r;++s)this[s]=t;
2else{var o=u.isBuffer(t)?t:u.from(t,i),a=o.length;if(0===a)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(s=0;s<r-e;++s)this[s+e]=o[s%a]}return this};var $=/[^+/0-9A-Za-z-_]/g;function k(t,e){var r;e=e||1/0;for(var i=t.length,n=null,s=[],o=0;o<i;++o){if((r=t.charCodeAt(o))>55295&&r<57344){if(!n){if(r>56319){(e-=3)>-1&&s.push(239,191,189);continue}if(o+1===i){(e-=3)>-1&&s.push(239,191,189);continue}n=r;continue}if(r<56320){(e-=3)>-1&&s.push(239,191,189),n=r;continue}r=65536+(n-55296<<10|r-56320)}else n&&(e-=3)>-1&&s.push(239,191,189);if(n=null,r<128){if((e-=1)<0)break;s.push(r)}else if(r<2048){if((e-=2)<0)break;s.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;s.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;s.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return s}function B(t){return i.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace($,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function X(t,e,r,i){for(var n=0;n<i&&!(n+r>=e.length||n>=t.length);++n)e[n+r]=t[n];return n}function z(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function j(t){return t!=t}var V=function(){for(var t="0123456789abcdef",e=new Array(256),r=0;r<16;++r)for(var i=16*r,n=0;n<16;++n)e[i+n]=t[r]+t[n];return e}()},7391(t){var e;e="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t.exports=e},8821(t,e){e.read=function(t,e,r,i,n){var s,o,a=8*n-i-1,u=(1<<a)-1,c=u>>1,f=-7,h=r?n-1:0,l=r?-1:1,g=t[e+h];for(h+=l,s=g&(1<<-f)-1,g>>=-f,f+=a;f>0;s=256*s+t[e+h],h+=l,f-=8);for(o=s&(1<<-f)-1,s>>=-f,f+=i;f>0;o=256*o+t[e+h],h+=l,f-=8);if(0===s)s=1-c;else{if(s===u)return o?NaN:1/0*(g?-1:1);o+=Math.pow(2,i),s-=c}return(g?-1:1)*o*Math.pow(2,s-i)},e.write=function(t,e,r,i,n,s){var o,a,u,c=8*s-n-1,f=(1<<c)-1,h=f>>1,l=23===n?Math.pow(2,-24)-Math.pow(2,-77):0,g=i?0:s-1,p=i?1:-1,d=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,o=f):(o=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-o))<1&&(o--,u*=2),(e+=o+h>=1?l/u:l*Math.pow(2,1-h))*u>=2&&(o++,u/=2),o+h>=f?(a=0,o=f):o+h>=1?(a=(e*u-1)*Math.pow(2,n),o+=h):(a=e*Math.pow(2,h-1)*Math.pow(2,n),o=0));n>=8;t[r+g]=255&a,g+=p,a/=256,n-=8);for(o=o<<n|a,c+=n;c>0;t[r+g]=255&o,g+=p,o/=256,c-=8);t[r+g-p]|=128*d}}};const e={};function r(i){const n=e[i];if(void 0!==n)return n.exports;const s=e[i]={exports:{}};return t[i](s,s.exports,r),s.exports}r.n=t=>{const e=t&&t.__esModule?()=>t.default:()=>t;return r.d(e,{a:e}),e},r.d=(t,e)=>{if(Array.isArray(e))for(var i=0;i<e.length;){var n=e[i++],s=e[i++];r.o(t,n)?0===s&&i++:0===s?Object.defineProperty(t,n,{enumerable:!0,value:e[i++]}):Object.defineProperty(t,n,{enumerable:!0,get:s})}else for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=(t,e)=>Object.hasOwn(t,e);let i={};(()=>{"use strict";r.d(i,{Ed:()=>_});const t="avc1.4D001E";class e{constructor(t){this.config=t}get console(){return this.config.runtime.console}extractNALUnits(t){try{if(this.config.debug){const e=new DataView(t);if(t.byteLength>=4){const r=[];for(let i=0;i<Math.min(16,t.byteLength);i++)r.push(e.getUint8(i).toString(16).padStart(2,"0"));this.console.info(`Erste Bytes des Fragments: ${r.join(" ")}`)}}const e=new Uint8Array(t);return 71!==e[0]?(this.config.debug&&this.console.error("Kein gültiges MPEG-TS Format gefunden"),[]):(this.config.debug&&this.console.info(`MPEG-TS Format erkannt. TS-Daten: ${e.byteLength} Bytes`),this.extractNALUnitsFromTS(e))}catch(t){return this.config.debug&&this.console.error(`Fehler bei der TS-Verarbeitung: ${t instanceof Error?t.message:String(t)}`),[]}}extractNALUnitsFromTS(t){try{const e=188,r=[0,0,1],i=new Set,n=[];let s=0,o=-1;this.config.debug&&this.console.log(`Looking for video PID in ${t.length} bytes (${t.length/e} packets)`);for(let n=0;n<t.length&&!(n+e>t.length);n+=e){if(71!==t[n])continue;const s=(31&t[n+1])<<8|t[n+2],o=(48&t[n+3])>>4;
2if(!(64&~t[n+1]||1!==o&&3!==o)){let a=4;if(2&o&&(a+=t[n+4]+1),a<e&&t[n+a]===r[0]&&t[n+a+1]===r[1]&&t[n+a+2]===r[2]){const e=t[n+a+3];(e>=224&&e<=239||253===e)&&(i.add(s),this.config.debug&&this.console.log(`Identified video PID: ${s.toString(16)}`))}}}this.config.debug&&this.console.log(`Processing ${i.size} potential video PIDs`);for(let a=0;a<t.length&&!(a+e>t.length);a+=e){if(71!==t[a])continue;const u=(31&t[a+1])<<8|t[a+2];if(i.size>0&&!i.has(u))continue;if(-1!==o&&o!==u)continue;o=u;const c=!(64&~t[a+1]),f=(48&t[a+3])>>4;if(0===f||2===f)continue;let h=4;if(2&f){const r=t[a+4];if(!(r>=0&&a+4+r<t.length))continue;if(h+=r+1,h>=e)continue}const l=t.slice(a+h,a+e);if(c){if(n.length>0){const t=new Uint8Array(s);let e=0;for(const r of n)t.set(r,e),e+=r.length;const r=this.findNALUnits(t);if(r.length>0)return r}if(n.length=0,s=0,l.length>3&&l[0]===r[0]&&l[1]===r[1]&&l[2]===r[2]&&l.length>=9){const t=l[3];if(t>=224&&t<=239||253===t){const t=l[8];if(9+t<=l.length){const e=l.slice(9+t);e.length>0&&(n.push(e),s+=e.length)}}else this.config.debug&&this.console.log(`Skipping non-video stream ID: ${t.toString(16)}`)}}else n.length>0&&(n.push(l),s+=l.length)}if(n.length>0){const t=new Uint8Array(s);let e=0;for(const r of n)t.set(r,e),e+=r.length;return this.findNALUnits(t)}return[]}catch(t){return this.config.debug&&this.console.error(`Error extracting NAL units: ${t instanceof Error?t.message:String(t)}`),[]}}findNALUnits(t){const e=[];let r=-1;for(let i=0;i<t.length-3;i++)if(0===t[i]&&0===t[i+1]&&1===t[i+2])-1!==r&&e.push(t.slice(r+3,i)),r=i,i+=2;else if(i<t.length-4&&0===t[i]&&0===t[i+1]&&0===t[i+2]&&1===t[i+3]){if(-1!==r){const n=0===t[r+2]?4:3;e.push(t.slice(r+n,i))}r=i,i+=3}if(-1!==r){const i=0===t[r+2]?4:3;e.push(t.slice(r+i))}return e}analyzeNALUnits(e,r){let i=null,n=null,s=null;const o={};let a=r.codec??t;for(const t of e){if(0===t.length)continue;const e=31&t[0];if(o[e]=(o[e]||0)+1,7===e){i=t;const e=this.extractCodecInfo(t,r.width,r.height);e&&(a=e.codec)}else 8===e?n=t:5===e&&(s=t)}return this.config.debug&&this.console.info(`NAL-Typen: ${JSON.stringify(o)}`),null===i||null===n||null===s?null:{sps:i,pps:n,idrFrame:s,typeCount:o,nalUnits:e,codec:a,width:r.width,height:r.height}}extractCodecInfo(t,e,r){if(!t||t.length<4)return null;try{const i=t[1],n=t[2],s=t[3],o=i.toString(16).padStart(2,"0").toUpperCase();return{codec:`avc1.${o}${n.toString(16).padStart(2,"0").toUpperCase()}${s.toString(16).padStart(2,"0").toUpperCase()}`,profileIdc:i,constraints:n,levelIdc:s,width:e,height:r}}catch(t){return this.config.debug&&this.console.error(`Fehler beim Extrahieren der Codec-Information: ${t instanceof Error?t.message:String(t)}`),null}}}var n=function(){function t(){this.listeners={}}var e=t.prototype;return e.on=function(t,e){this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push(e)},e.off=function(t,e){if(!this.listeners[t])return!1;var r=this.listeners[t].indexOf(e);return this.listeners[t]=this.listeners[t].slice(0),this.listeners[t].splice(r,1),r>-1},e.trigger=function(t){var e=this.listeners[t];if(e)if(2===arguments.length)for(var r=e.length,i=0;i<r;++i)e[i].call(this,arguments[1]);else for(var n=Array.prototype.slice.call(arguments,1),s=e.length,o=0;o<s;++o)e[o].apply(this,n)},e.dispose=function(){this.listeners={}},e.pipe=function(t){this.on("data",function(e){t.push(e)})},t}();function s(){return s=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var i in r)({}).hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},s.apply(null,arguments)}var o=r(7391),a=r.n(o),u=r(4030).Buffer;function c(t){for(var e,r=(e=t,a().atob?a().atob(e):u.from(e,"base64").toString("binary")),i=new Uint8Array(r.length),n=0;n<r.length;n++)i[n]=r.charCodeAt(n);return i}class f extends n{constructor(){super(),this.buffer=""}push(t){let e;for(this.buffer+=t,e=this.buffer.indexOf("\n");e>-1;e=this.buffer.indexOf("\n"))this.trigger("data",this.buffer.substring(0,e)),this.buffer=this.buffer.substring(e+1)}}const h=String.fromCharCode(9),l=function(t){const e=/([0-9.]*)?@?([0-9.]*)?/.exec(t||""),r={};return e[1]&&(r.length=parseInt(e[1],10)),e[2]&&(r.offset=parseInt(e[2],10)),r},g=function(t){const e={};if(!t)return e;const r=t.split(new RegExp('(?:^|,)((?:[^=]*)=(?:"[^"]*"|[^,]*))'));let i,n=r.length;for(;n--;)""!==r[n]&&(i=/([^=]*)=(.*)/.exec(r[n]).slice(1),i[0]=i[0].replace(/^\s+|\s+$/g,""),i[1]=i[1].replace(/^\s+|\s+$/g,""),i[1]=i[1].replace(/^['"](.*)['"]$/g,"$1"),e[i[0]]=i[1]);return e},p=t=>{const e=t.split("x"),r={};return e[0]&&(r.width=parseInt(e[0],10)),e[1]&&(r.height=parseInt(e[1],10)),r};class d extends n{constructor(){super(),this.customParsers=[],this.tagMappers=[]}push(t){let e,r;0!==(t=t.trim()).length&&("#"===t[0]?this.tagMappers.reduce((e,r)=>{const i=r(t);return i===t?e:e.concat([i])}
vendor: 4,303 bytes, line 2
2,[t]).forEach(t=>{for(let e=0;e<this.customParsers.length;e++)if(this.customParsers[e].call(this,t))return;if(0===t.indexOf("#EXT"))if(t=t.replace("\r",""),e=/^#EXTM3U/.exec(t),e)this.trigger("data",{type:"tag",tagType:"m3u"});else{if(e=/^#EXTINF:([0-9\.]*)?,?(.*)?$/.exec(t),e)return r={type:"tag",tagType:"inf"},e[1]&&(r.duration=parseFloat(e[1])),e[2]&&(r.title=e[2]),void this.trigger("data",r);if(e=/^#EXT-X-TARGETDURATION:([0-9.]*)?/.exec(t),e)return r={type:"tag",tagType:"targetduration"},e[1]&&(r.duration=parseInt(e[1],10)),void this.trigger("data",r);if(e=/^#EXT-X-VERSION:([0-9.]*)?/.exec(t),e)return r={type:"tag",tagType:"version"},e[1]&&(r.version=parseInt(e[1],10)),void this.trigger("data",r);if(e=/^#EXT-X-MEDIA-SEQUENCE:(\-?[0-9.]*)?/.exec(t),e)return r={type:"tag",tagType:"media-sequence"},e[1]&&(r.number=parseInt(e[1],10)),void this.trigger("data",r);if(e=/^#EXT-X-DISCONTINUITY-SEQUENCE:(\-?[0-9.]*)?/.exec(t),e)return r={type:"tag",tagType:"discontinuity-sequence"},e[1]&&(r.number=parseInt(e[1],10)),void this.trigger("data",r);if(e=/^#EXT-X-PLAYLIST-TYPE:(.*)?$/.exec(t),e)return r={type:"tag",tagType:"playlist-type"},e[1]&&(r.playlistType=e[1]),void this.trigger("data",r);if(e=/^#EXT-X-BYTERANGE:(.*)?$/.exec(t),e)return r=s(l(e[1]),{type:"tag",tagType:"byterange"}),void this.trigger("data",r);if(e=/^#EXT-X-ALLOW-CACHE:(YES|NO)?/.exec(t),e)return r={type:"tag",tagType:"allow-cache"},e[1]&&(r.allowed=!/NO/.test(e[1])),void this.trigger("data",r);if(e=/^#EXT-X-MAP:(.*)$/.exec(t),e){if(r={type:"tag",tagType:"map"},e[1]){const t=g(e[1]);t.URI&&(r.uri=t.URI),t.BYTERANGE&&(r.byterange=l(t.BYTERANGE))}this.trigger("data",r)}else{if(e=/^#EXT-X-STREAM-INF:(.*)$/.exec(t),e)return r={type:"tag",tagType:"stream-inf"},e[1]&&(r.attributes=g(e[1]),r.attributes.RESOLUTION&&(r.attributes.RESOLUTION=p(r.attributes.RESOLUTION)),r.attributes.BANDWIDTH&&(r.attributes.BANDWIDTH=parseInt(r.attributes.BANDWIDTH,10)),r.attributes["FRAME-RATE"]&&(r.attributes["FRAME-RATE"]=parseFloat(r.attributes["FRAME-RATE"])),r.attributes["PROGRAM-ID"]&&(r.attributes["PROGRAM-ID"]=parseInt(r.attributes["PROGRAM-ID"],10))),void this.trigger("data",r);if(e=/^#EXT-X-MEDIA:(.*)$/.exec(t),e)return r={type:"tag",tagType:"media"},e[1]&&(r.attributes=g(e[1])),void this.trigger("data",r);if(e=/^#EXT-X-ENDLIST/.exec(t),e)this.trigger("data",{type:"tag",tagType:"endlist"});else if(e=/^#EXT-X-DISCONTINUITY/.exec(t),e)this.trigger("data",{type:"tag",tagType:"discontinuity"});else{if(e=/^#EXT-X-PROGRAM-DATE-TIME:(.*)$/.exec(t),e)return r={type:"tag",tagType:"program-date-time"},e[1]&&(r.dateTimeString=e[1],r.dateTimeObject=new Date(e[1])),void this.trigger("data",r);if(e=/^#EXT-X-KEY:(.*)$/.exec(t),e)return r={type:"tag",tagType:"key"},e[1]&&(r.attributes=g(e[1]),r.attributes.IV&&("0x"===r.attributes.IV.substring(0,2).toLowerCase()&&(r.attributes.IV=r.attributes.IV.substring(2)),r.attributes.IV=r.attributes.IV.match(/.{8}/g),r.attributes.IV[0]=parseInt(r.attributes.IV[0],16),r.attributes.IV[1]=parseInt(r.attributes.IV[1],16),r.attributes.IV[2]=parseInt(r.attributes.IV[2],16),r.attributes.IV[3]=parseInt(r.attributes.IV[3],16),r.attributes.IV=new Uint32Array(r.attributes.IV))),void this.trigger("data",r);if(e=/^#EXT-X-START:(.*)$/.exec(t),e)return r={type:"tag",tagType:"start"},e[1]&&(r.attributes=g(e[1]),r.attributes["TIME-OFFSET"]=parseFloat(r.attributes["TIME-OFFSET"]),r.attributes.PRECISE=/YES/.test(r.attributes.PRECISE)),void this.trigger("data",r);if(e=/^#EXT-X-CUE-OUT-CONT:(.*)?$/.exec(t),e)return r={type:"tag",tagType:"cue-out-cont"},e[1]?r.data=e[1]:r.data="",void this.trigger("data",r);if(e=/^#EXT-X-CUE-OUT:(.*)?$/.exec(t),e)return r={type:"tag",tagType:"cue-out"},e[1]?r.data=e[1]:r.data="",void this.trigger("data",r);if(e=/^#EXT-X-CUE-IN:?(.*)?$/.exec(t),e)return r={type:"tag",tagType:"cue-in"},e[1]?r.data=e[1]:r.data="",void this.trigger("data",r);if(e=/^#EXT-X-SKIP:(.*)$/.exec(t),e&&e[1])return r={type:"tag",tagType:"skip"},r.attributes=g(e[1]),r.attributes.hasOwnProperty("SKIPPED-SEGMENTS")&&(r.attributes["SKIPPED-SEGMENTS"]=parseInt(r.attributes["SKIPPED-SEGMENTS"],10)),r.attributes.hasOwnProperty("RECENTLY-REMOVED-DATERANGES")&&(r.attributes["RECENTLY-REMOVED-DATERANGES"]=r.attributes["RECENTLY-REMOVED-DATERANGES"].split(h)),void this.trigger("data",r);
vendor: 16,804 bytes, line 2
2if(e=/^#EXT-X-PART:(.*)$/.exec(t),e&&e[1])return r={type:"tag",tagType:"part"},r.attributes=g(e[1]),["DURATION"].forEach(function(t){r.attributes.hasOwnProperty(t)&&(r.attributes[t]=parseFloat(r.attributes[t]))}),["INDEPENDENT","GAP"].forEach(function(t){r.attributes.hasOwnProperty(t)&&(r.attributes[t]=/YES/.test(r.attributes[t]))}),r.attributes.hasOwnProperty("BYTERANGE")&&(r.attributes.byterange=l(r.attributes.BYTERANGE)),void this.trigger("data",r);if(e=/^#EXT-X-SERVER-CONTROL:(.*)$/.exec(t),e&&e[1])return r={type:"tag",tagType:"server-control"},r.attributes=g(e[1]),["CAN-SKIP-UNTIL","PART-HOLD-BACK","HOLD-BACK"].forEach(function(t){r.attributes.hasOwnProperty(t)&&(r.attributes[t]=parseFloat(r.attributes[t]))}),["CAN-SKIP-DATERANGES","CAN-BLOCK-RELOAD"].forEach(function(t){r.attributes.hasOwnProperty(t)&&(r.attributes[t]=/YES/.test(r.attributes[t]))}),void this.trigger("data",r);if(e=/^#EXT-X-PART-INF:(.*)$/.exec(t),e&&e[1])return r={type:"tag",tagType:"part-inf"},r.attributes=g(e[1]),["PART-TARGET"].forEach(function(t){r.attributes.hasOwnProperty(t)&&(r.attributes[t]=parseFloat(r.attributes[t]))}),void this.trigger("data",r);if(e=/^#EXT-X-PRELOAD-HINT:(.*)$/.exec(t),e&&e[1])return r={type:"tag",tagType:"preload-hint"},r.attributes=g(e[1]),["BYTERANGE-START","BYTERANGE-LENGTH"].forEach(function(t){if(r.attributes.hasOwnProperty(t)){r.attributes[t]=parseInt(r.attributes[t],10);const e="BYTERANGE-LENGTH"===t?"length":"offset";r.attributes.byterange=r.attributes.byterange||{},r.attributes.byterange[e]=r.attributes[t],delete r.attributes[t]}}),void this.trigger("data",r);if(e=/^#EXT-X-RENDITION-REPORT:(.*)$/.exec(t),e&&e[1])return r={type:"tag",tagType:"rendition-report"},r.attributes=g(e[1]),["LAST-MSN","LAST-PART"].forEach(function(t){r.attributes.hasOwnProperty(t)&&(r.attributes[t]=parseInt(r.attributes[t],10))}),void this.trigger("data",r);if(e=/^#EXT-X-DATERANGE:(.*)$/.exec(t),e&&e[1]){r={type:"tag",tagType:"daterange"},r.attributes=g(e[1]),["ID","CLASS"].forEach(function(t){r.attributes.hasOwnProperty(t)&&(r.attributes[t]=String(r.attributes[t]))}),["START-DATE","END-DATE"].forEach(function(t){r.attributes.hasOwnProperty(t)&&(r.attributes[t]=new Date(r.attributes[t]))}),["DURATION","PLANNED-DURATION"].forEach(function(t){r.attributes.hasOwnProperty(t)&&(r.attributes[t]=parseFloat(r.attributes[t]))}),["END-ON-NEXT"].forEach(function(t){r.attributes.hasOwnProperty(t)&&(r.attributes[t]=/YES/i.test(r.attributes[t]))}),["SCTE35-CMD"," SCTE35-OUT","SCTE35-IN"].forEach(function(t){r.attributes.hasOwnProperty(t)&&(r.attributes[t]=r.attributes[t].toString(16))});const t=/^X-([A-Z]+-)+[A-Z]+$/;for(const e in r.attributes){if(!t.test(e))continue;const i=/[0-9A-Fa-f]{6}/g.test(r.attributes[e]),n=/^\d+(\.\d+)?$/.test(r.attributes[e]);r.attributes[e]=i?r.attributes[e].toString(16):n?parseFloat(r.attributes[e]):String(r.attributes[e])}return void this.trigger("data",r)}if(e=/^#EXT-X-INDEPENDENT-SEGMENTS/.exec(t),e)this.trigger("data",{type:"tag",tagType:"independent-segments"});else if(e=/^#EXT-X-I-FRAMES-ONLY/.exec(t),e)this.trigger("data",{type:"tag",tagType:"i-frames-only"});else{if(e=/^#EXT-X-CONTENT-STEERING:(.*)$/.exec(t),e)return r={type:"tag",tagType:"content-steering"},r.attributes=g(e[1]),void this.trigger("data",r);if(e=/^#EXT-X-I-FRAME-STREAM-INF:(.*)$/.exec(t),e)return r={type:"tag",tagType:"i-frame-playlist"},r.attributes=g(e[1]),r.attributes.URI&&(r.uri=r.attributes.URI),r.attributes.BANDWIDTH&&(r.attributes.BANDWIDTH=parseInt(r.attributes.BANDWIDTH,10)),r.attributes.RESOLUTION&&(r.attributes.RESOLUTION=p(r.attributes.RESOLUTION)),r.attributes["AVERAGE-BANDWIDTH"]&&(r.attributes["AVERAGE-BANDWIDTH"]=parseInt(r.attributes["AVERAGE-BANDWIDTH"],10)),r.attributes["FRAME-RATE"]&&(r.attributes["FRAME-RATE"]=parseFloat(r.attributes["FRAME-RATE"])),void this.trigger("data",r);if(e=/^#EXT-X-DEFINE:(.*)$/.exec(t),e)return r={type:"tag",tagType:"define"},r.attributes=g(e[1]),void this.trigger("data",r);this.trigger("data",{type:"tag",data:t.slice(4)})}}}}else this.trigger("data",{type:"comment",text:t.slice(1)})}):this.trigger("data",{type:"uri",uri:t}))}addParser({expression:t,customType:e,dataParser:r,segment:i}){"function"!=typeof r&&(r=t=>t),this.customParsers.push(n=>{if(t.exec(n))return this.trigger("data",{type:"custom",data:r(n),customType:e,segment:i}),!0})}addTagMapper({expression:t,map:e}){this.tagMappers.push(r=>t.test(r)?e(r):r)}}const m=function(t){const e={};return Object.keys(t).forEach(function(r){var i;e[i=r,i.toLowerCase().replace(/-(\w)/g,t=>t[1].toUpperCase())]=t[r]}),e},y=function(t){const{serverControl:e,targetDuration:r,partTargetDuration:i}=t;if(!e)return;const n="#EXT-X-SERVER-CONTROL",s="holdBack",o="partHoldBack",a=r&&3*r,u=i&&2*i;r&&!e.hasOwnProperty(s)&&(e[s]=a,this.trigger("info",{message:`${n} defaulting HOLD-BACK to targetDuration * 3 (${a}).`})),a&&e[s]<a&&(this.trigger("warn",{message:`${n} clamping HOLD-BACK (${e[s]}) to targetDuration * 3 (${a})`}),e[s]=a),i&&!e.hasOwnProperty(o)&&(e[o]=3*i,this.trigger("info",{message:`${n} defaulting PART-HOLD-BACK to partTargetDuration * 3 (${e[o]}).`})),i&&e[o]<u&&(this.trigger("warn",{message:`${n} clamping PART-HOLD-BACK (${e[o]}) to partTargetDuration * 2 (${u}).`}),e[o]=u)};class b extends n{constructor(t={}){super(),this.lineStream=new f,this.parseStream=new d,this.lineStream.pipe(this.parseStream),this.mainDefinitions=t.mainDefinitions||{},this.params=new URL(t.uri,"https://a.com").searchParams,this.lastProgramDateTime=null;const e=this,r=[];let i,n,o={},a=!1;const u=function(){},h={AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}};let l=0;this.manifest={allowCache:!0,discontinuityStarts:[],dateRanges:[],iFramePlaylists:[],segments:[]};let g=0,p=0;const b={};this.on("end",()=>{o.uri||!o.parts&&!o.preloadHints||(!o.map&&i&&(o.map=i),!o.key&&n&&(o.key=n),o.timeline||"number"!=typeof l||(o.timeline=l),this.manifest.preloadSegment=o)}),this.parseStream.on("data",function(t){let f,d;if(e.manifest.definitions)for(const r in e.manifest.definitions)if(t.uri&&(t.uri=t.uri.replace(`{$${r}}`,e.manifest.definitions[r])),t.attributes)for(const i in t.attributes)"string"==typeof t.attributes[i]&&(t.attributes[i]=t.attributes[i].replace(`{$${r}}`,e.manifest.definitions[r]));({tag(){({version(){t.version&&(this.manifest.version=t.version)},"allow-cache"(){this.manifest.allowCache=t.allowed,"allowed"in t||(this.trigger("info",{message:"defaulting allowCache to YES"}),this.manifest.allowCache=!0)},byterange(){const e={};"length"in t&&(o.byterange=e,e.length=t.length,"offset"in t||(t.offset=g)),"offset"in t&&(o.byterange=e,e.offset=t.offset),g=e.offset+e.length},endlist(){this.manifest.endList=!0},inf(){"mediaSequence"in this.manifest||(this.manifest.mediaSequence=0,this.trigger("info",{message:"defaulting media sequence to zero"})),"discontinuitySequence"in this.manifest||(this.manifest.discontinuitySequence=0,this.trigger("info",{message:"defaulting discontinuity sequence to zero"})),t.title&&(o.title=t.title),t.duration>0&&(o.duration=t.duration),0===t.duration&&(o.duration=.01,this.trigger("info",{message:"updating zero segment duration to a small value"})),this.manifest.segments=r},key(){if(t.attributes)if("NONE"!==t.attributes.METHOD)if(t.attributes.URI){if("com.apple.streamingkeydelivery"===t.attributes.KEYFORMAT)return this.manifest.contentProtection=this.manifest.contentProtection||{},void(this.manifest.contentProtection["com.apple.fps.1_0"]={attributes:t.attributes});if("com.microsoft.playready"===t.attributes.KEYFORMAT)return this.manifest.contentProtection=this.manifest.contentProtection||{},void(this.manifest.contentProtection["com.microsoft.playready"]={uri:t.attributes.URI});if("urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed"===t.attributes.KEYFORMAT)return-1===["SAMPLE-AES","SAMPLE-AES-CTR","SAMPLE-AES-CENC"].indexOf(t.attributes.METHOD)?void this.trigger("warn",{message:"invalid key method provided for Widevine"}):("SAMPLE-AES-CENC"===t.attributes.METHOD&&this.trigger("warn",{message:"SAMPLE-AES-CENC is deprecated, please use SAMPLE-AES-CTR instead"}),"data:text/plain;base64,"!==t.attributes.URI.substring(0,23)?void this.trigger("warn",{message:"invalid key URI provided for Widevine"}):t.attributes.KEYID&&"0x"===t.attributes.KEYID.substring(0,2)?(this.manifest.contentProtection=this.manifest.contentProtection||{},void(this.manifest.contentProtection["com.widevine.alpha"]={attributes:{schemeIdUri:t.attributes.KEYFORMAT,keyId:t.attributes.KEYID.substring(2)},pssh:c(t.attributes.URI.split(",")[1])})):void this.trigger("warn",{message:"invalid key ID provided for Widevine"}));t.attributes.METHOD||this.trigger("warn",{message:"defaulting key method to AES-128"}),n={method:t.attributes.METHOD||"AES-128",uri:t.attributes.URI},void 0!==t.attributes.IV&&(n.iv=t.attributes.IV)}else this.trigger("warn",{message:"ignoring key declaration without URI"});else n=null;else this.trigger("warn",{message:"ignoring key declaration without attribute list"})},"media-sequence"(){isFinite(t.number)?this.manifest.mediaSequence=t.number:this.trigger("warn",{message:"ignoring invalid media sequence: "+t.number})},"discontinuity-sequence"(){isFinite(t.number)?(this.manifest.discontinuitySequence=t.number,l=t.number):this.trigger("warn",{message:"ignoring invalid discontinuity sequence: "+t.number})},"playlist-type"(){/VOD|EVENT/.test(t.playlistType)?this.manifest.playlistType=t.playlistType:this.trigger("warn",{message:"ignoring unknown playlist type: "+t.playlist})},map(){i={},t.uri&&(i.uri=t.uri),t.byterange&&(i.byterange=t.byterange),n&&(i.key=n)},"stream-inf"(){this.manifest.playlists=r,this.manifest.mediaGroups=this.manifest.mediaGroups||h,t.attributes?(o.attributes||(o.attributes={}),s(o.attributes,t.attributes)):this.trigger("warn",{message:"ignoring empty stream-inf attributes"})},media(){if(this.manifest.mediaGroups=this.manifest.mediaGroups||h,!(t.attributes&&t.attributes.TYPE&&t.attributes["GROUP-ID"]&&t.attributes.NAME))return void this.trigger("warn",{message:"ignoring incomplete or missing media group"});const e=this.manifest.mediaGroups[t.attributes.TYPE];e[t.attributes["GROUP-ID"]]=e[t.attributes["GROUP-ID"]]||{},f=e[t.attributes["GROUP-ID"]],d={default:/yes/i.test(t.attributes.DEFAULT)},d.default?d.autoselect=!0:d.autoselect=/yes/i.test(t.attributes.AUTOSELECT),t.attributes.LANGUAGE&&(d.language=t.attributes.LANGUAGE),t.attributes.URI&&(d.uri=t.attributes.URI),t.attributes["INSTREAM-ID"]&&(d.instreamId=t.attributes["INSTREAM-ID"]),t.attributes.CHARACTERISTICS&&(d.characteristics=t.attributes.CHARACTERISTICS),t.attributes.FORCED&&(d.forced=/yes/i.test(t.attributes.FORCED)),f[t.attributes.NAME]=d},discontinuity(){l+=1,o.discontinuity=!0,this.manifest.discontinuityStarts.push(r.length)},"program-date-time"(){void 0===this.manifest.dateTimeString&&(this.manifest.dateTimeString=t.dateTimeString,this.manifest.dateTimeObject=t.dateTimeObject),o.dateTimeString=t.dateTimeString,o.dateTimeObject=t.dateTimeObject;const{lastProgramDateTime:e}=this;this.lastProgramDateTime=new Date(t.dateTimeString).getTime(),null===e&&this.manifest.segments.reduceRight((t,e)=>(e.programDateTime=t-1e3*e.duration,e.programDateTime),this.lastProgramDateTime)},targetduration(){!isFinite(t.duration)||t.duration<0?this.trigger("warn",{message:"ignoring invalid target duration: "+t.duration}):(this.manifest.targetDuration=t.duration,y.call(this,this.manifest))},start(){t.attributes&&!isNaN(t.attributes["TIME-OFFSET"])?this.manifest.start={timeOffset:t.attributes["TIME-OFFSET"],precise:t.attributes.PRECISE}:this.trigger("warn",{message:"ignoring start declaration without appropriate attribute list"})},"cue-out"(){o.cueOut=t.data},"cue-out-cont"(){o.cueOutCont=t.data},"cue-in"(){o.cueIn=t.data},skip(){this.manifest.skip=m(t.attributes),this.warnOnMissingAttributes_("#EXT-X-SKIP",t.attributes,["SKIPPED-SEGMENTS"])},part(){a=!0;const e=this.manifest.segments.length,r=m(t.attributes);o.parts=o.parts||[],o.parts.push(r),r.byterange&&(r.byterange.hasOwnProperty("offset")||(r.byterange.offset=p),p=r.byterange.offset+r.byterange.length);const i=o.parts.length-1;this.warnOnMissingAttributes_(`#EXT-X-PART #${i} for segment #${e}`,t.attributes,["URI","DURATION"]),this.manifest.renditionReports&&this.manifest.renditionReports.forEach((t,e)=>{t.hasOwnProperty("lastPart")||this.trigger("warn",{message:`#EXT-X-RENDITION-REPORT #${e} lacks required attribute(s): LAST-PART`})})},"server-control"(){const e=this.manifest.serverControl=m(t.attributes);e.hasOwnProperty("canBlockReload")||(e.canBlockReload=!1,this.trigger("info",{message:"#EXT-X-SERVER-CONTROL defaulting CAN-BLOCK-RELOAD to false"})),y.call(this,this.manifest),e.canSkipDateranges&&!e.hasOwnProperty("canSkipUntil")&&this.trigger("warn",{message:"#EXT-X-SERVER-CONTROL lacks required attribute CAN-SKIP-UNTIL which is required when CAN-SKIP-DATERANGES is set"})},"preload-hint"(){const e=this.manifest.segments.length,r=m(t.attributes),i=r.type&&"PART"===r.type;o.preloadHints=o.preloadHints||[],o.preloadHints.push(r),r.byterange&&(r.byterange.hasOwnProperty("offset")||(r.byterange.offset=i?p:0,i&&(p=r.byterange.offset+r.byterange.length)));const n=o.preloadHints.length-1;if(this.warnOnMissingAttributes_(`#EXT-X-PRELOAD-HINT #${n} for segment #${e}`,t.attributes,["TYPE","URI"]),r.type)for(let t=0;t<o.preloadHints.length-1;t++){const i=o.preloadHints[t];i.type&&i.type===r.type&&this.trigger("warn",{message:`#EXT-X-PRELOAD-HINT #${n} for segment #${e} has the same TYPE ${r.type} as preload hint #${t}`})}},"rendition-report"(){const e=m(t.attributes);this.manifest.renditionReports=this.manifest.renditionReports||[],this.manifest.renditionReports.push(e);const r=this.manifest.renditionReports.length-1,i=["LAST-MSN","URI"];a&&i.push("LAST-PART"),this.warnOnMissingAttributes_(`#EXT-X-RENDITION-REPORT #${r}`,t.attributes,i)},"part-inf"(){this.manifest.partInf=m(t.attributes),this.warnOnMissingAttributes_("#EXT-X-PART-INF",t.attributes,["PART-TARGET"]),this.manifest.partInf.partTarget&&(this.manifest.partTargetDuration=this.manifest.partInf.partTarget),y.call(this,this.manifest)},daterange(){this.manifest.dateRanges.push(m(t.attributes));const e=this.manifest.dateRanges.length-1;this.warnOnMissingAttributes_(`#EXT-X-DATERANGE #${e}`,t.attributes,["ID","START-DATE"]);const r=this.manifest.dateRanges[e];r.endDate&&r.startDate&&new Date(r.endDate)<new Date(r.startDate)&&this.trigger("warn",{message:"EXT-X-DATERANGE END-DATE must be equal to or later than the value of the START-DATE"}),r.duration&&r.duration<0&&this.trigger("warn",{message:"EXT-X-DATERANGE DURATION must not be negative"}),r.plannedDuration&&r.plannedDuration<0&&this.trigger("warn",{message:"EXT-X-DATERANGE PLANNED-DURATION must not be negative"});const i=!!r.endOnNext;if(i&&!r.class&&this.trigger("warn",{message:"EXT-X-DATERANGE with an END-ON-NEXT=YES attribute must have a CLASS attribute"}),i&&(r.duration||r.endDate)&&this.trigger("warn",{message:"EXT-X-DATERANGE with an END-ON-NEXT=YES attribute must not contain DURATION or END-DATE attributes"}),r.duration&&r.endDate){const t=r.startDate.getTime()+1e3*r.duration;this.manifest.dateRanges[e].endDate=new Date(t)}if(b[r.id]){for(const t in b[r.id])if(r[t]&&JSON.stringify(b[r.id][t])!==JSON.stringify(r[t])){this.trigger("warn",{message:"EXT-X-DATERANGE tags with the same ID in a playlist must have the same attributes values"});break}const t=this.manifest.dateRanges.findIndex(t=>t.id===r.id);this.manifest.dateRanges[t]=s(this.manifest.dateRanges[t],r),b[r.id]=s(b[r.id],r),this.manifest.dateRanges.pop()}else b[r.id]=r},"independent-segments"(){this.manifest.independentSegments=!0},"i-frames-only"(){this.manifest.iFramesOnly=!0,this.requiredCompatibilityversion(this.manifest.version,4)},"content-steering"(){this.manifest.contentSteering=m(t.attributes),this.warnOnMissingAttributes_("#EXT-X-CONTENT-STEERING",t.attributes,["SERVER-URI"])},define(){this.manifest.definitions=this.manifest.definitions||{};const e=(t,e)=>{t in this.manifest.definitions?this.trigger("error",{message:`EXT-X-DEFINE: Duplicate name ${t}`}):this.manifest.definitions[t]=e};if("QUERYPARAM"in t.attributes){if("NAME"in t.attributes||"IMPORT"in t.attributes)return void this.trigger("error",{message:"EXT-X-DEFINE: Invalid attributes"});const r=this.params.get(t.attributes.QUERYPARAM);return r?void e(t.attributes.QUERYPARAM,decodeURIComponent(r)):void this.trigger("error",{message:`EXT-X-DEFINE: No query param ${t.attributes.QUERYPARAM}`})}return"NAME"in t.attributes?"IMPORT"in t.attributes?void this.trigger("error",{message:"EXT-X-DEFINE: Invalid attributes"}):"VALUE"in t.attributes&&"string"==typeof t.attributes.VALUE?void e(t.attributes.NAME,t.attributes.VALUE):void this.trigger("error",{message:`EXT-X-DEFINE: No value for ${t.attributes.NAME}`}
2):"IMPORT"in t.attributes?this.mainDefinitions[t.attributes.IMPORT]?void e(t.attributes.IMPORT,this.mainDefinitions[t.attributes.IMPORT]):void this.trigger("error",{message:`EXT-X-DEFINE: No value ${t.attributes.IMPORT} to import, or IMPORT used on main playlist`}):void this.trigger("error",{message:"EXT-X-DEFINE: No attribute"})},"i-frame-playlist"(){this.manifest.iFramePlaylists.push({attributes:t.attributes,uri:t.uri,timeline:l}),this.warnOnMissingAttributes_("#EXT-X-I-FRAME-STREAM-INF",t.attributes,["BANDWIDTH","URI"])}}[t.tagType]||u).call(e)},uri(){o.uri=t.uri,r.push(o),this.manifest.targetDuration&&!("duration"in o)&&(this.trigger("warn",{message:"defaulting segment duration to the target duration"}),o.duration=this.manifest.targetDuration),n&&(o.key=n),o.timeline=l,i&&(o.map=i),p=0,null!==this.lastProgramDateTime&&(o.programDateTime=this.lastProgramDateTime,this.lastProgramDateTime+=1e3*o.duration),o={}},comment(){},custom(){t.segment?(o.custom=o.custom||{},o.custom[t.customType]=t.data):(this.manifest.custom=this.manifest.custom||{},this.manifest.custom[t.customType]=t.data)}})[t.type].call(e)})}requiredCompatibilityversion(t,e){(t<e||!t)&&this.trigger("warn",{message:`manifest must be at least version ${e}`})}warnOnMissingAttributes_(t,e,r){const i=[];r.forEach(function(t){e.hasOwnProperty(t)||i.push(t)}),i.length&&this.trigger("warn",{message:`${t} lacks required attribute(s): ${i.join(", ")}`})}push(t){this.lineStream.push(t)}end(){this.lineStream.push("\n"),this.manifest.dateRanges.length&&null===this.lastProgramDateTime&&this.trigger("warn",{message:"A playlist with EXT-X-DATERANGE tag must contain atleast one EXT-X-PROGRAM-DATE-TIME tag"}),this.lastProgramDateTime=null,this.trigger("end")}addParser(t){this.parseStream.addParser(t)}addTagMapper(t){this.parseStream.addTagMapper(t)}}class v{constructor(t,e){this.config=t,this.livePlaylistUpdatedCallback=e,this.initializePromise=null,this.ready=!1,this.isLive=!1,this.liveFetchHandle=-1,this.liveDateTimeCorrectionMs=0,this.liveDateTimeCorrectionPlaylistRelative=!1,this.iframePlaylistUrl=null,this.targetDuration=1,this.fragments=[],this.iframePlaylist=null,this.livePlaylistUpdateScheduler=()=>{clearTimeout(this.liveFetchHandle),this.livePlaylistUpdate().then(t=>{t?this.liveFetchHandle=globalThis.setTimeout(this.livePlaylistUpdateScheduler,this.config.playlistFetchInterval):this.config.runtime.console.info("no longer live, stopped updating")}).catch(t=>{this.config.runtime.console.warn("failed to fetch playlist updates, aborting",t)})},this.livePlaylistUpdate=async()=>{if(!this.ready||!this.isLive||!this.iframePlaylistUrl)throw new Error("invalid state");const t=await this.fetchAndParsePlaylist(this.iframePlaylistUrl,!this.isLive);if(!t)throw new Error("could not load IFrame Playlist - aborting updates");const e=this.getFragmentsFromIFrameManifest(t);return e.length>0&&(this.fragments=e,this.livePlaylistUpdatedCallback({fragments:this.fragments,targetDuration:this.targetDuration,resolution:this.iframePlaylist?.attributes.RESOLUTION??{width:0,height:0}})),!0!==t.endList}}get iFramePlaylist(){return this.iframePlaylist}async initialize(){return this.initializePromise??(this.initializePromise=this.initializeInternal()),await this.initializePromise}async initializeInternal(){if("function"!=typeof VideoDecoder)throw new Error("no VideoDecoder - no need for hls data");const t=await this.fetchAndParsePlaylist(this.config.masterPlaylistUrl,!0),e=await this.selectBestIframePlaylist(t);if(!e)throw new Error("could not find IFrame Playlist");this.iframePlaylist=e,this.iframePlaylistUrl=new URL(e.uri,this.config.masterPlaylistUrl).href;const r=await this.fetchAndParsePlaylist(this.iframePlaylistUrl,!0);if(!r)throw new Error("could not load IFrame Playlist");if(this.isLive=!(!0===r.endList||"VOD"===r.playlistType||-1===(r.mediaSequence??-1)),this.isLive){const e=t.playlists?.find(t=>"string"==typeof t.uri)?.uri??null;if(this.config.debug&&this.config.runtime.console.info("try to get datetime from",e),e)try{const t=await fetch(new URL(e,this.config.masterPlaylistUrl).href,{headers:{Range:"bytes=0-300"},priority:"high",cache:"no-cache"}),r=await t.text(),i=/^#EXT-X-PROGRAM-DATE-TIME:(.+)$/gmu.exec(r)?.[1]??null;if(i){const t=new Date(i).getTime();isNaN(t)?this.config.debug&&this.config.runtime.console.warn(`invali
2d date ${i}`):(this.liveDateTimeCorrectionMs=Date.now()-t,this.config.debug&&this.config.runtime.console.info(`got live playlist start date: ${i} - local clock diff ${this.liveDateTimeCorrectionMs/1e3}s`))}else this.config.debug&&this.config.runtime.console.warn("no datetime found in",r)}catch(t){this.config.debug&&this.config.runtime.console.warn("could not get datetime from regular playlist",t)}}if(this.fragments=this.getFragmentsFromIFrameManifest(r),this.fragments.length>0)return this.ready=!0,this.isLive&&(this.liveFetchHandle=globalThis.setTimeout(this.livePlaylistUpdateScheduler,this.config.playlistFetchInterval)),{fragments:this.fragments,targetDuration:this.targetDuration,resolution:e.attributes.RESOLUTION??{width:0,height:0}};throw new Error("could not initialize")}dispose(){clearTimeout(this.liveFetchHandle)}async fetchAndParsePlaylist(t,e){try{return this.parseM3u8(await this.fetchPlaylist(t,e),t)}catch(e){throw this.config.runtime.console.error(`could not load playlist ${t}:`,e),e}}async fetchPlaylist(t,e){for(let r=0;r<this.config.maxRetries;r++){const r=new AbortController,i=globalThis.setTimeout(()=>{r.abort()},this.config.networkTimeout),n=await fetch(t,{signal:r.signal,cache:e?"default":"no-cache"});if(clearTimeout(i),n.ok)return await n.text()}throw new Error("could not load playlist")}parseM3u8(t,e){const r=new b;return r.push(t),r.end(),this.config.debug&&this.config.runtime.console.log(`parsed playlist: ${e}`),r.manifest}async selectBestIframePlaylist(e){this.config.runtime.console.info(`${e.iFramePlaylists.length} iframe playlists in manifest`);const r=e.iFramePlaylists.map(async e=>{if(!/^avc|he?vc.*/iu.test(e.attributes.CODECS??""))return this.config.runtime.console.warn("invalid codec in playlist",e),null;const r={codec:e.attributes.CODECS??t,codedWidth:e.attributes.RESOLUTION?.width,codedHeight:e.attributes.RESOLUTION?.height},i=await VideoDecoder.isConfigSupported(r);return this.config.runtime.console.info("codec check: "+(i.supported?"supported":"not supported"),r),i.supported?e:null}),i=(await Promise.all(r)).filter(t=>null!==t);if(i.length>0){this.config.runtime.console.info(`${i.length} iframe playlists supported by decoder`);const t=i.filter(t=>t.attributes?.RESOLUTION?.width&&t.attributes?.RESOLUTION?.height).sort((t,e)=>t.attributes.RESOLUTION.width*t.attributes.RESOLUTION.height-e.attributes.RESOLUTION.width*e.attributes.RESOLUTION.height)[0]??i[0];return this.config.runtime.console.info(`selected I-Frame-Playlist: ${t.attributes.RESOLUTION?.width??"-"}x${t.attributes.RESOLUTION?.height??"-"}, ${t.attributes.BANDWIDTH??"-"} bps`),t}throw new Error("no supported iframe playlist found in manifest")}getFragmentsFromIFrameManifest(t){const e=this.iframePlaylistUrl;if(null===e)return[];const r=[];this.targetDuration=t.targetDuration??t.segments[0]?.duration??10;const i=this.targetDuration,n=t.segments.reduce((t,e)=>t+(e.duration??i),0),s=Math.round(n/t.segments.length);let o=0,a=!1;if(this.isLive){let e;t.segments?.[0]?.dateTimeString?(a=!0,e=new Date(t.segments[0].dateTimeString),this.config.debug&&this.config.runtime.console.info(`got playlist start datetime: ${e.toISOString()}`)):0!==this.liveDateTimeCorrectionMs?(this.liveDateTimeCorrectionPlaylistRelative||(this.liveDateTimeCorrectionMs>=1e3*n*1.5&&(this.liveDateTimeCorrectionMs=0,this.config.debug&&this.config.runtime.console.warn("discarding grossly mismatched realtime correction")),this.liveDateTimeCorrectionMs=-this.liveDateTimeCorrectionMs+1e3*n,this.liveDateTimeCorrectionPlaylistRelative=!0,this.config.debug&&this.config.runtime.console.info(`got playlist duration: ${n} - correct device clock by ${this.liveDateTimeCorrectionMs}ms`)),e=new Date(Date.now()-1e3*n-this.liveDateTimeCorrectionMs)):e=new Date(Date.now()-1e3*n),this.config.debug&&this.config.runtime.console.info(`window will start at: ${e.toISOString()}`),o=e.getTime()/1e3|0}this.targetDuration=Math.max(Math.ceil(this.config.minimumFrameTimeOffsetSeconds/s)*s,Math.ceil(n/this.config.maximumFrameCount/s)*s),this.config.debug&&this.config.runtime.console.info(`processing ${t.segments.length} fragments (${n}s), manifest targetDuration ${i} average duration ${s}, max frames ${this.config.maximumFrameCount} -> ${Math.ceil(n/this.config.maximumFrameCount/s)*s}
2s, min frame duration ${this.config.minimumFrameTimeOffsetSeconds} -> ${Math.ceil(this.config.minimumFrameTimeOffsetSeconds/s)*s}s, target => ${this.targetDuration}`);let u=0;if(t.segments&&t.segments.length>0){let n=0,s=-1;if(this.isLive&&this.fragments.length>0){const e=this.fragments.find(t=>t.time>=o);if(e&&(s=t.segments.findIndex(t=>e.byterange?.start===t.byterange?.offset&&e.url.endsWith(t.uri)),s>=0))if(n=this.targetDuration,a){const e=t.segments[s].dateTimeString;if(_(e))o=new Date(e).getTime();else{o=0;for(let e=0;e<s;e++)o+=t.segments[e].duration??i}}else o=e.time}for(let a=Math.max(0,s),c=t.segments[a];a<t.segments.length;a+=1,c=t.segments[a]){if(!c.uri||!c.byterange){n+=c.duration??i,u+=1;continue}const t=n+(c.duration??i);if(t<this.targetDuration){n+=c.duration??i,u+=1;continue}this.config.debug&&0===r.length&&this.config.runtime.console.info(`taking first fragment ${a}`);const s=new URL(c.uri,e).href,f={start:c.byterange.offset||0,end:(c.byterange.offset||0)+c.byterange.length-1};r.push({url:s,byterange:f,time:Math.round(o),duration:t,map:c.map?{key:`${c.uri}!${c.byterange.offset??"-"}@${c.byterange.length??0}`,url:new URL(c.map.uri,e).href,byterange:c.map.byterange?{start:c.map.byterange.offset||0,end:(c.map.byterange.offset||0)+c.map.byterange.length-1}:null}:null}),o+=t,n=0}this.config.debug&&(this.config.runtime.console.log(`${r.length} fragments extracted from playlist, starting at ${s}, culled ${u} to reach target density `),this.isLive&&r.length>0&&this.config.runtime.console.log(`=> window ${new Date(1e3*r[0].time).toLocaleTimeString()} - ${new Date(1e3*r[r.length-1].time).toLocaleTimeString()}`))}else this.config.debug&&this.config.runtime.console.log("no fragments in playlist");return r}getFragmentForTimestamp(t){if(this.fragments.length>0){if(this.fragments[0].time+this.fragments[0].duration>t)return this.config.runtime.console.warn("fragment before start requested"),this.fragments[0];if(this.fragments.length<=2||this.fragments[this.fragments.length-1].time<=t)return this.config.debug&&(this.isLive?this.config.runtime.console.warn(`fragment after current end requested: ${t} ${new Date(1e3*t).toLocaleTimeString()}, end: ${this.fragments[this.fragments.length-1].time} ${new Date(1e3*this.fragments[this.fragments.length-1].time).toLocaleTimeString()}`):this.config.runtime.console.warn(`fragment after end requested: ${t}, end: ${this.fragments[this.fragments.length-1].time}`)),this.fragments[this.fragments.length-1];let e=Math.min(this.fragments.length-1,Math.max(0,Math.round(Math.abs((t-this.fragments[0].time)/this.targetDuration))));for(;e<this.fragments.length-1&&this.fragments[e].time<t;)e+=1;for(;e>0&&this.fragments[e].time>t;)e-=1;return this.fragments[e]}return null}async fetchFragmentData(t,e){for(let r=0;r<this.config.maxRetries;r++){const r=new AbortController;this.config.debug&&this.config.runtime.console.log(`fetch fragment data (${t.byterange?t.byterange.end-t.byterange.start+1:"all"} bytes)`,t);const i=globalThis.setTimeout(()=>{r.abort()},this.config.networkTimeout),n=await fetch(t.url,{headers:t.byterange?{Range:`bytes=${t.byterange.start}-${t.byterange.end}`}:void 0,signal:r.signal,priority:e?"high":"low",cache:"force-cache"});if(clearTimeout(i),n.ok){const e=await n.arrayBuffer();return this.config.debug&&this.config.runtime.console.log(`got fragment data, requested ${t.byterange?t.byterange.end-t.byterange.start+1:"all"} bytes, got ${e.byteLength} bytes`),t.byterange&&t.byterange.end-t.byterange.start+1<e.byteLength?(this.config.debug&&this.config.runtime.console.warn("try to slice required fragment bytes from oversized response"),e.slice(t.byterange.start,t.byterange.end)):e}}throw new Error("could not load fragment")}}function w(){let t,e;return{promise:new Promise((r,i)=>{t=r,e=i}),resolve:t,reject:e}}class E{constructor(t){this.config=t,this.decoder=null,this.decoderIsInitializing=!1,this.decoderPromise=null,this.framePromises=new Map,this.onError=t=>{if(this.config.debug&&this.config.runtime.console.warn("decoder error",t),this.decoder){if("closed"===this.decoder.state||t instanceof Error)return this.config.debug&&this.config.runtime.console.error("killing closed/stalled decoder"),this.framePromises.forEac
2h(e=>{e.reject(t)}),this.framePromises.clear(),this.decoder=null,this.decoderPromise=null,void(this.decoderIsInitializing=!1);const e=w();this.decoderPromise=e.promise;const r=this.decoder,i=()=>{this.framePromises.forEach(e=>{e.reject(t)}),this.framePromises.clear(),e.resolve(r),this.decoderPromise=null};this.decoder.flush().then(i).catch(i)}},this.onFrameDecoded=t=>{const e=this.framePromises.get(t.timestamp);e?(this.framePromises.delete(t.timestamp),createImageBitmap(t).then(r=>{e.resolve({data:r,timestamp:t.timestamp})}).catch(t=>{e.reject(t)}).finally(()=>{t.close()})):(this.config.debug&&this.config.runtime.console.warn(`frame decoded without waiting promise, discarding: ${t.timestamp}`),t.close())}}dispose(){this.decoder?.close(),this.decoderPromise&&this.decoderPromise.then(t=>{t.close()}).catch(t=>{}),this.framePromises.clear()}initializeDecoder(t){this.decoderIsInitializing=!0,this.config.debug&&this.config.runtime.console.info("init decoder");try{const e=new VideoDecoder({output:this.onFrameDecoded,error:this.onError});return e.configure(t),this.decoder=e,e}catch(t){throw this.config.debug&&this.config.runtime.console.error(`could not init decoder: ${t instanceof Error?t.message:String(t)}`),t}finally{this.decoderIsInitializing=!1,this.decoderPromise=null}}async getConfiguredDecoder(t){if(!this.decoderIsInitializing&&null===this.decoderPromise&&this.decoder){if("closed"!==this.decoder.state)return this.decoder.configure(t),this.decoder;this.config.debug&&this.config.runtime.console.warn("decoder was closed"),this.onError(null)}if(this.decoderPromise){const e=await this.decoderPromise;return e.configure(t),e}const e=Promise.resolve(this.initializeDecoder(t));return this.decoderPromise=e,await e}prepareFrameData(t){const e=new Uint8Array(t.length+4);return e[0]=t.length>>24&255,e[1]=t.length>>16&255,e[2]=t.length>>8&255,e[3]=255&t.length,e.set(t,4),e}createAVCDecoderConfig(t,e){if(t.length<4)return this.config.runtime.console.error("invalid SPS/PPS data for avcc"),null;try{const r=8+t.length+3+e.length,i=new Uint8Array(r);let n=0;i[n++]=1,i[n++]=t[1],i[n++]=t[2],i[n++]=t[3],i[n++]=255,i[n++]=225,i[n++]=t.length>>8&255,i[n++]=255&t.length;for(const e of t)i[n++]=e;i[n++]=1,i[n++]=e.length>>8&255,i[n++]=255&e.length;for(const t of e)i[n++]=t;return this.config.debug&&this.config.runtime.console.info(`AVC-Konfiguration erstellt: ${i.length} Bytes`),i}catch(t){return this.config.debug&&this.config.runtime.console.error(`Fehler beim Erstellen der AVC-Konfiguration: ${t instanceof Error?t.message:String(t)}`),null}}async decode(t,e,r,i,n,s){const o=this.framePromises.get(t);if(o)return await o.promise;const a=w();this.framePromises.set(t,a);const u=setTimeout(()=>{this.onError(new Error("decoder timed out"))},15e3),c=()=>{clearTimeout(u)};a.promise.then(c).catch(c),this.config.debug&&this.config.runtime.console.info(`Dekodiere mit WebCodecs: Codec=${r}, GröÃe=${n}x${s}`);const f=await this.getConfiguredDecoder({codec:r,codedWidth:n,coded
2Height:s,description:i,hardwareAcceleration:this.config.useHardwareAcceleration?"prefer-hardware":"prefer-software",optimizeForLatency:!0});return f.decode(new EncodedVideoChunk({type:"key",timestamp:t,data:e})),f.flush(),await a.promise}}class T{constructor(t,e){this.persistent=!1,this.prev=null,this.next=null,this.key=t,this.value=e}}class A{constructor(t){if(this.head=null,this.tail=null,this.size=0,t<=0)throw new Error("Capacity must be greater than 0");this.capacity=t,this.cache=new Map}getSize(){return this.size}isEmpty(){return 0===this.size}has(t){return this.cache.has(t)}get(t){const e=this.cache.get(t);return e?(this.moveToHead(e),e.value):null}getClosest(t){const e=this.get(t);if(e)return e;let r=Number.MAX_SAFE_INTEGER;for(const e of this.cache.keys())Math.abs(t-e)<Math.abs(t-r)&&(r=e);return r!==Number.MAX_SAFE_INTEGER?this.get(r):null}getClosestPersistent(t){let e=Number.MAX_SAFE_INTEGER,r=null;for(const i of this.cache.values())i.persistent&&Math.abs(t-i.key)<Math.abs(t-e)&&(e=i.key,r=i);return r?.value??null}markPersistent(t){const e=this.cache.get(t);return!!e&&(e.persistent||(this.removeNode(e),e.persistent=!0,this.size-=1),!0)}putPersistent(t,e){const r=this.cache.get(t);if(r){r.persistent||(this.removeNode(r),r.persistent=!0,this.size-=1);const t=r.value;return r.value=e,t!==e&&t.data.close(),!0}const i=new T(t,e);return i.persistent=!0,this.cache.set(t,i),!1}put(t,e){let r=!1;const i=this.cache.get(t);if(i){if(i.persistent)return this.putPersistent(t,e);const n=i.value;return i.value=e,this.moveToHead(i),n!==e&&n.data.close(),r}const n=new T(t,e);return this.cache.set(t,n),this.size+=1,this.head?(n.next=this.head,this.head.prev=n,this.head=n):(this.head=n,this.tail=n),this.size>this.capacity&&(r=this.evictLRU()),r}remove(t){const e=this.cache.get(t);return!!e&&(e.persistent||(this.removeNode(e),this.size-=1),e.value.data.close(),this.cache.delete(t),!0)}removeFramesBefore(t){if(this.isEmpty())return 0;let e=0;const r=[];this.cache.forEach((e,i)=>{i<t&&r.push(i)});for(const t of r)this.remove(t)&&(e+=1);return e}clear(){this.cache.forEach(t=>{t.value.data.close()}),this.cache.clear(),this.head=null,this.tail=null,this.size=0}getTimestamps(){const t=[];let e=this.head;for(;e;)t.push(e.key),e=e.next;return t}evictLRU(){if(!this.tail)return!1;const t=this.tail;return this.removeNode(t),t.value.data.close(),this.cache.delete(t.key),this.size-=1,!0}moveToHead(t){t!==this.head&&(this.removeNode(t),t.next=this.head,t.prev=null,this.head&&(this.head.prev=t),this.head=t,this.tail??(this.tail=t))}removeNode(t){t.prev?t.prev.next=t.next:this.head=t.next,t.next?t.next.prev=t.prev:this.tail=t.prev,t.next=null,t.prev=null}}class S{constructor(t){this.config=t,this.textDecoder=new TextDecoder}get console(){return this.config.runtime.console}parseInitialization(t){const e=new DataView(t),r={ftyp:null,moov:null,codecInfo:null,timescale:1e3,duration:0};let i=0;for(;i<e.byteLength;){const t=this.parseBox(e,i);switch(t.type){case"ftyp":r.ftyp=t;break;case"moov":return r.moov=t,this.parseMoov(t.data,r),r}i=t.nextOffset}throw new Error("moov not found in data")}parseFrame(t){const e=this.parseFragment(new DataView(t));if(!e.mdatData||null===e.keyframe)throw new Error("Invalid MP4 fragment: missing mdat or keyframe samples");const r=this.extractSample(e.mdatData,e.keyframe);return{sequenceNumber:e.sequenceNumber,baseMediaDecodeTime:e.baseMediaDecodeTime,frame:new Uint8Array(r),sampleCount:1}}parseBox(t,e){let r=t.getUint32(e,!1);const i=this.textDecoder.decode(t.buffer.slice(e+4,e+8));let n=8;1===r?(r=Number(t.getBigUint64(e+8,!1)),n=16):0===r&&(r=t.buffer.byteLength-e);const s=t.buffer.byteLength-e,o=Math.max(0,r-n);return this.config.debug&&(this.console.info(`parseBox: ${i}, declared size=${r}, actual size=${Math.min(r,s)}, header size=${n}, data size=${o}`),s<r&&this.console.warn(`Box '${i}' truncated before declared size ${r} at ${s}`)),{size:r,type:i,data:new DataView(t.buffer.slice(e+n,e+n+o)),nextOffset:e+r,headerSize:n}}parseFragment(t){const e={sequenceNumber:null,keyframe:null,duration:0,timescale:1e3,baseMediaDecodeTime:0,mdatData:null};let r=0,i=!1;for(;r<t.byteLength;){const n=this.parseBox(t,r);switch(n.type){case"moof":i=!0,this.parseMoof(n.data,e,n.size);break;case"mdat":if(e.mdatData=n.data,this.config.debug&&this.console.info(`mdat box: total size=${n.size}, data size=${n.data.byteLength}, header size=${n.headerSize}`),i)return this.config.debug&&this.console.info("parsed moof and mdat - ski
2pping rest"),e}r=n.nextOffset}if(!i)throw new Error("No moof box found in segment");return e}parseMoof(t,e,r){let i=0;for(;i<t.buffer.byteLength;){const n=this.parseBox(t,i);switch(n.type){case"mfhd":e.sequenceNumber=t.getUint32(4,!1);break;case"traf":this.parseTraf(n.data,e,r)}i=n.nextOffset}}parseTraf(t,e,r){let i=0,n=0,s=0,o=0,a=0,u=0,c=0;for(;i<t.buffer.byteLength;){const f=this.parseBox(t,i);switch(f.type){case"tfhd":{const t=this.parseTfhd(f.data);a=t.trackId,n=t.baseDataOffset??0,s=t.defaultSampleDuration??0,o=t.defaultSampleSize??0,u=t.sampleDescriptionIndex??0,c=t.defaultSampleFlags??0;break}case"tfdt":e.baseMediaDecodeTime=this.parseTfdt(f.data);break;case"trun":{const t=this.parseFirstKeyframeFromTrun(f.data,{trackId:a,baseDataOffset:n,defaultSampleDuration:s,defaultSampleSize:o,sampleDescriptionIndex:u,defaultSampleFlags:c},r);t&&(e.keyframe=t);break}}i=f.nextOffset}}parseTfhd(t){const e=16777215&t.getUint32(0,!1);let r=8;const i={trackId:t.getUint32(4,!1)};return 1&e&&(i.baseDataOffset=Number(t.getBigUint64(r,!1)),r+=8),2&e&&(i.sampleDescriptionIndex=t.getUint32(r,!1),r+=4),8&e&&(i.defaultSampleDuration=t.getUint32(r,!1),r+=4),16&e&&(i.defaultSampleSize=t.getUint32(r,!1),r+=4),32&e&&(i.defaultSampleFlags=t.getUint32(r,!1)),i}parseTfdt(t){return 1===t.getUint8(0)?Number(t.getBigUint64(4,!1)):t.getUint32(4,!1)}parseFirstKeyframeFromTrun(t,e,r){const i=16777215&t.getUint32(0,!1),n=t.getUint32(4,!1);this.config.debug&&this.console.info("parse trun for first keyframe, samples:",n,"moofSize:",r);let s=8,o=0;1&i&&(o=t.getInt32(s,!1),s+=4);const a=o-r-8;let u=null;4&i&&(u=t.getUint32(s,!1),s+=4);let c=Math.max(0,a);for(let r=0;r<n;r++){const n={duration:e.defaultSampleDuration,size:e.defaultSampleSize,flags:0===r&&null!==u?u:e.defaultSampleFlags,compositionTimeOffset:0,dataOffset:c};256&i&&(n.duration=t.getUint32(s,!1),s+=4),512&i&&(n.size=t.getUint32(s,!1),s+=4),1024&i&&(n.flags=t.getUint32(s,!1),s+=4),2048&i&&(n.compositionTimeOffset=t.getInt32(s,!1),s+=4);const o=n.flags>>16&1,a=n.flags>>24&3,f=0===o&&(2===a||0===a);if(this.config.debug&&this.console.info(`Sample ${r}: size=${n.size}, flags=0x${n.flags.toString(16)}, syncFlag=${o}, dependsOn=${a}`),f)return this.config.debug&&this.console.info(`Found first keyframe at sample ${r}: ${n.size} bytes at offset: ${n.dataOffset}`),n;c+=n.size}return this.config.debug&&this.console.info("No keyframe found in trun"),null}extractSample(t,e){const r=e.dataOffset,i=r+e.size;if(i<=t.buffer.byteLength&&r>=0)return t.buffer.slice(r,i);throw new Error(`sample extends beyond mdat bounds: offset=${r}, size=${e.size}, mdatSize=${t.byteLength}`)}parseMoov(t,e){let r=0;for(;r<t.byteLength;){const i=this.parseBox(t,r);switch(i.type){case"mvhd":this.parseMvhd(i.data,e);break;case"trak":{const t=this.parseTrak(i.data);return void(e.codecInfo={codec:t.codec,width:t.width,height:t.height,description:t.sampleDescription})}}r=i.nextOffset}throw new Error("trak not found in moov")}parseMvhd(t,e){let r=4;1===t.getUint8(0)?(r+=16,e.timescale=t.getUint32(r,!1),r+=4,e.duration=Number(t.getBigUint64(r,!1))):(r+=8,e.timescale=t.getUint32(r,!1),r+=4,e.duration=t.getUint32(r,!1))}parseTrak(t){let e=0,r=0;for(;e<t.byteLength;){const i=this.parseBox(t,e);switch(i.type){case"tkhd":r=this.parseTkhd(i.data).trackId;break;case"mdia":{const t=this.parseMdia(i.data);if(t)return{...t,trackId:r};break}}e=i.nextOffset}throw new Error("mdia not found in trak")}parseTkhd(t){let e=4;if(1===t.getUint8(0)){e+=20;const r=t.getUint32(e,!1);return e+=32,{trackId:r,width:t.getUint32(e,!1)>>16,height:t.getUint32(e+4,!1)>>16}}{e+=12;const r=t.getUint32(e,!1);return e+=24,{trackId:r,width:t.getUint32(e,!1)>>16,height:t.getUint32(e+4,!1)>>16}}}parseMdia(t){let e=0,r=1e3;for(;e<t.byteLength;){const i=this.parseBox(t,e);switch(i.type){case"mdhd":r=this.parseMdhd(i.data);break;case"minf":{const t=this.parseMinf(i.data);if(t)return{...t,timescale:r};break}}e=i.nextOffset}throw new Error("minf not found in mdia")}parseMdhd(t){const e=1===t.getUint8(0)?20:12;return t.getUint32(e,!1)}parseMinf(t){let e=0;for(;e<t.byteLength;){const r=this.parseBox(t,e);if("stbl"===r.type)return this.parseStbl(r.data);e=r.nextOffset}throw new Error("stbl not found in minf")}parseStbl(t){let e=0;for(;e<t.byteLength;){const r=this.parseBox(t,e);if("stsd"===r.type)return this.parseStsd(r.data);e=r.nextOffset}throw new Error("stsd not found in stbl")}parseStsd(t){let e=8;for(;e<t.byteLength;){const r=this.parseBox(t,e);switch(r.type){case"avc1":case"avc3":{const t=this.extractDecoderConfig(r.data,"avcC");return{codec:this.buildAvcCodecString(t),sampleDescription:t,width:r.data.getUint16(24),height:r.data.getUint16(26)}}case"hev1":case"hvc1":{const t=this.extractDecoderConfig(r.data,"hvcC");return{codec:this.buildHevcCodecString(t),sampleDescription:t,width:r.data.getUint16(24),height:r.data.getUint16(26)}}}e=r.nextOffset}
2throw new Error("Stsd contains no supported codec initialization")}extractDecoderConfig(t,e){let r=78;for(;r<t.byteLength;){const i=this.parseBox(t,r);if(i.type===e)return new Uint8Array(i.data.buffer);r=i.nextOffset}throw new Error(`unable to find decoder config ${e}`)}buildAvcCodecString(t){return t.length<4?"avc1.640028":`avc1.${t[1].toString(16).padStart(2,"0")}${t[2].toString(16).padStart(2,"0")}${t[3].toString(16).padStart(2,"0")}`}buildHevcCodecString(t){if(t.length<23){if(t.length<13)return"hev1.1.6.L93.B0";const e=31&t[1],r=t[12];return`hev1.${e}.6.${t[1]>>5&1?"H":"L"}${r}.B0`}let e=1;const r=t[e],i=r>>6&3,n=r>>5&1,s=31&r;e+=1;const o=new DataView(t.buffer,t.byteOffset+e,4).getUint32(0,!1);e+=4;const a=new Array(6);for(let r=0;r<6;r++)a[r]=t[e+r];e+=6;const u=t[e];let c;return c=0===i?s.toString():`${String.fromCharCode(65+i-1)}${s}`,`hev1.${c}.${o.toString(16).toUpperCase().padStart(8,"0")}.${n?"H":"L"}${u}.${a.map(t=>t.toString(16).toUpperCase().padStart(2,"0")).join("").replace(/0+$/u,"")||"0"}`}}var I,O,x,P,R,D,U,N,C,M,L,F=function(t,e,r,i){if("a"===r&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?i:"a"===r?i.call(t):i?i.value:e.get(t)},$=function(t,e,r,i,n){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?n.call(t,r):n?n.value=r:e.set(t,r),r};class k{get context(){return null===F(this,C,"f")&&$(this,C,this.offscreenCanvas.getContext("2d",{willReadFrequently:!1}),"f"),F(this,C,"f")}get mpegTsParser(){return null===F(this,O,"f")&&$(this,O,new e(this.config),"f"),F(this,O,"f")}get fMP4Parser(){return null===F(this,x,"f")&&$(this,x,new S(this.config),"f"),F(this,x,"f")}constructor(t,e,r){if(this.config=t,this.offscreenCanvas=e,this.failureCallback=r,I.set(this,void 0),O.set(this,null),x.set(this,null),P.set(this,void 0),R.set(this,!1),D.set(this,[]),U.set(this,void 0),N.set(this,new Map),C.set(this,null),this.livePlaylistUpdated=t=>{const e=F(this,U,"f").removeFramesBefore(t.fragments[0].time);this.config.debug&&this.config.runtime.console.info(`evicted ${e} frames from cache`),this.updatePreloadCache(t.fragments)},M.set(this,new Map),L.set(this,0),"function"!=typeof VideoDecoder)throw new Error("no VideoDecoder support");$(this,U,new A(t.frameCacheSize),"f"),$(this,I,new v(t,this.livePlaylistUpdated),"f"),$(this,P,new E(t),"f")}dispose(){F(this,I,"f").dispose(),F(this,P,"f").dispose(),F(this,U,"f").clear()}async initialize(){const t=await F(this,I,"f").initialize();return $(this,R,!0,"f"),0!==t.resolution.width&&0!==t.resolution.height&&(this.offscreenCanvas.width=t.resolution.width,this.offscreenCanvas.height=t.resolution.height),this.updatePreloadCache(t.fragments),t}getClosestCachedVideoFrame(t){const e=F(this,U,"f").getClosest(t);if(!e)throw new Error("no cached frames");return e.timestamp}async getVideoFrame(t){const e=this.getVideoFrameInternal(t,!1);if(e.frame)return e.frameTime;if(e.framePromise)return await e.framePromise,e.frameTime;throw new Error("no video frame available")}paintFrameIfAvailable(t){const e=F(this,U,"f").get(t);if(e)try{this.context?.drawImage(e.data,0,0),this.config.debug&&this.config.runtime.console.info("painted frame",t)}catch(r){this.config.debug&&this.config.runtime.console.error("could not paint frame",r),F(this,U,"f").remove(t),e.data.close()}else this.config.debug&&this.config.runtime.console.warn("tried to paint unavailable frame",t)}updatePreloadCache(t){if(F(this,N,"f").size>0){const e=t.map(t=>t.map?.key??null).filter(t=>null!==t);Array.from(F(this,N,"f").keys()).filter(t=>!e.includes(t)).forEach(t=>{F(this,N,"f").delete(t)})}const e=F(this,U,"f").getClosestPersistent(t[t.length-1].time);let r=e?e.timestamp+this.config.prefetchFrameIntervalSeconds:t[0].time;const i=[];for(const e of t)e.time>
2=r&&(F(this,U,"f").has(e.time)?F(this,U,"f").markPersistent(e.time):i.push(e.time),r+=this.config.prefetchFrameIntervalSeconds);this.config.debug&&this.config.runtime.console.info("prefetch frames",i),$(this,D,i,"f"),this.preloadTrigger()}preloadTrigger(){if(0===F(this,M,"f").size){const t=F(this,D,"f").shift();void 0!==t&&(this.config.debug&&this.config.runtime.console.info(`prefetch for timestamp: ${t}`),this.getVideoFrameInternal(t,!0))}}getVideoFrameInternal(t,e){if(!F(this,R,"f"))throw new Error("not initialized");t=Math.round(t);const r=F(this,I,"f").iFramePlaylist;if(!r)throw new Error("no current playlist");const i=F(this,I,"f").getFragmentForTimestamp(t);if(!i)throw new Error("no frame for timestamp");this.config.debug&&this.config.runtime.console.info(`fragment for ${t}: ${i.time}`);const n=F(this,U,"f").get(i.time);if(n)return this.config.debug&&this.config.runtime.console.info("using frame cache for",t),e&&F(this,U,"f").markPersistent(i.time),{frameTime:n.timestamp,frame:n,framePromise:null};let s=F(this,M,"f").get(i.time);return s||(s=this.getUncachedVideoFrame(r,i,e),F(this,M,"f").set(i.time,s),s.then(()=>{$(this,L,Math.max(0,F(this,L,"f")-1),"f"),F(this,M,"f").delete(i.time),this.preloadTrigger()}).catch(t=>{this.config.debug&&this.config.runtime.console.error("failed to get frame",t,F(this,L,"f")),$(this,L,F(this,L,"f")+1,"f"),F(this,M,"f").delete(i.time),F(this,L,"f")>=10?this.failureCallback():this.preloadTrigger()})),{frameTime:i.time,frame:null,framePromise:s}}async getUncachedVideoFrame(t,e,r){const i=await F(this,I,"f").fetchFragmentData(e,!r);let n;return 71===new Uint8Array(i)[0]?(this.config.debug&&this.config.runtime.console.info("frame is mpegts"),n=await this.decodeFragmentDataAsMpegTS(t,e,i)):(this.config.debug&&this.config.runtime.console.info("frame likely fpm4"),n=await this.decodeFragmentDataAsFMPEG4(t,e,i)),r?F(this,U,"f").putPersistent(e.time,n):F(this,U,"f").put(e.time,n),this.config.debug&&this.config.runtime.console.info("got frame data for",n.timestamp),n}async decodeFragmentDataAsFMPEG4(e,r,i){if(null===r.map)throw new Error("fmp4 fragment without map for init");const n=this.fMP4Parser.parseFrame(i);this.config.debug&&this.config.runtime.console.info("fmp4 parse result",n);let s=F(this,N,"f").get(r.map.key);if(void 0===s){this.config.debug&&this.config.runtime.console.info("no cached init segment for key",r.map.key);const t=await F(this,I,"f").fetchFragmentData(r.map,!0);try{s=this.fMP4Parser.parseInitialization(t)}catch(e){throw this.config.runtime.console.error(e),e}F(this,N,"f").set(r.map.key,s)}return this.config.debug&&this.config.runtime.console.info("fmp4 init segment",s),await F(this,P,"f").decode(r.time,n.frame,s.codecInfo?.codec??e.attributes.CODECS??t,s.codecInfo?.description??void 0,s.codecInfo?.width??e.attributes.RESOLUTION?.width??480,s.codecInfo?.height??e.attributes.RESOLUTION?.height??270)}async decodeFragmentDataAsMpegTS(t,e,r){const i=this.mpegTsParser.extractNALUnits(r);if(0===i.length)throw new Error("no nal units found");const n=this.mpegTsParser.analyzeNALUnits(i,{codec:t.attributes.CODECS,width:t.attributes.RESOLUTION?.width??480,height:t.attributes.RESOLUTION?.height??270});if(null===n)throw new Error("no nal info found");const s=F(this,P,"f").createAVCDecoderConfig(n.sps,n.pps);if(!s)throw new Error("no valid avc config created");const o=F(this,P,"f").prepareFrameData(n.idrFrame);return await F(this,P,"f").decode(e.time,o,n.codec,s,n.width,n.height)}}I=new WeakMap,O=new WeakMap,x=new WeakMap,P=new WeakMap,R=new WeakMap,D=new WeakMap,U=new WeakMap,N=new WeakMap,C=new WeakMap,M=new WeakMap,L=new WeakMap;let B=null;function X(t){postMessage(t)}function z(t,e){X({type:10,level:t,message:e})}const j={console:{log:function(...t){z("log",t.map(t=>"string"==typeof t||"number"==typeof t?t:G(t)))},info:function(...t){z("info",t.map(t=>"string"==typeof t||"number"==typeof t?t:G(t)))},warn:function(...t){z("warn",t.map(t=>"string"==typeof t||"number"==typeof t?t:G(t)))},error:function(...t){z("error",t.map(t=>"string"==typeof t||"number"==typeof t?t:G(t)))}}};onerror=(...t)=>{j.console.error("Uncaught Exception",...t)},onmessage=t=>{switch(t.data.type){case 0:B=new k({...t.data.config,runtime:j},t.data.offscreenCanvas,()=>{X({type:-1})}),B.initialize().then(t=>{X({type:1,width:t.resolution.width,height:t.resolution.height,frameInterval:t.targetDuration})}).catch(t=>{X({type:2,reason:t.message})});break;case 3:B&&B.dispose(),B=null,X({type:4});break;case 5:B?.paintFrameIfAvailable(t.data.timestamp);break;case 7:if(B){const e=t.data.sequence;try{X({type:8,timestamp:B.getClosestCachedVideoFrame(t.data.forTimestamp),sequence:e})}catch(t){X({type:9,reason:t,sequence:e})}}else X({type:9,reason:"not initialised",sequence:t.data.sequence});break;case 6:if(B){const e=t.data.sequence;B.getVideoFrame(t.data.atTimestamp).then(t=>{X({type:8,timestamp:t,sequence:e})}).catch(t=>{X({type:9,reason:t,sequence:e})})}else X({type:9,reason:"not initialised",sequence:t.data.sequence})}};const V=(t,e)=>e instanceof Uint8Array?"[Uint8Array]":e instanceof BigInt?e.toString():e instanceof Error?Object.getOwnPropertyNames(e).reduce((t,r)=>(t[r]=e[r],t),{name:e.name,message:e.message}):e,G=t=>{try{return JSON.stringify(t,V)}catch(e){try{return JSON.stringify(t,function(){const t=new WeakSet;return function(e,r){if(r instanceof Error){const t=Object.assign({},r);return r.name&&(t.name=r.name),r.message&&(t.message=r.message),r.stack&&(t.stack=r.stack),t}if(r instanceof Event){const t=Object.assign({},r);return r.type&&(t.type=r.type),r.target&&(t.target=r.target instanceof Element?r.target.outerHTML:r.target.toString()),t}if("object"==typeof(i=r)&&null!==i){if(e.startsWith("_"))return;if(t.has(r))return"[RECURSION]";t.add(r)}var i;return r}}())}catch(t){return`err: ${e.message}`}}};function _(t){return!(function(t){return null===t||function(t){return void 0===t||void 0===t}(t)}(e=t)||"string"!=typeof e||/^\s*$/u.test(e));var e}})()})()})();
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.