mirror of
https://github.com/leoherzog/TorrentParts.git
synced 2026-01-24 04:08:04 -08:00
81 lines
472 KiB
JavaScript
81 lines
472 KiB
JavaScript
!function e(t,n,i){function s(a,o){if(!n[a]){if(!t[a]){var c="function"==typeof require&&require;if(!o&&c)return c(a,!0);if(r)return r(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var p=n[a]={exports:{}};t[a][0].call(p.exports,(function(e){return s(t[a][1][e]||e)}),p,p.exports,e,t,n,i)}return n[a].exports}for(var r="function"==typeof require&&require,a=0;a<i.length;a++)s(i[a]);return s}({1:[function(e,t,n){(function(e){(function(){void 0===e&&(e=void 0),function(){"use strict";void 0===e&&(e=Array),t.exports=e}()}).call(this)}).call(this,e("buffer").Buffer)},{buffer:59}],2:[function(e,t,n){const i=/^\[?([^\]]+)\]?:(\d+)$/;let s={},r=0;t.exports=function(e){if(1e5===r&&t.exports.reset(),!s[e]){const t=i.exec(e);if(!t)throw new Error("invalid addr: "+e);s[e]=[t[1],Number(t[2])],r+=1}return s[e]},t.exports.reset=function(){s={},r=0}},{}],3:[function(e,t,n){"use strict";n.byteLength=function(e){var t=l(e),n=t[0],i=t[1];return 3*(n+i)/4-i},n.toByteArray=function(e){var t,n,i=l(e),a=i[0],o=i[1],c=new r(function(e,t,n){return 3*(t+n)/4-n}(0,a,o)),p=0,u=o>0?a-4:a;for(n=0;n<u;n+=4)t=s[e.charCodeAt(n)]<<18|s[e.charCodeAt(n+1)]<<12|s[e.charCodeAt(n+2)]<<6|s[e.charCodeAt(n+3)],c[p++]=t>>16&255,c[p++]=t>>8&255,c[p++]=255&t;2===o&&(t=s[e.charCodeAt(n)]<<2|s[e.charCodeAt(n+1)]>>4,c[p++]=255&t);1===o&&(t=s[e.charCodeAt(n)]<<10|s[e.charCodeAt(n+1)]<<4|s[e.charCodeAt(n+2)]>>2,c[p++]=t>>8&255,c[p++]=255&t);return c},n.fromByteArray=function(e){for(var t,n=e.length,s=n%3,r=[],a=16383,o=0,c=n-s;o<c;o+=a)r.push(p(e,o,o+a>c?c:o+a));1===s?(t=e[n-1],r.push(i[t>>2]+i[t<<4&63]+"==")):2===s&&(t=(e[n-2]<<8)+e[n-1],r.push(i[t>>10]+i[t>>4&63]+i[t<<2&63]+"="));return r.join("")};for(var i=[],s=[],r="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,c=a.length;o<c;++o)i[o]=a[o],s[a.charCodeAt(o)]=o;function l(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function p(e,t,n){for(var s,r,a=[],o=t;o<n;o+=3)s=(e[o]<<16&16711680)+(e[o+1]<<8&65280)+(255&e[o+2]),a.push(i[(r=s)>>18&63]+i[r>>12&63]+i[r>>6&63]+i[63&r]);return a.join("")}s["-".charCodeAt(0)]=62,s["_".charCodeAt(0)]=63},{}],4:[function(e,t,n){var i=e("safe-buffer").Buffer;function s(e,t,n){for(var i=0,s=1,r=t;r<n;r++){var a=e[r];if(a<58&&a>=48)i=10*i+(a-48);else if(r!==t||43!==a){if(r!==t||45!==a){if(46===a)break;throw new Error("not a number: buffer["+r+"] = "+a)}s=-1}}return i*s}function r(e,t,n,s){return null==e||0===e.length?null:("number"!=typeof t&&null==s&&(s=t,t=void 0),"number"!=typeof n&&null==s&&(s=n,n=void 0),r.position=0,r.encoding=s||null,r.data=i.isBuffer(e)?e.slice(t,n):i.from(e),r.bytes=r.data.length,r.next())}r.bytes=0,r.position=0,r.data=null,r.encoding=null,r.next=function(){switch(r.data[r.position]){case 100:return r.dictionary();case 108:return r.list();case 105:return r.integer();default:return r.buffer()}},r.find=function(e){for(var t=r.position,n=r.data.length,i=r.data;t<n;){if(i[t]===e)return t;t++}throw new Error('Invalid data: Missing delimiter "'+String.fromCharCode(e)+'" [0x'+e.toString(16)+"]")},r.dictionary=function(){r.position++;for(var e={};101!==r.data[r.position];)e[r.buffer()]=r.next();return r.position++,e},r.list=function(){r.position++;for(var e=[];101!==r.data[r.position];)e.push(r.next());return r.position++,e},r.integer=function(){var e=r.find(101),t=s(r.data,r.position+1,e);return r.position+=e+1-r.position,t},r.buffer=function(){var e=r.find(58),t=s(r.data,r.position,e),n=++e+t;return r.position=n,r.encoding?r.data.toString(r.encoding,e,n):r.data.slice(e,n)},t.exports=r},{"safe-buffer":219}],5:[function(e,t,n){var i=e("safe-buffer").Buffer;function s(e,t,n){var r=[],a=null;return s._encode(r,e),a=i.concat(r),s.bytes=a.length,i.isBuffer(t)?(a.copy(t,n),t):a}s.bytes=-1,s._floatConversionDetected=!1,s.getType=function(e){return i.isBuffer(e)?"buffer":Array.isArray(e)?"array":ArrayBuffer.isView(e)?"arraybufferview":e instanceof Number?"number":e instanceof Boolean?"boolean":e instanceof ArrayBuffer?"arraybuffer":typeof e},s._encode=function(e,t){if(null!=t)switch(s.getType(t)){case"buffer":s.buffer(e,t);break;case"object":s.dict(e,t);break;case"array":s.list(e,t);break;case"string":s.string(e,t);break;case"number":case"boolean":s.number(e,t);break;case"arraybufferview":s.buffer(e,i.from(t.buffer,t.byteOffset,t.byteLength));break;case"arraybuffer":s.buffer(e,i.from(t))}};var r=i.from("e"),a=i.from("d"),o=i.from("l");s.buffer=function(e,t){e.push(i.from(t.length+":"),t)},s.string=function(e,t){e.push(i.from(i.byteLength(t)+":"+t))},s.number=function(e,t){var n=2147483648,r=(t/n<<0)*n+(t%n<<0);e.push(i.from("i"+r+"e")),r===t||s._floatConversionDetected||(s._floatConversionDetected=!0,console.warn('WARNING: Possible data corruption detected with value "'+t+'":','Bencoding only defines support for integers, value was converted to "'+r+'"'),console.trace())},s.dict=function(e,t){e.push(a);for(var n,i=0,o=Object.keys(t).sort(),c=o.length;i<c;i++)null!=t[n=o[i]]&&(s.string(e,n),s._encode(e,t[n]));e.push(r)},s.list=function(e,t){var n=0,i=t.length;for(e.push(o);n<i;n++)null!=t[n]&&s._encode(e,t[n]);e.push(r)},t.exports=s},{"safe-buffer":219}],6:[function(e,t,n){var i=t.exports;i.encode=e("./encode"),i.decode=e("./decode"),i.byteLength=i.encodingLength=function(e){return i.encode(e).length}},{"./decode":4,"./encode":5}],7:[function(e,t,n){function i(e){return e.reduce(((e,t,n,i)=>{const s=t.split("-").map((e=>parseInt(e)));return e.concat(((e,t=e)=>Array.from({length:t-e+1},((t,n)=>n+e)))(...s))}),[])}t.exports=i,t.exports.parse=i,t.exports.compose=function(e){return e.reduce(((e,t,n,i)=>(0!==n&&t===i[n-1]+1||e.push([]),e[e.length-1].push(t),e)),[]).map((e=>e.length>1?`${e[0]}-${e[e.length-1]}`:""+e[0]))}},{}],8:[function(e,t,n){t.exports=function(e,t,n,i,s){var r,a;if(void 0===i)i=0;else if((i|=0)<0||i>=e.length)throw new RangeError("invalid lower bound");if(void 0===s)s=e.length-1;else if((s|=0)<i||s>=e.length)throw new RangeError("invalid upper bound");for(;i<=s;)if((a=+n(e[r=i+(s-i>>>1)],t,r,e))<0)i=r+1;else{if(!(a>0))return r;s=r-1}return~i}},{}],9:[function(e,t,n){function i(e){let t=e>>3;return e%8!=0&&t++,t}void 0!==t&&(t.exports=class{constructor(e=0,t){const n=null!=t&&t.grow;this.grow=n&&isFinite(n)&&i(n)||n||0,this.buffer="number"==typeof e?new Uint8Array(i(e)):e}get(e){const t=e>>3;return t<this.buffer.length&&!!(this.buffer[t]&128>>e%8)}set(e,t=!0){const n=e>>3;if(t){if(this.buffer.length<n+1){const e=Math.max(n+1,Math.min(2*this.buffer.length,this.grow));if(e<=this.grow){const t=new Uint8Array(e);t.set(this.buffer),this.buffer=t}}this.buffer[n]|=128>>e%8}else n<this.buffer.length&&(this.buffer[n]&=~(128>>e%8))}})},{}],10:[function(e,t,n){(function(n){(function(){
|
||
/*! bittorrent-protocol. MIT License. WebTorrent LLC <https://webtorrent.io/opensource> */
|
||
const i=e("unordered-array-remove"),s=e("bencode"),r=e("bitfield").default,a=e("debug")("bittorrent-protocol"),o=e("randombytes"),c=e("speedometer"),l=e("readable-stream"),p=n.from("BitTorrent protocol"),u=n.from([0,0,0,0]),d=n.from([0,0,0,1,0]),h=n.from([0,0,0,1,1]),f=n.from([0,0,0,1,2]),m=n.from([0,0,0,1,3]),g=[0,0,0,0,0,0,0,0],v=[0,0,0,3,9,0,0];class b{constructor(e,t,n,i){this.piece=e,this.offset=t,this.length=n,this.callback=i}}class x extends l.Duplex{constructor(){super(),this._debugId=o(4).toString("hex"),this._debug("new wire"),this.peerId=null,this.peerIdBuffer=null,this.type=null,this.amChoking=!0,this.amInterested=!1,this.peerChoking=!0,this.peerInterested=!1,this.peerPieces=new r(0,{grow:4e5}),this.peerExtensions={},this.requests=[],this.peerRequests=[],this.extendedMapping={},this.peerExtendedMapping={},this.extendedHandshake={},this.peerExtendedHandshake={},this._ext={},this._nextExt=1,this.uploaded=0,this.downloaded=0,this.uploadSpeed=c(),this.downloadSpeed=c(),this._keepAliveInterval=null,this._timeout=null,this._timeoutMs=0,this.destroyed=!1,this._finished=!1,this._parserSize=0,this._parser=null,this._buffer=[],this._bufferSize=0,this.once("finish",(()=>this._onFinish())),this._parseHandshake()}setKeepAlive(e){this._debug("setKeepAlive %s",e),clearInterval(this._keepAliveInterval),!1!==e&&(this._keepAliveInterval=setInterval((()=>{this.keepAlive()}),55e3))}setTimeout(e,t){this._debug("setTimeout ms=%d unref=%s",e,t),this._clearTimeout(),this._timeoutMs=e,this._timeoutUnref=!!t,this._updateTimeout()}destroy(){this.destroyed||(this.destroyed=!0,this._debug("destroy"),this.emit("close"),this.end())}end(...e){this._debug("end"),this._onUninterested(),this._onChoke(),super.end(...e)}use(e){const t=e.prototype.name;if(!t)throw new Error('Extension class requires a "name" property on the prototype');this._debug("use extension.name=%s",t);const n=this._nextExt,i=new e(this);function s(){}"function"!=typeof i.onHandshake&&(i.onHandshake=s),"function"!=typeof i.onExtendedHandshake&&(i.onExtendedHandshake=s),"function"!=typeof i.onMessage&&(i.onMessage=s),this.extendedMapping[n]=t,this._ext[t]=i,this[t]=i,this._nextExt+=1}keepAlive(){this._debug("keep-alive"),this._push(u)}handshake(e,t,i){let s,r;if("string"==typeof e?(e=e.toLowerCase(),s=n.from(e,"hex")):(s=e,e=s.toString("hex")),"string"==typeof t?r=n.from(t,"hex"):(r=t,t=r.toString("hex")),20!==s.length||20!==r.length)throw new Error("infoHash and peerId MUST have length 20");this._debug("handshake i=%s p=%s exts=%o",e,t,i);const a=n.from(g);a[5]|=16,i&&i.dht&&(a[7]|=1),this._push(n.concat([p,a,s,r])),this._handshakeSent=!0,this.peerExtensions.extended&&!this._extendedHandshakeSent&&this._sendExtendedHandshake()}_sendExtendedHandshake(){const e=Object.assign({},this.extendedHandshake);e.m={};for(const t in this.extendedMapping){const n=this.extendedMapping[t];e.m[n]=Number(t)}this.extended(0,s.encode(e)),this._extendedHandshakeSent=!0}choke(){if(!this.amChoking){for(this.amChoking=!0,this._debug("choke");this.peerRequests.length;)this.peerRequests.pop();this._push(d)}}unchoke(){this.amChoking&&(this.amChoking=!1,this._debug("unchoke"),this._push(h))}interested(){this.amInterested||(this.amInterested=!0,this._debug("interested"),this._push(f))}uninterested(){this.amInterested&&(this.amInterested=!1,this._debug("uninterested"),this._push(m))}have(e){this._debug("have %d",e),this._message(4,[e],null)}bitfield(e){this._debug("bitfield"),n.isBuffer(e)||(e=e.buffer),this._message(5,[],e)}request(e,t,n,i){return i||(i=()=>{}),this._finished?i(new Error("wire is closed")):this.peerChoking?i(new Error("peer is choking")):(this._debug("request index=%d offset=%d length=%d",e,t,n),this.requests.push(new b(e,t,n,i)),this._updateTimeout(),void this._message(6,[e,t,n],null))}piece(e,t,n){this._debug("piece index=%d offset=%d",e,t),this.uploaded+=n.length,this.uploadSpeed(n.length),this.emit("upload",n.length),this._message(7,[e,t],n)}cancel(e,t,n){this._debug("cancel index=%d offset=%d length=%d",e,t,n),this._callback(this._pull(this.requests,e,t,n),new Error("request was cancelled"),null),this._message(8,[e,t,n],null)}port(e){this._debug("port %d",e);const t=n.from(v);t.writeUInt16BE(e,5),this._push(t)}extended(e,t){if(this._debug("extended ext=%s",e),"string"==typeof e&&this.peerExtendedMapping[e]&&(e=this.peerExtendedMapping[e]),"number"!=typeof e)throw new Error("Unrecognized extension: "+e);{const i=n.from([e]),r=n.isBuffer(t)?t:s.encode(t);this._message(20,[],n.concat([i,r]))}}_read(){}_message(e,t,i){const s=i?i.length:0,r=n.allocUnsafe(5+4*t.length);r.writeUInt32BE(r.length+s-4,0),r[4]=e;for(let e=0;e<t.length;e++)r.writeUInt32BE(t[e],5+4*e);this._push(r),i&&this._push(i)}_push(e){if(!this._finished)return this.push(e)}_onKeepAlive(){this._debug("got keep-alive"),this.emit("keep-alive")}_onHandshake(e,t,n){const i=e.toString("hex"),s=t.toString("hex");let r;for(r in this._debug("got handshake i=%s p=%s exts=%o",i,s,n),this.peerId=s,this.peerIdBuffer=t,this.peerExtensions=n,this.emit("handshake",i,s,n),this._ext)this._ext[r].onHandshake(i,s,n);n.extended&&this._handshakeSent&&!this._extendedHandshakeSent&&this._sendExtendedHandshake()}_onChoke(){for(this.peerChoking=!0,this._debug("got choke"),this.emit("choke");this.requests.length;)this._callback(this.requests.pop(),new Error("peer is choking"),null)}_onUnchoke(){this.peerChoking=!1,this._debug("got unchoke"),this.emit("unchoke")}_onInterested(){this.peerInterested=!0,this._debug("got interested"),this.emit("interested")}_onUninterested(){this.peerInterested=!1,this._debug("got uninterested"),this.emit("uninterested")}_onHave(e){this.peerPieces.get(e)||(this._debug("got have %d",e),this.peerPieces.set(e,!0),this.emit("have",e))}_onBitField(e){this.peerPieces=new r(e),this._debug("got bitfield"),this.emit("bitfield",this.peerPieces)}_onRequest(e,t,n){if(this.amChoking)return;this._debug("got request index=%d offset=%d length=%d",e,t,n);const i=(i,r)=>{if(s===this._pull(this.peerRequests,e,t,n))return i?this._debug("error satisfying request index=%d offset=%d length=%d (%s)",e,t,n,i.message):void this.piece(e,t,r)},s=new b(e,t,n,i);this.peerRequests.push(s),this.emit("request",e,t,n,i)}_onPiece(e,t,n){this._debug("got piece index=%d offset=%d",e,t),this._callback(this._pull(this.requests,e,t,n.length),null,n),this.downloaded+=n.length,this.downloadSpeed(n.length),this.emit("download",n.length),this.emit("piece",e,t,n)}_onCancel(e,t,n){this._debug("got cancel index=%d offset=%d length=%d",e,t,n),this._pull(this.peerRequests,e,t,n),this.emit("cancel",e,t,n)}_onPort(e){this._debug("got port %d",e),this.emit("port",e)}_onExtended(e,t){if(0===e){let e,n;try{e=s.decode(t)}catch(e){this._debug("ignoring invalid extended handshake: %s",e.message||e)}if(!e)return;if(this.peerExtendedHandshake=e,"object"==typeof e.m)for(n in e.m)this.peerExtendedMapping[n]=Number(e.m[n].toString());for(n in this._ext)this.peerExtendedMapping[n]&&this._ext[n].onExtendedHandshake(this.peerExtendedHandshake);this._debug("got extended handshake"),this.emit("extended","handshake",this.peerExtendedHandshake)}else this.extendedMapping[e]&&(e=this.extendedMapping[e],this._ext[e]&&this._ext[e].onMessage(t)),this._debug("got extended message ext=%s",e),this.emit("extended",e,t)}_onTimeout(){this._debug("request timed out"),this._callback(this.requests.shift(),new Error("request has timed out"),null),this.emit("timeout")}_write(e,t,i){for(this._bufferSize+=e.length,this._buffer.push(e);this._bufferSize>=this._parserSize;){const e=1===this._buffer.length?this._buffer[0]:n.concat(this._buffer);this._bufferSize-=this._parserSize,this._buffer=this._bufferSize?[e.slice(this._parserSize)]:[],this._parser(e.slice(0,this._parserSize))}i(null)}_callback(e,t,n){e&&(this._clearTimeout(),this.peerChoking||this._finished||this._updateTimeout(),e.callback(t,n))}_clearTimeout(){this._timeout&&(clearTimeout(this._timeout),this._timeout=null)}_updateTimeout(){this._timeoutMs&&this.requests.length&&!this._timeout&&(this._timeout=setTimeout((()=>this._onTimeout()),this._timeoutMs),this._timeoutUnref&&this._timeout.unref&&this._timeout.unref())}_parse(e,t){this._parserSize=e,this._parser=t}_onMessageLength(e){const t=e.readUInt32BE(0);t>0?this._parse(t,this._onMessage):(this._onKeepAlive(),this._parse(4,this._onMessageLength))}_onMessage(e){switch(this._parse(4,this._onMessageLength),e[0]){case 0:return this._onChoke();case 1:return this._onUnchoke();case 2:return this._onInterested();case 3:return this._onUninterested();case 4:return this._onHave(e.readUInt32BE(1));case 5:return this._onBitField(e.slice(1));case 6:return this._onRequest(e.readUInt32BE(1),e.readUInt32BE(5),e.readUInt32BE(9));case 7:return this._onPiece(e.readUInt32BE(1),e.readUInt32BE(5),e.slice(9));case 8:return this._onCancel(e.readUInt32BE(1),e.readUInt32BE(5),e.readUInt32BE(9));case 9:return this._onPort(e.readUInt16BE(1));case 20:return this._onExtended(e.readUInt8(1),e.slice(2));default:return this._debug("got unknown message"),this.emit("unknownmessage",e)}}_parseHandshake(){this._parse(1,(e=>{const t=e.readUInt8(0);this._parse(t+48,(e=>{const n=e.slice(0,t);if("BitTorrent protocol"!==n.toString())return this._debug("Error: wire not speaking BitTorrent protocol (%s)",n.toString()),void this.end();e=e.slice(t),this._onHandshake(e.slice(8,28),e.slice(28,48),{dht:!!(1&e[7]),extended:!!(16&e[5])}),this._parse(4,this._onMessageLength)}))}))}_onFinish(){for(this._finished=!0,this.push(null);this.read(););for(clearInterval(this._keepAliveInterval),this._parse(Number.MAX_VALUE,(()=>{}));this.peerRequests.length;)this.peerRequests.pop();for(;this.requests.length;)this._callback(this.requests.pop(),new Error("wire was closed"),null)}_debug(...e){e[0]=`[${this._debugId}] ${e[0]}`,a(...e)}_pull(e,t,n,s){for(let r=0;r<e.length;r++){const a=e[r];if(a.piece===t&&a.offset===n&&a.length===s)return i(e,r),a}return null}}t.exports=x}).call(this)}).call(this,e("buffer").Buffer)},{bencode:6,bitfield:11,buffer:59,debug:12,randombytes:194,"readable-stream":29,speedometer:262,"unordered-array-remove":296}],11:[function(e,t,n){"use strict";function i(e){var t=e>>3;return e%8!=0&&t++,t}Object.defineProperty(n,"__esModule",{value:!0});var s=function(){function e(e,t){void 0===e&&(e=0);var n=null==t?void 0:t.grow;this.grow=n&&isFinite(n)&&i(n)||n||0,this.buffer="number"==typeof e?new Uint8Array(i(e)):e}return e.prototype.get=function(e){var t=e>>3;return t<this.buffer.length&&!!(this.buffer[t]&128>>e%8)},e.prototype.set=function(e,t){void 0===t&&(t=!0);var n=e>>3;if(t){if(this.buffer.length<n+1){var i=Math.max(n+1,Math.min(2*this.buffer.length,this.grow));if(i<=this.grow){var s=new Uint8Array(i);s.set(this.buffer),this.buffer=s}}this.buffer[n]|=128>>e%8}else n<this.buffer.length&&(this.buffer[n]&=~(128>>e%8))},e.prototype.forEach=function(e,t,n){void 0===t&&(t=0),void 0===n&&(n=8*this.buffer.length);for(var i=t,s=i>>3,r=128>>i%8,a=this.buffer[s];i<n;i++)e(!!(a&r),i),r=1===r?(a=this.buffer[++s],128):r>>1},e}();n.default=s},{}],12:[function(e,t,n){(function(i){(function(){n.formatArgs=function(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+t.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;e.splice(1,0,n,"color: inherit");let i=0,s=0;e[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(i++,"%c"===e&&(s=i))})),e.splice(s,0,n)},n.save=function(e){try{e?n.storage.setItem("debug",e):n.storage.removeItem("debug")}catch(e){}},n.load=function(){let e;try{e=n.storage.getItem("debug")}catch(e){}!e&&void 0!==i&&"env"in i&&(e=i.env.DEBUG);return e},n.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},n.storage=function(){try{return localStorage}catch(e){}}(),n.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],n.log=console.debug||console.log||(()=>{}),t.exports=e("./common")(n);const{formatters:s}=t.exports;s.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}).call(this)}).call(this,e("_process"))},{"./common":13,_process:186}],13:[function(e,t,n){t.exports=function(t){function n(e){let t;function r(...e){if(!r.enabled)return;const i=r,s=Number(new Date),a=s-(t||s);i.diff=a,i.prev=t,i.curr=s,t=s,e[0]=n.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let o=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((t,s)=>{if("%%"===t)return t;o++;const r=n.formatters[s];if("function"==typeof r){const n=e[o];t=r.call(i,n),e.splice(o,1),o--}return t})),n.formatArgs.call(i,e);(i.log||n.log).apply(i,e)}return r.namespace=e,r.enabled=n.enabled(e),r.useColors=n.useColors(),r.color=n.selectColor(e),r.destroy=i,r.extend=s,"function"==typeof n.init&&n.init(r),n.instances.push(r),r}function i(){const e=n.instances.indexOf(this);return-1!==e&&(n.instances.splice(e,1),!0)}function s(e,t){const i=n(this.namespace+(void 0===t?":":t)+e);return i.log=this.log,i}function r(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return n.debug=n,n.default=n,n.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},n.disable=function(){const e=[...n.names.map(r),...n.skips.map(r).map((e=>"-"+e))].join(",");return n.enable(""),e},n.enable=function(e){let t;n.save(e),n.names=[],n.skips=[];const i=("string"==typeof e?e:"").split(/[\s,]+/),s=i.length;for(t=0;t<s;t++)i[t]&&("-"===(e=i[t].replace(/\*/g,".*?"))[0]?n.skips.push(new RegExp("^"+e.substr(1)+"$")):n.names.push(new RegExp("^"+e+"$")));for(t=0;t<n.instances.length;t++){const e=n.instances[t];e.enabled=n.enabled(e.namespace)}},n.enabled=function(e){if("*"===e[e.length-1])return!0;let t,i;for(t=0,i=n.skips.length;t<i;t++)if(n.skips[t].test(e))return!1;for(t=0,i=n.names.length;t<i;t++)if(n.names[t].test(e))return!0;return!1},n.humanize=e("ms"),Object.keys(t).forEach((e=>{n[e]=t[e]})),n.instances=[],n.names=[],n.skips=[],n.formatters={},n.selectColor=function(e){let t=0;for(let n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t|=0;return n.colors[Math.abs(t)%n.colors.length]},n.enable(n.load()),n}},{ms:14}],14:[function(e,t,n){var i=1e3,s=60*i,r=60*s,a=24*r,o=7*a,c=365.25*a;function l(e,t,n,i){var s=t>=1.5*n;return Math.round(e/n)+" "+i+(s?"s":"")}t.exports=function(e,t){t=t||{};var n=typeof e;if("string"===n&&e.length>0)return function(e){if((e=String(e)).length>100)return;var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!t)return;var n=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return n*c;case"weeks":case"week":case"w":return n*o;case"days":case"day":case"d":return n*a;case"hours":case"hour":case"hrs":case"hr":case"h":return n*r;case"minutes":case"minute":case"mins":case"min":case"m":return n*s;case"seconds":case"second":case"secs":case"sec":case"s":return n*i;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}(e);if("number"===n&&isFinite(e))return t.long?function(e){var t=Math.abs(e);if(t>=a)return l(e,t,a,"day");if(t>=r)return l(e,t,r,"hour");if(t>=s)return l(e,t,s,"minute");if(t>=i)return l(e,t,i,"second");return e+" ms"}(e):function(e){var t=Math.abs(e);if(t>=a)return Math.round(e/a)+"d";if(t>=r)return Math.round(e/r)+"h";if(t>=s)return Math.round(e/s)+"m";if(t>=i)return Math.round(e/i)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},{}],15:[function(e,t,n){"use strict";var i={};function s(e,t,n){n||(n=Error);var s=function(e){var n,i;function s(n,i,s){return e.call(this,function(e,n,i){return"string"==typeof t?t:t(e,n,i)}(n,i,s))||this}return i=e,(n=s).prototype=Object.create(i.prototype),n.prototype.constructor=n,n.__proto__=i,s}(n);s.prototype.name=n.name,s.prototype.code=e,i[e]=s}function r(e,t){if(Array.isArray(e)){var n=e.length;return e=e.map((function(e){return String(e)})),n>2?"one of ".concat(t," ").concat(e.slice(0,n-1).join(", "),", or ")+e[n-1]:2===n?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}s("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),s("ERR_INVALID_ARG_TYPE",(function(e,t,n){var i,s,a,o;if("string"==typeof t&&(s="not ",t.substr(!a||a<0?0:+a,s.length)===s)?(i="must not be",t=t.replace(/^not /,"")):i="must be",function(e,t,n){return(void 0===n||n>e.length)&&(n=e.length),e.substring(n-t.length,n)===t}(e," argument"))o="The ".concat(e," ").concat(i," ").concat(r(t,"type"));else{var c=function(e,t,n){return"number"!=typeof n&&(n=0),!(n+t.length>e.length)&&-1!==e.indexOf(t,n)}(e,".")?"property":"argument";o='The "'.concat(e,'" ').concat(c," ").concat(i," ").concat(r(t,"type"))}return o+=". Received type ".concat(typeof n)}),TypeError),s("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),s("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),s("ERR_STREAM_PREMATURE_CLOSE","Premature close"),s("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),s("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),s("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),s("ERR_STREAM_WRITE_AFTER_END","write after end"),s("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),s("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),s("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),t.exports.codes=i},{}],16:[function(e,t,n){(function(n){(function(){"use strict";var i=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};t.exports=l;var s=e("./_stream_readable"),r=e("./_stream_writable");e("inherits")(l,s);for(var a=i(r.prototype),o=0;o<a.length;o++){var c=a[o];l.prototype[c]||(l.prototype[c]=r.prototype[c])}function l(e){if(!(this instanceof l))return new l(e);s.call(this,e),r.call(this,e),this.allowHalfOpen=!0,e&&(!1===e.readable&&(this.readable=!1),!1===e.writable&&(this.writable=!1),!1===e.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",p)))}function p(){this._writableState.ended||n.nextTick(u,this)}function u(e){e.end()}Object.defineProperty(l.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(l.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(l.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(l.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}})}).call(this)}).call(this,e("_process"))},{"./_stream_readable":18,"./_stream_writable":20,_process:186,inherits:118}],17:[function(e,t,n){"use strict";t.exports=s;var i=e("./_stream_transform");function s(e){if(!(this instanceof s))return new s(e);i.call(this,e)}e("inherits")(s,i),s.prototype._transform=function(e,t,n){n(null,e)}},{"./_stream_transform":19,inherits:118}],18:[function(e,t,n){(function(n,i){(function(){"use strict";var s;t.exports=S,S.ReadableState=E;e("events").EventEmitter;var r=function(e,t){return e.listeners(t).length},a=e("./internal/streams/stream"),o=e("buffer").Buffer,c=i.Uint8Array||function(){};var l,p=e("util");l=p&&p.debuglog?p.debuglog("stream"):function(){};var u,d,h,f=e("./internal/streams/buffer_list"),m=e("./internal/streams/destroy"),g=e("./internal/streams/state").getHighWaterMark,v=e("../errors").codes,b=v.ERR_INVALID_ARG_TYPE,x=v.ERR_STREAM_PUSH_AFTER_EOF,_=v.ERR_METHOD_NOT_IMPLEMENTED,y=v.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;e("inherits")(S,a);var w=m.errorOrDestroy,k=["error","close","destroy","pause","resume"];function E(t,n,i){s=s||e("./_stream_duplex"),t=t||{},"boolean"!=typeof i&&(i=n instanceof s),this.objectMode=!!t.objectMode,i&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=g(this,t,"readableHighWaterMark",i),this.buffer=new f,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(u||(u=e("string_decoder/").StringDecoder),this.decoder=new u(t.encoding),this.encoding=t.encoding)}function S(t){if(s=s||e("./_stream_duplex"),!(this instanceof S))return new S(t);var n=this instanceof s;this._readableState=new E(t,this,n),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),a.call(this)}function C(e,t,n,i,s){l("readableAddChunk",t);var r,a=e._readableState;if(null===t)a.reading=!1,function(e,t){if(l("onEofChunk"),t.ended)return;if(t.decoder){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,t.sync?L(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,I(e)))}(e,a);else if(s||(r=function(e,t){var n;i=t,o.isBuffer(i)||i instanceof c||"string"==typeof t||void 0===t||e.objectMode||(n=new b("chunk",["string","Buffer","Uint8Array"],t));var i;return n}(a,t)),r)w(e,r);else if(a.objectMode||t&&t.length>0)if("string"==typeof t||a.objectMode||Object.getPrototypeOf(t)===o.prototype||(t=function(e){return o.from(e)}(t)),i)a.endEmitted?w(e,new y):T(e,a,t,!0);else if(a.ended)w(e,new x);else{if(a.destroyed)return!1;a.reading=!1,a.decoder&&!n?(t=a.decoder.write(t),a.objectMode||0!==t.length?T(e,a,t,!1):R(e,a)):T(e,a,t,!1)}else i||(a.reading=!1,R(e,a));return!a.ended&&(a.length<a.highWaterMark||0===a.length)}function T(e,t,n,i){t.flowing&&0===t.length&&!t.sync?(t.awaitDrain=0,e.emit("data",n)):(t.length+=t.objectMode?1:n.length,i?t.buffer.unshift(n):t.buffer.push(n),t.needReadable&&L(e)),R(e,t)}Object.defineProperty(S.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),S.prototype.destroy=m.destroy,S.prototype._undestroy=m.undestroy,S.prototype._destroy=function(e,t){t(e)},S.prototype.push=function(e,t){var n,i=this._readableState;return i.objectMode?n=!0:"string"==typeof e&&((t=t||i.defaultEncoding)!==i.encoding&&(e=o.from(e,t),t=""),n=!0),C(this,e,t,!1,n)},S.prototype.unshift=function(e){return C(this,e,null,!0,!1)},S.prototype.isPaused=function(){return!1===this._readableState.flowing},S.prototype.setEncoding=function(t){u||(u=e("string_decoder/").StringDecoder);var n=new u(t);this._readableState.decoder=n,this._readableState.encoding=this._readableState.decoder.encoding;for(var i=this._readableState.buffer.head,s="";null!==i;)s+=n.write(i.data),i=i.next;return this._readableState.buffer.clear(),""!==s&&this._readableState.buffer.push(s),this._readableState.length=s.length,this};var j=1073741824;function A(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=j?e=j:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function L(e){var t=e._readableState;l("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(l("emitReadable",t.flowing),t.emittedReadable=!0,n.nextTick(I,e))}function I(e){var t=e._readableState;l("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,P(e)}function R(e,t){t.readingMore||(t.readingMore=!0,n.nextTick(B,e,t))}function B(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&0===t.length);){var n=t.length;if(l("maybeReadMore read 0"),e.read(0),n===t.length)break}t.readingMore=!1}function O(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function U(e){l("readable nexttick read 0"),e.read(0)}function M(e,t){l("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),P(e),t.flowing&&!t.reading&&e.read(0)}function P(e){var t=e._readableState;for(l("flow",t.flowing);t.flowing&&null!==e.read(););}function N(e,t){return 0===t.length?null:(t.objectMode?n=t.buffer.shift():!e||e>=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):n=t.buffer.consume(e,t.decoder),n);var n}function q(e){var t=e._readableState;l("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,n.nextTick(H,t,e))}function H(e,t){if(l("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var n=t._writableState;(!n||n.autoDestroy&&n.finished)&&t.destroy()}}function D(e,t){for(var n=0,i=e.length;n<i;n++)if(e[n]===t)return n;return-1}S.prototype.read=function(e){l("read",e),e=parseInt(e,10);var t=this._readableState,n=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&((0!==t.highWaterMark?t.length>=t.highWaterMark:t.length>0)||t.ended))return l("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?q(this):L(this),null;if(0===(e=A(e,t))&&t.ended)return 0===t.length&&q(this),null;var i,s=t.needReadable;return l("need readable",s),(0===t.length||t.length-e<t.highWaterMark)&&l("length less than watermark",s=!0),t.ended||t.reading?l("reading or ended",s=!1):s&&(l("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=A(n,t))),null===(i=e>0?N(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&q(this)),null!==i&&this.emit("data",i),i},S.prototype._read=function(e){w(this,new _("_read()"))},S.prototype.pipe=function(e,t){var i=this,s=this._readableState;switch(s.pipesCount){case 0:s.pipes=e;break;case 1:s.pipes=[s.pipes,e];break;default:s.pipes.push(e)}s.pipesCount+=1,l("pipe count=%d opts=%j",s.pipesCount,t);var a=(!t||!1!==t.end)&&e!==n.stdout&&e!==n.stderr?c:g;function o(t,n){l("onunpipe"),t===i&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,l("cleanup"),e.removeListener("close",f),e.removeListener("finish",m),e.removeListener("drain",p),e.removeListener("error",h),e.removeListener("unpipe",o),i.removeListener("end",c),i.removeListener("end",g),i.removeListener("data",d),u=!0,!s.awaitDrain||e._writableState&&!e._writableState.needDrain||p())}function c(){l("onend"),e.end()}s.endEmitted?n.nextTick(a):i.once("end",a),e.on("unpipe",o);var p=function(e){return function(){var t=e._readableState;l("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&r(e,"data")&&(t.flowing=!0,P(e))}}(i);e.on("drain",p);var u=!1;function d(t){l("ondata");var n=e.write(t);l("dest.write",n),!1===n&&((1===s.pipesCount&&s.pipes===e||s.pipesCount>1&&-1!==D(s.pipes,e))&&!u&&(l("false write response, pause",s.awaitDrain),s.awaitDrain++),i.pause())}function h(t){l("onerror",t),g(),e.removeListener("error",h),0===r(e,"error")&&w(e,t)}function f(){e.removeListener("finish",m),g()}function m(){l("onfinish"),e.removeListener("close",f),g()}function g(){l("unpipe"),i.unpipe(e)}return i.on("data",d),function(e,t,n){if("function"==typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}(e,"error",h),e.once("close",f),e.once("finish",m),e.emit("pipe",i),s.flowing||(l("pipe resume"),i.resume()),e},S.prototype.unpipe=function(e){var t=this._readableState,n={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,n)),this;if(!e){var i=t.pipes,s=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var r=0;r<s;r++)i[r].emit("unpipe",this,{hasUnpiped:!1});return this}var a=D(t.pipes,e);return-1===a||(t.pipes.splice(a,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,n)),this},S.prototype.on=function(e,t){var i=a.prototype.on.call(this,e,t),s=this._readableState;return"data"===e?(s.readableListening=this.listenerCount("readable")>0,!1!==s.flowing&&this.resume()):"readable"===e&&(s.endEmitted||s.readableListening||(s.readableListening=s.needReadable=!0,s.flowing=!1,s.emittedReadable=!1,l("on readable",s.length,s.reading),s.length?L(this):s.reading||n.nextTick(U,this))),i},S.prototype.addListener=S.prototype.on,S.prototype.removeListener=function(e,t){var i=a.prototype.removeListener.call(this,e,t);return"readable"===e&&n.nextTick(O,this),i},S.prototype.removeAllListeners=function(e){var t=a.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||n.nextTick(O,this),t},S.prototype.resume=function(){var e=this._readableState;return e.flowing||(l("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,n.nextTick(M,e,t))}(this,e)),e.paused=!1,this},S.prototype.pause=function(){return l("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(l("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},S.prototype.wrap=function(e){var t=this,n=this._readableState,i=!1;for(var s in e.on("end",(function(){if(l("wrapped end"),n.decoder&&!n.ended){var e=n.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(s){(l("wrapped data"),n.decoder&&(s=n.decoder.write(s)),n.objectMode&&null==s)||(n.objectMode||s&&s.length)&&(t.push(s)||(i=!0,e.pause()))})),e)void 0===this[s]&&"function"==typeof e[s]&&(this[s]=function(t){return function(){return e[t].apply(e,arguments)}}(s));for(var r=0;r<k.length;r++)e.on(k[r],this.emit.bind(this,k[r]));return this._read=function(t){l("wrapped _read",t),i&&(i=!1,e.resume())},this},"function"==typeof Symbol&&(S.prototype[Symbol.asyncIterator]=function(){return void 0===d&&(d=e("./internal/streams/async_iterator")),d(this)}),Object.defineProperty(S.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(S.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(S.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}}),S._fromList=N,Object.defineProperty(S.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(S.from=function(t,n){return void 0===h&&(h=e("./internal/streams/from")),h(S,t,n)})}).call(this)}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../errors":15,"./_stream_duplex":16,"./internal/streams/async_iterator":21,"./internal/streams/buffer_list":22,"./internal/streams/destroy":23,"./internal/streams/from":25,"./internal/streams/state":27,"./internal/streams/stream":28,_process:186,buffer:59,events:97,inherits:118,"string_decoder/":285,util:54}],19:[function(e,t,n){"use strict";t.exports=p;var i=e("../errors").codes,s=i.ERR_METHOD_NOT_IMPLEMENTED,r=i.ERR_MULTIPLE_CALLBACK,a=i.ERR_TRANSFORM_ALREADY_TRANSFORMING,o=i.ERR_TRANSFORM_WITH_LENGTH_0,c=e("./_stream_duplex");function l(e,t){var n=this._transformState;n.transforming=!1;var i=n.writecb;if(null===i)return this.emit("error",new r);n.writechunk=null,n.writecb=null,null!=t&&this.push(t),i(e);var s=this._readableState;s.reading=!1,(s.needReadable||s.length<s.highWaterMark)&&this._read(s.highWaterMark)}function p(e){if(!(this instanceof p))return new p(e);c.call(this,e),this._transformState={afterTransform:l.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",u)}function u(){var e=this;"function"!=typeof this._flush||this._readableState.destroyed?d(this,null,null):this._flush((function(t,n){d(e,t,n)}))}function d(e,t,n){if(t)return e.emit("error",t);if(null!=n&&e.push(n),e._writableState.length)throw new o;if(e._transformState.transforming)throw new a;return e.push(null)}e("inherits")(p,c),p.prototype.push=function(e,t){return this._transformState.needTransform=!1,c.prototype.push.call(this,e,t)},p.prototype._transform=function(e,t,n){n(new s("_transform()"))},p.prototype._write=function(e,t,n){var i=this._transformState;if(i.writecb=n,i.writechunk=e,i.writeencoding=t,!i.transforming){var s=this._readableState;(i.needTransform||s.needReadable||s.length<s.highWaterMark)&&this._read(s.highWaterMark)}},p.prototype._read=function(e){var t=this._transformState;null===t.writechunk||t.transforming?t.needTransform=!0:(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform))},p.prototype._destroy=function(e,t){c.prototype._destroy.call(this,e,(function(e){t(e)}))}},{"../errors":15,"./_stream_duplex":16,inherits:118}],20:[function(e,t,n){(function(n,i){(function(){"use strict";function s(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,n){var i=e.entry;e.entry=null;for(;i;){var s=i.callback;t.pendingcb--,s(n),i=i.next}t.corkedRequestsFree.next=e}(t,e)}}var r;t.exports=S,S.WritableState=E;var a={deprecate:e("util-deprecate")},o=e("./internal/streams/stream"),c=e("buffer").Buffer,l=i.Uint8Array||function(){};var p,u=e("./internal/streams/destroy"),d=e("./internal/streams/state").getHighWaterMark,h=e("../errors").codes,f=h.ERR_INVALID_ARG_TYPE,m=h.ERR_METHOD_NOT_IMPLEMENTED,g=h.ERR_MULTIPLE_CALLBACK,v=h.ERR_STREAM_CANNOT_PIPE,b=h.ERR_STREAM_DESTROYED,x=h.ERR_STREAM_NULL_VALUES,_=h.ERR_STREAM_WRITE_AFTER_END,y=h.ERR_UNKNOWN_ENCODING,w=u.errorOrDestroy;function k(){}function E(t,i,a){r=r||e("./_stream_duplex"),t=t||{},"boolean"!=typeof a&&(a=i instanceof r),this.objectMode=!!t.objectMode,a&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=d(this,t,"writableHighWaterMark",a),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var o=!1===t.decodeStrings;this.decodeStrings=!o,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var i=e._writableState,s=i.sync,r=i.writecb;if("function"!=typeof r)throw new g;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(i),t)!function(e,t,i,s,r){--t.pendingcb,i?(n.nextTick(r,s),n.nextTick(I,e,t),e._writableState.errorEmitted=!0,w(e,s)):(r(s),e._writableState.errorEmitted=!0,w(e,s),I(e,t))}(e,i,s,t,r);else{var a=A(i)||e.destroyed;a||i.corked||i.bufferProcessing||!i.bufferedRequest||j(e,i),s?n.nextTick(T,e,i,a,r):T(e,i,a,r)}}(i,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new s(this)}function S(t){var n=this instanceof(r=r||e("./_stream_duplex"));if(!n&&!p.call(S,this))return new S(t);this._writableState=new E(t,this,n),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),o.call(this)}function C(e,t,n,i,s,r,a){t.writelen=i,t.writecb=a,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new b("write")):n?e._writev(s,t.onwrite):e._write(s,r,t.onwrite),t.sync=!1}function T(e,t,n,i){n||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,i(),I(e,t)}function j(e,t){t.bufferProcessing=!0;var n=t.bufferedRequest;if(e._writev&&n&&n.next){var i=t.bufferedRequestCount,r=new Array(i),a=t.corkedRequestsFree;a.entry=n;for(var o=0,c=!0;n;)r[o]=n,n.isBuf||(c=!1),n=n.next,o+=1;r.allBuffers=c,C(e,t,!0,t.length,r,"",a.finish),t.pendingcb++,t.lastBufferedRequest=null,a.next?(t.corkedRequestsFree=a.next,a.next=null):t.corkedRequestsFree=new s(t),t.bufferedRequestCount=0}else{for(;n;){var l=n.chunk,p=n.encoding,u=n.callback;if(C(e,t,!1,t.objectMode?1:l.length,l,p,u),n=n.next,t.bufferedRequestCount--,t.writing)break}null===n&&(t.lastBufferedRequest=null)}t.bufferedRequest=n,t.bufferProcessing=!1}function A(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function L(e,t){e._final((function(n){t.pendingcb--,n&&w(e,n),t.prefinished=!0,e.emit("prefinish"),I(e,t)}))}function I(e,t){var i=A(t);if(i&&(function(e,t){t.prefinished||t.finalCalled||("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.pendingcb++,t.finalCalled=!0,n.nextTick(L,e,t)))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var s=e._readableState;(!s||s.autoDestroy&&s.endEmitted)&&e.destroy()}return i}e("inherits")(S,o),E.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(E.prototype,"buffer",{get:a.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(p=Function.prototype[Symbol.hasInstance],Object.defineProperty(S,Symbol.hasInstance,{value:function(e){return!!p.call(this,e)||this===S&&(e&&e._writableState instanceof E)}})):p=function(e){return e instanceof this},S.prototype.pipe=function(){w(this,new v)},S.prototype.write=function(e,t,i){var s,r=this._writableState,a=!1,o=!r.objectMode&&(s=e,c.isBuffer(s)||s instanceof l);return o&&!c.isBuffer(e)&&(e=function(e){return c.from(e)}(e)),"function"==typeof t&&(i=t,t=null),o?t="buffer":t||(t=r.defaultEncoding),"function"!=typeof i&&(i=k),r.ending?function(e,t){var i=new _;w(e,i),n.nextTick(t,i)}(this,i):(o||function(e,t,i,s){var r;return null===i?r=new x:"string"==typeof i||t.objectMode||(r=new f("chunk",["string","Buffer"],i)),!r||(w(e,r),n.nextTick(s,r),!1)}(this,r,e,i))&&(r.pendingcb++,a=function(e,t,n,i,s,r){if(!n){var a=function(e,t,n){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=c.from(t,n));return t}(t,i,s);i!==a&&(n=!0,s="buffer",i=a)}var o=t.objectMode?1:i.length;t.length+=o;var l=t.length<t.highWaterMark;l||(t.needDrain=!0);if(t.writing||t.corked){var p=t.lastBufferedRequest;t.lastBufferedRequest={chunk:i,encoding:s,isBuf:n,callback:r,next:null},p?p.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else C(e,t,!1,o,i,s,r);return l}(this,r,o,e,t,i)),a},S.prototype.cork=function(){this._writableState.corked++},S.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||j(this,e))},S.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new y(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(S.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(S.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),S.prototype._write=function(e,t,n){n(new m("_write()"))},S.prototype._writev=null,S.prototype.end=function(e,t,i){var s=this._writableState;return"function"==typeof e?(i=e,e=null,t=null):"function"==typeof t&&(i=t,t=null),null!=e&&this.write(e,t),s.corked&&(s.corked=1,this.uncork()),s.ending||function(e,t,i){t.ending=!0,I(e,t),i&&(t.finished?n.nextTick(i):e.once("finish",i));t.ended=!0,e.writable=!1}(this,s,i),this},Object.defineProperty(S.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(S.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),S.prototype.destroy=u.destroy,S.prototype._undestroy=u.undestroy,S.prototype._destroy=function(e,t){t(e)}}).call(this)}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../errors":15,"./_stream_duplex":16,"./internal/streams/destroy":23,"./internal/streams/state":27,"./internal/streams/stream":28,_process:186,buffer:59,inherits:118,"util-deprecate":304}],21:[function(e,t,n){(function(n){(function(){"use strict";var i;function s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var r=e("./end-of-stream"),a=Symbol("lastResolve"),o=Symbol("lastReject"),c=Symbol("error"),l=Symbol("ended"),p=Symbol("lastPromise"),u=Symbol("handlePromise"),d=Symbol("stream");function h(e,t){return{value:e,done:t}}function f(e){var t=e[a];if(null!==t){var n=e[d].read();null!==n&&(e[p]=null,e[a]=null,e[o]=null,t(h(n,!1)))}}function m(e){n.nextTick(f,e)}var g=Object.getPrototypeOf((function(){})),v=Object.setPrototypeOf((s(i={get stream(){return this[d]},next:function(){var e=this,t=this[c];if(null!==t)return Promise.reject(t);if(this[l])return Promise.resolve(h(void 0,!0));if(this[d].destroyed)return new Promise((function(t,i){n.nextTick((function(){e[c]?i(e[c]):t(h(void 0,!0))}))}));var i,s=this[p];if(s)i=new Promise(function(e,t){return function(n,i){e.then((function(){t[l]?n(h(void 0,!0)):t[u](n,i)}),i)}}(s,this));else{var r=this[d].read();if(null!==r)return Promise.resolve(h(r,!1));i=new Promise(this[u])}return this[p]=i,i}},Symbol.asyncIterator,(function(){return this})),s(i,"return",(function(){var e=this;return new Promise((function(t,n){e[d].destroy(null,(function(e){e?n(e):t(h(void 0,!0))}))}))})),i),g);t.exports=function(e){var t,n=Object.create(v,(s(t={},d,{value:e,writable:!0}),s(t,a,{value:null,writable:!0}),s(t,o,{value:null,writable:!0}),s(t,c,{value:null,writable:!0}),s(t,l,{value:e._readableState.endEmitted,writable:!0}),s(t,u,{value:function(e,t){var i=n[d].read();i?(n[p]=null,n[a]=null,n[o]=null,e(h(i,!1))):(n[a]=e,n[o]=t)},writable:!0}),t));return n[p]=null,r(e,(function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=n[o];return null!==t&&(n[p]=null,n[a]=null,n[o]=null,t(e)),void(n[c]=e)}var i=n[a];null!==i&&(n[p]=null,n[a]=null,n[o]=null,i(h(void 0,!0))),n[l]=!0})),e.on("readable",m.bind(null,n)),n}}).call(this)}).call(this,e("_process"))},{"./end-of-stream":24,_process:186}],22:[function(e,t,n){"use strict";function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var a=e("buffer").Buffer,o=e("util").inspect,c=o&&o.custom||"inspect";t.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}var t,n,l;return t=e,(n=[{key:"push",value:function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,n=""+t.data;t=t.next;)n+=e+t.data;return n}},{key:"concat",value:function(e){if(0===this.length)return a.alloc(0);for(var t,n,i,s=a.allocUnsafe(e>>>0),r=this.head,o=0;r;)t=r.data,n=s,i=o,a.prototype.copy.call(t,n,i),o+=r.data.length,r=r.next;return s}},{key:"consume",value:function(e,t){var n;return e<this.head.data.length?(n=this.head.data.slice(0,e),this.head.data=this.head.data.slice(e)):n=e===this.head.data.length?this.shift():t?this._getString(e):this._getBuffer(e),n}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(e){var t=this.head,n=1,i=t.data;for(e-=i.length;t=t.next;){var s=t.data,r=e>s.length?s.length:e;if(r===s.length?i+=s:i+=s.slice(0,e),0==(e-=r)){r===s.length?(++n,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=s.slice(r));break}++n}return this.length-=n,i}},{key:"_getBuffer",value:function(e){var t=a.allocUnsafe(e),n=this.head,i=1;for(n.data.copy(t),e-=n.data.length;n=n.next;){var s=n.data,r=e>s.length?s.length:e;if(s.copy(t,t.length-e,0,r),0==(e-=r)){r===s.length?(++i,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=s.slice(r));break}++i}return this.length-=i,t}},{key:c,value:function(e,t){return o(this,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){s(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},t,{depth:0,customInspect:!1}))}}])&&r(t.prototype,n),l&&r(t,l),e}()},{buffer:59,util:54}],23:[function(e,t,n){(function(e){(function(){"use strict";function n(e,t){s(e,t),i(e)}function i(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function s(e,t){e.emit("error",t)}t.exports={destroy:function(t,r){var a=this,o=this._readableState&&this._readableState.destroyed,c=this._writableState&&this._writableState.destroyed;return o||c?(r?r(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,e.nextTick(s,this,t)):e.nextTick(s,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,(function(t){!r&&t?a._writableState?a._writableState.errorEmitted?e.nextTick(i,a):(a._writableState.errorEmitted=!0,e.nextTick(n,a,t)):e.nextTick(n,a,t):r?(e.nextTick(i,a),r(t)):e.nextTick(i,a)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(e,t){var n=e._readableState,i=e._writableState;n&&n.autoDestroy||i&&i.autoDestroy?e.destroy(t):e.emit("error",t)}}}).call(this)}).call(this,e("_process"))},{_process:186}],24:[function(e,t,n){"use strict";var i=e("../../../errors").codes.ERR_STREAM_PREMATURE_CLOSE;function s(){}t.exports=function e(t,n,r){if("function"==typeof n)return e(t,null,n);n||(n={}),r=function(e){var t=!1;return function(){if(!t){t=!0;for(var n=arguments.length,i=new Array(n),s=0;s<n;s++)i[s]=arguments[s];e.apply(this,i)}}}(r||s);var a=n.readable||!1!==n.readable&&t.readable,o=n.writable||!1!==n.writable&&t.writable,c=function(){t.writable||p()},l=t._writableState&&t._writableState.finished,p=function(){o=!1,l=!0,a||r.call(t)},u=t._readableState&&t._readableState.endEmitted,d=function(){a=!1,u=!0,o||r.call(t)},h=function(e){r.call(t,e)},f=function(){var e;return a&&!u?(t._readableState&&t._readableState.ended||(e=new i),r.call(t,e)):o&&!l?(t._writableState&&t._writableState.ended||(e=new i),r.call(t,e)):void 0},m=function(){t.req.on("finish",p)};return!function(e){return e.setHeader&&"function"==typeof e.abort}(t)?o&&!t._writableState&&(t.on("end",c),t.on("close",c)):(t.on("complete",p),t.on("abort",f),t.req?m():t.on("request",m)),t.on("end",d),t.on("finish",p),!1!==n.error&&t.on("error",h),t.on("close",f),function(){t.removeListener("complete",p),t.removeListener("abort",f),t.removeListener("request",m),t.req&&t.req.removeListener("finish",p),t.removeListener("end",c),t.removeListener("close",c),t.removeListener("finish",p),t.removeListener("end",d),t.removeListener("error",h),t.removeListener("close",f)}}},{"../../../errors":15}],25:[function(e,t,n){t.exports=function(){throw new Error("Readable.from is not available in the browser")}},{}],26:[function(e,t,n){"use strict";var i;var s=e("../../../errors").codes,r=s.ERR_MISSING_ARGS,a=s.ERR_STREAM_DESTROYED;function o(e){if(e)throw e}function c(t,n,s,r){r=function(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}(r);var o=!1;t.on("close",(function(){o=!0})),void 0===i&&(i=e("./end-of-stream")),i(t,{readable:n,writable:s},(function(e){if(e)return r(e);o=!0,r()}));var c=!1;return function(e){if(!o&&!c)return c=!0,function(e){return e.setHeader&&"function"==typeof e.abort}(t)?t.abort():"function"==typeof t.destroy?t.destroy():void r(e||new a("pipe"))}}function l(e){e()}function p(e,t){return e.pipe(t)}function u(e){return e.length?"function"!=typeof e[e.length-1]?o:e.pop():o}t.exports=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var i,s=u(t);if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new r("streams");var a=t.map((function(e,n){var r=n<t.length-1;return c(e,r,n>0,(function(e){i||(i=e),e&&a.forEach(l),r||(a.forEach(l),s(i))}))}));return t.reduce(p)}},{"../../../errors":15,"./end-of-stream":24}],27:[function(e,t,n){"use strict";var i=e("../../../errors").codes.ERR_INVALID_OPT_VALUE;t.exports={getHighWaterMark:function(e,t,n,s){var r=function(e,t,n){return null!=e.highWaterMark?e.highWaterMark:t?e[n]:null}(t,s,n);if(null!=r){if(!isFinite(r)||Math.floor(r)!==r||r<0)throw new i(s?n:"highWaterMark",r);return Math.floor(r)}return e.objectMode?16:16384}}},{"../../../errors":15}],28:[function(e,t,n){t.exports=e("events").EventEmitter},{events:97}],29:[function(e,t,n){(n=t.exports=e("./lib/_stream_readable.js")).Stream=n,n.Readable=n,n.Writable=e("./lib/_stream_writable.js"),n.Duplex=e("./lib/_stream_duplex.js"),n.Transform=e("./lib/_stream_transform.js"),n.PassThrough=e("./lib/_stream_passthrough.js"),n.finished=e("./lib/internal/streams/end-of-stream.js"),n.pipeline=e("./lib/internal/streams/pipeline.js")},{"./lib/_stream_duplex.js":16,"./lib/_stream_passthrough.js":17,"./lib/_stream_readable.js":18,"./lib/_stream_transform.js":19,"./lib/_stream_writable.js":20,"./lib/internal/streams/end-of-stream.js":24,"./lib/internal/streams/pipeline.js":26}],30:[function(e,t,n){(function(n,i){(function(){const s=e("debug")("bittorrent-tracker:client"),r=e("events"),a=e("once"),o=e("run-parallel"),c=e("simple-peer"),l=e("./lib/common"),p=e("./lib/client/http-tracker"),u=e("./lib/client/udp-tracker"),d=e("./lib/client/websocket-tracker");class h extends r{constructor(e={}){if(super(),!e.peerId)throw new Error("Option `peerId` is required");if(!e.infoHash)throw new Error("Option `infoHash` is required");if(!e.announce)throw new Error("Option `announce` is required");if(!n.browser&&!e.port)throw new Error("Option `port` is required");this.peerId="string"==typeof e.peerId?e.peerId:e.peerId.toString("hex"),this._peerIdBuffer=i.from(this.peerId,"hex"),this._peerIdBinary=this._peerIdBuffer.toString("binary"),this.infoHash="string"==typeof e.infoHash?e.infoHash.toLowerCase():e.infoHash.toString("hex"),this._infoHashBuffer=i.from(this.infoHash,"hex"),this._infoHashBinary=this._infoHashBuffer.toString("binary"),s("new client %s",this.infoHash),this.destroyed=!1,this._port=e.port,this._getAnnounceOpts=e.getAnnounceOpts,this._rtcConfig=e.rtcConfig,this._userAgent=e.userAgent,this._wrtc="function"==typeof e.wrtc?e.wrtc():e.wrtc;let t="string"==typeof e.announce?[e.announce]:null==e.announce?[]:e.announce;t=t.map((e=>("/"===(e=e.toString())[e.length-1]&&(e=e.substring(0,e.length-1)),e))),t=Array.from(new Set(t));const r=!1!==this._wrtc&&(!!this._wrtc||c.WEBRTC_SUPPORT),a=e=>{n.nextTick((()=>{this.emit("warning",e)}))};this._trackers=t.map((e=>{let t;try{t=new URL(e)}catch(t){return a(new Error("Invalid tracker URL: "+e)),null}const n=t.port;if(n<0||n>65535)return a(new Error("Invalid tracker port: "+e)),null;const i=t.protocol;return"http:"!==i&&"https:"!==i||"function"!=typeof p?"udp:"===i&&"function"==typeof u?new u(this,e):"ws:"!==i&&"wss:"!==i||!r||"ws:"===i&&"undefined"!=typeof window&&"https:"===window.location.protocol?(a(new Error("Unsupported tracker protocol: "+e)),null):new d(this,e):new p(this,e)})).filter(Boolean)}start(e){(e=this._defaultAnnounceOpts(e)).event="started",s("send `start` %o",e),this._announce(e),this._trackers.forEach((e=>{e.setInterval()}))}stop(e){(e=this._defaultAnnounceOpts(e)).event="stopped",s("send `stop` %o",e),this._announce(e)}complete(e){e||(e={}),(e=this._defaultAnnounceOpts(e)).event="completed",s("send `complete` %o",e),this._announce(e)}update(e){(e=this._defaultAnnounceOpts(e)).event&&delete e.event,s("send `update` %o",e),this._announce(e)}_announce(e){this._trackers.forEach((t=>{t.announce(e)}))}scrape(e){s("send `scrape`"),e||(e={}),this._trackers.forEach((t=>{t.scrape(e)}))}setInterval(e){s("setInterval %d",e),this._trackers.forEach((t=>{t.setInterval(e)}))}destroy(e){if(this.destroyed)return;this.destroyed=!0,s("destroy");const t=this._trackers.map((e=>t=>{e.destroy(t)}));o(t,e),this._trackers=[],this._getAnnounceOpts=null}_defaultAnnounceOpts(e={}){return null==e.numwant&&(e.numwant=l.DEFAULT_ANNOUNCE_PEERS),null==e.uploaded&&(e.uploaded=0),null==e.downloaded&&(e.downloaded=0),this._getAnnounceOpts&&(e=Object.assign({},e,this._getAnnounceOpts())),e}}h.scrape=(e,t)=>{if(t=a(t),!e.infoHash)throw new Error("Option `infoHash` is required");if(!e.announce)throw new Error("Option `announce` is required");const n=Object.assign({},e,{infoHash:Array.isArray(e.infoHash)?e.infoHash[0]:e.infoHash,peerId:i.from("01234567890123456789"),port:6881}),s=new h(n);s.once("error",t),s.once("warning",t);let r=Array.isArray(e.infoHash)?e.infoHash.length:1;const o={};return s.on("scrape",(e=>{if(r-=1,o[e.infoHash]=e,0===r){s.destroy();const e=Object.keys(o);1===e.length?t(null,o[e[0]]):t(null,o)}})),e.infoHash=Array.isArray(e.infoHash)?e.infoHash.map((e=>i.from(e,"hex"))):i.from(e.infoHash,"hex"),s.scrape({infoHash:e.infoHash}),s},t.exports=h}).call(this)}).call(this,e("_process"),e("buffer").Buffer)},{"./lib/client/http-tracker":54,"./lib/client/udp-tracker":54,"./lib/client/websocket-tracker":32,"./lib/common":33,_process:186,buffer:59,debug:34,events:97,once:182,"run-parallel":217,"simple-peer":222}],31:[function(e,t,n){const i=e("events");t.exports=class extends i{constructor(e,t){super(),this.client=e,this.announceUrl=t,this.interval=null,this.destroyed=!1}setInterval(e){null==e&&(e=this.DEFAULT_ANNOUNCE_INTERVAL),clearInterval(this.interval),e&&(this.interval=setInterval((()=>{this.announce(this.client._defaultAnnounceOpts())}),e),this.interval.unref&&this.interval.unref())}}},{events:97}],32:[function(e,t,n){const i=e("debug")("bittorrent-tracker:websocket-tracker"),s=e("simple-peer"),r=e("randombytes"),a=e("simple-websocket"),o=e("../common"),c=e("./tracker"),l={};class p extends c{constructor(e,t,n){super(e,t),i("new websocket tracker %s",t),this.peers={},this.socket=null,this.reconnecting=!1,this.retries=0,this.reconnectTimer=null,this.expectingResponse=!1,this._openSocket()}announce(e){if(this.destroyed||this.reconnecting)return;if(!this.socket.connected)return void this.socket.once("connect",(()=>{this.announce(e)}));const t=Object.assign({},e,{action:"announce",info_hash:this.client._infoHashBinary,peer_id:this.client._peerIdBinary});if(this._trackerId&&(t.trackerid=this._trackerId),"stopped"===e.event||"completed"===e.event)this._send(t);else{const n=Math.min(e.numwant,10);this._generateOffers(n,(e=>{t.numwant=n,t.offers=e,this._send(t)}))}}scrape(e){if(this.destroyed||this.reconnecting)return;if(!this.socket.connected)return void this.socket.once("connect",(()=>{this.scrape(e)}));const t={action:"scrape",info_hash:Array.isArray(e.infoHash)&&e.infoHash.length>0?e.infoHash.map((e=>e.toString("binary"))):e.infoHash&&e.infoHash.toString("binary")||this.client._infoHashBinary};this._send(t)}destroy(e=u){if(this.destroyed)return e(null);this.destroyed=!0,clearInterval(this.interval),clearTimeout(this.reconnectTimer);for(const e in this.peers){const t=this.peers[e];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,l[this.announceUrl]&&(l[this.announceUrl].consumers-=1),l[this.announceUrl].consumers>0)return e();let t=l[this.announceUrl];if(delete l[this.announceUrl],t.on("error",u),t.once("close",e),!this.expectingResponse)return i();var n=setTimeout(i,o.DESTROY_TIMEOUT);function i(){n&&(clearTimeout(n),n=null),t.removeListener("data",i),t.destroy(),t=null}t.once("data",i)}_openSocket(){this.destroyed=!1,this.peers||(this.peers={}),this._onSocketConnectBound=()=>{this._onSocketConnect()},this._onSocketErrorBound=e=>{this._onSocketError(e)},this._onSocketDataBound=e=>{this._onSocketData(e)},this._onSocketCloseBound=()=>{this._onSocketClose()},this.socket=l[this.announceUrl],this.socket?(l[this.announceUrl].consumers+=1,this.socket.connected&&this._onSocketConnectBound()):(this.socket=l[this.announceUrl]=new a(this.announceUrl),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(e){if(!this.destroyed){this.expectingResponse=!1;try{e=JSON.parse(e)}catch(e){return void this.client.emit("warning",new Error("Invalid tracker response"))}"announce"===e.action?this._onAnnounceResponse(e):"scrape"===e.action?this._onScrapeResponse(e):this._onSocketError(new Error("invalid action in WS response: "+e.action))}}_onAnnounceResponse(e){if(e.info_hash!==this.client._infoHashBinary)return void i("ignoring websocket data from %s for %s (looking for %s: reused socket)",this.announceUrl,o.binaryToHex(e.info_hash),this.client.infoHash);if(e.peer_id&&e.peer_id===this.client._peerIdBinary)return;i("received %s from %s for %s",JSON.stringify(e),this.announceUrl,this.client.infoHash);const t=e["failure reason"];if(t)return this.client.emit("warning",new Error(t));const n=e["warning message"];n&&this.client.emit("warning",new Error(n));const s=e.interval||e["min interval"];s&&this.setInterval(1e3*s);const r=e["tracker id"];if(r&&(this._trackerId=r),null!=e.complete){const t=Object.assign({},e,{announce:this.announceUrl,infoHash:o.binaryToHex(e.info_hash)});this.client.emit("update",t)}let a;if(e.offer&&e.peer_id&&(i("creating peer (from remote offer)"),a=this._createPeer(),a.id=o.binaryToHex(e.peer_id),a.once("signal",(t=>{const n={action:"announce",info_hash:this.client._infoHashBinary,peer_id:this.client._peerIdBinary,to_peer_id:e.peer_id,answer:t,offer_id:e.offer_id};this._trackerId&&(n.trackerid=this._trackerId),this._send(n)})),a.signal(e.offer),this.client.emit("peer",a)),e.answer&&e.peer_id){const t=o.binaryToHex(e.offer_id);a=this.peers[t],a?(a.id=o.binaryToHex(e.peer_id),a.signal(e.answer),this.client.emit("peer",a),clearTimeout(a.trackerTimeout),a.trackerTimeout=null,delete this.peers[t]):i("got unexpected answer: "+JSON.stringify(e.answer))}}_onScrapeResponse(e){e=e.files||{};const t=Object.keys(e);0!==t.length?t.forEach((t=>{const n=Object.assign(e[t],{announce:this.announceUrl,infoHash:o.binaryToHex(t)});this.client.emit("scrape",n)})):this.client.emit("warning",new Error("invalid scrape response"))}_onSocketClose(){this.destroyed||(this.destroy(),this._startReconnectTimer())}_onSocketError(e){this.destroyed||(this.destroy(),this.client.emit("warning",e),this._startReconnectTimer())}_startReconnectTimer(){const e=Math.floor(3e5*Math.random())+Math.min(1e4*Math.pow(2,this.retries),36e5);this.reconnecting=!0,clearTimeout(this.reconnectTimer),this.reconnectTimer=setTimeout((()=>{this.retries++,this._openSocket()}),e),this.reconnectTimer.unref&&this.reconnectTimer.unref(),i("reconnecting socket in %s ms",e)}_send(e){if(this.destroyed)return;this.expectingResponse=!0;const t=JSON.stringify(e);i("send %s",t),this.socket.send(t)}_generateOffers(e,t){const n=this,s=[];i("generating %s offers",e);for(let t=0;t<e;++t)a();function a(){const e=r(20).toString("hex");i("creating peer (from _generateOffers)");const t=n.peers[e]=n._createPeer({initiator:!0});t.once("signal",(t=>{s.push({offer:t,offer_id:o.hexToBinary(e)}),c()})),t.trackerTimeout=setTimeout((()=>{i("tracker timeout: destroying peer"),t.trackerTimeout=null,delete n.peers[e],t.destroy()}),5e4),t.trackerTimeout.unref&&t.trackerTimeout.unref()}function c(){s.length===e&&(i("generated %s offers",e),t(s))}c()}_createPeer(e){const t=this;e=Object.assign({trickle:!1,config:t.client._rtcConfig,wrtc:t.client._wrtc},e);const n=new s(e);return n.once("error",i),n.once("connect",(function e(){n.removeListener("error",i),n.removeListener("connect",e)})),n;function i(e){t.client.emit("warning",new Error("Connection error: "+e.message)),n.destroy()}}}function u(){}p.prototype.DEFAULT_ANNOUNCE_INTERVAL=3e4,p._socketPool=l,t.exports=p},{"../common":33,"./tracker":31,debug:34,randombytes:194,"simple-peer":222,"simple-websocket":243}],33:[function(e,t,n){(function(t){(function(){n.DEFAULT_ANNOUNCE_PEERS=50,n.MAX_ANNOUNCE_PEERS=82,n.binaryToHex=function(e){return"string"!=typeof e&&(e=String(e)),t.from(e,"binary").toString("hex")},n.hexToBinary=function(e){return"string"!=typeof e&&(e=String(e)),t.from(e,"hex").toString("binary")};var i=e("./common-node");Object.assign(n,i)}).call(this)}).call(this,e("buffer").Buffer)},{"./common-node":54,buffer:59}],34:[function(e,t,n){arguments[4][12][0].apply(n,arguments)},{"./common":35,_process:186,dup:12}],35:[function(e,t,n){arguments[4][13][0].apply(n,arguments)},{dup:13,ms:36}],36:[function(e,t,n){arguments[4][14][0].apply(n,arguments)},{dup:14}],37:[function(e,t,n){(function(e){(function(){
|
||
/*! blob-to-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
||
t.exports=function(t,n){if("undefined"==typeof Blob||!(t instanceof Blob))throw new Error("first argument must be a Blob");if("function"!=typeof n)throw new Error("second argument must be a function");const i=new FileReader;i.addEventListener("loadend",(function t(s){i.removeEventListener("loadend",t,!1),s.error?n(s.error):n(null,e.from(i.result))}),!1),i.readAsArrayBuffer(t)}}).call(this)}).call(this,e("buffer").Buffer)},{buffer:59}],38:[function(e,t,n){(function(n){(function(){const{Transform:i}=e("readable-stream");t.exports=class extends i{constructor(e,t={}){super(t),"object"==typeof e&&(e=(t=e).size),this.size=e||512;const{nopad:n,zeroPadding:i=!0}=t;this._zeroPadding=!n&&!!i,this._buffered=[],this._bufferedBytes=0}_transform(e,t,i){for(this._bufferedBytes+=e.length,this._buffered.push(e);this._bufferedBytes>=this.size;){const e=n.concat(this._buffered);this._bufferedBytes-=this.size,this.push(e.slice(0,this.size)),this._buffered=[e.slice(this.size,e.length)]}i()}_flush(){if(this._bufferedBytes&&this._zeroPadding){const e=n.alloc(this.size-this._bufferedBytes);this._buffered.push(e),this.push(n.concat(this._buffered)),this._buffered=null}else this._bufferedBytes&&(this.push(n.concat(this._buffered)),this._buffered=null);this.push(null)}}}).call(this)}).call(this,e("buffer").Buffer)},{buffer:59,"readable-stream":53}],39:[function(e,t,n){arguments[4][15][0].apply(n,arguments)},{dup:15}],40:[function(e,t,n){arguments[4][16][0].apply(n,arguments)},{"./_stream_readable":42,"./_stream_writable":44,_process:186,dup:16,inherits:118}],41:[function(e,t,n){arguments[4][17][0].apply(n,arguments)},{"./_stream_transform":43,dup:17,inherits:118}],42:[function(e,t,n){arguments[4][18][0].apply(n,arguments)},{"../errors":39,"./_stream_duplex":40,"./internal/streams/async_iterator":45,"./internal/streams/buffer_list":46,"./internal/streams/destroy":47,"./internal/streams/from":49,"./internal/streams/state":51,"./internal/streams/stream":52,_process:186,buffer:59,dup:18,events:97,inherits:118,"string_decoder/":285,util:54}],43:[function(e,t,n){arguments[4][19][0].apply(n,arguments)},{"../errors":39,"./_stream_duplex":40,dup:19,inherits:118}],44:[function(e,t,n){arguments[4][20][0].apply(n,arguments)},{"../errors":39,"./_stream_duplex":40,"./internal/streams/destroy":47,"./internal/streams/state":51,"./internal/streams/stream":52,_process:186,buffer:59,dup:20,inherits:118,"util-deprecate":304}],45:[function(e,t,n){arguments[4][21][0].apply(n,arguments)},{"./end-of-stream":48,_process:186,dup:21}],46:[function(e,t,n){arguments[4][22][0].apply(n,arguments)},{buffer:59,dup:22,util:54}],47:[function(e,t,n){arguments[4][23][0].apply(n,arguments)},{_process:186,dup:23}],48:[function(e,t,n){arguments[4][24][0].apply(n,arguments)},{"../../../errors":39,dup:24}],49:[function(e,t,n){arguments[4][25][0].apply(n,arguments)},{dup:25}],50:[function(e,t,n){arguments[4][26][0].apply(n,arguments)},{"../../../errors":39,"./end-of-stream":48,dup:26}],51:[function(e,t,n){arguments[4][27][0].apply(n,arguments)},{"../../../errors":39,dup:27}],52:[function(e,t,n){arguments[4][28][0].apply(n,arguments)},{dup:28,events:97}],53:[function(e,t,n){arguments[4][29][0].apply(n,arguments)},{"./lib/_stream_duplex.js":40,"./lib/_stream_passthrough.js":41,"./lib/_stream_readable.js":42,"./lib/_stream_transform.js":43,"./lib/_stream_writable.js":44,"./lib/internal/streams/end-of-stream.js":48,"./lib/internal/streams/pipeline.js":50,dup:29}],54:[function(e,t,n){},{}],55:[function(e,t,n){arguments[4][54][0].apply(n,arguments)},{dup:54}],56:[function(e,t,n){(function(e){(function(){t.exports=function(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative');return e.allocUnsafe?e.allocUnsafe(t):new e(t)}}).call(this)}).call(this,e("buffer").Buffer)},{buffer:59}],57:[function(e,t,n){(function(n){(function(){var i=e("buffer-fill"),s=e("buffer-alloc-unsafe");t.exports=function(e,t,r){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative');if(n.alloc)return n.alloc(e,t,r);var a=s(e);return 0===e?a:void 0===t?i(a,0):("string"!=typeof r&&(r=void 0),i(a,t,r))}}).call(this)}).call(this,e("buffer").Buffer)},{buffer:59,"buffer-alloc-unsafe":56,"buffer-fill":58}],58:[function(e,t,n){(function(e){(function(){var n=function(){try{if(!e.isEncoding("latin1"))return!1;var t=e.alloc?e.alloc(4):new e(4);return t.fill("ab","ucs2"),"61006200"===t.toString("hex")}catch(e){return!1}}();function i(e,t,n,i){if(n<0||i>e.length)throw new RangeError("Out of range index");return n>>>=0,(i=void 0===i?e.length:i>>>0)>n&&e.fill(t,n,i),e}t.exports=function(t,s,r,a,o){if(n)return t.fill(s,r,a,o);if("number"==typeof s)return i(t,s,r,a);if("string"==typeof s){if("string"==typeof r?(o=r,r=0,a=t.length):"string"==typeof a&&(o=a,a=t.length),void 0!==o&&"string"!=typeof o)throw new TypeError("encoding must be a string");if("latin1"===o&&(o="binary"),"string"==typeof o&&!e.isEncoding(o))throw new TypeError("Unknown encoding: "+o);if(""===s)return i(t,0,r,a);if(function(e){return 1===e.length&&e.charCodeAt(0)<256}(s))return i(t,s.charCodeAt(0),r,a);s=new e(s,o)}return e.isBuffer(s)?function(e,t,n,i){if(n<0||i>e.length)throw new RangeError("Out of range index");if(i<=n)return e;n>>>=0,i=void 0===i?e.length:i>>>0;for(var s=n,r=t.length;s<=i-r;)t.copy(e,s),s+=r;return s!==i&&t.copy(e,s,0,i-s),e}(t,s,r,a):i(t,0,r,a)}}).call(this)}).call(this,e("buffer").Buffer)},{buffer:59}],59:[function(e,t,n){(function(t){(function(){
|
||
/*!
|
||
* The buffer module from node.js, for the browser.
|
||
*
|
||
* @author Feross Aboukhadijeh <https://feross.org>
|
||
* @license MIT
|
||
*/
|
||
"use strict";var t=e("base64-js"),i=e("ieee754");n.Buffer=a,n.SlowBuffer=function(e){+e!=e&&(e=0);return a.alloc(+e)},n.INSPECT_MAX_BYTES=50;var s=2147483647;function r(e){if(e>s)throw new RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return t.__proto__=a.prototype,t}function a(e,t,n){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return l(e)}return o(e,t,n)}function o(e,t,n){if("string"==typeof e)return function(e,t){"string"==typeof t&&""!==t||(t="utf8");if(!a.isEncoding(t))throw new TypeError("Unknown encoding: "+t);var n=0|d(e,t),i=r(n),s=i.write(e,t);s!==n&&(i=i.slice(0,s));return i}(e,t);if(ArrayBuffer.isView(e))return p(e);if(null==e)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(H(e,ArrayBuffer)||e&&H(e.buffer,ArrayBuffer))return function(e,t,n){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(n||0))throw new RangeError('"length" is outside of buffer bounds');var i;i=void 0===t&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,t):new Uint8Array(e,t,n);return i.__proto__=a.prototype,i}(e,t,n);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');var i=e.valueOf&&e.valueOf();if(null!=i&&i!==e)return a.from(i,t,n);var s=function(e){if(a.isBuffer(e)){var t=0|u(e.length),n=r(t);return 0===n.length||e.copy(n,0,0,t),n}if(void 0!==e.length)return"number"!=typeof e.length||D(e.length)?r(0):p(e);if("Buffer"===e.type&&Array.isArray(e.data))return p(e.data)}(e);if(s)return s;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return a.from(e[Symbol.toPrimitive]("string"),t,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function c(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function l(e){return c(e),r(e<0?0:0|u(e))}function p(e){for(var t=e.length<0?0:0|u(e.length),n=r(t),i=0;i<t;i+=1)n[i]=255&e[i];return n}function u(e){if(e>=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return 0|e}function d(e,t){if(a.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||H(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var n=e.length,i=arguments.length>2&&!0===arguments[2];if(!i&&0===n)return 0;for(var s=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return P(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return N(e).length;default:if(s)return i?-1:P(e).length;t=(""+t).toLowerCase(),s=!0}}function h(e,t,n){var i=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return j(this,t,n);case"utf8":case"utf-8":return E(this,t,n);case"ascii":return C(this,t,n);case"latin1":case"binary":return T(this,t,n);case"base64":return k(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,t,n);default:if(i)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),i=!0}}function f(e,t,n){var i=e[t];e[t]=e[n],e[n]=i}function m(e,t,n,i,s){if(0===e.length)return-1;if("string"==typeof n?(i=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),D(n=+n)&&(n=s?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(s)return-1;n=e.length-1}else if(n<0){if(!s)return-1;n=0}if("string"==typeof t&&(t=a.from(t,i)),a.isBuffer(t))return 0===t.length?-1:g(e,t,n,i,s);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?s?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):g(e,[t],n,i,s);throw new TypeError("val must be string, number or Buffer")}function g(e,t,n,i,s){var r,a=1,o=e.length,c=t.length;if(void 0!==i&&("ucs2"===(i=String(i).toLowerCase())||"ucs-2"===i||"utf16le"===i||"utf-16le"===i)){if(e.length<2||t.length<2)return-1;a=2,o/=2,c/=2,n/=2}function l(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(s){var p=-1;for(r=n;r<o;r++)if(l(e,r)===l(t,-1===p?0:r-p)){if(-1===p&&(p=r),r-p+1===c)return p*a}else-1!==p&&(r-=r-p),p=-1}else for(n+c>o&&(n=o-c),r=n;r>=0;r--){for(var u=!0,d=0;d<c;d++)if(l(e,r+d)!==l(t,d)){u=!1;break}if(u)return r}return-1}function v(e,t,n,i){n=Number(n)||0;var s=e.length-n;i?(i=Number(i))>s&&(i=s):i=s;var r=t.length;i>r/2&&(i=r/2);for(var a=0;a<i;++a){var o=parseInt(t.substr(2*a,2),16);if(D(o))return a;e[n+a]=o}return a}function b(e,t,n,i){return q(P(t,e.length-n),e,n,i)}function x(e,t,n,i){return q(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,i)}function _(e,t,n,i){return x(e,t,n,i)}function y(e,t,n,i){return q(N(t),e,n,i)}function w(e,t,n,i){return q(function(e,t){for(var n,i,s,r=[],a=0;a<e.length&&!((t-=2)<0);++a)i=(n=e.charCodeAt(a))>>8,s=n%256,r.push(s),r.push(i);return r}(t,e.length-n),e,n,i)}function k(e,n,i){return 0===n&&i===e.length?t.fromByteArray(e):t.fromByteArray(e.slice(n,i))}function E(e,t,n){n=Math.min(e.length,n);for(var i=[],s=t;s<n;){var r,a,o,c,l=e[s],p=null,u=l>239?4:l>223?3:l>191?2:1;if(s+u<=n)switch(u){case 1:l<128&&(p=l);break;case 2:128==(192&(r=e[s+1]))&&(c=(31&l)<<6|63&r)>127&&(p=c);break;case 3:r=e[s+1],a=e[s+2],128==(192&r)&&128==(192&a)&&(c=(15&l)<<12|(63&r)<<6|63&a)>2047&&(c<55296||c>57343)&&(p=c);break;case 4:r=e[s+1],a=e[s+2],o=e[s+3],128==(192&r)&&128==(192&a)&&128==(192&o)&&(c=(15&l)<<18|(63&r)<<12|(63&a)<<6|63&o)>65535&&c<1114112&&(p=c)}null===p?(p=65533,u=1):p>65535&&(p-=65536,i.push(p>>>10&1023|55296),p=56320|1023&p),i.push(p),s+=u}return function(e){var t=e.length;if(t<=S)return String.fromCharCode.apply(String,e);var n="",i=0;for(;i<t;)n+=String.fromCharCode.apply(String,e.slice(i,i+=S));return n}(i)}n.kMaxLength=s,a.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()}catch(e){return!1}}(),a.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(a.prototype,"parent",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.buffer}}),Object.defineProperty(a.prototype,"offset",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.byteOffset}}),"undefined"!=typeof Symbol&&null!=Symbol.species&&a[Symbol.species]===a&&Object.defineProperty(a,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),a.poolSize=8192,a.from=function(e,t,n){return o(e,t,n)},a.prototype.__proto__=Uint8Array.prototype,a.__proto__=Uint8Array,a.alloc=function(e,t,n){return function(e,t,n){return c(e),e<=0?r(e):void 0!==t?"string"==typeof n?r(e).fill(t,n):r(e).fill(t):r(e)}(e,t,n)},a.allocUnsafe=function(e){return l(e)},a.allocUnsafeSlow=function(e){return l(e)},a.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==a.prototype},a.compare=function(e,t){if(H(e,Uint8Array)&&(e=a.from(e,e.offset,e.byteLength)),H(t,Uint8Array)&&(t=a.from(t,t.offset,t.byteLength)),!a.isBuffer(e)||!a.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;for(var n=e.length,i=t.length,s=0,r=Math.min(n,i);s<r;++s)if(e[s]!==t[s]){n=e[s],i=t[s];break}return n<i?-1:i<n?1:0},a.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},a.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return a.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var i=a.allocUnsafe(t),s=0;for(n=0;n<e.length;++n){var r=e[n];if(H(r,Uint8Array)&&(r=a.from(r)),!a.isBuffer(r))throw new TypeError('"list" argument must be an Array of Buffers');r.copy(i,s),s+=r.length}return i},a.byteLength=d,a.prototype._isBuffer=!0,a.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)f(this,t,t+1);return this},a.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)f(this,t,t+3),f(this,t+1,t+2);return this},a.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)f(this,t,t+7),f(this,t+1,t+6),f(this,t+2,t+5),f(this,t+3,t+4);return this},a.prototype.toString=function(){var e=this.length;return 0===e?"":0===arguments.length?E(this,0,e):h.apply(this,arguments)},a.prototype.toLocaleString=a.prototype.toString,a.prototype.equals=function(e){if(!a.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===a.compare(this,e)},a.prototype.inspect=function(){var e="",t=n.INSPECT_MAX_BYTES;return e=this.toString("hex",0,t).replace(/(.{2})/g,"$1 ").trim(),this.length>t&&(e+=" ... "),"<Buffer "+e+">"},a.prototype.compare=function(e,t,n,i,s){if(H(e,Uint8Array)&&(e=a.from(e,e.offset,e.byteLength)),!a.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===i&&(i=0),void 0===s&&(s=this.length),t<0||n>e.length||i<0||s>this.length)throw new RangeError("out of range index");if(i>=s&&t>=n)return 0;if(i>=s)return-1;if(t>=n)return 1;if(this===e)return 0;for(var r=(s>>>=0)-(i>>>=0),o=(n>>>=0)-(t>>>=0),c=Math.min(r,o),l=this.slice(i,s),p=e.slice(t,n),u=0;u<c;++u)if(l[u]!==p[u]){r=l[u],o=p[u];break}return r<o?-1:o<r?1:0},a.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},a.prototype.indexOf=function(e,t,n){return m(this,e,t,n,!0)},a.prototype.lastIndexOf=function(e,t,n){return m(this,e,t,n,!1)},a.prototype.write=function(e,t,n,i){if(void 0===t)i="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)i=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(n)?(n>>>=0,void 0===i&&(i="utf8")):(i=n,n=void 0)}var s=this.length-t;if((void 0===n||n>s)&&(n=s),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var r=!1;;)switch(i){case"hex":return v(this,e,t,n);case"utf8":case"utf-8":return b(this,e,t,n);case"ascii":return x(this,e,t,n);case"latin1":case"binary":return _(this,e,t,n);case"base64":return y(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return w(this,e,t,n);default:if(r)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),r=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var S=4096;function C(e,t,n){var i="";n=Math.min(e.length,n);for(var s=t;s<n;++s)i+=String.fromCharCode(127&e[s]);return i}function T(e,t,n){var i="";n=Math.min(e.length,n);for(var s=t;s<n;++s)i+=String.fromCharCode(e[s]);return i}function j(e,t,n){var i=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>i)&&(n=i);for(var s="",r=t;r<n;++r)s+=M(e[r]);return s}function A(e,t,n){for(var i=e.slice(t,n),s="",r=0;r<i.length;r+=2)s+=String.fromCharCode(i[r]+256*i[r+1]);return s}function L(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function I(e,t,n,i,s,r){if(!a.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>s||t<r)throw new RangeError('"value" argument is out of bounds');if(n+i>e.length)throw new RangeError("Index out of range")}function R(e,t,n,i,s,r){if(n+i>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function B(e,t,n,s,r){return t=+t,n>>>=0,r||R(e,0,n,4),i.write(e,t,n,s,23,4),n+4}function O(e,t,n,s,r){return t=+t,n>>>=0,r||R(e,0,n,8),i.write(e,t,n,s,52,8),n+8}a.prototype.slice=function(e,t){var n=this.length;(e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t<e&&(t=e);var i=this.subarray(e,t);return i.__proto__=a.prototype,i},a.prototype.readUIntLE=function(e,t,n){e>>>=0,t>>>=0,n||L(e,t,this.length);for(var i=this[e],s=1,r=0;++r<t&&(s*=256);)i+=this[e+r]*s;return i},a.prototype.readUIntBE=function(e,t,n){e>>>=0,t>>>=0,n||L(e,t,this.length);for(var i=this[e+--t],s=1;t>0&&(s*=256);)i+=this[e+--t]*s;return i},a.prototype.readUInt8=function(e,t){return e>>>=0,t||L(e,1,this.length),this[e]},a.prototype.readUInt16LE=function(e,t){return e>>>=0,t||L(e,2,this.length),this[e]|this[e+1]<<8},a.prototype.readUInt16BE=function(e,t){return e>>>=0,t||L(e,2,this.length),this[e]<<8|this[e+1]},a.prototype.readUInt32LE=function(e,t){return e>>>=0,t||L(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},a.prototype.readUInt32BE=function(e,t){return e>>>=0,t||L(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},a.prototype.readIntLE=function(e,t,n){e>>>=0,t>>>=0,n||L(e,t,this.length);for(var i=this[e],s=1,r=0;++r<t&&(s*=256);)i+=this[e+r]*s;return i>=(s*=128)&&(i-=Math.pow(2,8*t)),i},a.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||L(e,t,this.length);for(var i=t,s=1,r=this[e+--i];i>0&&(s*=256);)r+=this[e+--i]*s;return r>=(s*=128)&&(r-=Math.pow(2,8*t)),r},a.prototype.readInt8=function(e,t){return e>>>=0,t||L(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},a.prototype.readInt16LE=function(e,t){e>>>=0,t||L(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},a.prototype.readInt16BE=function(e,t){e>>>=0,t||L(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},a.prototype.readInt32LE=function(e,t){return e>>>=0,t||L(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},a.prototype.readInt32BE=function(e,t){return e>>>=0,t||L(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},a.prototype.readFloatLE=function(e,t){return e>>>=0,t||L(e,4,this.length),i.read(this,e,!0,23,4)},a.prototype.readFloatBE=function(e,t){return e>>>=0,t||L(e,4,this.length),i.read(this,e,!1,23,4)},a.prototype.readDoubleLE=function(e,t){return e>>>=0,t||L(e,8,this.length),i.read(this,e,!0,52,8)},a.prototype.readDoubleBE=function(e,t){return e>>>=0,t||L(e,8,this.length),i.read(this,e,!1,52,8)},a.prototype.writeUIntLE=function(e,t,n,i){(e=+e,t>>>=0,n>>>=0,i)||I(this,e,t,n,Math.pow(2,8*n)-1,0);var s=1,r=0;for(this[t]=255&e;++r<n&&(s*=256);)this[t+r]=e/s&255;return t+n},a.prototype.writeUIntBE=function(e,t,n,i){(e=+e,t>>>=0,n>>>=0,i)||I(this,e,t,n,Math.pow(2,8*n)-1,0);var s=n-1,r=1;for(this[t+s]=255&e;--s>=0&&(r*=256);)this[t+s]=e/r&255;return t+n},a.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||I(this,e,t,1,255,0),this[t]=255&e,t+1},a.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||I(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},a.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||I(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},a.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||I(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},a.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||I(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},a.prototype.writeIntLE=function(e,t,n,i){if(e=+e,t>>>=0,!i){var s=Math.pow(2,8*n-1);I(this,e,t,n,s-1,-s)}var r=0,a=1,o=0;for(this[t]=255&e;++r<n&&(a*=256);)e<0&&0===o&&0!==this[t+r-1]&&(o=1),this[t+r]=(e/a>>0)-o&255;return t+n},a.prototype.writeIntBE=function(e,t,n,i){if(e=+e,t>>>=0,!i){var s=Math.pow(2,8*n-1);I(this,e,t,n,s-1,-s)}var r=n-1,a=1,o=0;for(this[t+r]=255&e;--r>=0&&(a*=256);)e<0&&0===o&&0!==this[t+r+1]&&(o=1),this[t+r]=(e/a>>0)-o&255;return t+n},a.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||I(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},a.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||I(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},a.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||I(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},a.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||I(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},a.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||I(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},a.prototype.writeFloatLE=function(e,t,n){return B(this,e,t,!0,n)},a.prototype.writeFloatBE=function(e,t,n){return B(this,e,t,!1,n)},a.prototype.writeDoubleLE=function(e,t,n){return O(this,e,t,!0,n)},a.prototype.writeDoubleBE=function(e,t,n){return O(this,e,t,!1,n)},a.prototype.copy=function(e,t,n,i){if(!a.isBuffer(e))throw new TypeError("argument should be a Buffer");if(n||(n=0),i||0===i||(i=this.length),t>=e.length&&(t=e.length),t||(t=0),i>0&&i<n&&(i=n),i===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),e.length-t<i-n&&(i=e.length-t+n);var s=i-n;if(this===e&&"function"==typeof Uint8Array.prototype.copyWithin)this.copyWithin(t,n,i);else if(this===e&&n<t&&t<i)for(var r=s-1;r>=0;--r)e[r+t]=this[r+n];else Uint8Array.prototype.set.call(e,this.subarray(n,i),t);return s},a.prototype.fill=function(e,t,n,i){if("string"==typeof e){if("string"==typeof t?(i=t,t=0,n=this.length):"string"==typeof n&&(i=n,n=this.length),void 0!==i&&"string"!=typeof i)throw new TypeError("encoding must be a string");if("string"==typeof i&&!a.isEncoding(i))throw new TypeError("Unknown encoding: "+i);if(1===e.length){var s=e.charCodeAt(0);("utf8"===i&&s<128||"latin1"===i)&&(e=s)}}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;var r;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(r=t;r<n;++r)this[r]=e;else{var o=a.isBuffer(e)?e:a.from(e,i),c=o.length;if(0===c)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(r=0;r<n-t;++r)this[r+t]=o[r%c]}return this};var U=/[^+/0-9A-Za-z-_]/g;function M(e){return e<16?"0"+e.toString(16):e.toString(16)}function P(e,t){var n;t=t||1/0;for(var i=e.length,s=null,r=[],a=0;a<i;++a){if((n=e.charCodeAt(a))>55295&&n<57344){if(!s){if(n>56319){(t-=3)>-1&&r.push(239,191,189);continue}if(a+1===i){(t-=3)>-1&&r.push(239,191,189);continue}s=n;continue}if(n<56320){(t-=3)>-1&&r.push(239,191,189),s=n;continue}n=65536+(s-55296<<10|n-56320)}else s&&(t-=3)>-1&&r.push(239,191,189);if(s=null,n<128){if((t-=1)<0)break;r.push(n)}else if(n<2048){if((t-=2)<0)break;r.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;r.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;r.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return r}function N(e){return t.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(U,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function q(e,t,n,i){for(var s=0;s<i&&!(s+n>=t.length||s>=e.length);++s)t[s+n]=e[s];return s}function H(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function D(e){return e!=e}}).call(this)}).call(this,e("buffer").Buffer)},{"base64-js":3,buffer:59,ieee754:116}],60:[function(e,t,n){t.exports={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}},{}],61:[function(e,t,n){
|
||
/*!
|
||
* bytes
|
||
* Copyright(c) 2012-2014 TJ Holowaychuk
|
||
* Copyright(c) 2015 Jed Watson
|
||
* MIT Licensed
|
||
*/
|
||
"use strict";t.exports=function(e,t){if("string"==typeof e)return c(e);if("number"==typeof e)return o(e,t);return null},t.exports.format=o,t.exports.parse=c;var i=/\B(?=(\d{3})+(?!\d))/g,s=/(?:\.0*|(\.[^0]+)0+)$/,r={b:1,kb:1024,mb:1<<20,gb:1<<30,tb:Math.pow(1024,4),pb:Math.pow(1024,5)},a=/^((-|\+)?(\d+(?:\.\d+)?)) *(kb|mb|gb|tb|pb)$/i;function o(e,t){if(!Number.isFinite(e))return null;var n=Math.abs(e),a=t&&t.thousandsSeparator||"",o=t&&t.unitSeparator||"",c=t&&void 0!==t.decimalPlaces?t.decimalPlaces:2,l=Boolean(t&&t.fixedDecimals),p=t&&t.unit||"";p&&r[p.toLowerCase()]||(p=n>=r.pb?"PB":n>=r.tb?"TB":n>=r.gb?"GB":n>=r.mb?"MB":n>=r.kb?"KB":"B");var u=(e/r[p.toLowerCase()]).toFixed(c);return l||(u=u.replace(s,"$1")),a&&(u=u.replace(i,a)),u+o+p}function c(e){if("number"==typeof e&&!isNaN(e))return e;if("string"!=typeof e)return null;var t,n=a.exec(e),i="b";return n?(t=parseFloat(n[1]),i=n[4].toLowerCase()):(t=parseInt(e,10),i="b"),Math.floor(r[i]*t)}},{}],62:[function(e,t,n){arguments[4][15][0].apply(n,arguments)},{dup:15}],63:[function(e,t,n){arguments[4][16][0].apply(n,arguments)},{"./_stream_readable":65,"./_stream_writable":67,_process:186,dup:16,inherits:118}],64:[function(e,t,n){arguments[4][17][0].apply(n,arguments)},{"./_stream_transform":66,dup:17,inherits:118}],65:[function(e,t,n){arguments[4][18][0].apply(n,arguments)},{"../errors":62,"./_stream_duplex":63,"./internal/streams/async_iterator":68,"./internal/streams/buffer_list":69,"./internal/streams/destroy":70,"./internal/streams/from":72,"./internal/streams/state":74,"./internal/streams/stream":75,_process:186,buffer:59,dup:18,events:97,inherits:118,"string_decoder/":285,util:54}],66:[function(e,t,n){arguments[4][19][0].apply(n,arguments)},{"../errors":62,"./_stream_duplex":63,dup:19,inherits:118}],67:[function(e,t,n){arguments[4][20][0].apply(n,arguments)},{"../errors":62,"./_stream_duplex":63,"./internal/streams/destroy":70,"./internal/streams/state":74,"./internal/streams/stream":75,_process:186,buffer:59,dup:20,inherits:118,"util-deprecate":304}],68:[function(e,t,n){arguments[4][21][0].apply(n,arguments)},{"./end-of-stream":71,_process:186,dup:21}],69:[function(e,t,n){arguments[4][22][0].apply(n,arguments)},{buffer:59,dup:22,util:54}],70:[function(e,t,n){arguments[4][23][0].apply(n,arguments)},{_process:186,dup:23}],71:[function(e,t,n){arguments[4][24][0].apply(n,arguments)},{"../../../errors":62,dup:24}],72:[function(e,t,n){arguments[4][25][0].apply(n,arguments)},{dup:25}],73:[function(e,t,n){arguments[4][26][0].apply(n,arguments)},{"../../../errors":62,"./end-of-stream":71,dup:26}],74:[function(e,t,n){arguments[4][27][0].apply(n,arguments)},{"../../../errors":62,dup:27}],75:[function(e,t,n){arguments[4][28][0].apply(n,arguments)},{dup:28,events:97}],76:[function(e,t,n){arguments[4][29][0].apply(n,arguments)},{"./lib/_stream_duplex.js":63,"./lib/_stream_passthrough.js":64,"./lib/_stream_readable.js":65,"./lib/_stream_transform.js":66,"./lib/_stream_writable.js":67,"./lib/internal/streams/end-of-stream.js":71,"./lib/internal/streams/pipeline.js":73,dup:29}],77:[function(e,t,n){const i=e("block-stream2"),s=e("readable-stream");class r extends s.Writable{constructor(e,t,n={}){if(super(n),!e||!e.put||!e.get)throw new Error("First argument must be an abstract-chunk-store compliant store");if(!(t=Number(t)))throw new Error("Second argument must be a chunk length");this._blockstream=new i(t,{zeroPadding:!1}),this._outstandingPuts=0;let s=0;this._blockstream.on("data",(t=>{this.destroyed||(this._outstandingPuts+=1,e.put(s,t,(()=>{this._outstandingPuts-=1,0===this._outstandingPuts&&"function"==typeof this._finalCb&&(this._finalCb(null),this._finalCb=null)})),s+=1)})).on("error",(e=>{this.destroy(e)}))}_write(e,t,n){this._blockstream.write(e,t,n)}_final(e){this._blockstream.end(),this._blockstream.once("end",(()=>{0===this._outstandingPuts?e(null):this._finalCb=e}))}destroy(e){this.destroyed||(this.destroyed=!0,e&&this.emit("error",e),this.emit("close"))}}t.exports=r},{"block-stream2":38,"readable-stream":76}],78:[function(e,t,n){
|
||
/*!
|
||
* clipboard.js v2.0.6
|
||
* https://clipboardjs.com/
|
||
*
|
||
* Licensed MIT © Zeno Rocha
|
||
*/
|
||
var i,s;i=this,s=function(){return function(e){var t={};function n(i){if(t[i])return t[i].exports;var s=t[i]={i:i,l:!1,exports:{}};return e[i].call(s.exports,s,s.exports,n),s.l=!0,s.exports}return n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var s in e)n.d(i,s,function(t){return e[t]}.bind(null,s));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=6)}([function(e,t){e.exports=function(e){var t;if("SELECT"===e.nodeName)e.focus(),t=e.value;else if("INPUT"===e.nodeName||"TEXTAREA"===e.nodeName){var n=e.hasAttribute("readonly");n||e.setAttribute("readonly",""),e.select(),e.setSelectionRange(0,e.value.length),n||e.removeAttribute("readonly"),t=e.value}else{e.hasAttribute("contenteditable")&&e.focus();var i=window.getSelection(),s=document.createRange();s.selectNodeContents(e),i.removeAllRanges(),i.addRange(s),t=i.toString()}return t}},function(e,t){function n(){}n.prototype={on:function(e,t,n){var i=this.e||(this.e={});return(i[e]||(i[e]=[])).push({fn:t,ctx:n}),this},once:function(e,t,n){var i=this;function s(){i.off(e,s),t.apply(n,arguments)}return s._=t,this.on(e,s,n)},emit:function(e){for(var t=[].slice.call(arguments,1),n=((this.e||(this.e={}))[e]||[]).slice(),i=0,s=n.length;i<s;i++)n[i].fn.apply(n[i].ctx,t);return this},off:function(e,t){var n=this.e||(this.e={}),i=n[e],s=[];if(i&&t)for(var r=0,a=i.length;r<a;r++)i[r].fn!==t&&i[r].fn._!==t&&s.push(i[r]);return s.length?n[e]=s:delete n[e],this}},e.exports=n,e.exports.TinyEmitter=n},function(e,t,n){var i=n(3),s=n(4);e.exports=function(e,t,n){if(!e&&!t&&!n)throw new Error("Missing required arguments");if(!i.string(t))throw new TypeError("Second argument must be a String");if(!i.fn(n))throw new TypeError("Third argument must be a Function");if(i.node(e))return function(e,t,n){return e.addEventListener(t,n),{destroy:function(){e.removeEventListener(t,n)}}}(e,t,n);if(i.nodeList(e))return function(e,t,n){return Array.prototype.forEach.call(e,(function(e){e.addEventListener(t,n)})),{destroy:function(){Array.prototype.forEach.call(e,(function(e){e.removeEventListener(t,n)}))}}}(e,t,n);if(i.string(e))return function(e,t,n){return s(document.body,e,t,n)}(e,t,n);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}},function(e,t){t.node=function(e){return void 0!==e&&e instanceof HTMLElement&&1===e.nodeType},t.nodeList=function(e){var n=Object.prototype.toString.call(e);return void 0!==e&&("[object NodeList]"===n||"[object HTMLCollection]"===n)&&"length"in e&&(0===e.length||t.node(e[0]))},t.string=function(e){return"string"==typeof e||e instanceof String},t.fn=function(e){return"[object Function]"===Object.prototype.toString.call(e)}},function(e,t,n){var i=n(5);function s(e,t,n,i,s){var a=r.apply(this,arguments);return e.addEventListener(n,a,s),{destroy:function(){e.removeEventListener(n,a,s)}}}function r(e,t,n,s){return function(n){n.delegateTarget=i(n.target,t),n.delegateTarget&&s.call(e,n)}}e.exports=function(e,t,n,i,r){return"function"==typeof e.addEventListener?s.apply(null,arguments):"function"==typeof n?s.bind(null,document).apply(null,arguments):("string"==typeof e&&(e=document.querySelectorAll(e)),Array.prototype.map.call(e,(function(e){return s(e,t,n,i,r)})))}},function(e,t){if("undefined"!=typeof Element&&!Element.prototype.matches){var n=Element.prototype;n.matches=n.matchesSelector||n.mozMatchesSelector||n.msMatchesSelector||n.oMatchesSelector||n.webkitMatchesSelector}e.exports=function(e,t){for(;e&&9!==e.nodeType;){if("function"==typeof e.matches&&e.matches(t))return e;e=e.parentNode}}},function(e,t,n){"use strict";n.r(t);var i=n(0),s=n.n(i),r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),o=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.resolveOptions(t),this.initSelection()}return a(e,[{key:"resolveOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.action=e.action,this.container=e.container,this.emitter=e.emitter,this.target=e.target,this.text=e.text,this.trigger=e.trigger,this.selectedText=""}},{key:"initSelection",value:function(){this.text?this.selectFake():this.target&&this.selectTarget()}},{key:"selectFake",value:function(){var e=this,t="rtl"==document.documentElement.getAttribute("dir");this.removeFake(),this.fakeHandlerCallback=function(){return e.removeFake()},this.fakeHandler=this.container.addEventListener("click",this.fakeHandlerCallback)||!0,this.fakeElem=document.createElement("textarea"),this.fakeElem.style.fontSize="12pt",this.fakeElem.style.border="0",this.fakeElem.style.padding="0",this.fakeElem.style.margin="0",this.fakeElem.style.position="absolute",this.fakeElem.style[t?"right":"left"]="-9999px";var n=window.pageYOffset||document.documentElement.scrollTop;this.fakeElem.style.top=n+"px",this.fakeElem.setAttribute("readonly",""),this.fakeElem.value=this.text,this.container.appendChild(this.fakeElem),this.selectedText=s()(this.fakeElem),this.copyText()}},{key:"removeFake",value:function(){this.fakeHandler&&(this.container.removeEventListener("click",this.fakeHandlerCallback),this.fakeHandler=null,this.fakeHandlerCallback=null),this.fakeElem&&(this.container.removeChild(this.fakeElem),this.fakeElem=null)}},{key:"selectTarget",value:function(){this.selectedText=s()(this.target),this.copyText()}},{key:"copyText",value:function(){var e=void 0;try{e=document.execCommand(this.action)}catch(t){e=!1}this.handleResult(e)}},{key:"handleResult",value:function(e){this.emitter.emit(e?"success":"error",{action:this.action,text:this.selectedText,trigger:this.trigger,clearSelection:this.clearSelection.bind(this)})}},{key:"clearSelection",value:function(){this.trigger&&this.trigger.focus(),document.activeElement.blur(),window.getSelection().removeAllRanges()}},{key:"destroy",value:function(){this.removeFake()}},{key:"action",set:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"copy";if(this._action=e,"copy"!==this._action&&"cut"!==this._action)throw new Error('Invalid "action" value, use either "copy" or "cut"')},get:function(){return this._action}},{key:"target",set:function(e){if(void 0!==e){if(!e||"object"!==(void 0===e?"undefined":r(e))||1!==e.nodeType)throw new Error('Invalid "target" value, use a valid Element');if("copy"===this.action&&e.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if("cut"===this.action&&(e.hasAttribute("readonly")||e.hasAttribute("disabled")))throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes');this._target=e}},get:function(){return this._target}}]),e}(),c=n(1),l=n.n(c),p=n(2),u=n.n(p),d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},h=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),f=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var i=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return i.resolveOptions(n),i.listenClick(e),i}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),h(t,[{key:"resolveOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.action="function"==typeof e.action?e.action:this.defaultAction,this.target="function"==typeof e.target?e.target:this.defaultTarget,this.text="function"==typeof e.text?e.text:this.defaultText,this.container="object"===d(e.container)?e.container:document.body}},{key:"listenClick",value:function(e){var t=this;this.listener=u()(e,"click",(function(e){return t.onClick(e)}))}},{key:"onClick",value:function(e){var t=e.delegateTarget||e.currentTarget;this.clipboardAction&&(this.clipboardAction=null),this.clipboardAction=new o({action:this.action(t),target:this.target(t),text:this.text(t),container:this.container,trigger:t,emitter:this})}},{key:"defaultAction",value:function(e){return m("action",e)}},{key:"defaultTarget",value:function(e){var t=m("target",e);if(t)return document.querySelector(t)}},{key:"defaultText",value:function(e){return m("text",e)}},{key:"destroy",value:function(){this.listener.destroy(),this.clipboardAction&&(this.clipboardAction.destroy(),this.clipboardAction=null)}}],[{key:"isSupported",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["copy","cut"],t="string"==typeof e?[e]:e,n=!!document.queryCommandSupported;return t.forEach((function(e){n=n&&!!document.queryCommandSupported(e)})),n}}]),t}(l.a);function m(e,t){var n="data-clipboard-"+e;if(t.hasAttribute(n))return t.getAttribute(n)}t.default=f}]).default},"object"==typeof n&&"object"==typeof t?t.exports=s():"function"==typeof define&&define.amd?define([],s):"object"==typeof n?n.ClipboardJS=s():i.ClipboardJS=s()},{}],79:[function(e,t,n){(function(n,i,s){(function(){
|
||
/*! create-torrent. MIT License. WebTorrent LLC <https://webtorrent.io/opensource> */
|
||
const r=e("bencode"),a=e("block-stream2"),o=e("piece-length"),c=e("path"),l=e("filestream/read"),p=e("is-file"),u=e("junk"),d=e("multistream"),h=e("once"),f=e("run-parallel"),m=e("simple-sha1"),g=e("readable-stream"),v=e("./get-files");function b(e){return e.reduce(((e,t)=>Array.isArray(t)?e.concat(b(t)):e.concat(t)),[])}function x(e,t,i){var r;if(r=e,"undefined"!=typeof FileList&&r instanceof FileList&&(e=Array.from(e)),Array.isArray(e)||(e=[e]),0===e.length)throw new Error("invalid input type");e.forEach((e=>{if(null==e)throw new Error("invalid input type: "+e)})),1!==(e=e.map((e=>y(e)&&"string"==typeof e.path&&"function"==typeof v?e.path:e))).length||"string"==typeof e[0]||e[0].name||(e[0].name=t.name);let a=null;e.forEach(((t,n)=>{if("string"==typeof t)return;let i=t.fullPath||t.name;i||(i="Unknown File "+(n+1),t.unknownName=!0),t.path=i.split("/"),t.path[0]||t.path.shift(),t.path.length<2?a=null:0===n&&e.length>1?a=t.path[0]:t.path[0]!==a&&(a=null)})),e=e.filter((e=>{if("string"==typeof e)return!0;const t=e.path[e.path.length-1];return"."!==t[0]&&u.not(t)})),a&&e.forEach((e=>{const t=(s.isBuffer(e)||w(e))&&!e.path;"string"==typeof e||t||e.path.shift()})),!t.name&&a&&(t.name=a),t.name||e.some((e=>"string"==typeof e?(t.name=c.basename(e),!0):e.unknownName?void 0:(t.name=e.path[e.path.length-1],!0))),t.name||(t.name="Unnamed Torrent "+Date.now());const o=e.reduce(((e,t)=>e+Number("string"==typeof t)),0);let d=1===e.length;if(1===e.length&&"string"==typeof e[0]){if("function"!=typeof v)throw new Error("filesystem paths do not work in the browser");p(e[0],((e,t)=>{if(e)return i(e);d=t,h()}))}else n.nextTick((()=>{h()}));function h(){f(e.map((e=>t=>{const n={};if(y(e))n.getStream=function(e){return()=>new l(e)}(e),n.length=e.size;else if(s.isBuffer(e))n.getStream=(i=e,()=>{const e=new g.PassThrough;return e.end(i),e}),n.length=e.length;else{if(!w(e)){if("string"==typeof e){if("function"!=typeof v)throw new Error("filesystem paths do not work in the browser");return void v(e,o>1||d,t)}throw new Error("invalid input type")}n.getStream=function(e,t){return()=>{const n=new g.Transform;return n._transform=function(e,n,i){t.length+=e.length,this.push(e),i()},e.pipe(n),n}}(e,n),n.length=0}var i;n.path=e.path,t(null,n)})),((e,t)=>{if(e)return i(e);t=b(t),i(null,t,d)}))}}function _(e,t){return e+t.length}function y(e){return"undefined"!=typeof Blob&&e instanceof Blob}function w(e){return"object"==typeof e&&null!=e&&"function"==typeof e.pipe}t.exports=function(e,n,c){"function"==typeof n&&([n,c]=[c,n]),x(e,n=n?Object.assign({},n):{},((e,l,p)=>{if(e)return c(e);n.singleFileTorrent=p,function(e,n,c){let l=n.announceList;l||("string"==typeof n.announce?l=[[n.announce]]:Array.isArray(n.announce)&&(l=n.announce.map((e=>[e]))));l||(l=[]);i.WEBTORRENT_ANNOUNCE&&("string"==typeof i.WEBTORRENT_ANNOUNCE?l.push([[i.WEBTORRENT_ANNOUNCE]]):Array.isArray(i.WEBTORRENT_ANNOUNCE)&&(l=l.concat(i.WEBTORRENT_ANNOUNCE.map((e=>[e])))));void 0===n.announce&&void 0===n.announceList&&(l=l.concat(t.exports.announceList));"string"==typeof n.urlList&&(n.urlList=[n.urlList]);const p={info:{name:n.name},"creation date":Math.ceil((Number(n.creationDate)||Date.now())/1e3),encoding:"UTF-8"};0!==l.length&&(p.announce=l[0][0],p["announce-list"]=l);void 0!==n.comment&&(p.comment=n.comment);void 0!==n.createdBy&&(p["created by"]=n.createdBy);void 0!==n.private&&(p.info.private=Number(n.private));void 0!==n.info&&Object.assign(p.info,n.info);void 0!==n.sslCert&&(p.info["ssl-cert"]=n.sslCert);void 0!==n.urlList&&(p["url-list"]=n.urlList);const u=n.pieceLength||o(e.reduce(_,0));p.info["piece length"]=u,function(e,t,n){n=h(n);const i=[];let r=0;const o=e.map((e=>e.getStream));let c=0,l=0,p=!1;const u=new d(o),f=new a(t,{zeroPadding:!1});function g(e){r+=e.length;const t=l;m(e,(e=>{i[t]=e,c-=1,_()})),c+=1,l+=1}function v(){p=!0,_()}function b(e){x(),n(e)}function x(){u.removeListener("error",b),f.removeListener("data",g),f.removeListener("end",v),f.removeListener("error",b)}function _(){p&&0===c&&(x(),n(null,s.from(i.join(""),"hex"),r))}u.on("error",b),u.pipe(f).on("data",g).on("end",v).on("error",b)}(e,u,((t,i,s)=>{if(t)return c(t);p.info.pieces=i,e.forEach((e=>{delete e.getStream})),n.singleFileTorrent?p.info.length=s:p.info.files=e,c(null,r.encode(p))}))}(l,n,c)}))},t.exports.parseInput=function(e,t,n){"function"==typeof t&&([t,n]=[n,t]),x(e,t=t?Object.assign({},t):{},n)},t.exports.announceList=[["udp://tracker.leechers-paradise.org:6969"],["udp://tracker.coppersurfer.tk:6969"],["udp://tracker.opentrackr.org:1337"],["udp://explodie.org:6969"],["udp://tracker.empire-js.us:1337"],["wss://tracker.btorrent.xyz"],["wss://tracker.openwebtorrent.com"]]}).call(this)}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer)},{"./get-files":54,_process:186,bencode:6,"block-stream2":38,buffer:59,"filestream/read":113,"is-file":120,junk:122,multistream:165,once:182,path:184,"piece-length":185,"readable-stream":94,"run-parallel":217,"simple-sha1":241}],80:[function(e,t,n){arguments[4][15][0].apply(n,arguments)},{dup:15}],81:[function(e,t,n){arguments[4][16][0].apply(n,arguments)},{"./_stream_readable":83,"./_stream_writable":85,_process:186,dup:16,inherits:118}],82:[function(e,t,n){arguments[4][17][0].apply(n,arguments)},{"./_stream_transform":84,dup:17,inherits:118}],83:[function(e,t,n){arguments[4][18][0].apply(n,arguments)},{"../errors":80,"./_stream_duplex":81,"./internal/streams/async_iterator":86,"./internal/streams/buffer_list":87,"./internal/streams/destroy":88,"./internal/streams/from":90,"./internal/streams/state":92,"./internal/streams/stream":93,_process:186,buffer:59,dup:18,events:97,inherits:118,"string_decoder/":285,util:54}],84:[function(e,t,n){arguments[4][19][0].apply(n,arguments)},{"../errors":80,"./_stream_duplex":81,dup:19,inherits:118}],85:[function(e,t,n){arguments[4][20][0].apply(n,arguments)},{"../errors":80,"./_stream_duplex":81,"./internal/streams/destroy":88,"./internal/streams/state":92,"./internal/streams/stream":93,_process:186,buffer:59,dup:20,inherits:118,"util-deprecate":304}],86:[function(e,t,n){arguments[4][21][0].apply(n,arguments)},{"./end-of-stream":89,_process:186,dup:21}],87:[function(e,t,n){arguments[4][22][0].apply(n,arguments)},{buffer:59,dup:22,util:54}],88:[function(e,t,n){arguments[4][23][0].apply(n,arguments)},{_process:186,dup:23}],89:[function(e,t,n){arguments[4][24][0].apply(n,arguments)},{"../../../errors":80,dup:24}],90:[function(e,t,n){arguments[4][25][0].apply(n,arguments)},{dup:25}],91:[function(e,t,n){arguments[4][26][0].apply(n,arguments)},{"../../../errors":80,"./end-of-stream":89,dup:26}],92:[function(e,t,n){arguments[4][27][0].apply(n,arguments)},{"../../../errors":80,dup:27}],93:[function(e,t,n){arguments[4][28][0].apply(n,arguments)},{dup:28,events:97}],94:[function(e,t,n){arguments[4][29][0].apply(n,arguments)},{"./lib/_stream_duplex.js":81,"./lib/_stream_passthrough.js":82,"./lib/_stream_readable.js":83,"./lib/_stream_transform.js":84,"./lib/_stream_writable.js":85,"./lib/internal/streams/end-of-stream.js":89,"./lib/internal/streams/pipeline.js":91,dup:29}],95:[function(e,t,n){var i=e("once"),s=function(){},r=function(e,t,n){if("function"==typeof t)return r(e,null,t);t||(t={}),n=i(n||s);var a=e._writableState,o=e._readableState,c=t.readable||!1!==t.readable&&e.readable,l=t.writable||!1!==t.writable&&e.writable,p=function(){e.writable||u()},u=function(){l=!1,c||n.call(e)},d=function(){c=!1,l||n.call(e)},h=function(t){n.call(e,t?new Error("exited with error code: "+t):null)},f=function(t){n.call(e,t)},m=function(){return(!c||o&&o.ended)&&(!l||a&&a.ended)?void 0:n.call(e,new Error("premature close"))},g=function(){e.req.on("finish",u)};return!function(e){return e.setHeader&&"function"==typeof e.abort}(e)?l&&!a&&(e.on("end",p),e.on("close",p)):(e.on("complete",u),e.on("abort",m),e.req?g():e.on("request",g)),function(e){return e.stdio&&Array.isArray(e.stdio)&&3===e.stdio.length}(e)&&e.on("exit",h),e.on("end",d),e.on("finish",u),!1!==t.error&&e.on("error",f),e.on("close",m),function(){e.removeListener("complete",u),e.removeListener("abort",m),e.removeListener("request",g),e.req&&e.req.removeListener("finish",u),e.removeListener("end",p),e.removeListener("close",p),e.removeListener("finish",u),e.removeListener("exit",h),e.removeListener("end",d),e.removeListener("error",f),e.removeListener("close",m)}};t.exports=r},{once:182}],96:[function(e,t,n){"use strict";function i(e,t){for(const n in t)Object.defineProperty(e,n,{value:t[n],enumerable:!0,configurable:!0});return e}t.exports=function(e,t,n){if(!e||"string"==typeof e)throw new TypeError("Please pass an Error to err-code");n||(n={}),"object"==typeof t&&(n=t,t=void 0),null!=t&&(n.code=t);try{return i(e,n)}catch(t){n.message=e.message,n.stack=e.stack;const s=function(){};return s.prototype=Object.create(Object.getPrototypeOf(e)),i(new s,n)}}},{}],97:[function(e,t,n){"use strict";var i,s="object"==typeof Reflect?Reflect:null,r=s&&"function"==typeof s.apply?s.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};i=s&&"function"==typeof s.ownKeys?s.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var a=Number.isNaN||function(e){return e!=e};function o(){o.init.call(this)}t.exports=o,t.exports.once=function(e,t){return new Promise((function(n,i){function s(){void 0!==r&&e.removeListener("error",r),n([].slice.call(arguments))}var r;"error"!==t&&(r=function(n){e.removeListener(t,s),i(n)},e.once("error",r)),e.once(t,s)}))},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var c=10;function l(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function p(e){return void 0===e._maxListeners?o.defaultMaxListeners:e._maxListeners}function u(e,t,n,i){var s,r,a,o;if(l(n),void 0===(r=e._events)?(r=e._events=Object.create(null),e._eventsCount=0):(void 0!==r.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),r=e._events),a=r[t]),void 0===a)a=r[t]=n,++e._eventsCount;else if("function"==typeof a?a=r[t]=i?[n,a]:[a,n]:i?a.unshift(n):a.push(n),(s=p(e))>0&&a.length>s&&!a.warned){a.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=e,c.type=t,c.count=a.length,o=c,console&&console.warn&&console.warn(o)}return e}function d(){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 h(e,t,n){var i={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},s=d.bind(i);return s.listener=n,i.wrapFn=s,s}function f(e,t,n){var i=e._events;if(void 0===i)return[];var s=i[t];return void 0===s?[]:"function"==typeof s?n?[s.listener||s]:[s]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(s):g(s,s.length)}function m(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function g(e,t){for(var n=new Array(t),i=0;i<t;++i)n[i]=e[i];return n}Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return c},set:function(e){if("number"!=typeof e||e<0||a(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");c=e}}),o.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},o.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||a(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},o.prototype.getMaxListeners=function(){return p(this)},o.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var i="error"===e,s=this._events;if(void 0!==s)i=i&&void 0===s.error;else if(!i)return!1;if(i){var a;if(t.length>0&&(a=t[0]),a instanceof Error)throw a;var o=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw o.context=a,o}var c=s[e];if(void 0===c)return!1;if("function"==typeof c)r(c,this,t);else{var l=c.length,p=g(c,l);for(n=0;n<l;++n)r(p[n],this,t)}return!0},o.prototype.addListener=function(e,t){return u(this,e,t,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(e,t){return u(this,e,t,!0)},o.prototype.once=function(e,t){return l(t),this.on(e,h(this,e,t)),this},o.prototype.prependOnceListener=function(e,t){return l(t),this.prependListener(e,h(this,e,t)),this},o.prototype.removeListener=function(e,t){var n,i,s,r,a;if(l(t),void 0===(i=this._events))return this;if(void 0===(n=i[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete i[e],i.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(s=-1,r=n.length-1;r>=0;r--)if(n[r]===t||n[r].listener===t){a=n[r].listener,s=r;break}if(s<0)return this;0===s?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,s),1===n.length&&(i[e]=n[0]),void 0!==i.removeListener&&this.emit("removeListener",e,a||t)}return this},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function(e){var t,n,i;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var s,r=Object.keys(n);for(i=0;i<r.length;++i)"removeListener"!==(s=r[i])&&this.removeAllListeners(s);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(i=t.length-1;i>=0;i--)this.removeListener(e,t[i]);return this},o.prototype.listeners=function(e){return f(this,e,!0)},o.prototype.rawListeners=function(e){return f(this,e,!1)},o.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):m.call(e,t)},o.prototype.listenerCount=m,o.prototype.eventNames=function(){return this._eventsCount>0?i(this._events):[]}},{}],98:[function(e,t,n){arguments[4][15][0].apply(n,arguments)},{dup:15}],99:[function(e,t,n){arguments[4][16][0].apply(n,arguments)},{"./_stream_readable":101,"./_stream_writable":103,_process:186,dup:16,inherits:118}],100:[function(e,t,n){arguments[4][17][0].apply(n,arguments)},{"./_stream_transform":102,dup:17,inherits:118}],101:[function(e,t,n){arguments[4][18][0].apply(n,arguments)},{"../errors":98,"./_stream_duplex":99,"./internal/streams/async_iterator":104,"./internal/streams/buffer_list":105,"./internal/streams/destroy":106,"./internal/streams/from":108,"./internal/streams/state":110,"./internal/streams/stream":111,_process:186,buffer:59,dup:18,events:97,inherits:118,"string_decoder/":285,util:54}],102:[function(e,t,n){arguments[4][19][0].apply(n,arguments)},{"../errors":98,"./_stream_duplex":99,dup:19,inherits:118}],103:[function(e,t,n){arguments[4][20][0].apply(n,arguments)},{"../errors":98,"./_stream_duplex":99,"./internal/streams/destroy":106,"./internal/streams/state":110,"./internal/streams/stream":111,_process:186,buffer:59,dup:20,inherits:118,"util-deprecate":304}],104:[function(e,t,n){arguments[4][21][0].apply(n,arguments)},{"./end-of-stream":107,_process:186,dup:21}],105:[function(e,t,n){arguments[4][22][0].apply(n,arguments)},{buffer:59,dup:22,util:54}],106:[function(e,t,n){arguments[4][23][0].apply(n,arguments)},{_process:186,dup:23}],107:[function(e,t,n){arguments[4][24][0].apply(n,arguments)},{"../../../errors":98,dup:24}],108:[function(e,t,n){arguments[4][25][0].apply(n,arguments)},{dup:25}],109:[function(e,t,n){arguments[4][26][0].apply(n,arguments)},{"../../../errors":98,"./end-of-stream":107,dup:26}],110:[function(e,t,n){arguments[4][27][0].apply(n,arguments)},{"../../../errors":98,dup:27}],111:[function(e,t,n){arguments[4][28][0].apply(n,arguments)},{dup:28,events:97}],112:[function(e,t,n){arguments[4][29][0].apply(n,arguments)},{"./lib/_stream_duplex.js":99,"./lib/_stream_passthrough.js":100,"./lib/_stream_readable.js":101,"./lib/_stream_transform.js":102,"./lib/_stream_writable.js":103,"./lib/internal/streams/end-of-stream.js":107,"./lib/internal/streams/pipeline.js":109,dup:29}],113:[function(e,t,n){const{Readable:i}=e("readable-stream"),s=e("typedarray-to-buffer");t.exports=class extends i{constructor(e,t={}){super(t),this._offset=0,this._ready=!1,this._file=e,this._size=e.size,this._chunkSize=t.chunkSize||Math.max(this._size/1e3,204800);const n=new FileReader;n.onload=()=>{this.push(s(n.result))},n.onerror=()=>{this.emit("error",n.error)},this.reader=n,this._generateHeaderBlocks(e,t,((e,t)=>{if(e)return this.emit("error",e);Array.isArray(t)&&t.forEach((e=>this.push(e))),this._ready=!0,this.emit("_ready")}))}_generateHeaderBlocks(e,t,n){n(null,[])}_read(){if(!this._ready)return void this.once("_ready",this._read.bind(this));const e=this._offset;let t=this._offset+this._chunkSize;if(t>this._size&&(t=this._size),e===this._size)return this.destroy(),void this.push(null);this.reader.readAsArrayBuffer(this._file.slice(e,t)),this._offset=t}destroy(){if(this._file=null,this.reader){this.reader.onload=null,this.reader.onerror=null;try{this.reader.abort()}catch(e){}}this.reader=null}}},{"readable-stream":112,"typedarray-to-buffer":294}],114:[function(e,t,n){t.exports=function(){if("undefined"==typeof window)return null;var e={RTCPeerConnection:window.RTCPeerConnection||window.mozRTCPeerConnection||window.webkitRTCPeerConnection,RTCSessionDescription:window.RTCSessionDescription||window.mozRTCSessionDescription||window.webkitRTCSessionDescription,RTCIceCandidate:window.RTCIceCandidate||window.mozRTCIceCandidate||window.webkitRTCIceCandidate};return e.RTCPeerConnection?e:null}},{}],115:[function(e,t,n){var i=e("http"),s=e("url"),r=t.exports;for(var a in i)i.hasOwnProperty(a)&&(r[a]=i[a]);function o(e){if("string"==typeof e&&(e=s.parse(e)),e.protocol||(e.protocol="https:"),"https:"!==e.protocol)throw new Error('Protocol "'+e.protocol+'" not supported. Expected "https:"');return e}r.request=function(e,t){return e=o(e),i.request.call(this,e,t)},r.get=function(e,t){return e=o(e),i.get.call(this,e,t)}},{http:263,url:297}],116:[function(e,t,n){
|
||
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
||
n.read=function(e,t,n,i,s){var r,a,o=8*s-i-1,c=(1<<o)-1,l=c>>1,p=-7,u=n?s-1:0,d=n?-1:1,h=e[t+u];for(u+=d,r=h&(1<<-p)-1,h>>=-p,p+=o;p>0;r=256*r+e[t+u],u+=d,p-=8);for(a=r&(1<<-p)-1,r>>=-p,p+=i;p>0;a=256*a+e[t+u],u+=d,p-=8);if(0===r)r=1-l;else{if(r===c)return a?NaN:1/0*(h?-1:1);a+=Math.pow(2,i),r-=l}return(h?-1:1)*a*Math.pow(2,r-i)},n.write=function(e,t,n,i,s,r){var a,o,c,l=8*r-s-1,p=(1<<l)-1,u=p>>1,d=23===s?Math.pow(2,-24)-Math.pow(2,-77):0,h=i?0:r-1,f=i?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(o=isNaN(t)?1:0,a=p):(a=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-a))<1&&(a--,c*=2),(t+=a+u>=1?d/c:d*Math.pow(2,1-u))*c>=2&&(a++,c/=2),a+u>=p?(o=0,a=p):a+u>=1?(o=(t*c-1)*Math.pow(2,s),a+=u):(o=t*Math.pow(2,u-1)*Math.pow(2,s),a=0));s>=8;e[n+h]=255&o,h+=f,o/=256,s-=8);for(a=a<<s|o,l+=s;l>0;e[n+h]=255&a,h+=f,a/=256,l-=8);e[n+h-f]|=128*m}},{}],117:[function(e,t,n){
|
||
/*! immediate-chunk-store. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
||
const i=e("queue-microtask");t.exports=class{constructor(e){if(this.store=e,this.chunkLength=e.chunkLength,!this.store||!this.store.get||!this.store.put)throw new Error("First argument must be abstract-chunk-store compliant");this.mem=[]}put(e,t,n){this.mem[e]=t,this.store.put(e,t,(t=>{this.mem[e]=null,n&&n(t)}))}get(e,t,n){if("function"==typeof t)return this.get(e,null,t);let s=this.mem[e];if(!s)return this.store.get(e,t,n);if(t){const e=t.offset||0,n=t.length?e+t.length:s.length;s=s.slice(e,n)}i((()=>{n&&n(null,s)}))}close(e){this.store.close(e)}destroy(e){this.store.destroy(e)}}},{"queue-microtask":192}],118:[function(e,t,n){"function"==typeof Object.create?t.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}},{}],119:[function(e,t,n){t.exports=function(e){for(var t=0,n=e.length;t<n;++t)if(e.charCodeAt(t)>127)return!1;return!0}},{}],120:[function(e,t,n){"use strict";var i=e("fs");function s(e){return i.existsSync(e)&&i.statSync(e).isFile()}t.exports=function(e,t){if(!t)return s(e);i.stat(e,(function(e,n){return e?t(e):t(null,n.isFile())}))},t.exports.sync=s},{fs:55}],121:[function(e,t,n){t.exports=r,r.strict=a,r.loose=o;var i=Object.prototype.toString,s={"[object Int8Array]":!0,"[object Int16Array]":!0,"[object Int32Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Uint16Array]":!0,"[object Uint32Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0};function r(e){return a(e)||o(e)}function a(e){return e instanceof Int8Array||e instanceof Int16Array||e instanceof Int32Array||e instanceof Uint8Array||e instanceof Uint8ClampedArray||e instanceof Uint16Array||e instanceof Uint32Array||e instanceof Float32Array||e instanceof Float64Array}function o(e){return s[i.call(e)]}},{}],122:[function(e,t,n){"use strict";n.re=()=>{throw new Error("`junk.re` was renamed to `junk.regex`")},n.regex=new RegExp(["^npm-debug\\.log$","^\\..*\\.swp$","^\\.DS_Store$","^\\.AppleDouble$","^\\.LSOverride$","^Icon\\r$","^\\._.*","^\\.Spotlight-V100(?:$|\\/)","\\.Trashes","^__MACOSX$","~$","^Thumbs\\.db$","^ehthumbs\\.db$","^Desktop\\.ini$","@eaDir$"].join("|")),n.is=e=>n.regex.test(e),n.not=e=>!n.is(e),n.default=t.exports},{}],123:[function(e,t,n){(function(n){(function(){
|
||
/*! magnet-uri. MIT License. WebTorrent LLC <https://webtorrent.io/opensource> */
|
||
t.exports=r,t.exports.decode=r,t.exports.encode=function(e){(e=Object.assign({},e)).infoHashBuffer&&(e.xt="urn:btih:"+e.infoHashBuffer.toString("hex"));e.infoHash&&(e.xt="urn:btih:"+e.infoHash);e.name&&(e.dn=e.name);e.keywords&&(e.kt=e.keywords);e.announce&&(e.tr=e.announce);e.urlList&&(e.ws=e.urlList,delete e.as);e.peerAddresses&&(e["x.pe"]=e.peerAddresses);let t="magnet:?";return Object.keys(e).filter((e=>2===e.length||"x.pe"===e)).forEach(((n,i)=>{const r=Array.isArray(e[n])?e[n]:[e[n]];r.forEach(((e,s)=>{(i>0||s>0)&&("kt"!==n&&"so"!==n||0===s)&&(t+="&"),"dn"===n&&(e=encodeURIComponent(e).replace(/%20/g,"+")),"tr"!==n&&"xs"!==n&&"as"!==n&&"ws"!==n||(e=encodeURIComponent(e)),"kt"===n&&(e=encodeURIComponent(e)),"so"!==n&&(t+="kt"===n&&s>0?"+"+e:`${n}=${e}`)})),"so"===n&&(t+=`${n}=${s.compose(r)}`)})),t};const i=e("thirty-two"),s=e("bep53-range");function r(e){const t={},r=e.split("magnet:?")[1];let a;if((r&&r.length>=0?r.split("&"):[]).forEach((e=>{const n=e.split("=");if(2!==n.length)return;const i=n[0];let r=n[1];"dn"===i&&(r=decodeURIComponent(r).replace(/\+/g," ")),"tr"!==i&&"xs"!==i&&"as"!==i&&"ws"!==i||(r=decodeURIComponent(r)),"kt"===i&&(r=decodeURIComponent(r).split("+")),"ix"===i&&(r=Number(r)),"so"===i&&(r=s.parse(decodeURIComponent(r).split(","))),t[i]?(Array.isArray(t[i])||(t[i]=[t[i]]),t[i].push(r)):t[i]=r})),t.xt){(Array.isArray(t.xt)?t.xt:[t.xt]).forEach((e=>{if(a=e.match(/^urn:btih:(.{40})/))t.infoHash=a[1].toLowerCase();else if(a=e.match(/^urn:btih:(.{32})/)){const e=i.decode(a[1]);t.infoHash=n.from(e,"binary").toString("hex")}}))}return t.infoHash&&(t.infoHashBuffer=n.from(t.infoHash,"hex")),t.dn&&(t.name=t.dn),t.kt&&(t.keywords=t.kt),t.announce=[],("string"==typeof t.tr||Array.isArray(t.tr))&&(t.announce=t.announce.concat(t.tr)),t.urlList=[],("string"==typeof t.as||Array.isArray(t.as))&&(t.urlList=t.urlList.concat(t.as)),("string"==typeof t.ws||Array.isArray(t.ws))&&(t.urlList=t.urlList.concat(t.ws)),t.peerAddresses=[],("string"==typeof t["x.pe"]||Array.isArray(t["x.pe"]))&&(t.peerAddresses=t.peerAddresses.concat(t["x.pe"])),t.announce=Array.from(new Set(t.announce)),t.urlList=Array.from(new Set(t.urlList)),t.peerAddresses=Array.from(new Set(t.peerAddresses)),t}}).call(this)}).call(this,e("buffer").Buffer)},{"bep53-range":7,buffer:59,"thirty-two":286}],124:[function(e,t,n){
|
||
/*! mediasource. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
||
t.exports=o;var i=e("inherits"),s=e("readable-stream"),r=e("to-arraybuffer"),a="undefined"!=typeof window&&window.MediaSource;function o(e,t){var n=this;if(!(n instanceof o))return new o(e,t);if(!a)throw new Error("web browser lacks MediaSource support");t||(t={}),n._debug=t.debug,n._bufferDuration=t.bufferDuration||60,n._elem=e,n._mediaSource=new a,n._streams=[],n.detailedError=null,n._errorHandler=function(){n._elem.removeEventListener("error",n._errorHandler),n._streams.slice().forEach((function(e){e.destroy(n._elem.error)}))},n._elem.addEventListener("error",n._errorHandler),n._elem.src=window.URL.createObjectURL(n._mediaSource)}function c(e,t){var n=this;if(s.Writable.call(n),n._wrapper=e,n._elem=e._elem,n._mediaSource=e._mediaSource,n._allStreams=e._streams,n._allStreams.push(n),n._bufferDuration=e._bufferDuration,n._sourceBuffer=null,n._debugBuffers=[],n._openHandler=function(){n._onSourceOpen()},n._flowHandler=function(){n._flow()},n._errorHandler=function(e){n.destroyed||n.emit("error",e)},"string"==typeof t)n._type=t,"open"===n._mediaSource.readyState?n._createSourceBuffer():n._mediaSource.addEventListener("sourceopen",n._openHandler);else if(null===t._sourceBuffer)t.destroy(),n._type=t._type,n._mediaSource.addEventListener("sourceopen",n._openHandler);else{if(!t._sourceBuffer)throw new Error("The argument to MediaElementWrapper.createWriteStream must be a string or a previous stream returned from that function");t.destroy(),n._type=t._type,n._sourceBuffer=t._sourceBuffer,n._debugBuffers=t._debugBuffers,n._sourceBuffer.addEventListener("updateend",n._flowHandler),n._sourceBuffer.addEventListener("error",n._errorHandler)}n._elem.addEventListener("timeupdate",n._flowHandler),n.on("error",(function(e){n._wrapper.error(e)})),n.on("finish",(function(){if(!n.destroyed&&(n._finished=!0,n._allStreams.every((function(e){return e._finished})))){n._wrapper._dumpDebugData();try{n._mediaSource.endOfStream()}catch(e){}}}))}o.prototype.createWriteStream=function(e){return new c(this,e)},o.prototype.error=function(e){var t=this;t.detailedError||(t.detailedError=e),t._dumpDebugData();try{t._mediaSource.endOfStream("decode")}catch(e){}try{window.URL.revokeObjectURL(t._elem.src)}catch(e){}},o.prototype._dumpDebugData=function(){var e=this;e._debug&&(e._debug=!1,e._streams.forEach((function(e,t){var n,i,s;n=e._debugBuffers,i="mediasource-stream-"+t,(s=document.createElement("a")).href=window.URL.createObjectURL(new window.Blob(n)),s.download=i,s.click()})))},i(c,s.Writable),c.prototype._onSourceOpen=function(){var e=this;e.destroyed||(e._mediaSource.removeEventListener("sourceopen",e._openHandler),e._createSourceBuffer())},c.prototype.destroy=function(e){var t=this;t.destroyed||(t.destroyed=!0,t._allStreams.splice(t._allStreams.indexOf(t),1),t._mediaSource.removeEventListener("sourceopen",t._openHandler),t._elem.removeEventListener("timeupdate",t._flowHandler),t._sourceBuffer&&(t._sourceBuffer.removeEventListener("updateend",t._flowHandler),t._sourceBuffer.removeEventListener("error",t._errorHandler),"open"===t._mediaSource.readyState&&t._sourceBuffer.abort()),e&&t.emit("error",e),t.emit("close"))},c.prototype._createSourceBuffer=function(){var e=this;if(!e.destroyed)if(a.isTypeSupported(e._type)){if(e._sourceBuffer=e._mediaSource.addSourceBuffer(e._type),e._sourceBuffer.addEventListener("updateend",e._flowHandler),e._sourceBuffer.addEventListener("error",e._errorHandler),e._cb){var t=e._cb;e._cb=null,t()}}else e.destroy(new Error("The provided type is not supported"))},c.prototype._write=function(e,t,n){var i=this;if(!i.destroyed)if(i._sourceBuffer){if(i._sourceBuffer.updating)return n(new Error("Cannot append buffer while source buffer updating"));var s=r(e);i._wrapper._debug&&i._debugBuffers.push(s);try{i._sourceBuffer.appendBuffer(s)}catch(e){return void i.destroy(e)}i._cb=n}else i._cb=function(s){if(s)return n(s);i._write(e,t,n)}},c.prototype._flow=function(){var e=this;if(!e.destroyed&&e._sourceBuffer&&!e._sourceBuffer.updating&&!("open"===e._mediaSource.readyState&&e._getBufferDuration()>e._bufferDuration)&&e._cb){var t=e._cb;e._cb=null,t()}};c.prototype._getBufferDuration=function(){for(var e=this._sourceBuffer.buffered,t=this._elem.currentTime,n=-1,i=0;i<e.length;i++){var s=e.start(i),r=e.end(i)+0;if(s>t)break;(n>=0||t<=r)&&(n=r)}var a=n-t;return a<0&&(a=0),a}},{inherits:118,"readable-stream":139,"to-arraybuffer":288}],125:[function(e,t,n){arguments[4][15][0].apply(n,arguments)},{dup:15}],126:[function(e,t,n){arguments[4][16][0].apply(n,arguments)},{"./_stream_readable":128,"./_stream_writable":130,_process:186,dup:16,inherits:118}],127:[function(e,t,n){arguments[4][17][0].apply(n,arguments)},{"./_stream_transform":129,dup:17,inherits:118}],128:[function(e,t,n){arguments[4][18][0].apply(n,arguments)},{"../errors":125,"./_stream_duplex":126,"./internal/streams/async_iterator":131,"./internal/streams/buffer_list":132,"./internal/streams/destroy":133,"./internal/streams/from":135,"./internal/streams/state":137,"./internal/streams/stream":138,_process:186,buffer:59,dup:18,events:97,inherits:118,"string_decoder/":285,util:54}],129:[function(e,t,n){arguments[4][19][0].apply(n,arguments)},{"../errors":125,"./_stream_duplex":126,dup:19,inherits:118}],130:[function(e,t,n){arguments[4][20][0].apply(n,arguments)},{"../errors":125,"./_stream_duplex":126,"./internal/streams/destroy":133,"./internal/streams/state":137,"./internal/streams/stream":138,_process:186,buffer:59,dup:20,inherits:118,"util-deprecate":304}],131:[function(e,t,n){arguments[4][21][0].apply(n,arguments)},{"./end-of-stream":134,_process:186,dup:21}],132:[function(e,t,n){arguments[4][22][0].apply(n,arguments)},{buffer:59,dup:22,util:54}],133:[function(e,t,n){arguments[4][23][0].apply(n,arguments)},{_process:186,dup:23}],134:[function(e,t,n){arguments[4][24][0].apply(n,arguments)},{"../../../errors":125,dup:24}],135:[function(e,t,n){arguments[4][25][0].apply(n,arguments)},{dup:25}],136:[function(e,t,n){arguments[4][26][0].apply(n,arguments)},{"../../../errors":125,"./end-of-stream":134,dup:26}],137:[function(e,t,n){arguments[4][27][0].apply(n,arguments)},{"../../../errors":125,dup:27}],138:[function(e,t,n){arguments[4][28][0].apply(n,arguments)},{dup:28,events:97}],139:[function(e,t,n){arguments[4][29][0].apply(n,arguments)},{"./lib/_stream_duplex.js":126,"./lib/_stream_passthrough.js":127,"./lib/_stream_readable.js":128,"./lib/_stream_transform.js":129,"./lib/_stream_writable.js":130,"./lib/internal/streams/end-of-stream.js":134,"./lib/internal/streams/pipeline.js":136,dup:29}],140:[function(e,t,n){(function(e){(function(){function n(e,t){if(!(this instanceof n))return new n(e,t);if(t||(t={}),this.chunkLength=Number(e),!this.chunkLength)throw new Error("First argument must be a chunk length");this.chunks=[],this.closed=!1,this.length=Number(t.length)||1/0,this.length!==1/0&&(this.lastChunkLength=this.length%this.chunkLength||this.chunkLength,this.lastChunkIndex=Math.ceil(this.length/this.chunkLength)-1)}function i(t,n,i){e.nextTick((function(){t&&t(n,i)}))}t.exports=n,n.prototype.put=function(e,t,n){if(this.closed)return i(n,new Error("Storage is closed"));var s=e===this.lastChunkIndex;return s&&t.length!==this.lastChunkLength?i(n,new Error("Last chunk length must be "+this.lastChunkLength)):s||t.length===this.chunkLength?(this.chunks[e]=t,void i(n,null)):i(n,new Error("Chunk length must be "+this.chunkLength))},n.prototype.get=function(e,t,n){if("function"==typeof t)return this.get(e,null,t);if(this.closed)return i(n,new Error("Storage is closed"));var s=this.chunks[e];if(!s){var r=new Error("Chunk not found");return r.notFound=!0,i(n,r)}if(!t)return i(n,null,s);var a=t.offset||0,o=t.length||s.length-a;i(n,null,s.slice(a,o+a))},n.prototype.close=n.prototype.destroy=function(e){if(this.closed)return i(e,new Error("Storage is closed"));this.closed=!0,this.chunks=null,i(e,null)}}).call(this)}).call(this,e("_process"))},{_process:186}],141:[function(e,t,n){t.exports={"application/1d-interleaved-parityfec":{source:"iana"},"application/3gpdash-qoe-report+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/3gpp-ims+xml":{source:"iana",compressible:!0},"application/a2l":{source:"iana"},"application/activemessage":{source:"iana"},"application/activity+json":{source:"iana",compressible:!0},"application/alto-costmap+json":{source:"iana",compressible:!0},"application/alto-costmapfilter+json":{source:"iana",compressible:!0},"application/alto-directory+json":{source:"iana",compressible:!0},"application/alto-endpointcost+json":{source:"iana",compressible:!0},"application/alto-endpointcostparams+json":{source:"iana",compressible:!0},"application/alto-endpointprop+json":{source:"iana",compressible:!0},"application/alto-endpointpropparams+json":{source:"iana",compressible:!0},"application/alto-error+json":{source:"iana",compressible:!0},"application/alto-networkmap+json":{source:"iana",compressible:!0},"application/alto-networkmapfilter+json":{source:"iana",compressible:!0},"application/alto-updatestreamcontrol+json":{source:"iana",compressible:!0},"application/alto-updatestreamparams+json":{source:"iana",compressible:!0},"application/aml":{source:"iana"},"application/andrew-inset":{source:"iana",extensions:["ez"]},"application/applefile":{source:"iana"},"application/applixware":{source:"apache",extensions:["aw"]},"application/atf":{source:"iana"},"application/atfx":{source:"iana"},"application/atom+xml":{source:"iana",compressible:!0,extensions:["atom"]},"application/atomcat+xml":{source:"iana",compressible:!0,extensions:["atomcat"]},"application/atomdeleted+xml":{source:"iana",compressible:!0,extensions:["atomdeleted"]},"application/atomicmail":{source:"iana"},"application/atomsvc+xml":{source:"iana",compressible:!0,extensions:["atomsvc"]},"application/atsc-dwd+xml":{source:"iana",compressible:!0,extensions:["dwd"]},"application/atsc-dynamic-event-message":{source:"iana"},"application/atsc-held+xml":{source:"iana",compressible:!0,extensions:["held"]},"application/atsc-rdt+json":{source:"iana",compressible:!0},"application/atsc-rsat+xml":{source:"iana",compressible:!0,extensions:["rsat"]},"application/atxml":{source:"iana"},"application/auth-policy+xml":{source:"iana",compressible:!0},"application/bacnet-xdd+zip":{source:"iana",compressible:!1},"application/batch-smtp":{source:"iana"},"application/bdoc":{compressible:!1,extensions:["bdoc"]},"application/beep+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/calendar+json":{source:"iana",compressible:!0},"application/calendar+xml":{source:"iana",compressible:!0,extensions:["xcs"]},"application/call-completion":{source:"iana"},"application/cals-1840":{source:"iana"},"application/cap+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/cbor":{source:"iana"},"application/cbor-seq":{source:"iana"},"application/cccex":{source:"iana"},"application/ccmp+xml":{source:"iana",compressible:!0},"application/ccxml+xml":{source:"iana",compressible:!0,extensions:["ccxml"]},"application/cdfx+xml":{source:"iana",compressible:!0,extensions:["cdfx"]},"application/cdmi-capability":{source:"iana",extensions:["cdmia"]},"application/cdmi-container":{source:"iana",extensions:["cdmic"]},"application/cdmi-domain":{source:"iana",extensions:["cdmid"]},"application/cdmi-object":{source:"iana",extensions:["cdmio"]},"application/cdmi-queue":{source:"iana",extensions:["cdmiq"]},"application/cdni":{source:"iana"},"application/cea":{source:"iana"},"application/cea-2018+xml":{source:"iana",compressible:!0},"application/cellml+xml":{source:"iana",compressible:!0},"application/cfw":{source:"iana"},"application/clue+xml":{source:"iana",compressible:!0},"application/clue_info+xml":{source:"iana",compressible:!0},"application/cms":{source:"iana"},"application/cnrp+xml":{source:"iana",compressible:!0},"application/coap-group+json":{source:"iana",compressible:!0},"application/coap-payload":{source:"iana"},"application/commonground":{source:"iana"},"application/conference-info+xml":{source:"iana",compressible:!0},"application/cose":{source:"iana"},"application/cose-key":{source:"iana"},"application/cose-key-set":{source:"iana"},"application/cpl+xml":{source:"iana",compressible:!0},"application/csrattrs":{source:"iana"},"application/csta+xml":{source:"iana",compressible:!0},"application/cstadata+xml":{source:"iana",compressible:!0},"application/csvm+json":{source:"iana",compressible:!0},"application/cu-seeme":{source:"apache",extensions:["cu"]},"application/cwt":{source:"iana"},"application/cybercash":{source:"iana"},"application/dart":{compressible:!0},"application/dash+xml":{source:"iana",compressible:!0,extensions:["mpd"]},"application/dashdelta":{source:"iana"},"application/davmount+xml":{source:"iana",compressible:!0,extensions:["davmount"]},"application/dca-rft":{source:"iana"},"application/dcd":{source:"iana"},"application/dec-dx":{source:"iana"},"application/dialog-info+xml":{source:"iana",compressible:!0},"application/dicom":{source:"iana"},"application/dicom+json":{source:"iana",compressible:!0},"application/dicom+xml":{source:"iana",compressible:!0},"application/dii":{source:"iana"},"application/dit":{source:"iana"},"application/dns":{source:"iana"},"application/dns+json":{source:"iana",compressible:!0},"application/dns-message":{source:"iana"},"application/docbook+xml":{source:"apache",compressible:!0,extensions:["dbk"]},"application/dots+cbor":{source:"iana"},"application/dskpp+xml":{source:"iana",compressible:!0},"application/dssc+der":{source:"iana",extensions:["dssc"]},"application/dssc+xml":{source:"iana",compressible:!0,extensions:["xdssc"]},"application/dvcs":{source:"iana"},"application/ecmascript":{source:"iana",compressible:!0,extensions:["ecma","es"]},"application/edi-consent":{source:"iana"},"application/edi-x12":{source:"iana",compressible:!1},"application/edifact":{source:"iana",compressible:!1},"application/efi":{source:"iana"},"application/emergencycalldata.comment+xml":{source:"iana",compressible:!0},"application/emergencycalldata.control+xml":{source:"iana",compressible:!0},"application/emergencycalldata.deviceinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.ecall.msd":{source:"iana"},"application/emergencycalldata.providerinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.serviceinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.subscriberinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.veds+xml":{source:"iana",compressible:!0},"application/emma+xml":{source:"iana",compressible:!0,extensions:["emma"]},"application/emotionml+xml":{source:"iana",compressible:!0,extensions:["emotionml"]},"application/encaprtp":{source:"iana"},"application/epp+xml":{source:"iana",compressible:!0},"application/epub+zip":{source:"iana",compressible:!1,extensions:["epub"]},"application/eshop":{source:"iana"},"application/exi":{source:"iana",extensions:["exi"]},"application/expect-ct-report+json":{source:"iana",compressible:!0},"application/fastinfoset":{source:"iana"},"application/fastsoap":{source:"iana"},"application/fdt+xml":{source:"iana",compressible:!0,extensions:["fdt"]},"application/fhir+json":{source:"iana",charset:"UTF-8",compressible:!0},"application/fhir+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/fido.trusted-apps+json":{compressible:!0},"application/fits":{source:"iana"},"application/flexfec":{source:"iana"},"application/font-sfnt":{source:"iana"},"application/font-tdpfr":{source:"iana",extensions:["pfr"]},"application/font-woff":{source:"iana",compressible:!1},"application/framework-attributes+xml":{source:"iana",compressible:!0},"application/geo+json":{source:"iana",compressible:!0,extensions:["geojson"]},"application/geo+json-seq":{source:"iana"},"application/geopackage+sqlite3":{source:"iana"},"application/geoxacml+xml":{source:"iana",compressible:!0},"application/gltf-buffer":{source:"iana"},"application/gml+xml":{source:"iana",compressible:!0,extensions:["gml"]},"application/gpx+xml":{source:"apache",compressible:!0,extensions:["gpx"]},"application/gxf":{source:"apache",extensions:["gxf"]},"application/gzip":{source:"iana",compressible:!1,extensions:["gz"]},"application/h224":{source:"iana"},"application/held+xml":{source:"iana",compressible:!0},"application/hjson":{extensions:["hjson"]},"application/http":{source:"iana"},"application/hyperstudio":{source:"iana",extensions:["stk"]},"application/ibe-key-request+xml":{source:"iana",compressible:!0},"application/ibe-pkg-reply+xml":{source:"iana",compressible:!0},"application/ibe-pp-data":{source:"iana"},"application/iges":{source:"iana"},"application/im-iscomposing+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/index":{source:"iana"},"application/index.cmd":{source:"iana"},"application/index.obj":{source:"iana"},"application/index.response":{source:"iana"},"application/index.vnd":{source:"iana"},"application/inkml+xml":{source:"iana",compressible:!0,extensions:["ink","inkml"]},"application/iotp":{source:"iana"},"application/ipfix":{source:"iana",extensions:["ipfix"]},"application/ipp":{source:"iana"},"application/isup":{source:"iana"},"application/its+xml":{source:"iana",compressible:!0,extensions:["its"]},"application/java-archive":{source:"apache",compressible:!1,extensions:["jar","war","ear"]},"application/java-serialized-object":{source:"apache",compressible:!1,extensions:["ser"]},"application/java-vm":{source:"apache",compressible:!1,extensions:["class"]},"application/javascript":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["js","mjs"]},"application/jf2feed+json":{source:"iana",compressible:!0},"application/jose":{source:"iana"},"application/jose+json":{source:"iana",compressible:!0},"application/jrd+json":{source:"iana",compressible:!0},"application/json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["json","map"]},"application/json-patch+json":{source:"iana",compressible:!0},"application/json-seq":{source:"iana"},"application/json5":{extensions:["json5"]},"application/jsonml+json":{source:"apache",compressible:!0,extensions:["jsonml"]},"application/jwk+json":{source:"iana",compressible:!0},"application/jwk-set+json":{source:"iana",compressible:!0},"application/jwt":{source:"iana"},"application/kpml-request+xml":{source:"iana",compressible:!0},"application/kpml-response+xml":{source:"iana",compressible:!0},"application/ld+json":{source:"iana",compressible:!0,extensions:["jsonld"]},"application/lgr+xml":{source:"iana",compressible:!0,extensions:["lgr"]},"application/link-format":{source:"iana"},"application/load-control+xml":{source:"iana",compressible:!0},"application/lost+xml":{source:"iana",compressible:!0,extensions:["lostxml"]},"application/lostsync+xml":{source:"iana",compressible:!0},"application/lpf+zip":{source:"iana",compressible:!1},"application/lxf":{source:"iana"},"application/mac-binhex40":{source:"iana",extensions:["hqx"]},"application/mac-compactpro":{source:"apache",extensions:["cpt"]},"application/macwriteii":{source:"iana"},"application/mads+xml":{source:"iana",compressible:!0,extensions:["mads"]},"application/manifest+json":{charset:"UTF-8",compressible:!0,extensions:["webmanifest"]},"application/marc":{source:"iana",extensions:["mrc"]},"application/marcxml+xml":{source:"iana",compressible:!0,extensions:["mrcx"]},"application/mathematica":{source:"iana",extensions:["ma","nb","mb"]},"application/mathml+xml":{source:"iana",compressible:!0,extensions:["mathml"]},"application/mathml-content+xml":{source:"iana",compressible:!0},"application/mathml-presentation+xml":{source:"iana",compressible:!0},"application/mbms-associated-procedure-description+xml":{source:"iana",compressible:!0},"application/mbms-deregister+xml":{source:"iana",compressible:!0},"application/mbms-envelope+xml":{source:"iana",compressible:!0},"application/mbms-msk+xml":{source:"iana",compressible:!0},"application/mbms-msk-response+xml":{source:"iana",compressible:!0},"application/mbms-protection-description+xml":{source:"iana",compressible:!0},"application/mbms-reception-report+xml":{source:"iana",compressible:!0},"application/mbms-register+xml":{source:"iana",compressible:!0},"application/mbms-register-response+xml":{source:"iana",compressible:!0},"application/mbms-schedule+xml":{source:"iana",compressible:!0},"application/mbms-user-service-description+xml":{source:"iana",compressible:!0},"application/mbox":{source:"iana",extensions:["mbox"]},"application/media-policy-dataset+xml":{source:"iana",compressible:!0},"application/media_control+xml":{source:"iana",compressible:!0},"application/mediaservercontrol+xml":{source:"iana",compressible:!0,extensions:["mscml"]},"application/merge-patch+json":{source:"iana",compressible:!0},"application/metalink+xml":{source:"apache",compressible:!0,extensions:["metalink"]},"application/metalink4+xml":{source:"iana",compressible:!0,extensions:["meta4"]},"application/mets+xml":{source:"iana",compressible:!0,extensions:["mets"]},"application/mf4":{source:"iana"},"application/mikey":{source:"iana"},"application/mipc":{source:"iana"},"application/mmt-aei+xml":{source:"iana",compressible:!0,extensions:["maei"]},"application/mmt-usd+xml":{source:"iana",compressible:!0,extensions:["musd"]},"application/mods+xml":{source:"iana",compressible:!0,extensions:["mods"]},"application/moss-keys":{source:"iana"},"application/moss-signature":{source:"iana"},"application/mosskey-data":{source:"iana"},"application/mosskey-request":{source:"iana"},"application/mp21":{source:"iana",extensions:["m21","mp21"]},"application/mp4":{source:"iana",extensions:["mp4s","m4p"]},"application/mpeg4-generic":{source:"iana"},"application/mpeg4-iod":{source:"iana"},"application/mpeg4-iod-xmt":{source:"iana"},"application/mrb-consumer+xml":{source:"iana",compressible:!0,extensions:["xdf"]},"application/mrb-publish+xml":{source:"iana",compressible:!0,extensions:["xdf"]},"application/msc-ivr+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/msc-mixer+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/msword":{source:"iana",compressible:!1,extensions:["doc","dot"]},"application/mud+json":{source:"iana",compressible:!0},"application/multipart-core":{source:"iana"},"application/mxf":{source:"iana",extensions:["mxf"]},"application/n-quads":{source:"iana",extensions:["nq"]},"application/n-triples":{source:"iana",extensions:["nt"]},"application/nasdata":{source:"iana"},"application/news-checkgroups":{source:"iana",charset:"US-ASCII"},"application/news-groupinfo":{source:"iana",charset:"US-ASCII"},"application/news-transmission":{source:"iana"},"application/nlsml+xml":{source:"iana",compressible:!0},"application/node":{source:"iana",extensions:["cjs"]},"application/nss":{source:"iana"},"application/ocsp-request":{source:"iana"},"application/ocsp-response":{source:"iana"},"application/octet-stream":{source:"iana",compressible:!1,extensions:["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"]},"application/oda":{source:"iana",extensions:["oda"]},"application/odm+xml":{source:"iana",compressible:!0},"application/odx":{source:"iana"},"application/oebps-package+xml":{source:"iana",compressible:!0,extensions:["opf"]},"application/ogg":{source:"iana",compressible:!1,extensions:["ogx"]},"application/omdoc+xml":{source:"apache",compressible:!0,extensions:["omdoc"]},"application/onenote":{source:"apache",extensions:["onetoc","onetoc2","onetmp","onepkg"]},"application/oscore":{source:"iana"},"application/oxps":{source:"iana",extensions:["oxps"]},"application/p2p-overlay+xml":{source:"iana",compressible:!0,extensions:["relo"]},"application/parityfec":{source:"iana"},"application/passport":{source:"iana"},"application/patch-ops-error+xml":{source:"iana",compressible:!0,extensions:["xer"]},"application/pdf":{source:"iana",compressible:!1,extensions:["pdf"]},"application/pdx":{source:"iana"},"application/pem-certificate-chain":{source:"iana"},"application/pgp-encrypted":{source:"iana",compressible:!1,extensions:["pgp"]},"application/pgp-keys":{source:"iana"},"application/pgp-signature":{source:"iana",extensions:["asc","sig"]},"application/pics-rules":{source:"apache",extensions:["prf"]},"application/pidf+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/pidf-diff+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/pkcs10":{source:"iana",extensions:["p10"]},"application/pkcs12":{source:"iana"},"application/pkcs7-mime":{source:"iana",extensions:["p7m","p7c"]},"application/pkcs7-signature":{source:"iana",extensions:["p7s"]},"application/pkcs8":{source:"iana",extensions:["p8"]},"application/pkcs8-encrypted":{source:"iana"},"application/pkix-attr-cert":{source:"iana",extensions:["ac"]},"application/pkix-cert":{source:"iana",extensions:["cer"]},"application/pkix-crl":{source:"iana",extensions:["crl"]},"application/pkix-pkipath":{source:"iana",extensions:["pkipath"]},"application/pkixcmp":{source:"iana",extensions:["pki"]},"application/pls+xml":{source:"iana",compressible:!0,extensions:["pls"]},"application/poc-settings+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/postscript":{source:"iana",compressible:!0,extensions:["ai","eps","ps"]},"application/ppsp-tracker+json":{source:"iana",compressible:!0},"application/problem+json":{source:"iana",compressible:!0},"application/problem+xml":{source:"iana",compressible:!0},"application/provenance+xml":{source:"iana",compressible:!0,extensions:["provx"]},"application/prs.alvestrand.titrax-sheet":{source:"iana"},"application/prs.cww":{source:"iana",extensions:["cww"]},"application/prs.hpub+zip":{source:"iana",compressible:!1},"application/prs.nprend":{source:"iana"},"application/prs.plucker":{source:"iana"},"application/prs.rdf-xml-crypt":{source:"iana"},"application/prs.xsf+xml":{source:"iana",compressible:!0},"application/pskc+xml":{source:"iana",compressible:!0,extensions:["pskcxml"]},"application/pvd+json":{source:"iana",compressible:!0},"application/qsig":{source:"iana"},"application/raml+yaml":{compressible:!0,extensions:["raml"]},"application/raptorfec":{source:"iana"},"application/rdap+json":{source:"iana",compressible:!0},"application/rdf+xml":{source:"iana",compressible:!0,extensions:["rdf","owl"]},"application/reginfo+xml":{source:"iana",compressible:!0,extensions:["rif"]},"application/relax-ng-compact-syntax":{source:"iana",extensions:["rnc"]},"application/remote-printing":{source:"iana"},"application/reputon+json":{source:"iana",compressible:!0},"application/resource-lists+xml":{source:"iana",compressible:!0,extensions:["rl"]},"application/resource-lists-diff+xml":{source:"iana",compressible:!0,extensions:["rld"]},"application/rfc+xml":{source:"iana",compressible:!0},"application/riscos":{source:"iana"},"application/rlmi+xml":{source:"iana",compressible:!0},"application/rls-services+xml":{source:"iana",compressible:!0,extensions:["rs"]},"application/route-apd+xml":{source:"iana",compressible:!0,extensions:["rapd"]},"application/route-s-tsid+xml":{source:"iana",compressible:!0,extensions:["sls"]},"application/route-usd+xml":{source:"iana",compressible:!0,extensions:["rusd"]},"application/rpki-ghostbusters":{source:"iana",extensions:["gbr"]},"application/rpki-manifest":{source:"iana",extensions:["mft"]},"application/rpki-publication":{source:"iana"},"application/rpki-roa":{source:"iana",extensions:["roa"]},"application/rpki-updown":{source:"iana"},"application/rsd+xml":{source:"apache",compressible:!0,extensions:["rsd"]},"application/rss+xml":{source:"apache",compressible:!0,extensions:["rss"]},"application/rtf":{source:"iana",compressible:!0,extensions:["rtf"]},"application/rtploopback":{source:"iana"},"application/rtx":{source:"iana"},"application/samlassertion+xml":{source:"iana",compressible:!0},"application/samlmetadata+xml":{source:"iana",compressible:!0},"application/sbe":{source:"iana"},"application/sbml+xml":{source:"iana",compressible:!0,extensions:["sbml"]},"application/scaip+xml":{source:"iana",compressible:!0},"application/scim+json":{source:"iana",compressible:!0},"application/scvp-cv-request":{source:"iana",extensions:["scq"]},"application/scvp-cv-response":{source:"iana",extensions:["scs"]},"application/scvp-vp-request":{source:"iana",extensions:["spq"]},"application/scvp-vp-response":{source:"iana",extensions:["spp"]},"application/sdp":{source:"iana",extensions:["sdp"]},"application/secevent+jwt":{source:"iana"},"application/senml+cbor":{source:"iana"},"application/senml+json":{source:"iana",compressible:!0},"application/senml+xml":{source:"iana",compressible:!0,extensions:["senmlx"]},"application/senml-etch+cbor":{source:"iana"},"application/senml-etch+json":{source:"iana",compressible:!0},"application/senml-exi":{source:"iana"},"application/sensml+cbor":{source:"iana"},"application/sensml+json":{source:"iana",compressible:!0},"application/sensml+xml":{source:"iana",compressible:!0,extensions:["sensmlx"]},"application/sensml-exi":{source:"iana"},"application/sep+xml":{source:"iana",compressible:!0},"application/sep-exi":{source:"iana"},"application/session-info":{source:"iana"},"application/set-payment":{source:"iana"},"application/set-payment-initiation":{source:"iana",extensions:["setpay"]},"application/set-registration":{source:"iana"},"application/set-registration-initiation":{source:"iana",extensions:["setreg"]},"application/sgml":{source:"iana"},"application/sgml-open-catalog":{source:"iana"},"application/shf+xml":{source:"iana",compressible:!0,extensions:["shf"]},"application/sieve":{source:"iana",extensions:["siv","sieve"]},"application/simple-filter+xml":{source:"iana",compressible:!0},"application/simple-message-summary":{source:"iana"},"application/simplesymbolcontainer":{source:"iana"},"application/sipc":{source:"iana"},"application/slate":{source:"iana"},"application/smil":{source:"iana"},"application/smil+xml":{source:"iana",compressible:!0,extensions:["smi","smil"]},"application/smpte336m":{source:"iana"},"application/soap+fastinfoset":{source:"iana"},"application/soap+xml":{source:"iana",compressible:!0},"application/sparql-query":{source:"iana",extensions:["rq"]},"application/sparql-results+xml":{source:"iana",compressible:!0,extensions:["srx"]},"application/spirits-event+xml":{source:"iana",compressible:!0},"application/sql":{source:"iana"},"application/srgs":{source:"iana",extensions:["gram"]},"application/srgs+xml":{source:"iana",compressible:!0,extensions:["grxml"]},"application/sru+xml":{source:"iana",compressible:!0,extensions:["sru"]},"application/ssdl+xml":{source:"apache",compressible:!0,extensions:["ssdl"]},"application/ssml+xml":{source:"iana",compressible:!0,extensions:["ssml"]},"application/stix+json":{source:"iana",compressible:!0},"application/swid+xml":{source:"iana",compressible:!0,extensions:["swidtag"]},"application/tamp-apex-update":{source:"iana"},"application/tamp-apex-update-confirm":{source:"iana"},"application/tamp-community-update":{source:"iana"},"application/tamp-community-update-confirm":{source:"iana"},"application/tamp-error":{source:"iana"},"application/tamp-sequence-adjust":{source:"iana"},"application/tamp-sequence-adjust-confirm":{source:"iana"},"application/tamp-status-query":{source:"iana"},"application/tamp-status-response":{source:"iana"},"application/tamp-update":{source:"iana"},"application/tamp-update-confirm":{source:"iana"},"application/tar":{compressible:!0},"application/taxii+json":{source:"iana",compressible:!0},"application/td+json":{source:"iana",compressible:!0},"application/tei+xml":{source:"iana",compressible:!0,extensions:["tei","teicorpus"]},"application/tetra_isi":{source:"iana"},"application/thraud+xml":{source:"iana",compressible:!0,extensions:["tfi"]},"application/timestamp-query":{source:"iana"},"application/timestamp-reply":{source:"iana"},"application/timestamped-data":{source:"iana",extensions:["tsd"]},"application/tlsrpt+gzip":{source:"iana"},"application/tlsrpt+json":{source:"iana",compressible:!0},"application/tnauthlist":{source:"iana"},"application/toml":{compressible:!0,extensions:["toml"]},"application/trickle-ice-sdpfrag":{source:"iana"},"application/trig":{source:"iana"},"application/ttml+xml":{source:"iana",compressible:!0,extensions:["ttml"]},"application/tve-trigger":{source:"iana"},"application/tzif":{source:"iana"},"application/tzif-leap":{source:"iana"},"application/ulpfec":{source:"iana"},"application/urc-grpsheet+xml":{source:"iana",compressible:!0},"application/urc-ressheet+xml":{source:"iana",compressible:!0,extensions:["rsheet"]},"application/urc-targetdesc+xml":{source:"iana",compressible:!0},"application/urc-uisocketdesc+xml":{source:"iana",compressible:!0},"application/vcard+json":{source:"iana",compressible:!0},"application/vcard+xml":{source:"iana",compressible:!0},"application/vemmi":{source:"iana"},"application/vividence.scriptfile":{source:"apache"},"application/vnd.1000minds.decision-model+xml":{source:"iana",compressible:!0,extensions:["1km"]},"application/vnd.3gpp-prose+xml":{source:"iana",compressible:!0},"application/vnd.3gpp-prose-pc3ch+xml":{source:"iana",compressible:!0},"application/vnd.3gpp-v2x-local-service-information":{source:"iana"},"application/vnd.3gpp.access-transfer-events+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.bsf+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.gmop+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mc-signalling-ear":{source:"iana"},"application/vnd.3gpp.mcdata-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-payload":{source:"iana"},"application/vnd.3gpp.mcdata-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-signalling":{source:"iana"},"application/vnd.3gpp.mcdata-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-floor-request+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-location-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-mbms-usage-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-signed+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-ue-init-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-affiliation-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-location-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-mbms-usage-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-transmission-request+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mid-call+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.pic-bw-large":{source:"iana",extensions:["plb"]},"application/vnd.3gpp.pic-bw-small":{source:"iana",extensions:["psb"]},"application/vnd.3gpp.pic-bw-var":{source:"iana",extensions:["pvb"]},"application/vnd.3gpp.sms":{source:"iana"},"application/vnd.3gpp.sms+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.srvcc-ext+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.srvcc-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.state-and-event-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.ussd+xml":{source:"iana",compressible:!0},"application/vnd.3gpp2.bcmcsinfo+xml":{source:"iana",compressible:!0},"application/vnd.3gpp2.sms":{source:"iana"},"application/vnd.3gpp2.tcap":{source:"iana",extensions:["tcap"]},"application/vnd.3lightssoftware.imagescal":{source:"iana"},"application/vnd.3m.post-it-notes":{source:"iana",extensions:["pwn"]},"application/vnd.accpac.simply.aso":{source:"iana",extensions:["aso"]},"application/vnd.accpac.simply.imp":{source:"iana",extensions:["imp"]},"application/vnd.acucobol":{source:"iana",extensions:["acu"]},"application/vnd.acucorp":{source:"iana",extensions:["atc","acutc"]},"application/vnd.adobe.air-application-installer-package+zip":{source:"apache",compressible:!1,extensions:["air"]},"application/vnd.adobe.flash.movie":{source:"iana"},"application/vnd.adobe.formscentral.fcdt":{source:"iana",extensions:["fcdt"]},"application/vnd.adobe.fxp":{source:"iana",extensions:["fxp","fxpl"]},"application/vnd.adobe.partial-upload":{source:"iana"},"application/vnd.adobe.xdp+xml":{source:"iana",compressible:!0,extensions:["xdp"]},"application/vnd.adobe.xfdf":{source:"iana",extensions:["xfdf"]},"application/vnd.aether.imp":{source:"iana"},"application/vnd.afpc.afplinedata":{source:"iana"},"application/vnd.afpc.afplinedata-pagedef":{source:"iana"},"application/vnd.afpc.foca-charset":{source:"iana"},"application/vnd.afpc.foca-codedfont":{source:"iana"},"application/vnd.afpc.foca-codepage":{source:"iana"},"application/vnd.afpc.modca":{source:"iana"},"application/vnd.afpc.modca-formdef":{source:"iana"},"application/vnd.afpc.modca-mediummap":{source:"iana"},"application/vnd.afpc.modca-objectcontainer":{source:"iana"},"application/vnd.afpc.modca-overlay":{source:"iana"},"application/vnd.afpc.modca-pagesegment":{source:"iana"},"application/vnd.ah-barcode":{source:"iana"},"application/vnd.ahead.space":{source:"iana",extensions:["ahead"]},"application/vnd.airzip.filesecure.azf":{source:"iana",extensions:["azf"]},"application/vnd.airzip.filesecure.azs":{source:"iana",extensions:["azs"]},"application/vnd.amadeus+json":{source:"iana",compressible:!0},"application/vnd.amazon.ebook":{source:"apache",extensions:["azw"]},"application/vnd.amazon.mobi8-ebook":{source:"iana"},"application/vnd.americandynamics.acc":{source:"iana",extensions:["acc"]},"application/vnd.amiga.ami":{source:"iana",extensions:["ami"]},"application/vnd.amundsen.maze+xml":{source:"iana",compressible:!0},"application/vnd.android.ota":{source:"iana"},"application/vnd.android.package-archive":{source:"apache",compressible:!1,extensions:["apk"]},"application/vnd.anki":{source:"iana"},"application/vnd.anser-web-certificate-issue-initiation":{source:"iana",extensions:["cii"]},"application/vnd.anser-web-funds-transfer-initiation":{source:"apache",extensions:["fti"]},"application/vnd.antix.game-component":{source:"iana",extensions:["atx"]},"application/vnd.apache.thrift.binary":{source:"iana"},"application/vnd.apache.thrift.compact":{source:"iana"},"application/vnd.apache.thrift.json":{source:"iana"},"application/vnd.api+json":{source:"iana",compressible:!0},"application/vnd.aplextor.warrp+json":{source:"iana",compressible:!0},"application/vnd.apothekende.reservation+json":{source:"iana",compressible:!0},"application/vnd.apple.installer+xml":{source:"iana",compressible:!0,extensions:["mpkg"]},"application/vnd.apple.keynote":{source:"iana",extensions:["keynote"]},"application/vnd.apple.mpegurl":{source:"iana",extensions:["m3u8"]},"application/vnd.apple.numbers":{source:"iana",extensions:["numbers"]},"application/vnd.apple.pages":{source:"iana",extensions:["pages"]},"application/vnd.apple.pkpass":{compressible:!1,extensions:["pkpass"]},"application/vnd.arastra.swi":{source:"iana"},"application/vnd.aristanetworks.swi":{source:"iana",extensions:["swi"]},"application/vnd.artisan+json":{source:"iana",compressible:!0},"application/vnd.artsquare":{source:"iana"},"application/vnd.astraea-software.iota":{source:"iana",extensions:["iota"]},"application/vnd.audiograph":{source:"iana",extensions:["aep"]},"application/vnd.autopackage":{source:"iana"},"application/vnd.avalon+json":{source:"iana",compressible:!0},"application/vnd.avistar+xml":{source:"iana",compressible:!0},"application/vnd.balsamiq.bmml+xml":{source:"iana",compressible:!0,extensions:["bmml"]},"application/vnd.balsamiq.bmpr":{source:"iana"},"application/vnd.banana-accounting":{source:"iana"},"application/vnd.bbf.usp.error":{source:"iana"},"application/vnd.bbf.usp.msg":{source:"iana"},"application/vnd.bbf.usp.msg+json":{source:"iana",compressible:!0},"application/vnd.bekitzur-stech+json":{source:"iana",compressible:!0},"application/vnd.bint.med-content":{source:"iana"},"application/vnd.biopax.rdf+xml":{source:"iana",compressible:!0},"application/vnd.blink-idb-value-wrapper":{source:"iana"},"application/vnd.blueice.multipass":{source:"iana",extensions:["mpm"]},"application/vnd.bluetooth.ep.oob":{source:"iana"},"application/vnd.bluetooth.le.oob":{source:"iana"},"application/vnd.bmi":{source:"iana",extensions:["bmi"]},"application/vnd.bpf":{source:"iana"},"application/vnd.bpf3":{source:"iana"},"application/vnd.businessobjects":{source:"iana",extensions:["rep"]},"application/vnd.byu.uapi+json":{source:"iana",compressible:!0},"application/vnd.cab-jscript":{source:"iana"},"application/vnd.canon-cpdl":{source:"iana"},"application/vnd.canon-lips":{source:"iana"},"application/vnd.capasystems-pg+json":{source:"iana",compressible:!0},"application/vnd.cendio.thinlinc.clientconf":{source:"iana"},"application/vnd.century-systems.tcp_stream":{source:"iana"},"application/vnd.chemdraw+xml":{source:"iana",compressible:!0,extensions:["cdxml"]},"application/vnd.chess-pgn":{source:"iana"},"application/vnd.chipnuts.karaoke-mmd":{source:"iana",extensions:["mmd"]},"application/vnd.ciedi":{source:"iana"},"application/vnd.cinderella":{source:"iana",extensions:["cdy"]},"application/vnd.cirpack.isdn-ext":{source:"iana"},"application/vnd.citationstyles.style+xml":{source:"iana",compressible:!0,extensions:["csl"]},"application/vnd.claymore":{source:"iana",extensions:["cla"]},"application/vnd.cloanto.rp9":{source:"iana",extensions:["rp9"]},"application/vnd.clonk.c4group":{source:"iana",extensions:["c4g","c4d","c4f","c4p","c4u"]},"application/vnd.cluetrust.cartomobile-config":{source:"iana",extensions:["c11amc"]},"application/vnd.cluetrust.cartomobile-config-pkg":{source:"iana",extensions:["c11amz"]},"application/vnd.coffeescript":{source:"iana"},"application/vnd.collabio.xodocuments.document":{source:"iana"},"application/vnd.collabio.xodocuments.document-template":{source:"iana"},"application/vnd.collabio.xodocuments.presentation":{source:"iana"},"application/vnd.collabio.xodocuments.presentation-template":{source:"iana"},"application/vnd.collabio.xodocuments.spreadsheet":{source:"iana"},"application/vnd.collabio.xodocuments.spreadsheet-template":{source:"iana"},"application/vnd.collection+json":{source:"iana",compressible:!0},"application/vnd.collection.doc+json":{source:"iana",compressible:!0},"application/vnd.collection.next+json":{source:"iana",compressible:!0},"application/vnd.comicbook+zip":{source:"iana",compressible:!1},"application/vnd.comicbook-rar":{source:"iana"},"application/vnd.commerce-battelle":{source:"iana"},"application/vnd.commonspace":{source:"iana",extensions:["csp"]},"application/vnd.contact.cmsg":{source:"iana",extensions:["cdbcmsg"]},"application/vnd.coreos.ignition+json":{source:"iana",compressible:!0},"application/vnd.cosmocaller":{source:"iana",extensions:["cmc"]},"application/vnd.crick.clicker":{source:"iana",extensions:["clkx"]},"application/vnd.crick.clicker.keyboard":{source:"iana",extensions:["clkk"]},"application/vnd.crick.clicker.palette":{source:"iana",extensions:["clkp"]},"application/vnd.crick.clicker.template":{source:"iana",extensions:["clkt"]},"application/vnd.crick.clicker.wordbank":{source:"iana",extensions:["clkw"]},"application/vnd.criticaltools.wbs+xml":{source:"iana",compressible:!0,extensions:["wbs"]},"application/vnd.cryptii.pipe+json":{source:"iana",compressible:!0},"application/vnd.crypto-shade-file":{source:"iana"},"application/vnd.ctc-posml":{source:"iana",extensions:["pml"]},"application/vnd.ctct.ws+xml":{source:"iana",compressible:!0},"application/vnd.cups-pdf":{source:"iana"},"application/vnd.cups-postscript":{source:"iana"},"application/vnd.cups-ppd":{source:"iana",extensions:["ppd"]},"application/vnd.cups-raster":{source:"iana"},"application/vnd.cups-raw":{source:"iana"},"application/vnd.curl":{source:"iana"},"application/vnd.curl.car":{source:"apache",extensions:["car"]},"application/vnd.curl.pcurl":{source:"apache",extensions:["pcurl"]},"application/vnd.cyan.dean.root+xml":{source:"iana",compressible:!0},"application/vnd.cybank":{source:"iana"},"application/vnd.d2l.coursepackage1p0+zip":{source:"iana",compressible:!1},"application/vnd.dart":{source:"iana",compressible:!0,extensions:["dart"]},"application/vnd.data-vision.rdz":{source:"iana",extensions:["rdz"]},"application/vnd.datapackage+json":{source:"iana",compressible:!0},"application/vnd.dataresource+json":{source:"iana",compressible:!0},"application/vnd.dbf":{source:"iana"},"application/vnd.debian.binary-package":{source:"iana"},"application/vnd.dece.data":{source:"iana",extensions:["uvf","uvvf","uvd","uvvd"]},"application/vnd.dece.ttml+xml":{source:"iana",compressible:!0,extensions:["uvt","uvvt"]},"application/vnd.dece.unspecified":{source:"iana",extensions:["uvx","uvvx"]},"application/vnd.dece.zip":{source:"iana",extensions:["uvz","uvvz"]},"application/vnd.denovo.fcselayout-link":{source:"iana",extensions:["fe_launch"]},"application/vnd.desmume.movie":{source:"iana"},"application/vnd.dir-bi.plate-dl-nosuffix":{source:"iana"},"application/vnd.dm.delegation+xml":{source:"iana",compressible:!0},"application/vnd.dna":{source:"iana",extensions:["dna"]},"application/vnd.document+json":{source:"iana",compressible:!0},"application/vnd.dolby.mlp":{source:"apache",extensions:["mlp"]},"application/vnd.dolby.mobile.1":{source:"iana"},"application/vnd.dolby.mobile.2":{source:"iana"},"application/vnd.doremir.scorecloud-binary-document":{source:"iana"},"application/vnd.dpgraph":{source:"iana",extensions:["dpg"]},"application/vnd.dreamfactory":{source:"iana",extensions:["dfac"]},"application/vnd.drive+json":{source:"iana",compressible:!0},"application/vnd.ds-keypoint":{source:"apache",extensions:["kpxx"]},"application/vnd.dtg.local":{source:"iana"},"application/vnd.dtg.local.flash":{source:"iana"},"application/vnd.dtg.local.html":{source:"iana"},"application/vnd.dvb.ait":{source:"iana",extensions:["ait"]},"application/vnd.dvb.dvbisl+xml":{source:"iana",compressible:!0},"application/vnd.dvb.dvbj":{source:"iana"},"application/vnd.dvb.esgcontainer":{source:"iana"},"application/vnd.dvb.ipdcdftnotifaccess":{source:"iana"},"application/vnd.dvb.ipdcesgaccess":{source:"iana"},"application/vnd.dvb.ipdcesgaccess2":{source:"iana"},"application/vnd.dvb.ipdcesgpdd":{source:"iana"},"application/vnd.dvb.ipdcroaming":{source:"iana"},"application/vnd.dvb.iptv.alfec-base":{source:"iana"},"application/vnd.dvb.iptv.alfec-enhancement":{source:"iana"},"application/vnd.dvb.notif-aggregate-root+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-container+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-generic+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-msglist+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-registration-request+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-registration-response+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-init+xml":{source:"iana",compressible:!0},"application/vnd.dvb.pfr":{source:"iana"},"application/vnd.dvb.service":{source:"iana",extensions:["svc"]},"application/vnd.dxr":{source:"iana"},"application/vnd.dynageo":{source:"iana",extensions:["geo"]},"application/vnd.dzr":{source:"iana"},"application/vnd.easykaraoke.cdgdownload":{source:"iana"},"application/vnd.ecdis-update":{source:"iana"},"application/vnd.ecip.rlp":{source:"iana"},"application/vnd.ecowin.chart":{source:"iana",extensions:["mag"]},"application/vnd.ecowin.filerequest":{source:"iana"},"application/vnd.ecowin.fileupdate":{source:"iana"},"application/vnd.ecowin.series":{source:"iana"},"application/vnd.ecowin.seriesrequest":{source:"iana"},"application/vnd.ecowin.seriesupdate":{source:"iana"},"application/vnd.efi.img":{source:"iana"},"application/vnd.efi.iso":{source:"iana"},"application/vnd.emclient.accessrequest+xml":{source:"iana",compressible:!0},"application/vnd.enliven":{source:"iana",extensions:["nml"]},"application/vnd.enphase.envoy":{source:"iana"},"application/vnd.eprints.data+xml":{source:"iana",compressible:!0},"application/vnd.epson.esf":{source:"iana",extensions:["esf"]},"application/vnd.epson.msf":{source:"iana",extensions:["msf"]},"application/vnd.epson.quickanime":{source:"iana",extensions:["qam"]},"application/vnd.epson.salt":{source:"iana",extensions:["slt"]},"application/vnd.epson.ssf":{source:"iana",extensions:["ssf"]},"application/vnd.ericsson.quickcall":{source:"iana"},"application/vnd.espass-espass+zip":{source:"iana",compressible:!1},"application/vnd.eszigno3+xml":{source:"iana",compressible:!0,extensions:["es3","et3"]},"application/vnd.etsi.aoc+xml":{source:"iana",compressible:!0},"application/vnd.etsi.asic-e+zip":{source:"iana",compressible:!1},"application/vnd.etsi.asic-s+zip":{source:"iana",compressible:!1},"application/vnd.etsi.cug+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvcommand+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvdiscovery+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvprofile+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-bc+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-cod+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-npvr+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvservice+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsync+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvueprofile+xml":{source:"iana",compressible:!0},"application/vnd.etsi.mcid+xml":{source:"iana",compressible:!0},"application/vnd.etsi.mheg5":{source:"iana"},"application/vnd.etsi.overload-control-policy-dataset+xml":{source:"iana",compressible:!0},"application/vnd.etsi.pstn+xml":{source:"iana",compressible:!0},"application/vnd.etsi.sci+xml":{source:"iana",compressible:!0},"application/vnd.etsi.simservs+xml":{source:"iana",compressible:!0},"application/vnd.etsi.timestamp-token":{source:"iana"},"application/vnd.etsi.tsl+xml":{source:"iana",compressible:!0},"application/vnd.etsi.tsl.der":{source:"iana"},"application/vnd.eudora.data":{source:"iana"},"application/vnd.evolv.ecig.profile":{source:"iana"},"application/vnd.evolv.ecig.settings":{source:"iana"},"application/vnd.evolv.ecig.theme":{source:"iana"},"application/vnd.exstream-empower+zip":{source:"iana",compressible:!1},"application/vnd.exstream-package":{source:"iana"},"application/vnd.ezpix-album":{source:"iana",extensions:["ez2"]},"application/vnd.ezpix-package":{source:"iana",extensions:["ez3"]},"application/vnd.f-secure.mobile":{source:"iana"},"application/vnd.fastcopy-disk-image":{source:"iana"},"application/vnd.fdf":{source:"iana",extensions:["fdf"]},"application/vnd.fdsn.mseed":{source:"iana",extensions:["mseed"]},"application/vnd.fdsn.seed":{source:"iana",extensions:["seed","dataless"]},"application/vnd.ffsns":{source:"iana"},"application/vnd.ficlab.flb+zip":{source:"iana",compressible:!1},"application/vnd.filmit.zfc":{source:"iana"},"application/vnd.fints":{source:"iana"},"application/vnd.firemonkeys.cloudcell":{source:"iana"},"application/vnd.flographit":{source:"iana",extensions:["gph"]},"application/vnd.fluxtime.clip":{source:"iana",extensions:["ftc"]},"application/vnd.font-fontforge-sfd":{source:"iana"},"application/vnd.framemaker":{source:"iana",extensions:["fm","frame","maker","book"]},"application/vnd.frogans.fnc":{source:"iana",extensions:["fnc"]},"application/vnd.frogans.ltf":{source:"iana",extensions:["ltf"]},"application/vnd.fsc.weblaunch":{source:"iana",extensions:["fsc"]},"application/vnd.fujitsu.oasys":{source:"iana",extensions:["oas"]},"application/vnd.fujitsu.oasys2":{source:"iana",extensions:["oa2"]},"application/vnd.fujitsu.oasys3":{source:"iana",extensions:["oa3"]},"application/vnd.fujitsu.oasysgp":{source:"iana",extensions:["fg5"]},"application/vnd.fujitsu.oasysprs":{source:"iana",extensions:["bh2"]},"application/vnd.fujixerox.art-ex":{source:"iana"},"application/vnd.fujixerox.art4":{source:"iana"},"application/vnd.fujixerox.ddd":{source:"iana",extensions:["ddd"]},"application/vnd.fujixerox.docuworks":{source:"iana",extensions:["xdw"]},"application/vnd.fujixerox.docuworks.binder":{source:"iana",extensions:["xbd"]},"application/vnd.fujixerox.docuworks.container":{source:"iana"},"application/vnd.fujixerox.hbpl":{source:"iana"},"application/vnd.fut-misnet":{source:"iana"},"application/vnd.futoin+cbor":{source:"iana"},"application/vnd.futoin+json":{source:"iana",compressible:!0},"application/vnd.fuzzysheet":{source:"iana",extensions:["fzs"]},"application/vnd.genomatix.tuxedo":{source:"iana",extensions:["txd"]},"application/vnd.gentics.grd+json":{source:"iana",compressible:!0},"application/vnd.geo+json":{source:"iana",compressible:!0},"application/vnd.geocube+xml":{source:"iana",compressible:!0},"application/vnd.geogebra.file":{source:"iana",extensions:["ggb"]},"application/vnd.geogebra.tool":{source:"iana",extensions:["ggt"]},"application/vnd.geometry-explorer":{source:"iana",extensions:["gex","gre"]},"application/vnd.geonext":{source:"iana",extensions:["gxt"]},"application/vnd.geoplan":{source:"iana",extensions:["g2w"]},"application/vnd.geospace":{source:"iana",extensions:["g3w"]},"application/vnd.gerber":{source:"iana"},"application/vnd.globalplatform.card-content-mgt":{source:"iana"},"application/vnd.globalplatform.card-content-mgt-response":{source:"iana"},"application/vnd.gmx":{source:"iana",extensions:["gmx"]},"application/vnd.google-apps.document":{compressible:!1,extensions:["gdoc"]},"application/vnd.google-apps.presentation":{compressible:!1,extensions:["gslides"]},"application/vnd.google-apps.spreadsheet":{compressible:!1,extensions:["gsheet"]},"application/vnd.google-earth.kml+xml":{source:"iana",compressible:!0,extensions:["kml"]},"application/vnd.google-earth.kmz":{source:"iana",compressible:!1,extensions:["kmz"]},"application/vnd.gov.sk.e-form+xml":{source:"iana",compressible:!0},"application/vnd.gov.sk.e-form+zip":{source:"iana",compressible:!1},"application/vnd.gov.sk.xmldatacontainer+xml":{source:"iana",compressible:!0},"application/vnd.grafeq":{source:"iana",extensions:["gqf","gqs"]},"application/vnd.gridmp":{source:"iana"},"application/vnd.groove-account":{source:"iana",extensions:["gac"]},"application/vnd.groove-help":{source:"iana",extensions:["ghf"]},"application/vnd.groove-identity-message":{source:"iana",extensions:["gim"]},"application/vnd.groove-injector":{source:"iana",extensions:["grv"]},"application/vnd.groove-tool-message":{source:"iana",extensions:["gtm"]},"application/vnd.groove-tool-template":{source:"iana",extensions:["tpl"]},"application/vnd.groove-vcard":{source:"iana",extensions:["vcg"]},"application/vnd.hal+json":{source:"iana",compressible:!0},"application/vnd.hal+xml":{source:"iana",compressible:!0,extensions:["hal"]},"application/vnd.handheld-entertainment+xml":{source:"iana",compressible:!0,extensions:["zmm"]},"application/vnd.hbci":{source:"iana",extensions:["hbci"]},"application/vnd.hc+json":{source:"iana",compressible:!0},"application/vnd.hcl-bireports":{source:"iana"},"application/vnd.hdt":{source:"iana"},"application/vnd.heroku+json":{source:"iana",compressible:!0},"application/vnd.hhe.lesson-player":{source:"iana",extensions:["les"]},"application/vnd.hp-hpgl":{source:"iana",extensions:["hpgl"]},"application/vnd.hp-hpid":{source:"iana",extensions:["hpid"]},"application/vnd.hp-hps":{source:"iana",extensions:["hps"]},"application/vnd.hp-jlyt":{source:"iana",extensions:["jlt"]},"application/vnd.hp-pcl":{source:"iana",extensions:["pcl"]},"application/vnd.hp-pclxl":{source:"iana",extensions:["pclxl"]},"application/vnd.httphone":{source:"iana"},"application/vnd.hydrostatix.sof-data":{source:"iana",extensions:["sfd-hdstx"]},"application/vnd.hyper+json":{source:"iana",compressible:!0},"application/vnd.hyper-item+json":{source:"iana",compressible:!0},"application/vnd.hyperdrive+json":{source:"iana",compressible:!0},"application/vnd.hzn-3d-crossword":{source:"iana"},"application/vnd.ibm.afplinedata":{source:"iana"},"application/vnd.ibm.electronic-media":{source:"iana"},"application/vnd.ibm.minipay":{source:"iana",extensions:["mpy"]},"application/vnd.ibm.modcap":{source:"iana",extensions:["afp","listafp","list3820"]},"application/vnd.ibm.rights-management":{source:"iana",extensions:["irm"]},"application/vnd.ibm.secure-container":{source:"iana",extensions:["sc"]},"application/vnd.iccprofile":{source:"iana",extensions:["icc","icm"]},"application/vnd.ieee.1905":{source:"iana"},"application/vnd.igloader":{source:"iana",extensions:["igl"]},"application/vnd.imagemeter.folder+zip":{source:"iana",compressible:!1},"application/vnd.imagemeter.image+zip":{source:"iana",compressible:!1},"application/vnd.immervision-ivp":{source:"iana",extensions:["ivp"]},"application/vnd.immervision-ivu":{source:"iana",extensions:["ivu"]},"application/vnd.ims.imsccv1p1":{source:"iana"},"application/vnd.ims.imsccv1p2":{source:"iana"},"application/vnd.ims.imsccv1p3":{source:"iana"},"application/vnd.ims.lis.v2.result+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolconsumerprofile+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolproxy+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolproxy.id+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolsettings+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolsettings.simple+json":{source:"iana",compressible:!0},"application/vnd.informedcontrol.rms+xml":{source:"iana",compressible:!0},"application/vnd.informix-visionary":{source:"iana"},"application/vnd.infotech.project":{source:"iana"},"application/vnd.infotech.project+xml":{source:"iana",compressible:!0},"application/vnd.innopath.wamp.notification":{source:"iana"},"application/vnd.insors.igm":{source:"iana",extensions:["igm"]},"application/vnd.intercon.formnet":{source:"iana",extensions:["xpw","xpx"]},"application/vnd.intergeo":{source:"iana",extensions:["i2g"]},"application/vnd.intertrust.digibox":{source:"iana"},"application/vnd.intertrust.nncp":{source:"iana"},"application/vnd.intu.qbo":{source:"iana",extensions:["qbo"]},"application/vnd.intu.qfx":{source:"iana",extensions:["qfx"]},"application/vnd.iptc.g2.catalogitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.conceptitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.knowledgeitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.newsitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.newsmessage+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.packageitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.planningitem+xml":{source:"iana",compressible:!0},"application/vnd.ipunplugged.rcprofile":{source:"iana",extensions:["rcprofile"]},"application/vnd.irepository.package+xml":{source:"iana",compressible:!0,extensions:["irp"]},"application/vnd.is-xpr":{source:"iana",extensions:["xpr"]},"application/vnd.isac.fcs":{source:"iana",extensions:["fcs"]},"application/vnd.iso11783-10+zip":{source:"iana",compressible:!1},"application/vnd.jam":{source:"iana",extensions:["jam"]},"application/vnd.japannet-directory-service":{source:"iana"},"application/vnd.japannet-jpnstore-wakeup":{source:"iana"},"application/vnd.japannet-payment-wakeup":{source:"iana"},"application/vnd.japannet-registration":{source:"iana"},"application/vnd.japannet-registration-wakeup":{source:"iana"},"application/vnd.japannet-setstore-wakeup":{source:"iana"},"application/vnd.japannet-verification":{source:"iana"},"application/vnd.japannet-verification-wakeup":{source:"iana"},"application/vnd.jcp.javame.midlet-rms":{source:"iana",extensions:["rms"]},"application/vnd.jisp":{source:"iana",extensions:["jisp"]},"application/vnd.joost.joda-archive":{source:"iana",extensions:["joda"]},"application/vnd.jsk.isdn-ngn":{source:"iana"},"application/vnd.kahootz":{source:"iana",extensions:["ktz","ktr"]},"application/vnd.kde.karbon":{source:"iana",extensions:["karbon"]},"application/vnd.kde.kchart":{source:"iana",extensions:["chrt"]},"application/vnd.kde.kformula":{source:"iana",extensions:["kfo"]},"application/vnd.kde.kivio":{source:"iana",extensions:["flw"]},"application/vnd.kde.kontour":{source:"iana",extensions:["kon"]},"application/vnd.kde.kpresenter":{source:"iana",extensions:["kpr","kpt"]},"application/vnd.kde.kspread":{source:"iana",extensions:["ksp"]},"application/vnd.kde.kword":{source:"iana",extensions:["kwd","kwt"]},"application/vnd.kenameaapp":{source:"iana",extensions:["htke"]},"application/vnd.kidspiration":{source:"iana",extensions:["kia"]},"application/vnd.kinar":{source:"iana",extensions:["kne","knp"]},"application/vnd.koan":{source:"iana",extensions:["skp","skd","skt","skm"]},"application/vnd.kodak-descriptor":{source:"iana",extensions:["sse"]},"application/vnd.las":{source:"iana"},"application/vnd.las.las+json":{source:"iana",compressible:!0},"application/vnd.las.las+xml":{source:"iana",compressible:!0,extensions:["lasxml"]},"application/vnd.laszip":{source:"iana"},"application/vnd.leap+json":{source:"iana",compressible:!0},"application/vnd.liberty-request+xml":{source:"iana",compressible:!0},"application/vnd.llamagraphics.life-balance.desktop":{source:"iana",extensions:["lbd"]},"application/vnd.llamagraphics.life-balance.exchange+xml":{source:"iana",compressible:!0,extensions:["lbe"]},"application/vnd.logipipe.circuit+zip":{source:"iana",compressible:!1},"application/vnd.loom":{source:"iana"},"application/vnd.lotus-1-2-3":{source:"iana",extensions:["123"]},"application/vnd.lotus-approach":{source:"iana",extensions:["apr"]},"application/vnd.lotus-freelance":{source:"iana",extensions:["pre"]},"application/vnd.lotus-notes":{source:"iana",extensions:["nsf"]},"application/vnd.lotus-organizer":{source:"iana",extensions:["org"]},"application/vnd.lotus-screencam":{source:"iana",extensions:["scm"]},"application/vnd.lotus-wordpro":{source:"iana",extensions:["lwp"]},"application/vnd.macports.portpkg":{source:"iana",extensions:["portpkg"]},"application/vnd.mapbox-vector-tile":{source:"iana"},"application/vnd.marlin.drm.actiontoken+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.conftoken+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.license+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.mdcf":{source:"iana"},"application/vnd.mason+json":{source:"iana",compressible:!0},"application/vnd.maxmind.maxmind-db":{source:"iana"},"application/vnd.mcd":{source:"iana",extensions:["mcd"]},"application/vnd.medcalcdata":{source:"iana",extensions:["mc1"]},"application/vnd.mediastation.cdkey":{source:"iana",extensions:["cdkey"]},"application/vnd.meridian-slingshot":{source:"iana"},"application/vnd.mfer":{source:"iana",extensions:["mwf"]},"application/vnd.mfmp":{source:"iana",extensions:["mfm"]},"application/vnd.micro+json":{source:"iana",compressible:!0},"application/vnd.micrografx.flo":{source:"iana",extensions:["flo"]},"application/vnd.micrografx.igx":{source:"iana",extensions:["igx"]},"application/vnd.microsoft.portable-executable":{source:"iana"},"application/vnd.microsoft.windows.thumbnail-cache":{source:"iana"},"application/vnd.miele+json":{source:"iana",compressible:!0},"application/vnd.mif":{source:"iana",extensions:["mif"]},"application/vnd.minisoft-hp3000-save":{source:"iana"},"application/vnd.mitsubishi.misty-guard.trustweb":{source:"iana"},"application/vnd.mobius.daf":{source:"iana",extensions:["daf"]},"application/vnd.mobius.dis":{source:"iana",extensions:["dis"]},"application/vnd.mobius.mbk":{source:"iana",extensions:["mbk"]},"application/vnd.mobius.mqy":{source:"iana",extensions:["mqy"]},"application/vnd.mobius.msl":{source:"iana",extensions:["msl"]},"application/vnd.mobius.plc":{source:"iana",extensions:["plc"]},"application/vnd.mobius.txf":{source:"iana",extensions:["txf"]},"application/vnd.mophun.application":{source:"iana",extensions:["mpn"]},"application/vnd.mophun.certificate":{source:"iana",extensions:["mpc"]},"application/vnd.motorola.flexsuite":{source:"iana"},"application/vnd.motorola.flexsuite.adsi":{source:"iana"},"application/vnd.motorola.flexsuite.fis":{source:"iana"},"application/vnd.motorola.flexsuite.gotap":{source:"iana"},"application/vnd.motorola.flexsuite.kmr":{source:"iana"},"application/vnd.motorola.flexsuite.ttc":{source:"iana"},"application/vnd.motorola.flexsuite.wem":{source:"iana"},"application/vnd.motorola.iprm":{source:"iana"},"application/vnd.mozilla.xul+xml":{source:"iana",compressible:!0,extensions:["xul"]},"application/vnd.ms-3mfdocument":{source:"iana"},"application/vnd.ms-artgalry":{source:"iana",extensions:["cil"]},"application/vnd.ms-asf":{source:"iana"},"application/vnd.ms-cab-compressed":{source:"iana",extensions:["cab"]},"application/vnd.ms-color.iccprofile":{source:"apache"},"application/vnd.ms-excel":{source:"iana",compressible:!1,extensions:["xls","xlm","xla","xlc","xlt","xlw"]},"application/vnd.ms-excel.addin.macroenabled.12":{source:"iana",extensions:["xlam"]},"application/vnd.ms-excel.sheet.binary.macroenabled.12":{source:"iana",extensions:["xlsb"]},"application/vnd.ms-excel.sheet.macroenabled.12":{source:"iana",extensions:["xlsm"]},"application/vnd.ms-excel.template.macroenabled.12":{source:"iana",extensions:["xltm"]},"application/vnd.ms-fontobject":{source:"iana",compressible:!0,extensions:["eot"]},"application/vnd.ms-htmlhelp":{source:"iana",extensions:["chm"]},"application/vnd.ms-ims":{source:"iana",extensions:["ims"]},"application/vnd.ms-lrm":{source:"iana",extensions:["lrm"]},"application/vnd.ms-office.activex+xml":{source:"iana",compressible:!0},"application/vnd.ms-officetheme":{source:"iana",extensions:["thmx"]},"application/vnd.ms-opentype":{source:"apache",compressible:!0},"application/vnd.ms-outlook":{compressible:!1,extensions:["msg"]},"application/vnd.ms-package.obfuscated-opentype":{source:"apache"},"application/vnd.ms-pki.seccat":{source:"apache",extensions:["cat"]},"application/vnd.ms-pki.stl":{source:"apache",extensions:["stl"]},"application/vnd.ms-playready.initiator+xml":{source:"iana",compressible:!0},"application/vnd.ms-powerpoint":{source:"iana",compressible:!1,extensions:["ppt","pps","pot"]},"application/vnd.ms-powerpoint.addin.macroenabled.12":{source:"iana",extensions:["ppam"]},"application/vnd.ms-powerpoint.presentation.macroenabled.12":{source:"iana",extensions:["pptm"]},"application/vnd.ms-powerpoint.slide.macroenabled.12":{source:"iana",extensions:["sldm"]},"application/vnd.ms-powerpoint.slideshow.macroenabled.12":{source:"iana",extensions:["ppsm"]},"application/vnd.ms-powerpoint.template.macroenabled.12":{source:"iana",extensions:["potm"]},"application/vnd.ms-printdevicecapabilities+xml":{source:"iana",compressible:!0},"application/vnd.ms-printing.printticket+xml":{source:"apache",compressible:!0},"application/vnd.ms-printschematicket+xml":{source:"iana",compressible:!0},"application/vnd.ms-project":{source:"iana",extensions:["mpp","mpt"]},"application/vnd.ms-tnef":{source:"iana"},"application/vnd.ms-windows.devicepairing":{source:"iana"},"application/vnd.ms-windows.nwprinting.oob":{source:"iana"},"application/vnd.ms-windows.printerpairing":{source:"iana"},"application/vnd.ms-windows.wsd.oob":{source:"iana"},"application/vnd.ms-wmdrm.lic-chlg-req":{source:"iana"},"application/vnd.ms-wmdrm.lic-resp":{source:"iana"},"application/vnd.ms-wmdrm.meter-chlg-req":{source:"iana"},"application/vnd.ms-wmdrm.meter-resp":{source:"iana"},"application/vnd.ms-word.document.macroenabled.12":{source:"iana",extensions:["docm"]},"application/vnd.ms-word.template.macroenabled.12":{source:"iana",extensions:["dotm"]},"application/vnd.ms-works":{source:"iana",extensions:["wps","wks","wcm","wdb"]},"application/vnd.ms-wpl":{source:"iana",extensions:["wpl"]},"application/vnd.ms-xpsdocument":{source:"iana",compressible:!1,extensions:["xps"]},"application/vnd.msa-disk-image":{source:"iana"},"application/vnd.mseq":{source:"iana",extensions:["mseq"]},"application/vnd.msign":{source:"iana"},"application/vnd.multiad.creator":{source:"iana"},"application/vnd.multiad.creator.cif":{source:"iana"},"application/vnd.music-niff":{source:"iana"},"application/vnd.musician":{source:"iana",extensions:["mus"]},"application/vnd.muvee.style":{source:"iana",extensions:["msty"]},"application/vnd.mynfc":{source:"iana",extensions:["taglet"]},"application/vnd.ncd.control":{source:"iana"},"application/vnd.ncd.reference":{source:"iana"},"application/vnd.nearst.inv+json":{source:"iana",compressible:!0},"application/vnd.nervana":{source:"iana"},"application/vnd.netfpx":{source:"iana"},"application/vnd.neurolanguage.nlu":{source:"iana",extensions:["nlu"]},"application/vnd.nimn":{source:"iana"},"application/vnd.nintendo.nitro.rom":{source:"iana"},"application/vnd.nintendo.snes.rom":{source:"iana"},"application/vnd.nitf":{source:"iana",extensions:["ntf","nitf"]},"application/vnd.noblenet-directory":{source:"iana",extensions:["nnd"]},"application/vnd.noblenet-sealer":{source:"iana",extensions:["nns"]},"application/vnd.noblenet-web":{source:"iana",extensions:["nnw"]},"application/vnd.nokia.catalogs":{source:"iana"},"application/vnd.nokia.conml+wbxml":{source:"iana"},"application/vnd.nokia.conml+xml":{source:"iana",compressible:!0},"application/vnd.nokia.iptv.config+xml":{source:"iana",compressible:!0},"application/vnd.nokia.isds-radio-presets":{source:"iana"},"application/vnd.nokia.landmark+wbxml":{source:"iana"},"application/vnd.nokia.landmark+xml":{source:"iana",compressible:!0},"application/vnd.nokia.landmarkcollection+xml":{source:"iana",compressible:!0},"application/vnd.nokia.n-gage.ac+xml":{source:"iana",compressible:!0,extensions:["ac"]},"application/vnd.nokia.n-gage.data":{source:"iana",extensions:["ngdat"]},"application/vnd.nokia.n-gage.symbian.install":{source:"iana",extensions:["n-gage"]},"application/vnd.nokia.ncd":{source:"iana"},"application/vnd.nokia.pcd+wbxml":{source:"iana"},"application/vnd.nokia.pcd+xml":{source:"iana",compressible:!0},"application/vnd.nokia.radio-preset":{source:"iana",extensions:["rpst"]},"application/vnd.nokia.radio-presets":{source:"iana",extensions:["rpss"]},"application/vnd.novadigm.edm":{source:"iana",extensions:["edm"]},"application/vnd.novadigm.edx":{source:"iana",extensions:["edx"]},"application/vnd.novadigm.ext":{source:"iana",extensions:["ext"]},"application/vnd.ntt-local.content-share":{source:"iana"},"application/vnd.ntt-local.file-transfer":{source:"iana"},"application/vnd.ntt-local.ogw_remote-access":{source:"iana"},"application/vnd.ntt-local.sip-ta_remote":{source:"iana"},"application/vnd.ntt-local.sip-ta_tcp_stream":{source:"iana"},"application/vnd.oasis.opendocument.chart":{source:"iana",extensions:["odc"]},"application/vnd.oasis.opendocument.chart-template":{source:"iana",extensions:["otc"]},"application/vnd.oasis.opendocument.database":{source:"iana",extensions:["odb"]},"application/vnd.oasis.opendocument.formula":{source:"iana",extensions:["odf"]},"application/vnd.oasis.opendocument.formula-template":{source:"iana",extensions:["odft"]},"application/vnd.oasis.opendocument.graphics":{source:"iana",compressible:!1,extensions:["odg"]},"application/vnd.oasis.opendocument.graphics-template":{source:"iana",extensions:["otg"]},"application/vnd.oasis.opendocument.image":{source:"iana",extensions:["odi"]},"application/vnd.oasis.opendocument.image-template":{source:"iana",extensions:["oti"]},"application/vnd.oasis.opendocument.presentation":{source:"iana",compressible:!1,extensions:["odp"]},"application/vnd.oasis.opendocument.presentation-template":{source:"iana",extensions:["otp"]},"application/vnd.oasis.opendocument.spreadsheet":{source:"iana",compressible:!1,extensions:["ods"]},"application/vnd.oasis.opendocument.spreadsheet-template":{source:"iana",extensions:["ots"]},"application/vnd.oasis.opendocument.text":{source:"iana",compressible:!1,extensions:["odt"]},"application/vnd.oasis.opendocument.text-master":{source:"iana",extensions:["odm"]},"application/vnd.oasis.opendocument.text-template":{source:"iana",extensions:["ott"]},"application/vnd.oasis.opendocument.text-web":{source:"iana",extensions:["oth"]},"application/vnd.obn":{source:"iana"},"application/vnd.ocf+cbor":{source:"iana"},"application/vnd.oci.image.manifest.v1+json":{source:"iana",compressible:!0},"application/vnd.oftn.l10n+json":{source:"iana",compressible:!0},"application/vnd.oipf.contentaccessdownload+xml":{source:"iana",compressible:!0},"application/vnd.oipf.contentaccessstreaming+xml":{source:"iana",compressible:!0},"application/vnd.oipf.cspg-hexbinary":{source:"iana"},"application/vnd.oipf.dae.svg+xml":{source:"iana",compressible:!0},"application/vnd.oipf.dae.xhtml+xml":{source:"iana",compressible:!0},"application/vnd.oipf.mippvcontrolmessage+xml":{source:"iana",compressible:!0},"application/vnd.oipf.pae.gem":{source:"iana"},"application/vnd.oipf.spdiscovery+xml":{source:"iana",compressible:!0},"application/vnd.oipf.spdlist+xml":{source:"iana",compressible:!0},"application/vnd.oipf.ueprofile+xml":{source:"iana",compressible:!0},"application/vnd.oipf.userprofile+xml":{source:"iana",compressible:!0},"application/vnd.olpc-sugar":{source:"iana",extensions:["xo"]},"application/vnd.oma-scws-config":{source:"iana"},"application/vnd.oma-scws-http-request":{source:"iana"},"application/vnd.oma-scws-http-response":{source:"iana"},"application/vnd.oma.bcast.associated-procedure-parameter+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.drm-trigger+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.imd+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.ltkm":{source:"iana"},"application/vnd.oma.bcast.notification+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.provisioningtrigger":{source:"iana"},"application/vnd.oma.bcast.sgboot":{source:"iana"},"application/vnd.oma.bcast.sgdd+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.sgdu":{source:"iana"},"application/vnd.oma.bcast.simple-symbol-container":{source:"iana"},"application/vnd.oma.bcast.smartcard-trigger+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.sprov+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.stkm":{source:"iana"},"application/vnd.oma.cab-address-book+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-feature-handler+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-pcc+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-subs-invite+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-user-prefs+xml":{source:"iana",compressible:!0},"application/vnd.oma.dcd":{source:"iana"},"application/vnd.oma.dcdc":{source:"iana"},"application/vnd.oma.dd2+xml":{source:"iana",compressible:!0,extensions:["dd2"]},"application/vnd.oma.drm.risd+xml":{source:"iana",compressible:!0},"application/vnd.oma.group-usage-list+xml":{source:"iana",compressible:!0},"application/vnd.oma.lwm2m+json":{source:"iana",compressible:!0},"application/vnd.oma.lwm2m+tlv":{source:"iana"},"application/vnd.oma.pal+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.detailed-progress-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.final-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.groups+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.invocation-descriptor+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.optimized-progress-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.push":{source:"iana"},"application/vnd.oma.scidm.messages+xml":{source:"iana",compressible:!0},"application/vnd.oma.xcap-directory+xml":{source:"iana",compressible:!0},"application/vnd.omads-email+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omads-file+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omads-folder+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omaloc-supl-init":{source:"iana"},"application/vnd.onepager":{source:"iana"},"application/vnd.onepagertamp":{source:"iana"},"application/vnd.onepagertamx":{source:"iana"},"application/vnd.onepagertat":{source:"iana"},"application/vnd.onepagertatp":{source:"iana"},"application/vnd.onepagertatx":{source:"iana"},"application/vnd.openblox.game+xml":{source:"iana",compressible:!0,extensions:["obgx"]},"application/vnd.openblox.game-binary":{source:"iana"},"application/vnd.openeye.oeb":{source:"iana"},"application/vnd.openofficeorg.extension":{source:"apache",extensions:["oxt"]},"application/vnd.openstreetmap.data+xml":{source:"iana",compressible:!0,extensions:["osm"]},"application/vnd.openxmlformats-officedocument.custom-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.customxmlproperties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawing+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.chart+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.extended-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.presentation":{source:"iana",compressible:!1,extensions:["pptx"]},"application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.presprops+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slide":{source:"iana",extensions:["sldx"]},"application/vnd.openxmlformats-officedocument.presentationml.slide+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slideshow":{source:"iana",extensions:["ppsx"]},"application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.tags+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.template":{source:"iana",extensions:["potx"]},"application/vnd.openxmlformats-officedocument.presentationml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{source:"iana",compressible:!1,extensions:["xlsx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.template":{source:"iana",extensions:["xltx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.theme+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.themeoverride+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.vmldrawing":{source:"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.document":{source:"iana",compressible:!1,extensions:["docx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.template":{source:"iana",extensions:["dotx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.core-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.relationships+xml":{source:"iana",compressible:!0},"application/vnd.oracle.resource+json":{source:"iana",compressible:!0},"application/vnd.orange.indata":{source:"iana"},"application/vnd.osa.netdeploy":{source:"iana"},"application/vnd.osgeo.mapguide.package":{source:"iana",extensions:["mgp"]},"application/vnd.osgi.bundle":{source:"iana"},"application/vnd.osgi.dp":{source:"iana",extensions:["dp"]},"application/vnd.osgi.subsystem":{source:"iana",extensions:["esa"]},"application/vnd.otps.ct-kip+xml":{source:"iana",compressible:!0},"application/vnd.oxli.countgraph":{source:"iana"},"application/vnd.pagerduty+json":{source:"iana",compressible:!0},"application/vnd.palm":{source:"iana",extensions:["pdb","pqa","oprc"]},"application/vnd.panoply":{source:"iana"},"application/vnd.paos.xml":{source:"iana"},"application/vnd.patentdive":{source:"iana"},"application/vnd.patientecommsdoc":{source:"iana"},"application/vnd.pawaafile":{source:"iana",extensions:["paw"]},"application/vnd.pcos":{source:"iana"},"application/vnd.pg.format":{source:"iana",extensions:["str"]},"application/vnd.pg.osasli":{source:"iana",extensions:["ei6"]},"application/vnd.piaccess.application-licence":{source:"iana"},"application/vnd.picsel":{source:"iana",extensions:["efif"]},"application/vnd.pmi.widget":{source:"iana",extensions:["wg"]},"application/vnd.poc.group-advertisement+xml":{source:"iana",compressible:!0},"application/vnd.pocketlearn":{source:"iana",extensions:["plf"]},"application/vnd.powerbuilder6":{source:"iana",extensions:["pbd"]},"application/vnd.powerbuilder6-s":{source:"iana"},"application/vnd.powerbuilder7":{source:"iana"},"application/vnd.powerbuilder7-s":{source:"iana"},"application/vnd.powerbuilder75":{source:"iana"},"application/vnd.powerbuilder75-s":{source:"iana"},"application/vnd.preminet":{source:"iana"},"application/vnd.previewsystems.box":{source:"iana",extensions:["box"]},"application/vnd.proteus.magazine":{source:"iana",extensions:["mgz"]},"application/vnd.psfs":{source:"iana"},"application/vnd.publishare-delta-tree":{source:"iana",extensions:["qps"]},"application/vnd.pvi.ptid1":{source:"iana",extensions:["ptid"]},"application/vnd.pwg-multiplexed":{source:"iana"},"application/vnd.pwg-xhtml-print+xml":{source:"iana",compressible:!0},"application/vnd.qualcomm.brew-app-res":{source:"iana"},"application/vnd.quarantainenet":{source:"iana"},"application/vnd.quark.quarkxpress":{source:"iana",extensions:["qxd","qxt","qwd","qwt","qxl","qxb"]},"application/vnd.quobject-quoxdocument":{source:"iana"},"application/vnd.radisys.moml+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-conf+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-conn+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-dialog+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-stream+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-conf+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-base+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-fax-detect+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-fax-sendrecv+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-group+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-speech+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-transform+xml":{source:"iana",compressible:!0},"application/vnd.rainstor.data":{source:"iana"},"application/vnd.rapid":{source:"iana"},"application/vnd.rar":{source:"iana"},"application/vnd.realvnc.bed":{source:"iana",extensions:["bed"]},"application/vnd.recordare.musicxml":{source:"iana",extensions:["mxl"]},"application/vnd.recordare.musicxml+xml":{source:"iana",compressible:!0,extensions:["musicxml"]},"application/vnd.renlearn.rlprint":{source:"iana"},"application/vnd.restful+json":{source:"iana",compressible:!0},"application/vnd.rig.cryptonote":{source:"iana",extensions:["cryptonote"]},"application/vnd.rim.cod":{source:"apache",extensions:["cod"]},"application/vnd.rn-realmedia":{source:"apache",extensions:["rm"]},"application/vnd.rn-realmedia-vbr":{source:"apache",extensions:["rmvb"]},"application/vnd.route66.link66+xml":{source:"iana",compressible:!0,extensions:["link66"]},"application/vnd.rs-274x":{source:"iana"},"application/vnd.ruckus.download":{source:"iana"},"application/vnd.s3sms":{source:"iana"},"application/vnd.sailingtracker.track":{source:"iana",extensions:["st"]},"application/vnd.sar":{source:"iana"},"application/vnd.sbm.cid":{source:"iana"},"application/vnd.sbm.mid2":{source:"iana"},"application/vnd.scribus":{source:"iana"},"application/vnd.sealed.3df":{source:"iana"},"application/vnd.sealed.csf":{source:"iana"},"application/vnd.sealed.doc":{source:"iana"},"application/vnd.sealed.eml":{source:"iana"},"application/vnd.sealed.mht":{source:"iana"},"application/vnd.sealed.net":{source:"iana"},"application/vnd.sealed.ppt":{source:"iana"},"application/vnd.sealed.tiff":{source:"iana"},"application/vnd.sealed.xls":{source:"iana"},"application/vnd.sealedmedia.softseal.html":{source:"iana"},"application/vnd.sealedmedia.softseal.pdf":{source:"iana"},"application/vnd.seemail":{source:"iana",extensions:["see"]},"application/vnd.sema":{source:"iana",extensions:["sema"]},"application/vnd.semd":{source:"iana",extensions:["semd"]},"application/vnd.semf":{source:"iana",extensions:["semf"]},"application/vnd.shade-save-file":{source:"iana"},"application/vnd.shana.informed.formdata":{source:"iana",extensions:["ifm"]},"application/vnd.shana.informed.formtemplate":{source:"iana",extensions:["itp"]},"application/vnd.shana.informed.interchange":{source:"iana",extensions:["iif"]},"application/vnd.shana.informed.package":{source:"iana",extensions:["ipk"]},"application/vnd.shootproof+json":{source:"iana",compressible:!0},"application/vnd.shopkick+json":{source:"iana",compressible:!0},"application/vnd.shp":{source:"iana"},"application/vnd.shx":{source:"iana"},"application/vnd.sigrok.session":{source:"iana"},"application/vnd.simtech-mindmapper":{source:"iana",extensions:["twd","twds"]},"application/vnd.siren+json":{source:"iana",compressible:!0},"application/vnd.smaf":{source:"iana",extensions:["mmf"]},"application/vnd.smart.notebook":{source:"iana"},"application/vnd.smart.teacher":{source:"iana",extensions:["teacher"]},"application/vnd.snesdev-page-table":{source:"iana"},"application/vnd.software602.filler.form+xml":{source:"iana",compressible:!0,extensions:["fo"]},"application/vnd.software602.filler.form-xml-zip":{source:"iana"},"application/vnd.solent.sdkm+xml":{source:"iana",compressible:!0,extensions:["sdkm","sdkd"]},"application/vnd.spotfire.dxp":{source:"iana",extensions:["dxp"]},"application/vnd.spotfire.sfs":{source:"iana",extensions:["sfs"]},"application/vnd.sqlite3":{source:"iana"},"application/vnd.sss-cod":{source:"iana"},"application/vnd.sss-dtf":{source:"iana"},"application/vnd.sss-ntf":{source:"iana"},"application/vnd.stardivision.calc":{source:"apache",extensions:["sdc"]},"application/vnd.stardivision.draw":{source:"apache",extensions:["sda"]},"application/vnd.stardivision.impress":{source:"apache",extensions:["sdd"]},"application/vnd.stardivision.math":{source:"apache",extensions:["smf"]},"application/vnd.stardivision.writer":{source:"apache",extensions:["sdw","vor"]},"application/vnd.stardivision.writer-global":{source:"apache",extensions:["sgl"]},"application/vnd.stepmania.package":{source:"iana",extensions:["smzip"]},"application/vnd.stepmania.stepchart":{source:"iana",extensions:["sm"]},"application/vnd.street-stream":{source:"iana"},"application/vnd.sun.wadl+xml":{source:"iana",compressible:!0,extensions:["wadl"]},"application/vnd.sun.xml.calc":{source:"apache",extensions:["sxc"]},"application/vnd.sun.xml.calc.template":{source:"apache",extensions:["stc"]},"application/vnd.sun.xml.draw":{source:"apache",extensions:["sxd"]},"application/vnd.sun.xml.draw.template":{source:"apache",extensions:["std"]},"application/vnd.sun.xml.impress":{source:"apache",extensions:["sxi"]},"application/vnd.sun.xml.impress.template":{source:"apache",extensions:["sti"]},"application/vnd.sun.xml.math":{source:"apache",extensions:["sxm"]},"application/vnd.sun.xml.writer":{source:"apache",extensions:["sxw"]},"application/vnd.sun.xml.writer.global":{source:"apache",extensions:["sxg"]},"application/vnd.sun.xml.writer.template":{source:"apache",extensions:["stw"]},"application/vnd.sus-calendar":{source:"iana",extensions:["sus","susp"]},"application/vnd.svd":{source:"iana",extensions:["svd"]},"application/vnd.swiftview-ics":{source:"iana"},"application/vnd.symbian.install":{source:"apache",extensions:["sis","sisx"]},"application/vnd.syncml+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["xsm"]},"application/vnd.syncml.dm+wbxml":{source:"iana",charset:"UTF-8",extensions:["bdm"]},"application/vnd.syncml.dm+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["xdm"]},"application/vnd.syncml.dm.notification":{source:"iana"},"application/vnd.syncml.dmddf+wbxml":{source:"iana"},"application/vnd.syncml.dmddf+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["ddf"]},"application/vnd.syncml.dmtnds+wbxml":{source:"iana"},"application/vnd.syncml.dmtnds+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.syncml.ds.notification":{source:"iana"},"application/vnd.tableschema+json":{source:"iana",compressible:!0},"application/vnd.tao.intent-module-archive":{source:"iana",extensions:["tao"]},"application/vnd.tcpdump.pcap":{source:"iana",extensions:["pcap","cap","dmp"]},"application/vnd.think-cell.ppttc+json":{source:"iana",compressible:!0},"application/vnd.tmd.mediaflex.api+xml":{source:"iana",compressible:!0},"application/vnd.tml":{source:"iana"},"application/vnd.tmobile-livetv":{source:"iana",extensions:["tmo"]},"application/vnd.tri.onesource":{source:"iana"},"application/vnd.trid.tpt":{source:"iana",extensions:["tpt"]},"application/vnd.triscape.mxs":{source:"iana",extensions:["mxs"]},"application/vnd.trueapp":{source:"iana",extensions:["tra"]},"application/vnd.truedoc":{source:"iana"},"application/vnd.ubisoft.webplayer":{source:"iana"},"application/vnd.ufdl":{source:"iana",extensions:["ufd","ufdl"]},"application/vnd.uiq.theme":{source:"iana",extensions:["utz"]},"application/vnd.umajin":{source:"iana",extensions:["umj"]},"application/vnd.unity":{source:"iana",extensions:["unityweb"]},"application/vnd.uoml+xml":{source:"iana",compressible:!0,extensions:["uoml"]},"application/vnd.uplanet.alert":{source:"iana"},"application/vnd.uplanet.alert-wbxml":{source:"iana"},"application/vnd.uplanet.bearer-choice":{source:"iana"},"application/vnd.uplanet.bearer-choice-wbxml":{source:"iana"},"application/vnd.uplanet.cacheop":{source:"iana"},"application/vnd.uplanet.cacheop-wbxml":{source:"iana"},"application/vnd.uplanet.channel":{source:"iana"},"application/vnd.uplanet.channel-wbxml":{source:"iana"},"application/vnd.uplanet.list":{source:"iana"},"application/vnd.uplanet.list-wbxml":{source:"iana"},"application/vnd.uplanet.listcmd":{source:"iana"},"application/vnd.uplanet.listcmd-wbxml":{source:"iana"},"application/vnd.uplanet.signal":{source:"iana"},"application/vnd.uri-map":{source:"iana"},"application/vnd.valve.source.material":{source:"iana"},"application/vnd.vcx":{source:"iana",extensions:["vcx"]},"application/vnd.vd-study":{source:"iana"},"application/vnd.vectorworks":{source:"iana"},"application/vnd.vel+json":{source:"iana",compressible:!0},"application/vnd.verimatrix.vcas":{source:"iana"},"application/vnd.veryant.thin":{source:"iana"},"application/vnd.ves.encrypted":{source:"iana"},"application/vnd.vidsoft.vidconference":{source:"iana"},"application/vnd.visio":{source:"iana",extensions:["vsd","vst","vss","vsw"]},"application/vnd.visionary":{source:"iana",extensions:["vis"]},"application/vnd.vividence.scriptfile":{source:"iana"},"application/vnd.vsf":{source:"iana",extensions:["vsf"]},"application/vnd.wap.sic":{source:"iana"},"application/vnd.wap.slc":{source:"iana"},"application/vnd.wap.wbxml":{source:"iana",charset:"UTF-8",extensions:["wbxml"]},"application/vnd.wap.wmlc":{source:"iana",extensions:["wmlc"]},"application/vnd.wap.wmlscriptc":{source:"iana",extensions:["wmlsc"]},"application/vnd.webturbo":{source:"iana",extensions:["wtb"]},"application/vnd.wfa.p2p":{source:"iana"},"application/vnd.wfa.wsc":{source:"iana"},"application/vnd.windows.devicepairing":{source:"iana"},"application/vnd.wmc":{source:"iana"},"application/vnd.wmf.bootstrap":{source:"iana"},"application/vnd.wolfram.mathematica":{source:"iana"},"application/vnd.wolfram.mathematica.package":{source:"iana"},"application/vnd.wolfram.player":{source:"iana",extensions:["nbp"]},"application/vnd.wordperfect":{source:"iana",extensions:["wpd"]},"application/vnd.wqd":{source:"iana",extensions:["wqd"]},"application/vnd.wrq-hp3000-labelled":{source:"iana"},"application/vnd.wt.stf":{source:"iana",extensions:["stf"]},"application/vnd.wv.csp+wbxml":{source:"iana"},"application/vnd.wv.csp+xml":{source:"iana",compressible:!0},"application/vnd.wv.ssp+xml":{source:"iana",compressible:!0},"application/vnd.xacml+json":{source:"iana",compressible:!0},"application/vnd.xara":{source:"iana",extensions:["xar"]},"application/vnd.xfdl":{source:"iana",extensions:["xfdl"]},"application/vnd.xfdl.webform":{source:"iana"},"application/vnd.xmi+xml":{source:"iana",compressible:!0},"application/vnd.xmpie.cpkg":{source:"iana"},"application/vnd.xmpie.dpkg":{source:"iana"},"application/vnd.xmpie.plan":{source:"iana"},"application/vnd.xmpie.ppkg":{source:"iana"},"application/vnd.xmpie.xlim":{source:"iana"},"application/vnd.yamaha.hv-dic":{source:"iana",extensions:["hvd"]},"application/vnd.yamaha.hv-script":{source:"iana",extensions:["hvs"]},"application/vnd.yamaha.hv-voice":{source:"iana",extensions:["hvp"]},"application/vnd.yamaha.openscoreformat":{source:"iana",extensions:["osf"]},"application/vnd.yamaha.openscoreformat.osfpvg+xml":{source:"iana",compressible:!0,extensions:["osfpvg"]},"application/vnd.yamaha.remote-setup":{source:"iana"},"application/vnd.yamaha.smaf-audio":{source:"iana",extensions:["saf"]},"application/vnd.yamaha.smaf-phrase":{source:"iana",extensions:["spf"]},"application/vnd.yamaha.through-ngn":{source:"iana"},"application/vnd.yamaha.tunnel-udpencap":{source:"iana"},"application/vnd.yaoweme":{source:"iana"},"application/vnd.yellowriver-custom-menu":{source:"iana",extensions:["cmp"]},"application/vnd.youtube.yt":{source:"iana"},"application/vnd.zul":{source:"iana",extensions:["zir","zirz"]},"application/vnd.zzazz.deck+xml":{source:"iana",compressible:!0,extensions:["zaz"]},"application/voicexml+xml":{source:"iana",compressible:!0,extensions:["vxml"]},"application/voucher-cms+json":{source:"iana",compressible:!0},"application/vq-rtcpxr":{source:"iana"},"application/wasm":{compressible:!0,extensions:["wasm"]},"application/watcherinfo+xml":{source:"iana",compressible:!0},"application/webpush-options+json":{source:"iana",compressible:!0},"application/whoispp-query":{source:"iana"},"application/whoispp-response":{source:"iana"},"application/widget":{source:"iana",extensions:["wgt"]},"application/winhlp":{source:"apache",extensions:["hlp"]},"application/wita":{source:"iana"},"application/wordperfect5.1":{source:"iana"},"application/wsdl+xml":{source:"iana",compressible:!0,extensions:["wsdl"]},"application/wspolicy+xml":{source:"iana",compressible:!0,extensions:["wspolicy"]},"application/x-7z-compressed":{source:"apache",compressible:!1,extensions:["7z"]},"application/x-abiword":{source:"apache",extensions:["abw"]},"application/x-ace-compressed":{source:"apache",extensions:["ace"]},"application/x-amf":{source:"apache"},"application/x-apple-diskimage":{source:"apache",extensions:["dmg"]},"application/x-arj":{compressible:!1,extensions:["arj"]},"application/x-authorware-bin":{source:"apache",extensions:["aab","x32","u32","vox"]},"application/x-authorware-map":{source:"apache",extensions:["aam"]},"application/x-authorware-seg":{source:"apache",extensions:["aas"]},"application/x-bcpio":{source:"apache",extensions:["bcpio"]},"application/x-bdoc":{compressible:!1,extensions:["bdoc"]},"application/x-bittorrent":{source:"apache",extensions:["torrent"]},"application/x-blorb":{source:"apache",extensions:["blb","blorb"]},"application/x-bzip":{source:"apache",compressible:!1,extensions:["bz"]},"application/x-bzip2":{source:"apache",compressible:!1,extensions:["bz2","boz"]},"application/x-cbr":{source:"apache",extensions:["cbr","cba","cbt","cbz","cb7"]},"application/x-cdlink":{source:"apache",extensions:["vcd"]},"application/x-cfs-compressed":{source:"apache",extensions:["cfs"]},"application/x-chat":{source:"apache",extensions:["chat"]},"application/x-chess-pgn":{source:"apache",extensions:["pgn"]},"application/x-chrome-extension":{extensions:["crx"]},"application/x-cocoa":{source:"nginx",extensions:["cco"]},"application/x-compress":{source:"apache"},"application/x-conference":{source:"apache",extensions:["nsc"]},"application/x-cpio":{source:"apache",extensions:["cpio"]},"application/x-csh":{source:"apache",extensions:["csh"]},"application/x-deb":{compressible:!1},"application/x-debian-package":{source:"apache",extensions:["deb","udeb"]},"application/x-dgc-compressed":{source:"apache",extensions:["dgc"]},"application/x-director":{source:"apache",extensions:["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"]},"application/x-doom":{source:"apache",extensions:["wad"]},"application/x-dtbncx+xml":{source:"apache",compressible:!0,extensions:["ncx"]},"application/x-dtbook+xml":{source:"apache",compressible:!0,extensions:["dtb"]},"application/x-dtbresource+xml":{source:"apache",compressible:!0,extensions:["res"]},"application/x-dvi":{source:"apache",compressible:!1,extensions:["dvi"]},"application/x-envoy":{source:"apache",extensions:["evy"]},"application/x-eva":{source:"apache",extensions:["eva"]},"application/x-font-bdf":{source:"apache",extensions:["bdf"]},"application/x-font-dos":{source:"apache"},"application/x-font-framemaker":{source:"apache"},"application/x-font-ghostscript":{source:"apache",extensions:["gsf"]},"application/x-font-libgrx":{source:"apache"},"application/x-font-linux-psf":{source:"apache",extensions:["psf"]},"application/x-font-pcf":{source:"apache",extensions:["pcf"]},"application/x-font-snf":{source:"apache",extensions:["snf"]},"application/x-font-speedo":{source:"apache"},"application/x-font-sunos-news":{source:"apache"},"application/x-font-type1":{source:"apache",extensions:["pfa","pfb","pfm","afm"]},"application/x-font-vfont":{source:"apache"},"application/x-freearc":{source:"apache",extensions:["arc"]},"application/x-futuresplash":{source:"apache",extensions:["spl"]},"application/x-gca-compressed":{source:"apache",extensions:["gca"]},"application/x-glulx":{source:"apache",extensions:["ulx"]},"application/x-gnumeric":{source:"apache",extensions:["gnumeric"]},"application/x-gramps-xml":{source:"apache",extensions:["gramps"]},"application/x-gtar":{source:"apache",extensions:["gtar"]},"application/x-gzip":{source:"apache"},"application/x-hdf":{source:"apache",extensions:["hdf"]},"application/x-httpd-php":{compressible:!0,extensions:["php"]},"application/x-install-instructions":{source:"apache",extensions:["install"]},"application/x-iso9660-image":{source:"apache",extensions:["iso"]},"application/x-java-archive-diff":{source:"nginx",extensions:["jardiff"]},"application/x-java-jnlp-file":{source:"apache",compressible:!1,extensions:["jnlp"]},"application/x-javascript":{compressible:!0},"application/x-keepass2":{extensions:["kdbx"]},"application/x-latex":{source:"apache",compressible:!1,extensions:["latex"]},"application/x-lua-bytecode":{extensions:["luac"]},"application/x-lzh-compressed":{source:"apache",extensions:["lzh","lha"]},"application/x-makeself":{source:"nginx",extensions:["run"]},"application/x-mie":{source:"apache",extensions:["mie"]},"application/x-mobipocket-ebook":{source:"apache",extensions:["prc","mobi"]},"application/x-mpegurl":{compressible:!1},"application/x-ms-application":{source:"apache",extensions:["application"]},"application/x-ms-shortcut":{source:"apache",extensions:["lnk"]},"application/x-ms-wmd":{source:"apache",extensions:["wmd"]},"application/x-ms-wmz":{source:"apache",extensions:["wmz"]},"application/x-ms-xbap":{source:"apache",extensions:["xbap"]},"application/x-msaccess":{source:"apache",extensions:["mdb"]},"application/x-msbinder":{source:"apache",extensions:["obd"]},"application/x-mscardfile":{source:"apache",extensions:["crd"]},"application/x-msclip":{source:"apache",extensions:["clp"]},"application/x-msdos-program":{extensions:["exe"]},"application/x-msdownload":{source:"apache",extensions:["exe","dll","com","bat","msi"]},"application/x-msmediaview":{source:"apache",extensions:["mvb","m13","m14"]},"application/x-msmetafile":{source:"apache",extensions:["wmf","wmz","emf","emz"]},"application/x-msmoney":{source:"apache",extensions:["mny"]},"application/x-mspublisher":{source:"apache",extensions:["pub"]},"application/x-msschedule":{source:"apache",extensions:["scd"]},"application/x-msterminal":{source:"apache",extensions:["trm"]},"application/x-mswrite":{source:"apache",extensions:["wri"]},"application/x-netcdf":{source:"apache",extensions:["nc","cdf"]},"application/x-ns-proxy-autoconfig":{compressible:!0,extensions:["pac"]},"application/x-nzb":{source:"apache",extensions:["nzb"]},"application/x-perl":{source:"nginx",extensions:["pl","pm"]},"application/x-pilot":{source:"nginx",extensions:["prc","pdb"]},"application/x-pkcs12":{source:"apache",compressible:!1,extensions:["p12","pfx"]},"application/x-pkcs7-certificates":{source:"apache",extensions:["p7b","spc"]},"application/x-pkcs7-certreqresp":{source:"apache",extensions:["p7r"]},"application/x-pki-message":{source:"iana"},"application/x-rar-compressed":{source:"apache",compressible:!1,extensions:["rar"]},"application/x-redhat-package-manager":{source:"nginx",extensions:["rpm"]},"application/x-research-info-systems":{source:"apache",extensions:["ris"]},"application/x-sea":{source:"nginx",extensions:["sea"]},"application/x-sh":{source:"apache",compressible:!0,extensions:["sh"]},"application/x-shar":{source:"apache",extensions:["shar"]},"application/x-shockwave-flash":{source:"apache",compressible:!1,extensions:["swf"]},"application/x-silverlight-app":{source:"apache",extensions:["xap"]},"application/x-sql":{source:"apache",extensions:["sql"]},"application/x-stuffit":{source:"apache",compressible:!1,extensions:["sit"]},"application/x-stuffitx":{source:"apache",extensions:["sitx"]},"application/x-subrip":{source:"apache",extensions:["srt"]},"application/x-sv4cpio":{source:"apache",extensions:["sv4cpio"]},"application/x-sv4crc":{source:"apache",extensions:["sv4crc"]},"application/x-t3vm-image":{source:"apache",extensions:["t3"]},"application/x-tads":{source:"apache",extensions:["gam"]},"application/x-tar":{source:"apache",compressible:!0,extensions:["tar"]},"application/x-tcl":{source:"apache",extensions:["tcl","tk"]},"application/x-tex":{source:"apache",extensions:["tex"]},"application/x-tex-tfm":{source:"apache",extensions:["tfm"]},"application/x-texinfo":{source:"apache",extensions:["texinfo","texi"]},"application/x-tgif":{source:"apache",extensions:["obj"]},"application/x-ustar":{source:"apache",extensions:["ustar"]},"application/x-virtualbox-hdd":{compressible:!0,extensions:["hdd"]},"application/x-virtualbox-ova":{compressible:!0,extensions:["ova"]},"application/x-virtualbox-ovf":{compressible:!0,extensions:["ovf"]},"application/x-virtualbox-vbox":{compressible:!0,extensions:["vbox"]},"application/x-virtualbox-vbox-extpack":{compressible:!1,extensions:["vbox-extpack"]},"application/x-virtualbox-vdi":{compressible:!0,extensions:["vdi"]},"application/x-virtualbox-vhd":{compressible:!0,extensions:["vhd"]},"application/x-virtualbox-vmdk":{compressible:!0,extensions:["vmdk"]},"application/x-wais-source":{source:"apache",extensions:["src"]},"application/x-web-app-manifest+json":{compressible:!0,extensions:["webapp"]},"application/x-www-form-urlencoded":{source:"iana",compressible:!0},"application/x-x509-ca-cert":{source:"iana",extensions:["der","crt","pem"]},"application/x-x509-ca-ra-cert":{source:"iana"},"application/x-x509-next-ca-cert":{source:"iana"},"application/x-xfig":{source:"apache",extensions:["fig"]},"application/x-xliff+xml":{source:"apache",compressible:!0,extensions:["xlf"]},"application/x-xpinstall":{source:"apache",compressible:!1,extensions:["xpi"]},"application/x-xz":{source:"apache",extensions:["xz"]},"application/x-zmachine":{source:"apache",extensions:["z1","z2","z3","z4","z5","z6","z7","z8"]},"application/x400-bp":{source:"iana"},"application/xacml+xml":{source:"iana",compressible:!0},"application/xaml+xml":{source:"apache",compressible:!0,extensions:["xaml"]},"application/xcap-att+xml":{source:"iana",compressible:!0,extensions:["xav"]},"application/xcap-caps+xml":{source:"iana",compressible:!0,extensions:["xca"]},"application/xcap-diff+xml":{source:"iana",compressible:!0,extensions:["xdf"]},"application/xcap-el+xml":{source:"iana",compressible:!0,extensions:["xel"]},"application/xcap-error+xml":{source:"iana",compressible:!0,extensions:["xer"]},"application/xcap-ns+xml":{source:"iana",compressible:!0,extensions:["xns"]},"application/xcon-conference-info+xml":{source:"iana",compressible:!0},"application/xcon-conference-info-diff+xml":{source:"iana",compressible:!0},"application/xenc+xml":{source:"iana",compressible:!0,extensions:["xenc"]},"application/xhtml+xml":{source:"iana",compressible:!0,extensions:["xhtml","xht"]},"application/xhtml-voice+xml":{source:"apache",compressible:!0},"application/xliff+xml":{source:"iana",compressible:!0,extensions:["xlf"]},"application/xml":{source:"iana",compressible:!0,extensions:["xml","xsl","xsd","rng"]},"application/xml-dtd":{source:"iana",compressible:!0,extensions:["dtd"]},"application/xml-external-parsed-entity":{source:"iana"},"application/xml-patch+xml":{source:"iana",compressible:!0},"application/xmpp+xml":{source:"iana",compressible:!0},"application/xop+xml":{source:"iana",compressible:!0,extensions:["xop"]},"application/xproc+xml":{source:"apache",compressible:!0,extensions:["xpl"]},"application/xslt+xml":{source:"iana",compressible:!0,extensions:["xslt"]},"application/xspf+xml":{source:"apache",compressible:!0,extensions:["xspf"]},"application/xv+xml":{source:"iana",compressible:!0,extensions:["mxml","xhvml","xvml","xvm"]},"application/yang":{source:"iana",extensions:["yang"]},"application/yang-data+json":{source:"iana",compressible:!0},"application/yang-data+xml":{source:"iana",compressible:!0},"application/yang-patch+json":{source:"iana",compressible:!0},"application/yang-patch+xml":{source:"iana",compressible:!0},"application/yin+xml":{source:"iana",compressible:!0,extensions:["yin"]},"application/zip":{source:"iana",compressible:!1,extensions:["zip"]},"application/zlib":{source:"iana"},"application/zstd":{source:"iana"},"audio/1d-interleaved-parityfec":{source:"iana"},"audio/32kadpcm":{source:"iana"},"audio/3gpp":{source:"iana",compressible:!1,extensions:["3gpp"]},"audio/3gpp2":{source:"iana"},"audio/aac":{source:"iana"},"audio/ac3":{source:"iana"},"audio/adpcm":{source:"apache",extensions:["adp"]},"audio/amr":{source:"iana"},"audio/amr-wb":{source:"iana"},"audio/amr-wb+":{source:"iana"},"audio/aptx":{source:"iana"},"audio/asc":{source:"iana"},"audio/atrac-advanced-lossless":{source:"iana"},"audio/atrac-x":{source:"iana"},"audio/atrac3":{source:"iana"},"audio/basic":{source:"iana",compressible:!1,extensions:["au","snd"]},"audio/bv16":{source:"iana"},"audio/bv32":{source:"iana"},"audio/clearmode":{source:"iana"},"audio/cn":{source:"iana"},"audio/dat12":{source:"iana"},"audio/dls":{source:"iana"},"audio/dsr-es201108":{source:"iana"},"audio/dsr-es202050":{source:"iana"},"audio/dsr-es202211":{source:"iana"},"audio/dsr-es202212":{source:"iana"},"audio/dv":{source:"iana"},"audio/dvi4":{source:"iana"},"audio/eac3":{source:"iana"},"audio/encaprtp":{source:"iana"},"audio/evrc":{source:"iana"},"audio/evrc-qcp":{source:"iana"},"audio/evrc0":{source:"iana"},"audio/evrc1":{source:"iana"},"audio/evrcb":{source:"iana"},"audio/evrcb0":{source:"iana"},"audio/evrcb1":{source:"iana"},"audio/evrcnw":{source:"iana"},"audio/evrcnw0":{source:"iana"},"audio/evrcnw1":{source:"iana"},"audio/evrcwb":{source:"iana"},"audio/evrcwb0":{source:"iana"},"audio/evrcwb1":{source:"iana"},"audio/evs":{source:"iana"},"audio/flexfec":{source:"iana"},"audio/fwdred":{source:"iana"},"audio/g711-0":{source:"iana"},"audio/g719":{source:"iana"},"audio/g722":{source:"iana"},"audio/g7221":{source:"iana"},"audio/g723":{source:"iana"},"audio/g726-16":{source:"iana"},"audio/g726-24":{source:"iana"},"audio/g726-32":{source:"iana"},"audio/g726-40":{source:"iana"},"audio/g728":{source:"iana"},"audio/g729":{source:"iana"},"audio/g7291":{source:"iana"},"audio/g729d":{source:"iana"},"audio/g729e":{source:"iana"},"audio/gsm":{source:"iana"},"audio/gsm-efr":{source:"iana"},"audio/gsm-hr-08":{source:"iana"},"audio/ilbc":{source:"iana"},"audio/ip-mr_v2.5":{source:"iana"},"audio/isac":{source:"apache"},"audio/l16":{source:"iana"},"audio/l20":{source:"iana"},"audio/l24":{source:"iana",compressible:!1},"audio/l8":{source:"iana"},"audio/lpc":{source:"iana"},"audio/melp":{source:"iana"},"audio/melp1200":{source:"iana"},"audio/melp2400":{source:"iana"},"audio/melp600":{source:"iana"},"audio/mhas":{source:"iana"},"audio/midi":{source:"apache",extensions:["mid","midi","kar","rmi"]},"audio/mobile-xmf":{source:"iana",extensions:["mxmf"]},"audio/mp3":{compressible:!1,extensions:["mp3"]},"audio/mp4":{source:"iana",compressible:!1,extensions:["m4a","mp4a"]},"audio/mp4a-latm":{source:"iana"},"audio/mpa":{source:"iana"},"audio/mpa-robust":{source:"iana"},"audio/mpeg":{source:"iana",compressible:!1,extensions:["mpga","mp2","mp2a","mp3","m2a","m3a"]},"audio/mpeg4-generic":{source:"iana"},"audio/musepack":{source:"apache"},"audio/ogg":{source:"iana",compressible:!1,extensions:["oga","ogg","spx"]},"audio/opus":{source:"iana"},"audio/parityfec":{source:"iana"},"audio/pcma":{source:"iana"},"audio/pcma-wb":{source:"iana"},"audio/pcmu":{source:"iana"},"audio/pcmu-wb":{source:"iana"},"audio/prs.sid":{source:"iana"},"audio/qcelp":{source:"iana"},"audio/raptorfec":{source:"iana"},"audio/red":{source:"iana"},"audio/rtp-enc-aescm128":{source:"iana"},"audio/rtp-midi":{source:"iana"},"audio/rtploopback":{source:"iana"},"audio/rtx":{source:"iana"},"audio/s3m":{source:"apache",extensions:["s3m"]},"audio/silk":{source:"apache",extensions:["sil"]},"audio/smv":{source:"iana"},"audio/smv-qcp":{source:"iana"},"audio/smv0":{source:"iana"},"audio/sp-midi":{source:"iana"},"audio/speex":{source:"iana"},"audio/t140c":{source:"iana"},"audio/t38":{source:"iana"},"audio/telephone-event":{source:"iana"},"audio/tetra_acelp":{source:"iana"},"audio/tetra_acelp_bb":{source:"iana"},"audio/tone":{source:"iana"},"audio/uemclip":{source:"iana"},"audio/ulpfec":{source:"iana"},"audio/usac":{source:"iana"},"audio/vdvi":{source:"iana"},"audio/vmr-wb":{source:"iana"},"audio/vnd.3gpp.iufp":{source:"iana"},"audio/vnd.4sb":{source:"iana"},"audio/vnd.audiokoz":{source:"iana"},"audio/vnd.celp":{source:"iana"},"audio/vnd.cisco.nse":{source:"iana"},"audio/vnd.cmles.radio-events":{source:"iana"},"audio/vnd.cns.anp1":{source:"iana"},"audio/vnd.cns.inf1":{source:"iana"},"audio/vnd.dece.audio":{source:"iana",extensions:["uva","uvva"]},"audio/vnd.digital-winds":{source:"iana",extensions:["eol"]},"audio/vnd.dlna.adts":{source:"iana"},"audio/vnd.dolby.heaac.1":{source:"iana"},"audio/vnd.dolby.heaac.2":{source:"iana"},"audio/vnd.dolby.mlp":{source:"iana"},"audio/vnd.dolby.mps":{source:"iana"},"audio/vnd.dolby.pl2":{source:"iana"},"audio/vnd.dolby.pl2x":{source:"iana"},"audio/vnd.dolby.pl2z":{source:"iana"},"audio/vnd.dolby.pulse.1":{source:"iana"},"audio/vnd.dra":{source:"iana",extensions:["dra"]},"audio/vnd.dts":{source:"iana",extensions:["dts"]},"audio/vnd.dts.hd":{source:"iana",extensions:["dtshd"]},"audio/vnd.dts.uhd":{source:"iana"},"audio/vnd.dvb.file":{source:"iana"},"audio/vnd.everad.plj":{source:"iana"},"audio/vnd.hns.audio":{source:"iana"},"audio/vnd.lucent.voice":{source:"iana",extensions:["lvp"]},"audio/vnd.ms-playready.media.pya":{source:"iana",extensions:["pya"]},"audio/vnd.nokia.mobile-xmf":{source:"iana"},"audio/vnd.nortel.vbk":{source:"iana"},"audio/vnd.nuera.ecelp4800":{source:"iana",extensions:["ecelp4800"]},"audio/vnd.nuera.ecelp7470":{source:"iana",extensions:["ecelp7470"]},"audio/vnd.nuera.ecelp9600":{source:"iana",extensions:["ecelp9600"]},"audio/vnd.octel.sbc":{source:"iana"},"audio/vnd.presonus.multitrack":{source:"iana"},"audio/vnd.qcelp":{source:"iana"},"audio/vnd.rhetorex.32kadpcm":{source:"iana"},"audio/vnd.rip":{source:"iana",extensions:["rip"]},"audio/vnd.rn-realaudio":{compressible:!1},"audio/vnd.sealedmedia.softseal.mpeg":{source:"iana"},"audio/vnd.vmx.cvsd":{source:"iana"},"audio/vnd.wave":{compressible:!1},"audio/vorbis":{source:"iana",compressible:!1},"audio/vorbis-config":{source:"iana"},"audio/wav":{compressible:!1,extensions:["wav"]},"audio/wave":{compressible:!1,extensions:["wav"]},"audio/webm":{source:"apache",compressible:!1,extensions:["weba"]},"audio/x-aac":{source:"apache",compressible:!1,extensions:["aac"]},"audio/x-aiff":{source:"apache",extensions:["aif","aiff","aifc"]},"audio/x-caf":{source:"apache",compressible:!1,extensions:["caf"]},"audio/x-flac":{source:"apache",extensions:["flac"]},"audio/x-m4a":{source:"nginx",extensions:["m4a"]},"audio/x-matroska":{source:"apache",extensions:["mka"]},"audio/x-mpegurl":{source:"apache",extensions:["m3u"]},"audio/x-ms-wax":{source:"apache",extensions:["wax"]},"audio/x-ms-wma":{source:"apache",extensions:["wma"]},"audio/x-pn-realaudio":{source:"apache",extensions:["ram","ra"]},"audio/x-pn-realaudio-plugin":{source:"apache",extensions:["rmp"]},"audio/x-realaudio":{source:"nginx",extensions:["ra"]},"audio/x-tta":{source:"apache"},"audio/x-wav":{source:"apache",extensions:["wav"]},"audio/xm":{source:"apache",extensions:["xm"]},"chemical/x-cdx":{source:"apache",extensions:["cdx"]},"chemical/x-cif":{source:"apache",extensions:["cif"]},"chemical/x-cmdf":{source:"apache",extensions:["cmdf"]},"chemical/x-cml":{source:"apache",extensions:["cml"]},"chemical/x-csml":{source:"apache",extensions:["csml"]},"chemical/x-pdb":{source:"apache"},"chemical/x-xyz":{source:"apache",extensions:["xyz"]},"font/collection":{source:"iana",extensions:["ttc"]},"font/otf":{source:"iana",compressible:!0,extensions:["otf"]},"font/sfnt":{source:"iana"},"font/ttf":{source:"iana",compressible:!0,extensions:["ttf"]},"font/woff":{source:"iana",extensions:["woff"]},"font/woff2":{source:"iana",extensions:["woff2"]},"image/aces":{source:"iana",extensions:["exr"]},"image/apng":{compressible:!1,extensions:["apng"]},"image/avci":{source:"iana"},"image/avcs":{source:"iana"},"image/bmp":{source:"iana",compressible:!0,extensions:["bmp"]},"image/cgm":{source:"iana",extensions:["cgm"]},"image/dicom-rle":{source:"iana",extensions:["drle"]},"image/emf":{source:"iana",extensions:["emf"]},"image/fits":{source:"iana",extensions:["fits"]},"image/g3fax":{source:"iana",extensions:["g3"]},"image/gif":{source:"iana",compressible:!1,extensions:["gif"]},"image/heic":{source:"iana",extensions:["heic"]},"image/heic-sequence":{source:"iana",extensions:["heics"]},"image/heif":{source:"iana",extensions:["heif"]},"image/heif-sequence":{source:"iana",extensions:["heifs"]},"image/hej2k":{source:"iana",extensions:["hej2"]},"image/hsj2":{source:"iana",extensions:["hsj2"]},"image/ief":{source:"iana",extensions:["ief"]},"image/jls":{source:"iana",extensions:["jls"]},"image/jp2":{source:"iana",compressible:!1,extensions:["jp2","jpg2"]},"image/jpeg":{source:"iana",compressible:!1,extensions:["jpeg","jpg","jpe"]},"image/jph":{source:"iana",extensions:["jph"]},"image/jphc":{source:"iana",extensions:["jhc"]},"image/jpm":{source:"iana",compressible:!1,extensions:["jpm"]},"image/jpx":{source:"iana",compressible:!1,extensions:["jpx","jpf"]},"image/jxr":{source:"iana",extensions:["jxr"]},"image/jxra":{source:"iana",extensions:["jxra"]},"image/jxrs":{source:"iana",extensions:["jxrs"]},"image/jxs":{source:"iana",extensions:["jxs"]},"image/jxsc":{source:"iana",extensions:["jxsc"]},"image/jxsi":{source:"iana",extensions:["jxsi"]},"image/jxss":{source:"iana",extensions:["jxss"]},"image/ktx":{source:"iana",extensions:["ktx"]},"image/naplps":{source:"iana"},"image/pjpeg":{compressible:!1},"image/png":{source:"iana",compressible:!1,extensions:["png"]},"image/prs.btif":{source:"iana",extensions:["btif"]},"image/prs.pti":{source:"iana",extensions:["pti"]},"image/pwg-raster":{source:"iana"},"image/sgi":{source:"apache",extensions:["sgi"]},"image/svg+xml":{source:"iana",compressible:!0,extensions:["svg","svgz"]},"image/t38":{source:"iana",extensions:["t38"]},"image/tiff":{source:"iana",compressible:!1,extensions:["tif","tiff"]},"image/tiff-fx":{source:"iana",extensions:["tfx"]},"image/vnd.adobe.photoshop":{source:"iana",compressible:!0,extensions:["psd"]},"image/vnd.airzip.accelerator.azv":{source:"iana",extensions:["azv"]},"image/vnd.cns.inf2":{source:"iana"},"image/vnd.dece.graphic":{source:"iana",extensions:["uvi","uvvi","uvg","uvvg"]},"image/vnd.djvu":{source:"iana",extensions:["djvu","djv"]},"image/vnd.dvb.subtitle":{source:"iana",extensions:["sub"]},"image/vnd.dwg":{source:"iana",extensions:["dwg"]},"image/vnd.dxf":{source:"iana",extensions:["dxf"]},"image/vnd.fastbidsheet":{source:"iana",extensions:["fbs"]},"image/vnd.fpx":{source:"iana",extensions:["fpx"]},"image/vnd.fst":{source:"iana",extensions:["fst"]},"image/vnd.fujixerox.edmics-mmr":{source:"iana",extensions:["mmr"]},"image/vnd.fujixerox.edmics-rlc":{source:"iana",extensions:["rlc"]},"image/vnd.globalgraphics.pgb":{source:"iana"},"image/vnd.microsoft.icon":{source:"iana",extensions:["ico"]},"image/vnd.mix":{source:"iana"},"image/vnd.mozilla.apng":{source:"iana"},"image/vnd.ms-dds":{extensions:["dds"]},"image/vnd.ms-modi":{source:"iana",extensions:["mdi"]},"image/vnd.ms-photo":{source:"apache",extensions:["wdp"]},"image/vnd.net-fpx":{source:"iana",extensions:["npx"]},"image/vnd.radiance":{source:"iana"},"image/vnd.sealed.png":{source:"iana"},"image/vnd.sealedmedia.softseal.gif":{source:"iana"},"image/vnd.sealedmedia.softseal.jpg":{source:"iana"},"image/vnd.svf":{source:"iana"},"image/vnd.tencent.tap":{source:"iana",extensions:["tap"]},"image/vnd.valve.source.texture":{source:"iana",extensions:["vtf"]},"image/vnd.wap.wbmp":{source:"iana",extensions:["wbmp"]},"image/vnd.xiff":{source:"iana",extensions:["xif"]},"image/vnd.zbrush.pcx":{source:"iana",extensions:["pcx"]},"image/webp":{source:"apache",extensions:["webp"]},"image/wmf":{source:"iana",extensions:["wmf"]},"image/x-3ds":{source:"apache",extensions:["3ds"]},"image/x-cmu-raster":{source:"apache",extensions:["ras"]},"image/x-cmx":{source:"apache",extensions:["cmx"]},"image/x-freehand":{source:"apache",extensions:["fh","fhc","fh4","fh5","fh7"]},"image/x-icon":{source:"apache",compressible:!0,extensions:["ico"]},"image/x-jng":{source:"nginx",extensions:["jng"]},"image/x-mrsid-image":{source:"apache",extensions:["sid"]},"image/x-ms-bmp":{source:"nginx",compressible:!0,extensions:["bmp"]},"image/x-pcx":{source:"apache",extensions:["pcx"]},"image/x-pict":{source:"apache",extensions:["pic","pct"]},"image/x-portable-anymap":{source:"apache",extensions:["pnm"]},"image/x-portable-bitmap":{source:"apache",extensions:["pbm"]},"image/x-portable-graymap":{source:"apache",extensions:["pgm"]},"image/x-portable-pixmap":{source:"apache",extensions:["ppm"]},"image/x-rgb":{source:"apache",extensions:["rgb"]},"image/x-tga":{source:"apache",extensions:["tga"]},"image/x-xbitmap":{source:"apache",extensions:["xbm"]},"image/x-xcf":{compressible:!1},"image/x-xpixmap":{source:"apache",extensions:["xpm"]},"image/x-xwindowdump":{source:"apache",extensions:["xwd"]},"message/cpim":{source:"iana"},"message/delivery-status":{source:"iana"},"message/disposition-notification":{source:"iana",extensions:["disposition-notification"]},"message/external-body":{source:"iana"},"message/feedback-report":{source:"iana"},"message/global":{source:"iana",extensions:["u8msg"]},"message/global-delivery-status":{source:"iana",extensions:["u8dsn"]},"message/global-disposition-notification":{source:"iana",extensions:["u8mdn"]},"message/global-headers":{source:"iana",extensions:["u8hdr"]},"message/http":{source:"iana",compressible:!1},"message/imdn+xml":{source:"iana",compressible:!0},"message/news":{source:"iana"},"message/partial":{source:"iana",compressible:!1},"message/rfc822":{source:"iana",compressible:!0,extensions:["eml","mime"]},"message/s-http":{source:"iana"},"message/sip":{source:"iana"},"message/sipfrag":{source:"iana"},"message/tracking-status":{source:"iana"},"message/vnd.si.simp":{source:"iana"},"message/vnd.wfa.wsc":{source:"iana",extensions:["wsc"]},"model/3mf":{source:"iana",extensions:["3mf"]},"model/gltf+json":{source:"iana",compressible:!0,extensions:["gltf"]},"model/gltf-binary":{source:"iana",compressible:!0,extensions:["glb"]},"model/iges":{source:"iana",compressible:!1,extensions:["igs","iges"]},"model/mesh":{source:"iana",compressible:!1,extensions:["msh","mesh","silo"]},"model/mtl":{source:"iana",extensions:["mtl"]},"model/obj":{source:"iana",extensions:["obj"]},"model/stl":{source:"iana",extensions:["stl"]},"model/vnd.collada+xml":{source:"iana",compressible:!0,extensions:["dae"]},"model/vnd.dwf":{source:"iana",extensions:["dwf"]},"model/vnd.flatland.3dml":{source:"iana"},"model/vnd.gdl":{source:"iana",extensions:["gdl"]},"model/vnd.gs-gdl":{source:"apache"},"model/vnd.gs.gdl":{source:"iana"},"model/vnd.gtw":{source:"iana",extensions:["gtw"]},"model/vnd.moml+xml":{source:"iana",compressible:!0},"model/vnd.mts":{source:"iana",extensions:["mts"]},"model/vnd.opengex":{source:"iana",extensions:["ogex"]},"model/vnd.parasolid.transmit.binary":{source:"iana",extensions:["x_b"]},"model/vnd.parasolid.transmit.text":{source:"iana",extensions:["x_t"]},"model/vnd.rosette.annotated-data-model":{source:"iana"},"model/vnd.usdz+zip":{source:"iana",compressible:!1,extensions:["usdz"]},"model/vnd.valve.source.compiled-map":{source:"iana",extensions:["bsp"]},"model/vnd.vtu":{source:"iana",extensions:["vtu"]},"model/vrml":{source:"iana",compressible:!1,extensions:["wrl","vrml"]},"model/x3d+binary":{source:"apache",compressible:!1,extensions:["x3db","x3dbz"]},"model/x3d+fastinfoset":{source:"iana",extensions:["x3db"]},"model/x3d+vrml":{source:"apache",compressible:!1,extensions:["x3dv","x3dvz"]},"model/x3d+xml":{source:"iana",compressible:!0,extensions:["x3d","x3dz"]},"model/x3d-vrml":{source:"iana",extensions:["x3dv"]},"multipart/alternative":{source:"iana",compressible:!1},"multipart/appledouble":{source:"iana"},"multipart/byteranges":{source:"iana"},"multipart/digest":{source:"iana"},"multipart/encrypted":{source:"iana",compressible:!1},"multipart/form-data":{source:"iana",compressible:!1},"multipart/header-set":{source:"iana"},"multipart/mixed":{source:"iana"},"multipart/multilingual":{source:"iana"},"multipart/parallel":{source:"iana"},"multipart/related":{source:"iana",compressible:!1},"multipart/report":{source:"iana"},"multipart/signed":{source:"iana",compressible:!1},"multipart/vnd.bint.med-plus":{source:"iana"},"multipart/voice-message":{source:"iana"},"multipart/x-mixed-replace":{source:"iana"},"text/1d-interleaved-parityfec":{source:"iana"},"text/cache-manifest":{source:"iana",compressible:!0,extensions:["appcache","manifest"]},"text/calendar":{source:"iana",extensions:["ics","ifb"]},"text/calender":{compressible:!0},"text/cmd":{compressible:!0},"text/coffeescript":{extensions:["coffee","litcoffee"]},"text/css":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["css"]},"text/csv":{source:"iana",compressible:!0,extensions:["csv"]},"text/csv-schema":{source:"iana"},"text/directory":{source:"iana"},"text/dns":{source:"iana"},"text/ecmascript":{source:"iana"},"text/encaprtp":{source:"iana"},"text/enriched":{source:"iana"},"text/flexfec":{source:"iana"},"text/fwdred":{source:"iana"},"text/grammar-ref-list":{source:"iana"},"text/html":{source:"iana",compressible:!0,extensions:["html","htm","shtml"]},"text/jade":{extensions:["jade"]},"text/javascript":{source:"iana",compressible:!0},"text/jcr-cnd":{source:"iana"},"text/jsx":{compressible:!0,extensions:["jsx"]},"text/less":{compressible:!0,extensions:["less"]},"text/markdown":{source:"iana",compressible:!0,extensions:["markdown","md"]},"text/mathml":{source:"nginx",extensions:["mml"]},"text/mdx":{compressible:!0,extensions:["mdx"]},"text/mizar":{source:"iana"},"text/n3":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["n3"]},"text/parameters":{source:"iana",charset:"UTF-8"},"text/parityfec":{source:"iana"},"text/plain":{source:"iana",compressible:!0,extensions:["txt","text","conf","def","list","log","in","ini"]},"text/provenance-notation":{source:"iana",charset:"UTF-8"},"text/prs.fallenstein.rst":{source:"iana"},"text/prs.lines.tag":{source:"iana",extensions:["dsc"]},"text/prs.prop.logic":{source:"iana"},"text/raptorfec":{source:"iana"},"text/red":{source:"iana"},"text/rfc822-headers":{source:"iana"},"text/richtext":{source:"iana",compressible:!0,extensions:["rtx"]},"text/rtf":{source:"iana",compressible:!0,extensions:["rtf"]},"text/rtp-enc-aescm128":{source:"iana"},"text/rtploopback":{source:"iana"},"text/rtx":{source:"iana"},"text/sgml":{source:"iana",extensions:["sgml","sgm"]},"text/shex":{extensions:["shex"]},"text/slim":{extensions:["slim","slm"]},"text/strings":{source:"iana"},"text/stylus":{extensions:["stylus","styl"]},"text/t140":{source:"iana"},"text/tab-separated-values":{source:"iana",compressible:!0,extensions:["tsv"]},"text/troff":{source:"iana",extensions:["t","tr","roff","man","me","ms"]},"text/turtle":{source:"iana",charset:"UTF-8",extensions:["ttl"]},"text/ulpfec":{source:"iana"},"text/uri-list":{source:"iana",compressible:!0,extensions:["uri","uris","urls"]},"text/vcard":{source:"iana",compressible:!0,extensions:["vcard"]},"text/vnd.a":{source:"iana"},"text/vnd.abc":{source:"iana"},"text/vnd.ascii-art":{source:"iana"},"text/vnd.curl":{source:"iana",extensions:["curl"]},"text/vnd.curl.dcurl":{source:"apache",extensions:["dcurl"]},"text/vnd.curl.mcurl":{source:"apache",extensions:["mcurl"]},"text/vnd.curl.scurl":{source:"apache",extensions:["scurl"]},"text/vnd.debian.copyright":{source:"iana",charset:"UTF-8"},"text/vnd.dmclientscript":{source:"iana"},"text/vnd.dvb.subtitle":{source:"iana",extensions:["sub"]},"text/vnd.esmertec.theme-descriptor":{source:"iana",charset:"UTF-8"},"text/vnd.ficlab.flt":{source:"iana"},"text/vnd.fly":{source:"iana",extensions:["fly"]},"text/vnd.fmi.flexstor":{source:"iana",extensions:["flx"]},"text/vnd.gml":{source:"iana"},"text/vnd.graphviz":{source:"iana",extensions:["gv"]},"text/vnd.hgl":{source:"iana"},"text/vnd.in3d.3dml":{source:"iana",extensions:["3dml"]},"text/vnd.in3d.spot":{source:"iana",extensions:["spot"]},"text/vnd.iptc.newsml":{source:"iana"},"text/vnd.iptc.nitf":{source:"iana"},"text/vnd.latex-z":{source:"iana"},"text/vnd.motorola.reflex":{source:"iana"},"text/vnd.ms-mediapackage":{source:"iana"},"text/vnd.net2phone.commcenter.command":{source:"iana"},"text/vnd.radisys.msml-basic-layout":{source:"iana"},"text/vnd.senx.warpscript":{source:"iana"},"text/vnd.si.uricatalogue":{source:"iana"},"text/vnd.sosi":{source:"iana"},"text/vnd.sun.j2me.app-descriptor":{source:"iana",charset:"UTF-8",extensions:["jad"]},"text/vnd.trolltech.linguist":{source:"iana",charset:"UTF-8"},"text/vnd.wap.si":{source:"iana"},"text/vnd.wap.sl":{source:"iana"},"text/vnd.wap.wml":{source:"iana",extensions:["wml"]},"text/vnd.wap.wmlscript":{source:"iana",extensions:["wmls"]},"text/vtt":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["vtt"]},"text/x-asm":{source:"apache",extensions:["s","asm"]},"text/x-c":{source:"apache",extensions:["c","cc","cxx","cpp","h","hh","dic"]},"text/x-component":{source:"nginx",extensions:["htc"]},"text/x-fortran":{source:"apache",extensions:["f","for","f77","f90"]},"text/x-gwt-rpc":{compressible:!0},"text/x-handlebars-template":{extensions:["hbs"]},"text/x-java-source":{source:"apache",extensions:["java"]},"text/x-jquery-tmpl":{compressible:!0},"text/x-lua":{extensions:["lua"]},"text/x-markdown":{compressible:!0,extensions:["mkd"]},"text/x-nfo":{source:"apache",extensions:["nfo"]},"text/x-opml":{source:"apache",extensions:["opml"]},"text/x-org":{compressible:!0,extensions:["org"]},"text/x-pascal":{source:"apache",extensions:["p","pas"]},"text/x-processing":{compressible:!0,extensions:["pde"]},"text/x-sass":{extensions:["sass"]},"text/x-scss":{extensions:["scss"]},"text/x-setext":{source:"apache",extensions:["etx"]},"text/x-sfv":{source:"apache",extensions:["sfv"]},"text/x-suse-ymp":{compressible:!0,extensions:["ymp"]},"text/x-uuencode":{source:"apache",extensions:["uu"]},"text/x-vcalendar":{source:"apache",extensions:["vcs"]},"text/x-vcard":{source:"apache",extensions:["vcf"]},"text/xml":{source:"iana",compressible:!0,extensions:["xml"]},"text/xml-external-parsed-entity":{source:"iana"},"text/yaml":{extensions:["yaml","yml"]},"video/1d-interleaved-parityfec":{source:"iana"},"video/3gpp":{source:"iana",extensions:["3gp","3gpp"]},"video/3gpp-tt":{source:"iana"},"video/3gpp2":{source:"iana",extensions:["3g2"]},"video/bmpeg":{source:"iana"},"video/bt656":{source:"iana"},"video/celb":{source:"iana"},"video/dv":{source:"iana"},"video/encaprtp":{source:"iana"},"video/flexfec":{source:"iana"},"video/h261":{source:"iana",extensions:["h261"]},"video/h263":{source:"iana",extensions:["h263"]},"video/h263-1998":{source:"iana"},"video/h263-2000":{source:"iana"},"video/h264":{source:"iana",extensions:["h264"]},"video/h264-rcdo":{source:"iana"},"video/h264-svc":{source:"iana"},"video/h265":{source:"iana"},"video/iso.segment":{source:"iana"},"video/jpeg":{source:"iana",extensions:["jpgv"]},"video/jpeg2000":{source:"iana"},"video/jpm":{source:"apache",extensions:["jpm","jpgm"]},"video/mj2":{source:"iana",extensions:["mj2","mjp2"]},"video/mp1s":{source:"iana"},"video/mp2p":{source:"iana"},"video/mp2t":{source:"iana",extensions:["ts"]},"video/mp4":{source:"iana",compressible:!1,extensions:["mp4","mp4v","mpg4"]},"video/mp4v-es":{source:"iana"},"video/mpeg":{source:"iana",compressible:!1,extensions:["mpeg","mpg","mpe","m1v","m2v"]},"video/mpeg4-generic":{source:"iana"},"video/mpv":{source:"iana"},"video/nv":{source:"iana"},"video/ogg":{source:"iana",compressible:!1,extensions:["ogv"]},"video/parityfec":{source:"iana"},"video/pointer":{source:"iana"},"video/quicktime":{source:"iana",compressible:!1,extensions:["qt","mov"]},"video/raptorfec":{source:"iana"},"video/raw":{source:"iana"},"video/rtp-enc-aescm128":{source:"iana"},"video/rtploopback":{source:"iana"},"video/rtx":{source:"iana"},"video/smpte291":{source:"iana"},"video/smpte292m":{source:"iana"},"video/ulpfec":{source:"iana"},"video/vc1":{source:"iana"},"video/vc2":{source:"iana"},"video/vnd.cctv":{source:"iana"},"video/vnd.dece.hd":{source:"iana",extensions:["uvh","uvvh"]},"video/vnd.dece.mobile":{source:"iana",extensions:["uvm","uvvm"]},"video/vnd.dece.mp4":{source:"iana"},"video/vnd.dece.pd":{source:"iana",extensions:["uvp","uvvp"]},"video/vnd.dece.sd":{source:"iana",extensions:["uvs","uvvs"]},"video/vnd.dece.video":{source:"iana",extensions:["uvv","uvvv"]},"video/vnd.directv.mpeg":{source:"iana"},"video/vnd.directv.mpeg-tts":{source:"iana"},"video/vnd.dlna.mpeg-tts":{source:"iana"},"video/vnd.dvb.file":{source:"iana",extensions:["dvb"]},"video/vnd.fvt":{source:"iana",extensions:["fvt"]},"video/vnd.hns.video":{source:"iana"},"video/vnd.iptvforum.1dparityfec-1010":{source:"iana"},"video/vnd.iptvforum.1dparityfec-2005":{source:"iana"},"video/vnd.iptvforum.2dparityfec-1010":{source:"iana"},"video/vnd.iptvforum.2dparityfec-2005":{source:"iana"},"video/vnd.iptvforum.ttsavc":{source:"iana"},"video/vnd.iptvforum.ttsmpeg2":{source:"iana"},"video/vnd.motorola.video":{source:"iana"},"video/vnd.motorola.videop":{source:"iana"},"video/vnd.mpegurl":{source:"iana",extensions:["mxu","m4u"]},"video/vnd.ms-playready.media.pyv":{source:"iana",extensions:["pyv"]},"video/vnd.nokia.interleaved-multimedia":{source:"iana"},"video/vnd.nokia.mp4vr":{source:"iana"},"video/vnd.nokia.videovoip":{source:"iana"},"video/vnd.objectvideo":{source:"iana"},"video/vnd.radgamettools.bink":{source:"iana"},"video/vnd.radgamettools.smacker":{source:"iana"},"video/vnd.sealed.mpeg1":{source:"iana"},"video/vnd.sealed.mpeg4":{source:"iana"},"video/vnd.sealed.swf":{source:"iana"},"video/vnd.sealedmedia.softseal.mov":{source:"iana"},"video/vnd.uvvu.mp4":{source:"iana",extensions:["uvu","uvvu"]},"video/vnd.vivo":{source:"iana",extensions:["viv"]},"video/vnd.youtube.yt":{source:"iana"},"video/vp8":{source:"iana"},"video/webm":{source:"apache",compressible:!1,extensions:["webm"]},"video/x-f4v":{source:"apache",extensions:["f4v"]},"video/x-fli":{source:"apache",extensions:["fli"]},"video/x-flv":{source:"apache",compressible:!1,extensions:["flv"]},"video/x-m4v":{source:"apache",extensions:["m4v"]},"video/x-matroska":{source:"apache",compressible:!1,extensions:["mkv","mk3d","mks"]},"video/x-mng":{source:"apache",extensions:["mng"]},"video/x-ms-asf":{source:"apache",extensions:["asf","asx"]},"video/x-ms-vob":{source:"apache",extensions:["vob"]},"video/x-ms-wm":{source:"apache",extensions:["wm"]},"video/x-ms-wmv":{source:"apache",compressible:!1,extensions:["wmv"]},"video/x-ms-wmx":{source:"apache",extensions:["wmx"]},"video/x-ms-wvx":{source:"apache",extensions:["wvx"]},"video/x-msvideo":{source:"apache",extensions:["avi"]},"video/x-sgi-movie":{source:"apache",extensions:["movie"]},"video/x-smv":{source:"apache",extensions:["smv"]},"x-conference/x-cooltalk":{source:"apache",extensions:["ice"]},"x-shader/x-fragment":{compressible:!0},"x-shader/x-vertex":{compressible:!0}}},{}],142:[function(e,t,n){
|
||
/*!
|
||
* mime-db
|
||
* Copyright(c) 2014 Jonathan Ong
|
||
* MIT Licensed
|
||
*/
|
||
t.exports=e("./db.json")},{"./db.json":141}],143:[function(e,t,n){
|
||
/*!
|
||
* mime-types
|
||
* Copyright(c) 2014 Jonathan Ong
|
||
* Copyright(c) 2015 Douglas Christopher Wilson
|
||
* MIT Licensed
|
||
*/
|
||
"use strict";var i,s,r,a=e("mime-db"),o=e("path").extname,c=/^\s*([^;\s]*)(?:;|\s|$)/,l=/^text\//i;function p(e){if(!e||"string"!=typeof e)return!1;var t=c.exec(e),n=t&&a[t[1].toLowerCase()];return n&&n.charset?n.charset:!(!t||!l.test(t[1]))&&"UTF-8"}n.charset=p,n.charsets={lookup:p},n.contentType=function(e){if(!e||"string"!=typeof e)return!1;var t=-1===e.indexOf("/")?n.lookup(e):e;if(!t)return!1;if(-1===t.indexOf("charset")){var i=n.charset(t);i&&(t+="; charset="+i.toLowerCase())}return t},n.extension=function(e){if(!e||"string"!=typeof e)return!1;var t=c.exec(e),i=t&&n.extensions[t[1].toLowerCase()];if(!i||!i.length)return!1;return i[0]},n.extensions=Object.create(null),n.lookup=function(e){if(!e||"string"!=typeof e)return!1;var t=o("x."+e).toLowerCase().substr(1);if(!t)return!1;return n.types[t]||!1},n.types=Object.create(null),i=n.extensions,s=n.types,r=["nginx","apache",void 0,"iana"],Object.keys(a).forEach((function(e){var t=a[e],n=t.extensions;if(n&&n.length){i[e]=n;for(var o=0;o<n.length;o++){var c=n[o];if(s[c]){var l=r.indexOf(a[s[c]].source),p=r.indexOf(t.source);if("application/octet-stream"!==s[c]&&(l>p||l===p&&"application/"===s[c].substr(0,12)))continue}s[c]=e}}}))},{"mime-db":142,path:184}],144:[function(e,t,n){(function(t){(function(){var i=e("./index"),s=e("./descriptor"),r=e("uint64be"),a=20828448e5;n.fullBoxes={};function o(e,t,n){for(var i=t;i<n;i++)e[i]=0}function c(e,t,n){t.writeUInt32BE(Math.floor((e.getTime()+a)/1e3),n)}function l(e,t,n){t.writeUIntBE(Math.floor((e.getTime()+a)/1e3),n,6)}function p(e,t,n){t.writeUInt16BE(Math.floor(e)%65536,n),t.writeUInt16BE(Math.floor(256*e*256)%65536,n+2)}function u(e,t,n){e||(e=[0,0,0,0,0,0,0,0,0]);for(var i=0;i<e.length;i++)p(e[i],t,n+4*i)}function d(e){for(var t=new Array(e.length/4),n=0;n<t.length;n++)t[n]=m(e,4*n);return t}function h(e,t){return new Date(1e3*e.readUIntBE(t,6)-a)}function f(e,t){return new Date(1e3*e.readUInt32BE(t)-a)}function m(e,t){return e.readUInt16BE(t)+e.readUInt16BE(t+2)/65536}function g(e,t){return e[t]+e[t+1]/256}function v(e,t,n){var i;for(i=0;i<n&&0!==e[t+i];i++);return e.toString("utf8",t,t+i)}["mvhd","tkhd","mdhd","vmhd","smhd","stsd","esds","stsz","stco","co64","stss","stts","ctts","stsc","dref","elst","hdlr","mehd","trex","mfhd","tfhd","tfdt","trun"].forEach((function(e){n.fullBoxes[e]=!0})),n.ftyp={},n.ftyp.encode=function(e,i,s){i=i?i.slice(s):t.alloc(n.ftyp.encodingLength(e));var r=e.compatibleBrands||[];i.write(e.brand,0,4,"ascii"),i.writeUInt32BE(e.brandVersion,4);for(var a=0;a<r.length;a++)i.write(r[a],8+4*a,4,"ascii");return n.ftyp.encode.bytes=8+4*r.length,i},n.ftyp.decode=function(e,t){for(var n=(e=e.slice(t)).toString("ascii",0,4),i=e.readUInt32BE(4),s=[],r=8;r<e.length;r+=4)s.push(e.toString("ascii",r,r+4));return{brand:n,brandVersion:i,compatibleBrands:s}},n.ftyp.encodingLength=function(e){return 8+4*(e.compatibleBrands||[]).length},n.mvhd={},n.mvhd.encode=function(e,i,s){return i=i?i.slice(s):t.alloc(96),c(e.ctime||new Date,i,0),c(e.mtime||new Date,i,4),i.writeUInt32BE(e.timeScale||0,8),i.writeUInt32BE(e.duration||0,12),p(e.preferredRate||0,i,16),function(e,t,n){t[n]=Math.floor(e)%256,t[n+1]=Math.floor(256*e)%256}(e.preferredVolume||0,i,20),o(i,22,32),u(e.matrix,i,32),i.writeUInt32BE(e.previewTime||0,68),i.writeUInt32BE(e.previewDuration||0,72),i.writeUInt32BE(e.posterTime||0,76),i.writeUInt32BE(e.selectionTime||0,80),i.writeUInt32BE(e.selectionDuration||0,84),i.writeUInt32BE(e.currentTime||0,88),i.writeUInt32BE(e.nextTrackId||0,92),n.mvhd.encode.bytes=96,i},n.mvhd.decode=function(e,t){return{ctime:f(e=e.slice(t),0),mtime:f(e,4),timeScale:e.readUInt32BE(8),duration:e.readUInt32BE(12),preferredRate:m(e,16),preferredVolume:g(e,20),matrix:d(e.slice(32,68)),previewTime:e.readUInt32BE(68),previewDuration:e.readUInt32BE(72),posterTime:e.readUInt32BE(76),selectionTime:e.readUInt32BE(80),selectionDuration:e.readUInt32BE(84),currentTime:e.readUInt32BE(88),nextTrackId:e.readUInt32BE(92)}},n.mvhd.encodingLength=function(e){return 96},n.tkhd={},n.tkhd.encode=function(e,i,s){return i=i?i.slice(s):t.alloc(80),c(e.ctime||new Date,i,0),c(e.mtime||new Date,i,4),i.writeUInt32BE(e.trackId||0,8),o(i,12,16),i.writeUInt32BE(e.duration||0,16),o(i,20,28),i.writeUInt16BE(e.layer||0,28),i.writeUInt16BE(e.alternateGroup||0,30),i.writeUInt16BE(e.volume||0,32),u(e.matrix,i,36),i.writeUInt32BE(e.trackWidth||0,72),i.writeUInt32BE(e.trackHeight||0,76),n.tkhd.encode.bytes=80,i},n.tkhd.decode=function(e,t){return{ctime:f(e=e.slice(t),0),mtime:f(e,4),trackId:e.readUInt32BE(8),duration:e.readUInt32BE(16),layer:e.readUInt16BE(28),alternateGroup:e.readUInt16BE(30),volume:e.readUInt16BE(32),matrix:d(e.slice(36,72)),trackWidth:e.readUInt32BE(72),trackHeight:e.readUInt32BE(76)}},n.tkhd.encodingLength=function(e){return 80},n.mdhd={},n.mdhd.encode=function(e,i,s){return 1===e.version?(i=i?i.slice(s):t.alloc(32),l(e.ctime||new Date,i,0),l(e.mtime||new Date,i,8),i.writeUInt32BE(e.timeScale||0,16),i.writeUIntBE(e.duration||0,20,6),i.writeUInt16BE(e.language||0,28),i.writeUInt16BE(e.quality||0,30),n.mdhd.encode.bytes=32,i):(i=i?i.slice(s):t.alloc(20),c(e.ctime||new Date,i,0),c(e.mtime||new Date,i,4),i.writeUInt32BE(e.timeScale||0,8),i.writeUInt32BE(e.duration||0,12),i.writeUInt16BE(e.language||0,16),i.writeUInt16BE(e.quality||0,18),n.mdhd.encode.bytes=20,i)},n.mdhd.decode=function(e,t,n){return e=e.slice(t),n-t!=20?{ctime:h(e,0),mtime:h(e,8),timeScale:e.readUInt32BE(16),duration:e.readUIntBE(20,6),language:e.readUInt16BE(28),quality:e.readUInt16BE(30)}:{ctime:f(e,0),mtime:f(e,4),timeScale:e.readUInt32BE(8),duration:e.readUInt32BE(12),language:e.readUInt16BE(16),quality:e.readUInt16BE(18)}},n.mdhd.encodingLength=function(e){return 1===e.version?32:20},n.vmhd={},n.vmhd.encode=function(e,i,s){(i=i?i.slice(s):t.alloc(8)).writeUInt16BE(e.graphicsMode||0,0);var r=e.opcolor||[0,0,0];return i.writeUInt16BE(r[0],2),i.writeUInt16BE(r[1],4),i.writeUInt16BE(r[2],6),n.vmhd.encode.bytes=8,i},n.vmhd.decode=function(e,t){return{graphicsMode:(e=e.slice(t)).readUInt16BE(0),opcolor:[e.readUInt16BE(2),e.readUInt16BE(4),e.readUInt16BE(6)]}},n.vmhd.encodingLength=function(e){return 8},n.smhd={},n.smhd.encode=function(e,i,s){return(i=i?i.slice(s):t.alloc(4)).writeUInt16BE(e.balance||0,0),o(i,2,4),n.smhd.encode.bytes=4,i},n.smhd.decode=function(e,t){return{balance:(e=e.slice(t)).readUInt16BE(0)}},n.smhd.encodingLength=function(e){return 4},n.stsd={},n.stsd.encode=function(e,s,r){s=s?s.slice(r):t.alloc(n.stsd.encodingLength(e));var a=e.entries||[];s.writeUInt32BE(a.length,0);for(var o=4,c=0;c<a.length;c++){var l=a[c];i.encode(l,s,o),o+=i.encode.bytes}return n.stsd.encode.bytes=o,s},n.stsd.decode=function(e,t,n){for(var s=(e=e.slice(t)).readUInt32BE(0),r=new Array(s),a=4,o=0;o<s;o++){var c=i.decode(e,a,n);r[o]=c,a+=c.length}return{entries:r}},n.stsd.encodingLength=function(e){var t=4;if(!e.entries)return t;for(var n=0;n<e.entries.length;n++)t+=i.encodingLength(e.entries[n]);return t},n.avc1=n.VisualSampleEntry={},n.VisualSampleEntry.encode=function(e,s,r){o(s=s?s.slice(r):t.alloc(n.VisualSampleEntry.encodingLength(e)),0,6),s.writeUInt16BE(e.dataReferenceIndex||0,6),o(s,8,24),s.writeUInt16BE(e.width||0,24),s.writeUInt16BE(e.height||0,26),s.writeUInt32BE(e.hResolution||4718592,28),s.writeUInt32BE(e.vResolution||4718592,32),o(s,36,40),s.writeUInt16BE(e.frameCount||1,40);var a=e.compressorName||"",c=Math.min(a.length,31);s.writeUInt8(c,42),s.write(a,43,c,"utf8"),s.writeUInt16BE(e.depth||24,74),s.writeInt16BE(-1,76);var l=78;(e.children||[]).forEach((function(e){i.encode(e,s,l),l+=i.encode.bytes})),n.VisualSampleEntry.encode.bytes=l},n.VisualSampleEntry.decode=function(e,t,n){e=e.slice(t);for(var s=n-t,r=Math.min(e.readUInt8(42),31),a={dataReferenceIndex:e.readUInt16BE(6),width:e.readUInt16BE(24),height:e.readUInt16BE(26),hResolution:e.readUInt32BE(28),vResolution:e.readUInt32BE(32),frameCount:e.readUInt16BE(40),compressorName:e.toString("utf8",43,43+r),depth:e.readUInt16BE(74),children:[]},o=78;s-o>=8;){var c=i.decode(e,o,s);a.children.push(c),a[c.type]=c,o+=c.length}return a},n.VisualSampleEntry.encodingLength=function(e){var t=78;return(e.children||[]).forEach((function(e){t+=i.encodingLength(e)})),t},n.avcC={},n.avcC.encode=function(e,i,s){i=i?i.slice(s):t.alloc(e.buffer.length),e.buffer.copy(i),n.avcC.encode.bytes=e.buffer.length},n.avcC.decode=function(e,n,i){return{mimeCodec:(e=e.slice(n,i)).toString("hex",1,4),buffer:t.from(e)}},n.avcC.encodingLength=function(e){return e.buffer.length},n.mp4a=n.AudioSampleEntry={},n.AudioSampleEntry.encode=function(e,s,r){o(s=s?s.slice(r):t.alloc(n.AudioSampleEntry.encodingLength(e)),0,6),s.writeUInt16BE(e.dataReferenceIndex||0,6),o(s,8,16),s.writeUInt16BE(e.channelCount||2,16),s.writeUInt16BE(e.sampleSize||16,18),o(s,20,24),s.writeUInt32BE(e.sampleRate||0,24);var a=28;(e.children||[]).forEach((function(e){i.encode(e,s,a),a+=i.encode.bytes})),n.AudioSampleEntry.encode.bytes=a},n.AudioSampleEntry.decode=function(e,t,n){for(var s=n-t,r={dataReferenceIndex:(e=e.slice(t,n)).readUInt16BE(6),channelCount:e.readUInt16BE(16),sampleSize:e.readUInt16BE(18),sampleRate:e.readUInt32BE(24),children:[]},a=28;s-a>=8;){var o=i.decode(e,a,s);r.children.push(o),r[o.type]=o,a+=o.length}return r},n.AudioSampleEntry.encodingLength=function(e){var t=28;return(e.children||[]).forEach((function(e){t+=i.encodingLength(e)})),t},n.esds={},n.esds.encode=function(e,i,s){i=i?i.slice(s):t.alloc(e.buffer.length),e.buffer.copy(i,0),n.esds.encode.bytes=e.buffer.length},n.esds.decode=function(e,n,i){e=e.slice(n,i);var r=s.Descriptor.decode(e,0,e.length),a=("ESDescriptor"===r.tagName?r:{}).DecoderConfigDescriptor||{},o=a.oti||0,c=a.DecoderSpecificInfo,l=c?(248&c.buffer.readUInt8(0))>>3:0,p=null;return o&&(p=o.toString(16),l&&(p+="."+l)),{mimeCodec:p,buffer:t.from(e.slice(0))}},n.esds.encodingLength=function(e){return e.buffer.length},n.stsz={},n.stsz.encode=function(e,i,s){var r=e.entries||[];(i=i?i.slice(s):t.alloc(n.stsz.encodingLength(e))).writeUInt32BE(0,0),i.writeUInt32BE(r.length,4);for(var a=0;a<r.length;a++)i.writeUInt32BE(r[a],4*a+8);return n.stsz.encode.bytes=8+4*r.length,i},n.stsz.decode=function(e,t){for(var n=(e=e.slice(t)).readUInt32BE(0),i=e.readUInt32BE(4),s=new Array(i),r=0;r<i;r++)s[r]=0===n?e.readUInt32BE(4*r+8):n;return{entries:s}},n.stsz.encodingLength=function(e){return 8+4*e.entries.length},n.stss=n.stco={},n.stco.encode=function(e,i,s){var r=e.entries||[];(i=i?i.slice(s):t.alloc(n.stco.encodingLength(e))).writeUInt32BE(r.length,0);for(var a=0;a<r.length;a++)i.writeUInt32BE(r[a],4*a+4);return n.stco.encode.bytes=4+4*r.length,i},n.stco.decode=function(e,t){for(var n=(e=e.slice(t)).readUInt32BE(0),i=new Array(n),s=0;s<n;s++)i[s]=e.readUInt32BE(4*s+4);return{entries:i}},n.stco.encodingLength=function(e){return 4+4*e.entries.length},n.co64={},n.co64.encode=function(e,i,s){var a=e.entries||[];(i=i?i.slice(s):t.alloc(n.co64.encodingLength(e))).writeUInt32BE(a.length,0);for(var o=0;o<a.length;o++)r.encode(a[o],i,8*o+4);return n.co64.encode.bytes=4+8*a.length,i},n.co64.decode=function(e,t){for(var n=(e=e.slice(t)).readUInt32BE(0),i=new Array(n),s=0;s<n;s++)i[s]=r.decode(e,8*s+4);return{entries:i}},n.co64.encodingLength=function(e){return 4+8*e.entries.length},n.stts={},n.stts.encode=function(e,i,s){var r=e.entries||[];(i=i?i.slice(s):t.alloc(n.stts.encodingLength(e))).writeUInt32BE(r.length,0);for(var a=0;a<r.length;a++){var o=8*a+4;i.writeUInt32BE(r[a].count||0,o),i.writeUInt32BE(r[a].duration||0,o+4)}return n.stts.encode.bytes=4+8*e.entries.length,i},n.stts.decode=function(e,t){for(var n=(e=e.slice(t)).readUInt32BE(0),i=new Array(n),s=0;s<n;s++){var r=8*s+4;i[s]={count:e.readUInt32BE(r),duration:e.readUInt32BE(r+4)}}return{entries:i}},n.stts.encodingLength=function(e){return 4+8*e.entries.length},n.ctts={},n.ctts.encode=function(e,i,s){var r=e.entries||[];(i=i?i.slice(s):t.alloc(n.ctts.encodingLength(e))).writeUInt32BE(r.length,0);for(var a=0;a<r.length;a++){var o=8*a+4;i.writeUInt32BE(r[a].count||0,o),i.writeUInt32BE(r[a].compositionOffset||0,o+4)}return n.ctts.encode.bytes=4+8*r.length,i},n.ctts.decode=function(e,t){for(var n=(e=e.slice(t)).readUInt32BE(0),i=new Array(n),s=0;s<n;s++){var r=8*s+4;i[s]={count:e.readUInt32BE(r),compositionOffset:e.readInt32BE(r+4)}}return{entries:i}},n.ctts.encodingLength=function(e){return 4+8*e.entries.length},n.stsc={},n.stsc.encode=function(e,i,s){var r=e.entries||[];(i=i?i.slice(s):t.alloc(n.stsc.encodingLength(e))).writeUInt32BE(r.length,0);for(var a=0;a<r.length;a++){var o=12*a+4;i.writeUInt32BE(r[a].firstChunk||0,o),i.writeUInt32BE(r[a].samplesPerChunk||0,o+4),i.writeUInt32BE(r[a].sampleDescriptionId||0,o+8)}return n.stsc.encode.bytes=4+12*r.length,i},n.stsc.decode=function(e,t){for(var n=(e=e.slice(t)).readUInt32BE(0),i=new Array(n),s=0;s<n;s++){var r=12*s+4;i[s]={firstChunk:e.readUInt32BE(r),samplesPerChunk:e.readUInt32BE(r+4),sampleDescriptionId:e.readUInt32BE(r+8)}}return{entries:i}},n.stsc.encodingLength=function(e){return 4+12*e.entries.length},n.dref={},n.dref.encode=function(e,i,s){i=i?i.slice(s):t.alloc(n.dref.encodingLength(e));var r=e.entries||[];i.writeUInt32BE(r.length,0);for(var a=4,o=0;o<r.length;o++){var c=r[o],l=(c.buf?c.buf.length:0)+4+4;i.writeUInt32BE(l,a),a+=4,i.write(c.type,a,4,"ascii"),a+=4,c.buf&&(c.buf.copy(i,a),a+=c.buf.length)}return n.dref.encode.bytes=a,i},n.dref.decode=function(e,t){for(var n=(e=e.slice(t)).readUInt32BE(0),i=new Array(n),s=4,r=0;r<n;r++){var a=e.readUInt32BE(s),o=e.toString("ascii",s+4,s+8),c=e.slice(s+8,s+a);s+=a,i[r]={type:o,buf:c}}return{entries:i}},n.dref.encodingLength=function(e){var t=4;if(!e.entries)return t;for(var n=0;n<e.entries.length;n++){var i=e.entries[n].buf;t+=(i?i.length:0)+4+4}return t},n.elst={},n.elst.encode=function(e,i,s){var r=e.entries||[];(i=i?i.slice(s):t.alloc(n.elst.encodingLength(e))).writeUInt32BE(r.length,0);for(var a=0;a<r.length;a++){var o=12*a+4;i.writeUInt32BE(r[a].trackDuration||0,o),i.writeUInt32BE(r[a].mediaTime||0,o+4),p(r[a].mediaRate||0,i,o+8)}return n.elst.encode.bytes=4+12*r.length,i},n.elst.decode=function(e,t){for(var n=(e=e.slice(t)).readUInt32BE(0),i=new Array(n),s=0;s<n;s++){var r=12*s+4;i[s]={trackDuration:e.readUInt32BE(r),mediaTime:e.readInt32BE(r+4),mediaRate:m(e,r+8)}}return{entries:i}},n.elst.encodingLength=function(e){return 4+12*e.entries.length},n.hdlr={},n.hdlr.encode=function(e,i,s){i=i?i.slice(s):t.alloc(n.hdlr.encodingLength(e));var r=21+(e.name||"").length;return i.fill(0,0,r),i.write(e.handlerType||"",4,4,"ascii"),function(e,n,i){var s=t.from(e,"utf8");s.copy(n,i),n[i+s.length]=0}(e.name||"",i,20),n.hdlr.encode.bytes=r,i},n.hdlr.decode=function(e,t,n){return{handlerType:(e=e.slice(t)).toString("ascii",4,8),name:v(e,20,n)}},n.hdlr.encodingLength=function(e){return 21+(e.name||"").length},n.mehd={},n.mehd.encode=function(e,i,s){return(i=i?i.slice(s):t.alloc(4)).writeUInt32BE(e.fragmentDuration||0,0),n.mehd.encode.bytes=4,i},n.mehd.decode=function(e,t){return{fragmentDuration:(e=e.slice(t)).readUInt32BE(0)}},n.mehd.encodingLength=function(e){return 4},n.trex={},n.trex.encode=function(e,i,s){return(i=i?i.slice(s):t.alloc(20)).writeUInt32BE(e.trackId||0,0),i.writeUInt32BE(e.defaultSampleDescriptionIndex||0,4),i.writeUInt32BE(e.defaultSampleDuration||0,8),i.writeUInt32BE(e.defaultSampleSize||0,12),i.writeUInt32BE(e.defaultSampleFlags||0,16),n.trex.encode.bytes=20,i},n.trex.decode=function(e,t){return{trackId:(e=e.slice(t)).readUInt32BE(0),defaultSampleDescriptionIndex:e.readUInt32BE(4),defaultSampleDuration:e.readUInt32BE(8),defaultSampleSize:e.readUInt32BE(12),defaultSampleFlags:e.readUInt32BE(16)}},n.trex.encodingLength=function(e){return 20},n.mfhd={},n.mfhd.encode=function(e,i,s){return(i=i?i.slice(s):t.alloc(4)).writeUInt32BE(e.sequenceNumber||0,0),n.mfhd.encode.bytes=4,i},n.mfhd.decode=function(e,t){return{sequenceNumber:e.readUInt32BE(0)}},n.mfhd.encodingLength=function(e){return 4},n.tfhd={},n.tfhd.encode=function(e,i,s){return(i=i?i.slice(s):t.alloc(4)).writeUInt32BE(e.trackId,0),n.tfhd.encode.bytes=4,i},n.tfhd.decode=function(e,t){},n.tfhd.encodingLength=function(e){return 4},n.tfdt={},n.tfdt.encode=function(e,i,s){return(i=i?i.slice(s):t.alloc(4)).writeUInt32BE(e.baseMediaDecodeTime||0,0),n.tfdt.encode.bytes=4,i},n.tfdt.decode=function(e,t){},n.tfdt.encodingLength=function(e){return 4},n.trun={},n.trun.encode=function(e,i,s){(i=i?i.slice(s):t.alloc(8+16*e.entries.length)).writeUInt32BE(e.entries.length,0),i.writeInt32BE(e.dataOffset,4);for(var r=8,a=0;a<e.entries.length;a++){var o=e.entries[a];i.writeUInt32BE(o.sampleDuration,r),r+=4,i.writeUInt32BE(o.sampleSize,r),r+=4,i.writeUInt32BE(o.sampleFlags,r),r+=4,0===(e.version||0)?i.writeUInt32BE(o.sampleCompositionTimeOffset,r):i.writeInt32BE(o.sampleCompositionTimeOffset,r),r+=4}n.trun.encode.bytes=r},n.trun.decode=function(e,t){},n.trun.encodingLength=function(e){return 8+16*e.entries.length},n.mdat={},n.mdat.encode=function(e,t,i){e.buffer?(e.buffer.copy(t,i),n.mdat.encode.bytes=e.buffer.length):n.mdat.encode.bytes=n.mdat.encodingLength(e)},n.mdat.decode=function(e,n,i){return{buffer:t.from(e.slice(n,i))}},n.mdat.encodingLength=function(e){return e.buffer?e.buffer.length:e.contentLength}}).call(this)}).call(this,e("buffer").Buffer)},{"./descriptor":145,"./index":146,buffer:59,uint64be:295}],145:[function(e,t,n){(function(e){(function(){var t={3:"ESDescriptor",4:"DecoderConfigDescriptor",5:"DecoderSpecificInfo",6:"SLConfigDescriptor"};n.Descriptor={},n.Descriptor.decode=function(i,s,r){var a,o,c=i.readUInt8(s),l=s+1,p=0;do{p=p<<7|127&(a=i.readUInt8(l++))}while(128&a);var u=t[c];return(o=n[u]?n[u].decode(i,l,r):{buffer:e.from(i.slice(l,l+p))}).tag=c,o.tagName=u,o.length=l-s+p,o.contentsLen=p,o},n.DescriptorArray={},n.DescriptorArray.decode=function(e,i,s){for(var r=i,a={};r+2<=s;){var o=n.Descriptor.decode(e,r,s);r+=o.length,a[t[o.tag]||"Descriptor"+o.tag]=o}return a},n.ESDescriptor={},n.ESDescriptor.decode=function(e,t,i){var s=e.readUInt8(t+2),r=t+3;(128&s&&(r+=2),64&s)&&(r+=e.readUInt8(r)+1);return 32&s&&(r+=2),n.DescriptorArray.decode(e,r,i)},n.DecoderConfigDescriptor={},n.DecoderConfigDescriptor.decode=function(e,t,i){var s=e.readUInt8(t),r=n.DescriptorArray.decode(e,t+13,i);return r.oti=s,r}}).call(this)}).call(this,e("buffer").Buffer)},{buffer:59}],146:[function(e,t,n){(function(t){(function(){var i=e("uint64be"),s=e("./boxes"),r=4294967295,a=n,o=n.containers={moov:["mvhd","meta","traks","mvex"],trak:["tkhd","tref","trgr","edts","meta","mdia","udta"],edts:["elst"],mdia:["mdhd","hdlr","elng","minf"],minf:["vmhd","smhd","hmhd","sthd","nmhd","dinf","stbl"],dinf:["dref"],stbl:["stsd","stts","ctts","cslg","stsc","stsz","stz2","stco","co64","stss","stsh","padb","stdp","sdtp","sbgps","sgpds","subss","saizs","saios"],mvex:["mehd","trexs","leva"],moof:["mfhd","meta","trafs"],traf:["tfhd","tfdt","trun","sbgps","sgpds","subss","saizs","saios","meta"]};a.encode=function(e,n,i){return a.encodingLength(e),i=i||0,n=n||t.alloc(e.length),a._encode(e,n,i)},a._encode=function(e,t,n){var c=e.type,l=e.length;l>r&&(l=1),t.writeUInt32BE(l,n),t.write(e.type,n+4,4,"ascii");var p=n+8;if(1===l&&(i.encode(e.length,t,p),p+=8),s.fullBoxes[c]&&(t.writeUInt32BE(e.flags||0,p),t.writeUInt8(e.version||0,p),p+=4),o[c])o[c].forEach((function(n){if(5===n.length){var i=e[n]||[];n=n.substr(0,4),i.forEach((function(e){a._encode(e,t,p),p+=a.encode.bytes}))}else e[n]&&(a._encode(e[n],t,p),p+=a.encode.bytes)})),e.otherBoxes&&e.otherBoxes.forEach((function(e){a._encode(e,t,p),p+=a.encode.bytes}));else if(s[c]){var u=s[c].encode;u(e,t,p),p+=u.bytes}else{if(!e.buffer)throw new Error("Either `type` must be set to a known type (not'"+c+"') or `buffer` must be set");e.buffer.copy(t,p),p+=e.buffer.length}return a.encode.bytes=p-n,t},a.readHeaders=function(e,t,n){if(t=t||0,(n=n||e.length)-t<8)return 8;var r,a,o=e.readUInt32BE(t),c=e.toString("ascii",t+4,t+8),l=t+8;if(1===o){if(n-t<16)return 16;o=i.decode(e,l),l+=8}return s.fullBoxes[c]&&(r=e.readUInt8(l),a=16777215&e.readUInt32BE(l),l+=4),{length:o,headersLen:l-t,contentLen:o-(l-t),type:c,version:r,flags:a}},a.decode=function(e,t,n){t=t||0,n=n||e.length;var i=a.readHeaders(e,t,n);if(!i||i.length>n-t)throw new Error("Data too short");return a.decodeWithoutHeaders(i,e,t+i.headersLen,t+i.length)},a.decodeWithoutHeaders=function(e,n,i,r){i=i||0,r=r||n.length;var c=e.type,l={};if(o[c]){l.otherBoxes=[];for(var p=o[c],u=i;r-u>=8;){var d=a.decode(n,u,r);if(u+=d.length,p.indexOf(d.type)>=0)l[d.type]=d;else if(p.indexOf(d.type+"s")>=0){var h=d.type+"s";(l[h]=l[h]||[]).push(d)}else l.otherBoxes.push(d)}}else if(s[c]){l=(0,s[c].decode)(n,i,r)}else l.buffer=t.from(n.slice(i,r));return l.length=e.length,l.contentLen=e.contentLen,l.type=e.type,l.version=e.version,l.flags=e.flags,l},a.encodingLength=function(e){var t=e.type,n=8;if(s.fullBoxes[t]&&(n+=4),o[t])o[t].forEach((function(t){if(5===t.length){var i=e[t]||[];t=t.substr(0,4),i.forEach((function(e){e.type=t,n+=a.encodingLength(e)}))}else if(e[t]){var s=e[t];s.type=t,n+=a.encodingLength(s)}})),e.otherBoxes&&e.otherBoxes.forEach((function(e){n+=a.encodingLength(e)}));else if(s[t])n+=s[t].encodingLength(e);else{if(!e.buffer)throw new Error("Either `type` must be set to a known type (not'"+t+"') or `buffer` must be set");n+=e.buffer.length}return n>r&&(n+=8),e.length=n,n}}).call(this)}).call(this,e("buffer").Buffer)},{"./boxes":144,buffer:59,uint64be:295}],147:[function(e,t,n){(function(n){(function(){var i=e("readable-stream"),s=e("next-event"),r=e("mp4-box-encoding"),a=n.alloc(0);class o extends i.Writable{constructor(e){super(e),this.destroyed=!1,this._pending=0,this._missing=0,this._ignoreEmpty=!1,this._buf=null,this._str=null,this._cb=null,this._ondrain=null,this._writeBuffer=null,this._writeCb=null,this._ondrain=null,this._kick()}destroy(e){this.destroyed||(this.destroyed=!0,e&&this.emit("error",e),this.emit("close"))}_write(e,t,n){if(!this.destroyed){for(var i=!this._str||!this._str._writableState.needDrain;e.length&&!this.destroyed;){if(!this._missing&&!this._ignoreEmpty)return this._writeBuffer=e,void(this._writeCb=n);var s=e.length<this._missing?e.length:this._missing;if(this._buf?e.copy(this._buf,this._buf.length-this._missing):this._str&&(i=this._str.write(s===e.length?e:e.slice(0,s))),this._missing-=s,!this._missing){var r=this._buf,o=this._cb,c=this._str;this._buf=this._cb=this._str=this._ondrain=null,i=!0,this._ignoreEmpty=!1,c&&c.end(),o&&o(r)}e=s===e.length?a:e.slice(s)}if(this._pending&&!this._missing)return this._writeBuffer=e,void(this._writeCb=n);i?n():this._ondrain(n)}}_buffer(e,t){this._missing=e,this._buf=n.alloc(e),this._cb=t}_stream(e,t){return this._missing=e,this._str=new c(this),this._ondrain=s(this._str,"drain"),this._pending++,this._str.on("end",(()=>{this._pending--,this._kick()})),this._cb=t,this._str}_readBox(){const e=(t,i)=>{this._buffer(t,(t=>{i=i?n.concat([i,t]):t;var s=r.readHeaders(i);"number"==typeof s?e(s-i.length,i):(this._pending++,this._headers=s,this.emit("box",s))}))};e(8)}stream(){if(!this._headers)throw new Error("this function can only be called once after 'box' is emitted");var e=this._headers;return this._headers=null,this._stream(e.contentLen,null)}decode(e){if(!this._headers)throw new Error("this function can only be called once after 'box' is emitted");var t=this._headers;this._headers=null,this._buffer(t.contentLen,(n=>{var i=r.decodeWithoutHeaders(t,n);e(i),this._pending--,this._kick()}))}ignore(){if(!this._headers)throw new Error("this function can only be called once after 'box' is emitted");var e=this._headers;this._headers=null,this._missing=e.contentLen,0===this._missing&&(this._ignoreEmpty=!0),this._cb=()=>{this._pending--,this._kick()}}_kick(){if(!this._pending&&(this._buf||this._str||this._readBox(),this._writeBuffer)){var e=this._writeCb,t=this._writeBuffer;this._writeBuffer=null,this._writeCb=null,this._write(t,null,e)}}}class c extends i.PassThrough{constructor(e){super(),this._parent=e,this.destroyed=!1}destroy(e){this.destroyed||(this.destroyed=!0,this._parent.destroy(e),e&&this.emit("error",e),this.emit("close"))}}t.exports=o}).call(this)}).call(this,e("buffer").Buffer)},{buffer:59,"mp4-box-encoding":146,"next-event":181,"readable-stream":164}],148:[function(e,t,n){(function(n,i){(function(){var s=e("readable-stream"),r=e("mp4-box-encoding");function a(){}class o extends s.Readable{constructor(e){super(e),this.destroyed=!1,this._finalized=!1,this._reading=!1,this._stream=null,this._drain=null,this._want=!1,this._onreadable=()=>{this._want&&(this._want=!1,this._read())},this._onend=()=>{this._stream=null}}mdat(e,t){this.mediaData(e,t)}mediaData(e,t){var n=new c(this);return this.box({type:"mdat",contentLength:e,encodeBufferLen:8,stream:n},t),n}box(e,t){if(t||(t=a),this.destroyed)return t(new Error("Encoder is destroyed"));var s;if(e.encodeBufferLen&&(s=i.alloc(e.encodeBufferLen)),e.stream)e.buffer=null,s=r.encode(e,s),this.push(s),this._stream=e.stream,this._stream.on("readable",this._onreadable),this._stream.on("end",this._onend),this._stream.on("end",t),this._forward();else{if(s=r.encode(e,s),this.push(s))return n.nextTick(t);this._drain=t}}destroy(e){if(!this.destroyed){if(this.destroyed=!0,this._stream&&this._stream.destroy&&this._stream.destroy(),this._stream=null,this._drain){var t=this._drain;this._drain=null,t(e)}e&&this.emit("error",e),this.emit("close")}}finalize(){this._finalized=!0,this._stream||this._drain||this.push(null)}_forward(){if(this._stream)for(;!this.destroyed;){var e=this._stream.read();if(!e)return void(this._want=!!this._stream);if(!this.push(e))return}}_read(){if(!this._reading&&!this.destroyed){if(this._reading=!0,this._stream&&this._forward(),this._drain){var e=this._drain;this._drain=null,e()}this._reading=!1,this._finalized&&this.push(null)}}}class c extends s.PassThrough{constructor(e){super(),this._parent=e,this.destroyed=!1}destroy(e){this.destroyed||(this.destroyed=!0,this._parent.destroy(e),e&&this.emit("error",e),this.emit("close"))}}t.exports=o}).call(this)}).call(this,e("_process"),e("buffer").Buffer)},{_process:186,buffer:59,"mp4-box-encoding":146,"readable-stream":164}],149:[function(e,t,n){const i=e("./decode"),s=e("./encode");n.decode=e=>new i(e),n.encode=e=>new s(e)},{"./decode":147,"./encode":148}],150:[function(e,t,n){arguments[4][15][0].apply(n,arguments)},{dup:15}],151:[function(e,t,n){arguments[4][16][0].apply(n,arguments)},{"./_stream_readable":153,"./_stream_writable":155,_process:186,dup:16,inherits:118}],152:[function(e,t,n){arguments[4][17][0].apply(n,arguments)},{"./_stream_transform":154,dup:17,inherits:118}],153:[function(e,t,n){arguments[4][18][0].apply(n,arguments)},{"../errors":150,"./_stream_duplex":151,"./internal/streams/async_iterator":156,"./internal/streams/buffer_list":157,"./internal/streams/destroy":158,"./internal/streams/from":160,"./internal/streams/state":162,"./internal/streams/stream":163,_process:186,buffer:59,dup:18,events:97,inherits:118,"string_decoder/":285,util:54}],154:[function(e,t,n){arguments[4][19][0].apply(n,arguments)},{"../errors":150,"./_stream_duplex":151,dup:19,inherits:118}],155:[function(e,t,n){arguments[4][20][0].apply(n,arguments)},{"../errors":150,"./_stream_duplex":151,"./internal/streams/destroy":158,"./internal/streams/state":162,"./internal/streams/stream":163,_process:186,buffer:59,dup:20,inherits:118,"util-deprecate":304}],156:[function(e,t,n){arguments[4][21][0].apply(n,arguments)},{"./end-of-stream":159,_process:186,dup:21}],157:[function(e,t,n){arguments[4][22][0].apply(n,arguments)},{buffer:59,dup:22,util:54}],158:[function(e,t,n){arguments[4][23][0].apply(n,arguments)},{_process:186,dup:23}],159:[function(e,t,n){arguments[4][24][0].apply(n,arguments)},{"../../../errors":150,dup:24}],160:[function(e,t,n){arguments[4][25][0].apply(n,arguments)},{dup:25}],161:[function(e,t,n){arguments[4][26][0].apply(n,arguments)},{"../../../errors":150,"./end-of-stream":159,dup:26}],162:[function(e,t,n){arguments[4][27][0].apply(n,arguments)},{"../../../errors":150,dup:27}],163:[function(e,t,n){arguments[4][28][0].apply(n,arguments)},{dup:28,events:97}],164:[function(e,t,n){arguments[4][29][0].apply(n,arguments)},{"./lib/_stream_duplex.js":151,"./lib/_stream_passthrough.js":152,"./lib/_stream_readable.js":153,"./lib/_stream_transform.js":154,"./lib/_stream_writable.js":155,"./lib/internal/streams/end-of-stream.js":159,"./lib/internal/streams/pipeline.js":161,dup:29}],165:[function(e,t,n){
|
||
/*! multistream. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
||
var i=e("readable-stream");function s(e){return a(e,{objectMode:!0,highWaterMark:16})}function r(e){return a(e)}function a(e,t){if(!e||"function"==typeof e||e._readableState)return e;var n=new i.Readable(t).wrap(e);return e.destroy&&(n.destroy=e.destroy.bind(e)),n}class o extends i.Readable{constructor(e,t){super(t),this.destroyed=!1,this._drained=!1,this._forwarding=!1,this._current=null,this._toStreams2=t&&t.objectMode?s:r,"function"==typeof e?this._queue=e:(this._queue=e.map(this._toStreams2),this._queue.forEach((e=>{"function"!=typeof e&&this._attachErrorListener(e)}))),this._next()}_read(){this._drained=!0,this._forward()}_forward(){if(!this._forwarding&&this._drained&&this._current){var e;for(this._forwarding=!0;this._drained&&null!==(e=this._current.read());)this._drained=this.push(e);this._forwarding=!1}}destroy(e){this.destroyed||(this.destroyed=!0,this._current&&this._current.destroy&&this._current.destroy(),"function"!=typeof this._queue&&this._queue.forEach((e=>{e.destroy&&e.destroy()})),e&&this.emit("error",e),this.emit("close"))}_next(){if(this._current=null,"function"==typeof this._queue)this._queue(((e,t)=>{if(e)return this.destroy(e);t=this._toStreams2(t),this._attachErrorListener(t),this._gotNextStream(t)}));else{var e=this._queue.shift();"function"==typeof e&&(e=this._toStreams2(e()),this._attachErrorListener(e)),this._gotNextStream(e)}}_gotNextStream(e){if(!e)return this.push(null),void this.destroy();this._current=e,this._forward();const t=()=>{this._forward()},n=()=>{e._readableState.ended||this.destroy()},i=()=>{this._current=null,e.removeListener("readable",t),e.removeListener("end",i),e.removeListener("close",n),this._next()};e.on("readable",t),e.once("end",i),e.once("close",n)}_attachErrorListener(e){if(!e)return;const t=n=>{e.removeListener("error",t),this.destroy(n)};e.once("error",t)}}o.obj=e=>new o(e,{objectMode:!0,highWaterMark:16}),t.exports=o},{"readable-stream":180}],166:[function(e,t,n){arguments[4][15][0].apply(n,arguments)},{dup:15}],167:[function(e,t,n){arguments[4][16][0].apply(n,arguments)},{"./_stream_readable":169,"./_stream_writable":171,_process:186,dup:16,inherits:118}],168:[function(e,t,n){arguments[4][17][0].apply(n,arguments)},{"./_stream_transform":170,dup:17,inherits:118}],169:[function(e,t,n){arguments[4][18][0].apply(n,arguments)},{"../errors":166,"./_stream_duplex":167,"./internal/streams/async_iterator":172,"./internal/streams/buffer_list":173,"./internal/streams/destroy":174,"./internal/streams/from":176,"./internal/streams/state":178,"./internal/streams/stream":179,_process:186,buffer:59,dup:18,events:97,inherits:118,"string_decoder/":285,util:54}],170:[function(e,t,n){arguments[4][19][0].apply(n,arguments)},{"../errors":166,"./_stream_duplex":167,dup:19,inherits:118}],171:[function(e,t,n){arguments[4][20][0].apply(n,arguments)},{"../errors":166,"./_stream_duplex":167,"./internal/streams/destroy":174,"./internal/streams/state":178,"./internal/streams/stream":179,_process:186,buffer:59,dup:20,inherits:118,"util-deprecate":304}],172:[function(e,t,n){arguments[4][21][0].apply(n,arguments)},{"./end-of-stream":175,_process:186,dup:21}],173:[function(e,t,n){arguments[4][22][0].apply(n,arguments)},{buffer:59,dup:22,util:54}],174:[function(e,t,n){arguments[4][23][0].apply(n,arguments)},{_process:186,dup:23}],175:[function(e,t,n){arguments[4][24][0].apply(n,arguments)},{"../../../errors":166,dup:24}],176:[function(e,t,n){arguments[4][25][0].apply(n,arguments)},{dup:25}],177:[function(e,t,n){arguments[4][26][0].apply(n,arguments)},{"../../../errors":166,"./end-of-stream":175,dup:26}],178:[function(e,t,n){arguments[4][27][0].apply(n,arguments)},{"../../../errors":166,dup:27}],179:[function(e,t,n){arguments[4][28][0].apply(n,arguments)},{dup:28,events:97}],180:[function(e,t,n){arguments[4][29][0].apply(n,arguments)},{"./lib/_stream_duplex.js":167,"./lib/_stream_passthrough.js":168,"./lib/_stream_readable.js":169,"./lib/_stream_transform.js":170,"./lib/_stream_writable.js":171,"./lib/internal/streams/end-of-stream.js":175,"./lib/internal/streams/pipeline.js":177,dup:29}],181:[function(e,t,n){t.exports=function(e,t){var n=null;return e.on(t,(function(e){if(n){var t=n;n=null,t(e)}})),function(e){n=e}}},{}],182:[function(e,t,n){var i=e("wrappy");function s(e){var t=function(){return t.called?t.value:(t.called=!0,t.value=e.apply(this,arguments))};return t.called=!1,t}function r(e){var t=function(){if(t.called)throw new Error(t.onceError);return t.called=!0,t.value=e.apply(this,arguments)},n=e.name||"Function wrapped with `once`";return t.onceError=n+" shouldn't be called more than once",t.called=!1,t}t.exports=i(s),t.exports.strict=i(r),s.proto=s((function(){Object.defineProperty(Function.prototype,"once",{value:function(){return s(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return r(this)},configurable:!0})}))},{wrappy:333}],183:[function(e,t,n){(function(n,i){(function(){
|
||
/*! parse-torrent. MIT License. WebTorrent LLC <https://webtorrent.io/opensource> */
|
||
const s=e("bencode"),r=e("blob-to-buffer"),a=e("fs"),o=e("simple-get"),c=e("magnet-uri"),l=e("path"),p=e("simple-sha1");function u(e){if("string"==typeof e&&/^(stream-)?magnet:/.test(e)){const t=c(e);if(!t.infoHash)throw new Error("Invalid torrent identifier");return t}if("string"==typeof e&&(/^[a-f0-9]{40}$/i.test(e)||/^[a-z2-7]{32}$/i.test(e)))return c("magnet:?xt=urn:btih:"+e);if(i.isBuffer(e)&&20===e.length)return c("magnet:?xt=urn:btih:"+e.toString("hex"));if(i.isBuffer(e))return function(e){i.isBuffer(e)&&(e=s.decode(e));h(e.info,"info"),h(e.info["name.utf-8"]||e.info.name,"info.name"),h(e.info["piece length"],"info['piece length']"),h(e.info.pieces,"info.pieces"),e.info.files?e.info.files.forEach((e=>{h("number"==typeof e.length,"info.files[0].length"),h(e["path.utf-8"]||e.path,"info.files[0].path")})):h("number"==typeof e.info.length,"info.length");const t={info:e.info,infoBuffer:s.encode(e.info),name:(e.info["name.utf-8"]||e.info.name).toString(),announce:[]};t.infoHash=p.sync(t.infoBuffer),t.infoHashBuffer=i.from(t.infoHash,"hex"),void 0!==e.info.private&&(t.private=!!e.info.private);e["creation date"]&&(t.created=new Date(1e3*e["creation date"]));e["created by"]&&(t.createdBy=e["created by"].toString());i.isBuffer(e.comment)&&(t.comment=e.comment.toString());Array.isArray(e["announce-list"])&&e["announce-list"].length>0?e["announce-list"].forEach((e=>{e.forEach((e=>{t.announce.push(e.toString())}))})):e.announce&&t.announce.push(e.announce.toString());i.isBuffer(e["url-list"])&&(e["url-list"]=e["url-list"].length>0?[e["url-list"]]:[]);t.urlList=(e["url-list"]||[]).map((e=>e.toString())),t.announce=Array.from(new Set(t.announce)),t.urlList=Array.from(new Set(t.urlList));const n=e.info.files||[e.info];t.files=n.map(((e,i)=>{const s=[].concat(t.name,e["path.utf-8"]||e.path||[]).map((e=>e.toString()));return{path:l.join.apply(null,[l.sep].concat(s)).slice(1),name:s[s.length-1],length:e.length,offset:n.slice(0,i).reduce(d,0)}})),t.length=n.reduce(d,0);const r=t.files[t.files.length-1];return t.pieceLength=e.info["piece length"],t.lastPieceLength=(r.offset+r.length)%t.pieceLength||t.pieceLength,t.pieces=function(e){const t=[];for(let n=0;n<e.length;n+=20)t.push(e.slice(n,n+20).toString("hex"));return t}(e.info.pieces),t}(e);if(e&&e.infoHash)return e.infoHash=e.infoHash.toLowerCase(),e.announce||(e.announce=[]),"string"==typeof e.announce&&(e.announce=[e.announce]),e.urlList||(e.urlList=[]),e;throw new Error("Invalid torrent identifier")}function d(e,t){return e+t.length}function h(e,t){if(!e)throw new Error("Torrent is missing required field: "+t)}t.exports=u,t.exports.remote=function(e,t){let i;if("function"!=typeof t)throw new Error("second argument must be a Function");try{i=u(e)}catch(e){}i&&i.infoHash?n.nextTick((()=>{t(null,i)})):(s=e,"undefined"!=typeof Blob&&s instanceof Blob?r(e,((e,n)=>{if(e)return t(new Error("Error converting Blob: "+e.message));c(n)})):"function"==typeof o&&/^https?:/.test(e)?o.concat({url:e,timeout:3e4,headers:{"user-agent":"WebTorrent (https://webtorrent.io)"}},((e,n,i)=>{if(e)return t(new Error("Error downloading torrent: "+e.message));c(i)})):"function"==typeof a.readFile&&"string"==typeof e?a.readFile(e,((e,n)=>{if(e)return t(new Error("Invalid torrent identifier"));c(n)})):n.nextTick((()=>{t(new Error("Invalid torrent identifier"))})));var s;function c(e){try{i=u(e)}catch(e){return t(e)}i&&i.infoHash?t(null,i):t(new Error("Invalid torrent identifier"))}},t.exports.toMagnetURI=c.encode,t.exports.toTorrentFile=function(e){const t={info:e.info};t["announce-list"]=(e.announce||[]).map((e=>(t.announce||(t.announce=e),[e=i.from(e,"utf8")]))),t["url-list"]=e.urlList||[],void 0!==e.private&&(t.private=Number(e.private));e.created&&(t["creation date"]=e.created.getTime()/1e3|0);e.createdBy&&(t["created by"]=e.createdBy);e.comment&&(t.comment=e.comment);return s.encode(t)},i.alloc(0)}).call(this)}).call(this,e("_process"),e("buffer").Buffer)},{_process:186,bencode:6,"blob-to-buffer":37,buffer:59,fs:55,"magnet-uri":123,path:184,"simple-get":221,"simple-sha1":241}],184:[function(e,t,n){(function(e){(function(){"use strict";function n(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function i(e,t){for(var n,i="",s=0,r=-1,a=0,o=0;o<=e.length;++o){if(o<e.length)n=e.charCodeAt(o);else{if(47===n)break;n=47}if(47===n){if(r===o-1||1===a);else if(r!==o-1&&2===a){if(i.length<2||2!==s||46!==i.charCodeAt(i.length-1)||46!==i.charCodeAt(i.length-2))if(i.length>2){var c=i.lastIndexOf("/");if(c!==i.length-1){-1===c?(i="",s=0):s=(i=i.slice(0,c)).length-1-i.lastIndexOf("/"),r=o,a=0;continue}}else if(2===i.length||1===i.length){i="",s=0,r=o,a=0;continue}t&&(i.length>0?i+="/..":i="..",s=2)}else i.length>0?i+="/"+e.slice(r+1,o):i=e.slice(r+1,o),s=o-r-1;r=o,a=0}else 46===n&&-1!==a?++a:a=-1}return i}var s={resolve:function(){for(var t,s="",r=!1,a=arguments.length-1;a>=-1&&!r;a--){var o;a>=0?o=arguments[a]:(void 0===t&&(t=e.cwd()),o=t),n(o),0!==o.length&&(s=o+"/"+s,r=47===o.charCodeAt(0))}return s=i(s,!r),r?s.length>0?"/"+s:"/":s.length>0?s:"."},normalize:function(e){if(n(e),0===e.length)return".";var t=47===e.charCodeAt(0),s=47===e.charCodeAt(e.length-1);return 0!==(e=i(e,!t)).length||t||(e="."),e.length>0&&s&&(e+="/"),t?"/"+e:e},isAbsolute:function(e){return n(e),e.length>0&&47===e.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var e,t=0;t<arguments.length;++t){var i=arguments[t];n(i),i.length>0&&(void 0===e?e=i:e+="/"+i)}return void 0===e?".":s.normalize(e)},relative:function(e,t){if(n(e),n(t),e===t)return"";if((e=s.resolve(e))===(t=s.resolve(t)))return"";for(var i=1;i<e.length&&47===e.charCodeAt(i);++i);for(var r=e.length,a=r-i,o=1;o<t.length&&47===t.charCodeAt(o);++o);for(var c=t.length-o,l=a<c?a:c,p=-1,u=0;u<=l;++u){if(u===l){if(c>l){if(47===t.charCodeAt(o+u))return t.slice(o+u+1);if(0===u)return t.slice(o+u)}else a>l&&(47===e.charCodeAt(i+u)?p=u:0===u&&(p=0));break}var d=e.charCodeAt(i+u);if(d!==t.charCodeAt(o+u))break;47===d&&(p=u)}var h="";for(u=i+p+1;u<=r;++u)u!==r&&47!==e.charCodeAt(u)||(0===h.length?h+="..":h+="/..");return h.length>0?h+t.slice(o+p):(o+=p,47===t.charCodeAt(o)&&++o,t.slice(o))},_makeLong:function(e){return e},dirname:function(e){if(n(e),0===e.length)return".";for(var t=e.charCodeAt(0),i=47===t,s=-1,r=!0,a=e.length-1;a>=1;--a)if(47===(t=e.charCodeAt(a))){if(!r){s=a;break}}else r=!1;return-1===s?i?"/":".":i&&1===s?"//":e.slice(0,s)},basename:function(e,t){if(void 0!==t&&"string"!=typeof t)throw new TypeError('"ext" argument must be a string');n(e);var i,s=0,r=-1,a=!0;if(void 0!==t&&t.length>0&&t.length<=e.length){if(t.length===e.length&&t===e)return"";var o=t.length-1,c=-1;for(i=e.length-1;i>=0;--i){var l=e.charCodeAt(i);if(47===l){if(!a){s=i+1;break}}else-1===c&&(a=!1,c=i+1),o>=0&&(l===t.charCodeAt(o)?-1==--o&&(r=i):(o=-1,r=c))}return s===r?r=c:-1===r&&(r=e.length),e.slice(s,r)}for(i=e.length-1;i>=0;--i)if(47===e.charCodeAt(i)){if(!a){s=i+1;break}}else-1===r&&(a=!1,r=i+1);return-1===r?"":e.slice(s,r)},extname:function(e){n(e);for(var t=-1,i=0,s=-1,r=!0,a=0,o=e.length-1;o>=0;--o){var c=e.charCodeAt(o);if(47!==c)-1===s&&(r=!1,s=o+1),46===c?-1===t?t=o:1!==a&&(a=1):-1!==t&&(a=-1);else if(!r){i=o+1;break}}return-1===t||-1===s||0===a||1===a&&t===s-1&&t===i+1?"":e.slice(t,s)},format:function(e){if(null===e||"object"!=typeof e)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return function(e,t){var n=t.dir||t.root,i=t.base||(t.name||"")+(t.ext||"");return n?n===t.root?n+i:n+e+i:i}("/",e)},parse:function(e){n(e);var t={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return t;var i,s=e.charCodeAt(0),r=47===s;r?(t.root="/",i=1):i=0;for(var a=-1,o=0,c=-1,l=!0,p=e.length-1,u=0;p>=i;--p)if(47!==(s=e.charCodeAt(p)))-1===c&&(l=!1,c=p+1),46===s?-1===a?a=p:1!==u&&(u=1):-1!==a&&(u=-1);else if(!l){o=p+1;break}return-1===a||-1===c||0===u||1===u&&a===c-1&&a===o+1?-1!==c&&(t.base=t.name=0===o&&r?e.slice(1,c):e.slice(o,c)):(0===o&&r?(t.name=e.slice(1,a),t.base=e.slice(1,c)):(t.name=e.slice(o,a),t.base=e.slice(o,c)),t.ext=e.slice(a,c)),o>0?t.dir=e.slice(0,o-1):r&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};s.posix=s,t.exports=s}).call(this)}).call(this,e("_process"))},{_process:186}],185:[function(e,t,n){t.exports=function(e){return Math.max(16384,1<<Math.log2(e<1024?1:e/1024)+.5|0)}},{}],186:[function(e,t,n){var i,s,r=t.exports={};function a(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function c(e){if(i===setTimeout)return setTimeout(e,0);if((i===a||!i)&&setTimeout)return i=setTimeout,setTimeout(e,0);try{return i(e,0)}catch(t){try{return i.call(null,e,0)}catch(t){return i.call(this,e,0)}}}!function(){try{i="function"==typeof setTimeout?setTimeout:a}catch(e){i=a}try{s="function"==typeof clearTimeout?clearTimeout:o}catch(e){s=o}}();var l,p=[],u=!1,d=-1;function h(){u&&l&&(u=!1,l.length?p=l.concat(p):d=-1,p.length&&f())}function f(){if(!u){var e=c(h);u=!0;for(var t=p.length;t;){for(l=p,p=[];++d<t;)l&&l[d].run();d=-1,t=p.length}l=null,u=!1,function(e){if(s===clearTimeout)return clearTimeout(e);if((s===o||!s)&&clearTimeout)return s=clearTimeout,clearTimeout(e);try{s(e)}catch(t){try{return s.call(null,e)}catch(t){return s.call(this,e)}}}(e)}}function m(e,t){this.fun=e,this.array=t}function g(){}r.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];p.push(new m(e,t)),1!==p.length||u||c(f)},m.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={},r.on=g,r.addListener=g,r.once=g,r.off=g,r.removeListener=g,r.removeAllListeners=g,r.emit=g,r.prependListener=g,r.prependOnceListener=g,r.listeners=function(e){return[]},r.binding=function(e){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(e){throw new Error("process.chdir is not supported")},r.umask=function(){return 0}},{}],187:[function(e,t,n){(function(n){(function(){var i=e("once"),s=e("end-of-stream"),r=e("fs"),a=function(){},o=/^v?\.0/.test(n.version),c=function(e){return"function"==typeof e},l=function(e,t,n,l){l=i(l);var p=!1;e.on("close",(function(){p=!0})),s(e,{readable:t,writable:n},(function(e){if(e)return l(e);p=!0,l()}));var u=!1;return function(t){if(!p&&!u)return u=!0,function(e){return!!o&&!!r&&(e instanceof(r.ReadStream||a)||e instanceof(r.WriteStream||a))&&c(e.close)}(e)?e.close(a):function(e){return e.setHeader&&c(e.abort)}(e)?e.abort():c(e.destroy)?e.destroy():void l(t||new Error("stream was destroyed"))}},p=function(e){e()},u=function(e,t){return e.pipe(t)};t.exports=function(){var e,t=Array.prototype.slice.call(arguments),n=c(t[t.length-1]||a)&&t.pop()||a;if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new Error("pump requires two streams per minimum");var i=t.map((function(s,r){var a=r<t.length-1;return l(s,a,r>0,(function(t){e||(e=t),t&&i.forEach(p),a||(i.forEach(p),n(e))}))}));return t.reduce(u)}}).call(this)}).call(this,e("_process"))},{_process:186,"end-of-stream":95,fs:54,once:182}],188:[function(e,t,n){(function(e){(function(){!function(i){var s="object"==typeof n&&n&&!n.nodeType&&n,r="object"==typeof t&&t&&!t.nodeType&&t,a="object"==typeof e&&e;a.global!==a&&a.window!==a&&a.self!==a||(i=a);var o,c,l=2147483647,p=36,u=/^xn--/,d=/[^\x20-\x7E]/,h=/[\x2E\u3002\uFF0E\uFF61]/g,f={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},m=Math.floor,g=String.fromCharCode;function v(e){throw new RangeError(f[e])}function b(e,t){for(var n=e.length,i=[];n--;)i[n]=t(e[n]);return i}function x(e,t){var n=e.split("@"),i="";return n.length>1&&(i=n[0]+"@",e=n[1]),i+b((e=e.replace(h,".")).split("."),t).join(".")}function _(e){for(var t,n,i=[],s=0,r=e.length;s<r;)(t=e.charCodeAt(s++))>=55296&&t<=56319&&s<r?56320==(64512&(n=e.charCodeAt(s++)))?i.push(((1023&t)<<10)+(1023&n)+65536):(i.push(t),s--):i.push(t);return i}function y(e){return b(e,(function(e){var t="";return e>65535&&(t+=g((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+=g(e)})).join("")}function w(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function k(e,t,n){var i=0;for(e=n?m(e/700):e>>1,e+=m(e/t);e>455;i+=p)e=m(e/35);return m(i+36*e/(e+38))}function E(e){var t,n,i,s,r,a,o,c,u,d,h,f=[],g=e.length,b=0,x=128,_=72;for((n=e.lastIndexOf("-"))<0&&(n=0),i=0;i<n;++i)e.charCodeAt(i)>=128&&v("not-basic"),f.push(e.charCodeAt(i));for(s=n>0?n+1:0;s<g;){for(r=b,a=1,o=p;s>=g&&v("invalid-input"),((c=(h=e.charCodeAt(s++))-48<10?h-22:h-65<26?h-65:h-97<26?h-97:p)>=p||c>m((l-b)/a))&&v("overflow"),b+=c*a,!(c<(u=o<=_?1:o>=_+26?26:o-_));o+=p)a>m(l/(d=p-u))&&v("overflow"),a*=d;_=k(b-r,t=f.length+1,0==r),m(b/t)>l-x&&v("overflow"),x+=m(b/t),b%=t,f.splice(b++,0,x)}return y(f)}function S(e){var t,n,i,s,r,a,o,c,u,d,h,f,b,x,y,E=[];for(f=(e=_(e)).length,t=128,n=0,r=72,a=0;a<f;++a)(h=e[a])<128&&E.push(g(h));for(i=s=E.length,s&&E.push("-");i<f;){for(o=l,a=0;a<f;++a)(h=e[a])>=t&&h<o&&(o=h);for(o-t>m((l-n)/(b=i+1))&&v("overflow"),n+=(o-t)*b,t=o,a=0;a<f;++a)if((h=e[a])<t&&++n>l&&v("overflow"),h==t){for(c=n,u=p;!(c<(d=u<=r?1:u>=r+26?26:u-r));u+=p)y=c-d,x=p-d,E.push(g(w(d+y%x,0))),c=m(y/x);E.push(g(w(c,0))),r=k(n,b,i==s),n=0,++i}++n,++t}return E.join("")}if(o={version:"1.4.1",ucs2:{decode:_,encode:y},decode:E,encode:S,toASCII:function(e){return x(e,(function(e){return d.test(e)?"xn--"+S(e):e}))},toUnicode:function(e){return x(e,(function(e){return u.test(e)?E(e.slice(4).toLowerCase()):e}))}},"function"==typeof define&&"object"==typeof define.amd&&define.amd)define("punycode",(function(){return o}));else if(s&&r)if(t.exports==s)r.exports=o;else for(c in o)o.hasOwnProperty(c)&&(s[c]=o[c]);else i.punycode=o}(this)}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],189:[function(e,t,n){"use strict";function i(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.exports=function(e,t,n,r){t=t||"&",n=n||"=";var a={};if("string"!=typeof e||0===e.length)return a;var o=/\+/g;e=e.split(t);var c=1e3;r&&"number"==typeof r.maxKeys&&(c=r.maxKeys);var l=e.length;c>0&&l>c&&(l=c);for(var p=0;p<l;++p){var u,d,h,f,m=e[p].replace(o,"%20"),g=m.indexOf(n);g>=0?(u=m.substr(0,g),d=m.substr(g+1)):(u=m,d=""),h=decodeURIComponent(u),f=decodeURIComponent(d),i(a,h)?s(a[h])?a[h].push(f):a[h]=[a[h],f]:a[h]=f}return a};var s=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},{}],190:[function(e,t,n){"use strict";var i=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};t.exports=function(e,t,n,o){return t=t||"&",n=n||"=",null===e&&(e=void 0),"object"==typeof e?r(a(e),(function(a){var o=encodeURIComponent(i(a))+n;return s(e[a])?r(e[a],(function(e){return o+encodeURIComponent(i(e))})).join(t):o+encodeURIComponent(i(e[a]))})).join(t):o?encodeURIComponent(i(o))+n+encodeURIComponent(i(e)):""};var s=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function r(e,t){if(e.map)return e.map(t);for(var n=[],i=0;i<e.length;i++)n.push(t(e[i],i));return n}var a=Object.keys||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t}},{}],191:[function(e,t,n){"use strict";n.decode=n.parse=e("./decode"),n.encode=n.stringify=e("./encode")},{"./decode":189,"./encode":190}],192:[function(e,t,n){
|
||
/*! queue-microtask. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
||
let i;t.exports="function"==typeof queueMicrotask?queueMicrotask.bind(globalThis):e=>(i||(i=Promise.resolve())).then(e).catch((e=>setTimeout((()=>{throw e}),0)))},{}],193:[function(e,t,n){t.exports=function(e){var t=0;return function(){if(t===e.length)return null;var n=e.length-t,i=Math.random()*n|0,s=e[t+i],r=e[t];return e[t]=s,e[t+i]=r,t++,s}}},{}],194:[function(e,t,n){(function(n,i){(function(){"use strict";var s=65536,r=4294967295;var a=e("safe-buffer").Buffer,o=i.crypto||i.msCrypto;o&&o.getRandomValues?t.exports=function(e,t){if(e>r)throw new RangeError("requested too many random bytes");var i=a.allocUnsafe(e);if(e>0)if(e>s)for(var c=0;c<e;c+=s)o.getRandomValues(i.slice(c,c+s));else o.getRandomValues(i);if("function"==typeof t)return n.nextTick((function(){t(null,i)}));return i}:t.exports=function(){throw new Error("Secure random number generation is not supported by this browser.\nUse Chrome, Firefox or Internet Explorer 11")}}).call(this)}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{_process:186,"safe-buffer":219}],195:[function(e,t,n){const{Writable:i,PassThrough:s}=e("readable-stream");t.exports=class extends i{constructor(e,t={}){super(t),this.destroyed=!1,this._queue=[],this._position=e||0,this._cb=null,this._buffer=null,this._out=null}_write(e,t,n){let i=!0;for(;;){if(this.destroyed)return;if(0===this._queue.length)return this._buffer=e,void(this._cb=n);this._buffer=null;var s=this._queue[0];const t=Math.max(s.start-this._position,0),r=s.end-this._position;if(t>=e.length)return this._position+=e.length,n(null);let a;if(r>e.length){this._position+=e.length,a=0===t?e:e.slice(t),i=s.stream.write(a)&&i;break}this._position+=r,a=0===t&&r===e.length?e:e.slice(t,r),i=s.stream.write(a)&&i,s.last&&s.stream.end(),e=e.slice(r),this._queue.shift()}i?n(null):s.stream.once("drain",n.bind(null,null))}slice(e){if(this.destroyed)return null;Array.isArray(e)||(e=[e]);const t=new s;return e.forEach(((n,i)=>{this._queue.push({start:n.start,end:n.end,stream:t,last:i===e.length-1})})),this._buffer&&this._write(this._buffer,null,this._cb),t}destroy(e){this.destroyed||(this.destroyed=!0,e&&this.emit("error",e))}}},{"readable-stream":210}],196:[function(e,t,n){arguments[4][15][0].apply(n,arguments)},{dup:15}],197:[function(e,t,n){arguments[4][16][0].apply(n,arguments)},{"./_stream_readable":199,"./_stream_writable":201,_process:186,dup:16,inherits:118}],198:[function(e,t,n){arguments[4][17][0].apply(n,arguments)},{"./_stream_transform":200,dup:17,inherits:118}],199:[function(e,t,n){arguments[4][18][0].apply(n,arguments)},{"../errors":196,"./_stream_duplex":197,"./internal/streams/async_iterator":202,"./internal/streams/buffer_list":203,"./internal/streams/destroy":204,"./internal/streams/from":206,"./internal/streams/state":208,"./internal/streams/stream":209,_process:186,buffer:59,dup:18,events:97,inherits:118,"string_decoder/":285,util:54}],200:[function(e,t,n){arguments[4][19][0].apply(n,arguments)},{"../errors":196,"./_stream_duplex":197,dup:19,inherits:118}],201:[function(e,t,n){arguments[4][20][0].apply(n,arguments)},{"../errors":196,"./_stream_duplex":197,"./internal/streams/destroy":204,"./internal/streams/state":208,"./internal/streams/stream":209,_process:186,buffer:59,dup:20,inherits:118,"util-deprecate":304}],202:[function(e,t,n){arguments[4][21][0].apply(n,arguments)},{"./end-of-stream":205,_process:186,dup:21}],203:[function(e,t,n){arguments[4][22][0].apply(n,arguments)},{buffer:59,dup:22,util:54}],204:[function(e,t,n){arguments[4][23][0].apply(n,arguments)},{_process:186,dup:23}],205:[function(e,t,n){arguments[4][24][0].apply(n,arguments)},{"../../../errors":196,dup:24}],206:[function(e,t,n){arguments[4][25][0].apply(n,arguments)},{dup:25}],207:[function(e,t,n){arguments[4][26][0].apply(n,arguments)},{"../../../errors":196,"./end-of-stream":205,dup:26}],208:[function(e,t,n){arguments[4][27][0].apply(n,arguments)},{"../../../errors":196,dup:27}],209:[function(e,t,n){arguments[4][28][0].apply(n,arguments)},{dup:28,events:97}],210:[function(e,t,n){arguments[4][29][0].apply(n,arguments)},{"./lib/_stream_duplex.js":197,"./lib/_stream_passthrough.js":198,"./lib/_stream_readable.js":199,"./lib/_stream_transform.js":200,"./lib/_stream_writable.js":201,"./lib/internal/streams/end-of-stream.js":205,"./lib/internal/streams/pipeline.js":207,dup:29}],211:[function(e,t,n){
|
||
/*! render-media. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
||
n.render=function(e,t,n,i){"function"==typeof n&&(i=n,n={});n||(n={});i||(i=function(){});x(e),_(n),"string"==typeof t&&(t=document.querySelector(t));v(e,(function(i){if(t.nodeName!==i.toUpperCase()){var s=a.extname(e.name).toLowerCase();throw new Error('Cannot render "'+s+'" inside a "'+t.nodeName.toLowerCase()+'" element, expected "'+i+'"')}return"video"!==i&&"audio"!==i||y(t,n),t}),n,i)},n.append=function(e,t,n,i){"function"==typeof n&&(i=n,n={});n||(n={});i||(i=function(){});x(e),_(n),"string"==typeof t&&(t=document.querySelector(t));if(t&&("VIDEO"===t.nodeName||"AUDIO"===t.nodeName))throw new Error("Invalid video/audio node argument. Argument must be root element that video/audio tag will be appended to.");function s(e){var n=document.createElement(e);return t.appendChild(n),n}v(e,(function(e){return"video"===e||"audio"===e?function(e){var i=s(e);return y(i,n),t.appendChild(i),i}(e):s(e)}),n,(function(e,t){e&&t&&t.remove(),i(e,t)}))},n.mime=e("./lib/mime.json");var i=e("debug")("render-media"),s=e("is-ascii"),r=e("mediasource"),a=e("path"),o=e("stream-to-blob-url"),c=e("videostream"),l=[".m4a",".m4b",".m4p",".m4v",".mp4"],p=[".m4v",".mkv",".mp4",".webm"],u=[].concat(p,[".m4a",".m4b",".m4p",".mp3"]),d=[".mov",".ogv"],h=[".aac",".oga",".ogg",".wav",".flac"],f=[".bmp",".gif",".jpeg",".jpg",".png",".svg"],m=[".css",".html",".js",".md",".pdf",".srt",".txt"],g="undefined"!=typeof window&&window.MediaSource;function v(e,t,n,o){var v,x=a.extname(e.name).toLowerCase(),_=0;function y(){return!("number"==typeof e.length&&e.length>n.maxBlobLength)||(i("File length too large for Blob URL approach: %d (max: %d)",e.length,n.maxBlobLength),C(new Error("File length too large for Blob URL approach: "+e.length+" (max: "+n.maxBlobLength+")")),!1)}function w(n){y()&&(v=t(n),b(e,(function(e,t){if(e)return C(e);v.addEventListener("error",C),v.addEventListener("loadstart",k),v.addEventListener("canplay",E),v.src=t})))}function k(){v.removeEventListener("loadstart",k),n.autoplay&&v.play()}function E(){v.removeEventListener("canplay",E),o(null,v)}function S(){b(e,(function(e,n){if(e)return C(e);".pdf"!==x?((v=t("iframe")).sandbox="allow-forms allow-scripts",v.src=n):((v=t("object")).setAttribute("typemustmatch",!0),v.setAttribute("type","application/pdf"),v.setAttribute("data",n)),o(null,v)}))}function C(t){t.message='Error rendering file "'+e.name+'": '+t.message,i(t.message),o(t)}u.indexOf(x)>=0?function(){var n=p.indexOf(x)>=0?"video":"audio";g?l.indexOf(x)>=0?s():o():u();function s(){i("Use `videostream` package for "+e.name),f(),v.addEventListener("error",d),v.addEventListener("loadstart",k),v.addEventListener("canplay",E),new c(e,v)}function o(){i("Use MediaSource API for "+e.name),f(),v.addEventListener("error",h),v.addEventListener("loadstart",k),v.addEventListener("canplay",E);var t,n=new r(v).createWriteStream((t=e.name,{".m4a":'audio/mp4; codecs="mp4a.40.5"',".m4b":'audio/mp4; codecs="mp4a.40.5"',".m4p":'audio/mp4; codecs="mp4a.40.5"',".m4v":'video/mp4; codecs="avc1.640029, mp4a.40.5"',".mkv":'video/webm; codecs="avc1.640029, mp4a.40.5"',".mp3":"audio/mpeg",".mp4":'video/mp4; codecs="avc1.640029, mp4a.40.5"',".webm":'video/webm; codecs="vorbis, vp8"'}[a.extname(t).toLowerCase()]));e.createReadStream().pipe(n),_&&(v.currentTime=_)}function u(){i("Use Blob URL for "+e.name),f(),v.addEventListener("error",C),v.addEventListener("loadstart",k),v.addEventListener("canplay",E),b(e,(function(e,t){if(e)return C(e);v.src=t,_&&(v.currentTime=_)}))}function d(e){i("videostream error: fallback to MediaSource API: %o",e.message||e),v.removeEventListener("error",d),v.removeEventListener("canplay",E),o()}function h(e){i("MediaSource API error: fallback to Blob URL: %o",e.message||e),y()&&(v.removeEventListener("error",h),v.removeEventListener("canplay",E),u())}function f(){v||(v=t(n)).addEventListener("progress",(function(){_=v.currentTime}))}}():d.indexOf(x)>=0?w("video"):h.indexOf(x)>=0?w("audio"):f.indexOf(x)>=0?(v=t("img"),b(e,(function(t,n){if(t)return C(t);v.src=n,v.alt=e.name,o(null,v)}))):m.indexOf(x)>=0?S():function(){i('Unknown file extension "%s" - will attempt to render into iframe',x);var t="";function n(){s(t)?(i('File extension "%s" appears ascii, so will render.',x),S()):(i('File extension "%s" appears non-ascii, will not render.',x),o(new Error('Unsupported file type "'+x+'": Cannot append to DOM')))}e.createReadStream({start:0,end:1e3}).setEncoding("utf8").on("data",(function(e){t+=e})).on("end",n).on("error",o)}()}function b(e,t){var i=a.extname(e.name).toLowerCase();o(e.createReadStream(),n.mime[i]).then((e=>t(null,e)),(e=>t(e)))}function x(e){if(null==e)throw new Error("file cannot be null or undefined");if("string"!=typeof e.name)throw new Error("missing or invalid file.name property");if("function"!=typeof e.createReadStream)throw new Error("missing or invalid file.createReadStream property")}function _(e){null==e.autoplay&&(e.autoplay=!1),null==e.muted&&(e.muted=!1),null==e.controls&&(e.controls=!0),null==e.maxBlobLength&&(e.maxBlobLength=2e8)}function y(e,t){e.autoplay=!!t.autoplay,e.muted=!!t.muted,e.controls=!!t.controls}},{"./lib/mime.json":212,debug:213,"is-ascii":119,mediasource:124,path:184,"stream-to-blob-url":282,videostream:306}],212:[function(e,t,n){t.exports={".3gp":"video/3gpp",".aac":"audio/aac",".aif":"audio/x-aiff",".aiff":"audio/x-aiff",".atom":"application/atom+xml",".avi":"video/x-msvideo",".bmp":"image/bmp",".bz2":"application/x-bzip2",".conf":"text/plain",".css":"text/css",".csv":"text/plain",".diff":"text/x-diff",".doc":"application/msword",".flv":"video/x-flv",".gif":"image/gif",".gz":"application/x-gzip",".htm":"text/html",".html":"text/html",".ico":"image/vnd.microsoft.icon",".ics":"text/calendar",".iso":"application/octet-stream",".jar":"application/java-archive",".jpeg":"image/jpeg",".jpg":"image/jpeg",".js":"application/javascript",".json":"application/json",".less":"text/css",".log":"text/plain",".m3u":"audio/x-mpegurl",".m4a":"audio/x-m4a",".m4b":"audio/mp4",".m4p":"audio/mp4",".m4v":"video/x-m4v",".manifest":"text/cache-manifest",".markdown":"text/x-markdown",".mathml":"application/mathml+xml",".md":"text/x-markdown",".mid":"audio/midi",".midi":"audio/midi",".mov":"video/quicktime",".mp3":"audio/mpeg",".mp4":"video/mp4",".mp4v":"video/mp4",".mpeg":"video/mpeg",".mpg":"video/mpeg",".odp":"application/vnd.oasis.opendocument.presentation",".ods":"application/vnd.oasis.opendocument.spreadsheet",".odt":"application/vnd.oasis.opendocument.text",".oga":"audio/ogg",".ogg":"application/ogg",".pdf":"application/pdf",".png":"image/png",".pps":"application/vnd.ms-powerpoint",".ppt":"application/vnd.ms-powerpoint",".ps":"application/postscript",".psd":"image/vnd.adobe.photoshop",".qt":"video/quicktime",".rar":"application/x-rar-compressed",".rdf":"application/rdf+xml",".rss":"application/rss+xml",".rtf":"application/rtf",".svg":"image/svg+xml",".svgz":"image/svg+xml",".swf":"application/x-shockwave-flash",".tar":"application/x-tar",".tbz":"application/x-bzip-compressed-tar",".text":"text/plain",".tif":"image/tiff",".tiff":"image/tiff",".torrent":"application/x-bittorrent",".ttf":"application/x-font-ttf",".txt":"text/plain",".wav":"audio/wav",".webm":"video/webm",".wma":"audio/x-ms-wma",".wmv":"video/x-ms-wmv",".xls":"application/vnd.ms-excel",".xml":"application/xml",".yaml":"text/yaml",".yml":"text/yaml",".zip":"application/zip"}},{}],213:[function(e,t,n){arguments[4][12][0].apply(n,arguments)},{"./common":214,_process:186,dup:12}],214:[function(e,t,n){arguments[4][13][0].apply(n,arguments)},{dup:13,ms:215}],215:[function(e,t,n){arguments[4][14][0].apply(n,arguments)},{dup:14}],216:[function(e,t,n){(function(e){(function(){
|
||
/*! run-parallel-limit. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
||
t.exports=function(t,n,i){if("number"!=typeof n)throw new Error("second argument must be a Number");var s,r,a,o,c,l=!0;Array.isArray(t)?(s=[],a=r=t.length):(o=Object.keys(t),s={},a=r=o.length);function p(t){function n(){i&&i(t,s),i=null}l?e.nextTick(n):n()}function u(e,n,i){if(s[e]=i,n&&(c=!0),0==--a||n)p(n);else if(!c&&d<r){var l;o?(l=o[d],d+=1,t[l]((function(e,t){u(l,e,t)}))):(l=d,d+=1,t[l]((function(e,t){u(l,e,t)})))}}var d=n;a?o?o.some((function(e,i){if(t[e]((function(t,n){u(e,t,n)})),i===n-1)return!0})):t.some((function(e,t){if(e((function(e,n){u(t,e,n)})),t===n-1)return!0})):p(null);l=!1}}).call(this)}).call(this,e("_process"))},{_process:186}],217:[function(e,t,n){(function(e){(function(){
|
||
/*! run-parallel. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
||
t.exports=function(t,n){var i,s,r,a=!0;Array.isArray(t)?(i=[],s=t.length):(r=Object.keys(t),i={},s=r.length);function o(t){function s(){n&&n(t,i),n=null}a?e.nextTick(s):s()}function c(e,t,n){i[e]=n,(0==--s||t)&&o(t)}s?r?r.forEach((function(e){t[e]((function(t,n){c(e,t,n)}))})):t.forEach((function(e,t){e((function(e,n){c(t,e,n)}))})):o(null);a=!1}}).call(this)}).call(this,e("_process"))},{_process:186}],218:[function(e,t,n){var i,s;i="undefined"!=typeof self?self:this,s=function(){return function(e){var t={};function n(i){if(t[i])return t[i].exports;var s=t[i]={i:i,l:!1,exports:{}};return e[i].call(s.exports,s,s.exports,n),s.l=!0,s.exports}return n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:i})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=3)}([function(e,t,n){var i=n(5),s=n(1),r=s.toHex,a=s.ceilHeapSize,o=n(6),c=function(e){for(e+=9;e%64>0;e+=1);return e},l=function(e,t){var n=new Int32Array(e,t+320,5),i=new Int32Array(5),s=new DataView(i.buffer);return s.setInt32(0,n[0],!1),s.setInt32(4,n[1],!1),s.setInt32(8,n[2],!1),s.setInt32(12,n[3],!1),s.setInt32(16,n[4],!1),i},p=function(){function e(t){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),(t=t||65536)%64>0)throw new Error("Chunk size must be a multiple of 128 bit");this._offset=0,this._maxChunkLen=t,this._padMaxChunkLen=c(t),this._heap=new ArrayBuffer(a(this._padMaxChunkLen+320+20)),this._h32=new Int32Array(this._heap),this._h8=new Int8Array(this._heap),this._core=new i({Int32Array:Int32Array},{},this._heap)}return e.prototype._initState=function(e,t){this._offset=0;var n=new Int32Array(e,t+320,5);n[0]=1732584193,n[1]=-271733879,n[2]=-1732584194,n[3]=271733878,n[4]=-1009589776},e.prototype._padChunk=function(e,t){var n=c(e),i=new Int32Array(this._heap,0,n>>2);return function(e,t){var n=new Uint8Array(e.buffer),i=t%4,s=t-i;switch(i){case 0:n[s+3]=0;case 1:n[s+2]=0;case 2:n[s+1]=0;case 3:n[s+0]=0}for(var r=1+(t>>2);r<e.length;r++)e[r]=0}(i,e),function(e,t,n){e[t>>2]|=128<<24-(t%4<<3),e[14+(2+(t>>2)&-16)]=n/(1<<29)|0,e[15+(2+(t>>2)&-16)]=n<<3}(i,e,t),n},e.prototype._write=function(e,t,n,i){o(e,this._h8,this._h32,t,n,i||0)},e.prototype._coreCall=function(e,t,n,i,s){var r=n;this._write(e,t,n),s&&(r=this._padChunk(n,i)),this._core.hash(r,this._padMaxChunkLen)},e.prototype.rawDigest=function(e){var t=e.byteLength||e.length||e.size||0;this._initState(this._heap,this._padMaxChunkLen);var n=0,i=this._maxChunkLen;for(n=0;t>n+i;n+=i)this._coreCall(e,n,i,t,!1);return this._coreCall(e,n,t-n,t,!0),l(this._heap,this._padMaxChunkLen)},e.prototype.digest=function(e){return r(this.rawDigest(e).buffer)},e.prototype.digestFromString=function(e){return this.digest(e)},e.prototype.digestFromBuffer=function(e){return this.digest(e)},e.prototype.digestFromArrayBuffer=function(e){return this.digest(e)},e.prototype.resetState=function(){return this._initState(this._heap,this._padMaxChunkLen),this},e.prototype.append=function(e){var t=0,n=e.byteLength||e.length||e.size||0,i=this._offset%this._maxChunkLen,s=void 0;for(this._offset+=n;t<n;)s=Math.min(n-t,this._maxChunkLen-i),this._write(e,t,s,i),t+=s,(i+=s)===this._maxChunkLen&&(this._core.hash(this._maxChunkLen,this._padMaxChunkLen),i=0);return this},e.prototype.getState=function(){var e=void 0;if(this._offset%this._maxChunkLen)e=this._heap.slice(0);else{var t=new Int32Array(this._heap,this._padMaxChunkLen+320,5);e=t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength)}return{offset:this._offset,heap:e}},e.prototype.setState=function(e){return this._offset=e.offset,20===e.heap.byteLength?new Int32Array(this._heap,this._padMaxChunkLen+320,5).set(new Int32Array(e.heap)):this._h32.set(new Int32Array(e.heap)),this},e.prototype.rawEnd=function(){var e=this._offset,t=e%this._maxChunkLen,n=this._padChunk(t,e);this._core.hash(n,this._padMaxChunkLen);var i=l(this._heap,this._padMaxChunkLen);return this._initState(this._heap,this._padMaxChunkLen),i},e.prototype.end=function(){return r(this.rawEnd().buffer)},e}();e.exports=p,e.exports._core=i},function(e,t){for(var n=new Array(256),i=0;i<256;i++)n[i]=(i<16?"0":"")+i.toString(16);e.exports.toHex=function(e){for(var t=new Uint8Array(e),i=new Array(e.byteLength),s=0;s<i.length;s++)i[s]=n[t[s]];return i.join("")},e.exports.ceilHeapSize=function(e){var t=0;if(e<=65536)return 65536;if(e<16777216)for(t=1;t<e;t<<=1);else for(t=16777216;t<e;t+=16777216);return t},e.exports.isDedicatedWorkerScope=function(e){var t="WorkerGlobalScope"in e&&e instanceof e.WorkerGlobalScope,n="SharedWorkerGlobalScope"in e&&e instanceof e.SharedWorkerGlobalScope,i="ServiceWorkerGlobalScope"in e&&e instanceof e.ServiceWorkerGlobalScope;return t&&!n&&!i}},function(e,t,n){e.exports=function(){var e=n(0),t=function(e,n,i,s,r){var a=new self.FileReader;a.onloadend=function(){if(a.error)return r(a.error);var o=a.result;n+=a.result.byteLength;try{e.append(o)}catch(e){return void r(e)}n<s.size?t(e,n,i,s,r):r(null,e.end())},a.readAsArrayBuffer(s.slice(n,n+i))},i=!0;return self.onmessage=function(n){if(i){var s=n.data.data,r=n.data.file,a=n.data.id;if(void 0!==a&&(r||s)){var o=n.data.blockSize||4194304,c=new e(o);c.resetState();var l=function(e,t){e?self.postMessage({id:a,error:e.name}):self.postMessage({id:a,hash:t})};s&&function(e,t,n){try{n(null,e.digest(t))}catch(e){return n(e)}}(c,s,l),r&&t(c,0,o,r,l)}}},function(){i=!1}}},function(e,t,n){var i=n(4),s=n(0),r=n(7),a=n(2),o=n(1).isDedicatedWorkerScope,c="undefined"!=typeof self&&o(self);s.disableWorkerBehaviour=c?a():function(){},s.createWorker=function(){var e=i(2),t=e.terminate;return e.terminate=function(){URL.revokeObjectURL(e.objectURL),t.call(e)},e},s.createHash=r,e.exports=s},function(e,t,n){function i(e){var t={};function n(i){if(t[i])return t[i].exports;var s=t[i]={i:i,l:!1,exports:{}};return e[i].call(s.exports,s,s.exports,n),s.l=!0,s.exports}n.m=e,n.c=t,n.i=function(e){return e},n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:i})},n.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/",n.oe=function(e){throw console.error(e),e};var i=n(n.s=ENTRY_MODULE);return i.default||i}var s="[\\.|\\-|\\+|\\w|/|@]+",r="\\((/\\*.*?\\*/)?s?.*?([\\.|\\-|\\+|\\w|/|@]+).*?\\)";function a(e){return(e+"").replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}function o(e,t,i){var o={};o[i]=[];var c=t.toString(),l=c.match(/^function\s?\(\w+,\s*\w+,\s*(\w+)\)/);if(!l)return o;for(var p,u=l[1],d=new RegExp("(\\\\n|\\W)"+a(u)+r,"g");p=d.exec(c);)"dll-reference"!==p[3]&&o[i].push(p[3]);for(d=new RegExp("\\("+a(u)+'\\("(dll-reference\\s('+s+'))"\\)\\)'+r,"g");p=d.exec(c);)e[p[2]]||(o[i].push(p[1]),e[p[2]]=n(p[1]).m),o[p[2]]=o[p[2]]||[],o[p[2]].push(p[4]);return o}function c(e){return Object.keys(e).reduce((function(t,n){return t||e[n].length>0}),!1)}e.exports=function(e,t){t=t||{};var s={main:n.m},r=t.all?{main:Object.keys(s)}:function(e,t){for(var n={main:[t]},i={main:[]},s={main:{}};c(n);)for(var r=Object.keys(n),a=0;a<r.length;a++){var l=r[a],p=n[l].pop();if(s[l]=s[l]||{},!s[l][p]&&e[l][p]){s[l][p]=!0,i[l]=i[l]||[],i[l].push(p);for(var u=o(e,e[l][p],l),d=Object.keys(u),h=0;h<d.length;h++)n[d[h]]=n[d[h]]||[],n[d[h]]=n[d[h]].concat(u[d[h]])}}return i}(s,e),a="";Object.keys(r).filter((function(e){return"main"!==e})).forEach((function(e){for(var t=0;r[e][t];)t++;r[e].push(t),s[e][t]="(function(module, exports, __webpack_require__) { module.exports = __webpack_require__; })",a=a+"var "+e+" = ("+i.toString().replace("ENTRY_MODULE",JSON.stringify(t))+")({"+r[e].map((function(t){return JSON.stringify(t)+": "+s[e][t].toString()})).join(",")+"});\n"})),a=a+"("+i.toString().replace("ENTRY_MODULE",JSON.stringify(e))+")({"+r.main.map((function(e){return JSON.stringify(e)+": "+s.main[e].toString()})).join(",")+"})(self);";var l=new window.Blob([a],{type:"text/javascript"});if(t.bare)return l;var p=(window.URL||window.webkitURL||window.mozURL||window.msURL).createObjectURL(l),u=new window.Worker(p);return u.objectURL=p,u}},function(e,t){e.exports=function(e,t,n){"use asm";var i=new e.Int32Array(n);function s(e,t){e=e|0;t=t|0;var n=0,s=0,r=0,a=0,o=0,c=0,l=0,p=0,u=0,d=0,h=0,f=0,m=0,g=0;r=i[t+320>>2]|0;o=i[t+324>>2]|0;l=i[t+328>>2]|0;u=i[t+332>>2]|0;h=i[t+336>>2]|0;for(n=0;(n|0)<(e|0);n=n+64|0){a=r;c=o;p=l;d=u;f=h;for(s=0;(s|0)<64;s=s+4|0){g=i[n+s>>2]|0;m=((r<<5|r>>>27)+(o&l|~o&u)|0)+((g+h|0)+1518500249|0)|0;h=u;u=l;l=o<<30|o>>>2;o=r;r=m;i[e+s>>2]=g}for(s=e+64|0;(s|0)<(e+80|0);s=s+4|0){g=(i[s-12>>2]^i[s-32>>2]^i[s-56>>2]^i[s-64>>2])<<1|(i[s-12>>2]^i[s-32>>2]^i[s-56>>2]^i[s-64>>2])>>>31;m=((r<<5|r>>>27)+(o&l|~o&u)|0)+((g+h|0)+1518500249|0)|0;h=u;u=l;l=o<<30|o>>>2;o=r;r=m;i[s>>2]=g}for(s=e+80|0;(s|0)<(e+160|0);s=s+4|0){g=(i[s-12>>2]^i[s-32>>2]^i[s-56>>2]^i[s-64>>2])<<1|(i[s-12>>2]^i[s-32>>2]^i[s-56>>2]^i[s-64>>2])>>>31;m=((r<<5|r>>>27)+(o^l^u)|0)+((g+h|0)+1859775393|0)|0;h=u;u=l;l=o<<30|o>>>2;o=r;r=m;i[s>>2]=g}for(s=e+160|0;(s|0)<(e+240|0);s=s+4|0){g=(i[s-12>>2]^i[s-32>>2]^i[s-56>>2]^i[s-64>>2])<<1|(i[s-12>>2]^i[s-32>>2]^i[s-56>>2]^i[s-64>>2])>>>31;m=((r<<5|r>>>27)+(o&l|o&u|l&u)|0)+((g+h|0)-1894007588|0)|0;h=u;u=l;l=o<<30|o>>>2;o=r;r=m;i[s>>2]=g}for(s=e+240|0;(s|0)<(e+320|0);s=s+4|0){g=(i[s-12>>2]^i[s-32>>2]^i[s-56>>2]^i[s-64>>2])<<1|(i[s-12>>2]^i[s-32>>2]^i[s-56>>2]^i[s-64>>2])>>>31;m=((r<<5|r>>>27)+(o^l^u)|0)+((g+h|0)-899497514|0)|0;h=u;u=l;l=o<<30|o>>>2;o=r;r=m;i[s>>2]=g}r=r+a|0;o=o+c|0;l=l+p|0;u=u+d|0;h=h+f|0}i[t+320>>2]=r;i[t+324>>2]=o;i[t+328>>2]=l;i[t+332>>2]=u;i[t+336>>2]=h}return{hash:s}}},function(e,t){var n=this,i=void 0;"undefined"!=typeof self&&void 0!==self.FileReaderSync&&(i=new self.FileReaderSync);var s=function(e,t,n,i,s,r){var a=void 0,o=r%4,c=(s+o)%4,l=s-c;switch(o){case 0:t[r]=e[i+3];case 1:t[r+1-(o<<1)|0]=e[i+2];case 2:t[r+2-(o<<1)|0]=e[i+1];case 3:t[r+3-(o<<1)|0]=e[i]}if(!(s<c+(4-o))){for(a=4-o;a<l;a=a+4|0)n[r+a>>2|0]=e[i+a]<<24|e[i+a+1]<<16|e[i+a+2]<<8|e[i+a+3];switch(c){case 3:t[r+l+1|0]=e[i+l+2];case 2:t[r+l+2|0]=e[i+l+1];case 1:t[r+l+3|0]=e[i+l]}}};e.exports=function(e,t,r,a,o,c){if("string"==typeof e)return function(e,t,n,i,s,r){var a=void 0,o=r%4,c=(s+o)%4,l=s-c;switch(o){case 0:t[r]=e.charCodeAt(i+3);case 1:t[r+1-(o<<1)|0]=e.charCodeAt(i+2);case 2:t[r+2-(o<<1)|0]=e.charCodeAt(i+1);case 3:t[r+3-(o<<1)|0]=e.charCodeAt(i)}if(!(s<c+(4-o))){for(a=4-o;a<l;a=a+4|0)n[r+a>>2]=e.charCodeAt(i+a)<<24|e.charCodeAt(i+a+1)<<16|e.charCodeAt(i+a+2)<<8|e.charCodeAt(i+a+3);switch(c){case 3:t[r+l+1|0]=e.charCodeAt(i+l+2);case 2:t[r+l+2|0]=e.charCodeAt(i+l+1);case 1:t[r+l+3|0]=e.charCodeAt(i+l)}}}(e,t,r,a,o,c);if(e instanceof Array)return s(e,t,r,a,o,c);if(n&&n.Buffer&&n.Buffer.isBuffer(e))return s(e,t,r,a,o,c);if(e instanceof ArrayBuffer)return s(new Uint8Array(e),t,r,a,o,c);if(e.buffer instanceof ArrayBuffer)return s(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),t,r,a,o,c);if(e instanceof Blob)return function(e,t,n,s,r,a){var o=void 0,c=a%4,l=(r+c)%4,p=r-l,u=new Uint8Array(i.readAsArrayBuffer(e.slice(s,s+r)));switch(c){case 0:t[a]=u[3];case 1:t[a+1-(c<<1)|0]=u[2];case 2:t[a+2-(c<<1)|0]=u[1];case 3:t[a+3-(c<<1)|0]=u[0]}if(!(r<l+(4-c))){for(o=4-c;o<p;o=o+4|0)n[a+o>>2|0]=u[o]<<24|u[o+1]<<16|u[o+2]<<8|u[o+3];switch(l){case 3:t[a+p+1|0]=u[p+2];case 2:t[a+p+2|0]=u[p+1];case 1:t[a+p+3|0]=u[p]}}}(e,t,r,a,o,c);throw new Error("Unsupported data type.")}},function(e,t,n){var i=n(0),s=n(1).toHex,r=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._rusha=new i,this._rusha.resetState()}return e.prototype.update=function(e){return this._rusha.append(e),this},e.prototype.digest=function(e){var t=this._rusha.rawEnd().buffer;if(!e)return t;if("hex"===e)return s(t);throw new Error("unsupported digest encoding")},e}();e.exports=function(){return new r}}])},"object"==typeof n&&"object"==typeof t?t.exports=s():"function"==typeof define&&define.amd?define([],s):"object"==typeof n?n.Rusha=s():i.Rusha=s()},{}],219:[function(e,t,n){
|
||
/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
||
var i=e("buffer"),s=i.Buffer;function r(e,t){for(var n in e)t[n]=e[n]}function a(e,t,n){return s(e,t,n)}s.from&&s.alloc&&s.allocUnsafe&&s.allocUnsafeSlow?t.exports=i:(r(i,n),n.Buffer=a),a.prototype=Object.create(s.prototype),r(s,a),a.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return s(e,t,n)},a.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var i=s(e);return void 0!==t?"string"==typeof n?i.fill(t,n):i.fill(t):i.fill(0),i},a.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return s(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i.SlowBuffer(e)}},{buffer:59}],220:[function(e,t,n){(function(e){(function(){
|
||
/*! simple-concat. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
||
t.exports=function(t,n){var i=[];t.on("data",(function(e){i.push(e)})),t.once("end",(function(){n&&n(null,e.concat(i)),n=null})),t.once("error",(function(e){n&&n(e),n=null}))}}).call(this)}).call(this,e("buffer").Buffer)},{buffer:59}],221:[function(e,t,n){(function(n){(function(){
|
||
/*! simple-get. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
||
t.exports=u;const i=e("simple-concat"),s=e("decompress-response"),r=e("http"),a=e("https"),o=e("once"),c=e("querystring"),l=e("url"),p=e=>null!==e&&"object"==typeof e&&"function"==typeof e.pipe;function u(e,t){if(e=Object.assign({maxRedirects:10},"string"==typeof e?{url:e}:e),t=o(t),e.url){const{hostname:t,port:n,protocol:i,auth:s,path:r}=l.parse(e.url);delete e.url,t||n||i||s?Object.assign(e,{hostname:t,port:n,protocol:i,auth:s,path:r}):e.path=r}const i={"accept-encoding":"gzip, deflate"};let d;e.headers&&Object.keys(e.headers).forEach((t=>i[t.toLowerCase()]=e.headers[t])),e.headers=i,e.body?d=e.json&&!p(e.body)?JSON.stringify(e.body):e.body:e.form&&(d="string"==typeof e.form?e.form:c.stringify(e.form),e.headers["content-type"]="application/x-www-form-urlencoded"),d&&(e.method||(e.method="POST"),p(d)||(e.headers["content-length"]=n.byteLength(d)),e.json&&!e.form&&(e.headers["content-type"]="application/json")),delete e.body,delete e.form,e.json&&(e.headers.accept="application/json"),e.method&&(e.method=e.method.toUpperCase());const h=("https:"===e.protocol?a:r).request(e,(n=>{if(!1!==e.followRedirects&&n.statusCode>=300&&n.statusCode<400&&n.headers.location)return e.url=n.headers.location,delete e.headers.host,n.resume(),"POST"===e.method&&[301,302].includes(n.statusCode)&&(e.method="GET",delete e.headers["content-length"],delete e.headers["content-type"]),0==e.maxRedirects--?t(new Error("too many redirects")):u(e,t);const i="function"==typeof s&&"HEAD"!==e.method;t(null,i?s(n):n)}));return h.on("timeout",(()=>{h.abort(),t(new Error("Request timed out"))})),h.on("error",t),p(d)?d.on("error",t).pipe(h):h.end(d),h}u.concat=(e,t)=>u(e,((n,s)=>{if(n)return t(n);i(s,((n,i)=>{if(n)return t(n);if(e.json)try{i=JSON.parse(i.toString())}catch(n){return t(n,s,i)}t(null,s,i)}))})),["get","post","put","patch","head","delete"].forEach((e=>{u[e]=(t,n)=>("string"==typeof t&&(t={url:t}),u(Object.assign({method:e.toUpperCase()},t),n))}))}).call(this)}).call(this,e("buffer").Buffer)},{buffer:59,"decompress-response":54,http:263,https:115,once:182,querystring:191,"simple-concat":220,url:297}],222:[function(e,t,n){(function(n){(function(){
|
||
/*! simple-peer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
||
var i=e("debug")("simple-peer"),s=e("get-browser-rtc"),r=e("randombytes"),a=e("readable-stream"),o=e("queue-microtask"),c=e("err-code"),l=65536;function p(e){return e.replace(/a=ice-options:trickle\s\n/g,"")}class u extends a.Duplex{constructor(e){if(super(e=Object.assign({allowHalfOpen:!1},e)),this._id=r(4).toString("hex").slice(0,7),this._debug("new peer %o",e),this.channelName=e.initiator?e.channelName||r(20).toString("hex"):null,this.initiator=e.initiator||!1,this.channelConfig=e.channelConfig||u.channelConfig,this.channelNegotiated=this.channelConfig.negotiated,this.config=Object.assign({},u.config,e.config),this.offerOptions=e.offerOptions||{},this.answerOptions=e.answerOptions||{},this.sdpTransform=e.sdpTransform||(e=>e),this.streams=e.streams||(e.stream?[e.stream]:[]),this.trickle=void 0===e.trickle||e.trickle,this.allowHalfTrickle=void 0!==e.allowHalfTrickle&&e.allowHalfTrickle,this.iceCompleteTimeout=e.iceCompleteTimeout||5e3,this.destroyed=!1,this._connected=!1,this.remoteAddress=void 0,this.remoteFamily=void 0,this.remotePort=void 0,this.localAddress=void 0,this.localFamily=void 0,this.localPort=void 0,this._wrtc=e.wrtc&&"object"==typeof e.wrtc?e.wrtc:s(),!this._wrtc)throw"undefined"==typeof window?c(new Error("No WebRTC support: Specify `opts.wrtc` option in this environment"),"ERR_WEBRTC_SUPPORT"):c(new Error("No WebRTC support: Not a supported browser"),"ERR_WEBRTC_SUPPORT");this._pcReady=!1,this._channelReady=!1,this._iceComplete=!1,this._iceCompleteTimer=null,this._channel=null,this._pendingCandidates=[],this._isNegotiating=!1,this._firstNegotiation=!0,this._batchedNegotiation=!1,this._queuedNegotiation=!1,this._sendersAwaitingStable=[],this._senderMap=new Map,this._closingInterval=null,this._remoteTracks=[],this._remoteStreams=[],this._chunk=null,this._cb=null,this._interval=null;try{this._pc=new this._wrtc.RTCPeerConnection(this.config)}catch(e){return void o((()=>this.destroy(c(e,"ERR_PC_CONSTRUCTOR"))))}this._isReactNativeWebrtc="number"==typeof this._pc._peerConnectionId,this._pc.oniceconnectionstatechange=()=>{this._onIceStateChange()},this._pc.onicegatheringstatechange=()=>{this._onIceStateChange()},this._pc.onconnectionstatechange=()=>{this._onConnectionStateChange()},this._pc.onsignalingstatechange=()=>{this._onSignalingStateChange()},this._pc.onicecandidate=e=>{this._onIceCandidate(e)},this.initiator||this.channelNegotiated?this._setupData({channel:this._pc.createDataChannel(this.channelName,this.channelConfig)}):this._pc.ondatachannel=e=>{this._setupData(e)},this.streams&&this.streams.forEach((e=>{this.addStream(e)})),this._pc.ontrack=e=>{this._onTrack(e)},this._debug("initial negotiation"),this._needsNegotiation(),this._onFinishBound=()=>{this._onFinish()},this.once("finish",this._onFinishBound)}get bufferSize(){return this._channel&&this._channel.bufferedAmount||0}get connected(){return this._connected&&"open"===this._channel.readyState}address(){return{port:this.localPort,family:this.localFamily,address:this.localAddress}}signal(e){if(this.destroyed)throw c(new Error("cannot signal after peer is destroyed"),"ERR_SIGNALING");if("string"==typeof e)try{e=JSON.parse(e)}catch(t){e={}}this._debug("signal()"),e.renegotiate&&this.initiator&&(this._debug("got request to renegotiate"),this._needsNegotiation()),e.transceiverRequest&&this.initiator&&(this._debug("got request for transceiver"),this.addTransceiver(e.transceiverRequest.kind,e.transceiverRequest.init)),e.candidate&&(this._pc.remoteDescription&&this._pc.remoteDescription.type?this._addIceCandidate(e.candidate):this._pendingCandidates.push(e.candidate)),e.sdp&&this._pc.setRemoteDescription(new this._wrtc.RTCSessionDescription(e)).then((()=>{this.destroyed||(this._pendingCandidates.forEach((e=>{this._addIceCandidate(e)})),this._pendingCandidates=[],"offer"===this._pc.remoteDescription.type&&this._createAnswer())})).catch((e=>{this.destroy(c(e,"ERR_SET_REMOTE_DESCRIPTION"))})),e.sdp||e.candidate||e.renegotiate||e.transceiverRequest||this.destroy(c(new Error("signal() called with invalid signal data"),"ERR_SIGNALING"))}_addIceCandidate(e){var t=new this._wrtc.RTCIceCandidate(e);this._pc.addIceCandidate(t).catch((e=>{var n;!t.address||t.address.endsWith(".local")?(n="Ignoring unsupported ICE candidate.",console.warn(n)):this.destroy(c(e,"ERR_ADD_ICE_CANDIDATE"))}))}send(e){this._channel.send(e)}addTransceiver(e,t){if(this._debug("addTransceiver()"),this.initiator)try{this._pc.addTransceiver(e,t),this._needsNegotiation()}catch(e){this.destroy(c(e,"ERR_ADD_TRANSCEIVER"))}else this.emit("signal",{transceiverRequest:{kind:e,init:t}})}addStream(e){this._debug("addStream()"),e.getTracks().forEach((t=>{this.addTrack(t,e)}))}addTrack(e,t){this._debug("addTrack()");var n=this._senderMap.get(e)||new Map,i=n.get(t);if(i)throw i.removed?c(new Error("Track has been removed. You should enable/disable tracks that you want to re-add."),"ERR_SENDER_REMOVED"):c(new Error("Track has already been added to that stream."),"ERR_SENDER_ALREADY_ADDED");i=this._pc.addTrack(e,t),n.set(t,i),this._senderMap.set(e,n),this._needsNegotiation()}replaceTrack(e,t,n){this._debug("replaceTrack()");var i=this._senderMap.get(e),s=i?i.get(n):null;if(!s)throw c(new Error("Cannot replace track that was never added."),"ERR_TRACK_NOT_ADDED");t&&this._senderMap.set(t,i),null!=s.replaceTrack?s.replaceTrack(t):this.destroy(c(new Error("replaceTrack is not supported in this browser"),"ERR_UNSUPPORTED_REPLACETRACK"))}removeTrack(e,t){this._debug("removeSender()");var n=this._senderMap.get(e),i=n?n.get(t):null;if(!i)throw c(new Error("Cannot remove track that was never added."),"ERR_TRACK_NOT_ADDED");try{i.removed=!0,this._pc.removeTrack(i)}catch(e){"NS_ERROR_UNEXPECTED"===e.name?this._sendersAwaitingStable.push(i):this.destroy(c(e,"ERR_REMOVE_TRACK"))}this._needsNegotiation()}removeStream(e){this._debug("removeSenders()"),e.getTracks().forEach((t=>{this.removeTrack(t,e)}))}_needsNegotiation(){this._debug("_needsNegotiation"),this._batchedNegotiation||(this._batchedNegotiation=!0,o((()=>{this._batchedNegotiation=!1,this.initiator||!this._firstNegotiation?(this._debug("starting batched negotiation"),this.negotiate()):this._debug("non-initiator initial negotiation request discarded"),this._firstNegotiation=!1})))}negotiate(){this.initiator?this._isNegotiating?(this._queuedNegotiation=!0,this._debug("already negotiating, queueing")):(this._debug("start negotiation"),setTimeout((()=>{this._createOffer()}),0)):this._isNegotiating?(this._queuedNegotiation=!0,this._debug("already negotiating, queueing")):(this._debug("requesting negotiation from initiator"),this.emit("signal",{renegotiate:!0})),this._isNegotiating=!0}destroy(e){this._destroy(e,(()=>{}))}_destroy(e,t){if(!this.destroyed){if(this._debug("destroy (error: %s)",e&&(e.message||e)),this.readable=this.writable=!1,this._readableState.ended||this.push(null),this._writableState.finished||this.end(),this.destroyed=!0,this._connected=!1,this._pcReady=!1,this._channelReady=!1,this._remoteTracks=null,this._remoteStreams=null,this._senderMap=null,clearInterval(this._closingInterval),this._closingInterval=null,clearInterval(this._interval),this._interval=null,this._chunk=null,this._cb=null,this._onFinishBound&&this.removeListener("finish",this._onFinishBound),this._onFinishBound=null,this._channel){try{this._channel.close()}catch(e){}this._channel.onmessage=null,this._channel.onopen=null,this._channel.onclose=null,this._channel.onerror=null}if(this._pc){try{this._pc.close()}catch(e){}this._pc.oniceconnectionstatechange=null,this._pc.onicegatheringstatechange=null,this._pc.onsignalingstatechange=null,this._pc.onicecandidate=null,this._pc.ontrack=null,this._pc.ondatachannel=null}this._pc=null,this._channel=null,e&&this.emit("error",e),this.emit("close"),t()}}_setupData(e){if(!e.channel)return this.destroy(c(new Error("Data channel event is missing `channel` property"),"ERR_DATA_CHANNEL"));this._channel=e.channel,this._channel.binaryType="arraybuffer","number"==typeof this._channel.bufferedAmountLowThreshold&&(this._channel.bufferedAmountLowThreshold=l),this.channelName=this._channel.label,this._channel.onmessage=e=>{this._onChannelMessage(e)},this._channel.onbufferedamountlow=()=>{this._onChannelBufferedAmountLow()},this._channel.onopen=()=>{this._onChannelOpen()},this._channel.onclose=()=>{this._onChannelClose()},this._channel.onerror=e=>{this.destroy(c(e,"ERR_DATA_CHANNEL"))};var t=!1;this._closingInterval=setInterval((()=>{this._channel&&"closing"===this._channel.readyState?(t&&this._onChannelClose(),t=!0):t=!1}),5e3)}_read(){}_write(e,t,n){if(this.destroyed)return n(c(new Error("cannot write after peer is destroyed"),"ERR_DATA_CHANNEL"));if(this._connected){try{this.send(e)}catch(e){return this.destroy(c(e,"ERR_DATA_CHANNEL"))}this._channel.bufferedAmount>l?(this._debug("start backpressure: bufferedAmount %d",this._channel.bufferedAmount),this._cb=n):n(null)}else this._debug("write before connect"),this._chunk=e,this._cb=n}_onFinish(){if(this.destroyed)return;const e=()=>{setTimeout((()=>this.destroy()),1e3)};this._connected?e():this.once("connect",e)}_startIceCompleteTimeout(){this.destroyed||this._iceCompleteTimer||(this._debug("started iceComplete timeout"),this._iceCompleteTimer=setTimeout((()=>{this._iceComplete||(this._iceComplete=!0,this._debug("iceComplete timeout completed"),this.emit("iceTimeout"),this.emit("_iceComplete"))}),this.iceCompleteTimeout))}_createOffer(){this.destroyed||this._pc.createOffer(this.offerOptions).then((e=>{if(this.destroyed)return;this.trickle||this.allowHalfTrickle||(e.sdp=p(e.sdp)),e.sdp=this.sdpTransform(e.sdp);const t=()=>{if(!this.destroyed){var t=this._pc.localDescription||e;this._debug("signal"),this.emit("signal",{type:t.type,sdp:t.sdp})}};this._pc.setLocalDescription(e).then((()=>{this._debug("createOffer success"),this.destroyed||(this.trickle||this._iceComplete?t():this.once("_iceComplete",t))})).catch((e=>{this.destroy(c(e,"ERR_SET_LOCAL_DESCRIPTION"))}))})).catch((e=>{this.destroy(c(e,"ERR_CREATE_OFFER"))}))}_requestMissingTransceivers(){this._pc.getTransceivers&&this._pc.getTransceivers().forEach((e=>{e.mid||!e.sender.track||e.requested||(e.requested=!0,this.addTransceiver(e.sender.track.kind))}))}_createAnswer(){this.destroyed||this._pc.createAnswer(this.answerOptions).then((e=>{if(this.destroyed)return;this.trickle||this.allowHalfTrickle||(e.sdp=p(e.sdp)),e.sdp=this.sdpTransform(e.sdp);const t=()=>{if(!this.destroyed){var t=this._pc.localDescription||e;this._debug("signal"),this.emit("signal",{type:t.type,sdp:t.sdp}),this.initiator||this._requestMissingTransceivers()}};this._pc.setLocalDescription(e).then((()=>{this.destroyed||(this.trickle||this._iceComplete?t():this.once("_iceComplete",t))})).catch((e=>{this.destroy(c(e,"ERR_SET_LOCAL_DESCRIPTION"))}))})).catch((e=>{this.destroy(c(e,"ERR_CREATE_ANSWER"))}))}_onConnectionStateChange(){this.destroyed||"failed"===this._pc.connectionState&&this.destroy(c(new Error("Connection failed."),"ERR_CONNECTION_FAILURE"))}_onIceStateChange(){if(!this.destroyed){var e=this._pc.iceConnectionState,t=this._pc.iceGatheringState;this._debug("iceStateChange (connection: %s) (gathering: %s)",e,t),this.emit("iceStateChange",e,t),"connected"!==e&&"completed"!==e||(this._pcReady=!0,this._maybeReady()),"failed"===e&&this.destroy(c(new Error("Ice connection failed."),"ERR_ICE_CONNECTION_FAILURE")),"closed"===e&&this.destroy(c(new Error("Ice connection closed."),"ERR_ICE_CONNECTION_CLOSED"))}}getStats(e){const t=e=>("[object Array]"===Object.prototype.toString.call(e.values)&&e.values.forEach((t=>{Object.assign(e,t)})),e);0===this._pc.getStats.length||this._isReactNativeWebrtc?this._pc.getStats().then((n=>{var i=[];n.forEach((e=>{i.push(t(e))})),e(null,i)}),(t=>e(t))):this._pc.getStats.length>0?this._pc.getStats((n=>{if(!this.destroyed){var i=[];n.result().forEach((e=>{var n={};e.names().forEach((t=>{n[t]=e.stat(t)})),n.id=e.id,n.type=e.type,n.timestamp=e.timestamp,i.push(t(n))})),e(null,i)}}),(t=>e(t))):e(null,[])}_maybeReady(){if(this._debug("maybeReady pc %s channel %s",this._pcReady,this._channelReady),this._connected||this._connecting||!this._pcReady||!this._channelReady)return;this._connecting=!0;const e=()=>{this.destroyed||this.getStats(((t,n)=>{if(this.destroyed)return;t&&(n=[]);var i={},s={},r={},a=!1;n.forEach((e=>{"remotecandidate"!==e.type&&"remote-candidate"!==e.type||(i[e.id]=e),"localcandidate"!==e.type&&"local-candidate"!==e.type||(s[e.id]=e),"candidatepair"!==e.type&&"candidate-pair"!==e.type||(r[e.id]=e)}));const o=e=>{a=!0;var t=s[e.localCandidateId];t&&(t.ip||t.address)?(this.localAddress=t.ip||t.address,this.localPort=Number(t.port)):t&&t.ipAddress?(this.localAddress=t.ipAddress,this.localPort=Number(t.portNumber)):"string"==typeof e.googLocalAddress&&(t=e.googLocalAddress.split(":"),this.localAddress=t[0],this.localPort=Number(t[1])),this.localAddress&&(this.localFamily=this.localAddress.includes(":")?"IPv6":"IPv4");var n=i[e.remoteCandidateId];n&&(n.ip||n.address)?(this.remoteAddress=n.ip||n.address,this.remotePort=Number(n.port)):n&&n.ipAddress?(this.remoteAddress=n.ipAddress,this.remotePort=Number(n.portNumber)):"string"==typeof e.googRemoteAddress&&(n=e.googRemoteAddress.split(":"),this.remoteAddress=n[0],this.remotePort=Number(n[1])),this.remoteAddress&&(this.remoteFamily=this.remoteAddress.includes(":")?"IPv6":"IPv4"),this._debug("connect local: %s:%s remote: %s:%s",this.localAddress,this.localPort,this.remoteAddress,this.remotePort)};if(n.forEach((e=>{"transport"===e.type&&e.selectedCandidatePairId&&o(r[e.selectedCandidatePairId]),("googCandidatePair"===e.type&&"true"===e.googActiveConnection||("candidatepair"===e.type||"candidate-pair"===e.type)&&e.selected)&&o(e)})),a||Object.keys(r).length&&!Object.keys(s).length){if(this._connecting=!1,this._connected=!0,this._chunk){try{this.send(this._chunk)}catch(t){return this.destroy(c(t,"ERR_DATA_CHANNEL"))}this._chunk=null,this._debug('sent chunk from "write before connect"');var l=this._cb;this._cb=null,l(null)}"number"!=typeof this._channel.bufferedAmountLowThreshold&&(this._interval=setInterval((()=>this._onInterval()),150),this._interval.unref&&this._interval.unref()),this._debug("connect"),this.emit("connect")}else setTimeout(e,100)}))};e()}_onInterval(){!this._cb||!this._channel||this._channel.bufferedAmount>l||this._onChannelBufferedAmountLow()}_onSignalingStateChange(){this.destroyed||("stable"===this._pc.signalingState&&(this._isNegotiating=!1,this._debug("flushing sender queue",this._sendersAwaitingStable),this._sendersAwaitingStable.forEach((e=>{this._pc.removeTrack(e),this._queuedNegotiation=!0})),this._sendersAwaitingStable=[],this._queuedNegotiation?(this._debug("flushing negotiation queue"),this._queuedNegotiation=!1,this._needsNegotiation()):(this._debug("negotiate"),this.emit("negotiate"))),this._debug("signalingStateChange %s",this._pc.signalingState),this.emit("signalingStateChange",this._pc.signalingState))}_onIceCandidate(e){this.destroyed||(e.candidate&&this.trickle?this.emit("signal",{candidate:{candidate:e.candidate.candidate,sdpMLineIndex:e.candidate.sdpMLineIndex,sdpMid:e.candidate.sdpMid}}):e.candidate||this._iceComplete||(this._iceComplete=!0,this.emit("_iceComplete")),e.candidate&&this._startIceCompleteTimeout())}_onChannelMessage(e){if(!this.destroyed){var t=e.data;t instanceof ArrayBuffer&&(t=n.from(t)),this.push(t)}}_onChannelBufferedAmountLow(){if(!this.destroyed&&this._cb){this._debug("ending backpressure: bufferedAmount %d",this._channel.bufferedAmount);var e=this._cb;this._cb=null,e(null)}}_onChannelOpen(){this._connected||this.destroyed||(this._debug("on channel open"),this._channelReady=!0,this._maybeReady())}_onChannelClose(){this.destroyed||(this._debug("on channel close"),this.destroy())}_onTrack(e){this.destroyed||e.streams.forEach((t=>{this._debug("on track"),this.emit("track",e.track,t),this._remoteTracks.push({track:e.track,stream:t}),this._remoteStreams.some((e=>e.id===t.id))||(this._remoteStreams.push(t),o((()=>{this.emit("stream",t)})))}))}_debug(){var e=[].slice.call(arguments);e[0]="["+this._id+"] "+e[0],i.apply(null,e)}}u.WEBRTC_SUPPORT=!!s(),u.config={iceServers:[{urls:["stun:stun.l.google.com:19302","stun:global.stun.twilio.com:3478"]}],sdpSemantics:"unified-plan"},u.channelConfig={},t.exports=u}).call(this)}).call(this,e("buffer").Buffer)},{buffer:59,debug:223,"err-code":96,"get-browser-rtc":114,"queue-microtask":192,randombytes:194,"readable-stream":240}],223:[function(e,t,n){arguments[4][12][0].apply(n,arguments)},{"./common":224,_process:186,dup:12}],224:[function(e,t,n){arguments[4][13][0].apply(n,arguments)},{dup:13,ms:225}],225:[function(e,t,n){arguments[4][14][0].apply(n,arguments)},{dup:14}],226:[function(e,t,n){arguments[4][15][0].apply(n,arguments)},{dup:15}],227:[function(e,t,n){arguments[4][16][0].apply(n,arguments)},{"./_stream_readable":229,"./_stream_writable":231,_process:186,dup:16,inherits:118}],228:[function(e,t,n){arguments[4][17][0].apply(n,arguments)},{"./_stream_transform":230,dup:17,inherits:118}],229:[function(e,t,n){arguments[4][18][0].apply(n,arguments)},{"../errors":226,"./_stream_duplex":227,"./internal/streams/async_iterator":232,"./internal/streams/buffer_list":233,"./internal/streams/destroy":234,"./internal/streams/from":236,"./internal/streams/state":238,"./internal/streams/stream":239,_process:186,buffer:59,dup:18,events:97,inherits:118,"string_decoder/":285,util:54}],230:[function(e,t,n){arguments[4][19][0].apply(n,arguments)},{"../errors":226,"./_stream_duplex":227,dup:19,inherits:118}],231:[function(e,t,n){arguments[4][20][0].apply(n,arguments)},{"../errors":226,"./_stream_duplex":227,"./internal/streams/destroy":234,"./internal/streams/state":238,"./internal/streams/stream":239,_process:186,buffer:59,dup:20,inherits:118,"util-deprecate":304}],232:[function(e,t,n){arguments[4][21][0].apply(n,arguments)},{"./end-of-stream":235,_process:186,dup:21}],233:[function(e,t,n){arguments[4][22][0].apply(n,arguments)},{buffer:59,dup:22,util:54}],234:[function(e,t,n){arguments[4][23][0].apply(n,arguments)},{_process:186,dup:23}],235:[function(e,t,n){arguments[4][24][0].apply(n,arguments)},{"../../../errors":226,dup:24}],236:[function(e,t,n){arguments[4][25][0].apply(n,arguments)},{dup:25}],237:[function(e,t,n){arguments[4][26][0].apply(n,arguments)},{"../../../errors":226,"./end-of-stream":235,dup:26}],238:[function(e,t,n){arguments[4][27][0].apply(n,arguments)},{"../../../errors":226,dup:27}],239:[function(e,t,n){arguments[4][28][0].apply(n,arguments)},{dup:28,events:97}],240:[function(e,t,n){arguments[4][29][0].apply(n,arguments)},{"./lib/_stream_duplex.js":227,"./lib/_stream_passthrough.js":228,"./lib/_stream_readable.js":229,"./lib/_stream_transform.js":230,"./lib/_stream_writable.js":231,"./lib/internal/streams/end-of-stream.js":235,"./lib/internal/streams/pipeline.js":237,dup:29}],241:[function(e,t,n){var i=e("rusha"),s=e("./rusha-worker-sha1"),r=new i,a="undefined"!=typeof window?window:self,o=a.crypto||a.msCrypto||{},c=o.subtle||o.webkitSubtle;function l(e){return r.digest(e)}try{c.digest({name:"sha-1"},new Uint8Array).catch((function(){c=!1}))}catch(e){c=!1}t.exports=function(e,t){c?("string"==typeof e&&(e=function(e){for(var t=e.length,n=new Uint8Array(t),i=0;i<t;i++)n[i]=e.charCodeAt(i);return n}(e)),c.digest({name:"sha-1"},e).then((function(e){t(function(e){for(var t=e.length,n=[],i=0;i<t;i++){var s=e[i];n.push((s>>>4).toString(16)),n.push((15&s).toString(16))}return n.join("")}(new Uint8Array(e)))}),(function(){t(l(e))}))):"undefined"!=typeof window?s(e,(function(n,i){t(n?l(e):i)})):queueMicrotask((()=>t(l(e))))},t.exports.sync=l},{"./rusha-worker-sha1":242,rusha:218}],242:[function(e,t,n){var i,s,r,a=e("rusha");t.exports=function(e,t){i||(i=a.createWorker(),s=1,r={},i.onmessage=function(e){var t=e.data.id,n=r[t];delete r[t],null!=e.data.error?n(new Error("Rusha worker error: "+e.data.error)):n(null,e.data.hash)}),r[s]=t,i.postMessage({id:s,data:e}),s+=1}},{rusha:218}],243:[function(e,t,n){(function(n){(function(){const i=e("debug")("simple-websocket"),s=e("randombytes"),r=e("readable-stream"),a=e("queue-microtask"),o=e("ws"),c="function"!=typeof o?WebSocket:o;class l extends r.Duplex{constructor(e={}){if("string"==typeof e&&(e={url:e}),super(e=Object.assign({allowHalfOpen:!1},e)),null==e.url&&null==e.socket)throw new Error("Missing required `url` or `socket` option");if(null!=e.url&&null!=e.socket)throw new Error("Must specify either `url` or `socket` option, not both");if(this._id=s(4).toString("hex").slice(0,7),this._debug("new websocket: %o",e),this.connected=!1,this.destroyed=!1,this._chunk=null,this._cb=null,this._interval=null,e.socket)this.url=e.socket.url,this._ws=e.socket,this.connected=e.socket.readyState===c.OPEN;else{this.url=e.url;try{this._ws="function"==typeof o?new c(e.url,e):new c(e.url)}catch(e){return void a((()=>this.destroy(e)))}}this._ws.binaryType="arraybuffer",this._ws.onopen=()=>{this._onOpen()},this._ws.onmessage=e=>{this._onMessage(e)},this._ws.onclose=()=>{this._onClose()},this._ws.onerror=()=>{this.destroy(new Error("connection error to "+this.url))},this._onFinishBound=()=>{this._onFinish()},this.once("finish",this._onFinishBound)}send(e){this._ws.send(e)}destroy(e){this._destroy(e,(()=>{}))}_destroy(e,t){if(!this.destroyed){if(this._debug("destroy (error: %s)",e&&(e.message||e)),this.readable=this.writable=!1,this._readableState.ended||this.push(null),this._writableState.finished||this.end(),this.connected=!1,this.destroyed=!0,clearInterval(this._interval),this._interval=null,this._chunk=null,this._cb=null,this._onFinishBound&&this.removeListener("finish",this._onFinishBound),this._onFinishBound=null,this._ws){const t=this._ws,n=()=>{t.onclose=null};if(t.readyState===c.CLOSED)n();else try{t.onclose=n,t.close()}catch(e){n()}t.onopen=null,t.onmessage=null,t.onerror=()=>{}}if(this._ws=null,e){if("undefined"!=typeof DOMException&&e instanceof DOMException){const t=e.code;(e=new Error(e.message)).code=t}this.emit("error",e)}this.emit("close"),t()}}_read(){}_write(e,t,n){if(this.destroyed)return n(new Error("cannot write after socket is destroyed"));if(this.connected){try{this.send(e)}catch(e){return this.destroy(e)}"function"!=typeof o&&this._ws.bufferedAmount>65536?(this._debug("start backpressure: bufferedAmount %d",this._ws.bufferedAmount),this._cb=n):n(null)}else this._debug("write before connect"),this._chunk=e,this._cb=n}_onFinish(){if(this.destroyed)return;const e=()=>{setTimeout((()=>this.destroy()),1e3)};this.connected?e():this.once("connect",e)}_onMessage(e){if(this.destroyed)return;let t=e.data;t instanceof ArrayBuffer&&(t=n.from(t)),this.push(t)}_onOpen(){if(!this.connected&&!this.destroyed){if(this.connected=!0,this._chunk){try{this.send(this._chunk)}catch(e){return this.destroy(e)}this._chunk=null,this._debug('sent chunk from "write before connect"');const e=this._cb;this._cb=null,e(null)}"function"!=typeof o&&(this._interval=setInterval((()=>this._onInterval()),150),this._interval.unref&&this._interval.unref()),this._debug("connect"),this.emit("connect")}}_onInterval(){if(!this._cb||!this._ws||this._ws.bufferedAmount>65536)return;this._debug("ending backpressure: bufferedAmount %d",this._ws.bufferedAmount);const e=this._cb;this._cb=null,e(null)}_onClose(){this.destroyed||(this._debug("on close"),this.destroy())}_debug(){const e=[].slice.call(arguments);e[0]="["+this._id+"] "+e[0],i.apply(null,e)}}l.WEBSOCKET_SUPPORT=!!c,t.exports=l}).call(this)}).call(this,e("buffer").Buffer)},{buffer:59,debug:244,"queue-microtask":192,randombytes:194,"readable-stream":261,ws:54}],244:[function(e,t,n){arguments[4][12][0].apply(n,arguments)},{"./common":245,_process:186,dup:12}],245:[function(e,t,n){arguments[4][13][0].apply(n,arguments)},{dup:13,ms:246}],246:[function(e,t,n){arguments[4][14][0].apply(n,arguments)},{dup:14}],247:[function(e,t,n){arguments[4][15][0].apply(n,arguments)},{dup:15}],248:[function(e,t,n){arguments[4][16][0].apply(n,arguments)},{"./_stream_readable":250,"./_stream_writable":252,_process:186,dup:16,inherits:118}],249:[function(e,t,n){arguments[4][17][0].apply(n,arguments)},{"./_stream_transform":251,dup:17,inherits:118}],250:[function(e,t,n){arguments[4][18][0].apply(n,arguments)},{"../errors":247,"./_stream_duplex":248,"./internal/streams/async_iterator":253,"./internal/streams/buffer_list":254,"./internal/streams/destroy":255,"./internal/streams/from":257,"./internal/streams/state":259,"./internal/streams/stream":260,_process:186,buffer:59,dup:18,events:97,inherits:118,"string_decoder/":285,util:54}],251:[function(e,t,n){arguments[4][19][0].apply(n,arguments)},{"../errors":247,"./_stream_duplex":248,dup:19,inherits:118}],252:[function(e,t,n){arguments[4][20][0].apply(n,arguments)},{"../errors":247,"./_stream_duplex":248,"./internal/streams/destroy":255,"./internal/streams/state":259,"./internal/streams/stream":260,_process:186,buffer:59,dup:20,inherits:118,"util-deprecate":304}],253:[function(e,t,n){arguments[4][21][0].apply(n,arguments)},{"./end-of-stream":256,_process:186,dup:21}],254:[function(e,t,n){arguments[4][22][0].apply(n,arguments)},{buffer:59,dup:22,util:54}],255:[function(e,t,n){arguments[4][23][0].apply(n,arguments)},{_process:186,dup:23}],256:[function(e,t,n){arguments[4][24][0].apply(n,arguments)},{"../../../errors":247,dup:24}],257:[function(e,t,n){arguments[4][25][0].apply(n,arguments)},{dup:25}],258:[function(e,t,n){arguments[4][26][0].apply(n,arguments)},{"../../../errors":247,"./end-of-stream":256,dup:26}],259:[function(e,t,n){arguments[4][27][0].apply(n,arguments)},{"../../../errors":247,dup:27}],260:[function(e,t,n){arguments[4][28][0].apply(n,arguments)},{dup:28,events:97}],261:[function(e,t,n){arguments[4][29][0].apply(n,arguments)},{"./lib/_stream_duplex.js":248,"./lib/_stream_passthrough.js":249,"./lib/_stream_readable.js":250,"./lib/_stream_transform.js":251,"./lib/_stream_writable.js":252,"./lib/internal/streams/end-of-stream.js":256,"./lib/internal/streams/pipeline.js":258,dup:29}],262:[function(e,t,n){var i,s=1,r=65535,a=function(){s=s+1&r};t.exports=function(e){i||(i=setInterval(a,250)).unref&&i.unref();var t=4*(e||5),n=[0],o=1,c=s-1&r;return function(e){var i=s-c&r;for(i>t&&(i=t),c=s;i--;)o===t&&(o=0),n[o]=n[0===o?t-1:o-1],o++;e&&(n[o-1]+=e);var a=n[o-1],l=n.length<t?0:n[o===t?0:o];return n.length<4?a:4*(a-l)/n.length}}},{}],263:[function(e,t,n){(function(t){(function(){var i=e("./lib/request"),s=e("./lib/response"),r=e("xtend"),a=e("builtin-status-codes"),o=e("url"),c=n;c.request=function(e,n){e="string"==typeof e?o.parse(e):r(e);var s=-1===t.location.protocol.search(/^https?:$/)?"http:":"",a=e.protocol||s,c=e.hostname||e.host,l=e.port,p=e.path||"/";c&&-1!==c.indexOf(":")&&(c="["+c+"]"),e.url=(c?a+"//"+c:"")+(l?":"+l:"")+p,e.method=(e.method||"GET").toUpperCase(),e.headers=e.headers||{};var u=new i(e);return n&&u.on("response",n),u},c.get=function(e,t){var n=c.request(e,t);return n.end(),n},c.ClientRequest=i,c.IncomingMessage=s.IncomingMessage,c.Agent=function(){},c.Agent.defaultMaxSockets=4,c.globalAgent=new c.Agent,c.STATUS_CODES=a,c.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./lib/request":265,"./lib/response":266,"builtin-status-codes":60,url:297,xtend:334}],264:[function(e,t,n){(function(e){(function(){var t;function i(){if(void 0!==t)return t;if(e.XMLHttpRequest){t=new e.XMLHttpRequest;try{t.open("GET",e.XDomainRequest?"/":"https://example.com")}catch(e){t=null}}else t=null;return t}function s(e){var t=i();if(!t)return!1;try{return t.responseType=e,t.responseType===e}catch(e){}return!1}function r(e){return"function"==typeof e}n.fetch=r(e.fetch)&&r(e.ReadableStream),n.writableStream=r(e.WritableStream),n.abortController=r(e.AbortController),n.arraybuffer=n.fetch||s("arraybuffer"),n.msstream=!n.fetch&&s("ms-stream"),n.mozchunkedarraybuffer=!n.fetch&&s("moz-chunked-arraybuffer"),n.overrideMimeType=n.fetch||!!i()&&r(i().overrideMimeType),t=null}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],265:[function(e,t,n){(function(n,i,s){(function(){var r=e("./capability"),a=e("inherits"),o=e("./response"),c=e("readable-stream"),l=o.IncomingMessage,p=o.readyStates;var u=t.exports=function(e){var t,n=this;c.Writable.call(n),n._opts=e,n._body=[],n._headers={},e.auth&&n.setHeader("Authorization","Basic "+s.from(e.auth).toString("base64")),Object.keys(e.headers).forEach((function(t){n.setHeader(t,e.headers[t])}));var i=!0;if("disable-fetch"===e.mode||"requestTimeout"in e&&!r.abortController)i=!1,t=!0;else if("prefer-streaming"===e.mode)t=!1;else if("allow-wrong-content-type"===e.mode)t=!r.overrideMimeType;else{if(e.mode&&"default"!==e.mode&&"prefer-fast"!==e.mode)throw new Error("Invalid value for opts.mode");t=!0}n._mode=function(e,t){return r.fetch&&t?"fetch":r.mozchunkedarraybuffer?"moz-chunked-arraybuffer":r.msstream?"ms-stream":r.arraybuffer&&e?"arraybuffer":"text"}(t,i),n._fetchTimer=null,n.on("finish",(function(){n._onFinish()}))};a(u,c.Writable),u.prototype.setHeader=function(e,t){var n=e.toLowerCase();-1===d.indexOf(n)&&(this._headers[n]={name:e,value:t})},u.prototype.getHeader=function(e){var t=this._headers[e.toLowerCase()];return t?t.value:null},u.prototype.removeHeader=function(e){delete this._headers[e.toLowerCase()]},u.prototype._onFinish=function(){var e=this;if(!e._destroyed){var t=e._opts,s=e._headers,a=null;"GET"!==t.method&&"HEAD"!==t.method&&(a=new Blob(e._body,{type:(s["content-type"]||{}).value||""}));var o=[];if(Object.keys(s).forEach((function(e){var t=s[e].name,n=s[e].value;Array.isArray(n)?n.forEach((function(e){o.push([t,e])})):o.push([t,n])})),"fetch"===e._mode){var c=null;if(r.abortController){var l=new AbortController;c=l.signal,e._fetchAbortController=l,"requestTimeout"in t&&0!==t.requestTimeout&&(e._fetchTimer=i.setTimeout((function(){e.emit("requestTimeout"),e._fetchAbortController&&e._fetchAbortController.abort()}),t.requestTimeout))}i.fetch(e._opts.url,{method:e._opts.method,headers:o,body:a||void 0,mode:"cors",credentials:t.withCredentials?"include":"same-origin",signal:c}).then((function(t){e._fetchResponse=t,e._connect()}),(function(t){i.clearTimeout(e._fetchTimer),e._destroyed||e.emit("error",t)}))}else{var u=e._xhr=new i.XMLHttpRequest;try{u.open(e._opts.method,e._opts.url,!0)}catch(t){return void n.nextTick((function(){e.emit("error",t)}))}"responseType"in u&&(u.responseType=e._mode),"withCredentials"in u&&(u.withCredentials=!!t.withCredentials),"text"===e._mode&&"overrideMimeType"in u&&u.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in t&&(u.timeout=t.requestTimeout,u.ontimeout=function(){e.emit("requestTimeout")}),o.forEach((function(e){u.setRequestHeader(e[0],e[1])})),e._response=null,u.onreadystatechange=function(){switch(u.readyState){case p.LOADING:case p.DONE:e._onXHRProgress()}},"moz-chunked-arraybuffer"===e._mode&&(u.onprogress=function(){e._onXHRProgress()}),u.onerror=function(){e._destroyed||e.emit("error",new Error("XHR error"))};try{u.send(a)}catch(t){return void n.nextTick((function(){e.emit("error",t)}))}}}},u.prototype._onXHRProgress=function(){var e=this;(function(e){try{var t=e.status;return null!==t&&0!==t}catch(e){return!1}})(e._xhr)&&!e._destroyed&&(e._response||e._connect(),e._response._onXHRProgress())},u.prototype._connect=function(){var e=this;e._destroyed||(e._response=new l(e._xhr,e._fetchResponse,e._mode,e._fetchTimer),e._response.on("error",(function(t){e.emit("error",t)})),e.emit("response",e._response))},u.prototype._write=function(e,t,n){this._body.push(e),n()},u.prototype.abort=u.prototype.destroy=function(){var e=this;e._destroyed=!0,i.clearTimeout(e._fetchTimer),e._response&&(e._response._destroyed=!0),e._xhr?e._xhr.abort():e._fetchAbortController&&e._fetchAbortController.abort()},u.prototype.end=function(e,t,n){"function"==typeof e&&(n=e,e=void 0),c.Writable.prototype.end.call(this,e,t,n)},u.prototype.flushHeaders=function(){},u.prototype.setTimeout=function(){},u.prototype.setNoDelay=function(){},u.prototype.setSocketKeepAlive=function(){};var d=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","via"]}).call(this)}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer)},{"./capability":264,"./response":266,_process:186,buffer:59,inherits:118,"readable-stream":281}],266:[function(e,t,n){(function(t,i,s){(function(){var r=e("./capability"),a=e("inherits"),o=e("readable-stream"),c=n.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},l=n.IncomingMessage=function(e,n,a,c){var l=this;if(o.Readable.call(l),l._mode=a,l.headers={},l.rawHeaders=[],l.trailers={},l.rawTrailers=[],l.on("end",(function(){t.nextTick((function(){l.emit("close")}))})),"fetch"===a){if(l._fetchResponse=n,l.url=n.url,l.statusCode=n.status,l.statusMessage=n.statusText,n.headers.forEach((function(e,t){l.headers[t.toLowerCase()]=e,l.rawHeaders.push(t,e)})),r.writableStream){var p=new WritableStream({write:function(e){return new Promise((function(t,n){l._destroyed?n():l.push(s.from(e))?t():l._resumeFetch=t}))},close:function(){i.clearTimeout(c),l._destroyed||l.push(null)},abort:function(e){l._destroyed||l.emit("error",e)}});try{return void n.body.pipeTo(p).catch((function(e){i.clearTimeout(c),l._destroyed||l.emit("error",e)}))}catch(e){}}var u=n.body.getReader();!function e(){u.read().then((function(t){if(!l._destroyed){if(t.done)return i.clearTimeout(c),void l.push(null);l.push(s.from(t.value)),e()}})).catch((function(e){i.clearTimeout(c),l._destroyed||l.emit("error",e)}))}()}else{if(l._xhr=e,l._pos=0,l.url=e.responseURL,l.statusCode=e.status,l.statusMessage=e.statusText,e.getAllResponseHeaders().split(/\r?\n/).forEach((function(e){var t=e.match(/^([^:]+):\s*(.*)/);if(t){var n=t[1].toLowerCase();"set-cookie"===n?(void 0===l.headers[n]&&(l.headers[n]=[]),l.headers[n].push(t[2])):void 0!==l.headers[n]?l.headers[n]+=", "+t[2]:l.headers[n]=t[2],l.rawHeaders.push(t[1],t[2])}})),l._charset="x-user-defined",!r.overrideMimeType){var d=l.rawHeaders["mime-type"];if(d){var h=d.match(/;\s*charset=([^;])(;|$)/);h&&(l._charset=h[1].toLowerCase())}l._charset||(l._charset="utf-8")}}};a(l,o.Readable),l.prototype._read=function(){var e=this._resumeFetch;e&&(this._resumeFetch=null,e())},l.prototype._onXHRProgress=function(){var e=this,t=e._xhr,n=null;switch(e._mode){case"text":if((n=t.responseText).length>e._pos){var r=n.substr(e._pos);if("x-user-defined"===e._charset){for(var a=s.alloc(r.length),o=0;o<r.length;o++)a[o]=255&r.charCodeAt(o);e.push(a)}else e.push(r,e._charset);e._pos=n.length}break;case"arraybuffer":if(t.readyState!==c.DONE||!t.response)break;n=t.response,e.push(s.from(new Uint8Array(n)));break;case"moz-chunked-arraybuffer":if(n=t.response,t.readyState!==c.LOADING||!n)break;e.push(s.from(new Uint8Array(n)));break;case"ms-stream":if(n=t.response,t.readyState!==c.LOADING)break;var l=new i.MSStreamReader;l.onprogress=function(){l.result.byteLength>e._pos&&(e.push(s.from(new Uint8Array(l.result.slice(e._pos)))),e._pos=l.result.byteLength)},l.onload=function(){e.push(null)},l.readAsArrayBuffer(n)}e._xhr.readyState===c.DONE&&"ms-stream"!==e._mode&&e.push(null)}}).call(this)}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer)},{"./capability":264,_process:186,buffer:59,inherits:118,"readable-stream":281}],267:[function(e,t,n){arguments[4][15][0].apply(n,arguments)},{dup:15}],268:[function(e,t,n){arguments[4][16][0].apply(n,arguments)},{"./_stream_readable":270,"./_stream_writable":272,_process:186,dup:16,inherits:118}],269:[function(e,t,n){arguments[4][17][0].apply(n,arguments)},{"./_stream_transform":271,dup:17,inherits:118}],270:[function(e,t,n){arguments[4][18][0].apply(n,arguments)},{"../errors":267,"./_stream_duplex":268,"./internal/streams/async_iterator":273,"./internal/streams/buffer_list":274,"./internal/streams/destroy":275,"./internal/streams/from":277,"./internal/streams/state":279,"./internal/streams/stream":280,_process:186,buffer:59,dup:18,events:97,inherits:118,"string_decoder/":285,util:54}],271:[function(e,t,n){arguments[4][19][0].apply(n,arguments)},{"../errors":267,"./_stream_duplex":268,dup:19,inherits:118}],272:[function(e,t,n){arguments[4][20][0].apply(n,arguments)},{"../errors":267,"./_stream_duplex":268,"./internal/streams/destroy":275,"./internal/streams/state":279,"./internal/streams/stream":280,_process:186,buffer:59,dup:20,inherits:118,"util-deprecate":304}],273:[function(e,t,n){arguments[4][21][0].apply(n,arguments)},{"./end-of-stream":276,_process:186,dup:21}],274:[function(e,t,n){arguments[4][22][0].apply(n,arguments)},{buffer:59,dup:22,util:54}],275:[function(e,t,n){arguments[4][23][0].apply(n,arguments)},{_process:186,dup:23}],276:[function(e,t,n){arguments[4][24][0].apply(n,arguments)},{"../../../errors":267,dup:24}],277:[function(e,t,n){arguments[4][25][0].apply(n,arguments)},{dup:25}],278:[function(e,t,n){arguments[4][26][0].apply(n,arguments)},{"../../../errors":267,"./end-of-stream":276,dup:26}],279:[function(e,t,n){arguments[4][27][0].apply(n,arguments)},{"../../../errors":267,dup:27}],280:[function(e,t,n){arguments[4][28][0].apply(n,arguments)},{dup:28,events:97}],281:[function(e,t,n){arguments[4][29][0].apply(n,arguments)},{"./lib/_stream_duplex.js":268,"./lib/_stream_passthrough.js":269,"./lib/_stream_readable.js":270,"./lib/_stream_transform.js":271,"./lib/_stream_writable.js":272,"./lib/internal/streams/end-of-stream.js":276,"./lib/internal/streams/pipeline.js":278,dup:29}],282:[function(e,t,n){
|
||
/*! stream-to-blob-url. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
||
t.exports=async function(e,t){const n=await i(e,t);return URL.createObjectURL(n)};const i=e("stream-to-blob")},{"stream-to-blob":283}],283:[function(e,t,n){
|
||
/*! stream-to-blob. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
||
t.exports=function(e,t){if(null!=t&&"string"!=typeof t)throw new Error("Invalid mimetype, expected string.");return new Promise(((n,i)=>{const s=[];e.on("data",(e=>s.push(e))).once("end",(()=>{const e=null!=t?new Blob(s,{type:t}):new Blob(s);n(e)})).once("error",i)}))}},{}],284:[function(e,t,n){(function(n){(function(){
|
||
/*! stream-with-known-length-to-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
||
var i=e("once");t.exports=function(e,t,s){s=i(s);var r=n.alloc(t),a=0;e.on("data",(function(e){e.copy(r,a),a+=e.length})).on("end",(function(){s(null,r)})).on("error",s)}}).call(this)}).call(this,e("buffer").Buffer)},{buffer:59,once:182}],285:[function(e,t,n){"use strict";var i=e("safe-buffer").Buffer,s=i.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function r(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(i.isEncoding===s||!s(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=c,this.end=l,t=4;break;case"utf8":this.fillLast=o,t=4;break;case"base64":this.text=p,this.end=u,t=3;break;default:return this.write=d,void(this.end=h)}this.lastNeed=0,this.lastTotal=0,this.lastChar=i.allocUnsafe(t)}function a(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function o(e){var t=this.lastTotal-this.lastNeed,n=function(e,t,n){if(128!=(192&t[0]))return e.lastNeed=0,"<22>";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"<22>";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"<22>"}}(this,e);return void 0!==n?n:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function c(e,t){if((e.length-t)%2==0){var n=e.toString("utf16le",t);if(n){var i=n.charCodeAt(n.length-1);if(i>=55296&&i<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function l(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,n)}return t}function p(e,t){var n=(e.length-t)%3;return 0===n?e.toString("base64",t):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-n))}function u(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function d(e){return e.toString(this.encoding)}function h(e){return e&&e.length?this.write(e):""}n.StringDecoder=r,r.prototype.write=function(e){if(0===e.length)return"";var t,n;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n<e.length?t?t+this.text(e,n):this.text(e,n):t||""},r.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"<22>":t},r.prototype.text=function(e,t){var n=function(e,t,n){var i=t.length-1;if(i<n)return 0;var s=a(t[i]);if(s>=0)return s>0&&(e.lastNeed=s-1),s;if(--i<n||-2===s)return 0;if((s=a(t[i]))>=0)return s>0&&(e.lastNeed=s-2),s;if(--i<n||-2===s)return 0;if((s=a(t[i]))>=0)return s>0&&(2===s?s=0:e.lastNeed=s-3),s;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=n;var i=e.length-(n-this.lastNeed);return e.copy(this.lastChar,0,i),e.toString("utf8",t,i)},r.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},{"safe-buffer":219}],286:[function(e,t,n){var i=e("./thirty-two");n.encode=i.encode,n.decode=i.decode},{"./thirty-two":287}],287:[function(e,t,n){(function(e){(function(){"use strict";var t=[255,255,26,27,28,29,30,31,255,255,255,255,255,255,255,255,255,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,255,255,255,255,255,255,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,255,255,255,255,255];n.encode=function(t){e.isBuffer(t)||(t=new e(t));for(var n,i,s=0,r=0,a=0,o=0,c=new e(8*(n=t,i=Math.floor(n.length/5),n.length%5==0?i:i+1));s<t.length;){var l=t[s];a>3?(o=(o=l&255>>a)<<(a=(a+5)%8)|(s+1<t.length?t[s+1]:0)>>8-a,s++):(o=l>>8-(a+5)&31,0===(a=(a+5)%8)&&s++),c[r]="ABCDEFGHIJKLMNOPQRSTUVWXYZ234567".charCodeAt(o),r++}for(s=r;s<c.length;s++)c[s]=61;return c},n.decode=function(n){var i,s=0,r=0,a=0;e.isBuffer(n)||(n=new e(n));for(var o=new e(Math.ceil(5*n.length/8)),c=0;c<n.length&&61!==n[c];c++){var l=n[c]-48;if(!(l<t.length))throw new Error("Invalid input - it is not base32 encoded string");r=t[l],s<=3?0===(s=(s+5)%8)?(i|=r,o[a]=i,a++,i=0):i|=255&r<<8-s:(i|=255&r>>>(s=(s+5)%8),o[a]=i,a++,i=255&r<<8-s)}return o.slice(0,a)}}).call(this)}).call(this,e("buffer").Buffer)},{buffer:59}],288:[function(e,t,n){var i=e("buffer").Buffer;t.exports=function(e){if(e instanceof Uint8Array){if(0===e.byteOffset&&e.byteLength===e.buffer.byteLength)return e.buffer;if("function"==typeof e.buffer.slice)return e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength)}if(i.isBuffer(e)){for(var t=new Uint8Array(e.length),n=e.length,s=0;s<n;s++)t[s]=e[s];return t.buffer}throw new Error("Argument must be a Buffer")}},{buffer:59}],289:[function(e,t,n){(function(n){(function(){
|
||
/*! torrent-discovery. MIT License. WebTorrent LLC <https://webtorrent.io/opensource> */
|
||
const i=e("debug")("torrent-discovery"),s=e("bittorrent-dht/client"),r=e("events").EventEmitter,a=e("run-parallel"),o=e("bittorrent-tracker/client"),c=e("bittorrent-lsd");t.exports=class extends r{constructor(e){if(super(),!e.peerId)throw new Error("Option `peerId` is required");if(!e.infoHash)throw new Error("Option `infoHash` is required");if(!n.browser&&!e.port)throw new Error("Option `port` is required");this.peerId="string"==typeof e.peerId?e.peerId:e.peerId.toString("hex"),this.infoHash="string"==typeof e.infoHash?e.infoHash.toLowerCase():e.infoHash.toString("hex"),this._port=e.port,this._userAgent=e.userAgent,this.destroyed=!1,this._announce=e.announce||[],this._intervalMs=e.intervalMs||9e5,this._trackerOpts=null,this._dhtAnnouncing=!1,this._dhtTimeout=!1,this._internalDHT=!1,this._onWarning=e=>{this.emit("warning",e)},this._onError=e=>{this.emit("error",e)},this._onDHTPeer=(e,t)=>{t.toString("hex")===this.infoHash&&this.emit("peer",`${e.host}:${e.port}`,"dht")},this._onTrackerPeer=e=>{this.emit("peer",e,"tracker")},this._onTrackerAnnounce=()=>{this.emit("trackerAnnounce")},this._onLSDPeer=(e,t)=>{this.emit("peer",e,"lsd")};const t=(e,t)=>{const n=new s(t);return n.on("warning",this._onWarning),n.on("error",this._onError),n.listen(e),this._internalDHT=!0,n};!1===e.tracker?this.tracker=null:e.tracker&&"object"==typeof e.tracker?(this._trackerOpts=Object.assign({},e.tracker),this.tracker=this._createTracker()):this.tracker=this._createTracker(),!1===e.dht||"function"!=typeof s?this.dht=null:e.dht&&"function"==typeof e.dht.addNode?this.dht=e.dht:e.dht&&"object"==typeof e.dht?this.dht=t(e.dhtPort,e.dht):this.dht=t(e.dhtPort),this.dht&&(this.dht.on("peer",this._onDHTPeer),this._dhtAnnounce()),!1===e.lsd||"function"!=typeof c?this.lsd=null:this.lsd=this._createLSD()}updatePort(e){e!==this._port&&(this._port=e,this.dht&&this._dhtAnnounce(),this.tracker&&(this.tracker.stop(),this.tracker.destroy((()=>{this.tracker=this._createTracker()}))))}complete(e){this.tracker&&this.tracker.complete(e)}destroy(e){if(this.destroyed)return;this.destroyed=!0,clearTimeout(this._dhtTimeout);const t=[];this.tracker&&(this.tracker.stop(),this.tracker.removeListener("warning",this._onWarning),this.tracker.removeListener("error",this._onError),this.tracker.removeListener("peer",this._onTrackerPeer),this.tracker.removeListener("update",this._onTrackerAnnounce),t.push((e=>{this.tracker.destroy(e)}))),this.dht&&this.dht.removeListener("peer",this._onDHTPeer),this._internalDHT&&(this.dht.removeListener("warning",this._onWarning),this.dht.removeListener("error",this._onError),t.push((e=>{this.dht.destroy(e)}))),this.lsd&&(this.lsd.removeListener("warning",this._onWarning),this.lsd.removeListener("error",this._onError),this.lsd.removeListener("peer",this._onLSDPeer),t.push((e=>{this.lsd.destroy(e)}))),a(t,e),this.dht=null,this.tracker=null,this.lsd=null,this._announce=null}_createTracker(){const e=Object.assign({},this._trackerOpts,{infoHash:this.infoHash,announce:this._announce,peerId:this.peerId,port:this._port,userAgent:this._userAgent}),t=new o(e);return t.on("warning",this._onWarning),t.on("error",this._onError),t.on("peer",this._onTrackerPeer),t.on("update",this._onTrackerAnnounce),t.setInterval(this._intervalMs),t.start(),t}_dhtAnnounce(){this._dhtAnnouncing||(i("dht announce"),this._dhtAnnouncing=!0,clearTimeout(this._dhtTimeout),this.dht.announce(this.infoHash,this._port,(e=>{this._dhtAnnouncing=!1,i("dht announce complete"),e&&this.emit("warning",e),this.emit("dhtAnnounce"),this.destroyed||(this._dhtTimeout=setTimeout((()=>{this._dhtAnnounce()}),this._intervalMs+Math.floor(Math.random()*this._intervalMs/5)),this._dhtTimeout.unref&&this._dhtTimeout.unref())})))}_createLSD(){const e=Object.assign({},{infoHash:this.infoHash,peerId:this.peerId,port:this._port}),t=new c(e);return t.on("warning",this._onWarning),t.on("error",this._onError),t.on("peer",this._onLSDPeer),t.start(),t}}}).call(this)}).call(this,e("_process"))},{_process:186,"bittorrent-dht/client":54,"bittorrent-lsd":54,"bittorrent-tracker/client":30,debug:290,events:97,"run-parallel":217}],290:[function(e,t,n){arguments[4][12][0].apply(n,arguments)},{"./common":291,_process:186,dup:12}],291:[function(e,t,n){arguments[4][13][0].apply(n,arguments)},{dup:13,ms:292}],292:[function(e,t,n){arguments[4][14][0].apply(n,arguments)},{dup:14}],293:[function(e,t,n){(function(e){(function(){const n=16384;class i{constructor(e){this.length=e,this.missing=e,this.sources=null,this._chunks=Math.ceil(e/n),this._remainder=e%n||n,this._buffered=0,this._buffer=null,this._cancellations=null,this._reservations=0,this._flushed=!1}chunkLength(e){return e===this._chunks-1?this._remainder:n}chunkLengthRemaining(e){return this.length-e*n}chunkOffset(e){return e*n}reserve(){return this.init()?this._cancellations.length?this._cancellations.pop():this._reservations<this._chunks?this._reservations++:-1:-1}reserveRemaining(){if(!this.init())return-1;if(this._reservations<this._chunks){const e=this._reservations;return this._reservations=this._chunks,e}return-1}cancel(e){this.init()&&this._cancellations.push(e)}cancelRemaining(e){this.init()&&(this._reservations=e)}get(e){return this.init()?this._buffer[e]:null}set(e,t,i){if(!this.init())return!1;const s=t.length,r=Math.ceil(s/n);for(let s=0;s<r;s++)if(!this._buffer[e+s]){const r=s*n,a=t.slice(r,r+n);this._buffered++,this._buffer[e+s]=a,this.missing-=a.length,this.sources.includes(i)||this.sources.push(i)}return this._buffered===this._chunks}flush(){if(!this._buffer||this._chunks!==this._buffered)return null;const t=e.concat(this._buffer,this.length);return this._buffer=null,this._cancellations=null,this.sources=null,this._flushed=!0,t}init(){return!this._flushed&&(this._buffer||(this._buffer=new Array(this._chunks),this._cancellations=[],this.sources=[]),!0)}}Object.defineProperty(i,"BLOCK_LENGTH",{value:n}),t.exports=i}).call(this)}).call(this,e("buffer").Buffer)},{buffer:59}],294:[function(e,t,n){(function(n){(function(){var i=e("is-typedarray").strict;t.exports=function(e){if(i(e)){var t=n.from(e.buffer);return e.byteLength!==e.buffer.byteLength&&(t=t.slice(e.byteOffset,e.byteOffset+e.byteLength)),t}return n.from(e)}}).call(this)}).call(this,e("buffer").Buffer)},{buffer:59,"is-typedarray":121}],295:[function(e,t,n){var i=e("buffer-alloc"),s=Math.pow(2,32);n.encodingLength=function(){return 8},n.encode=function(e,t,n){t||(t=i(8)),n||(n=0);var r=Math.floor(e/s),a=e-r*s;return t.writeUInt32BE(r,n),t.writeUInt32BE(a,n+4),t},n.decode=function(e,t){t||(t=0);var n=e.readUInt32BE(t),i=e.readUInt32BE(t+4);return n*s+i},n.encode.bytes=8,n.decode.bytes=8},{"buffer-alloc":57}],296:[function(e,t,n){t.exports=function(e,t){if(t>=e.length||t<0)return;var n=e.pop();if(t<e.length){var i=e[t];return e[t]=n,i}return n}},{}],297:[function(e,t,n){"use strict";var i=e("punycode"),s=e("./util");function r(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}n.parse=x,n.resolve=function(e,t){return x(e,!1,!0).resolve(t)},n.resolveObject=function(e,t){return e?x(e,!1,!0).resolveObject(t):t},n.format=function(e){s.isString(e)&&(e=x(e));return e instanceof r?e.format():r.prototype.format.call(e)},n.Url=r;var a=/^([a-z0-9.+-]+:)/i,o=/:[0-9]*$/,c=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,l=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),p=["'"].concat(l),u=["%","/","?",";","#"].concat(p),d=["/","?","#"],h=/^[+a-z0-9A-Z_-]{0,63}$/,f=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,m={javascript:!0,"javascript:":!0},g={javascript:!0,"javascript:":!0},v={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},b=e("querystring");function x(e,t,n){if(e&&s.isObject(e)&&e instanceof r)return e;var i=new r;return i.parse(e,t,n),i}r.prototype.parse=function(e,t,n){if(!s.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var r=e.indexOf("?"),o=-1!==r&&r<e.indexOf("#")?"?":"#",l=e.split(o);l[0]=l[0].replace(/\\/g,"/");var x=e=l.join(o);if(x=x.trim(),!n&&1===e.split("#").length){var _=c.exec(x);if(_)return this.path=x,this.href=x,this.pathname=_[1],_[2]?(this.search=_[2],this.query=t?b.parse(this.search.substr(1)):this.search.substr(1)):t&&(this.search="",this.query={}),this}var y=a.exec(x);if(y){var w=(y=y[0]).toLowerCase();this.protocol=w,x=x.substr(y.length)}if(n||y||x.match(/^\/\/[^@\/]+@[^@\/]+/)){var k="//"===x.substr(0,2);!k||y&&g[y]||(x=x.substr(2),this.slashes=!0)}if(!g[y]&&(k||y&&!v[y])){for(var E,S,C=-1,T=0;T<d.length;T++){-1!==(j=x.indexOf(d[T]))&&(-1===C||j<C)&&(C=j)}-1!==(S=-1===C?x.lastIndexOf("@"):x.lastIndexOf("@",C))&&(E=x.slice(0,S),x=x.slice(S+1),this.auth=decodeURIComponent(E)),C=-1;for(T=0;T<u.length;T++){var j;-1!==(j=x.indexOf(u[T]))&&(-1===C||j<C)&&(C=j)}-1===C&&(C=x.length),this.host=x.slice(0,C),x=x.slice(C),this.parseHost(),this.hostname=this.hostname||"";var A="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!A)for(var L=this.hostname.split(/\./),I=(T=0,L.length);T<I;T++){var R=L[T];if(R&&!R.match(h)){for(var B="",O=0,U=R.length;O<U;O++)R.charCodeAt(O)>127?B+="x":B+=R[O];if(!B.match(h)){var M=L.slice(0,T),P=L.slice(T+1),N=R.match(f);N&&(M.push(N[1]),P.unshift(N[2])),P.length&&(x="/"+P.join(".")+x),this.hostname=M.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),A||(this.hostname=i.toASCII(this.hostname));var q=this.port?":"+this.port:"",H=this.hostname||"";this.host=H+q,this.href+=this.host,A&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==x[0]&&(x="/"+x))}if(!m[w])for(T=0,I=p.length;T<I;T++){var D=p[T];if(-1!==x.indexOf(D)){var F=encodeURIComponent(D);F===D&&(F=escape(D)),x=x.split(D).join(F)}}var z=x.indexOf("#");-1!==z&&(this.hash=x.substr(z),x=x.slice(0,z));var W=x.indexOf("?");if(-1!==W?(this.search=x.substr(W),this.query=x.substr(W+1),t&&(this.query=b.parse(this.query)),x=x.slice(0,W)):t&&(this.search="",this.query={}),x&&(this.pathname=x),v[w]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){q=this.pathname||"";var $=this.search||"";this.path=q+$}return this.href=this.format(),this},r.prototype.format=function(){var e=this.auth||"";e&&(e=(e=encodeURIComponent(e)).replace(/%3A/i,":"),e+="@");var t=this.protocol||"",n=this.pathname||"",i=this.hash||"",r=!1,a="";this.host?r=e+this.host:this.hostname&&(r=e+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(r+=":"+this.port)),this.query&&s.isObject(this.query)&&Object.keys(this.query).length&&(a=b.stringify(this.query));var o=this.search||a&&"?"+a||"";return t&&":"!==t.substr(-1)&&(t+=":"),this.slashes||(!t||v[t])&&!1!==r?(r="//"+(r||""),n&&"/"!==n.charAt(0)&&(n="/"+n)):r||(r=""),i&&"#"!==i.charAt(0)&&(i="#"+i),o&&"?"!==o.charAt(0)&&(o="?"+o),t+r+(n=n.replace(/[?#]/g,(function(e){return encodeURIComponent(e)})))+(o=o.replace("#","%23"))+i},r.prototype.resolve=function(e){return this.resolveObject(x(e,!1,!0)).format()},r.prototype.resolveObject=function(e){if(s.isString(e)){var t=new r;t.parse(e,!1,!0),e=t}for(var n=new r,i=Object.keys(this),a=0;a<i.length;a++){var o=i[a];n[o]=this[o]}if(n.hash=e.hash,""===e.href)return n.href=n.format(),n;if(e.slashes&&!e.protocol){for(var c=Object.keys(e),l=0;l<c.length;l++){var p=c[l];"protocol"!==p&&(n[p]=e[p])}return v[n.protocol]&&n.hostname&&!n.pathname&&(n.path=n.pathname="/"),n.href=n.format(),n}if(e.protocol&&e.protocol!==n.protocol){if(!v[e.protocol]){for(var u=Object.keys(e),d=0;d<u.length;d++){var h=u[d];n[h]=e[h]}return n.href=n.format(),n}if(n.protocol=e.protocol,e.host||g[e.protocol])n.pathname=e.pathname;else{for(var f=(e.pathname||"").split("/");f.length&&!(e.host=f.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),""!==f[0]&&f.unshift(""),f.length<2&&f.unshift(""),n.pathname=f.join("/")}if(n.search=e.search,n.query=e.query,n.host=e.host||"",n.auth=e.auth,n.hostname=e.hostname||e.host,n.port=e.port,n.pathname||n.search){var m=n.pathname||"",b=n.search||"";n.path=m+b}return n.slashes=n.slashes||e.slashes,n.href=n.format(),n}var x=n.pathname&&"/"===n.pathname.charAt(0),_=e.host||e.pathname&&"/"===e.pathname.charAt(0),y=_||x||n.host&&e.pathname,w=y,k=n.pathname&&n.pathname.split("/")||[],E=(f=e.pathname&&e.pathname.split("/")||[],n.protocol&&!v[n.protocol]);if(E&&(n.hostname="",n.port=null,n.host&&(""===k[0]?k[0]=n.host:k.unshift(n.host)),n.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(""===f[0]?f[0]=e.host:f.unshift(e.host)),e.host=null),y=y&&(""===f[0]||""===k[0])),_)n.host=e.host||""===e.host?e.host:n.host,n.hostname=e.hostname||""===e.hostname?e.hostname:n.hostname,n.search=e.search,n.query=e.query,k=f;else if(f.length)k||(k=[]),k.pop(),k=k.concat(f),n.search=e.search,n.query=e.query;else if(!s.isNullOrUndefined(e.search)){if(E)n.hostname=n.host=k.shift(),(A=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=A.shift(),n.host=n.hostname=A.shift());return n.search=e.search,n.query=e.query,s.isNull(n.pathname)&&s.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n}if(!k.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var S=k.slice(-1)[0],C=(n.host||e.host||k.length>1)&&("."===S||".."===S)||""===S,T=0,j=k.length;j>=0;j--)"."===(S=k[j])?k.splice(j,1):".."===S?(k.splice(j,1),T++):T&&(k.splice(j,1),T--);if(!y&&!w)for(;T--;T)k.unshift("..");!y||""===k[0]||k[0]&&"/"===k[0].charAt(0)||k.unshift(""),C&&"/"!==k.join("/").substr(-1)&&k.push("");var A,L=""===k[0]||k[0]&&"/"===k[0].charAt(0);E&&(n.hostname=n.host=L?"":k.length?k.shift():"",(A=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=A.shift(),n.host=n.hostname=A.shift()));return(y=y||n.host&&k.length)&&!L&&k.unshift(""),k.length?n.pathname=k.join("/"):(n.pathname=null,n.path=null),s.isNull(n.pathname)&&s.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=e.auth||n.auth,n.slashes=n.slashes||e.slashes,n.href=n.format(),n},r.prototype.parseHost=function(){var e=this.host,t=o.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},{"./util":298,punycode:188,querystring:191}],298:[function(e,t,n){"use strict";t.exports={isString:function(e){return"string"==typeof e},isObject:function(e){return"object"==typeof e&&null!==e},isNull:function(e){return null===e},isNullOrUndefined:function(e){return null==e}}},{}],299:[function(e,t,n){(function(n){(function(){
|
||
/*! ut_metadata. MIT License. WebTorrent LLC <https://webtorrent.io/opensource> */
|
||
const{EventEmitter:i}=e("events"),s=e("bencode"),r=e("bitfield").default,a=e("debug")("ut_metadata"),o=e("simple-sha1"),c=16384;t.exports=e=>{class t extends i{constructor(t){super(),this._wire=t,this._fetching=!1,this._metadataComplete=!1,this._metadataSize=null,this._remainingRejects=null,this._bitfield=new r(0,{grow:1e3}),n.isBuffer(e)&&this.setMetadata(e)}onHandshake(e,t,n){this._infoHash=e}onExtendedHandshake(e){return e.m&&e.m.ut_metadata?e.metadata_size?"number"!=typeof e.metadata_size||1e7<e.metadata_size||e.metadata_size<=0?this.emit("warning",new Error("Peer gave invalid metadata size")):(this._metadataSize=e.metadata_size,this._numPieces=Math.ceil(this._metadataSize/c),this._remainingRejects=2*this._numPieces,void this._requestPieces()):this.emit("warning",new Error("Peer does not have metadata")):this.emit("warning",new Error("Peer does not support ut_metadata"))}onMessage(e){let t,n;try{const i=e.toString(),r=i.indexOf("ee")+2;t=s.decode(i.substring(0,r)),n=e.slice(r)}catch(e){return}switch(t.msg_type){case 0:this._onRequest(t.piece);break;case 1:this._onData(t.piece,n,t.total_size);break;case 2:this._onReject(t.piece)}}fetch(){this._metadataComplete||(this._fetching=!0,this._metadataSize&&this._requestPieces())}cancel(){this._fetching=!1}setMetadata(e){if(this._metadataComplete)return!0;a("set metadata");try{const t=s.decode(e).info;t&&(e=s.encode(t))}catch(e){}return(!this._infoHash||this._infoHash===o.sync(e))&&(this.cancel(),this.metadata=e,this._metadataComplete=!0,this._metadataSize=this.metadata.length,this._wire.extendedHandshake.metadata_size=this._metadataSize,this.emit("metadata",s.encode({info:s.decode(this.metadata)})),!0)}_send(e,t){let i=s.encode(e);n.isBuffer(t)&&(i=n.concat([i,t])),this._wire.extended("ut_metadata",i)}_request(e){this._send({msg_type:0,piece:e})}_data(e,t,n){const i={msg_type:1,piece:e};"number"==typeof n&&(i.total_size=n),this._send(i,t)}_reject(e){this._send({msg_type:2,piece:e})}_onRequest(e){if(!this._metadataComplete)return void this._reject(e);const t=e*c;let n=t+c;n>this._metadataSize&&(n=this._metadataSize);const i=this.metadata.slice(t,n);this._data(e,i,this._metadataSize)}_onData(e,t,n){t.length>c||!this._fetching||(t.copy(this.metadata,e*c),this._bitfield.set(e),this._checkDone())}_onReject(e){this._remainingRejects>0&&this._fetching?(this._request(e),this._remainingRejects-=1):this.emit("warning",new Error('Peer sent "reject" too much'))}_requestPieces(){if(this._fetching){this.metadata=n.alloc(this._metadataSize);for(let e=0;e<this._numPieces;e++)this._request(e)}}_checkDone(){let e=!0;for(let t=0;t<this._numPieces;t++)if(!this._bitfield.get(t)){e=!1;break}if(!e)return;this.setMetadata(this.metadata)||this._failedMetadata()}_failedMetadata(){this._bitfield=new r(0,{grow:1e3}),this._remainingRejects-=this._numPieces,this._remainingRejects>0?this._requestPieces():this.emit("warning",new Error("Peer sent invalid metadata"))}}return t.prototype.name="ut_metadata",t}}).call(this)}).call(this,e("buffer").Buffer)},{bencode:6,bitfield:300,buffer:59,debug:301,events:97,"simple-sha1":241}],300:[function(e,t,n){arguments[4][11][0].apply(n,arguments)},{dup:11}],301:[function(e,t,n){arguments[4][12][0].apply(n,arguments)},{"./common":302,_process:186,dup:12}],302:[function(e,t,n){arguments[4][13][0].apply(n,arguments)},{dup:13,ms:303}],303:[function(e,t,n){arguments[4][14][0].apply(n,arguments)},{dup:14}],304:[function(e,t,n){(function(e){(function(){function n(t){try{if(!e.localStorage)return!1}catch(e){return!1}var n=e.localStorage[t];return null!=n&&"true"===String(n).toLowerCase()}t.exports=function(e,t){if(n("noDeprecation"))return e;var i=!1;return function(){if(!i){if(n("throwDeprecation"))throw new Error(t);n("traceDeprecation")?console.trace(t):console.warn(t),i=!0}return e.apply(this,arguments)}}}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],305:[function(e,t,n){(function(n){(function(){const i=e("binary-search"),s=e("events"),r=e("mp4-stream"),a=e("mp4-box-encoding"),o=e("range-slice-stream");class c{constructor(e,t){this._entries=e,this._countName=t||"count",this._index=0,this._offset=0,this.value=this._entries[0]}inc(){this._offset++,this._offset>=this._entries[this._index][this._countName]&&(this._index++,this._offset=0),this.value=this._entries[this._index]}}const l=1;t.exports=class extends s{constructor(e){super(),this._tracks=[],this._file=e,this._decoder=null,this._findMoov(0)}_findMoov(e){this._decoder&&this._decoder.destroy();let t=0;this._decoder=r.decode();const n=this._file.createReadStream({start:e});n.pipe(this._decoder);const i=s=>{"moov"===s.type?(this._decoder.removeListener("box",i),this._decoder.decode((e=>{n.destroy();try{this._processMoov(e)}catch(e){e.message="Cannot parse mp4 file: "+e.message,this.emit("error",e)}}))):s.length<4096?(t+=s.length,this._decoder.ignore()):(this._decoder.removeListener("box",i),t+=s.length,n.destroy(),this._decoder.destroy(),this._findMoov(e+t))};this._decoder.on("box",i)}_processMoov(e){const t=e.traks;this._tracks=[],this._hasVideo=!1,this._hasAudio=!1;for(let n=0;n<t.length;n++){const s=t[n],r=s.mdia.minf.stbl,a=r.stsd.entries[0],o=s.mdia.hdlr.handlerType;let l,p;if("vide"===o&&"avc1"===a.type){if(this._hasVideo)continue;this._hasVideo=!0,l="avc1",a.avcC&&(l+="."+a.avcC.mimeCodec),p=`video/mp4; codecs="${l}"`}else{if("soun"!==o||"mp4a"!==a.type)continue;if(this._hasAudio)continue;this._hasAudio=!0,l="mp4a",a.esds&&a.esds.mimeCodec&&(l+="."+a.esds.mimeCodec),p=`audio/mp4; codecs="${l}"`}const u=[];let d=0,h=0,f=0,m=0,g=0,v=0;const b=new c(r.stts.entries);let x=null;r.ctts&&(x=new c(r.ctts.entries));let _=0;for(;;){var i=r.stsc.entries[g];const e=r.stsz.entries[d],t=b.value.duration,n=x?x.value.compositionOffset:0;let s=!0;r.stss&&(s=r.stss.entries[_]===d+1);const a=r.stco||r.co64;if(u.push({size:e,duration:t,dts:v,presentationOffset:n,sync:s,offset:m+a.entries[f]}),d++,d>=r.stsz.entries.length)break;if(h++,m+=e,h>=i.samplesPerChunk){h=0,m=0,f++;const e=r.stsc.entries[g+1];e&&f+1>=e.firstChunk&&g++}v+=t,b.inc(),x&&x.inc(),s&&_++}s.mdia.mdhd.duration=0,s.tkhd.duration=0;const y=i.sampleDescriptionId,w={type:"moov",mvhd:e.mvhd,traks:[{tkhd:s.tkhd,mdia:{mdhd:s.mdia.mdhd,hdlr:s.mdia.hdlr,elng:s.mdia.elng,minf:{vmhd:s.mdia.minf.vmhd,smhd:s.mdia.minf.smhd,dinf:s.mdia.minf.dinf,stbl:{stsd:r.stsd,stts:{version:0,flags:0,entries:[]},ctts:{version:0,flags:0,entries:[]},stsc:{version:0,flags:0,entries:[]},stsz:{version:0,flags:0,entries:[]},stco:{version:0,flags:0,entries:[]},stss:{version:0,flags:0,entries:[]}}}}}],mvex:{mehd:{fragmentDuration:e.mvhd.duration},trexs:[{trackId:s.tkhd.trackId,defaultSampleDescriptionIndex:y,defaultSampleDuration:0,defaultSampleSize:0,defaultSampleFlags:0}]}};this._tracks.push({fragmentSequence:1,trackId:s.tkhd.trackId,timeScale:s.mdia.mdhd.timeScale,samples:u,currSample:null,currTime:null,moov:w,mime:p})}if(0===this._tracks.length)return void this.emit("error",new Error("no playable tracks"));e.mvhd.duration=0,this._ftyp={type:"ftyp",brand:"iso5",brandVersion:0,compatibleBrands:["iso5"]};const s=a.encode(this._ftyp),r=this._tracks.map((e=>{const t=a.encode(e.moov);return{mime:e.mime,init:n.concat([s,t])}}));this.emit("ready",r)}seek(e){if(!this._tracks)throw new Error("Not ready yet; wait for 'ready' event");this._fileStream&&(this._fileStream.destroy(),this._fileStream=null);let t=-1;if(this._tracks.map(((n,i)=>{n.outStream&&n.outStream.destroy(),n.inStream&&(n.inStream.destroy(),n.inStream=null);const s=n.outStream=r.encode(),a=this._generateFragment(i,e);if(!a)return s.finalize();(-1===t||a.ranges[0].start<t)&&(t=a.ranges[0].start);const o=e=>{s.destroyed||s.box(e.moof,(t=>{if(t)return this.emit("error",t);if(s.destroyed)return;n.inStream.slice(e.ranges).pipe(s.mediaData(e.length,(e=>{if(e)return this.emit("error",e);if(s.destroyed)return;const t=this._generateFragment(i);if(!t)return s.finalize();o(t)})))}))};o(a)})),t>=0){const e=this._fileStream=this._file.createReadStream({start:t});this._tracks.forEach((n=>{n.inStream=new o(t,{highWaterMark:1e7}),e.pipe(n.inStream)}))}return this._tracks.map((e=>e.outStream))}_findSampleBefore(e,t){const n=this._tracks[e],s=Math.floor(n.timeScale*t);let r=i(n.samples,s,((e,t)=>e.dts+e.presentationOffset-t));for(-1===r?r=0:r<0&&(r=-r-2);!n.samples[r].sync;)r--;return r}_generateFragment(e,t){const n=this._tracks[e];let i;if(i=void 0!==t?this._findSampleBefore(e,t):n.currSample,i>=n.samples.length)return null;const s=n.samples[i].dts;let r=0;const a=[];for(var o=i;o<n.samples.length;o++){const e=n.samples[o];if(e.sync&&e.dts-s>=n.timeScale*l)break;r+=e.size;const t=a.length-1;t<0||a[t].end!==e.offset?a.push({start:e.offset,end:e.offset+e.size}):a[t].end+=e.size}return n.currSample=o,{moof:this._generateMoof(e,i,o),ranges:a,length:r}}_generateMoof(e,t,n){const i=this._tracks[e],s=[];let r=0;for(let e=t;e<n;e++){const t=i.samples[e];t.presentationOffset<0&&(r=1),s.push({sampleDuration:t.duration,sampleSize:t.size,sampleFlags:t.sync?33554432:16842752,sampleCompositionTimeOffset:t.presentationOffset})}const o={type:"moof",mfhd:{sequenceNumber:i.fragmentSequence++},trafs:[{tfhd:{flags:131072,trackId:i.trackId},tfdt:{baseMediaDecodeTime:i.samples[t].dts},trun:{flags:3841,dataOffset:8,entries:s,version:r}}]};return o.trafs[0].trun.dataOffset+=a.encodingLength(o),o}}}).call(this)}).call(this,e("buffer").Buffer)},{"binary-search":8,buffer:59,events:97,"mp4-box-encoding":146,"mp4-stream":149,"range-slice-stream":195}],306:[function(e,t,n){const i=e("mediasource"),s=e("pump"),r=e("./mp4-remuxer");function a(e,t,n={}){if(!(this instanceof a))return console.warn("don't invoked VideoStream without 'new'"),new a(e,t,n);this.detailedError=null,this._elem=t,this._elemWrapper=new i(t),this._waitingFired=!1,this._trackMeta=null,this._file=e,this._tracks=null,"none"!==this._elem.preload&&this._createMuxer(),this._onError=()=>{this.detailedError=this._elemWrapper.detailedError,this.destroy()},this._onWaiting=()=>{this._waitingFired=!0,this._muxer?this._tracks&&this._pump():this._createMuxer()},t.autoplay&&(t.preload="auto"),t.addEventListener("waiting",this._onWaiting),t.addEventListener("error",this._onError)}a.prototype={_createMuxer(){this._muxer=new r(this._file),this._muxer.on("ready",(e=>{this._tracks=e.map((e=>{const t=this._elemWrapper.createWriteStream(e.mime);t.on("error",(e=>{this._elemWrapper.error(e)}));const n={muxed:null,mediaSource:t,initFlushed:!1,onInitFlushed:null};return t.write(e.init,(e=>{n.initFlushed=!0,n.onInitFlushed&&n.onInitFlushed(e)})),n})),(this._waitingFired||"auto"===this._elem.preload)&&this._pump()})),this._muxer.on("error",(e=>{this._elemWrapper.error(e)}))},_pump(){const e=this._muxer.seek(this._elem.currentTime,!this._tracks);this._tracks.forEach(((t,n)=>{const i=()=>{t.muxed&&(t.muxed.destroy(),t.mediaSource=this._elemWrapper.createWriteStream(t.mediaSource),t.mediaSource.on("error",(e=>{this._elemWrapper.error(e)}))),t.muxed=e[n],s(t.muxed,t.mediaSource)};t.initFlushed?i():t.onInitFlushed=e=>{e?this._elemWrapper.error(e):i()}}))},destroy(){this.destroyed||(this.destroyed=!0,this._elem.removeEventListener("waiting",this._onWaiting),this._elem.removeEventListener("error",this._onError),this._tracks&&this._tracks.forEach((e=>{e.muxed&&e.muxed.destroy()})),this._elem.src="")}},t.exports=a},{"./mp4-remuxer":305,mediasource:124,pump:187}],307:[function(e,t,n){(function(n,i,s){(function(){
|
||
/*! webtorrent. MIT License. WebTorrent LLC <https://webtorrent.io/opensource> */
|
||
const{EventEmitter:r}=e("events"),a=e("simple-concat"),o=e("create-torrent"),c=e("debug")("webtorrent"),l=e("bittorrent-dht/client"),p=e("load-ip-set"),u=e("run-parallel"),d=e("parse-torrent"),h=e("path"),f=e("simple-peer"),m=e("randombytes"),g=e("speedometer"),v=e("./lib/conn-pool"),b=e("./lib/torrent"),x=e("./package.json").version,_=x.replace(/\d*./g,(e=>("0"+e%100).slice(-2))).slice(0,4),y=`-WW${_}-`;class w extends r{constructor(e={}){super(),"string"==typeof e.peerId?this.peerId=e.peerId:s.isBuffer(e.peerId)?this.peerId=e.peerId.toString("hex"):this.peerId=s.from(y+m(9).toString("base64")).toString("hex"),this.peerIdBuffer=s.from(this.peerId,"hex"),"string"==typeof e.nodeId?this.nodeId=e.nodeId:s.isBuffer(e.nodeId)?this.nodeId=e.nodeId.toString("hex"):this.nodeId=m(20).toString("hex"),this.nodeIdBuffer=s.from(this.nodeId,"hex"),this._debugId=this.peerId.toString("hex").substring(0,7),this.destroyed=!1,this.listening=!1,this.torrentPort=e.torrentPort||0,this.dhtPort=e.dhtPort||0,this.tracker=void 0!==e.tracker?e.tracker:{},this.torrents=[],this.maxConns=Number(e.maxConns)||55,this.utp=!0===e.utp,this._debug("new webtorrent (peerId %s, nodeId %s, port %s)",this.peerId,this.nodeId,this.torrentPort),this.tracker&&("object"!=typeof this.tracker&&(this.tracker={}),e.rtcConfig&&(console.warn("WebTorrent: opts.rtcConfig is deprecated. Use opts.tracker.rtcConfig instead"),this.tracker.rtcConfig=e.rtcConfig),e.wrtc&&(console.warn("WebTorrent: opts.wrtc is deprecated. Use opts.tracker.wrtc instead"),this.tracker.wrtc=e.wrtc),i.WRTC&&!this.tracker.wrtc&&(this.tracker.wrtc=i.WRTC)),"function"==typeof v?this._connPool=new v(this):n.nextTick((()=>{this._onListening()})),this._downloadSpeed=g(),this._uploadSpeed=g(),!1!==e.dht&&"function"==typeof l?(this.dht=new l(Object.assign({},{nodeId:this.nodeId},e.dht)),this.dht.once("error",(e=>{this._destroy(e)})),this.dht.once("listening",(()=>{const e=this.dht.address();e&&(this.dhtPort=e.port)})),this.dht.setMaxListeners(0),this.dht.listen(this.dhtPort)):this.dht=!1,this.enableWebSeeds=!1!==e.webSeeds;const t=()=>{this.destroyed||(this.ready=!0,this.emit("ready"))};"function"==typeof p&&null!=e.blocklist?p(e.blocklist,{headers:{"user-agent":`WebTorrent/${x} (https://webtorrent.io)`}},((e,n)=>{if(e)return this.error("Failed to load blocklist: "+e.message);this.blocked=n,t()})):n.nextTick(t)}get downloadSpeed(){return this._downloadSpeed()}get uploadSpeed(){return this._uploadSpeed()}get progress(){const e=this.torrents.filter((e=>1!==e.progress));return e.reduce(((e,t)=>e+t.downloaded),0)/(e.reduce(((e,t)=>e+(t.length||0)),0)||1)}get ratio(){return this.torrents.reduce(((e,t)=>e+t.uploaded),0)/(this.torrents.reduce(((e,t)=>e+t.received),0)||1)}get(e){if(e instanceof b){if(this.torrents.includes(e))return e}else{let t;try{t=d(e)}catch(e){}if(!t)return null;if(!t.infoHash)throw new Error("Invalid torrent identifier");for(const e of this.torrents)if(e.infoHash===t.infoHash)return e}return null}download(e,t,n){return console.warn("WebTorrent: client.download() is deprecated. Use client.add() instead"),this.add(e,t,n)}add(e,t={},n=(()=>{})){if(this.destroyed)throw new Error("client is destroyed");"function"==typeof t&&([t,n]=[{},t]);const i=()=>{if(!this.destroyed)for(const e of this.torrents)if(e.infoHash===r.infoHash&&e!==r)return void r._destroy(new Error("Cannot add duplicate torrent "+r.infoHash))},s=()=>{this.destroyed||(n(r),this.emit("torrent",r))};this._debug("add"),t=t?Object.assign({},t):{};const r=new b(e,this,t);return this.torrents.push(r),r.once("_infoHash",i),r.once("ready",s),r.once("close",(function e(){r.removeListener("_infoHash",i),r.removeListener("ready",s),r.removeListener("close",e)})),r}seed(e,t,n){if(this.destroyed)throw new Error("client is destroyed");"function"==typeof t&&([t,n]=[{},t]),this._debug("seed"),(t=t?Object.assign({},t):{}).skipVerify=!0;const i="string"==typeof e;i&&(t.path=h.dirname(e)),t.createdBy||(t.createdBy="WebTorrent/"+_);const s=e=>{this._debug("on seed"),"function"==typeof n&&n(e),e.emit("seed"),this.emit("seed",e)},r=this.add(null,t,(e=>{const t=[t=>{if(i)return t();e.load(c,t)}];this.dht&&t.push((t=>{e.once("dhtAnnounce",t)})),u(t,(t=>{if(!this.destroyed)return t?e._destroy(t):void s(e)}))}));let c;var l;return l=e,"undefined"!=typeof FileList&&l instanceof FileList?e=Array.from(e):Array.isArray(e)||(e=[e]),u(e.map((e=>t=>{!function(e){return"object"==typeof e&&null!=e&&"function"==typeof e.pipe}(e)?t(null,e):a(e,t)})),((e,n)=>{if(!this.destroyed)return e?r._destroy(e):void o.parseInput(n,t,((e,i)=>{if(!this.destroyed){if(e)return r._destroy(e);c=i.map((e=>e.getStream)),o(n,t,((e,t)=>{if(this.destroyed)return;if(e)return r._destroy(e);const n=this.get(t);n?r._destroy(new Error("Cannot add duplicate torrent "+n.infoHash)):r._onTorrentId(t)}))}}))})),r}remove(e,t,n){if("function"==typeof t)return this.remove(e,null,t);this._debug("remove");if(!this.get(e))throw new Error("No torrent with id "+e);this._remove(e,t,n)}_remove(e,t,n){if("function"==typeof t)return this._remove(e,null,t);const i=this.get(e);i&&(this.torrents.splice(this.torrents.indexOf(i),1),i.destroy(t,n))}address(){return this.listening?this._connPool?this._connPool.tcpServer.address():{address:"0.0.0.0",family:"IPv4",port:0}:null}destroy(e){if(this.destroyed)throw new Error("client already destroyed");this._destroy(null,e)}_destroy(e,t){this._debug("client destroy"),this.destroyed=!0;const n=this.torrents.map((e=>t=>{e.destroy(t)}));this._connPool&&n.push((e=>{this._connPool.destroy(e)})),this.dht&&n.push((e=>{this.dht.destroy(e)})),u(n,t),e&&this.emit("error",e),this.torrents=[],this._connPool=null,this.dht=null}_onListening(){if(this._debug("listening"),this.listening=!0,this._connPool){const e=this._connPool.tcpServer.address();e&&(this.torrentPort=e.port)}this.emit("listening")}_debug(){const e=[].slice.call(arguments);e[0]=`[${this._debugId}] ${e[0]}`,c(...e)}}w.WEBRTC_SUPPORT=f.WEBRTC_SUPPORT,w.VERSION=x,t.exports=w}).call(this)}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer)},{"./lib/conn-pool":54,"./lib/torrent":312,"./package.json":332,_process:186,"bittorrent-dht/client":54,buffer:59,"create-torrent":79,debug:314,events:97,"load-ip-set":54,"parse-torrent":183,path:184,randombytes:194,"run-parallel":217,"simple-concat":220,"simple-peer":222,speedometer:262}],308:[function(e,t,n){const i=e("debug")("webtorrent:file-stream"),s=e("readable-stream");class r extends s.Readable{constructor(e,t){super(t),this.destroyed=!1,this._torrent=e._torrent;const n=t&&t.start||0,i=t&&t.end&&t.end<e.length?t.end:e.length-1,s=e._torrent.pieceLength;this._startPiece=(n+e.offset)/s|0,this._endPiece=(i+e.offset)/s|0,this._piece=this._startPiece,this._offset=n+e.offset-this._startPiece*s,this._missing=i-n+1,this._reading=!1,this._notifying=!1,this._criticalLength=Math.min(1048576/s|0,2)}_read(){this._reading||(this._reading=!0,this._notify())}_notify(){if(!this._reading||0===this._missing)return;if(!this._torrent.bitfield.get(this._piece))return this._torrent.critical(this._piece,this._piece+this._criticalLength);if(this._notifying)return;if(this._notifying=!0,this._torrent.destroyed)return this._destroy(new Error("Torrent removed"));const e=this._piece;this._torrent.store.get(e,((t,n)=>{if(this._notifying=!1,!this.destroyed){if(i("read %s (length %s) (err %s)",e,n.length,t&&t.message),t)return this._destroy(t);this._offset&&(n=n.slice(this._offset),this._offset=0),this._missing<n.length&&(n=n.slice(0,this._missing)),this._missing-=n.length,i("pushing buffer of length %s",n.length),this._reading=!1,this.push(n),0===this._missing&&this.push(null)}})),this._piece+=1}destroy(e){this._destroy(null,e)}_destroy(e,t){this.destroyed||(this.destroyed=!0,this._torrent.destroyed||this._torrent.deselect(this._startPiece,this._endPiece,!0),e&&this.emit("error",e),this.emit("close"),t&&t())}}t.exports=r},{debug:314,"readable-stream":331}],309:[function(e,t,n){(function(n){(function(){const{EventEmitter:i}=e("events"),{PassThrough:s}=e("readable-stream"),r=e("end-of-stream"),a=e("path"),o=e("render-media"),c=e("stream-to-blob"),l=e("stream-to-blob-url"),p=e("stream-with-known-length-to-buffer"),u=e("./file-stream");t.exports=class extends i{constructor(e,t){super(),this._torrent=e,this._destroyed=!1,this.name=t.name,this.path=t.path,this.length=t.length,this.offset=t.offset,this.done=!1;const n=t.offset,i=n+t.length-1;this._startPiece=n/this._torrent.pieceLength|0,this._endPiece=i/this._torrent.pieceLength|0,0===this.length&&(this.done=!0,this.emit("done"))}get downloaded(){if(!this._torrent.bitfield)return 0;const{pieces:e,bitfield:t,pieceLength:n}=this._torrent,{_startPiece:i,_endPiece:s}=this,r=e[i],a=this.offset%n;let o=t.get(i)?n-a:Math.max(n-a-r.missing,0);for(let r=i+1;r<=s;++r)if(t.get(r))o+=n;else{o+=n-e[r].missing}return Math.min(o,this.length)}get progress(){return this.length?this.downloaded/this.length:0}select(e){0!==this.length&&this._torrent.select(this._startPiece,this._endPiece,e)}deselect(){0!==this.length&&this._torrent.deselect(this._startPiece,this._endPiece,!1)}createReadStream(e){if(0===this.length){const e=new s;return n.nextTick((()=>{e.end()})),e}const t=new u(this,e);return this._torrent.select(t._startPiece,t._endPiece,!0,(()=>{t._notify()})),r(t,(()=>{this._destroyed||this._torrent.destroyed||this._torrent.deselect(t._startPiece,t._endPiece,!0)})),t}getBuffer(e){p(this.createReadStream(),this.length,e)}getBlob(e){if("undefined"==typeof window)throw new Error("browser-only method");c(this.createReadStream(),this._getMimeType()).then((t=>e(null,t)),(t=>e(t)))}getBlobURL(e){if("undefined"==typeof window)throw new Error("browser-only method");l(this.createReadStream(),this._getMimeType()).then((t=>e(null,t)),(t=>e(t)))}appendTo(e,t,n){if("undefined"==typeof window)throw new Error("browser-only method");o.append(this,e,t,n)}renderTo(e,t,n){if("undefined"==typeof window)throw new Error("browser-only method");o.render(this,e,t,n)}_getMimeType(){return o.mime[a.extname(this.name).toLowerCase()]}_destroy(){this._destroyed=!0,this._torrent=null}}}).call(this)}).call(this,e("_process"))},{"./file-stream":308,_process:186,"end-of-stream":95,events:97,path:184,"readable-stream":331,"render-media":211,"stream-to-blob":283,"stream-to-blob-url":282,"stream-with-known-length-to-buffer":284}],310:[function(e,t,n){const i=e("unordered-array-remove"),s=e("debug")("webtorrent:peer"),r=e("bittorrent-protocol"),a=e("./webconn");n.createWebRTCPeer=(e,t)=>{const n=new l(e.id,"webrtc");return n.conn=e,n.swarm=t,n.conn.connected?n.onConnect():(n.conn.once("connect",(()=>{n.onConnect()})),n.conn.once("error",(e=>{n.destroy(e)})),n.startConnectTimeout()),n},n.createTCPIncomingPeer=e=>o(e,"tcpIncoming"),n.createUTPIncomingPeer=e=>o(e,"utpIncoming"),n.createTCPOutgoingPeer=(e,t)=>c(e,t,"tcpOutgoing"),n.createUTPOutgoingPeer=(e,t)=>c(e,t,"utpOutgoing");const o=(e,t)=>{const n=`${e.remoteAddress}:${e.remotePort}`,i=new l(n,t);return i.conn=e,i.addr=n,i.onConnect(),i},c=(e,t,n)=>{const i=new l(e,n);return i.addr=e,i.swarm=t,i};n.createWebSeedPeer=(e,t)=>{const n=new l(e,"webSeed");return n.swarm=t,n.conn=new a(e,t),n.onConnect(),n};class l{constructor(e,t){this.id=e,this.type=t,s("new %s Peer %s",t,e),this.addr=null,this.conn=null,this.swarm=null,this.wire=null,this.connected=!1,this.destroyed=!1,this.timeout=null,this.retries=0,this.sentHandshake=!1}onConnect(){if(this.destroyed)return;this.connected=!0,s("Peer %s connected",this.id),clearTimeout(this.connectTimeout);const e=this.conn;e.once("end",(()=>{this.destroy()})),e.once("close",(()=>{this.destroy()})),e.once("finish",(()=>{this.destroy()})),e.once("error",(e=>{this.destroy(e)}));const t=this.wire=new r;t.type=this.type,t.once("end",(()=>{this.destroy()})),t.once("close",(()=>{this.destroy()})),t.once("finish",(()=>{this.destroy()})),t.once("error",(e=>{this.destroy(e)})),t.once("handshake",((e,t)=>{this.onHandshake(e,t)})),this.startHandshakeTimeout(),e.pipe(t).pipe(e),this.swarm&&!this.sentHandshake&&this.handshake()}onHandshake(e,t){if(!this.swarm)return;if(this.destroyed)return;if(this.swarm.destroyed)return this.destroy(new Error("swarm already destroyed"));if(e!==this.swarm.infoHash)return this.destroy(new Error("unexpected handshake info hash for this swarm"));if(t===this.swarm.peerId)return this.destroy(new Error("refusing to connect to ourselves"));s("Peer %s got handshake %s",this.id,e),clearTimeout(this.handshakeTimeout),this.retries=0;let n=this.addr;!n&&this.conn.remoteAddress&&this.conn.remotePort&&(n=`${this.conn.remoteAddress}:${this.conn.remotePort}`),this.swarm._onWire(this.wire,n),this.swarm&&!this.swarm.destroyed&&(this.sentHandshake||this.handshake())}handshake(){const e={dht:!this.swarm.private&&!!this.swarm.client.dht};this.wire.handshake(this.swarm.infoHash,this.swarm.client.peerId,e),this.sentHandshake=!0}startConnectTimeout(){clearTimeout(this.connectTimeout);const e={webrtc:25e3,tcpOutgoing:5e3,utpOutgoing:5e3};this.connectTimeout=setTimeout((()=>{this.destroy(new Error("connect timeout"))}),e[this.type]),this.connectTimeout.unref&&this.connectTimeout.unref()}startHandshakeTimeout(){clearTimeout(this.handshakeTimeout),this.handshakeTimeout=setTimeout((()=>{this.destroy(new Error("handshake timeout"))}),25e3),this.handshakeTimeout.unref&&this.handshakeTimeout.unref()}destroy(e){if(this.destroyed)return;this.destroyed=!0,this.connected=!1,s("destroy %s %s (error: %s)",this.type,this.id,e&&(e.message||e)),clearTimeout(this.connectTimeout),clearTimeout(this.handshakeTimeout);const t=this.swarm,n=this.conn,r=this.wire;this.swarm=null,this.conn=null,this.wire=null,t&&r&&i(t.wires,t.wires.indexOf(r)),n&&(n.on("error",(()=>{})),n.destroy()),r&&r.destroy(),t&&t.removePeer(this.id)}}},{"./webconn":313,"bittorrent-protocol":10,debug:314,"unordered-array-remove":296}],311:[function(e,t,n){t.exports=class{constructor(e){this._torrent=e,this._numPieces=e.pieces.length,this._pieces=new Array(this._numPieces),this._onWire=e=>{this.recalculate(),this._initWire(e)},this._onWireHave=e=>{this._pieces[e]+=1},this._onWireBitfield=()=>{this.recalculate()},this._torrent.wires.forEach((e=>{this._initWire(e)})),this._torrent.on("wire",this._onWire),this.recalculate()}getRarestPiece(e){let t=[],n=1/0;for(let i=0;i<this._numPieces;++i){if(e&&!e(i))continue;const s=this._pieces[i];s===n?t.push(i):s<n&&(t=[i],n=s)}return t.length?t[Math.random()*t.length|0]:-1}destroy(){this._torrent.removeListener("wire",this._onWire),this._torrent.wires.forEach((e=>{this._cleanupWireEvents(e)})),this._torrent=null,this._pieces=null,this._onWire=null,this._onWireHave=null,this._onWireBitfield=null}_initWire(e){e._onClose=()=>{this._cleanupWireEvents(e);for(let t=0;t<this._numPieces;++t)this._pieces[t]-=e.peerPieces.get(t)},e.on("have",this._onWireHave),e.on("bitfield",this._onWireBitfield),e.once("close",e._onClose)}recalculate(){this._pieces.fill(0);for(const e of this._torrent.wires)for(let t=0;t<this._numPieces;++t)this._pieces[t]+=e.peerPieces.get(t)}_cleanupWireEvents(e){e.removeListener("have",this._onWireHave),e.removeListener("bitfield",this._onWireBitfield),e._onClose&&e.removeListener("close",e._onClose),e._onClose=null}}},{}],312:[function(e,t,n){(function(n,i){(function(){const s=e("addr-to-ip-port"),r=e("bitfield"),a=e("chunk-store-stream/write"),o=e("debug")("webtorrent:torrent"),c=e("torrent-discovery"),l=e("events").EventEmitter,p=e("fs"),u=e("fs-chunk-store"),d=e("simple-get"),h=e("immediate-chunk-store"),f=e("multistream"),m=e("net"),g=e("os"),v=e("run-parallel"),b=e("run-parallel-limit"),x=e("parse-torrent"),_=e("path"),y=e("torrent-piece"),w=e("pump"),k=e("random-iterate"),E=e("simple-sha1"),S=e("speedometer"),C=e("ut_metadata"),T=e("ut_pex"),j=e("utp-native"),A=e("./file"),L=e("./peer"),I=e("./rarity-map"),R=e("./server"),B=5e3,O=3*y.BLOCK_LENGTH,U=n.browser?1/0:2,M=[1e3,5e3,15e3],P=`WebTorrent/${e("../package.json").version} (https://webtorrent.io)`;let N;try{N=_.join(p.statSync("/tmp")&&"/tmp","webtorrent")}catch(e){N=_.join("function"==typeof g.tmpdir?g.tmpdir():"/","webtorrent")}function q(e,t){return 2+Math.ceil(t*e.downloadSpeed()/y.BLOCK_LENGTH)}function H(){}t.exports=class extends l{constructor(e,t,n){super(),this._debugId="unknown infohash",this.client=t,this.announce=n.announce,this.urlList=n.urlList,this.path=n.path,this.skipVerify=!!n.skipVerify,this._store=n.store||u,this._getAnnounceOpts=n.getAnnounceOpts,"boolean"==typeof n.private&&(this.private=n.private),this.strategy=n.strategy||"sequential",this.maxWebConns=n.maxWebConns||4,this._rechokeNumSlots=!1===n.uploads||0===n.uploads?0:+n.uploads||10,this._rechokeOptimisticWire=null,this._rechokeOptimisticTime=0,this._rechokeIntervalId=null,this.ready=!1,this.destroyed=!1,this.paused=!1,this.done=!1,this.metadata=null,this.store=null,this.files=[],this.pieces=[],this._amInterested=!1,this._selections=[],this._critical=[],this.wires=[],this._queue=[],this._peers={},this._peersLength=0,this.received=0,this.uploaded=0,this._downloadSpeed=S(),this._uploadSpeed=S(),this._servers=[],this._xsRequests=[],this._fileModtimes=n.fileModtimes,null!==e&&this._onTorrentId(e),this._debug("new torrent")}get timeRemaining(){return this.done?0:0===this.downloadSpeed?1/0:(this.length-this.downloaded)/this.downloadSpeed*1e3}get downloaded(){if(!this.bitfield)return 0;let e=0;for(let t=0,n=this.pieces.length;t<n;++t)if(this.bitfield.get(t))e+=t===n-1?this.lastPieceLength:this.pieceLength;else{const n=this.pieces[t];e+=n.length-n.missing}return e}get downloadSpeed(){return this._downloadSpeed()}get uploadSpeed(){return this._uploadSpeed()}get progress(){return this.length?this.downloaded/this.length:0}get ratio(){return this.uploaded/(this.received||this.length)}get numPeers(){return this.wires.length}get torrentFileBlobURL(){if("undefined"==typeof window)throw new Error("browser-only property");return this.torrentFile?URL.createObjectURL(new Blob([this.torrentFile],{type:"application/x-bittorrent"})):null}get _numQueued(){return this._queue.length+(this._peersLength-this._numConns)}get _numConns(){let e=0;for(const t in this._peers)this._peers[t].connected&&(e+=1);return e}get swarm(){return console.warn("WebTorrent: `torrent.swarm` is deprecated. Use `torrent` directly instead."),this}_onTorrentId(e){if(this.destroyed)return;let t;try{t=x(e)}catch(e){}t?(this.infoHash=t.infoHash,this._debugId=t.infoHash.toString("hex").substring(0,7),n.nextTick((()=>{this.destroyed||this._onParsedTorrent(t)}))):x.remote(e,((e,t)=>{if(!this.destroyed)return e?this._destroy(e):void this._onParsedTorrent(t)}))}_onParsedTorrent(e){if(!this.destroyed){if(this._processParsedTorrent(e),!this.infoHash)return this._destroy(new Error("Malformed torrent data: No info hash"));this.path||(this.path=_.join(N,this.infoHash)),this._rechokeIntervalId=setInterval((()=>{this._rechoke()}),1e4),this._rechokeIntervalId.unref&&this._rechokeIntervalId.unref(),this.emit("_infoHash",this.infoHash),this.destroyed||(this.emit("infoHash",this.infoHash),this.destroyed||(this.client.listening?this._onListening():this.client.once("listening",(()=>{this._onListening()}))))}}_processParsedTorrent(e){this._debugId=e.infoHash.toString("hex").substring(0,7),void 0!==this.private&&(e.private=this.private),this.announce&&(e.announce=e.announce.concat(this.announce)),this.client.tracker&&i.WEBTORRENT_ANNOUNCE&&!e.private&&(e.announce=e.announce.concat(i.WEBTORRENT_ANNOUNCE)),this.urlList&&(e.urlList=e.urlList.concat(this.urlList)),e.announce=Array.from(new Set(e.announce)),e.urlList=Array.from(new Set(e.urlList)),Object.assign(this,e),this.magnetURI=x.toMagnetURI(e),this.torrentFile=x.toTorrentFile(e)}_onListening(){this.destroyed||(this.info?this._onMetadata(this):(this.xs&&this._getMetadataFromServer(),this._startDiscovery()))}_startDiscovery(){if(this.discovery||this.destroyed)return;let e=this.client.tracker;e&&(e=Object.assign({},this.client.tracker,{getAnnounceOpts:()=>{const e={uploaded:this.uploaded,downloaded:this.downloaded,left:Math.max(this.length-this.downloaded,0)};return this.client.tracker.getAnnounceOpts&&Object.assign(e,this.client.tracker.getAnnounceOpts()),this._getAnnounceOpts&&Object.assign(e,this._getAnnounceOpts()),e}})),this.peerAddresses&&this.peerAddresses.forEach((e=>this.addPeer(e))),this.discovery=new c({infoHash:this.infoHash,announce:this.announce,peerId:this.client.peerId,dht:!this.private&&this.client.dht,tracker:e,port:this.client.torrentPort,userAgent:P}),this.discovery.on("error",(e=>{this._destroy(e)})),this.discovery.on("peer",(e=>{"string"==typeof e&&this.done||this.addPeer(e)})),this.discovery.on("trackerAnnounce",(()=>{this.emit("trackerAnnounce"),0===this.numPeers&&this.emit("noPeers","tracker")})),this.discovery.on("dhtAnnounce",(()=>{this.emit("dhtAnnounce"),0===this.numPeers&&this.emit("noPeers","dht")})),this.discovery.on("warning",(e=>{this.emit("warning",e)}))}_getMetadataFromServer(){const e=this,t=(Array.isArray(this.xs)?this.xs:[this.xs]).map((t=>n=>{!function(t,n){if(0!==t.indexOf("http://")&&0!==t.indexOf("https://"))return e.emit("warning",new Error("skipping non-http xs param: "+t)),n(null);const i={url:t,method:"GET",headers:{"user-agent":P}};let s;try{s=d.concat(i,r)}catch(i){return e.emit("warning",new Error("skipping invalid url xs param: "+t)),n(null)}function r(i,s,r){if(e.destroyed)return n(null);if(e.metadata)return n(null);if(i)return e.emit("warning",new Error("http error from xs param: "+t)),n(null);if(200!==s.statusCode)return e.emit("warning",new Error(`non-200 status code ${s.statusCode} from xs param: ${t}`)),n(null);let a;try{a=x(r)}catch(i){}return a?a.infoHash!==e.infoHash?(e.emit("warning",new Error("got torrent file with incorrect info hash from xs param: "+t)),n(null)):(e._onMetadata(a),void n(null)):(e.emit("warning",new Error("got invalid torrent file from xs param: "+t)),n(null))}e._xsRequests.push(s)}(t,n)}));v(t)}_onMetadata(e){if(this.metadata||this.destroyed)return;let t;if(this._debug("got metadata"),this._xsRequests.forEach((e=>{e.abort()})),this._xsRequests=[],e&&e.infoHash)t=e;else try{t=x(e)}catch(e){return this._destroy(e)}if(this._processParsedTorrent(t),this.metadata=this.torrentFile,this.client.enableWebSeeds&&this.urlList.forEach((e=>{this.addWebSeed(e)})),this._rarityMap=new I(this),this.store=new h(new this._store(this.pieceLength,{torrent:{infoHash:this.infoHash},files:this.files.map((e=>({path:_.join(this.path,e.path),length:e.length,offset:e.offset}))),length:this.length,name:this.infoHash})),this.files=this.files.map((e=>new A(this,e))),this.so?this.files.forEach(((e,t)=>{this.so.includes(t)?this.files[t].select():this.files[t].deselect()})):0!==this.pieces.length&&this.select(0,this.pieces.length-1,!1),this._hashes=this.pieces,this.pieces=this.pieces.map(((e,t)=>{const n=t===this.pieces.length-1?this.lastPieceLength:this.pieceLength;return new y(n)})),this._reservations=this.pieces.map((()=>[])),this.bitfield=new r(this.pieces.length),this.wires.forEach((e=>{e.ut_metadata&&e.ut_metadata.setMetadata(this.metadata),this._onWireWithMetadata(e)})),this.emit("metadata"),!this.destroyed)if(this.skipVerify)this._markAllVerified(),this._onStore();else{const e=e=>{if(e)return this._destroy(e);this._debug("done verifying"),this._onStore()};this._debug("verifying existing torrent data"),this._fileModtimes&&this._store===u?this.getFileModtimes(((t,n)=>{if(t)return this._destroy(t);this.files.map(((e,t)=>n[t]===this._fileModtimes[t])).every((e=>e))?(this._markAllVerified(),this._onStore()):this._verifyPieces(e)})):this._verifyPieces(e)}}getFileModtimes(e){const t=[];b(this.files.map(((e,n)=>i=>{p.stat(_.join(this.path,e.path),((e,s)=>{if(e&&"ENOENT"!==e.code)return i(e);t[n]=s&&s.mtime.getTime(),i(null)}))})),U,(n=>{this._debug("done getting file modtimes"),e(n,t)}))}_verifyPieces(e){b(this.pieces.map(((e,t)=>e=>{if(this.destroyed)return e(new Error("torrent is destroyed"));this.store.get(t,((i,s)=>this.destroyed?e(new Error("torrent is destroyed")):i?n.nextTick(e,null):void E(s,(n=>{if(this.destroyed)return e(new Error("torrent is destroyed"));if(n===this._hashes[t]){if(!this.pieces[t])return e(null);this._debug("piece verified %s",t),this._markVerified(t)}else this._debug("piece invalid %s",t);e(null)}))))})),U,e)}rescanFiles(e){if(this.destroyed)throw new Error("torrent is destroyed");e||(e=H),this._verifyPieces((t=>{if(t)return this._destroy(t),e(t);this._checkDone(),e(null)}))}_markAllVerified(){for(let e=0;e<this.pieces.length;e++)this._markVerified(e)}_markVerified(e){this.pieces[e]=null,this._reservations[e]=null,this.bitfield.set(e,!0)}_onStore(){this.destroyed||(this._debug("on store"),this._startDiscovery(),this.ready=!0,this.emit("ready"),this._checkDone(),this._updateSelections())}destroy(e,t){if("function"==typeof e)return this.destroy(null,e);this._destroy(null,e,t)}_destroy(e,t,n){if("function"==typeof t)return this._destroy(e,null,t);if(this.destroyed)return;this.destroyed=!0,this._debug("destroy"),this.client._remove(this),clearInterval(this._rechokeIntervalId),this._xsRequests.forEach((e=>{e.abort()})),this._rarityMap&&this._rarityMap.destroy();for(const e in this._peers)this.removePeer(e);this.files.forEach((e=>{e instanceof A&&e._destroy()}));const i=this._servers.map((e=>t=>{e.destroy(t)}));this.discovery&&i.push((e=>{this.discovery.destroy(e)})),this.store&&i.push((e=>{t&&t.destroyStore?this.store.destroy(e):this.store.close(e)})),v(i,n),e&&(0===this.listenerCount("error")?this.client.emit("error",e):this.emit("error",e)),this.emit("close"),this.client=null,this.files=[],this.discovery=null,this.store=null,this._rarityMap=null,this._peers=null,this._servers=null,this._xsRequests=null}addPeer(e){if(this.destroyed)throw new Error("torrent is destroyed");if(!this.infoHash)throw new Error("addPeer() must not be called before the `infoHash` event");if(this.client.blocked){let t;if("string"==typeof e){let n;try{n=s(e)}catch(t){return this._debug("ignoring peer: invalid %s",e),this.emit("invalidPeer",e),!1}t=n[0]}else"string"==typeof e.remoteAddress&&(t=e.remoteAddress);if(t&&this.client.blocked.contains(t))return this._debug("ignoring peer: blocked %s",e),"string"!=typeof e&&e.destroy(),this.emit("blockedPeer",e),!1}const t=!!this._addPeer(e,this.client.utp?"utp":"tcp");return t?this.emit("peer",e):this.emit("invalidPeer",e),t}_addPeer(e,t){if(this.destroyed)return"string"!=typeof e&&e.destroy(),null;if("string"==typeof e&&!this._validAddr(e))return this._debug("ignoring peer: invalid %s",e),null;const n=e&&e.id||e;if(this._peers[n])return this._debug("ignoring peer: duplicate (%s)",n),"string"!=typeof e&&e.destroy(),null;if(this.paused)return this._debug("ignoring peer: torrent is paused"),"string"!=typeof e&&e.destroy(),null;let i;return this._debug("add peer %s",n),i="string"==typeof e?"utp"===t?L.createUTPOutgoingPeer(e,this):L.createTCPOutgoingPeer(e,this):L.createWebRTCPeer(e,this),this._peers[i.id]=i,this._peersLength+=1,"string"==typeof e&&(this._queue.push(i),this._drain()),i}addWebSeed(e){if(this.destroyed)throw new Error("torrent is destroyed");if(!/^https?:\/\/.+/.test(e))return this.emit("warning",new Error("ignoring invalid web seed: "+e)),void this.emit("invalidPeer",e);if(this._peers[e])return this.emit("warning",new Error("ignoring duplicate web seed: "+e)),void this.emit("invalidPeer",e);this._debug("add web seed %s",e);const t=L.createWebSeedPeer(e,this);this._peers[t.id]=t,this._peersLength+=1,this.emit("peer",e)}_addIncomingPeer(e){return this.destroyed?e.destroy(new Error("torrent is destroyed")):this.paused?e.destroy(new Error("torrent is paused")):(this._debug("add incoming peer %s",e.id),this._peers[e.id]=e,void(this._peersLength+=1))}removePeer(e){const t=e&&e.id||e;(e=this._peers[t])&&(this._debug("removePeer %s",t),delete this._peers[t],this._peersLength-=1,e.destroy(),this._drain())}select(e,t,n,i){if(this.destroyed)throw new Error("torrent is destroyed");if(e<0||t<e||this.pieces.length<=t)throw new Error(`invalid selection ${e} : ${t}`);n=Number(n)||0,this._debug("select %s-%s (priority %s)",e,t,n),this._selections.push({from:e,to:t,offset:0,priority:n,notify:i||H}),this._selections.sort(((e,t)=>t.priority-e.priority)),this._updateSelections()}deselect(e,t,n){if(this.destroyed)throw new Error("torrent is destroyed");n=Number(n)||0,this._debug("deselect %s-%s (priority %s)",e,t,n);for(let i=0;i<this._selections.length;++i){const s=this._selections[i];if(s.from===e&&s.to===t&&s.priority===n){this._selections.splice(i,1);break}}this._updateSelections()}critical(e,t){if(this.destroyed)throw new Error("torrent is destroyed");this._debug("critical %s-%s",e,t);for(let n=e;n<=t;++n)this._critical[n]=!0;this._updateSelections()}_onWire(e,t){if(this._debug("got wire %s (%s)",e._debugId,t||"Unknown"),e.on("download",(e=>{this.destroyed||(this.received+=e,this._downloadSpeed(e),this.client._downloadSpeed(e),this.emit("download",e),this.destroyed||this.client.emit("download",e))})),e.on("upload",(e=>{this.destroyed||(this.uploaded+=e,this._uploadSpeed(e),this.client._uploadSpeed(e),this.emit("upload",e),this.destroyed||this.client.emit("upload",e))})),this.wires.push(e),t){const n=s(t);e.remoteAddress=n[0],e.remotePort=n[1]}this.client.dht&&this.client.dht.listening&&e.on("port",(n=>{if(!this.destroyed&&!this.client.dht.destroyed){if(!e.remoteAddress)return this._debug("ignoring PORT from peer with no address");if(0===n||n>65536)return this._debug("ignoring invalid PORT from peer");this._debug("port: %s (from %s)",n,t),this.client.dht.addNode({host:e.remoteAddress,port:n})}})),e.on("timeout",(()=>{this._debug("wire timeout (%s)",t),e.destroy()})),e.setTimeout(3e4,!0),e.setKeepAlive(!0),e.use(C(this.metadata)),e.ut_metadata.on("warning",(e=>{this._debug("ut_metadata warning: %s",e.message)})),this.metadata||(e.ut_metadata.on("metadata",(e=>{this._debug("got metadata via ut_metadata"),this._onMetadata(e)})),e.ut_metadata.fetch()),"function"!=typeof T||this.private||(e.use(T()),e.ut_pex.on("peer",(e=>{this.done||(this._debug("ut_pex: got peer: %s (from %s)",e,t),this.addPeer(e))})),e.ut_pex.on("dropped",(e=>{const n=this._peers[e];n&&!n.connected&&(this._debug("ut_pex: dropped peer: %s (from %s)",e,t),this.removePeer(e))})),e.once("close",(()=>{e.ut_pex.reset()}))),this.emit("wire",e,t),this.metadata&&n.nextTick((()=>{this._onWireWithMetadata(e)}))}_onWireWithMetadata(e){let t=null;const n=()=>{this.destroyed||e.destroyed||(this._numQueued>2*(this._numConns-this.numPeers)&&e.amInterested?e.destroy():(t=setTimeout(n,B),t.unref&&t.unref()))};let i;const s=()=>{if(e.peerPieces.buffer.length===this.bitfield.buffer.length){for(i=0;i<this.pieces.length;++i)if(!e.peerPieces.get(i))return;e.isSeeder=!0,e.choke()}};e.on("bitfield",(()=>{s(),this._update(),this._updateWireInterest(e)})),e.on("have",(()=>{s(),this._update(),this._updateWireInterest(e)})),e.once("interested",(()=>{e.unchoke()})),e.once("close",(()=>{clearTimeout(t)})),e.on("choke",(()=>{clearTimeout(t),t=setTimeout(n,B),t.unref&&t.unref()})),e.on("unchoke",(()=>{clearTimeout(t),this._update()})),e.on("request",((t,n,i,s)=>{if(i>131072)return e.destroy();this.pieces[t]||this.store.get(t,{offset:n,length:i},s)})),e.bitfield(this.bitfield),this._updateWireInterest(e),e.peerExtensions.dht&&this.client.dht&&this.client.dht.listening&&e.port(this.client.dht.address().port),"webSeed"!==e.type&&(t=setTimeout(n,B),t.unref&&t.unref()),e.isSeeder=!1,s()}_updateSelections(){this.ready&&!this.destroyed&&(n.nextTick((()=>{this._gcSelections()})),this._updateInterest(),this._update())}_gcSelections(){for(let e=0;e<this._selections.length;++e){const t=this._selections[e],n=t.offset;for(;this.bitfield.get(t.from+t.offset)&&t.from+t.offset<t.to;)t.offset+=1;n!==t.offset&&t.notify(),t.to===t.from+t.offset&&(this.bitfield.get(t.from+t.offset)&&(this._selections.splice(e,1),e-=1,t.notify(),this._updateInterest()))}this._selections.length||this.emit("idle")}_updateInterest(){const e=this._amInterested;this._amInterested=!!this._selections.length,this.wires.forEach((e=>this._updateWireInterest(e))),e!==this._amInterested&&(this._amInterested?this.emit("interested"):this.emit("uninterested"))}_updateWireInterest(e){let t=!1;for(let n=0;n<this.pieces.length;++n)if(this.pieces[n]&&e.peerPieces.get(n)){t=!0;break}t?e.interested():e.uninterested()}_update(){if(this.destroyed)return;const e=k(this.wires);let t;for(;t=e();)this._updateWireWrapper(t)}_updateWireWrapper(e){const t=this;"undefined"!=typeof window&&"function"==typeof window.requestIdleCallback?window.requestIdleCallback((function(){t._updateWire(e)}),{timeout:250}):t._updateWire(e)}_updateWire(e){const t=this;if(e.peerChoking)return;if(!e.downloaded)return function(){if(e.requests.length)return;let n=t._selections.length;for(;n--;){const i=t._selections[n];let r;if("rarest"===t.strategy){const n=i.from+i.offset,a=i.to,o=a-n+1,c={};let l=0;const p=s(n,a,c);for(;l<o&&(r=t._rarityMap.getRarestPiece(p),!(r<0));){if(t._request(e,r,!1))return;c[r]=!0,l+=1}}else for(r=i.to;r>=i.from+i.offset;--r)if(e.peerPieces.get(r)&&t._request(e,r,!1))return}}();const n=q(e,.5);if(e.requests.length>=n)return;const i=q(e,1);function s(t,n,i,s){return r=>r>=t&&r<=n&&!(r in i)&&e.peerPieces.get(r)&&(!s||s(r))}function r(e){let n=e;for(let i=e;i<t._selections.length&&t._selections[i].priority;i++)n=i;const i=t._selections[e];t._selections[e]=t._selections[n],t._selections[n]=i}function a(n){if(e.requests.length>=i)return!0;const a=function(){const n=e.downloadSpeed()||1;if(n>O)return()=>!0;const i=Math.max(1,e.requests.length)*y.BLOCK_LENGTH/n;let s=10,r=0;return e=>{if(!s||t.bitfield.get(e))return!0;let a=t.pieces[e].missing;for(;r<t.wires.length;r++){const o=t.wires[r],c=o.downloadSpeed();if(!(c<O)&&!(c<=n)&&o.peerPieces.get(e)&&!((a-=c*i)>0))return s--,!1}return!0}}();for(let o=0;o<t._selections.length;o++){const c=t._selections[o];let l;if("rarest"===t.strategy){const p=c.from+c.offset,u=c.to,d=u-p+1,h={};let f=0;const m=s(p,u,h,a);for(;f<d&&(l=t._rarityMap.getRarestPiece(m),!(l<0));){for(;t._request(e,l,t._critical[l]||n););if(!(e.requests.length<i))return c.priority&&r(o),!0;h[l]=!0,f++}}else for(l=c.from+c.offset;l<=c.to;l++)if(e.peerPieces.get(l)&&a(l)){for(;t._request(e,l,t._critical[l]||n););if(!(e.requests.length<i))return c.priority&&r(o),!0}}return!1}a(!1)||a(!0)}_rechoke(){if(!this.ready)return;const e=this.wires.map((e=>({wire:e,random:Math.random()}))).sort(((e,t)=>{const n=e.wire,i=t.wire;return n.downloadSpeed()!==i.downloadSpeed()?n.downloadSpeed()-i.downloadSpeed():n.uploadSpeed()!==i.uploadSpeed()?n.uploadSpeed()-i.uploadSpeed():n.amChoking!==i.amChoking?n.amChoking?-1:1:e.random-t.random})).map((e=>e.wire));this._rechokeOptimisticTime<=0?this._rechokeOptimisticWire=null:this._rechokeOptimisticTime-=1;let t=0;for(;e.length>0&&t<this._rechokeNumSlots-1;){const n=e.pop();n.isSeeder||n===this._rechokeOptimisticWire||(n.unchoke(),n.peerInterested&&t++)}if(null===this._rechokeOptimisticWire&&this._rechokeNumSlots>0){const t=e.filter((e=>e.peerInterested));if(t.length>0){const e=t[(n=t.length,Math.random()*n|0)];e.unchoke(),this._rechokeOptimisticWire=e,this._rechokeOptimisticTime=2}}var n;e.filter((e=>e!==this._rechokeOptimisticWire)).forEach((e=>e.choke()))}_hotswap(e,t){const n=e.downloadSpeed();if(n<y.BLOCK_LENGTH)return!1;if(!this._reservations[t])return!1;const i=this._reservations[t];if(!i)return!1;let s,r,a=1/0;for(r=0;r<i.length;r++){const t=i[r];if(!t||t===e)continue;const o=t.downloadSpeed();o>=O||(2*o>n||o>a||(s=t,a=o))}if(!s)return!1;for(r=0;r<i.length;r++)i[r]===s&&(i[r]=null);for(r=0;r<s.requests.length;r++){const e=s.requests[r];e.piece===t&&this.pieces[t].cancel(e.offset/y.BLOCK_LENGTH|0)}return this.emit("hotswap",s,e,t),!0}_request(e,t,i){const s=this,r=e.requests.length,a="webSeed"===e.type;if(s.bitfield.get(t))return!1;if(r>=(a?Math.min(function(e,t,n){return 1+Math.ceil(t*e.downloadSpeed()/n)}(e,1,s.pieceLength),s.maxWebConns):q(e,1)))return!1;const o=s.pieces[t];let c=a?o.reserveRemaining():o.reserve();if(-1===c&&i&&s._hotswap(e,t)&&(c=a?o.reserveRemaining():o.reserve()),-1===c)return!1;let l=s._reservations[t];l||(l=s._reservations[t]=[]);let p=l.indexOf(null);-1===p&&(p=l.length),l[p]=e;const u=o.chunkOffset(c),d=a?o.chunkLengthRemaining(c):o.chunkLength(c);function h(){n.nextTick((()=>{s._update()}))}return e.request(t,u,d,(function n(i,r){if(s.destroyed)return;if(!s.ready)return s.once("ready",(()=>{n(i,r)}));if(l[p]===e&&(l[p]=null),o!==s.pieces[t])return h();if(i)return s._debug("error getting piece %s (offset: %s length: %s) from %s: %s",t,u,d,`${e.remoteAddress}:${e.remotePort}`,i.message),a?o.cancelRemaining(c):o.cancel(c),void h();if(s._debug("got piece %s (offset: %s length: %s) from %s",t,u,d,`${e.remoteAddress}:${e.remotePort}`),!o.set(c,r,e))return h();const f=o.flush();E(f,(e=>{if(!s.destroyed){if(e===s._hashes[t]){if(!s.pieces[t])return;s._debug("piece verified %s",t),s.pieces[t]=null,s._reservations[t]=null,s.bitfield.set(t,!0),s.store.put(t,f),s.wires.forEach((e=>{e.have(t)})),s._checkDone()&&!s.destroyed&&s.discovery.complete()}else s.pieces[t]=new y(o.length),s.emit("warning",new Error(`Piece ${t} failed verification`));h()}}))})),!0}_checkDone(){if(this.destroyed)return;this.files.forEach((e=>{if(!e.done){for(let t=e._startPiece;t<=e._endPiece;++t)if(!this.bitfield.get(t))return;e.done=!0,e.emit("done"),this._debug("file done: "+e.name)}}));let e=!0;for(let t=0;t<this._selections.length;t++){const n=this._selections[t];for(let t=n.from;t<=n.to;t++)if(!this.bitfield.get(t)){e=!1;break}if(!e)break}return!this.done&&e&&(this.done=!0,this._debug("torrent done: "+this.infoHash),this.emit("done")),this._gcSelections(),e}load(e,t){if(this.destroyed)throw new Error("torrent is destroyed");if(!this.ready)return this.once("ready",(()=>{this.load(e,t)}));Array.isArray(e)||(e=[e]),t||(t=H);const n=new f(e),i=new a(this.store,this.pieceLength);w(n,i,(e=>{if(e)return t(e);this._markAllVerified(),this._checkDone(),t(null)}))}createServer(e){if("function"!=typeof R)throw new Error("node.js-only method");if(this.destroyed)throw new Error("torrent is destroyed");const t=new R(this,e);return this._servers.push(t),t}pause(){this.destroyed||(this._debug("pause"),this.paused=!0)}resume(){this.destroyed||(this._debug("resume"),this.paused=!1,this._drain())}_debug(){const e=[].slice.call(arguments);e[0]=`[${this.client?this.client._debugId:"No Client"}] [${this._debugId}] ${e[0]}`,o(...e)}_drain(){if(this._debug("_drain numConns %s maxConns %s",this._numConns,this.client.maxConns),"function"!=typeof m.connect||this.destroyed||this.paused||this._numConns>=this.client.maxConns)return;this._debug("drain (%s queued, %s/%s peers)",this._numQueued,this.numPeers,this.client.maxConns);const e=this._queue.shift();if(!e)return;this._debug("%s connect attempt to %s",e.type,e.addr);const t=s(e.addr),n={host:t[0],port:t[1]};"utpOutgoing"===e.type?e.conn=j.connect(n.port,n.host):e.conn=m.connect(n);const i=e.conn;i.once("connect",(()=>{e.onConnect()})),i.once("error",(t=>{e.destroy(t)})),e.startConnectTimeout(),i.on("close",(()=>{if(this.destroyed)return;if(e.retries>=M.length){if(this.client.utp){const t=this._addPeer(e.addr,"tcp");t&&(t.retries=0)}else this._debug("conn %s closed: will not re-add (max %s attempts)",e.addr,M.length);return}const t=M[e.retries];this._debug("conn %s closed: will re-add to queue in %sms (attempt %s)",e.addr,t,e.retries+1);const n=setTimeout((()=>{if(this.destroyed)return;const t=this._addPeer(e.addr,this.client.utp?"utp":"tcp");t&&(t.retries=e.retries+1)}),t);n.unref&&n.unref()}))}_validAddr(e){let t;try{t=s(e)}catch(e){return!1}const n=t[0],i=t[1];return i>0&&i<65535&&!("127.0.0.1"===n&&i===this.client.torrentPort)}}}).call(this)}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../package.json":332,"./file":309,"./peer":310,"./rarity-map":311,"./server":54,_process:186,"addr-to-ip-port":2,bitfield:9,"chunk-store-stream/write":77,debug:314,events:97,fs:55,"fs-chunk-store":140,"immediate-chunk-store":117,multistream:165,net:54,os:54,"parse-torrent":183,path:184,pump:187,"random-iterate":193,"run-parallel":217,"run-parallel-limit":216,"simple-get":221,"simple-sha1":241,speedometer:262,"torrent-discovery":289,"torrent-piece":293,ut_metadata:299,ut_pex:54,"utp-native":54}],313:[function(e,t,n){(function(n){(function(){const i=e("bitfield"),s=e("debug")("webtorrent:webconn"),r=e("simple-get"),a=e("simple-sha1"),o=e("bittorrent-protocol"),c=e("../package.json").version;t.exports=class extends o{constructor(e,t){super(),this.url=e,this.webPeerId=a.sync(e),this._torrent=t,this._init()}_init(){this.setKeepAlive(!0),this.once("handshake",((e,t)=>{if(this.destroyed)return;this.handshake(e,this.webPeerId);const n=this._torrent.pieces.length,s=new i(n);for(let e=0;e<=n;e++)s.set(e,!0);this.bitfield(s)})),this.once("interested",(()=>{s("interested"),this.unchoke()})),this.on("uninterested",(()=>{s("uninterested")})),this.on("choke",(()=>{s("choke")})),this.on("unchoke",(()=>{s("unchoke")})),this.on("bitfield",(()=>{s("bitfield")})),this.on("request",((e,t,n,i)=>{s("request pieceIndex=%d offset=%d length=%d",e,t,n),this.httpRequest(e,t,n,i)}))}httpRequest(e,t,i,a){const o=e*this._torrent.pieceLength+t,l=o+i-1,p=this._torrent.files;let u;if(p.length<=1)u=[{url:this.url,start:o,end:l}];else{const e=p.filter((e=>e.offset<=l&&e.offset+e.length>o));if(e.length<1)return a(new Error("Could not find file corresponnding to web seed range request"));u=e.map((e=>{const t=e.offset+e.length-1;return{url:this.url+("/"===this.url[this.url.length-1]?"":"/")+e.path,fileOffsetInRange:Math.max(e.offset-o,0),start:Math.max(o-e.offset,0),end:Math.min(t,l-e.offset)}}))}let d,h=0,f=!1;u.length>1&&(d=n.alloc(i)),u.forEach((n=>{const o=n.url,l=n.start,p=n.end;s("Requesting url=%s pieceIndex=%d offset=%d length=%d start=%d end=%d",o,e,t,i,l,p);const m={url:o,method:"GET",headers:{"user-agent":`WebTorrent/${c} (https://webtorrent.io)`,range:`bytes=${l}-${p}`}};function g(e,t){if(e.statusCode<200||e.statusCode>=300)return f=!0,a(new Error("Unexpected HTTP status code "+e.statusCode));s("Got data of length %d",t.length),1===u.length?a(null,t):(t.copy(d,n.fileOffsetInRange),++h===u.length&&a(null,d))}r.concat(m,((e,t,n)=>{if(!f)return e?"undefined"==typeof window||o.startsWith(window.location.origin+"/")?(f=!0,a(e)):r.head(o,((t,n)=>{if(!f){if(t)return f=!0,a(t);if(n.statusCode<200||n.statusCode>=300)return f=!0,a(new Error("Unexpected HTTP status code "+n.statusCode));if(n.url===o)return f=!0,a(e);m.url=n.url,r.concat(m,((e,t,n)=>{if(!f)return e?(f=!0,a(e)):void g(t,n)}))}})):void g(t,n)}))}))}destroy(){super.destroy(),this._torrent=null}}}).call(this)}).call(this,e("buffer").Buffer)},{"../package.json":332,bitfield:9,"bittorrent-protocol":10,buffer:59,debug:314,"simple-get":221,"simple-sha1":241}],314:[function(e,t,n){arguments[4][12][0].apply(n,arguments)},{"./common":315,_process:186,dup:12}],315:[function(e,t,n){arguments[4][13][0].apply(n,arguments)},{dup:13,ms:316}],316:[function(e,t,n){arguments[4][14][0].apply(n,arguments)},{dup:14}],317:[function(e,t,n){arguments[4][15][0].apply(n,arguments)},{dup:15}],318:[function(e,t,n){arguments[4][16][0].apply(n,arguments)},{"./_stream_readable":320,"./_stream_writable":322,_process:186,dup:16,inherits:118}],319:[function(e,t,n){arguments[4][17][0].apply(n,arguments)},{"./_stream_transform":321,dup:17,inherits:118}],320:[function(e,t,n){arguments[4][18][0].apply(n,arguments)},{"../errors":317,"./_stream_duplex":318,"./internal/streams/async_iterator":323,"./internal/streams/buffer_list":324,"./internal/streams/destroy":325,"./internal/streams/from":327,"./internal/streams/state":329,"./internal/streams/stream":330,_process:186,buffer:59,dup:18,events:97,inherits:118,"string_decoder/":285,util:54}],321:[function(e,t,n){arguments[4][19][0].apply(n,arguments)},{"../errors":317,"./_stream_duplex":318,dup:19,inherits:118}],322:[function(e,t,n){arguments[4][20][0].apply(n,arguments)},{"../errors":317,"./_stream_duplex":318,"./internal/streams/destroy":325,"./internal/streams/state":329,"./internal/streams/stream":330,_process:186,buffer:59,dup:20,inherits:118,"util-deprecate":304}],323:[function(e,t,n){arguments[4][21][0].apply(n,arguments)},{"./end-of-stream":326,_process:186,dup:21}],324:[function(e,t,n){arguments[4][22][0].apply(n,arguments)},{buffer:59,dup:22,util:54}],325:[function(e,t,n){arguments[4][23][0].apply(n,arguments)},{_process:186,dup:23}],326:[function(e,t,n){arguments[4][24][0].apply(n,arguments)},{"../../../errors":317,dup:24}],327:[function(e,t,n){arguments[4][25][0].apply(n,arguments)},{dup:25}],328:[function(e,t,n){arguments[4][26][0].apply(n,arguments)},{"../../../errors":317,"./end-of-stream":326,dup:26}],329:[function(e,t,n){arguments[4][27][0].apply(n,arguments)},{"../../../errors":317,dup:27}],330:[function(e,t,n){arguments[4][28][0].apply(n,arguments)},{dup:28,events:97}],331:[function(e,t,n){arguments[4][29][0].apply(n,arguments)},{"./lib/_stream_duplex.js":318,"./lib/_stream_passthrough.js":319,"./lib/_stream_readable.js":320,"./lib/_stream_transform.js":321,"./lib/_stream_writable.js":322,"./lib/internal/streams/end-of-stream.js":326,"./lib/internal/streams/pipeline.js":328,dup:29}],332:[function(e,t,n){t.exports={version:"0.110.1"}},{}],333:[function(e,t,n){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){i[e]=t[e]})),i;function i(){for(var e=new Array(arguments.length),n=0;n<e.length;n++)e[n]=arguments[n];var i=t.apply(this,e),s=e[e.length-1];return"function"==typeof i&&i!==s&&Object.keys(s).forEach((function(e){i[e]=s[e]})),i}}},{}],334:[function(e,t,n){t.exports=function(){for(var e={},t=0;t<arguments.length;t++){var n=arguments[t];for(var s in n)i.call(n,s)&&(e[s]=n[s])}return e};var i=Object.prototype.hasOwnProperty},{}],335:[function(e,t,n){const i=e("clipboard"),s=e("parse-torrent"),r=e("Buffer"),a=e("bytes"),o=e("mime-types"),c=e("webtorrent");var l,p=document.getElementById("properties"),u=document.getElementById("originalSourceIcon"),d=document.getElementById("name"),h=document.getElementById("reset"),f=document.getElementById("created"),m=document.getElementById("createdBy"),g=document.getElementById("comment"),v=document.getElementById("hash"),b=document.getElementById("addTrackers"),x=document.getElementById("addTracker"),_=document.getElementById("removeTrackers"),y=document.getElementById("announce"),w=document.getElementById("urlList"),k=document.getElementById("addWebseed"),E=document.getElementById("removeWebseeds"),S=document.getElementById("filesBody"),C=document.getElementById("getFiles"),T=document.getElementById("copyURL"),j=document.getElementById("copyMagnet"),A=document.getElementById("downloadTorrent"),L=new c;function I(e){try{console.info("Attempting parse"),l=s(e),B(),l.xs&&(console.info("Magnet includes xs, attempting remote parse"),R(l.xs))}catch(t){console.warn(t),console.info("Attempting remote parse"),R(e)}}function R(e){s.remote(e,(function(e,t){if(e)return console.error(e),void P();l=t,B()}))}function B(){if(console.log(l),P(),v.value=l.infoHash,d.value=l.name||"",l.created?(f.value=l.created.toISOString().slice(0,19),f.type="datetime-local"):f.type="text",m.value="by "+l.createdBy||"",g.value=l.comment||"",y.innerHTML="",l.announce&&l.announce.length)for(let e=0;e<l.announce.length;e++){let t=document.createElement("div");t.className="announce",t.dataset.index=e;let n=document.createElement("input");n.type="text",n.value=l.announce[e],n.dataset.index=e,n.dataset.group="announce",n.addEventListener("input",M),t.appendChild(n);let i=document.createElement("button");i.dataset.index=e,i.innerHTML='<span class="fas fa-minus"></span>',i.addEventListener("click",H),t.appendChild(i),y.appendChild(t)}else y.innerHTML="<em>No trackers specified in the URL/File provided</em>";if(w.innerHTML="",l.urlList&&l.urlList.length)for(let e=0;e<l.urlList.length;e++){let t=document.createElement("div");t.className="urlList",t.dataset.index=e;let n=document.createElement("input");n.type="text",n.value=l.urlList[e],n.dataset.index=e,n.dataset.group="urlList",n.addEventListener("input",M),t.appendChild(n);let i=document.createElement("button");i.dataset.index=e,i.innerHTML='<span class="fas fa-minus"></span>',i.addEventListener("click",H),t.appendChild(i),w.appendChild(t)}else w.innerHTML="<em>No webseed URLs in the URL/File provided</em>";if(S.innerHTML="",l.files&&l.files.length){C.disabled=!0;for(let e of l.files){let t=U(o.lookup(e.name));S.appendChild(O(t,e.name,e.length))}S.appendChild(O("folder-tree","",l.length)),A.addEventListener("click",W),A.disabled=!1}else C.disabled=!1,S.innerHTML="<em>Files information isn't included in the URL/File provided</em>",A.removeEventListener("click",W),A.disabled=!0;T.setAttribute("data-clipboard-text",window.location.origin+"#"+s.toMagnetURI(l)),j.setAttribute("data-clipboard-text",s.toMagnetURI(l)),p.style.display="flex",window.location.hash=s.toMagnetURI(l),l.name?document.title="Torrent Parts | "+l.name:document.title="Torrent Parts | Inspect and edit what's in your Torrent file or Magnet link"}function O(e,t,n){let i=document.createElement("tr"),s=document.createElement("td");s.innerHTML='<span class="far fa-'+e+'"></span>',i.appendChild(s);let r=document.createElement("td");r.innerHTML=t,i.appendChild(r);let o=document.createElement("td");return o.innerHTML=a.format(n,{decimalPlaces:1,unitSeparator:" "}),i.appendChild(o),i}function U(e){if(!e)return"file";switch(!0){case e.includes("msword"):case e.includes("wordprocessingml"):case e.includes("opendocument.text"):case e.includes("abiword"):return"file-word";case e.includes("ms-excel"):case e.includes("spreadsheet"):return"file-powerpoint";case e.includes("powerpoint"):case e.includes("presentation"):return"file-powerpoint";case e.includes("7z-"):case e.includes("iso9660"):case e.includes("zip"):case e.includes("octet-stream"):return"file-archive";case e.includes("csv"):return"file-csv";case e.includes("pdf"):return"file-pdf";case e.includes("font"):return"file-contract";case e.includes("text"):case e.includes("subrip"):case e.includes("vtt"):return"file-alt";case e.includes("audio"):return"file-audio";case e.includes("image"):return"file-image";case e.includes("video"):return"file-video";default:return"file"}}function M(e){this.dataset.group?l[this.dataset.group][this.dataset.index]=this.value||"":l[this.id]=this.value||"",window.location.hash=s.toMagnetURI(l),F()}function P(){document.getElementById("magnet").value="",document.getElementById("torrent").value="",p.style.display="none",d.value="",f.value="",m.value="",g.value="",v.value="",y.innerHTML="",w.innerHTML="",L.torrents.forEach((e=>e.destroy())),C.disabled=!1,C.innerHTML='<span class="fad fa-chart-network"></span>',S.innerHTML="",window.location.hash="",T.setAttribute("data-clipboard-text",""),j.setAttribute("data-clipboard-text",""),document.title="Torrent Parts | Inspect and edit what's in your Torrent file or Magnet link"}async function N(){b.disabled=!0,b.innerHTML="Adding...";try{let e=await fetch("https://newtrackon.com/api/100"),t=await e.text();l.announce=l.announce.concat(t.split("\n\n")),l.announce.push("http://bt1.archive.org:6969/announce"),l.announce.push("http://bt2.archive.org:6969/announce"),l.announce=l.announce.filter(((e,t)=>e&&l.announce.indexOf(e)===t)),F()}catch(e){console.error(e)}b.innerHTML="Add Known Working Trackers",b.disabled=!1,B()}function q(){l[this.dataset.type].unshift(""),B()}function H(){l[this.parentElement.className].splice(this.parentElement.dataset.index,1),B()}function D(e){l[e]=[],F(),B()}function F(){l.created=new Date,l.createdBy="Torrent Parts <https://torrent.parts/>"}function z(){console.info("Attempting fetching files from Webtorrent"),l.announce.push("wss://tracker.webtorrent.io"),l.announce.push("wss://tracker.openwebtorrent.com"),l.announce.push("wss://tracker.btorrent.xyz"),l.announce.push("wss://tracker.fastcast.nz"),l.announce=l.announce.filter(((e,t)=>e&&l.announce.indexOf(e)===t)),B(),C.disabled=!0,C.innerHTML='<span class="fa-blink fad fa-chart-network"></span>',L.add(s.toMagnetURI(l),(e=>{l.info=Object.assign({},e.info),l.files=e.files,l.infoBuffer=e.infoBuffer,l.length=e.length,l.lastPieceLength=e.lastPieceLength,C.innerHTML='<span class="fad fa-chart-network"></span>',F(),B(),e.destroy()}))}function W(){let e=s.toTorrentFile(l);if(null!==e&&navigator.msSaveBlob)return navigator.msSaveBlob(new Blob([e],{type:"application/x-bittorrent"}),l.name+".torrent");let t=document.createElement("a");t.style.display="none";let n=window.URL.createObjectURL(new Blob([e],{type:"application/x-bittorrent"}));t.setAttribute("href",n),t.setAttribute("download",l.name+".torrent"),document.body.appendChild(t),t.click(),window.URL.revokeObjectURL(n),t.remove()}document.addEventListener("DOMContentLoaded",(function(){document.getElementById("magnet").addEventListener("keyup",(function(e){e.preventDefault(),"Enter"===e.key&&(u.innerHTML='<span class="fad fa-magnet fa-fw"></span>',u.title="Originally sourced from Magnet URL",I(magnet.value))})),document.getElementById("torrent").addEventListener("change",(function(e){e.preventDefault();try{e.target.files[0].arrayBuffer().then((function(e){u.innerHTML='<span class="fad fa-file fa-fw"></span>',u.title="Originally sourced from Torrent file",I(r.from(e))}))}catch(e){console.error(e)}}));let e=new i("#copyURL");e.on("success",(function(e){console.info(e)})),e.on("failure",(function(e){console.error(e)}));let t=new i("#copyMagnet");t.on("success",(function(e){console.info(e)})),t.on("failure",(function(e){console.error(e)})),d.addEventListener("input",M),d.addEventListener("change",M),d.addEventListener("reset",M),d.addEventListener("paste",M),h.addEventListener("click",P),g.addEventListener("input",M),g.addEventListener("change",M),g.addEventListener("reset",M),g.addEventListener("paste",M),b.addEventListener("click",N),x.addEventListener("click",q),_.addEventListener("click",(()=>D("announce"))),k.addEventListener("click",q),E.addEventListener("click",(()=>D("urlList"))),C.addEventListener("click",z),window.location.hash&&(u.innerHTML='<span class="fad fa-link fa-fw"></span>',u.title="Originally sourced from Magnet URL in the address bar of this site",I(window.location.hash.split("#")[1]))}))},{Buffer:1,bytes:61,clipboard:78,"mime-types":143,"parse-torrent":183,webtorrent:307}]},{},[335]); |