SYMBOL INDEX (1710 symbols across 30 files) FILE: dist/webtorrent.chromeapp.js function f (line 1) | function f(t){s.Writable.call(this);var e=u[t];if(!e)throw new Error("Un... function l (line 1) | function l(t){s.Writable.call(this);var e=u[t];if(!e)throw new Error("Un... function c (line 1) | function c(t){return new f(t)} function d (line 1) | function d(t){return new l(t)} function h (line 1) | function h(t){this.enc="der",this.name=t.name,this.entity=t,this.tree=ne... function u (line 1) | function u(t){o.Node.call(this,"der",t)} function f (line 1) | function f(t){return t<10?"0"+t:t} function r (line 1) | function r(t,r,i){i||(i=Error);class n extends i{constructor(t,e,i){supe... function i (line 1) | function i(t,e){if(Array.isArray(t)){const r=t.length;return t=t.map(t=>... function h (line 1) | function h(t,e,r){if(t=t.toLowerCase(),s[t])return n.createCipheriv(t,e,... function u (line 1) | function u(t,e,r){if(t=t.toLowerCase(),s[t])return n.createDecipheriv(t,... function b (line 1) | function b(t,e){t=t||{};var i=e instanceof(s=s||r(6248));this.objectMode... function v (line 1) | function v(t){if(s=s||r(6248),!(this instanceof v))return new v(t);this.... function w (line 1) | function w(t,e,r,i,n){var s,o=t._readableState;null===e?(o.reading=!1,fu... function _ (line 1) | function _(t,e,r,i){e.flowing&&0===e.length&&!e.sync?(t.emit("data",r),t... function S (line 1) | function S(t,e){return t<=0||0===e.length&&e.ended?0:e.objectMode?1:t!=t... function k (line 1) | function k(t){var e=t._readableState;e.needReadable=!1,e.emittedReadable... function E (line 1) | function E(t){d("emit readable"),t.emit("readable"),C(t)} function x (line 1) | function x(t,e){e.readingMore||(e.readingMore=!0,n.nextTick(A,t,e))} function A (line 1) | function A(t,e){for(var r=e.length;!e.reading&&!e.flowing&&!e.ended&&e.l... function I (line 1) | function I(t){d("readable nexttick read 0"),t.read(0)} function T (line 1) | function T(t,e){e.reading||(d("resume read 0"),t.read(0)),e.resumeSchedu... method constructor (line 1) | constructor(t,e,r,i){this.piece=t,this.offset=e,this.length=r,this.cal... function C (line 1) | function C(t){var e=t._readableState;for(d("flow",e.flowing);e.flowing&&... method constructor (line 1) | constructor(){this.buffer=new Uint8Array} method get (line 1) | get(t){return!0} method set (line 1) | set(t){} function P (line 1) | function P(t,e){return 0===e.length?null:(e.objectMode?r=e.buffer.shift(... method constructor (line 1) | constructor(t=null,e=0,r=!1){super(),this._debugId=(0,u.V5)((0,u.po)(4... method setKeepAlive (line 1) | setKeepAlive(t){this._debug("setKeepAlive %s",t),clearInterval(this._k... method setTimeout (line 1) | setTimeout(t,e){this._debug("setTimeout ms=%d unref=%s",t,e),this._tim... method destroy (line 1) | destroy(){if(!this.destroyed)return this._debug("destroy"),this.end(),... method end (line 1) | end(t){if(!this.destroyed&&!this.destroying)return this._debug("end"),... method use (line 1) | use(t){const e=t.prototype.name;if(!e)throw new Error('Extension class... method keepAlive (line 1) | keepAlive(){this._debug("keep-alive"),this._push(p)} method sendPe1 (line 1) | sendPe1(){if(this._peEnabled){const t=Math.floor(513*Math.random()),e=... method sendPe2 (line 1) | sendPe2(){const t=Math.floor(513*Math.random()),e=(0,u.po)(t);this._pu... method sendPe3 (line 1) | async sendPe3(t){await this.setEncrypt(this._sharedSecret,t);const e=a... method sendPe4 (line 1) | async sendPe4(t){await this.setEncrypt(this._sharedSecret,t);const e=n... method handshake (line 1) | handshake(t,e,r){let i,n;if("string"==typeof t?(t=t.toLowerCase(),i=(0... method _sendExtendedHandshake (line 1) | _sendExtendedHandshake(){const t=Object.assign({},this.extendedHandsha... method choke (line 1) | choke(){if(!this.amChoking)if(this.amChoking=!0,this._debug("choke"),t... method unchoke (line 1) | unchoke(){this.amChoking&&(this.amChoking=!1,this._debug("unchoke"),th... method interested (line 1) | interested(){this.amInterested||(this.amInterested=!0,this._debug("int... method uninterested (line 1) | uninterested(){this.amInterested&&(this.amInterested=!1,this._debug("u... method have (line 1) | have(t){this._debug("have %d",t),this._message(4,[t],null)} method bitfield (line 1) | bitfield(t){this._debug("bitfield"),ArrayBuffer.isView(t)||(t=t.buffer... method request (line 1) | request(t,e,r,i){return i||(i=()=>{}),this._finished?i(new Error("wire... method piece (line 1) | piece(t,e,r){this._debug("piece index=%d offset=%d",t,e),this._message... method cancel (line 1) | cancel(t,e,r){this._debug("cancel index=%d offset=%d length=%d",t,e,r)... method port (line 1) | port(t){this._debug("port %d",t);const e=new Uint8Array(w);new DataVie... method suggest (line 1) | suggest(t){if(!this.hasFast)throw Error("fast extension is disabled");... method haveAll (line 1) | haveAll(){if(!this.hasFast)throw Error("fast extension is disabled");t... method haveNone (line 1) | haveNone(){if(!this.hasFast)throw Error("fast extension is disabled");... method reject (line 1) | reject(t,e,r){if(!this.hasFast)throw Error("fast extension is disabled... method allowedFast (line 1) | allowedFast(t){if(!this.hasFast)throw Error("fast extension is disable... method extended (line 1) | extended(t,e){if(this._debug("extended ext=%s",t),"string"==typeof t&&... method setEncrypt (line 1) | async setEncrypt(t,e){if(!this.type.startsWith("tcp"))return!1;const r... method _message (line 1) | _message(t,e,r){const i=r?r.length:0,n=new Uint8Array(5+4*e.length);I(... method _push (line 1) | _push(t){if(!this._finished)return 2===this._encryptionMethod&&this._c... method _onKeepAlive (line 1) | _onKeepAlive(){this._debug("got keep-alive"),this.emit("keep-alive")} method _onPe1 (line 1) | _onPe1(t){this._peerPubKey=(0,u.V5)(t),this._sharedSecret=this._dh.com... method _onPe2 (line 1) | _onPe2(t){this._peerPubKey=(0,u.V5)(t),this._sharedSecret=this._dh.com... method _onPe3 (line 1) | async _onPe3(t){const e=await(0,u.tW)((0,u.fk)(this._utfToHex("req3")+... method _onPe3Encrypted (line 1) | _onPe3Encrypted(t,e){if(!(0,u.LC)(t,S))return this._debug("Error: veri... method _onPe4 (line 1) | _onPe4(t){this._encryptionMethod=t[3],k.includes(this._encryptionMetho... method _onHandshake (line 1) | _onHandshake(t,e,r){const i=(0,u.V5)(t),n=(0,u.V5)(e);this._debug("got... method _onChoke (line 1) | _onChoke(){if(this.peerChoking=!0,this._debug("got choke"),this.emit("... method _onUnchoke (line 1) | _onUnchoke(){this.peerChoking=!1,this._debug("got unchoke"),this.emit(... method _onInterested (line 1) | _onInterested(){this.peerInterested=!0,this._debug("got interested"),t... method _onUninterested (line 1) | _onUninterested(){this.peerInterested=!1,this._debug("got uninterested... method _onHave (line 1) | _onHave(t){this.peerPieces.get(t)||(this._debug("got have %d",t),this.... method _onBitField (line 1) | _onBitField(t){this.peerPieces=new n.A(t),this._debug("got bitfield"),... method _onRequest (line 1) | _onRequest(t,e,r){if(this.amChoking&&(!this.hasFast||!this.allowedFast... method _onPiece (line 1) | _onPiece(t,e,r){this._debug("got piece index=%d offset=%d",t,e),this._... method _onCancel (line 1) | _onCancel(t,e,r){this._debug("got cancel index=%d offset=%d length=%d"... method _onPort (line 1) | _onPort(t){this._debug("got port %d",t),this.emit("port",t)} method _onSuggest (line 1) | _onSuggest(t){if(!this.hasFast)return this._debug("Error: got suggest ... method _onHaveAll (line 1) | _onHaveAll(){if(!this.hasFast)return this._debug("Error: got have-all ... method _onHaveNone (line 1) | _onHaveNone(){if(!this.hasFast)return this._debug("Error: got have-non... method _onReject (line 1) | _onReject(t,e,r){if(!this.hasFast)return this._debug("Error: got rejec... method _onAllowedFast (line 1) | _onAllowedFast(t){if(!this.hasFast)return this._debug("Error: got allo... method _onExtended (line 1) | _onExtended(t,e){if(0===t){let t;try{t=i.A.decode(e)}catch(t){this._de... method _onTimeout (line 1) | _onTimeout(){this._debug("request timed out"),this._callback(this.requ... method _write (line 1) | _write(t,e){if(2===this._encryptionMethod&&this._cryptoHandshakeDone&&... method _callback (line 1) | _callback(t,e,r){t&&(this._resetTimeout(!this.peerChoking&&!this._fini... method _resetTimeout (line 1) | _resetTimeout(t){if(!t||!this._timeoutMs||!this.requests.length)return... method _parse (line 1) | _parse(t,e){this._parserSize=t,this._parser=e} method _parseUntil (line 1) | _parseUntil(t,e){this._cryptoSyncPattern=t,this._waitMaxBytes=e} method _onMessageLength (line 1) | _onMessageLength(t){const e=A(t);e>0?this._parse(e,this._onMessage):(t... method _onMessage (line 1) | _onMessage(t){switch(this._parse(4,this._onMessageLength),t[0]){case 0... method _determineHandshakeType (line 1) | _determineHandshakeType(){this._parse(1,t=>{const e=t[0];19===e?this._... method _parsePe1 (line 1) | _parsePe1(t){this._parse(95,e=>{this._onPe1((0,u.xW)([t,e])),this._par... method _parsePe2 (line 1) | _parsePe2(){this._parse(96,async t=>{this._onPe2(t),this._setGenerator... method _parsePe3 (line 1) | async _parsePe3(){const t=await(0,u.tW)((0,u.fk)(this._utfToHex("req1"... method _parsePe3Encrypted (line 1) | _parsePe3Encrypted(){this._parse(14,t=>{const e=this._decryptHandshake... method _parsePe4 (line 1) | _parsePe4(){const t=this._decryptHandshake(S);this._parseUntil(t,512),... method _parseHandshake (line 1) | _parseHandshake(){this._parse(1,t=>{const e=t[0];if(19!==e)return this... method _onHandshakeBuffer (line 1) | _onHandshakeBuffer(t){const e=t.slice(0,19);if("BitTorrent protocol"!=... method _onFinish (line 1) | _onFinish(){for(this._finished=!0,this.push(null);this.read(););for(cl... method _debug (line 1) | _debug(...t){t[0]=`[${this._debugId}] ${t[0]}`,c(...t)} method _pull (line 1) | _pull(t,e,r,i){for(let n=0;n0)throw new Error('"end... function O (line 1) | function O(t,e){t.endEmitted||0!==t.length||(t.endEmitted=!0,e.readable=... function B (line 1) | function B(t,e){for(var r=0,i=t.length;r>3;return e>3;if(e){if(r>=this.buffer.length){const t=Math.... method setAll (line 1) | setAll(t,e=0){const r=Math.min(i(e+t.length),this.grow);if(this.buffer... method forEach (line 1) | forEach(t,e=0,r=8*this.buffer.length){let i=e>>3,n=128>>e%8;for(let s=... method isEmpty (line 1) | isEmpty(){for(let t=0;t>3;return e>3;if(e){if(r>=this.buffer.length){const t=Math.... method setAll (line 1) | setAll(t,e=0){const r=Math.min(i(e+t.length),this.grow);if(this.buffer... method forEach (line 1) | forEach(t,e=0,r=8*this.buffer.length){let i=e>>3,n=128>>e%8;for(let s=... method isEmpty (line 1) | isEmpty(){for(let t=0;te.vectorClock?t:e} method distance (line 1) | static distance(t,e){let r=0,i=0;const n=Math.min(t.length,e.length),s... method add (line 1) | add(t){o("contact.id",(t||{}).id);let e=0,r=this.root;for(;null===r.co... method closest (line 1) | closest(t,e=1/0){if(o("id",t),!Number.isInteger(e)&&e!==1/0||e<=0)thro... method count (line 1) | count(){let t=0;for(const e=[this.root];e.length>0;){const r=e.pop();n... method _determineNode (line 1) | _determineNode(t,e,r){const i=r>>3,n=r%8;if(e.length<=i&&0!==n)return ... method get (line 1) | get(t){o("id",t);let e=0,r=this.root;for(;null===r.contacts;)r=this._d... method _indexOf (line 1) | _indexOf(t,e){for(let r=0;r0;){const r=e.pop(... method toIterable (line 1) | *toIterable(){for(const t=[this.root];t.length>0;){const e=t.pop();nul... method _update (line 1) | _update(t,e,r){if(!s(t.contacts[e].id,r.id))throw new Error("wrong ind... function l (line 1) | function l(t,e,r){h.prototype.copy.call(t,e,r)} function t (line 1) | function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Ca... method constructor (line 1) | constructor(t){super(),this._peerSupports=!1,this._wire=t} method onExtendedHandshake (line 1) | onExtendedHandshake(){this._peerSupports=!0} method onMessage (line 1) | onMessage(t){let e;try{e=new DataView(t.buffer).getUint32(0)}catch(t){... method donthave (line 1) | donthave(t){if(!this._peerSupports)return;Ke("donthave %d",t);const e=... method _failRequests (line 1) | _failRequests(t){const e=this._wire.requests;for(let r=0;r!0===t[r]?e|or[r]:... method _sendMessage (line 1) | _sendMessage(){const t=Object.keys(this._localAddedPeers).slice(0,50),... function a (line 1) | function a(t){s.call(this,"mont",t),this.a=new i(t.a,16).toRed(this.red)... method constructor (line 1) | constructor(t={}){super(),this.localNodeId=t.localNodeId||i(20),this.n... method arbiter (line 1) | static arbiter(t,e){return t.vectorClock>e.vectorClock?t:e} method distance (line 1) | static distance(t,e){let r=0,i=0;const n=Math.min(t.length,e.length),s... method add (line 1) | add(t){o("contact.id",(t||{}).id);let e=0,r=this.root;for(;null===r.co... method closest (line 1) | closest(t,e=1/0){if(o("id",t),!Number.isInteger(e)&&e!==1/0||e<=0)thro... method count (line 1) | count(){let t=0;for(const e=[this.root];e.length>0;){const r=e.pop();n... method _determineNode (line 1) | _determineNode(t,e,r){const i=r>>3,n=r%8;if(e.length<=i&&0!==n)return ... method get (line 1) | get(t){o("id",t);let e=0,r=this.root;for(;null===r.contacts;)r=this._d... method _indexOf (line 1) | _indexOf(t,e){for(let r=0;r0;){const r=e.pop(... method toIterable (line 1) | *toIterable(){for(const t=[this.root];t.length>0;){const e=t.pop();nul... method _update (line 1) | _update(t,e,r){if(!s(t.contacts[e].id,r.id))throw new Error("wrong ind... function h (line 1) | function h(t,e,r){s.BasePoint.call(this,t,"projective"),null===e&&null==... function s (line 1) | function s(t,e){this._block=i.alloc(t),this._finalSize=e,this._blockSize... function n (line 1) | function n(t){i.isBuffer(t)||(t=i.from(t));for(var e=t.length/4|0,r=new ... method length (line 1) | get length(){return this.buffer.length<<3} method constructor (line 1) | constructor(t=0,e){const r=null==e?void 0:e.grow;this.grow=r?Number.is... method get (line 1) | get(t){const e=t>>3;return e>3;if(e){if(r>=this.buffer.length){const t=Math.... method setAll (line 1) | setAll(t,e=0){const r=Math.min(i(e+t.length),this.grow);if(this.buffer... method forEach (line 1) | forEach(t,e=0,r=8*this.buffer.length){let i=e>>3,n=128>>e%8;for(let s=... method isEmpty (line 1) | isEmpty(){for(let t=0;t=3&&(i... method constructor (line 1) | constructor(t={}){super(),this.localNodeId=t.localNodeId||i(20),this.n... method arbiter (line 1) | static arbiter(t,e){return t.vectorClock>e.vectorClock?t:e} method distance (line 1) | static distance(t,e){let r=0,i=0;const n=Math.min(t.length,e.length),s... method add (line 1) | add(t){o("contact.id",(t||{}).id);let e=0,r=this.root;for(;null===r.co... method closest (line 1) | closest(t,e=1/0){if(o("id",t),!Number.isInteger(e)&&e!==1/0||e<=0)thro... method count (line 1) | count(){let t=0;for(const e=[this.root];e.length>0;){const r=e.pop();n... method _determineNode (line 1) | _determineNode(t,e,r){const i=r>>3,n=r%8;if(e.length<=i&&0!==n)return ... method get (line 1) | get(t){o("id",t);let e=0,r=this.root;for(;null===r.contacts;)r=this._d... method _indexOf (line 1) | _indexOf(t,e){for(let r=0;r0;){const r=e.pop(... method toIterable (line 1) | *toIterable(){for(const t=[this.root];t.length>0;){const e=t.pop();nul... method _update (line 1) | _update(t,e,r){if(!s(t.contacts[e].id,r.id))throw new Error("wrong ind... function h (line 1) | function h(t,e){var r=a.styles[e];return r?"["+a.colors[r][0]+"m"+t+"[... function u (line 1) | function u(t,e){return t} function f (line 1) | function f(t,r,i){if(t.customInspect&&r&&S(r.inspect)&&r.inspect!==e.ins... function l (line 1) | function l(t){return"["+Error.prototype.toString.call(t)+"]"} function c (line 1) | function c(t,e,r,i,n,s){var o,a,h;if((h=Object.getOwnPropertyDescriptor(... function d (line 1) | function d(t){return Array.isArray(t)} function p (line 1) | function p(t){return"boolean"==typeof t} function m (line 1) | function m(t){return null===t} function g (line 1) | function g(t){return"number"==typeof t} method constructor (line 1) | constructor(t,e){super(),this.id=t,this.type=e,d("new %s Peer %s",e,t)... method onConnect (line 1) | onConnect(){if(this.destroyed)return;this.connected=!0,this.emit("conn... method sendPe1 (line 1) | sendPe1(){this.wire.sendPe1(),this.sentPe1=!0} method onPe1 (line 1) | onPe1(){this.sendPe2()} method sendPe2 (line 1) | sendPe2(){this.wire.sendPe2(),this.sentPe2=!0} method onPe2 (line 1) | onPe2(){this.sendPe3()} method sendPe3 (line 1) | sendPe3(){this.wire.sendPe3(this.swarm.infoHash),this.sentPe3=!0} method onPe3 (line 1) | onPe3(t){this.swarm&&(this.swarm.infoHashHash!==t&&this.destroy(new Er... method sendPe4 (line 1) | sendPe4(){this.wire.sendPe4(this.swarm.infoHash),this.sentPe4=!0} method onPe4 (line 1) | onPe4(){this.sentHandshake||this.handshake()} method clearPipes (line 1) | clearPipes(){this.conn.unpipe(),this.wire.unpipe()} method setThrottlePipes (line 1) | setThrottlePipes(){const t=this;(0,n.pipeline)(this.conn,this.throttle... method onHandshake (line 1) | onHandshake(t,e){if(!this.swarm)return;if(this.destroyed)return;if(thi... method handshake (line 1) | handshake(){const t={dht:!this.swarm.private&&!!this.swarm.client.dht,... method startConnectTimeout (line 1) | startConnectTimeout(){clearTimeout(this.connectTimeout);const t={webrt... method startHandshakeTimeout (line 1) | startHandshakeTimeout(){clearTimeout(this.handshakeTimeout),this.hands... method destroy (line 1) | destroy(t){if(this.destroyed)return;this.destroyed=!0,this.connected&&... function y (line 1) | function y(t){return"string"==typeof t} function b (line 1) | function b(t){return void 0===t} function v (line 1) | function v(t){return w(t)&&"[object RegExp]"===k(t)} function w (line 1) | function w(t){return"object"==typeof t&&null!==t} function _ (line 1) | function _(t){return w(t)&&"[object Date]"===k(t)} function M (line 1) | function M(t){return w(t)&&("[object Error]"===k(t)||t instanceof Error)} function S (line 1) | function S(t){return"function"==typeof t} function k (line 1) | function k(t){return Object.prototype.toString.call(t)} function E (line 1) | function E(t){return t<10?"0"+t.toString(10):t.toString(10)} function A (line 1) | function A(t,e){return Object.prototype.hasOwnProperty.call(t,e)} function u (line 1) | function u(t,e){if(t.indexOf("::")!==t.lastIndexOf("::"))return null;let... function f (line 1) | function f(t,e,r,i){if(t.length!==e.length)throw new Error("ipaddr: cann... function l (line 1) | function l(t){if(s.test(t))return parseInt(t,16);if("0"===t[0]&&!isNaN(p... function c (line 1) | function c(t,e){for(;t.length!0===t[r]?e|or[r]:... method _sendMessage (line 1) | _sendMessage(){const t=Object.keys(this._localAddedPeers).slice(0,50),... function t (line 1) | function t(t,e){let r,i;if(16===t.length)for(this.parts=[],r=0;r<=14;r+=... method constructor (line 1) | constructor(t){super(),this._peerSupports=!1,this._wire=t} method onExtendedHandshake (line 1) | onExtendedHandshake(){this._peerSupports=!0} method onMessage (line 1) | onMessage(t){let e;try{e=new DataView(t.buffer).getUint32(0)}catch(t){... method donthave (line 1) | donthave(t){if(!this._peerSupports)return;Ke("donthave %d",t);const e=... method _failRequests (line 1) | _failRequests(t){const e=this._wire.requests;for(let r=0;r!0===t[r]?e|or[r]:... method _sendMessage (line 1) | _sendMessage(){const t=Object.keys(this._localAddedPeers).slice(0,50),... function o (line 1) | function o(t,e,r,o){s.call(this),this._cipher=new i.AES(e),this._prev=n.... function s (line 1) | function s(t,e,r){t.copy(e,r)} function t (line 1) | function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Ca... method constructor (line 1) | constructor(t){super(),this._peerSupports=!1,this._wire=t} method onExtendedHandshake (line 1) | onExtendedHandshake(){this._peerSupports=!0} method onMessage (line 1) | onMessage(t){let e;try{e=new DataView(t.buffer).getUint32(0)}catch(t){... method donthave (line 1) | donthave(t){if(!this._peerSupports)return;Ke("donthave %d",t);const e=... method _failRequests (line 1) | _failRequests(t){const e=this._wire.requests;for(let r=0;r!0===t[r]?e|or[r]:... method _sendMessage (line 1) | _sendMessage(){const t=Object.keys(this._localAddedPeers).slice(0,50),... function f (line 1) | function f(){} function s (line 1) | function s(t){n.call(this,t),this.enc="pem"} function e (line 1) | function e(t){let r,n,s,o=null;function a(...t){if(!a.enabled)return;con... method constructor (line 1) | constructor(e){super(),this._wire=e,this._fetching=!1,this._metadataCo... method onHandshake (line 1) | onHandshake(t,e,r){this._infoHash=t} method onExtendedHandshake (line 1) | onExtendedHandshake(t){return t.m&&t.m.ut_metadata?t.metadata_size?"nu... method onMessage (line 1) | onMessage(t){let e,r;try{const i=(0,w.dU)(t),n=i.indexOf("ee")+2;e=f.A... method fetch (line 1) | fetch(){this._metadataComplete||(this._fetching=!0,this._metadataSize&... method cancel (line 1) | cancel(){this._fetching=!1} method setMetadata (line 1) | async setMetadata(t){if(this._metadataComplete)return!0;Qe("set metada... method _send (line 1) | _send(t,e){let r=f.A.encode(t);ArrayBuffer.isView(e)&&(r=(0,w.xW)([r,e... method _request (line 1) | _request(t){this._send({msg_type:0,piece:t})} method _data (line 1) | _data(t,e,r){const i={msg_type:1,piece:t};"number"==typeof r&&(i.total... method _reject (line 1) | _reject(t){this._send({msg_type:2,piece:t})} method _onRequest (line 1) | _onRequest(t){if(!this._metadataComplete)return void this._reject(t);c... method _onData (line 1) | _onData(t,e,r){e.length>tr||!this._fetching||(this.metadata.set(e,t*tr... method _onReject (line 1) | _onReject(t){this._remainingRejects>0&&this._fetching?(this._request(t... method _requestPieces (line 1) | _requestPieces(){if(this._fetching){this.metadata=new Uint8Array(this.... method _checkDone (line 1) | async _checkDone(){let t=!0;for(let e=0;e>3;return e>3;if(e){if(r>=this.buffer.length){const t=Math.... method setAll (line 1) | setAll(t,e=0){const r=Math.min(i(e+t.length),this.grow);if(this.buffer... method forEach (line 1) | forEach(t,e=0,r=8*this.buffer.length){let i=e>>3,n=128>>e%8;for(let s=... method isEmpty (line 1) | isEmpty(){for(let t=0;t!0===t[r]?e|or[r]:... method _sendMessage (line 1) | _sendMessage(){const t=Object.keys(this._localAddedPeers).slice(0,50),... function n (line 1) | function n(t){const e=t<0?1:0;return t=Math.abs(Number(t||1)),Math.floor... method length (line 1) | get length(){return this.buffer.length<<3} method constructor (line 1) | constructor(t=0,e){const r=null==e?void 0:e.grow;this.grow=r?Number.is... method get (line 1) | get(t){const e=t>>3;return e>3;if(e){if(r>=this.buffer.length){const t=Math.... method setAll (line 1) | setAll(t,e=0){const r=Math.min(i(e+t.length),this.grow);if(this.buffer... method forEach (line 1) | forEach(t,e=0,r=8*this.buffer.length){let i=e>>3,n=128>>e%8;for(let s=... method isEmpty (line 1) | isEmpty(){for(let t=0;t>3;return e>3;if(e){if(r>=this.buffer.length){const t=Math.... method setAll (line 1) | setAll(t,e=0){const r=Math.min(i(e+t.length),this.grow);if(this.buffer... method forEach (line 1) | forEach(t,e=0,r=8*this.buffer.length){let i=e>>3,n=128>>e%8;for(let s=... method isEmpty (line 1) | isEmpty(){for(let t=0;t=65&&r<=70?r-55:r>=97&&r<... method constructor (line 1) | constructor(t={}){super(),this.localNodeId=t.localNodeId||i(20),this.n... method arbiter (line 1) | static arbiter(t,e){return t.vectorClock>e.vectorClock?t:e} method distance (line 1) | static distance(t,e){let r=0,i=0;const n=Math.min(t.length,e.length),s... method add (line 1) | add(t){o("contact.id",(t||{}).id);let e=0,r=this.root;for(;null===r.co... method closest (line 1) | closest(t,e=1/0){if(o("id",t),!Number.isInteger(e)&&e!==1/0||e<=0)thro... method count (line 1) | count(){let t=0;for(const e=[this.root];e.length>0;){const r=e.pop();n... method _determineNode (line 1) | _determineNode(t,e,r){const i=r>>3,n=r%8;if(e.length<=i&&0!==n)return ... method get (line 1) | get(t){o("id",t);let e=0,r=this.root;for(;null===r.contacts;)r=this._d... method _indexOf (line 1) | _indexOf(t,e){for(let r=0;r0;){const r=e.pop(... method toIterable (line 1) | *toIterable(){for(const t=[this.root];t.length>0;){const e=t.pop();nul... method _update (line 1) | _update(t,e,r){if(!s(t.contacts[e].id,r.id))throw new Error("wrong ind... function h (line 1) | function h(t,e,r){var i=a(t,r);return r-1>=e&&(i|=a(t,r-1)<<4),i} function u (line 1) | function u(t,e,r,i){for(var n=0,s=Math.min(t.length,r),o=e;oe.vectorClock?t:e} method distance (line 1) | static distance(t,e){let r=0,i=0;const n=Math.min(t.length,e.length),s... method add (line 1) | add(t){o("contact.id",(t||{}).id);let e=0,r=this.root;for(;null===r.co... method closest (line 1) | closest(t,e=1/0){if(o("id",t),!Number.isInteger(e)&&e!==1/0||e<=0)thro... method count (line 1) | count(){let t=0;for(const e=[this.root];e.length>0;){const r=e.pop();n... method _determineNode (line 1) | _determineNode(t,e,r){const i=r>>3,n=r%8;if(e.length<=i&&0!==n)return ... method get (line 1) | get(t){o("id",t);let e=0,r=this.root;for(;null===r.contacts;)r=this._d... method _indexOf (line 1) | _indexOf(t,e){for(let r=0;r0;){const r=e.pop(... method toIterable (line 1) | *toIterable(){for(const t=[this.root];t.length>0;){const e=t.pop();nul... method _update (line 1) | _update(t,e,r){if(!s(t.contacts[e].id,r.id))throw new Error("wrong ind... function h (line 1) | function h(t,e,r){Array.isArray(t)||(t=t.toArray());var n=new i(t);if(r&... function e (line 1) | function e(t,e){if("string"==typeof t[0])return t.join("");if("number"==... method constructor (line 1) | constructor(e){super(),this._wire=e,this._fetching=!1,this._metadataCo... method onHandshake (line 1) | onHandshake(t,e,r){this._infoHash=t} method onExtendedHandshake (line 1) | onExtendedHandshake(t){return t.m&&t.m.ut_metadata?t.metadata_size?"nu... method onMessage (line 1) | onMessage(t){let e,r;try{const i=(0,w.dU)(t),n=i.indexOf("ee")+2;e=f.A... method fetch (line 1) | fetch(){this._metadataComplete||(this._fetching=!0,this._metadataSize&... method cancel (line 1) | cancel(){this._fetching=!1} method setMetadata (line 1) | async setMetadata(t){if(this._metadataComplete)return!0;Qe("set metada... method _send (line 1) | _send(t,e){let r=f.A.encode(t);ArrayBuffer.isView(e)&&(r=(0,w.xW)([r,e... method _request (line 1) | _request(t){this._send({msg_type:0,piece:t})} method _data (line 1) | _data(t,e,r){const i={msg_type:1,piece:t};"number"==typeof r&&(i.total... method _reject (line 1) | _reject(t){this._send({msg_type:2,piece:t})} method _onRequest (line 1) | _onRequest(t){if(!this._metadataComplete)return void this._reject(t);c... method _onData (line 1) | _onData(t,e,r){e.length>tr||!this._fetching||(this.metadata.set(e,t*tr... method _onReject (line 1) | _onReject(t){this._remainingRejects>0&&this._fetching?(this._request(t... method _requestPieces (line 1) | _requestPieces(){if(this._fetching){this.metadata=new Uint8Array(this.... method _checkDone (line 1) | async _checkDone(){let t=!0;for(let e=0;etr||!this._fetching||(this.metadata.set(e,t*tr... method _onReject (line 1) | _onReject(t){this._remainingRejects>0&&this._fetching?(this._request(t... method _requestPieces (line 1) | _requestPieces(){if(this._fetching){this.metadata=new Uint8Array(this.... method _checkDone (line 1) | async _checkDone(){let t=!0;for(let e=0;e{}),this._finished?i(new Error("wire... method piece (line 1) | piece(t,e,r){this._debug("piece index=%d offset=%d",t,e),this._message... method cancel (line 1) | cancel(t,e,r){this._debug("cancel index=%d offset=%d length=%d",t,e,r)... method port (line 1) | port(t){this._debug("port %d",t);const e=new Uint8Array(w);new DataVie... method suggest (line 1) | suggest(t){if(!this.hasFast)throw Error("fast extension is disabled");... method haveAll (line 1) | haveAll(){if(!this.hasFast)throw Error("fast extension is disabled");t... method haveNone (line 1) | haveNone(){if(!this.hasFast)throw Error("fast extension is disabled");... method reject (line 1) | reject(t,e,r){if(!this.hasFast)throw Error("fast extension is disabled... method allowedFast (line 1) | allowedFast(t){if(!this.hasFast)throw Error("fast extension is disable... method extended (line 1) | extended(t,e){if(this._debug("extended ext=%s",t),"string"==typeof t&&... method setEncrypt (line 1) | async setEncrypt(t,e){if(!this.type.startsWith("tcp"))return!1;const r... method _message (line 1) | _message(t,e,r){const i=r?r.length:0,n=new Uint8Array(5+4*e.length);I(... method _push (line 1) | _push(t){if(!this._finished)return 2===this._encryptionMethod&&this._c... method _onKeepAlive (line 1) | _onKeepAlive(){this._debug("got keep-alive"),this.emit("keep-alive")} method _onPe1 (line 1) | _onPe1(t){this._peerPubKey=(0,u.V5)(t),this._sharedSecret=this._dh.com... method _onPe2 (line 1) | _onPe2(t){this._peerPubKey=(0,u.V5)(t),this._sharedSecret=this._dh.com... method _onPe3 (line 1) | async _onPe3(t){const e=await(0,u.tW)((0,u.fk)(this._utfToHex("req3")+... method _onPe3Encrypted (line 1) | _onPe3Encrypted(t,e){if(!(0,u.LC)(t,S))return this._debug("Error: veri... method _onPe4 (line 1) | _onPe4(t){this._encryptionMethod=t[3],k.includes(this._encryptionMetho... method _onHandshake (line 1) | _onHandshake(t,e,r){const i=(0,u.V5)(t),n=(0,u.V5)(e);this._debug("got... method _onChoke (line 1) | _onChoke(){if(this.peerChoking=!0,this._debug("got choke"),this.emit("... method _onUnchoke (line 1) | _onUnchoke(){this.peerChoking=!1,this._debug("got unchoke"),this.emit(... method _onInterested (line 1) | _onInterested(){this.peerInterested=!0,this._debug("got interested"),t... method _onUninterested (line 1) | _onUninterested(){this.peerInterested=!1,this._debug("got uninterested... method _onHave (line 1) | _onHave(t){this.peerPieces.get(t)||(this._debug("got have %d",t),this.... method _onBitField (line 1) | _onBitField(t){this.peerPieces=new n.A(t),this._debug("got bitfield"),... method _onRequest (line 1) | _onRequest(t,e,r){if(this.amChoking&&(!this.hasFast||!this.allowedFast... method _onPiece (line 1) | _onPiece(t,e,r){this._debug("got piece index=%d offset=%d",t,e),this._... method _onCancel (line 1) | _onCancel(t,e,r){this._debug("got cancel index=%d offset=%d length=%d"... method _onPort (line 1) | _onPort(t){this._debug("got port %d",t),this.emit("port",t)} method _onSuggest (line 1) | _onSuggest(t){if(!this.hasFast)return this._debug("Error: got suggest ... method _onHaveAll (line 1) | _onHaveAll(){if(!this.hasFast)return this._debug("Error: got have-all ... method _onHaveNone (line 1) | _onHaveNone(){if(!this.hasFast)return this._debug("Error: got have-non... method _onReject (line 1) | _onReject(t,e,r){if(!this.hasFast)return this._debug("Error: got rejec... method _onAllowedFast (line 1) | _onAllowedFast(t){if(!this.hasFast)return this._debug("Error: got allo... method _onExtended (line 1) | _onExtended(t,e){if(0===t){let t;try{t=i.A.decode(e)}catch(t){this._de... method _onTimeout (line 1) | _onTimeout(){this._debug("request timed out"),this._callback(this.requ... method _write (line 1) | _write(t,e){if(2===this._encryptionMethod&&this._cryptoHandshakeDone&&... method _callback (line 1) | _callback(t,e,r){t&&(this._resetTimeout(!this.peerChoking&&!this._fini... method _resetTimeout (line 1) | _resetTimeout(t){if(!t||!this._timeoutMs||!this.requests.length)return... method _parse (line 1) | _parse(t,e){this._parserSize=t,this._parser=e} method _parseUntil (line 1) | _parseUntil(t,e){this._cryptoSyncPattern=t,this._waitMaxBytes=e} method _onMessageLength (line 1) | _onMessageLength(t){const e=A(t);e>0?this._parse(e,this._onMessage):(t... method _onMessage (line 1) | _onMessage(t){switch(this._parse(4,this._onMessageLength),t[0]){case 0... method _determineHandshakeType (line 1) | _determineHandshakeType(){this._parse(1,t=>{const e=t[0];19===e?this._... method _parsePe1 (line 1) | _parsePe1(t){this._parse(95,e=>{this._onPe1((0,u.xW)([t,e])),this._par... method _parsePe2 (line 1) | _parsePe2(){this._parse(96,async t=>{this._onPe2(t),this._setGenerator... method _parsePe3 (line 1) | async _parsePe3(){const t=await(0,u.tW)((0,u.fk)(this._utfToHex("req1"... method _parsePe3Encrypted (line 1) | _parsePe3Encrypted(){this._parse(14,t=>{const e=this._decryptHandshake... method _parsePe4 (line 1) | _parsePe4(){const t=this._decryptHandshake(S);this._parseUntil(t,512),... method _parseHandshake (line 1) | _parseHandshake(){this._parse(1,t=>{const e=t[0];if(19!==e)return this... method _onHandshakeBuffer (line 1) | _onHandshakeBuffer(t){const e=t.slice(0,19);if("BitTorrent protocol"!=... method _onFinish (line 1) | _onFinish(){for(this._finished=!0,this.push(null);this.read(););for(cl... method _debug (line 1) | _debug(...t){t[0]=`[${this._debugId}] ${t[0]}`,c(...t)} method _pull (line 1) | _pull(t,e,r,i){for(let n=0;n0)throw new Error('"end... function O (line 1) | function O(t,e){t.endEmitted||0!==t.length||(t.endEmitted=!0,e.readable=... function B (line 1) | function B(t,e){for(var r=0,i=t.length;re.vectorClock?t:e} method distance (line 1) | static distance(t,e){let r=0,i=0;const n=Math.min(t.length,e.length),s... method add (line 1) | add(t){o("contact.id",(t||{}).id);let e=0,r=this.root;for(;null===r.co... method closest (line 1) | closest(t,e=1/0){if(o("id",t),!Number.isInteger(e)&&e!==1/0||e<=0)thro... method count (line 1) | count(){let t=0;for(const e=[this.root];e.length>0;){const r=e.pop();n... method _determineNode (line 1) | _determineNode(t,e,r){const i=r>>3,n=r%8;if(e.length<=i&&0!==n)return ... method get (line 1) | get(t){o("id",t);let e=0,r=this.root;for(;null===r.contacts;)r=this._d... method _indexOf (line 1) | _indexOf(t,e){for(let r=0;r0;){const r=e.pop(... method toIterable (line 1) | *toIterable(){for(const t=[this.root];t.length>0;){const e=t.pop();nul... method _update (line 1) | _update(t,e,r){if(!s(t.contacts[e].id,r.id))throw new Error("wrong ind... function h (line 1) | function h(t,e,r){if(e)return t.emit("error",e);if(null!=r&&t.push(r),t.... function e (line 1) | function e(t){return t>=48&&t<=57?t-48:t>=65&&t<=70?t-65+10:t>=97&&t<=10... method constructor (line 1) | constructor(e){super(),this._wire=e,this._fetching=!1,this._metadataCo... method onHandshake (line 1) | onHandshake(t,e,r){this._infoHash=t} method onExtendedHandshake (line 1) | onExtendedHandshake(t){return t.m&&t.m.ut_metadata?t.metadata_size?"nu... method onMessage (line 1) | onMessage(t){let e,r;try{const i=(0,w.dU)(t),n=i.indexOf("ee")+2;e=f.A... method fetch (line 1) | fetch(){this._metadataComplete||(this._fetching=!0,this._metadataSize&... method cancel (line 1) | cancel(){this._fetching=!1} method setMetadata (line 1) | async setMetadata(t){if(this._metadataComplete)return!0;Qe("set metada... method _send (line 1) | _send(t,e){let r=f.A.encode(t);ArrayBuffer.isView(e)&&(r=(0,w.xW)([r,e... method _request (line 1) | _request(t){this._send({msg_type:0,piece:t})} method _data (line 1) | _data(t,e,r){const i={msg_type:1,piece:t};"number"==typeof r&&(i.total... method _reject (line 1) | _reject(t){this._send({msg_type:2,piece:t})} method _onRequest (line 1) | _onRequest(t){if(!this._metadataComplete)return void this._reject(t);c... method _onData (line 1) | _onData(t,e,r){e.length>tr||!this._fetching||(this.metadata.set(e,t*tr... method _onReject (line 1) | _onReject(t){this._remainingRejects>0&&this._fetching?(this._request(t... method _requestPieces (line 1) | _requestPieces(){if(this._fetching){this.metadata=new Uint8Array(this.... method _checkDone (line 1) | async _checkDone(){let t=!0;for(let e=0;ee.vectorClock?t:e} method distance (line 1) | static distance(t,e){let r=0,i=0;const n=Math.min(t.length,e.length),s... method add (line 1) | add(t){o("contact.id",(t||{}).id);let e=0,r=this.root;for(;null===r.co... method closest (line 1) | closest(t,e=1/0){if(o("id",t),!Number.isInteger(e)&&e!==1/0||e<=0)thro... method count (line 1) | count(){let t=0;for(const e=[this.root];e.length>0;){const r=e.pop();n... method _determineNode (line 1) | _determineNode(t,e,r){const i=r>>3,n=r%8;if(e.length<=i&&0!==n)return ... method get (line 1) | get(t){o("id",t);let e=0,r=this.root;for(;null===r.contacts;)r=this._d... method _indexOf (line 1) | _indexOf(t,e){for(let r=0;r0;){const r=e.pop(... method toIterable (line 1) | *toIterable(){for(const t=[this.root];t.length>0;){const e=t.pop();nul... method _update (line 1) | _update(t,e,r){if(!s(t.contacts[e].id,r.id))throw new Error("wrong ind... function h (line 1) | function h(t){o.call(this,t);var e=new a;this._desState=e,this.deriveKey... function s (line 1) | function s(t){this.rand=t||new n.Rand} function b (line 1) | function b(){if(!(this instanceof b))return new b;g.call(this),this.h=[1... function i (line 1) | function i(t,e){if(!t)throw new Error(e||"Assertion failed")} function n (line 1) | function n(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.... method length (line 1) | get length(){return this.buffer.length<<3} method constructor (line 1) | constructor(t=0,e){const r=null==e?void 0:e.grow;this.grow=r?Number.is... method get (line 1) | get(t){const e=t>>3;return e>3;if(e){if(r>=this.buffer.length){const t=Math.... method setAll (line 1) | setAll(t,e=0){const r=Math.min(i(e+t.length),this.grow);if(this.buffer... method forEach (line 1) | forEach(t,e=0,r=8*this.buffer.length){let i=e>>3,n=128>>e%8;for(let s=... method isEmpty (line 1) | isEmpty(){for(let t=0;t=65&&r<=70?r-55:r>=97&&r<... method constructor (line 1) | constructor(t={}){super(),this.localNodeId=t.localNodeId||i(20),this.n... method arbiter (line 1) | static arbiter(t,e){return t.vectorClock>e.vectorClock?t:e} method distance (line 1) | static distance(t,e){let r=0,i=0;const n=Math.min(t.length,e.length),s... method add (line 1) | add(t){o("contact.id",(t||{}).id);let e=0,r=this.root;for(;null===r.co... method closest (line 1) | closest(t,e=1/0){if(o("id",t),!Number.isInteger(e)&&e!==1/0||e<=0)thro... method count (line 1) | count(){let t=0;for(const e=[this.root];e.length>0;){const r=e.pop();n... method _determineNode (line 1) | _determineNode(t,e,r){const i=r>>3,n=r%8;if(e.length<=i&&0!==n)return ... method get (line 1) | get(t){o("id",t);let e=0,r=this.root;for(;null===r.contacts;)r=this._d... method _indexOf (line 1) | _indexOf(t,e){for(let r=0;r0;){const r=e.pop(... method toIterable (line 1) | *toIterable(){for(const t=[this.root];t.length>0;){const e=t.pop();nul... method _update (line 1) | _update(t,e,r){if(!s(t.contacts[e].id,r.id))throw new Error("wrong ind... function h (line 1) | function h(t,e,r){var i=a(t,r);return r-1>=e&&(i|=a(t,r-1)<<4),i} function u (line 1) | function u(t,e,r,i){for(var n=0,s=Math.min(t.length,r),o=e;o>3;return e>3;if(e){if(r>=this.buffer.length){const t=Math.... method setAll (line 1) | setAll(t,e=0){const r=Math.min(i(e+t.length),this.grow);if(this.buffer... method forEach (line 1) | forEach(t,e=0,r=8*this.buffer.length){let i=e>>3,n=128>>e%8;for(let s=... method isEmpty (line 1) | isEmpty(){for(let t=0;t=65&&r<=70?r-55:r>=97&&r<... method constructor (line 1) | constructor(t={}){super(),this.localNodeId=t.localNodeId||i(20),this.n... method arbiter (line 1) | static arbiter(t,e){return t.vectorClock>e.vectorClock?t:e} method distance (line 1) | static distance(t,e){let r=0,i=0;const n=Math.min(t.length,e.length),s... method add (line 1) | add(t){o("contact.id",(t||{}).id);let e=0,r=this.root;for(;null===r.co... method closest (line 1) | closest(t,e=1/0){if(o("id",t),!Number.isInteger(e)&&e!==1/0||e<=0)thro... method count (line 1) | count(){let t=0;for(const e=[this.root];e.length>0;){const r=e.pop();n... method _determineNode (line 1) | _determineNode(t,e,r){const i=r>>3,n=r%8;if(e.length<=i&&0!==n)return ... method get (line 1) | get(t){o("id",t);let e=0,r=this.root;for(;null===r.contacts;)r=this._d... method _indexOf (line 1) | _indexOf(t,e){for(let r=0;r0;){const r=e.pop(... method toIterable (line 1) | *toIterable(){for(const t=[this.root];t.length>0;){const e=t.pop();nul... method _update (line 1) | _update(t,e,r){if(!s(t.contacts[e].id,r.id))throw new Error("wrong ind... function h (line 1) | function h(t,e,r){var i=a(t,r);return r-1>=e&&(i|=a(t,r-1)<<4),i} function u (line 1) | function u(t,e,r,i){for(var n=0,s=Math.min(t.length,r),o=e;o0&&!i._d... function w (line 1) | function w(){var t=this,e=t.incoming;if(e){e.complete=!0;var r=t._header... function M (line 1) | function M(){this._httpMessage&&this._httpMessage.emit("drain")} function S (line 1) | function S(t){return t>=94&&t<=122||(t>=65&&t<=90||(45===t||(t>=48&&t<=5... function c (line 1) | function c(t){delete h[t]} function d (line 1) | function d(t){if(u)setTimeout(d,0,t);else{var e=h[t];if(e){u=!0;try{!fun... function i (line 1) | function i(t,e){if(!t)throw new Error(e||"Assertion failed")} function n (line 1) | function n(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.... method length (line 1) | get length(){return this.buffer.length<<3} method constructor (line 1) | constructor(t=0,e){const r=null==e?void 0:e.grow;this.grow=r?Number.is... method get (line 1) | get(t){const e=t>>3;return e>3;if(e){if(r>=this.buffer.length){const t=Math.... method setAll (line 1) | setAll(t,e=0){const r=Math.min(i(e+t.length),this.grow);if(this.buffer... method forEach (line 1) | forEach(t,e=0,r=8*this.buffer.length){let i=e>>3,n=128>>e%8;for(let s=... method isEmpty (line 1) | isEmpty(){for(let t=0;t=65&&r<=70?r-55:r>=97&&r<... method constructor (line 1) | constructor(t={}){super(),this.localNodeId=t.localNodeId||i(20),this.n... method arbiter (line 1) | static arbiter(t,e){return t.vectorClock>e.vectorClock?t:e} method distance (line 1) | static distance(t,e){let r=0,i=0;const n=Math.min(t.length,e.length),s... method add (line 1) | add(t){o("contact.id",(t||{}).id);let e=0,r=this.root;for(;null===r.co... method closest (line 1) | closest(t,e=1/0){if(o("id",t),!Number.isInteger(e)&&e!==1/0||e<=0)thro... method count (line 1) | count(){let t=0;for(const e=[this.root];e.length>0;){const r=e.pop();n... method _determineNode (line 1) | _determineNode(t,e,r){const i=r>>3,n=r%8;if(e.length<=i&&0!==n)return ... method get (line 1) | get(t){o("id",t);let e=0,r=this.root;for(;null===r.contacts;)r=this._d... method _indexOf (line 1) | _indexOf(t,e){for(let r=0;r0;){const r=e.pop(... method toIterable (line 1) | *toIterable(){for(const t=[this.root];t.length>0;){const e=t.pop();nul... method _update (line 1) | _update(t,e,r){if(!s(t.contacts[e].id,r.id))throw new Error("wrong ind... function h (line 1) | function h(t,e,r){var i=a(t,r);return r-1>=e&&(i|=a(t,r-1)<<4),i} function u (line 1) | function u(t,e,r,i){for(var n=0,s=Math.min(t.length,r),o=e;o>3;return e>3;if(e){if(r>=this.buffer.length){const t=Math.... method setAll (line 1) | setAll(t,e=0){const r=Math.min(i(e+t.length),this.grow);if(this.buffer... method forEach (line 1) | forEach(t,e=0,r=8*this.buffer.length){let i=e>>3,n=128>>e%8;for(let s=... method isEmpty (line 1) | isEmpty(){for(let t=0;ttr||!this._fetching||(this.metadata.set(e,t*tr... method _onReject (line 1) | _onReject(t){this._remainingRejects>0&&this._fetching?(this._request(t... method _requestPieces (line 1) | _requestPieces(){if(this._fetching){this.metadata=new Uint8Array(this.... method _checkDone (line 1) | async _checkDone(){let t=!0;for(let e=0;etr||!this._fetching||(this.metadata.set(e,t*tr... method _onReject (line 1) | _onReject(t){this._remainingRejects>0&&this._fetching?(this._request(t... method _requestPieces (line 1) | _requestPieces(){if(this._fetching){this.metadata=new Uint8Array(this.... method _checkDone (line 1) | async _checkDone(){let t=!0;for(let e=0;e>3;return e>3;if(e){if(r>=this.buffer.length){const t=Math.... method setAll (line 1) | setAll(t,e=0){const r=Math.min(i(e+t.length),this.grow);if(this.buffer... method forEach (line 1) | forEach(t,e=0,r=8*this.buffer.length){let i=e>>3,n=128>>e%8;for(let s=... method isEmpty (line 1) | isEmpty(){for(let t=0;t>>28|e<<4)^(e>>>2|t<<30)^(e>>>7|t<<25)} function c (line 1) | function c(t,e){return(t>>>14|e<<18)^(t>>>18|e<<14)^(e>>>9|t<<23)} function d (line 1) | function d(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^t>>>7} function p (line 1) | function p(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^(t>>>7|e<<25)} function m (line 1) | function m(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^t>>>6} function g (line 1) | function g(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^(t>>>6|e<<26)} method constructor (line 1) | constructor(t,e){super(),this.id=t,this.type=e,d("new %s Peer %s",e,t)... method onConnect (line 1) | onConnect(){if(this.destroyed)return;this.connected=!0,this.emit("conn... method sendPe1 (line 1) | sendPe1(){this.wire.sendPe1(),this.sentPe1=!0} method onPe1 (line 1) | onPe1(){this.sendPe2()} method sendPe2 (line 1) | sendPe2(){this.wire.sendPe2(),this.sentPe2=!0} method onPe2 (line 1) | onPe2(){this.sendPe3()} method sendPe3 (line 1) | sendPe3(){this.wire.sendPe3(this.swarm.infoHash),this.sentPe3=!0} method onPe3 (line 1) | onPe3(t){this.swarm&&(this.swarm.infoHashHash!==t&&this.destroy(new Er... method sendPe4 (line 1) | sendPe4(){this.wire.sendPe4(this.swarm.infoHash),this.sentPe4=!0} method onPe4 (line 1) | onPe4(){this.sentHandshake||this.handshake()} method clearPipes (line 1) | clearPipes(){this.conn.unpipe(),this.wire.unpipe()} method setThrottlePipes (line 1) | setThrottlePipes(){const t=this;(0,n.pipeline)(this.conn,this.throttle... method onHandshake (line 1) | onHandshake(t,e){if(!this.swarm)return;if(this.destroyed)return;if(thi... method handshake (line 1) | handshake(){const t={dht:!this.swarm.private&&!!this.swarm.client.dht,... method startConnectTimeout (line 1) | startConnectTimeout(){clearTimeout(this.connectTimeout);const t={webrt... method startHandshakeTimeout (line 1) | startHandshakeTimeout(){clearTimeout(this.handshakeTimeout),this.hands... method destroy (line 1) | destroy(t){if(this.destroyed)return;this.destroyed=!0,this.connected&&... function y (line 1) | function y(t,e){return t>>>0>>0?1:0} function e (line 1) | function e(e,r,i){t.writeInt32BE(e,i),t.writeInt32BE(r,i+4)} method constructor (line 1) | constructor(e){super(),this._wire=e,this._fetching=!1,this._metadataCo... method onHandshake (line 1) | onHandshake(t,e,r){this._infoHash=t} method onExtendedHandshake (line 1) | onExtendedHandshake(t){return t.m&&t.m.ut_metadata?t.metadata_size?"nu... method onMessage (line 1) | onMessage(t){let e,r;try{const i=(0,w.dU)(t),n=i.indexOf("ee")+2;e=f.A... method fetch (line 1) | fetch(){this._metadataComplete||(this._fetching=!0,this._metadataSize&... method cancel (line 1) | cancel(){this._fetching=!1} method setMetadata (line 1) | async setMetadata(t){if(this._metadataComplete)return!0;Qe("set metada... method _send (line 1) | _send(t,e){let r=f.A.encode(t);ArrayBuffer.isView(e)&&(r=(0,w.xW)([r,e... method _request (line 1) | _request(t){this._send({msg_type:0,piece:t})} method _data (line 1) | _data(t,e,r){const i={msg_type:1,piece:t};"number"==typeof r&&(i.total... method _reject (line 1) | _reject(t){this._send({msg_type:2,piece:t})} method _onRequest (line 1) | _onRequest(t){if(!this._metadataComplete)return void this._reject(t);c... method _onData (line 1) | _onData(t,e,r){e.length>tr||!this._fetching||(this.metadata.set(e,t*tr... method _onReject (line 1) | _onReject(t){this._remainingRejects>0&&this._fetching?(this._request(t... method _requestPieces (line 1) | _requestPieces(){if(this._fetching){this.metadata=new Uint8Array(this.... method _checkDone (line 1) | async _checkDone(){let t=!0;for(let e=0;e>3)+Number(t%8!=0)} class n (line 1) | class n{get length(){return this.buffer.length<<3}constructor(t=0,e){con... method length (line 1) | get length(){return this.buffer.length<<3} method constructor (line 1) | constructor(t=0,e){const r=null==e?void 0:e.grow;this.grow=r?Number.is... method get (line 1) | get(t){const e=t>>3;return e>3;if(e){if(r>=this.buffer.length){const t=Math.... method setAll (line 1) | setAll(t,e=0){const r=Math.min(i(e+t.length),this.grow);if(this.buffer... method forEach (line 1) | forEach(t,e=0,r=8*this.buffer.length){let i=e>>3,n=128>>e%8;for(let s=... method isEmpty (line 1) | isEmpty(){for(let t=0;te.vectorClock?t:e} method distance (line 1) | static distance(t,e){let r=0,i=0;const n=Math.min(t.length,e.length),s... method add (line 1) | add(t){o("contact.id",(t||{}).id);let e=0,r=this.root;for(;null===r.co... method closest (line 1) | closest(t,e=1/0){if(o("id",t),!Number.isInteger(e)&&e!==1/0||e<=0)thro... method count (line 1) | count(){let t=0;for(const e=[this.root];e.length>0;){const r=e.pop();n... method _determineNode (line 1) | _determineNode(t,e,r){const i=r>>3,n=r%8;if(e.length<=i&&0!==n)return ... method get (line 1) | get(t){o("id",t);let e=0,r=this.root;for(;null===r.contacts;)r=this._d... method _indexOf (line 1) | _indexOf(t,e){for(let r=0;r0;){const r=e.pop(... method toIterable (line 1) | *toIterable(){for(const t=[this.root];t.length>0;){const e=t.pop();nul... method _update (line 1) | _update(t,e,r){if(!s(t.contacts[e].id,r.id))throw new Error("wrong ind... function s (line 1) | function s(t){var e;switch(this.encoding=function(t){var e=function(t){i... function o (line 1) | function o(t){return t<=127?0:t>>5==6?2:t>>4==14?3:t>>3==30?4:t>>6==2?-1... function a (line 1) | function a(t){var e=this.lastTotal-this.lastNeed,r=function(t,e){if(128!... method constructor (line 1) | constructor(t={}){super(),this.localNodeId=t.localNodeId||i(20),this.n... method arbiter (line 1) | static arbiter(t,e){return t.vectorClock>e.vectorClock?t:e} method distance (line 1) | static distance(t,e){let r=0,i=0;const n=Math.min(t.length,e.length),s... method add (line 1) | add(t){o("contact.id",(t||{}).id);let e=0,r=this.root;for(;null===r.co... method closest (line 1) | closest(t,e=1/0){if(o("id",t),!Number.isInteger(e)&&e!==1/0||e<=0)thro... method count (line 1) | count(){let t=0;for(const e=[this.root];e.length>0;){const r=e.pop();n... method _determineNode (line 1) | _determineNode(t,e,r){const i=r>>3,n=r%8;if(e.length<=i&&0!==n)return ... method get (line 1) | get(t){o("id",t);let e=0,r=this.root;for(;null===r.contacts;)r=this._d... method _indexOf (line 1) | _indexOf(t,e){for(let r=0;r0;){const r=e.pop(... method toIterable (line 1) | *toIterable(){for(const t=[this.root];t.length>0;){const e=t.pop();nul... method _update (line 1) | _update(t,e,r){if(!s(t.contacts[e].id,r.id))throw new Error("wrong ind... function h (line 1) | function h(t,e){if((t.length-e)%2==0){var r=t.toString("utf16le",e);if(r... function u (line 1) | function u(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var r... function f (line 1) | function f(t,e){var r=(t.length-e)%3;return 0===r?t.toString("base64",e)... function l (line 1) | function l(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+... function c (line 1) | function c(t){return t.toString(this.encoding)} function d (line 1) | function d(t){return t&&t.length?this.write(t):""} function e (line 1) | function e(t,e){if(!t)throw new Error(e||"Assertion failed")} method constructor (line 1) | constructor(e){super(),this._wire=e,this._fetching=!1,this._metadataCo... method onHandshake (line 1) | onHandshake(t,e,r){this._infoHash=t} method onExtendedHandshake (line 1) | onExtendedHandshake(t){return t.m&&t.m.ut_metadata?t.metadata_size?"nu... method onMessage (line 1) | onMessage(t){let e,r;try{const i=(0,w.dU)(t),n=i.indexOf("ee")+2;e=f.A... method fetch (line 1) | fetch(){this._metadataComplete||(this._fetching=!0,this._metadataSize&... method cancel (line 1) | cancel(){this._fetching=!1} method setMetadata (line 1) | async setMetadata(t){if(this._metadataComplete)return!0;Qe("set metada... method _send (line 1) | _send(t,e){let r=f.A.encode(t);ArrayBuffer.isView(e)&&(r=(0,w.xW)([r,e... method _request (line 1) | _request(t){this._send({msg_type:0,piece:t})} method _data (line 1) | _data(t,e,r){const i={msg_type:1,piece:t};"number"==typeof r&&(i.total... method _reject (line 1) | _reject(t){this._send({msg_type:2,piece:t})} method _onRequest (line 1) | _onRequest(t){if(!this._metadataComplete)return void this._reject(t);c... method _onData (line 1) | _onData(t,e,r){e.length>tr||!this._fetching||(this.metadata.set(e,t*tr... method _onReject (line 1) | _onReject(t){this._remainingRejects>0&&this._fetching?(this._request(t... method _requestPieces (line 1) | _requestPieces(){if(this._fetching){this.metadata=new Uint8Array(this.... method _checkDone (line 1) | async _checkDone(){let t=!0;for(let e=0;etr||!this._fetching||(this.metadata.set(e,t*tr... method _onReject (line 1) | _onReject(t){this._remainingRejects>0&&this._fetching?(this._request(t... method _requestPieces (line 1) | _requestPieces(){if(this._fetching){this.metadata=new Uint8Array(this.... method _checkDone (line 1) | async _checkDone(){let t=!0;for(let e=0;e>3;return e>3;if(e){if(r>=this.buffer.length){const t=Math.... method setAll (line 1) | setAll(t,e=0){const r=Math.min(i(e+t.length),this.grow);if(this.buffer... method forEach (line 1) | forEach(t,e=0,r=8*this.buffer.length){let i=e>>3,n=128>>e%8;for(let s=... method isEmpty (line 1) | isEmpty(){for(let t=0;t>3;return e>3;if(e){if(r>=this.buffer.length){const t=Math.... method setAll (line 1) | setAll(t,e=0){const r=Math.min(i(e+t.length),this.grow);if(this.buffer... method forEach (line 1) | forEach(t,e=0,r=8*this.buffer.length){let i=e>>3,n=128>>e%8;for(let s=... method isEmpty (line 1) | isEmpty(){for(let t=0;t{}){this.mem[t]=e,this.store.put(t,e,e=>{this.mem[t]=null,... method get (line 1) | get(t,e,r=()=>{}){if("function"==typeof e)return this.get(t,null,e);let ... method close (line 1) | close(t=()=>{}){this.store.close(t)} method destroy (line 1) | destroy(t=()=>{}){this.store.destroy(t)} function h (line 1) | function h(){this.init(),this._w=a,n.call(this,64,56)} function u (line 1) | function u(t){return t<<1|t>>>31} function f (line 1) | function f(t){return t<<5|t>>>27} function l (line 1) | function l(t){return t<<30|t>>>2} function c (line 1) | function c(t,e,r,i){return 0===t?e&r|~e&i:2===t?e&r|e&i|r&i:e^r^i} function d (line 1) | function d(){return n||(n=globalThis.process&&globalThis.process.nextTic... function p (line 1) | function p(t,e,r,i,n){return f.importKey("raw",t,{name:"PBKDF2"},!1,["de... function c (line 1) | function c(){if(!(this instanceof c))return new c;f.call(this),this.h=[1... function s (line 1) | function s(t){t&&!t._paused&&t.readable&&t.resume()} function o (line 1) | function o(t){n.Readable.call(this),this._readableState.readingMore=!0,t... function h (line 1) | function h(t){i.call(this);var e,r=t.mode.toLowerCase(),n=a[r];e=t.decry... function h (line 1) | function h(){this.init(),this._w=a,n.call(this,64,56)} function u (line 1) | function u(t,e,r){return r^t&(e^r)} function f (line 1) | function f(t,e,r){return t&e|r&(t|e)} function l (line 1) | function l(t){return(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10)} function c (line 1) | function c(t){return(t>>>6|t<<26)^(t>>>11|t<<21)^(t>>>25|t<<7)} function d (line 1) | function d(t){return(t>>>7|t<<25)^(t>>>18|t<<14)^t>>>3} function p (line 1) | function p(t){return(t>>>17|t<<15)^(t>>>19|t<<13)^t>>>10} function s (line 1) | function s(t,e){for(var r in t)e[r]=t[r]} function o (line 1) | function o(t,e,r){return n(t,e,r)} function i (line 1) | function i(t){return 1===t.length?"0"+t:t} function n (line 1) | function n(t){for(var e="",r=0;r>3;return e>3;if(e){if(r>=this.buffer.length){const t=Math.... method setAll (line 1) | setAll(t,e=0){const r=Math.min(i(e+t.length),this.grow);if(this.buffer... method forEach (line 1) | forEach(t,e=0,r=8*this.buffer.length){let i=e>>3,n=128>>e%8;for(let s=... method isEmpty (line 1) | isEmpty(){for(let t=0;t{}){if(!this.cache)return n(()=>r(new Error("CacheStore cl... method get (line 1) | get(t,e,r=()=>{}){if("function"==typeof e)return this.get(t,null,e);if(!... method close (line 1) | close(t=()=>{}){if(!this.cache)return n(()=>t(new Error("CacheStore clos... method destroy (line 1) | destroy(t=()=>{}){if(!this.cache)return n(()=>t(new Error("CacheStore cl... function n (line 1) | function n(t,e){if(t===e)return 0;for(var r=t.length,i=e.length,n=0,s=Ma... method length (line 1) | get length(){return this.buffer.length<<3} method constructor (line 1) | constructor(t=0,e){const r=null==e?void 0:e.grow;this.grow=r?Number.is... method get (line 1) | get(t){const e=t>>3;return e>3;if(e){if(r>=this.buffer.length){const t=Math.... method setAll (line 1) | setAll(t,e=0){const r=Math.min(i(e+t.length),this.grow);if(this.buffer... method forEach (line 1) | forEach(t,e=0,r=8*this.buffer.length){let i=e>>3,n=128>>e%8;for(let s=... method isEmpty (line 1) | isEmpty(){for(let t=0;ttr||!this._fetching||(this.metadata.set(e,t*tr... method _onReject (line 1) | _onReject(t){this._remainingRejects>0&&this._fetching?(this._request(t... method _requestPieces (line 1) | _requestPieces(){if(this._fetching){this.metadata=new Uint8Array(this.... method _checkDone (line 1) | async _checkDone(){let t=!0;for(let e=0;e>3;return e>3;if(e){if(r>=this.buffer.length){const t=Math.... method setAll (line 1) | setAll(t,e=0){const r=Math.min(i(e+t.length),this.grow);if(this.buffer... method forEach (line 1) | forEach(t,e=0,r=8*this.buffer.length){let i=e>>3,n=128>>e%8;for(let s=... method isEmpty (line 1) | isEmpty(){for(let t=0;t>3;return e>3;if(e){if(r>=this.buffer.length){const t=Math.... method setAll (line 1) | setAll(t,e=0){const r=Math.min(i(e+t.length),this.grow);if(this.buffer... method forEach (line 1) | forEach(t,e=0,r=8*this.buffer.length){let i=e>>3,n=128>>e%8;for(let s=... method isEmpty (line 1) | isEmpty(){for(let t=0;t=300&&t.code<400&&(a=t):o++,t||n||r&&!1===r(e... function b (line 1) | function b(){if(!(a.destroyed||a.socket.inflight>=a.concurrency)){var n=... function v (line 1) | function v(){s(null,h)} function w (line 1) | function w(t,e,r){f--,r&&(u[(r.address||r.host)+":"+r.port]=!0),r&&r.id&... function _ (line 1) | function _(t){t.id.equals(a.id)||g.add(t)} function n (line 1) | function n(t){this.rand=t} method length (line 1) | get length(){return this.buffer.length<<3} method constructor (line 1) | constructor(t=0,e){const r=null==e?void 0:e.grow;this.grow=r?Number.is... method get (line 1) | get(t){const e=t>>3;return e>3;if(e){if(r>=this.buffer.length){const t=Math.... method setAll (line 1) | setAll(t,e=0){const r=Math.min(i(e+t.length),this.grow);if(this.buffer... method forEach (line 1) | forEach(t,e=0,r=8*this.buffer.length){let i=e>>3,n=128>>e%8;for(let s=... method isEmpty (line 1) | isEmpty(){for(let t=0;t>3;return e>3;if(e){if(r>=this.buffer.length){const t=Math.... method setAll (line 1) | setAll(t,e=0){const r=Math.min(i(e+t.length),this.grow);if(this.buffer... method forEach (line 1) | forEach(t,e=0,r=8*this.buffer.length){let i=e>>3,n=128>>e%8;for(let s=... method isEmpty (line 1) | isEmpty(){for(let t=0;te.vectorClock?t:e} method distance (line 1) | static distance(t,e){let r=0,i=0;const n=Math.min(t.length,e.length),s... method add (line 1) | add(t){o("contact.id",(t||{}).id);let e=0,r=this.root;for(;null===r.co... method closest (line 1) | closest(t,e=1/0){if(o("id",t),!Number.isInteger(e)&&e!==1/0||e<=0)thro... method count (line 1) | count(){let t=0;for(const e=[this.root];e.length>0;){const r=e.pop();n... method _determineNode (line 1) | _determineNode(t,e,r){const i=r>>3,n=r%8;if(e.length<=i&&0!==n)return ... method get (line 1) | get(t){o("id",t);let e=0,r=this.root;for(;null===r.contacts;)r=this._d... method _indexOf (line 1) | _indexOf(t,e){for(let r=0;r0;){const r=e.pop(... method toIterable (line 1) | *toIterable(){for(const t=[this.root];t.length>0;){const e=t.pop();nul... method _update (line 1) | _update(t,e,r){if(!s(t.contacts[e].id,r.id))throw new Error("wrong ind... function h (line 1) | function h(t){s.call(this,t);var e=new a(this.type,this.options.key);thi... function s (line 1) | function s(){this.list=[],this.map=new Map} function o (line 1) | function o(){this.records=new Map,this.size=0} function a (line 1) | function a(t){if(!(this instanceof a))return new a(t);if(t||(t={}),this.... method constructor (line 1) | constructor(t={}){super(),this.localNodeId=t.localNodeId||i(20),this.n... method arbiter (line 1) | static arbiter(t,e){return t.vectorClock>e.vectorClock?t:e} method distance (line 1) | static distance(t,e){let r=0,i=0;const n=Math.min(t.length,e.length),s... method add (line 1) | add(t){o("contact.id",(t||{}).id);let e=0,r=this.root;for(;null===r.co... method closest (line 1) | closest(t,e=1/0){if(o("id",t),!Number.isInteger(e)&&e!==1/0||e<=0)thro... method count (line 1) | count(){let t=0;for(const e=[this.root];e.length>0;){const r=e.pop();n... method _determineNode (line 1) | _determineNode(t,e,r){const i=r>>3,n=r%8;if(e.length<=i&&0!==n)return ... method get (line 1) | get(t){o("id",t);let e=0,r=this.root;for(;null===r.contacts;)r=this._d... method _indexOf (line 1) | _indexOf(t,e){for(let r=0;r0;){const r=e.pop(... method toIterable (line 1) | *toIterable(){for(const t=[this.root];t.length>0;){const e=t.pop();nul... method _update (line 1) | _update(t,e,r){if(!s(t.contacts[e].id,r.id))throw new Error("wrong ind... function h (line 1) | function h(t){return i.isBuffer(t)?i.toString(t,"hex"):t} function u (line 1) | function u(t,e,r){var i=t[e];i.index=r,t[r].index=e,t[e]=t[r],t[r]=i} method constructor (line 1) | constructor(t="utf8"){switch(this.encoding=function(t){switch(t=t.toLowe... method remaining (line 1) | get remaining(){return this.decoder.remaining} method push (line 1) | push(t){return"string"==typeof t?t:this.decoder.decode(t)} method write (line 1) | write(t){return this.push(t)} method end (line 1) | end(t){let e="";return t&&(e=this.push(t)),e+=this.decoder.flush(),e} function f (line 1) | function f(t,e,r,s){if((t=i.from(t.toArray())).length0&... function c (line 1) | function c(t,e,r){var s,o;do{for(s=i.alloc(0);8*s.length{}),this._finished?i(new Error("wire... method piece (line 1) | piece(t,e,r){this._debug("piece index=%d offset=%d",t,e),this._message... method cancel (line 1) | cancel(t,e,r){this._debug("cancel index=%d offset=%d length=%d",t,e,r)... method port (line 1) | port(t){this._debug("port %d",t);const e=new Uint8Array(w);new DataVie... method suggest (line 1) | suggest(t){if(!this.hasFast)throw Error("fast extension is disabled");... method haveAll (line 1) | haveAll(){if(!this.hasFast)throw Error("fast extension is disabled");t... method haveNone (line 1) | haveNone(){if(!this.hasFast)throw Error("fast extension is disabled");... method reject (line 1) | reject(t,e,r){if(!this.hasFast)throw Error("fast extension is disabled... method allowedFast (line 1) | allowedFast(t){if(!this.hasFast)throw Error("fast extension is disable... method extended (line 1) | extended(t,e){if(this._debug("extended ext=%s",t),"string"==typeof t&&... method setEncrypt (line 1) | async setEncrypt(t,e){if(!this.type.startsWith("tcp"))return!1;const r... method _message (line 1) | _message(t,e,r){const i=r?r.length:0,n=new Uint8Array(5+4*e.length);I(... method _push (line 1) | _push(t){if(!this._finished)return 2===this._encryptionMethod&&this._c... method _onKeepAlive (line 1) | _onKeepAlive(){this._debug("got keep-alive"),this.emit("keep-alive")} method _onPe1 (line 1) | _onPe1(t){this._peerPubKey=(0,u.V5)(t),this._sharedSecret=this._dh.com... method _onPe2 (line 1) | _onPe2(t){this._peerPubKey=(0,u.V5)(t),this._sharedSecret=this._dh.com... method _onPe3 (line 1) | async _onPe3(t){const e=await(0,u.tW)((0,u.fk)(this._utfToHex("req3")+... method _onPe3Encrypted (line 1) | _onPe3Encrypted(t,e){if(!(0,u.LC)(t,S))return this._debug("Error: veri... method _onPe4 (line 1) | _onPe4(t){this._encryptionMethod=t[3],k.includes(this._encryptionMetho... method _onHandshake (line 1) | _onHandshake(t,e,r){const i=(0,u.V5)(t),n=(0,u.V5)(e);this._debug("got... method _onChoke (line 1) | _onChoke(){if(this.peerChoking=!0,this._debug("got choke"),this.emit("... method _onUnchoke (line 1) | _onUnchoke(){this.peerChoking=!1,this._debug("got unchoke"),this.emit(... method _onInterested (line 1) | _onInterested(){this.peerInterested=!0,this._debug("got interested"),t... method _onUninterested (line 1) | _onUninterested(){this.peerInterested=!1,this._debug("got uninterested... method _onHave (line 1) | _onHave(t){this.peerPieces.get(t)||(this._debug("got have %d",t),this.... method _onBitField (line 1) | _onBitField(t){this.peerPieces=new n.A(t),this._debug("got bitfield"),... method _onRequest (line 1) | _onRequest(t,e,r){if(this.amChoking&&(!this.hasFast||!this.allowedFast... method _onPiece (line 1) | _onPiece(t,e,r){this._debug("got piece index=%d offset=%d",t,e),this._... method _onCancel (line 1) | _onCancel(t,e,r){this._debug("got cancel index=%d offset=%d length=%d"... method _onPort (line 1) | _onPort(t){this._debug("got port %d",t),this.emit("port",t)} method _onSuggest (line 1) | _onSuggest(t){if(!this.hasFast)return this._debug("Error: got suggest ... method _onHaveAll (line 1) | _onHaveAll(){if(!this.hasFast)return this._debug("Error: got have-all ... method _onHaveNone (line 1) | _onHaveNone(){if(!this.hasFast)return this._debug("Error: got have-non... method _onReject (line 1) | _onReject(t,e,r){if(!this.hasFast)return this._debug("Error: got rejec... method _onAllowedFast (line 1) | _onAllowedFast(t){if(!this.hasFast)return this._debug("Error: got allo... method _onExtended (line 1) | _onExtended(t,e){if(0===t){let t;try{t=i.A.decode(e)}catch(t){this._de... method _onTimeout (line 1) | _onTimeout(){this._debug("request timed out"),this._callback(this.requ... method _write (line 1) | _write(t,e){if(2===this._encryptionMethod&&this._cryptoHandshakeDone&&... method _callback (line 1) | _callback(t,e,r){t&&(this._resetTimeout(!this.peerChoking&&!this._fini... method _resetTimeout (line 1) | _resetTimeout(t){if(!t||!this._timeoutMs||!this.requests.length)return... method _parse (line 1) | _parse(t,e){this._parserSize=t,this._parser=e} method _parseUntil (line 1) | _parseUntil(t,e){this._cryptoSyncPattern=t,this._waitMaxBytes=e} method _onMessageLength (line 1) | _onMessageLength(t){const e=A(t);e>0?this._parse(e,this._onMessage):(t... method _onMessage (line 1) | _onMessage(t){switch(this._parse(4,this._onMessageLength),t[0]){case 0... method _determineHandshakeType (line 1) | _determineHandshakeType(){this._parse(1,t=>{const e=t[0];19===e?this._... method _parsePe1 (line 1) | _parsePe1(t){this._parse(95,e=>{this._onPe1((0,u.xW)([t,e])),this._par... method _parsePe2 (line 1) | _parsePe2(){this._parse(96,async t=>{this._onPe2(t),this._setGenerator... method _parsePe3 (line 1) | async _parsePe3(){const t=await(0,u.tW)((0,u.fk)(this._utfToHex("req1"... method _parsePe3Encrypted (line 1) | _parsePe3Encrypted(){this._parse(14,t=>{const e=this._decryptHandshake... method _parsePe4 (line 1) | _parsePe4(){const t=this._decryptHandshake(S);this._parseUntil(t,512),... method _parseHandshake (line 1) | _parseHandshake(){this._parse(1,t=>{const e=t[0];if(19!==e)return this... method _onHandshakeBuffer (line 1) | _onHandshakeBuffer(t){const e=t.slice(0,19);if("BitTorrent protocol"!=... method _onFinish (line 1) | _onFinish(){for(this._finished=!0,this.push(null);this.read(););for(cl... method _debug (line 1) | _debug(...t){t[0]=`[${this._debugId}] ${t[0]}`,c(...t)} method _pull (line 1) | _pull(t,e,r,i){for(let n=0;ne.vectorClock?t:e} method distance (line 1) | static distance(t,e){let r=0,i=0;const n=Math.min(t.length,e.length),s... method add (line 1) | add(t){o("contact.id",(t||{}).id);let e=0,r=this.root;for(;null===r.co... method closest (line 1) | closest(t,e=1/0){if(o("id",t),!Number.isInteger(e)&&e!==1/0||e<=0)thro... method count (line 1) | count(){let t=0;for(const e=[this.root];e.length>0;){const r=e.pop();n... method _determineNode (line 1) | _determineNode(t,e,r){const i=r>>3,n=r%8;if(e.length<=i&&0!==n)return ... method get (line 1) | get(t){o("id",t);let e=0,r=this.root;for(;null===r.contacts;)r=this._d... method _indexOf (line 1) | _indexOf(t,e){for(let r=0;r0;){const r=e.pop(... method toIterable (line 1) | *toIterable(){for(const t=[this.root];t.length>0;){const e=t.pop();nul... method _update (line 1) | _update(t,e,r){if(!s(t.contacts[e].id,r.id))throw new Error("wrong ind... function h (line 1) | function h(){u("onend"),t.end()} function c (line 1) | function c(e){u("ondata");var n=t.write(e);u("dest.write",n),!1===n&&((1... function d (line 1) | function d(e){u("onerror",e),g(),t.removeListener("error",d),0===s(t,"er... function p (line 1) | function p(){t.removeListener("finish",m),g()} function m (line 1) | function m(){u("onfinish"),t.removeListener("close",p),g()} function g (line 1) | function g(){u("unpipe"),r.unpipe(t)} method constructor (line 1) | constructor(t,e){super(),this.id=t,this.type=e,d("new %s Peer %s",e,t)... method onConnect (line 1) | onConnect(){if(this.destroyed)return;this.connected=!0,this.emit("conn... method sendPe1 (line 1) | sendPe1(){this.wire.sendPe1(),this.sentPe1=!0} method onPe1 (line 1) | onPe1(){this.sendPe2()} method sendPe2 (line 1) | sendPe2(){this.wire.sendPe2(),this.sentPe2=!0} method onPe2 (line 1) | onPe2(){this.sendPe3()} method sendPe3 (line 1) | sendPe3(){this.wire.sendPe3(this.swarm.infoHash),this.sentPe3=!0} method onPe3 (line 1) | onPe3(t){this.swarm&&(this.swarm.infoHashHash!==t&&this.destroy(new Er... method sendPe4 (line 1) | sendPe4(){this.wire.sendPe4(this.swarm.infoHash),this.sentPe4=!0} method onPe4 (line 1) | onPe4(){this.sentHandshake||this.handshake()} method clearPipes (line 1) | clearPipes(){this.conn.unpipe(),this.wire.unpipe()} method setThrottlePipes (line 1) | setThrottlePipes(){const t=this;(0,n.pipeline)(this.conn,this.throttle... method onHandshake (line 1) | onHandshake(t,e){if(!this.swarm)return;if(this.destroyed)return;if(thi... method handshake (line 1) | handshake(){const t={dht:!this.swarm.private&&!!this.swarm.client.dht,... method startConnectTimeout (line 1) | startConnectTimeout(){clearTimeout(this.connectTimeout);const t={webrt... method startHandshakeTimeout (line 1) | startHandshakeTimeout(){clearTimeout(this.handshakeTimeout),this.hands... method destroy (line 1) | destroy(t){if(this.destroyed)return;this.destroyed=!0,this.connected&&... function n (line 1) | function n(){var i=Math.ceil((t-r.content)*(r.interval/r.tokensPerInterv... method length (line 1) | get length(){return this.buffer.length<<3} method constructor (line 1) | constructor(t=0,e){const r=null==e?void 0:e.grow;this.grow=r?Number.is... method get (line 1) | get(t){const e=t>>3;return e>3;if(e){if(r>=this.buffer.length){const t=Math.... method setAll (line 1) | setAll(t,e=0){const r=Math.min(i(e+t.length),this.grow);if(this.buffer... method forEach (line 1) | forEach(t,e=0,r=8*this.buffer.length){let i=e>>3,n=128>>e%8;for(let s=... method isEmpty (line 1) | isEmpty(){for(let t=0;t>3;return e>3;if(e){if(r>=this.buffer.length){const t=Math.... method setAll (line 1) | setAll(t,e=0){const r=Math.min(i(e+t.length),this.grow);if(this.buffer... method forEach (line 1) | forEach(t,e=0,r=8*this.buffer.length){let i=e>>3,n=128>>e%8;for(let s=... method isEmpty (line 1) | isEmpty(){for(let t=0;t0)||t-1&t)throw new Error("Max size for a FixedFIF... method clear (line 1) | clear(){this.top=this.btm=0,this.next=null,this.buffer.fill(void 0)} method push (line 1) | push(t){return void 0===this.buffer[this.top]&&(this.buffer[this.top]=t,... method shift (line 1) | shift(){const t=this.buffer[this.btm];if(void 0!==t)return this.buffer[t... method peek (line 1) | peek(){return this.buffer[this.btm]} method isEmpty (line 1) | isEmpty(){return void 0===this.buffer[this.btm]} function s (line 1) | function s(t){var e=i.allocUnsafe(16);return e.writeUInt32BE(t[0]>>>0,0)... function o (line 1) | function o(t){this.h=t,this.state=i.alloc(16,0),this.cache=i.allocUnsafe... function n (line 1) | function n(t,e){o(t,e),s(t)} method length (line 1) | get length(){return this.buffer.length<<3} method constructor (line 1) | constructor(t=0,e){const r=null==e?void 0:e.grow;this.grow=r?Number.is... method get (line 1) | get(t){const e=t>>3;return e>3;if(e){if(r>=this.buffer.length){const t=Math.... method setAll (line 1) | setAll(t,e=0){const r=Math.min(i(e+t.length),this.grow);if(this.buffer... method forEach (line 1) | forEach(t,e=0,r=8*this.buffer.length){let i=e>>3,n=128>>e%8;for(let s=... method isEmpty (line 1) | isEmpty(){for(let t=0;t>3;return e>3;if(e){if(r>=this.buffer.length){const t=Math.... method setAll (line 1) | setAll(t,e=0){const r=Math.min(i(e+t.length),this.grow);if(this.buffer... method forEach (line 1) | forEach(t,e=0,r=8*this.buffer.length){let i=e>>3,n=128>>e%8;for(let s=... method isEmpty (line 1) | isEmpty(){for(let t=0;t>3;return e>3;if(e){if(r>=this.buffer.length){const t=Math.... method setAll (line 1) | setAll(t,e=0){const r=Math.min(i(e+t.length),this.grow);if(this.buffer... method forEach (line 1) | forEach(t,e=0,r=8*this.buffer.length){let i=e>>3,n=128>>e%8;for(let s=... method isEmpty (line 1) | isEmpty(){for(let t=0;te.vectorClock?t:e} method distance (line 1) | static distance(t,e){let r=0,i=0;const n=Math.min(t.length,e.length),s... method add (line 1) | add(t){o("contact.id",(t||{}).id);let e=0,r=this.root;for(;null===r.co... method closest (line 1) | closest(t,e=1/0){if(o("id",t),!Number.isInteger(e)&&e!==1/0||e<=0)thro... method count (line 1) | count(){let t=0;for(const e=[this.root];e.length>0;){const r=e.pop();n... method _determineNode (line 1) | _determineNode(t,e,r){const i=r>>3,n=r%8;if(e.length<=i&&0!==n)return ... method get (line 1) | get(t){o("id",t);let e=0,r=this.root;for(;null===r.contacts;)r=this._d... method _indexOf (line 1) | _indexOf(t,e){for(let r=0;r0;){const r=e.pop(... method toIterable (line 1) | *toIterable(){for(const t=[this.root];t.length>0;){const e=t.pop();nul... method _update (line 1) | _update(t,e,r){if(!s(t.contacts[e].id,r.id))throw new Error("wrong ind... function h (line 1) | function h(t,e,r){if(e)return t.emit("error",e);if(null!=r&&t.push(r),t.... function d (line 1) | function d(t,e){return t<>>32-e} function p (line 1) | function p(t,e,r,i,n,s,o,a){return d(t+(e^r^i)+s+o|0,a)+n|0} function m (line 1) | function m(t,e,r,i,n,s,o,a){return d(t+(e&r|~e&i)+s+o|0,a)+n|0} function g (line 1) | function g(t,e,r,i,n,s,o,a){return d(t+((e|~r)^i)+s+o|0,a)+n|0} method constructor (line 1) | constructor(t,e){super(),this.id=t,this.type=e,d("new %s Peer %s",e,t)... method onConnect (line 1) | onConnect(){if(this.destroyed)return;this.connected=!0,this.emit("conn... method sendPe1 (line 1) | sendPe1(){this.wire.sendPe1(),this.sentPe1=!0} method onPe1 (line 1) | onPe1(){this.sendPe2()} method sendPe2 (line 1) | sendPe2(){this.wire.sendPe2(),this.sentPe2=!0} method onPe2 (line 1) | onPe2(){this.sendPe3()} method sendPe3 (line 1) | sendPe3(){this.wire.sendPe3(this.swarm.infoHash),this.sentPe3=!0} method onPe3 (line 1) | onPe3(t){this.swarm&&(this.swarm.infoHashHash!==t&&this.destroy(new Er... method sendPe4 (line 1) | sendPe4(){this.wire.sendPe4(this.swarm.infoHash),this.sentPe4=!0} method onPe4 (line 1) | onPe4(){this.sentHandshake||this.handshake()} method clearPipes (line 1) | clearPipes(){this.conn.unpipe(),this.wire.unpipe()} method setThrottlePipes (line 1) | setThrottlePipes(){const t=this;(0,n.pipeline)(this.conn,this.throttle... method onHandshake (line 1) | onHandshake(t,e){if(!this.swarm)return;if(this.destroyed)return;if(thi... method handshake (line 1) | handshake(){const t={dht:!this.swarm.private&&!!this.swarm.client.dht,... method startConnectTimeout (line 1) | startConnectTimeout(){clearTimeout(this.connectTimeout);const t={webrt... method startHandshakeTimeout (line 1) | startHandshakeTimeout(){clearTimeout(this.handshakeTimeout),this.hands... method destroy (line 1) | destroy(t){if(this.destroyed)return;this.destroyed=!0,this.connected&&... function y (line 1) | function y(t,e,r,i,n,s,o,a){return d(t+(e&i|r&~i)+s+o|0,a)+n|0} function b (line 1) | function b(t,e,r,i,n,s,o,a){return d(t+(e^(r|~i))+s+o|0,a)+n|0} function v (line 1) | function v(){s.call(this,64),this._a=1732584193,this._b=4023233417,this.... method constructor (line 1) | constructor(){this.codePoint=0,this.bytesSeen=0,this.bytesNeeded=0,this.... method remaining (line 1) | get remaining(){return this.bytesSeen} method decode (line 1) | decode(t){if(0===this.bytesNeeded){let e=!0;for(let r=Math.max(0,t.byteL... method flush (line 1) | flush(){const t=this.bytesNeeded>0?"�":"";return this.codePoint=0,this.b... method constructor (line 1) | constructor(t){this.hwm=t||16,this.head=new i(this.hwm),this.tail=this.h... method clear (line 1) | clear(){this.head=this.tail,this.head.clear(),this.length=0} method push (line 1) | push(t){if(this.length++,!this.head.push(t)){const e=this.head;this.head... method shift (line 1) | shift(){0!==this.length&&this.length--;const t=this.tail.shift();if(void... method peek (line 1) | peek(){const t=this.tail.peek();return void 0===t&&this.tail.next?this.t... method isEmpty (line 1) | isEmpty(){return 0===this.length} function s (line 1) | function s(){this.pending=null,this.pendingTotal=0,this.blockSize=this.c... function h (line 1) | function h(t){n.call(this),this.hashMode="string"==typeof t,this.hashMod... function f (line 1) | function f(t,e,r){a.call(this),this._cache=new l,this._last=void 0,this.... function l (line 1) | function l(){this.cache=n.allocUnsafe(0)} function c (line 1) | function c(t,e,r){var a=s[t.toLowerCase()];if(!a)throw new TypeError("in... function n (line 1) | function n(t,e,r){return t&e^~t&r} method length (line 1) | get length(){return this.buffer.length<<3} method constructor (line 1) | constructor(t=0,e){const r=null==e?void 0:e.grow;this.grow=r?Number.is... method get (line 1) | get(t){const e=t>>3;return e>3;if(e){if(r>=this.buffer.length){const t=Math.... method setAll (line 1) | setAll(t,e=0){const r=Math.min(i(e+t.length),this.grow);if(this.buffer... method forEach (line 1) | forEach(t,e=0,r=8*this.buffer.length){let i=e>>3,n=128>>e%8;for(let s=... method isEmpty (line 1) | isEmpty(){for(let t=0;t>3;return e>3;if(e){if(r>=this.buffer.length){const t=Math.... method setAll (line 1) | setAll(t,e=0){const r=Math.min(i(e+t.length),this.grow);if(this.buffer... method forEach (line 1) | forEach(t,e=0,r=8*this.buffer.length){let i=e>>3,n=128>>e%8;for(let s=... method isEmpty (line 1) | isEmpty(){for(let t=0;t>3;return e>3;if(e){if(r>=this.buffer.length){const t=Math.... method setAll (line 1) | setAll(t,e=0){const r=Math.min(i(e+t.length),this.grow);if(this.buffer... method forEach (line 1) | forEach(t,e=0,r=8*this.buffer.length){let i=e>>3,n=128>>e%8;for(let s=... method isEmpty (line 1) | isEmpty(){for(let t=0;ttr||!this._fetching||(this.metadata.set(e,t*tr... method _onReject (line 1) | _onReject(t){this._remainingRejects>0&&this._fetching?(this._request(t... method _requestPieces (line 1) | _requestPieces(){if(this._fetching){this.metadata=new Uint8Array(this.... method _checkDone (line 1) | async _checkDone(){let t=!0;for(let e=0;e>5==6?2:t>>4==14?3:t>>3==30?4:t>>6==2?-1... function a (line 1) | function a(t){var e=this.lastTotal-this.lastNeed,r=function(t,e){if(128!... method constructor (line 1) | constructor(t={}){super(),this.localNodeId=t.localNodeId||i(20),this.n... method arbiter (line 1) | static arbiter(t,e){return t.vectorClock>e.vectorClock?t:e} method distance (line 1) | static distance(t,e){let r=0,i=0;const n=Math.min(t.length,e.length),s... method add (line 1) | add(t){o("contact.id",(t||{}).id);let e=0,r=this.root;for(;null===r.co... method closest (line 1) | closest(t,e=1/0){if(o("id",t),!Number.isInteger(e)&&e!==1/0||e<=0)thro... method count (line 1) | count(){let t=0;for(const e=[this.root];e.length>0;){const r=e.pop();n... method _determineNode (line 1) | _determineNode(t,e,r){const i=r>>3,n=r%8;if(e.length<=i&&0!==n)return ... method get (line 1) | get(t){o("id",t);let e=0,r=this.root;for(;null===r.contacts;)r=this._d... method _indexOf (line 1) | _indexOf(t,e){for(let r=0;r0;){const r=e.pop(... method toIterable (line 1) | *toIterable(){for(const t=[this.root];t.length>0;){const e=t.pop();nul... method _update (line 1) | _update(t,e,r){if(!s(t.contacts[e].id,r.id))throw new Error("wrong ind... function h (line 1) | function h(t,e){if((t.length-e)%2==0){var r=t.toString("utf16le",e);if(r... function u (line 1) | function u(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var r... function f (line 1) | function f(t,e){var r=(t.length-e)%3;return 0===r?t.toString("base64",e)... function l (line 1) | function l(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+... function c (line 1) | function c(t){return t.toString(this.encoding)} function d (line 1) | function d(t){return t&&t.length?this.write(t):""} function x (line 1) | function x(t,e){for(let r=t.length;r--;)t[r]^=e[r];return t} function A (line 1) | function A(t,e=0){return t[e]<<24|t[e+1]<<16|t[e+2]<<8|t[e+3]} function I (line 1) | function I(t,e,r){t[e]=r>>>24&255,t[e+1]=r>>>16&255,t[e+2]=r>>>8&255,t[e... class T (line 1) | class T{constructor(t,e,r,i){this.piece=t,this.offset=e,this.length=r,th... method constructor (line 1) | constructor(t,e,r,i){this.piece=t,this.offset=e,this.length=r,this.cal... class C (line 1) | class C{constructor(){this.buffer=new Uint8Array}get(t){return!0}set(t){}} method constructor (line 1) | constructor(){this.buffer=new Uint8Array} method get (line 1) | get(t){return!0} method set (line 1) | set(t){} class P (line 1) | class P extends h.Duplex{constructor(t=null,e=0,r=!1){super(),this._debu... method constructor (line 1) | constructor(t=null,e=0,r=!1){super(),this._debugId=(0,u.V5)((0,u.po)(4... method setKeepAlive (line 1) | setKeepAlive(t){this._debug("setKeepAlive %s",t),clearInterval(this._k... method setTimeout (line 1) | setTimeout(t,e){this._debug("setTimeout ms=%d unref=%s",t,e),this._tim... method destroy (line 1) | destroy(){if(!this.destroyed)return this._debug("destroy"),this.end(),... method end (line 1) | end(t){if(!this.destroyed&&!this.destroying)return this._debug("end"),... method use (line 1) | use(t){const e=t.prototype.name;if(!e)throw new Error('Extension class... method keepAlive (line 1) | keepAlive(){this._debug("keep-alive"),this._push(p)} method sendPe1 (line 1) | sendPe1(){if(this._peEnabled){const t=Math.floor(513*Math.random()),e=... method sendPe2 (line 1) | sendPe2(){const t=Math.floor(513*Math.random()),e=(0,u.po)(t);this._pu... method sendPe3 (line 1) | async sendPe3(t){await this.setEncrypt(this._sharedSecret,t);const e=a... method sendPe4 (line 1) | async sendPe4(t){await this.setEncrypt(this._sharedSecret,t);const e=n... method handshake (line 1) | handshake(t,e,r){let i,n;if("string"==typeof t?(t=t.toLowerCase(),i=(0... method _sendExtendedHandshake (line 1) | _sendExtendedHandshake(){const t=Object.assign({},this.extendedHandsha... method choke (line 1) | choke(){if(!this.amChoking)if(this.amChoking=!0,this._debug("choke"),t... method unchoke (line 1) | unchoke(){this.amChoking&&(this.amChoking=!1,this._debug("unchoke"),th... method interested (line 1) | interested(){this.amInterested||(this.amInterested=!0,this._debug("int... method uninterested (line 1) | uninterested(){this.amInterested&&(this.amInterested=!1,this._debug("u... method have (line 1) | have(t){this._debug("have %d",t),this._message(4,[t],null)} method bitfield (line 1) | bitfield(t){this._debug("bitfield"),ArrayBuffer.isView(t)||(t=t.buffer... method request (line 1) | request(t,e,r,i){return i||(i=()=>{}),this._finished?i(new Error("wire... method piece (line 1) | piece(t,e,r){this._debug("piece index=%d offset=%d",t,e),this._message... method cancel (line 1) | cancel(t,e,r){this._debug("cancel index=%d offset=%d length=%d",t,e,r)... method port (line 1) | port(t){this._debug("port %d",t);const e=new Uint8Array(w);new DataVie... method suggest (line 1) | suggest(t){if(!this.hasFast)throw Error("fast extension is disabled");... method haveAll (line 1) | haveAll(){if(!this.hasFast)throw Error("fast extension is disabled");t... method haveNone (line 1) | haveNone(){if(!this.hasFast)throw Error("fast extension is disabled");... method reject (line 1) | reject(t,e,r){if(!this.hasFast)throw Error("fast extension is disabled... method allowedFast (line 1) | allowedFast(t){if(!this.hasFast)throw Error("fast extension is disable... method extended (line 1) | extended(t,e){if(this._debug("extended ext=%s",t),"string"==typeof t&&... method setEncrypt (line 1) | async setEncrypt(t,e){if(!this.type.startsWith("tcp"))return!1;const r... method _message (line 1) | _message(t,e,r){const i=r?r.length:0,n=new Uint8Array(5+4*e.length);I(... method _push (line 1) | _push(t){if(!this._finished)return 2===this._encryptionMethod&&this._c... method _onKeepAlive (line 1) | _onKeepAlive(){this._debug("got keep-alive"),this.emit("keep-alive")} method _onPe1 (line 1) | _onPe1(t){this._peerPubKey=(0,u.V5)(t),this._sharedSecret=this._dh.com... method _onPe2 (line 1) | _onPe2(t){this._peerPubKey=(0,u.V5)(t),this._sharedSecret=this._dh.com... method _onPe3 (line 1) | async _onPe3(t){const e=await(0,u.tW)((0,u.fk)(this._utfToHex("req3")+... method _onPe3Encrypted (line 1) | _onPe3Encrypted(t,e){if(!(0,u.LC)(t,S))return this._debug("Error: veri... method _onPe4 (line 1) | _onPe4(t){this._encryptionMethod=t[3],k.includes(this._encryptionMetho... method _onHandshake (line 1) | _onHandshake(t,e,r){const i=(0,u.V5)(t),n=(0,u.V5)(e);this._debug("got... method _onChoke (line 1) | _onChoke(){if(this.peerChoking=!0,this._debug("got choke"),this.emit("... method _onUnchoke (line 1) | _onUnchoke(){this.peerChoking=!1,this._debug("got unchoke"),this.emit(... method _onInterested (line 1) | _onInterested(){this.peerInterested=!0,this._debug("got interested"),t... method _onUninterested (line 1) | _onUninterested(){this.peerInterested=!1,this._debug("got uninterested... method _onHave (line 1) | _onHave(t){this.peerPieces.get(t)||(this._debug("got have %d",t),this.... method _onBitField (line 1) | _onBitField(t){this.peerPieces=new n.A(t),this._debug("got bitfield"),... method _onRequest (line 1) | _onRequest(t,e,r){if(this.amChoking&&(!this.hasFast||!this.allowedFast... method _onPiece (line 1) | _onPiece(t,e,r){this._debug("got piece index=%d offset=%d",t,e),this._... method _onCancel (line 1) | _onCancel(t,e,r){this._debug("got cancel index=%d offset=%d length=%d"... method _onPort (line 1) | _onPort(t){this._debug("got port %d",t),this.emit("port",t)} method _onSuggest (line 1) | _onSuggest(t){if(!this.hasFast)return this._debug("Error: got suggest ... method _onHaveAll (line 1) | _onHaveAll(){if(!this.hasFast)return this._debug("Error: got have-all ... method _onHaveNone (line 1) | _onHaveNone(){if(!this.hasFast)return this._debug("Error: got have-non... method _onReject (line 1) | _onReject(t,e,r){if(!this.hasFast)return this._debug("Error: got rejec... method _onAllowedFast (line 1) | _onAllowedFast(t){if(!this.hasFast)return this._debug("Error: got allo... method _onExtended (line 1) | _onExtended(t,e){if(0===t){let t;try{t=i.A.decode(e)}catch(t){this._de... method _onTimeout (line 1) | _onTimeout(){this._debug("request timed out"),this._callback(this.requ... method _write (line 1) | _write(t,e){if(2===this._encryptionMethod&&this._cryptoHandshakeDone&&... method _callback (line 1) | _callback(t,e,r){t&&(this._resetTimeout(!this.peerChoking&&!this._fini... method _resetTimeout (line 1) | _resetTimeout(t){if(!t||!this._timeoutMs||!this.requests.length)return... method _parse (line 1) | _parse(t,e){this._parserSize=t,this._parser=e} method _parseUntil (line 1) | _parseUntil(t,e){this._cryptoSyncPattern=t,this._waitMaxBytes=e} method _onMessageLength (line 1) | _onMessageLength(t){const e=A(t);e>0?this._parse(e,this._onMessage):(t... method _onMessage (line 1) | _onMessage(t){switch(this._parse(4,this._onMessageLength),t[0]){case 0... method _determineHandshakeType (line 1) | _determineHandshakeType(){this._parse(1,t=>{const e=t[0];19===e?this._... method _parsePe1 (line 1) | _parsePe1(t){this._parse(95,e=>{this._onPe1((0,u.xW)([t,e])),this._par... method _parsePe2 (line 1) | _parsePe2(){this._parse(96,async t=>{this._onPe2(t),this._setGenerator... method _parsePe3 (line 1) | async _parsePe3(){const t=await(0,u.tW)((0,u.fk)(this._utfToHex("req1"... method _parsePe3Encrypted (line 1) | _parsePe3Encrypted(){this._parse(14,t=>{const e=this._decryptHandshake... method _parsePe4 (line 1) | _parsePe4(){const t=this._decryptHandshake(S);this._parseUntil(t,512),... method _parseHandshake (line 1) | _parseHandshake(){this._parse(1,t=>{const e=t[0];if(19!==e)return this... method _onHandshakeBuffer (line 1) | _onHandshakeBuffer(t){const e=t.slice(0,19);if("BitTorrent protocol"!=... method _onFinish (line 1) | _onFinish(){for(this._finished=!0,this.push(null);this.read(););for(cl... method _debug (line 1) | _debug(...t){t[0]=`[${this._debugId}] ${t[0]}`,c(...t)} method _pull (line 1) | _pull(t,e,r,i){for(let n=0;n>3;return e>3;if(e){if(r>=this.buffer.length){const t=Math.... method setAll (line 1) | setAll(t,e=0){const r=Math.min(i(e+t.length),this.grow);if(this.buffer... method forEach (line 1) | forEach(t,e=0,r=8*this.buffer.length){let i=e>>3,n=128>>e%8;for(let s=... method isEmpty (line 1) | isEmpty(){for(let t=0;t=65&&r<=70?r-55:r>=97&&r<... method constructor (line 1) | constructor(t={}){super(),this.localNodeId=t.localNodeId||i(20),this.n... method arbiter (line 1) | static arbiter(t,e){return t.vectorClock>e.vectorClock?t:e} method distance (line 1) | static distance(t,e){let r=0,i=0;const n=Math.min(t.length,e.length),s... method add (line 1) | add(t){o("contact.id",(t||{}).id);let e=0,r=this.root;for(;null===r.co... method closest (line 1) | closest(t,e=1/0){if(o("id",t),!Number.isInteger(e)&&e!==1/0||e<=0)thro... method count (line 1) | count(){let t=0;for(const e=[this.root];e.length>0;){const r=e.pop();n... method _determineNode (line 1) | _determineNode(t,e,r){const i=r>>3,n=r%8;if(e.length<=i&&0!==n)return ... method get (line 1) | get(t){o("id",t);let e=0,r=this.root;for(;null===r.contacts;)r=this._d... method _indexOf (line 1) | _indexOf(t,e){for(let r=0;r0;){const r=e.pop(... method toIterable (line 1) | *toIterable(){for(const t=[this.root];t.length>0;){const e=t.pop();nul... method _update (line 1) | _update(t,e,r){if(!s(t.contacts[e].id,r.id))throw new Error("wrong ind... function h (line 1) | function h(t,e,r){var i=a(t,r);return r-1>=e&&(i|=a(t,r-1)<<4),i} function u (line 1) | function u(t,e,r,i){for(var n=0,s=Math.min(t.length,r),o=e;o>3;return e>3;if(e){if(r>=this.buffer.length){const t=Math.... method setAll (line 1) | setAll(t,e=0){const r=Math.min(i(e+t.length),this.grow);if(this.buffer... method forEach (line 1) | forEach(t,e=0,r=8*this.buffer.length){let i=e>>3,n=128>>e%8;for(let s=... method isEmpty (line 1) | isEmpty(){for(let t=0;t=1.5*r;return Math.round(t/r)+" "+i+(n?"s":"")} method constructor (line 1) | constructor(t={}){super(),this.localNodeId=t.localNodeId||i(20),this.n... method arbiter (line 1) | static arbiter(t,e){return t.vectorClock>e.vectorClock?t:e} method distance (line 1) | static distance(t,e){let r=0,i=0;const n=Math.min(t.length,e.length),s... method add (line 1) | add(t){o("contact.id",(t||{}).id);let e=0,r=this.root;for(;null===r.co... method closest (line 1) | closest(t,e=1/0){if(o("id",t),!Number.isInteger(e)&&e!==1/0||e<=0)thro... method count (line 1) | count(){let t=0;for(const e=[this.root];e.length>0;){const r=e.pop();n... method _determineNode (line 1) | _determineNode(t,e,r){const i=r>>3,n=r%8;if(e.length<=i&&0!==n)return ... method get (line 1) | get(t){o("id",t);let e=0,r=this.root;for(;null===r.contacts;)r=this._d... method _indexOf (line 1) | _indexOf(t,e){for(let r=0;r0;){const r=e.pop(... method toIterable (line 1) | *toIterable(){for(const t=[this.root];t.length>0;){const e=t.pop();nul... method _update (line 1) | _update(t,e,r){if(!s(t.contacts[e].id,r.id))throw new Error("wrong ind... function i (line 1) | function i(){for(var t=new Array(arguments.length),r=0;re.vectorClock?t:e} method distance (line 1) | static distance(t,e){let r=0,i=0;const n=Math.min(t.length,e.length),s... method add (line 1) | add(t){o("contact.id",(t||{}).id);let e=0,r=this.root;for(;null===r.co... method closest (line 1) | closest(t,e=1/0){if(o("id",t),!Number.isInteger(e)&&e!==1/0||e<=0)thro... method count (line 1) | count(){let t=0;for(const e=[this.root];e.length>0;){const r=e.pop();n... method _determineNode (line 1) | _determineNode(t,e,r){const i=r>>3,n=r%8;if(e.length<=i&&0!==n)return ... method get (line 1) | get(t){o("id",t);let e=0,r=this.root;for(;null===r.contacts;)r=this._d... method _indexOf (line 1) | _indexOf(t,e){for(let r=0;r0;){const r=e.pop(... method toIterable (line 1) | *toIterable(){for(const t=[this.root];t.length>0;){const e=t.pop();nul... method _update (line 1) | _update(t,e,r){if(!s(t.contacts[e].id,r.id))throw new Error("wrong ind... function h (line 1) | function h(t,e){this.type=t,this.p=new i(e.p,16),this.red=e.prime?i.red(... function u (line 1) | function u(t,e){this.curve=t,this.type=e,this.precomputed=null} function s (line 1) | function s(t){var e=this;this.next=null,this.entry=null,this.finish=func... function S (line 1) | function S(){} function k (line 1) | function k(t,e,o){i=i||r(5382),t=t||{},"boolean"!=typeof o&&(o=e instanc... function E (line 1) | function E(t){var e=this instanceof(i=i||r(5382));if(!e&&!f.call(E,this)... function x (line 1) | function x(t,e,r,i,n,s,o){e.writelen=i,e.writecb=o,e.writing=!0,e.sync=!... function A (line 1) | function A(t,e,r,i){r||function(t,e){0===e.length&&e.needDrain&&(e.needD... function I (line 1) | function I(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writ... function T (line 1) | function T(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!... method constructor (line 1) | constructor(t,e,r,i){this.piece=t,this.offset=e,this.length=r,this.cal... function C (line 1) | function C(t,e){t._final(function(r){e.pendingcb--,r&&M(t,r),e.prefinish... method constructor (line 1) | constructor(){this.buffer=new Uint8Array} method get (line 1) | get(t){return!0} method set (line 1) | set(t){} function P (line 1) | function P(t,e){var r=T(e);if(r&&(function(t,e){e.prefinished||e.finalCa... method constructor (line 1) | constructor(t=null,e=0,r=!1){super(),this._debugId=(0,u.V5)((0,u.po)(4... method setKeepAlive (line 1) | setKeepAlive(t){this._debug("setKeepAlive %s",t),clearInterval(this._k... method setTimeout (line 1) | setTimeout(t,e){this._debug("setTimeout ms=%d unref=%s",t,e),this._tim... method destroy (line 1) | destroy(){if(!this.destroyed)return this._debug("destroy"),this.end(),... method end (line 1) | end(t){if(!this.destroyed&&!this.destroying)return this._debug("end"),... method use (line 1) | use(t){const e=t.prototype.name;if(!e)throw new Error('Extension class... method keepAlive (line 1) | keepAlive(){this._debug("keep-alive"),this._push(p)} method sendPe1 (line 1) | sendPe1(){if(this._peEnabled){const t=Math.floor(513*Math.random()),e=... method sendPe2 (line 1) | sendPe2(){const t=Math.floor(513*Math.random()),e=(0,u.po)(t);this._pu... method sendPe3 (line 1) | async sendPe3(t){await this.setEncrypt(this._sharedSecret,t);const e=a... method sendPe4 (line 1) | async sendPe4(t){await this.setEncrypt(this._sharedSecret,t);const e=n... method handshake (line 1) | handshake(t,e,r){let i,n;if("string"==typeof t?(t=t.toLowerCase(),i=(0... method _sendExtendedHandshake (line 1) | _sendExtendedHandshake(){const t=Object.assign({},this.extendedHandsha... method choke (line 1) | choke(){if(!this.amChoking)if(this.amChoking=!0,this._debug("choke"),t... method unchoke (line 1) | unchoke(){this.amChoking&&(this.amChoking=!1,this._debug("unchoke"),th... method interested (line 1) | interested(){this.amInterested||(this.amInterested=!0,this._debug("int... method uninterested (line 1) | uninterested(){this.amInterested&&(this.amInterested=!1,this._debug("u... method have (line 1) | have(t){this._debug("have %d",t),this._message(4,[t],null)} method bitfield (line 1) | bitfield(t){this._debug("bitfield"),ArrayBuffer.isView(t)||(t=t.buffer... method request (line 1) | request(t,e,r,i){return i||(i=()=>{}),this._finished?i(new Error("wire... method piece (line 1) | piece(t,e,r){this._debug("piece index=%d offset=%d",t,e),this._message... method cancel (line 1) | cancel(t,e,r){this._debug("cancel index=%d offset=%d length=%d",t,e,r)... method port (line 1) | port(t){this._debug("port %d",t);const e=new Uint8Array(w);new DataVie... method suggest (line 1) | suggest(t){if(!this.hasFast)throw Error("fast extension is disabled");... method haveAll (line 1) | haveAll(){if(!this.hasFast)throw Error("fast extension is disabled");t... method haveNone (line 1) | haveNone(){if(!this.hasFast)throw Error("fast extension is disabled");... method reject (line 1) | reject(t,e,r){if(!this.hasFast)throw Error("fast extension is disabled... method allowedFast (line 1) | allowedFast(t){if(!this.hasFast)throw Error("fast extension is disable... method extended (line 1) | extended(t,e){if(this._debug("extended ext=%s",t),"string"==typeof t&&... method setEncrypt (line 1) | async setEncrypt(t,e){if(!this.type.startsWith("tcp"))return!1;const r... method _message (line 1) | _message(t,e,r){const i=r?r.length:0,n=new Uint8Array(5+4*e.length);I(... method _push (line 1) | _push(t){if(!this._finished)return 2===this._encryptionMethod&&this._c... method _onKeepAlive (line 1) | _onKeepAlive(){this._debug("got keep-alive"),this.emit("keep-alive")} method _onPe1 (line 1) | _onPe1(t){this._peerPubKey=(0,u.V5)(t),this._sharedSecret=this._dh.com... method _onPe2 (line 1) | _onPe2(t){this._peerPubKey=(0,u.V5)(t),this._sharedSecret=this._dh.com... method _onPe3 (line 1) | async _onPe3(t){const e=await(0,u.tW)((0,u.fk)(this._utfToHex("req3")+... method _onPe3Encrypted (line 1) | _onPe3Encrypted(t,e){if(!(0,u.LC)(t,S))return this._debug("Error: veri... method _onPe4 (line 1) | _onPe4(t){this._encryptionMethod=t[3],k.includes(this._encryptionMetho... method _onHandshake (line 1) | _onHandshake(t,e,r){const i=(0,u.V5)(t),n=(0,u.V5)(e);this._debug("got... method _onChoke (line 1) | _onChoke(){if(this.peerChoking=!0,this._debug("got choke"),this.emit("... method _onUnchoke (line 1) | _onUnchoke(){this.peerChoking=!1,this._debug("got unchoke"),this.emit(... method _onInterested (line 1) | _onInterested(){this.peerInterested=!0,this._debug("got interested"),t... method _onUninterested (line 1) | _onUninterested(){this.peerInterested=!1,this._debug("got uninterested... method _onHave (line 1) | _onHave(t){this.peerPieces.get(t)||(this._debug("got have %d",t),this.... method _onBitField (line 1) | _onBitField(t){this.peerPieces=new n.A(t),this._debug("got bitfield"),... method _onRequest (line 1) | _onRequest(t,e,r){if(this.amChoking&&(!this.hasFast||!this.allowedFast... method _onPiece (line 1) | _onPiece(t,e,r){this._debug("got piece index=%d offset=%d",t,e),this._... method _onCancel (line 1) | _onCancel(t,e,r){this._debug("got cancel index=%d offset=%d length=%d"... method _onPort (line 1) | _onPort(t){this._debug("got port %d",t),this.emit("port",t)} method _onSuggest (line 1) | _onSuggest(t){if(!this.hasFast)return this._debug("Error: got suggest ... method _onHaveAll (line 1) | _onHaveAll(){if(!this.hasFast)return this._debug("Error: got have-all ... method _onHaveNone (line 1) | _onHaveNone(){if(!this.hasFast)return this._debug("Error: got have-non... method _onReject (line 1) | _onReject(t,e,r){if(!this.hasFast)return this._debug("Error: got rejec... method _onAllowedFast (line 1) | _onAllowedFast(t){if(!this.hasFast)return this._debug("Error: got allo... method _onExtended (line 1) | _onExtended(t,e){if(0===t){let t;try{t=i.A.decode(e)}catch(t){this._de... method _onTimeout (line 1) | _onTimeout(){this._debug("request timed out"),this._callback(this.requ... method _write (line 1) | _write(t,e){if(2===this._encryptionMethod&&this._cryptoHandshakeDone&&... method _callback (line 1) | _callback(t,e,r){t&&(this._resetTimeout(!this.peerChoking&&!this._fini... method _resetTimeout (line 1) | _resetTimeout(t){if(!t||!this._timeoutMs||!this.requests.length)return... method _parse (line 1) | _parse(t,e){this._parserSize=t,this._parser=e} method _parseUntil (line 1) | _parseUntil(t,e){this._cryptoSyncPattern=t,this._waitMaxBytes=e} method _onMessageLength (line 1) | _onMessageLength(t){const e=A(t);e>0?this._parse(e,this._onMessage):(t... method _onMessage (line 1) | _onMessage(t){switch(this._parse(4,this._onMessageLength),t[0]){case 0... method _determineHandshakeType (line 1) | _determineHandshakeType(){this._parse(1,t=>{const e=t[0];19===e?this._... method _parsePe1 (line 1) | _parsePe1(t){this._parse(95,e=>{this._onPe1((0,u.xW)([t,e])),this._par... method _parsePe2 (line 1) | _parsePe2(){this._parse(96,async t=>{this._onPe2(t),this._setGenerator... method _parsePe3 (line 1) | async _parsePe3(){const t=await(0,u.tW)((0,u.fk)(this._utfToHex("req1"... method _parsePe3Encrypted (line 1) | _parsePe3Encrypted(){this._parse(14,t=>{const e=this._decryptHandshake... method _parsePe4 (line 1) | _parsePe4(){const t=this._decryptHandshake(S);this._parseUntil(t,512),... method _parseHandshake (line 1) | _parseHandshake(){this._parse(1,t=>{const e=t[0];if(19!==e)return this... method _onHandshakeBuffer (line 1) | _onHandshakeBuffer(t){const e=t.slice(0,19);if("BitTorrent protocol"!=... method _onFinish (line 1) | _onFinish(){for(this._finished=!0,this.push(null);this.read(););for(cl... method _debug (line 1) | _debug(...t){t[0]=`[${this._debugId}] ${t[0]}`,c(...t)} method _pull (line 1) | _pull(t,e,r,i){for(let n=0;n!0===t[r]?e|or[r]:... method _sendMessage (line 1) | _sendMessage(){const t=Object.keys(this._localAddedPeers).slice(0,50),... function n (line 1) | function n(t,e,r){var n=t._cipher.encryptBlock(t._prev)[0]^e;return t._p... method length (line 1) | get length(){return this.buffer.length<<3} method constructor (line 1) | constructor(t=0,e){const r=null==e?void 0:e.grow;this.grow=r?Number.is... method get (line 1) | get(t){const e=t>>3;return e>3;if(e){if(r>=this.buffer.length){const t=Math.... method setAll (line 1) | setAll(t,e=0){const r=Math.min(i(e+t.length),this.grow);if(this.buffer... method forEach (line 1) | forEach(t,e=0,r=8*this.buffer.length){let i=e>>3,n=128>>e%8;for(let s=... method isEmpty (line 1) | isEmpty(){for(let t=0;t>3;return e>3;if(e){if(r>=this.buffer.length){const t=Math.... method setAll (line 1) | setAll(t,e=0){const r=Math.min(i(e+t.length),this.grow);if(this.buffer... method forEach (line 1) | forEach(t,e=0,r=8*this.buffer.length){let i=e>>3,n=128>>e%8;for(let s=... method isEmpty (line 1) | isEmpty(){for(let t=0;t>3;return e>3;if(e){if(r>=this.buffer.length){const t=Math.... method setAll (line 1) | setAll(t,e=0){const r=Math.min(i(e+t.length),this.grow);if(this.buffer... method forEach (line 1) | forEach(t,e=0,r=8*this.buffer.length){let i=e>>3,n=128>>e%8;for(let s=... method isEmpty (line 1) | isEmpty(){for(let t=0;ttr||!this._fetching||(this.metadata.set(e,t*tr... method _onReject (line 1) | _onReject(t){this._remainingRejects>0&&this._fetching?(this._request(t... method _requestPieces (line 1) | _requestPieces(){if(this._fetching){this.metadata=new Uint8Array(this.... method _checkDone (line 1) | async _checkDone(){let t=!0;for(let e=0;ee.vectorClock?t:e} method distance (line 1) | static distance(t,e){let r=0,i=0;const n=Math.min(t.length,e.length),s... method add (line 1) | add(t){o("contact.id",(t||{}).id);let e=0,r=this.root;for(;null===r.co... method closest (line 1) | closest(t,e=1/0){if(o("id",t),!Number.isInteger(e)&&e!==1/0||e<=0)thro... method count (line 1) | count(){let t=0;for(const e=[this.root];e.length>0;){const r=e.pop();n... method _determineNode (line 1) | _determineNode(t,e,r){const i=r>>3,n=r%8;if(e.length<=i&&0!==n)return ... method get (line 1) | get(t){o("id",t);let e=0,r=this.root;for(;null===r.contacts;)r=this._d... method _indexOf (line 1) | _indexOf(t,e){for(let r=0;r0;){const r=e.pop(... method toIterable (line 1) | *toIterable(){for(const t=[this.root];t.length>0;){const e=t.pop();nul... method _update (line 1) | _update(t,e,r){if(!s(t.contacts[e].id,r.id))throw new Error("wrong ind... function o (line 1) | function o(t,e){n.call(this,e),s.isBuffer(t)?(this.base=t,this.offset=0,... function a (line 1) | function a(t,e){if(Array.isArray(t))this.length=0,this.value=t.map(funct... method constructor (line 1) | constructor(t={}){super(),this.localNodeId=t.localNodeId||i(20),this.n... method arbiter (line 1) | static arbiter(t,e){return t.vectorClock>e.vectorClock?t:e} method distance (line 1) | static distance(t,e){let r=0,i=0;const n=Math.min(t.length,e.length),s... method add (line 1) | add(t){o("contact.id",(t||{}).id);let e=0,r=this.root;for(;null===r.co... method closest (line 1) | closest(t,e=1/0){if(o("id",t),!Number.isInteger(e)&&e!==1/0||e<=0)thro... method count (line 1) | count(){let t=0;for(const e=[this.root];e.length>0;){const r=e.pop();n... method _determineNode (line 1) | _determineNode(t,e,r){const i=r>>3,n=r%8;if(e.length<=i&&0!==n)return ... method get (line 1) | get(t){o("id",t);let e=0,r=this.root;for(;null===r.contacts;)r=this._d... method _indexOf (line 1) | _indexOf(t,e){for(let r=0;r0;){const r=e.pop(... method toIterable (line 1) | *toIterable(){for(const t=[this.root];t.length>0;){const e=t.pop();nul... method _update (line 1) | _update(t,e,r){if(!s(t.contacts[e].id,r.id))throw new Error("wrong ind... function n (line 1) | function n(t){return i.existsSync(t)&&i.statSync(t).isFile()} method length (line 1) | get length(){return this.buffer.length<<3} method constructor (line 1) | constructor(t=0,e){const r=null==e?void 0:e.grow;this.grow=r?Number.is... method get (line 1) | get(t){const e=t>>3;return e>3;if(e){if(r>=this.buffer.length){const t=Math.... method setAll (line 1) | setAll(t,e=0){const r=Math.min(i(e+t.length),this.grow);if(this.buffer... method forEach (line 1) | forEach(t,e=0,r=8*this.buffer.length){let i=e>>3,n=128>>e%8;for(let s=... method isEmpty (line 1) | isEmpty(){for(let t=0;te.vectorClock?t:e} method distance (line 1) | static distance(t,e){let r=0,i=0;const n=Math.min(t.length,e.length),s... method add (line 1) | add(t){o("contact.id",(t||{}).id);let e=0,r=this.root;for(;null===r.co... method closest (line 1) | closest(t,e=1/0){if(o("id",t),!Number.isInteger(e)&&e!==1/0||e<=0)thro... method count (line 1) | count(){let t=0;for(const e=[this.root];e.length>0;){const r=e.pop();n... method _determineNode (line 1) | _determineNode(t,e,r){const i=r>>3,n=r%8;if(e.length<=i&&0!==n)return ... method get (line 1) | get(t){o("id",t);let e=0,r=this.root;for(;null===r.contacts;)r=this._d... method _indexOf (line 1) | _indexOf(t,e){for(let r=0;r0;){const r=e.pop(... method toIterable (line 1) | *toIterable(){for(const t=[this.root];t.length>0;){const e=t.pop();nul... method _update (line 1) | _update(t,e,r){if(!s(t.contacts[e].id,r.id))throw new Error("wrong ind... function s (line 1) | function s(t,e){this.name=t,this.body=e,this.decoders={},this.encoders={}} function s (line 1) | function s(t,e){return 55296==(64512&t.charCodeAt(e))&&(!(e<0||e+1>=t.le... function o (line 1) | function o(t){return(t>>>24|t>>>8&65280|t<<8&16711680|(255&t)<<24)>>>0} function a (line 1) | function a(t){return 1===t.length?"0"+t:t} method constructor (line 1) | constructor(t={}){super(),this.localNodeId=t.localNodeId||i(20),this.n... method arbiter (line 1) | static arbiter(t,e){return t.vectorClock>e.vectorClock?t:e} method distance (line 1) | static distance(t,e){let r=0,i=0;const n=Math.min(t.length,e.length),s... method add (line 1) | add(t){o("contact.id",(t||{}).id);let e=0,r=this.root;for(;null===r.co... method closest (line 1) | closest(t,e=1/0){if(o("id",t),!Number.isInteger(e)&&e!==1/0||e<=0)thro... method count (line 1) | count(){let t=0;for(const e=[this.root];e.length>0;){const r=e.pop();n... method _determineNode (line 1) | _determineNode(t,e,r){const i=r>>3,n=r%8;if(e.length<=i&&0!==n)return ... method get (line 1) | get(t){o("id",t);let e=0,r=this.root;for(;null===r.contacts;)r=this._d... method _indexOf (line 1) | _indexOf(t,e){for(let r=0;r0;){const r=e.pop(... method toIterable (line 1) | *toIterable(){for(const t=[this.root];t.length>0;){const e=t.pop();nul... method _update (line 1) | _update(t,e,r){if(!s(t.contacts[e].id,r.id))throw new Error("wrong ind... function h (line 1) | function h(t){return 7===t.length?"0"+t:6===t.length?"00"+t:5===t.length... function l (line 1) | function l(t){if(!(this instanceof l))return new l(t);"string"==typeof t... function s (line 1) | function s(t){var e;switch(this.encoding=function(t){var e=function(t){i... function o (line 1) | function o(t){return t<=127?0:t>>5==6?2:t>>4==14?3:t>>3==30?4:t>>6==2?-1... function a (line 1) | function a(t){var e=this.lastTotal-this.lastNeed,r=function(t,e){if(128!... method constructor (line 1) | constructor(t={}){super(),this.localNodeId=t.localNodeId||i(20),this.n... method arbiter (line 1) | static arbiter(t,e){return t.vectorClock>e.vectorClock?t:e} method distance (line 1) | static distance(t,e){let r=0,i=0;const n=Math.min(t.length,e.length),s... method add (line 1) | add(t){o("contact.id",(t||{}).id);let e=0,r=this.root;for(;null===r.co... method closest (line 1) | closest(t,e=1/0){if(o("id",t),!Number.isInteger(e)&&e!==1/0||e<=0)thro... method count (line 1) | count(){let t=0;for(const e=[this.root];e.length>0;){const r=e.pop();n... method _determineNode (line 1) | _determineNode(t,e,r){const i=r>>3,n=r%8;if(e.length<=i&&0!==n)return ... method get (line 1) | get(t){o("id",t);let e=0,r=this.root;for(;null===r.contacts;)r=this._d... method _indexOf (line 1) | _indexOf(t,e){for(let r=0;r0;){const r=e.pop(... method toIterable (line 1) | *toIterable(){for(const t=[this.root];t.length>0;){const e=t.pop();nul... method _update (line 1) | _update(t,e,r){if(!s(t.contacts[e].id,r.id))throw new Error("wrong ind... function h (line 1) | function h(t,e){if((t.length-e)%2==0){var r=t.toString("utf16le",e);if(r... function u (line 1) | function u(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var r... function f (line 1) | function f(t,e){var r=(t.length-e)%3;return 0===r?t.toString("base64",e)... function l (line 1) | function l(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+... function c (line 1) | function c(t){return t.toString(this.encoding)} function d (line 1) | function d(t){return t&&t.length?this.write(t):""} function a (line 1) | function a(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. L... method constructor (line 1) | constructor(t={}){super(),this.localNodeId=t.localNodeId||i(20),this.n... method arbiter (line 1) | static arbiter(t,e){return t.vectorClock>e.vectorClock?t:e} method distance (line 1) | static distance(t,e){let r=0,i=0;const n=Math.min(t.length,e.length),s... method add (line 1) | add(t){o("contact.id",(t||{}).id);let e=0,r=this.root;for(;null===r.co... method closest (line 1) | closest(t,e=1/0){if(o("id",t),!Number.isInteger(e)&&e!==1/0||e<=0)thro... method count (line 1) | count(){let t=0;for(const e=[this.root];e.length>0;){const r=e.pop();n... method _determineNode (line 1) | _determineNode(t,e,r){const i=r>>3,n=r%8;if(e.length<=i&&0!==n)return ... method get (line 1) | get(t){o("id",t);let e=0,r=this.root;for(;null===r.contacts;)r=this._d... method _indexOf (line 1) | _indexOf(t,e){for(let r=0;r0;){const r=e.pop(... method toIterable (line 1) | *toIterable(){for(const t=[this.root];t.length>0;){const e=t.pop();nul... method _update (line 1) | _update(t,e,r){if(!s(t.contacts[e].id,r.id))throw new Error("wrong ind... function h (line 1) | function h(t){return r[t>>18&63]+r[t>>12&63]+r[t>>6&63]+r[63&t]} function u (line 1) | function u(t,e,r){for(var i,n=[],s=e;se.vectorClock?t:e} method distance (line 1) | static distance(t,e){let r=0,i=0;const n=Math.min(t.length,e.length),s... method add (line 1) | add(t){o("contact.id",(t||{}).id);let e=0,r=this.root;for(;null===r.co... method closest (line 1) | closest(t,e=1/0){if(o("id",t),!Number.isInteger(e)&&e!==1/0||e<=0)thro... method count (line 1) | count(){let t=0;for(const e=[this.root];e.length>0;){const r=e.pop();n... method _determineNode (line 1) | _determineNode(t,e,r){const i=r>>3,n=r%8;if(e.length<=i&&0!==n)return ... method get (line 1) | get(t){o("id",t);let e=0,r=this.root;for(;null===r.contacts;)r=this._d... method _indexOf (line 1) | _indexOf(t,e){for(let r=0;r0;){const r=e.pop(... method toIterable (line 1) | *toIterable(){for(const t=[this.root];t.length>0;){const e=t.pop();nul... method _update (line 1) | _update(t,e,r){if(!s(t.contacts[e].id,r.id))throw new Error("wrong ind... function h (line 1) | function h(t){t()} function u (line 1) | function u(t,e){return t.pipe(e)} function v (line 1) | function v(){if(!(this instanceof v))return new v;y.call(this),this.h=[1... function w (line 1) | function w(t,e,r,i,n){var s=t&r^~t&n;return s<0&&(s+=4294967296),s} function _ (line 1) | function _(t,e,r,i,n,s){var o=e&i^~e&s;return o<0&&(o+=4294967296),o} function M (line 1) | function M(t,e,r,i,n){var s=t&r^t&n^r&n;return s<0&&(s+=4294967296),s} function S (line 1) | function S(t,e,r,i,n,s){var o=e&i^e&s^i&s;return o<0&&(o+=4294967296),o} function k (line 1) | function k(t,e){var r=o(t,e,28)^o(e,t,2)^o(e,t,7);return r<0&&(r+=429496... function E (line 1) | function E(t,e){var r=a(t,e,28)^a(e,t,2)^a(e,t,7);return r<0&&(r+=429496... function x (line 1) | function x(t,e){var r=o(t,e,14)^o(t,e,18)^o(e,t,9);return r<0&&(r+=42949... function A (line 1) | function A(t,e){var r=a(t,e,14)^a(t,e,18)^a(e,t,9);return r<0&&(r+=42949... function I (line 1) | function I(t,e){var r=o(t,e,1)^o(t,e,8)^h(t,e,7);return r<0&&(r+=4294967... function T (line 1) | function T(t,e){var r=a(t,e,1)^a(t,e,8)^u(t,e,7);return r<0&&(r+=4294967... method constructor (line 1) | constructor(t,e,r,i){this.piece=t,this.offset=e,this.length=r,this.cal... function C (line 1) | function C(t,e){var r=o(t,e,19)^o(e,t,29)^h(t,e,6);return r<0&&(r+=42949... method constructor (line 1) | constructor(){this.buffer=new Uint8Array} method get (line 1) | get(t){return!0} method set (line 1) | set(t){} function P (line 1) | function P(t,e){var r=a(t,e,19)^a(e,t,29)^u(t,e,6);return r<0&&(r+=42949... method constructor (line 1) | constructor(t=null,e=0,r=!1){super(),this._debugId=(0,u.V5)((0,u.po)(4... method setKeepAlive (line 1) | setKeepAlive(t){this._debug("setKeepAlive %s",t),clearInterval(this._k... method setTimeout (line 1) | setTimeout(t,e){this._debug("setTimeout ms=%d unref=%s",t,e),this._tim... method destroy (line 1) | destroy(){if(!this.destroyed)return this._debug("destroy"),this.end(),... method end (line 1) | end(t){if(!this.destroyed&&!this.destroying)return this._debug("end"),... method use (line 1) | use(t){const e=t.prototype.name;if(!e)throw new Error('Extension class... method keepAlive (line 1) | keepAlive(){this._debug("keep-alive"),this._push(p)} method sendPe1 (line 1) | sendPe1(){if(this._peEnabled){const t=Math.floor(513*Math.random()),e=... method sendPe2 (line 1) | sendPe2(){const t=Math.floor(513*Math.random()),e=(0,u.po)(t);this._pu... method sendPe3 (line 1) | async sendPe3(t){await this.setEncrypt(this._sharedSecret,t);const e=a... method sendPe4 (line 1) | async sendPe4(t){await this.setEncrypt(this._sharedSecret,t);const e=n... method handshake (line 1) | handshake(t,e,r){let i,n;if("string"==typeof t?(t=t.toLowerCase(),i=(0... method _sendExtendedHandshake (line 1) | _sendExtendedHandshake(){const t=Object.assign({},this.extendedHandsha... method choke (line 1) | choke(){if(!this.amChoking)if(this.amChoking=!0,this._debug("choke"),t... method unchoke (line 1) | unchoke(){this.amChoking&&(this.amChoking=!1,this._debug("unchoke"),th... method interested (line 1) | interested(){this.amInterested||(this.amInterested=!0,this._debug("int... method uninterested (line 1) | uninterested(){this.amInterested&&(this.amInterested=!1,this._debug("u... method have (line 1) | have(t){this._debug("have %d",t),this._message(4,[t],null)} method bitfield (line 1) | bitfield(t){this._debug("bitfield"),ArrayBuffer.isView(t)||(t=t.buffer... method request (line 1) | request(t,e,r,i){return i||(i=()=>{}),this._finished?i(new Error("wire... method piece (line 1) | piece(t,e,r){this._debug("piece index=%d offset=%d",t,e),this._message... method cancel (line 1) | cancel(t,e,r){this._debug("cancel index=%d offset=%d length=%d",t,e,r)... method port (line 1) | port(t){this._debug("port %d",t);const e=new Uint8Array(w);new DataVie... method suggest (line 1) | suggest(t){if(!this.hasFast)throw Error("fast extension is disabled");... method haveAll (line 1) | haveAll(){if(!this.hasFast)throw Error("fast extension is disabled");t... method haveNone (line 1) | haveNone(){if(!this.hasFast)throw Error("fast extension is disabled");... method reject (line 1) | reject(t,e,r){if(!this.hasFast)throw Error("fast extension is disabled... method allowedFast (line 1) | allowedFast(t){if(!this.hasFast)throw Error("fast extension is disable... method extended (line 1) | extended(t,e){if(this._debug("extended ext=%s",t),"string"==typeof t&&... method setEncrypt (line 1) | async setEncrypt(t,e){if(!this.type.startsWith("tcp"))return!1;const r... method _message (line 1) | _message(t,e,r){const i=r?r.length:0,n=new Uint8Array(5+4*e.length);I(... method _push (line 1) | _push(t){if(!this._finished)return 2===this._encryptionMethod&&this._c... method _onKeepAlive (line 1) | _onKeepAlive(){this._debug("got keep-alive"),this.emit("keep-alive")} method _onPe1 (line 1) | _onPe1(t){this._peerPubKey=(0,u.V5)(t),this._sharedSecret=this._dh.com... method _onPe2 (line 1) | _onPe2(t){this._peerPubKey=(0,u.V5)(t),this._sharedSecret=this._dh.com... method _onPe3 (line 1) | async _onPe3(t){const e=await(0,u.tW)((0,u.fk)(this._utfToHex("req3")+... method _onPe3Encrypted (line 1) | _onPe3Encrypted(t,e){if(!(0,u.LC)(t,S))return this._debug("Error: veri... method _onPe4 (line 1) | _onPe4(t){this._encryptionMethod=t[3],k.includes(this._encryptionMetho... method _onHandshake (line 1) | _onHandshake(t,e,r){const i=(0,u.V5)(t),n=(0,u.V5)(e);this._debug("got... method _onChoke (line 1) | _onChoke(){if(this.peerChoking=!0,this._debug("got choke"),this.emit("... method _onUnchoke (line 1) | _onUnchoke(){this.peerChoking=!1,this._debug("got unchoke"),this.emit(... method _onInterested (line 1) | _onInterested(){this.peerInterested=!0,this._debug("got interested"),t... method _onUninterested (line 1) | _onUninterested(){this.peerInterested=!1,this._debug("got uninterested... method _onHave (line 1) | _onHave(t){this.peerPieces.get(t)||(this._debug("got have %d",t),this.... method _onBitField (line 1) | _onBitField(t){this.peerPieces=new n.A(t),this._debug("got bitfield"),... method _onRequest (line 1) | _onRequest(t,e,r){if(this.amChoking&&(!this.hasFast||!this.allowedFast... method _onPiece (line 1) | _onPiece(t,e,r){this._debug("got piece index=%d offset=%d",t,e),this._... method _onCancel (line 1) | _onCancel(t,e,r){this._debug("got cancel index=%d offset=%d length=%d"... method _onPort (line 1) | _onPort(t){this._debug("got port %d",t),this.emit("port",t)} method _onSuggest (line 1) | _onSuggest(t){if(!this.hasFast)return this._debug("Error: got suggest ... method _onHaveAll (line 1) | _onHaveAll(){if(!this.hasFast)return this._debug("Error: got have-all ... method _onHaveNone (line 1) | _onHaveNone(){if(!this.hasFast)return this._debug("Error: got have-non... method _onReject (line 1) | _onReject(t,e,r){if(!this.hasFast)return this._debug("Error: got rejec... method _onAllowedFast (line 1) | _onAllowedFast(t){if(!this.hasFast)return this._debug("Error: got allo... method _onExtended (line 1) | _onExtended(t,e){if(0===t){let t;try{t=i.A.decode(e)}catch(t){this._de... method _onTimeout (line 1) | _onTimeout(){this._debug("request timed out"),this._callback(this.requ... method _write (line 1) | _write(t,e){if(2===this._encryptionMethod&&this._cryptoHandshakeDone&&... method _callback (line 1) | _callback(t,e,r){t&&(this._resetTimeout(!this.peerChoking&&!this._fini... method _resetTimeout (line 1) | _resetTimeout(t){if(!t||!this._timeoutMs||!this.requests.length)return... method _parse (line 1) | _parse(t,e){this._parserSize=t,this._parser=e} method _parseUntil (line 1) | _parseUntil(t,e){this._cryptoSyncPattern=t,this._waitMaxBytes=e} method _onMessageLength (line 1) | _onMessageLength(t){const e=A(t);e>0?this._parse(e,this._onMessage):(t... method _onMessage (line 1) | _onMessage(t){switch(this._parse(4,this._onMessageLength),t[0]){case 0... method _determineHandshakeType (line 1) | _determineHandshakeType(){this._parse(1,t=>{const e=t[0];19===e?this._... method _parsePe1 (line 1) | _parsePe1(t){this._parse(95,e=>{this._onPe1((0,u.xW)([t,e])),this._par... method _parsePe2 (line 1) | _parsePe2(){this._parse(96,async t=>{this._onPe2(t),this._setGenerator... method _parsePe3 (line 1) | async _parsePe3(){const t=await(0,u.tW)((0,u.fk)(this._utfToHex("req1"... method _parsePe3Encrypted (line 1) | _parsePe3Encrypted(){this._parse(14,t=>{const e=this._decryptHandshake... method _parsePe4 (line 1) | _parsePe4(){const t=this._decryptHandshake(S);this._parseUntil(t,512),... method _parseHandshake (line 1) | _parseHandshake(){this._parse(1,t=>{const e=t[0];if(19!==e)return this... method _onHandshakeBuffer (line 1) | _onHandshakeBuffer(t){const e=t.slice(0,19);if("BitTorrent protocol"!=... method _onFinish (line 1) | _onFinish(){for(this._finished=!0,this.push(null);this.read(););for(cl... method _debug (line 1) | _debug(...t){t[0]=`[${this._debugId}] ${t[0]}`,c(...t)} method _pull (line 1) | _pull(t,e,r,i){for(let n=0;n>>27} function f (line 1) | function f(t){return t<<30|t>>>2} function l (line 1) | function l(t,e,r,i){return 0===t?e&r|~e&i:2===t?e&r|e&i|r&i:e^r^i} function u (line 1) | function u(t,e){var r=this;if(n.call(r),"string"==typeof t&&(t={type:t})... function i (line 1) | function i(e){chrome.sockets.udp.setMulticastTimeToLive(r.id,t,e)} function i (line 1) | function i(e){chrome.sockets.udp.setMulticastLoopbackMode(r.id,t,e)} function s (line 1) | function s(t){if(!(this instanceof s))return new s(t);i.call(this,t)} function u (line 1) | function u(t){var e;"object"!=typeof t||h.isBuffer(t)||(e=t.passphrase,t... class tt (line 1) | class tt{constructor(t,{highWaterMark:e=16384,map:r=null,mapWritable:i,b... method constructor (line 1) | constructor(t,{highWaterMark:e=16384,map:r=null,mapWritable:i,byteLeng... method ended (line 1) | get ended(){return 0!==(this.stream._duplexState&B)} method push (line 1) | push(t){return!(142606350&this.stream._duplexState)&&(null!==this.map&... method shift (line 1) | shift(){const t=this.queue.shift();return this.buffered-=this.byteLeng... method end (line 1) | end(t){"function"==typeof t?this.stream.once("finish",t):null!=t&&this... method autoBatch (line 1) | autoBatch(t,e){const r=[],i=this.stream;for(r.push(t);(i._duplexState&... method update (line 1) | update(){const t=this.stream;t._duplexState|=C;do{for(;(t._duplexState... method updateNonPrimary (line 1) | updateNonPrimary(){const t=this.stream;if((144965647&t._duplexState)==... method continueUpdate (line 1) | continueUpdate(){return 0!==(this.stream._duplexState&N)&&(this.stream... method updateCallback (line 1) | updateCallback(){(35127311&this.stream._duplexState)===P?this.update()... method updateNextTick (line 1) | updateNextTick(){0===(this.stream._duplexState&N)&&(this.stream._duple... class et (line 1) | class et{constructor(t,{highWaterMark:e=16384,map:r=null,mapReadable:i,b... method constructor (line 1) | constructor(t,{highWaterMark:e=16384,map:r=null,mapReadable:i,byteLeng... method ended (line 1) | get ended(){return 0!==(this.stream._duplexState&w)} method pipe (line 1) | pipe(t,e){if(null!==this.pipeTo)throw new Error("Can only pipe to one ... method push (line 1) | push(t){const e=this.stream;return null===t?(this.highWaterMark=0,e._d... method shift (line 1) | shift(){const t=this.queue.shift();return this.buffered-=this.byteLeng... method unshift (line 1) | unshift(t){const e=[null!==this.map?this.map(t):t];for(;this.buffered>... method read (line 1) | read(){const t=this.stream;if((16527&t._duplexState)===p){const e=this... method drain (line 1) | drain(){const t=this.stream;for(;(16527&t._duplexState)===p&&768&t._du... method update (line 1) | update(){const t=this.stream;t._duplexState|=c;do{for(this.drain();thi... method updateNonPrimary (line 1) | updateNonPrimary(){const t=this.stream;(1167&t._duplexState)===g&&(t._... method continueUpdate (line 1) | continueUpdate(){return 0!==(this.stream._duplexState&_)&&(this.stream... method updateCallback (line 1) | updateCallback(){(32879&this.stream._duplexState)===d?this.update():th... method updateNextTickIfOpen (line 1) | updateNextTickIfOpen(){32769&this.stream._duplexState||(this.stream._d... method updateNextTick (line 1) | updateNextTick(){0===(this.stream._duplexState&_)&&(this.stream._duple... class rt (line 1) | class rt{constructor(t){this.data=null,this.afterTransform=ct.bind(t),th... method constructor (line 1) | constructor(t){this.data=null,this.afterTransform=ct.bind(t),this.afte... class it (line 1) | class it{constructor(t,e,r){this.from=t,this.to=e,this.afterPipe=r,this.... method constructor (line 1) | constructor(t,e,r){this.from=t,this.to=e,this.afterPipe=r,this.error=n... method finished (line 1) | finished(){this.pipeToFinished=!0} method done (line 1) | done(t,e){e&&(this.error=e),t!==this.to||(this.to=null,null===this.fro... function nt (line 1) | function nt(){this.stream._duplexState|=512,this.updateCallback()} function st (line 1) | function st(t){const e=this.stream;t&&e.destroy(t),0===(e._duplexState&V... function ot (line 1) | function ot(t){const e=this.stream;t||this.error===n||(t=this.error),t&&... function at (line 1) | function at(t){const e=this.stream;t&&e.destroy(t),e._duplexState&=46949... function ht (line 1) | function ht(t){t&&this.stream.destroy(t),this.stream._duplexState&=k,!1=... function ut (line 1) | function ut(){0===(this.stream._duplexState&c)&&(this.stream._duplexStat... function ft (line 1) | function ft(){0===(this.stream._duplexState&C)&&(this.stream._duplexStat... function lt (line 1) | function lt(t){const e=this.stream;t&&e.destroy(t),4&e._duplexState||(17... function ct (line 1) | function ct(t,e){null!=e&&this.push(e),this._writableState.afterWrite(t)} function dt (line 1) | function dt(t){null!==this._readableState&&("data"===t&&(this._duplexSta... class pt (line 1) | class pt extends i{constructor(t){super(),this._duplexState=0,this._read... method constructor (line 1) | constructor(t){super(),this._duplexState=0,this._readableState=null,th... method _open (line 1) | _open(t){t(null)} method _destroy (line 1) | _destroy(t){t(null)} method _predestroy (line 1) | _predestroy(){} method readable (line 1) | get readable(){return null!==this._readableState||void 0} method writable (line 1) | get writable(){return null!==this._writableState||void 0} method destroyed (line 1) | get destroyed(){return!!(8&this._duplexState)} method destroying (line 1) | get destroying(){return 0!==(this._duplexState&V)} method destroy (line 1) | destroy(t){0===(this._duplexState&V)&&(t||(t=n),this._duplexState=5358... class mt (line 1) | class mt extends pt{constructor(t){super(t),this._duplexState|=8519681,t... method constructor (line 1) | constructor(t){super(t),this._duplexState|=8519681,this._readableState... method setEncoding (line 1) | setEncoding(t){const e=new a(t),r=this._readableState.map||_t;return t... method _read (line 1) | _read(t){t(null)} method pipe (line 1) | pipe(t,e){return this._readableState.updateNextTick(),this._readableSt... method read (line 1) | read(){return this._readableState.updateNextTick(),this._readableState... method push (line 1) | push(t){return this._readableState.updateNextTickIfOpen(),this._readab... method unshift (line 1) | unshift(t){return this._readableState.updateNextTickIfOpen(),this._rea... method resume (line 1) | resume(){return this._duplexState|=S,this._readableState.updateNextTic... method pause (line 1) | pause(){return this._duplexState&=!1===this._readableState.readAhead?5... method _fromAsyncIterator (line 1) | static _fromAsyncIterator(t,e){let r;const i=new mt({...e,read(e){t.ne... method from (line 1) | static from(t,e){if(St(r=t)&&r.readable)return t;var r;if(t[Q])return ... method isBackpressured (line 1) | static isBackpressured(t){return!!(17422&t._duplexState)||t._readableS... method isPaused (line 1) | static isPaused(t){return 0===(t._duplexState&m)} method [Q] (line 1) | [Q](){const t=this;let e=null,r=null,i=null;return this.on("error",t=>... class gt (line 1) | class gt extends pt{constructor(t){super(t),this._duplexState|=16385,thi... method constructor (line 1) | constructor(t){super(t),this._duplexState|=16385,this._writableState=n... method cork (line 1) | cork(){this._duplexState|=q} method uncork (line 1) | uncork(){this._duplexState&=F,this._writableState.updateNextTick()} method _writev (line 1) | _writev(t,e){e(null)} method _write (line 1) | _write(t,e){this._writableState.autoBatch(t,e)} method _final (line 1) | _final(t){t(null)} method isBackpressured (line 1) | static isBackpressured(t){return!!(146800654&t._duplexState)} method drained (line 1) | static drained(t){if(t.destroyed)return Promise.resolve(!1);const e=t.... method write (line 1) | write(t){return this._writableState.updateNextTick(),this._writableSta... method end (line 1) | end(t){return this._writableState.updateNextTick(),this._writableState... class yt (line 1) | class yt extends mt{constructor(t){super(t),this._duplexState=1|this._du... method constructor (line 1) | constructor(t){super(t),this._duplexState=1|this._duplexState&M,this._... method cork (line 1) | cork(){this._duplexState|=q} method uncork (line 1) | uncork(){this._duplexState&=F,this._writableState.updateNextTick()} method _writev (line 1) | _writev(t,e){e(null)} method _write (line 1) | _write(t,e){this._writableState.autoBatch(t,e)} method _final (line 1) | _final(t){t(null)} method write (line 1) | write(t){return this._writableState.updateNextTick(),this._writableSta... method end (line 1) | end(t){return this._writableState.updateNextTick(),this._writableState... class bt (line 1) | class bt extends yt{constructor(t){super(t),this._transformState=new rt(... method constructor (line 1) | constructor(t){super(t),this._transformState=new rt(this),t&&(t.transf... method _write (line 1) | _write(t,e){this._readableState.buffered>=this._readableState.highWate... method _read (line 1) | _read(t){if(null!==this._transformState.data){const e=this._transformS... method destroy (line 1) | destroy(t){super.destroy(t),null!==this._transformState.data&&(this._t... method _transform (line 1) | _transform(t,e){e(null,t)} method _flush (line 1) | _flush(t){t(null)} method _final (line 1) | _final(t){this._transformState.afterFinal=t,this._flush(vt.bind(this))} function vt (line 1) | function vt(t,e){const r=this._transformState.afterFinal;if(t)return r(t... function wt (line 1) | function wt(t,...e){const r=Array.isArray(t)?[...t,...e]:[t,...e],i=r.le... function _t (line 1) | function _t(t){return t} function Mt (line 1) | function Mt(t){return!!t._readableState||!!t._writableState} function St (line 1) | function St(t){return"number"==typeof t._duplexState&&Mt(t)} method constructor (line 1) | constructor(t){if(super(t=Object.assign({allowHalfOpen:!1},t)),this.__... method bufferSize (line 1) | get bufferSize(){return this._channel&&this._channel.bufferedAmount||0} method connected (line 1) | get connected(){return this._connected&&"open"===this._channel.readySt... method address (line 1) | address(){return{port:this.localPort,family:this.localFamily,address:t... method signal (line 1) | signal(t){if(!this._destroying){if(this.destroyed)throw vt(new Error("... method _addIceCandidate (line 1) | _addIceCandidate(t){const e=new yt(t);this._pc.addIceCandidate(e).catc... method send (line 1) | send(t){if(!this._destroying){if(this.destroyed)throw vt(new Error("ca... method _needsNegotiation (line 1) | _needsNegotiation(){this._debug("_needsNegotiation"),this._batchedNego... method negotiate (line 1) | negotiate(){if(!this._destroying){if(this.destroyed)throw vt(new Error... method _final (line 1) | _final(t){this._readableState.ended||this.push(null),t(null)} method __destroy (line 1) | __destroy(t){this.end(),this._destroy(()=>{},t)} method _destroy (line 1) | _destroy(t,e){this.destroyed||this._destroying||(this._destroying=!0,t... method _setupData (line 1) | _setupData(t){if(!t.channel)return this.__destroy(vt(new Error("Data c... method _write (line 1) | _write(t,e){if(this.destroyed)return e(vt(new Error("cannot write afte... method _onFinish (line 1) | _onFinish(){if(this.destroyed)return;const t=()=>{setTimeout(()=>this.... method _startIceCompleteTimeout (line 1) | _startIceCompleteTimeout(){this.destroyed||this._iceCompleteTimer||(th... method _createOffer (line 1) | _createOffer(){this.destroyed||this._pc.createOffer(this.offerOptions)... method _createAnswer (line 1) | _createAnswer(){this.destroyed||this._pc.createAnswer(this.answerOptio... method _onConnectionStateChange (line 1) | _onConnectionStateChange(){this.destroyed||this._destroying||"failed"=... method _onIceStateChange (line 1) | _onIceStateChange(){if(this.destroyed)return;const t=this._pc.iceConne... method getStats (line 1) | getStats(t){const e=t=>("[object Array]"===Object.prototype.toString.c... method _maybeReady (line 1) | _maybeReady(){if(this._debug("maybeReady pc %s channel %s",this._pcRea... method _onInterval (line 1) | _onInterval(){!this._cb||!this._channel||this._channel.bufferedAmount>... method _onSignalingStateChange (line 1) | _onSignalingStateChange(){this.destroyed||("stable"===this._pc.signali... method _onIceCandidate (line 1) | _onIceCandidate(t){this.destroyed||(t.candidate&&this.trickle?this.emi... method _onChannelMessage (line 1) | _onChannelMessage(t){if(this.destroyed)return;let e=t.data;e instanceo... method _onChannelBufferedAmountLow (line 1) | _onChannelBufferedAmountLow(){if(this.destroyed||!this._cb)return;this... method _onChannelOpen (line 1) | _onChannelOpen(){this._connected||this.destroyed||(this._debug("on cha... method _onChannelClose (line 1) | _onChannelClose(){this.destroyed||(this._debug("on channel close"),thi... method _debug (line 1) | _debug(){const t=[].slice.call(arguments);t[0]="["+this._id+"] "+t[0],... function kt (line 1) | function kt(t){return function(t){return"object"==typeof t&&null!==t&&"n... function Et (line 1) | function Et(){} function xt (line 1) | function xt(){this.destroy(new Error("Stream aborted."))} function a (line 1) | function a(t){function n(){e&&e(t,r),e=null}o?i(n):n()} method constructor (line 1) | constructor(t={}){super(),this.localNodeId=t.localNodeId||i(20),this.n... method arbiter (line 1) | static arbiter(t,e){return t.vectorClock>e.vectorClock?t:e} method distance (line 1) | static distance(t,e){let r=0,i=0;const n=Math.min(t.length,e.length),s... method add (line 1) | add(t){o("contact.id",(t||{}).id);let e=0,r=this.root;for(;null===r.co... method closest (line 1) | closest(t,e=1/0){if(o("id",t),!Number.isInteger(e)&&e!==1/0||e<=0)thro... method count (line 1) | count(){let t=0;for(const e=[this.root];e.length>0;){const r=e.pop();n... method _determineNode (line 1) | _determineNode(t,e,r){const i=r>>3,n=r%8;if(e.length<=i&&0!==n)return ... method get (line 1) | get(t){o("id",t);let e=0,r=this.root;for(;null===r.contacts;)r=this._d... method _indexOf (line 1) | _indexOf(t,e){for(let r=0;r0;){const r=e.pop(... method toIterable (line 1) | *toIterable(){for(const t=[this.root];t.length>0;){const e=t.pop();nul... method _update (line 1) | _update(t,e,r){if(!s(t.contacts[e].id,r.id))throw new Error("wrong ind... function h (line 1) | function h(t,e,i){r[t]=i,(0===--n||e)&&a(e)} function s (line 1) | function s(t){var e=n.allocUnsafe(4);return e.writeUInt32BE(t,0),e} function a (line 1) | function a(){n.call(this,64),this._a=1732584193,this._b=4023233417,this.... method constructor (line 1) | constructor(t={}){super(),this.localNodeId=t.localNodeId||i(20),this.n... method arbiter (line 1) | static arbiter(t,e){return t.vectorClock>e.vectorClock?t:e} method distance (line 1) | static distance(t,e){let r=0,i=0;const n=Math.min(t.length,e.length),s... method add (line 1) | add(t){o("contact.id",(t||{}).id);let e=0,r=this.root;for(;null===r.co... method closest (line 1) | closest(t,e=1/0){if(o("id",t),!Number.isInteger(e)&&e!==1/0||e<=0)thro... method count (line 1) | count(){let t=0;for(const e=[this.root];e.length>0;){const r=e.pop();n... method _determineNode (line 1) | _determineNode(t,e,r){const i=r>>3,n=r%8;if(e.length<=i&&0!==n)return ... method get (line 1) | get(t){o("id",t);let e=0,r=this.root;for(;null===r.contacts;)r=this._d... method _indexOf (line 1) | _indexOf(t,e){for(let r=0;r0;){const r=e.pop(... method toIterable (line 1) | *toIterable(){for(const t=[this.root];t.length>0;){const e=t.pop();nul... method _update (line 1) | _update(t,e,r){if(!s(t.contacts[e].id,r.id))throw new Error("wrong ind... function h (line 1) | function h(t,e){return t<>>32-e} function u (line 1) | function u(t,e,r,i,n,s,o){return h(t+(e&r|~e&i)+n+s|0,o)+e|0} function f (line 1) | function f(t,e,r,i,n,s,o){return h(t+(e&i|r&~i)+n+s|0,o)+e|0} function l (line 1) | function l(t,e,r,i,n,s,o){return h(t+(e^r^i)+n+s|0,o)+e|0} function c (line 1) | function c(t,e,r,i,n,s,o){return h(t+(r^(e|~i))+n+s|0,o)+e|0} function a (line 1) | function a(t){if(t>o)throw new RangeError('The value "'+t+'" is invalid ... method constructor (line 1) | constructor(t={}){super(),this.localNodeId=t.localNodeId||i(20),this.n... method arbiter (line 1) | static arbiter(t,e){return t.vectorClock>e.vectorClock?t:e} method distance (line 1) | static distance(t,e){let r=0,i=0;const n=Math.min(t.length,e.length),s... method add (line 1) | add(t){o("contact.id",(t||{}).id);let e=0,r=this.root;for(;null===r.co... method closest (line 1) | closest(t,e=1/0){if(o("id",t),!Number.isInteger(e)&&e!==1/0||e<=0)thro... method count (line 1) | count(){let t=0;for(const e=[this.root];e.length>0;){const r=e.pop();n... method _determineNode (line 1) | _determineNode(t,e,r){const i=r>>3,n=r%8;if(e.length<=i&&0!==n)return ... method get (line 1) | get(t){o("id",t);let e=0,r=this.root;for(;null===r.contacts;)r=this._d... method _indexOf (line 1) | _indexOf(t,e){for(let r=0;r0;){const r=e.pop(... method toIterable (line 1) | *toIterable(){for(const t=[this.root];t.length>0;){const e=t.pop();nul... method _update (line 1) | _update(t,e,r){if(!s(t.contacts[e].id,r.id))throw new Error("wrong ind... function h (line 1) | function h(t,e,r){if("number"==typeof t){if("string"==typeof e)throw new... function u (line 1) | function u(t,e,r){if("string"==typeof t)return function(t,e){"string"==t... function f (line 1) | function f(t){if("number"!=typeof t)throw new TypeError('"size" argument... function l (line 1) | function l(t){return f(t),a(t<0?0:0|p(t))} function c (line 1) | function c(t){const e=t.length<0?0:0|p(t.length),r=a(e);for(let i=0;i=o)throw new RangeError("Attempt to allocate Buffer l... function m (line 1) | function m(t,e){if(h.isBuffer(t))return t.length;if(ArrayBuffer.isView(t... function g (line 1) | function g(t,e,r){let i=!1;if((void 0===e||e<0)&&(e=0),e>this.length)ret... method constructor (line 1) | constructor(t,e){super(),this.id=t,this.type=e,d("new %s Peer %s",e,t)... method onConnect (line 1) | onConnect(){if(this.destroyed)return;this.connected=!0,this.emit("conn... method sendPe1 (line 1) | sendPe1(){this.wire.sendPe1(),this.sentPe1=!0} method onPe1 (line 1) | onPe1(){this.sendPe2()} method sendPe2 (line 1) | sendPe2(){this.wire.sendPe2(),this.sentPe2=!0} method onPe2 (line 1) | onPe2(){this.sendPe3()} method sendPe3 (line 1) | sendPe3(){this.wire.sendPe3(this.swarm.infoHash),this.sentPe3=!0} method onPe3 (line 1) | onPe3(t){this.swarm&&(this.swarm.infoHashHash!==t&&this.destroy(new Er... method sendPe4 (line 1) | sendPe4(){this.wire.sendPe4(this.swarm.infoHash),this.sentPe4=!0} method onPe4 (line 1) | onPe4(){this.sentHandshake||this.handshake()} method clearPipes (line 1) | clearPipes(){this.conn.unpipe(),this.wire.unpipe()} method setThrottlePipes (line 1) | setThrottlePipes(){const t=this;(0,n.pipeline)(this.conn,this.throttle... method onHandshake (line 1) | onHandshake(t,e){if(!this.swarm)return;if(this.destroyed)return;if(thi... method handshake (line 1) | handshake(){const t={dht:!this.swarm.private&&!!this.swarm.client.dht,... method startConnectTimeout (line 1) | startConnectTimeout(){clearTimeout(this.connectTimeout);const t={webrt... method startHandshakeTimeout (line 1) | startHandshakeTimeout(){clearTimeout(this.handshakeTimeout),this.hands... method destroy (line 1) | destroy(t){if(this.destroyed)return;this.destroyed=!0,this.connected&&... function y (line 1) | function y(t,e,r){const i=t[e];t[e]=t[r],t[r]=i} function b (line 1) | function b(t,e,r,i,n){if(0===t.length)return-1;if("string"==typeof r?(i=... function v (line 1) | function v(t,e,r,i,n){let s,o=1,a=t.length,h=e.length;if(void 0!==i&&("u... function w (line 1) | function w(t,e,r,i){r=Number(r)||0;const n=t.length-r;i?(i=Number(i))>n&... function _ (line 1) | function _(t,e,r,i){return Z(V(e,t.length-r),t,r,i)} function M (line 1) | function M(t,e,r,i){return Z(function(t){const e=[];for(let r=0;ri)&&(r=i... method constructor (line 1) | constructor(){this.buffer=new Uint8Array} method get (line 1) | get(t){return!0} method set (line 1) | set(t){} function P (line 1) | function P(t,e,r){const i=t.slice(e,r);let n="";for(let t=0;t{}),this._finished?i(new Error("wire... method piece (line 1) | piece(t,e,r){this._debug("piece index=%d offset=%d",t,e),this._message... method cancel (line 1) | cancel(t,e,r){this._debug("cancel index=%d offset=%d length=%d",t,e,r)... method port (line 1) | port(t){this._debug("port %d",t);const e=new Uint8Array(w);new DataVie... method suggest (line 1) | suggest(t){if(!this.hasFast)throw Error("fast extension is disabled");... method haveAll (line 1) | haveAll(){if(!this.hasFast)throw Error("fast extension is disabled");t... method haveNone (line 1) | haveNone(){if(!this.hasFast)throw Error("fast extension is disabled");... method reject (line 1) | reject(t,e,r){if(!this.hasFast)throw Error("fast extension is disabled... method allowedFast (line 1) | allowedFast(t){if(!this.hasFast)throw Error("fast extension is disable... method extended (line 1) | extended(t,e){if(this._debug("extended ext=%s",t),"string"==typeof t&&... method setEncrypt (line 1) | async setEncrypt(t,e){if(!this.type.startsWith("tcp"))return!1;const r... method _message (line 1) | _message(t,e,r){const i=r?r.length:0,n=new Uint8Array(5+4*e.length);I(... method _push (line 1) | _push(t){if(!this._finished)return 2===this._encryptionMethod&&this._c... method _onKeepAlive (line 1) | _onKeepAlive(){this._debug("got keep-alive"),this.emit("keep-alive")} method _onPe1 (line 1) | _onPe1(t){this._peerPubKey=(0,u.V5)(t),this._sharedSecret=this._dh.com... method _onPe2 (line 1) | _onPe2(t){this._peerPubKey=(0,u.V5)(t),this._sharedSecret=this._dh.com... method _onPe3 (line 1) | async _onPe3(t){const e=await(0,u.tW)((0,u.fk)(this._utfToHex("req3")+... method _onPe3Encrypted (line 1) | _onPe3Encrypted(t,e){if(!(0,u.LC)(t,S))return this._debug("Error: veri... method _onPe4 (line 1) | _onPe4(t){this._encryptionMethod=t[3],k.includes(this._encryptionMetho... method _onHandshake (line 1) | _onHandshake(t,e,r){const i=(0,u.V5)(t),n=(0,u.V5)(e);this._debug("got... method _onChoke (line 1) | _onChoke(){if(this.peerChoking=!0,this._debug("got choke"),this.emit("... method _onUnchoke (line 1) | _onUnchoke(){this.peerChoking=!1,this._debug("got unchoke"),this.emit(... method _onInterested (line 1) | _onInterested(){this.peerInterested=!0,this._debug("got interested"),t... method _onUninterested (line 1) | _onUninterested(){this.peerInterested=!1,this._debug("got uninterested... method _onHave (line 1) | _onHave(t){this.peerPieces.get(t)||(this._debug("got have %d",t),this.... method _onBitField (line 1) | _onBitField(t){this.peerPieces=new n.A(t),this._debug("got bitfield"),... method _onRequest (line 1) | _onRequest(t,e,r){if(this.amChoking&&(!this.hasFast||!this.allowedFast... method _onPiece (line 1) | _onPiece(t,e,r){this._debug("got piece index=%d offset=%d",t,e),this._... method _onCancel (line 1) | _onCancel(t,e,r){this._debug("got cancel index=%d offset=%d length=%d"... method _onPort (line 1) | _onPort(t){this._debug("got port %d",t),this.emit("port",t)} method _onSuggest (line 1) | _onSuggest(t){if(!this.hasFast)return this._debug("Error: got suggest ... method _onHaveAll (line 1) | _onHaveAll(){if(!this.hasFast)return this._debug("Error: got have-all ... method _onHaveNone (line 1) | _onHaveNone(){if(!this.hasFast)return this._debug("Error: got have-non... method _onReject (line 1) | _onReject(t,e,r){if(!this.hasFast)return this._debug("Error: got rejec... method _onAllowedFast (line 1) | _onAllowedFast(t){if(!this.hasFast)return this._debug("Error: got allo... method _onExtended (line 1) | _onExtended(t,e){if(0===t){let t;try{t=i.A.decode(e)}catch(t){this._de... method _onTimeout (line 1) | _onTimeout(){this._debug("request timed out"),this._callback(this.requ... method _write (line 1) | _write(t,e){if(2===this._encryptionMethod&&this._cryptoHandshakeDone&&... method _callback (line 1) | _callback(t,e,r){t&&(this._resetTimeout(!this.peerChoking&&!this._fini... method _resetTimeout (line 1) | _resetTimeout(t){if(!t||!this._timeoutMs||!this.requests.length)return... method _parse (line 1) | _parse(t,e){this._parserSize=t,this._parser=e} method _parseUntil (line 1) | _parseUntil(t,e){this._cryptoSyncPattern=t,this._waitMaxBytes=e} method _onMessageLength (line 1) | _onMessageLength(t){const e=A(t);e>0?this._parse(e,this._onMessage):(t... method _onMessage (line 1) | _onMessage(t){switch(this._parse(4,this._onMessageLength),t[0]){case 0... method _determineHandshakeType (line 1) | _determineHandshakeType(){this._parse(1,t=>{const e=t[0];19===e?this._... method _parsePe1 (line 1) | _parsePe1(t){this._parse(95,e=>{this._onPe1((0,u.xW)([t,e])),this._par... method _parsePe2 (line 1) | _parsePe2(){this._parse(96,async t=>{this._onPe2(t),this._setGenerator... method _parsePe3 (line 1) | async _parsePe3(){const t=await(0,u.tW)((0,u.fk)(this._utfToHex("req1"... method _parsePe3Encrypted (line 1) | _parsePe3Encrypted(){this._parse(14,t=>{const e=this._decryptHandshake... method _parsePe4 (line 1) | _parsePe4(){const t=this._decryptHandshake(S);this._parseUntil(t,512),... method _parseHandshake (line 1) | _parseHandshake(){this._parse(1,t=>{const e=t[0];if(19!==e)return this... method _onHandshakeBuffer (line 1) | _onHandshakeBuffer(t){const e=t.slice(0,19);if("BitTorrent protocol"!=... method _onFinish (line 1) | _onFinish(){for(this._finished=!0,this.push(null);this.read(););for(cl... method _debug (line 1) | _debug(...t){t[0]=`[${this._debugId}] ${t[0]}`,c(...t)} method _pull (line 1) | _pull(t,e,r,i){for(let n=0;nt.length)throw new RangeError("Index out ... function j (line 1) | function j(t,e,r,i,s){return e=+e,r>>>=0,s||N(t,0,r,4),n.write(t,e,r,i,2... function U (line 1) | function U(t,e,r,i,s){return e=+e,r>>>=0,s||N(t,0,r,8),n.write(t,e,r,i,5... function D (line 1) | function D(t,e,r){q[t]=class extends r{constructor(){super(),Object.defi... function H (line 1) | function H(t){let e="",r=t.length;const i="-"===t[0]?1:0;for(;r>=i+4;r-=... function F (line 1) | function F(t,e,r,i,n,s){if(t>r||t{i... method _checkNodes (line 1) | _checkNodes(t,e,r){const i=this;!function t(n){let s=null;for(;n.lengt... method addNode (line 1) | addNode(t){const e=this;if(t.id){t.id=tt(t.id);const e=!!this._rpc.nod... method removeNode (line 1) | removeNode(t){this._rpc.nodes.remove(tt(t))} method _sendPing (line 1) | _sendPing(t,e){const r=this,i=t.id;this._rpc.query(t,{q:"ping"},(t,n,s... method toJSON (line 1) | toJSON(){const t=this,e={};return Object.keys(this._values.cache).forE... method put (line 1) | put(t,e){(z.isBuffer(t)||"string"==typeof t)&&(t={v:t});const r=!!t.k;... method _put (line 1) | _put(t,e){e||(e=Z);const r=!!t.k,i="string"==typeof t.v?z.from(t.v):t.... method _preput (line 1) | _preput(t,e,r){const i=this;return this._closest(t,{q:"get",a:{id:this... method get (line 1) | get(t,e,r){t=tt(t),"function"==typeof e&&(r=e,e=null),e||(e={});const ... method announce (line 1) | announce(t,e,r){if("function"==typeof e)return this.announce(t,0,e);t=... method _preannounce (line 1) | _preannounce(t,e,r){const i=this;this.lookup(t,n=>i.destroyed?r(new Er... method lookup (line 1) | lookup(t,e){t=tt(t),e||(e=Z);const r=this;let i=!1;function n(e,i){e||... method address (line 1) | address(){return this._rpc.address()} method listen (line 1) | listen(...t){this._rpc.bind(...t)} method destroy (line 1) | destroy(t){if(this.destroyed)return void(t&&W.nextTick(t));this.destro... method _onquery (line 1) | _onquery(t,e){if(void 0===t.q||null===t.q)return;const r=t.q.toString(... method _onfindnode (line 1) | _onfindnode(t,e){const r=t.a.target;if(!r)return this._rpc.error(e,t,[... method _ongetpeers (line 1) | _ongetpeers(t,e){const r=e.address||e.host,i=t.a.info_hash;if(!i)retur... method _onannouncepeer (line 1) | _onannouncepeer(t,e){const r=e.address||e.host,i=t.a.implied_port?e.po... method _addPeer (line 1) | _addPeer(t,e,r){this._peers.add(e.toString("hex"),function(t,e){const ... method _onget (line 1) | _onget(t,e){const r=e.address||e.host,i=t.a.target;if(!i)return;const ... method _onput (line 1) | _onput(t,e){const r=e.address||e.host,i=t.a;if(!i)return;const n=t.a.v... method _bootstrap (line 1) | _bootstrap(t){const e=this;if(!t)return W.nextTick(r);function r(){e.r... method _closest (line 1) | _closest(t,e,r,i){const n=this,s=new N({localNodeId:t,numberOfNodesPer... method _debug (line 1) | _debug(){if(!$.enabled)return;const t=[].slice.call(arguments);t[0]=`[... method _validateToken (line 1) | _validateToken(t,e){const r=this._generateToken(t,this._secrets[0]),i=... method _generateToken (line 1) | _generateToken(t,e){return e||(e=this._secrets[0]),this._hash(z.concat... method _rotateSecrets (line 1) | _rotateSecrets(){this._secrets?(this._secrets[1]=this._secrets[0],this... function Z (line 1) | function Z(t,e,r,i){let n;for(n=0;n=e.length||n>=t.length);++n... function G (line 1) | function G(t,e){return t instanceof e||null!=t&&null!=t.constructor&&nul... function Y (line 1) | function Y(t){return t!=t} function X (line 1) | function X(t){return"undefined"==typeof BigInt?Q:t} function Q (line 1) | function Q(){throw new Error("BigInt not supported")} function n (line 1) | function n(){i.call(this)} method length (line 1) | get length(){return this.buffer.length<<3} method constructor (line 1) | constructor(t=0,e){const r=null==e?void 0:e.grow;this.grow=r?Number.is... method get (line 1) | get(t){const e=t>>3;return e>3;if(e){if(r>=this.buffer.length){const t=Math.... method setAll (line 1) | setAll(t,e=0){const r=Math.min(i(e+t.length),this.grow);if(this.buffer... method forEach (line 1) | forEach(t,e=0,r=8*this.buffer.length){let i=e>>3,n=128>>e%8;for(let s=... method isEmpty (line 1) | isEmpty(){for(let t=0;t>3;return e>3;if(e){if(r>=this.buffer.length){const t=Math.... method setAll (line 1) | setAll(t,e=0){const r=Math.min(i(e+t.length),this.grow);if(this.buffer... method forEach (line 1) | forEach(t,e=0,r=8*this.buffer.length){let i=e>>3,n=128>>e%8;for(let s=... method isEmpty (line 1) | isEmpty(){for(let t=0;te.vectorClock?t:e} method distance (line 1) | static distance(t,e){let r=0,i=0;const n=Math.min(t.length,e.length),s... method add (line 1) | add(t){o("contact.id",(t||{}).id);let e=0,r=this.root;for(;null===r.co... method closest (line 1) | closest(t,e=1/0){if(o("id",t),!Number.isInteger(e)&&e!==1/0||e<=0)thro... method count (line 1) | count(){let t=0;for(const e=[this.root];e.length>0;){const r=e.pop();n... method _determineNode (line 1) | _determineNode(t,e,r){const i=r>>3,n=r%8;if(e.length<=i&&0!==n)return ... method get (line 1) | get(t){o("id",t);let e=0,r=this.root;for(;null===r.contacts;)r=this._d... method _indexOf (line 1) | _indexOf(t,e){for(let r=0;r0;){const r=e.pop(... method toIterable (line 1) | *toIterable(){for(const t=[this.root];t.length>0;){const e=t.pop();nul... method _update (line 1) | _update(t,e,r){if(!s(t.contacts[e].id,r.id))throw new Error("wrong ind... function h (line 1) | function h(){o||(o=!0,"function"==typeof t.destroy&&t.destroy())} function u (line 1) | function u(t){if(f(),0===i.listenerCount(this,"error"))throw t} function f (line 1) | function f(){r.removeListener("data",n),t.removeListener("drain",s),r.re... function s (line 1) | function s(t,e){for(var r in t)e[r]=t[r]} function o (line 1) | function o(t,e,r){return n(t,e,r)} function S (line 1) | function S(){if(!M){var t=new Date;M=t.toUTCString(),o.enroll(S,1e3-t.ge... function k (line 1) | function k(){s.call(this),this.output=[],this.outputEncodings=[],this.ou... function E (line 1) | function E(t,e,r,i){if(!f._checkIsHttpToken(r))throw new TypeError('Head... function x (line 1) | function x(t,e,r){t.emit("error",e),r&&r(e)} function A (line 1) | function A(t){t.uncork()} function I (line 1) | function I(t){return/[\r\n]/.test(t)?t.replace(/[\r\n]+[ \t]*/g,""):t} function s (line 1) | function s(t){if(!(this instanceof s))return new s(t);"number"==typeof t... function i (line 1) | function i(t,e){if(!t)throw new Error(e||"Assertion failed")} function n (line 1) | function n(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.... method length (line 1) | get length(){return this.buffer.length<<3} method constructor (line 1) | constructor(t=0,e){const r=null==e?void 0:e.grow;this.grow=r?Number.is... method get (line 1) | get(t){const e=t>>3;return e>3;if(e){if(r>=this.buffer.length){const t=Math.... method setAll (line 1) | setAll(t,e=0){const r=Math.min(i(e+t.length),this.grow);if(this.buffer... method forEach (line 1) | forEach(t,e=0,r=8*this.buffer.length){let i=e>>3,n=128>>e%8;for(let s=... method isEmpty (line 1) | isEmpty(){for(let t=0;t=65&&r<=70?r-55:r>=97&&r<... method constructor (line 1) | constructor(t={}){super(),this.localNodeId=t.localNodeId||i(20),this.n... method arbiter (line 1) | static arbiter(t,e){return t.vectorClock>e.vectorClock?t:e} method distance (line 1) | static distance(t,e){let r=0,i=0;const n=Math.min(t.length,e.length),s... method add (line 1) | add(t){o("contact.id",(t||{}).id);let e=0,r=this.root;for(;null===r.co... method closest (line 1) | closest(t,e=1/0){if(o("id",t),!Number.isInteger(e)&&e!==1/0||e<=0)thro... method count (line 1) | count(){let t=0;for(const e=[this.root];e.length>0;){const r=e.pop();n... method _determineNode (line 1) | _determineNode(t,e,r){const i=r>>3,n=r%8;if(e.length<=i&&0!==n)return ... method get (line 1) | get(t){o("id",t);let e=0,r=this.root;for(;null===r.contacts;)r=this._d... method _indexOf (line 1) | _indexOf(t,e){for(let r=0;r0;){const r=e.pop(... method toIterable (line 1) | *toIterable(){for(const t=[this.root];t.length>0;){const e=t.pop();nul... method _update (line 1) | _update(t,e,r){if(!s(t.contacts[e].id,r.id))throw new Error("wrong ind... function h (line 1) | function h(t,e,r){var i=a(t,r);return r-1>=e&&(i|=a(t,r-1)<<4),i} function u (line 1) | function u(t,e,r,i){for(var n=0,s=Math.min(t.length,r),o=e;o-1&&this.throttle... function o (line 1) | function o(t,e){if(t instanceof o)return t;this._importDER(t,e)||(s(t.r&... function a (line 1) | function a(){this.place=0} method constructor (line 1) | constructor(t={}){super(),this.localNodeId=t.localNodeId||i(20),this.n... method arbiter (line 1) | static arbiter(t,e){return t.vectorClock>e.vectorClock?t:e} method distance (line 1) | static distance(t,e){let r=0,i=0;const n=Math.min(t.length,e.length),s... method add (line 1) | add(t){o("contact.id",(t||{}).id);let e=0,r=this.root;for(;null===r.co... method closest (line 1) | closest(t,e=1/0){if(o("id",t),!Number.isInteger(e)&&e!==1/0||e<=0)thro... method count (line 1) | count(){let t=0;for(const e=[this.root];e.length>0;){const r=e.pop();n... method _determineNode (line 1) | _determineNode(t,e,r){const i=r>>3,n=r%8;if(e.length<=i&&0!==n)return ... method get (line 1) | get(t){o("id",t);let e=0,r=this.root;for(;null===r.contacts;)r=this._d... method _indexOf (line 1) | _indexOf(t,e){for(let r=0;r0;){const r=e.pop(... method toIterable (line 1) | *toIterable(){for(const t=[this.root];t.length>0;){const e=t.pop();nul... method _update (line 1) | _update(t,e,r){if(!s(t.contacts[e].id,r.id))throw new Error("wrong ind... function h (line 1) | function h(t,e){var r=t[e.place++];if(!(128&r))return r;var i=15&r;if(0=... function u (line 1) | function u(t){for(var e=0,r=t.length-1;!t[e]&&!(128&t[e+1])&&e>>... function f (line 1) | function f(t){if(o("ed25519"===t,"only tested with ed25519 so far"),!(th... function e (line 1) | function e(){this._types=Object.create(null),this._extensions=Object.cre... method constructor (line 1) | constructor(e){super(),this._wire=e,this._fetching=!1,this._metadataCo... method onHandshake (line 1) | onHandshake(t,e,r){this._infoHash=t} method onExtendedHandshake (line 1) | onExtendedHandshake(t){return t.m&&t.m.ut_metadata?t.metadata_size?"nu... method onMessage (line 1) | onMessage(t){let e,r;try{const i=(0,w.dU)(t),n=i.indexOf("ee")+2;e=f.A... method fetch (line 1) | fetch(){this._metadataComplete||(this._fetching=!0,this._metadataSize&... method cancel (line 1) | cancel(){this._fetching=!1} method setMetadata (line 1) | async setMetadata(t){if(this._metadataComplete)return!0;Qe("set metada... method _send (line 1) | _send(t,e){let r=f.A.encode(t);ArrayBuffer.isView(e)&&(r=(0,w.xW)([r,e... method _request (line 1) | _request(t){this._send({msg_type:0,piece:t})} method _data (line 1) | _data(t,e,r){const i={msg_type:1,piece:t};"number"==typeof r&&(i.total... method _reject (line 1) | _reject(t){this._send({msg_type:2,piece:t})} method _onRequest (line 1) | _onRequest(t){if(!this._metadataComplete)return void this._reject(t);c... method _onData (line 1) | _onData(t,e,r){e.length>tr||!this._fetching||(this.metadata.set(e,t*tr... method _onReject (line 1) | _onReject(t){this._remainingRejects>0&&this._fetching?(this._request(t... method _requestPieces (line 1) | _requestPieces(){if(this._fetching){this.metadata=new Uint8Array(this.... method _checkDone (line 1) | async _checkDone(){let t=!0;for(let e=0;etr||!this._fetching||(this.metadata.set(e,t*tr... method _onReject (line 1) | _onReject(t){this._remainingRejects>0&&this._fetching?(this._request(t... method _requestPieces (line 1) | _requestPieces(){if(this._fetching){this.metadata=new Uint8Array(this.... method _checkDone (line 1) | async _checkDone(){let t=!0;for(let e=0;ee.vectorClock?t:e} method distance (line 1) | static distance(t,e){let r=0,i=0;const n=Math.min(t.length,e.length),s... method add (line 1) | add(t){o("contact.id",(t||{}).id);let e=0,r=this.root;for(;null===r.co... method closest (line 1) | closest(t,e=1/0){if(o("id",t),!Number.isInteger(e)&&e!==1/0||e<=0)thro... method count (line 1) | count(){let t=0;for(const e=[this.root];e.length>0;){const r=e.pop();n... method _determineNode (line 1) | _determineNode(t,e,r){const i=r>>3,n=r%8;if(e.length<=i&&0!==n)return ... method get (line 1) | get(t){o("id",t);let e=0,r=this.root;for(;null===r.contacts;)r=this._d... method _indexOf (line 1) | _indexOf(t,e){for(let r=0;r0;){const r=e.pop(... method toIterable (line 1) | *toIterable(){for(const t=[this.root];t.length>0;){const e=t.pop();nul... method _update (line 1) | _update(t,e,r){if(!s(t.contacts[e].id,r.id))throw new Error("wrong ind... function h (line 1) | function h(t){return parseInt(t,16)} function s (line 1) | function s(t,e,r){const n=[];let o=null;return s._encode(n,t),o=i.concat... function h (line 1) | function h(t){if(!(this instanceof h))return new h(t);o.call(this);var e... function u (line 1) | function u(t,s){if(!o){if(o=!0,t)return r(t);i.sockets[n]||(i.sockets[n]... method constructor (line 1) | constructor(t={}){if(super(),"object"!=typeof t)throw new Error("Options... method getEnabled (line 1) | getEnabled(){return this._enabled} method getGroup (line 1) | getGroup(){return this._group} method _setEnabled (line 1) | _setEnabled(t=!0){if("boolean"!=typeof t)throw new Error("Enabled must b... method setEnabled (line 1) | setEnabled(t){this._setEnabled(t),this._enabled?this._emitter.emit("enab... method _transform (line 1) | _transform(t,e){this._processChunk(t,e)} method _waitForTokens (line 1) | async _waitForTokens(t){return new Promise((e,r)=>{let i=!1;const n=this... method _areBothEnabled (line 1) | _areBothEnabled(){return this._enabled&&this._group.getEnabled()} method _processChunk (line 1) | async _processChunk(t,e){if(!this._areBothEnabled())return e(null,t);let... method destroy (line 1) | destroy(...t){this._group._removeThrottle(this),this._destroyed=!0,this.... function n (line 1) | function n(){this.protocol=null,this.slashes=null,this.auth=null,this.ho... method length (line 1) | get length(){return this.buffer.length<<3} method constructor (line 1) | constructor(t=0,e){const r=null==e?void 0:e.grow;this.grow=r?Number.is... method get (line 1) | get(t){const e=t>>3;return e>3;if(e){if(r>=this.buffer.length){const t=Math.... method setAll (line 1) | setAll(t,e=0){const r=Math.min(i(e+t.length),this.grow);if(this.buffer... method forEach (line 1) | forEach(t,e=0,r=8*this.buffer.length){let i=e>>3,n=128>>e%8;for(let s=... method isEmpty (line 1) | isEmpty(){for(let t=0;t-1e3&&t<1e3||M.call(/e/... function D (line 1) | function D(t,e,r){var i=r.quoteStyle||e,n=U[i];return n+t+n} function H (line 1) | function H(t){return v.call(String(t),/"/g,""")} function F (line 1) | function F(t){return!P||!("object"==typeof t&&(P in t||void 0!==t[P]))} function z (line 1) | function z(t){return"[object Array]"===Z(t)&&F(t)} function W (line 1) | function W(t){return"[object RegExp]"===Z(t)&&F(t)} function $ (line 1) | function $(t){if(C)return t&&"object"==typeof t&&t instanceof Symbol;if(... function N (line 1) | function N(e,r,s){if(r&&(n=E.call(n)).push(r),s){var o={depth:a.depth};r... function K (line 1) | function K(t,e){return V.call(t,e)} method constructor (line 1) | constructor(t={}){super(),this._tables=new q({maxAge:V,max:t.maxTables... method _setBucketCheckInterval (line 1) | _setBucketCheckInterval(){const t=this;function e(){if(Date.now()-t._r... method _pingAll (line 1) | _pingAll(t){this._checkAndRemoveNodes(this.nodes.toArray(),t)} method removeBucketCheckInterval (line 1) | removeBucketCheckInterval(){this._runningBucketCheck=!1,clearTimeout(t... method updateBucketTimestamp (line 1) | updateBucketTimestamp(){this._rpc.nodes.metadata.lastChange=Date.now()} method _checkAndRemoveNodes (line 1) | _checkAndRemoveNodes(t,e){const r=this;this._checkNodes(t,!0,(t,i)=>{i... method _checkNodes (line 1) | _checkNodes(t,e,r){const i=this;!function t(n){let s=null;for(;n.lengt... method addNode (line 1) | addNode(t){const e=this;if(t.id){t.id=tt(t.id);const e=!!this._rpc.nod... method removeNode (line 1) | removeNode(t){this._rpc.nodes.remove(tt(t))} method _sendPing (line 1) | _sendPing(t,e){const r=this,i=t.id;this._rpc.query(t,{q:"ping"},(t,n,s... method toJSON (line 1) | toJSON(){const t=this,e={};return Object.keys(this._values.cache).forE... method put (line 1) | put(t,e){(z.isBuffer(t)||"string"==typeof t)&&(t={v:t});const r=!!t.k;... method _put (line 1) | _put(t,e){e||(e=Z);const r=!!t.k,i="string"==typeof t.v?z.from(t.v):t.... method _preput (line 1) | _preput(t,e,r){const i=this;return this._closest(t,{q:"get",a:{id:this... method get (line 1) | get(t,e,r){t=tt(t),"function"==typeof e&&(r=e,e=null),e||(e={});const ... method announce (line 1) | announce(t,e,r){if("function"==typeof e)return this.announce(t,0,e);t=... method _preannounce (line 1) | _preannounce(t,e,r){const i=this;this.lookup(t,n=>i.destroyed?r(new Er... method lookup (line 1) | lookup(t,e){t=tt(t),e||(e=Z);const r=this;let i=!1;function n(e,i){e||... method address (line 1) | address(){return this._rpc.address()} method listen (line 1) | listen(...t){this._rpc.bind(...t)} method destroy (line 1) | destroy(t){if(this.destroyed)return void(t&&W.nextTick(t));this.destro... method _onquery (line 1) | _onquery(t,e){if(void 0===t.q||null===t.q)return;const r=t.q.toString(... method _onfindnode (line 1) | _onfindnode(t,e){const r=t.a.target;if(!r)return this._rpc.error(e,t,[... method _ongetpeers (line 1) | _ongetpeers(t,e){const r=e.address||e.host,i=t.a.info_hash;if(!i)retur... method _onannouncepeer (line 1) | _onannouncepeer(t,e){const r=e.address||e.host,i=t.a.implied_port?e.po... method _addPeer (line 1) | _addPeer(t,e,r){this._peers.add(e.toString("hex"),function(t,e){const ... method _onget (line 1) | _onget(t,e){const r=e.address||e.host,i=t.a.target;if(!i)return;const ... method _onput (line 1) | _onput(t,e){const r=e.address||e.host,i=t.a;if(!i)return;const n=t.a.v... method _bootstrap (line 1) | _bootstrap(t){const e=this;if(!t)return W.nextTick(r);function r(){e.r... method _closest (line 1) | _closest(t,e,r,i){const n=this,s=new N({localNodeId:t,numberOfNodesPer... method _debug (line 1) | _debug(){if(!$.enabled)return;const t=[].slice.call(arguments);t[0]=`[... method _validateToken (line 1) | _validateToken(t,e){const r=this._generateToken(t,this._secrets[0]),i=... method _generateToken (line 1) | _generateToken(t,e){return e||(e=this._secrets[0]),this._hash(z.concat... method _rotateSecrets (line 1) | _rotateSecrets(){this._secrets?(this._secrets[1]=this._secrets[0],this... function Z (line 1) | function Z(t){return m.call(t)} function G (line 1) | function G(t,e){if(t.indexOf)return t.indexOf(e);for(var r=0,i=t.length;... function Y (line 1) | function Y(t,e){if(t.length>e.maxStringLength){var r=t.length-e.maxStrin... function J (line 1) | function J(t){var e=t.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}... function X (line 1) | function X(t){return"Object("+t+")"} function Q (line 1) | function Q(t){return t+" { ? }"} function tt (line 1) | function tt(t,e,r,i){return t+" ("+e+") {"+(i?et(r,i):k.call(r,", "))+"}"} method constructor (line 1) | constructor(t,{highWaterMark:e=16384,map:r=null,mapWritable:i,byteLeng... method ended (line 1) | get ended(){return 0!==(this.stream._duplexState&B)} method push (line 1) | push(t){return!(142606350&this.stream._duplexState)&&(null!==this.map&... method shift (line 1) | shift(){const t=this.queue.shift();return this.buffered-=this.byteLeng... method end (line 1) | end(t){"function"==typeof t?this.stream.once("finish",t):null!=t&&this... method autoBatch (line 1) | autoBatch(t,e){const r=[],i=this.stream;for(r.push(t);(i._duplexState&... method update (line 1) | update(){const t=this.stream;t._duplexState|=C;do{for(;(t._duplexState... method updateNonPrimary (line 1) | updateNonPrimary(){const t=this.stream;if((144965647&t._duplexState)==... method continueUpdate (line 1) | continueUpdate(){return 0!==(this.stream._duplexState&N)&&(this.stream... method updateCallback (line 1) | updateCallback(){(35127311&this.stream._duplexState)===P?this.update()... method updateNextTick (line 1) | updateNextTick(){0===(this.stream._duplexState&N)&&(this.stream._duple... function et (line 1) | function et(t,e){if(0===t.length)return"";var r="\n"+e.prev+e.base;retur... method constructor (line 1) | constructor(t,{highWaterMark:e=16384,map:r=null,mapReadable:i,byteLeng... method ended (line 1) | get ended(){return 0!==(this.stream._duplexState&w)} method pipe (line 1) | pipe(t,e){if(null!==this.pipeTo)throw new Error("Can only pipe to one ... method push (line 1) | push(t){const e=this.stream;return null===t?(this.highWaterMark=0,e._d... method shift (line 1) | shift(){const t=this.queue.shift();return this.buffered-=this.byteLeng... method unshift (line 1) | unshift(t){const e=[null!==this.map?this.map(t):t];for(;this.buffered>... method read (line 1) | read(){const t=this.stream;if((16527&t._duplexState)===p){const e=this... method drain (line 1) | drain(){const t=this.stream;for(;(16527&t._duplexState)===p&&768&t._du... method update (line 1) | update(){const t=this.stream;t._duplexState|=c;do{for(this.drain();thi... method updateNonPrimary (line 1) | updateNonPrimary(){const t=this.stream;(1167&t._duplexState)===g&&(t._... method continueUpdate (line 1) | continueUpdate(){return 0!==(this.stream._duplexState&_)&&(this.stream... method updateCallback (line 1) | updateCallback(){(32879&this.stream._duplexState)===d?this.update():th... method updateNextTickIfOpen (line 1) | updateNextTickIfOpen(){32769&this.stream._duplexState||(this.stream._d... method updateNextTick (line 1) | updateNextTick(){0===(this.stream._duplexState&_)&&(this.stream._duple... function rt (line 1) | function rt(t,e){var r=z(t),i=[];if(r){i.length=t.length;for(var n=0;n=0&&t} function _ (line 1) | function _(t){return"string"==typeof t&&!1===w(t)} function M (line 1) | function M(t){return!("number"!=typeof t&&"string"!=typeof t||"string"==... function S (line 1) | function S(){chrome.runtime.lastError} function k (line 1) | function k(t){return()=>{var e;chrome.runtime.lastError&&(console.error(... function E (line 1) | function E(t,e){t.emit("error",e)} function A (line 1) | function A(t,e,r){var i=x[t]||"UNKNOWN",n=e+" "+t+" "+r;chrome.runtime.l... function I (line 1) | function I(t,e,r,i,n){var s;s=i&&i>0?r+":"+i:r,n&&(s+=" - Local ("+n+")"... function h (line 1) | function h(t){o.call(this,"short",t),this.a=new n(t.a,16).toRed(this.red... function u (line 1) | function u(t,e,r,i){o.BasePoint.call(this,t,"affine"),null===e&&null===r... function f (line 1) | function f(t,e,r,i){o.BasePoint.call(this,t,"jacobian"),null===e&&null==... function n (line 1) | function n(e){return t.point(e[0],e[1],r)} method length (line 1) | get length(){return this.buffer.length<<3} method constructor (line 1) | constructor(t=0,e){const r=null==e?void 0:e.grow;this.grow=r?Number.is... method get (line 1) | get(t){const e=t>>3;return e>3;if(e){if(r>=this.buffer.length){const t=Math.... method setAll (line 1) | setAll(t,e=0){const r=Math.min(i(e+t.length),this.grow);if(this.buffer... method forEach (line 1) | forEach(t,e=0,r=8*this.buffer.length){let i=e>>3,n=128>>e%8;for(let s=... method isEmpty (line 1) | isEmpty(){for(let t=0;t>3;return e>3;if(e){if(r>=this.buffer.length){const t=Math.... method setAll (line 1) | setAll(t,e=0){const r=Math.min(i(e+t.length),this.grow);if(this.buffer... method forEach (line 1) | forEach(t,e=0,r=8*this.buffer.length){let i=e>>3,n=128>>e%8;for(let s=... method isEmpty (line 1) | isEmpty(){for(let t=0;t>3;return e>3;if(e){if(r>=this.buffer.length){const t=Math.... method setAll (line 1) | setAll(t,e=0){const r=Math.min(i(e+t.length),this.grow);if(this.buffer... method forEach (line 1) | forEach(t,e=0,r=8*this.buffer.length){let i=e>>3,n=128>>e%8;for(let s=... method isEmpty (line 1) | isEmpty(){for(let t=0;t=48&&r<=57?r-48:r>=65&&r<... method constructor (line 1) | constructor(t={}){super(),this.localNodeId=t.localNodeId||i(20),this.n... method arbiter (line 1) | static arbiter(t,e){return t.vectorClock>e.vectorClock?t:e} method distance (line 1) | static distance(t,e){let r=0,i=0;const n=Math.min(t.length,e.length),s... method add (line 1) | add(t){o("contact.id",(t||{}).id);let e=0,r=this.root;for(;null===r.co... method closest (line 1) | closest(t,e=1/0){if(o("id",t),!Number.isInteger(e)&&e!==1/0||e<=0)thro... method count (line 1) | count(){let t=0;for(const e=[this.root];e.length>0;){const r=e.pop();n... method _determineNode (line 1) | _determineNode(t,e,r){const i=r>>3,n=r%8;if(e.length<=i&&0!==n)return ... method get (line 1) | get(t){o("id",t);let e=0,r=this.root;for(;null===r.contacts;)r=this._d... method _indexOf (line 1) | _indexOf(t,e){for(let r=0;r0;){const r=e.pop(... method toIterable (line 1) | *toIterable(){for(const t=[this.root];t.length>0;){const e=t.pop();nul... method _update (line 1) | _update(t,e,r){if(!s(t.contacts[e].id,r.id))throw new Error("wrong ind... function h (line 1) | function h(t,e,r){var i=a(t,r);return r-1>=e&&(i|=a(t,r-1)<<4),i} function u (line 1) | function u(t,e,r,n){for(var s=0,o=0,a=Math.min(t.length,r),h=e;h"} function m (line 1) | function m(t,e,r){r.negative=e.negative^t.negative;var i=t.length+e.leng... function y (line 1) | function y(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.l... function b (line 1) | function b(t,e,r){return y(t,e,r)} function v (line 1) | function v(t,e){this.x=t,this.y=e} function _ (line 1) | function _(t,e){this.name=t,this.p=new s(e,16),this.n=this.p.bitLength()... function M (line 1) | function M(){_.call(this,"k256","ffffffff ffffffff ffffffff ffffffff fff... function S (line 1) | function S(){_.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 000... function k (line 1) | function k(){_.call(this,"p192","ffffffff ffffffff ffffffff fffffffe fff... function E (line 1) | function E(){_.call(this,"25519","7fffffffffffffff ffffffffffffffff ffff... function x (line 1) | function x(t){if("string"==typeof t){var e=s._prime(t);this.m=e.p,this.p... function A (line 1) | function A(t){x.call(this,t),this.shift=this.m.bitLength(),this.shift%26... function p (line 1) | function p(t){throw new RangeError(l[t])} function m (line 1) | function m(t,e){for(var r=t.length,i=[];r--;)i[r]=e(t[r]);return i} function g (line 1) | function g(t,e){var r=t.split("@"),i="";return r.length>1&&(i=r[0]+"@",t... method constructor (line 1) | constructor(t,e){super(),this.id=t,this.type=e,d("new %s Peer %s",e,t)... method onConnect (line 1) | onConnect(){if(this.destroyed)return;this.connected=!0,this.emit("conn... method sendPe1 (line 1) | sendPe1(){this.wire.sendPe1(),this.sentPe1=!0} method onPe1 (line 1) | onPe1(){this.sendPe2()} method sendPe2 (line 1) | sendPe2(){this.wire.sendPe2(),this.sentPe2=!0} method onPe2 (line 1) | onPe2(){this.sendPe3()} method sendPe3 (line 1) | sendPe3(){this.wire.sendPe3(this.swarm.infoHash),this.sentPe3=!0} method onPe3 (line 1) | onPe3(t){this.swarm&&(this.swarm.infoHashHash!==t&&this.destroy(new Er... method sendPe4 (line 1) | sendPe4(){this.wire.sendPe4(this.swarm.infoHash),this.sentPe4=!0} method onPe4 (line 1) | onPe4(){this.sentHandshake||this.handshake()} method clearPipes (line 1) | clearPipes(){this.conn.unpipe(),this.wire.unpipe()} method setThrottlePipes (line 1) | setThrottlePipes(){const t=this;(0,n.pipeline)(this.conn,this.throttle... method onHandshake (line 1) | onHandshake(t,e){if(!this.swarm)return;if(this.destroyed)return;if(thi... method handshake (line 1) | handshake(){const t={dht:!this.swarm.private&&!!this.swarm.client.dht,... method startConnectTimeout (line 1) | startConnectTimeout(){clearTimeout(this.connectTimeout);const t={webrt... method startHandshakeTimeout (line 1) | startHandshakeTimeout(){clearTimeout(this.handshakeTimeout),this.hands... method destroy (line 1) | destroy(t){if(this.destroyed)return;this.destroyed=!0,this.connected&&... function y (line 1) | function y(t){for(var e,r,i=[],n=0,s=t.length;n65535&&(e+=d((t-=... function v (line 1) | function v(t){return t-48<10?t-22:t-65<26?t-65:t-97<26?t-97:a} function w (line 1) | function w(t,e){return t+22+75*(t<26)-((0!=e)<<5)} function _ (line 1) | function _(t,e,r){var i=0;for(t=r?c(t/700):t>>1,t+=c(t/e);t>455;i+=a)t=c... function M (line 1) | function M(t){var e,r,i,n,s,h,u,f,l,d,m=[],g=t.length,y=0,w=128,M=72;for... function S (line 1) | function S(t){var e,r,i,n,s,h,u,f,l,m,g,b,v,M,S,k=[];for(b=(t=y(t)).leng... function s (line 1) | function s(t,e){if(t===e)return!0;if(t.length!==e.length)return!1;for(le... function o (line 1) | function o(t,e){if(!(e instanceof Uint8Array))throw new TypeError(t+" is... class a (line 1) | class a extends n{constructor(t={}){super(),this.localNodeId=t.localNode... method constructor (line 1) | constructor(t={}){super(),this.localNodeId=t.localNodeId||i(20),this.n... method arbiter (line 1) | static arbiter(t,e){return t.vectorClock>e.vectorClock?t:e} method distance (line 1) | static distance(t,e){let r=0,i=0;const n=Math.min(t.length,e.length),s... method add (line 1) | add(t){o("contact.id",(t||{}).id);let e=0,r=this.root;for(;null===r.co... method closest (line 1) | closest(t,e=1/0){if(o("id",t),!Number.isInteger(e)&&e!==1/0||e<=0)thro... method count (line 1) | count(){let t=0;for(const e=[this.root];e.length>0;){const r=e.pop();n... method _determineNode (line 1) | _determineNode(t,e,r){const i=r>>3,n=r%8;if(e.length<=i&&0!==n)return ... method get (line 1) | get(t){o("id",t);let e=0,r=this.root;for(;null===r.contacts;)r=this._d... method _indexOf (line 1) | _indexOf(t,e){for(let r=0;r0;){const r=e.pop(... method toIterable (line 1) | *toIterable(){for(const t=[this.root];t.length>0;){const e=t.pop();nul... method _update (line 1) | _update(t,e,r){if(!s(t.contacts[e].id,r.id))throw new Error("wrong ind... function r (line 1) | function r(i){var n=e[i];if(void 0!==n)return n.exports;var s=e[i]={id:i... function s (line 1) | function s(t){if("string"!=typeof t)throw new TypeError("Path must be a ... function o (line 1) | function o(t,e){let r,i="",n=0,s=-1,o=0;for(let a=0;a<=t.length;++a){if(... function a (line 1) | function a(t){if(s(t),0===t.length)return".";const e=47===t.charCodeAt(0... method constructor (line 1) | constructor(t={}){super(),this.localNodeId=t.localNodeId||i(20),this.n... method arbiter (line 1) | static arbiter(t,e){return t.vectorClock>e.vectorClock?t:e} method distance (line 1) | static distance(t,e){let r=0,i=0;const n=Math.min(t.length,e.length),s... method add (line 1) | add(t){o("contact.id",(t||{}).id);let e=0,r=this.root;for(;null===r.co... method closest (line 1) | closest(t,e=1/0){if(o("id",t),!Number.isInteger(e)&&e!==1/0||e<=0)thro... method count (line 1) | count(){let t=0;for(const e=[this.root];e.length>0;){const r=e.pop();n... method _determineNode (line 1) | _determineNode(t,e,r){const i=r>>3,n=r%8;if(e.length<=i&&0!==n)return ... method get (line 1) | get(t){o("id",t);let e=0,r=this.root;for(;null===r.contacts;)r=this._d... method _indexOf (line 1) | _indexOf(t,e){for(let r=0;r0;){const r=e.pop(... method toIterable (line 1) | *toIterable(){for(const t=[this.root];t.length>0;){const e=t.pop();nul... method _update (line 1) | _update(t,e,r){if(!s(t.contacts[e].id,r.id))throw new Error("wrong ind... function h (line 1) | function h(){if(0===arguments.length)return".";let t;for(let e=0;e{if(i)return r(i);n.isDirectory()?_.re... function E (line 1) | function E(t,e,r){k(t,x,(i,n)=>{if(i)return r(i);n=Array.isArray(n)?n.fl... function x (line 1) | function x(t,e){e=M(e),_.stat(t,(r,i)=>{if(r)return e(r);const n={length... function T (line 1) | function T(t,e,r){var i;if(i=t,"undefined"!=typeof FileList&&i instanceo... method constructor (line 1) | constructor(t,e,r,i){this.piece=t,this.offset=e,this.length=r,this.cal... function P (line 1) | function P(t,e){return t+e.length} method constructor (line 1) | constructor(t=null,e=0,r=!1){super(),this._debugId=(0,u.V5)((0,u.po)(4... method setKeepAlive (line 1) | setKeepAlive(t){this._debug("setKeepAlive %s",t),clearInterval(this._k... method setTimeout (line 1) | setTimeout(t,e){this._debug("setTimeout ms=%d unref=%s",t,e),this._tim... method destroy (line 1) | destroy(){if(!this.destroyed)return this._debug("destroy"),this.end(),... method end (line 1) | end(t){if(!this.destroyed&&!this.destroying)return this._debug("end"),... method use (line 1) | use(t){const e=t.prototype.name;if(!e)throw new Error('Extension class... method keepAlive (line 1) | keepAlive(){this._debug("keep-alive"),this._push(p)} method sendPe1 (line 1) | sendPe1(){if(this._peEnabled){const t=Math.floor(513*Math.random()),e=... method sendPe2 (line 1) | sendPe2(){const t=Math.floor(513*Math.random()),e=(0,u.po)(t);this._pu... method sendPe3 (line 1) | async sendPe3(t){await this.setEncrypt(this._sharedSecret,t);const e=a... method sendPe4 (line 1) | async sendPe4(t){await this.setEncrypt(this._sharedSecret,t);const e=n... method handshake (line 1) | handshake(t,e,r){let i,n;if("string"==typeof t?(t=t.toLowerCase(),i=(0... method _sendExtendedHandshake (line 1) | _sendExtendedHandshake(){const t=Object.assign({},this.extendedHandsha... method choke (line 1) | choke(){if(!this.amChoking)if(this.amChoking=!0,this._debug("choke"),t... method unchoke (line 1) | unchoke(){this.amChoking&&(this.amChoking=!1,this._debug("unchoke"),th... method interested (line 1) | interested(){this.amInterested||(this.amInterested=!0,this._debug("int... method uninterested (line 1) | uninterested(){this.amInterested&&(this.amInterested=!1,this._debug("u... method have (line 1) | have(t){this._debug("have %d",t),this._message(4,[t],null)} method bitfield (line 1) | bitfield(t){this._debug("bitfield"),ArrayBuffer.isView(t)||(t=t.buffer... method request (line 1) | request(t,e,r,i){return i||(i=()=>{}),this._finished?i(new Error("wire... method piece (line 1) | piece(t,e,r){this._debug("piece index=%d offset=%d",t,e),this._message... method cancel (line 1) | cancel(t,e,r){this._debug("cancel index=%d offset=%d length=%d",t,e,r)... method port (line 1) | port(t){this._debug("port %d",t);const e=new Uint8Array(w);new DataVie... method suggest (line 1) | suggest(t){if(!this.hasFast)throw Error("fast extension is disabled");... method haveAll (line 1) | haveAll(){if(!this.hasFast)throw Error("fast extension is disabled");t... method haveNone (line 1) | haveNone(){if(!this.hasFast)throw Error("fast extension is disabled");... method reject (line 1) | reject(t,e,r){if(!this.hasFast)throw Error("fast extension is disabled... method allowedFast (line 1) | allowedFast(t){if(!this.hasFast)throw Error("fast extension is disable... method extended (line 1) | extended(t,e){if(this._debug("extended ext=%s",t),"string"==typeof t&&... method setEncrypt (line 1) | async setEncrypt(t,e){if(!this.type.startsWith("tcp"))return!1;const r... method _message (line 1) | _message(t,e,r){const i=r?r.length:0,n=new Uint8Array(5+4*e.length);I(... method _push (line 1) | _push(t){if(!this._finished)return 2===this._encryptionMethod&&this._c... method _onKeepAlive (line 1) | _onKeepAlive(){this._debug("got keep-alive"),this.emit("keep-alive")} method _onPe1 (line 1) | _onPe1(t){this._peerPubKey=(0,u.V5)(t),this._sharedSecret=this._dh.com... method _onPe2 (line 1) | _onPe2(t){this._peerPubKey=(0,u.V5)(t),this._sharedSecret=this._dh.com... method _onPe3 (line 1) | async _onPe3(t){const e=await(0,u.tW)((0,u.fk)(this._utfToHex("req3")+... method _onPe3Encrypted (line 1) | _onPe3Encrypted(t,e){if(!(0,u.LC)(t,S))return this._debug("Error: veri... method _onPe4 (line 1) | _onPe4(t){this._encryptionMethod=t[3],k.includes(this._encryptionMetho... method _onHandshake (line 1) | _onHandshake(t,e,r){const i=(0,u.V5)(t),n=(0,u.V5)(e);this._debug("got... method _onChoke (line 1) | _onChoke(){if(this.peerChoking=!0,this._debug("got choke"),this.emit("... method _onUnchoke (line 1) | _onUnchoke(){this.peerChoking=!1,this._debug("got unchoke"),this.emit(... method _onInterested (line 1) | _onInterested(){this.peerInterested=!0,this._debug("got interested"),t... method _onUninterested (line 1) | _onUninterested(){this.peerInterested=!1,this._debug("got uninterested... method _onHave (line 1) | _onHave(t){this.peerPieces.get(t)||(this._debug("got have %d",t),this.... method _onBitField (line 1) | _onBitField(t){this.peerPieces=new n.A(t),this._debug("got bitfield"),... method _onRequest (line 1) | _onRequest(t,e,r){if(this.amChoking&&(!this.hasFast||!this.allowedFast... method _onPiece (line 1) | _onPiece(t,e,r){this._debug("got piece index=%d offset=%d",t,e),this._... method _onCancel (line 1) | _onCancel(t,e,r){this._debug("got cancel index=%d offset=%d length=%d"... method _onPort (line 1) | _onPort(t){this._debug("got port %d",t),this.emit("port",t)} method _onSuggest (line 1) | _onSuggest(t){if(!this.hasFast)return this._debug("Error: got suggest ... method _onHaveAll (line 1) | _onHaveAll(){if(!this.hasFast)return this._debug("Error: got have-all ... method _onHaveNone (line 1) | _onHaveNone(){if(!this.hasFast)return this._debug("Error: got have-non... method _onReject (line 1) | _onReject(t,e,r){if(!this.hasFast)return this._debug("Error: got rejec... method _onAllowedFast (line 1) | _onAllowedFast(t){if(!this.hasFast)return this._debug("Error: got allo... method _onExtended (line 1) | _onExtended(t,e){if(0===t){let t;try{t=i.A.decode(e)}catch(t){this._de... method _onTimeout (line 1) | _onTimeout(){this._debug("request timed out"),this._callback(this.requ... method _write (line 1) | _write(t,e){if(2===this._encryptionMethod&&this._cryptoHandshakeDone&&... method _callback (line 1) | _callback(t,e,r){t&&(this._resetTimeout(!this.peerChoking&&!this._fini... method _resetTimeout (line 1) | _resetTimeout(t){if(!t||!this._timeoutMs||!this.requests.length)return... method _parse (line 1) | _parse(t,e){this._parserSize=t,this._parser=e} method _parseUntil (line 1) | _parseUntil(t,e){this._cryptoSyncPattern=t,this._waitMaxBytes=e} method _onMessageLength (line 1) | _onMessageLength(t){const e=A(t);e>0?this._parse(e,this._onMessage):(t... method _onMessage (line 1) | _onMessage(t){switch(this._parse(4,this._onMessageLength),t[0]){case 0... method _determineHandshakeType (line 1) | _determineHandshakeType(){this._parse(1,t=>{const e=t[0];19===e?this._... method _parsePe1 (line 1) | _parsePe1(t){this._parse(95,e=>{this._onPe1((0,u.xW)([t,e])),this._par... method _parsePe2 (line 1) | _parsePe2(){this._parse(96,async t=>{this._onPe2(t),this._setGenerator... method _parsePe3 (line 1) | async _parsePe3(){const t=await(0,u.tW)((0,u.fk)(this._utfToHex("req1"... method _parsePe3Encrypted (line 1) | _parsePe3Encrypted(){this._parse(14,t=>{const e=this._decryptHandshake... method _parsePe4 (line 1) | _parsePe4(){const t=this._decryptHandshake(S);this._parseUntil(t,512),... method _parseHandshake (line 1) | _parseHandshake(){this._parse(1,t=>{const e=t[0];if(19!==e)return this... method _onHandshakeBuffer (line 1) | _onHandshakeBuffer(t){const e=t.slice(0,19);if("BitTorrent protocol"!=... method _onFinish (line 1) | _onFinish(){for(this._finished=!0,this.push(null);this.read(););for(cl... method _debug (line 1) | _debug(...t){t[0]=`[${this._debugId}] ${t[0]}`,c(...t)} method _pull (line 1) | _pull(t,e,r,i){for(let n=0;n{i... method _checkNodes (line 1) | _checkNodes(t,e,r){const i=this;!function t(n){let s=null;for(;n.lengt... method addNode (line 1) | addNode(t){const e=this;if(t.id){t.id=tt(t.id);const e=!!this._rpc.nod... method removeNode (line 1) | removeNode(t){this._rpc.nodes.remove(tt(t))} method _sendPing (line 1) | _sendPing(t,e){const r=this,i=t.id;this._rpc.query(t,{q:"ping"},(t,n,s... method toJSON (line 1) | toJSON(){const t=this,e={};return Object.keys(this._values.cache).forE... method put (line 1) | put(t,e){(z.isBuffer(t)||"string"==typeof t)&&(t={v:t});const r=!!t.k;... method _put (line 1) | _put(t,e){e||(e=Z);const r=!!t.k,i="string"==typeof t.v?z.from(t.v):t.... method _preput (line 1) | _preput(t,e,r){const i=this;return this._closest(t,{q:"get",a:{id:this... method get (line 1) | get(t,e,r){t=tt(t),"function"==typeof e&&(r=e,e=null),e||(e={});const ... method announce (line 1) | announce(t,e,r){if("function"==typeof e)return this.announce(t,0,e);t=... method _preannounce (line 1) | _preannounce(t,e,r){const i=this;this.lookup(t,n=>i.destroyed?r(new Er... method lookup (line 1) | lookup(t,e){t=tt(t),e||(e=Z);const r=this;let i=!1;function n(e,i){e||... method address (line 1) | address(){return this._rpc.address()} method listen (line 1) | listen(...t){this._rpc.bind(...t)} method destroy (line 1) | destroy(t){if(this.destroyed)return void(t&&W.nextTick(t));this.destro... method _onquery (line 1) | _onquery(t,e){if(void 0===t.q||null===t.q)return;const r=t.q.toString(... method _onfindnode (line 1) | _onfindnode(t,e){const r=t.a.target;if(!r)return this._rpc.error(e,t,[... method _ongetpeers (line 1) | _ongetpeers(t,e){const r=e.address||e.host,i=t.a.info_hash;if(!i)retur... method _onannouncepeer (line 1) | _onannouncepeer(t,e){const r=e.address||e.host,i=t.a.implied_port?e.po... method _addPeer (line 1) | _addPeer(t,e,r){this._peers.add(e.toString("hex"),function(t,e){const ... method _onget (line 1) | _onget(t,e){const r=e.address||e.host,i=t.a.target;if(!i)return;const ... method _onput (line 1) | _onput(t,e){const r=e.address||e.host,i=t.a;if(!i)return;const n=t.a.v... method _bootstrap (line 1) | _bootstrap(t){const e=this;if(!t)return W.nextTick(r);function r(){e.r... method _closest (line 1) | _closest(t,e,r,i){const n=this,s=new N({localNodeId:t,numberOfNodesPer... method _debug (line 1) | _debug(){if(!$.enabled)return;const t=[].slice.call(arguments);t[0]=`[... method _validateToken (line 1) | _validateToken(t,e){const r=this._generateToken(t,this._secrets[0]),i=... method _generateToken (line 1) | _generateToken(t,e){return e||(e=this._secrets[0]),this._hash(z.concat... method _rotateSecrets (line 1) | _rotateSecrets(){this._secrets?(this._secrets[1]=this._secrets[0],this... function Z (line 1) | function Z(){} function G (line 1) | function G(t){return F.createHash("sha1").update(t).digest()} function Y (line 1) | function Y(t,e,r){const i={id:t,token:e,v:r.v};return r.sig&&(i.sig=r.si... function J (line 1) | function J(t,e){return`${t[e++]}.${t[e++]}.${t[e++]}.${t[e++]}`} function X (line 1) | function X(t){const e={seq:t.seq||0,v:t.v};return t.salt&&(e.salt=t.salt... function Q (line 1) | function Q(t){return{host:t.host,port:t.port}} function tt (line 1) | function tt(t){if(z.isBuffer(t))return t;if(ArrayBuffer.isView(t))return... method constructor (line 1) | constructor(t,{highWaterMark:e=16384,map:r=null,mapWritable:i,byteLeng... method ended (line 1) | get ended(){return 0!==(this.stream._duplexState&B)} method push (line 1) | push(t){return!(142606350&this.stream._duplexState)&&(null!==this.map&... method shift (line 1) | shift(){const t=this.queue.shift();return this.buffered-=this.byteLeng... method end (line 1) | end(t){"function"==typeof t?this.stream.once("finish",t):null!=t&&this... method autoBatch (line 1) | autoBatch(t,e){const r=[],i=this.stream;for(r.push(t);(i._duplexState&... method update (line 1) | update(){const t=this.stream;t._duplexState|=C;do{for(;(t._duplexState... method updateNonPrimary (line 1) | updateNonPrimary(){const t=this.stream;if((144965647&t._duplexState)==... method continueUpdate (line 1) | continueUpdate(){return 0!==(this.stream._duplexState&N)&&(this.stream... method updateCallback (line 1) | updateCallback(){(35127311&this.stream._duplexState)===P?this.update()... method updateNextTick (line 1) | updateNextTick(){0===(this.stream._duplexState&N)&&(this.stream._duple... function at (line 1) | function at(t){return t.reduce((t,e,r,i)=>{const n=e.split("-").map(t=>p... function ut (line 1) | async function ut(t){if("string"==typeof t&&/^(stream-)?magnet:/.test(t)... function ft (line 1) | async function ft(t,e,r){if("function"==typeof e)return ft(t,{},e);if("f... function lt (line 1) | function lt(t,e){if(!t)throw new Error(`Torrent is missing required fiel... function Mt (line 1) | function Mt(t){return t.replace(/a=ice-options:trickle\s\n/g,"")} class St (line 1) | class St extends bt.Duplex{_pc;constructor(t){if(super(t=Object.assign({... method constructor (line 1) | constructor(t){if(super(t=Object.assign({allowHalfOpen:!1},t)),this.__... method bufferSize (line 1) | get bufferSize(){return this._channel&&this._channel.bufferedAmount||0} method connected (line 1) | get connected(){return this._connected&&"open"===this._channel.readySt... method address (line 1) | address(){return{port:this.localPort,family:this.localFamily,address:t... method signal (line 1) | signal(t){if(!this._destroying){if(this.destroyed)throw vt(new Error("... method _addIceCandidate (line 1) | _addIceCandidate(t){const e=new yt(t);this._pc.addIceCandidate(e).catc... method send (line 1) | send(t){if(!this._destroying){if(this.destroyed)throw vt(new Error("ca... method _needsNegotiation (line 1) | _needsNegotiation(){this._debug("_needsNegotiation"),this._batchedNego... method negotiate (line 1) | negotiate(){if(!this._destroying){if(this.destroyed)throw vt(new Error... method _final (line 1) | _final(t){this._readableState.ended||this.push(null),t(null)} method __destroy (line 1) | __destroy(t){this.end(),this._destroy(()=>{},t)} method _destroy (line 1) | _destroy(t,e){this.destroyed||this._destroying||(this._destroying=!0,t... method _setupData (line 1) | _setupData(t){if(!t.channel)return this.__destroy(vt(new Error("Data c... method _write (line 1) | _write(t,e){if(this.destroyed)return e(vt(new Error("cannot write afte... method _onFinish (line 1) | _onFinish(){if(this.destroyed)return;const t=()=>{setTimeout(()=>this.... method _startIceCompleteTimeout (line 1) | _startIceCompleteTimeout(){this.destroyed||this._iceCompleteTimer||(th... method _createOffer (line 1) | _createOffer(){this.destroyed||this._pc.createOffer(this.offerOptions)... method _createAnswer (line 1) | _createAnswer(){this.destroyed||this._pc.createAnswer(this.answerOptio... method _onConnectionStateChange (line 1) | _onConnectionStateChange(){this.destroyed||this._destroying||"failed"=... method _onIceStateChange (line 1) | _onIceStateChange(){if(this.destroyed)return;const t=this._pc.iceConne... method getStats (line 1) | getStats(t){const e=t=>("[object Array]"===Object.prototype.toString.c... method _maybeReady (line 1) | _maybeReady(){if(this._debug("maybeReady pc %s channel %s",this._pcRea... method _onInterval (line 1) | _onInterval(){!this._cb||!this._channel||this._channel.bufferedAmount>... method _onSignalingStateChange (line 1) | _onSignalingStateChange(){this.destroyed||("stable"===this._pc.signali... method _onIceCandidate (line 1) | _onIceCandidate(t){this.destroyed||(t.candidate&&this.trickle?this.emi... method _onChannelMessage (line 1) | _onChannelMessage(t){if(this.destroyed)return;let e=t.data;e instanceo... method _onChannelBufferedAmountLow (line 1) | _onChannelBufferedAmountLow(){if(this.destroyed||!this._cb)return;this... method _onChannelOpen (line 1) | _onChannelOpen(){this._connected||this.destroyed||(this._debug("on cha... method _onChannelClose (line 1) | _onChannelClose(){this.destroyed||(this._debug("on channel close"),thi... method _debug (line 1) | _debug(){const t=[].slice.call(arguments);t[0]="["+this._id+"] "+t[0],... class Rt (line 1) | class Rt{constructor(t){Pt("create pool (port %s)",t.torrentPort),this._... method constructor (line 1) | constructor(t){Pt("create pool (port %s)",t.torrentPort),this._client=... method destroy (line 1) | destroy(t){if(Pt("destroy conn pool"),this.utpServer&&(this.utpServer.... method _onConnection (line 1) | _onConnection(t,e){const r=this;if(!t.remoteAddress)return t.on("error... function Ot (line 1) | function Ot(){} function Ut (line 1) | function Ut(t){if(1e5===jt.size&&jt.clear(),!jt.has(t)){const e=Nt.exec(... function Ft (line 1) | async function Ft(t,e,r={}){if(!t?.put)throw new Error("First argument m... function ee (line 1) | function ee(t){const e=new Uint8Array(4);return new DataView(e.buffer).s... method constructor (line 1) | constructor(t,e){super(),this.client=t,this.announceUrl=e,this.interval=... method setInterval (line 1) | setInterval(t){null==t&&(t=this.DEFAULT_ANNOUNCE_INTERVAL),clearInterval... class le (line 1) | class le extends oe{constructor(t,e){super(t,e),ue("new http tracker %s"... method constructor (line 1) | constructor(t,e){super(t,e),ue("new http tracker %s",e),this.scrapeUrl... method announce (line 1) | announce(t){if(this.destroyed)return;const e=Object.assign({},t,{compa... method scrape (line 1) | scrape(t){if(this.destroyed)return;if(!this.scrapeUrl)return void this... method destroy (line 1) | destroy(t){const e=this;if(this.destroyed)return t(null);let r;if(this... method _request (line 1) | async _request(t,e,r){const i=new URL(t+(-1===t.indexOf("?")?"?":"&")+... method _onAnnounceResponse (line 1) | _onAnnounceResponse(t){const e=t.interval||t["min interval"];e&&this.s... method _onScrapeResponse (line 1) | _onScrapeResponse(t){t=t.files||t.host||{};const e=Object.keys(t);0!==... class ge (line 1) | class ge extends oe{constructor(t,e){super(t,e),me("new udp tracker %s",... method constructor (line 1) | constructor(t,e){super(t,e),me("new udp tracker %s",e),this.cleanupFns... method announce (line 1) | announce(t){this.destroyed||this._request(t)} method scrape (line 1) | scrape(t){this.destroyed||(t._scrape=!0,this._request(t))} method destroy (line 1) | destroy(t){const e=this;if(this.destroyed)return t(null);let r;if(this... method _request (line 1) | _request(t){const e=this;t||(t={});let r,i,n,s,{hostname:o,port:a}=ne.... function ye (line 1) | function ye(){return(0,w.po)(4)} function be (line 1) | function be(t){const e=new Uint8Array(2);return new DataView(e.buffer).s... function we (line 1) | function we(t){if(t>ve||"string"==typeof t){const e=new Uint8Array(8);re... function _e (line 1) | function _e(){} class xe (line 1) | class xe extends bt.Duplex{constructor(t={}){if("string"==typeof t&&(t={... method constructor (line 1) | constructor(t={}){if("string"==typeof t&&(t={url:t}),super(t=Object.as... method send (line 1) | send(t){this._ws.send(t)} method _final (line 1) | _final(t){this._readableState.ended||this.push(null),t(null)} method _destroy (line 1) | _destroy(t){if(!this.destroyed){if(this._writableState.ended||this.end... method _write (line 1) | _write(t,e){if(this.destroyed)return e(new Error("cannot write after s... method _handleOpen (line 1) | _handleOpen(){if(!this.connected&&!this.destroyed){if(this.connected=!... method _handleMessage (line 1) | _handleMessage(t){if(this.destroyed)return;let e=t.data;e instanceof A... method _handleClose (line 1) | _handleClose(){this.destroyed||(this._debug("on close"),this.destroy())} method _handleError (line 1) | _handleError(t){this.destroy(new Error(`Error connecting to ${this.url... method _handleFinish (line 1) | _handleFinish(){if(this.destroyed)return;const t=()=>{setTimeout(()=>t... method _onInterval (line 1) | _onInterval(){if(!this._cb||!this._ws||this._ws.bufferedAmount>65536)r... method _debug (line 1) | _debug(){const t=[].slice.call(arguments);t[0]="["+this._id+"] "+t[0],... class Te (line 1) | class Te extends oe{constructor(t,e){super(t,e),Ae("new websocket tracke... method constructor (line 1) | constructor(t,e){super(t,e),Ae("new websocket tracker %s",e),this.peer... method announce (line 1) | announce(t){if(this.destroyed||this.reconnecting)return;if(!this.socke... method scrape (line 1) | scrape(t){if(this.destroyed||this.reconnecting)return;if(!this.socket.... method destroy (line 1) | destroy(t=Ce){if(this.destroyed)return t(null);this.destroyed=!0,clear... method _openSocket (line 1) | _openSocket(){if(this.destroyed=!1,this.peers||(this.peers={}),this._o... method _onSocketConnect (line 1) | _onSocketConnect(){this.destroyed||this.reconnecting&&(this.reconnecti... method _onSocketData (line 1) | _onSocketData(t){if(!this.destroyed){this.expectingResponse=!1;try{t=J... method _onAnnounceResponse (line 1) | _onAnnounceResponse(t){if(t.info_hash!==this.client._infoHashBinary)re... method _onScrapeResponse (line 1) | _onScrapeResponse(t){t=t.files||{};const e=Object.keys(t);0!==e.length... method _onSocketClose (line 1) | _onSocketClose(){this.destroyed||(this.destroy(),this._startReconnectT... method _onSocketError (line 1) | _onSocketError(t){this.destroyed||(this.destroy(),this.client.emit("wa... method _startReconnectTimer (line 1) | _startReconnectTimer(){const t=Math.floor(3e5*Math.random())+Math.min(... method _send (line 1) | _send(t){if(this.destroyed)return;this.expectingResponse=!0;const e=JS... method _generateOffers (line 1) | _generateOffers(t,e){const r=this,i=[];Ae("generating %s offers",t);fo... method _createPeer (line 1) | _createPeer(t){const e=this;t=Object.assign({trickle:!1,config:e.clien... function Ce (line 1) | function Ce(){} class Be (line 1) | class Be extends n{constructor(t={}){if(super(),!t.peerId)throw new Erro... method constructor (line 1) | constructor(t={}){if(super(),!t.peerId)throw new Error("Option `peerId... method start (line 1) | start(t){(t=this._defaultAnnounceOpts(t)).event="started",Oe("send `st... method stop (line 1) | stop(t){(t=this._defaultAnnounceOpts(t)).event="stopped",Oe("send `sto... method complete (line 1) | complete(t){t||(t={}),(t=this._defaultAnnounceOpts(t)).event="complete... method update (line 1) | update(t){(t=this._defaultAnnounceOpts(t)).event&&delete t.event,Oe("s... method _announce (line 1) | _announce(t){this._trackers.forEach(e=>{e.announce(t)})} method scrape (line 1) | scrape(t){Oe("send `scrape`"),t||(t={}),this._trackers.forEach(e=>{e.s... method setInterval (line 1) | setInterval(t){Oe("setInterval %d",t),this._trackers.forEach(e=>{e.set... method destroy (line 1) | destroy(t){if(this.destroyed)return;this.destroyed=!0,Oe("destroy");co... method _defaultAnnounceOpts (line 1) | _defaultAnnounceOpts(t={}){return null==t.numwant&&(t.numwant=ne.DEFAU... class qe (line 1) | class qe extends n.EventEmitter{constructor(t={}){if(super(),!t.peerId)t... method constructor (line 1) | constructor(t={}){if(super(),!t.peerId)throw new Error("Option `peerId... method _parseAnnounce (line 1) | _parseAnnounce(t){Ne("parse announce",t);const e=t.split("\r\n");if("B... method destroy (line 1) | destroy(t){this.destroyed||(this.destroyed=!0,Ne("destroy"),clearInter... method start (line 1) | start(){Ne("start"),this.server.bind(Ue),this._announce(),this.annouce... method _announce (line 1) | _announce(){Ne("send announce");const t=`BT-SEARCH * HTTP/1.1\r\nHost:... class ze (line 1) | class ze extends n.EventEmitter{constructor(t){if(super(),!t.peerId)thro... method constructor (line 1) | constructor(t){if(super(),!t.peerId)throw new Error("Option `peerId` i... method updatePort (line 1) | updatePort(t){t!==this._port&&(this._port=t,this.dht&&this._dhtAnnounc... method complete (line 1) | complete(t){this.tracker&&this.tracker.complete(t)} method destroy (line 1) | destroy(t){if(this.destroyed)return;this.destroyed=!0,clearTimeout(thi... method _createTracker (line 1) | _createTracker(){const t=Object.assign({},this._trackerOpts,{infoHash:... method _dhtAnnounce (line 1) | _dhtAnnounce(){this._dhtAnnouncing||(Fe("dht announce"),this._dhtAnnou... method _createLSD (line 1) | _createLSD(){const t=Object.assign({},{infoHash:this.infoHash,peerId:t... class t (line 1) | class t extends n.EventEmitter{constructor(t){super(),this._peerSupports... method constructor (line 1) | constructor(t){super(),this._peerSupports=!1,this._wire=t} method onExtendedHandshake (line 1) | onExtendedHandshake(){this._peerSupports=!0} method onMessage (line 1) | onMessage(t){let e;try{e=new DataView(t.buffer).getUint32(0)}catch(t){... method donthave (line 1) | donthave(t){if(!this._peerSupports)return;Ke("donthave %d",t);const e=... method _failRequests (line 1) | _failRequests(t){const e=this._wire.requests;for(let r=0;r!0===t[r]?e|or[r]:... method _sendMessage (line 1) | _sendMessage(){const t=Object.keys(this._localAddedPeers).slice(0,50),... class Je (line 1) | class Je{constructor(t){this.length=t,this.missing=t,this.sources=null,t... method constructor (line 1) | constructor(t){this.length=t,this.missing=t,this.sources=null,this._ch... method chunkLength (line 1) | chunkLength(t){return t===this._chunks-1?this._remainder:Ye} method chunkLengthRemaining (line 1) | chunkLengthRemaining(t){return this.length-t*Ye} method chunkOffset (line 1) | chunkOffset(t){return t*Ye} method reserve (line 1) | reserve(){return this.init()?this._cancellations.length?this._cancella... method reserveRemaining (line 1) | reserveRemaining(){if(!this.init())return-1;if(this._cancellations.len... method cancel (line 1) | cancel(t){this.init()&&this._cancellations.push(t)} method cancelRemaining (line 1) | cancelRemaining(t){this.init()&&(this._reservations=t)} method get (line 1) | get(t){return this.init()?this._buffer[t]:null} method set (line 1) | set(t,e,r){if(!this.init())return!1;const i=e.length,n=Math.ceil(i/Ye)... method flush (line 1) | flush(){if(!this._buffer||this._chunks!==this._buffered)return null;co... method init (line 1) | init(){return!this._flushed&&(this._buffer||(this._buffer=new Array(th... class e (line 1) | class e extends n.EventEmitter{constructor(e){super(),this._wire=e,this.... method constructor (line 1) | constructor(e){super(),this._wire=e,this._fetching=!1,this._metadataCo... method onHandshake (line 1) | onHandshake(t,e,r){this._infoHash=t} method onExtendedHandshake (line 1) | onExtendedHandshake(t){return t.m&&t.m.ut_metadata?t.metadata_size?"nu... method onMessage (line 1) | onMessage(t){let e,r;try{const i=(0,w.dU)(t),n=i.indexOf("ee")+2;e=f.A... method fetch (line 1) | fetch(){this._metadataComplete||(this._fetching=!0,this._metadataSize&... method cancel (line 1) | cancel(){this._fetching=!1} method setMetadata (line 1) | async setMetadata(t){if(this._metadataComplete)return!0;Qe("set metada... method _send (line 1) | _send(t,e){let r=f.A.encode(t);ArrayBuffer.isView(e)&&(r=(0,w.xW)([r,e... method _request (line 1) | _request(t){this._send({msg_type:0,piece:t})} method _data (line 1) | _data(t,e,r){const i={msg_type:1,piece:t};"number"==typeof r&&(i.total... method _reject (line 1) | _reject(t){this._send({msg_type:2,piece:t})} method _onRequest (line 1) | _onRequest(t){if(!this._metadataComplete)return void this._reject(t);c... method _onData (line 1) | _onData(t,e,r){e.length>tr||!this._fetching||(this.metadata.set(e,t*tr... method _onReject (line 1) | _onReject(t){this._remainingRejects>0&&this._fetching?(this._request(t... method _requestPieces (line 1) | _requestPieces(){if(this._fetching){this.metadata=new Uint8Array(this.... method _checkDone (line 1) | async _checkDone(){let t=!0;for(let e=0;e!0===t[r]?e|or[r]:... method _sendMessage (line 1) | _sendMessage(){const t=Object.keys(this._localAddedPeers).slice(0,50),... class fr (line 1) | class fr extends n{constructor(t,{start:e,end:r}){super(),this._torrent=... method constructor (line 1) | constructor(t,{start:e,end:r}){super(),this._torrent=t._torrent,this._... method next (line 1) | next(){return new Promise((t,e)=>{if(0===this._missing||this.destroyed... method return (line 1) | async return(){return this.destroy(),{done:!0,value:void 0}} method throw (line 1) | async throw(t){throw t} method destroy (line 1) | destroy(t=t=>{},e){this.destroyed||(this.destroyed=!0,this._torrent.de... method [Symbol.asyncIterator] (line 1) | [Symbol.asyncIterator](){return this} class lr (line 1) | class lr extends n{constructor(t,e){super(),this._torrent=t,this._destro... method constructor (line 1) | constructor(t,e){super(),this._torrent=t,this._destroyed=!1,this._file... method downloaded (line 1) | get downloaded(){if(this._destroyed||!this._torrent.bitfield)return 0;... method progress (line 1) | get progress(){return this.length?this.downloaded/this.length:0} method select (line 1) | select(t){0!==this.length&&this._torrent.select(this._startPiece,this.... method deselect (line 1) | deselect(){0!==this.length&&this._torrent.deselect(this._startPiece,th... method createReadStream (line 1) | createReadStream(t){if(this._destroyed)throw new Error("File is destro... method arrayBuffer (line 1) | async arrayBuffer(t={}){if(this._destroyed)throw new Error("File is de... method blob (line 1) | async blob(t){if(this._destroyed)throw new Error("File is destroyed");... method stream (line 1) | stream(t){if(this._destroyed)throw new Error("File is destroyed");let ... method streamURL (line 1) | get streamURL(){if(!this._client._server)throw new Error("No server cr... method streamTo (line 1) | streamTo(t){return t.src=this.streamURL,t} method includes (line 1) | includes(t){return this._startPiece<=t&&this._endPiece>=t} method _destroy (line 1) | _destroy(){this._destroyed=!0,this._torrent=null;for(const t of this._... method [Symbol.asyncIterator] (line 1) | [Symbol.asyncIterator](t={}){if(0===this.length||this._destroyed)return ... class cr (line 1) | class cr{constructor(t){this._torrent=t,this._numPieces=t.pieces.length,... method constructor (line 1) | constructor(t){this._torrent=t,this._numPieces=t.pieces.length,this._p... method getRarestPiece (line 1) | getRarestPiece(t){let e=[],r=1/0;for(let i=0;i{this._cleanupWireEvents(t);for(let e=0;e<... method recalculate (line 1) | recalculate(){this._pieces.fill(0);for(const t of this._torrent.wires)... method _cleanupWireEvents (line 1) | _cleanupWireEvents(t){t.removeListener("have",this._onWireHave),t.remo... class gr (line 1) | class gr extends dr.A{constructor(t,e){super(),this.url=t,this.connId=t,... method constructor (line 1) | constructor(t,e){super(),this.url=t,this.connId=t,this._torrent=e,this... method _init (line 1) | _init(t){this.setKeepAlive(!0),this.use(Ze()),this.once("handshake",as... method httpRequest (line 1) | async httpRequest(t,e,r,i){i=M(i);const n=t*this._torrent.pieceLength+... method destroy (line 1) | destroy(){super.destroy(),this._torrent=null} class yr (line 1) | class yr{_items=[];remove(t){for(let e=0;e(t.priority??0)&&(t.pr... method concatenate (line 1) | concatenate(t){for(let e=0;et.to)throw new Error("Invalid interval");t.isStrea... method sort (line 1) | sort(t=(t,e)=>t.from-e.from){this._items.sort(t)} method length (line 1) | get length(){return this._items.length} method get (line 1) | get(t){return this._items[t]} method swap (line 1) | swap(t,e){const r=this._items[t];this._items[t]=this._items[e],this._i... method clear (line 1) | clear(){this._items.length=0} method [Symbol.iterator] (line 1) | *[Symbol.iterator](){for(let t=0;te.from&&t.to>e.to} function vr (line 1) | function vr(t,e){return t.to>=e.from-1&&t.to=e.from... function _r (line 1) | function _r(t,e){return t.from<=e.from&&t.to>=e.to} class Rr (line 1) | class Rr extends n{constructor(t,e,r){super(),this._debugId="unknown inf... method constructor (line 1) | constructor(t,e,r){super(),this._debugId="unknown infohash",this.clien... method timeRemaining (line 1) | get timeRemaining(){return this.done?0:0===this.downloadSpeed?1/0:(thi... method downloaded (line 1) | get downloaded(){if(!this.bitfield)return 0;let t=0;for(let e=0,r=this... method downloadSpeed (line 1) | get downloadSpeed(){return this._downloadSpeed()} method uploadSpeed (line 1) | get uploadSpeed(){return this._uploadSpeed()} method progress (line 1) | get progress(){return this.length?this.downloaded/this.length:0} method ratio (line 1) | get ratio(){return this.uploaded/(this.received||this.length)} method numPeers (line 1) | get numPeers(){return this.wires.length} method torrentFileBlob (line 1) | get torrentFileBlob(){return this.torrentFile?new Blob([this.torrentFi... method _numQueued (line 1) | get _numQueued(){return this._queue.length+(this._peersLength-this._nu... method _onTorrentId (line 1) | async _onTorrentId(t){if(this.destroyed)return;let e;try{e=await ct(t)... method _onParsedTorrent (line 1) | _onParsedTorrent(t){if(!this.destroyed){if(this._processParsedTorrent(... method _processParsedTorrent (line 1) | _processParsedTorrent(t){this._debugId=(0,w.V5)(t.infoHash).substring(... method _onListening (line 1) | _onListening(){this.destroyed||(this.info?this._onMetadata(this):(this... method _startDiscovery (line 1) | _startDiscovery(){if(this.discovery||this.destroyed)return;let t=this.... method _getMetadataFromServer (line 1) | _getMetadataFromServer(){const t=this,e=Array.isArray(this.xs)?this.xs... method _onMetadata (line 1) | async _onMetadata(t){if(this.metadata||this.destroyed)return;let e;if(... method getFileModtimes (line 1) | getFileModtimes(t){const e=[];Ge(this.files.map((t,r)=>i=>{const n=thi... method _verifyPiece (line 1) | _verifyPiece(t,e){if(this.destroyed)return e(new Error("torrent is des... method _verifyPiecesUsingBitfield (line 1) | _verifyPiecesUsingBitfield(t){const e=new Set,r=new Map;for(const t of... method _verifyPiecesUsingHash (line 1) | _verifyPiecesUsingHash(t,e){Ge(t.map((t,e)=>r=>{const i=Number.isInteg... method _verifyPieces (line 1) | _verifyPieces(t){if(this._hasStartupBitfield)return this._verifyPieces... method rescanFiles (line 1) | rescanFiles(t){if(this.destroyed)throw new Error("torrent is destroyed... method _markAllVerified (line 1) | _markAllVerified(){for(let t=0;t{this.destroyed||(this.received+=t... method removePeer (line 1) | removePeer(t){const e=t?.id||t;t&&!t.id&&(t=this._peers?.get(e)),t&&(t... method _select (line 1) | _select(t=0,e=this.pieces.length-1,r,i,n=!1){if(this.destroyed)throw n... method select (line 1) | select(t,e,r,i){this._select(t,e,r,i,!1)} method _deselect (line 1) | _deselect(t,e,r=!1){if(this.destroyed)throw new Error("torrent is dest... method deselect (line 1) | deselect(t,e){this._deselect(t,e,!1)} method critical (line 1) | critical(t,e){if(this.destroyed)throw new Error("torrent is destroyed"... method _onWire (line 1) | _onWire(t,e){if(this._debug("got wire %s (%s)",t._debugId,e||"Unknown"... method _onWireWithMetadata (line 1) | _onWireWithMetadata(t){let e=null;const r=()=>{this.destroyed||t.destr... method _updateSelections (line 1) | _updateSelections(){this.ready&&!this.destroyed&&(v(()=>{this._gcSelec... method _gcSelections (line 1) | _gcSelections(){for(const t of this._selections){const e=t.offset;for(... method _updateInterest (line 1) | _updateInterest(){const t=this._amInterested;this._amInterested=!!this... method _updateWireInterest (line 1) | _updateWireInterest(t){let e=!1;for(let r=0;rthis._updateWireWrapper(),{timeout:250}):this._upd... method _updateWireWrapper (line 1) | _updateWireWrapper(){if(this.destroyed)return;const t=Xe(this.wires);l... method _updateWire (line 1) | _updateWire(t){if(t.destroyed)return!1;const e=this,r=Or(t,.5);if(t.re... method _rechoke (line 1) | _rechoke(){if(!this.ready)return;const t=this.wires.map(t=>({wire:t,ra... method _hotswap (line 1) | _hotswap(t,e){const r=t.downloadSpeed();if(r{if(!t.don... method load (line 1) | async load(t,e){if(this.destroyed)throw new Error("torrent is destroye... method pause (line 1) | pause(){this.destroyed||(this._debug("pause"),this.paused=!0)} method resume (line 1) | resume(){this.destroyed||(this._debug("resume"),this.paused=!1,this._d... method _debug (line 1) | _debug(...t){t[0]=`[${this.client._debugId}] [${this._debugId}] ${t[0]... method _drain (line 1) | _drain(){if(this._debug("_drain numConns %s maxConns %s _peersLength %... method _validAddr (line 1) | _validAddr(t){let e;try{e=Ut(t)}catch(t){return!1}const r=e[0],i=e[1];... method _isIPv4 (line 1) | _isIPv4(t){return/^((?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5... function Or (line 1) | function Or(t,e){let r=2+Math.ceil(e*t.downloadSpeed()/Je.BLOCK_LENGTH);... function Br (line 1) | function Br(){} class qr (line 1) | class qr{constructor(t,e={}){this.client=t,e.origin||(e.origin="*"),this... method constructor (line 1) | constructor(t,e={}){this.client=t,e.origin||(e.origin="*"),this.opts=e... method serveIndexPage (line 1) | static serveIndexPage(t,e,r){const i=e.map(t=>`
  • \n `
  • \n <... method serveOptionsRequest (line 1) | static serveOptionsRequest(t,e){return e.status=204,e.headers["Access-... method serveFile (line 1) | static serveFile(t,e,r){r.status=200,r.headers.Expires="0",r.headers["... method onRequest (line 1) | async onRequest(t,e){let r=new URL(t.url,"http://example.com").pathnam... method close (line 1) | close(t=()=>{}){this.closed=!0,this.pendingReady.forEach(t=>{this.clie... method destroy (line 1) | destroy(t=()=>{}){this.closed?v(t):this.close(t),this.client=null} class Dr (line 1) | class Dr extends qr{constructor(t,e){super(t,e),this.server=Lr.createSer... method constructor (line 1) | constructor(t,e){super(t,e),this.server=Lr.createServer(),this._listen... method wrapRequest (line 1) | wrapRequest(t,e){return this.opts.hostname&&t.headers.host!==`${this.o... method onConnection (line 1) | onConnection(t){t.setTimeout(36e6),this.sockets.add(t),t.once("close",... method address (line 1) | address(){return this.server.address()} method listen (line 1) | listen(...t){return this.closed=!1,this.server.on("connection",this.on... method close (line 1) | close(t=()=>{}){this.server.removeAllListeners("connection"),this.serv... method destroy (line 1) | destroy(t){this.sockets.forEach(t=>{t.destroy()}),super.destroy(t)} class Hr (line 1) | class Hr extends qr{constructor(t,e){super(t,e),this.registration=e.cont... method constructor (line 1) | constructor(t,e){super(t,e),this.registration=e.controller,this.worker... method wrapRequest (line 1) | wrapRequest(t){const e=t.data;if("webtorrent"===!e?.type||!e.url)retur... method listen (line 1) | listen(t,e){e()} method address (line 1) | address(){return this._address} method close (line 1) | close(t){navigator.serviceWorker.removeEventListener("message",this.bo... method destroy (line 1) | destroy(t){super.destroy(t)} function Fr (line 1) | function Fr(t,e){return`\n \n \n ... function zr (line 1) | function zr(t){return encodeURIComponent(t).replace(/['()]/g,escape).rep... class Kr (line 1) | class Kr extends n{constructor(t={}){super(),"string"==typeof t.peerId?t... method constructor (line 1) | constructor(t={}){super(),"string"==typeof t.peerId?this.peerId=t.peer... method createServer (line 1) | createServer(t,e){if(this.destroyed)throw new Error("torrent is destro... method downloadSpeed (line 1) | get downloadSpeed(){return this._downloadSpeed()} method uploadSpeed (line 1) | get uploadSpeed(){return this._uploadSpeed()} method progress (line 1) | get progress(){const t=this.torrents.filter(t=>1!==t.progress);return ... method ratio (line 1) | get ratio(){return this.torrents.reduce((t,e)=>t+e.uploaded,0)/(this.t... method get (line 1) | async get(t){if(t instanceof Rr){if(this.torrents.includes(t))return t... method add (line 1) | add(t,e={},r=()=>{}){if(this.destroyed)throw new Error("client is dest... method seed (line 1) | seed(t,e,r){if(this.destroyed)throw new Error("client is destroyed");"... method remove (line 1) | async remove(t,e,r){if("function"==typeof e)return this.remove(t,null,... method _remove (line 1) | _remove(t,e,r){if(!t)return;if("function"==typeof e)return this._remov... method address (line 1) | address(){return this.listening?this._connPool?this._connPool.tcpServe... method throttleDownload (line 1) | throttleDownload(t){return t=Number(t),!(isNaN(t)||!isFinite(t)||t<-1)... method throttleUpload (line 1) | throttleUpload(t){return t=Number(t),!(isNaN(t)||!isFinite(t)||t<-1)&&... method destroy (line 1) | destroy(t){if(this.destroyed)throw new Error("client already destroyed... method _destroy (line 1) | _destroy(t,e){this._debug("client destroy"),this.destroyed=!0;const r=... method _onListening (line 1) | _onListening(){if(this._debug("listening"),this.listening=!0,this._con... method _debug (line 1) | _debug(){const t=[].slice.call(arguments);t[0]=`[${this._debugId}] ${t... method _getByHash (line 1) | async _getByHash(t){for(const e of this.torrents)if(e.infoHashHash||(e... FILE: index.js constant VERSION_STR (line 30) | const VERSION_STR = VERSION constant VERSION_PREFIX (line 41) | const VERSION_PREFIX = `-WW${VERSION_STR}-` class WebTorrent (line 47) | class WebTorrent extends EventEmitter { method constructor (line 48) | constructor (opts = {}) { method createServer (line 193) | createServer (options, force) { method downloadSpeed (line 209) | get downloadSpeed () { return this._downloadSpeed() } method uploadSpeed (line 211) | get uploadSpeed () { return this._uploadSpeed() } method progress (line 213) | get progress () { method ratio (line 220) | get ratio () { method get (line 234) | async get (torrentId) { method add (line 257) | add (torrentId, opts = {}, ontorrent = () => {}) { method seed (line 304) | seed (input, opts, onseed) { method remove (line 403) | async remove (torrentId, opts, cb) { method _remove (line 412) | _remove (torrent, opts, cb) { method address (line 425) | address () { method throttleDownload (line 436) | throttleDownload (rate) { method throttleUpload (line 449) | throttleUpload (rate) { method destroy (line 462) | destroy (cb) { method _destroy (line 467) | _destroy (err, cb) { method _onListening (line 512) | _onListening () { method _debug (line 537) | _debug () { method _getByHash (line 543) | async _getByHash (infoHashHash) { function isReadable (line 566) | function isReadable (obj) { function isFileList (line 575) | function isFileList (obj) { FILE: lib/conn-pool.js class ConnPool (line 19) | class ConnPool { method constructor (line 20) | constructor (client) { method destroy (line 79) | destroy (cb) { method _onConnection (line 122) | _onConnection (conn, type) { function noop (line 188) | function noop () {} FILE: lib/file-iterator.js class FileIterator (line 15) | class FileIterator extends EventEmitter { method constructor (line 16) | constructor (file, { start, end }) { method next (line 40) | next () { method return (line 90) | async return () { method throw (line 99) | async throw (err) { method destroy (line 103) | destroy (cb = _ => {}, err) { method [Symbol.asyncIterator] (line 36) | [Symbol.asyncIterator] () { FILE: lib/file.js class File (line 7) | class File extends EventEmitter { method constructor (line 8) | constructor (torrent, file) { method downloaded (line 39) | get downloaded () { method progress (line 83) | get progress () { method select (line 87) | select (priority) { method deselect (line 92) | deselect () { method createReadStream (line 118) | createReadStream (opts) { method arrayBuffer (line 131) | async arrayBuffer (opts = {}) { method blob (line 147) | async blob (opts) { method stream (line 152) | stream (opts) { method streamURL (line 173) | get streamURL () { method streamTo (line 178) | streamTo (elem) { method includes (line 183) | includes (piece) { method _destroy (line 187) | _destroy () { method [Symbol.asyncIterator] (line 97) | [Symbol.asyncIterator] (opts = {}) { FILE: lib/peer.js constant CONNECT_TIMEOUT_TCP (line 7) | const CONNECT_TIMEOUT_TCP = 5_000 constant CONNECT_TIMEOUT_UTP (line 8) | const CONNECT_TIMEOUT_UTP = 5_000 constant CONNECT_TIMEOUT_WEBRTC (line 9) | const CONNECT_TIMEOUT_WEBRTC = 25_000 constant HANDSHAKE_TIMEOUT (line 10) | const HANDSHAKE_TIMEOUT = 25_000 constant TYPE_TCP_INCOMING (line 13) | const TYPE_TCP_INCOMING = 'tcpIncoming' constant TYPE_TCP_OUTGOING (line 14) | const TYPE_TCP_OUTGOING = 'tcpOutgoing' constant TYPE_UTP_INCOMING (line 15) | const TYPE_UTP_INCOMING = 'utpIncoming' constant TYPE_UTP_OUTGOING (line 16) | const TYPE_UTP_OUTGOING = 'utpOutgoing' constant TYPE_WEBRTC (line 17) | const TYPE_WEBRTC = 'webrtc' constant TYPE_WEBSEED (line 18) | const TYPE_WEBSEED = 'webSeed' constant SOURCE_MANUAL (line 21) | const SOURCE_MANUAL = 'manual' constant SOURCE_TRACKER (line 22) | const SOURCE_TRACKER = 'tracker' constant SOURCE_DHT (line 23) | const SOURCE_DHT = 'dht' constant SOURCE_LSD (line 24) | const SOURCE_LSD = 'lsd' constant SOURCE_UT_PEX (line 25) | const SOURCE_UT_PEX = 'ut_pex' class Peer (line 41) | class Peer extends EventEmitter { method constructor (line 42) | constructor (id, type) { method onConnect (line 72) | onConnect () { method sendPe1 (line 137) | sendPe1 () { method onPe1 (line 142) | onPe1 () { method sendPe2 (line 146) | sendPe2 () { method onPe2 (line 151) | onPe2 () { method sendPe3 (line 155) | sendPe3 () { method onPe3 (line 160) | onPe3 (infoHashHash) { method sendPe4 (line 169) | sendPe4 () { method onPe4 (line 174) | onPe4 () { method clearPipes (line 178) | clearPipes () { method setThrottlePipes (line 183) | setThrottlePipes () { method onHandshake (line 213) | onHandshake (infoHash, peerId) { method handshake (line 245) | handshake () { method startConnectTimeout (line 254) | startConnectTimeout () { method startHandshakeTimeout (line 269) | startHandshakeTimeout () { method destroy (line 277) | destroy (err) { FILE: lib/rarity-map.js class RarityMap (line 5) | class RarityMap { method constructor (line 6) | constructor (torrent) { method getRarestPiece (line 36) | getRarestPiece (pieceFilterFunc) { method destroy (line 60) | destroy () { method _initWire (line 73) | _initWire (wire) { method recalculate (line 89) | recalculate () { method _cleanupWireEvents (line 99) | _cleanupWireEvents (wire) { FILE: lib/selections.js class Selections (line 21) | class Selections { method remove (line 28) | remove (item) { method _mergePriorityAndNotify (line 69) | _mergePriorityAndNotify (newItem, existing) { method concatenate (line 85) | concatenate (newItem) { method insert (line 112) | insert (newItem) { method sort (line 121) | sort (sortFn = (a, b) => a.from - b.from) { method length (line 125) | get length () { method get (line 130) | get (index) { method swap (line 134) | swap (i, j) { method clear (line 140) | clear () { method [Symbol.iterator] (line 145) | * [Symbol.iterator] () { function isLowerIntersecting (line 167) | function isLowerIntersecting (newItem, existing) { function isUpperIntersecting (line 179) | function isUpperIntersecting (newItem, existing) { function isInsideExisting (line 191) | function isInsideExisting (newItem, existing) { function isCoveringExisting (line 205) | function isCoveringExisting (newItem, existing) { FILE: lib/server.js class ServerBase (line 10) | class ServerBase { method constructor (line 11) | constructor (client, opts = {}) { method serveIndexPage (line 18) | static serveIndexPage (res, torrents, pathname) { method isOriginAllowed (line 41) | isOriginAllowed (req) { method serveMethodNotAllowed (line 52) | static serveMethodNotAllowed (res) { method serve404Page (line 64) | static serve404Page (res) { method serveTorrentPage (line 75) | static serveTorrentPage (torrent, res, pathname) { method serveOptionsRequest (line 99) | static serveOptionsRequest (req, res) { method serveFile (line 110) | static serveFile (file, req, res) { method onRequest (line 172) | async onRequest (req, cb) { method close (line 246) | close (cb = () => {}) { method destroy (line 255) | destroy (cb = () => {}) { class NodeServer (line 263) | class NodeServer extends ServerBase { method constructor (line 264) | constructor (client, opts) { method wrapRequest (line 278) | wrapRequest (req, res) { method onConnection (line 301) | onConnection (socket) { method address (line 309) | address () { method listen (line 313) | listen (...args) { method close (line 320) | close (cb = () => {}) { method destroy (line 328) | destroy (cb) { class BrowserServer (line 336) | class BrowserServer extends ServerBase { method constructor (line 337) | constructor (client, opts) { method wrapRequest (line 360) | wrapRequest (event) { method listen (line 406) | listen (_, cb) { method address (line 410) | address () { method close (line 414) | close (cb) { method destroy (line 419) | destroy (cb) { function getPageHTML (line 425) | function getPageHTML (title, pageHtml) { function encodeRFC5987 (line 441) | function encodeRFC5987 (str) { FILE: lib/torrent.js constant MAX_BLOCK_LENGTH (line 77) | const MAX_BLOCK_LENGTH = 128 * 1024 constant PIECE_TIMEOUT (line 78) | const PIECE_TIMEOUT = 30_000 constant CHOKE_TIMEOUT (line 79) | const CHOKE_TIMEOUT = 5_000 constant SPEED_THRESHOLD (line 80) | const SPEED_THRESHOLD = 3 * Piece.BLOCK_LENGTH constant PIPELINE_MIN_DURATION (line 82) | const PIPELINE_MIN_DURATION = 0.5 constant PIPELINE_MAX_DURATION (line 83) | const PIPELINE_MAX_DURATION = 1 constant RECHOKE_INTERVAL (line 85) | const RECHOKE_INTERVAL = 10_000 // 10 seconds constant RECHOKE_OPTIMISTIC_DURATION (line 86) | const RECHOKE_OPTIMISTIC_DURATION = 2 // 30 seconds constant DEFAULT_NO_PEERS_INTERVAL (line 88) | const DEFAULT_NO_PEERS_INTERVAL = 30_000 // 30 seconds constant FILESYSTEM_CONCURRENCY (line 91) | const FILESYSTEM_CONCURRENCY = process.browser ? cpus().length : 2 constant RECONNECT_WAIT (line 93) | const RECONNECT_WAIT = [1_000, 5_000, 15_000] constant USER_AGENT (line 95) | const USER_AGENT = `WebTorrent/${VERSION} (https://webtorrent.io)` constant SUPPORTS_FSA (line 98) | const SUPPORTS_FSA = globalThis.navigator?.storage?.getDirectory && glob... constant FALLBACK_STORE (line 99) | const FALLBACK_STORE = !process.browser || SUPPORTS_FSA constant TMP (line 103) | let TMP constant IDLE_CALLBACK (line 110) | const IDLE_CALLBACK = typeof window !== 'undefined' && typeof window.req... class Torrent (line 112) | class Torrent extends EventEmitter { method constructor (line 119) | constructor (torrentId, client, opts) { method timeRemaining (line 214) | get timeRemaining () { method downloaded (line 220) | get downloaded () { method downloadSpeed (line 246) | get downloadSpeed () { return this._downloadSpeed() } method uploadSpeed (line 248) | get uploadSpeed () { return this._uploadSpeed() } method progress (line 250) | get progress () { return this.length ? this.downloaded / this.length :... method ratio (line 252) | get ratio () { return this.uploaded / (this.received || this.length) } method numPeers (line 254) | get numPeers () { return this.wires.length } method torrentFileBlob (line 256) | get torrentFileBlob () { method _numQueued (line 261) | get _numQueued () { method _onTorrentId (line 273) | async _onTorrentId (torrentId) { method _onParsedTorrent (line 297) | _onParsedTorrent (parsedTorrent) { method _processParsedTorrent (line 329) | _processParsedTorrent (parsedTorrent) { method _onListening (line 367) | _onListening () { method _startDiscovery (line 380) | _startDiscovery () { method _getMetadataFromServer (line 482) | _getMetadataFromServer () { method _onMetadata (line 555) | async _onMetadata (metadata) { method getFileModtimes (line 693) | getFileModtimes (cb) { method _verifyPiece (line 720) | _verifyPiece (index, cb) { method _verifyPiecesUsingBitfield (line 745) | _verifyPiecesUsingBitfield (cb) { method _verifyPiecesUsingHash (line 805) | _verifyPiecesUsingHash (pieces, cb) { method _verifyPieces (line 827) | _verifyPieces (cb) { method rescanFiles (line 842) | rescanFiles (cb) { method _markAllVerified (line 861) | _markAllVerified () { method _markVerified (line 872) | _markVerified (index) { method _markUnverified (line 884) | _markUnverified (index) { method _hasAllPieces (line 896) | _hasAllPieces () { method _hasNoPieces (line 903) | _hasNoPieces () { method _hasMorePieces (line 907) | _hasMorePieces (threshold) { method _onStore (line 921) | _onStore () { method destroy (line 947) | destroy (opts, cb) { method _destroy (line 953) | _destroy (err, opts, cb) { method addPeer (line 1036) | addPeer (peer, source) { method _addPeer (line 1076) | _addPeer (peer, type, source) { method addWebSeed (line 1123) | addWebSeed (urlOrConn) { method _addIncomingPeer (line 1171) | _addIncomingPeer (peer) { method _registerPeer (line 1183) | _registerPeer (newPeer) { method removePeer (line 1220) | removePeer (peer) { method _select (line 1238) | _select (start = 0, end = this.pieces.length - 1, priority, notify, is... method select (line 1262) | select (start, end, priority, notify) { method _deselect (line 1266) | _deselect (from, to, isStreamSelection = false) { method deselect (line 1276) | deselect (start, end) { method critical (line 1280) | critical (start, end) { method _onWire (line 1292) | _onWire (wire, addr) { method _onWireWithMetadata (line 1399) | _onWireWithMetadata (wire) { method _updateSelections (line 1518) | _updateSelections () { method _gcSelections (line 1531) | _gcSelections () { method _updateInterest (line 1555) | _updateInterest () { method _updateWireInterest (line 1566) | _updateWireInterest (wire) { method _update (line 1582) | _update () { method _updateWireWrapper (line 1590) | _updateWireWrapper () { method _updateWire (line 1604) | _updateWire (wire) { method _rechoke (line 1795) | _rechoke () { method _hotswap (line 1879) | _hotswap (wire, index) { method _request (line 1925) | _request (wire, index, hotswap) { method _checkDone (line 2025) | _checkDone () { method load (line 2062) | async load (streams, cb) { method pause (line 2080) | pause () { method resume (line 2086) | resume () { method _debug (line 2093) | _debug (...args) { method _drain (line 2104) | _drain () { method _validAddr (line 2174) | _validAddr (addr) { method _isIPv4 (line 2192) | _isIPv4 (addr) { function getBlockPipelineLength (line 2198) | function getBlockPipelineLength (wire, duration) { function getPiecePipelineLength (line 2212) | function getPiecePipelineLength (wire, duration, pieceLength) { function randomInt (line 2219) | function randomInt (high) { function noop (line 2223) | function noop () {} FILE: lib/webconn.js constant SOCKET_TIMEOUT (line 13) | const SOCKET_TIMEOUT = 60000 constant RETRY_DELAY (line 14) | const RETRY_DELAY = 10000 class WebConn (line 21) | class WebConn extends Wire { method constructor (line 22) | constructor (url, torrent) { method _init (line 32) | _init (url) { method httpRequest (line 82) | async httpRequest (pieceIndex, offset, length, cb) { method destroy (line 149) | destroy () { FILE: lib/worker-server.js method cancel (line 10) | cancel () { function serve (line 20) | async function serve ({ request }) { FILE: polyfills/process-fast.js function noop (line 16) | function noop () {} FILE: test/browser/server.js function checkState (line 23) | function checkState (worker, controller) { FILE: test/node/blocklist-dht.js function maybeDone (line 57) | function maybeDone () { function maybeDone (line 93) | function maybeDone () { FILE: test/node/blocklist.js function assertBlocked (line 8) | function assertBlocked (t, torrent, addr) { function assertReachable (line 15) | function assertReachable (t, torrent, addr) { function assertList (line 77) | function assertList (t, torrent) { FILE: test/node/client-deselect.js function setupClient (line 6) | function setupClient ({ t, onTorrent, onIdle, addTorrentProps = {} }) { function assertSelectionsEquals (line 151) | function assertSelectionsEquals (t, selections, expected) { FILE: test/node/download-dht-magnet.js function maybeDone (line 64) | function maybeDone () { function maybeDone (line 103) | function maybeDone () { FILE: test/node/download-dht-torrent.js function maybeDone (line 69) | function maybeDone (err) { function maybeDone (line 88) | function maybeDone () { FILE: test/node/download-metadata.js function createServer (line 7) | function createServer (data, cb) { FILE: test/node/download-tracker-magnet.js constant TRACKER_CONFIG_MAP (line 21) | const TRACKER_CONFIG_MAP = { function magnetDownloadTest (line 27) | function magnetDownloadTest (t, serverType) { FILE: test/node/download-tracker-torrent.js constant TRACKER_CONFIG_MAP (line 21) | const TRACKER_CONFIG_MAP = { function torrentDownloadTest (line 27) | function torrentDownloadTest (t, serverType) { FILE: test/node/download-webseed-magnet.js function maybeDone (line 36) | function maybeDone () { function maybeDone (line 75) | function maybeDone () { FILE: test/node/download-webseed-torrent.js constant WEB_SEED_TIMEOUT_MS (line 12) | const WEB_SEED_TIMEOUT_MS = 500 function maybeDone (line 46) | function maybeDone () { FILE: test/node/extensions.js class Extension (line 9) | class Extension { method constructor (line 10) | constructor (wire) { method onExtendedHandshake (line 14) | onExtendedHandshake (extendedHandshake) { FILE: test/node/limit-download-upload.js constant DOWNLOAD_SPEED_LIMIT (line 6) | const DOWNLOAD_SPEED_LIMIT = 200 * 1000 // 200 KB/s constant UPLOAD_SPEED_LIMIT (line 7) | const UPLOAD_SPEED_LIMIT = 200 * 1000 // 200 KB/s function testSpeed (line 9) | function testSpeed (t, downloaderOpts, uploaderOpts, cb) { FILE: test/node/limit-methods.js constant DOWNLOAD_SPEED_LIMIT (line 6) | const DOWNLOAD_SPEED_LIMIT = 200 * 1000 // 200 KB/s constant UPLOAD_SPEED_LIMIT (line 7) | const UPLOAD_SPEED_LIMIT = 200 * 1000 // 200 KB/s function testSpeed (line 9) | function testSpeed (t, downloaderOpts, uploaderOpts, cb) { FILE: test/node/seed-while-download.js function maybeDone (line 51) | function maybeDone () { function maybeDone (line 83) | function maybeDone () { function maybeDone (line 134) | function maybeDone () { FILE: test/rarity-map.js method _remove (line 21) | _remove () {} function validateInitial (line 88) | function validateInitial () { function setPiece (line 104) | function setPiece (wire, index) { function addWire (line 109) | function addWire () { function removeWire (line 116) | function removeWire (index) { FILE: test/selections.js function toString (line 103) | function toString (param) { function assertArrayContentsEqual (line 117) | function assertArrayContentsEqual (t, actual, expected) {