!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.pmediaplay=e():t.pmediaplay=e()}(self,(function(){return function(){var t,e,n={79742:function(t,e){"use strict";e.byteLength=function(t){var e=a(t),n=e[0],r=e[1];return 3*(n+r)/4-r},e.toByteArray=function(t){var e,n,s=a(t),o=s[0],u=s[1],c=new i(function(t,e,n){return 3*(e+n)/4-n}(0,o,u)),f=0,l=u>0?o-4:o;for(n=0;n>16&255,c[f++]=e>>8&255,c[f++]=255&e;2===u&&(e=r[t.charCodeAt(n)]<<2|r[t.charCodeAt(n+1)]>>4,c[f++]=255&e);1===u&&(e=r[t.charCodeAt(n)]<<10|r[t.charCodeAt(n+1)]<<4|r[t.charCodeAt(n+2)]>>2,c[f++]=e>>8&255,c[f++]=255&e);return c},e.fromByteArray=function(t){for(var e,r=t.length,i=r%3,s=[],o=16383,a=0,c=r-i;ac?c:a+o));1===i?(e=t[r-1],s.push(n[e>>2]+n[e<<4&63]+"==")):2===i&&(e=(t[r-2]<<8)+t[r-1],s.push(n[e>>10]+n[e>>4&63]+n[e<<2&63]+"="));return s.join("")};for(var n=[],r=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0;o<64;++o)n[o]=s[o],r[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 n=t.indexOf("=");return-1===n&&(n=e),[n,n===e?0:4-n%4]}function u(t,e,r){for(var i,s,o=[],a=e;a>18&63]+n[s>>12&63]+n[s>>6&63]+n[63&s]);return o.join("")}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},48764:function(t,e,n){"use strict";var r=n(79742),i=n(80645),s=n(5826);function o(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(t,e){if(o()=o())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o().toString(16)+" bytes");return 0|t}function p(t,e){if(u.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var n=t.length;if(0===n)return 0;for(var r=!1;;)switch(e){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case undefined:return F(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return H(t).length;default:if(r)return F(t).length;e=(""+e).toLowerCase(),r=!0}}function g(t,e,n){var r=!1;if((e===undefined||e<0)&&(e=0),e>this.length)return"";if((n===undefined||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return k(this,e,n);case"utf8":case"utf-8":return T(this,e,n);case"ascii":return A(this,e,n);case"latin1":case"binary":return R(this,e,n);case"base64":return E(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,e,n);default:if(r)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0}}function v(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function m(t,e,n,r,i){if(0===t.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(i)return-1;n=t.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof e&&(e=u.from(e,r)),u.isBuffer(e))return 0===e.length?-1:y(t,e,n,r,i);if("number"==typeof e)return e&=255,u.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,n):Uint8Array.prototype.lastIndexOf.call(t,e,n):y(t,[e],n,r,i);throw new TypeError("val must be string, number or Buffer")}function y(t,e,n,r,i){var s,o=1,a=t.length,u=e.length;if(r!==undefined&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(t.length<2||e.length<2)return-1;o=2,a/=2,u/=2,n/=2}function c(t,e){return 1===o?t[e]:t.readUInt16BE(e*o)}if(i){var f=-1;for(s=n;sa&&(n=a-u),s=n;s>=0;s--){for(var l=!0,h=0;hi&&(r=i):r=i;var s=e.length;if(s%2!=0)throw new TypeError("Invalid hex string");r>s/2&&(r=s/2);for(var o=0;o>8,i=n%256,s.push(i),s.push(r);return s}(e,t.length-n),t,n,r)}function E(t,e,n){return 0===e&&n===t.length?r.fromByteArray(t):r.fromByteArray(t.slice(e,n))}function T(t,e,n){n=Math.min(t.length,n);for(var r=[],i=e;i239?4:c>223?3:c>191?2:1;if(i+l<=n)switch(l){case 1:c<128&&(f=c);break;case 2:128==(192&(s=t[i+1]))&&(u=(31&c)<<6|63&s)>127&&(f=u);break;case 3:s=t[i+1],o=t[i+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[i+1],o=t[i+2],a=t[i+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,l=1):f>65535&&(f-=65536,r.push(f>>>10&1023|55296),f=56320|1023&f),r.push(f),i+=l}return function(t){var e=t.length;if(e<=I)return String.fromCharCode.apply(String,t);var n="",r=0;for(;r0&&(t=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(t+=" ... ")),""},u.prototype.compare=function(t,e,n,r,i){if(!u.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(e===undefined&&(e=0),n===undefined&&(n=t?t.length:0),r===undefined&&(r=0),i===undefined&&(i=this.length),e<0||n>t.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&e>=n)return 0;if(r>=i)return-1;if(e>=n)return 1;if(this===t)return 0;for(var s=(i>>>=0)-(r>>>=0),o=(n>>>=0)-(e>>>=0),a=Math.min(s,o),c=this.slice(r,i),f=t.slice(e,n),l=0;li)&&(n=i),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var s=!1;;)switch(r){case"hex":return b(this,t,e,n);case"utf8":case"utf-8":return w(this,t,e,n);case"ascii":return x(this,t,e,n);case"latin1":case"binary":return _(this,t,e,n);case"base64":return S(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,t,e,n);default:if(s)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),s=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var I=4096;function A(t,e,n){var r="";n=Math.min(t.length,n);for(var i=e;ir)&&(n=r);for(var i="",s=e;sn)throw new RangeError("Trying to access beyond buffer length")}function D(t,e,n,r,i,s){if(!u.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||et.length)throw new RangeError("Index out of range")}function L(t,e,n,r){e<0&&(e=65535+e+1);for(var i=0,s=Math.min(t.length-n,2);i>>8*(r?i:1-i)}function N(t,e,n,r){e<0&&(e=4294967295+e+1);for(var i=0,s=Math.min(t.length-n,4);i>>8*(r?i:3-i)&255}function U(t,e,n,r,i,s){if(n+r>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function j(t,e,n,r,s){return s||U(t,0,n,4),i.write(t,e,n,r,23,4),n+4}function M(t,e,n,r,s){return s||U(t,0,n,8),i.write(t,e,n,r,52,8),n+8}u.prototype.slice=function(t,e){var n,r=this.length;if((t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=e===undefined?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e0&&(i*=256);)r+=this[t+--e]*i;return r},u.prototype.readUInt8=function(t,e){return e||C(t,1,this.length),this[t]},u.prototype.readUInt16LE=function(t,e){return e||C(t,2,this.length),this[t]|this[t+1]<<8},u.prototype.readUInt16BE=function(t,e){return e||C(t,2,this.length),this[t]<<8|this[t+1]},u.prototype.readUInt32LE=function(t,e){return e||C(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},u.prototype.readUInt32BE=function(t,e){return e||C(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},u.prototype.readIntLE=function(t,e,n){t|=0,e|=0,n||C(t,e,this.length);for(var r=this[t],i=1,s=0;++s=(i*=128)&&(r-=Math.pow(2,8*e)),r},u.prototype.readIntBE=function(t,e,n){t|=0,e|=0,n||C(t,e,this.length);for(var r=e,i=1,s=this[t+--r];r>0&&(i*=256);)s+=this[t+--r]*i;return s>=(i*=128)&&(s-=Math.pow(2,8*e)),s},u.prototype.readInt8=function(t,e){return e||C(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},u.prototype.readInt16LE=function(t,e){e||C(t,2,this.length);var n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt16BE=function(t,e){e||C(t,2,this.length);var n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt32LE=function(t,e){return e||C(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 e||C(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 e||C(t,4,this.length),i.read(this,t,!0,23,4)},u.prototype.readFloatBE=function(t,e){return e||C(t,4,this.length),i.read(this,t,!1,23,4)},u.prototype.readDoubleLE=function(t,e){return e||C(t,8,this.length),i.read(this,t,!0,52,8)},u.prototype.readDoubleBE=function(t,e){return e||C(t,8,this.length),i.read(this,t,!1,52,8)},u.prototype.writeUIntLE=function(t,e,n,r){(t=+t,e|=0,n|=0,r)||D(this,t,e,n,Math.pow(2,8*n)-1,0);var i=1,s=0;for(this[e]=255&t;++s=0&&(s*=256);)this[e+i]=t/s&255;return e+n},u.prototype.writeUInt8=function(t,e,n){return t=+t,e|=0,n||D(this,t,e,1,255,0),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},u.prototype.writeUInt16LE=function(t,e,n){return t=+t,e|=0,n||D(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):L(this,t,e,!0),e+2},u.prototype.writeUInt16BE=function(t,e,n){return t=+t,e|=0,n||D(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):L(this,t,e,!1),e+2},u.prototype.writeUInt32LE=function(t,e,n){return t=+t,e|=0,n||D(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):N(this,t,e,!0),e+4},u.prototype.writeUInt32BE=function(t,e,n){return t=+t,e|=0,n||D(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):N(this,t,e,!1),e+4},u.prototype.writeIntLE=function(t,e,n,r){if(t=+t,e|=0,!r){var i=Math.pow(2,8*n-1);D(this,t,e,n,i-1,-i)}var s=0,o=1,a=0;for(this[e]=255&t;++s>0)-a&255;return e+n},u.prototype.writeIntBE=function(t,e,n,r){if(t=+t,e|=0,!r){var i=Math.pow(2,8*n-1);D(this,t,e,n,i-1,-i)}var s=n-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+n},u.prototype.writeInt8=function(t,e,n){return t=+t,e|=0,n||D(this,t,e,1,127,-128),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},u.prototype.writeInt16LE=function(t,e,n){return t=+t,e|=0,n||D(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):L(this,t,e,!0),e+2},u.prototype.writeInt16BE=function(t,e,n){return t=+t,e|=0,n||D(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):L(this,t,e,!1),e+2},u.prototype.writeInt32LE=function(t,e,n){return t=+t,e|=0,n||D(this,t,e,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):N(this,t,e,!0),e+4},u.prototype.writeInt32BE=function(t,e,n){return t=+t,e|=0,n||D(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):N(this,t,e,!1),e+4},u.prototype.writeFloatLE=function(t,e,n){return j(this,t,e,!0,n)},u.prototype.writeFloatBE=function(t,e,n){return j(this,t,e,!1,n)},u.prototype.writeDoubleLE=function(t,e,n){return M(this,t,e,!0,n)},u.prototype.writeDoubleBE=function(t,e,n){return M(this,t,e,!1,n)},u.prototype.copy=function(t,e,n,r){if(n||(n=0),r||0===r||(r=this.length),e>=t.length&&(e=t.length),e||(e=0),r>0&&r=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),t.length-e=0;--i)t[i+e]=this[i+n];else if(s<1e3||!u.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,n=n===undefined?this.length:n>>>0,t||(t=0),"number"==typeof t)for(s=e;s55295&&n<57344){if(!i){if(n>56319){(e-=3)>-1&&s.push(239,191,189);continue}if(o+1===r){(e-=3)>-1&&s.push(239,191,189);continue}i=n;continue}if(n<56320){(e-=3)>-1&&s.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(e-=3)>-1&&s.push(239,191,189);if(i=null,n<128){if((e-=1)<0)break;s.push(n)}else if(n<2048){if((e-=2)<0)break;s.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;s.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;s.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return s}function H(t){return r.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(q,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function W(t,e,n,r){for(var i=0;i=e.length||i>=t.length);++i)e[i+n]=t[i];return i}},16313:function(t,e,n){var r=n(48764).lW,i=function(){"use strict";function t(t,e){return null!=e&&t instanceof e}var e,n,i;try{e=Map}catch(u){e=function(){}}try{n=Set}catch(u){n=function(){}}try{i=Promise}catch(u){i=function(){}}function s(o,u,c,f,l){"object"==typeof u&&(c=u.depth,f=u.prototype,l=u.includeNonEnumerable,u=u.circular);var h=[],d=[],p=void 0!==r;return void 0===u&&(u=!0),void 0===c&&(c=Infinity),function g(o,c){if(null===o)return null;if(0===c)return o;var v,m;if("object"!=typeof o)return o;if(t(o,e))v=new e;else if(t(o,n))v=new n;else if(t(o,i))v=new i((function(t,e){o.then((function(e){t(g(e,c-1))}),(function(t){e(g(t,c-1))}))}));else if(s.__isArray(o))v=[];else if(s.__isRegExp(o))v=new RegExp(o.source,a(o)),o.lastIndex&&(v.lastIndex=o.lastIndex);else if(s.__isDate(o))v=new Date(o.getTime());else{if(p&&r.isBuffer(o))return v=r.allocUnsafe?r.allocUnsafe(o.length):new r(o.length),o.copy(v),v;t(o,Error)?v=Object.create(o):void 0===f?(m=Object.getPrototypeOf(o),v=Object.create(m)):(v=Object.create(f),m=f)}if(u){var y=h.indexOf(o);if(-1!=y)return d[y];h.push(o),d.push(v)}for(var b in t(o,e)&&o.forEach((function(t,e){var n=g(e,c-1),r=g(t,c-1);v.set(n,r)})),t(o,n)&&o.forEach((function(t){var e=g(t,c-1);v.add(e)})),o){var w;m&&(w=Object.getOwnPropertyDescriptor(m,b)),w&&null==w.set||(v[b]=g(o[b],c-1))}if(Object.getOwnPropertySymbols){var x=Object.getOwnPropertySymbols(o);for(b=0;b1?arguments[1]:undefined,n),u=o>2?arguments[2]:undefined,c=u===undefined?n:i(u,n);c>a;)e[a++]=t;return e}},56837:function(t,e,n){"use strict";var r=n(3610).forEach,i=n(34194)("forEach");t.exports=i?[].forEach:function(t){return r(this,t,arguments.length>1?arguments[1]:undefined)}},11354:function(t,e,n){"use strict";var r=n(86843),i=n(78834),s=n(89678),o=n(75196),a=n(6782),u=n(24284),c=n(10623),f=n(55449),l=n(53476),h=n(22902),d=Array;t.exports=function(t){var e=s(t),n=u(this),p=arguments.length,g=p>1?arguments[1]:undefined,v=g!==undefined;v&&(g=r(g,p>2?arguments[2]:undefined));var m,y,b,w,x,_,S=h(e),P=0;if(!S||this===d&&a(S))for(m=c(e),y=n?new this(m):d(m);m>P;P++)_=v?g(e[P],P):e[P],f(y,P,_);else for(x=(w=l(e,S)).next,y=n?new this:[];!(b=i(x,w)).done;P++)_=v?o(w,g,[b.value,P],!0):b.value,f(y,P,_);return y.length=P,y}},31692:function(t,e,n){"use strict";var r=n(74529),i=n(59413),s=n(10623),o=function(t){return function(e,n,o){var a,u=r(e),c=s(u),f=i(o,c);if(t&&n!=n){for(;c>f;)if((a=u[f++])!=a)return!0}else for(;c>f;f++)if((t||f in u)&&u[f]===n)return t||f||0;return!t&&-1}};t.exports={includes:o(!0),indexOf:o(!1)}},3610:function(t,e,n){"use strict";var r=n(86843),i=n(95329),s=n(37026),o=n(89678),a=n(10623),u=n(64692),c=i([].push),f=function(t){var e=1===t,n=2===t,i=3===t,f=4===t,l=6===t,h=7===t,d=5===t||l;return function(p,g,v,m){for(var y,b,w=o(p),x=s(w),_=r(g,v),S=a(x),P=0,E=m||u,T=e?E(p,S):n||h?E(p,0):undefined;S>P;P++)if((d||P in x)&&(b=_(y=x[P],P,w),t))if(e)T[P]=b;else if(b)switch(t){case 3:return!0;case 5:return y;case 6:return P;case 2:c(T,y)}else switch(t){case 4:return!1;case 7:c(T,y)}return l?-1:i||f?f:T}};t.exports={forEach:f(0),map:f(1),filter:f(2),some:f(3),every:f(4),find:f(5),findIndex:f(6),filterReject:f(7)}},50568:function(t,e,n){"use strict";var r=n(95981),i=n(99813),s=n(53385),o=i("species");t.exports=function(t){return s>=51||!r((function(){var e=[];return(e.constructor={})[o]=function(){return{foo:1}},1!==e[t](Boolean).foo}))}},34194:function(t,e,n){"use strict";var r=n(95981);t.exports=function(t,e){var n=[][t];return!!n&&r((function(){n.call(null,e||function(){return 1},1)}))}},89779:function(t,e,n){"use strict";var r=n(55746),i=n(1052),s=TypeError,o=Object.getOwnPropertyDescriptor,a=r&&!function(){if(this!==undefined)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(t){return t instanceof TypeError}}();t.exports=a?function(t,e){if(i(t)&&!o(t,"length").writable)throw s("Cannot set read only .length");return t.length=e}:function(t,e){return t.length=e}},15790:function(t,e,n){"use strict";var r=n(59413),i=n(10623),s=n(55449),o=Array,a=Math.max;t.exports=function(t,e,n){for(var u=i(t),c=r(e,u),f=r(n===undefined?u:n,u),l=o(a(f-c,0)),h=0;c0;)t[r]=t[--r];r!==s++&&(t[r]=n)}return t},a=function(t,e,n,r){for(var i=e.length,s=n.length,o=0,a=0;o1?arguments[1]:undefined);e=e?e.next:n.first;)for(r(e.value,e.key,this);e&&e.removed;)e=e.previous},has:function(t){return!!b(this,t)}}),s(h,n?{get:function(t){var e=b(this,t);return e&&e.value},set:function(t,e){return y(this,0===t?0:t,e)}}:{add:function(t){return y(this,t=0===t?0:t,t)}}),d&&i(h,"size",{configurable:!0,get:function(){return g(this).size}}),l},setStrong:function(t,e,n){var r=e+" Iterator",i=m(e),s=m(r);f(t,e,(function(t,e){v(this,{type:r,target:t,state:i(t),kind:e,last:undefined})}),(function(){for(var t=s(this),e=t.kind,n=t.last;n&&n.removed;)n=n.previous;return t.target&&(t.last=n=n?n.next:t.state.first)?l("keys"===e?n.key:"values"===e?n.value:[n.key,n.value],!1):(t.target=undefined,l(undefined,!0))}),n?"entries":"values",!n,!0),h(e)}}},24683:function(t,e,n){"use strict";var r=n(76887),i=n(21899),s=n(21647),o=n(95981),a=n(32029),u=n(93091),c=n(5743),f=n(57475),l=n(10941),h=n(82119),d=n(90904),p=n(65988).f,g=n(3610).forEach,v=n(55746),m=n(45402),y=m.set,b=m.getterFor;t.exports=function(t,e,n){var m,w=-1!==t.indexOf("Map"),x=-1!==t.indexOf("Weak"),_=w?"set":"add",S=i[t],P=S&&S.prototype,E={};if(v&&f(S)&&(x||P.forEach&&!o((function(){(new S).entries().next()})))){var T=(m=e((function(e,n){y(c(e,T),{type:t,collection:new S}),h(n)||u(n,e[_],{that:e,AS_ENTRIES:w})}))).prototype,I=b(t);g(["add","clear","delete","forEach","get","has","set","keys","values","entries"],(function(t){var e="add"===t||"set"===t;!(t in P)||x&&"clear"===t||a(T,t,(function(n,r){var i=I(this).collection;if(!e&&x&&!l(n))return"get"===t&&undefined;var s=i[t](0===n?0:n,r);return e?this:s}))})),x||p(T,"size",{configurable:!0,get:function(){return I(this).collection.size}})}else m=n.getConstructor(e,t,w,_),s.enable();return d(m,t,!1,!0),E[t]=m,r({global:!0,forced:!0},E),x||n.setStrong(m,t,w),m}},23489:function(t,e,n){"use strict";var r=n(90953),i=n(31136),s=n(49677),o=n(65988);t.exports=function(t,e,n){for(var a=i(e),u=o.f,c=s.f,f=0;f9007199254740991)throw e("Maximum allowed index exceeded");return t}},63281:function(t){"use strict";t.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},34342:function(t,e,n){"use strict";var r=n(2861).match(/firefox\/(\d+)/i);t.exports=!!r&&+r[1]},23321:function(t,e,n){"use strict";var r=n(48501),i=n(6049);t.exports=!r&&!i&&"object"==typeof window&&"object"==typeof document},48501:function(t){"use strict";t.exports="object"==typeof Deno&&Deno&&"object"==typeof Deno.version},81046:function(t,e,n){"use strict";var r=n(2861);t.exports=/MSIE|Trident/.test(r)},4470:function(t,e,n){"use strict";var r=n(2861);t.exports=/ipad|iphone|ipod/i.test(r)&&"undefined"!=typeof Pebble},22749:function(t,e,n){"use strict";var r=n(2861);t.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(r)},6049:function(t,e,n){"use strict";var r=n(21899),i=n(82532);t.exports="process"===i(r.process)},58045:function(t,e,n){"use strict";var r=n(2861);t.exports=/web0s(?!.*chrome)/i.test(r)},2861:function(t){"use strict";t.exports="undefined"!=typeof navigator&&String(navigator.userAgent)||""},53385:function(t,e,n){"use strict";var r,i,s=n(21899),o=n(2861),a=s.process,u=s.Deno,c=a&&a.versions||u&&u.version,f=c&&c.v8;f&&(i=(r=f.split("."))[0]>0&&r[0]<4?1:+(r[0]+r[1])),!i&&o&&(!(r=o.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=o.match(/Chrome\/(\d+)/))&&(i=+r[1]),t.exports=i},18938:function(t,e,n){"use strict";var r=n(2861).match(/AppleWebKit\/(\d+)\./);t.exports=!!r&&+r[1]},35703:function(t,e,n){"use strict";var r=n(54058);t.exports=function(t){return r[t+"Prototype"]}},56759:function(t){"use strict";t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},53995:function(t,e,n){"use strict";var r=n(95329),i=Error,s=r("".replace),o=String(i("zxcasd").stack),a=/\n\s*at [^:]*:[^\n]*/,u=a.test(o);t.exports=function(t,e){if(u&&"string"==typeof t&&!i.prepareStackTrace)for(;e--;)t=s(t,a,"");return t}},79585:function(t,e,n){"use strict";var r=n(32029),i=n(53995),s=n(18780),o=Error.captureStackTrace;t.exports=function(t,e,n,a){s&&(o?o(t,e):r(t,"stack",i(n,a)))}},18780:function(t,e,n){"use strict";var r=n(95981),i=n(31887);t.exports=!r((function(){var t=Error("a");return!("stack"in t)||(Object.defineProperty(t,"stack",i(1,7)),7!==t.stack)}))},76887:function(t,e,n){"use strict";var r=n(21899),i=n(79730),s=n(97484),o=n(57475),a=n(49677).f,u=n(37252),c=n(54058),f=n(86843),l=n(32029),h=n(90953),d=function(t){var e=function(n,r,s){if(this instanceof e){switch(arguments.length){case 0:return new t;case 1:return new t(n);case 2:return new t(n,r)}return new t(n,r,s)}return i(t,this,arguments)};return e.prototype=t.prototype,e};t.exports=function(t,e){var n,i,p,g,v,m,y,b,w,x=t.target,_=t.global,S=t.stat,P=t.proto,E=_?r:S?r[x]:(r[x]||{}).prototype,T=_?c:c[x]||l(c,x,{})[x],I=T.prototype;for(g in e)i=!(n=u(_?g:x+(S?".":"#")+g,t.forced))&&E&&h(E,g),m=T[g],i&&(y=t.dontCallGetSet?(w=a(E,g))&&w.value:E[g]),v=i&&y?y:e[g],i&&typeof m==typeof v||(b=t.bind&&i?f(v,r):t.wrap&&i?d(v):P&&o(v)?s(v):v,(t.sham||v&&v.sham||m&&m.sham)&&l(b,"sham",!0),l(T,g,b),P&&(h(c,p=x+"Prototype")||l(c,p,{}),l(c[p],g,v),t.real&&I&&(n||!I[g])&&l(I,g,v)))}},95981:function(t){"use strict";t.exports=function(t){try{return!!t()}catch(e){return!0}}},45602:function(t,e,n){"use strict";var r=n(95981);t.exports=!r((function(){return Object.isExtensible(Object.preventExtensions({}))}))},79730:function(t,e,n){"use strict";var r=n(18285),i=Function.prototype,s=i.apply,o=i.call;t.exports="object"==typeof Reflect&&Reflect.apply||(r?o.bind(s):function(){return o.apply(s,arguments)})},86843:function(t,e,n){"use strict";var r=n(97484),i=n(24883),s=n(18285),o=r(r.bind);t.exports=function(t,e){return i(t),e===undefined?t:s?o(t,e):function(){return t.apply(e,arguments)}}},18285:function(t,e,n){"use strict";var r=n(95981);t.exports=!r((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}))},98308:function(t,e,n){"use strict";var r=n(95329),i=n(24883),s=n(10941),o=n(90953),a=n(93765),u=n(18285),c=Function,f=r([].concat),l=r([].join),h={};t.exports=u?c.bind:function(t){var e=i(this),n=e.prototype,r=a(arguments,1),u=function(){var n=f(r,a(arguments));return this instanceof u?function(t,e,n){if(!o(h,e)){for(var r=[],i=0;iy;y++)if((w=k(t[y]))&&c(g,w))return w;return new p(!1)}v=f(t,m)}for(x=E?t.next:v.next;!(_=i(x,v)).done;){try{w=k(_.value)}catch(O){h(v,"throw",O)}if("object"==typeof w&&w&&c(g,w))return w}return new p(!1)}},7609:function(t,e,n){"use strict";var r=n(78834),i=n(96059),s=n(14229);t.exports=function(t,e,n){var o,a;i(t);try{if(!(o=s(t,"return"))){if("throw"===e)throw n;return n}o=r(o,t)}catch(u){a=!0,o=u}if("throw"===e)throw n;if(a)throw o;return i(o),n}},53847:function(t,e,n){"use strict";var r=n(35143).IteratorPrototype,i=n(29290),s=n(31887),o=n(90904),a=n(12077),u=function(){return this};t.exports=function(t,e,n,c){var f=e+" Iterator";return t.prototype=i(r,{next:s(+!c,n)}),o(t,f,!1,!0),a[f]=u,t}},75105:function(t,e,n){"use strict";var r=n(76887),i=n(78834),s=n(82529),o=n(79417),a=n(57475),u=n(53847),c=n(249),f=n(88929),l=n(90904),h=n(32029),d=n(95929),p=n(99813),g=n(12077),v=n(35143),m=o.PROPER,y=o.CONFIGURABLE,b=v.IteratorPrototype,w=v.BUGGY_SAFARI_ITERATORS,x=p("iterator"),_="keys",S="values",P="entries",E=function(){return this};t.exports=function(t,e,n,o,p,v,T){u(n,e,o);var I,A,R,k=function(t){if(t===p&&N)return N;if(!w&&t in D)return D[t];switch(t){case _:case S:case P:return function(){return new n(this,t)}}return function(){return new n(this)}},O=e+" Iterator",C=!1,D=t.prototype,L=D[x]||D["@@iterator"]||p&&D[p],N=!w&&L||k(p),U="Array"===e&&D.entries||L;if(U&&(I=c(U.call(new t)))!==Object.prototype&&I.next&&(s||c(I)===b||(f?f(I,b):a(I[x])||d(I,x,E)),l(I,O,!0,!0),s&&(g[O]=E)),m&&p===S&&L&&L.name!==S&&(!s&&y?h(D,"name",S):(C=!0,N=function(){return i(L,this)})),p)if(A={values:k(S),keys:v?N:k(_),entries:k(P)},T)for(R in A)(w||C||!(R in D))&&d(D,R,A[R]);else r({target:e,proto:!0,forced:w||C},A);return s&&!T||D[x]===N||d(D,x,N,{name:p}),g[e]=N,A}},35143:function(t,e,n){"use strict";var r,i,s,o=n(95981),a=n(57475),u=n(10941),c=n(29290),f=n(249),l=n(95929),h=n(99813),d=n(82529),p=h("iterator"),g=!1;[].keys&&("next"in(s=[].keys())?(i=f(f(s)))!==Object.prototype&&(r=i):g=!0),!u(r)||o((function(){var t={};return r[p].call(t)!==t}))?r={}:d&&(r=c(r)),a(r[p])||l(r,p,(function(){return this})),t.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:g}},12077:function(t){"use strict";t.exports={}},10623:function(t,e,n){"use strict";var r=n(43057);t.exports=function(t){return r(t.length)}},35331:function(t){"use strict";var e=Math.ceil,n=Math.floor;t.exports=Math.trunc||function(t){var r=+t;return(r>0?n:e)(r)}},66132:function(t,e,n){"use strict";var r,i,s,o,a,u=n(21899),c=n(86843),f=n(49677).f,l=n(42941).set,h=n(18397),d=n(22749),p=n(4470),g=n(58045),v=n(6049),m=u.MutationObserver||u.WebKitMutationObserver,y=u.document,b=u.process,w=u.Promise,x=f(u,"queueMicrotask"),_=x&&x.value;if(!_){var S=new h,P=function(){var t,e;for(v&&(t=b.domain)&&t.exit();e=S.get();)try{e()}catch(n){throw S.head&&r(),n}t&&t.enter()};d||v||g||!m||!y?!p&&w&&w.resolve?((o=w.resolve(undefined)).constructor=w,a=c(o.then,o),r=function(){a(P)}):v?r=function(){b.nextTick(P)}:(l=c(l,u),r=function(){l(P)}):(i=!0,s=y.createTextNode(""),new m(P).observe(s,{characterData:!0}),r=function(){s.data=i=!i}),_=function(t){S.head||r(),S.add(t)}}t.exports=_},69520:function(t,e,n){"use strict";var r=n(24883),i=TypeError,s=function(t){var e,n;this.promise=new t((function(t,r){if(e!==undefined||n!==undefined)throw i("Bad Promise constructor");e=t,n=r})),this.resolve=r(e),this.reject=r(n)};t.exports.f=function(t){return new s(t)}},14649:function(t,e,n){"use strict";var r=n(85803);t.exports=function(t,e){return t===undefined?arguments.length<2?"":e:r(t)}},70344:function(t,e,n){"use strict";var r=n(60685),i=TypeError;t.exports=function(t){if(r(t))throw i("The method doesn't accept regular expressions");return t}},24420:function(t,e,n){"use strict";var r=n(55746),i=n(95329),s=n(78834),o=n(95981),a=n(14771),u=n(87857),c=n(36760),f=n(89678),l=n(37026),h=Object.assign,d=Object.defineProperty,p=i([].concat);t.exports=!h||o((function(){if(r&&1!==h({b:1},h(d({},"a",{enumerable:!0,get:function(){d(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},n=Symbol("assign detection"),i="abcdefghijklmnopqrst";return t[n]=7,i.split("").forEach((function(t){e[t]=t})),7!==h({},t)[n]||a(h({},e)).join("")!==i}))?function(t,e){for(var n=f(t),i=arguments.length,o=1,h=u.f,d=c.f;i>o;)for(var g,v=l(arguments[o++]),m=h?p(a(v),h(v)):a(v),y=m.length,b=0;y>b;)g=m[b++],r&&!s(d,v,g)||(n[g]=v[g]);return n}:h},29290:function(t,e,n){"use strict";var r,i=n(96059),s=n(59938),o=n(56759),a=n(27748),u=n(15463),c=n(61333),f=n(44262),l="prototype",h="script",d=f("IE_PROTO"),p=function(){},g=function(t){return"<"+h+">"+t+""},v=function(t){t.write(g("")),t.close();var e=t.parentWindow.Object;return t=null,e},m=function(){try{r=new ActiveXObject("htmlfile")}catch(s){}var t,e,n;m="undefined"!=typeof document?document.domain&&r?v(r):(e=c("iframe"),n="java"+h+":",e.style.display="none",u.appendChild(e),e.src=String(n),(t=e.contentWindow.document).open(),t.write(g("document.F=Object")),t.close(),t.F):v(r);for(var i=o.length;i--;)delete m[l][o[i]];return m()};a[d]=!0,t.exports=Object.create||function(t,e){var n;return null!==t?(p[l]=i(t),n=new p,p[l]=null,n[d]=t):n=m(),e===undefined?n:s.f(n,e)}},59938:function(t,e,n){"use strict";var r=n(55746),i=n(83937),s=n(65988),o=n(96059),a=n(74529),u=n(14771);e.f=r&&!i?Object.defineProperties:function(t,e){o(t);for(var n,r=a(e),i=u(e),c=i.length,f=0;c>f;)s.f(t,n=i[f++],r[n]);return t}},65988:function(t,e,n){"use strict";var r=n(55746),i=n(2840),s=n(83937),o=n(96059),a=n(83894),u=TypeError,c=Object.defineProperty,f=Object.getOwnPropertyDescriptor,l="enumerable",h="configurable",d="writable";e.f=r?s?function(t,e,n){if(o(t),e=a(e),o(n),"function"==typeof t&&"prototype"===e&&"value"in n&&d in n&&!n[d]){var r=f(t,e);r&&r[d]&&(t[e]=n.value,n={configurable:h in n?n[h]:r[h],enumerable:l in n?n[l]:r[l],writable:!1})}return c(t,e,n)}:c:function(t,e,n){if(o(t),e=a(e),o(n),i)try{return c(t,e,n)}catch(r){}if("get"in n||"set"in n)throw u("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},49677:function(t,e,n){"use strict";var r=n(55746),i=n(78834),s=n(36760),o=n(31887),a=n(74529),u=n(83894),c=n(90953),f=n(2840),l=Object.getOwnPropertyDescriptor;e.f=r?l:function(t,e){if(t=a(t),e=u(e),f)try{return l(t,e)}catch(n){}if(c(t,e))return o(!i(s.f,t,e),t[e])}},684:function(t,e,n){"use strict";var r=n(82532),i=n(74529),s=n(10946).f,o=n(15790),a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){return a&&"Window"===r(t)?function(t){try{return s(t)}catch(e){return o(a)}}(t):s(i(t))}},10946:function(t,e,n){"use strict";var r=n(55629),i=n(56759).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,i)}},87857:function(t,e){"use strict";e.f=Object.getOwnPropertySymbols},249:function(t,e,n){"use strict";var r=n(90953),i=n(57475),s=n(89678),o=n(44262),a=n(64160),u=o("IE_PROTO"),c=Object,f=c.prototype;t.exports=a?c.getPrototypeOf:function(t){var e=s(t);if(r(e,u))return e[u];var n=e.constructor;return i(n)&&e instanceof n?n.prototype:e instanceof c?f:null}},91584:function(t,e,n){"use strict";var r=n(95981),i=n(10941),s=n(82532),o=n(97135),a=Object.isExtensible,u=r((function(){a(1)}));t.exports=u||o?function(t){return!!i(t)&&((!o||"ArrayBuffer"!==s(t))&&(!a||a(t)))}:a},7046:function(t,e,n){"use strict";var r=n(95329);t.exports=r({}.isPrototypeOf)},55629:function(t,e,n){"use strict";var r=n(95329),i=n(90953),s=n(74529),o=n(31692).indexOf,a=n(27748),u=r([].push);t.exports=function(t,e){var n,r=s(t),c=0,f=[];for(n in r)!i(a,n)&&i(r,n)&&u(f,n);for(;e.length>c;)i(r,n=e[c++])&&(~o(f,n)||u(f,n));return f}},14771:function(t,e,n){"use strict";var r=n(55629),i=n(56759);t.exports=Object.keys||function(t){return r(t,i)}},36760:function(t,e){"use strict";var n={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,i=r&&!n.call({1:2},1);e.f=i?function(t){var e=r(this,t);return!!e&&e.enumerable}:n},88929:function(t,e,n){"use strict";var r=n(45526),i=n(96059),s=n(11851);t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{(t=r(Object.prototype,"__proto__","set"))(n,[]),e=n instanceof Array}catch(o){}return function(n,r){return i(n),s(r),e?t(n,r):n.__proto__=r,n}}():undefined)},88810:function(t,e,n){"use strict";var r=n(55746),i=n(95981),s=n(95329),o=n(249),a=n(14771),u=n(74529),c=s(n(36760).f),f=s([].push),l=r&&i((function(){var t=Object.create(null);return t[2]=2,!c(t,2)})),h=function(t){return function(e){for(var n,i=u(e),s=a(i),h=l&&null===o(i),d=s.length,p=0,g=[];d>p;)n=s[p++],r&&!(h?n in i:c(i,n))||f(g,t?[n,i[n]]:i[n]);return g}};t.exports={entries:h(!0),values:h(!1)}},95623:function(t,e,n){"use strict";var r=n(22885),i=n(9697);t.exports=r?{}.toString:function(){return"[object "+i(this)+"]"}},39811:function(t,e,n){"use strict";var r=n(78834),i=n(57475),s=n(10941),o=TypeError;t.exports=function(t,e){var n,a;if("string"===e&&i(n=t.toString)&&!s(a=r(n,t)))return a;if(i(n=t.valueOf)&&!s(a=r(n,t)))return a;if("string"!==e&&i(n=t.toString)&&!s(a=r(n,t)))return a;throw o("Can't convert object to primitive value")}},31136:function(t,e,n){"use strict";var r=n(626),i=n(95329),s=n(10946),o=n(87857),a=n(96059),u=i([].concat);t.exports=r("Reflect","ownKeys")||function(t){var e=s.f(a(t)),n=o.f;return n?u(e,n(t)):e}},54058:function(t){"use strict";t.exports={}},40002:function(t){"use strict";t.exports=function(t){try{return{error:!1,value:t()}}catch(e){return{error:!0,value:e}}}},67742:function(t,e,n){"use strict";var r=n(21899),i=n(6991),s=n(57475),o=n(37252),a=n(81302),u=n(99813),c=n(23321),f=n(48501),l=n(82529),h=n(53385),d=i&&i.prototype,p=u("species"),g=!1,v=s(r.PromiseRejectionEvent),m=o("Promise",(function(){var t=a(i),e=t!==String(i);if(!e&&66===h)return!0;if(l&&(!d["catch"]||!d["finally"]))return!0;if(!h||h<51||!/native code/.test(t)){var n=new i((function(t){t(1)})),r=function(t){t((function(){}),(function(){}))};if((n.constructor={})[p]=r,!(g=n.then((function(){}))instanceof r))return!0}return!e&&(c||f)&&!v}));t.exports={CONSTRUCTOR:m,REJECTION_EVENT:v,SUBCLASSING:g}},6991:function(t,e,n){"use strict";var r=n(21899);t.exports=r.Promise},56584:function(t,e,n){"use strict";var r=n(96059),i=n(10941),s=n(69520);t.exports=function(t,e){if(r(t),i(e)&&e.constructor===t)return e;var n=s.f(t);return(0,n.resolve)(e),n.promise}},31542:function(t,e,n){"use strict";var r=n(6991),i=n(21385),s=n(67742).CONSTRUCTOR;t.exports=s||!i((function(t){r.all(t).then(undefined,(function(){}))}))},18397:function(t){"use strict";var e=function(){this.head=null,this.tail=null};e.prototype={add:function(t){var e={item:t,next:null},n=this.tail;n?n.next=e:this.head=e,this.tail=e},get:function(){var t=this.head;if(t)return null===(this.head=t.next)&&(this.tail=null),t.item}},t.exports=e},48219:function(t,e,n){"use strict";var r=n(82119),i=TypeError;t.exports=function(t){if(r(t))throw i("Can't call method on "+t);return t}},94431:function(t,e,n){"use strict";var r=n(626),i=n(29202),s=n(99813),o=n(55746),a=s("species");t.exports=function(t){var e=r(t);o&&e&&!e[a]&&i(e,a,{configurable:!0,get:function(){return this}})}},90904:function(t,e,n){"use strict";var r=n(22885),i=n(65988).f,s=n(32029),o=n(90953),a=n(95623),u=n(99813)("toStringTag");t.exports=function(t,e,n,c){if(t){var f=n?t:t.prototype;o(f,u)||i(f,u,{configurable:!0,value:e}),c&&!r&&s(f,"toString",a)}}},44262:function(t,e,n){"use strict";var r=n(68726),i=n(99418),s=r("keys");t.exports=function(t){return s[t]||(s[t]=i(t))}},63030:function(t,e,n){"use strict";var r=n(21899),i=n(75609),s="__core-js_shared__",o=r[s]||i(s,{});t.exports=o},68726:function(t,e,n){"use strict";var r=n(82529),i=n(63030);(t.exports=function(t,e){return i[t]||(i[t]=e!==undefined?e:{})})("versions",[]).push({version:"3.32.1",mode:r?"pure":"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.32.1/LICENSE",source:"https://github.com/zloirock/core-js"})},70487:function(t,e,n){"use strict";var r=n(96059),i=n(174),s=n(82119),o=n(99813)("species");t.exports=function(t,e){var n,a=r(t).constructor;return a===undefined||s(n=r(a)[o])?e:i(n)}},64620:function(t,e,n){"use strict";var r=n(95329),i=n(62435),s=n(85803),o=n(48219),a=r("".charAt),u=r("".charCodeAt),c=r("".slice),f=function(t){return function(e,n){var r,f,l=s(o(e)),h=i(n),d=l.length;return h<0||h>=d?t?"":undefined:(r=u(l,h))<55296||r>56319||h+1===d||(f=u(l,h+1))<56320||f>57343?t?a(l,h):r:t?c(l,h,h+2):f-56320+(r-55296<<10)+65536}};t.exports={codeAt:f(!1),charAt:f(!0)}},73291:function(t,e,n){"use strict";var r=n(95329),i=2147483647,s=/[^\0-\u007E]/,o=/[.\u3002\uFF0E\uFF61]/g,a="Overflow: input needs wider integers to process",u=RangeError,c=r(o.exec),f=Math.floor,l=String.fromCharCode,h=r("".charCodeAt),d=r([].join),p=r([].push),g=r("".replace),v=r("".split),m=r("".toLowerCase),y=function(t){return t+22+75*(t<26)},b=function(t,e,n){var r=0;for(t=n?f(t/700):t>>1,t+=f(t/e);t>455;)t=f(t/35),r+=36;return f(r+36*t/(t+38))},w=function(t){var e=[];t=function(t){for(var e=[],n=0,r=t.length;n=55296&&i<=56319&&n=o&&rf((i-c)/x))throw u(a);for(c+=(w-o)*x,o=w,n=0;ni)throw u(a);if(r===o){for(var _=c,S=36;;){var P=S<=g?1:S>=g+26?26:S-g;if(_0?i(r(t),9007199254740991):0}},89678:function(t,e,n){"use strict";var r=n(48219),i=Object;t.exports=function(t){return i(r(t))}},46935:function(t,e,n){"use strict";var r=n(78834),i=n(10941),s=n(56664),o=n(14229),a=n(39811),u=n(99813),c=TypeError,f=u("toPrimitive");t.exports=function(t,e){if(!i(t)||s(t))return t;var n,u=o(t,f);if(u){if(e===undefined&&(e="default"),n=r(u,t,e),!i(n)||s(n))return n;throw c("Can't convert object to primitive value")}return e===undefined&&(e="number"),a(t,e)}},83894:function(t,e,n){"use strict";var r=n(46935),i=n(56664);t.exports=function(t){var e=r(t,"string");return i(e)?e:e+""}},22885:function(t,e,n){"use strict";var r={};r[n(99813)("toStringTag")]="z",t.exports="[object z]"===String(r)},85803:function(t,e,n){"use strict";var r=n(9697),i=String;t.exports=function(t){if("Symbol"===r(t))throw TypeError("Cannot convert a Symbol value to a string");return i(t)}},69826:function(t){"use strict";var e=String;t.exports=function(t){try{return e(t)}catch(n){return"Object"}}},99418:function(t,e,n){"use strict";var r=n(95329),i=0,s=Math.random(),o=r(1..toString);t.exports=function(t){return"Symbol("+(t===undefined?"":t)+")_"+o(++i+s,36)}},14766:function(t,e,n){"use strict";var r=n(95981),i=n(99813),s=n(55746),o=n(82529),a=i("iterator");t.exports=!r((function(){var t=new URL("b?a=1&b=2&c=3","http://a"),e=t.searchParams,n=new URLSearchParams("a=1&a=2&b=3"),r="";return t.pathname="c%20d",e.forEach((function(t,n){e["delete"]("b"),r+=n+t})),n["delete"]("a",2),n["delete"]("b",undefined),o&&(!t.toJSON||!n.has("a",1)||n.has("a",2)||!n.has("a",undefined)||n.has("b"))||!e.size&&(o||!s)||!e.sort||"http://a/c%20d?a=1&c=3"!==t.href||"3"!==e.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!e[a]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://тест").host||"#%D0%B1"!==new URL("http://a#б").hash||"a1c3"!==r||"x"!==new URL("http://x",undefined).host}))},32302:function(t,e,n){"use strict";var r=n(63405);t.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},83937:function(t,e,n){"use strict";var r=n(55746),i=n(95981);t.exports=r&&i((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},18348:function(t){"use strict";var e=TypeError;t.exports=function(t,n){if(t2&&l(n,arguments[2]);var a=[];return d(t,m,{that:a}),c(n,"errors",a),n};o?o(y,v):a(y,v,{name:!0});var b=y.prototype=u(v.prototype,{constructor:f(1,y),message:f(1,""),name:f(1,"AggregateError")});r({global:!0,constructor:!0,arity:2},{AggregateError:y})},47627:function(t,e,n){"use strict";n(49812)},85906:function(t,e,n){"use strict";var r=n(76887),i=n(95981),s=n(1052),o=n(10941),a=n(89678),u=n(10623),c=n(66796),f=n(55449),l=n(64692),h=n(50568),d=n(99813),p=n(53385),g=d("isConcatSpreadable"),v=p>=51||!i((function(){var t=[];return t[g]=!1,t.concat()[0]!==t})),m=function(t){if(!o(t))return!1;var e=t[g];return e!==undefined?!!e:s(t)};r({target:"Array",proto:!0,arity:1,forced:!v||!h("concat")},{concat:function(t){var e,n,r,i,s,o=a(this),h=l(o,0),d=0;for(e=-1,r=arguments.length;e1?arguments[1]:undefined)}})},44929:function(t,e,n){"use strict";var r=n(76887),i=n(3610).findIndex,s=n(18479),o="findIndex",a=!0;o in[]&&Array(1)[o]((function(){a=!1})),r({target:"Array",proto:!0,forced:a},{findIndex:function(t){return i(this,t,arguments.length>1?arguments[1]:undefined)}}),s(o)},2437:function(t,e,n){"use strict";var r=n(76887),i=n(56837);r({target:"Array",proto:!0,forced:[].forEach!==i},{forEach:i})},53242:function(t,e,n){"use strict";var r=n(76887),i=n(11354);r({target:"Array",stat:!0,forced:!n(21385)((function(t){Array.from(t)}))},{from:i})},97690:function(t,e,n){"use strict";var r=n(76887),i=n(31692).includes,s=n(95981),o=n(18479);r({target:"Array",proto:!0,forced:s((function(){return!Array(1).includes()}))},{includes:function(t){return i(this,t,arguments.length>1?arguments[1]:undefined)}}),o("includes")},99076:function(t,e,n){"use strict";var r=n(76887),i=n(97484),s=n(31692).indexOf,o=n(34194),a=i([].indexOf),u=!!a&&1/a([1],1,-0)<0;r({target:"Array",proto:!0,forced:u||!o("indexOf")},{indexOf:function(t){var e=arguments.length>1?arguments[1]:undefined;return u?a(this,t,e)||0:s(this,t,e)}})},92737:function(t,e,n){"use strict";n(76887)({target:"Array",stat:!0},{isArray:n(1052)})},66274:function(t,e,n){"use strict";var r=n(74529),i=n(18479),s=n(12077),o=n(45402),a=n(65988).f,u=n(75105),c=n(23538),f=n(82529),l=n(55746),h="Array Iterator",d=o.set,p=o.getterFor(h);t.exports=u(Array,"Array",(function(t,e){d(this,{type:h,target:r(t),index:0,kind:e})}),(function(){var t=p(this),e=t.target,n=t.kind,r=t.index++;if(!e||r>=e.length)return t.target=undefined,c(undefined,!0);switch(n){case"keys":return c(r,!1);case"values":return c(e[r],!1)}return c([r,e[r]],!1)}),"values");var g=s.Arguments=s.Array;if(i("keys"),i("values"),i("entries"),!f&&l&&"values"!==g.name)try{a(g,"name",{value:"values"})}catch(v){}},68787:function(t,e,n){"use strict";var r=n(76887),i=n(3610).map;r({target:"Array",proto:!0,forced:!n(50568)("map")},{map:function(t){return i(this,t,arguments.length>1?arguments[1]:undefined)}})},48528:function(t,e,n){"use strict";var r=n(76887),i=n(89678),s=n(10623),o=n(89779),a=n(66796);r({target:"Array",proto:!0,arity:1,forced:n(95981)((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=i(this),n=s(e),r=arguments.length;a(n+r);for(var u=0;u3)){if(p)return!0;if(v)return v<603;var t,e,n,r,i="";for(t=65;t<76;t++){switch(e=String.fromCharCode(t),t){case 66:case 69:case 70:case 72:n=3;break;case 68:case 71:n=4;break;default:n=2}for(r=0;r<47;r++)m.push({k:e+r,v:n})}for(m.sort((function(t,e){return e.v-t.v})),r=0;rc(n)?1:-1}}(t)),n=a(i),r=0;rw-r+n;v--)h(b,v-1)}else if(n>r)for(v=w-r;v>x;v--)y=v+n-1,(m=v+r-1)in b?b[y]=b[m]:h(b,y);for(v=0;vl;)(n=i(r,e=c[l++]))!==undefined&&u(f,e,n);return f}})},37144:function(t,e,n){"use strict";var r=n(76887),i=n(63405),s=n(95981),o=n(87857),a=n(89678);r({target:"Object",stat:!0,forced:!i||s((function(){o.f(1)}))},{getOwnPropertySymbols:function(t){var e=o.f;return e?e(a(t)):[]}})},17405:function(t,e,n){"use strict";var r=n(76887),i=n(95981),s=n(89678),o=n(249),a=n(64160);r({target:"Object",stat:!0,forced:i((function(){o(1)})),sham:!a},{getPrototypeOf:function(t){return o(s(t))}})},21724:function(t,e,n){"use strict";var r=n(76887),i=n(89678),s=n(14771);r({target:"Object",stat:!0,forced:n(95981)((function(){s(1)}))},{keys:function(t){return s(i(t))}})},90108:function(t,e,n){"use strict";n(76887)({target:"Object",stat:!0},{setPrototypeOf:n(88929)})},55967:function(){},26614:function(t,e,n){"use strict";var r=n(76887),i=n(88810).values;r({target:"Object",stat:!0},{values:function(t){return i(t)}})},4560:function(t,e,n){"use strict";var r=n(76887),i=n(78834),s=n(24883),o=n(69520),a=n(40002),u=n(93091);r({target:"Promise",stat:!0,forced:n(31542)},{allSettled:function(t){var e=this,n=o.f(e),r=n.resolve,c=n.reject,f=a((function(){var n=s(e.resolve),o=[],a=0,c=1;u(t,(function(t){var s=a++,u=!1;c++,i(n,e,t).then((function(t){u||(u=!0,o[s]={status:"fulfilled",value:t},--c||r(o))}),(function(t){u||(u=!0,o[s]={status:"rejected",reason:t},--c||r(o))}))})),--c||r(o)}));return f.error&&c(f.value),n.promise}})},16890:function(t,e,n){"use strict";var r=n(76887),i=n(78834),s=n(24883),o=n(69520),a=n(40002),u=n(93091);r({target:"Promise",stat:!0,forced:n(31542)},{all:function(t){var e=this,n=o.f(e),r=n.resolve,c=n.reject,f=a((function(){var n=s(e.resolve),o=[],a=0,f=1;u(t,(function(t){var s=a++,u=!1;f++,i(n,e,t).then((function(t){u||(u=!0,o[s]=t,--f||r(o))}),c)})),--f||r(o)}));return f.error&&c(f.value),n.promise}})},91302:function(t,e,n){"use strict";var r=n(76887),i=n(78834),s=n(24883),o=n(626),a=n(69520),u=n(40002),c=n(93091),f=n(31542),l="No one promise resolved";r({target:"Promise",stat:!0,forced:f},{any:function(t){var e=this,n=o("AggregateError"),r=a.f(e),f=r.resolve,h=r.reject,d=u((function(){var r=s(e.resolve),o=[],a=0,u=1,d=!1;c(t,(function(t){var s=a++,c=!1;u++,i(r,e,t).then((function(t){c||d||(d=!0,f(t))}),(function(t){c||d||(c=!0,o[s]=t,--u||h(new n(o,l)))}))})),--u||h(new n(o,l))}));return d.error&&h(d.value),r.promise}})},83376:function(t,e,n){"use strict";var r=n(76887),i=n(82529),s=n(67742).CONSTRUCTOR,o=n(6991),a=n(626),u=n(57475),c=n(95929),f=o&&o.prototype;if(r({target:"Promise",proto:!0,forced:s,real:!0},{"catch":function(t){return this.then(undefined,t)}}),!i&&u(o)){var l=a("Promise").prototype["catch"];f["catch"]!==l&&c(f,"catch",l,{unsafe:!0})}},26934:function(t,e,n){"use strict";var r,i,s,o=n(76887),a=n(82529),u=n(6049),c=n(21899),f=n(78834),l=n(95929),h=n(88929),d=n(90904),p=n(94431),g=n(24883),v=n(57475),m=n(10941),y=n(5743),b=n(70487),w=n(42941).set,x=n(66132),_=n(34845),S=n(40002),P=n(18397),E=n(45402),T=n(6991),I=n(67742),A=n(69520),R="Promise",k=I.CONSTRUCTOR,O=I.REJECTION_EVENT,C=I.SUBCLASSING,D=E.getterFor(R),L=E.set,N=T&&T.prototype,U=T,j=N,M=c.TypeError,q=c.document,B=c.process,F=A.f,H=F,W=!!(q&&q.createEvent&&c.dispatchEvent),G="unhandledrejection",X=function(t){var e;return!(!m(t)||!v(e=t.then))&&e},Y=function(t,e){var n,r,i,s=e.value,o=1===e.state,a=o?t.ok:t.fail,u=t.resolve,c=t.reject,l=t.domain;try{a?(o||(2===e.rejection&&K(e),e.rejection=1),!0===a?n=s:(l&&l.enter(),n=a(s),l&&(l.exit(),i=!0)),n===t.promise?c(M("Promise-chain cycle")):(r=X(n))?f(r,n,u,c):u(n)):c(s)}catch(h){l&&!i&&l.exit(),c(h)}},$=function(t,e){t.notified||(t.notified=!0,x((function(){for(var n,r=t.reactions;n=r.get();)Y(n,t);t.notified=!1,e&&!t.rejection&&Q(t)})))},V=function(t,e,n){var r,i;W?((r=q.createEvent("Event")).promise=e,r.reason=n,r.initEvent(t,!1,!0),c.dispatchEvent(r)):r={promise:e,reason:n},!O&&(i=c["on"+t])?i(r):t===G&&_("Unhandled promise rejection",n)},Q=function(t){f(w,c,(function(){var e,n=t.facade,r=t.value;if(z(t)&&(e=S((function(){u?B.emit("unhandledRejection",r,n):V(G,n,r)})),t.rejection=u||z(t)?2:1,e.error))throw e.value}))},z=function(t){return 1!==t.rejection&&!t.parent},K=function(t){f(w,c,(function(){var e=t.facade;u?B.emit("rejectionHandled",e):V("rejectionhandled",e,t.value)}))},J=function(t,e,n){return function(r){t(e,r,n)}},Z=function(t,e,n){t.done||(t.done=!0,n&&(t=n),t.value=e,t.state=2,$(t,!0))},tt=function(t,e,n){if(!t.done){t.done=!0,n&&(t=n);try{if(t.facade===e)throw M("Promise can't be resolved itself");var r=X(e);r?x((function(){var n={done:!1};try{f(r,e,J(tt,n,t),J(Z,n,t))}catch(i){Z(n,i,t)}})):(t.value=e,t.state=1,$(t,!1))}catch(i){Z({done:!1},i,t)}}};if(k&&(U=function(t){y(this,j),g(t),f(r,this);var e=D(this);try{t(J(tt,e),J(Z,e))}catch(n){Z(e,n)}},j=U.prototype,(r=function(t){L(this,{type:R,done:!1,notified:!1,parent:!1,reactions:new P,rejection:!1,state:0,value:undefined})}).prototype=l(j,"then",(function(t,e){var n=D(this),r=F(b(this,U));return n.parent=!0,r.ok=!v(t)||t,r.fail=v(e)&&e,r.domain=u?B.domain:undefined,0===n.state?n.reactions.add(r):x((function(){Y(r,n)})),r.promise})),i=function(){var t=new r,e=D(t);this.promise=t,this.resolve=J(tt,e),this.reject=J(Z,e)},A.f=F=function(t){return t===U||undefined===t?new i(t):H(t)},!a&&v(T)&&N!==Object.prototype)){s=N.then,C||l(N,"then",(function(t,e){var n=this;return new U((function(t,e){f(s,n,t,e)})).then(t,e)}),{unsafe:!0});try{delete N.constructor}catch(et){}h&&h(N,j)}o({global:!0,constructor:!0,wrap:!0,forced:k},{Promise:U}),d(U,R,!1,!0),p(R)},44349:function(t,e,n){"use strict";var r=n(76887),i=n(82529),s=n(6991),o=n(95981),a=n(626),u=n(57475),c=n(70487),f=n(56584),l=n(95929),h=s&&s.prototype;if(r({target:"Promise",proto:!0,real:!0,forced:!!s&&o((function(){h["finally"].call({then:function(){}},(function(){}))}))},{"finally":function(t){var e=c(this,a("Promise")),n=u(t);return this.then(n?function(n){return f(e,t()).then((function(){return n}))}:t,n?function(n){return f(e,t()).then((function(){throw n}))}:t)}}),!i&&u(s)){var d=a("Promise").prototype["finally"];h["finally"]!==d&&l(h,"finally",d,{unsafe:!0})}},98881:function(t,e,n){"use strict";n(26934),n(16890),n(83376),n(55921),n(64069),n(14482)},55921:function(t,e,n){"use strict";var r=n(76887),i=n(78834),s=n(24883),o=n(69520),a=n(40002),u=n(93091);r({target:"Promise",stat:!0,forced:n(31542)},{race:function(t){var e=this,n=o.f(e),r=n.reject,c=a((function(){var o=s(e.resolve);u(t,(function(t){i(o,e,t).then(n.resolve,r)}))}));return c.error&&r(c.value),n.promise}})},64069:function(t,e,n){"use strict";var r=n(76887),i=n(78834),s=n(69520);r({target:"Promise",stat:!0,forced:n(67742).CONSTRUCTOR},{reject:function(t){var e=s.f(this);return i(e.reject,undefined,t),e.promise}})},14482:function(t,e,n){"use strict";var r=n(76887),i=n(626),s=n(82529),o=n(6991),a=n(67742).CONSTRUCTOR,u=n(56584),c=i("Promise"),f=s&&!a;r({target:"Promise",stat:!0,forced:s||a},{resolve:function(t){return u(f&&this===c?o:this,t)}})},7453:function(t,e,n){"use strict";var r=n(76887),i=n(626),s=n(79730),o=n(98308),a=n(174),u=n(96059),c=n(10941),f=n(29290),l=n(95981),h=i("Reflect","construct"),d=Object.prototype,p=[].push,g=l((function(){function t(){}return!(h((function(){}),[],t)instanceof t)})),v=!l((function(){h((function(){}))})),m=g||v;r({target:"Reflect",stat:!0,forced:m,sham:m},{construct:function(t,e){a(t),u(e);var n=arguments.length<3?t:a(arguments[2]);if(v&&!g)return h(t,e,n);if(t===n){switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3])}var r=[null];return s(p,r,e),new(s(o,t,r))}var i=n.prototype,l=f(c(i)?i:d),m=s(t,l,e);return c(m)?m:l}})},1502:function(){},1293:function(t,e,n){"use strict";var r,i=n(76887),s=n(97484),o=n(49677).f,a=n(43057),u=n(85803),c=n(70344),f=n(48219),l=n(67772),h=n(82529),d=s("".endsWith),p=s("".slice),g=Math.min,v=l("endsWith");i({target:"String",proto:!0,forced:!!(h||v||(r=o(String.prototype,"endsWith"),!r||r.writable))&&!v},{endsWith:function(t){var e=u(f(this));c(t);var n=arguments.length>1?arguments[1]:undefined,r=e.length,i=n===undefined?r:g(a(n),r),s=u(t);return d?d(e,s,i):p(e,i-s.length,i)===s}})},11035:function(t,e,n){"use strict";var r=n(76887),i=n(95329),s=n(70344),o=n(48219),a=n(85803),u=n(67772),c=i("".indexOf);r({target:"String",proto:!0,forced:!u("includes")},{includes:function(t){return!!~c(a(o(this)),a(s(t)),arguments.length>1?arguments[1]:undefined)}})},77971:function(t,e,n){"use strict";var r=n(64620).charAt,i=n(85803),s=n(45402),o=n(75105),a=n(23538),u="String Iterator",c=s.set,f=s.getterFor(u);o(String,"String",(function(t){c(this,{type:u,string:i(t),index:0})}),(function(){var t,e=f(this),n=e.string,i=e.index;return i>=n.length?a(undefined,!0):(t=r(n,i),e.index+=t.length,a(t,!1))}))},8555:function(t,e,n){"use strict";n(73464)("asyncIterator")},48616:function(t,e,n){"use strict";var r=n(76887),i=n(21899),s=n(78834),o=n(95329),a=n(82529),u=n(55746),c=n(63405),f=n(95981),l=n(90953),h=n(7046),d=n(96059),p=n(74529),g=n(83894),v=n(85803),m=n(31887),y=n(29290),b=n(14771),w=n(10946),x=n(684),_=n(87857),S=n(49677),P=n(65988),E=n(59938),T=n(36760),I=n(95929),A=n(29202),R=n(68726),k=n(44262),O=n(27748),C=n(99418),D=n(99813),L=n(11477),N=n(73464),U=n(29630),j=n(90904),M=n(45402),q=n(3610).forEach,B=k("hidden"),F="Symbol",H="prototype",W=M.set,G=M.getterFor(F),X=Object[H],Y=i.Symbol,$=Y&&Y[H],V=i.TypeError,Q=i.QObject,z=S.f,K=P.f,J=x.f,Z=T.f,tt=o([].push),et=R("symbols"),nt=R("op-symbols"),rt=R("wks"),it=!Q||!Q[H]||!Q[H].findChild,st=u&&f((function(){return 7!==y(K({},"a",{get:function(){return K(this,"a",{value:7}).a}})).a}))?function(t,e,n){var r=z(X,e);r&&delete X[e],K(t,e,n),r&&t!==X&&K(X,e,r)}:K,ot=function(t,e){var n=et[t]=y($);return W(n,{type:F,tag:t,description:e}),u||(n.description=e),n},at=function(t,e,n){t===X&&at(nt,e,n),d(t);var r=g(e);return d(n),l(et,r)?(n.enumerable?(l(t,B)&&t[B][r]&&(t[B][r]=!1),n=y(n,{enumerable:m(0,!1)})):(l(t,B)||K(t,B,m(1,{})),t[B][r]=!0),st(t,r,n)):K(t,r,n)},ut=function(t,e){d(t);var n=p(e),r=b(n).concat(ht(n));return q(r,(function(e){u&&!s(ct,n,e)||at(t,e,n[e])})),t},ct=function(t){var e=g(t),n=s(Z,this,e);return!(this===X&&l(et,e)&&!l(nt,e))&&(!(n||!l(this,e)||!l(et,e)||l(this,B)&&this[B][e])||n)},ft=function(t,e){var n=p(t),r=g(e);if(n!==X||!l(et,r)||l(nt,r)){var i=z(n,r);return!i||!l(et,r)||l(n,B)&&n[B][r]||(i.enumerable=!0),i}},lt=function(t){var e=J(p(t)),n=[];return q(e,(function(t){l(et,t)||l(O,t)||tt(n,t)})),n},ht=function(t){var e=t===X,n=J(e?nt:p(t)),r=[];return q(n,(function(t){!l(et,t)||e&&!l(X,t)||tt(r,et[t])})),r};c||(Y=function(){if(h($,this))throw V("Symbol is not a constructor");var t=arguments.length&&arguments[0]!==undefined?v(arguments[0]):undefined,e=C(t),n=function(t){this===X&&s(n,nt,t),l(this,B)&&l(this[B],e)&&(this[B][e]=!1),st(this,e,m(1,t))};return u&&it&&st(X,e,{configurable:!0,set:n}),ot(e,t)},I($=Y[H],"toString",(function(){return G(this).tag})),I(Y,"withoutSetter",(function(t){return ot(C(t),t)})),T.f=ct,P.f=at,E.f=ut,S.f=ft,w.f=x.f=lt,_.f=ht,L.f=function(t){return ot(D(t),t)},u&&(A($,"description",{configurable:!0,get:function(){return G(this).description}}),a||I(X,"propertyIsEnumerable",ct,{unsafe:!0}))),r({global:!0,constructor:!0,wrap:!0,forced:!c,sham:!c},{Symbol:Y}),q(b(rt),(function(t){N(t)})),r({target:F,stat:!0,forced:!c},{useSetter:function(){it=!0},useSimple:function(){it=!1}}),r({target:"Object",stat:!0,forced:!c,sham:!u},{create:function(t,e){return e===undefined?y(t):ut(y(t),e)},defineProperty:at,defineProperties:ut,getOwnPropertyDescriptor:ft}),r({target:"Object",stat:!0,forced:!c},{getOwnPropertyNames:lt}),U(),j(Y,F),O[B]=!0},52615:function(){},64523:function(t,e,n){"use strict";var r=n(76887),i=n(626),s=n(90953),o=n(85803),a=n(68726),u=n(34680),c=a("string-to-symbol-registry"),f=a("symbol-to-string-registry");r({target:"Symbol",stat:!0,forced:!u},{"for":function(t){var e=o(t);if(s(c,e))return c[e];var n=i("Symbol")(e);return c[e]=n,f[n]=e,n}})},21732:function(t,e,n){"use strict";n(73464)("hasInstance")},35903:function(t,e,n){"use strict";n(73464)("isConcatSpreadable")},1825:function(t,e,n){"use strict";n(73464)("iterator")},35824:function(t,e,n){"use strict";n(48616),n(64523),n(38608),n(32619),n(37144)},38608:function(t,e,n){"use strict";var r=n(76887),i=n(90953),s=n(56664),o=n(69826),a=n(68726),u=n(34680),c=a("symbol-to-string-registry");r({target:"Symbol",stat:!0,forced:!u},{keyFor:function(t){if(!s(t))throw TypeError(o(t)+" is not a symbol");if(i(c,t))return c[t]}})},45915:function(t,e,n){"use strict";n(73464)("matchAll")},28394:function(t,e,n){"use strict";n(73464)("match")},61766:function(t,e,n){"use strict";n(73464)("replace")},62737:function(t,e,n){"use strict";n(73464)("search")},89911:function(t,e,n){"use strict";n(73464)("species")},74315:function(t,e,n){"use strict";n(73464)("split")},63131:function(t,e,n){"use strict";var r=n(73464),i=n(29630);r("toPrimitive"),i()},64714:function(t,e,n){"use strict";var r=n(626),i=n(73464),s=n(90904);i("toStringTag"),s(r("Symbol"),"Symbol")},70659:function(t,e,n){"use strict";n(73464)("unscopables")},89731:function(t,e,n){"use strict";n(47627)},97522:function(t,e,n){"use strict";var r=n(99813),i=n(65988).f,s=r("metadata"),o=Function.prototype;o[s]===undefined&&i(o,s,{value:null})},55708:function(t,e,n){"use strict";n(4560)},88731:function(t,e,n){"use strict";n(91302)},30014:function(t,e,n){"use strict";var r=n(76887),i=n(69520),s=n(40002);r({target:"Promise",stat:!0,forced:!0},{"try":function(t){var e=i.f(this),n=s(t);return(n.error?e.reject:e.resolve)(n.value),e.promise}})},93868:function(t,e,n){"use strict";var r=n(76887),i=n(69520);r({target:"Promise",stat:!0},{withResolvers:function(){var t=i.f(this);return{promise:t.promise,resolve:t.resolve,reject:t.reject}}})},28783:function(t,e,n){"use strict";n(73464)("asyncDispose")},43975:function(t,e,n){"use strict";n(73464)("dispose")},97618:function(t,e,n){"use strict";n(76887)({target:"Symbol",stat:!0},{isRegisteredSymbol:n(32087)})},22731:function(t,e,n){"use strict";n(76887)({target:"Symbol",stat:!0,name:"isRegisteredSymbol"},{isRegistered:n(32087)})},6989:function(t,e,n){"use strict";n(76887)({target:"Symbol",stat:!0,forced:!0},{isWellKnownSymbol:n(96559)})},85605:function(t,e,n){"use strict";n(76887)({target:"Symbol",stat:!0,name:"isWellKnownSymbol",forced:!0},{isWellKnown:n(96559)})},65799:function(t,e,n){"use strict";n(73464)("matcher")},31943:function(t,e,n){"use strict";n(73464)("metadataKey")},45414:function(t,e,n){"use strict";n(73464)("metadata")},46774:function(t,e,n){"use strict";n(73464)("observable")},80620:function(t,e,n){"use strict";n(73464)("patternMatch")},36172:function(t,e,n){"use strict";n(73464)("replaceAll")},7634:function(t,e,n){"use strict";n(66274);var r=n(63281),i=n(21899),s=n(9697),o=n(32029),a=n(12077),u=n(99813)("toStringTag");for(var c in r){var f=i[c],l=f&&f.prototype;l&&s(l)!==u&&o(l,u,c),a[c]=a.Array}},73231:function(t,e,n){"use strict";var r=n(76887),i=n(21899),s=n(66132),o=n(24883),a=n(18348),u=n(6049),c=i.process;r({global:!0,enumerable:!0,dontCallGetSet:!0},{queueMicrotask:function(t){a(arguments.length,1),o(t);var e=u&&c.domain;s(e?e.bind(t):t)}})},62524:function(t,e,n){"use strict";n(66274);var r=n(76887),i=n(21899),s=n(78834),o=n(95329),a=n(55746),u=n(14766),c=n(95929),f=n(29202),l=n(94380),h=n(90904),d=n(53847),p=n(45402),g=n(5743),v=n(57475),m=n(90953),y=n(86843),b=n(9697),w=n(96059),x=n(10941),_=n(85803),S=n(29290),P=n(31887),E=n(53476),T=n(22902),I=n(18348),A=n(99813),R=n(61388),k=A("iterator"),O="URLSearchParams",C=O+"Iterator",D=p.set,L=p.getterFor(O),N=p.getterFor(C),U=Object.getOwnPropertyDescriptor,j=function(t){if(!a)return i[t];var e=U(i,t);return e&&e.value},M=j("fetch"),q=j("Request"),B=j("Headers"),F=q&&q.prototype,H=B&&B.prototype,W=i.RegExp,G=i.TypeError,X=i.decodeURIComponent,Y=i.encodeURIComponent,$=o("".charAt),V=o([].join),Q=o([].push),z=o("".replace),K=o([].shift),J=o([].splice),Z=o("".split),tt=o("".slice),et=/\+/g,nt=Array(4),rt=function(t){return nt[t-1]||(nt[t-1]=W("((?:%[\\da-f]{2}){"+t+"})","gi"))},it=function(t){try{return X(t)}catch(e){return t}},st=function(t){var e=z(t,et," "),n=4;try{return X(e)}catch(r){for(;n;)e=z(e,rt(n--),it);return e}},ot=/[!'()~]|%20/g,at={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},ut=function(t){return at[t]},ct=function(t){return z(Y(t),ot,ut)},ft=d((function(t,e){D(this,{type:C,iterator:E(L(t).entries),kind:e})}),"Iterator",(function(){var t=N(this),e=t.kind,n=t.iterator.next(),r=n.value;return n.done||(n.value="keys"===e?r.key:"values"===e?r.value:[r.key,r.value]),n}),!0),lt=function(t){this.entries=[],this.url=null,t!==undefined&&(x(t)?this.parseObject(t):this.parseQuery("string"==typeof t?"?"===$(t,0)?tt(t,1):t:_(t)))};lt.prototype={type:O,bindURL:function(t){this.url=t,this.update()},parseObject:function(t){var e,n,r,i,o,a,u,c=T(t);if(c)for(n=(e=E(t,c)).next;!(r=s(n,e)).done;){if(o=(i=E(w(r.value))).next,(a=s(o,i)).done||(u=s(o,i)).done||!s(o,i).done)throw G("Expected sequence with length 2");Q(this.entries,{key:_(a.value),value:_(u.value)})}else for(var f in t)m(t,f)&&Q(this.entries,{key:f,value:_(t[f])})},parseQuery:function(t){if(t)for(var e,n,r=Z(t,"&"),i=0;i0?arguments[0]:undefined,e=D(this,new lt(t));a||(this.size=e.entries.length)},dt=ht.prototype;if(l(dt,{append:function(t,e){var n=L(this);I(arguments.length,2),Q(n.entries,{key:_(t),value:_(e)}),a||this.length++,n.updateURL()},"delete":function(t){for(var e=L(this),n=I(arguments.length,1),r=e.entries,i=_(t),s=n<2?undefined:arguments[1],o=s===undefined?s:_(s),u=0;ue.key?1:-1})),t.updateURL()},forEach:function(t){for(var e,n=L(this).entries,r=y(t,arguments.length>1?arguments[1]:undefined),i=0;i1?vt(arguments[1]):{})}}),v(q)){var mt=function(t){return g(this,F),new q(t,arguments.length>1?vt(arguments[1]):{})};F.constructor=mt,mt.prototype=F,r({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:mt})}}t.exports={URLSearchParams:ht,getState:L}},16454:function(){},73305:function(){},95304:function(t,e,n){"use strict";n(62524)},62337:function(){},84630:function(t,e,n){"use strict";var r=n(76887),i=n(626),s=n(95981),o=n(18348),a=n(85803),u=n(14766),c=i("URL");r({target:"URL",stat:!0,forced:!(u&&s((function(){c.canParse()})))},{canParse:function(t){var e=o(arguments.length,1),n=a(t),r=e<2||arguments[1]===undefined?undefined:a(arguments[1]);try{return!!new c(n,r)}catch(i){return!1}}})},47250:function(t,e,n){"use strict";n(77971);var r,i=n(76887),s=n(55746),o=n(14766),a=n(21899),u=n(86843),c=n(95329),f=n(95929),l=n(29202),h=n(5743),d=n(90953),p=n(24420),g=n(11354),v=n(15790),m=n(64620).codeAt,y=n(73291),b=n(85803),w=n(90904),x=n(18348),_=n(62524),S=n(45402),P=S.set,E=S.getterFor("URL"),T=_.URLSearchParams,I=_.getState,A=a.URL,R=a.TypeError,k=a.parseInt,O=Math.floor,C=Math.pow,D=c("".charAt),L=c(/./.exec),N=c([].join),U=c(1..toString),j=c([].pop),M=c([].push),q=c("".replace),B=c([].shift),F=c("".split),H=c("".slice),W=c("".toLowerCase),G=c([].unshift),X="Invalid scheme",Y="Invalid host",$="Invalid port",V=/[a-z]/i,Q=/[\d+-.a-z]/i,z=/\d/,K=/^0x/i,J=/^[0-7]+$/,Z=/^\d+$/,tt=/^[\da-f]+$/i,et=/[\0\t\n\r #%/:<>?@[\\\]^|]/,nt=/[\0\t\n\r #/:<>?@[\\\]^|]/,rt=/^[\u0000-\u0020]+/,it=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,st=/[\t\n\r]/g,ot=function(t){var e,n,r,i;if("number"==typeof t){for(e=[],n=0;n<4;n++)G(e,t%256),t=O(t/256);return N(e,".")}if("object"==typeof t){for(e="",r=function(t){for(var e=null,n=1,r=null,i=0,s=0;s<8;s++)0!==t[s]?(i>n&&(e=r,n=i),r=null,i=0):(null===r&&(r=s),++i);return i>n&&(e=r,n=i),e}(t),n=0;n<8;n++)i&&0===t[n]||(i&&(i=!1),r===n?(e+=n?":":"::",i=!0):(e+=U(t[n],16),n<7&&(e+=":")));return"["+e+"]"}return t},at={},ut=p({},at,{" ":1,'"':1,"<":1,">":1,"`":1}),ct=p({},ut,{"#":1,"?":1,"{":1,"}":1}),ft=p({},ct,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),lt=function(t,e){var n=m(t,0);return n>32&&n<127&&!d(e,t)?t:encodeURIComponent(t)},ht={ftp:21,file:null,http:80,https:443,ws:80,wss:443},dt=function(t,e){var n;return 2===t.length&&L(V,D(t,0))&&(":"===(n=D(t,1))||!e&&"|"===n)},pt=function(t){var e;return t.length>1&&dt(H(t,0,2))&&(2===t.length||"/"===(e=D(t,2))||"\\"===e||"?"===e||"#"===e)},gt=function(t){return"."===t||"%2e"===W(t)},vt={},mt={},yt={},bt={},wt={},xt={},_t={},St={},Pt={},Et={},Tt={},It={},At={},Rt={},kt={},Ot={},Ct={},Dt={},Lt={},Nt={},Ut={},jt=function(t,e,n){var r,i,s,o=b(t);if(e){if(i=this.parse(o))throw R(i);this.searchParams=null}else{if(n!==undefined&&(r=new jt(n,!0)),i=this.parse(o,null,r))throw R(i);(s=I(new T)).bindURL(this),this.searchParams=s}};jt.prototype={type:"URL",parse:function(t,e,n){var i,s,o,a,u,c=this,f=e||vt,l=0,h="",p=!1,m=!1,y=!1;for(t=b(t),e||(c.scheme="",c.username="",c.password="",c.host=null,c.port=null,c.path=[],c.query=null,c.fragment=null,c.cannotBeABaseURL=!1,t=q(t,rt,""),t=q(t,it,"$1")),t=q(t,st,""),i=g(t);l<=i.length;){switch(s=i[l],f){case vt:if(!s||!L(V,s)){if(e)return X;f=yt;continue}h+=W(s),f=mt;break;case mt:if(s&&(L(Q,s)||"+"===s||"-"===s||"."===s))h+=W(s);else{if(":"!==s){if(e)return X;h="",f=yt,l=0;continue}if(e&&(c.isSpecial()!==d(ht,h)||"file"===h&&(c.includesCredentials()||null!==c.port)||"file"===c.scheme&&!c.host))return;if(c.scheme=h,e)return void(c.isSpecial()&&ht[c.scheme]===c.port&&(c.port=null));h="","file"===c.scheme?f=Rt:c.isSpecial()&&n&&n.scheme===c.scheme?f=bt:c.isSpecial()?f=St:"/"===i[l+1]?(f=wt,l++):(c.cannotBeABaseURL=!0,M(c.path,""),f=Lt)}break;case yt:if(!n||n.cannotBeABaseURL&&"#"!==s)return X;if(n.cannotBeABaseURL&&"#"===s){c.scheme=n.scheme,c.path=v(n.path),c.query=n.query,c.fragment="",c.cannotBeABaseURL=!0,f=Ut;break}f="file"===n.scheme?Rt:xt;continue;case bt:if("/"!==s||"/"!==i[l+1]){f=xt;continue}f=Pt,l++;break;case wt:if("/"===s){f=Et;break}f=Dt;continue;case xt:if(c.scheme=n.scheme,s===r)c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,c.path=v(n.path),c.query=n.query;else if("/"===s||"\\"===s&&c.isSpecial())f=_t;else if("?"===s)c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,c.path=v(n.path),c.query="",f=Nt;else{if("#"!==s){c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,c.path=v(n.path),c.path.length--,f=Dt;continue}c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,c.path=v(n.path),c.query=n.query,c.fragment="",f=Ut}break;case _t:if(!c.isSpecial()||"/"!==s&&"\\"!==s){if("/"!==s){c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,f=Dt;continue}f=Et}else f=Pt;break;case St:if(f=Pt,"/"!==s||"/"!==D(h,l+1))continue;l++;break;case Pt:if("/"!==s&&"\\"!==s){f=Et;continue}break;case Et:if("@"===s){p&&(h="%40"+h),p=!0,o=g(h);for(var w=0;w65535)return $;c.port=c.isSpecial()&&S===ht[c.scheme]?null:S,h=""}if(e)return;f=Ct;continue}return $}h+=s;break;case Rt:if(c.scheme="file","/"===s||"\\"===s)f=kt;else{if(!n||"file"!==n.scheme){f=Dt;continue}switch(s){case r:c.host=n.host,c.path=v(n.path),c.query=n.query;break;case"?":c.host=n.host,c.path=v(n.path),c.query="",f=Nt;break;case"#":c.host=n.host,c.path=v(n.path),c.query=n.query,c.fragment="",f=Ut;break;default:pt(N(v(i,l),""))||(c.host=n.host,c.path=v(n.path),c.shortenPath()),f=Dt;continue}}break;case kt:if("/"===s||"\\"===s){f=Ot;break}n&&"file"===n.scheme&&!pt(N(v(i,l),""))&&(dt(n.path[0],!0)?M(c.path,n.path[0]):c.host=n.host),f=Dt;continue;case Ot:if(s===r||"/"===s||"\\"===s||"?"===s||"#"===s){if(!e&&dt(h))f=Dt;else if(""===h){if(c.host="",e)return;f=Ct}else{if(a=c.parseHost(h))return a;if("localhost"===c.host&&(c.host=""),e)return;h="",f=Ct}continue}h+=s;break;case Ct:if(c.isSpecial()){if(f=Dt,"/"!==s&&"\\"!==s)continue}else if(e||"?"!==s)if(e||"#"!==s){if(s!==r&&(f=Dt,"/"!==s))continue}else c.fragment="",f=Ut;else c.query="",f=Nt;break;case Dt:if(s===r||"/"===s||"\\"===s&&c.isSpecial()||!e&&("?"===s||"#"===s)){if(".."===(u=W(u=h))||"%2e."===u||".%2e"===u||"%2e%2e"===u?(c.shortenPath(),"/"===s||"\\"===s&&c.isSpecial()||M(c.path,"")):gt(h)?"/"===s||"\\"===s&&c.isSpecial()||M(c.path,""):("file"===c.scheme&&!c.path.length&&dt(h)&&(c.host&&(c.host=""),h=D(h,0)+":"),M(c.path,h)),h="","file"===c.scheme&&(s===r||"?"===s||"#"===s))for(;c.path.length>1&&""===c.path[0];)B(c.path);"?"===s?(c.query="",f=Nt):"#"===s&&(c.fragment="",f=Ut)}else h+=lt(s,ct);break;case Lt:"?"===s?(c.query="",f=Nt):"#"===s?(c.fragment="",f=Ut):s!==r&&(c.path[0]+=lt(s,at));break;case Nt:e||"#"!==s?s!==r&&("'"===s&&c.isSpecial()?c.query+="%27":c.query+="#"===s?"%23":lt(s,at)):(c.fragment="",f=Ut);break;case Ut:s!==r&&(c.fragment+=lt(s,ut))}l++}},parseHost:function(t){var e,n,r;if("["===D(t,0)){if("]"!==D(t,t.length-1))return Y;if(e=function(t){var e,n,r,i,s,o,a,u=[0,0,0,0,0,0,0,0],c=0,f=null,l=0,h=function(){return D(t,l)};if(":"===h()){if(":"!==D(t,1))return;l+=2,f=++c}for(;h();){if(8===c)return;if(":"!==h()){for(e=n=0;n<4&&L(tt,h());)e=16*e+k(h(),16),l++,n++;if("."===h()){if(0===n)return;if(l-=n,c>6)return;for(r=0;h();){if(i=null,r>0){if(!("."===h()&&r<4))return;l++}if(!L(z,h()))return;for(;L(z,h());){if(s=k(h(),10),null===i)i=s;else{if(0===i)return;i=10*i+s}if(i>255)return;l++}u[c]=256*u[c]+i,2!=++r&&4!==r||c++}if(4!==r)return;break}if(":"===h()){if(l++,!h())return}else if(h())return;u[c++]=e}else{if(null!==f)return;l++,f=++c}}if(null!==f)for(o=c-f,c=7;0!==c&&o>0;)a=u[c],u[c--]=u[f+o-1],u[f+--o]=a;else if(8!==c)return;return u}(H(t,1,-1)),!e)return Y;this.host=e}else if(this.isSpecial()){if(t=y(t),L(et,t))return Y;if(e=function(t){var e,n,r,i,s,o,a,u=F(t,".");if(u.length&&""===u[u.length-1]&&u.length--,(e=u.length)>4)return t;for(n=[],r=0;r1&&"0"===D(i,0)&&(s=L(K,i)?16:8,i=H(i,8===s?1:2)),""===i)o=0;else{if(!L(10===s?Z:8===s?J:tt,i))return t;o=k(i,s)}M(n,o)}for(r=0;r=C(256,5-e))return null}else if(o>255)return null;for(a=j(n),r=0;r1?arguments[1]:undefined,r=P(e,new jt(t,!1,n));s||(e.href=r.serialize(),e.origin=r.getOrigin(),e.protocol=r.getProtocol(),e.username=r.getUsername(),e.password=r.getPassword(),e.host=r.getHost(),e.hostname=r.getHostname(),e.port=r.getPort(),e.pathname=r.getPathname(),e.search=r.getSearch(),e.searchParams=r.getSearchParams(),e.hash=r.getHash())},qt=Mt.prototype,Bt=function(t,e){return{get:function(){return E(this)[t]()},set:e&&function(t){return E(this)[e](t)},configurable:!0,enumerable:!0}};if(s&&(l(qt,"href",Bt("serialize","setHref")),l(qt,"origin",Bt("getOrigin")),l(qt,"protocol",Bt("getProtocol","setProtocol")),l(qt,"username",Bt("getUsername","setUsername")),l(qt,"password",Bt("getPassword","setPassword")),l(qt,"host",Bt("getHost","setHost")),l(qt,"hostname",Bt("getHostname","setHostname")),l(qt,"port",Bt("getPort","setPort")),l(qt,"pathname",Bt("getPathname","setPathname")),l(qt,"search",Bt("getSearch","setSearch")),l(qt,"searchParams",Bt("getSearchParams")),l(qt,"hash",Bt("getHash","setHash"))),f(qt,"toJSON",(function(){return E(this).serialize()}),{enumerable:!0}),f(qt,"toString",(function(){return E(this).serialize()}),{enumerable:!0}),A){var Ft=A.createObjectURL,Ht=A.revokeObjectURL;Ft&&f(Mt,"createObjectURL",u(Ft,A)),Ht&&f(Mt,"revokeObjectURL",u(Ht,A))}w(Mt,"URL"),i({global:!0,constructor:!0,forced:!o,sham:!s},{URL:Mt})},33601:function(t,e,n){"use strict";n(47250)},98947:function(){},27698:function(t,e,n){"use strict";var r=n(54493);t.exports=r},83363:function(t,e,n){"use strict";var r=n(24034);t.exports=r},49216:function(t,e,n){"use strict";var r=n(99324);t.exports=r},56668:function(t,e,n){"use strict";var r=n(95909);t.exports=r},74719:function(t,e,n){"use strict";var r=n(14423);t.exports=r},56243:function(t,e,n){"use strict";var r=n(13830);n(7634),t.exports=r},28196:function(t,e,n){"use strict";var r=n(16246);t.exports=r},8065:function(t,e,n){"use strict";var r=n(56043);t.exports=r},95247:function(t,e,n){"use strict";var r=n(1727);t.exports=r},69743:function(t,e,n){"use strict";var r=n(80446);t.exports=r},11955:function(t,e,n){"use strict";var r=n(2480);t.exports=r},96064:function(t,e,n){"use strict";var r=n(7147);t.exports=r},46279:function(t,e,n){"use strict";n(7634);var r=n(9697),i=n(90953),s=n(7046),o=n(49216),a=Array.prototype,u={DOMTokenList:!0,NodeList:!0};t.exports=function(t){var e=t.forEach;return t===a||s(a,t)&&e===a.forEach||i(u,r(t))?o:e}},33778:function(t,e,n){"use strict";var r=n(58557);t.exports=r},19373:function(t,e,n){"use strict";var r=n(34570);t.exports=r},73819:function(t,e,n){"use strict";n(7634);var r=n(9697),i=n(90953),s=n(7046),o=n(56668),a=Array.prototype,u={DOMTokenList:!0,NodeList:!0};t.exports=function(t){var e=t.keys;return t===a||s(a,t)&&e===a.keys||i(u,r(t))?o:e}},61798:function(t,e,n){"use strict";var r=n(88287);t.exports=r},52759:function(t,e,n){"use strict";var r=n(93993);t.exports=r},28427:function(t,e,n){"use strict";var r=n(91060);t.exports=r},82073:function(t,e,n){"use strict";var r=n(69601);t.exports=r},62856:function(t,e,n){"use strict";var r=n(69355);t.exports=r},2348:function(t,e,n){"use strict";var r=n(18339);t.exports=r},62908:function(t,e,n){"use strict";n(7634);var r=n(9697),i=n(90953),s=n(7046),o=n(74719),a=Array.prototype,u={DOMTokenList:!0,NodeList:!0};t.exports=function(t){var e=t.values;return t===a||s(a,t)&&e===a.values||i(u,r(t))?o:e}},8933:function(t,e,n){"use strict";var r=n(84426);t.exports=r},15868:function(t,e,n){"use strict";var r=n(91018);n(7634),t.exports=r},63383:function(t,e,n){"use strict";var r=n(45999);t.exports=r},14471:function(t,e,n){"use strict";var r=n(35254);t.exports=r},57396:function(t,e,n){"use strict";var r=n(7702);t.exports=r},41910:function(t,e,n){"use strict";var r=n(48171);t.exports=r},79427:function(t,e,n){"use strict";var r=n(286);t.exports=r},62857:function(t,e,n){"use strict";var r=n(92766);t.exports=r},9534:function(t,e,n){"use strict";var r=n(30498);t.exports=r},96507:function(t,e,n){"use strict";var r=n(13966);t.exports=r},23059:function(t,e,n){"use strict";var r=n(48494);t.exports=r},16670:function(t,e,n){"use strict";var r=n(3065);t.exports=r},47795:function(t,e,n){"use strict";var r=n(98430);t.exports=r},27460:function(t,e,n){"use strict";var r=n(52956);n(7634),t.exports=r},64784:function(t,e,n){"use strict";var r=n(96351);t.exports=r},61895:function(t,e,n){"use strict";var r=n(14983);t.exports=r},92547:function(t,e,n){"use strict";var r=n(57473);n(7634),t.exports=r},46509:function(t,e,n){"use strict";var r=n(24227);n(7634),t.exports=r},35774:function(t,e,n){"use strict";var r=n(62978);t.exports=r},57641:function(t,e,n){"use strict";var r=n(71459);t.exports=r},96351:function(t,e,n){"use strict";n(73231);var r=n(54058);t.exports=r.queueMicrotask},47610:function(t,e,n){"use strict";n(95304),n(16454),n(73305),n(62337);var r=n(54058);t.exports=r.URLSearchParams},71459:function(t,e,n){"use strict";n(47610),n(33601),n(84630),n(98947);var r=n(54058);t.exports=r.URL},19662:function(t,e,n){"use strict";var r=n(60614),i=n(66330),s=TypeError;t.exports=function(t){if(r(t))return t;throw s(i(t)+" is not a function")}},39483:function(t,e,n){"use strict";var r=n(4411),i=n(66330),s=TypeError;t.exports=function(t){if(r(t))return t;throw s(i(t)+" is not a constructor")}},96077:function(t,e,n){"use strict";var r=n(60614),i=String,s=TypeError;t.exports=function(t){if("object"==typeof t||r(t))return t;throw s("Can't set "+i(t)+" as a prototype")}},51223:function(t,e,n){"use strict";var r=n(5112),i=n(70030),s=n(3070).f,o=r("unscopables"),a=Array.prototype;a[o]===undefined&&s(a,o,{configurable:!0,value:i(null)}),t.exports=function(t){a[o][t]=!0}},31530:function(t,e,n){"use strict";var r=n(28710).charAt;t.exports=function(t,e,n){return e+(n?r(t,e).length:1)}},25787:function(t,e,n){"use strict";var r=n(47976),i=TypeError;t.exports=function(t,e){if(r(e,t))return t;throw i("Incorrect invocation")}},19670:function(t,e,n){"use strict";var r=n(70111),i=String,s=TypeError;t.exports=function(t){if(r(t))return t;throw s(i(t)+" is not an object")}},23013:function(t){"use strict";t.exports="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView},90260:function(t,e,n){"use strict";var r,i,s,o=n(23013),a=n(19781),u=n(17854),c=n(60614),f=n(70111),l=n(92597),h=n(70648),d=n(66330),p=n(68880),g=n(98052),v=n(47045),m=n(47976),y=n(79518),b=n(27674),w=n(5112),x=n(69711),_=n(29909),S=_.enforce,P=_.get,E=u.Int8Array,T=E&&E.prototype,I=u.Uint8ClampedArray,A=I&&I.prototype,R=E&&y(E),k=T&&y(T),O=Object.prototype,C=u.TypeError,D=w("toStringTag"),L=x("TYPED_ARRAY_TAG"),N="TypedArrayConstructor",U=o&&!!b&&"Opera"!==h(u.opera),j=!1,M={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},q={BigInt64Array:8,BigUint64Array:8},B=function(t){var e=y(t);if(f(e)){var n=P(e);return n&&l(n,N)?n[N]:B(e)}},F=function(t){if(!f(t))return!1;var e=h(t);return l(M,e)||l(q,e)};for(r in M)(s=(i=u[r])&&i.prototype)?S(s)[N]=i:U=!1;for(r in q)(s=(i=u[r])&&i.prototype)&&(S(s)[N]=i);if((!U||!c(R)||R===Function.prototype)&&(R=function(){throw C("Incorrect invocation")},U))for(r in M)u[r]&&b(u[r],R);if((!U||!k||k===O)&&(k=R.prototype,U))for(r in M)u[r]&&b(u[r].prototype,k);if(U&&y(A)!==k&&b(A,k),a&&!l(k,D))for(r in j=!0,v(k,D,{configurable:!0,get:function(){return f(this)?this[L]:undefined}}),M)u[r]&&p(u[r],L,r);t.exports={NATIVE_ARRAY_BUFFER_VIEWS:U,TYPED_ARRAY_TAG:j&&L,aTypedArray:function(t){if(F(t))return t;throw C("Target is not a typed array")},aTypedArrayConstructor:function(t){if(c(t)&&(!b||m(R,t)))return t;throw C(d(t)+" is not a typed array constructor")},exportTypedArrayMethod:function(t,e,n,r){if(a){if(n)for(var i in M){var s=u[i];if(s&&l(s.prototype,t))try{delete s.prototype[t]}catch(o){try{s.prototype[t]=e}catch(c){}}}k[t]&&!n||g(k,t,n?e:U&&T[t]||e,r)}},exportTypedArrayStaticMethod:function(t,e,n){var r,i;if(a){if(b){if(n)for(r in M)if((i=u[r])&&l(i,t))try{delete i[t]}catch(s){}if(R[t]&&!n)return;try{return g(R,t,n?e:U&&R[t]||e)}catch(s){}}for(r in M)!(i=u[r])||i[t]&&!n||g(i,t,e)}},getTypedArrayConstructor:B,isView:function(t){if(!f(t))return!1;var e=h(t);return"DataView"===e||l(M,e)||l(q,e)},isTypedArray:F,TypedArray:R,TypedArrayPrototype:k}},13331:function(t,e,n){"use strict";var r=n(17854),i=n(1702),s=n(19781),o=n(23013),a=n(76530),u=n(68880),c=n(47045),f=n(89190),l=n(47293),h=n(25787),d=n(19303),p=n(17466),g=n(57067),v=n(11179),m=n(79518),y=n(27674),b=n(8006).f,w=n(21285),x=n(41589),_=n(58003),S=n(29909),P=a.PROPER,E=a.CONFIGURABLE,T="ArrayBuffer",I="DataView",A="prototype",R="Wrong index",k=S.getterFor(T),O=S.getterFor(I),C=S.set,D=r[T],L=D,N=L&&L[A],U=r[I],j=U&&U[A],M=Object.prototype,q=r.Array,B=r.RangeError,F=i(w),H=i([].reverse),W=v.pack,G=v.unpack,X=function(t){return[255&t]},Y=function(t){return[255&t,t>>8&255]},$=function(t){return[255&t,t>>8&255,t>>16&255,t>>24&255]},V=function(t){return t[3]<<24|t[2]<<16|t[1]<<8|t[0]},Q=function(t){return W(t,23,4)},z=function(t){return W(t,52,8)},K=function(t,e,n){c(t[A],e,{configurable:!0,get:function(){return n(this)[e]}})},J=function(t,e,n,r){var i=O(t),s=g(n),o=!!r;if(s+e>i.byteLength)throw B(R);var a=i.bytes,u=s+i.byteOffset,c=x(a,u,u+e);return o?c:H(c)},Z=function(t,e,n,r,i,s){var o=O(t),a=g(n),u=r(+i),c=!!s;if(a+e>o.byteLength)throw B(R);for(var f=o.bytes,l=a+o.byteOffset,h=0;hrt;)(et=nt[rt++])in L||u(L,et,D[et]);N.constructor=L}y&&m(j)!==M&&y(j,M);var it=new U(new L(2)),st=i(j.setInt8);it.setInt8(0,2147483648),it.setInt8(1,2147483649),!it.getInt8(0)&&it.getInt8(1)||f(j,{setInt8:function(t,e){st(this,t,e<<24>>24)},setUint8:function(t,e){st(this,t,e<<24>>24)}},{unsafe:!0})}else N=(L=function(t){h(this,N);var e=g(t);C(this,{type:T,bytes:F(q(e),0),byteLength:e}),s||(this.byteLength=e,this.detached=!1)})[A],j=(U=function(t,e,n){h(this,j),h(t,N);var r=k(t),i=r.byteLength,o=d(e);if(o<0||o>i)throw B("Wrong offset");if(o+(n=n===undefined?i-o:p(n))>i)throw B("Wrong length");C(this,{type:I,buffer:t,byteLength:n,byteOffset:o,bytes:r.bytes}),s||(this.buffer=t,this.byteLength=n,this.byteOffset=o)})[A],s&&(K(L,"byteLength",k),K(U,"buffer",O),K(U,"byteLength",O),K(U,"byteOffset",O)),f(j,{getInt8:function(t){return J(this,1,t)[0]<<24>>24},getUint8:function(t){return J(this,1,t)[0]},getInt16:function(t){var e=J(this,2,t,arguments.length>1&&arguments[1]);return(e[1]<<8|e[0])<<16>>16},getUint16:function(t){var e=J(this,2,t,arguments.length>1&&arguments[1]);return e[1]<<8|e[0]},getInt32:function(t){return V(J(this,4,t,arguments.length>1&&arguments[1]))},getUint32:function(t){return V(J(this,4,t,arguments.length>1&&arguments[1]))>>>0},getFloat32:function(t){return G(J(this,4,t,arguments.length>1&&arguments[1]),23)},getFloat64:function(t){return G(J(this,8,t,arguments.length>1&&arguments[1]),52)},setInt8:function(t,e){Z(this,1,t,X,e)},setUint8:function(t,e){Z(this,1,t,X,e)},setInt16:function(t,e){Z(this,2,t,Y,e,arguments.length>2&&arguments[2])},setUint16:function(t,e){Z(this,2,t,Y,e,arguments.length>2&&arguments[2])},setInt32:function(t,e){Z(this,4,t,$,e,arguments.length>2&&arguments[2])},setUint32:function(t,e){Z(this,4,t,$,e,arguments.length>2&&arguments[2])},setFloat32:function(t,e){Z(this,4,t,Q,e,arguments.length>2&&arguments[2])},setFloat64:function(t,e){Z(this,8,t,z,e,arguments.length>2&&arguments[2])}});_(L,T),_(U,I),t.exports={ArrayBuffer:L,DataView:U}},1048:function(t,e,n){"use strict";var r=n(47908),i=n(51400),s=n(26244),o=n(85117),a=Math.min;t.exports=[].copyWithin||function(t,e){var n=r(this),u=s(n),c=i(t,u),f=i(e,u),l=arguments.length>2?arguments[2]:undefined,h=a((l===undefined?u:i(l,u))-f,u-c),d=1;for(f0;)f in n?n[c]=n[f]:o(n,c),c+=d,f+=d;return n}},21285:function(t,e,n){"use strict";var r=n(47908),i=n(51400),s=n(26244);t.exports=function(t){for(var e=r(this),n=s(e),o=arguments.length,a=i(o>1?arguments[1]:undefined,n),u=o>2?arguments[2]:undefined,c=u===undefined?n:i(u,n);c>a;)e[a++]=t;return e}},18533:function(t,e,n){"use strict";var r=n(42092).forEach,i=n(9341)("forEach");t.exports=i?[].forEach:function(t){return r(this,t,arguments.length>1?arguments[1]:undefined)}},97745:function(t,e,n){"use strict";var r=n(26244);t.exports=function(t,e){for(var n=0,i=r(e),s=new t(i);i>n;)s[n]=e[n++];return s}},41318:function(t,e,n){"use strict";var r=n(45656),i=n(51400),s=n(26244),o=function(t){return function(e,n,o){var a,u=r(e),c=s(u),f=i(o,c);if(t&&n!=n){for(;c>f;)if((a=u[f++])!=a)return!0}else for(;c>f;f++)if((t||f in u)&&u[f]===n)return t||f||0;return!t&&-1}};t.exports={includes:o(!0),indexOf:o(!1)}},42092:function(t,e,n){"use strict";var r=n(49974),i=n(1702),s=n(68361),o=n(47908),a=n(26244),u=n(65417),c=i([].push),f=function(t){var e=1===t,n=2===t,i=3===t,f=4===t,l=6===t,h=7===t,d=5===t||l;return function(p,g,v,m){for(var y,b,w=o(p),x=s(w),_=r(g,v),S=a(x),P=0,E=m||u,T=e?E(p,S):n||h?E(p,0):undefined;S>P;P++)if((d||P in x)&&(b=_(y=x[P],P,w),t))if(e)T[P]=b;else if(b)switch(t){case 3:return!0;case 5:return y;case 6:return P;case 2:c(T,y)}else switch(t){case 4:return!1;case 7:c(T,y)}return l?-1:i||f?f:T}};t.exports={forEach:f(0),map:f(1),filter:f(2),some:f(3),every:f(4),find:f(5),findIndex:f(6),filterReject:f(7)}},86583:function(t,e,n){"use strict";var r=n(22104),i=n(45656),s=n(19303),o=n(26244),a=n(9341),u=Math.min,c=[].lastIndexOf,f=!!c&&1/[1].lastIndexOf(1,-0)<0,l=a("lastIndexOf"),h=f||!l;t.exports=h?function(t){if(f)return r(c,this,arguments)||0;var e=i(this),n=o(e),a=n-1;for(arguments.length>1&&(a=u(a,s(arguments[1]))),a<0&&(a=n+a);a>=0;a--)if(a in e&&e[a]===t)return a||0;return-1}:c},9341:function(t,e,n){"use strict";var r=n(47293);t.exports=function(t,e){var n=[][t];return!!n&&r((function(){n.call(null,e||function(){return 1},1)}))}},53671:function(t,e,n){"use strict";var r=n(19662),i=n(47908),s=n(68361),o=n(26244),a=TypeError,u=function(t){return function(e,n,u,c){r(n);var f=i(e),l=s(f),h=o(f),d=t?h-1:0,p=t?-1:1;if(u<2)for(;;){if(d in l){c=l[d],d+=p;break}if(d+=p,t?d<0:h<=d)throw a("Reduce of empty array with no initial value")}for(;t?d>=0:h>d;d+=p)d in l&&(c=n(c,l[d],d,f));return c}};t.exports={left:u(!1),right:u(!0)}},41589:function(t,e,n){"use strict";var r=n(51400),i=n(26244),s=n(86135),o=Array,a=Math.max;t.exports=function(t,e,n){for(var u=i(t),c=r(e,u),f=r(n===undefined?u:n,u),l=o(a(f-c,0)),h=0;c0;)t[r]=t[--r];r!==s++&&(t[r]=n)}return t},a=function(t,e,n,r){for(var i=e.length,s=n.length,o=0,a=0;o0&&r[0]<4?1:+(r[0]+r[1])),!i&&o&&(!(r=o.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=o.match(/Chrome\/(\d+)/))&&(i=+r[1]),t.exports=i},98008:function(t,e,n){"use strict";var r=n(88113).match(/AppleWebKit\/(\d+)\./);t.exports=!!r&&+r[1]},80748:function(t){"use strict";t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},82109:function(t,e,n){"use strict";var r=n(17854),i=n(31236).f,s=n(68880),o=n(98052),a=n(13072),u=n(99920),c=n(54705);t.exports=function(t,e){var n,f,l,h,d,p=t.target,g=t.global,v=t.stat;if(n=g?r:v?r[p]||a(p,{}):(r[p]||{}).prototype)for(f in e){if(h=e[f],l=t.dontCallGetSet?(d=i(n,f))&&d.value:n[f],!c(g?f:p+(v?".":"#")+f,t.forced)&&l!==undefined){if(typeof h==typeof l)continue;u(h,l)}(t.sham||l&&l.sham)&&s(h,"sham",!0),o(n,f,h,t)}}},47293:function(t){"use strict";t.exports=function(t){try{return!!t()}catch(e){return!0}}},27007:function(t,e,n){"use strict";n(74916);var r=n(21470),i=n(98052),s=n(22261),o=n(47293),a=n(5112),u=n(68880),c=a("species"),f=RegExp.prototype;t.exports=function(t,e,n,l){var h=a(t),d=!o((function(){var e={};return e[h]=function(){return 7},7!==""[t](e)})),p=d&&!o((function(){var e=!1,n=/a/;return"split"===t&&((n={}).constructor={},n.constructor[c]=function(){return n},n.flags="",n[h]=/./[h]),n.exec=function(){return e=!0,null},n[h](""),!e}));if(!d||!p||n){var g=r(/./[h]),v=e(h,""[t],(function(t,e,n,i,o){var a=r(t),u=e.exec;return u===s||u===f.exec?d&&!o?{done:!0,value:g(e,n,i)}:{done:!0,value:a(n,e,i)}:{done:!1}}));i(String.prototype,t,v[0]),i(f,h,v[1])}l&&u(f[h],"sham",!0)}},22104:function(t,e,n){"use strict";var r=n(34374),i=Function.prototype,s=i.apply,o=i.call;t.exports="object"==typeof Reflect&&Reflect.apply||(r?o.bind(s):function(){return o.apply(s,arguments)})},49974:function(t,e,n){"use strict";var r=n(21470),i=n(19662),s=n(34374),o=r(r.bind);t.exports=function(t,e){return i(t),e===undefined?t:s?o(t,e):function(){return t.apply(e,arguments)}}},34374:function(t,e,n){"use strict";var r=n(47293);t.exports=!r((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}))},46916:function(t,e,n){"use strict";var r=n(34374),i=Function.prototype.call;t.exports=r?i.bind(i):function(){return i.apply(i,arguments)}},76530:function(t,e,n){"use strict";var r=n(19781),i=n(92597),s=Function.prototype,o=r&&Object.getOwnPropertyDescriptor,a=i(s,"name"),u=a&&"something"===function(){}.name,c=a&&(!r||r&&o(s,"name").configurable);t.exports={EXISTS:a,PROPER:u,CONFIGURABLE:c}},75668:function(t,e,n){"use strict";var r=n(1702),i=n(19662);t.exports=function(t,e,n){try{return r(i(Object.getOwnPropertyDescriptor(t,e)[n]))}catch(s){}}},21470:function(t,e,n){"use strict";var r=n(84326),i=n(1702);t.exports=function(t){if("Function"===r(t))return i(t)}},1702:function(t,e,n){"use strict";var r=n(34374),i=Function.prototype,s=i.call,o=r&&i.bind.bind(s,s);t.exports=r?o:function(t){return function(){return s.apply(t,arguments)}}},35005:function(t,e,n){"use strict";var r=n(17854),i=n(60614);t.exports=function(t,e){return arguments.length<2?(n=r[t],i(n)?n:undefined):r[t]&&r[t][e];var n}},71246:function(t,e,n){"use strict";var r=n(70648),i=n(58173),s=n(68554),o=n(97497),a=n(5112)("iterator");t.exports=function(t){if(!s(t))return i(t,a)||i(t,"@@iterator")||o[r(t)]}},18554:function(t,e,n){"use strict";var r=n(46916),i=n(19662),s=n(19670),o=n(66330),a=n(71246),u=TypeError;t.exports=function(t,e){var n=arguments.length<2?a(t):e;if(i(n))return s(r(n,t));throw u(o(t)+" is not iterable")}},58173:function(t,e,n){"use strict";var r=n(19662),i=n(68554);t.exports=function(t,e){var n=t[e];return i(n)?undefined:r(n)}},10647:function(t,e,n){"use strict";var r=n(1702),i=n(47908),s=Math.floor,o=r("".charAt),a=r("".replace),u=r("".slice),c=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,f=/\$([$&'`]|\d{1,2})/g;t.exports=function(t,e,n,r,l,h){var d=n+t.length,p=r.length,g=f;return l!==undefined&&(l=i(l),g=c),a(h,g,(function(i,a){var c;switch(o(a,0)){case"$":return"$";case"&":return t;case"`":return u(e,0,n);case"'":return u(e,d);case"<":c=l[u(a,1,-1)];break;default:var f=+a;if(0===f)return i;if(f>p){var h=s(f/10);return 0===h?i:h<=p?r[h-1]===undefined?o(a,1):r[h-1]+o(a,1):i}c=r[f-1]}return c===undefined?"":c}))}},17854:function(t,e,n){"use strict";var r=function(t){return t&&t.Math===Math&&t};t.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof n.g&&n.g)||function(){return this}()||this||Function("return this")()},92597:function(t,e,n){"use strict";var r=n(1702),i=n(47908),s=r({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,e){return s(i(t),e)}},3501:function(t){"use strict";t.exports={}},60490:function(t,e,n){"use strict";var r=n(35005);t.exports=r("document","documentElement")},64664:function(t,e,n){"use strict";var r=n(19781),i=n(47293),s=n(80317);t.exports=!r&&!i((function(){return 7!==Object.defineProperty(s("div"),"a",{get:function(){return 7}}).a}))},11179:function(t,e,n){"use strict";var r=n(64310),i=n(74758),s=Array,o=Math.abs,a=Math.pow,u=Math.floor,c=Math.log,f=Math.LN2,l=function(t){var e=i(t),n=o(t-e);return n>.5||.5===n&&e%2!=0?e+r(t):e};t.exports={pack:function(t,e,n){var r,i,h,d=s(n),p=8*n-e-1,g=(1<>1,m=23===e?a(2,-24)-a(2,-77):0,y=t<0||0===t&&1/t<0?1:0,b=0;for((t=o(t))!=t||t===Infinity?(i=t!=t?1:0,r=g):(r=u(c(t)/f),t*(h=a(2,-r))<1&&(r--,h*=2),(t+=r+v>=1?m/h:m*a(2,1-v))*h>=2&&(r++,h/=2),r+v>=g?(i=0,r=g):r+v>=1?(i=l((t*h-1)*a(2,e)),r+=v):(i=l(t*a(2,v-1)*a(2,e)),r=0));e>=8;)d[b++]=255&i,i/=256,e-=8;for(r=r<0;)d[b++]=255&r,r/=256,p-=8;return d[--b]|=128*y,d},unpack:function(t,e){var n,r=t.length,i=8*r-e-1,s=(1<>1,u=i-7,c=r-1,f=t[c--],l=127&f;for(f>>=7;u>0;)l=256*l+t[c--],u-=8;for(n=l&(1<<-u)-1,l>>=-u,u+=e;u>0;)n=256*n+t[c--],u-=8;if(0===l)l=1-o;else{if(l===s)return n?NaN:f?-Infinity:Infinity;n+=a(2,e),l-=o}return(f?-1:1)*n*a(2,l-e)}}},68361:function(t,e,n){"use strict";var r=n(1702),i=n(47293),s=n(84326),o=Object,a=r("".split);t.exports=i((function(){return!o("z").propertyIsEnumerable(0)}))?function(t){return"String"===s(t)?a(t,""):o(t)}:o},79587:function(t,e,n){"use strict";var r=n(60614),i=n(70111),s=n(27674);t.exports=function(t,e,n){var o,a;return s&&r(o=e.constructor)&&o!==n&&i(a=o.prototype)&&a!==n.prototype&&s(t,a),t}},42788:function(t,e,n){"use strict";var r=n(1702),i=n(60614),s=n(5465),o=r(Function.toString);i(s.inspectSource)||(s.inspectSource=function(t){return o(t)}),t.exports=s.inspectSource},29909:function(t,e,n){"use strict";var r,i,s,o=n(94811),a=n(17854),u=n(70111),c=n(68880),f=n(92597),l=n(5465),h=n(6200),d=n(3501),p="Object already initialized",g=a.TypeError,v=a.WeakMap;if(o||l.state){var m=l.state||(l.state=new v);m.get=m.get,m.has=m.has,m.set=m.set,r=function(t,e){if(m.has(t))throw g(p);return e.facade=t,m.set(t,e),e},i=function(t){return m.get(t)||{}},s=function(t){return m.has(t)}}else{var y=h("state");d[y]=!0,r=function(t,e){if(f(t,y))throw g(p);return e.facade=t,c(t,y,e),e},i=function(t){return f(t,y)?t[y]:{}},s=function(t){return f(t,y)}}t.exports={set:r,get:i,has:s,enforce:function(t){return s(t)?i(t):r(t,{})},getterFor:function(t){return function(e){var n;if(!u(e)||(n=i(e)).type!==t)throw g("Incompatible receiver, "+t+" required");return n}}}},97659:function(t,e,n){"use strict";var r=n(5112),i=n(97497),s=r("iterator"),o=Array.prototype;t.exports=function(t){return t!==undefined&&(i.Array===t||o[s]===t)}},43157:function(t,e,n){"use strict";var r=n(84326);t.exports=Array.isArray||function(t){return"Array"===r(t)}},44067:function(t,e,n){"use strict";var r=n(70648);t.exports=function(t){var e=r(t);return"BigInt64Array"===e||"BigUint64Array"===e}},60614:function(t,e,n){"use strict";var r=n(4154),i=r.all;t.exports=r.IS_HTMLDDA?function(t){return"function"==typeof t||t===i}:function(t){return"function"==typeof t}},4411:function(t,e,n){"use strict";var r=n(1702),i=n(47293),s=n(60614),o=n(70648),a=n(35005),u=n(42788),c=function(){},f=[],l=a("Reflect","construct"),h=/^\s*(?:class|function)\b/,d=r(h.exec),p=!h.exec(c),g=function(t){if(!s(t))return!1;try{return l(c,f,t),!0}catch(e){return!1}},v=function(t){if(!s(t))return!1;switch(o(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return p||!!d(h,u(t))}catch(e){return!0}};v.sham=!0,t.exports=!l||i((function(){var t;return g(g.call)||!g(Object)||!g((function(){t=!0}))||t}))?v:g},54705:function(t,e,n){"use strict";var r=n(47293),i=n(60614),s=/#|\.prototype\./,o=function(t,e){var n=u[a(t)];return n===f||n!==c&&(i(e)?r(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},55988:function(t,e,n){"use strict";var r=n(70111),i=Math.floor;t.exports=Number.isInteger||function(t){return!r(t)&&isFinite(t)&&i(t)===t}},68554:function(t){"use strict";t.exports=function(t){return null===t||t===undefined}},70111:function(t,e,n){"use strict";var r=n(60614),i=n(4154),s=i.all;t.exports=i.IS_HTMLDDA?function(t){return"object"==typeof t?null!==t:r(t)||t===s}:function(t){return"object"==typeof t?null!==t:r(t)}},31913:function(t){"use strict";t.exports=!1},52190:function(t,e,n){"use strict";var r=n(35005),i=n(60614),s=n(47976),o=n(43307),a=Object;t.exports=o?function(t){return"symbol"==typeof t}:function(t){var e=r("Symbol");return i(e)&&s(e.prototype,a(t))}},63061:function(t,e,n){"use strict";var r=n(13383).IteratorPrototype,i=n(70030),s=n(79114),o=n(58003),a=n(97497),u=function(){return this};t.exports=function(t,e,n,c){var f=e+" Iterator";return t.prototype=i(r,{next:s(+!c,n)}),o(t,f,!1,!0),a[f]=u,t}},51656:function(t,e,n){"use strict";var r=n(82109),i=n(46916),s=n(31913),o=n(76530),a=n(60614),u=n(63061),c=n(79518),f=n(27674),l=n(58003),h=n(68880),d=n(98052),p=n(5112),g=n(97497),v=n(13383),m=o.PROPER,y=o.CONFIGURABLE,b=v.IteratorPrototype,w=v.BUGGY_SAFARI_ITERATORS,x=p("iterator"),_="keys",S="values",P="entries",E=function(){return this};t.exports=function(t,e,n,o,p,v,T){u(n,e,o);var I,A,R,k=function(t){if(t===p&&N)return N;if(!w&&t in D)return D[t];switch(t){case _:case S:case P:return function(){return new n(this,t)}}return function(){return new n(this)}},O=e+" Iterator",C=!1,D=t.prototype,L=D[x]||D["@@iterator"]||p&&D[p],N=!w&&L||k(p),U="Array"===e&&D.entries||L;if(U&&(I=c(U.call(new t)))!==Object.prototype&&I.next&&(s||c(I)===b||(f?f(I,b):a(I[x])||d(I,x,E)),l(I,O,!0,!0),s&&(g[O]=E)),m&&p===S&&L&&L.name!==S&&(!s&&y?h(D,"name",S):(C=!0,N=function(){return i(L,this)})),p)if(A={values:k(S),keys:v?N:k(_),entries:k(P)},T)for(R in A)(w||C||!(R in D))&&d(D,R,A[R]);else r({target:e,proto:!0,forced:w||C},A);return s&&!T||D[x]===N||d(D,x,N,{name:p}),g[e]=N,A}},13383:function(t,e,n){"use strict";var r,i,s,o=n(47293),a=n(60614),u=n(70111),c=n(70030),f=n(79518),l=n(98052),h=n(5112),d=n(31913),p=h("iterator"),g=!1;[].keys&&("next"in(s=[].keys())?(i=f(f(s)))!==Object.prototype&&(r=i):g=!0),!u(r)||o((function(){var t={};return r[p].call(t)!==t}))?r={}:d&&(r=c(r)),a(r[p])||l(r,p,(function(){return this})),t.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:g}},97497:function(t){"use strict";t.exports={}},26244:function(t,e,n){"use strict";var r=n(17466);t.exports=function(t){return r(t.length)}},56339:function(t,e,n){"use strict";var r=n(1702),i=n(47293),s=n(60614),o=n(92597),a=n(19781),u=n(76530).CONFIGURABLE,c=n(42788),f=n(29909),l=f.enforce,h=f.get,d=String,p=Object.defineProperty,g=r("".slice),v=r("".replace),m=r([].join),y=a&&!i((function(){return 8!==p((function(){}),"length",{value:8}).length})),b=String(String).split("String"),w=t.exports=function(t,e,n){"Symbol("===g(d(e),0,7)&&(e="["+v(d(e),/^Symbol\(([^)]*)\)/,"$1")+"]"),n&&n.getter&&(e="get "+e),n&&n.setter&&(e="set "+e),(!o(t,"name")||u&&t.name!==e)&&(a?p(t,"name",{value:e,configurable:!0}):t.name=e),y&&n&&o(n,"arity")&&t.length!==n.arity&&p(t,"length",{value:n.arity});try{n&&o(n,"constructor")&&n.constructor?a&&p(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=undefined)}catch(i){}var r=l(t);return o(r,"source")||(r.source=m(b,"string"==typeof e?e:"")),t};Function.prototype.toString=w((function(){return s(this)&&h(this).source||c(this)}),"toString")},64310:function(t){"use strict";t.exports=Math.sign||function(t){var e=+t;return 0===e||e!=e?e:e<0?-1:1}},74758:function(t){"use strict";var e=Math.ceil,n=Math.floor;t.exports=Math.trunc||function(t){var r=+t;return(r>0?n:e)(r)}},70030:function(t,e,n){"use strict";var r,i=n(19670),s=n(36048),o=n(80748),a=n(3501),u=n(60490),c=n(80317),f=n(6200),l="prototype",h="script",d=f("IE_PROTO"),p=function(){},g=function(t){return"<"+h+">"+t+""},v=function(t){t.write(g("")),t.close();var e=t.parentWindow.Object;return t=null,e},m=function(){try{r=new ActiveXObject("htmlfile")}catch(s){}var t,e,n;m="undefined"!=typeof document?document.domain&&r?v(r):(e=c("iframe"),n="java"+h+":",e.style.display="none",u.appendChild(e),e.src=String(n),(t=e.contentWindow.document).open(),t.write(g("document.F=Object")),t.close(),t.F):v(r);for(var i=o.length;i--;)delete m[l][o[i]];return m()};a[d]=!0,t.exports=Object.create||function(t,e){var n;return null!==t?(p[l]=i(t),n=new p,p[l]=null,n[d]=t):n=m(),e===undefined?n:s.f(n,e)}},36048:function(t,e,n){"use strict";var r=n(19781),i=n(3353),s=n(3070),o=n(19670),a=n(45656),u=n(81956);e.f=r&&!i?Object.defineProperties:function(t,e){o(t);for(var n,r=a(e),i=u(e),c=i.length,f=0;c>f;)s.f(t,n=i[f++],r[n]);return t}},3070:function(t,e,n){"use strict";var r=n(19781),i=n(64664),s=n(3353),o=n(19670),a=n(34948),u=TypeError,c=Object.defineProperty,f=Object.getOwnPropertyDescriptor,l="enumerable",h="configurable",d="writable";e.f=r?s?function(t,e,n){if(o(t),e=a(e),o(n),"function"==typeof t&&"prototype"===e&&"value"in n&&d in n&&!n[d]){var r=f(t,e);r&&r[d]&&(t[e]=n.value,n={configurable:h in n?n[h]:r[h],enumerable:l in n?n[l]:r[l],writable:!1})}return c(t,e,n)}:c:function(t,e,n){if(o(t),e=a(e),o(n),i)try{return c(t,e,n)}catch(r){}if("get"in n||"set"in n)throw u("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},31236:function(t,e,n){"use strict";var r=n(19781),i=n(46916),s=n(55296),o=n(79114),a=n(45656),u=n(34948),c=n(92597),f=n(64664),l=Object.getOwnPropertyDescriptor;e.f=r?l:function(t,e){if(t=a(t),e=u(e),f)try{return l(t,e)}catch(n){}if(c(t,e))return o(!i(s.f,t,e),t[e])}},8006:function(t,e,n){"use strict";var r=n(16324),i=n(80748).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,i)}},25181:function(t,e){"use strict";e.f=Object.getOwnPropertySymbols},79518:function(t,e,n){"use strict";var r=n(92597),i=n(60614),s=n(47908),o=n(6200),a=n(49920),u=o("IE_PROTO"),c=Object,f=c.prototype;t.exports=a?c.getPrototypeOf:function(t){var e=s(t);if(r(e,u))return e[u];var n=e.constructor;return i(n)&&e instanceof n?n.prototype:e instanceof c?f:null}},47976:function(t,e,n){"use strict";var r=n(1702);t.exports=r({}.isPrototypeOf)},16324:function(t,e,n){"use strict";var r=n(1702),i=n(92597),s=n(45656),o=n(41318).indexOf,a=n(3501),u=r([].push);t.exports=function(t,e){var n,r=s(t),c=0,f=[];for(n in r)!i(a,n)&&i(r,n)&&u(f,n);for(;e.length>c;)i(r,n=e[c++])&&(~o(f,n)||u(f,n));return f}},81956:function(t,e,n){"use strict";var r=n(16324),i=n(80748);t.exports=Object.keys||function(t){return r(t,i)}},55296:function(t,e){"use strict";var n={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,i=r&&!n.call({1:2},1);e.f=i?function(t){var e=r(this,t);return!!e&&e.enumerable}:n},27674:function(t,e,n){"use strict";var r=n(75668),i=n(19670),s=n(96077);t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{(t=r(Object.prototype,"__proto__","set"))(n,[]),e=n instanceof Array}catch(o){}return function(n,r){return i(n),s(r),e?t(n,r):n.__proto__=r,n}}():undefined)},90288:function(t,e,n){"use strict";var r=n(51694),i=n(70648);t.exports=r?{}.toString:function(){return"[object "+i(this)+"]"}},92140:function(t,e,n){"use strict";var r=n(46916),i=n(60614),s=n(70111),o=TypeError;t.exports=function(t,e){var n,a;if("string"===e&&i(n=t.toString)&&!s(a=r(n,t)))return a;if(i(n=t.valueOf)&&!s(a=r(n,t)))return a;if("string"!==e&&i(n=t.toString)&&!s(a=r(n,t)))return a;throw o("Can't convert object to primitive value")}},53887:function(t,e,n){"use strict";var r=n(35005),i=n(1702),s=n(8006),o=n(25181),a=n(19670),u=i([].concat);t.exports=r("Reflect","ownKeys")||function(t){var e=s.f(a(t)),n=o.f;return n?u(e,n(t)):e}},40857:function(t,e,n){"use strict";var r=n(17854);t.exports=r},97651:function(t,e,n){"use strict";var r=n(46916),i=n(19670),s=n(60614),o=n(84326),a=n(22261),u=TypeError;t.exports=function(t,e){var n=t.exec;if(s(n)){var c=r(n,t,e);return null!==c&&i(c),c}if("RegExp"===o(t))return r(a,t,e);throw u("RegExp#exec called on incompatible receiver")}},22261:function(t,e,n){"use strict";var r,i,s=n(46916),o=n(1702),a=n(41340),u=n(67066),c=n(52999),f=n(72309),l=n(70030),h=n(29909).get,d=n(9441),p=n(38173),g=f("native-string-replace",String.prototype.replace),v=RegExp.prototype.exec,m=v,y=o("".charAt),b=o("".indexOf),w=o("".replace),x=o("".slice),_=(i=/b*/g,s(v,r=/a/,"a"),s(v,i,"a"),0!==r.lastIndex||0!==i.lastIndex),S=c.BROKEN_CARET,P=/()??/.exec("")[1]!==undefined;(_||P||S||d||p)&&(m=function(t){var e,n,r,i,o,c,f,d=this,p=h(d),E=a(t),T=p.raw;if(T)return T.lastIndex=d.lastIndex,e=s(m,T,E),d.lastIndex=T.lastIndex,e;var I=p.groups,A=S&&d.sticky,R=s(u,d),k=d.source,O=0,C=E;if(A&&(R=w(R,"y",""),-1===b(R,"g")&&(R+="g"),C=x(E,d.lastIndex),d.lastIndex>0&&(!d.multiline||d.multiline&&"\n"!==y(E,d.lastIndex-1))&&(k="(?: "+k+")",C=" "+C,O++),n=new RegExp("^(?:"+k+")",R)),P&&(n=new RegExp("^"+k+"$(?!\\s)",R)),_&&(r=d.lastIndex),i=s(v,A?n:d,C),A?i?(i.input=x(i.input,O),i[0]=x(i[0],O),i.index=d.lastIndex,d.lastIndex+=i[0].length):d.lastIndex=0:_&&i&&(d.lastIndex=d.global?i.index+i[0].length:r),P&&i&&i.length>1&&s(g,i[0],n,(function(){for(o=1;ob)","g");return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$c")}))},84488:function(t,e,n){"use strict";var r=n(68554),i=TypeError;t.exports=function(t){if(r(t))throw i("Can't call method on "+t);return t}},96340:function(t,e,n){"use strict";var r=n(35005),i=n(47045),s=n(5112),o=n(19781),a=s("species");t.exports=function(t){var e=r(t);o&&e&&!e[a]&&i(e,a,{configurable:!0,get:function(){return this}})}},58003:function(t,e,n){"use strict";var r=n(3070).f,i=n(92597),s=n(5112)("toStringTag");t.exports=function(t,e,n){t&&!n&&(t=t.prototype),t&&!i(t,s)&&r(t,s,{configurable:!0,value:e})}},6200:function(t,e,n){"use strict";var r=n(72309),i=n(69711),s=r("keys");t.exports=function(t){return s[t]||(s[t]=i(t))}},5465:function(t,e,n){"use strict";var r=n(17854),i=n(13072),s="__core-js_shared__",o=r[s]||i(s,{});t.exports=o},72309:function(t,e,n){"use strict";var r=n(31913),i=n(5465);(t.exports=function(t,e){return i[t]||(i[t]=e!==undefined?e:{})})("versions",[]).push({version:"3.32.1",mode:r?"pure":"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.32.1/LICENSE",source:"https://github.com/zloirock/core-js"})},36707:function(t,e,n){"use strict";var r=n(19670),i=n(39483),s=n(68554),o=n(5112)("species");t.exports=function(t,e){var n,a=r(t).constructor;return a===undefined||s(n=r(a)[o])?e:i(n)}},28710:function(t,e,n){"use strict";var r=n(1702),i=n(19303),s=n(41340),o=n(84488),a=r("".charAt),u=r("".charCodeAt),c=r("".slice),f=function(t){return function(e,n){var r,f,l=s(o(e)),h=i(n),d=l.length;return h<0||h>=d?t?"":undefined:(r=u(l,h))<55296||r>56319||h+1===d||(f=u(l,h+1))<56320||f>57343?t?a(l,h):r:t?c(l,h,h+2):f-56320+(r-55296<<10)+65536}};t.exports={codeAt:f(!1),charAt:f(!0)}},53111:function(t,e,n){"use strict";var r=n(1702),i=n(84488),s=n(41340),o=n(81361),a=r("".replace),u=RegExp("^["+o+"]+"),c=RegExp("(^|[^"+o+"])["+o+"]+$"),f=function(t){return function(e){var n=s(i(e));return 1&t&&(n=a(n,u,"")),2&t&&(n=a(n,c,"$1")),n}};t.exports={start:f(1),end:f(2),trim:f(3)}},36293:function(t,e,n){"use strict";var r=n(7392),i=n(47293),s=n(17854).String;t.exports=!!Object.getOwnPropertySymbols&&!i((function(){var t=Symbol("symbol detection");return!s(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&r&&r<41}))},50863:function(t,e,n){"use strict";var r=n(1702);t.exports=r(1..valueOf)},51400:function(t,e,n){"use strict";var r=n(19303),i=Math.max,s=Math.min;t.exports=function(t,e){var n=r(t);return n<0?i(n+e,0):s(n,e)}},64599:function(t,e,n){"use strict";var r=n(57593),i=TypeError;t.exports=function(t){var e=r(t,"number");if("number"==typeof e)throw i("Can't convert number to bigint");return BigInt(e)}},57067:function(t,e,n){"use strict";var r=n(19303),i=n(17466),s=RangeError;t.exports=function(t){if(t===undefined)return 0;var e=r(t),n=i(e);if(e!==n)throw s("Wrong length or index");return n}},45656:function(t,e,n){"use strict";var r=n(68361),i=n(84488);t.exports=function(t){return r(i(t))}},19303:function(t,e,n){"use strict";var r=n(74758);t.exports=function(t){var e=+t;return e!=e||0===e?0:r(e)}},17466:function(t,e,n){"use strict";var r=n(19303),i=Math.min;t.exports=function(t){return t>0?i(r(t),9007199254740991):0}},47908:function(t,e,n){"use strict";var r=n(84488),i=Object;t.exports=function(t){return i(r(t))}},84590:function(t,e,n){"use strict";var r=n(73002),i=RangeError;t.exports=function(t,e){var n=r(t);if(n%e)throw i("Wrong offset");return n}},73002:function(t,e,n){"use strict";var r=n(19303),i=RangeError;t.exports=function(t){var e=r(t);if(e<0)throw i("The argument can't be less than 0");return e}},57593:function(t,e,n){"use strict";var r=n(46916),i=n(70111),s=n(52190),o=n(58173),a=n(92140),u=n(5112),c=TypeError,f=u("toPrimitive");t.exports=function(t,e){if(!i(t)||s(t))return t;var n,u=o(t,f);if(u){if(e===undefined&&(e="default"),n=r(u,t,e),!i(n)||s(n))return n;throw c("Can't convert object to primitive value")}return e===undefined&&(e="number"),a(t,e)}},34948:function(t,e,n){"use strict";var r=n(57593),i=n(52190);t.exports=function(t){var e=r(t,"string");return i(e)?e:e+""}},51694:function(t,e,n){"use strict";var r={};r[n(5112)("toStringTag")]="z",t.exports="[object z]"===String(r)},41340:function(t,e,n){"use strict";var r=n(70648),i=String;t.exports=function(t){if("Symbol"===r(t))throw TypeError("Cannot convert a Symbol value to a string");return i(t)}},67892:function(t){"use strict";var e=Math.round;t.exports=function(t){var n=e(t);return n<0?0:n>255?255:255&n}},66330:function(t){"use strict";var e=String;t.exports=function(t){try{return e(t)}catch(n){return"Object"}}},19843:function(t,e,n){"use strict";var r=n(82109),i=n(17854),s=n(46916),o=n(19781),a=n(63832),u=n(90260),c=n(13331),f=n(25787),l=n(79114),h=n(68880),d=n(55988),p=n(17466),g=n(57067),v=n(84590),m=n(67892),y=n(34948),b=n(92597),w=n(70648),x=n(70111),_=n(52190),S=n(70030),P=n(47976),E=n(27674),T=n(8006).f,I=n(97321),A=n(42092).forEach,R=n(96340),k=n(47045),O=n(3070),C=n(31236),D=n(29909),L=n(79587),N=D.get,U=D.set,j=D.enforce,M=O.f,q=C.f,B=i.RangeError,F=c.ArrayBuffer,H=F.prototype,W=c.DataView,G=u.NATIVE_ARRAY_BUFFER_VIEWS,X=u.TYPED_ARRAY_TAG,Y=u.TypedArray,$=u.TypedArrayPrototype,V=u.aTypedArrayConstructor,Q=u.isTypedArray,z="BYTES_PER_ELEMENT",K="Wrong length",J=function(t,e){V(t);for(var n=0,r=e.length,i=new t(r);r>n;)i[n]=e[n++];return i},Z=function(t,e){k(t,e,{configurable:!0,get:function(){return N(this)[e]}})},tt=function(t){var e;return P(H,t)||"ArrayBuffer"===(e=w(t))||"SharedArrayBuffer"===e},et=function(t,e){return Q(t)&&!_(e)&&e in t&&d(+e)&&e>=0},nt=function(t,e){return e=y(e),et(t,e)?l(2,t[e]):q(t,e)},rt=function(t,e,n){return e=y(e),!(et(t,e)&&x(n)&&b(n,"value"))||b(n,"get")||b(n,"set")||n.configurable||b(n,"writable")&&!n.writable||b(n,"enumerable")&&!n.enumerable?M(t,e,n):(t[e]=n.value,t)};o?(G||(C.f=nt,O.f=rt,Z($,"buffer"),Z($,"byteOffset"),Z($,"byteLength"),Z($,"length")),r({target:"Object",stat:!0,forced:!G},{getOwnPropertyDescriptor:nt,defineProperty:rt}),t.exports=function(t,e,n){var o=t.match(/\d+/)[0]/8,u=t+(n?"Clamped":"")+"Array",c="get"+t,l="set"+t,d=i[u],y=d,b=y&&y.prototype,w={},_=function(t,e){M(t,e,{get:function(){return function(t,e){var n=N(t);return n.view[c](e*o+n.byteOffset,!0)}(this,e)},set:function(t){return function(t,e,r){var i=N(t);i.view[l](e*o+i.byteOffset,n?m(r):r,!0)}(this,e,t)},enumerable:!0})};G?a&&(y=e((function(t,e,n,r){return f(t,b),L(x(e)?tt(e)?r!==undefined?new d(e,v(n,o),r):n!==undefined?new d(e,v(n,o)):new d(e):Q(e)?J(y,e):s(I,y,e):new d(g(e)),t,y)})),E&&E(y,Y),A(T(d),(function(t){t in y||h(y,t,d[t])})),y.prototype=b):(y=e((function(t,e,n,r){f(t,b);var i,a,u,c=0,l=0;if(x(e)){if(!tt(e))return Q(e)?J(y,e):s(I,y,e);i=e,l=v(n,o);var h=e.byteLength;if(r===undefined){if(h%o)throw B(K);if((a=h-l)<0)throw B(K)}else if((a=p(r)*o)+l>h)throw B(K);u=a/o}else u=g(e),i=new F(a=u*o);for(U(t,{buffer:i,byteOffset:l,byteLength:a,length:u,view:new W(i)});c1?arguments[1]:undefined,P=S!==undefined,E=c(x);if(E&&!f(E))for(b=(y=u(x,E)).next,x=[];!(m=i(b,y)).done;)x.push(m.value);for(P&&_>2&&(S=r(S,arguments[2])),n=a(x),p=new(h(w))(n),g=l(p),e=0;n>e;e++)v=P?S(x[e],e):x[e],p[e]=g?d(v):+v;return p}},66304:function(t,e,n){"use strict";var r=n(90260),i=n(36707),s=r.aTypedArrayConstructor,o=r.getTypedArrayConstructor;t.exports=function(t){return s(i(t,o(t)))}},69711:function(t,e,n){"use strict";var r=n(1702),i=0,s=Math.random(),o=r(1..toString);t.exports=function(t){return"Symbol("+(t===undefined?"":t)+")_"+o(++i+s,36)}},43307:function(t,e,n){"use strict";var r=n(36293);t.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},3353:function(t,e,n){"use strict";var r=n(19781),i=n(47293);t.exports=r&&i((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},94811:function(t,e,n){"use strict";var r=n(17854),i=n(60614),s=r.WeakMap;t.exports=i(s)&&/native code/.test(String(s))},5112:function(t,e,n){"use strict";var r=n(17854),i=n(72309),s=n(92597),o=n(69711),a=n(36293),u=n(43307),c=r.Symbol,f=i("wks"),l=u?c["for"]||c:c&&c.withoutSetter||o;t.exports=function(t){return s(f,t)||(f[t]=a&&s(c,t)?c[t]:l("Symbol."+t)),f[t]}},81361:function(t){"use strict";t.exports="\t\n\x0B\f\r                 \u2028\u2029\ufeff"},18264:function(t,e,n){"use strict";var r=n(82109),i=n(17854),s=n(13331),o=n(96340),a="ArrayBuffer",u=s[a];r({global:!0,constructor:!0,forced:i[a]!==u},{ArrayBuffer:u}),o(a)},39575:function(t,e,n){"use strict";var r=n(82109),i=n(21470),s=n(47293),o=n(13331),a=n(19670),u=n(51400),c=n(17466),f=n(36707),l=o.ArrayBuffer,h=o.DataView,d=h.prototype,p=i(l.prototype.slice),g=i(d.getUint8),v=i(d.setUint8);r({target:"ArrayBuffer",proto:!0,unsafe:!0,forced:s((function(){return!new l(2).slice(1,undefined).byteLength}))},{slice:function(t,e){if(p&&e===undefined)return p(a(this),t);for(var n=a(this).byteLength,r=u(t,n),i=u(e===undefined?n:e,n),s=new(f(this,l))(c(i-r)),o=new h(this),d=new h(s),m=0;r=e.length)return t.target=undefined,c(undefined,!0);switch(n){case"keys":return c(r,!1);case"values":return c(e[r],!1)}return c([r,e[r]],!1)}),"values");var g=s.Arguments=s.Array;if(i("keys"),i("values"),i("entries"),!f&&l&&"values"!==g.name)try{a(g,"name",{value:"values"})}catch(v){}},68309:function(t,e,n){"use strict";var r=n(19781),i=n(76530).EXISTS,s=n(1702),o=n(47045),a=Function.prototype,u=s(a.toString),c=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,f=s(c.exec);r&&!i&&o(a,"name",{configurable:!0,get:function(){try{return f(c,u(this))[1]}catch(t){return""}}})},9653:function(t,e,n){"use strict";var r=n(82109),i=n(31913),s=n(19781),o=n(17854),a=n(40857),u=n(1702),c=n(54705),f=n(92597),l=n(79587),h=n(47976),d=n(52190),p=n(57593),g=n(47293),v=n(8006).f,m=n(31236).f,y=n(3070).f,b=n(50863),w=n(53111).trim,x="Number",_=o[x],S=a[x],P=_.prototype,E=o.TypeError,T=u("".slice),I=u("".charCodeAt),A=function(t){var e,n,r,i,s,o,a,u,c=p(t,"number");if(d(c))throw E("Cannot convert a Symbol value to a number");if("string"==typeof c&&c.length>2)if(c=w(c),43===(e=I(c,0))||45===e){if(88===(n=I(c,2))||120===n)return NaN}else if(48===e){switch(I(c,1)){case 66:case 98:r=2,i=49;break;case 79:case 111:r=8,i=55;break;default:return+c}for(o=(s=T(c,2)).length,a=0;ai)return NaN;return parseInt(s,r)}return+c},R=c(x,!_(" 0o1")||!_("0b1")||_("+0x1")),k=function(t){var e,n=arguments.length<1?0:_(function(t){var e=p(t,"number");return"bigint"==typeof e?e:A(e)}(t));return h(P,e=this)&&g((function(){b(e)}))?l(Object(n),this,k):n};k.prototype=P,R&&!i&&(P.constructor=k),r({global:!0,constructor:!0,wrap:!0,forced:R},{Number:k});var O=function(t,e){for(var n,r=s?v(e):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),i=0;r.length>i;i++)f(e,n=r[i])&&!f(t,n)&&y(t,n,m(e,n))};i&&S&&O(a[x],S),(R||i)&&O(a[x],_)},47941:function(t,e,n){"use strict";var r=n(82109),i=n(47908),s=n(81956);r({target:"Object",stat:!0,forced:n(47293)((function(){s(1)}))},{keys:function(t){return s(i(t))}})},41539:function(t,e,n){"use strict";var r=n(51694),i=n(98052),s=n(90288);r||i(Object.prototype,"toString",s,{unsafe:!0})},74916:function(t,e,n){"use strict";var r=n(82109),i=n(22261);r({target:"RegExp",proto:!0,forced:/./.exec!==i},{exec:i})},39714:function(t,e,n){"use strict";var r=n(76530).PROPER,i=n(98052),s=n(19670),o=n(41340),a=n(47293),u=n(34706),c="toString",f=RegExp.prototype[c],l=a((function(){return"/a/b"!==f.call({source:"a",flags:"b"})})),h=r&&f.name!==c;(l||h)&&i(RegExp.prototype,c,(function(){var t=s(this);return"/"+o(t.source)+"/"+o(u(t))}),{unsafe:!0})},4723:function(t,e,n){"use strict";var r=n(46916),i=n(27007),s=n(19670),o=n(68554),a=n(17466),u=n(41340),c=n(84488),f=n(58173),l=n(31530),h=n(97651);i("match",(function(t,e,n){return[function(e){var n=c(this),i=o(e)?undefined:f(e,t);return i?r(i,e,n):new RegExp(e)[t](u(n))},function(t){var r=s(this),i=u(t),o=n(e,r,i);if(o.done)return o.value;if(!r.global)return h(r,i);var c=r.unicode;r.lastIndex=0;for(var f,d=[],p=0;null!==(f=h(r,i));){var g=u(f[0]);d[p]=g,""===g&&(r.lastIndex=l(i,a(r.lastIndex),c)),p++}return 0===p?null:d}]}))},15306:function(t,e,n){"use strict";var r=n(22104),i=n(46916),s=n(1702),o=n(27007),a=n(47293),u=n(19670),c=n(60614),f=n(68554),l=n(19303),h=n(17466),d=n(41340),p=n(84488),g=n(31530),v=n(58173),m=n(10647),y=n(97651),b=n(5112)("replace"),w=Math.max,x=Math.min,_=s([].concat),S=s([].push),P=s("".indexOf),E=s("".slice),T="$0"==="a".replace(/./,"$0"),I=!!/./[b]&&""===/./[b]("a","$0");o("replace",(function(t,e,n){var s=I?"$":"$0";return[function(t,n){var r=p(this),s=f(t)?undefined:v(t,b);return s?i(s,t,r,n):i(e,d(r),t,n)},function(t,i){var o=u(this),a=d(t);if("string"==typeof i&&-1===P(i,s)&&-1===P(i,"$<")){var f=n(e,o,a,i);if(f.done)return f.value}var p=c(i);p||(i=d(i));var v,b=o.global;b&&(v=o.unicode,o.lastIndex=0);for(var T,I=[];null!==(T=y(o,a))&&(S(I,T),b);){""===d(T[0])&&(o.lastIndex=g(a,h(o.lastIndex),v))}for(var A,R="",k=0,O=0;O=k&&(R+=E(a,k,L)+C,k=L+D.length)}return R+E(a,k)}]}),!!a((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$")}))||!T||I)},92990:function(t,e,n){"use strict";var r=n(1702),i=n(90260),s=r(n(1048)),o=i.aTypedArray;(0,i.exportTypedArrayMethod)("copyWithin",(function(t,e){return s(o(this),t,e,arguments.length>2?arguments[2]:undefined)}))},18927:function(t,e,n){"use strict";var r=n(90260),i=n(42092).every,s=r.aTypedArray;(0,r.exportTypedArrayMethod)("every",(function(t){return i(s(this),t,arguments.length>1?arguments[1]:undefined)}))},33105:function(t,e,n){"use strict";var r=n(90260),i=n(21285),s=n(64599),o=n(70648),a=n(46916),u=n(1702),c=n(47293),f=r.aTypedArray,l=r.exportTypedArrayMethod,h=u("".slice);l("fill",(function(t){var e=arguments.length;f(this);var n="Big"===h(o(this),0,3)?s(t):+t;return a(i,this,n,e>1?arguments[1]:undefined,e>2?arguments[2]:undefined)}),c((function(){var t=0;return new Int8Array(2).fill({valueOf:function(){return t++}}),1!==t})))},35035:function(t,e,n){"use strict";var r=n(90260),i=n(42092).filter,s=n(43074),o=r.aTypedArray;(0,r.exportTypedArrayMethod)("filter",(function(t){var e=i(o(this),t,arguments.length>1?arguments[1]:undefined);return s(this,e)}))},7174:function(t,e,n){"use strict";var r=n(90260),i=n(42092).findIndex,s=r.aTypedArray;(0,r.exportTypedArrayMethod)("findIndex",(function(t){return i(s(this),t,arguments.length>1?arguments[1]:undefined)}))},74345:function(t,e,n){"use strict";var r=n(90260),i=n(42092).find,s=r.aTypedArray;(0,r.exportTypedArrayMethod)("find",(function(t){return i(s(this),t,arguments.length>1?arguments[1]:undefined)}))},32846:function(t,e,n){"use strict";var r=n(90260),i=n(42092).forEach,s=r.aTypedArray;(0,r.exportTypedArrayMethod)("forEach",(function(t){i(s(this),t,arguments.length>1?arguments[1]:undefined)}))},44731:function(t,e,n){"use strict";var r=n(90260),i=n(41318).includes,s=r.aTypedArray;(0,r.exportTypedArrayMethod)("includes",(function(t){return i(s(this),t,arguments.length>1?arguments[1]:undefined)}))},77209:function(t,e,n){"use strict";var r=n(90260),i=n(41318).indexOf,s=r.aTypedArray;(0,r.exportTypedArrayMethod)("indexOf",(function(t){return i(s(this),t,arguments.length>1?arguments[1]:undefined)}))},96319:function(t,e,n){"use strict";var r=n(17854),i=n(47293),s=n(1702),o=n(90260),a=n(66992),u=n(5112)("iterator"),c=r.Uint8Array,f=s(a.values),l=s(a.keys),h=s(a.entries),d=o.aTypedArray,p=o.exportTypedArrayMethod,g=c&&c.prototype,v=!i((function(){g[u].call([1])})),m=!!g&&g.values&&g[u]===g.values&&"values"===g.values.name,y=function(){return f(d(this))};p("entries",(function(){return h(d(this))}),v),p("keys",(function(){return l(d(this))}),v),p("values",y,v||!m,{name:"values"}),p(u,y,v||!m,{name:"values"})},58867:function(t,e,n){"use strict";var r=n(90260),i=n(1702),s=r.aTypedArray,o=r.exportTypedArrayMethod,a=i([].join);o("join",(function(t){return a(s(this),t)}))},37789:function(t,e,n){"use strict";var r=n(90260),i=n(22104),s=n(86583),o=r.aTypedArray;(0,r.exportTypedArrayMethod)("lastIndexOf",(function(t){var e=arguments.length;return i(s,o(this),e>1?[t,arguments[1]]:[t])}))},33739:function(t,e,n){"use strict";var r=n(90260),i=n(42092).map,s=n(66304),o=r.aTypedArray;(0,r.exportTypedArrayMethod)("map",(function(t){return i(o(this),t,arguments.length>1?arguments[1]:undefined,(function(t,e){return new(s(t))(e)}))}))},14483:function(t,e,n){"use strict";var r=n(90260),i=n(53671).right,s=r.aTypedArray;(0,r.exportTypedArrayMethod)("reduceRight",(function(t){var e=arguments.length;return i(s(this),t,e,e>1?arguments[1]:undefined)}))},29368:function(t,e,n){"use strict";var r=n(90260),i=n(53671).left,s=r.aTypedArray;(0,r.exportTypedArrayMethod)("reduce",(function(t){var e=arguments.length;return i(s(this),t,e,e>1?arguments[1]:undefined)}))},12056:function(t,e,n){"use strict";var r=n(90260),i=r.aTypedArray,s=r.exportTypedArrayMethod,o=Math.floor;s("reverse",(function(){for(var t,e=this,n=i(e).length,r=o(n/2),s=0;s1?arguments[1]:undefined,1),n=u(t);if(v)return i(d,this,n,e);var r=this.length,s=o(n),c=0;if(s+e>r)throw f("Wrong length");for(;cs;)c[s]=n[s++];return c}),s((function(){new Int8Array(1).slice()})))},27462:function(t,e,n){"use strict";var r=n(90260),i=n(42092).some,s=r.aTypedArray;(0,r.exportTypedArrayMethod)("some",(function(t){return i(s(this),t,arguments.length>1?arguments[1]:undefined)}))},33824:function(t,e,n){"use strict";var r=n(17854),i=n(21470),s=n(47293),o=n(19662),a=n(94362),u=n(90260),c=n(68886),f=n(30256),l=n(7392),h=n(98008),d=u.aTypedArray,p=u.exportTypedArrayMethod,g=r.Uint16Array,v=g&&i(g.prototype.sort),m=!(!v||s((function(){v(new g(2),null)}))&&s((function(){v(new g(2),{})}))),y=!!v&&!s((function(){if(l)return l<74;if(c)return c<67;if(f)return!0;if(h)return h<602;var t,e,n=new g(516),r=Array(516);for(t=0;t<516;t++)e=t%4,n[t]=515-t,r[t]=t-2*e+3;for(v(n,(function(t,e){return(t/4|0)-(e/4|0)})),t=0;t<516;t++)if(n[t]!==r[t])return!0}));p("sort",(function(t){return t!==undefined&&o(t),y?v(this,t):a(d(this),function(t){return function(e,n){return t!==undefined?+t(e,n)||0:n!=n?-1:e!=e?1:0===e&&0===n?1/e>0&&1/n<0?1:-1:e>n}}(t))}),!y||m)},55021:function(t,e,n){"use strict";var r=n(90260),i=n(17466),s=n(51400),o=n(66304),a=r.aTypedArray;(0,r.exportTypedArrayMethod)("subarray",(function(t,e){var n=a(this),r=n.length,u=s(t,r);return new(o(n))(n.buffer,n.byteOffset+u*n.BYTES_PER_ELEMENT,i((e===undefined?r:s(e,r))-u))}))},12974:function(t,e,n){"use strict";var r=n(17854),i=n(22104),s=n(90260),o=n(47293),a=n(50206),u=r.Int8Array,c=s.aTypedArray,f=s.exportTypedArrayMethod,l=[].toLocaleString,h=!!u&&o((function(){l.call(new u(1))}));f("toLocaleString",(function(){return i(l,h?a(c(this)):c(this),a(arguments))}),o((function(){return[1,2].toLocaleString()!==new u([1,2]).toLocaleString()}))||!o((function(){u.prototype.toLocaleString.call([1,2])})))},15016:function(t,e,n){"use strict";var r=n(90260).exportTypedArrayMethod,i=n(47293),s=n(17854),o=n(1702),a=s.Uint8Array,u=a&&a.prototype||{},c=[].toString,f=o([].join);i((function(){c.call({})}))&&(c=function(){return f(this)});var l=u.toString!==c;r("toString",c,l)},8255:function(t,e,n){"use strict";n(19843)("Uint16",(function(t){return function(e,n,r){return t(this,e,n,r)}}))},82472:function(t,e,n){"use strict";n(19843)("Uint8",(function(t){return function(e,n,r){return t(this,e,n,r)}}))},54747:function(t,e,n){"use strict";var r=n(17854),i=n(48324),s=n(98509),o=n(18533),a=n(68880),u=function(t){if(t&&t.forEach!==o)try{a(t,"forEach",o)}catch(e){t.forEach=o}};for(var c in i)i[c]&&u(r[c]&&r[c].prototype);u(s)},32114:function(t){"use strict";function e(t,e){for(const n in e)Object.defineProperty(t,n,{value:e[n],enumerable:!0,configurable:!0});return t}t.exports=function(t,n,r){if(!t||"string"==typeof t)throw new TypeError("Please pass an Error to err-code");r||(r={}),"object"==typeof n&&(r=n,n=""),n&&(r.code=n);try{return e(t,r)}catch(i){r.message=t.message,r.stack=t.stack;const n=function(){};n.prototype=Object.create(Object.getPrototypeOf(t));return e(new n,r)}}},17187:function(t){"use strict";var e,n="object"==typeof Reflect?Reflect:null,r=n&&"function"==typeof n.apply?n.apply:function(t,e,n){return Function.prototype.apply.call(t,e,n)};e=n&&"function"==typeof n.ownKeys?n.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.getOwnPropertyNames(t)};var i=Number.isNaN||function(t){return t!=t};function s(){s.init.call(this)}t.exports=s,t.exports.once=function(t,e){return new Promise((function(n,r){function i(n){t.removeListener(e,s),r(n)}function s(){"function"==typeof t.removeListener&&t.removeListener("error",i),n([].slice.call(arguments))}g(t,e,s,{once:!0}),"error"!==e&&function(t,e,n){"function"==typeof t.on&&g(t,"error",e,n)}(t,i,{once:!0})}))},s.EventEmitter=s,s.prototype._events=undefined,s.prototype._eventsCount=0,s.prototype._maxListeners=undefined;var o=10;function a(t){if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}function u(t){return t._maxListeners===undefined?s.defaultMaxListeners:t._maxListeners}function c(t,e,n,r){var i,s,o,c;if(a(n),(s=t._events)===undefined?(s=t._events=Object.create(null),t._eventsCount=0):(s.newListener!==undefined&&(t.emit("newListener",e,n.listener?n.listener:n),s=t._events),o=s[e]),o===undefined)o=s[e]=n,++t._eventsCount;else if("function"==typeof o?o=s[e]=r?[n,o]:[o,n]:r?o.unshift(n):o.push(n),(i=u(t))>0&&o.length>i&&!o.warned){o.warned=!0;var f=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");f.name="MaxListenersExceededWarning",f.emitter=t,f.type=e,f.count=o.length,c=f,console&&console.warn&&console.warn(c)}return t}function f(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function l(t,e,n){var r={fired:!1,wrapFn:undefined,target:t,type:e,listener:n},i=f.bind(r);return i.listener=n,r.wrapFn=i,i}function h(t,e,n){var r=t._events;if(r===undefined)return[];var i=r[e];return i===undefined?[]:"function"==typeof i?n?[i.listener||i]:[i]:n?function(t){for(var e=new Array(t.length),n=0;n0&&(o=e[0]),o instanceof Error)throw o;var a=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw a.context=o,a}var u=s[t];if(u===undefined)return!1;if("function"==typeof u)r(u,this,e);else{var c=u.length,f=p(u,c);for(n=0;n=0;s--)if(n[s]===e||n[s].listener===e){o=n[s].listener,i=s;break}if(i<0)return this;0===i?n.shift():function(t,e){for(;e+1=0;r--)this.removeListener(t,e[r]);return this},s.prototype.listeners=function(t){return h(this,t,!0)},s.prototype.rawListeners=function(t){return h(this,t,!1)},s.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):d.call(t,e)},s.prototype.listenerCount=d,s.prototype.eventNames=function(){return this._eventsCount>0?e(this._events):[]}},3975:function(t){t.exports=class{constructor(t){if(!(t>0)||0!=(t-1&t))throw new Error("Max size for a FixedFIFO should be a power of two");this.buffer=new Array(t),this.mask=t-1,this.top=0,this.btm=0,this.next=null}clear(){this.top=this.btm=0,this.next=null,this.buffer.fill(undefined)}push(t){return this.buffer[this.top]===undefined&&(this.buffer[this.top]=t,this.top=this.top+1&this.mask,!0)}shift(){const t=this.buffer[this.btm];return t===undefined?undefined:(this.buffer[this.btm]=undefined,this.btm=this.btm+1&this.mask,t)}peek(){return this.buffer[this.btm]}isEmpty(){return this.buffer[this.btm]===undefined}}},91607:function(t,e,n){const r=n(3975);t.exports=class{constructor(t){this.hwm=t||16,this.head=new r(this.hwm),this.tail=this.head,this.length=0}clear(){this.head=this.tail,this.head.clear(),this.length=0}push(t){if(this.length++,!this.head.push(t)){const e=this.head;this.head=e.next=new r(2*this.head.buffer.length),this.head.push(t)}}shift(){0!==this.length&&this.length--;const t=this.tail.shift();if(t===undefined&&this.tail.next){const t=this.tail.next;return this.tail.next=null,this.tail=t,this.tail.shift()}return t}peek(){return this.tail.peek()}isEmpty(){return this.head.isEmpty()}}},44399:function(t){t.exports=function(){if("undefined"==typeof globalThis)return null;var t={RTCPeerConnection:globalThis.RTCPeerConnection||globalThis.mozRTCPeerConnection||globalThis.webkitRTCPeerConnection,RTCSessionDescription:globalThis.RTCSessionDescription||globalThis.mozRTCSessionDescription||globalThis.webkitRTCSessionDescription,RTCIceCandidate:globalThis.RTCIceCandidate||globalThis.mozRTCIceCandidate||globalThis.webkitRTCIceCandidate};return t.RTCPeerConnection?t:null}},58908:function(t,e,n){var r;r="undefined"!=typeof window?window:"undefined"!=typeof n.g?n.g:"undefined"!=typeof self?self:{},t.exports=r},80645:function(t,e){e.read=function(t,e,n,r,i){var s,o,a=8*i-r-1,u=(1<>1,f=-7,l=n?i-1:0,h=n?-1:1,d=t[e+l];for(l+=h,s=d&(1<<-f)-1,d>>=-f,f+=a;f>0;s=256*s+t[e+l],l+=h,f-=8);for(o=s&(1<<-f)-1,s>>=-f,f+=r;f>0;o=256*o+t[e+l],l+=h,f-=8);if(0===s)s=1-c;else{if(s===u)return o?NaN:(d?-1:1)*Infinity;o+=Math.pow(2,r),s-=c}return(d?-1:1)*o*Math.pow(2,s-r)},e.write=function(t,e,n,r,i,s){var o,a,u,c=8*s-i-1,f=(1<>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=r?0:s-1,p=r?1:-1,g=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===Infinity?(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+l>=1?h/u:h*Math.pow(2,1-l))*u>=2&&(o++,u/=2),o+l>=f?(a=0,o=f):o+l>=1?(a=(e*u-1)*Math.pow(2,i),o+=l):(a=e*Math.pow(2,l-1)*Math.pow(2,i),o=0));i>=8;t[n+d]=255&a,d+=p,a/=256,i-=8);for(o=o<0;t[n+d]=255&o,d+=p,o/=256,c-=8);t[n+d-p]|=128*g}},5826:function(t){var e={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==e.call(t)}},30778:function(t,e,n){var r=n(52479);function i(t){var e=function(){return e.called?e.value:(e.called=!0,e.value=t.apply(this,arguments))};return e.called=!1,e}function s(t){var e=function(){if(e.called)throw new Error(e.onceError);return e.called=!0,e.value=t.apply(this,arguments)},n=t.name||"Function wrapped with `once`";return e.onceError=n+" shouldn't be called more than once",e.called=!1,e}t.exports=r(i),t.exports.strict=r(s),i.proto=i((function(){Object.defineProperty(Function.prototype,"once",{value:function(){return i(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return s(this)},configurable:!0})}))},54375:function(t,e,n){let r;t.exports="function"==typeof queueMicrotask?queueMicrotask.bind("undefined"!=typeof window?window:n.g):t=>(r||(r=Promise.resolve())).then(t)["catch"]((t=>setTimeout((()=>{throw t}),0)))},83527:function(t){t.exports="function"==typeof queueMicrotask?queueMicrotask:t=>Promise.resolve().then(t)},54595:function(t,e,n){t.exports=function(t,e){let n,i,s,o=!0;Array.isArray(t)?(n=[],i=t.length):(s=Object.keys(t),n={},i=s.length);function a(t){function i(){e&&e(t,n),e=null}o?r(i):i()}function u(t,e,r){n[t]=r,(0==--i||e)&&a(e)}i?s?s.forEach((function(e){t[e]((function(t,n){u(e,t,n)}))})):t.forEach((function(t,e){t((function(t,n){u(e,t,n)}))})):a(null);o=!1};const r=n(54375)},81237:function(t,e,n){const{EventEmitter:r}=n(17187),i=new Error("Stream was destroyed"),s=new Error("Premature close"),o=n(83527),a=n(91607),u=134217727,c=1^u,f=64,l=128,h=256,d=1024,p=2048,g=4096,v=8192,m=16384,y=32768,b=768^u,w=134184959,x=1<<17,_=2<<17,S=4<<17,P=8<<17,E=16<<17,T=32<<17,I=64<<17,A=128<<17,R=256<<17,k=512<<17,O=100532223,C=133693439,D=117440511,L=131088,N=134086639,U=4210688,j=14,M=15,q=4210702,B=16809984,F=16809999,H=1179648,W=1179663,G=Symbol.asyncIterator||Symbol("asyncIterator");class X{constructor(t,{highWaterMark:e=16384,map:n=null,mapWritable:r,byteLength:i,byteLengthWritable:s}={}){this.stream=t,this.queue=new a,this.highWaterMark=e,this.buffered=0,this.error=null,this.pipeline=null,this.drains=null,this.byteLength=s||i||ht,this.map=r||n,this.afterWrite=J.bind(this),this.afterUpdateNextTick=et.bind(this)}get ended(){return 0!=(this.stream._duplexState&T)}push(t){return null!==this.map&&(t=this.map(t)),this.buffered+=this.byteLength(t),this.queue.push(t),this.buffered0;)e.push(this.shift());for(let n=0;n0;)r.drains.shift().resolve(!1);null!==r.pipeline&&r.pipeline.done(e,t)}}function J(t){const e=this.stream;t&&e.destroy(t),e._duplexState&=O,null!==this.drains&&function(t){for(let e=0;e=t._readableState.highWaterMark}static isPaused(t){return 0==(t._duplexState&h)}[G](){const t=this;let e=null,n=null,r=null;return this.on("error",(t=>{e=t})),this.on("readable",(function(){null!==n&&s(t.read())})),this.on("close",(function(){null!==n&&s(null)})),{[G](){return this},next(){return new Promise((function(e,i){n=e,r=i;const o=t.read();null!==o?s(o):0!=(8&t._duplexState)&&s(null)}))},"return"(){return o(null)},"throw"(t){return o(t)}};function s(s){null!==r&&(e?r(e):null===s&&0==(t._duplexState&m)?r(i):n({value:s,done:null===s}),r=n=null)}function o(e){return t.destroy(e),new Promise(((n,r)=>{if(8&t._duplexState)return n({value:undefined,done:!0});t.once("close",(function(){e?r(e):n({value:undefined,done:!0})}))}))}}}class ot extends st{constructor(t){super(t),this._duplexState=1,this._writableState=new X(this,t),t&&(t.writev&&(this._writev=t.writev),t.write&&(this._write=t.write),t.final&&(this._final=t.final))}_writev(t,e){e(null)}_write(t,e){this._writableState.autoBatch(t,e)}_final(t){t(null)}write(t){return this._writableState.updateNextTick(),this._writableState.push(t)}end(t){return this._writableState.updateNextTick(),this._writableState.end(t),this}}class at extends ot{constructor(t){super(t),this._transformState=new $(this),t&&(t.transform&&(this._transform=t.transform),t.flush&&(this._flush=t.flush))}_write(t,e){this._readableState.buffered>=this._readableState.highWaterMark?this._transformState.data=t:this._transform(t,this._transformState.afterTransform)}_read(t){if(null!==this._transformState.data){const e=this._transformState.data;this._transformState.data=null,t(null),this._transform(e,this._transformState.afterTransform)}else t(null)}_transform(t,e){e(null,t)}_flush(t){t(null)}_final(t){this._transformState.afterFinal=t,this._flush(ut.bind(this))}}function ut(t,e){const n=this._transformState.afterFinal;if(t)return n(t);null!==e&&e!==undefined&&this.push(e),this.push(null),n(null)}function ct(t,...e){const n=Array.isArray(t)?[Object.assign({},t),Object.assign({},e)]:[t,Object.assign({},e)],r=n.length&&"function"==typeof n[n.length-1]?n.pop():null;if(n.length<2)throw new Error("Pipeline requires at least 2 streams");let i=n[0],o=null,a=null;for(let s=1;s1,c),i.pipe(o)),i=o;if(r){let t=!1;const e=lt(o)||!(!o._writableState||!o._writableState.autoDestroy);o.on("error",(t=>{null===a&&(a=t)})),o.on("finish",(()=>{t=!0,e||r(a)})),e&&o.on("close",(()=>r(a||(t?null:s))))}return o;function u(t,e,n,r){t.on("error",r),t.on("close",(function(){if(e&&t._readableState&&!t._readableState.ended)return r(s);if(n&&t._writableState&&!t._writableState.ended)return r(s)}))}function c(t){if(t&&!a){a=t;for(const e of n)e.destroy(t)}}}function ft(t){return!!t._readableState||!!t._writableState}function lt(t){return"number"==typeof t._duplexState&&ft(t)}function ht(t){return function(t){return"object"==typeof t&&null!==t&&"number"==typeof t.byteLength}(t)?t.byteLength:1024}function dt(){}function pt(){this.destroy(new Error("Stream aborted."))}t.exports={pipeline:ct,pipelinePromise:function(...t){return new Promise(((e,n)=>ct(Object.assign({},t),(t=>{if(t)return n(t);e()}))))},isStream:ft,isStreamx:lt,getStreamError:function(t){const e=t._readableState&&t._readableState.error||t._writableState&&t._writableState.error;return e===i?null:e},Stream:it,Writable:class extends it{constructor(t){super(t),this._duplexState|=16385,this._writableState=new X(this,t),t&&(t.writev&&(this._writev=t.writev),t.write&&(this._write=t.write),t.final&&(this._final=t.final),t.eagerOpen&&this._writableState.updateNextTick())}_writev(t,e){e(null)}_write(t,e){this._writableState.autoBatch(t,e)}_final(t){t(null)}static isBackpressured(t){return 0!=(73400334&t._duplexState)}static drained(t){if(t.destroyed)return Promise.resolve(!1);const e=t._writableState,n=e.queue.length+(t._duplexState&R?1:0);return 0===n?Promise.resolve(!0):(null===e.drains&&(e.drains=[]),new Promise((t=>{e.drains.push({writes:n,resolve:t})})))}write(t){return this._writableState.updateNextTick(),this._writableState.push(t)}end(t){return this._writableState.updateNextTick(),this._writableState.end(t),this}},Readable:st,Duplex:ot,Transform:at,PassThrough:class extends at{}}},52479:function(t){t.exports=function e(t,n){if(t&&n)return e(t)(n);if("function"!=typeof t)throw new TypeError("need wrapper function");return Object.keys(t).forEach((function(e){r[e]=t[e]})),r;function r(){for(var e=new Array(arguments.length),n=0;n=0;--i){var s=this.tryEntries[i],o=s.completion;if("root"===s.tryLoc)return r("end");if(s.tryLoc<=this.prev){var a=v.call(s,"catchLoc"),u=v.call(s,"finallyLoc");if(a&&u){if(this.prev=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&v.call(r,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),F(n),R}},"catch":function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;F(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:W(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),R}},n}t.exports=p,t.exports.__esModule=!0,t.exports["default"]=t.exports},20474:function(t,e,n){var r=n(86600),i=n(9759);function s(e){return t.exports=s="function"==typeof r&&"symbol"==typeof i?function(t){return typeof t}:function(t){return t&&"function"==typeof r&&t.constructor===r&&t!==r.prototype?"symbol":typeof t},t.exports.__esModule=!0,t.exports["default"]=t.exports,s(e)}t.exports=s,t.exports.__esModule=!0,t.exports["default"]=t.exports},30222:function(t,e,n){var r=n(5177)();t.exports=r;try{regeneratorRuntime=r}catch(i){"object"==typeof globalThis?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}}},r={};function i(t){var e=r[t];if(e!==undefined)return e.exports;var s=r[t]={exports:{}};return n[t].call(s.exports,s,s.exports,i),s.exports}i.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return i.d(e,{a:e}),e},e=Object.getPrototypeOf?function(t){return Object.getPrototypeOf(t)}:function(t){return t.__proto__},i.t=function(n,r){if(1&r&&(n=this(n)),8&r)return n;if("object"==typeof n&&n){if(4&r&&n.__esModule)return n;if(16&r&&"function"==typeof n.then)return n}var s=Object.create(null);i.r(s);var o={};t=t||[null,e({}),e([]),e(e)];for(var a=2&r&&n;"object"==typeof a&&!~t.indexOf(a);a=e(a))Object.getOwnPropertyNames(a).forEach((function(t){o[t]=function(){return n[t]}}));return o["default"]=function(){return n},i.d(s,o),s},i.d=function(t,e){for(var n in e)i.o(e,n)&&!i.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var s={};return function(){"use strict";i.r(s);var t=i(30382);function e(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,o=!0,a=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return o=t.done,t},e:function(t){a=!0,s=t},f:function(){try{o||null==n["return"]||n["return"]()}finally{if(a)throw s}}}}function Rt(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n1&&arguments[1]!==undefined&&arguments[1];return new(X())((function(r,i){if(n||null!=e.cache[t])try{var s=e.storageObject.transaction("SegmentData","readonly"),o=s.objectStore("SegmentData").index("queyIndex").get(IDBKeyRange.only([t,e.infoId]));o.onsuccess=function(t){r(t.target.result)},o.onerror=function(t){wt(t),i(t)},s.oncomplete=function(){}}catch(a){e.canWrite=!1,i(a)}else r(null)}))})),N(T(e),"deleteSegmentData",(function(t){var n=e.storageObject.transaction("SegmentData","readwrite"),r=n.objectStore("SegmentData").index("queyIndex");return new(X())((function(i,s){var o=r.openCursor(IDBKeyRange.only([t,e.infoId]));o.onsuccess=function(t){null!=t.target.result&&(t.target.result["delete"](),t.target.result["continue"](),i(!0))},o.onerror=function(t){s(t)},n.oncomplete=function(){}}))})),N(T(e),"insertSegmentData",(function(t){var n=arguments.length>1&&arguments[1]!==undefined&&arguments[1];return new(X())((function(r,i){if(null==e.storageObject)return r(!1);if(!n&&!e.canWrite)return r(!1);try{var s=e.storageObject.transaction("SegmentData","readwrite"),o=s.objectStore("SegmentData").put({segmentId:t.segmentId,segmentLen:t.segmentLen,data:t.data,infoId:e.infoId,timestamp:(new Date).getTime()});o.onsuccess=function(t){r(!0)},o.onerror=function(t){wt(t),this.storageObject=null,this.canWrite=!1,i(t)},s.oncomplete=function(){}}catch(a){r(!1)}}))})),e.countErr=0,e.infoId=t||"",e.cleanDB().then((function(){e.setupDB()})),wt("setup new SegmentStorage segment"),e}return E(u,[{key:"setupDB",value:function(){var t=this;if(wt("database setup"),window.indexedDB){var e=indexedDB.open("BLOB",1);e.onerror=function(t){console.error("Database error: ".concat(Tt()(t)))},e.onsuccess=function(e){t.dbReady=!0;var n=e.target.result;t.storageObject=n,n.onclose=function(){t.countErr++,wt("database close"),!n._close_by_destroy&&t.countErr<5&&(t.canWrite=!1,t.dbReady=!1,setTimeout((function(){return t.setupDB()}),0)),t.storageObject._secret_did_close=!0},t.insertSegmentData({segmentId:-1,data:"ok",segmentLen:0},!0).then((function(e){t.queySegmentData(-1,!0).then((function(e){null!=e&&t.startIndexDB()}))}))},e.onupgradeneeded=function(t){t.target.result.createObjectStore("SegmentData",{autoIncrement:!0}).createIndex("queyIndex",["segmentId","infoId"],{unique:!1})}}else wt("setupdb failed",window.indexedDB)}},{key:"cleanDB",value:function(){return new(X())((function(t,e){var n=indexedDB.deleteDatabase("BLOB");n.onsuccess=function(){t()},n.onerror=function(){t()},n.onblocked=function(){t()}}))}},{key:"startIndexDB",value:function(){this.canWrite=!0}},{key:"setSegment",value:function(t){var e=this;this.cache[t.segmentId]={segment:Ot(Ot({},t),{},{segmentLen:t.data.length||t.data.byteLength}),expried:performance.now()+Nt},setTimeout((function(){return e.cleanSegment()}),0)}},{key:"get",value:(o=l(d().mark((function c(){return d().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.cache);case 1:case"end":return t.stop()}}),c,this)}))),function(){return o.apply(this,arguments)})},{key:"getSegment",value:(s=l(d().mark((function f(t){var e,n,r,i,s=this,o=arguments;return d().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:if(e=o.length>1&&o[1]!==undefined&&o[1],n=null,a.prev=2,!e){a.next=7;break}return a.next=6,this.queySegmentData(t);case 6:return a.abrupt("return",a.sent);case 7:a.next=12;break;case 9:a.prev=9,a.t0=a["catch"](2),console.error(a.t0);case 12:if(null!=(r=this.cache[t])){a.next=15;break}return a.abrupt("return",null);case 15:if(r.expried=performance.now()+Nt,n=r.segment.data,null!=r.segment.data){a.next=23;break}return a.next=20,this.getData(t);case 20:null!=(i=a.sent)&&(n=i,r.segment.data=i),setTimeout((function(){return s.cleanSegment()}),0);case 23:if(a.prev=23,null!=r.segment&&null!=r.segment.data){a.next=27;break}return this.removeMemoryCache(t),a.abrupt("return",null);case 27:a.next=33;break;case 29:return a.prev=29,a.t1=a["catch"](23),console.error(a.t1),a.abrupt("return",null);case 33:return a.abrupt("return",Ot(Ot({},r.segment),{},{data:n}));case 34:case"end":return a.stop()}}),f,this,[[2,9],[23,29]])}))),function(t){return s.apply(this,arguments)})},{key:"removeMemoryCache",value:function(t){this.cache[t]&&(this.cache[t].data=null),delete this.cache[t]}},{key:"containSegment",value:(i=l(d().mark((function h(t){return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.cache.has(t));case 1:case"end":return e.stop()}}),h,this)}))),function(t){return i.apply(this,arguments)})},{key:"getData",value:(r=l(d().mark((function p(t){var e,n;return d().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(!(e=this.cache[t])||!e.segment||null==e.segment.data){r.next=3;break}return r.abrupt("return",e.segment.data);case 3:if(this.storageObject){r.next=5;break}return r.abrupt("return",null);case 5:return r.prev=5,r.next=8,this.queySegmentData(t);case 8:return n=r.sent,r.abrupt("return",n&&n.data);case 12:return r.prev=12,r.t0=r["catch"](5),r.abrupt("return",null);case 15:case"end":return r.stop()}}),p,this,[[5,12]])}))),function(t){return r.apply(this,arguments)})},{key:"cleanSegment",value:(n=l(d().mark((function g(t){var e,n,r,i,s,o,a,u,c,f,l,h,p,v,m=this;return d().wrap((function(d){for(;;)switch(d.prev=d.next){case 0:if(e=[],n=[],r=performance.now(),i=$()(this.cache),r-this.lastCheck>12e4)try{this.lastCheck=r,navigator.storage.estimate().then((function(t){var e;if(null!=t){var n=_t()(e=j()(m.cache)).call(e,(function(t,e){return t.expried>e.expried?-1:0})),r=t.quota;if(t.usage/r>.9&&n.length>20)for(var i=0;i<10;i++)if(null!=n[i].segment){var s=n[i].segment.segmentId;null!=m.cache[s]&&delete m.cache[s],m.deleteSegmentData(s)}}}))}catch(g){}s=At(i),d.prev=6,s.s();case 8:if((o=s.n()).done){d.next=15;break}if(null!=(a=o.value).segment&&null!=a.segment.data){d.next=12;break}return d.abrupt("continue",13);case 12:r>=a.expried?e.push(a.segment.segmentId):n.push(a);case 13:d.next=8;break;case 15:d.next=20;break;case 17:d.prev=17,d.t0=d["catch"](6),s.e(d.t0);case 20:return d.prev=20,s.f(),d.finish(20);case 23:if(!((u=n.length-Ut)>0)){d.next=46;break}_t()(n).call(n,(function(t,e){return t.expried-e.expried})),c=At(n),d.prev=27,c.s();case 29:if((f=c.n()).done){d.next=38;break}if(l=f.value,t!==undefined&&t(l.segment.id)){d.next=36;break}if(e.push(l.segment.segmentId),0!=--u){d.next=36;break}return d.abrupt("break",38);case 36:d.next=29;break;case 38:d.next=43;break;case 40:d.prev=40,d.t1=d["catch"](27),c.e(d.t1);case 43:return d.prev=43,c.f(),d.finish(43);case 46:h=0,p=e;case 47:if(!(h0);case 68:case"end":return d.stop()}}),g,this,[[6,17,20,23],[27,40,43,46],[56,61]])}))),function(t){return n.apply(this,arguments)})},{key:"clearSegment",value:(e=l(d().mark((function v(){var t;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(t in wt("remove all segment"),this.cache)this.removeMemoryCache(t);case 2:case"end":return e.stop()}}),v,this)}))),function(){return e.apply(this,arguments)})},{key:"destroy",value:function(){if(null!=this.storageObject)try{this.storageObject._close_by_destroy=!0,this.storageObject.close()}catch(t){}this.storageObject=null,this.dbReady=!1,this.canWrite=!1,this.clearSegment(),this.cleanDB()}}]),u}(M.EventEmitter),Mt=jt,qt=(i(15306),function(){var t=(new Date).getTime(),e="undefined"!=typeof performance&&performance.now&&1e3*performance.now()||0;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(n){var r=16*Math.random();return t>0?(r=(t+r)%16|0,t=Math.floor(t/16)):(r=(e+r)%16|0,e=Math.floor(e/16)),("x"===n?r:3&r|8).toString(16)}))});i(4723),i(47941);function Bt(t,e){var n=(65535&t)+(65535&e);return(t>>16)+(e>>16)+(n>>16)<<16|65535&n}function Ft(t,e,n,r,i,s){return Bt((o=Bt(Bt(e,t),Bt(r,s)))<<(a=i)|o>>>32-a,n);var o,a}function Ht(t,e,n,r,i,s,o){return Ft(e&n|~e&r,t,e,i,s,o)}function Wt(t,e,n,r,i,s,o){return Ft(e&r|n&~r,t,e,i,s,o)}function Gt(t,e,n,r,i,s,o){return Ft(e^n^r,t,e,i,s,o)}function Xt(t,e,n,r,i,s,o){return Ft(n^(e|~r),t,e,i,s,o)}function Yt(t,e){var n,r,i,s,o;t[e>>5]|=128<>>9<<4)]=e;var a=1732584193,u=-271733879,c=-1732584194,f=271733878;for(n=0;n>5]>>>e%32&255);return n}function Vt(t){var e,n=[];for(n[(t.length>>2)-1]=undefined,e=0;e>5]|=(255&t.charCodeAt(e/8))<>>4&15)+r.charAt(15&e);return i}function zt(t){return unescape(encodeURIComponent(t))}function Kt(t){return function(t){return $t(Yt(Vt(t),8*t.length))}(zt(t))}function Jt(t,e){return function(t,e){var n,r,i=Vt(t),s=[],o=[];for(s[15]=o[15]=undefined,i.length>16&&(i=Yt(i,8*t.length)),n=0;n<16;n+=1)s[n]=909522486^i[n],o[n]=1549556828^i[n];return r=Yt(g()(s).call(s,Vt(e)),512+8*e.length),$t(Yt(g()(o).call(o,r),640))}(zt(t),zt(e))}function Zt(t,e,n){return e?n?Jt(e,t):Qt(Jt(e,t)):n?Kt(t):Qt(Kt(t))}for(var te=i(76986),ee=i(82590),ne=i(47273),re=i(58118),ie=(i(9653),i(18264),i(44399)),se=i(81237),oe=i(54375),ae=i(32114),ue="0123456789abcdef",ce=[],fe=[],le=0;le<256;le++)ce[le]=ue[le>>4&15]+ue[15&le],le<16&&(le<10?fe[48+le]=le:fe[87+le]=le);for(var he=function(t){for(var e=t.length,n="",r=0;r>1,n=e<<1,r=new Uint8Array(e),i=0,s=0;s>4]+ue[15&e];return n},_e=function(t){var e=de(t);if(e.length<=65536)return String.fromCharCode.apply(String,u(e));for(var n="",r=0;rIe?(this._debug("start backpressure: bufferedAmount %d",this._channel.bufferedAmount),this._cb=e):e(null)}else this._debug("write before connect"),this._chunk=t,this._cb=e}},{key:"_onFinish",value:function(){var t=this;if(!this.destroyed){var e=function(){setTimeout((function(){return t.__destroy()}),1e3)};this._connected?e():this.once("connect",e)}}},{key:"_startIceCompleteTimeout",value:function(){var t=this;this.destroyed||this._iceCompleteTimer||(this._debug("started iceComplete timeout"),this._iceCompleteTimer=setTimeout((function(){if(t.countCandidate>=2&&!t._iceComplete)return t._debug("createOffer ccc"),t._iceComplete=!0,void t.emit("_iceComplete");t._iceComplete||(t._iceComplete=!0,t._debug("iceComplete timeout completed"),t.emit("iceTimeout"),t.emit("_iceComplete"))}),this.iceCompleteTimeout))}},{key:"_createOffer",value:function(){var t=this;this.destroyed||this._pc.createOffer(this.offerOptions).then((function(e){if(!t.destroyed){t.trickle||t.allowHalfTrickle||(e.sdp=Ae(e.sdp)),e.sdp=t.sdpTransform(e.sdp);var n=function(){if(t.countCandidate=0,t._debug("createOffer sendOffer",t.destroyed),!t.destroyed){var n=t._pc&&t._pc.localDescription||e;t._debug("signal"),t.emit("signal",{type:n.type,sdp:n.sdp})}};t._pc.setLocalDescription(e).then((function(){t._debug("createOffer success"),t.destroyed||(t.trickle||t._iceComplete?n():t.once("_iceComplete",n))}))["catch"]((function(e){t.__destroy(ae(e,"ERR_SET_LOCAL_DESCRIPTION"))}))}}))["catch"]((function(e){t.__destroy(ae(e,"ERR_CREATE_OFFER"))}))}},{key:"_createAnswer",value:function(){var t=this;this.destroyed||this._pc.createAnswer(this.answerOptions).then((function(e){if(!t.destroyed){t.trickle||t.allowHalfTrickle||(e.sdp=Ae(e.sdp)),e.sdp=t.sdpTransform(e.sdp);var n=function(){var n;if(!t.destroyed){var r=t._pc&&t._pc.localDescription||e;t._debug("signal"),t.emit("signal",{type:r.type,sdp:r.sdp}),t.initiator||null===(n=t._requestMissingTransceivers)||void 0===n||n.call(t)}};t._pc.setLocalDescription(e).then((function(){t.destroyed||(t.trickle||t._iceComplete?n():t.once("_iceComplete",n))}))["catch"]((function(e){t.__destroy(ae(e,"ERR_SET_LOCAL_DESCRIPTION"))}))}}))["catch"]((function(e){t.__destroy(ae(e,"ERR_CREATE_ANSWER"))}))}},{key:"_onConnectionStateChange",value:function(){this.destroyed||this._destroying||"failed"===this._pc.connectionState&&this.__destroy(ae(new Error("Connection failed."),"ERR_CONNECTION_FAILURE"))}},{key:"_onIceStateChange",value:function(){if(!this.destroyed){var t=this._pc.iceConnectionState,e=this._pc.iceGatheringState;this._debug("iceStateChange (connection: %s) (gathering: %s)",t,e),this.emit("iceStateChange",t,e),"connected"!==t&&"completed"!==t||(this._pcReady=!0,this._maybeReady()),"failed"===t&&this.__destroy(ae(new Error("Ice connection failed."),"ERR_ICE_CONNECTION_FAILURE")),"closed"===t&&this.__destroy(ae(new Error("Ice connection closed."),"ERR_ICE_CONNECTION_CLOSED"))}}},{key:"getStats",value:function(t){var e=this,n=function(t){return"[object Array]"===Object.prototype.toString.call(ne(t))&&ne(t).forEach((function(e){te(t,e)})),t};0===this._pc.getStats.length||this._isReactNativeWebrtc?this._pc.getStats().then((function(e){var r=[];e.forEach((function(t){r.push(n(t))})),t(null,r)}),(function(e){return t(e)})):this._pc.getStats.length>0?this._pc.getStats((function(r){if(!e.destroyed){var i=[];r.result().forEach((function(t){var e={};t.names().forEach((function(n){e[n]=t.stat(n)})),e.id=t.id,e.type=t.type,e.timestamp=t.timestamp,i.push(n(e))})),t(null,i)}}),(function(e){return t(e)})):t(null,[])}},{key:"_maybeReady",value:function(){var t=this;if(this._debug("maybeReady pc %s channel %s",this._pcReady,this._channelReady),!this._connected&&!this._connecting&&this._pcReady&&this._channelReady){this._connecting=!0;!function e(){t.destroyed||t._destroying||t.getStats((function(n,r){if(!t.destroyed&&!t._destroying){n&&(r=[]);var i={},s={},o={},a=!1;r.forEach((function(t){"remotecandidate"!==t.type&&"remote-candidate"!==t.type||(i[t.id]=t),"localcandidate"!==t.type&&"local-candidate"!==t.type||(s[t.id]=t),"candidatepair"!==t.type&&"candidate-pair"!==t.type||(o[t.id]=t)}));var u=function(e){a=!0;var n,r=s[e.localCandidateId];(r&&(r.ip||r.address)?(t.localAddress=r.ip||r.address,t.localPort=Number(r.port)):r&&r.ipAddress?(t.localAddress=r.ipAddress,t.localPort=Number(r.portNumber)):"string"==typeof e.googLocalAddress&&(r=e.googLocalAddress.split(":"),t.localAddress=r[0],t.localPort=Number(r[1])),t.localAddress)&&(t.localFamily=re(n=t.localAddress).call(n,":")?"IPv6":"IPv4");var o,u=i[e.remoteCandidateId];(u&&(u.ip||u.address)?(t.remoteAddress=u.ip||u.address,t.remotePort=Number(u.port)):u&&u.ipAddress?(t.remoteAddress=u.ipAddress,t.remotePort=Number(u.portNumber)):"string"==typeof e.googRemoteAddress&&(u=e.googRemoteAddress.split(":"),t.remoteAddress=u[0],t.remotePort=Number(u[1])),t.remoteAddress)&&(t.remoteFamily=re(o=t.remoteAddress).call(o,":")?"IPv6":"IPv4");t._debug("connect local: %s:%s remote: %s:%s",t.localAddress,t.localPort,t.remoteAddress,t.remotePort)};if(r.forEach((function(t){"transport"===t.type&&t.selectedCandidatePairId&&u(o[t.selectedCandidatePairId]),("googCandidatePair"===t.type&&"true"===t.googActiveConnection||("candidatepair"===t.type||"candidate-pair"===t.type)&&t.selected)&&u(t)})),a||U(o).length&&!U(s).length){if(t._connecting=!1,t._connected=!0,t._chunk){try{t.send(t._chunk)}catch(n){return t.__destroy(ae(n,"ERR_DATA_CHANNEL"))}t._chunk=null,t._debug('sent chunk from "write before connect"');var c=t._cb;t._cb=null,c(null)}"number"!=typeof t._channel.bufferedAmountLowThreshold&&(t._interval=setInterval((function(){return t._onInterval()}),150),t._interval.unref&&t._interval.unref()),t._debug("connect"),t.emit("connect")}else setTimeout(e,100)}}))}()}}},{key:"_onInterval",value:function(){!this._cb||!this._channel||this._channel.bufferedAmount>Ie||this._onChannelBufferedAmountLow()}},{key:"_onSignalingStateChange",value:function(){var t=this;this.destroyed||("stable"===this._pc.signalingState&&(this._isNegotiating=!1,this._debug("flushing sender queue",this._sendersAwaitingStable),this._sendersAwaitingStable.forEach((function(e){t._pc.removeTrack(e),t._queuedNegotiation=!0})),this._sendersAwaitingStable=[],this._queuedNegotiation?(this._debug("flushing negotiation queue"),this._queuedNegotiation=!1,this._needsNegotiation()):(this._debug("negotiated"),this.emit("negotiated"))),this._debug("signalingStateChange %s",this._pc.signalingState),this.emit("signalingStateChange",this._pc.signalingState))}},{key:"_onIceCandidate",value:function(t){this.destroyed||(t.candidate&&this.trickle?this.emit("signal",{type:"candidate",candidate:{candidate:t.candidate.candidate,sdpMLineIndex:t.candidate.sdpMLineIndex,sdpMid:t.candidate.sdpMid}}):t.candidate||this._iceComplete||(this._iceComplete=!0,this.emit("_iceComplete")),t.candidate&&(this.countCandidate=(this.countCandidate||0)+1,this._debug("create offer",this.countCandidate),this._startIceCompleteTimeout()))}},{key:"_onChannelMessage",value:function(t){if(!this.destroyed){var e=t.data;e instanceof ArrayBuffer?e=new Uint8Array(e):!1===this.__objectMode&&(e=we(e)),this.push(e)}}},{key:"_onChannelBufferedAmountLow",value:function(){if(!this.destroyed&&this._cb){this._debug("ending backpressure: bufferedAmount %d",this._channel.bufferedAmount);var t=this._cb;this._cb=null,t(null)}}},{key:"_onChannelOpen",value:function(){this._connected||this.destroyed||(this._debug("on channel open"),this._channelReady=!0,this._maybeReady())}},{key:"_onChannelClose",value:function(){this.destroyed||(this._debug("on channel close"),this.__destroy())}},{key:"_debug",value:function(){var t,e=H([]).call(arguments);(e[0]="["+this._id+"] "+e[0],window&&window.debugPPP)&&(t=console).log.apply(t,u(e))}}]),n}(se.Duplex);Re.WEBRTC_SUPPORT=!!ie(),Re.config={iceServers:[{urls:["stun:stun.l.google.com:19302","stun:global.stun.twilio.com:3478"]}],sdpSemantics:"unified-plan"},Re.channelConfig={};var ke=Re;function Oe(t,e){var n=j()(t);if(K()){var r=K()(t);e&&(r=bt()(r).call(r,(function(e){return Z()(t,e).enumerable}))),n.push.apply(n,r)}return n}function Ce(t){for(var e=1;e0){var e=He[He.length-1];if("metric"==e.type&&e.metric&&"start"!=e.metric.type&&"metric"==t.type)return He[He.length-1]=t,void Ve()}("metric"==t.type&&t.metric&&t.metric.total_peers>0||"metric"!=t.type)&&(He.push(t),Ve())}catch(n){}},Ve=function(){try{null==Le&&(Le=setTimeout((function(){Le=null,He.length>20&&dt()(He).call(He,0,1);var t=Tt()(He);localStorage.setItem("batch-log",t)}),1e4))}catch(t){}We()},Qe=function(){try{localStorage.removeItem("batch-log")}catch(t){}},ze=function(){try{var t=localStorage.getItem("batch-log");if(null==t)return;var e=JSON.parse(t);Qe(),Ke(e)}catch(n){}},Ke=function(t){if(!(t.length<=0)){var e=new XMLHttpRequest;e.open("POST","https://a.webseeds.pm/metrics",!0),e.setRequestHeader("Content-Type","application/json"),e.setRequestHeader("X-Ss-Id",Zt(qe+"[$VC%]P@0#S~B2iojW^^DCgQ@yMPfkAn")),e.setRequestHeader("X-Client-Id",qe),e.setRequestHeader("X-App-Id","APP_001"),e.onreadystatechange=function(){4===e.readyState&&e.status};var n=Tt()(t);e.send(n)}};function Je(t){var e=function(){if("undefined"==typeof Reflect||!m())return!1;if(m().sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(m()(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=L(t);if(e){var i=L(this).constructor;n=m()(r,arguments,i)}else n=r.apply(this,arguments);return C(this,n)}}var Ze=window.PPP&&window.PPP.HTTP_LIMIT_PROGESS||1,tn=window.PPP&&window.PPP.HTTP_TIMEOUT||5e4,en=function(t){O(r,t);var e,n=Je(r);function r(t){var e;return y(this,r),N(T(e=n.call(this)),"id",qt()),N(T(e),"storage",void 0),N(T(e),"xhrRequests",{}),N(T(e),"requiredSegments",[]),N(T(e),"timerCheckSegment",void 0),N(T(e),"supportRange",!0),e.storage=t||new Mt,e}return E(r,[{key:"countDownloading",value:function(){return this.requiredSegments.length}},{key:"download",value:function(t){var e,n;return Q()(e=this.requiredSegments).call(e,(function(e){return e.segmentId==t.segmentId}))>=0||("force"!=t.status?(t.status="init",t.expried=performance.now()+tn,this.requiredSegments.push(t),this.requiredSegments=_t()(n=this.requiredSegments).call(n,(function(t,e){return t.priority0&&s.data.length>0&&i.length+s.data.length==s.segmentSize){var o=new Uint8Array(s.segmentSize);o.set(s.data,0),o.set(i,s.data.length),i=o}this.processRequireSegment(),this.emit("complete",{segmentId:t.segmentId,data:i})}catch(a){wt("segmentDownloadFinished",t.segmentId,a)}}},{key:"registEvent",value:function(t,e,n){var r=this,i=0,s=!1;t.addEventListener("progress",(function(t){var e=t.loaded-i;r.emit("bytes-downloaded",e),i=t.loaded})),t.addEventListener("load",(function(i){if(t.status<200||t.status>=300){try{if(e.errorCount=(e.errorCount||0)+1,416==t.status&&(r.supportRange=!1),(406==t.status||416==t.status)&&1==e.errorCount)return e.status="init",e.expried=performance.now()+tn,e.partData=null,e.range=null,void setTimeout((function(){return r.processRequireSegment()}),0)}catch(a){}try{if(s)return;s=!0,$e(Ye(t.status,t.statusText,n))}catch(a){}return wt("loaded cancel ",e.segmentId,t.status),void r.segmentFailure(e,i,t)}var o=t.response;r.segmentDownloadFinished(e,o,t)})),t.addEventListener("error",(function(i){if(!s){s=!0;try{$e(Ye("ERR_UNKNOW","Ajax request error",n))}catch(o){}wt("http download error ",i),r.segmentFailure(e,i,t)}})),t.addEventListener("timeout",(function(i){if(!s){s=!0,wt("http download timeout ",i);try{$e(Ye("ERR_TIMEOUT","request timeout",n))}catch(o){}r.segmentFailure(e,i,t,"timeout")}}))}},{key:"processRequireSegment",value:(e=l(d().mark((function i(){var t,e,n,r,s,o,a,u,c,f,l,h;return d().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:t=0==Ze?100:Ze,e=performance.now(),n=[],r=[],i.t0=Pt()(d()).call(d(),this.requiredSegments);case 5:if((i.t1=i.t0()).done){i.next=31;break}if(s=i.t1.value,!((o=this.requiredSegments[s]).expriedt)){i.next=16;break}return i.abrupt("continue",5);case 16:return i.prev=16,i.next=19,this.storage.getSegment(o.segmentId);case 19:if(null==(a=i.sent)||null==a.data){i.next=24;break}return this.emit("complete",{p2p:!0,segmentId:o.segmentId,data:a.data}),r.push(o.segmentId),i.abrupt("continue",5);case 24:i.next=28;break;case 26:i.prev=26,i.t2=i["catch"](16);case 28:this._downloadSegment(o),i.next=5;break;case 31:if(n.length>0)for(u=0;u0)for(u=0;u0){var r=t.partData.data.length;if(r>0){t.partData;var i="bytes="+r+"-";n.setRequestHeader("Range",i)}}this.registEvent(n,t,e),this.xhrRequests[t.segmentId]={xhr:n,segment:t},n.send()}},{key:"abort",value:function(t){var e,n=this.xhrRequests[t];n&&(n.xhr.abort(),delete this.xhrRequests[t]);var r,i=bt()(e=this.requiredSegments).call(e,(function(e){return e.segmentId==t}));i.length>0&&(i[0].status="cancel",this.requiredSegments=bt()(r=this.requiredSegments).call(r,(function(e){return e.segmentId!=t})))}},{key:"destroy",value:function(){for(var t=0,e=$()(this.xhrRequests);t0||this.xhrRequests.hasOwnProperty(t)}},{key:"isRequiredDownloading",value:function(){for(var t in this.requiredSegments){var e=this.requiredSegments[t];if("processing"==e.status&&e.required)return!0}return!1}},{key:"hasDownloading",value:function(){return this.requiredSegments.length>0}}]),r}(q()),nn=en;function rn(t,e){var n=void 0!==ct()&<()(t)||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){var n;if(!t)return;if("string"==typeof t)return sn(t,e);var r=W()(n=Object.prototype.toString.call(t)).call(n,8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return at()(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return sn(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,o=!0,a=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return o=t.done,t},e:function(t){a=!0,s=t},f:function(){try{o||null==n["return"]||n["return"]()}finally{if(a)throw s}}}}function sn(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n=10&&r.emit("close",r.peer.id))}),dn),r.countDownload>20&&r.peer&&(r.isConnected=!1,r.countDownload=0,r.emit("close",r.peer.id))})),r.peer=t,r.id=t.id,r.registPeer(),r}return E(n,[{key:"destroy",value:function(){if(!this.isClose){this.isConnected=!1;try{this.isClose=!0,this.removeAllListeners(),null!=this.intervalPing&&clearInterval(this.intervalPing),null!=this.timeoutPing&&clearTimeout(this.timeoutPing)}catch(t){}try{this.peer.destroy()}catch(t){}this.peer=null,this.segments.length=0}}},{key:"registPeer",value:function(){this.peer.on("connect",this.onPeerConnect.bind(this)),this.peer.on("close",this.onPeerClose.bind(this)),this.peer.on("error",this.onPeerError.bind(this)),this.peer.on("data",this.onPeerData.bind(this))}},{key:"getDelayResponseTime",value:function(){return null==currentPingId?startPingTime:(new Date).getTime()-startPingTime}},{key:"handleAbortSegment",value:function(t){var e=It.lW.from(t.subarray(3)).readUInt32LE(0);this.emit("abort-download",this,e)}},{key:"handleDownloadPieceAnwser",value:function(t){this.countDownload>-10&&(this.countDownload=this.countDownload-1),null!=this.timeoutPing&&(clearTimeout(this.timeoutPing),this.timeoutPing=null);var e=It.lW.from(t.subarray(3)),n=1==e.readUInt8(0),r=e.readInt32LE(1),i=e.readInt32LE(5),s=null;n&&(s=t.subarray(12)),this.emit("piece-data",this,{success:n,segmentId:r,pieceId:i,data:s})}},{key:"handleRequestDownloadPiece",value:function(t){wt("handleRequestDownloadPiece"),this.countDownload>-10&&(this.countDownload=this.countDownload-2);var e=It.lW.from(t.subarray(3)),n=e.readInt32LE(0);if(e.length>8){var r=4,i=[];try{for(;r5&&(this.timeoutCount=5),this.timeoutCount>0&&(this.timeoutCount-=1,this.pingRate=hn);var n=new Date;this.responseDelay=n.getTime()-this.startPingTime,this.currentPingId=null,wt("[",e,"] ping done ",this.responseDelay),null!=this.timeoutPing&&clearTimeout(this.timeoutPing),this.emit("ping",this.responseDelay),this.timeoutCount<=0&&(this.pingRate=ln,this.isConnected||(this.isConnected=!0,this.emit("connected",this.peer.id)))}}}},{key:"handlePing",value:function(t){var e=function(t){var e=It.lW.isBuffer(t)?t:It.lW.from(t,"utf-8"),n=on(3),r=n.writeUInt8(10,0);return r=n.writeUInt8(245,r),r=n.writeUInt8(112,r),g()(It.lW).call(It.lW,[n,e])}(t.subarray(3));this.write(e)}},{key:"write",value:function(t){this.isClose||null!=this.peer&&this.peer.write(t)}},{key:"writePieceData",value:function(t){this.isClose||(null!=this.timeoutPing&&(clearTimeout(this.timeoutPing),this.timeoutPing=null),null!=this.peer&&this.peer.write(t))}}]),n}(q()),gn=i(18492),vn=i(12265);function mn(t){var e=function(){if("undefined"==typeof Reflect||!v)return!1;if(v.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(v(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=L(t);if(e){var i=L(this).constructor;n=v(r,arguments,i)}else n=r.apply(this,arguments);return C(this,n)}}var yn=function(t){O(n,t);var e=mn(n);function n(){var t,r=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};return y(this,n),(t=e.call(this,r))._pc?(t.streams=r.streams||(r.stream?[r.stream]:[]),t._senderMap=new gn,t.streams&&t.streams.forEach((function(e){t.addStream(e)})),t._pc.ontrack=function(e){t._onTrack(e)},t):C(t)}return E(n,[{key:"addTransceiver",value:function(t,e){if(!this._destroying){if(this.destroyed)throw ae(new Error("cannot addTransceiver after peer is destroyed"),"ERR_DESTROYED");if(this._debug("addTransceiver()"),this.initiator)try{this._pc.addTransceiver(t,e),this._needsNegotiation()}catch(n){this.__destroy(ae(n,"ERR_ADD_TRANSCEIVER"))}else this.emit("signal",{type:"transceiverRequest",transceiverRequest:{kind:t,init:e}})}}},{key:"addStream",value:function(t){var e=this;if(!this._destroying){if(this.destroyed)throw ae(new Error("cannot addStream after peer is destroyed"),"ERR_DESTROYED");this._debug("addStream()"),t.getTracks().forEach((function(n){e.addTrack(n,t)}))}}},{key:"addTrack",value:function(t,e){if(!this._destroying){if(this.destroyed)throw ae(new Error("cannot addTrack after peer is destroyed"),"ERR_DESTROYED");this._debug("addTrack()");var n=this._senderMap.get(t)||new gn,r=n.get(e);if(r)throw r.removed?ae(new Error("Track has been removed. You should enable/disable tracks that you want to re-add."),"ERR_SENDER_REMOVED"):ae(new Error("Track has already been added to that stream."),"ERR_SENDER_ALREADY_ADDED");r=this._pc.addTrack(t,e),n.set(e,r),this._senderMap.set(t,n),this._needsNegotiation()}}},{key:"replaceTrack",value:function(t,e,n){if(!this._destroying){if(this.destroyed)throw ae(new Error("cannot replaceTrack after peer is destroyed"),"ERR_DESTROYED");this._debug("replaceTrack()");var r=this._senderMap.get(t),i=r?r.get(n):null;if(!i)throw ae(new Error("Cannot replace track that was never added."),"ERR_TRACK_NOT_ADDED");e&&this._senderMap.set(e,r),null!=i.replaceTrack?i.replaceTrack(e):this.__destroy(ae(new Error("replaceTrack is not supported in this browser"),"ERR_UNSUPPORTED_REPLACETRACK"))}}},{key:"removeTrack",value:function(t,e){if(!this._destroying){if(this.destroyed)throw ae(new Error("cannot removeTrack after peer is destroyed"),"ERR_DESTROYED");this._debug("removeSender()");var n=this._senderMap.get(t),r=n?n.get(e):null;if(!r)throw ae(new Error("Cannot remove track that was never added."),"ERR_TRACK_NOT_ADDED");try{r.removed=!0,this._pc.removeTrack(r)}catch(i){"NS_ERROR_UNEXPECTED"===i.name?this._sendersAwaitingStable.push(r):this.__destroy(ae(i,"ERR_REMOVE_TRACK"))}this._needsNegotiation()}}},{key:"removeStream",value:function(t){var e=this;if(!this._destroying){if(this.destroyed)throw ae(new Error("cannot removeStream after peer is destroyed"),"ERR_DESTROYED");this._debug("removeSenders()"),t.getTracks().forEach((function(n){e.removeTrack(n,t)}))}}},{key:"_requestMissingTransceivers",value:function(){var t=this;this._pc.getTransceivers&&this._pc.getTransceivers().forEach((function(e){e.mid||!e.sender.track||e.requested||(e.requested=!0,t.addTransceiver(e.sender.track.kind))}))}},{key:"_onTrack",value:function(t){var e=this;this.destroyed||t.streams.forEach((function(n){e._debug("on track"),e.emit("track",t.track,n),e._remoteTracks.push({track:t.track,stream:n}),e._remoteStreams.some((function(t){return t.id===n.id}))||(e._remoteStreams.push(n),vn((function(){e._debug("on stream"),e.emit("stream",n)})))}))}}]),n}(ke),bn=yn,wn=i(30778),xn=i(54595),_n=i(8411),Sn=i.t(_n,2);var Pn=Object.assign({DEFAULT_ANNOUNCE_PEERS:50,MAX_ANNOUNCE_PEERS:82,parseUrl:t=>{const e=new URL(t.replace(/^udp:/,"http:"));return t.match(/^udp:/)&&Object.defineProperties(e,{href:{value:e.href.replace(/^http/,"udp")},protocol:{value:e.protocol.replace(/^http/,"udp")},origin:{value:e.origin.replace(/^http/,"udp")}}),e}},Sn),En=i(71857),Tn=i(80159),In=i(16313),An=i(39356);const Rn="function"!=typeof An?WebSocket:An;class kn extends se.Duplex{constructor(t={}){if("string"==typeof t&&(t={url:t}),super(t=Object.assign({allowHalfOpen:!1},t)),this.__objectMode=!!t.objectMode,null!=t.objectMode&&delete t.objectMode,null==t.url&&null==t.socket)throw new Error("Missing required `url` or `socket` option");if(null!=t.url&&null!=t.socket)throw new Error("Must specify either `url` or `socket` option, not both");if(this._id=he(Ee(4)).slice(0,7),this._debug("new websocket: %o",t),this.connected=!1,this._chunk=null,this._cb=null,this._interval=null,t.socket)this.url=t.socket.url,this._ws=t.socket,this.connected=t.socket.readyState===Rn.OPEN;else{this.url=t.url;try{this._ws="function"==typeof An?new Rn(t.url,Object.assign(t,{encoding:undefined})):new Rn(t.url)}catch(e){return void oe((()=>this.destroy(e)))}}this._ws.binaryType="arraybuffer",t.socket&&this.connected?oe((()=>this._handleOpen())):this._ws.onopen=()=>this._handleOpen(),this._ws.onmessage=t=>this._handleMessage(t),this._ws.onclose=()=>this._handleClose(),this._ws.onerror=t=>this._handleError(t),this._handleFinishBound=()=>this._handleFinish(),this.once("finish",this._handleFinishBound)}send(t){this._ws.send(t)}_final(t){this._readableState.ended||this.push(null),t(null)}_destroy(t){if(!this.destroyed){if(this._writableState.ended||this.end(),this.connected=!1,clearInterval(this._interval),this._interval=null,this._chunk=null,this._cb=null,this._handleFinishBound&&this.removeListener("finish",this._handleFinishBound),this._handleFinishBound=null,this._ws){const t=this._ws,n=()=>{t.onclose=null};if(t.readyState===Rn.CLOSED)n();else try{t.onclose=n,t.close()}catch(e){n()}t.onopen=null,t.onmessage=null,t.onerror=()=>{}}this._ws=null,t()}}_write(t,e){if(this.destroyed)return e(new Error("cannot write after socket is destroyed"));if(this.connected){try{this.send(t)}catch(n){return this.destroy(n)}"function"!=typeof An&&this._ws.bufferedAmount>65536?(this._debug("start backpressure: bufferedAmount %d",this._ws.bufferedAmount),this._cb=e):e(null)}else this._debug("write before connect"),this._chunk=t,this._cb=e}_handleOpen(){if(!this.connected&&!this.destroyed){if(this.connected=!0,this._chunk){try{this.send(this._chunk)}catch(t){return this.destroy(t)}this._chunk=null,this._debug('sent chunk from "write before connect"');const e=this._cb;this._cb=null,e(null)}"function"!=typeof An&&(this._interval=setInterval((()=>this._onInterval()),150),this._interval.unref&&this._interval.unref()),this._debug("connect"),this.emit("connect")}}_handleMessage(t){if(this.destroyed)return;let e=t.data;e instanceof ArrayBuffer&&(e=new Uint8Array(e)),!1===this.__objectMode&&(e=we(e)),this.push(e)}_handleClose(){this.destroyed||(this._debug("on close"),this.destroy())}_handleError(t){this.destroy(new Error(`Error connecting to ${this.url}`))}_handleFinish(){if(this.destroyed)return;const t=()=>{setTimeout((()=>this.destroy()),1e3)};this.connected?t():this.once("connect",t)}_onInterval(){if(!this._cb||!this._ws||this._ws.bufferedAmount>65536)return;this._debug("ending backpressure: bufferedAmount %d",this._ws.bufferedAmount);const t=this._cb;this._cb=null,t(null)}_debug(){const t=[].slice.call(arguments);t[0]="["+this._id+"] "+t[0]}}kn.WEBSOCKET_SUPPORT=!!Rn;var On=i(49354);var Cn=class extends M{constructor(t,e){super(),this.client=t,this.announceUrl=e,this.interval=null,this.destroyed=!1}setInterval(t){null==t&&(t=this.DEFAULT_ANNOUNCE_INTERVAL),clearInterval(this.interval),t&&(this.interval=setInterval((()=>{this.announce(this.client._defaultAnnounceOpts())}),t),this.interval.unref&&this.interval.unref())}};const Dn={};class Ln extends Cn{constructor(t,e){super(t,e),this.peers={},this.socket=null,this.reconnecting=!1,this.retries=0,this.reconnectTimer=null,this.expectingResponse=!1,this._openSocket()}announce(t){if(this.destroyed||this.reconnecting)return;if(!this.socket.connected)return void this.socket.once("connect",(()=>{this.announce(t)}));const e=Object.assign({},t,{action:"announce",info_hash:this.client._infoHashBinary,peer_id:this.client._peerIdBinary});if(this._trackerId&&(e.trackerid=this._trackerId),"stopped"===t.event||"completed"===t.event)this._send(e);else{const n=Math.min(t.numwant,5);this._generateOffers(n,(t=>{e.numwant=n,e.offers=t,this._send(e)}))}}scrape(t){if(this.destroyed||this.reconnecting)return;if(!this.socket.connected)return void this.socket.once("connect",(()=>{this.scrape(t)}));const e={action:"scrape",info_hash:Array.isArray(t.infoHash)&&t.infoHash.length>0?t.infoHash.map((t=>_e(t))):t.infoHash&&_e(t.infoHash)||this.client._infoHashBinary};this._send(e)}destroy(t=Nn){if(this.destroyed)return t(null);this.destroyed=!0,clearInterval(this.interval),clearTimeout(this.reconnectTimer);for(const i in this.peers){const t=this.peers[i];clearTimeout(t.trackerTimeout),t.destroy()}if(this.peers=null,this.socket&&(this.socket.removeListener("connect",this._onSocketConnectBound),this.socket.removeListener("data",this._onSocketDataBound),this.socket.removeListener("close",this._onSocketCloseBound),this.socket.removeListener("error",this._onSocketErrorBound),this.socket=null),this._onSocketConnectBound=null,this._onSocketErrorBound=null,this._onSocketDataBound=null,this._onSocketCloseBound=null,Dn[this.announceUrl]&&(Dn[this.announceUrl].consumers-=1),Dn[this.announceUrl].consumers>0)return t();let e,n=Dn[this.announceUrl];if(delete Dn[this.announceUrl],n.on("error",Nn),n.once("close",t),!this.expectingResponse)return r();function r(){e&&(clearTimeout(e),e=null),n.removeListener("data",r),n.destroy(),n=null}e=setTimeout(r,Pn.DESTROY_TIMEOUT),n.once("data",r)}_openSocket(){if(this.destroyed=!1,this.peers||(this.peers={}),this._onSocketConnectBound=()=>{this._onSocketConnect()},this._onSocketErrorBound=t=>{this._onSocketError(t)},this._onSocketDataBound=t=>{this._onSocketData(t)},this._onSocketCloseBound=()=>{this._onSocketClose()},this.socket=Dn[this.announceUrl],this.socket)Dn[this.announceUrl].consumers+=1,this.socket.connected&&this._onSocketConnectBound();else{const t=new URL(this.announceUrl);let e;this.client._proxyOpts&&(e="wss:"===t.protocol?this.client._proxyOpts.httpsAgent:this.client._proxyOpts.httpAgent,!e&&this.client._proxyOpts.socksProxy&&(e=new On.Agent(In(this.client._proxyOpts.socksProxy),"wss:"===t.protocol))),this.socket=Dn[this.announceUrl]=new kn({url:this.announceUrl,agent:e}),this.socket.consumers=1,this.socket.once("connect",this._onSocketConnectBound)}this.socket.on("data",this._onSocketDataBound),this.socket.once("close",this._onSocketCloseBound),this.socket.once("error",this._onSocketErrorBound)}_onSocketConnect(){this.destroyed||this.reconnecting&&(this.reconnecting=!1,this.retries=0,this.announce(this.client._defaultAnnounceOpts()))}_onSocketData(t){if(!this.destroyed){this.expectingResponse=!1;try{t=JSON.parse(ye(t))}catch(e){return void this.client.emit("warning",new Error("Invalid tracker response"))}"announce"===t.action?this._onAnnounceResponse(t):"scrape"===t.action?this._onScrapeResponse(t):this._onSocketError(new Error(`invalid action in WS response: ${t.action}`))}}_onAnnounceResponse(t){if(t.info_hash!==this.client._infoHashBinary)return this.announceUrl,xe(t.info_hash),void this.client.infoHash;if(t.peer_id&&t.peer_id===this.client._peerIdBinary)return;JSON.stringify(t),this.announceUrl,this.client.infoHash;const e=t["failure reason"];if(e)return this.client.emit("warning",new Error(e));const n=t["warning message"];n&&this.client.emit("warning",new Error(n));const r=t.interval||t["min interval"];r&&this.setInterval(1e3*r);const i=t["tracker id"];if(i&&(this._trackerId=i),null!=t.complete){const e=Object.assign({},t,{announce:this.announceUrl,infoHash:xe(t.info_hash)});this.client.emit("update",e)}let s;if((!t.peer_id||(s=this.client.getPeer&&this.client.getPeer(xe(t.peer_id)),null==s))&&(window&&window.debugPPP&&console.log("create peer ",t&&t.peer_id),t.offer&&t.peer_id&&(s=this._createPeer(),s.id=xe(t.peer_id),s.once("signal",(e=>{const n={action:"announce",info_hash:this.client._infoHashBinary,peer_id:this.client._peerIdBinary,to_peer_id:t.peer_id,answer:e,offer_id:t.offer_id};this._trackerId&&(n.trackerid=this._trackerId),this._send(n)})),this.client.emit("peer",s),s.signal(t.offer)),t.answer&&t.peer_id)){const e=xe(t.offer_id);s=this.peers[e],s?(s.id=xe(t.peer_id),this.client.emit("peer",s),s.signal(t.answer),clearTimeout(s.trackerTimeout),s.trackerTimeout=null,delete this.peers[e]):JSON.stringify(t.answer)}}_onScrapeResponse(t){t=t.files||{};const e=Object.keys(t);0!==e.length?e.forEach((e=>{const n=Object.assign(t[e],{announce:this.announceUrl,infoHash:xe(e)});this.client.emit("scrape",n)})):this.client.emit("warning",new Error("invalid scrape response"))}_onSocketClose(){this.destroyed||(this.destroy(),this._startReconnectTimer())}_onSocketError(t){this.destroyed||(this.destroy(),this.client.emit("warning",t),this._startReconnectTimer())}_startReconnectTimer(){this.reconnecting=!0,clearTimeout(this.reconnectTimer),this.reconnectTimer=setTimeout((()=>{this.retries++,this._openSocket()}),5e3),this.reconnectTimer.unref&&this.reconnectTimer.unref()}waitForConnection(t,e){try{if(1===this.socket._ws.readyState)t();else{var n=this;setTimeout((function(){n.waitForConnection(t,e)}),e)}}catch(r){t&&t()}}_send(t){if(this.destroyed)return;this.expectingResponse=!0;const e=JSON.stringify(t);this.waitForConnection((()=>{this.socket.send(e)}),1e3)}_generateOffers(t,e){const n=this,r=[];for(let o=0;o{window&&window.debugPPP&&console.log("generator offer ok "),r.push({offer:e,offer_id:_e(t)}),s()})),e.trackerTimeout=setTimeout((()=>{e.trackerTimeout=null,delete n.peers[t],e.destroy()}),5e3),e.trackerTimeout.unref&&e.trackerTimeout.unref()}function s(){r.length===t&&e(r)}s()}_createPeer(t){const e=this;t=Object.assign({trickle:!1,config:e.client._rtcConfig,wrtc:e.client._wrtc,iceCompleteTimeout:4e3},t);const n=new bn(t);return n.once("error",r),n.once("connect",(function i(){n.removeListener("error",r),n.removeListener("connect",i)})),n;function r(t){window&&window.debugPPP&&console.log("generator offer error ",t),e.client.emit("warning",new Error(`Connection error: ${t.message}`)),n.destroy()}}}function Nn(){}Ln.prototype.DEFAULT_ANNOUNCE_INTERVAL=3e4,Ln._socketPool=Dn;var Un=Ln;class jn extends M{constructor(t={}){if(super(),!t.peerId)throw new Error("Option `peerId` is required");if(!t.infoHash)throw new Error("Option `infoHash` is required");if(!t.announce)throw new Error("Option `announce` is required");if(!process.browser&&!t.port)throw new Error("Option `port` is required");this.peerId="string"==typeof t.peerId?t.peerId:he(t.peerId),this._peerIdBuffer=de(this.peerId),this._peerIdBinary=_e(this.peerId),this.infoHash="string"==typeof t.infoHash?t.infoHash.toLowerCase():he(t.infoHash),this._infoHashBuffer=de(this.infoHash),this._infoHashBinary=_e(this.infoHash),this.infoHash,this.destroyed=!1,this._port=t.port,this._getAnnounceOpts=t.getAnnounceOpts,this._rtcConfig=t.rtcConfig,this._userAgent=t.userAgent,this._proxyOpts=t.proxyOpts,this._checkPeer=t.checkPeer,this._wrtc="function"==typeof t.wrtc?t.wrtc():t.wrtc;let e="string"==typeof t.announce?[t.announce]:null==t.announce?[]:t.announce;e=e.map((t=>(ArrayBuffer.isView(t)&&(t=ye(t)),"/"===t[t.length-1]&&(t=t.substring(0,t.length-1)),t))),e=Array.from(new Set(e));const n=!1!==this._wrtc&&(!!this._wrtc||ke.WEBRTC_SUPPORT),r=t=>{oe((()=>{this.emit("warning",t)}))};this._trackers=e.map((t=>{let e;try{e=Pn.parseUrl(t)}catch(o){return r(new Error(`Invalid tracker URL: ${t}`)),null}const i=e.port;if(i<0||i>65535)return r(new Error(`Invalid tracker port: ${t}`)),null;const s=e.protocol;return"http:"!==s&&"https:"!==s||"function"!=typeof En?"udp:"===s&&"function"==typeof Tn?new Tn(this,t):"ws:"!==s&&"wss:"!==s||!n||"ws:"===s&&"undefined"!=typeof window&&"https:"===window.location.protocol?(r(new Error(`Unsupported tracker protocol: ${t}`)),null):new Un(this,t):new En(this,t)})).filter(Boolean)}getPeer(t){return this._checkPeer&&this._checkPeer(t)}start(t){(t=this._defaultAnnounceOpts(t)).event="started",this._announce(t),this._trackers.forEach((t=>{t.setInterval()}))}stop(t){(t=this._defaultAnnounceOpts(t)).event="stopped",this._announce(t)}complete(t){t||(t={}),(t=this._defaultAnnounceOpts(t)).event="completed",this._announce(t)}update(t){(t=this._defaultAnnounceOpts(t)).event&&delete t.event,this._announce(t)}_announce(t){this._trackers.forEach((e=>{e.announce(t)}))}scrape(t){t||(t={}),this._trackers.forEach((e=>{e.scrape(t)}))}setInterval(t){this._trackers.forEach((e=>{e.setInterval(t)}))}destroy(t){if(this.destroyed)return;this.destroyed=!0;const e=this._trackers.map((t=>e=>{t.destroy(e)}));xn(e,t),this._trackers=[],this._getAnnounceOpts=null}_defaultAnnounceOpts(t={}){return null==t.numwant&&(t.numwant=Pn.DEFAULT_ANNOUNCE_PEERS),null==t.uploaded&&(t.uploaded=0),null==t.downloaded&&(t.downloaded=0),this._getAnnounceOpts&&(t=Object.assign({},t,this._getAnnounceOpts())),t}}jn.scrape=(t,e)=>{if(e=wn(e),!t.infoHash)throw new Error("Option `infoHash` is required");if(!t.announce)throw new Error("Option `announce` is required");const n=Object.assign({},t,{infoHash:Array.isArray(t.infoHash)?t.infoHash[0]:t.infoHash,peerId:we("01234567890123456789"),port:6881}),r=new jn(n);r.once("error",e),r.once("warning",e);let i=Array.isArray(t.infoHash)?t.infoHash.length:1;const s={};return r.on("scrape",(t=>{if(i-=1,s[t.infoHash]=t,0===i){r.destroy();const t=Object.keys(s);1===t.length?e(null,s[t[0]]):e(null,s)}})),r.scrape({infoHash:t.infoHash}),r};var Mn=jn;i(50859);function qn(t,e){var n=j()(t);if(K()){var r=K()(t);e&&(r=bt()(r).call(r,(function(e){return Z()(t,e).enumerable}))),n.push.apply(n,r)}return n}function Bn(t){for(var e=1;e announce response: "+t.announce),wt(" => seeders: "+t.complete),wt(" => leechers: "+t.incomplete),wt(" => isConnected: "+this.isConnected),wt("=========================="),this.lastDisconnectPeer=null,!this.isConnected)return this.isConnected=!0,void setTimeout((function(){e.emit("ready")}),3e3)}},{key:"onPeer",value:function(t){this.addPeer(t)}},{key:"getPeer",value:function(t){return this.peers[t]}},{key:"removePeer",value:function(t){var e;if(null!=t){var n,r=t.id||t,i=gt()(e=this.listPeerId).call(e,r);if(i>=0)dt()(n=this.listPeerId).call(n,i,1);this.peers[r]&&(this.peers[r].destroy(),delete this.peers[r]),this.lastDisconnectPeer=r,this.emit("close",t)}}},{key:"addPeer",value:function(t){var e,n=this;if(null!=t){var r=t.id;this.lastDisconnectPeer!=r?gt()(e=this.listPeerId).call(e,r)>=0?setTimeout((function(){return t.destroy()}),200):(this.lastDisconnectPeer=null,this.listPeerId.push(r),this.peers[r]=new pn(t),this.peers[r].once("close",(function(t){var e=n.peers[t]&&n.peers[t].isConnected;if(wt("remove peer",t),n.removePeer(t),n.errorCount=n.errorCount+1,e)try{n.client.update({uploaded:j()(n.peers).length,downloaded:0})}catch(r){}})),this.peers[r].once("connected",(function(t){n.emit("connected",n.peers[t]),n.errorCount=0})),this.peers[r].on("request-segment-info",(function(t,e){n.emit("request-segment-info",t,e)})),this.peers[r].on("segment-info",(function(t,e){n.emit("segment-info",t,e)})),this.peers[r].on("update-segment-list",(function(t,e){n.emit("update-segment-list",t,e)})),this.peers[r].on("request-piece-data",(function(t,e){n.emit("request-piece-data",t,e)})),this.peers[r].on("piece-data",(function(t,e){n.emit("piece-data",t,e)})),this.peers[r].on("abort-download",(function(t,e){n.emit("abort-download",t,e)})),this.peers[r].on("pasue",(function(t,e){n.emit("peer-pause",t,e)}))):setTimeout((function(){return t.destroy()}),200)}}},{key:"sendToAllPeer",value:function(t,e){var n=e||this.peers;for(var r in n)n[r].write(t)}},{key:"getAllPeerContainSegment",value:function(t){var e=[];for(var n in this.peers)if(this.peers[n].isConnected){var r=this.peers[n].segments;gt()(r).call(r,t)>=0&&e.push(this.peers[n])}return _t()(e).call(e,(function(t,e){return t.responseDelay+20*(t.failedTime||0)=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,o=!0,a=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return o=t.done,t},e:function(t){a=!0,s=t},f:function(){try{o||null==n["return"]||n["return"]()}finally{if(a)throw s}}}}function $n(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n2&&arguments[2]!==undefined?arguments[2]:{}).priority;y(this,s),N(T(r=i.call(this)),"pieces",null),N(T(r),"segmentId",null),N(T(r),"segmentLen",null),N(T(r),"numOfPiece",0),N(T(r),"picesLength",0),N(T(r),"priority",0),N(T(r),"peers",[]),N(T(r),"mapPeerToPices",{}),N(T(r),"done",!1),N(T(r),"interval",void 0),N(T(r),"isDestroy",void 0),N(T(r),"lastRemovePeer",null),N(T(r),"isPause",!1);var a=tr(e);return r.numOfPiece=a.numOfPiece,r.picesLength=a.picesLength,r.segmentId=t,r.segmentLen=e,r.pieces=Xn()(n=new Array(r.numOfPiece)).call(n,null),r.priority=o||0,wt("create segment",t,"total piece ",r.numOfPiece,"piece len",r.picesLength),r}return E(s,[{key:"removePeer",value:function(t){var e,n=this;if(wt("segment piece remove peer",t),this.isDestroy||null==t)return!1;var r=t.id||t;this.lastRemovePeer=r;var i,s=Q()(e=this.peers).call(e,(function(t){return t.id==r}));s>=0&&dt()(i=this.peers).call(i,s,1);var o=this.mapPeerToPices[r];if(delete this.mapPeerToPices[r],null!=o&&o.length>0){var a,u=Yn(o);try{for(u.s();!(a=u.n()).done;){var c=a.value;null!=this.pieces[c]&&"processing"==this.pieces[c].status&&(this.pieces[c]=null)}}catch(f){u.e(f)}finally{u.f()}}return 0==this.peers.length?(this.isPause=!0,this.emit("cancel"),!0):(this.isPause||setTimeout((function(){return n.processPiece()}),0),!1)}},{key:"requestErrorPiece",value:function(t,e){this.isDestroy||e>=this.pieces.length||(this.pieces[e]=null,this.removePeer(t))}},{key:"start",value:function(){var t=this;window&&window.debugPPP&&wt("start download piece from ",this.segmentId),this.isDestroy||(null!=this.interval&&clearInterval(this.interval),this.interval=setInterval((function(){t.processPiece()}),zn/2))}},{key:"destroy",value:function(){if(!this.isDestroy){if(this.isDestroy=!0,null!=this.interval&&clearInterval(this.interval),this.pieces.length>0)for(var t in this.pieces)null!=this.pieces[t]&&this.pieces[t].data&&(this.pieces[t].data=null,this.pieces[t]=null);this.pieces.length=0,this.removeAllListeners()}}},{key:"fullData",value:function(){var t,e;if(this.isDestroy)return null;var n=bt()(t=mt()(e=this.pieces).call(e,(function(t){return It.lW.isBuffer(t.data)?t.data:It.lW.from(t.data)}))).call(t,(function(t){return null!=t&&t.length>0}));return g()(It.lW).call(It.lW,n)}},{key:"partData",value:function(){if(this.isDestroy)return null;var t,e=[],n=Yn(this.pieces);try{for(n.s();!(t=n.n()).done;){var r=t.value;if(null==r||null==r.data)break;e.push(It.lW.isBuffer(r.data)?r.data:It.lW.from(r.data))}}catch(i){n.e(i)}finally{n.f()}return{data:g()(It.lW).call(It.lW,e),segmentSize:this.segmentLen}}},{key:"writePiece",value:function(t,e){var n=e.segmentId,r=e.pieceId,i=e.data;if(!this.isDestroy&&!this.done)return!(n!=this.segmentId||r>=this.numOfPiece||r<0)&&(this.pieces[r]={status:"complete",data:i},t.errorPiece=0,this.removePieceFromPeer(t.id,r),this.checkDone()?(this.done=!0,this.emit("complete",this)):this.isPause||(this.start(),this.processPiece()),!0)}},{key:"addPeer",value:(r=l(d().mark((function o(t){return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.isDestroy){e.next=2;break}return e.abrupt("return");case 2:if(this.lastRemovePeer!=t.id){e.next=4;break}return e.abrupt("return");case 4:if(!this.done){e.next=6;break}return e.abrupt("return");case 6:this.peers.push(t),this.isPause||(this.processPiece(),this.start());case 8:case"end":return e.stop()}}),o,this)}))),function(t){return r.apply(this,arguments)})},{key:"removePieceFromPeer",value:(n=l(d().mark((function a(t,e){var n,r,i;return d().wrap((function(s){for(;;)switch(s.prev=s.next){case 0:null!=this.mapPeerToPices[t]&&null!=this.mapPeerToPices[t].pieces&&(r=gt()(n=this.mapPeerToPices[t].pieces).call(n,1*e))>=0&&dt()(i=this.mapPeerToPices[t].pieces).call(i,r,1);case 1:case"end":return s.stop()}}),a,this)}))),function(t,e){return n.apply(this,arguments)})},{key:"getAvaliablePeers",value:function(){var t=[];for(var e in this.peers){var n=this.peers[e],r=n.id,i=this.mapPeerToPices[r];n.isConnected&&!n.isClose&&null!=n.peer&&((null==i||null==i.avg||i.pieces.length<=i.avg)&&t.push(this.peers[e]))}try{t.length>1&&(t=_t()(t).call(t,(function(t,e){return(t.responseDelay||0)+20*(t.failedTime||0)<(e.responseDelay||0)+20*(e.failedTime||0)?-1:0})))}catch(s){}return t}},{key:"processPiece",value:(e=l(d().mark((function u(){var t,e,n,r,i,s,o,a,c,f;return d().wrap((function(u){for(;;)switch(u.prev=u.next){case 0:if(!this.isDestroy){u.next=2;break}return u.abrupt("return");case 2:if(!this.done){u.next=5;break}return null!=this.interval&&clearInterval(this.interval),u.abrupt("return");case 5:if(!((t=this.getAvaliablePeers()).length<=0)){u.next=8;break}return u.abrupt("return");case 8:e=0,n=t.length,r=Math.max(Jn,Math.min(Kn,Math.ceil(this.numOfPiece/n))),u.t0=Pt()(d()).call(d(),this.pieces);case 12:if((u.t1=u.t0()).done){u.next=54;break}if(i=u.t1.value,!(t.length<1)){u.next=16;break}return u.abrupt("break",54);case 16:if(null==this.pieces[i]&&(this.pieces[i]={}),null==(o=this.pieces[i])||!(o.expried>performance.now()||"complete"==o.status)){u.next=20;break}return u.abrupt("continue",12);case 20:if(!(e>=t.length)){u.next=22;break}return u.abrupt("break",54);case 22:if(null!=(a=t[e%t.length])&&null!=a.peer){u.next=25;break}return u.abrupt("break",54);case 25:if(!o.peer){u.next=42;break}if(o.peer.id!=a.id){u.next=31;break}if(1!=t.length){u.next=29;break}return u.abrupt("break",54);case 29:return e++,u.abrupt("continue",12);case 31:if(null!=o.peer.errorPiece){u.next=35;break}o.peer.errorPiece=1,u.next=41;break;case 35:if(o.peer.errorPiece=o.peer.errorPiece+1,!(o.peer.errorPiece>Jn)){u.next=41;break}if(wt("remove peer by error down 10",o.peer),!this.removePeer(o.peer)){u.next=40;break}return u.abrupt("break",54);case 40:o.peer=null;case 41:null!=o.peer&&this.removePieceFromPeer(o.peer.id,1*i);case 42:if(null==this.mapPeerToPices[a.id]&&(this.mapPeerToPices[a.peer.id]={peer:a.peer,pieces:[],currentPieces:[],avg:r}),c=this.mapPeerToPices[a.id],!(gt()(s=c.pieces).call(s,1*i)>=0)){u.next=47;break}return e++,u.abrupt("continue",12);case 47:c.currentPieces.push(1*i),o.peer=a,o.status="processing",o.expried=performance.now()+zn+c.currentPieces.length*zn,c.currentPieces.length>=r&&e++,u.next=12;break;case 54:u.t2=Pt()(d()).call(d(),this.mapPeerToPices);case 55:if((u.t3=u.t2()).done){u.next=64;break}if(i=u.t3.value,!(this.mapPeerToPices[i].currentPieces.length<=0)){u.next=59;break}return u.abrupt("continue",55);case 59:this.emit("process",this,{pieceIds:this.mapPeerToPices[i].currentPieces,peer:this.mapPeerToPices[i].peer}),this.mapPeerToPices[i].currentPieces.length>0&&(this.mapPeerToPices[i].pieces=g()(f=this.mapPeerToPices[i].pieces).call(f,this.mapPeerToPices[i].currentPieces)),this.mapPeerToPices[i].currentPieces=[],u.next=55;break;case 64:case"end":return u.stop()}}),u,this)}))),function(){return e.apply(this,arguments)})},{key:"checkDone",value:function(){for(var t in this.pieces){var e=this.pieces[t];if(null==e||"complete"!=e.status)return!1;null==e.data&&wt("ERROR piece null")}return!0}}]),s}(q()),tr=function(t){var e=0,n=0;if(tQn/2;){if(t%r>3/4*r)break;r-=1}e=Math.ceil(t/r),n=r}return{numOfPiece:e,picesLength:n}},er=Zn,nr=(navigator&&navigator.hardwareConcurrency,window.PPP&&window.PPP.QUEUE_SEND_ITEMS||20),rr=window.PPP&&window.PPP.QUEUE_SEND_RATE||20,ir=[],sr=null,or=new M.EventEmitter,ar=function(){var t=l(d().mark((function e(t,n){var r;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r={peer:t,pieceInfo:n},ir.push(r),ur();case 3:case"end":return e.stop()}}),e)})));return function(e,n){return t.apply(this,arguments)}}(),ur=function(){null==sr&&(sr=setTimeout((function(){sr=null;try{cr()}catch(t){}}),rr))},cr=function(){null!=sr&&clearTimeout(sr);try{for(var t=0;t65535?(wt("not send by bufferedAmount",e.peer.peer._channel.bufferedAmount),ir.unshift(e)):(e.peer.writePieceData(e.pieceInfo.data),or.emit("uploaded",e.pieceInfo.data.length,{segmentId:e.pieceInfo.segmentId,pieceId:e.pieceInfo.pieceId})))}}catch(n){}ir.length>0&&ur()},fr=function(t,e){if(null!=t&&0!=t.length)for(var n=t.length-1;n>=0;--n)e(t[n])&&dt()(t).call(t,n,1)};function lr(t,e){var n=void 0!==ct()&<()(t)||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){var n;if(!t)return;if("string"==typeof t)return hr(t,e);var r=W()(n=Object.prototype.toString.call(t)).call(n,8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return at()(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return hr(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,o=!0,a=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return o=t.done,t},e:function(t){a=!0,s=t},f:function(){try{o||null==n["return"]||n["return"]()}finally{if(a)throw s}}}}function hr(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n0&&ur()}(t,e)}},{key:"notiCancelSegment",value:function(t){var e=function(t){var e=on(7),n=e.writeUInt8(10,0);return n=e.writeUInt8(245,n),n=e.writeUInt8(7,n),n=e.writeUInt32LE(t,n),e}(t),n=this.manager.getAllPeerContainSegment(t);if(!(n.length<=0)){var r,i=lr(n);try{for(i.s();!(r=i.n()).done;){r.value.write(e)}}catch(s){i.e(s)}finally{i.f()}}}},{key:"onPeerPause",value:function(t){this.onPeerClose(t)}},{key:"onPeerClose",value:function(t){var e;if(null!=t){var n=[];for(var r in this.requiredSegments){var i=this.requiredSegments[r];this.manager.getAllPeerContainSegment(i.segmentId).length>0?i.processing&&i.processing.removePeer(t):n.push(i.segmentId)}for(var s=0;s=0)dt()(u=this.listSeeding).call(u,c,0);!function(t){fr(ir,(function(e){return e.peer.id==t.id})),ir.length>0&&ur()}(t),this.emit("close-peer",t)}}},{key:"onPieceData",value:function(t,e){var n,r=bt()(n=this.requiredSegments).call(n,(function(t){return t.segmentId===e.segmentId&&"processing"==t.status}));if(!(r.length<1)){var i=r[0];"cancel"==i.status||null==i.processing||i.processing.isDestroy||(e.success||!i.processing?(this.emit("bytes-downloaded",e.data.length),i.processing.writePiece(t,e)):i.processing.requestErrorPiece(t,e.pieceId))}}},{key:"onRequestPieceData",value:(s=l(d().mark((function c(t,e){var n,r,i,s,o,a,u,f,l,h,p,g,v,m,y;return d().wrap((function(c){for(;;)switch(c.prev=c.next){case 0:s=function(){var n=cn(!1,e,null);t.write(n)};try{this.listSeeding.length>0&&t&&(r=Q()(n=this.listSeeding).call(n,(function(e){return e.id==t.id})))>-1&&(this.listSeeding[r].exp=performance.now()+br)}catch(d){}return c.next=4,this.storage.getSegment(e.segmentId);case 4:if(null!=(i=c.sent)&&null!=i.segmentId&&null!=i.data){c.next=9;break}return s(),wt("onRequestPieceData get piece data error"),c.abrupt("return");case 9:o=i.picesLength,a=i.numOfPiece,null!=o&&null!=a||(u=tr(i.segmentLen),o=u.picesLength,a=u.numOfPiece),f=[],null!=e.pieceId?f.push(e.pieceId):f=e.pieceIds||[],l=lr(f),c.prev=15,l.s();case 17:if((h=l.n()).done){c.next=30;break}if(!((p=h.value)>=a)){c.next=23;break}return s(),wt("onRequestPieceData numof piece invalid"),c.abrupt("return");case 23:g=p*o,v=Math.min(g+o,i.segmentLen),m=i.data.subarray(g,v),y=cn(!0,{segmentId:e.segmentId,pieceId:p},m),ar(t,{segmentId:e.segmentId,pieceId:p,data:y});case 28:c.next=17;break;case 30:c.next=35;break;case 32:c.prev=32,c.t0=c["catch"](15),l.e(c.t0);case 35:return c.prev=35,l.f(),c.finish(35);case 38:case"end":return c.stop()}}),c,this,[[15,32,35,38]])}))),function(t,e){return s.apply(this,arguments)})},{key:"onRevcRequestSegmentInfo",value:(i=l(d().mark((function f(t,e){var n,r,i,s,o,a,u,c,l,h,p;return d().wrap((function(f){for(;;)switch(f.prev=f.next){case 0:return wt("onRevcRequestSegmentInfo start"),r=performance.now(),f.next=4,this.storage.getSegment(e);case 4:i=f.sent,s=null,o=!1,a=wr;try{(u=navigator&&navigator.connection&&navigator.connection.downlink||3)>=7?a=xr:u>=5&&(a=_r)}catch(d){}if(!((c=Q()(n=this.listSeeding).call(n,(function(e){return e.id==t.id})))>-1)){f.next=14;break}this.listSeeding[c].exp=performance.now()+br,f.next=38;break;case 14:if(!(this.listSeeding.lengthperformance.now()&&e.id!=t.id})),this.listSeeding.push({id:t.id,exp:performance.now()+br}));case 38:ir.length>=200&&(o=!0),s=null==i||null==i.segmentId||null==i.data||o?un(!1,{segmentId:e,segmentLen:0}):un(!0,i),t.write(s),wt("onRevcRequestSegmentInfo end",performance.now()-r);case 42:case"end":return f.stop()}}),f,this,[[20,31,34,37]])}))),function(t,e){return i.apply(this,arguments)})},{key:"onUpdateListSegment",value:(r=l(d().mark((function h(t,e){var n;return d().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.t0=j(),r.next=3,this.storage.get();case 3:if(r.t1=r.sent,n=(0,r.t0)(r.t1),0!=e.length||0!=n.length){r.next=8;break}return this.manager.removePeer(t.peer),r.abrupt("return");case 8:case"end":return r.stop()}}),h,this)}))),function(t,e){return r.apply(this,arguments)})},{key:"onRevcSegmentInfo",value:function(t,e){var n,r=this,i=e.success,s=bt()(n=this.requiredSegments).call(n,(function(t){return t.segmentId==e.segmentId}));if(!(s.length<=0)){var o=s[0];if(i&&0!=e.segmentLen){t.failedTime>0&&(t.failedTime=t.failedTime-1);try{var a;-1==gt()(a=this.listDownloadPeer).call(a,t.remoteAddress)&&(this.listDownloadPeer.unshift(t.remoteAddress),this.listDownloadPeer.length>50&&(this.listDownloadPeer.length=50))}catch(h){}if(null==o.processing){var u=0;u=o.required?Math.ceil(Math.max(yr,vr*e.segmentLen)):Math.ceil(Math.max(yr,mr*e.segmentLen));var c=performance.now();o.expried=c+u-(gr-Math.max(0,(o.expried||0)-c));var f=new er(e.segmentId,e.segmentLen,{priority:e.priority});o.processing=f,f.on("process",(function(t,e){r.onProcessSegmentPiece(t,e)})),f.once("complete",(function(){o.expried=performance.now()+gr,r.onSegmentComplete(f)})),f.once("cancel",(function(){f.status="expired",r.emit("expired",{segmentId:f.segmentId,segmentLen:f.segmentLen,data:f.partData()}),f.destroy(),r.abort(f.segmentId)})),f.addPeer(t)}else{var l=o.processing;l&&l.addPeer(t)}}else t.failedTime=t.failedTime+1}}},{key:"onSegmentComplete",value:function(t){var e,n,r=Q()(e=this.requiredSegments).call(e,(function(e){return e.segmentId==t.segmentId}));r>=0&&dt()(n=this.requiredSegments).call(n,r,1);this.emit("complete",{p2p:!0,segmentId:t.segmentId,data:t.fullData()}),t.destroy(),this.processRequireSegment()}},{key:"onNewPeerConnected",value:(n=l(d().mark((function p(t){var e,n;return d().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(null!=t){r.next=2;break}return r.abrupt("return");case 2:return r.t0=j(),r.next=5,this.storage.get();case 5:r.t1=r.sent,e=(0,r.t0)(r.t1),n=an(e),t.write(n),wt("onNewPeerConnected"),this.emit("new-peer",t);case 11:case"end":return r.stop()}}),p,this)}))),function(t){return n.apply(this,arguments)})},{key:"onProcessSegmentPiece",value:function(t,e){var n,r,i,s,o=null;null!=e.pieceIds?o=function(t,e){var n=5+4*e.length,r=on(n+3),i=r.writeUInt8(10,0);i=r.writeUInt8(245,i),i=r.writeUInt8(5,i),i=r.writeInt32LE(t,i);var s,o=rn(e);try{for(o.s();!(s=o.n()).done;){var a=s.value;i=r.writeInt32LE(a,i)}}catch(u){o.e(u)}finally{o.f()}return r}(t.segmentId,e.pieceIds):(n=t.segmentId,r=e.pieceId,i=on(12),s=i.writeUInt8(10,0),s=i.writeUInt8(245,s),s=i.writeUInt8(5,s),s=i.writeInt32LE(n,s),s=i.writeInt32LE(r,s),o=i),null!=e.peer&&e.peer.write(o)}},{key:"isDownloading",value:function(t){var e;return Q()(e=this.requiredSegments).call(e,(function(e){return e.segmentId===t}))>=0}},{key:"isRequiredDownloading",value:function(t){try{var e,n=Q()(e=this.requiredSegments).call(e,(function(e){return e.segmentId===t}));return!(n<0)&&(this.requiredSegments[n].required||null!=this.requiredSegments[n].processing)}catch(r){return!1}}},{key:"destroy",value:function(){this.manager.destroy(),this.isDestroy=!0,this.removeAllListeners(),this.stopCheckSegment();var t=u(this.requiredSegments);for(var e in t)this.abort(t[e].segmentId);or.removeListener("uploaded",this.onUploadedBytes),this.storage=null,this.requiredSegments.length=0}},{key:"abort",value:function(t){var e,n=this,r=null;if(null!=t){var i=Q()(e=this.requiredSegments).call(e,(function(e){return e.segmentId==t}));if(setTimeout((function(){return n.notiCancelSegment(t)}),0),i>=0){var s;wt("abort download segment failed",t);var o=dt()(s=this.requiredSegments).call(s,i,1)[0];if(null!=o.processing&&!o.processing.isDestroy)r=o.processing.partData(),o.processing.destroy()}return this.isDestroy||this.processRequireSegment(),r}}},{key:"download",value:function(t){var e,n;performance.now();var r=Q()(e=this.requiredSegments).call(e,(function(e){return e.segmentId==t.segmentId}));try{if(r>=0){var i;if(this.requiredSegments[r].priority!=t.priority)this.requiredSegments[r].priority=t.priority,this.requiredSegments=_t()(i=this.requiredSegments).call(i,(function(t,e){return t.priorityt)){p.next=20;break}return wt("skip by count processing"),p.abrupt("continue",5);case 20:if("cancel"!=s.status){p.next=23;break}return n.push(s.segmentId),p.abrupt("continue",5);case 23:return p.prev=23,p.next=26,this.storage.getSegment(s.segmentId);case 26:if(null==(a=p.sent)||null==a.data){p.next=31;break}return this.emit("complete",{p2p:!0,segmentId:s.segmentId,data:a.data}),r.push(s.segmentId),p.abrupt("continue",5);case 31:p.next=35;break;case 33:p.prev=33,p.t2=p["catch"](23);case 35:s.status="processing",s.priority&&s.priority>3?s.expried=performance.now()+1.2*gr:s.expried=performance.now()+gr,g=s.segmentId,v=void 0,m=void 0,v=on(7),m=v.writeUInt8(10,0),m=v.writeUInt8(245,m),m=v.writeUInt8(3,m),m=v.writeUInt32LE(g,m),u=v,this.manager.sendToAllPeer(u,o),p.next=5;break;case 41:if(n.length>0)for(c=0;c0)for(c=0;c=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,o=!0,a=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return o=t.done,t},e:function(t){a=!0,s=t},f:function(){try{o||null==n["return"]||n["return"]()}finally{if(a)throw s}}}}function Tr(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n0){var n,r=t[0].segmentId,i=t[0].segmentId,s=Er(t);try{for(s.s();!(n=s.n()).done;){var o=n.value;if(o.required){r=o.segmentId;break}}}catch(a){s.e(a)}finally{s.f()}try{this.p2p.isRequiredDownloading(r)||this.http.isDownloading(r)||this.p2p.isRequiredDownloading(i)||this.http.isDownloading(i)||this.cancelAllSegment()}catch(u){}}this.segmentsQueue=t,setTimeout((function(){return e.processQueue()}),0)}},{key:"startTimer",value:function(){var t=this;null!=this.timerCheckProcessQueue&&clearInterval(this.timerCheckProcessQueue),this.timerCheckProcessQueue=setInterval((function(){t.processQueue()}),5e3)}},{key:"cancelDownloadSegmentd",value:function(t){var e,n,r=Q()(e=this.segmentsQueue).call(e,(function(e){return e.segmentId==t}));(this.http&&this.http.isDownloading(t)?this.http&&this.http.abort(t):this.p2p&&this.p2p.abort(t),r>=0)&&dt()(n=this.segmentsQueue).call(n,r,1);null!=this.segmentProcessing[t]&&delete this.segmentProcessing[t]}},{key:"cancelAllSegment",value:function(){quickCheckCanDownloadP2p();var t,e=Er(this.segmentsQueue);try{for(e.s();!(t=e.n()).done;){var n=t.value;this.http&&this.http.isDownloading(n.segmentId)&&this.http&&this.http.abort(n.segmentId)}}catch(c){e.e(c)}finally{e.f()}if(j()(this.segmentProcessing).length>0){var r=[];for(var i in this.segmentProcessing){var s=this.segmentProcessing[i];this.http&&this.http.isDownloading(s.segmentId)&&(this.http&&this.http.abort(s.segmentId),r.push(i))}if(r.length>0){var o,a=Er(r);try{for(a.s();!(o=a.n()).done;){var u=o.value;delete this.segmentProcessing[u]}}catch(c){a.e(c)}finally{a.f()}}}this.segmentsQueue.length=0}},{key:"quickCheckCanDownloadP2p",value:function(){var t=navigator&&navigator.connection&&navigator.connection.effectiveType||"4g",e=-1==gt()(Dr).call(Dr,t);return!(this.pauseP2p>0)&&e}},{key:"processQueue",value:(e=l(d().mark((function i(){var t,e,n,r,s,o,a,u,c,f,l,h,p,g,v;return d().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:if(this.startTimer(),this.isRunning){i.next=4;break}return wt("cancel by running",this.isRunning),i.abrupt("return");case 4:t=[],window&&window.debugPPP&&wt("Process queue ",this.pauseP2p,mt()(e=this.segmentsQueue).call(e,(function(t){return t.segmentId+"-"+t.status}))),n=navigator&&navigator.connection&&navigator.connection.effectiveType||"4g",r=this.pauseP2p?3:0,s=Er(this.segmentsQueue),i.prev=9,s.s();case 11:if((o=s.n()).done){i.next=46;break}if(null==(a=o.value).status||"http"==a.status){i.next=15;break}return i.abrupt("continue",44);case 15:if(u=this.p2p.countDownloading()>=kr,c=this.http.countDownloading()>=Or,!a.required||!a.force){i.next=20;break}return this.forceDownload(a.segmentId),i.abrupt("continue",44);case 20:if(-1!=gt()(Dr).call(Dr,n)){i.next=32;break}if("http"==a.status||u){i.next=32;break}if(!(this.pauseP2p<=0)&&a.required){i.next=32;break}if(window&&window.debugPPP&&wt("process download p2p",a.segmentId,a.required),!(r>0)){i.next=28;break}r-=1,i.next=32;break;case 28:if(a.loading={start:performance.now()},!this.p2p.download(Ar(Ar({},a),{},{status:"init"}))){i.next=32;break}return t.push(a.segmentId),i.abrupt("continue",44);case 32:if(f=this.http.hasDownloading()&&!this.http.isRequiredDownloading(),!a.required||c&&!f){i.next=42;break}if("http"==a.status&&wt("process http"),a.loading={start:performance.now()},window&&window.debugPPP&&wt("process download http",a.segmentId,a.required),l=null,this.p2p.isDownloading(a.segmentId)&&(l=this.p2p.abort(a.segmentId),r=2),!this.http.download(Ar(Ar({},a),{},{status:f?"force":"init",partData:l||a.partData}))){i.next=42;break}return t.push(a.segmentId),i.abrupt("continue",44);case 42:if(!u||!c){i.next=44;break}return i.abrupt("break",46);case 44:i.next=11;break;case 46:i.next=51;break;case 48:i.prev=48,i.t0=i["catch"](9),s.e(i.t0);case 51:return i.prev=51,s.f(),i.finish(51);case 54:for(h=0;h0&&(this.segmentProcessing[p.segmentId]=v[0]);case 55:case"end":return i.stop()}}),i,this,[[9,48,51,54]])}))),function(){return e.apply(this,arguments)})},{key:"onSegmentAlreadyComplete",value:function(t){var e,n=this,r=this.segmentProcessing[t.segmentId]||t||{};this.segmentsQueue=bt()(e=this.segmentsQueue).call(e,(function(e){return e.segmentId!=t.segmentId})),this.emit("segment-completed",{streamId:r.streamId,segmentId:r.segmentId,url:r.url,segmentByteRange:r.range,data:t.data}),setTimeout((function(){return n.processQueue()}),0)}},{key:"onSegmentComplete",value:function(t){var e=this;if(wt("onSegmentComplete",t.segmentId),t&&1==t.p2p)this.emit("p2p-segment",t.segmentId);else{try{this.p2p.isDownloading(t.segmentId)&&this.p2p.abort(t.segmentId)}catch(o){}this.pauseP2p>0&&(this.pauseP2p=this.pauseP2p-1),this.emit("http-segment",t.segmentId)}try{var n,r=this.segmentProcessing[t.segmentId];r&&delete this.segmentProcessing[t.segmentId];var i=5e8;if(r&&r.loading)performance.now()-r.loading.start>0&&(i=8e3*t.data.length/(performance.now()-r.loading.start));i-1},e.trigger=function(t){var e=this.listeners[t];if(e)if(2===arguments.length)for(var n=e.length,r=0;r-1;e=this.buffer.indexOf("\n"))this.trigger("data",this.buffer.substring(0,e)),this.buffer=this.buffer.substring(e+1)}}const Wr=String.fromCharCode(9),Gr=function(t){const e=/([0-9.]*)?@?([0-9.]*)?/.exec(t||""),n={};return e[1]&&(n.length=parseInt(e[1],10)),e[2]&&(n.offset=parseInt(e[2],10)),n},Xr=function(t){const e={};if(!t)return e;const n=t.split(new RegExp('(?:^|,)((?:[^=]*)=(?:"[^"]*"|[^,]*))'));let r,i=n.length;for(;i--;)""!==n[i]&&(r=/([^=]*)=(.*)/.exec(n[i]).slice(1),r[0]=r[0].replace(/^\s+|\s+$/g,""),r[1]=r[1].replace(/^\s+|\s+$/g,""),r[1]=r[1].replace(/^['"](.*)['"]$/g,"$1"),e[r[0]]=r[1]);return e};class Yr extends Ur{constructor(){super(),this.customParsers=[],this.tagMappers=[]}push(t){let e,n;if(0===(t=t.trim()).length)return;if("#"!==t[0])return void this.trigger("data",{type:"uri",uri:t});this.tagMappers.reduce(((e,n)=>{const r=n(t);return r===t?e:e.concat([r])}),[t]).forEach((t=>{for(let e=0;et),this.customParsers.push((i=>{if(t.exec(i))return this.trigger("data",{type:"custom",data:n(i),customType:e,segment:r}),!0}))}addTagMapper({expression:t,map:e}){this.tagMappers.push((n=>t.test(n)?e(n):n))}}const $r=function(t){const e={};return Object.keys(t).forEach((function(n){var r;e[(r=n,r.toLowerCase().replace(/-(\w)/g,(t=>t[1].toUpperCase())))]=t[n]})),e},Vr=function(t){const{serverControl:e,targetDuration:n,partTargetDuration:r}=t;if(!e)return;const i="#EXT-X-SERVER-CONTROL",s="holdBack",o="partHoldBack",a=n&&3*n,u=r&&2*r;n&&!e.hasOwnProperty(s)&&(e[s]=a,this.trigger("info",{message:`${i} defaulting HOLD-BACK to targetDuration * 3 (${a}).`})),a&&e[s]{i.uri||!i.parts&&!i.preloadHints||(!i.map&&n&&(i.map=n),!i.key&&r&&(i.key=r),i.timeline||"number"!=typeof u||(i.timeline=u),this.manifest.preloadSegment=i)})),this.parseStream.on("data",(function(h){let d,p;({tag(){({version(){h.version&&(this.manifest.version=h.version)},"allow-cache"(){this.manifest.allowCache=h.allowed,"allowed"in h||(this.trigger("info",{message:"defaulting allowCache to YES"}),this.manifest.allowCache=!0)},byterange(){const t={};"length"in h&&(i.byterange=t,t.length=h.length,"offset"in h||(h.offset=c)),"offset"in h&&(i.byterange=t,t.offset=h.offset),c=t.offset+t.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"})),h.title&&(i.title=h.title),h.duration>0&&(i.duration=h.duration),0===h.duration&&(i.duration=.01,this.trigger("info",{message:"updating zero segment duration to a small value"})),this.manifest.segments=e},key(){if(h.attributes)if("NONE"!==h.attributes.METHOD)if(h.attributes.URI){if("com.apple.streamingkeydelivery"===h.attributes.KEYFORMAT)return this.manifest.contentProtection=this.manifest.contentProtection||{},void(this.manifest.contentProtection["com.apple.fps.1_0"]={attributes:h.attributes});if("com.microsoft.playready"===h.attributes.KEYFORMAT)return this.manifest.contentProtection=this.manifest.contentProtection||{},void(this.manifest.contentProtection["com.microsoft.playready"]={uri:h.attributes.URI});if("urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed"===h.attributes.KEYFORMAT){return-1===["SAMPLE-AES","SAMPLE-AES-CTR","SAMPLE-AES-CENC"].indexOf(h.attributes.METHOD)?void this.trigger("warn",{message:"invalid key method provided for Widevine"}):("SAMPLE-AES-CENC"===h.attributes.METHOD&&this.trigger("warn",{message:"SAMPLE-AES-CENC is deprecated, please use SAMPLE-AES-CTR instead"}),"data:text/plain;base64,"!==h.attributes.URI.substring(0,23)?void this.trigger("warn",{message:"invalid key URI provided for Widevine"}):h.attributes.KEYID&&"0x"===h.attributes.KEYID.substring(0,2)?(this.manifest.contentProtection=this.manifest.contentProtection||{},void(this.manifest.contentProtection["com.widevine.alpha"]={attributes:{schemeIdUri:h.attributes.KEYFORMAT,keyId:h.attributes.KEYID.substring(2)},pssh:Fr(h.attributes.URI.split(",")[1])})):void this.trigger("warn",{message:"invalid key ID provided for Widevine"}))}h.attributes.METHOD||this.trigger("warn",{message:"defaulting key method to AES-128"}),r={method:h.attributes.METHOD||"AES-128",uri:h.attributes.URI},"undefined"!=typeof h.attributes.IV&&(r.iv=h.attributes.IV)}else this.trigger("warn",{message:"ignoring key declaration without URI"});else r=null;else this.trigger("warn",{message:"ignoring key declaration without attribute list"})},"media-sequence"(){isFinite(h.number)?this.manifest.mediaSequence=h.number:this.trigger("warn",{message:"ignoring invalid media sequence: "+h.number})},"discontinuity-sequence"(){isFinite(h.number)?(this.manifest.discontinuitySequence=h.number,u=h.number):this.trigger("warn",{message:"ignoring invalid discontinuity sequence: "+h.number})},"playlist-type"(){/VOD|EVENT/.test(h.playlistType)?this.manifest.playlistType=h.playlistType:this.trigger("warn",{message:"ignoring unknown playlist type: "+h.playlist})},map(){n={},h.uri&&(n.uri=h.uri),h.byterange&&(n.byterange=h.byterange),r&&(n.key=r)},"stream-inf"(){this.manifest.playlists=e,this.manifest.mediaGroups=this.manifest.mediaGroups||a,h.attributes?(i.attributes||(i.attributes={}),jr(i.attributes,h.attributes)):this.trigger("warn",{message:"ignoring empty stream-inf attributes"})},media(){if(this.manifest.mediaGroups=this.manifest.mediaGroups||a,!(h.attributes&&h.attributes.TYPE&&h.attributes["GROUP-ID"]&&h.attributes.NAME))return void this.trigger("warn",{message:"ignoring incomplete or missing media group"});const t=this.manifest.mediaGroups[h.attributes.TYPE];t[h.attributes["GROUP-ID"]]=t[h.attributes["GROUP-ID"]]||{},d=t[h.attributes["GROUP-ID"]],p={"default":/yes/i.test(h.attributes.DEFAULT)},p["default"]?p.autoselect=!0:p.autoselect=/yes/i.test(h.attributes.AUTOSELECT),h.attributes.LANGUAGE&&(p.language=h.attributes.LANGUAGE),h.attributes.URI&&(p.uri=h.attributes.URI),h.attributes["INSTREAM-ID"]&&(p.instreamId=h.attributes["INSTREAM-ID"]),h.attributes.CHARACTERISTICS&&(p.characteristics=h.attributes.CHARACTERISTICS),h.attributes.FORCED&&(p.forced=/yes/i.test(h.attributes.FORCED)),d[h.attributes.NAME]=p},discontinuity(){u+=1,i.discontinuity=!0,this.manifest.discontinuityStarts.push(e.length)},"program-date-time"(){"undefined"==typeof this.manifest.dateTimeString&&(this.manifest.dateTimeString=h.dateTimeString,this.manifest.dateTimeObject=h.dateTimeObject),i.dateTimeString=h.dateTimeString,i.dateTimeObject=h.dateTimeObject;const{lastProgramDateTime:t}=this;this.lastProgramDateTime=new Date(h.dateTimeString).getTime(),null===t&&this.manifest.segments.reduceRight(((t,e)=>(e.programDateTime=t-1e3*e.duration,e.programDateTime)),this.lastProgramDateTime)},targetduration(){!isFinite(h.duration)||h.duration<0?this.trigger("warn",{message:"ignoring invalid target duration: "+h.duration}):(this.manifest.targetDuration=h.duration,Vr.call(this,this.manifest))},start(){h.attributes&&!isNaN(h.attributes["TIME-OFFSET"])?this.manifest.start={timeOffset:h.attributes["TIME-OFFSET"],precise:h.attributes.PRECISE}:this.trigger("warn",{message:"ignoring start declaration without appropriate attribute list"})},"cue-out"(){i.cueOut=h.data},"cue-out-cont"(){i.cueOutCont=h.data},"cue-in"(){i.cueIn=h.data},skip(){this.manifest.skip=$r(h.attributes),this.warnOnMissingAttributes_("#EXT-X-SKIP",h.attributes,["SKIPPED-SEGMENTS"])},part(){s=!0;const t=this.manifest.segments.length,e=$r(h.attributes);i.parts=i.parts||[],i.parts.push(e),e.byterange&&(e.byterange.hasOwnProperty("offset")||(e.byterange.offset=f),f=e.byterange.offset+e.byterange.length);const n=i.parts.length-1;this.warnOnMissingAttributes_(`#EXT-X-PART #${n} for segment #${t}`,h.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 t=this.manifest.serverControl=$r(h.attributes);t.hasOwnProperty("canBlockReload")||(t.canBlockReload=!1,this.trigger("info",{message:"#EXT-X-SERVER-CONTROL defaulting CAN-BLOCK-RELOAD to false"})),Vr.call(this,this.manifest),t.canSkipDateranges&&!t.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 t=this.manifest.segments.length,e=$r(h.attributes),n=e.type&&"PART"===e.type;i.preloadHints=i.preloadHints||[],i.preloadHints.push(e),e.byterange&&(e.byterange.hasOwnProperty("offset")||(e.byterange.offset=n?f:0,n&&(f=e.byterange.offset+e.byterange.length)));const r=i.preloadHints.length-1;if(this.warnOnMissingAttributes_(`#EXT-X-PRELOAD-HINT #${r} for segment #${t}`,h.attributes,["TYPE","URI"]),e.type)for(let s=0;st.id===e.id));this.manifest.dateRanges[t]=jr(this.manifest.dateRanges[t],e),l[e.id]=jr(l[e.id],e),this.manifest.dateRanges.pop()}else l[e.id]=e},"independent-segments"(){this.manifest.independentSegments=!0},"content-steering"(){this.manifest.contentSteering=$r(h.attributes),this.warnOnMissingAttributes_("#EXT-X-CONTENT-STEERING",h.attributes,["SERVER-URI"])}}[h.tagType]||o).call(t)},uri(){i.uri=h.uri,e.push(i),this.manifest.targetDuration&&!("duration"in i)&&(this.trigger("warn",{message:"defaulting segment duration to the target duration"}),i.duration=this.manifest.targetDuration),r&&(i.key=r),i.timeline=u,n&&(i.map=n),f=0,null!==this.lastProgramDateTime&&(i.programDateTime=this.lastProgramDateTime,this.lastProgramDateTime+=1e3*i.duration),i={}},comment(){},custom(){h.segment?(i.custom=i.custom||{},i.custom[h.customType]=h.data):(this.manifest.custom=this.manifest.custom||{},this.manifest.custom[h.customType]=h.data)}})[h.type].call(t)}))}warnOnMissingAttributes_(t,e,n){const r=[];n.forEach((function(t){e.hasOwnProperty(t)||r.push(t)})),r.length&&this.trigger("warn",{message:`${t} lacks required attribute(s): ${r.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)}}i(8255);var zr=function(t){var e;if(t===undefined)return undefined;var n=t.offset+t.length-1;return g()(e="bytes=".concat(t.offset,"-")).call(e,n)},Kr=function(t,e){return t===undefined?e===undefined:e!==undefined&&t.length===e.length&&t.offset===e.offset};W()(ArrayBuffer.prototype)||(ArrayBuffer.prototype.slice=function(t,e){var n=new Uint8Array(this);e==undefined&&(e=n.length);for(var r=new ArrayBuffer(e-t),i=new Uint8Array(r),s=0;s100&&(this.segmentRequest.retryTime=0,wt("must force download"),this.mediaDownloader.forceDownload(e)||(this.segmentRequest.onTimeout(),this.segmentRequest=null,this.mediaDownloader.cancelDownloadSegmentd(e),this.updateSegments())),r.abrupt("return");case 13:this.segmentRequest.onSuccess(W()(t=n.data).call(t,0),1),this.segmentRequest=null,r.next=19;break;case 17:r.prev=17,r.t0=r["catch"](4);case 19:case"end":return r.stop()}}),f,this,[[4,17]])}))),function(){return a.apply(this,arguments)})},{key:"generatorId",value:function(t){var e=this.getMasterId(Zt(t));if(this.masterPlaylist&&this.masterPlaylist.manifest.playlists)for(var n=0;n0&&this.playQueue[this.playQueue.length-1].segmentSequence!=c-1&&(this.playQueue=[]),n||this.segmentRequest&&this.segmentRequest.onError("Cancel segment request: simultaneous segment requests are not supported"),f=new(X())((function(r,s){l.segmentRequest={url:t,segmentByteRange:e,segmentSequence:c,retryTime:0,playlistRequestUrl:i.playlist.requestUrl,onSuccess:function(t,e){r({content:t,downloadBandwidth:e})},onTimeout:function(t){s({status:"timeout",detail:t})},onError:function(t){s(t)}},setTimeout((function(){l.loadSegments(i.playlist,i.segmentIndex,!0,n).then(wt)["catch"](wt)}),20),l.playQueue.push({segmentUrl:t,segmentByteRange:e,segmentSequence:c})})),h.abrupt("return",f);case 18:case"end":return h.stop()}}),v,this)}))),function(t,e,n){return i.apply(this,arguments)})},{key:"getSegmentLocation",value:function(t,e){for(var n=0,r=$()(this.variantPlaylists);n=0)return{playlist:i,segmentIndex:s}}return null}},{key:"setPlayingSegment",value:function(t,e,n,r){var i,s,o=Q()(i=this.playQueue).call(i,(function(n){return n.segmentUrl===t&&Kr(n.segmentByteRange,e)}));o<0||(this.playQueue=W()(s=this.playQueue).call(s,o),this.playQueue[0].playPosition={start:n,duration:r},this.updateSegments())}},{key:"setPlayingSegmentByCurrentTime",value:function(t){if(0!==this.playQueue.length&&this.playQueue[0].playPosition){var e,n=this.playQueue[0].playPosition;if(n.start+n.duration-t<.2)this.playQueue=W()(e=this.playQueue).call(e,1),this.updateSegments()}}},{key:"abortSegment",value:function(t,e){this.segmentRequest&&this.segmentRequest.url===t&&Kr(this.segmentRequest.segmentByteRange,e)&&(this.segmentRequest.onSuccess(undefined,0),this.segmentRequest=null)}},{key:"destroy",value:(r=l(d().mark((function m(){return d().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.segmentRequest&&(this.segmentRequest.onError("Loading aborted: object destroyed"),this.segmentRequest=null),this.masterPlaylist=null,this.variantPlaylists.clear(),this.playQueue=[],t.next=6,this.loader.destroy();case 6:case"end":return t.stop()}}),m,this)}))),function(){return r.apply(this,arguments)})},{key:"loadSegments",value:(n=l(d().mark((function b(t,e,n,r){var i,s,o,a,u,c,f,l,h,p,g,v,m,y,w,x,_=this;return d().wrap((function(d){for(;;)switch(d.prev=d.next){case 0:s=[],o=t.manifest.segments,a=null!==(i=t.manifest.mediaSequence)&&void 0!==i?i:0,u=null,c=Math.max(0,this.playQueue.length-1),f=this.getMasterId(),l=15,this.lastSegmentIndex=e,h=null,p=e;case 10:if(!(p=o.length)){d.next=13;break}return d.abrupt("break",30);case 13:if(g=t.manifest.segments[p],v=t.getSegmentAbsoluteUrl(g.uri),m=g.byteRange,y=a+p,w=3,this.mediaDownloader&&this.mediaDownloader.pauseP2p>0&&(w=4),d.t0=this.mediaDownloader,!d.t0){d.next=24;break}return d.next=23,this.mediaDownloader.getSegment(y);case 23:d.t0=d.sent;case 24:null==(x=d.t0)||null==x.data?s.push({force:r,required:r?p==e:p>=e&&p0&&this.mediaDownloader.download(s);case 31:case"end":return d.stop()}}),b,this)}))),function(t,e,r,i){return n.apply(this,arguments)})},{key:"initMediaDownloader",value:function(t,e){var n=arguments.length>2&&arguments[2]!==undefined?arguments[2]:0;wt("initMediaDownloader",t),null!=this.mediaDownloader&&this.options.destroyMediaDownloader(this.mediaDownloader),this.mediaDownloader=this.options.createMediaDownloader(t,e,n),this.initMediaEvent(this.mediaDownloader)}},{key:"initMediaEvent",value:function(t){t.on("segment-completed",this.onSegmentLoaded.bind(this)),t.on("segment-failed",this.onSegmentError.bind(this)),t.on("segment-timeout",this.onSegmentTimeout.bind(this))}},{key:"isCurrentRequiredSegment",value:function(t){return this.segmentRequest&&(this.segmentRequest.url===t.url&&zr(this.segmentRequest.segmentByteRange)===t.range||t.segmentId==this.segmentRequest.segmentSequence)}},{key:"onSegmentLoaded",value:function(t){this.isCurrentRequiredSegment(t)&&(this.lastSegmentIndex=-1,this.segmentRequest.onSuccess(t.data,t.downloadBandwidth),this.segmentRequest=null)}},{key:"onSegmentTimeout",value:function(t,e){wt("onSegmentTimeout",t,e),this.isCurrentRequiredSegment(t)&&(this.lastSegmentIndex=-1,this.segmentRequest.onTimeout(e),this.segmentRequest=null)}},{key:"onSegmentError",value:function(t,e){wt("onSegmentError",t,e),this.isCurrentRequiredSegment(t)&&(this.lastSegmentIndex=-1,this.segmentRequest.onError(e),this.segmentRequest=null)}},{key:"onSegmentAbort",value:function(t){isCurrentRequiredSegment(t)&&(this.lastSegmentIndex=-1,this.segmentRequest.onError("Loading aborted: internal abort"),this.segmentRequest=null)}},{key:"getMasterId",value:function(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:undefined,e=this.options.swarmId&&0!==this.options.swarmId.length?this.options.swarmId:undefined;return e!==undefined?e:null!=this.masterPlaylist?this.masterPlaylist.streamSwarmId:t}},{key:"loadContent",value:(e=l(d().mark((function w(t,e,n){return d().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",new(X())((function(r,i){var s=new XMLHttpRequest;s.open("GET",t,!0),s.responseType=e,n&&s.setRequestHeader("Range",n),s.addEventListener("readystatechange",(function(){4===s.readyState&&(s.status>=200&&s.status<300?r(s):i(s.statusText))})),s.send()})));case 1:case"end":return r.stop()}}),w)}))),function(t,n,r){return e.apply(this,arguments)})}]),t}();function ei(t,e){var n=j()(t);if(K()){var r=K()(t);e&&(r=bt()(r).call(r,(function(e){return Z()(t,e).enumerable}))),n.push.apply(n,r)}return n}function ni(t){for(var e=1;e0).then((function(e){null!=u&&clearTimeout(u),a||(a=!0,null!=e.content&&setTimeout((function(){return r.successSegment(e.content,t,n,i)}),0),s())}))["catch"]((function(e){null!=u&&clearTimeout(u),a||(a=!0,e&&"timeout"==e.status?setTimeout((function(){return r.timeoutSegment(t,n,i)}),0):setTimeout((function(){return r.error(e,t,n)}),0),s())}))}))}},{key:"successSegment",value:(e=l(d().mark((function o(t,e,n,r){return d().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:r.abort||(r.loading.first=r.loading.start+.01),r.chunkCount=0,r.loaded=t.byteLength,r.total=t.byteLength,r.loading.end=Math.max(performance.now(),r.loading.first),r.loading.end-r.loading.start<=0?r.bwEstimate=8e3*r.total/.1:r.bwEstimate=8e3*r.total/(r.loading.end-r.loading.first),this.lastDownloadBandwidth=r.bwEstimate,e.frag&&(e.frag.stats=r),wt("Current bandwidth",this.lastDownloadBandwidth),n&&n&&n.onProgress(r,e,t,{}),this.stats=r,n.onSuccess({code:200,url:e.url,data:t},r,e,{});case 12:case"end":return i.stop()}}),o,this)}))),function(t,n,r,i){return e.apply(this,arguments)})},{key:"error",value:function(t,e,n){e.frag&&(e.frag.stats=this.stats),this.stats.aborted||(console.log("ERROR",t),n.onError(t,e,undefined))}},{key:"timeoutSegment",value:function(t,e,n){t.frag&&(t.frag.stats=n),e.onTimeout(n,t,this)}},{key:"successPlaylist",value:function(t,e,n,r){r.loading.first=r.loading.start+.1,r.loaded=t.response.length,r.total=t.response.length,r.loading.end=performance.now(),e.frag&&null==e.frag.stats&&(e.frag.stats=r),r.loading.end-r.loading.start<=0?r.bwEstimate=8e3*r.total/.1:r.bwEstimate=8e3*r.total/(r.loading.end-r.loading.first),n.onProgress&&n.onProgress(r,e,t.response,t),this.stats=r,n.onSuccess({code:200,stats:r,url:t.responseURL,data:t.response},r,e,t)}}]),t}();function ii(t){var e=function(){if("undefined"==typeof Reflect||!m())return!1;if(m().sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(m()(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=L(t);if(e){var i=L(this).constructor;n=m()(r,arguments,i)}else n=r.apply(this,arguments);return C(this,n)}}var si,oi=function(t){O(r,t);var e,n=ii(r);function r(t,e){var i;return y(this,r),N(T(i=n.call(this)),"playerSegment",null),N(T(i),"videoId",void 0),N(T(i),"listener",void 0),N(T(i),"player",void 0),N(T(i),"totalSegments",void 0),window.currentTest=T(i),i.listener=e,i.videoId=t,i.totalSegments=0,i.playerSegment=new ti({createMediaDownloader:function(t,e,n){var r=t;null!=i.videoId&&(r=i.videoId);for(var s=r;s.length<40;)s+=r;i.totalSegments=n||0,s="74683033"+Zt(s+"_"+e);var o=It.lW.from(s,"hex"),a=new Nr(o);return i.test(a),function(t){var e=t.peer,n=t.mediaId,r=t.playlistId,i=t.totalSegment;Me.peer=e||Me.peer,Me.media_id=n||Me.media_id,Me.playlist_id=r||Me.playlist_id,Me.client_id=qe,Me.info={session_id:Fe,start:Be,current:performance.now(),total_segment:i}}({totalSegment:n||0,mediaId:i.videoId,playlistId:s,peer:a.p2p&&a.p2p.manager&&a.p2p.manager.clientId}),a},destroyMediaDownloader:function(t){t.destroy()}}),i}return E(r,[{key:"test",value:(e=l(d().mark((function i(t){var e,n,r,s,o,a,u,c,f,l=this;return d().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:e=0,n=0,r=0,s=0,o=0,a=0,u=0,c=0,f=function(){var i=[];try{c=Math.max(c,j()(t.p2p.manager.peers).length),0==a&&(a=player.getDuration()||0),u=Math.max(player.getCurrentTime()||0,u),i=t.p2p.listDownloadPeer}catch(h){}var f={duration:a,current:u,http_bytes:n,p2p_bytes:e,http_segments:s,p2p_segments:o,uploaded:r,total_segments:l.totalSegments,peers:i,total_peers:c};$e(Ge(f))},t.on("http-downloaded",(function(t){n+=t,l.listener&&l.listener.onHttpDownloaded&&l.listener.onHttpDownloaded(n),f()})),t.on("p2p-downloaded",(function(t){e+=t,l.listener&&l.listener.onP2pDownloaded&&l.listener.onP2pDownloaded(e),f()})),t.on("p2p-uploaded",(function(t){r+=t,l.listener&&l.listener.onUploaded&&l.listener.onUploaded(r),f()})),t.on("new-peer",(function(t){l.listener&&l.listener.onNewPeer&&l.listener.onNewPeer(t),f()})),t.on("close-peer",(function(t){l.listener&&l.listener.onRemovePeer&&l.listener.onRemovePeer(t),f()})),t.on("p2p-segment",(function(t){o+=1,f()})),t.on("http-segment",(function(t){s+=1,f()})),window.dwr=t;case 17:case"end":return i.stop()}}),i)}))),function(t){return e.apply(this,arguments)})},{key:"createLoaderClass",value:function(){var t=this;return ri.prototype.getPlayerSegment=function(){return t.playerSegment},ri}},{key:"setPlayingSegment",value:function(t,e,n,r){this.playerSegment.setPlayingSegment(t,e,n,r)}},{key:"setPlayingSegmentByCurrentTime",value:function(t){this.playerSegment.setPlayingSegmentByCurrentTime(t)}}],[{key:"isSupported",value:function(){return bn.WEBRTC_SUPPORT}}]),r}(q()),ai=(It.lW.from("afbba3c4a05a60da5fa7dc20248bf0ef3143bd2d","hex"),window.jwplayer,function(t){var e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{},n=e.videoId,r=e.trackers,i=void 0===r?[]:r,s=e.port,o=void 0===s?6881:s,a=e.listener,u=void 0===a?null:a;return null!=si&&si.destroy(),(si=new oi(n,u)).player=t,Wn.port=o,Wn.trackers=i,t.on("error",(function(t){null!=t&&$e(Xe(t&&t.code,Tt()(t)))})),t.on("complete",(function(){!function(){try{if(0==He.length)return;Qe(),Ke(He),He.length=0}catch(t){}}()})),wt("SETUP_DONE"),si.createLoaderClass()});window.process={browser:!0,env:{ENVIRONMENT:"BROWSER"}};var ui=function(){var t=l(d().mark((function e(){return d().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:null!=(qe=localStorage.getItem("xdv-uu"))&&""!=qe||(qe=qt(),localStorage.setItem("xdv-uu",qe)),window.addEventListener("error",(function(t){try{var e=t.message,n=t.filename,r=t.lineno,i=t.colno,s=t.error;if(-1==gt()(n).call(n,"pmediaplay"))return;var o=Tt()({message:e,filename:n,lineno:r,colno:i,stack:s&&s.stack});$e(Xe(s&&s.code||0,o))}catch(a){}})),ze(),We(),window.SetupP2pJwPlayer=ai,window.IsSupportP2p=oi.isSupported,window.P2PLog=function(t){"SETUP_FAILED"==t&&(wt(t),$e(Xe(t,"P2p setup failed")))},window.SetupJwPlayer=function(t,e){try{var n;if(!oi.isSupported())return wt("UNSUPPORT"),null;var r=e.trackers||[],i="wss://t2.webseeds.pm/ws".split(",");return 0==i.length&&(i=["wss://tracker.webtorrent.dev"]),wt("SETUP"),ai(t,{listener:e&&e.listener,videoId:e&&e.videoId||"",port:e&&e.port||6881,trackers:g()(n=[]).call(n,u(i),u(r))})}catch(s){return wt("SETUP ERROR",s),null}};case 5:case"end":return t.stop()}}),e)})));return function(){return t.apply(this,arguments)}}();ui()}(),s}()}));