Full Code of webtorrent/webtorrent for AI

master 02bfbc529af1 cached
88 files
1.5 MB
523.0k tokens
1710 symbols
1 requests
Download .txt
Showing preview only (1,568K chars total). Download the full file or copy to clipboard to get everything.
Repository: webtorrent/webtorrent
Branch: master
Commit: 02bfbc529af1
Files: 88
Total size: 1.5 MB

Directory structure:
gitextract_r_wn0aci/

├── .airtap.yml
├── .eslintrc.cjs
├── .github/
│   ├── config.yml
│   ├── no-response.yml
│   └── workflows/
│       ├── ci.yml
│       ├── codeql-analysis.yml
│       ├── lock.yml
│       ├── release.yml
│       └── stale.yml
├── .gitignore
├── .npmignore
├── AUTHORS.md
├── CHANGELOG.md
├── LICENSE
├── README.md
├── dist/
│   └── webtorrent.chromeapp.js
├── docs/
│   ├── api.md
│   ├── bep_support.md
│   ├── faq.md
│   ├── free-torrents.md
│   ├── get-started.md
│   └── tutorials.md
├── index.js
├── lib/
│   ├── conn-pool.js
│   ├── file-iterator.js
│   ├── file.js
│   ├── peer.js
│   ├── rarity-map.js
│   ├── selections.js
│   ├── server.js
│   ├── torrent.js
│   ├── utp.cjs
│   ├── webconn.js
│   ├── worker-server.js
│   └── worker.js
├── package.json
├── polyfills/
│   ├── inflate-sync-web.js
│   └── process-fast.js
├── scripts/
│   ├── browser-serve.js
│   ├── browser.webpack.js
│   ├── chromeapp.webpack.js
│   ├── update-authors.sh
│   └── worker.webpack.js
├── test/
│   ├── bitfield.js
│   ├── browser/
│   │   ├── basic.js
│   │   └── server.js
│   ├── client-add-duplicate-trackers.js
│   ├── client-add.js
│   ├── client-destroy.js
│   ├── client-remove.js
│   ├── client-seed.js
│   ├── common.js
│   ├── duplicate.js
│   ├── file-buffer.js
│   ├── iterator.js
│   ├── node/
│   │   ├── basic.js
│   │   ├── blocklist-dht.js
│   │   ├── blocklist-tracker.js
│   │   ├── blocklist.js
│   │   ├── client-deselect.js
│   │   ├── conn-pool.js
│   │   ├── download-dht-magnet.js
│   │   ├── download-dht-torrent.js
│   │   ├── download-from-ip.js
│   │   ├── download-lsd-magnet.js
│   │   ├── download-lsd-torrent.js
│   │   ├── download-metadata.js
│   │   ├── download-private-dht.js
│   │   ├── download-tracker-magnet.js
│   │   ├── download-tracker-torrent.js
│   │   ├── download-webseed-magnet.js
│   │   ├── download-webseed-torrent.js
│   │   ├── extensions.js
│   │   ├── limit-download-upload.js
│   │   ├── limit-methods.js
│   │   ├── metadata.js
│   │   ├── seed-stream.js
│   │   ├── seed-while-download.js
│   │   ├── server.js
│   │   ├── swarm-basic.js
│   │   ├── swarm-reconnect.js
│   │   ├── swarm-timeout.js
│   │   └── torrent-events.js
│   ├── rarity-map.js
│   ├── selections.js
│   ├── swarm.js
│   └── torrent-destroy.js
└── version.cjs

================================================
FILE CONTENTS
================================================

================================================
FILE: .airtap.yml
================================================
browsers:
  - name: chrome
    version: latest
  - name: firefox
    version: latest
  # https://github.com/airtap/sauce/issues/11
  # - name: safari
  #   version: latest
  - name: edge
    version: latest
  - name: and_chr
    version: latest
  - name: ios_saf
    version: latest
providers:
  - airtap-system
presets:
  local:
    providers: airtap-manual
    browsers:
      - name: manual
  sauce:
  # Not used yet pending https://github.com/SocketDev/wormhole-crypto/issues/5
  # and https://github.com/airtap/airtap/issues/311
    providers: airtap-sauce
browserify:
  - transform: babelify
    global: true
    presets: ['@babel/preset-env']
    plugins: ['@babel/plugin-syntax-import-assertions']
server: './scripts/browser-serve.js'


================================================
FILE: .eslintrc.cjs
================================================
module.exports = {
  env: {
    es2022: true,
    browser: true,
    node: true,
    serviceworker: true
  },
  extends: ['standard'],
  parser: '@babel/eslint-parser',
  parserOptions: {
    sourceType: 'module',
    ecmaVersion: 'latest',
    requireConfigFile: false,
    babelOptions: {
      parserOpts: {
        plugins: ['importAssertions']
      }
    }
  },
  ignorePatterns: ['node_modules', 'dist']
}


================================================
FILE: .github/config.yml
================================================

# ProBot Request Info (https://probot.github.io/apps/request-info/)

requestInfoReplyComment: >
  👋 We would appreciate it if you could provide us with more information about this
  issue or PR.
requestInfoLabelToAdd: 'need more info'

# ProBot Welcome (https://probot.github.io/apps/welcome/)

newPRWelcomeComment: >
  🙌 Thanks for opening this pull request! You're awesome.
  <br><br> ![](https://feross.net/x/cats/6.gif)
firstPRMergeComment: >
  🎉 Congrats on getting your first pull request landed! <br><br>
  ![](https://feross.net/x/cats/29.gif)


================================================
FILE: .github/no-response.yml
================================================
# ProBot No Response (https://probot.github.io/apps/no-response/)

# Number of days of inactivity before an Issue is closed for lack of response
daysUntilClose: 14

# Label requiring a response
responseRequiredLabel: 'need more info'

# Comment to post when closing an Issue for lack of response. Set to `false` to disable
closeComment: >
  This issue has been automatically closed because there was no response to a
  request for more information from the issue opener. Please leave a comment or
  open a new issue if you have additional information related to this issue.


================================================
FILE: .github/workflows/ci.yml
================================================
name: ci
on:
  push:
    branches:
      - master
    tags-ignore:
      - '*'
  pull_request:
    branches:
      - master
concurrency: 
  group: ${{ github.ref }}
  cancel-in-progress: true
jobs:
  test:
    name: Node ${{ matrix.node }} / ${{ matrix.os }}
    runs-on: ${{ matrix.os }}
    strategy:
      fail-fast: false
      matrix:
        os:
          - ubuntu-latest
        node:
          - '18'
          - '16'
    steps:
      - uses: actions/checkout@v3
      - uses: actions/setup-node@v3
        with:
          node-version: ${{ matrix.node }}
      - run: npm install
      - run: npm run build --if-present
      - run: echo "127.0.0.1 airtap.local" | sudo tee -a /etc/hosts
      - run: npm test
        env:
          SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }}
          SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }}


================================================
FILE: .github/workflows/codeql-analysis.yml
================================================
name: "CodeQL"

on:
  push:
    branches: [ master ]
  pull_request:
    # The branches below must be a subset of the branches above
    branches: [ master ]
  schedule:
    - cron: '41 6 * * 2'

jobs:
  analyze:
    name: Analyze
    runs-on: ubuntu-latest
    permissions:
      actions: read
      contents: read
      security-events: write

    strategy:
      fail-fast: false
      matrix:
        language: [ 'javascript' ]

    steps:
    - name: Checkout repository
      uses: actions/checkout@v3

    - name: Initialize CodeQL
      uses: github/codeql-action/init@v3
      with:
        languages: ${{ matrix.language }}
        # If you wish to specify custom queries, you can do so here or in a config file.
        # By default, queries listed here will override any specified in a config file.
        # Prefix the list here with "+" to use these queries and those in the config file.
        # queries: ./path/to/local/query, your-org/your-repo/queries@main

    # Autobuild attempts to build any compiled languages  (C/C++, C#, or Java).
    # If this step fails, then you should remove it and run the build manually (see below)
    # - name: Autobuild
    #  uses: github/codeql-action/autobuild@v1

    # ℹ️ Command-line programs to run using the OS shell.
    # 📚 https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun

    # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
    #    and modify them (or add more) to build your code if your project
    #    uses a compiled language

    #- run: |
    #   make bootstrap
    #   make release

    - name: Perform CodeQL Analysis
      uses: github/codeql-action/analyze@v3


================================================
FILE: .github/workflows/lock.yml
================================================
name: 'Lock Threads'

on:
  schedule:
    - cron: '0 13 * * *'
  workflow_dispatch:

permissions:
  issues: write
  pull-requests: write

concurrency:
  group: lock

jobs:
  action:
    runs-on: ubuntu-latest
    steps:
      - uses: dessant/lock-threads@v4


================================================
FILE: .github/workflows/release.yml
================================================
name: Release

on:
  push:
    branches:
      - master

jobs:
  release:
    name: Release
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v3
        with:
          persist-credentials: false
      - name: Setup Node.js
        uses: actions/setup-node@v3
        with:
          node-version: 18
      - name: Cache
        uses: actions/cache@v3
        with:
          path: ~/.npm
          key: ${{ runner.os }}-npm-${{ hashFiles('**/package.json') }}
          restore-keys: |
            ${{ runner.os }}-npm-
      - name: Install dependencies
        run: npm i
        env:
          NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
      - name: Release
        env:
          GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
          NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
        run: npx semantic-release


================================================
FILE: .github/workflows/stale.yml
================================================
name: Mark stale issues and pull requests

on:
  schedule:
  - cron: '0 12 * * *'

jobs:
  stale:
    runs-on: ubuntu-latest
    permissions:
      issues: write
      pull-requests: write

    steps:
    - uses: actions/stale@v8
      with:
        repo-token: ${{ secrets.GITHUB_TOKEN }}
        stale-issue-message: 'Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?'
        stale-pr-message: 'Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?'
        exempt-issue-labels: accepted,blocked,bug,security,meta
        exempt-pr-labels: accepted,blocked,bug,'help wanted',security,meta
        stale-issue-label: 'stale'
        stale-pr-label: 'stale'


================================================
FILE: .gitignore
================================================
node_modules/
package-lock.json
webtorrent.debug.js
sw.debug.js
pnpm-lock.yaml


================================================
FILE: .npmignore
================================================
.github/
docs/
scripts/
test/

.airtap.yml
CONTRIBUTING.md


================================================
FILE: AUTHORS.md
================================================
# Authors

#### Ordered by first contribution.

- Feross Aboukhadijeh (feross@feross.org)
- John Hiesey (jhiesey@cs.stanford.edu)
- Brad Berger (brad@bradb.net)
- Matt Buresh (mattburesh@gmail.com)
- cagedwisdom (cagedwisdom@tricorder.org)
- Charles Julian Knight (charles@rabidaudio.com)
- Maurits van Mastrigt (maurits@nerdieworks.nl)
- Shyam S Kumar (shyam.salim.kumar@outlook.com)
- fisch0920 (fisch0920@gmail.com)
- iShift (shift.rus@gmail.com)
- Bob Ren (bob@codecademy.com)
- gtuk (gtuk@hush.ai)
- thammin (thammin@live.co.uk)
- Valérian Galliat (val@codejam.info)
- charlescharles (charlescharles@users.noreply.github.com)
- opfl (openthefrog@gmail.com)
- Chris (abody.97@gmail.com)
- Astro (astro@spaceboyz.net)
- Sindre Sorhus (sindresorhus@gmail.com)
- Josh Duff (me@JoshDuff.com)
- Anthony MOI (anthony@totems.co)
- Joseph Dykstra (josephdykstra@gmail.com)
- mathiasvr (mathiasvr@gmail.com)
- grunjol (grunjol@argenteam.net)
- Liam Curry (liam@curry.name)
- Francisco Pinzon (hello@pacho.me)
- Jake Fulton Buckle (jacobafb@gmail.com)
- alexeisavca (savca.alexei@gmail.com)
- Olivier Lalonde (olalonde@gmail.com)
- Johnny Tong (mailbox@johnnytong.com)
- Mark Vayngrib (mark.vayngrib@lablz.com)
- Tristan Davies (github@tristan.io)
- Eric Wooley (ericwooley@gmail.com)
- Afshin Mehrabani (afshin.meh@gmail.com)
- Josip Janžić (josip.janzic@gmail.com)
- Bigard Florian (florian.bigard@gmail.com)
- OlaviSau (olavisau@gmail.com)
- Simba Zhang (solderzzc@gmail.com)
- Gilles De Mey (gilles.de.mey@gmail.com)
- Linus Unnebäck (linus@folkdatorn.se)
- André Stein (stivekx@gmail.com)
- Joseph Frazier (joseph@onsip.com)
- Yousef Amar (yousefamar@gmail.com)
- Lucas Pelegrino (lucas.wxp@gmail.com)
- Yoann Ciabaud (yoann@atacma.agency)
- Joseph Frazier (1212jtraceur@gmail.com)
- Ivan Vučica (ivan@vucica.net)
- ReadmeCritic (frankensteinbot@gmail.com)
- Anders D. Johnson (adjohnson916@users.noreply.github.com)
- vinz243 (vinz243@gmail.com)
- Diego Rodríguez (diegorbaquero@gmail.com)
- Aram Drevekenin (grimsniffer@gmail.com)
- andreapaiola (andrea.paiola@gmail.com)
- Hrvoje Šimić (me@shime.io)
- Romain Beaumont (romain.rom1@gmail.com)
- Zander Mackie (zander@skilledup.com)
- Wim (wim@sitebase.be)
- William Blankenship (william.jblankenship@gmail.com)
- James Halliday (mail@substack.net)
- Bazyli Brzóska (bazyli.brzoska@gmail.com)
- Liam Gray (liam.r.gray@gmail.com)
- Mike (kenr.mk@gmail.com)
- Autarc (autarc@gmail.com)
- DC (dcposch@dcpos.ch)
- Manuel Simoni (msimoni@gmail.com)
- Diego Rodríguez Baquero (diegorbaquero@gmail.com)
- Tercus (Terces86@gmail.com)
- Lunik (guillaume.lunik@gmail.com)
- Ajain Vivek (ajainvivek07@gmail.com)
- Jonathan Harper (jharper@eecs.berkeley.edu)
- Miguel Freitas (miguelfreitas@users.noreply.github.com)
- Sebastian Mayr (github@smayr.name)
- v0dy (k4r70ng@gmail.com)
- Colin Steele (cvillecsteele@gmail.com)
- Mathias Rasmussen (mathiasvr@gmail.com)
- darkenvy (darkenvy6@gmail.com)
- Amila Welihinda (amilajack@gmail.com)
- Yoann Ciabaud (yoann@sonora.io)
- michal (mich.spicka@gmail.com)
- ferrolho (henriqueferrolho@gmail.com)
- Henrique Ferrolho (ferrolho@users.noreply.github.com)
- Facundo Zaldo (FaCuZ@users.noreply.github.com)
- Alberto Miranda (codealchemist@gmail.com)
- Jack Bates (jack@nottheoilrig.com)
- Giovanni T. Parra (fiatjaf@gmail.com)
- Mikeal Rogers (mikeal.rogers@gmail.com)
- Jerod Santo (jerod.santo@gmail.com)
- George Petrov (george@dmxzone.com)
- Alexey Rodionov (fluorescent.hallucinogen@gmail.com)
- Sidd Sridharan (sidd@sidd.com)
- Hongbo Miao (Hongbo.Miao@outlook.com)
- ronsoros (ronsor@mailnesia.com)
- Ray Vahey (rnvahey@gmail.com)
- Chuong (kocoten1992@users.noreply.github.com)
- William (willyb321@users.noreply.github.com)
- bradleyjkemp (scytheon3@gmail.com)
- bradleyjkemp (bradleyjkemp@users.noreply.github.com)
- Anthony Ettinger (anthony@chovy.com)
- malone (toby.walsh@fxhome.com)
- pahwaranger (amit@amitpahwa.com)
- Benjamin Tan (demoneaux@gmail.com)
- Diego R. B (diegorbaquero@gmail.com)
- Andrea Paiola (andrea.paiola@gmail.com)
- David (thegr8dave@gmail.com)
- andreapaiola (andrea.paiola@digintel.it)
- Ash (ashlesscinder@gmail.com)
- Hrvoje Šimić (hrvoje@twobucks.co)
- Alex Lu (alxlu@users.noreply.github.com)
- David Chevers Williams (wdc@student.unimelb.edu.au)
- snowinszu (86755838@qq.com)
- XiaoJun (magic.xiao@admaster.com.cn)
- Pierre Brocart (pierbrocar@gmail.com)
- saramkn1 (31823057+saramkn1@users.noreply.github.com)
- Alex (alxmorais8@msn.com)
- Brian Clifton (brian@clifton.me)
- greenkeeper[bot] (greenkeeper[bot]@users.noreply.github.com)
- LukaKerr (lukakerr1@gmail.com)
- Pierre-Louis Dubouilh (pldubouilh@gmail.com)
- MiKatre (0mica4420@gmail.com)
- Matthew Peveler (matt.peveler@gmail.com)
- yan (yan@mit.edu)
- Thijs Triemstra (info@collab.nl)
- DEADBLACKCLOVER (asocio@protonmail.com)
- Pierre Dubouilh (pldubouilh@gmail.com)
- Konstantin Veretennicov (kveretennicov+github@gmail.com)
- Gustavo Rodrigues (qgustavor@users.noreply.github.com)
- faza (fazamhd@gmail.com)
- Raymond Tan (now-raymond@users.noreply.github.com)
- Kaylee (34007889+KayleePop@users.noreply.github.com)
- Brad Marsden (silentbot1@gmail.com)
- lovefoodcode (38153617+lovefoodcode@users.noreply.github.com)
- Gabriel Almeida (gabrieel@email.com)
- filesfm (41144556+filesfm@users.noreply.github.com)
- John Hiesey (john@hiesey.com)
- KayleePop (34007889+KayleePop@users.noreply.github.com)
- Andriy Lysnevych (andriy.lysnevych@gmail.com)
- Chris McCormick (chris@mccormick.cx)
- Jimmy Wärting (jimmy@warting.se)
- Jorge Cuadra (jorgecuadrafueyo@gmail.com)
- Chocobozzz (florian.chocobo@gmail.com)
- Chocobozzz (me@florianbigard.com)
- Gabriel (gabrieel@email.com)
- Shachar Itzhaky (corwin.amber@gmail.com)
- Eric Guan (guanzo91@gmail.com)
- Arnaldas Augutis (info@untitled.lt)
- Diego Rodriguez (diegorbaquero@gmail.com)
- Francois Carpentier (Francewhoa@users.noreply.github.com)
- Anton Harniakou (anton.harniakou@gmail.com)
- greenkeeper[bot] (23040076+greenkeeper[bot]@users.noreply.github.com)
- Dan Dumont (ddumont@gmail.com)
- Gabriel Juchault (gabriel.juchault@gmail.com)
- Feross (feross@feross.org)
- Chandan Chowdary Bhagam (chandandharana@gmail.com)
- Jiayin Pei (pjymymartin@gmail.com)
- Eric Berry (coderberry@gmail.com)
- DeltaF1 (DeltaF1@users.noreply.github.com)
- jsdt (jeffreydallatezza@gmail.com)
- Luc (luc.cadoret@gmail.com)
- Diego Rodriguez Baquero (diego.baquero@pager.com)
- Silvan Strübi (silvan.struebi@gmail.com)
- Aditya Shankar (me@adityashankar.xyz)
- x1alien (63802698+x1alien@users.noreply.github.com)
- DEADBLACKCLOVER (deadblackclover@protonmail.com)
- H3RSKO (34112131+H3RSKO@users.noreply.github.com)
- Julen Garcia Leunda (hicom150@gmail.com)
- Jean-Philippe ALLEGRO (jipai13@gmail.com)
- Rhys Williams (me@rhyswilliams.co.za)
- Leo (5376265+leoherzog@users.noreply.github.com)
- ftreesmilo (58193105+ftreesmilo@users.noreply.github.com)
- valverde82 (valverde.marcelo@gmail.com)
- Jimmy Wärting (jimmy@warting.se)
- Vintic (vlad.f.s.95@gmail.com)
- dependabot[bot] (49699333+dependabot[bot]@users.noreply.github.com)
- ThaUnknown (kapi.skowronek@gmail.com)
- Renovate Bot (bot@renovateapp.com)
- Diego Rodríguez Baquero (github@diegorbaquero.com)
- Diego Rodríguez Baquero (diego@mothership.com)
- semantic-release-bot (semantic-release-bot@martynus.net)
- renovate[bot] (29139614+renovate[bot]@users.noreply.github.com)
- Cas (6506529+ThaUnknown@users.noreply.github.com)
- Diego Rodriguez Baquero (diego@arc.io)
- nkavian (nas@sixclovers.com)
- ftrees (58193105+ftreesmilo@users.noreply.github.com)
- Matías (mati280341@gmail.com)
- Serge Thompson (serge.thompson@gmail.com)
- il3ven (vaibhavchanana@yahoo.co.in)
- Martti Malmi (sirius@iki.fi)
- Ivan Borzenkov (ivan.borzenkov@gmail.com)
- Daniel Delgado Perera (33069494+audepe@users.noreply.github.com)
- Lakshya Singh (lakshay.singh1108@gmail.com)
- developomp (developomp@gmail.com)
- Bruce Hopkins (behopkinsjr@gmail.com)
- Paul-Louis Ageneau (paul-louis@ageneau.org)
- Artak Safaryan (32634773+holoyan@users.noreply.github.com)
- Drakonkat (adamo.mazzocchetti@gmail.com)
- CommanderRoot (CommanderRoot@users.noreply.github.com)
- Justin Lewis Salmon (jlsalmon@users.noreply.github.com)
- Diego Rodriguez Baquero (diego@protocol.ai)
- Sukka (isukkaw@gmail.com)
- Nipuna Weerasekara (w.nipuna@gmail.com)
- ThaUnknown (6506529+ThaUnknown@users.noreply.github.com)
- tedd pasta (37799569+resession@users.noreply.github.com)
- Ilaygoldman (29836366+Ilaygoldman@users.noreply.github.com)
- Jeremy Kahn (jeremyckahn@gmail.com)
- Bread Genie (63963181+BreadGenie@users.noreply.github.com)
- Tom Moor (tom.moor@gmail.com)
- funniray (funniray10@gmail.com)
- Carl Gorringe (git@gorringe.org)
- Banou (me@banou.dev)
- Cas_ (6506529+ThaUnknown@users.noreply.github.com)
- Andréas Livet (andreas.livet@gmail.com)
- Evan Hahn (me@evanhahn.com)
- Kende Détár (64217783+detarkende@users.noreply.github.com)
- Parsa Yazdani (parsa@yazdani.au)
- Todd Tanner (lostit1278@gmail.com)
- ya1Ry (86045923+ya1Ry@users.noreply.github.com)
- Paweł Zmarzły (pawo2500@gmail.com)
- Maurizio Carboni (maury91@gmail.com)
- hclarke (0@hclarke.ca)

#### Generated by scripts/update-authors.sh.


================================================
FILE: CHANGELOG.md
================================================
## [2.8.5](https://github.com/webtorrent/webtorrent/compare/v2.8.4...v2.8.5) (2025-11-30)


### Bug Fixes

* **deps:** update dependency @silentbot1/nat-api to ^0.4.9 ([#2992](https://github.com/webtorrent/webtorrent/issues/2992)) ([15923e5](https://github.com/webtorrent/webtorrent/commit/15923e5238e068721da3399611e3eb6e3a27035b))

## [2.8.4](https://github.com/webtorrent/webtorrent/compare/v2.8.3...v2.8.4) (2025-08-14)


### Bug Fixes

* connect count ([#2979](https://github.com/webtorrent/webtorrent/issues/2979)) ([ec009c8](https://github.com/webtorrent/webtorrent/commit/ec009c8476badbb7fac7b035f9a2c18a1019f81f))

## [2.8.3](https://github.com/webtorrent/webtorrent/compare/v2.8.2...v2.8.3) (2025-08-09)


### Bug Fixes

* connect event name typo ([#2975](https://github.com/webtorrent/webtorrent/issues/2975)) ([30b535a](https://github.com/webtorrent/webtorrent/commit/30b535aca2d1e44231d6c6714134254b4c38c47d))

## [2.8.2](https://github.com/webtorrent/webtorrent/compare/v2.8.1...v2.8.2) (2025-08-05)


### Bug Fixes

* **deps:** update dependency bittorrent-protocol to ^4.1.20 ([#2974](https://github.com/webtorrent/webtorrent/issues/2974)) ([6618b21](https://github.com/webtorrent/webtorrent/commit/6618b21fd975213898a9e6b475f7c258b7d37aa1))

## [2.8.1](https://github.com/webtorrent/webtorrent/compare/v2.8.0...v2.8.1) (2025-08-05)


### Bug Fixes

* **deps:** update dependency throughput to ^1.0.2 ([#2973](https://github.com/webtorrent/webtorrent/issues/2973)) ([55ae332](https://github.com/webtorrent/webtorrent/commit/55ae3329935b1a933e6a02a47536b8b4b94bed3e))

# [2.8.0](https://github.com/webtorrent/webtorrent/compare/v2.7.1...v2.8.0) (2025-08-03)


### Features

* **deps:** update dependency fs-chunk-store to v5 ([#2972](https://github.com/webtorrent/webtorrent/issues/2972)) ([2a1571d](https://github.com/webtorrent/webtorrent/commit/2a1571da7de9846cb58c27aabf9e233353e8d469))

## [2.7.1](https://github.com/webtorrent/webtorrent/compare/v2.7.0...v2.7.1) (2025-08-03)


### Bug Fixes

* **deps:** update webtorrent ([#2971](https://github.com/webtorrent/webtorrent/issues/2971)) ([b23cf4f](https://github.com/webtorrent/webtorrent/commit/b23cf4fa90c6ca9f260a9b6dd32b1d435e97c519))

# [2.7.0](https://github.com/webtorrent/webtorrent/compare/v2.6.10...v2.7.0) (2025-08-03)


### Features

* peers as map for performance ([#2970](https://github.com/webtorrent/webtorrent/issues/2970)) ([92db29f](https://github.com/webtorrent/webtorrent/commit/92db29f8172c27d8bdb33600e151576699d28b0c))

## [2.6.10](https://github.com/webtorrent/webtorrent/compare/v2.6.9...v2.6.10) (2025-06-28)


### Bug Fixes

* **deps:** update dependency bittorrent-protocol to ^4.1.18 ([#2965](https://github.com/webtorrent/webtorrent/issues/2965)) ([0122af4](https://github.com/webtorrent/webtorrent/commit/0122af4c0e53fc70a7b9c8a5a712590f835a7e80))

## [2.6.9](https://github.com/webtorrent/webtorrent/compare/v2.6.8...v2.6.9) (2025-06-28)


### Bug Fixes

* **deps:** update dependency streamx to v2.22.1 ([#2960](https://github.com/webtorrent/webtorrent/issues/2960)) ([a0dc518](https://github.com/webtorrent/webtorrent/commit/a0dc5188a9426e287af5b12aa037e7b7e248cbb9))

## [2.6.8](https://github.com/webtorrent/webtorrent/compare/v2.6.7...v2.6.8) (2025-05-23)


### Bug Fixes

* bad file iterator code ([#2953](https://github.com/webtorrent/webtorrent/issues/2953)) ([b119706](https://github.com/webtorrent/webtorrent/commit/b119706f2a521b728e4e1ddea13c2802507968d9))

## [2.6.7](https://github.com/webtorrent/webtorrent/compare/v2.6.6...v2.6.7) (2025-05-16)


### Bug Fixes

* removing stream selections ([#2952](https://github.com/webtorrent/webtorrent/issues/2952)) ([a5cbad0](https://github.com/webtorrent/webtorrent/commit/a5cbad0bfdf1bf8ebdc3c4f4e1500e183a8cd51a))

## [2.6.6](https://github.com/webtorrent/webtorrent/compare/v2.6.5...v2.6.6) (2025-05-15)


### Bug Fixes

* **deps:** update webtorrent ([#2951](https://github.com/webtorrent/webtorrent/issues/2951)) ([e9eb53c](https://github.com/webtorrent/webtorrent/commit/e9eb53ce5db33f212bc44702d0e157b665040eb4))

## [2.6.5](https://github.com/webtorrent/webtorrent/compare/v2.6.4...v2.6.5) (2025-05-14)


### Bug Fixes

* **deps:** update dependency bittorrent-dht to ^11.0.10 ([#2950](https://github.com/webtorrent/webtorrent/issues/2950)) ([effaf4e](https://github.com/webtorrent/webtorrent/commit/effaf4e55e30d91362b924a774ba243bea86d09c))

## [2.6.4](https://github.com/webtorrent/webtorrent/compare/v2.6.3...v2.6.4) (2025-05-14)


### Bug Fixes

* **deps:** update dependency debug to ^4.4.1 ([#2949](https://github.com/webtorrent/webtorrent/issues/2949)) ([2954871](https://github.com/webtorrent/webtorrent/commit/2954871756160e6071d873f489703c1c245dc202))

## [2.6.3](https://github.com/webtorrent/webtorrent/compare/v2.6.2...v2.6.3) (2025-04-18)


### Bug Fixes

* **deps:** update dependency torrent-discovery to ^11.0.16 ([#2943](https://github.com/webtorrent/webtorrent/issues/2943)) ([6c0154e](https://github.com/webtorrent/webtorrent/commit/6c0154e5255f9c6590dcb62c466ed22c043d5ee0))

## [2.6.2](https://github.com/webtorrent/webtorrent/compare/v2.6.1...v2.6.2) (2025-04-18)


### Bug Fixes

* null body on OPTIONS ([#2942](https://github.com/webtorrent/webtorrent/issues/2942)) ([76b508a](https://github.com/webtorrent/webtorrent/commit/76b508aa3482697dfad11d42d7d34de52484e65b))

## [2.6.1](https://github.com/webtorrent/webtorrent/compare/v2.6.0...v2.6.1) (2025-04-18)


### Bug Fixes

* **deps:** update dependency @silentbot1/nat-api to ^0.4.8 ([#2941](https://github.com/webtorrent/webtorrent/issues/2941)) ([134362e](https://github.com/webtorrent/webtorrent/commit/134362e51fa4c5f1996f3aaf38dcf1ca21e42580))

# [2.6.0](https://github.com/webtorrent/webtorrent/compare/v2.5.19...v2.6.0) (2025-04-04)


### Features

* add an option to store the bitfield in the file system ([#2878](https://github.com/webtorrent/webtorrent/issues/2878)) ([e29a474](https://github.com/webtorrent/webtorrent/commit/e29a4740b45995719652a1886a42f816e38fa456))

## [2.5.19](https://github.com/webtorrent/webtorrent/compare/v2.5.18...v2.5.19) (2025-02-05)


### Bug Fixes

* **deps:** update dependency streamx to v2.22.0 ([#2921](https://github.com/webtorrent/webtorrent/issues/2921)) ([f06ac81](https://github.com/webtorrent/webtorrent/commit/f06ac81887c4738067f92246949c1e5fcdf60d09))

## [2.5.18](https://github.com/webtorrent/webtorrent/compare/v2.5.17...v2.5.18) (2025-02-02)

## [2.5.17](https://github.com/webtorrent/webtorrent/compare/v2.5.16...v2.5.17) (2025-01-30)


### Bug Fixes

* **deps:** update dependency torrent-piece to ^3.0.1 ([#2920](https://github.com/webtorrent/webtorrent/issues/2920)) ([86d7980](https://github.com/webtorrent/webtorrent/commit/86d7980ff64161449ace94dba9f66520d038fad9))

## [2.5.16](https://github.com/webtorrent/webtorrent/compare/v2.5.15...v2.5.16) (2025-01-29)


### Bug Fixes

* **deps:** update dependency streamx to v2.21.1 ([#2898](https://github.com/webtorrent/webtorrent/issues/2898)) ([7727845](https://github.com/webtorrent/webtorrent/commit/772784501d7e2aaa170344c79eb3c490634c64cd))

## [2.5.15](https://github.com/webtorrent/webtorrent/compare/v2.5.14...v2.5.15) (2025-01-29)


### Bug Fixes

* bad done and select behavior and documentation ([#2916](https://github.com/webtorrent/webtorrent/issues/2916)) ([8237d5f](https://github.com/webtorrent/webtorrent/commit/8237d5fa23c9f8f46a0d1ad7bc820ff661ee5ba6))

## [2.5.14](https://github.com/webtorrent/webtorrent/compare/v2.5.13...v2.5.14) (2025-01-21)


### Bug Fixes

* noPeers not working correctly ([#2915](https://github.com/webtorrent/webtorrent/issues/2915)) ([62b4118](https://github.com/webtorrent/webtorrent/commit/62b41182ac71acee82cb53ed490f35ad1710ca1f))

## [2.5.13](https://github.com/webtorrent/webtorrent/compare/v2.5.12...v2.5.13) (2025-01-20)


### Bug Fixes

* **deps:** update webtorrent ([#2914](https://github.com/webtorrent/webtorrent/issues/2914)) ([e4f237d](https://github.com/webtorrent/webtorrent/commit/e4f237d9b0118146e7dced65fd5a8690b5771682))

## [2.5.12](https://github.com/webtorrent/webtorrent/compare/v2.5.11...v2.5.12) (2025-01-04)


### Bug Fixes

* **deps:** update webtorrent ([#2910](https://github.com/webtorrent/webtorrent/issues/2910)) ([53049b6](https://github.com/webtorrent/webtorrent/commit/53049b6121d1ea4116d41ebec79b49cd8146ac3d))

## [2.5.11](https://github.com/webtorrent/webtorrent/compare/v2.5.10...v2.5.11) (2024-12-28)


### Bug Fixes

* **deps:** update dependency torrent-discovery to ^11.0.14 ([#2908](https://github.com/webtorrent/webtorrent/issues/2908)) ([85e1d8a](https://github.com/webtorrent/webtorrent/commit/85e1d8add7bc0e2c426f1ec1bba54f77275dbfde))

## [2.5.10](https://github.com/webtorrent/webtorrent/compare/v2.5.9...v2.5.10) (2024-12-07)


### Bug Fixes

* **deps:** update dependency torrent-discovery to ^11.0.13 ([#2901](https://github.com/webtorrent/webtorrent/issues/2901)) ([03f7021](https://github.com/webtorrent/webtorrent/commit/03f7021b89cc18be9becd1284b21b27b09790153))

## [2.5.9](https://github.com/webtorrent/webtorrent/compare/v2.5.8...v2.5.9) (2024-12-07)


### Bug Fixes

* **deps:** update webtorrent ([#2900](https://github.com/webtorrent/webtorrent/issues/2900)) ([2b45a14](https://github.com/webtorrent/webtorrent/commit/2b45a142382fdcf2b48a6618b71930e119e55d70))

## [2.5.8](https://github.com/webtorrent/webtorrent/compare/v2.5.7...v2.5.8) (2024-12-07)


### Bug Fixes

* **deps:** update dependency debug to ^4.4.0 ([#2899](https://github.com/webtorrent/webtorrent/issues/2899)) ([1dd3c1a](https://github.com/webtorrent/webtorrent/commit/1dd3c1a45bca399d9800932318525881224527a4))

## [2.5.7](https://github.com/webtorrent/webtorrent/compare/v2.5.6...v2.5.7) (2024-11-23)


### Bug Fixes

* **deps:** update dependency streamx to v2.20.2 ([#2888](https://github.com/webtorrent/webtorrent/issues/2888)) ([4b00a0e](https://github.com/webtorrent/webtorrent/commit/4b00a0e1e70b8f71f264e254f70f2bfe80b16992))

## [2.5.6](https://github.com/webtorrent/webtorrent/compare/v2.5.5...v2.5.6) (2024-11-17)


### Bug Fixes

* uTP error on setup ([#2892](https://github.com/webtorrent/webtorrent/issues/2892)) ([283fd76](https://github.com/webtorrent/webtorrent/commit/283fd76b8ed0589c397711510d1efddf18297967))

## [2.5.5](https://github.com/webtorrent/webtorrent/compare/v2.5.4...v2.5.5) (2024-11-06)


### Bug Fixes

* **deps:** update dependency streamx to v2.20.1 ([#2855](https://github.com/webtorrent/webtorrent/issues/2855)) ([6618cee](https://github.com/webtorrent/webtorrent/commit/6618cee538264639f92d436ee253e321a284777e))

## [2.5.4](https://github.com/webtorrent/webtorrent/compare/v2.5.3...v2.5.4) (2024-11-06)


### Bug Fixes

* **deps:** update dependency pump to ^3.0.2 ([#2864](https://github.com/webtorrent/webtorrent/issues/2864)) ([019f115](https://github.com/webtorrent/webtorrent/commit/019f115031003a6cb119d13527bd6faaf5bfad8c))

## [2.5.3](https://github.com/webtorrent/webtorrent/compare/v2.5.2...v2.5.3) (2024-11-05)


### Bug Fixes

* **deps:** update webtorrent ([c5eed32](https://github.com/webtorrent/webtorrent/commit/c5eed329cf06dc2638ddae4193f6c1af83d557d0))

## [2.5.2](https://github.com/webtorrent/webtorrent/compare/v2.5.1...v2.5.2) (2024-11-05)


### Bug Fixes

* parse host even if this.client.blocked is false, to allow line 868 to pass correctly and default to utp. ([#2805](https://github.com/webtorrent/webtorrent/issues/2805)) ([beef270](https://github.com/webtorrent/webtorrent/commit/beef270d62e749c406637da8d82e2e5f85a03020))

## [2.5.1](https://github.com/webtorrent/webtorrent/compare/v2.5.0...v2.5.1) (2024-09-07)


### Bug Fixes

* **deps:** update dependency debug to ^4.3.7 ([69c1441](https://github.com/webtorrent/webtorrent/commit/69c14418af5fe724dc294ca5469d7c3188542b88))

# [2.5.0](https://github.com/webtorrent/webtorrent/compare/v2.4.15...v2.5.0) (2024-08-04)


### Features

* drop IDB ([#2851](https://github.com/webtorrent/webtorrent/issues/2851)) ([dc26aa6](https://github.com/webtorrent/webtorrent/commit/dc26aa6363d6004518de4f7ffc1d6a3968543a26))

## [2.4.15](https://github.com/webtorrent/webtorrent/compare/v2.4.14...v2.4.15) (2024-08-03)


### Bug Fixes

* custom length file buffer ([#2843](https://github.com/webtorrent/webtorrent/issues/2843)) ([5d40ad1](https://github.com/webtorrent/webtorrent/commit/5d40ad166ea531e1be9d07511c6245135ea9d87e))

## [2.4.14](https://github.com/webtorrent/webtorrent/compare/v2.4.13...v2.4.14) (2024-07-28)


### Bug Fixes

* **deps:** update dependency debug to ^4.3.6 ([c6dde2c](https://github.com/webtorrent/webtorrent/commit/c6dde2c95fb06cf6b5668225d3a1bdfa3a59c053))

## [2.4.13](https://github.com/webtorrent/webtorrent/compare/v2.4.12...v2.4.13) (2024-07-28)


### Bug Fixes

* **deps:** update webtorrent ([9eb656f](https://github.com/webtorrent/webtorrent/commit/9eb656f81016dffcc178ece9f15402ef63bc6a99))

## [2.4.12](https://github.com/webtorrent/webtorrent/compare/v2.4.11...v2.4.12) (2024-07-17)


### Bug Fixes

* **deps:** update dependency @thaunknown/simple-peer to ^10.0.10 ([09d7ea0](https://github.com/webtorrent/webtorrent/commit/09d7ea08cc461902aab6c9fc699f7962b1d977bd))

## [2.4.11](https://github.com/webtorrent/webtorrent/compare/v2.4.10...v2.4.11) (2024-06-29)


### Bug Fixes

* revert "fix: drop IDB chunk store ([#2553](https://github.com/webtorrent/webtorrent/issues/2553))" ([#2828](https://github.com/webtorrent/webtorrent/issues/2828)) ([348fba5](https://github.com/webtorrent/webtorrent/commit/348fba52e02670b506461f401cd067a759963b58))

## [2.4.10](https://github.com/webtorrent/webtorrent/compare/v2.4.9...v2.4.10) (2024-06-29)


### Bug Fixes

* force streamx version ([#2826](https://github.com/webtorrent/webtorrent/issues/2826)) ([1f96952](https://github.com/webtorrent/webtorrent/commit/1f96952dbac120a52c27d5a65cb4384d28f748ab))

## [2.4.9](https://github.com/webtorrent/webtorrent/compare/v2.4.8...v2.4.9) (2024-06-29)


### Bug Fixes

* **deps:** update dependency @thaunknown/simple-peer to ^10.0.9 ([fc54e8e](https://github.com/webtorrent/webtorrent/commit/fc54e8e3c1fba34ca87b2312a91f72ecdfc26907))

## [2.4.8](https://github.com/webtorrent/webtorrent/compare/v2.4.7...v2.4.8) (2024-06-29)


### Bug Fixes

* drop IDB chunk store ([#2553](https://github.com/webtorrent/webtorrent/issues/2553)) ([18a4683](https://github.com/webtorrent/webtorrent/commit/18a468304c3826da42d6e4a4bc7e074ea9297187))

## [2.4.7](https://github.com/webtorrent/webtorrent/compare/v2.4.6...v2.4.7) (2024-06-29)


### Bug Fixes

* **deps:** update dependency parse-torrent to ^11.0.17 ([72f4abc](https://github.com/webtorrent/webtorrent/commit/72f4abc2963b985faa905cbea2da77f84600c706))

## [2.4.6](https://github.com/webtorrent/webtorrent/compare/v2.4.5...v2.4.6) (2024-06-29)


### Bug Fixes

* revert streamx to 2.17 ([#2819](https://github.com/webtorrent/webtorrent/issues/2819)) ([f4465d0](https://github.com/webtorrent/webtorrent/commit/f4465d043f301452682a8db562d90123b94cd58e))

## [2.4.5](https://github.com/webtorrent/webtorrent/compare/v2.4.4...v2.4.5) (2024-06-29)


### Bug Fixes

* **deps:** update dependency bittorrent-protocol to ^4.1.13 ([d596da6](https://github.com/webtorrent/webtorrent/commit/d596da6da8ea3f6f2f65947ab9e15fcebbb2ba9c))

## [2.4.4](https://github.com/webtorrent/webtorrent/compare/v2.4.3...v2.4.4) (2024-06-28)


### Bug Fixes

* **deps:** update dependency streamx to ^2.18.0 ([#2798](https://github.com/webtorrent/webtorrent/issues/2798)) ([20e18b3](https://github.com/webtorrent/webtorrent/commit/20e18b3dbc9be6c2e9abfadaf041e986b99fa690))

## [2.4.3](https://github.com/webtorrent/webtorrent/compare/v2.4.2...v2.4.3) (2024-06-28)


### Bug Fixes

* **deps:** update dependency @thaunknown/simple-peer to ^10.0.8 ([27e34e5](https://github.com/webtorrent/webtorrent/commit/27e34e5059281af5a9d0de4231d3304fd71c5bda))
* **deps:** update dependency hybrid-chunk-store to ^1.2.6 ([#2818](https://github.com/webtorrent/webtorrent/issues/2818)) ([478c691](https://github.com/webtorrent/webtorrent/commit/478c691bd89ab54f9e76dcddce7eb0f56d8bca68))

## [2.4.2](https://github.com/webtorrent/webtorrent/compare/v2.4.1...v2.4.2) (2024-06-22)


### Bug Fixes

* allow client level default trackers to be set ([#2815](https://github.com/webtorrent/webtorrent/issues/2815)) ([a0e056d](https://github.com/webtorrent/webtorrent/commit/a0e056dc01c08c78e8b5ab33b3f50b7e96b37825))

## [2.4.1](https://github.com/webtorrent/webtorrent/compare/v2.4.0...v2.4.1) (2024-06-13)

# [2.4.0](https://github.com/webtorrent/webtorrent/compare/v2.3.6...v2.4.0) (2024-06-06)


### Features

* add `opts.seedOutgoingConnections` to allow controlling outbound connections for seeding. ([#2803](https://github.com/webtorrent/webtorrent/issues/2803)) ([d40616f](https://github.com/webtorrent/webtorrent/commit/d40616f27d1b584b1a8db66e75638298388505c9))

## [2.3.6](https://github.com/webtorrent/webtorrent/compare/v2.3.5...v2.3.6) (2024-06-02)


### Bug Fixes

* **deps:** update webtorrent to ^11.0.6 ([63061c6](https://github.com/webtorrent/webtorrent/commit/63061c68dcd070db982e824eaccee755429f3549))

## [2.3.5](https://github.com/webtorrent/webtorrent/compare/v2.3.4...v2.3.5) (2024-06-01)


### Bug Fixes

* **deps:** update dependency torrent-discovery to ^11.0.5 ([4742c01](https://github.com/webtorrent/webtorrent/commit/4742c01560e9f28d2d5bd194f6b84f3b5889ecd1))

## [2.3.4](https://github.com/webtorrent/webtorrent/compare/v2.3.3...v2.3.4) (2024-06-01)


### Bug Fixes

* **deps:** update webtorrent ([6ff995f](https://github.com/webtorrent/webtorrent/commit/6ff995fafffb59138f31705fdca5944b0eafbb0c))

## [2.3.3](https://github.com/webtorrent/webtorrent/compare/v2.3.2...v2.3.3) (2024-06-01)


### Bug Fixes

* **deps:** update dependency debug to ^4.3.5 ([4a47201](https://github.com/webtorrent/webtorrent/commit/4a472018dfc5c6ca218d5a1b7ba4683aa8e312a7))

## [2.3.2](https://github.com/webtorrent/webtorrent/compare/v2.3.1...v2.3.2) (2024-05-25)


### Bug Fixes

* **deps:** update dependency bitfield to ^4.2.0 ([#2730](https://github.com/webtorrent/webtorrent/issues/2730)) ([867e4f2](https://github.com/webtorrent/webtorrent/commit/867e4f2cabcc4087fc55ef3cc0bc1e5f2d75fb21))

## [2.3.1](https://github.com/webtorrent/webtorrent/compare/v2.3.0...v2.3.1) (2024-05-23)


### Bug Fixes

* **deps:** update dependency uint8-util to ^2.2.5 ([#2784](https://github.com/webtorrent/webtorrent/issues/2784)) ([3c3993f](https://github.com/webtorrent/webtorrent/commit/3c3993fb8c49c99214f7dce514b8751f37f4a277))

# [2.3.0](https://github.com/webtorrent/webtorrent/compare/v2.2.2...v2.3.0) (2024-05-23)


### Features

* Built-in-webrtc ([#2786](https://github.com/webtorrent/webtorrent/issues/2786)) ([c693f9e](https://github.com/webtorrent/webtorrent/commit/c693f9ea91c32b0f8e81d2d57476405fda86c7a7))

## [2.2.2](https://github.com/webtorrent/webtorrent/compare/v2.2.1...v2.2.2) (2024-05-23)


### Bug Fixes

* **deps:** update dependency torrent-discovery to ^11.0.4 ([9841d3d](https://github.com/webtorrent/webtorrent/commit/9841d3d99e7329a57abb40f9ef80dc914db6699e))

## [2.2.1](https://github.com/webtorrent/webtorrent/compare/v2.2.0...v2.2.1) (2024-03-26)


### Bug Fixes

* **deps:** update dependency hybrid-chunk-store to ^1.2.4 ([#2764](https://github.com/webtorrent/webtorrent/issues/2764)) ([9ce6188](https://github.com/webtorrent/webtorrent/commit/9ce61882717a197aa9a05defe011c2135b44d235))

# [2.2.0](https://github.com/webtorrent/webtorrent/compare/v2.1.37...v2.2.0) (2024-03-26)


### Features

* Refactor selections with non-overlapping data structure ([#2757](https://github.com/webtorrent/webtorrent/issues/2757)) ([467f30c](https://github.com/webtorrent/webtorrent/commit/467f30ccb48d318e7cf9e801d40ec3158fa220f6))

## [2.1.37](https://github.com/webtorrent/webtorrent/compare/v2.1.36...v2.1.37) (2024-03-04)


### Bug Fixes

* **deps:** update dependency streamx to ^2.16.1 ([#2752](https://github.com/webtorrent/webtorrent/issues/2752)) ([33e87e2](https://github.com/webtorrent/webtorrent/commit/33e87e281c02d9cb9f3be7468271722d7d0c3a76))

## [2.1.36](https://github.com/webtorrent/webtorrent/compare/v2.1.35...v2.1.36) (2024-02-09)


### Bug Fixes

* **deps:** update dependency create-torrent to ^6.0.17 ([54f6add](https://github.com/webtorrent/webtorrent/commit/54f6addef3f4e275b51f8c17f7bbd6e99beaf3f3))

## [2.1.35](https://github.com/webtorrent/webtorrent/compare/v2.1.34...v2.1.35) (2024-02-04)


### Bug Fixes

* **deps:** update dependency streamx to ^2.15.7 ([#2748](https://github.com/webtorrent/webtorrent/issues/2748)) ([13b135f](https://github.com/webtorrent/webtorrent/commit/13b135f42e985b6af8b676dda24bca1aa75a7a5a))

## [2.1.34](https://github.com/webtorrent/webtorrent/compare/v2.1.33...v2.1.34) (2024-01-16)


### Bug Fixes

* **deps:** update webtorrent ([0585322](https://github.com/webtorrent/webtorrent/commit/058532277f6e3a80cf9a772e3d8ca45ec7a41762))

## [2.1.33](https://github.com/webtorrent/webtorrent/compare/v2.1.32...v2.1.33) (2024-01-12)


### Bug Fixes

* malformed debug ID ([#2733](https://github.com/webtorrent/webtorrent/issues/2733)) ([2453316](https://github.com/webtorrent/webtorrent/commit/24533162fada3d93404bfe104f5a0b9861350d0d))

## [2.1.32](https://github.com/webtorrent/webtorrent/compare/v2.1.31...v2.1.32) (2023-12-12)


### Bug Fixes

* **deps:** update dependency create-torrent to ^6.0.16 ([97c0af1](https://github.com/webtorrent/webtorrent/commit/97c0af1e165f77f912e133fdf896d8cea3a5476a))

## [2.1.31](https://github.com/webtorrent/webtorrent/compare/v2.1.30...v2.1.31) (2023-12-11)


### Bug Fixes

* **deps:** update dependency streamx to ^2.15.6 ([#2715](https://github.com/webtorrent/webtorrent/issues/2715)) ([3f4a80f](https://github.com/webtorrent/webtorrent/commit/3f4a80f8cea979d1d18329aec097bcdb22a9f2bc))

## [2.1.30](https://github.com/webtorrent/webtorrent/compare/v2.1.29...v2.1.30) (2023-11-30)


### Bug Fixes

* **deps:** update dependency streamx to ^2.15.5 ([#2695](https://github.com/webtorrent/webtorrent/issues/2695)) ([262e1e5](https://github.com/webtorrent/webtorrent/commit/262e1e5c66815a3a3f5ebd1d408c1dd5e7cd60da))

## [2.1.29](https://github.com/webtorrent/webtorrent/compare/v2.1.28...v2.1.29) (2023-11-12)


### Bug Fixes

* chromeapp build ([#2704](https://github.com/webtorrent/webtorrent/issues/2704)) ([ed9f368](https://github.com/webtorrent/webtorrent/commit/ed9f368fbbcb076f963e26a627ef6bc36b91a4b2))

## [2.1.28](https://github.com/webtorrent/webtorrent/compare/v2.1.27...v2.1.28) (2023-11-09)


### Bug Fixes

* **deps:** update dependency torrent-discovery to v11 ([#2702](https://github.com/webtorrent/webtorrent/issues/2702)) ([62ff1bf](https://github.com/webtorrent/webtorrent/commit/62ff1bf6559474eb114f131c30eed18ff485afc0))

## [2.1.27](https://github.com/webtorrent/webtorrent/compare/v2.1.26...v2.1.27) (2023-10-03)


### Bug Fixes

* **deps:** update dependency uint8-util to ^2.2.4 ([#2653](https://github.com/webtorrent/webtorrent/issues/2653)) ([26ab5d3](https://github.com/webtorrent/webtorrent/commit/26ab5d3e2196cc92edde3d89c1b8877a1385700a))

## [2.1.26](https://github.com/webtorrent/webtorrent/compare/v2.1.25...v2.1.26) (2023-10-02)


### Bug Fixes

* incorrect File.stream() object this reference ([#2672](https://github.com/webtorrent/webtorrent/issues/2672)) ([8577a47](https://github.com/webtorrent/webtorrent/commit/8577a4719e32ece57f8e9d30df4c7e819e1b0f70))

## [2.1.25](https://github.com/webtorrent/webtorrent/compare/v2.1.24...v2.1.25) (2023-08-11)


### Bug Fixes

* **deps:** update webtorrent ([1639c0e](https://github.com/webtorrent/webtorrent/commit/1639c0ea095942fdddaaee63b05e30498c2984d2))

## [2.1.24](https://github.com/webtorrent/webtorrent/compare/v2.1.23...v2.1.24) (2023-08-11)


### Bug Fixes

* **deps:** update dependency bittorrent-protocol to ^4.1.11 ([701280f](https://github.com/webtorrent/webtorrent/commit/701280f635e375b0166c902925dadb6fa31c424c))

## [2.1.23](https://github.com/webtorrent/webtorrent/compare/v2.1.22...v2.1.23) (2023-08-10)


### Bug Fixes

* **deps:** update dependency create-torrent to ^6.0.14 ([d7e81ea](https://github.com/webtorrent/webtorrent/commit/d7e81ea886c272efc0cad5944082aeab9fd66cf8))

## [2.1.22](https://github.com/webtorrent/webtorrent/compare/v2.1.21...v2.1.22) (2023-08-10)


### Bug Fixes

* **deps:** update webtorrent ([d447f8c](https://github.com/webtorrent/webtorrent/commit/d447f8c1718c22df4c81844197119d17b5200e00))

## [2.1.21](https://github.com/webtorrent/webtorrent/compare/v2.1.20...v2.1.21) (2023-08-10)


### Bug Fixes

* **deps:** update dependency bittorrent-protocol to ^4.1.10 ([0c60f65](https://github.com/webtorrent/webtorrent/commit/0c60f651ec5c4ab562d5cd155e887971fa78e5bf))

## [2.1.20](https://github.com/webtorrent/webtorrent/compare/v2.1.19...v2.1.20) (2023-08-10)


### Bug Fixes

* **deps:** update dependency ut_metadata to ^4.0.3 ([c62044a](https://github.com/webtorrent/webtorrent/commit/c62044ae9fe5399526a896cb1bce1f16ff79b87f))

## [2.1.19](https://github.com/webtorrent/webtorrent/compare/v2.1.18...v2.1.19) (2023-08-10)


### Bug Fixes

* **deps:** update webtorrent ([4a60108](https://github.com/webtorrent/webtorrent/commit/4a601081b74876cd0368155becffacee944c32b0))

## [2.1.18](https://github.com/webtorrent/webtorrent/compare/v2.1.17...v2.1.18) (2023-08-09)


### Bug Fixes

* **deps:** update dependency streamx to ^2.15.1 ([#2593](https://github.com/webtorrent/webtorrent/issues/2593)) ([260fca8](https://github.com/webtorrent/webtorrent/commit/260fca8bac9efa2d102f70010815d3e6d91f7bbd))

## [2.1.17](https://github.com/webtorrent/webtorrent/compare/v2.1.16...v2.1.17) (2023-08-06)


### Bug Fixes

* **deps:** update webtorrent ([9ad7e9b](https://github.com/webtorrent/webtorrent/commit/9ad7e9bf51fc88944a6d06888a2cbeccccb09612))

## [2.1.16](https://github.com/webtorrent/webtorrent/compare/v2.1.15...v2.1.16) (2023-07-30)


### Bug Fixes

* **deps:** update dependency uint8-util to ^2.2.2 ([#2633](https://github.com/webtorrent/webtorrent/issues/2633)) ([8478be4](https://github.com/webtorrent/webtorrent/commit/8478be42b694eaaf7370ca5f8370973683bca0f8))

## [2.1.15](https://github.com/webtorrent/webtorrent/compare/v2.1.14...v2.1.15) (2023-07-24)


### Bug Fixes

* **deps:** update webtorrent ([f9b34d6](https://github.com/webtorrent/webtorrent/commit/f9b34d615baec11a597e22894bf5384671af24c1))

## [2.1.14](https://github.com/webtorrent/webtorrent/compare/v2.1.13...v2.1.14) (2023-07-23)


### Bug Fixes

* **deps:** update dependency torrent-piece to v3 ([#2623](https://github.com/webtorrent/webtorrent/issues/2623)) ([7fb7afa](https://github.com/webtorrent/webtorrent/commit/7fb7afab083551c9d6e60998eeb1837f80b45b6c))

## [2.1.13](https://github.com/webtorrent/webtorrent/compare/v2.1.12...v2.1.13) (2023-07-19)


### Bug Fixes

* **deps:** update dependency @silentbot1/nat-api to ^0.4.7 ([#2619](https://github.com/webtorrent/webtorrent/issues/2619)) ([a44286c](https://github.com/webtorrent/webtorrent/commit/a44286c4f7ea69c79a238651c95ef42d93e70581))

## [2.1.12](https://github.com/webtorrent/webtorrent/compare/v2.1.11...v2.1.12) (2023-07-05)


### Bug Fixes

* perf: faster stream resolution ([#2607](https://github.com/webtorrent/webtorrent/issues/2607)) ([e692270](https://github.com/webtorrent/webtorrent/commit/e692270cf9ba7d793b4b35b509ac0572f07477ce))

## [2.1.11](https://github.com/webtorrent/webtorrent/compare/v2.1.10...v2.1.11) (2023-06-17)


### Performance Improvements

* drop buffer ([#2596](https://github.com/webtorrent/webtorrent/issues/2596)) ([7679994](https://github.com/webtorrent/webtorrent/commit/76799949239b784f98ccfc45210f68c7233e74ac))

## [2.1.10](https://github.com/webtorrent/webtorrent/compare/v2.1.9...v2.1.10) (2023-06-17)


### Bug Fixes

* **deps:** update dependency hybrid-chunk-store to ^1.2.2 ([#2595](https://github.com/webtorrent/webtorrent/issues/2595)) ([b04cc7a](https://github.com/webtorrent/webtorrent/commit/b04cc7a8ca3d555ebaecff0c3b90f91bc31d1508))

## [2.1.9](https://github.com/webtorrent/webtorrent/compare/v2.1.8...v2.1.9) (2023-06-17)


### Bug Fixes

* **deps:** update webtorrent ([#2592](https://github.com/webtorrent/webtorrent/issues/2592)) ([0c62c36](https://github.com/webtorrent/webtorrent/commit/0c62c366b0310161c2d98a658515dac3f0d16502))

## [2.1.8](https://github.com/webtorrent/webtorrent/compare/v2.1.7...v2.1.8) (2023-06-16)


### Performance Improvements

* use peer/lite ([#2591](https://github.com/webtorrent/webtorrent/issues/2591)) ([4e853f0](https://github.com/webtorrent/webtorrent/commit/4e853f0e965bbca21033c3912f8cc990b35ac2bf))

## [2.1.7](https://github.com/webtorrent/webtorrent/compare/v2.1.6...v2.1.7) (2023-06-16)


### Bug Fixes

* **deps:** update webtorrent ([#2590](https://github.com/webtorrent/webtorrent/issues/2590)) ([01865c0](https://github.com/webtorrent/webtorrent/commit/01865c09dd84527dcf0d3caf3cbcb408bf009e2f))

## [2.1.6](https://github.com/webtorrent/webtorrent/compare/v2.1.5...v2.1.6) (2023-06-16)


### Performance Improvements

* use path-esm as polyfill for path ([#2587](https://github.com/webtorrent/webtorrent/issues/2587)) ([6e08b00](https://github.com/webtorrent/webtorrent/commit/6e08b0069f1c7d7357ac56fcff9a81e0e07ff452))

## [2.1.5](https://github.com/webtorrent/webtorrent/compare/v2.1.4...v2.1.5) (2023-06-16)


### Bug Fixes

* **deps:** update dependency @thaunknown/simple-peer to ^9.12.1 ([#2588](https://github.com/webtorrent/webtorrent/issues/2588)) ([9ea487b](https://github.com/webtorrent/webtorrent/commit/9ea487b4f2470ba6d3afb4bcdbc4a19504a31a25))

## [2.1.4](https://github.com/webtorrent/webtorrent/compare/v2.1.3...v2.1.4) (2023-06-16)


### Bug Fixes

* **deps:** update dependency hybrid-chunk-store to ^1.2.1 ([#2589](https://github.com/webtorrent/webtorrent/issues/2589)) ([f482419](https://github.com/webtorrent/webtorrent/commit/f482419d5ad94e205f33c2aa4d67e8ba4ad9ddfb))

## [2.1.3](https://github.com/webtorrent/webtorrent/compare/v2.1.2...v2.1.3) (2023-06-16)


### Bug Fixes

* **deps:** update dependency streamx to ^2.14.3 ([#2583](https://github.com/webtorrent/webtorrent/issues/2583)) ([d68ea94](https://github.com/webtorrent/webtorrent/commit/d68ea941d53d6dfdf39046796c215c332fd338ab))

## [2.1.2](https://github.com/webtorrent/webtorrent/compare/v2.1.1...v2.1.2) (2023-06-16)


### Bug Fixes

* **deps:** update dependency fs-chunk-store to ^4.1.0 ([c9103bf](https://github.com/webtorrent/webtorrent/commit/c9103bf410ad81d9afd3683a9c856bcbe3bf5079))

## [2.1.1](https://github.com/webtorrent/webtorrent/compare/v2.1.0...v2.1.1) (2023-06-15)


### Bug Fixes

* Revert "fix: correctly destroy piped streams in server" ([#2585](https://github.com/webtorrent/webtorrent/issues/2585)) ([e3c9269](https://github.com/webtorrent/webtorrent/commit/e3c9269b9f9deba824559054ea6ba2e369357b60)), closes [#2565](https://github.com/webtorrent/webtorrent/issues/2565)

# [2.1.0](https://github.com/webtorrent/webtorrent/compare/v2.0.37...v2.1.0) (2023-06-13)


### Features

* update dependency streamx to ^2.14.1 ([#2580](https://github.com/webtorrent/webtorrent/issues/2580)) ([92df3a9](https://github.com/webtorrent/webtorrent/commit/92df3a963293d5bee4b22a01421f794907966e19))

## [2.0.37](https://github.com/webtorrent/webtorrent/compare/v2.0.36...v2.0.37) (2023-06-08)


### Bug Fixes

* dont encode url path ([#2573](https://github.com/webtorrent/webtorrent/issues/2573)) ([13ad0fb](https://github.com/webtorrent/webtorrent/commit/13ad0fb4f20d6035889569a55c89d4ef813a246d))

## [2.0.36](https://github.com/webtorrent/webtorrent/compare/v2.0.35...v2.0.36) (2023-06-08)


### Bug Fixes

* **deps:** update dependency torrent-discovery to ^10.0.11 ([9415322](https://github.com/webtorrent/webtorrent/commit/94153227df2e0371af11dedf24cb1bd429dc2760))

## [2.0.35](https://github.com/webtorrent/webtorrent/compare/v2.0.34...v2.0.35) (2023-06-07)


### Bug Fixes

* **deps:** update dependency semantic-release to v21 ([#2510](https://github.com/webtorrent/webtorrent/issues/2510)) ([e74b843](https://github.com/webtorrent/webtorrent/commit/e74b843f2f102d590d68db1db15ea7ac840fc485))

## [2.0.34](https://github.com/webtorrent/webtorrent/compare/v2.0.33...v2.0.34) (2023-06-05)


### Bug Fixes

* **deps:** update dependency torrent-discovery to ^10.0.10 ([#2569](https://github.com/webtorrent/webtorrent/issues/2569)) ([31796f8](https://github.com/webtorrent/webtorrent/commit/31796f82f24ed4da2f634eec84203b49688b589c))

## [2.0.33](https://github.com/webtorrent/webtorrent/compare/v2.0.32...v2.0.33) (2023-06-05)


### Bug Fixes

* **deps:** update dependency streamx to ^2.14.0 ([#2568](https://github.com/webtorrent/webtorrent/issues/2568)) ([29f412a](https://github.com/webtorrent/webtorrent/commit/29f412a665b95bdb35d10c5129271705edc1e184))

## [2.0.32](https://github.com/webtorrent/webtorrent/compare/v2.0.31...v2.0.32) (2023-06-05)


### Bug Fixes

* **deps:** update dependency streamx to ^2.13.3 ([#2562](https://github.com/webtorrent/webtorrent/issues/2562)) ([11f86db](https://github.com/webtorrent/webtorrent/commit/11f86dbf495f2e16952054f3f0cea76d6a812fce))

## [2.0.31](https://github.com/webtorrent/webtorrent/compare/v2.0.30...v2.0.31) (2023-06-05)


### Bug Fixes

* correctly destroy piped streams in server ([#2565](https://github.com/webtorrent/webtorrent/issues/2565)) ([86eda0a](https://github.com/webtorrent/webtorrent/commit/86eda0a470c4a5418a15ad55c31648ee043270c3))

## [2.0.30](https://github.com/webtorrent/webtorrent/compare/v2.0.29...v2.0.30) (2023-06-05)


### Bug Fixes

* utp support bundlers and preprocessors ([#2564](https://github.com/webtorrent/webtorrent/issues/2564)) ([8b13937](https://github.com/webtorrent/webtorrent/commit/8b13937289629eeceb59a8dc8a9d4336d8f91ae7))

## [2.0.29](https://github.com/webtorrent/webtorrent/compare/v2.0.28...v2.0.29) (2023-06-04)


### Bug Fixes

* utp ([#2561](https://github.com/webtorrent/webtorrent/issues/2561)) ([e4b2e34](https://github.com/webtorrent/webtorrent/commit/e4b2e34a69b6a09197b1cd8406f19fe2099c76a5))

## [2.0.28](https://github.com/webtorrent/webtorrent/compare/v2.0.27...v2.0.28) (2023-06-03)


### Bug Fixes

* attempt to fix saucelabs CI ([#2557](https://github.com/webtorrent/webtorrent/issues/2557)) ([c89c27d](https://github.com/webtorrent/webtorrent/commit/c89c27d546bb89cfbe897f144afe48559452816f))

## [2.0.27](https://github.com/webtorrent/webtorrent/compare/v2.0.26...v2.0.27) (2023-05-31)


### Bug Fixes

* **deps:** update dependency lt_donthave to v2 ([#2555](https://github.com/webtorrent/webtorrent/issues/2555)) ([21e5007](https://github.com/webtorrent/webtorrent/commit/21e5007e111de492ce46c6d858c7b4a6b05523af))

## [2.0.26](https://github.com/webtorrent/webtorrent/compare/v2.0.25...v2.0.26) (2023-05-31)


### Bug Fixes

* **deps:** update dependency parse-torrent to ^11.0.12 ([2766f6f](https://github.com/webtorrent/webtorrent/commit/2766f6fa396bc2f82595a83d7ede3effd0d53a42))

## [2.0.25](https://github.com/webtorrent/webtorrent/compare/v2.0.24...v2.0.25) (2023-05-30)


### Bug Fixes

* drop simple-concat ([#2552](https://github.com/webtorrent/webtorrent/issues/2552)) ([1243a76](https://github.com/webtorrent/webtorrent/commit/1243a76e51228e469568a52c94dc9bf666ee93be))

## [2.0.24](https://github.com/webtorrent/webtorrent/compare/v2.0.23...v2.0.24) (2023-05-30)


### Bug Fixes

* **deps:** update dependency bittorrent-protocol to ^4.1.7 ([#2551](https://github.com/webtorrent/webtorrent/issues/2551)) ([da87d38](https://github.com/webtorrent/webtorrent/commit/da87d3827fef1e16405328c16c4f21d4e943c4e2))

## [2.0.23](https://github.com/webtorrent/webtorrent/compare/v2.0.22...v2.0.23) (2023-05-28)


### Bug Fixes

* drop randombytes ([#2546](https://github.com/webtorrent/webtorrent/issues/2546)) ([06b6548](https://github.com/webtorrent/webtorrent/commit/06b6548fab240f425704abe044dea1be5c5662fe))

## [2.0.22](https://github.com/webtorrent/webtorrent/compare/v2.0.21...v2.0.22) (2023-05-27)


### Bug Fixes

* **deps:** update dependency torrent-discovery to ^10.0.9 ([#2545](https://github.com/webtorrent/webtorrent/issues/2545)) ([e28a7ba](https://github.com/webtorrent/webtorrent/commit/e28a7ba784c970bb33a7218a21c7d0b497be23a2))

## [2.0.21](https://github.com/webtorrent/webtorrent/compare/v2.0.20...v2.0.21) (2023-05-27)


### Performance Improvements

* reduce the impact of request idle callback ([#2542](https://github.com/webtorrent/webtorrent/issues/2542)) ([36a3e36](https://github.com/webtorrent/webtorrent/commit/36a3e3617a03a39b1fbceadf265ab297ae647500))

## [2.0.20](https://github.com/webtorrent/webtorrent/compare/v2.0.19...v2.0.20) (2023-05-27)


### Bug Fixes

* replace simple-peer with maintained one ([#2540](https://github.com/webtorrent/webtorrent/issues/2540)) ([2994641](https://github.com/webtorrent/webtorrent/commit/29946414dbc53a23adf61e91d302fa1ea82f543f))

## [2.0.19](https://github.com/webtorrent/webtorrent/compare/v2.0.18...v2.0.19) (2023-05-27)


### Bug Fixes

* **deps:** update dependency torrent-discovery to ^10.0.8 ([714535b](https://github.com/webtorrent/webtorrent/commit/714535bc30466c5bf84a9c544747b9a16b57a21d))

## [2.0.18](https://github.com/webtorrent/webtorrent/compare/v2.0.17...v2.0.18) (2023-05-07)


### Bug Fixes

* **deps:** update dependency @webtorrent/semantic-release-config to v1.0.9 ([#2528](https://github.com/webtorrent/webtorrent/issues/2528)) ([19d26f0](https://github.com/webtorrent/webtorrent/commit/19d26f00b7a0a0617ca4c0d6d94806a5256353ed))

## [2.0.17](https://github.com/webtorrent/webtorrent/compare/v2.0.16...v2.0.17) (2023-05-04)


### Bug Fixes

* http rejections handling ([#2525](https://github.com/webtorrent/webtorrent/issues/2525)) ([6232ea0](https://github.com/webtorrent/webtorrent/commit/6232ea0ab10b29a7c92697d9376c8065eaf29e6e))

## [2.0.16](https://github.com/webtorrent/webtorrent/compare/v2.0.15...v2.0.16) (2023-04-03)


### Bug Fixes

* **deps:** update webtorrent ([7a7838c](https://github.com/webtorrent/webtorrent/commit/7a7838c158ca35ad9587e5316521a776b4a3a8f5))

## [2.0.15](https://github.com/webtorrent/webtorrent/compare/v2.0.14...v2.0.15) (2023-03-20)


### Bug Fixes

* Replace setting blob 'mimeType' property with 'type' ([#2502](https://github.com/webtorrent/webtorrent/issues/2502)) ([869bdcd](https://github.com/webtorrent/webtorrent/commit/869bdcd438052ac6a23dd3ac73c77146cd853c83))

## [2.0.14](https://github.com/webtorrent/webtorrent/compare/v2.0.13...v2.0.14) (2023-02-22)


### Bug Fixes

* **deps:** update dependency create-torrent to ^6.0.10 ([d9e6784](https://github.com/webtorrent/webtorrent/commit/d9e678471124638c1ffa4b305d4fa6bc1165aa4f))

## [2.0.13](https://github.com/webtorrent/webtorrent/compare/v2.0.12...v2.0.13) (2023-02-13)


### Bug Fixes

* **deps:** update dependency hybrid-chunk-store to ^1.2.0 ([#2482](https://github.com/webtorrent/webtorrent/issues/2482)) ([792876b](https://github.com/webtorrent/webtorrent/commit/792876b10bcd5d6a16f98bb93f95ab691447df79))

## [2.0.12](https://github.com/webtorrent/webtorrent/compare/v2.0.11...v2.0.12) (2023-02-06)


### Bug Fixes

* **deps:** update dependency uint8-util to ^2.1.9 ([#2480](https://github.com/webtorrent/webtorrent/issues/2480)) ([d9efb5d](https://github.com/webtorrent/webtorrent/commit/d9efb5d329a0404bda21430994c112e0534339ff))

## [2.0.11](https://github.com/webtorrent/webtorrent/compare/v2.0.10...v2.0.11) (2023-02-01)


### Bug Fixes

* **deps:** update dependency cross-fetch-ponyfill to ^1.0.3 ([#2477](https://github.com/webtorrent/webtorrent/issues/2477)) ([970d937](https://github.com/webtorrent/webtorrent/commit/970d937b9086d5a72f0ec4608e232deb951236a8))

## [2.0.10](https://github.com/webtorrent/webtorrent/compare/v2.0.9...v2.0.10) (2023-02-01)


### Bug Fixes

* **deps:** update dependency cross-fetch-ponyfill to ^1.0.3 ([#2475](https://github.com/webtorrent/webtorrent/issues/2475)) ([63eeed1](https://github.com/webtorrent/webtorrent/commit/63eeed1090202d47c6dab9a3743cb0e5be1a64c0))

## [2.0.9](https://github.com/webtorrent/webtorrent/compare/v2.0.8...v2.0.9) (2023-02-01)


### Bug Fixes

* **deps:** update webtorrent ([#2474](https://github.com/webtorrent/webtorrent/issues/2474)) ([bfbf36b](https://github.com/webtorrent/webtorrent/commit/bfbf36be6fe3ddda7112333a13c256a4bf2d190b)), closes [#2476](https://github.com/webtorrent/webtorrent/issues/2476)

## [2.0.8](https://github.com/webtorrent/webtorrent/compare/v2.0.7...v2.0.8) (2023-01-31)


### Bug Fixes

* **deps:** update dependency uint8-util to ^2.1.7 ([#2473](https://github.com/webtorrent/webtorrent/issues/2473)) ([9a6edff](https://github.com/webtorrent/webtorrent/commit/9a6edff4ae25dfcef1dd168b1ef5066855eccbb0))

## [2.0.7](https://github.com/webtorrent/webtorrent/compare/v2.0.6...v2.0.7) (2023-01-31)


### Bug Fixes

* **deps:** update dependency parse-torrent to ^11.0.5 ([#2470](https://github.com/webtorrent/webtorrent/issues/2470)) ([9447cd6](https://github.com/webtorrent/webtorrent/commit/9447cd65d522cd84d2abbe36bf9bc950631e6b7c))

## [2.0.6](https://github.com/webtorrent/webtorrent/compare/v2.0.5...v2.0.6) (2023-01-30)


### Performance Improvements

* drop simple-get ([#2448](https://github.com/webtorrent/webtorrent/issues/2448)) ([b3c8376](https://github.com/webtorrent/webtorrent/commit/b3c83763abc964b705d66272ec7d76300ca0e4d2))

## [2.0.5](https://github.com/webtorrent/webtorrent/compare/v2.0.4...v2.0.5) (2023-01-30)


### Bug Fixes

* **deps:** update dependency parse-torrent to v11 ([#2459](https://github.com/webtorrent/webtorrent/issues/2459)) ([4cb909d](https://github.com/webtorrent/webtorrent/commit/4cb909df7f368d4aeec1345f10c90ab4c44d8308)), closes [#2461](https://github.com/webtorrent/webtorrent/issues/2461)

## [2.0.4](https://github.com/webtorrent/webtorrent/compare/v2.0.3...v2.0.4) (2023-01-28)


### Bug Fixes

* make server index pages return links with absolute urls ([#2455](https://github.com/webtorrent/webtorrent/issues/2455)) ([f2687e2](https://github.com/webtorrent/webtorrent/commit/f2687e28ea370c8e9e2ec4a8ed15c398c01f645a)), closes [#2454](https://github.com/webtorrent/webtorrent/issues/2454)

## [2.0.3](https://github.com/webtorrent/webtorrent/compare/v2.0.2...v2.0.3) (2023-01-28)


### Bug Fixes

* **deps:** update dependency fs-chunk-store to ^4.0.1 ([#2463](https://github.com/webtorrent/webtorrent/issues/2463)) ([bb7c640](https://github.com/webtorrent/webtorrent/commit/bb7c6405b264223d7af13e21c654e575c2499b79))

## [2.0.2](https://github.com/webtorrent/webtorrent/compare/v2.0.1...v2.0.2) (2023-01-28)


### Performance Improvements

* drop streamx ([#2462](https://github.com/webtorrent/webtorrent/issues/2462)) ([cde79ed](https://github.com/webtorrent/webtorrent/commit/cde79edf540932f10c9af26ccc5c56489e362a9f))

## [2.0.1](https://github.com/webtorrent/webtorrent/compare/v2.0.0...v2.0.1) (2023-01-25)


### Bug Fixes

* **deps:** update dependency hybrid-chunk-store to ^1.1.3 ([2b7c435](https://github.com/webtorrent/webtorrent/commit/2b7c43576645baf1208c4352ce1e4dcc96554b3c))

# [2.0.0](https://github.com/webtorrent/webtorrent/compare/v1.9.7...v2.0.0) (2023-01-23)


### Bug Fixes

* dependencies ([9bd7933](https://github.com/webtorrent/webtorrent/commit/9bd7933e4a1858dac20a668d1a12c26903cf77e5))
* deprecate render-media ([#2180](https://github.com/webtorrent/webtorrent/issues/2180)) ([8b5ecea](https://github.com/webtorrent/webtorrent/commit/8b5ecea9a12be44fb258b2da31c3e1e35e9b725e))
* **deps:** update dependency streamx to ^2.13.1 ([#2430](https://github.com/webtorrent/webtorrent/issues/2430)) ([fb5f5a6](https://github.com/webtorrent/webtorrent/commit/fb5f5a65f373a61b41d83b7ec5a5c0ca85eb7343))
* **deps:** update dependency streamx to ^2.13.2 ([#2438](https://github.com/webtorrent/webtorrent/issues/2438)) ([4a177d7](https://github.com/webtorrent/webtorrent/commit/4a177d737a123aec2362b8be6c75a6dbabb991ec))
* documentation, unity ([9ae5f17](https://github.com/webtorrent/webtorrent/commit/9ae5f177de6b7ba40440740b885098c58229e445))
* ESM browser tests ([975c463](https://github.com/webtorrent/webtorrent/commit/975c46399fbda71a0baac1c81798156789fd83ca))
* remove dead code ([2839c7a](https://github.com/webtorrent/webtorrent/commit/2839c7a55222d5b74feb2ce423b3cc2be61ee4e8))
* remove tap-spec where it's not necessary ([5188eca](https://github.com/webtorrent/webtorrent/commit/5188ecac01b30115b20e87bfc4fec46348ea7f8d))
* revert bittorent-protocol ver ([28df830](https://github.com/webtorrent/webtorrent/commit/28df830b2273200cf499fb3327259cd4c9c49eb9))
* standard [whitespace] ([a4bc0c3](https://github.com/webtorrent/webtorrent/commit/a4bc0c3c5167405d0b93f8f061d9bad3229414fd))
* standard linting ([a64a719](https://github.com/webtorrent/webtorrent/commit/a64a719e6a854f8d22d5b37781ee268441ca967d))


### Continuous Integration

* fix release node 18 ([25eb995](https://github.com/webtorrent/webtorrent/commit/25eb995c9804a0a4e6022e0be3b0b7e46ce60656))


* Merge pull request #2260 from webtorrent/v2 ([f8c545a](https://github.com/webtorrent/webtorrent/commit/f8c545a7da0f0fb9a35c4377d249ee1e946540c4)), closes [#2260](https://github.com/webtorrent/webtorrent/issues/2260)
* feat, perf: w3c-like File, file-iterator (#2414) ([69d85a8](https://github.com/webtorrent/webtorrent/commit/69d85a8b2d05f09702df5df40894c4e56c22d52d)), closes [#2414](https://github.com/webtorrent/webtorrent/issues/2414)


### Features

* esm ([98353d9](https://github.com/webtorrent/webtorrent/commit/98353d910a11e5cc90b4ed86bca558586cb787d5))
* rescan of torrent should get all (in)valid events ([#1903](https://github.com/webtorrent/webtorrent/issues/1903)) ([4745739](https://github.com/webtorrent/webtorrent/commit/474573930a0f3c1cac242fb3b9616db881462d00))
* sw-renderer tests ([73aff7f](https://github.com/webtorrent/webtorrent/commit/73aff7f1c22d340470777e462f9465736d0ed46d))
* unify HTTP server and SW renderer ([7aeea17](https://github.com/webtorrent/webtorrent/commit/7aeea1757000741a04409dadeaf9fab3966b399d))
* use storage (FSA+IDB) instead of memory in browser ([00e1c9f](https://github.com/webtorrent/webtorrent/commit/00e1c9f16d5d82bf1bfe3f889d29d8ce450fc787))


### Performance Improvements

* drop browserify ([c73d28e](https://github.com/webtorrent/webtorrent/commit/c73d28e7c17ebeb1921871275adb7a7899dada91))
* drop chunk store stream ([cf4d593](https://github.com/webtorrent/webtorrent/commit/cf4d5938084f01f3004884f26abaea65fc3cb365))
* drop rusha, drop Buffer ([#2390](https://github.com/webtorrent/webtorrent/issues/2390)) ([9ac1dfa](https://github.com/webtorrent/webtorrent/commit/9ac1dfacb25af85bfe2360fdc1872e41034e9efb))
* use mime-lite ([c83734c](https://github.com/webtorrent/webtorrent/commit/c83734c5a2e0ba0fe789dda81f5f610581b4c973))


### BREAKING CHANGES

* v2
* ESM only, drop node 12 and ndoe 14
* deprecate getBuffer

* fix: reading when destroyed

## [1.9.7](https://github.com/webtorrent/webtorrent/compare/v1.9.6...v1.9.7) (2023-01-12)


### Bug Fixes

* **deps:** update webtorrent ([#2424](https://github.com/webtorrent/webtorrent/issues/2424)) ([1b002db](https://github.com/webtorrent/webtorrent/commit/1b002db3ec5395c3bccec3619480e3ad9af30e25))

## [1.9.6](https://github.com/webtorrent/webtorrent/compare/v1.9.5...v1.9.6) (2022-12-03)


### Bug Fixes

* fix: fix: error loop ([14fe83f](https://github.com/webtorrent/webtorrent/commit/14fe83fe0088123b7caab4372217bc151094f9a3))

## [1.9.5](https://github.com/webtorrent/webtorrent/compare/v1.9.4...v1.9.5) (2022-12-03)


### Bug Fixes

* infinite error loop, connecting after destroy ([79dbf69](https://github.com/webtorrent/webtorrent/commit/79dbf697cb50dc64e42139581603ac228003e1f4))

## [1.9.4](https://github.com/webtorrent/webtorrent/compare/v1.9.3...v1.9.4) (2022-11-21)


### Bug Fixes

* typo in `removePeer` ([#2408](https://github.com/webtorrent/webtorrent/issues/2408)) ([83d5f72](https://github.com/webtorrent/webtorrent/commit/83d5f728b261bae5ff05160898738434f7512abb))

## [1.9.3](https://github.com/webtorrent/webtorrent/compare/v1.9.2...v1.9.3) (2022-11-18)


### Bug Fixes

* removePeer error after destroy ([36a64a1](https://github.com/webtorrent/webtorrent/commit/36a64a1b5680929841e91cee5aef07b8b1359b7c))

## [1.9.2](https://github.com/webtorrent/webtorrent/compare/v1.9.1...v1.9.2) (2022-11-11)


### Bug Fixes

* **deps:** update dependency create-torrent to ^5.0.9 ([#2392](https://github.com/webtorrent/webtorrent/issues/2392)) ([d5139ed](https://github.com/webtorrent/webtorrent/commit/d5139edf6dc91b04dd729b5d6aa08c111502b25a))

## [1.9.1](https://github.com/webtorrent/webtorrent/compare/v1.9.0...v1.9.1) (2022-10-28)


### Bug Fixes

* **deps:** update dependency streamx to ^2.12.5 ([#2366](https://github.com/webtorrent/webtorrent/issues/2366)) ([457a2d3](https://github.com/webtorrent/webtorrent/commit/457a2d3d5def6bb75d2551f34ab9fa350ec4a4e5))

# [1.9.0](https://github.com/webtorrent/webtorrent/compare/v1.8.32...v1.9.0) (2022-10-28)


### Bug Fixes

* **deps:** update dependency fs-chunk-store to v3 ([#2380](https://github.com/webtorrent/webtorrent/issues/2380)) ([9abd966](https://github.com/webtorrent/webtorrent/commit/9abd96691ab73ebc8fb10aa79a67b5db0c92ec72))


### Features

* add chitchatter link ([#2388](https://github.com/webtorrent/webtorrent/issues/2388)) ([7ef22f7](https://github.com/webtorrent/webtorrent/commit/7ef22f726bed2dfaa6f29ad633955f59db6a9022))

## [1.8.32](https://github.com/webtorrent/webtorrent/compare/v1.8.31...v1.8.32) (2022-10-09)


### Bug Fixes

* **deps:** update dependency torrent-discovery to ^9.4.14 ([8fadd4f](https://github.com/webtorrent/webtorrent/commit/8fadd4f437a9e60da4cbc49b3b6d6e65db38373f))

## [1.8.31](https://github.com/webtorrent/webtorrent/compare/v1.8.30...v1.8.31) (2022-10-08)


### Bug Fixes

* **deps:** update dependency bittorrent-dht to ^10.0.6 ([#2384](https://github.com/webtorrent/webtorrent/issues/2384)) ([34089f8](https://github.com/webtorrent/webtorrent/commit/34089f836bcb24df275f83b3026af548e32d02e9))

## [1.8.30](https://github.com/webtorrent/webtorrent/compare/v1.8.29...v1.8.30) (2022-09-12)


### Bug Fixes

* return duplicate torrent on Webtorrent.add() ([#2372](https://github.com/webtorrent/webtorrent/issues/2372)) ([05d27bf](https://github.com/webtorrent/webtorrent/commit/05d27bfd449aa705cefefe74d4a9eef327f63b4a))

## [1.8.29](https://github.com/webtorrent/webtorrent/compare/v1.8.28...v1.8.29) (2022-09-03)


### Bug Fixes

* **deps:** update dependency create-torrent to ^5.0.6 ([03a0f50](https://github.com/webtorrent/webtorrent/commit/03a0f500013172a5070dd5e8e67063bea6eaf190))

## [1.8.28](https://github.com/webtorrent/webtorrent/compare/v1.8.27...v1.8.28) (2022-09-02)


### Bug Fixes

* **deps:** update dependency fast-blob-stream to ^1.1.1 ([a441dea](https://github.com/webtorrent/webtorrent/commit/a441dea5d1a20982e9ad3fbe5237bbb02fb55898))
* **deps:** update dependency join-async-iterator to ^1.1.1 ([09b9958](https://github.com/webtorrent/webtorrent/commit/09b995814a2b5192cd9d9dd9a620d2b3dbdb5ab7))

## [1.8.27](https://github.com/webtorrent/webtorrent/compare/v1.8.26...v1.8.27) (2022-09-02)


### Bug Fixes

* dedupe packages ([9ea33c2](https://github.com/webtorrent/webtorrent/commit/9ea33c2c1cd3ea9fcfa66569a3fb94148afd9869))
* drop multi-stream ([5d87d1b](https://github.com/webtorrent/webtorrent/commit/5d87d1b32356f6b75ed4f9aefe91f3ddf1ecebdb))
* null opts causing error ([3a8f901](https://github.com/webtorrent/webtorrent/commit/3a8f901a48503a5c767b6174904e2c062d403a6a))
* use streamx instead of stream ([8b97ee8](https://github.com/webtorrent/webtorrent/commit/8b97ee8cc18b05e0d20135ea8f1651e97bb65c6f))

## [1.8.26](https://github.com/webtorrent/webtorrent/compare/v1.8.25...v1.8.26) (2022-07-04)


### Bug Fixes

* **deps:** update dependency create-torrent to ^5.0.4 ([3728336](https://github.com/webtorrent/webtorrent/commit/37283369f3476d32ac9ca85c2c2da4bd4fee273c))

## [1.8.25](https://github.com/webtorrent/webtorrent/compare/v1.8.24...v1.8.25) (2022-07-03)


### Bug Fixes

* **deps:** update dependency create-torrent to ^5.0.3 ([5009d10](https://github.com/webtorrent/webtorrent/commit/5009d1018bdec96afd4bf15e5f7143951623fd48))

## [1.8.24](https://github.com/webtorrent/webtorrent/compare/v1.8.23...v1.8.24) (2022-06-23)


### Bug Fixes

* support stream cancelling ([#2335](https://github.com/webtorrent/webtorrent/issues/2335)) ([2e4f91f](https://github.com/webtorrent/webtorrent/commit/2e4f91f668ea867d768291e9efd3e1c1eb825b97))

## [1.8.23](https://github.com/webtorrent/webtorrent/compare/v1.8.22...v1.8.23) (2022-06-23)


### Bug Fixes

* **deps:** update dependency torrent-discovery to ^9.4.13 ([1e3373a](https://github.com/webtorrent/webtorrent/commit/1e3373ab9e6dd16e5b10a2e32988386615f6cf28))

## [1.8.22](https://github.com/webtorrent/webtorrent/compare/v1.8.21...v1.8.22) (2022-05-24)


### Bug Fixes

* **deps:** update dependency bittorrent-dht to ^10.0.4 ([327d723](https://github.com/webtorrent/webtorrent/commit/327d7234a85f38bf8d397e41875a5603a8d175d1))

## [1.8.21](https://github.com/webtorrent/webtorrent/compare/v1.8.20...v1.8.21) (2022-05-23)


### Bug Fixes

* **deps:** update dependency throughput to ^1.0.1 ([#2321](https://github.com/webtorrent/webtorrent/issues/2321)) ([d53d95e](https://github.com/webtorrent/webtorrent/commit/d53d95e1ed75a288cea706d65fb660f2be3a02a0))

## [1.8.20](https://github.com/webtorrent/webtorrent/compare/v1.8.19...v1.8.20) (2022-05-14)


### Bug Fixes

* **deps:** update dependency bittorrent-dht to ^10.0.3 ([#2320](https://github.com/webtorrent/webtorrent/issues/2320)) ([2ebbd8e](https://github.com/webtorrent/webtorrent/commit/2ebbd8eacfd0d7778357ca0f44ead331ba439a26))

## [1.8.19](https://github.com/webtorrent/webtorrent/compare/v1.8.18...v1.8.19) (2022-05-11)


### Bug Fixes

* **deps:** update dependency torrent-discovery to ^9.4.12 ([36e931a](https://github.com/webtorrent/webtorrent/commit/36e931aff5e44fc5aa298a6166bfe7b4e1560499))

## [1.8.18](https://github.com/webtorrent/webtorrent/compare/v1.8.17...v1.8.18) (2022-05-11)


### Bug Fixes

* **deps:** update dependency bittorrent-tracker to v9.18.6 ([#2315](https://github.com/webtorrent/webtorrent/issues/2315)) ([b63d652](https://github.com/webtorrent/webtorrent/commit/b63d652229c4cf55a4eebbe95c98a62716bcc377))

## [1.8.17](https://github.com/webtorrent/webtorrent/compare/v1.8.16...v1.8.17) (2022-05-11)


### Bug Fixes

* measure transfer rates without using timeouts ([#2314](https://github.com/webtorrent/webtorrent/issues/2314)) ([522ee4c](https://github.com/webtorrent/webtorrent/commit/522ee4cd14d3b41e92c3978e9816cb66e00233f0))

## [1.8.16](https://github.com/webtorrent/webtorrent/compare/v1.8.15...v1.8.16) (2022-04-28)


### Bug Fixes

* **deps:** update dependency bittorrent-protocol to ^3.5.5 ([3522080](https://github.com/webtorrent/webtorrent/commit/35220804054c5369b5e88a39411125f0273b2adc))

## [1.8.15](https://github.com/webtorrent/webtorrent/compare/v1.8.14...v1.8.15) (2022-04-26)

## [1.8.14](https://github.com/webtorrent/webtorrent/compare/v1.8.13...v1.8.14) (2022-04-22)


### Bug Fixes

* **deps:** update dependency bitfield to ^4.1.0 ([#2303](https://github.com/webtorrent/webtorrent/issues/2303)) ([a778522](https://github.com/webtorrent/webtorrent/commit/a7785227d88fbac22a1b627460694b3523833fde))
* **deps:** update dependency bittorrent-protocol to ^3.5.3 ([#2302](https://github.com/webtorrent/webtorrent/issues/2302)) ([11f9426](https://github.com/webtorrent/webtorrent/commit/11f9426ee9ef3b800ac978afa5082809eb87c545))

## [1.8.13](https://github.com/webtorrent/webtorrent/compare/v1.8.12...v1.8.13) (2022-03-30)


### Bug Fixes

* **deps:** update dependency fs-chunk-store to ^2.0.5 ([2eef418](https://github.com/webtorrent/webtorrent/commit/2eef41884ffbee8f723ea2846e58756066983a0b))

## [1.8.12](https://github.com/webtorrent/webtorrent/compare/v1.8.11...v1.8.12) (2022-03-28)


### Bug Fixes

* **deps:** update dependency bittorrent-protocol to ^3.5.2 ([13fb0d6](https://github.com/webtorrent/webtorrent/commit/13fb0d60df963edb83945c8b040159c560e67368))

## [1.8.11](https://github.com/webtorrent/webtorrent/compare/v1.8.10...v1.8.11) (2022-03-27)

## [1.8.10](https://github.com/webtorrent/webtorrent/compare/v1.8.9...v1.8.10) (2022-03-27)


### Bug Fixes

* web seed request URLs ([#2267](https://github.com/webtorrent/webtorrent/issues/2267)) ([5b4880a](https://github.com/webtorrent/webtorrent/commit/5b4880aee559b4b8d294503039d07af98b09418c))

## [1.8.9](https://github.com/webtorrent/webtorrent/compare/v1.8.8...v1.8.9) (2022-03-26)


### Bug Fixes

* **deps:** update dependency parse-torrent to ^9.1.5 ([650a8c9](https://github.com/webtorrent/webtorrent/commit/650a8c93a68852da8beefd12c28a23ec4e1dc2a4))

## [1.8.8](https://github.com/webtorrent/webtorrent/compare/v1.8.7...v1.8.8) (2022-03-25)


### Bug Fixes

* **deps:** update dependency debug to ^4.3.4 ([017c488](https://github.com/webtorrent/webtorrent/commit/017c4889ff62d9b74a457fe8cf5d1699686a4754))

## [1.8.7](https://github.com/webtorrent/webtorrent/compare/v1.8.6...v1.8.7) (2022-03-24)

## [1.8.6](https://github.com/webtorrent/webtorrent/compare/v1.8.5...v1.8.6) (2022-03-11)


### Bug Fixes

* **deps:** update dependency create-torrent to ^5.0.2 ([#2276](https://github.com/webtorrent/webtorrent/issues/2276)) ([f389f87](https://github.com/webtorrent/webtorrent/commit/f389f8755de9ef8725adba8163347f7fd65fb069))

## [1.8.5](https://github.com/webtorrent/webtorrent/compare/v1.8.4...v1.8.5) (2022-03-06)


### Bug Fixes

* **deps:** update dependency torrent-discovery to ^9.4.9 ([5a08647](https://github.com/webtorrent/webtorrent/commit/5a086471a8499ee41e16b4db20200baa0458d849))

## [1.8.4](https://github.com/webtorrent/webtorrent/compare/v1.8.3...v1.8.4) (2022-03-03)


### Bug Fixes

* **deps:** update dependency torrent-discovery to ^9.4.8 ([#2272](https://github.com/webtorrent/webtorrent/issues/2272)) ([aa2fa59](https://github.com/webtorrent/webtorrent/commit/aa2fa59a4c7c166a52ecd9060191b6e695d3c85f))

## [1.8.3](https://github.com/webtorrent/webtorrent/compare/v1.8.2...v1.8.3) (2022-02-21)

## [1.8.2](https://github.com/webtorrent/webtorrent/compare/v1.8.1...v1.8.2) (2022-02-17)


### Bug Fixes

* **deps:** update dependency simple-peer to ^9.11.1 ([34df41a](https://github.com/webtorrent/webtorrent/commit/34df41a05438bcb765077187e04ac2d95d74ea74))

## [1.8.1](https://github.com/webtorrent/webtorrent/compare/v1.8.0...v1.8.1) (2022-02-03)


### Bug Fixes

* going for 1.8.1 ([e39057f](https://github.com/webtorrent/webtorrent/commit/e39057f634a66ce813482f87d2bfa862ebce5737))

# [1.8.0](https://github.com/webtorrent/webtorrent/compare/v1.7.4...v1.8.0) (2022-02-03)


### Features

* 1.8.0 fixing ([cac563b](https://github.com/webtorrent/webtorrent/commit/cac563b37d754fc4fa6993717bb6d1077b2bfd62))

## [1.7.4](https://github.com/webtorrent/webtorrent/compare/v1.7.3...v1.7.4) (2022-02-03)


### Bug Fixes

* getStreamURL docs ([#2257](https://github.com/webtorrent/webtorrent/issues/2257)) ([69bdd93](https://github.com/webtorrent/webtorrent/commit/69bdd93bdbe64ab9cc2c22e700560ecea02645e2))

## [1.7.3](https://github.com/webtorrent/webtorrent/compare/v1.7.2...v1.7.3) (2022-02-03)

## [1.7.2](https://github.com/webtorrent/webtorrent/compare/v1.7.1...v1.7.2) (2022-01-27)


### Bug Fixes

* **deps:** update webtorrent ([#2247](https://github.com/webtorrent/webtorrent/issues/2247)) ([6345ebe](https://github.com/webtorrent/webtorrent/commit/6345ebe4bae018a01bab3a25202a1864fb2230d5))

## [1.7.1](https://github.com/webtorrent/webtorrent/compare/v1.7.0...v1.7.1) (2022-01-20)

# [1.7.0](https://github.com/webtorrent/webtorrent/compare/v1.6.0...v1.7.0) (2022-01-20)


### Features

* add reqq field support ([#2246](https://github.com/webtorrent/webtorrent/issues/2246)) ([8de2a13](https://github.com/webtorrent/webtorrent/commit/8de2a136d68366d298e3ec01b5e4b17a4c4e074c))

# [1.6.0](https://github.com/webtorrent/webtorrent/compare/v1.5.11...v1.6.0) (2022-01-17)


### Features

* add BEP6 Fast Extension support ([#2243](https://github.com/webtorrent/webtorrent/issues/2243)) ([4f02de3](https://github.com/webtorrent/webtorrent/commit/4f02de3a445f3a9eb46c49a8964c9660bdf6e5d7))

## [1.5.11](https://github.com/webtorrent/webtorrent/compare/v1.5.10...v1.5.11) (2022-01-14)


### Bug Fixes

* **deps:** update dependency debug to ^4.3.3 ([#2228](https://github.com/webtorrent/webtorrent/issues/2228)) ([e268096](https://github.com/webtorrent/webtorrent/commit/e268096c201bc0b9e28d9c94cd7b9287c9f0f2e8))
* **deps:** update dependency mime to v3 ([#2216](https://github.com/webtorrent/webtorrent/issues/2216)) ([77da8cb](https://github.com/webtorrent/webtorrent/commit/77da8cb629078d55870684e56e0e0b2091c7e723))

## [1.5.10](https://github.com/webtorrent/webtorrent/compare/v1.5.9...v1.5.10) (2022-01-14)


### Bug Fixes

* use @webtorrent/http-node ([699d747](https://github.com/webtorrent/webtorrent/commit/699d747c477a26a5c8d4e6f1537e3e67b6c6ad94))

## [1.5.9](https://github.com/webtorrent/webtorrent/compare/v1.5.8...v1.5.9) (2022-01-12)

## [1.5.8](https://github.com/webtorrent/webtorrent/compare/v1.5.7...v1.5.8) (2021-10-26)


### Bug Fixes

* Prep for esm ([#2205](https://github.com/webtorrent/webtorrent/issues/2205)) ([ba6b799](https://github.com/webtorrent/webtorrent/commit/ba6b799ff614fedf26a29448620604aae3d2afec))

## [1.5.7](https://github.com/webtorrent/webtorrent/compare/v1.5.6...v1.5.7) (2021-10-25)


### Bug Fixes

* add storeOpts, specify store path, align with docs ([#2121](https://github.com/webtorrent/webtorrent/issues/2121)) ([6cd9b5f](https://github.com/webtorrent/webtorrent/commit/6cd9b5f74d7cd676259cd11daa2a568a3c5666d9))

## [1.5.6](https://github.com/webtorrent/webtorrent/compare/v1.5.5...v1.5.6) (2021-10-05)


### Bug Fixes

* http-node git location ([67ddac0](https://github.com/webtorrent/webtorrent/commit/67ddac03bc02e2923ec30af7054745a395d0280c))

## [1.5.5](https://github.com/webtorrent/webtorrent/compare/v1.5.4...v1.5.5) (2021-09-02)


### Bug Fixes

* DHT cleanup after torrent removal ([#2185](https://github.com/webtorrent/webtorrent/issues/2185)) ([320541f](https://github.com/webtorrent/webtorrent/commit/320541f271fdbd7303f544b6e99ab6b0a450fd8c)), closes [#1289](https://github.com/webtorrent/webtorrent/issues/1289)

## [1.5.4](https://github.com/webtorrent/webtorrent/compare/v1.5.3...v1.5.4) (2021-08-25)


### Bug Fixes

* handle done event when new files selected ([#2183](https://github.com/webtorrent/webtorrent/issues/2183)) ([c543788](https://github.com/webtorrent/webtorrent/commit/c5437886086f455c61f0ff71bbfecd3f9e6b2609))

## [1.5.3](https://github.com/webtorrent/webtorrent/compare/v1.5.2...v1.5.3) (2021-08-20)


### Bug Fixes

* **deps:** update dependency @webtorrent/semantic-release-config to v1.0.7 ([#2175](https://github.com/webtorrent/webtorrent/issues/2175)) ([404de99](https://github.com/webtorrent/webtorrent/commit/404de999f7dd83e7884c23511e92a3f5b28d784d))

## [1.5.2](https://github.com/webtorrent/webtorrent/compare/v1.5.1...v1.5.2) (2021-08-20)

## [1.5.1](https://github.com/webtorrent/webtorrent/compare/v1.5.0...v1.5.1) (2021-08-20)


### Bug Fixes

* **deps:** update dependency @webtorrent/semantic-release-config to v1.0.6 ([#2173](https://github.com/webtorrent/webtorrent/issues/2173)) ([210bda9](https://github.com/webtorrent/webtorrent/commit/210bda96533239c5a85eff4020c4684c29a3b758))

# [1.5.0](https://github.com/webtorrent/webtorrent/compare/v1.4.0...v1.5.0) (2021-08-19)


### Features

* add service worker server as an alternative to renderMedia ([#2098](https://github.com/webtorrent/webtorrent/issues/2098)) ([604943e](https://github.com/webtorrent/webtorrent/commit/604943e325c68721251a71c29d94e6a07ce0b31c))

# [1.4.0](https://github.com/webtorrent/webtorrent/compare/v1.3.10...v1.4.0) (2021-08-17)


### Features

* Add PE/MSE support ([#1820](https://github.com/webtorrent/webtorrent/issues/1820)) ([9938c94](https://github.com/webtorrent/webtorrent/commit/9938c949eee9c69c6774767e885e40f0a73898d9)), closes [#1384](https://github.com/webtorrent/webtorrent/issues/1384)

## [1.3.10](https://github.com/webtorrent/webtorrent/compare/v1.3.9...v1.3.10) (2021-08-16)

## [1.3.9](https://github.com/webtorrent/webtorrent/compare/v1.3.8...v1.3.9) (2021-08-06)


### Bug Fixes

* **deps:** update dependency create-torrent to ^5.0.1 ([#2167](https://github.com/webtorrent/webtorrent/issues/2167)) ([283cbf8](https://github.com/webtorrent/webtorrent/commit/283cbf84bffd4fbd0b267796dc45f00491bcdc92))

## [1.3.8](https://github.com/webtorrent/webtorrent/compare/v1.3.7...v1.3.8) (2021-08-06)


### Bug Fixes

* **deps:** update dependency create-torrent to v5 ([#2165](https://github.com/webtorrent/webtorrent/issues/2165)) ([501fd9e](https://github.com/webtorrent/webtorrent/commit/501fd9ed79d1127d74a29c47e230697ed372ba5e))

## [1.3.7](https://github.com/webtorrent/webtorrent/compare/v1.3.6...v1.3.7) (2021-08-05)


### Bug Fixes

* **deps:** update dependency torrent-discovery to ^9.4.4 ([#2164](https://github.com/webtorrent/webtorrent/issues/2164)) ([fb59617](https://github.com/webtorrent/webtorrent/commit/fb59617c016d5e64a86b3d20032664ba751019a9))

## [1.3.6](https://github.com/webtorrent/webtorrent/compare/v1.3.5...v1.3.6) (2021-08-05)


### Bug Fixes

* **deps:** update dependency bittorrent-dht to ^10.0.2 ([#2163](https://github.com/webtorrent/webtorrent/issues/2163)) ([fc89c78](https://github.com/webtorrent/webtorrent/commit/fc89c7822eecdece2b80bb2841e5131722f8bac3))

## [1.3.5](https://github.com/webtorrent/webtorrent/compare/v1.3.4...v1.3.5) (2021-08-04)


### Bug Fixes

* **deps:** update webtorrent ([#2162](https://github.com/webtorrent/webtorrent/issues/2162)) ([a00688b](https://github.com/webtorrent/webtorrent/commit/a00688b881bdec5109eeb45b6c7186d771ce5788))

## [1.3.4](https://github.com/webtorrent/webtorrent/compare/v1.3.3...v1.3.4) (2021-07-30)


### Bug Fixes

* **deps:** update webtorrent ([#2149](https://github.com/webtorrent/webtorrent/issues/2149)) ([d03203d](https://github.com/webtorrent/webtorrent/commit/d03203d01fe7a98b6d8631ebd0ceba2ea4b5ab22))

## [1.3.3](https://github.com/webtorrent/webtorrent/compare/v1.3.2...v1.3.3) (2021-07-25)


### Bug Fixes

* log error when failing to load blocklist ip set ([c0a07fb](https://github.com/webtorrent/webtorrent/commit/c0a07fbbbc3fb39dfeddf76383f22710b8ee1d54))

## [1.3.2](https://github.com/webtorrent/webtorrent/compare/v1.3.1...v1.3.2) (2021-07-24)


### Bug Fixes

* **deps:** update dependency speed-limiter to ^1.0.2 ([#2153](https://github.com/webtorrent/webtorrent/issues/2153)) ([17fb0e2](https://github.com/webtorrent/webtorrent/commit/17fb0e240fafc396bfd124ae667238c5c21d02e3))

## [1.3.1](https://github.com/webtorrent/webtorrent/compare/v1.3.0...v1.3.1) (2021-07-24)


### Bug Fixes

* speed limit for zero ([#2155](https://github.com/webtorrent/webtorrent/issues/2155)) ([88cca71](https://github.com/webtorrent/webtorrent/commit/88cca71fb46c1b9a65085ea674f5af5be4407a17))

# [1.3.0](https://github.com/webtorrent/webtorrent/compare/v1.2.6...v1.3.0) (2021-07-23)


### Features

* add speed limit to client ([#2062](https://github.com/webtorrent/webtorrent/issues/2062)) ([39bb33c](https://github.com/webtorrent/webtorrent/commit/39bb33c3cf694cdee45378ea4b30c66c93576d2a))

## [1.2.6](https://github.com/webtorrent/webtorrent/compare/v1.2.5...v1.2.6) (2021-07-23)


### Bug Fixes

* **deps:** update dependency create-torrent to ^4.7.1 ([#2145](https://github.com/webtorrent/webtorrent/issues/2145)) ([a75f1aa](https://github.com/webtorrent/webtorrent/commit/a75f1aa4b6173a0958d3c367070e27f0ef4e5e54))

## [1.2.5](https://github.com/webtorrent/webtorrent/compare/v1.2.4...v1.2.5) (2021-07-19)


### Bug Fixes

* **deps:** update dependency bittorrent-dht to ^10.0.1 ([#2139](https://github.com/webtorrent/webtorrent/issues/2139)) ([8476d9c](https://github.com/webtorrent/webtorrent/commit/8476d9cd8b218b74bc3544de007680bcc1db9d31))

## [1.2.4](https://github.com/webtorrent/webtorrent/compare/v1.2.3...v1.2.4) (2021-07-13)


### Bug Fixes

* call public FileStream.destroy method so cb is defined ([#2135](https://github.com/webtorrent/webtorrent/issues/2135)) ([b035cbe](https://github.com/webtorrent/webtorrent/commit/b035cbe9ea59d3fcfc6467dcf4f2f49da2f7c3d8))

## [1.2.3](https://github.com/webtorrent/webtorrent/compare/v1.2.2...v1.2.3) (2021-07-13)


### Bug Fixes

* store.put is async and might fail ([#2006](https://github.com/webtorrent/webtorrent/issues/2006)) ([3b3f65a](https://github.com/webtorrent/webtorrent/commit/3b3f65afaecb88dcdbb1f342a3643343eaf22c80))

## [1.2.2](https://github.com/webtorrent/webtorrent/compare/v1.2.1...v1.2.2) (2021-07-11)


### Bug Fixes

* **deps:** update dependency debug to ^4.3.2 ([#2127](https://github.com/webtorrent/webtorrent/issues/2127)) ([33f813d](https://github.com/webtorrent/webtorrent/commit/33f813d0a882d9d8727f5875a48ae40aab780656))

## [1.2.1](https://github.com/webtorrent/webtorrent/compare/v1.2.0...v1.2.1) (2021-07-11)


### Bug Fixes

* modernize code ([#2134](https://github.com/webtorrent/webtorrent/issues/2134)) ([46033ae](https://github.com/webtorrent/webtorrent/commit/46033ae52eca6e22301bb8ed9566c498d3494711))

# [1.2.0](https://github.com/webtorrent/webtorrent/compare/v1.1.6...v1.2.0) (2021-07-09)


### Features

* support adding paused torrents. ([#2004](https://github.com/webtorrent/webtorrent/issues/2004)) ([5c79c0a](https://github.com/webtorrent/webtorrent/commit/5c79c0a01424087e4c37776d86ef745191504df4))

## [1.1.6](https://github.com/webtorrent/webtorrent/compare/v1.1.5...v1.1.6) (2021-07-08)


### Bug Fixes

* **deps:** update dependency bittorrent-protocol to ^3.4.2 ([#2132](https://github.com/webtorrent/webtorrent/issues/2132)) ([7223cbf](https://github.com/webtorrent/webtorrent/commit/7223cbf7918e543542acf9d53da4bec0753a5e00))

## [1.1.5](https://github.com/webtorrent/webtorrent/compare/v1.1.4...v1.1.5) (2021-07-06)


### Bug Fixes

* ensure uTP peer address is IPv4 ([#2125](https://github.com/webtorrent/webtorrent/issues/2125)) ([100a2ae](https://github.com/webtorrent/webtorrent/commit/100a2aebe23420dd70842b3948896f8fecfee235))

## [1.1.4](https://github.com/webtorrent/webtorrent/compare/v1.1.3...v1.1.4) (2021-07-03)


### Bug Fixes

* **deps:** update webtorrent ([#2126](https://github.com/webtorrent/webtorrent/issues/2126)) ([87c69be](https://github.com/webtorrent/webtorrent/commit/87c69bea112b6a33175962fefac14c825a690312))

## [1.1.3](https://github.com/webtorrent/webtorrent/compare/v1.1.2...v1.1.3) (2021-07-02)


### Bug Fixes

* add preversion ([55fe206](https://github.com/webtorrent/webtorrent/commit/55fe206e3bd6b48e29018fb7f7bdf6e8055248a2))

## [1.1.2](https://github.com/webtorrent/webtorrent/compare/v1.1.1...v1.1.2) (2021-07-02)

## [1.1.1](https://github.com/webtorrent/webtorrent/compare/v1.1.0...v1.1.1) (2021-07-02)


### Bug Fixes

* Cleanup duplicated deselect() code ([#2113](https://github.com/webtorrent/webtorrent/issues/2113)) ([b94d713](https://github.com/webtorrent/webtorrent/commit/b94d71314bd7ae122c6150b6e92b3f2bd5da504a))

# [1.1.0](https://github.com/webtorrent/webtorrent/compare/v1.0.4...v1.1.0) (2021-06-30)


### Features

* Use a cache on the chunk store ([#2095](https://github.com/webtorrent/webtorrent/issues/2095)) ([d540058](https://github.com/webtorrent/webtorrent/commit/d540058ebd7f32e613d26c33e8a99b16d39a13d8))

## [1.0.4](https://github.com/webtorrent/webtorrent/compare/v1.0.3...v1.0.4) (2021-06-30)

## [1.0.3](https://github.com/webtorrent/webtorrent/compare/v1.0.2...v1.0.3) (2021-06-30)


### Bug Fixes

* remove deprecated functionality ([#2118](https://github.com/webtorrent/webtorrent/issues/2118)) ([2bf6cf4](https://github.com/webtorrent/webtorrent/commit/2bf6cf42e09c448cab0dddcd74ea9a49dc3f18a0))

## [1.0.2](https://github.com/webtorrent/webtorrent/compare/v1.0.1...v1.0.2) (2021-06-23)


### Bug Fixes

* enable UTP by default if there's support ([0df9eb6](https://github.com/webtorrent/webtorrent/commit/0df9eb60171ff18cec052e8f31a515b341bdd03a))

## [1.0.1](https://github.com/webtorrent/webtorrent/compare/v1.0.0...v1.0.1) (2021-06-17)


### Bug Fixes

* make utp-native optional ([#1966](https://github.com/webtorrent/webtorrent/issues/1966)) ([73c941c](https://github.com/webtorrent/webtorrent/commit/73c941c6eb3b539efbbbb499ab3d033531347b19))

# [1.0.0](https://github.com/webtorrent/webtorrent/compare/v0.118.0...v1.0.0) (2021-05-21)


### Bug Fixes

* bring back release config ([d78055b](https://github.com/webtorrent/webtorrent/commit/d78055b2fd6275f9ba18474f601c0a4d3284231c))
* getAnnounceOpts ([#2075](https://github.com/webtorrent/webtorrent/issues/2075)) ([633b922](https://github.com/webtorrent/webtorrent/commit/633b9224b7c7176599a5e53775de1a48d8e864b5))
* install config ([6ba44c4](https://github.com/webtorrent/webtorrent/commit/6ba44c444f6af6f070c3059ad00ca2d10868058d))
* **deps:** update webtorrent ([18a8962](https://github.com/webtorrent/webtorrent/commit/18a8962328fb42e1ebc56ed5dbe73b97f096fbd1))
* ci ([134721c](https://github.com/webtorrent/webtorrent/commit/134721c16d3338270cdcef300bb164720b1d3ae7))
* github ci secrets ([fc7ec9f](https://github.com/webtorrent/webtorrent/commit/fc7ec9f223079a3c1a2a8b54a4cca022aef4c440))


### chore

* add release ([#2077](https://github.com/webtorrent/webtorrent/issues/2077)) ([db9de2d](https://github.com/webtorrent/webtorrent/commit/db9de2d99a260d68f2719396835a09b2d0742e9f))


### Reverts

* version strategy gh actions ([1cba675](https://github.com/webtorrent/webtorrent/commit/1cba6753d449ae46f287e9104ed1f0330d640911))


### BREAKING CHANGES

* chore: add release
* add semantic release config
* Update release.yml

# WebTorrent Version History

## v0.112.0 - 2020-11-05

- Ensure that `appendTo` callback is called once video tag is added to DOM, not after play (#1967)

## v0.111.0 - 2020-11-05

- Add Local Service Discovery (BEP14)
- bitfield@4

## v0.110.1 - 2020-11-03

- Fix BEP53 implementation

## v0.110.0 - 2020-11-03

- Support Implement the peer address property (x.pe) from BEP09

## v0.109.2 - 2020-10-27

- Fix "Cannot read property 'utp' of null"

## v0.109.1 - 2020-10-23

- Peer reconnect timeout throwing error after torrent is destroyed

## v0.109.0 - 2020-10-22

- refactor torrent._rechoke()
- simple-get@4
- electron@9
- deps
- Add stale bot config
- Create no-response.yml
- Create config.yml
- Update no-response.yml
- Add uTP support (BEP29)
- check if torrent is destroyed before emitting download/upload event
- ut_pex 2.0.1
- browserify@17
- electron@10

## v0.108.6 - 2020-05-29

- update deps

## v0.108.5 - 2020-05-29

- bump deps

## v0.108.4 - 2020-05-28

- add test for downloading from a manually added peer
- fix: not setting initial wire interest
- update interest when a peer's bitfield changes

## v0.108.3 - 2020-05-15

- Create `webtorrent.chromeapp.js`
- update bittorrent-dht to version 10.0.0
- Change parseRange.parse to parseRange

## v0.108.2 - 2020-05-10

- implement store destruction option
- Fix drag-drop.min.js link
- update parse-numeric-range to version 1.2.0
- browsers: add tests for safari, edge, android, iphone

## v0.108.1 - 2020-04-01

- fix ratio calculation

## v0.108.0 - 2020-04-01

- Check if client is set when debug logging
- downgrade end-of-stream to v1.4.1
- `private` option overrides default, only if it's defined
- use native Set instead of uniq library
- Improve code readability

## v0.107.17 - 2019-11-12

- Unbreak built file

## v0.107.16 - 2019-09-10

- fix git commit reference to `http-node` package

## v0.107.15 - 2019-09-10

- Return server from server.listen for method chaining to work

## v0.107.14 - 2019-09-10

- Update .gitignore

## v0.107.13 - 2019-09-10

- Added tests to check the order of torrent events

## v0.107.12 - 2019-09-08

- Fixed how first piece's irrelevant bytes are calculated

## v0.107.11 - 2019-09-07

- Added timeout option for `requestIdlecallback` to prevent longer delays in download

## v0.107.10 - 2019-09-07

- Server now uses relative urls

## v0.107.9 - 2019-09-07

- Added a check in case user destroys torrent in response to `metadata` event

## v0.107.8 - 2019-09-07

- Fixed the torrent event emission order; now `metadata` is emitted before `ready` and `done`

## v0.107.7 - 2019-09-06

- Updated to simple-sha1@3
- Updated jsdelivr urls to use latest Webtorrent

## v0.107.6 - 2019-08-28

- Fixed XSS vulnerability in the http Server ([issue](https://github.com/brave/brave-browser/issues/5821))

## v0.107.5 - 2019-08-22

- No meaningful changes

## v0.107.4 - 2019-08-19

- Added api documentation for some torrent properties
- Bug fix: trackers now recieve 0 while seeding file instead of the file size
- Updated org-wide security policies and contributing guidelines

## v0.107.3 - 2019-08-10

- No meaningful changes

## v0.107.2 - 2019-08-09

- Scripts are now more verbose

## v0.107.1 - 2019-08-09

- Updated to stream-to-bolob-url@3
- Added `chromeapp` field to package.json for specifying Chrome App dependency substitutions

## v0.107.0 - 2019-08-07

- Smaller build with tinify
- Added size-disc script to visualize bundle

## v0.106.0 - 2019-08-05

- Updated to electron@6
- Dropped support for node versions < 10

## v0.105.3 - 2019-08-02

- Now uses 'application/octet-stream' mimetype as fallback instead of null

## v0.105.2 - 2019-07-31

- Fixed server `hostname` option to mitigate DNS rebinding attack ([issue](https://github.com/webtorrent/webtorrent/pull/1678))

## v0.105.1 - 2019-07-24

- Bug fixed: Video streaming is now fixed in Brave nightly and chromium nightly ([issue](https://github.com/brave/brave-browser/issues/5358))

## v0.105.0 - 2019-07-06

- Updated to parse-torrent@7
- Added manual verification for torrent files

## v0.104.0 - 2019-06-29

- Updated to chunk-store-stream@4
- Updated to multistream@3
- Updated to create-torrent@4
- Dropped support for node versions < 8

## v0.103.4 - 2019-06-19

- No meaningful changes

## v0.103.3 - 2019-06-19

- Updated to electron@5

## v0.103.2 - 2019-06-12

- Added the ability to close and restore streaming server

## v0.103.1 - 2019-03-11

- Updated to electron@4
- Bug fixed: File progress is no longer shown in negative

## v0.103.0 - 2018-12-11

- No longer verifies file hashes passed to seed
- No longer calls torrent.load() when seeding FS filepath
- Reduced download impact on slower computers: now download chunks at a lower priority ([rationale](https://github.com/webtorrent/webtorrent/pull/1513))

## v0.102.4 - 2018-08-31

- No meaningful changes

## v0.102.3 - 2018-08-31

- Removed xtend
- Removed the concurrency limit in browser
- Reduced installtion size by removing zero-fill
- Updated to bittorrent-dht@9

## v0.102.2 - 2018-08-28

- Update some webtorrent packages to ES6 ([webtorrent/#1443](https://github.com/webtorrent/webtorrent/issues/1443))

## v0.102.1 - 2018-08-10

- No meaningful changes

## v0.102.0 - 2018-08-04

- Updated to chunk-store-stream@3
- Updated to immediate-chunk-store@2

## v0.101.2 - 2018-07-27

- Updated to torrent-discovery@9.0.2

## v0.101.1 - 2018-07-27

- Updated to bittorrent-protocol@3
- Optimized peers:  peers now start as uninterested and only move to interested if/once they have a piece that we need  ([webtorrent/#1059](https://github.com/webtorrent/webtorrent/issues/1059))

## v0.101.0 - 2018-07-19

- No meaningful changes

## v0.100.0 - 2018-05-23

- Implemented BEP53 to alow file selection using `select only` parameter in MagnetURIs ([webtorrent/#1395](https://github.com/webtorrent/webtorrent-hybrid/issues/1395))

## v0.99.4 - 2018-05-03

- Use updated `babel-minify` minifier instead of deprecated `babili`

## v0.99.3 - 2018-04-26

- Add extra check to prevent invalid `peer.conn.remotePort` from being used ([webtorrent-hybrid/#76](https://github.com/webtorrent/webtorrent-hybrid/issues/76))

## v0.99.2 - 2018-04-24

- Use `.npmignore` to prevent unneeded files from being included in the published package

## v0.99.1 - 2018-04-24

- Expose `WebTorrent.VERSION` (#1358)
- Update to simple-get@3
- Update to parse-torrent@6

## v0.99.0 - 2018-04-19

- `renderTo()`/`appendTo()` does not autoplay by default anymore ([rationale](https://github.com/webtorrent/webtorrent/commit/fbbffbbb445096a909c851cdc4ca15204b9952b9))
  - Pass `{autoplay: true}` to `renderTo()`/`appendTo()` to get the old behavior.
- `renderTo()`/`appendTo()` has a new `muted` option to mute the video by default.

## v0.98.24 - 2018-03-02

- Add hostname option to mitigate DNS rebinding (#1260)
- Update to simple-peer@9
- Browser testing: switch from `zuul` to `airtap`

## v0.98.23 - 2018-02-20

- Update to bitfield@2

## v0.98.22 - 2018-02-17

- Update to browserify@16
- Update to bittorrent-dht@8
- Update to pump@3

## v0.98.21 - 2018-01-26

- Update to pump@2
- Update to mime@2
- Update to cross-spawn@6
- Update to browserify@15

## v0.98.20 - 2017-10-17

- Fix `file.downloaded` for last piece
- Fix destroyed torrent debug
- Update to mime@2
- Update to debug@3
- Update to electron@1

## v0.98.19 - 2017-06-25

- Add `origin` option for torrent.createServer() (#1096)
- Add `file.progress` property (#1140)
- Switch to ES6-compatible minifier

## v0.98.18 - 2017-04-14

- Transfer webtorrent from @feross to @webtorrent organization.

## v0.98.17 - 2017-04-13

- Fix uncaught exception (#1103)

## v0.98.16 - 2017-04-07

- Update to simple-peer@8

## v0.98.15 - 2017-03-30

- No meaningful changes

## v0.98.14 - 2017-03-17

- Add filename to URLs on server index page (#1078)

## v0.98.13 - 2017-03-16

- No meaningful changes

## v0.98.12 - 2017-03-13

- Fix files under 16Kb are not downloaded correctly (#1077)

## v0.98.11 - 2017-03-13

- Fix detection of seeding peers (#1076)

## v0.98.10 - 2017-03-06

- Update to bittorrent-tracker@9

## v0.98.9 - 2017-03-01

- Update to finalhandler@1
- Update to simple-peer@7

## v0.98.8 - 2017-02-13

- wait to notify() or updateInterest() at end of GC (#1044)
- Update to cross-spawn@5

## v0.98.7 - 2017-02-11

- Change os.tmpDir() to os.tmpdir() (#1043)

## v0.98.6 - 2017-02-09

- Refactor http server; support content-disposition (#1039)

## v0.98.5 - 2017-02-02

- Don't print debug log after torrent is destroyed

## v0.98.4 - 2017-02-02

- Be more defensive: prevent code from running after destroy
- Fix "Cannot read property 'complete' of null" (#1022)
- Include infoHash in torrent.js debug logs
- Update to browserify@14

## v0.98.3 - 2017-01-19

- Emit more warnings (#1021)
- Set user-agent header for http tracker requests (#1019)

## v0.98.2 - 2017-01-18

- Don't send 'completed' event to tracker on client.seed (#991)
- Set user-agent header for http tracker requests (#962)

## v0.98.1 - 2017-01-13

- Don't emit 'completed' on client.seed
- Do not choke on web seeds (#972)

## v0.98.0 - 2016-11-23

- Add property for downloaded bytes per file (`file.downloaded`) (#974)
- Cross-origin HTTP redirect workaround for web seeds (#909)

## v0.97.2 - 2016-09-26

- Creating a WebTorrent client with the `{tracker: false}` to disable communication with trackers should not affect creating a torrent with `.seed()`. The resulting torrent file should still contain the normal `announce` field. (#928)
- Add more peer ID entropy

## v0.97.1 - 2016-09-17

- Handle invalid range handers instead of throwing (#921)

## v0.97.0 - 2016-09-17

- Add option to disable BEP19 web seeds (`webSeeds` option to the `WebTorrent` constructor)

## v0.96.5 - 2016-09-13

- Fix exceptions in `server.close()` and `server.destroy()`

## v0.96.4 - 2016-08-23

- Warn when WebTorrent is installed on Node.js older than v4.0.0.

## v0.96.3 - 2016-08-22

- Better docs for .renderTo()

## v0.96.2 - 2016-08-20

- Replace 'hat' with 'randombytes'
- Better debug logs

## v0.96.1 - 2016-08-18

- Prevent possible stack overflow

## v0.96.0 - 2016-08-03

- Add options to disable autoplay/hide controls with `appendTo()` and `renderTo()`

## v0.95.6 - 2016-07-28

- Allow deselecting the entire torrent with `deselect()` to happen earlier

## v0.95.5 - 2016-07-26

- Fix support for FileList input to client.seed()

## v0.95.4 - 2016-07-26

- Skip blocklist logic when opts.blocklist is not set

## v0.95.3 - 2016-07-26

- Fix WebTorrent version string

## v0.95.2 - 2016-06-22

- HEAD requests to HTTP server should not send entire body
- WebTorrent, LLC is now the steward of the project

## v0.95.1 - 2016-06-15

- Emit 'seed' event on the torrent object

## v0.95.0 - 2016-06-15

- API: Add `file.getBlob()` method
- Fix rare exception in `lib/tcp-pool.js`

## v0.94.4 - 2016-06-10

- Support torrent with a single 0 byte file
- Use `<` since it handles `NaN` in a predictable way, i.e. `false`

## v0.94.3 - 2016-05-30

- Use `safe-buffer` for improved buffer safety

## v0.94.2 - 2016-05-28

- Fix rare exception in `lib/file.js`

## v0.94.1 - 2016-05-26

- Make WebTorrent user agent string consistent across whole codebase

## v0.94.0 - 2016-05-19

- Support exact source (xs) paramter of magnet URIs, for retreiving metadata

## v0.93.4 - 2016-05-17

- Fix rare exception caused by race condition in `lib/peer.js`

## v0.93.3 - 2016-05-13

- Don't unset `{tracker: {wrtc: false}}` option to `WebTorrent` constructor.

## v0.93.2 - 2016-05-12

- When a duplicate torrent is added, don't emit the 'infoHash' event after 'error'. The 'error' event should be the last event.

## v0.93.1 - 2016-05-08

- Remove `path-exists` dependency.

## v0.93.0 - 2016-05-08

- Move tracker options (`rtcConfig` and `wrtc`) into `opts.tracker`.

  Before:

  ```js
  var client = new WebTorrent({ rtcConfig: {}, wrtc: {} })
  ```

  After:

  ```js
  var client = new WebTorrent({ tracker: { rtcConfig: {}, wrtc: {} } })
  ```

## v0.92.0 - 2016-05-05

- Add new event: `torrent.on('noPeers', function (announceType) {})`

  Emitted whenever a DHT or tracker announce occurs, but no peers have been found.  `announceType` is either `'tracker'` or `'dht'` depending on which announce occurred to trigger this event.  Note that if you're attempting to discover peers from both a tracker and a DHT, you'll see this event separately for each.

## v0.91.4 - 2016-05-05

- Fix exception: "peer.\_destroy is not a function" when calling `torrent.pause()`

## v0.91.3 - 2016-05-04

- Fix `torrent.swarm` from causing an infinite recursion.

## v0.91.2 - 2016-04-28

- Test node v6

## v0.91.1 - 2016-04-24

- Emit 'done' event *after* sending the `'complete'` message to the tracker.

## v0.91.0 - 2016-04-21

### Added

- `client.listening` property to signal whether TCP server is listening for incoming
  connections.

- `client.dhtPort` property reflects the actual DHT port when user doesn't specify one
  (this is parallel to `client.torrentPort` for the TCP torrent listening server)

### Changed

- Merged `Swarm` class into `Torrent` object. Properties on `torrent.swarm` (like
  `torrent.swarm.wires`) now exist on `torrent` (e.g. `torrent.wires`).

- Deprecate: Do not use `torrent.swarm` anymore. Use `torrent` instead.

- `torrent.addPeer` can no longer be called before the `infoHash` event has been
  emitted.

- Remove `torrent.on('listening')` event. Use `client.on('listening')` instead.

- Remove support from `TCPPool` for listening on multiple ports. This was not used by
  WebTorrent and just added complexity. There is now a single `TCPPool` instance for the
  whole WebTorrent client.

- Deprecate: Do not use `client.download()` anymore. Use `client.add()` instead.

- Only pass `torrent.infoHash` to the Chunk Store constructor, instead of the `Torrent`
  instance itself, to prevent accidental memory leaks of the `Torrent` object by the
  store. (Open an issue if you were using other properties. They can be re-added.)

- Non-fatal errors with a single torrent will be emitted at `torrent.on('error')`. You
  should listen to this event. Previously, all torrent errors were also emitted on
  `client.on('error')` and handling `torrent.on('error')` was optional. This design is
  better since now it is possible to distinguish between fatal client errors
  (`client.on('error')`) when the whole client becomes unusable versus recoverable errors
  where only a single torrent fails (`torrent.on('error')`) but the client can continue to
  be used. However, if there is no `torrent.on('error')` event, then the error will be
  forwarded to `client.on('error')`. This prevents crashing the client when the user
  only has a listener on the client, but it makes it impossible for them to determine
  a client error versus a torrent error.

- Removed `torrent.numBlockedPeers` property. Use the `blockedPeer` event to track this
  yourself.

### Fixed

- If `client.get` is passed a `Torrent` instance, it now only returns it if it is present
  in the client.

- Errors creating a torrent with `client.seed` are now emitted on the returned `torrent`
  object instead of the client (unless there is no event listeners on
  `torrent.on('error')` as previously discussed). The torrent object is now also destroyed
  automatically for the user, as was probably expected.

- Do not return existing torrent object when duplicate torrent is added. Fire an
  `'error'` event instead.

- Memory leaks of `Torrent` object caused by many internal subclasses of WebTorrent,
  including `RarityMap`, `TCPPool`, `WebConn`, `Server`, `File`.

- `client.ratio` and `torrent.ratio` are now calculated as `uploaded / received` instead
  of `uploaded / downloaded`.

## Previous versions

We did not maintain a changelog for versions prior to v0.91.0. The initial release of WebTorrent was on Dec 4, 2013.


================================================
FILE: LICENSE
================================================
The MIT License (MIT)

Copyright (c) Feross Aboukhadijeh and WebTorrent, LLC

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


================================================
FILE: README.md
================================================
<h1 align="center">
  <br>
  <a href="https://webtorrent.io"><img src="https://webtorrent.io/img/WebTorrent.png" alt="WebTorrent" width="200"></a>
  <br>
  WebTorrent
  <br>
  <br>
</h1>

<h4 align="center">The streaming torrent client. For node.js and the web.</h4>

<p align="center">
  <a href="https://discord.gg/cnXkm4Z"><img src="https://img.shields.io/discord/612575111718895616" alt="discord"></a>
  <a href="https://github.com/webtorrent/webtorrent/actions"><img src="https://img.shields.io/github/actions/workflow/status/webtorrent/webtorrent/ci.yml?branch=master" alt="ci"></a>
  <a href="https://www.npmjs.com/package/webtorrent"><img src="https://img.shields.io/npm/v/webtorrent.svg" alt="npm version"></a>
  <a href="https://www.npmjs.com/package/webtorrent"><img src="https://img.shields.io/npm/dm/webtorrent.svg" alt="npm downloads"></a>
  <a href="https://standardjs.com"><img src="https://img.shields.io/badge/code_style-standard-brightgreen.svg" alt="Standard - JavaScript Style Guide"></a>
</p>

<h5 align="center">
  Sponsored by&nbsp;&nbsp;&nbsp;&nbsp;<a href="https://socket.dev"><img src="https://webtorrent.io/img/supporters/socket.png" alt="Socket - JavaScript open source supply chain security" height=35 valign="middle"></a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="https://www.wormhole.app/?utm_medium=sponsorship&utm_source=webtorrent&utm_campaign=feross"><img src="https://webtorrent.io/img/supporters/wormhole.png" alt="Wormhole" height=30 valign="middle"></a>
</h5>
<br>

**WebTorrent** is a streaming torrent client for **node.js** and the **browser**. YEP,
THAT'S RIGHT. THE BROWSER. It's written completely in JavaScript – the language of the web
– so the same code works in both runtimes.

In node.js, this module is a simple torrent client, using TCP and UDP to talk to
other torrent clients.

In the browser, WebTorrent uses **WebRTC** (data channels) for peer-to-peer transport.
It can be used **without** browser plugins, extensions, or installations. It's Just
JavaScript™. Note: WebTorrent does **not** support UDP/TCP peers in browser.

Simply include the
[`webtorrent.min.js`](https://cdn.jsdelivr.net/npm/webtorrent@latest/webtorrent.min.js) script
on your page to start fetching files over WebRTC using the BitTorrent protocol, or
`import WebTorrent from 'webtorrent'` with [browserify](http://browserify.org/) or [webpack](https://webpack.js.org/). See [demo apps
](#who-is-using-webtorrent-today) and [code examples](#usage) below.

[![jsdelivr download count](https://data.jsdelivr.com/v1/package/npm/webtorrent/badge)](https://cdn.jsdelivr.net/npm/webtorrent@latest/webtorrent.min.js)

To make BitTorrent work over WebRTC (which is the only P2P transport that works on the
web) we made some protocol changes. Therefore, a browser-based WebTorrent client or **"web
peer"** can only connect to other clients that support WebTorrent/WebRTC.

To seed files to web peers, use a client that supports WebTorrent, e.g.
[WebTorrent Desktop][webtorrent-desktop], a desktop client with a
familiar UI that can connect to web peers,
[webtorrent-hybrid](https://github.com/webtorrent/webtorrent-hybrid), a command line program,
or [Instant.io](https://instant.io/), a website. Established torrent clients like
**Vuze** have [already added WebTorrent support](https://wiki.vuze.com/w/WebTorrent) so
they can connect to both normal *and* web peers. We hope other clients will follow.

![Network](https://webtorrent.io/img/network.png)

### Features

- **Torrent client for node.js & the browser** (same npm package!)
- **Insanely fast**
- Download **multiple torrents** simultaneously, efficiently
- **Pure Javascript** (no native dependencies)
- Exposes files as **streams**
  - Fetches pieces from the network on-demand so seeking is supported (even before torrent is finished)
  - Seamlessly switches between sequential and rarest-first piece selection strategy
- Supports advanced torrent client features
  - **magnet uri** support via **[ut_metadata](https://github.com/webtorrent/ut_metadata)**
  - **peer discovery** via **[dht](https://github.com/webtorrent/bittorrent-dht)**,
    **[tracker](https://github.com/webtorrent/bittorrent-tracker)**,
    **[lsd](https://github.com/webtorrent/bittorrent-lsd)**, and
    **[ut_pex](https://github.com/webtorrent/ut_pex)**
  - **[protocol extension api](https://github.com/webtorrent/bittorrent-protocol#extension-api)**
    for adding new extensions
- **Comprehensive test suite** (runs completely offline, so it's reliable and fast)
- Check all the **[supported BEPs here](docs/bep_support.md)**

#### Browser/WebRTC environment features

- **WebRTC data channels** for lightweight peer-to-peer communication with **no plugins**
- **No silos.** WebTorrent is a P2P network for the **entire web.** WebTorrent clients
  running on one domain can connect to clients on any other domain.
- Stream video torrents into a `<video>` tag (`webm, mkv, mp4, ogv, mov, etc (AV1, H264, HEVC*, VP8, VP9, AAC, FLAC, MP3, OPUS, Vorbis, etc)`)
- Supports Chrome, Firefox, Opera and Safari.

<!-- <p align="center">
  <a href="https://saucelabs.com/u/webtorrent">
    <img src="https://saucelabs.com/browser-matrix/webtorrent.svg" alt="Sauce Labs">
  </a>
</p> -->

### Install

To install WebTorrent for use in node or the browser with `import WebTorrent from 'webtorrent'`, run:

```bash
npm install webtorrent
```

To install a `webtorrent`
[command line program](https://github.com/webtorrent/webtorrent-cli), run:

```bash
npm install webtorrent-cli -g
```

To install a WebTorrent desktop application for Mac, Windows, or Linux, see
[WebTorrent Desktop][webtorrent-desktop].

### Ways to help

- **Join us in [Gitter][webtorrent-gitter-url]** or on freenode at `#webtorrent` to help
  with development or to hang out with some mad science hackers :)
- **[Create a new issue](https://github.com/webtorrent/webtorrent/issues/new)** to report bugs
- **[Fix an issue](https://github.com/webtorrent/webtorrent/issues?state=open)**. WebTorrent
  is an [OPEN Open Source Project](https://github.com/webtorrent/.github/blob/master/CONTRIBUTING.md)!

### Who is using WebTorrent today?

**[Lots of folks!](docs/faq.md#who-is-using-webtorrent-today)**

### WebTorrent API Documentation

**[Read the full API Documentation](docs/api.md).**

### Usage

WebTorrent is the first BitTorrent client that works in the browser, using open web
standards (no plugins, just HTML5 and WebRTC)! It's easy to get started!

#### In the browser

##### Downloading a file is simple:

```js
import WebTorrent from 'webtorrent'

const client = new WebTorrent()
const magnetURI = '...'

client.add(magnetURI, torrent => {
  // Got torrent metadata!
  console.log('Client is downloading:', torrent.infoHash)

  for (const file of torrent.files) {
    document.body.append(file.name)
  }
})
```

##### Seeding a file is simple, too:

```js
import dragDrop from 'drag-drop'
import WebTorrent from 'webtorrent'

const client = new WebTorrent()

// When user drops files on the browser, create a new torrent and start seeding it!
dragDrop('body', files => {
  client.seed(files, torrent => {
    console.log('Client is seeding:', torrent.infoHash)
  })
})
```

There are more examples in [docs/get-started.md](docs/get-started.md).

##### Browserify

WebTorrent works great with [browserify](http://browserify.org/), an npm package that lets
you use [node](http://nodejs.org/)-style require() to organize your browser code and load modules installed by [npm](https://www.npmjs.com/) (as seen in the previous examples).

##### Webpack

WebTorrent also works with [webpack](https://webpack.js.org/), another module
bundler. However, webpack requires extra configuration which you can find in [the webpack bundle config used by webtorrent](/scripts/browser.webpack.js).


Or, you can just use the pre-built version via
`import WebTorrent from 'webtorrent/dist/webtorrent.min.js'` and skip the webpack configuration.

##### Script tag

WebTorrent is also available as a standalone script
([`webtorrent.min.js`](webtorrent.min.js)) which exposes `WebTorrent` on the `window`
object, so it can be used with just a script tag:

```html
<script type='module'>
  import WebTorrent from 'webtorrent.min.js'
</script>
```

The WebTorrent script is also hosted on fast, reliable CDN infrastructure for easy inclusion on your site:

```html
<script type='module'>
  import WebTorrent from 'https://esm.sh/webtorrent/dist/webtorrent.min.js'
</script>
```

##### Chrome App

If you want to use WebTorrent in a
[Chrome App](https://developer.chrome.com/apps/about_apps), you can include the
following script:

```html
<script type='module'>
  import WebTorrent from 'webtorrent.chromeapp.js'
</script>
```

Be sure to enable the `chrome.sockets.udp` and `chrome.sockets.tcp` permissions!

#### In Node.js

WebTorrent also works in node.js, using the *same npm package!* It's mad science!

**NOTE**: To connect to "web peers" (browsers) in addition to normal BitTorrent peers, use
[webtorrent-hybrid](https://github.com/webtorrent/webtorrent-hybrid) which includes WebRTC
support for node.

#### As a command line app

WebTorrent is also available as a
[command line app](https://github.com/webtorrent/webtorrent-cli). Here's how to use it:

```bash
$ npm install webtorrent-cli -g
$ webtorrent --help
```

To download a torrent:

```bash
$ webtorrent magnet_uri
```

To stream a torrent to a device like **AirPlay** or **Chromecast**, just pass a flag:

```bash
$ webtorrent magnet_uri --airplay
```

There are many supported streaming options:

```bash
--airplay               Apple TV
--chromecast            Chromecast
--mplayer               MPlayer
--mpv                   MPV
--omx [jack]            omx [default: hdmi]
--vlc                   VLC
--xbmc                  XBMC
--stdout                standard out [implies --quiet]
```

In addition to magnet uris, WebTorrent supports [many ways](docs/api.md#clientaddtorrentid-opts-function-ontorrent-torrent-) to specify a torrent.

### Talks about WebTorrent

- Sep 2017 - Nordic JS - [Get Rich Quick With P2P Crypto Currency](https://www.youtube.com/watch?v=8N_4Furztjo)
- May 2017 - Char.la - [WebTorrent and Peerify](https://youtu.be/D-04vg5hvEQ?t=54m20s) (Spanish)
- Nov 2016 - NodeConf Argentina - [Real world Electron: Building Cross-platform desktop apps with JavaScript](https://www.youtube.com/watch?v=YLExGgEnbFY)
- May 2016 - SIGNAL Conference - [BitTorrent in the Browser](https://www.youtube.com/watch?v=2qrUx-C5Np4)
- May 2015 - Data Terra Nemo - [WebTorrent: Mother of all demos](https://www.youtube.com/watch?v=RRtNEcAaUO8)
- May 2015 - Data Terra Nemo - [WebRTC Everywhere](https://www.youtube.com/watch?v=RRtNEcAaUO8)
- Nov 2014 - JSConf Asia - [How WebTorrent Works](https://www.youtube.com/watch?v=kxHRATfvnlw)
- Sep 2014 - NodeConf EU - [WebRTC Mad Science](https://www.youtube.com/watch?v=BVBXkzVjvPc) (first working WebTorrent demo)
- Apr 2014 - CraftConf - [Bringing BitTorrent to the Web](https://www.youtube.com/watch?v=PT8s_IVWDgw)
- May 2014 - JS.LA - [How I Built a BitTorrent Client in the Browser](https://vimeo.com/97324247) (progress update; node client working)
- Oct 2013 - RealtimeConf - [WebRTC Black Magic](https://vimeo.com/77265280) (first mention of idea for WebTorrent)

### Modules

Most of the active development is happening inside of small npm packages which are used by WebTorrent.

#### The Node Way™

> "When applications are done well, they are just the really application-specific, brackish residue that can't be so easily abstracted away. All the nice, reusable components sublimate away onto github and npm where everybody can collaborate to advance the commons." — substack from ["how I write modules"](https://gist.github.com/substack/5075355)

![node.js is shiny](https://feross.net/x/node2.gif)

#### Modules

These are the main modules that make up WebTorrent:

| module | tests | version | description |
|---|---|---|---|
| **[webtorrent][webtorrent]** | [![][webtorrent-ti]][webtorrent-tu] | [![][webtorrent-ni]][webtorrent-nu] | **torrent client (this module)**
| [bittorrent-dht][bittorrent-dht] | [![][bittorrent-dht-ti]][bittorrent-dht-tu] | [![][bittorrent-dht-ni]][bittorrent-dht-nu] | distributed hash table client
| [bittorrent-peerid][bittorrent-peerid] | [![][bittorrent-peerid-ti]][bittorrent-peerid-tu] | [![][bittorrent-peerid-ni]][bittorrent-peerid-nu] | identify client name/version
| [bittorrent-protocol][bittorrent-protocol] | [![][bittorrent-protocol-ti]][bittorrent-protocol-tu] | [![][bittorrent-protocol-ni]][bittorrent-protocol-nu] | bittorrent protocol stream
| [bittorrent-tracker][bittorrent-tracker] | [![][bittorrent-tracker-ti]][bittorrent-tracker-tu] | [![][bittorrent-tracker-ni]][bittorrent-tracker-nu] | bittorrent tracker server/client
| [bittorrent-lsd][bittorrent-lsd] | [![][bittorrent-lsd-ti]][bittorrent-lsd-tu] | [![][bittorrent-lsd-ni]][bittorrent-lsd-nu] | bittorrent local service discovery
| [create-torrent][create-torrent] | [![][create-torrent-ti]][create-torrent-tu] | [![][create-torrent-ni]][create-torrent-nu] | create .torrent files
| [magnet-uri][magnet-uri] | [![][magnet-uri-ti]][magnet-uri-tu] | [![][magnet-uri-ni]][magnet-uri-nu] | parse magnet uris
| [parse-torrent][parse-torrent] | [![][parse-torrent-ti]][parse-torrent-tu] | [![][parse-torrent-ni]][parse-torrent-nu] | parse torrent identifiers
| [torrent-discovery][torrent-discovery] | [![][torrent-discovery-ti]][torrent-discovery-tu] | [![][torrent-discovery-ni]][torrent-discovery-nu] | find peers via dht, tracker, and lsd
| [ut_metadata][ut_metadata] | [![][ut_metadata-ti]][ut_metadata-tu] | [![][ut_metadata-ni]][ut_metadata-nu] | metadata for magnet uris (protocol extension)
| [ut_pex][ut_pex] | [![][ut_pex-ti]][ut_pex-tu] | [![][ut_pex-ni]][ut_pex-nu] | peer discovery (protocol extension)

[webtorrent]: https://github.com/webtorrent/webtorrent
[webtorrent-gitter-url]: https://gitter.im/webtorrent/webtorrent

[webtorrent-ti]: https://img.shields.io/github/actions/workflow/status/webtorrent/webtorrent/ci.yml
[webtorrent-tu]: https://github.com/webtorrent/webtorrent/actions
[webtorrent-ni]: https://img.shields.io/npm/v/webtorrent.svg
[webtorrent-nu]: https://www.npmjs.com/package/webtorrent
[webtorrent-desktop]: https://webtorrent.io/desktop

[bittorrent-dht]: https://github.com/webtorrent/bittorrent-dht
[bittorrent-dht-ti]: https://img.shields.io/github/actions/workflow/status/webtorrent/bittorrent-dht/ci.yml?branch=master
[bittorrent-dht-tu]: https://github.com/webtorrent/bittorrent-dht/actions
[bittorrent-dht-ni]: https://img.shields.io/npm/v/bittorrent-dht.svg
[bittorrent-dht-nu]: https://www.npmjs.com/package/bittorrent-dht

[bittorrent-peerid]: https://github.com/webtorrent/bittorrent-peerid
[bittorrent-peerid-ti]: https://img.shields.io/github/actions/workflow/status/webtorrent/bittorrent-peerid/ci.yml?branch=master
[bittorrent-peerid-tu]: https://github.com/webtorrent/bittorrent-peerid/actions
[bittorrent-peerid-ni]: https://img.shields.io/npm/v/bittorrent-peerid.svg
[bittorrent-peerid-nu]: https://www.npmjs.com/package/bittorrent-peerid

[bittorrent-protocol]: https://github.com/webtorrent/bittorrent-protocol
[bittorrent-protocol-ti]: https://img.shields.io/github/actions/workflow/status/webtorrent/bittorrent-protocol/ci.yml?branch=master
[bittorrent-protocol-tu]: https://github.com/webtorrent/bittorrent-protocol/actions
[bittorrent-protocol-ni]: https://img.shields.io/npm/v/bittorrent-protocol.svg
[bittorrent-protocol-nu]: https://www.npmjs.com/package/bittorrent-protocol

[bittorrent-tracker]: https://github.com/webtorrent/bittorrent-tracker
[bittorrent-tracker-ti]: https://img.shields.io/github/actions/workflow/status/webtorrent/bittorrent-tracker/ci.yml?branch=master
[bittorrent-tracker-tu]: https://github.com/webtorrent/bittorrent-tracker/actions
[bittorrent-tracker-ni]: https://img.shields.io/npm/v/bittorrent-tracker.svg
[bittorrent-tracker-nu]: https://www.npmjs.com/package/bittorrent-tracker

[bittorrent-lsd]: https://github.com/webtorrent/bittorrent-lsd
[bittorrent-lsd-ti]: https://img.shields.io/github/actions/workflow/status/webtorrent/bittorrent-lsd/ci.yml?branch=master
[bittorrent-lsd-tu]: https://github.com/webtorrent/bittorrent-lsd/actions
[bittorrent-lsd-ni]: https://img.shields.io/npm/v/bittorrent-lsd.svg
[bittorrent-lsd-nu]: https://www.npmjs.com/package/bittorrent-lsd

[create-torrent]: https://github.com/webtorrent/create-torrent
[create-torrent-ti]: https://img.shields.io/github/actions/workflow/status/webtorrent/create-torrent/ci.yml?branch=master
[create-torrent-tu]: https://github.com/webtorrent/create-torrent/actions
[create-torrent-ni]: https://img.shields.io/npm/v/create-torrent.svg
[create-torrent-nu]: https://www.npmjs.com/package/create-torrent

[magnet-uri]: https://github.com/webtorrent/magnet-uri
[magnet-uri-ti]: https://img.shields.io/github/actions/workflow/status/webtorrent/magnet-uri/ci.yml?branch=master
[magnet-uri-tu]: https://github.com/webtorrent/magnet-uri/actions
[magnet-uri-ni]: https://img.shields.io/npm/v/magnet-uri.svg
[magnet-uri-nu]: https://www.npmjs.com/package/magnet-uri

[parse-torrent]: https://github.com/webtorrent/parse-torrent
[parse-torrent-ti]: https://img.shields.io/github/actions/workflow/status/webtorrent/parse-torrent/ci.yml?branch=master
[parse-torrent-tu]: https://github.com/webtorrent/parse-torrent/actions
[parse-torrent-ni]: https://img.shields.io/npm/v/parse-torrent.svg
[parse-torrent-nu]: https://www.npmjs.com/package/parse-torrent

[torrent-discovery]: https://github.com/webtorrent/torrent-discovery
[torrent-discovery-ti]: https://img.shields.io/github/actions/workflow/status/webtorrent/torrent-discovery/ci.yml?branch=master
[torrent-discovery-tu]: https://github.com/webtorrent/torrent-discovery/actions
[torrent-discovery-ni]: https://img.shields.io/npm/v/torrent-discovery.svg
[torrent-discovery-nu]: https://www.npmjs.com/package/torrent-discovery

[ut_metadata]: https://github.com/webtorrent/ut_metadata
[ut_metadata-ti]: https://img.shields.io/github/actions/workflow/status/webtorrent/ut_metadata/ci.yml?branch=master
[ut_metadata-tu]: https://github.com/webtorrent/ut_metadata/actions
[ut_metadata-ni]: https://img.shields.io/npm/v/ut_metadata.svg
[ut_metadata-nu]: https://www.npmjs.com/package/ut_metadata

[ut_pex]: https://github.com/webtorrent/ut_pex
[ut_pex-ti]: https://img.shields.io/github/actions/workflow/status/webtorrent/ut_pex/ci.yml?branch=master
[ut_pex-tu]: https://github.com/webtorrent/ut_pex/actions
[ut_pex-ni]: https://img.shields.io/npm/v/ut_pex.svg
[ut_pex-nu]: https://www.npmjs.com/package/ut_pex

#### Enable debug logs

In **node**, enable debug logs by setting the `DEBUG` environment variable to the name of the
module you want to debug (e.g. `bittorrent-protocol`, or `*` to print **all logs**).

```bash
DEBUG=* webtorrent
```

In the **browser**, enable debug logs by running this in the developer console:

```js
localStorage.setItem('debug', '*')
```

Disable by running this:

```js
localStorage.removeItem('debug')
```

### License

MIT. Copyright (c) [Feross Aboukhadijeh](https://feross.org) and [WebTorrent, LLC](https://webtorrent.io).


================================================
FILE: dist/webtorrent.chromeapp.js
================================================
var t={20:(t,e,r)=>{var i=r(2861).Buffer,n=r(7108),s=r(96),o=r(6698),a=r(5359),h=r(4847),u=r(2951);function f(t){s.Writable.call(this);var e=u[t];if(!e)throw new Error("Unknown message digest");this._hashType=e.hash,this._hash=n(e.hash),this._tag=e.id,this._signType=e.sign}function l(t){s.Writable.call(this);var e=u[t];if(!e)throw new Error("Unknown message digest");this._hash=n(e.hash),this._tag=e.id,this._signType=e.sign}function c(t){return new f(t)}function d(t){return new l(t)}Object.keys(u).forEach(function(t){u[t].id=i.from(u[t].id,"hex"),u[t.toLowerCase()]=u[t]}),o(f,s.Writable),f.prototype._write=function(t,e,r){this._hash.update(t),r()},f.prototype.update=function(t,e){return this._hash.update("string"==typeof t?i.from(t,e):t),this},f.prototype.sign=function(t,e){this.end();var r=this._hash.digest(),i=a(r,t,this._hashType,this._signType,this._tag);return e?i.toString(e):i},o(l,s.Writable),l.prototype._write=function(t,e,r){this._hash.update(t),r()},l.prototype.update=function(t,e){return this._hash.update("string"==typeof t?i.from(t,e):t),this},l.prototype.verify=function(t,e,r){var n="string"==typeof e?i.from(e,r):e;this.end();var s=this._hash.digest();return h(n,s,t,this._signType,this._tag)},t.exports={Sign:c,Verify:d,createSign:c,createVerify:d}},41:(t,e,r)=>{var i=r(655),n=r(8068),s=r(9675),o=r(5795);t.exports=function(t,e,r){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new s("`obj` must be an object or a function`");if("string"!=typeof e&&"symbol"!=typeof e)throw new s("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new s("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new s("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new s("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new s("`loose`, if provided, must be a boolean");var a=arguments.length>3?arguments[3]:null,h=arguments.length>4?arguments[4]:null,u=arguments.length>5?arguments[5]:null,f=arguments.length>6&&arguments[6],l=!!o&&o(t,e);if(i)i(t,e,{configurable:null===u&&l?l.configurable:!u,enumerable:null===a&&l?l.enumerable:!a,value:r,writable:null===h&&l?l.writable:!h});else{if(!f&&(a||h||u))throw new n("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");t[e]=r}}},76:t=>{t.exports=Function.prototype.call},82:(t,e,r)=>{var i=r(6698),n=r(8287).Buffer,s=r(7568),o=s.base,a=s.constants.der;function h(t){this.enc="der",this.name=t.name,this.entity=t,this.tree=new u,this.tree._init(t.body)}function u(t){o.Node.call(this,"der",t)}function f(t){return t<10?"0"+t:t}t.exports=h,h.prototype.encode=function(t,e){return this.tree._encode(t,e).join()},i(u,o.Node),u.prototype._encodeComposite=function(t,e,r,i){var s,o=function(t,e,r,i){var n;"seqof"===t?t="seq":"setof"===t&&(t="set");if(a.tagByName.hasOwnProperty(t))n=a.tagByName[t];else{if("number"!=typeof t||(0|t)!==t)return i.error("Unknown tag: "+t);n=t}if(n>=31)return i.error("Multi-octet tag encoding unsupported");e||(n|=32);return n|=a.tagClassByName[r||"universal"]<<6,n}(t,e,r,this.reporter);if(i.length<128)return(s=new n(2))[0]=o,s[1]=i.length,this._createEncoderBuffer([s,i]);for(var h=1,u=i.length;u>=256;u>>=8)h++;(s=new n(2+h))[0]=o,s[1]=128|h;u=1+h;for(var f=i.length;f>0;u--,f>>=8)s[u]=255&f;return this._createEncoderBuffer([s,i])},u.prototype._encodeStr=function(t,e){if("bitstr"===e)return this._createEncoderBuffer([0|t.unused,t.data]);if("bmpstr"===e){for(var r=new n(2*t.length),i=0;i<t.length;i++)r.writeUInt16BE(t.charCodeAt(i),2*i);return this._createEncoderBuffer(r)}return"numstr"===e?this._isNumstr(t)?this._createEncoderBuffer(t):this.reporter.error("Encoding of string type: numstr supports only digits and space"):"printstr"===e?this._isPrintstr(t)?this._createEncoderBuffer(t):this.reporter.error("Encoding of string type: printstr supports only latin upper and lower case letters, digits, space, apostrophe, left and rigth parenthesis, plus sign, comma, hyphen, dot, slash, colon, equal sign, question mark"):/str$/.test(e)||"objDesc"===e?this._createEncoderBuffer(t):this.reporter.error("Encoding of string type: "+e+" unsupported")},u.prototype._encodeObjid=function(t,e,r){if("string"==typeof t){if(!e)return this.reporter.error("string objid given, but no values map found");if(!e.hasOwnProperty(t))return this.reporter.error("objid not found in values map");t=e[t].split(/[\s\.]+/g);for(var i=0;i<t.length;i++)t[i]|=0}else if(Array.isArray(t)){t=t.slice();for(i=0;i<t.length;i++)t[i]|=0}if(!Array.isArray(t))return this.reporter.error("objid() should be either array or string, got: "+JSON.stringify(t));if(!r){if(t[1]>=40)return this.reporter.error("Second objid identifier OOB");t.splice(0,2,40*t[0]+t[1])}var s=0;for(i=0;i<t.length;i++){var o=t[i];for(s++;o>=128;o>>=7)s++}var a=new n(s),h=a.length-1;for(i=t.length-1;i>=0;i--){o=t[i];for(a[h--]=127&o;(o>>=7)>0;)a[h--]=128|127&o}return this._createEncoderBuffer(a)},u.prototype._encodeTime=function(t,e){var r,i=new Date(t);return"gentime"===e?r=[f(i.getFullYear()),f(i.getUTCMonth()+1),f(i.getUTCDate()),f(i.getUTCHours()),f(i.getUTCMinutes()),f(i.getUTCSeconds()),"Z"].join(""):"utctime"===e?r=[f(i.getFullYear()%100),f(i.getUTCMonth()+1),f(i.getUTCDate()),f(i.getUTCHours()),f(i.getUTCMinutes()),f(i.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+e+" time is not supported yet"),this._encodeStr(r,"octstr")},u.prototype._encodeNull=function(){return this._createEncoderBuffer("")},u.prototype._encodeInt=function(t,e){if("string"==typeof t){if(!e)return this.reporter.error("String int or enum given, but no values map");if(!e.hasOwnProperty(t))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(t));t=e[t]}if("number"!=typeof t&&!n.isBuffer(t)){var r=t.toArray();!t.sign&&128&r[0]&&r.unshift(0),t=new n(r)}if(n.isBuffer(t)){var i=t.length;0===t.length&&i++;var s=new n(i);return t.copy(s),0===t.length&&(s[0]=0),this._createEncoderBuffer(s)}if(t<128)return this._createEncoderBuffer(t);if(t<256)return this._createEncoderBuffer([0,t]);i=1;for(var o=t;o>=256;o>>=8)i++;for(o=(s=new Array(i)).length-1;o>=0;o--)s[o]=255&t,t>>=8;return 128&s[0]&&s.unshift(0),this._createEncoderBuffer(new n(s))},u.prototype._encodeBool=function(t){return this._createEncoderBuffer(t?255:0)},u.prototype._use=function(t,e){return"function"==typeof t&&(t=t(e)),t._getEncoder("der").tree},u.prototype._skipDefault=function(t,e,r){var i,n=this._baseState;if(null===n.default)return!1;var s=t.join();if(void 0===n.defaultBuffer&&(n.defaultBuffer=this._encodeValue(n.default,e,r).join()),s.length!==n.defaultBuffer.length)return!1;for(i=0;i<s.length;i++)if(s[i]!==n.defaultBuffer[i])return!1;return!0}},96:(t,e,r)=>{var i=r(717),n=r(8310);"disable"===i.env.READABLE_STREAM&&n?(t.exports=n,(e=t.exports=n.Readable).Readable=n.Readable,e.Writable=n.Writable,e.Duplex=n.Duplex,e.Transform=n.Transform,e.PassThrough=n.PassThrough,e.Stream=n):((e=t.exports=r(206)).Stream=n||e,e.Readable=e,e.Writable=r(7314),e.Duplex=r(6248),e.Transform=r(1816),e.PassThrough=r(5242))},113:t=>{const e={};function r(t,r,i){i||(i=Error);class n extends i{constructor(t,e,i){super(function(t,e,i){return"string"==typeof r?r:r(t,e,i)}(t,e,i))}}n.prototype.name=i.name,n.prototype.code=t,e[t]=n}function i(t,e){if(Array.isArray(t)){const r=t.length;return t=t.map(t=>String(t)),r>2?`one of ${e} ${t.slice(0,r-1).join(", ")}, or `+t[r-1]:2===r?`one of ${e} ${t[0]} or ${t[1]}`:`of ${e} ${t[0]}`}return`of ${e} ${String(t)}`}r("ERR_INVALID_OPT_VALUE",function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'},TypeError),r("ERR_INVALID_ARG_TYPE",function(t,e,r){let n;var s,o;let a;if("string"==typeof e&&(s="not ",e.substr(!o||o<0?0:+o,s.length)===s)?(n="must not be",e=e.replace(/^not /,"")):n="must be",function(t,e,r){return(void 0===r||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}(t," argument"))a=`The ${t} ${n} ${i(e,"type")}`;else{const r=function(t,e,r){return"number"!=typeof r&&(r=0),!(r+e.length>t.length)&&-1!==t.indexOf(e,r)}(t,".")?"property":"argument";a=`The "${t}" ${r} ${n} ${i(e,"type")}`}return a+=". Received type "+typeof r,a},TypeError),r("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),r("ERR_METHOD_NOT_IMPLEMENTED",function(t){return"The "+t+" method is not implemented"}),r("ERR_STREAM_PREMATURE_CLOSE","Premature close"),r("ERR_STREAM_DESTROYED",function(t){return"Cannot call "+t+" after a stream was destroyed"}),r("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),r("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),r("ERR_STREAM_WRITE_AFTER_END","write after end"),r("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),r("ERR_UNKNOWN_ENCODING",function(t){return"Unknown encoding: "+t},TypeError),r("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),t.exports.F=e},125:(t,e,r)=>{var i=r(4050),n=r(1241),s=r(530),o=r(2438),a=r(8078);function h(t,e,r){if(t=t.toLowerCase(),s[t])return n.createCipheriv(t,e,r);if(o[t])return new i({key:e,iv:r,mode:t});throw new TypeError("invalid suite type")}function u(t,e,r){if(t=t.toLowerCase(),s[t])return n.createDecipheriv(t,e,r);if(o[t])return new i({key:e,iv:r,mode:t,decrypt:!0});throw new TypeError("invalid suite type")}e.createCipher=e.Cipher=function(t,e){var r,i;if(t=t.toLowerCase(),s[t])r=s[t].key,i=s[t].iv;else{if(!o[t])throw new TypeError("invalid suite type");r=8*o[t].key,i=o[t].iv}var n=a(e,!1,r,i);return h(t,n.key,n.iv)},e.createCipheriv=e.Cipheriv=h,e.createDecipher=e.Decipher=function(t,e){var r,i;if(t=t.toLowerCase(),s[t])r=s[t].key,i=s[t].iv;else{if(!o[t])throw new TypeError("invalid suite type");r=8*o[t].key,i=o[t].iv}var n=a(e,!1,r,i);return u(t,n.key,n.iv)},e.createDecipheriv=e.Decipheriv=u,e.listCiphers=e.getCiphers=function(){return Object.keys(o).concat(n.getCiphers())}},206:(t,e,r)=>{var i=r(717),n=r(3225);t.exports=v;var s,o=r(2240);v.ReadableState=b;r(7007).EventEmitter;var a=function(t,e){return t.listeners(e).length},h=r(1862),u=r(4116).Buffer,f=("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var l=Object.create(r(5622));l.inherits=r(6698);var c=r(537),d=void 0;d=c&&c.debuglog?c.debuglog("stream"):function(){};var p,m=r(672),g=r(6278);l.inherits(v,h);var y=["error","close","destroy","pause","resume"];function b(t,e){t=t||{};var i=e instanceof(s=s||r(6248));this.objectMode=!!t.objectMode,i&&(this.objectMode=this.objectMode||!!t.readableObjectMode);var n=t.highWaterMark,o=t.readableHighWaterMark,a=this.objectMode?16:16384;this.highWaterMark=n||0===n?n:i&&(o||0===o)?o:a,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new m,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(p||(p=r(6427).I),this.decoder=new p(t.encoding),this.encoding=t.encoding)}function v(t){if(s=s||r(6248),!(this instanceof v))return new v(t);this._readableState=new b(t,this),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),h.call(this)}function w(t,e,r,i,n){var s,o=t._readableState;null===e?(o.reading=!1,function(t,e){if(e.ended)return;if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,k(t)}(t,o)):(n||(s=function(t,e){var r;i=e,u.isBuffer(i)||i instanceof f||"string"==typeof e||void 0===e||t.objectMode||(r=new TypeError("Invalid non-string/buffer chunk"));var i;return r}(o,e)),s?t.emit("error",s):o.objectMode||e&&e.length>0?("string"==typeof e||o.objectMode||Object.getPrototypeOf(e)===u.prototype||(e=function(t){return u.from(t)}(e)),i?o.endEmitted?t.emit("error",new Error("stream.unshift() after end event")):_(t,o,e,!0):o.ended?t.emit("error",new Error("stream.push() after EOF")):(o.reading=!1,o.decoder&&!r?(e=o.decoder.write(e),o.objectMode||0!==e.length?_(t,o,e,!1):x(t,o)):_(t,o,e,!1))):i||(o.reading=!1));return function(t){return!t.ended&&(t.needReadable||t.length<t.highWaterMark||0===t.length)}(o)}function _(t,e,r,i){e.flowing&&0===e.length&&!e.sync?(t.emit("data",r),t.read(0)):(e.length+=e.objectMode?1:r.length,i?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&k(t)),x(t,e)}Object.defineProperty(v.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}}),v.prototype.destroy=g.destroy,v.prototype._undestroy=g.undestroy,v.prototype._destroy=function(t,e){this.push(null),e(t)},v.prototype.push=function(t,e){var r,i=this._readableState;return i.objectMode?r=!0:"string"==typeof t&&((e=e||i.defaultEncoding)!==i.encoding&&(t=u.from(t,e),e=""),r=!0),w(this,t,e,!1,r)},v.prototype.unshift=function(t){return w(this,t,null,!0,!1)},v.prototype.isPaused=function(){return!1===this._readableState.flowing},v.prototype.setEncoding=function(t){return p||(p=r(6427).I),this._readableState.decoder=new p(t),this._readableState.encoding=t,this};var M=8388608;function S(t,e){return t<=0||0===e.length&&e.ended?0:e.objectMode?1:t!=t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=function(t){return t>=M?t=M:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function k(t){var e=t._readableState;e.needReadable=!1,e.emittedReadable||(d("emitReadable",e.flowing),e.emittedReadable=!0,e.sync?n.nextTick(E,t):E(t))}function E(t){d("emit readable"),t.emit("readable"),C(t)}function x(t,e){e.readingMore||(e.readingMore=!0,n.nextTick(A,t,e))}function A(t,e){for(var r=e.length;!e.reading&&!e.flowing&&!e.ended&&e.length<e.highWaterMark&&(d("maybeReadMore read 0"),t.read(0),r!==e.length);)r=e.length;e.readingMore=!1}function I(t){d("readable nexttick read 0"),t.read(0)}function T(t,e){e.reading||(d("resume read 0"),t.read(0)),e.resumeScheduled=!1,e.awaitDrain=0,t.emit("resume"),C(t),e.flowing&&!e.reading&&t.read(0)}function C(t){var e=t._readableState;for(d("flow",e.flowing);e.flowing&&null!==t.read(););}function P(t,e){return 0===e.length?null:(e.objectMode?r=e.buffer.shift():!t||t>=e.length?(r=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.head.data:e.buffer.concat(e.length),e.buffer.clear()):r=function(t,e,r){var i;t<e.head.data.length?(i=e.head.data.slice(0,t),e.head.data=e.head.data.slice(t)):i=t===e.head.data.length?e.shift():r?function(t,e){var r=e.head,i=1,n=r.data;t-=n.length;for(;r=r.next;){var s=r.data,o=t>s.length?s.length:t;if(o===s.length?n+=s:n+=s.slice(0,t),0===(t-=o)){o===s.length?(++i,r.next?e.head=r.next:e.head=e.tail=null):(e.head=r,r.data=s.slice(o));break}++i}return e.length-=i,n}(t,e):function(t,e){var r=u.allocUnsafe(t),i=e.head,n=1;i.data.copy(r),t-=i.data.length;for(;i=i.next;){var s=i.data,o=t>s.length?s.length:t;if(s.copy(r,r.length-t,0,o),0===(t-=o)){o===s.length?(++n,i.next?e.head=i.next:e.head=e.tail=null):(e.head=i,i.data=s.slice(o));break}++n}return e.length-=n,r}(t,e);return i}(t,e.buffer,e.decoder),r);var r}function R(t){var e=t._readableState;if(e.length>0)throw new Error('"endReadable()" called on non-empty stream');e.endEmitted||(e.ended=!0,n.nextTick(O,e,t))}function O(t,e){t.endEmitted||0!==t.length||(t.endEmitted=!0,e.readable=!1,e.emit("end"))}function B(t,e){for(var r=0,i=t.length;r<i;r++)if(t[r]===e)return r;return-1}v.prototype.read=function(t){d("read",t),t=parseInt(t,10);var e=this._readableState,r=t;if(0!==t&&(e.emittedReadable=!1),0===t&&e.needReadable&&(e.length>=e.highWaterMark||e.ended))return d("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?R(this):k(this),null;if(0===(t=S(t,e))&&e.ended)return 0===e.length&&R(this),null;var i,n=e.needReadable;return d("need readable",n),(0===e.length||e.length-t<e.highWaterMark)&&d("length less than watermark",n=!0),e.ended||e.reading?d("reading or ended",n=!1):n&&(d("do read"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=S(r,e))),null===(i=t>0?P(t,e):null)?(e.needReadable=!0,t=0):e.length-=t,0===e.length&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&R(this)),null!==i&&this.emit("data",i),i},v.prototype._read=function(t){this.emit("error",new Error("_read() is not implemented"))},v.prototype.pipe=function(t,e){var r=this,s=this._readableState;switch(s.pipesCount){case 0:s.pipes=t;break;case 1:s.pipes=[s.pipes,t];break;default:s.pipes.push(t)}s.pipesCount+=1,d("pipe count=%d opts=%j",s.pipesCount,e);var h=(!e||!1!==e.end)&&t!==i.stdout&&t!==i.stderr?f:v;function u(e,i){d("onunpipe"),e===r&&i&&!1===i.hasUnpiped&&(i.hasUnpiped=!0,d("cleanup"),t.removeListener("close",y),t.removeListener("finish",b),t.removeListener("drain",l),t.removeListener("error",g),t.removeListener("unpipe",u),r.removeListener("end",f),r.removeListener("end",v),r.removeListener("data",m),c=!0,!s.awaitDrain||t._writableState&&!t._writableState.needDrain||l())}function f(){d("onend"),t.end()}s.endEmitted?n.nextTick(h):r.once("end",h),t.on("unpipe",u);var l=function(t){return function(){var e=t._readableState;d("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&a(t,"data")&&(e.flowing=!0,C(t))}}(r);t.on("drain",l);var c=!1;var p=!1;function m(e){d("ondata"),p=!1,!1!==t.write(e)||p||((1===s.pipesCount&&s.pipes===t||s.pipesCount>1&&-1!==B(s.pipes,t))&&!c&&(d("false write response, pause",s.awaitDrain),s.awaitDrain++,p=!0),r.pause())}function g(e){d("onerror",e),v(),t.removeListener("error",g),0===a(t,"error")&&t.emit("error",e)}function y(){t.removeListener("finish",b),v()}function b(){d("onfinish"),t.removeListener("close",y),v()}function v(){d("unpipe"),r.unpipe(t)}return r.on("data",m),function(t,e,r){if("function"==typeof t.prependListener)return t.prependListener(e,r);t._events&&t._events[e]?o(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]:t.on(e,r)}(t,"error",g),t.once("close",y),t.once("finish",b),t.emit("pipe",r),s.flowing||(d("pipe resume"),r.resume()),t},v.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r)),this;if(!t){var i=e.pipes,n=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var s=0;s<n;s++)i[s].emit("unpipe",this,{hasUnpiped:!1});return this}var o=B(e.pipes,t);return-1===o||(e.pipes.splice(o,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,r)),this},v.prototype.on=function(t,e){var r=h.prototype.on.call(this,t,e);if("data"===t)!1!==this._readableState.flowing&&this.resume();else if("readable"===t){var i=this._readableState;i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.emittedReadable=!1,i.reading?i.length&&k(this):n.nextTick(I,this))}return r},v.prototype.addListener=v.prototype.on,v.prototype.resume=function(){var t=this._readableState;return t.flowing||(d("resume"),t.flowing=!0,function(t,e){e.resumeScheduled||(e.resumeScheduled=!0,n.nextTick(T,t,e))}(this,t)),this},v.prototype.pause=function(){return d("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(d("pause"),this._readableState.flowing=!1,this.emit("pause")),this},v.prototype.wrap=function(t){var e=this,r=this._readableState,i=!1;for(var n in t.on("end",function(){if(d("wrapped end"),r.decoder&&!r.ended){var t=r.decoder.end();t&&t.length&&e.push(t)}e.push(null)}),t.on("data",function(n){(d("wrapped data"),r.decoder&&(n=r.decoder.write(n)),r.objectMode&&null==n)||(r.objectMode||n&&n.length)&&(e.push(n)||(i=!0,t.pause()))}),t)void 0===this[n]&&"function"==typeof t[n]&&(this[n]=function(e){return function(){return t[e].apply(t,arguments)}}(n));for(var s=0;s<y.length;s++)t.on(y[s],this.emit.bind(this,y[s]));return this._read=function(e){d("wrapped _read",e),i&&(i=!1,t.resume())},this},Object.defineProperty(v.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),v._fromList=P},220:(t,e,r)=>{var i=r(8490),n=r(7011),s=n.assert,o=n.cachedProperty,a=n.parseBytes;function h(t,e){this.eddsa=t,"object"!=typeof e&&(e=a(e)),Array.isArray(e)&&(s(e.length===2*t.encodingLength,"Signature has invalid size"),e={R:e.slice(0,t.encodingLength),S:e.slice(t.encodingLength)}),s(e.R&&e.S,"Signature without R or S"),t.isPoint(e.R)&&(this._R=e.R),e.S instanceof i&&(this._S=e.S),this._Rencoded=Array.isArray(e.R)?e.R:e.Rencoded,this._Sencoded=Array.isArray(e.S)?e.S:e.Sencoded}o(h,"S",function(){return this.eddsa.decodeInt(this.Sencoded())}),o(h,"R",function(){return this.eddsa.decodePoint(this.Rencoded())}),o(h,"Rencoded",function(){return this.eddsa.encodePoint(this.R())}),o(h,"Sencoded",function(){return this.eddsa.encodeInt(this.S())}),h.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},h.prototype.toHex=function(){return n.encode(this.toBytes(),"hex").toUpperCase()},t.exports=h},251:(t,e)=>{e.read=function(t,e,r,i,n){var s,o,a=8*n-i-1,h=(1<<a)-1,u=h>>1,f=-7,l=r?n-1:0,c=r?-1:1,d=t[e+l];for(l+=c,s=d&(1<<-f)-1,d>>=-f,f+=a;f>0;s=256*s+t[e+l],l+=c,f-=8);for(o=s&(1<<-f)-1,s>>=-f,f+=i;f>0;o=256*o+t[e+l],l+=c,f-=8);if(0===s)s=1-u;else{if(s===h)return o?NaN:1/0*(d?-1:1);o+=Math.pow(2,i),s-=u}return(d?-1:1)*o*Math.pow(2,s-i)},e.write=function(t,e,r,i,n,s){var o,a,h,u=8*s-n-1,f=(1<<u)-1,l=f>>1,c=23===n?Math.pow(2,-24)-Math.pow(2,-77):0,d=i?0:s-1,p=i?1:-1,m=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,o=f):(o=Math.floor(Math.log(e)/Math.LN2),e*(h=Math.pow(2,-o))<1&&(o--,h*=2),(e+=o+l>=1?c/h:c*Math.pow(2,1-l))*h>=2&&(o++,h/=2),o+l>=f?(a=0,o=f):o+l>=1?(a=(e*h-1)*Math.pow(2,n),o+=l):(a=e*Math.pow(2,l-1)*Math.pow(2,n),o=0));n>=8;t[r+d]=255&a,d+=p,a/=256,n-=8);for(o=o<<n|a,u+=n;u>0;t[r+d]=255&o,d+=p,o/=256,u-=8);t[r+d-p]|=128*m}},295:(t,e,r)=>{var i=r(8287).Buffer;t.exports=function(t,e){for(var r=Math.min(t.length,e.length),n=new i(r),s=0;s<r;++s)n[s]=t[s]^e[s];return n}},308:(t,e,r)=>{var i=r(3225),n=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};t.exports=l;var s=Object.create(r(5622));s.inherits=r(6698);var o=r(1706),a=r(2398);s.inherits(l,o);for(var h=n(a.prototype),u=0;u<h.length;u++){var f=h[u];l.prototype[f]||(l.prototype[f]=a.prototype[f])}function l(t){if(!(this instanceof l))return new l(t);o.call(this,t),a.call(this,t),t&&!1===t.readable&&(this.readable=!1),t&&!1===t.writable&&(this.writable=!1),this.allowHalfOpen=!0,t&&!1===t.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",c)}function c(){this.allowHalfOpen||this._writableState.ended||i.nextTick(d,this)}function d(t){t.end()}Object.defineProperty(l.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(l.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(t){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=t,this._writableState.destroyed=t)}}),l.prototype._destroy=function(t,e){this.push(null),this.end(),i.nextTick(e,t)}},320:(t,e,r)=>{var i=r(8276);t.exports=function(t){return(new i).update(t).digest()}},330:(t,e,r)=>{var i=r(3225);function n(t,e){t.emit("error",e)}t.exports={destroy:function(t,e){var r=this,s=this._readableState&&this._readableState.destroyed,o=this._writableState&&this._writableState.destroyed;return s||o?(e?e(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,i.nextTick(n,this,t)):i.nextTick(n,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,function(t){!e&&t?r._writableState?r._writableState.errorEmitted||(r._writableState.errorEmitted=!0,i.nextTick(n,r,t)):i.nextTick(n,r,t):e&&e(t)}),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},345:(t,e,r)=>{function i(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,i)}return r}function n(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?i(Object(r),!0).forEach(function(e){s(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):i(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function s(t,e,r){return(e=a(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function o(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,a(i.key),i)}}function a(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:String(e)}var h=r(8287).Buffer,u=r(537).inspect,f=u&&u.custom||"inspect";function l(t,e,r){h.prototype.copy.call(t,e,r)}t.exports=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.head=null,this.tail=null,this.length=0}var e,r,i;return e=t,(r=[{key:"push",value:function(t){var e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length}},{key:"unshift",value:function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length}},{key:"shift",value:function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(t){if(0===this.length)return"";for(var e=this.head,r=""+e.data;e=e.next;)r+=t+e.data;return r}},{key:"concat",value:function(t){if(0===this.length)return h.alloc(0);for(var e=h.allocUnsafe(t>>>0),r=this.head,i=0;r;)l(r.data,e,i),i+=r.data.length,r=r.next;return e}},{key:"consume",value:function(t,e){var r;return t<this.head.data.length?(r=this.head.data.slice(0,t),this.head.data=this.head.data.slice(t)):r=t===this.head.data.length?this.shift():e?this._getString(t):this._getBuffer(t),r}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(t){var e=this.head,r=1,i=e.data;for(t-=i.length;e=e.next;){var n=e.data,s=t>n.length?n.length:t;if(s===n.length?i+=n:i+=n.slice(0,t),0===(t-=s)){s===n.length?(++r,e.next?this.head=e.next:this.head=this.tail=null):(this.head=e,e.data=n.slice(s));break}++r}return this.length-=r,i}},{key:"_getBuffer",value:function(t){var e=h.allocUnsafe(t),r=this.head,i=1;for(r.data.copy(e),t-=r.data.length;r=r.next;){var n=r.data,s=t>n.length?n.length:t;if(n.copy(e,e.length-t,0,s),0===(t-=s)){s===n.length?(++i,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=n.slice(s));break}++i}return this.length-=i,e}},{key:f,value:function(t,e){return u(this,n(n({},e),{},{depth:0,customInspect:!1}))}}])&&o(e.prototype,r),i&&o(e,i),Object.defineProperty(e,"prototype",{writable:!1}),t}()},370:(t,e,r)=>{var i=r(8490),n=r(6698),s=r(6677),o=r(7011);function a(t){s.call(this,"mont",t),this.a=new i(t.a,16).toRed(this.red),this.b=new i(t.b,16).toRed(this.red),this.i4=new i(4).toRed(this.red).redInvm(),this.two=new i(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function h(t,e,r){s.BasePoint.call(this,t,"projective"),null===e&&null===r?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new i(e,16),this.z=new i(r,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}n(a,s),t.exports=a,a.prototype.validate=function(t){var e=t.normalize().x,r=e.redSqr(),i=r.redMul(e).redAdd(r.redMul(this.a)).redAdd(e);return 0===i.redSqrt().redSqr().cmp(i)},n(h,s.BasePoint),a.prototype.decodePoint=function(t,e){return this.point(o.toArray(t,e),1)},a.prototype.point=function(t,e){return new h(this,t,e)},a.prototype.pointFromJSON=function(t){return h.fromJSON(this,t)},h.prototype.precompute=function(){},h.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},h.fromJSON=function(t,e){return new h(t,e[0],e[1]||t.one)},h.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},h.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},h.prototype.dbl=function(){var t=this.x.redAdd(this.z).redSqr(),e=this.x.redSub(this.z).redSqr(),r=t.redSub(e),i=t.redMul(e),n=r.redMul(e.redAdd(this.curve.a24.redMul(r)));return this.curve.point(i,n)},h.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},h.prototype.diffAdd=function(t,e){var r=this.x.redAdd(this.z),i=this.x.redSub(this.z),n=t.x.redAdd(t.z),s=t.x.redSub(t.z).redMul(r),o=n.redMul(i),a=e.z.redMul(s.redAdd(o).redSqr()),h=e.x.redMul(s.redISub(o).redSqr());return this.curve.point(a,h)},h.prototype.mul=function(t){for(var e=t.clone(),r=this,i=this.curve.point(null,null),n=[];0!==e.cmpn(0);e.iushrn(1))n.push(e.andln(1));for(var s=n.length-1;s>=0;s--)0===n[s]?(r=r.diffAdd(i,this),i=i.dbl()):(i=r.diffAdd(i,this),r=r.dbl());return i},h.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},h.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},h.prototype.eq=function(t){return 0===this.getX().cmp(t.getX())},h.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},h.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},392:(t,e,r)=>{var i=r(2861).Buffer,n=r(5377);function s(t,e){this._block=i.alloc(t),this._finalSize=e,this._blockSize=t,this._len=0}s.prototype.update=function(t,e){t=n(t,e||"utf8");for(var r=this._block,i=this._blockSize,s=t.length,o=this._len,a=0;a<s;){for(var h=o%i,u=Math.min(s-a,i-h),f=0;f<u;f++)r[h+f]=t[a+f];a+=u,(o+=u)%i===0&&this._update(r)}return this._len+=s,this},s.prototype.digest=function(t){var e=this._len%this._blockSize;this._block[e]=128,this._block.fill(0,e+1),e>=this._finalSize&&(this._update(this._block),this._block.fill(0));var r=8*this._len;if(r<=4294967295)this._block.writeUInt32BE(r,this._blockSize-4);else{var i=(4294967295&r)>>>0,n=(r-i)/4294967296;this._block.writeUInt32BE(n,this._blockSize-8),this._block.writeUInt32BE(i,this._blockSize-4)}this._update(this._block);var s=this._hash();return t?s.toString(t):s},s.prototype._update=function(){throw new Error("_update must be implemented by subclass")},t.exports=s},405:t=>{t.exports=async function*(t){for(let e of t)"function"==typeof e&&(e=e()),yield*e}},414:t=>{t.exports=Math.round},453:(t,e,r)=>{var i,n=r(9612),s=r(9383),o=r(1237),a=r(9290),h=r(9538),u=r(8068),f=r(9675),l=r(5345),c=r(1514),d=r(8968),p=r(6188),m=r(8002),g=r(5880),y=r(414),b=r(3093),v=Function,w=function(t){try{return v('"use strict"; return ('+t+").constructor;")()}catch(t){}},_=r(5795),M=r(655),S=function(){throw new f},k=_?function(){try{return S}catch(t){try{return _(arguments,"callee").get}catch(t){return S}}}():S,E=r(4039)(),x=r(3628),A=r(1064),I=r(8648),T=r(1002),C=r(76),P={},R="undefined"!=typeof Uint8Array&&x?x(Uint8Array):i,O={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?i:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?i:ArrayBuffer,"%ArrayIteratorPrototype%":E&&x?x([][Symbol.iterator]()):i,"%AsyncFromSyncIteratorPrototype%":i,"%AsyncFunction%":P,"%AsyncGenerator%":P,"%AsyncGeneratorFunction%":P,"%AsyncIteratorPrototype%":P,"%Atomics%":"undefined"==typeof Atomics?i:Atomics,"%BigInt%":"undefined"==typeof BigInt?i:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?i:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?i:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?i:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":s,"%eval%":eval,"%EvalError%":o,"%Float16Array%":"undefined"==typeof Float16Array?i:Float16Array,"%Float32Array%":"undefined"==typeof Float32Array?i:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?i:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?i:FinalizationRegistry,"%Function%":v,"%GeneratorFunction%":P,"%Int8Array%":"undefined"==typeof Int8Array?i:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?i:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?i:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":E&&x?x(x([][Symbol.iterator]())):i,"%JSON%":"object"==typeof JSON?JSON:i,"%Map%":"undefined"==typeof Map?i:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&E&&x?x((new Map)[Symbol.iterator]()):i,"%Math%":Math,"%Number%":Number,"%Object%":n,"%Object.getOwnPropertyDescriptor%":_,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?i:Promise,"%Proxy%":"undefined"==typeof Proxy?i:Proxy,"%RangeError%":a,"%ReferenceError%":h,"%Reflect%":"undefined"==typeof Reflect?i:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?i:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&E&&x?x((new Set)[Symbol.iterator]()):i,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?i:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":E&&x?x(""[Symbol.iterator]()):i,"%Symbol%":E?Symbol:i,"%SyntaxError%":u,"%ThrowTypeError%":k,"%TypedArray%":R,"%TypeError%":f,"%Uint8Array%":"undefined"==typeof Uint8Array?i:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?i:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?i:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?i:Uint32Array,"%URIError%":l,"%WeakMap%":"undefined"==typeof WeakMap?i:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?i:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?i:WeakSet,"%Function.prototype.call%":C,"%Function.prototype.apply%":T,"%Object.defineProperty%":M,"%Object.getPrototypeOf%":A,"%Math.abs%":c,"%Math.floor%":d,"%Math.max%":p,"%Math.min%":m,"%Math.pow%":g,"%Math.round%":y,"%Math.sign%":b,"%Reflect.getPrototypeOf%":I};if(x)try{null.error}catch(t){var B=x(x(t));O["%Error.prototype%"]=B}var L=function t(e){var r;if("%AsyncFunction%"===e)r=w("async function () {}");else if("%GeneratorFunction%"===e)r=w("function* () {}");else if("%AsyncGeneratorFunction%"===e)r=w("async function* () {}");else if("%AsyncGenerator%"===e){var i=t("%AsyncGeneratorFunction%");i&&(r=i.prototype)}else if("%AsyncIteratorPrototype%"===e){var n=t("%AsyncGenerator%");n&&x&&(r=x(n.prototype))}return O[e]=r,r},N={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},j=r(6743),U=r(9957),q=j.call(C,Array.prototype.concat),D=j.call(T,Array.prototype.splice),H=j.call(C,String.prototype.replace),F=j.call(C,String.prototype.slice),z=j.call(C,RegExp.prototype.exec),W=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,$=/\\(\\)?/g,V=function(t,e){var r,i=t;if(U(N,i)&&(i="%"+(r=N[i])[0]+"%"),U(O,i)){var n=O[i];if(n===P&&(n=L(i)),void 0===n&&!e)throw new f("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:r,name:i,value:n}}throw new u("intrinsic "+t+" does not exist!")};t.exports=function(t,e){if("string"!=typeof t||0===t.length)throw new f("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof e)throw new f('"allowMissing" argument must be a boolean');if(null===z(/^%?[^%]*%?$/,t))throw new u("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=function(t){var e=F(t,0,1),r=F(t,-1);if("%"===e&&"%"!==r)throw new u("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==e)throw new u("invalid intrinsic syntax, expected opening `%`");var i=[];return H(t,W,function(t,e,r,n){i[i.length]=r?H(n,$,"$1"):e||t}),i}(t),i=r.length>0?r[0]:"",n=V("%"+i+"%",e),s=n.name,o=n.value,a=!1,h=n.alias;h&&(i=h[0],D(r,q([0,1],h)));for(var l=1,c=!0;l<r.length;l+=1){var d=r[l],p=F(d,0,1),m=F(d,-1);if(('"'===p||"'"===p||"`"===p||'"'===m||"'"===m||"`"===m)&&p!==m)throw new u("property names with quotes must have matching quotes");if("constructor"!==d&&c||(a=!0),U(O,s="%"+(i+="."+d)+"%"))o=O[s];else if(null!=o){if(!(d in o)){if(!e)throw new f("base intrinsic for "+t+" exists, but the property is not available.");return}if(_&&l+1>=r.length){var g=_(o,d);o=(c=!!g)&&"get"in g&&!("originalValue"in g.get)?g.get:o[d]}else c=U(o,d),o=o[d];c&&!a&&(O[s]=o)}}return o}},462:(t,e,r)=>{var i=r(2861).Buffer;function n(t){i.isBuffer(t)||(t=i.from(t));for(var e=t.length/4|0,r=new Array(e),n=0;n<e;n++)r[n]=t.readUInt32BE(4*n);return r}function s(t){for(;0<t.length;t++)t[0]=0}function o(t,e,r,i,n){for(var s,o,a,h,u=r[0],f=r[1],l=r[2],c=r[3],d=t[0]^e[0],p=t[1]^e[1],m=t[2]^e[2],g=t[3]^e[3],y=4,b=1;b<n;b++)s=u[d>>>24]^f[p>>>16&255]^l[m>>>8&255]^c[255&g]^e[y++],o=u[p>>>24]^f[m>>>16&255]^l[g>>>8&255]^c[255&d]^e[y++],a=u[m>>>24]^f[g>>>16&255]^l[d>>>8&255]^c[255&p]^e[y++],h=u[g>>>24]^f[d>>>16&255]^l[p>>>8&255]^c[255&m]^e[y++],d=s,p=o,m=a,g=h;return s=(i[d>>>24]<<24|i[p>>>16&255]<<16|i[m>>>8&255]<<8|i[255&g])^e[y++],o=(i[p>>>24]<<24|i[m>>>16&255]<<16|i[g>>>8&255]<<8|i[255&d])^e[y++],a=(i[m>>>24]<<24|i[g>>>16&255]<<16|i[d>>>8&255]<<8|i[255&p])^e[y++],h=(i[g>>>24]<<24|i[d>>>16&255]<<16|i[p>>>8&255]<<8|i[255&m])^e[y++],[s>>>=0,o>>>=0,a>>>=0,h>>>=0]}var a=[0,1,2,4,8,16,32,64,128,27,54],h=function(){for(var t=new Array(256),e=0;e<256;e++)t[e]=e<128?e<<1:e<<1^283;for(var r=[],i=[],n=[[],[],[],[]],s=[[],[],[],[]],o=0,a=0,h=0;h<256;++h){var u=a^a<<1^a<<2^a<<3^a<<4;u=u>>>8^255&u^99,r[o]=u,i[u]=o;var f=t[o],l=t[f],c=t[l],d=257*t[u]^16843008*u;n[0][o]=d<<24|d>>>8,n[1][o]=d<<16|d>>>16,n[2][o]=d<<8|d>>>24,n[3][o]=d,d=16843009*c^65537*l^257*f^16843008*o,s[0][u]=d<<24|d>>>8,s[1][u]=d<<16|d>>>16,s[2][u]=d<<8|d>>>24,s[3][u]=d,0===o?o=a=1:(o=f^t[t[t[c^f]]],a^=t[t[a]])}return{SBOX:r,INV_SBOX:i,SUB_MIX:n,INV_SUB_MIX:s}}();function u(t){this._key=n(t),this._reset()}u.blockSize=16,u.keySize=32,u.prototype.blockSize=u.blockSize,u.prototype.keySize=u.keySize,u.prototype._reset=function(){for(var t=this._key,e=t.length,r=e+6,i=4*(r+1),n=[],s=0;s<e;s++)n[s]=t[s];for(s=e;s<i;s++){var o=n[s-1];s%e===0?(o=o<<8|o>>>24,o=h.SBOX[o>>>24]<<24|h.SBOX[o>>>16&255]<<16|h.SBOX[o>>>8&255]<<8|h.SBOX[255&o],o^=a[s/e|0]<<24):e>6&&s%e===4&&(o=h.SBOX[o>>>24]<<24|h.SBOX[o>>>16&255]<<16|h.SBOX[o>>>8&255]<<8|h.SBOX[255&o]),n[s]=n[s-e]^o}for(var u=[],f=0;f<i;f++){var l=i-f,c=n[l-(f%4?0:4)];u[f]=f<4||l<=4?c:h.INV_SUB_MIX[0][h.SBOX[c>>>24]]^h.INV_SUB_MIX[1][h.SBOX[c>>>16&255]]^h.INV_SUB_MIX[2][h.SBOX[c>>>8&255]]^h.INV_SUB_MIX[3][h.SBOX[255&c]]}this._nRounds=r,this._keySchedule=n,this._invKeySchedule=u},u.prototype.encryptBlockRaw=function(t){return o(t=n(t),this._keySchedule,h.SUB_MIX,h.SBOX,this._nRounds)},u.prototype.encryptBlock=function(t){var e=this.encryptBlockRaw(t),r=i.allocUnsafe(16);return r.writeUInt32BE(e[0],0),r.writeUInt32BE(e[1],4),r.writeUInt32BE(e[2],8),r.writeUInt32BE(e[3],12),r},u.prototype.decryptBlock=function(t){var e=(t=n(t))[1];t[1]=t[3],t[3]=e;var r=o(t,this._invKeySchedule,h.INV_SUB_MIX,h.INV_SBOX,this._nRounds),s=i.allocUnsafe(16);return s.writeUInt32BE(r[0],0),s.writeUInt32BE(r[3],4),s.writeUInt32BE(r[2],8),s.writeUInt32BE(r[1],12),s},u.prototype.scrub=function(){s(this._keySchedule),s(this._invKeySchedule),s(this._key)},t.exports.AES=u},480:(t,e,r)=>{var i,n=e,s=r(7952),o=r(894),a=r(7011).assert;function h(t){"short"===t.type?this.curve=new o.short(t):"edwards"===t.type?this.curve=new o.edwards(t):this.curve=new o.mont(t),this.g=this.curve.g,this.n=this.curve.n,this.hash=t.hash,a(this.g.validate(),"Invalid curve"),a(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function u(t,e){Object.defineProperty(n,t,{configurable:!0,enumerable:!0,get:function(){var r=new h(e);return Object.defineProperty(n,t,{configurable:!0,enumerable:!0,value:r}),r}})}n.PresetCurve=h,u("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:s.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),u("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:s.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),u("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:s.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),u("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:s.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),u("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:s.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),u("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:s.sha256,gRed:!1,g:["9"]}),u("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:s.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{i=r(4011)}catch(t){i=void 0}u("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:s.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",i]})},487:(t,e,r)=>{var i=r(6897),n=r(655),s=r(3126),o=r(2205);t.exports=function(t){var e=s(arguments),r=t.length-(arguments.length-1);return i(e,1+(r>0?r:0),!0)},n?n(t.exports,"apply",{value:o}):t.exports.apply=o},507:(t,e,r)=>{var i=r(453),n=r(6556),s=r(8859),o=r(9675),a=i("%Map%",!0),h=n("Map.prototype.get",!0),u=n("Map.prototype.set",!0),f=n("Map.prototype.has",!0),l=n("Map.prototype.delete",!0),c=n("Map.prototype.size",!0);t.exports=!!a&&function(){var t,e={assert:function(t){if(!e.has(t))throw new o("Side channel does not contain "+s(t))},delete:function(e){if(t){var r=l(t,e);return 0===c(t)&&(t=void 0),r}return!1},get:function(e){if(t)return h(t,e)},has:function(e){return!!t&&f(t,e)},set:function(e,r){t||(t=new a),u(t,e,r)}};return e}},530:(t,e,r)=>{var i={ECB:r(2632),CBC:r(2884),CFB:r(6383),CFB8:r(6975),CFB1:r(5264),OFB:r(6843),CTR:r(3053),GCM:r(3053)},n=r(3219);for(var s in n)n[s].module=i[n[s].mode];t.exports=n},537:(t,e,r)=>{var i=r(717),n=/%[sdj%]/g;e.format=function(t){if(!y(t)){for(var e=[],r=0;r<arguments.length;r++)e.push(a(arguments[r]));return e.join(" ")}r=1;for(var i=arguments,s=i.length,o=String(t).replace(n,function(t){if("%%"===t)return"%";if(r>=s)return t;switch(t){case"%s":return String(i[r++]);case"%d":return Number(i[r++]);case"%j":try{return JSON.stringify(i[r++])}catch(t){return"[Circular]"}default:return t}}),h=i[r];r<s;h=i[++r])m(h)||!w(h)?o+=" "+h:o+=" "+a(h);return o},e.deprecate=function(t,r){if(b(globalThis.process))return function(){return e.deprecate(t,r).apply(this,arguments)};if(!0===i.noDeprecation)return t;var n=!1;return function(){if(!n){if(i.throwDeprecation)throw new Error(r);i.traceDeprecation?console.trace(r):console.error(r),n=!0}return t.apply(this,arguments)}};var s,o={};function a(t,r){var i={seen:[],stylize:u};return arguments.length>=3&&(i.depth=arguments[2]),arguments.length>=4&&(i.colors=arguments[3]),p(r)?i.showHidden=r:r&&e._extend(i,r),b(i.showHidden)&&(i.showHidden=!1),b(i.depth)&&(i.depth=2),b(i.colors)&&(i.colors=!1),b(i.customInspect)&&(i.customInspect=!0),i.colors&&(i.stylize=h),f(i,t,i.depth)}function h(t,e){var r=a.styles[e];return r?"["+a.colors[r][0]+"m"+t+"["+a.colors[r][1]+"m":t}function u(t,e){return t}function f(t,r,i){if(t.customInspect&&r&&S(r.inspect)&&r.inspect!==e.inspect&&(!r.constructor||r.constructor.prototype!==r)){var n=r.inspect(i,t);return y(n)||(n=f(t,n,i)),n}var s=function(t,e){if(b(e))return t.stylize("undefined","undefined");if(y(e)){var r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(r,"string")}if(g(e))return t.stylize(""+e,"number");if(p(e))return t.stylize(""+e,"boolean");if(m(e))return t.stylize("null","null")}(t,r);if(s)return s;var o=Object.keys(r),a=function(t){var e={};return t.forEach(function(t,r){e[t]=!0}),e}(o);if(t.showHidden&&(o=Object.getOwnPropertyNames(r)),M(r)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return l(r);if(0===o.length){if(S(r)){var h=r.name?": "+r.name:"";return t.stylize("[Function"+h+"]","special")}if(v(r))return t.stylize(RegExp.prototype.toString.call(r),"regexp");if(_(r))return t.stylize(Date.prototype.toString.call(r),"date");if(M(r))return l(r)}var u,w="",k=!1,E=["{","}"];(d(r)&&(k=!0,E=["[","]"]),S(r))&&(w=" [Function"+(r.name?": "+r.name:"")+"]");return v(r)&&(w=" "+RegExp.prototype.toString.call(r)),_(r)&&(w=" "+Date.prototype.toUTCString.call(r)),M(r)&&(w=" "+l(r)),0!==o.length||k&&0!=r.length?i<0?v(r)?t.stylize(RegExp.prototype.toString.call(r),"regexp"):t.stylize("[Object]","special"):(t.seen.push(r),u=k?function(t,e,r,i,n){for(var s=[],o=0,a=e.length;o<a;++o)A(e,String(o))?s.push(c(t,e,r,i,String(o),!0)):s.push("");return n.forEach(function(n){n.match(/^\d+$/)||s.push(c(t,e,r,i,n,!0))}),s}(t,r,i,a,o):o.map(function(e){return c(t,r,i,a,e,k)}),t.seen.pop(),function(t,e,r){var i=t.reduce(function(t,e){return e.indexOf("\n")>=0&&0,t+e.replace(/\u001b\[\d\d?m/g,"").length+1},0);if(i>60)return r[0]+(""===e?"":e+"\n ")+" "+t.join(",\n  ")+" "+r[1];return r[0]+e+" "+t.join(", ")+" "+r[1]}(u,w,E)):E[0]+w+E[1]}function l(t){return"["+Error.prototype.toString.call(t)+"]"}function c(t,e,r,i,n,s){var o,a,h;if((h=Object.getOwnPropertyDescriptor(e,n)||{value:e[n]}).get?a=h.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):h.set&&(a=t.stylize("[Setter]","special")),A(i,n)||(o="["+n+"]"),a||(t.seen.indexOf(h.value)<0?(a=m(r)?f(t,h.value,null):f(t,h.value,r-1)).indexOf("\n")>-1&&(a=s?a.split("\n").map(function(t){return"  "+t}).join("\n").substr(2):"\n"+a.split("\n").map(function(t){return"   "+t}).join("\n")):a=t.stylize("[Circular]","special")),b(o)){if(s&&n.match(/^\d+$/))return a;(o=JSON.stringify(""+n)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.substr(1,o.length-2),o=t.stylize(o,"name")):(o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),o=t.stylize(o,"string"))}return o+": "+a}function d(t){return Array.isArray(t)}function p(t){return"boolean"==typeof t}function m(t){return null===t}function g(t){return"number"==typeof t}function y(t){return"string"==typeof t}function b(t){return void 0===t}function v(t){return w(t)&&"[object RegExp]"===k(t)}function w(t){return"object"==typeof t&&null!==t}function _(t){return w(t)&&"[object Date]"===k(t)}function M(t){return w(t)&&("[object Error]"===k(t)||t instanceof Error)}function S(t){return"function"==typeof t}function k(t){return Object.prototype.toString.call(t)}function E(t){return t<10?"0"+t.toString(10):t.toString(10)}e.debuglog=function(t){if(b(s)&&(s=i.env.NODE_DEBUG||""),t=t.toUpperCase(),!o[t])if(new RegExp("\\b"+t+"\\b","i").test(s)){var r=i.pid;o[t]=function(){var i=e.format.apply(e,arguments);console.error("%s %d: %s",t,r,i)}}else o[t]=function(){};return o[t]},e.inspect=a,a.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},a.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},e.isArray=d,e.isBoolean=p,e.isNull=m,e.isNullOrUndefined=function(t){return null==t},e.isNumber=g,e.isString=y,e.isSymbol=function(t){return"symbol"==typeof t},e.isUndefined=b,e.isRegExp=v,e.isObject=w,e.isDate=_,e.isError=M,e.isFunction=S,e.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t},e.isBuffer=r(2503);var x=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function A(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.log=function(){var t,r;console.log("%s - %s",(t=new Date,r=[E(t.getHours()),E(t.getMinutes()),E(t.getSeconds())].join(":"),[t.getDate(),x[t.getMonth()],r].join(" ")),e.format.apply(e,arguments))},e.inherits=r(6622),e._extend=function(t,e){if(!e||!w(e))return t;for(var r=Object.keys(e),i=r.length;i--;)t[r[i]]=e[r[i]];return t}},580:t=>{var e=/["'&<>]/;t.exports=function(t){var r,i=""+t,n=e.exec(i);if(!n)return i;var s="",o=0,a=0;for(o=n.index;o<i.length;o++){switch(i.charCodeAt(o)){case 34:r="&quot;";break;case 38:r="&amp;";break;case 39:r="&#39;";break;case 60:r="&lt;";break;case 62:r="&gt;";break;default:continue}a!==o&&(s+=i.substring(a,o)),a=o+1,s+=r}return a!==o?s+i.substring(a,o):s}},592:(t,e,r)=>{var i=r(655),n=function(){return!!i};n.hasArrayLengthDefineBug=function(){if(!i)return null;try{return 1!==i([],"length",{value:1}).length}catch(t){return!0}},t.exports=n},640:function(t){!function(e){const r="(0?\\d+|0x[a-f0-9]+)",i={fourOctet:new RegExp(`^${r}\\.${r}\\.${r}\\.${r}$`,"i"),threeOctet:new RegExp(`^${r}\\.${r}\\.${r}$`,"i"),twoOctet:new RegExp(`^${r}\\.${r}$`,"i"),longValue:new RegExp(`^${r}$`,"i")},n=new RegExp("^0[0-7]+$","i"),s=new RegExp("^0x[a-f0-9]+$","i"),o="%[0-9a-z]{1,}",a="(?:[0-9a-f]+::?)+",h={zoneIndex:new RegExp(o,"i"),native:new RegExp(`^(::)?(${a})?([0-9a-f]+)?(::)?(${o})?$`,"i"),deprecatedTransitional:new RegExp(`^(?:::)(${r}\\.${r}\\.${r}\\.${r}(${o})?)$`,"i"),transitional:new RegExp(`^((?:${a})|(?:::)(?:${a})?)${r}\\.${r}\\.${r}\\.${r}(${o})?$`,"i")};function u(t,e){if(t.indexOf("::")!==t.lastIndexOf("::"))return null;let r,i,n=0,s=-1,o=(t.match(h.zoneIndex)||[])[0];for(o&&(o=o.substring(1),t=t.replace(/%.+$/,""));(s=t.indexOf(":",s+1))>=0;)n++;if("::"===t.substr(0,2)&&n--,"::"===t.substr(-2,2)&&n--,n>e)return null;for(i=e-n,r=":";i--;)r+="0:";return":"===(t=t.replace("::",r))[0]&&(t=t.slice(1)),":"===t[t.length-1]&&(t=t.slice(0,-1)),{parts:e=function(){const e=t.split(":"),r=[];for(let t=0;t<e.length;t++)r.push(parseInt(e[t],16));return r}(),zoneId:o}}function f(t,e,r,i){if(t.length!==e.length)throw new Error("ipaddr: cannot match CIDR for objects with different lengths");let n,s=0;for(;i>0;){if(n=r-i,n<0&&(n=0),t[s]>>n!==e[s]>>n)return!1;i-=r,s+=1}return!0}function l(t){if(s.test(t))return parseInt(t,16);if("0"===t[0]&&!isNaN(parseInt(t[1],10))){if(n.test(t))return parseInt(t,8);throw new Error(`ipaddr: cannot parse ${t} as octal`)}return parseInt(t,10)}function c(t,e){for(;t.length<e;)t=`0${t}`;return t}const d={};d.IPv4=function(){function t(t){if(4!==t.length)throw new Error("ipaddr: ipv4 octet count should be 4");let e,r;for(e=0;e<t.length;e++)if(r=t[e],!(0<=r&&r<=255))throw new Error("ipaddr: ipv4 octet should fit in 8 bits");this.octets=t}return t.prototype.SpecialRanges={unspecified:[[new t([0,0,0,0]),8]],broadcast:[[new t([255,255,255,255]),32]],multicast:[[new t([224,0,0,0]),4]],linkLocal:[[new t([169,254,0,0]),16]],loopback:[[new t([127,0,0,0]),8]],carrierGradeNat:[[new t([100,64,0,0]),10]],private:[[new t([10,0,0,0]),8],[new t([172,16,0,0]),12],[new t([192,168,0,0]),16]],reserved:[[new t([192,0,0,0]),24],[new t([192,0,2,0]),24],[new t([192,88,99,0]),24],[new t([198,18,0,0]),15],[new t([198,51,100,0]),24],[new t([203,0,113,0]),24],[new t([240,0,0,0]),4]],as112:[[new t([192,175,48,0]),24],[new t([192,31,196,0]),24]],amt:[[new t([192,52,193,0]),24]]},t.prototype.kind=function(){return"ipv4"},t.prototype.match=function(t,e){let r;if(void 0===e&&(r=t,t=r[0],e=r[1]),"ipv4"!==t.kind())throw new Error("ipaddr: cannot match ipv4 address with non-ipv4 one");return f(this.octets,t.octets,8,e)},t.prototype.prefixLengthFromSubnetMask=function(){let t=0,e=!1;const r={0:8,128:7,192:6,224:5,240:4,248:3,252:2,254:1,255:0};let i,n,s;for(i=3;i>=0;i-=1){if(n=this.octets[i],!(n in r))return null;if(s=r[n],e&&0!==s)return null;8!==s&&(e=!0),t+=s}return 32-t},t.prototype.range=function(){return d.subnetMatch(this,this.SpecialRanges)},t.prototype.toByteArray=function(){return this.octets.slice(0)},t.prototype.toIPv4MappedAddress=function(){return d.IPv6.parse(`::ffff:${this.toString()}`)},t.prototype.toNormalizedString=function(){return this.toString()},t.prototype.toString=function(){return this.octets.join(".")},t}(),d.IPv4.broadcastAddressFromCIDR=function(t){try{const e=this.parseCIDR(t),r=e[0].toByteArray(),i=this.subnetMaskFromPrefixLength(e[1]).toByteArray(),n=[];let s=0;for(;s<4;)n.push(parseInt(r[s],10)|255^parseInt(i[s],10)),s++;return new this(n)}catch(t){throw new Error("ipaddr: the address does not have IPv4 CIDR format")}},d.IPv4.isIPv4=function(t){return null!==this.parser(t)},d.IPv4.isValid=function(t){try{return new this(this.parser(t)),!0}catch(t){return!1}},d.IPv4.isValidCIDR=function(t){try{return this.parseCIDR(t),!0}catch(t){return!1}},d.IPv4.isValidFourPartDecimal=function(t){return!(!d.IPv4.isValid(t)||!t.match(/^(0|[1-9]\d*)(\.(0|[1-9]\d*)){3}$/))},d.IPv4.isValidCIDRFourPartDecimal=function(t){const e=t.match(/^(.+)\/(\d+)$/);return!(!d.IPv4.isValidCIDR(t)||!e)&&d.IPv4.isValidFourPartDecimal(e[1])},d.IPv4.networkAddressFromCIDR=function(t){let e,r,i,n,s;try{for(e=this.parseCIDR(t),i=e[0].toByteArray(),s=this.subnetMaskFromPrefixLength(e[1]).toByteArray(),n=[],r=0;r<4;)n.push(parseInt(i[r],10)&parseInt(s[r],10)),r++;return new this(n)}catch(t){throw new Error("ipaddr: the address does not have IPv4 CIDR format")}},d.IPv4.parse=function(t){const e=this.parser(t);if(null===e)throw new Error("ipaddr: string is not formatted like an IPv4 Address");return new this(e)},d.IPv4.parseCIDR=function(t){let e;if(e=t.match(/^(.+)\/(\d+)$/)){const t=parseInt(e[2]);if(t>=0&&t<=32){const r=[this.parse(e[1]),t];return Object.defineProperty(r,"toString",{value:function(){return this.join("/")}}),r}}throw new Error("ipaddr: string is not formatted like an IPv4 CIDR range")},d.IPv4.parser=function(t){let e,r,n;if(e=t.match(i.fourOctet))return function(){const t=e.slice(1,6),i=[];for(let e=0;e<t.length;e++)r=t[e],i.push(l(r));return i}();if(e=t.match(i.longValue)){if(n=l(e[1]),n>4294967295||n<0)throw new Error("ipaddr: address outside defined range");return function(){const t=[];let e;for(e=0;e<=24;e+=8)t.push(n>>e&255);return t}().reverse()}return(e=t.match(i.twoOctet))?function(){const t=e.slice(1,4),r=[];if(n=l(t[1]),n>16777215||n<0)throw new Error("ipaddr: address outside defined range");return r.push(l(t[0])),r.push(n>>16&255),r.push(n>>8&255),r.push(255&n),r}():(e=t.match(i.threeOctet))?function(){const t=e.slice(1,5),r=[];if(n=l(t[2]),n>65535||n<0)throw new Error("ipaddr: address outside defined range");return r.push(l(t[0])),r.push(l(t[1])),r.push(n>>8&255),r.push(255&n),r}():null},d.IPv4.subnetMaskFromPrefixLength=function(t){if((t=parseInt(t))<0||t>32)throw new Error("ipaddr: invalid IPv4 prefix length");const e=[0,0,0,0];let r=0;const i=Math.floor(t/8);for(;r<i;)e[r]=255,r++;return i<4&&(e[i]=Math.pow(2,t%8)-1<<8-t%8),new this(e)},d.IPv6=function(){function t(t,e){let r,i;if(16===t.length)for(this.parts=[],r=0;r<=14;r+=2)this.parts.push(t[r]<<8|t[r+1]);else{if(8!==t.length)throw new Error("ipaddr: ipv6 part count should be 8 or 16");this.parts=t}for(r=0;r<this.parts.length;r++)if(i=this.parts[r],!(0<=i&&i<=65535))throw new Error("ipaddr: ipv6 part should fit in 16 bits");e&&(this.zoneId=e)}return t.prototype.SpecialRanges={unspecified:[new t([0,0,0,0,0,0,0,0]),128],linkLocal:[new t([65152,0,0,0,0,0,0,0]),10],multicast:[new t([65280,0,0,0,0,0,0,0]),8],loopback:[new t([0,0,0,0,0,0,0,1]),128],uniqueLocal:[new t([64512,0,0,0,0,0,0,0]),7],ipv4Mapped:[new t([0,0,0,0,0,65535,0,0]),96],discard:[new t([256,0,0,0,0,0,0,0]),64],rfc6145:[new t([0,0,0,0,65535,0,0,0]),96],rfc6052:[new t([100,65435,0,0,0,0,0,0]),96],"6to4":[new t([8194,0,0,0,0,0,0,0]),16],teredo:[new t([8193,0,0,0,0,0,0,0]),32],benchmarking:[new t([8193,2,0,0,0,0,0,0]),48],amt:[new t([8193,3,0,0,0,0,0,0]),32],as112v6:[[new t([8193,4,274,0,0,0,0,0]),48],[new t([9760,79,32768,0,0,0,0,0]),48]],deprecated:[new t([8193,16,0,0,0,0,0,0]),28],orchid2:[new t([8193,32,0,0,0,0,0,0]),28],droneRemoteIdProtocolEntityTags:[new t([8193,48,0,0,0,0,0,0]),28],reserved:[[new t([8193,0,0,0,0,0,0,0]),23],[new t([8193,3512,0,0,0,0,0,0]),32]]},t.prototype.isIPv4MappedAddress=function(){return"ipv4Mapped"===this.range()},t.prototype.kind=function(){return"ipv6"},t.prototype.match=function(t,e){let r;if(void 0===e&&(r=t,t=r[0],e=r[1]),"ipv6"!==t.kind())throw new Error("ipaddr: cannot match ipv6 address with non-ipv6 one");return f(this.parts,t.parts,16,e)},t.prototype.prefixLengthFromSubnetMask=function(){let t=0,e=!1;const r={0:16,32768:15,49152:14,57344:13,61440:12,63488:11,64512:10,65024:9,65280:8,65408:7,65472:6,65504:5,65520:4,65528:3,65532:2,65534:1,65535:0};let i,n;for(let s=7;s>=0;s-=1){if(i=this.parts[s],!(i in r))return null;if(n=r[i],e&&0!==n)return null;16!==n&&(e=!0),t+=n}return 128-t},t.prototype.range=function(){return d.subnetMatch(this,this.SpecialRanges)},t.prototype.toByteArray=function(){let t;const e=[],r=this.parts;for(let i=0;i<r.length;i++)t=r[i],e.push(t>>8),e.push(255&t);return e},t.prototype.toFixedLengthString=function(){const t=function(){const t=[];for(let e=0;e<this.parts.length;e++)t.push(c(this.parts[e].toString(16),4));return t}.call(this).join(":");let e="";return this.zoneId&&(e=`%${this.zoneId}`),t+e},t.prototype.toIPv4Address=function(){if(!this.isIPv4MappedAddress())throw new Error("ipaddr: trying to convert a generic ipv6 address to ipv4");const t=this.parts.slice(-2),e=t[0],r=t[1];return new d.IPv4([e>>8,255&e,r>>8,255&r])},t.prototype.toNormalizedString=function(){const t=function(){const t=[];for(let e=0;e<this.parts.length;e++)t.push(this.parts[e].toString(16));return t}.call(this).join(":");let e="";return this.zoneId&&(e=`%${this.zoneId}`),t+e},t.prototype.toRFC5952String=function(){const t=/((^|:)(0(:|$)){2,})/g,e=this.toNormalizedString();let r,i=0,n=-1;for(;r=t.exec(e);)r[0].length>n&&(i=r.index,n=r[0].length);return n<0?e:`${e.substring(0,i)}::${e.substring(i+n)}`},t.prototype.toString=function(){return this.toRFC5952String()},t}(),d.IPv6.broadcastAddressFromCIDR=function(t){try{const e=this.parseCIDR(t),r=e[0].toByteArray(),i=this.subnetMaskFromPrefixLength(e[1]).toByteArray(),n=[];let s=0;for(;s<16;)n.push(parseInt(r[s],10)|255^parseInt(i[s],10)),s++;return new this(n)}catch(t){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${t})`)}},d.IPv6.isIPv6=function(t){return null!==this.parser(t)},d.IPv6.isValid=function(t){if("string"==typeof t&&-1===t.indexOf(":"))return!1;try{const e=this.parser(t);return new this(e.parts,e.zoneId),!0}catch(t){return!1}},d.IPv6.isValidCIDR=function(t){if("string"==typeof t&&-1===t.indexOf(":"))return!1;try{return this.parseCIDR(t),!0}catch(t){return!1}},d.IPv6.networkAddressFromCIDR=function(t){let e,r,i,n,s;try{for(e=this.parseCIDR(t),i=e[0].toByteArray(),s=this.subnetMaskFromPrefixLength(e[1]).toByteArray(),n=[],r=0;r<16;)n.push(parseInt(i[r],10)&parseInt(s[r],10)),r++;return new this(n)}catch(t){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${t})`)}},d.IPv6.parse=function(t){const e=this.parser(t);if(null===e.parts)throw new Error("ipaddr: string is not formatted like an IPv6 Address");return new this(e.parts,e.zoneId)},d.IPv6.parseCIDR=function(t){let e,r,i;if((r=t.match(/^(.+)\/(\d+)$/))&&(e=parseInt(r[2]),e>=0&&e<=128))return i=[this.parse(r[1]),e],Object.defineProperty(i,"toString",{value:function(){return this.join("/")}}),i;throw new Error("ipaddr: string is not formatted like an IPv6 CIDR range")},d.IPv6.parser=function(t){let e,r,i,n,s,o;if(i=t.match(h.deprecatedTransitional))return this.parser(`::ffff:${i[1]}`);if(h.native.test(t))return u(t,8);if((i=t.match(h.transitional))&&(o=i[6]||"",e=i[1],i[1].endsWith("::")||(e=e.slice(0,-1)),e=u(e+o,6),e.parts)){for(s=[parseInt(i[2]),parseInt(i[3]),parseInt(i[4]),parseInt(i[5])],r=0;r<s.length;r++)if(n=s[r],!(0<=n&&n<=255))return null;return e.parts.push(s[0]<<8|s[1]),e.parts.push(s[2]<<8|s[3]),{parts:e.parts,zoneId:e.zoneId}}return null},d.IPv6.subnetMaskFromPrefixLength=function(t){if((t=parseInt(t))<0||t>128)throw new Error("ipaddr: invalid IPv6 prefix length");const e=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];let r=0;const i=Math.floor(t/8);for(;r<i;)e[r]=255,r++;return i<16&&(e[i]=Math.pow(2,t%8)-1<<8-t%8),new this(e)},d.fromByteArray=function(t){const e=t.length;if(4===e)return new d.IPv4(t);if(16===e)return new d.IPv6(t);throw new Error("ipaddr: the binary input is neither an IPv6 nor IPv4 address")},d.isValid=function(t){return d.IPv6.isValid(t)||d.IPv4.isValid(t)},d.isValidCIDR=function(t){return d.IPv6.isValidCIDR(t)||d.IPv4.isValidCIDR(t)},d.parse=function(t){if(d.IPv6.isValid(t))return d.IPv6.parse(t);if(d.IPv4.isValid(t))return d.IPv4.parse(t);throw new Error("ipaddr: the address has neither IPv6 nor IPv4 format")},d.parseCIDR=function(t){try{return d.IPv6.parseCIDR(t)}catch(e){try{return d.IPv4.parseCIDR(t)}catch(t){throw new Error("ipaddr: the address has neither IPv6 nor IPv4 CIDR format")}}},d.process=function(t){const e=this.parse(t);return"ipv6"===e.kind()&&e.isIPv4MappedAddress()?e.toIPv4Address():e},d.subnetMatch=function(t,e,r){let i,n,s,o;for(n in null==r&&(r="unicast"),e)if(Object.prototype.hasOwnProperty.call(e,n))for(s=e[n],!s[0]||s[0]instanceof Array||(s=[s]),i=0;i<s.length;i++)if(o=s[i],t.kind()===o[0].kind()&&t.match.apply(t,o))return n;return r},t.exports?t.exports=d:e.ipaddr=d}(this)},650:(t,e,r)=>{var i=r(462),n=r(2861).Buffer,s=r(6168);function o(t,e,r,o){s.call(this),this._cipher=new i.AES(e),this._prev=n.from(r),this._cache=n.allocUnsafe(0),this._secCache=n.allocUnsafe(0),this._decrypt=o,this._mode=t}r(6698)(o,s),o.prototype._update=function(t){return this._mode.encrypt(this,t,this._decrypt)},o.prototype._final=function(){this._cipher.scrub()},t.exports=o},655:t=>{var e=Object.defineProperty||!1;if(e)try{e({},"a",{value:1})}catch(t){e=!1}t.exports=e},672:(t,e,r)=>{var i=r(4116).Buffer,n=r(537);function s(t,e,r){t.copy(e,r)}t.exports=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.head=null,this.tail=null,this.length=0}return t.prototype.push=function(t){var e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length},t.prototype.unshift=function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length},t.prototype.shift=function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}},t.prototype.clear=function(){this.head=this.tail=null,this.length=0},t.prototype.join=function(t){if(0===this.length)return"";for(var e=this.head,r=""+e.data;e=e.next;)r+=t+e.data;return r},t.prototype.concat=function(t){if(0===this.length)return i.alloc(0);for(var e=i.allocUnsafe(t>>>0),r=this.head,n=0;r;)s(r.data,e,n),n+=r.data.length,r=r.next;return e},t}(),n&&n.inspect&&n.inspect.custom&&(t.exports.prototype[n.inspect.custom]=function(){var t=n.inspect({length:this.length});return this.constructor.name+" "+t})},681:(t,e,r)=>{var i={__proto__:null,md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,"sha512-256":32,rmd160:20,ripemd160:20},n={__proto__:null,"sha-1":"sha1","sha-224":"sha224","sha-256":"sha256","sha-384":"sha384","sha-512":"sha512","ripemd-160":"ripemd160"},s=r(3507),o=r(2861).Buffer,a=r(4196),h=r(2455),u=r(3382);t.exports=function(t,e,r,f,l){a(r,f),t=u(t,h,"Password"),e=u(e,h,"Salt");var c=(l||"sha1").toLowerCase(),d=n[c]||c,p=i[d];if("number"!=typeof p||!p)throw new TypeError("Digest algorithm not supported: "+l);var m=o.allocUnsafe(f),g=o.allocUnsafe(e.length+4);e.copy(g,0,0,e.length);for(var y=0,b=p,v=Math.ceil(f/b),w=1;w<=v;w++){g.writeUInt32BE(w,e.length);for(var _=s(d,t).update(g).digest(),M=_,S=1;S<r;S++){M=s(d,t).update(M).digest();for(var k=0;k<b;k++)_[k]^=M[k]}_.copy(m,y),y+=b}return m}},717:(t,e,r)=>{r.r(e),r.d(e,{addListener:()=>c,argv:()=>a,binding:()=>k,browser:()=>s,chdir:()=>E,cwd:()=>M,emit:()=>y,env:()=>o,listeners:()=>_,nextTick:()=>w,off:()=>p,on:()=>l,once:()=>d,prependListener:()=>b,prependOnceListener:()=>v,removeAllListeners:()=>g,removeListener:()=>m,title:()=>n,umask:()=>S,version:()=>h,versions:()=>u});var i=r(9596);const n="browser",s=!0,o={},a=[],h="",u={};function f(){}const l=f,c=f,d=f,p=f,m=f,g=f,y=f,b=f,v=f,w=(t,...e)=>i(()=>t(...e)),_=t=>[],M=()=>"/",S=()=>0,k=t=>{throw new Error("process.binding is not supported")},E=t=>{throw new Error("process.chdir is not supported")}},735:(t,e,r)=>{var i=r(6698),n=r(82);function s(t){n.call(this,t),this.enc="pem"}i(s,n),t.exports=s,s.prototype.encode=function(t,e){for(var r=n.prototype.encode.call(this,t).toString("base64"),i=["-----BEGIN "+e.label+"-----"],s=0;s<r.length;s+=64)i.push(r.slice(s,s+64));return i.push("-----END "+e.label+"-----"),i.join("\n")}},736:(t,e,r)=>{t.exports=function(t){function e(t){let r,n,s,o=null;function a(...t){if(!a.enabled)return;const i=a,n=Number(new Date),s=n-(r||n);i.diff=s,i.prev=r,i.curr=n,r=n,t[0]=e.coerce(t[0]),"string"!=typeof t[0]&&t.unshift("%O");let o=0;t[0]=t[0].replace(/%([a-zA-Z%])/g,(r,n)=>{if("%%"===r)return"%";o++;const s=e.formatters[n];if("function"==typeof s){const e=t[o];r=s.call(i,e),t.splice(o,1),o--}return r}),e.formatArgs.call(i,t);(i.l
Download .txt
gitextract_r_wn0aci/

├── .airtap.yml
├── .eslintrc.cjs
├── .github/
│   ├── config.yml
│   ├── no-response.yml
│   └── workflows/
│       ├── ci.yml
│       ├── codeql-analysis.yml
│       ├── lock.yml
│       ├── release.yml
│       └── stale.yml
├── .gitignore
├── .npmignore
├── AUTHORS.md
├── CHANGELOG.md
├── LICENSE
├── README.md
├── dist/
│   └── webtorrent.chromeapp.js
├── docs/
│   ├── api.md
│   ├── bep_support.md
│   ├── faq.md
│   ├── free-torrents.md
│   ├── get-started.md
│   └── tutorials.md
├── index.js
├── lib/
│   ├── conn-pool.js
│   ├── file-iterator.js
│   ├── file.js
│   ├── peer.js
│   ├── rarity-map.js
│   ├── selections.js
│   ├── server.js
│   ├── torrent.js
│   ├── utp.cjs
│   ├── webconn.js
│   ├── worker-server.js
│   └── worker.js
├── package.json
├── polyfills/
│   ├── inflate-sync-web.js
│   └── process-fast.js
├── scripts/
│   ├── browser-serve.js
│   ├── browser.webpack.js
│   ├── chromeapp.webpack.js
│   ├── update-authors.sh
│   └── worker.webpack.js
├── test/
│   ├── bitfield.js
│   ├── browser/
│   │   ├── basic.js
│   │   └── server.js
│   ├── client-add-duplicate-trackers.js
│   ├── client-add.js
│   ├── client-destroy.js
│   ├── client-remove.js
│   ├── client-seed.js
│   ├── common.js
│   ├── duplicate.js
│   ├── file-buffer.js
│   ├── iterator.js
│   ├── node/
│   │   ├── basic.js
│   │   ├── blocklist-dht.js
│   │   ├── blocklist-tracker.js
│   │   ├── blocklist.js
│   │   ├── client-deselect.js
│   │   ├── conn-pool.js
│   │   ├── download-dht-magnet.js
│   │   ├── download-dht-torrent.js
│   │   ├── download-from-ip.js
│   │   ├── download-lsd-magnet.js
│   │   ├── download-lsd-torrent.js
│   │   ├── download-metadata.js
│   │   ├── download-private-dht.js
│   │   ├── download-tracker-magnet.js
│   │   ├── download-tracker-torrent.js
│   │   ├── download-webseed-magnet.js
│   │   ├── download-webseed-torrent.js
│   │   ├── extensions.js
│   │   ├── limit-download-upload.js
│   │   ├── limit-methods.js
│   │   ├── metadata.js
│   │   ├── seed-stream.js
│   │   ├── seed-while-download.js
│   │   ├── server.js
│   │   ├── swarm-basic.js
│   │   ├── swarm-reconnect.js
│   │   ├── swarm-timeout.js
│   │   └── torrent-events.js
│   ├── rarity-map.js
│   ├── selections.js
│   ├── swarm.js
│   └── torrent-destroy.js
└── version.cjs
Download .txt
Showing preview only (380K chars total). Download the full file or copy to clipboard to get everything.
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;n<t.length;n++){const s=t[n];if(s.piece===e...
    method _encryptHandshake (line 1) | _encryptHandshake(t){const e=new Uint8Array(t);if(!this._encryptGenera...
    method _encrypt (line 1) | _encrypt(t){const e=new Uint8Array(t);if(!this._encryptGenerator||2!==...
    method _decryptHandshake (line 1) | _decryptHandshake(t){const e=new Uint8Array(t);if(!this._decryptGenera...
    method _decrypt (line 1) | _decrypt(t){const e=new Uint8Array(t);if(!this._decryptGenerator||2!==...
    method _utfToHex (line 1) | _utfToHex(t){return(0,u.V5)((0,u.L0)(t))}
  function R (line 1) | function R(t){var e=t._readableState;if(e.length>0)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<i;r++)if(t[r]===e)return r;retu...
  function u (line 1) | function u(e,i){d("onunpipe"),e===r&&i&&!1===i.hasUnpiped&&(i.hasUnpiped...
  function f (line 1) | function f(){d("onend"),t.end()}
  function m (line 1) | function m(e){d("ondata"),p=!1,!1!==t.write(e)||p||((1===s.pipesCount&&s...
  function g (line 1) | function g(e){d("onerror",e),v(),t.removeListener("error",g),0===a(t,"er...
    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.removeListener("finish",b),v()}
  function b (line 1) | function b(){d("onfinish"),t.removeListener("close",y),v()}
  function v (line 1) | function v(){d("unpipe"),r.unpipe(t)}
  function h (line 1) | function h(t,e){this.eddsa=t,"object"!=typeof e&&(e=a(e)),Array.isArray(...
  function l (line 1) | function l(t){if(!(this instanceof l))return new l(t);o.call(this,t),a.c...
  function c (line 1) | function c(){this.allowHalfOpen||this._writableState.ended||i.nextTick(d...
  function d (line 1) | function d(t){t.end()}
  function n (line 1) | function n(t,e){t.emit("error",e)}
    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<this.buffer.length&&!!(this.buffer[e]&128...
    method set (line 1) | set(t,e=!0){const r=t>>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.buffer.length;t++)if(0!==this.buffer[t])r...
  function i (line 1) | function i(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){va...
  function n (line 1) | function n(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[...
    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<this.buffer.length&&!!(this.buffer[e]&128...
    method set (line 1) | set(t,e=!0){const r=t>>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.buffer.length;t++)if(0!==this.buffer[t])r...
  function s (line 1) | function s(t,e,r){return(e=a(e))in t?Object.defineProperty(t,e,{value:r,...
  function o (line 1) | function o(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.en...
  function a (line 1) | function a(t){var e=function(t,e){if("object"!=typeof t||null===t)return...
    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;r<t.contacts.length;++r)if(s(t.contacts[r].i...
    method remove (line 1) | remove(t){o("the id as parameter 1",t);let e=0,r=this.root;for(;null==...
    method _split (line 1) | _split(t,e){t.left={contacts:[],dontSplit:!1,left:null,right:null},t.r...
    method toArray (line 1) | toArray(){let t=[];for(const e=[this.root];e.length>0;){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<e.length;r+...
    method constructor (line 1) | constructor(t){super(),this._wire=t,this._intervalId=null,this._lastMe...
    method start (line 1) | start(){clearInterval(this._intervalId),this._intervalId=setInterval((...
    method stop (line 1) | stop(){clearInterval(this._intervalId),this._intervalId=null}
    method reset (line 1) | reset(){this._remoteAddedPeers={},this._remoteDroppedPeers={},this._lo...
    method addPeer (line 1) | addPeer(t,e={}){this._addPeer(t,this._encodeFlags(e),4)}
    method addPeer6 (line 1) | addPeer6(t,e={}){this._addPeer(t,this._encodeFlags(e),6)}
    method _addPeer (line 1) | _addPeer(t,e,r){t.includes(":")&&(t in this._remoteAddedPeers||(t in t...
    method dropPeer (line 1) | dropPeer(t){this._dropPeer(t,4)}
    method dropPeer6 (line 1) | dropPeer6(t){this._dropPeer(t,6)}
    method _dropPeer (line 1) | _dropPeer(t,e){t.includes(":")&&(t in this._remoteDroppedPeers||(t in ...
    method onExtendedHandshake (line 1) | onExtendedHandshake(t){if(!t.m||!t.m.ut_pex)return this.emit("warning"...
    method onMessage (line 1) | onMessage(t){const e=Date.now();if(e-this._lastMessageTimestamp<6e4)re...
    method _decodeFlags (line 1) | _decodeFlags(t){return{prefersEncryption:!!(t&or.prefersEncryption),is...
    method _encodeFlags (line 1) | _encodeFlags(t){return Object.keys(t).reduce((e,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;r<t.contacts.length;++r)if(s(t.contacts[r].i...
    method remove (line 1) | remove(t){o("the id as parameter 1",t);let e=0,r=this.root;for(;null==...
    method _split (line 1) | _split(t,e){t.left={contacts:[],dontSplit:!1,left:null,right:null},t.r...
    method toArray (line 1) | toArray(){let t=[];for(const e=[this.root];e.length>0;){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<this.buffer.length&&!!(this.buffer[e]&128...
    method set (line 1) | set(t,e=!0){const r=t>>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.buffer.length;t++)if(0!==this.buffer[t])r...
  function s (line 1) | function s(t){for(;0<t.length;t++)t[0]=0}
  function o (line 1) | function o(t,e,r,i,n){for(var s,o,a,h,u=r[0],f=r[1],l=r[2],c=r[3],d=t[0]...
  function u (line 1) | function u(t){this._key=n(t),this._reset()}
  function h (line 1) | function h(t){"short"===t.type?this.curve=new o.short(t):"edwards"===t.t...
  function u (line 1) | function u(t,e){Object.defineProperty(n,t,{configurable:!0,enumerable:!0...
  function a (line 1) | function a(t,r){var i={seen:[],stylize:u};return arguments.length>=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;r<t.contacts.length;++r)if(s(t.contacts[r].i...
    method remove (line 1) | remove(t){o("the id as parameter 1",t);let e=0,r=this.root;for(;null==...
    method _split (line 1) | _split(t,e){t.left={contacts:[],dontSplit:!1,left:null,right:null},t.r...
    method toArray (line 1) | toArray(){let t=[];for(const e=[this.root];e.length>0;){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<e;)t=`0${t}`;return t}
  function t (line 1) | function t(t){if(4!==t.length)throw new Error("ipaddr: ipv4 octet count ...
    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<e.length;r+...
    method constructor (line 1) | constructor(t){super(),this._wire=t,this._intervalId=null,this._lastMe...
    method start (line 1) | start(){clearInterval(this._intervalId),this._intervalId=setInterval((...
    method stop (line 1) | stop(){clearInterval(this._intervalId),this._intervalId=null}
    method reset (line 1) | reset(){this._remoteAddedPeers={},this._remoteDroppedPeers={},this._lo...
    method addPeer (line 1) | addPeer(t,e={}){this._addPeer(t,this._encodeFlags(e),4)}
    method addPeer6 (line 1) | addPeer6(t,e={}){this._addPeer(t,this._encodeFlags(e),6)}
    method _addPeer (line 1) | _addPeer(t,e,r){t.includes(":")&&(t in this._remoteAddedPeers||(t in t...
    method dropPeer (line 1) | dropPeer(t){this._dropPeer(t,4)}
    method dropPeer6 (line 1) | dropPeer6(t){this._dropPeer(t,6)}
    method _dropPeer (line 1) | _dropPeer(t,e){t.includes(":")&&(t in this._remoteDroppedPeers||(t in ...
    method onExtendedHandshake (line 1) | onExtendedHandshake(t){if(!t.m||!t.m.ut_pex)return this.emit("warning"...
    method onMessage (line 1) | onMessage(t){const e=Date.now();if(e-this._lastMessageTimestamp<6e4)re...
    method _decodeFlags (line 1) | _decodeFlags(t){return{prefersEncryption:!!(t&or.prefersEncryption),is...
    method _encodeFlags (line 1) | _encodeFlags(t){return Object.keys(t).reduce((e,r)=>!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<e.length;r+...
    method constructor (line 1) | constructor(t){super(),this._wire=t,this._intervalId=null,this._lastMe...
    method start (line 1) | start(){clearInterval(this._intervalId),this._intervalId=setInterval((...
    method stop (line 1) | stop(){clearInterval(this._intervalId),this._intervalId=null}
    method reset (line 1) | reset(){this._remoteAddedPeers={},this._remoteDroppedPeers={},this._lo...
    method addPeer (line 1) | addPeer(t,e={}){this._addPeer(t,this._encodeFlags(e),4)}
    method addPeer6 (line 1) | addPeer6(t,e={}){this._addPeer(t,this._encodeFlags(e),6)}
    method _addPeer (line 1) | _addPeer(t,e,r){t.includes(":")&&(t in this._remoteAddedPeers||(t in t...
    method dropPeer (line 1) | dropPeer(t){this._dropPeer(t,4)}
    method dropPeer6 (line 1) | dropPeer6(t){this._dropPeer(t,6)}
    method _dropPeer (line 1) | _dropPeer(t,e){t.includes(":")&&(t in this._remoteDroppedPeers||(t in ...
    method onExtendedHandshake (line 1) | onExtendedHandshake(t){if(!t.m||!t.m.ut_pex)return this.emit("warning"...
    method onMessage (line 1) | onMessage(t){const e=Date.now();if(e-this._lastMessageTimestamp<6e4)re...
    method _decodeFlags (line 1) | _decodeFlags(t){return{prefersEncryption:!!(t&or.prefersEncryption),is...
    method _encodeFlags (line 1) | _encodeFlags(t){return Object.keys(t).reduce((e,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<e.length;r+...
    method constructor (line 1) | constructor(t){super(),this._wire=t,this._intervalId=null,this._lastMe...
    method start (line 1) | start(){clearInterval(this._intervalId),this._intervalId=setInterval((...
    method stop (line 1) | stop(){clearInterval(this._intervalId),this._intervalId=null}
    method reset (line 1) | reset(){this._remoteAddedPeers={},this._remoteDroppedPeers={},this._lo...
    method addPeer (line 1) | addPeer(t,e={}){this._addPeer(t,this._encodeFlags(e),4)}
    method addPeer6 (line 1) | addPeer6(t,e={}){this._addPeer(t,this._encodeFlags(e),6)}
    method _addPeer (line 1) | _addPeer(t,e,r){t.includes(":")&&(t in this._remoteAddedPeers||(t in t...
    method dropPeer (line 1) | dropPeer(t){this._dropPeer(t,4)}
    method dropPeer6 (line 1) | dropPeer6(t){this._dropPeer(t,6)}
    method _dropPeer (line 1) | _dropPeer(t,e){t.includes(":")&&(t in this._remoteDroppedPeers||(t in ...
    method onExtendedHandshake (line 1) | onExtendedHandshake(t){if(!t.m||!t.m.ut_pex)return this.emit("warning"...
    method onMessage (line 1) | onMessage(t){const e=Date.now();if(e-this._lastMessageTimestamp<6e4)re...
    method _decodeFlags (line 1) | _decodeFlags(t){return{prefersEncryption:!!(t&or.prefersEncryption),is...
    method _encodeFlags (line 1) | _encodeFlags(t){return Object.keys(t).reduce((e,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<this._numPieces;e++)if(!this...
    method _failedMetadata (line 1) | _failedMetadata(){this._bitfield=new qt.A(0,{grow:1e3}),this._remainin...
  function i (line 1) | function i(t,r){const i=e(this.namespace+(void 0===r?":":r)+t);return i....
  function n (line 1) | function n(t,e){let r=0,i=0,n=-1,s=0;for(;r<t.length;)if(i<e.length&&(e[...
    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<this.buffer.length&&!!(this.buffer[e]&128...
    method set (line 1) | set(t,e=!0){const r=t>>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.buffer.length;t++)if(0!==this.buffer[t])r...
  function t (line 1) | function t(t,e,r){this.name=t,this.max=e,this.constructor=null!=r?r:func...
    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<e.length;r+...
    method constructor (line 1) | constructor(t){super(),this._wire=t,this._intervalId=null,this._lastMe...
    method start (line 1) | start(){clearInterval(this._intervalId),this._intervalId=setInterval((...
    method stop (line 1) | stop(){clearInterval(this._intervalId),this._intervalId=null}
    method reset (line 1) | reset(){this._remoteAddedPeers={},this._remoteDroppedPeers={},this._lo...
    method addPeer (line 1) | addPeer(t,e={}){this._addPeer(t,this._encodeFlags(e),4)}
    method addPeer6 (line 1) | addPeer6(t,e={}){this._addPeer(t,this._encodeFlags(e),6)}
    method _addPeer (line 1) | _addPeer(t,e,r){t.includes(":")&&(t in this._remoteAddedPeers||(t in t...
    method dropPeer (line 1) | dropPeer(t){this._dropPeer(t,4)}
    method dropPeer6 (line 1) | dropPeer6(t){this._dropPeer(t,6)}
    method _dropPeer (line 1) | _dropPeer(t,e){t.includes(":")&&(t in this._remoteDroppedPeers||(t in ...
    method onExtendedHandshake (line 1) | onExtendedHandshake(t){if(!t.m||!t.m.ut_pex)return this.emit("warning"...
    method onMessage (line 1) | onMessage(t){const e=Date.now();if(e-this._lastMessageTimestamp<6e4)re...
    method _decodeFlags (line 1) | _decodeFlags(t){return{prefersEncryption:!!(t&or.prefersEncryption),is...
    method _encodeFlags (line 1) | _encodeFlags(t){return Object.keys(t).reduce((e,r)=>!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<this.buffer.length&&!!(this.buffer[e]&128...
    method set (line 1) | set(t,e=!0){const r=t>>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.buffer.length;t++)if(0!==this.buffer[t])r...
  function s (line 1) | function s(t){return ArrayBuffer.isView(t)?"arraybufferview":Array.isArr...
  function o (line 1) | function o(t,e,r){const n=[];let s=null;return o._encode(n,t),s=(0,i.xW)...
  function l (line 1) | function l(t,e,r){let i=0,n=1;for(let s=e;s<r;s++){const r=t[s];if(r<58&...
  function c (line 1) | function c(t,e,r,n){return null==t||0===t.length?null:("number"!=typeof ...
  function d (line 1) | function d(t){if(null==t)return 0;const e=s(t);switch(e){case"arraybuffe...
  function u (line 1) | function u(t,e){var r={};this._baseState=r,r.enc=t,r.parent=e||null,r.ch...
  function h (line 1) | function h(t){return(a()-t)/o&s}
  function o (line 1) | function o(t){s.call(this),this._block=i.allocUnsafe(t),this._blockSize=...
  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<this.buffer.length&&!!(this.buffer[e]&128...
    method set (line 1) | set(t,e=!0){const r=t>>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.buffer.length;t++)if(0!==this.buffer[t])r...
  function s (line 1) | function s(t,e,r){if(s.isBN(t))return t;this.negative=0,this.words=null,...
  function a (line 1) | function a(t,e){var r=t.charCodeAt(e);return r>=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;r<t.contacts.length;++r)if(s(t.contacts[r].i...
    method remove (line 1) | remove(t){o("the id as parameter 1",t);let e=0,r=this.root;for(;null==...
    method _split (line 1) | _split(t,e){t.left={contacts:[],dontSplit:!1,left:null,right:null},t.r...
    method toArray (line 1) | toArray(){let t=[];for(const e=[this.root];e.length>0;){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<s;o++){var ...
  function d (line 1) | function d(t,e,r){r.negative=e.negative^t.negative;var i=t.length+e.leng...
  function m (line 1) | function m(t,e,r){return(new g).mulp(t,e,r)}
  function g (line 1) | function g(t,e){this.x=t,this.y=e}
    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 b (line 1) | function b(t,e){this.name=t,this.p=new s(e,16),this.n=this.p.bitLength()...
  function v (line 1) | function v(){b.call(this,"k256","ffffffff ffffffff ffffffff ffffffff fff...
  function w (line 1) | function w(){b.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 000...
  function _ (line 1) | function _(){b.call(this,"p192","ffffffff ffffffff ffffffff fffffffe fff...
  function M (line 1) | function M(){b.call(this,"25519","7fffffffffffffff ffffffffffffffff ffff...
  function S (line 1) | function S(t){if("string"==typeof t){var e=s._prime(t);this.m=e.p,this.p...
  function k (line 1) | function k(t){S.call(this,t),this.shift=this.m.bitLength(),this.shift%26...
  function s (line 1) | function s(t,e){this.ec=t,this.priv=null,this.pub=null,e.priv&&this._imp...
  function h (line 1) | function h(t){this.twisted=1!=(0|t.a),this.mOneA=this.twisted&&-1==(0|t....
  function u (line 1) | function u(t,e,r,i,s){o.BasePoint.call(this,t,"projective"),null===e&&nu...
  function a (line 1) | function a(t){this.curveType=o[t],this.curveType||(this.curveType={name:...
    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;r<t.contacts.length;++r)if(s(t.contacts[r].i...
    method remove (line 1) | remove(t){o("the id as parameter 1",t);let e=0,r=this.root;for(;null==...
    method _split (line 1) | _split(t,e){t.left={contacts:[],dontSplit:!1,left:null,right:null},t.r...
    method toArray (line 1) | toArray(){let t=[];for(const e=[this.root];e.length>0;){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;e<this._numPieces;e++)if(!this...
    method _failedMetadata (line 1) | _failedMetadata(){this._bitfield=new qt.A(0,{grow:1e3}),this._remainin...
  function e (line 1) | function e(t,e){return Object.prototype.hasOwnProperty.call(t,e)}
    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<this._numPieces;e++)if(!this...
    method _failedMetadata (line 1) | _failedMetadata(){this._bitfield=new qt.A(0,{grow:1e3}),this._remainin...
  function o (line 1) | function o(t){function r(){e&&e(t,n)}s?i.nextTick(r):r()}
  function b (line 1) | function b(t){m.call(this),"HEAD"===t.method&&(this._hasBody=!1),this.se...
  function v (line 1) | function v(){this._httpMessage&&this._httpMessage.emit("close")}
  function w (line 1) | function w(t){if(!(this instanceof w))return new w(t);n.Server.call(this...
  function _ (line 1) | function _(t){var e=this,r=[],i=[],n=0;function a(e){if(n+=e,t._paused&&...
  function M (line 1) | function M(){this._paused?this.pause():this._handle&&!this._handle.readi...
  function S (line 1) | function S(){this._handle&&this._handle.reading&&(this._handle.reading=!...
  function k (line 1) | function k(t,e){e._handle&&(t._consumed&&t.unconsume(e._handle._external...
  function E (line 1) | function E(t,e){var r=n.Socket.prototype.on.call(this,t,e);return this.p...
  function b (line 1) | function b(t,e){t=t||{};var i=e instanceof(s=s||r(308));this.objectMode=...
  function v (line 1) | function v(t){if(s=s||r(308),!(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;n<t.length;n++){const s=t[n];if(s.piece===e...
    method _encryptHandshake (line 1) | _encryptHandshake(t){const e=new Uint8Array(t);if(!this._encryptGenera...
    method _encrypt (line 1) | _encrypt(t){const e=new Uint8Array(t);if(!this._encryptGenerator||2!==...
    method _decryptHandshake (line 1) | _decryptHandshake(t){const e=new Uint8Array(t);if(!this._decryptGenera...
    method _decrypt (line 1) | _decrypt(t){const e=new Uint8Array(t);if(!this._decryptGenerator||2!==...
    method _utfToHex (line 1) | _utfToHex(t){return(0,u.V5)((0,u.L0)(t))}
  function R (line 1) | function R(t){var e=t._readableState;if(e.length>0)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<i;r++)if(t[r]===e)return r;retu...
  function u (line 1) | function u(e,i){d("onunpipe"),e===r&&i&&!1===i.hasUnpiped&&(i.hasUnpiped...
  function f (line 1) | function f(){d("onend"),t.end()}
  function m (line 1) | function m(e){d("ondata"),p=!1,!1!==t.write(e)||p||((1===s.pipesCount&&s...
  function g (line 1) | function g(e){d("onerror",e),v(),t.removeListener("error",g),0===a(t,"er...
    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.removeListener("finish",b),v()}
  function b (line 1) | function b(){d("onfinish"),t.removeListener("close",y),v()}
  function v (line 1) | function v(){d("unpipe"),r.unpipe(t)}
  function h (line 1) | function h(t,e){s.call(this,"digest"),"string"==typeof e&&(e=n.from(e)),...
  function s (line 1) | function s(t,e){var r=this._transformState;r.transforming=!1;var i=r.wri...
  function o (line 1) | function o(t){if(!(this instanceof o))return new o(t);i.call(this,t),thi...
  function a (line 1) | function a(){var t=this;"function"==typeof this._flush?this._flush(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;r<t.contacts.length;++r)if(s(t.contacts[r].i...
    method remove (line 1) | remove(t){o("the id as parameter 1",t);let e=0,r=this.root;for(;null==...
    method _split (line 1) | _split(t,e){t.left={contacts:[],dontSplit:!1,left:null,right:null},t.r...
    method toArray (line 1) | toArray(){let t=[];for(const e=[this.root];e.length>0;){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;e<this._numPieces;e++)if(!this...
    method _failedMetadata (line 1) | _failedMetadata(){this._bitfield=new qt.A(0,{grow:1e3}),this._remainin...
  function s (line 1) | function s(){if(!(this instanceof s))return new s;n.call(this),this.h=[3...
  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){s.Node.call(this,"der",t)}
  function f (line 1) | function f(t,e){var r=t.readUInt8(e);if(t.isError(r))return r;var i=a.ta...
  function l (line 1) | function l(t,e,r){var i=t.readUInt8(r);if(t.isError(i))return i;if(!e&&1...
  function d (line 1) | function d(t,e){if(!(this instanceof d))return new d(t,e);s.call(this),e...
  function a (line 1) | function a(){this.tmp=new Array(2),this.keys=null}
    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;r<t.contacts.length;++r)if(s(t.contacts[r].i...
    method remove (line 1) | remove(t){o("the id as parameter 1",t);let e=0,r=this.root;for(;null==...
    method _split (line 1) | _split(t,e){t.left={contacts:[],dontSplit:!1,left:null,right:null},t.r...
    method toArray (line 1) | toArray(){let t=[];for(const e=[this.root];e.length>0;){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<this.buffer.length&&!!(this.buffer[e]&128...
    method set (line 1) | set(t,e=!0){const r=t>>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.buffer.length;t++)if(0!==this.buffer[t])r...
  function s (line 1) | function s(t,e,r){if(s.isBN(t))return t;this.negative=0,this.words=null,...
  function a (line 1) | function a(t,e){var r=t.charCodeAt(e);return r>=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;r<t.contacts.length;++r)if(s(t.contacts[r].i...
    method remove (line 1) | remove(t){o("the id as parameter 1",t);let e=0,r=this.root;for(;null==...
    method _split (line 1) | _split(t,e){t.left={contacts:[],dontSplit:!1,left:null,right:null},t.r...
    method toArray (line 1) | toArray(){let t=[];for(const e=[this.root];e.length>0;){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<s;o++){var ...
  function d (line 1) | function d(t,e,r){r.negative=e.negative^t.negative;var i=t.length+e.leng...
  function m (line 1) | function m(t,e,r){return(new g).mulp(t,e,r)}
  function g (line 1) | function g(t,e){this.x=t,this.y=e}
    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 b (line 1) | function b(t,e){this.name=t,this.p=new s(e,16),this.n=this.p.bitLength()...
  function v (line 1) | function v(){b.call(this,"k256","ffffffff ffffffff ffffffff ffffffff fff...
  function w (line 1) | function w(){b.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 000...
  function _ (line 1) | function _(){b.call(this,"p192","ffffffff ffffffff ffffffff fffffffe fff...
  function M (line 1) | function M(){b.call(this,"25519","7fffffffffffffff ffffffffffffffff ffff...
  function S (line 1) | function S(t){if("string"==typeof t){var e=s._prime(t);this.m=e.p,this.p...
  function k (line 1) | function k(t){S.call(this,t),this.shift=this.m.bitLength(),this.shift%26...
  function f (line 1) | function f(t,e,r,o){s.call(this);var h=n.alloc(4,0);this._cipher=new i.A...
  function s (line 1) | function s(t){var e=this;this.next=null,this.entry=null,this.finish=func...
  function m (line 1) | function m(){}
  function g (line 1) | function g(t,e){o=o||r(308),t=t||{};var i=e instanceof o;this.objectMode...
    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){if(o=o||r(308),!(d.call(y,this)||this instanceof o))return...
  function b (line 1) | function b(t,e,r,i,n,s,o){e.writelen=i,e.writecb=o,e.writing=!0,e.sync=!...
  function v (line 1) | function v(t,e,r,i){r||function(t,e){0===e.length&&e.needDrain&&(e.needD...
  function w (line 1) | function w(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writ...
  function _ (line 1) | function _(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!...
  function M (line 1) | function M(t,e){t._final(function(r){e.pendingcb--,r&&t.emit("error",r),...
  function S (line 1) | function S(t,e){var r=_(e);return r&&(!function(t,e){e.prefinished||e.fi...
  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<this.buffer.length&&!!(this.buffer[e]&128...
    method set (line 1) | set(t,e=!0){const r=t>>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.buffer.length;t++)if(0!==this.buffer[t])r...
  function s (line 1) | function s(t,e,r){if(s.isBN(t))return t;this.negative=0,this.words=null,...
  function a (line 1) | function a(t,e){var r=t.charCodeAt(e);return r>=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;r<t.contacts.length;++r)if(s(t.contacts[r].i...
    method remove (line 1) | remove(t){o("the id as parameter 1",t);let e=0,r=this.root;for(;null==...
    method _split (line 1) | _split(t,e){t.left={contacts:[],dontSplit:!1,left:null,right:null},t.r...
    method toArray (line 1) | toArray(){let t=[];for(const e=[this.root];e.length>0;){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<s;o++){var ...
  function d (line 1) | function d(t,e,r){r.negative=e.negative^t.negative;var i=t.length+e.leng...
  function m (line 1) | function m(t,e,r){return(new g).mulp(t,e,r)}
  function g (line 1) | function g(t,e){this.x=t,this.y=e}
    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 b (line 1) | function b(t,e){this.name=t,this.p=new s(e,16),this.n=this.p.bitLength()...
  function v (line 1) | function v(){b.call(this,"k256","ffffffff ffffffff ffffffff ffffffff fff...
  function w (line 1) | function w(){b.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 000...
  function _ (line 1) | function _(){b.call(this,"p192","ffffffff ffffffff ffffffff fffffffe fff...
  function M (line 1) | function M(){b.call(this,"25519","7fffffffffffffff ffffffffffffffff ffff...
  function S (line 1) | function S(t){if("string"==typeof t){var e=s._prime(t);this.m=e.p,this.p...
  function k (line 1) | function k(t){S.call(this,t),this.shift=this.m.bitLength(),this.shift%26...
  function o (line 1) | function o(t){if(!(this instanceof o))return new o(t);this.hash=t.hash,t...
  function y (line 1) | function y(t,e){(this.maxHeaderPairs<=0||this._headers.length<this.maxHe...
  function b (line 1) | function b(t,e,r,i,s,o,a,u,f){var l=this;r||(r=l._headers,l._headers=[])...
  function v (line 1) | function v(t,e,r){var i=this.incoming;if(i){var n=i.socket;if(r>0&&!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<this.buffer.length&&!!(this.buffer[e]&128...
    method set (line 1) | set(t,e=!0){const r=t>>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.buffer.length;t++)if(0!==this.buffer[t])r...
  function s (line 1) | function s(t,e,r){if(s.isBN(t))return t;this.negative=0,this.words=null,...
  function a (line 1) | function a(t,e){var r=t.charCodeAt(e);return r>=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;r<t.contacts.length;++r)if(s(t.contacts[r].i...
    method remove (line 1) | remove(t){o("the id as parameter 1",t);let e=0,r=this.root;for(;null==...
    method _split (line 1) | _split(t,e){t.left={contacts:[],dontSplit:!1,left:null,right:null},t.r...
    method toArray (line 1) | toArray(){let t=[];for(const e=[this.root];e.length>0;){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<s;o++){var ...
  function d (line 1) | function d(t,e,r){r.negative=e.negative^t.negative;var i=t.length+e.leng...
  function m (line 1) | function m(t,e,r){return(new g).mulp(t,e,r)}
  function g (line 1) | function g(t,e){this.x=t,this.y=e}
    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 b (line 1) | function b(t,e){this.name=t,this.p=new s(e,16),this.n=this.p.bitLength()...
  function v (line 1) | function v(){b.call(this,"k256","ffffffff ffffffff ffffffff ffffffff fff...
  function w (line 1) | function w(){b.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 000...
  function _ (line 1) | function _(){b.call(this,"p192","ffffffff ffffffff ffffffff fffffffe fff...
  function M (line 1) | function M(){b.call(this,"25519","7fffffffffffffff ffffffffffffffff ffff...
  function S (line 1) | function S(t){if("string"==typeof t){var e=s._prime(t);this.m=e.p,this.p...
  function k (line 1) | function k(t){S.call(this,t),this.shift=this.m.bitLength(),this.shift%26...
  function n (line 1) | function n(t){this.options=t,this.type=this.options.type,this.blockSize=...
    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<this.buffer.length&&!!(this.buffer[e]&128...
    method set (line 1) | set(t,e=!0){const r=t>>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.buffer.length;t++)if(0!==this.buffer[t])r...
  function h (line 1) | function h(){this.init(),this._w=a,s.call(this,128,112)}
  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<this._numPieces;e++)if(!this...
    method _failedMetadata (line 1) | _failedMetadata(){this._bitfield=new qt.A(0,{grow:1e3}),this._remainin...
  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 e (line 1) | function e(t,e){return{start:t.start,end:t.end,index:e}}
    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<this._numPieces;e++)if(!this...
    method _failedMetadata (line 1) | _failedMetadata(){this._bitfield=new qt.A(0,{grow:1e3}),this._remainin...
  function r (line 1) | function r(t){return{start:t.start,end:t.end}}
  function i (line 1) | function i(t,e){return t.index-e.index}
  function n (line 1) | function n(t,e){return t.start-e.start}
    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<this.buffer.length&&!!(this.buffer[e]&128...
    method set (line 1) | set(t,e=!0){const r=t>>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.buffer.length;t++)if(0!==this.buffer[t])r...
  function h (line 1) | function h(){this.init(),this._w=a,n.call(this,128,112)}
  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,e){return(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<e>>>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<this._numPieces;e++)if(!this...
    method _failedMetadata (line 1) | _failedMetadata(){this._bitfield=new qt.A(0,{grow:1e3}),this._remainin...
  function s (line 1) | function s(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=...
  function p (line 1) | function p(t,e){return{value:t,done:e}}
  function m (line 1) | function m(t){var e=t[a];if(null!==e){var r=t[d].read();null!==r&&(t[l]=...
  function g (line 1) | function g(t){n.nextTick(m,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&&...
  method stream (line 1) | get stream(){return this[d]}
  function i (line 1) | function i(t){return(t>>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<this.buffer.length&&!!(this.buffer[e]&128...
    method set (line 1) | set(t,e=!0){const r=t>>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.buffer.length;t++)if(0!==this.buffer[t])r...
  function o (line 1) | function o(t){var e=t._cipher.encryptBlockRaw(t._prev);return s(t._prev),e}
  function a (line 1) | function a(i,n){if(i)return e(i,null);r.tokensThisInterval+=t,e(null,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;r<t.contacts.length;++r)if(s(t.contacts[r].i...
    method remove (line 1) | remove(t){o("the id as parameter 1",t);let e=0,r=this.root;for(;null==...
    method _split (line 1) | _split(t,e){t.left={contacts:[],dontSplit:!1,left:null,right:null},t.r...
    method toArray (line 1) | toArray(){let t=[];for(const e=[this.root];e.length>0;){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;r<t.contacts.length;++r)if(s(t.contacts[r].i...
    method remove (line 1) | remove(t){o("the id as parameter 1",t);let e=0,r=this.root;for(;null==...
    method _split (line 1) | _split(t,e){t.left={contacts:[],dontSplit:!1,left:null,right:null},t.r...
    method toArray (line 1) | toArray(){let t=[];for(const e=[this.root];e.length>0;){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;e<this._numPieces;e++)if(!this...
    method _failedMetadata (line 1) | _failedMetadata(){this._bitfield=new qt.A(0,{grow:1e3}),this._remainin...
  function o (line 1) | function o(t){i.equal(t.length,8,"Invalid IV length"),this.iv=new Array(...
  function e (line 1) | function e(e){t.call(this,e),this._cbcInit()}
    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<this._numPieces;e++)if(!this...
    method _failedMetadata (line 1) | _failedMetadata(){this._bitfield=new qt.A(0,{grow:1e3}),this._remainin...
  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)}
  method next (line 1) | next(){const t=i;return i=e.read(),t}
  method throw (line 1) | async throw(t){throw await this.return(),t}
  method [Symbol.asyncIterator] (line 1) | [Symbol.asyncIterator](){return this}
  function l (line 1) | function l(t,e){s.call(this,"digest"),"string"==typeof e&&(e=o.from(e));...
  function n (line 1) | function n(t){var e=function(){return e.called?e.value:(e.called=!0,e.va...
    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<this.buffer.length&&!!(this.buffer[e]&128...
    method set (line 1) | set(t,e=!0){const r=t>>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.buffer.length;t++)if(0!==this.buffer[t])r...
  function s (line 1) | function s(t){var e=function(){if(e.called)throw new Error(e.onceError);...
  function n (line 1) | function n(t){if(!(this instanceof n))return new n(t);i.call(this,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<this.buffer.length&&!!(this.buffer[e]&128...
    method set (line 1) | set(t,e=!0){const r=t>>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.buffer.length;t++)if(0!==this.buffer[t])r...
  method constructor (line 1) | constructor(t){if(this.store=t,this.chunkLength=t.chunkLength,!this.stor...
  method put (line 1) | put(t,e,r=()=>{}){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<t.length;r++)e+=i(t[r].toString(16));re...
    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<this.buffer.length&&!!(this.buffer[e]&128...
    method set (line 1) | set(t,e=!0){const r=t>>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.buffer.length;t++)if(0!==this.buffer[t])r...
  method constructor (line 1) | constructor(t,e){if(this.store=t,this.chunkLength=t.chunkLength,this.inP...
  method put (line 1) | put(t,e,r=()=>{}){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<this.buffer.length&&!!(this.buffer[e]&128...
    method set (line 1) | set(t,e=!0){const r=t>>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.buffer.length;t++)if(0!==this.buffer[t])r...
  function s (line 1) | function s(t){return globalThis.Buffer&&"function"==typeof globalThis.Bu...
  function f (line 1) | function f(t){return Object.prototype.toString.call(t)}
  function l (line 1) | function l(t){return!s(t)&&("function"==typeof globalThis.ArrayBuffer&&(...
  function p (line 1) | function p(t){if(o.isFunction(t)){if(u)return t.name;var e=t.toString()....
  function m (line 1) | function m(t,e){return"string"==typeof t?t.length<e?t:t.slice(0,e):t}
  function g (line 1) | function g(t){if(u||!o.isFunction(t))return o.inspect(t);var e=p(t);retu...
    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){throw new c.AssertionError({message:r,actual:t,exp...
  function b (line 1) | function b(t,e){t||y(t,!0,e,"==",c.ok)}
  function v (line 1) | function v(t,e,r,i){if(t===e)return!0;if(s(t)&&s(e))return 0===n(t,e);if...
  function w (line 1) | function w(t){return"[object Arguments]"==Object.prototype.toString.call...
  function _ (line 1) | function _(t,e){if(!t||!e)return!1;if("[object RegExp]"==Object.prototyp...
  function M (line 1) | function M(t,e,r,i){var n;if("function"!=typeof e)throw new TypeError('"...
  function u (line 1) | function u(t,e){var r=this._transformState;r.transforming=!1;var i=r.wri...
  function f (line 1) | function f(t){if(!(this instanceof f))return new f(t);h.call(this,t),thi...
  function l (line 1) | function l(){var t=this;"function"!=typeof this._flush||this._readableSt...
  function c (line 1) | function c(t,e,r){if(e)return t.emit("error",e);if(null!=r&&t.push(r),t....
  method constructor (line 1) | constructor(t){this.encoding=t}
  method remaining (line 1) | get remaining(){return 0}
  method decode (line 1) | decode(t){return i.toString(t,this.encoding)}
  method flush (line 1) | flush(){return""}
  function e (line 1) | function e(t){try{if(!globalThis.localStorage)return!1}catch(t){return!1...
    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<this._numPieces;e++)if(!this...
    method _failedMetadata (line 1) | _failedMetadata(){this._bitfield=new qt.A(0,{grow:1e3}),this._remainin...
  function n (line 1) | function n(t,e,r){let i=0,n=1;for(let s=e;s<r;s++){const r=t[s];if(r<58&...
    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<this.buffer.length&&!!(this.buffer[e]&128...
    method set (line 1) | set(t,e=!0){const r=t>>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.buffer.length;t++)if(0!==this.buffer[t])r...
  function s (line 1) | function s(t,e,r,n){return null==t||0===t.length?null:("number"!=typeof ...
  function s (line 1) | function s(t){n.call(this),this._block=i.allocUnsafe(t),this._blockSize=...
  function h (line 1) | function h(t,e){if(t.cmpn(0)<=0)throw new Error("invalid sig");if(t.cmp(...
  function n (line 1) | function n(t,e){if(!(this instanceof n))return new n(t,e);if(e||(e={}),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<this.buffer.length&&!!(this.buffer[e]&128...
    method set (line 1) | set(t,e=!0){const r=t>>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.buffer.length;t++)if(0!==this.buffer[t])r...
  function d (line 1) | function d(t,e){return e=e||"utf8",i.isBuffer(t)||(t=new i(t,e)),this._p...
  function p (line 1) | function p(t,e){return e=e||"utf8",i.isBuffer(t)||(t=new i(t,e)),this._p...
  function g (line 1) | function g(t,e,r){this.setGenerator(e),this.__prime=new n(t),this._prime...
    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){var r=new i(t.toArray());return e?r.toString(e):r}
  function m (line 1) | function m(){if(null!==p)return p;var t=[];t[0]=2;for(var e=1,r=3;r<1048...
  function g (line 1) | function g(t){for(var e=m(),r=0;r<e.length;r++)if(0===t.modn(e[r]))retur...
    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){var e=n.mont(t);return 0===h.toRed(e).redPow(t.subn(1)).fr...
  function b (line 1) | function b(t,e){if(t<16)return new n(2===e||5===e?[140,123]:[140,39]);va...
  function l (line 1) | function l(t){if(!(this instanceof l))return new l(t);t||(t={});var e,r=...
  function c (line 1) | function c(t,e){return t&&n.isBuffer(t)&&t.length===e}
  function d (line 1) | function d(t,e){return t[e++]+"."+t[e++]+"."+t[e++]+"."+t[e++]}
  function p (line 1) | function p(t){return"string"==typeof t?{host:t.split(":")[0],port:Number...
  function m (line 1) | function m(){}
  function u (line 1) | function u(t,e,h){t?t.code>=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<this.buffer.length&&!!(this.buffer[e]&128...
    method set (line 1) | set(t,e=!0){const r=t>>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.buffer.length;t++)if(0!==this.buffer[t])r...
  function s (line 1) | function s(t){if(!(this instanceof s))return new s(t);i.call(this,t)}
  function n (line 1) | function n(t,e,r){for(var i,n,o=-1,a=0;++o<8;)i=e&1<<7-o?128:0,a+=(128&(...
    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<this.buffer.length&&!!(this.buffer[e]&128...
    method set (line 1) | set(t,e=!0){const r=t>>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.buffer.length;t++)if(0!==this.buffer[t])r...
  function s (line 1) | function s(t,e){var r=t.length,n=-1,s=i.allocUnsafe(t.length);for(t=i.co...
  function a (line 1) | function a(t,e){i.equal(e.length,24,"Invalid key length");var r=e.slice(...
    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;r<t.contacts.length;++r)if(s(t.contacts[r].i...
    method remove (line 1) | remove(t){o("the id as parameter 1",t);let e=0,r=this.root;for(;null==...
    method _split (line 1) | _split(t,e){t.left={contacts:[],dontSplit:!1,left:null,right:null},t.r...
    method toArray (line 1) | toArray(){let t=[];for(const e=[this.root];e.length>0;){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;r<t.contacts.length;++r)if(s(t.contacts[r].i...
    method remove (line 1) | remove(t){o("the id as parameter 1",t);let e=0,r=this.root;for(;null==...
    method _split (line 1) | _split(t,e){t.left={contacts:[],dontSplit:!1,left:null,right:null},t.r...
    method toArray (line 1) | toArray(){let t=[];for(const e=[this.root];e.length>0;){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())).length<e.byteLength()){va...
  function l (line 1) | function l(t,e){var r=new a(t),i=(t.length<<3)-e.bitLength();return i>0&...
  function c (line 1) | function c(t,e,r){var s,o;do{for(s=i.alloc(0);8*s.length<t.bitLength();)...
  function d (line 1) | function d(t,e,r,i){return t.toRed(a.mont(r)).redPow(e).fromRed().mod(i)}
  function l (line 1) | function l(t){function e(){r&&r(t,n),r=null}f?i(e):e()}
  function c (line 1) | function c(e,r,i){if(n[e]=i,r&&(h=!0),0===--o||r)l(r);else if(!h&&u<s){l...
  function f (line 1) | function f(t){if(!(this instanceof f))return new f(t);s.call(this,t),o.c...
  function l (line 1) | function l(){this._writableState.ended||i.nextTick(c,this)}
  function c (line 1) | function c(t){t.end()}
  function k (line 1) | function k(t,e,n){i=i||r(5382),t=t||{},"boolean"!=typeof n&&(n=e instanc...
  function E (line 1) | function E(t){if(i=i||r(5382),!(this instanceof E))return new E(t);var e...
  function x (line 1) | function x(t,e,r,i,n){u("readableAddChunk",e);var s,o=t._readableState;i...
  function A (line 1) | function A(t,e,r,i){e.flowing&&0===e.length&&!e.sync?(e.awaitDrain=0,t.e...
  function T (line 1) | function T(t,e){return t<=0||0===e.length&&e.ended?0:e.objectMode?1:t!=t...
    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;u("emitReadable",e.needReadable,e.e...
    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){var e=t._readableState;u("emitReadable_",e.destroyed,e.len...
    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<t.length;n++){const s=t[n];if(s.piece===e...
    method _encryptHandshake (line 1) | _encryptHandshake(t){const e=new Uint8Array(t);if(!this._encryptGenera...
    method _encrypt (line 1) | _encrypt(t){const e=new Uint8Array(t);if(!this._encryptGenerator||2!==...
    method _decryptHandshake (line 1) | _decryptHandshake(t){const e=new Uint8Array(t);if(!this._decryptGenera...
    method _decrypt (line 1) | _decrypt(t){const e=new Uint8Array(t);if(!this._decryptGenerator||2!==...
    method _utfToHex (line 1) | _utfToHex(t){return(0,u.V5)((0,u.L0)(t))}
  function R (line 1) | function R(t,e){e.readingMore||(e.readingMore=!0,n.nextTick(O,t,e))}
  function O (line 1) | function O(t,e){for(;!e.reading&&!e.ended&&(e.length<e.highWaterMark||e....
  function B (line 1) | function B(t){var e=t._readableState;e.readableListening=t.listenerCount...
  function L (line 1) | function L(t){u("readable nexttick read 0"),t.read(0)}
  function N (line 1) | function N(t,e){u("resume",e.reading),e.reading||t.read(0),e.resumeSched...
  function j (line 1) | function j(t){var e=t._readableState;for(u("flow",e.flowing);e.flowing&&...
  function U (line 1) | function U(t,e){return 0===e.length?null:(e.objectMode?r=e.buffer.shift(...
  function q (line 1) | function q(t){var e=t._readableState;u("endReadable",e.endEmitted),e.end...
  function D (line 1) | function D(t,e){if(u("endReadableNT",t.endEmitted,t.length),!t.endEmitte...
  function H (line 1) | function H(t,e){for(var r=0,i=t.length;r<i;r++)if(t[r]===e)return r;retu...
  function a (line 1) | function a(e,n){u("onunpipe"),e===r&&n&&!1===n.hasUnpiped&&(n.hasUnpiped...
    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;r<t.contacts.length;++r)if(s(t.contacts[r].i...
    method remove (line 1) | remove(t){o("the id as parameter 1",t);let e=0,r=this.root;for(;null==...
    method _split (line 1) | _split(t,e){t.left={contacts:[],dontSplit:!1,left:null,right:null},t.r...
    method toArray (line 1) | toArray(){let t=[];for(const e=[this.root];e.length>0;){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<this.buffer.length&&!!(this.buffer[e]&128...
    method set (line 1) | set(t,e=!0){const r=t>>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.buffer.length;t++)if(0!==this.buffer[t])r...
  function n (line 1) | function n(t){return Object.prototype.toString.call(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<this.buffer.length&&!!(this.buffer[e]&128...
    method set (line 1) | set(t,e=!0){const r=t>>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.buffer.length;t++)if(0!==this.buffer[t])r...
  class g (line 1) | class g extends i{constructor(t,e){super(),this.id=t,this.type=e,d("new ...
    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 u (line 1) | function u(t){switch(t){case"ascii":return i;case"base64":return n;case"...
  function f (line 1) | function f(t,e){if(t===e)return 0;const r=Math.min(t.byteLength,e.byteLe...
  function l (line 1) | function l(t,e,r){return"string"==typeof t?function(t,e){const r=u(e),i=...
  function c (line 1) | function c(t,e,r,i){return d(t,e,r,i,!0)}
  function d (line 1) | function d(t,e,r,i,n){if(0===t.byteLength)return-1;if("string"==typeof r...
  function p (line 1) | function p(t,e,r){const i=t[e];t[e]=t[r],t[r]=i}
  function f (line 1) | function f(t,e,r){a.call(this),this._cache=new c,this._cipher=new h.AES(...
  function c (line 1) | function c(){this.cache=s.allocUnsafe(0)}
  function d (line 1) | function d(t,e,r){var a=i[t.toLowerCase()];if(!a)throw new TypeError("in...
  method constructor (line 1) | constructor(t){if(!(t>0)||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<this.buffer.length&&!!(this.buffer[e]&128...
    method set (line 1) | set(t,e=!0){const r=t>>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.buffer.length;t++)if(0!==this.buffer[t])r...
  function s (line 1) | function s(t){t._writableState&&!t._writableState.emitClose||t._readable...
  function o (line 1) | function o(t,e){t.emit("error",e)}
  function n (line 1) | function n(t){i.ok(t===n.REQUEST||t===n.RESPONSE),this.type=t,this.state...
    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<this.buffer.length&&!!(this.buffer[e]&128...
    method set (line 1) | set(t,e=!0){const r=t>>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.buffer.length;t++)if(0!==this.buffer[t])r...
  function b (line 1) | function b(t){var e=new Error("Parse Error");return e.code=t,e}
  function y (line 1) | function y(t,e){var r=this;if(p.call(r),"string"==typeof t){if(!(t=o.par...
  function b (line 1) | function b(t){t.emit("abort")}
  function v (line 1) | function v(){var t=new Error("socket hang up");return t.code="ECONNRESET...
  function w (line 1) | function w(){var t=this,e=t._httpMessage;d("HTTP socket close"),t.read()...
  function _ (line 1) | function _(t){var e=this,r=e._httpMessage;d("SOCKET ERROR:",t.message,t....
  function M (line 1) | function M(t){d("SOCKET ERROR on FREE socket:",t.message,t.stack),this.d...
  function S (line 1) | function S(){var t=this._httpMessage,e=this.parser;t.res||t.socket._hadE...
  function k (line 1) | function k(t){var e=this,r=this._httpMessage,i=this.parser;h(i&&i.socket...
  function E (line 1) | function E(t,e){var r=this.socket,i=r._httpMessage;if(i.domain&&!t.domai...
  function x (line 1) | function x(t,e){var r=e.socket;e.shouldKeepAlive?(d("AGENT socket keep-a...
  function A (line 1) | function A(){const t=this.req;t._ended=!0,t.shouldKeepAlive&&!t.finished...
  function I (line 1) | function I(){const t=this;this.res;t.shouldKeepAlive&&t._ended&&x(0,t)}
  function T (line 1) | function T(t){t.emit("free")}
    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.aborted?e.emit("free"):function(t,e){var r=l.alloc();t...
    method constructor (line 1) | constructor(){this.buffer=new Uint8Array}
    method get (line 1) | get(t){return!0}
    method set (line 1) | set(t){}
  function n (line 1) | function n(){t&&i.socket[t].apply(i.socket,e),"function"==typeof r&&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<this.buffer.length&&!!(this.buffer[e]&128...
    method set (line 1) | set(t,e=!0){const r=t>>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.buffer.length;t++)if(0!==this.buffer[t])r...
  function i (line 1) | function i(){r.emit("timeout")}
  function s (line 1) | function s(t,e){var r=this._transformState;r.transforming=!1;var i=r.wri...
  function o (line 1) | function o(t){if(!(this instanceof o))return new o(t);i.call(this,t),thi...
  function a (line 1) | function a(){var t=this;"function"==typeof this._flush?this._flush(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;r<t.contacts.length;++r)if(s(t.contacts[r].i...
    method remove (line 1) | remove(t){o("the id as parameter 1",t);let e=0,r=this.root;for(;null==...
    method _split (line 1) | _split(t,e){t.left={contacts:[],dontSplit:!1,left:null,right:null},t.r...
    method toArray (line 1) | toArray(){let t=[];for(const e=[this.root];e.length>0;){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<<e|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<this.buffer.length&&!!(this.buffer[e]&128...
    method set (line 1) | set(t,e=!0){const r=t>>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.buffer.length;t++)if(0!==this.buffer[t])r...
  function s (line 1) | function s(t,e,r){return t&e^t&r^e&r}
  function o (line 1) | function o(t,e,r){return t^e^r}
  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 n (line 1) | function n(){}
    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<this.buffer.length&&!!(this.buffer[e]&128...
    method set (line 1) | set(t,e=!0){const r=t>>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.buffer.length;t++)if(0!==this.buffer[t])r...
  function l (line 1) | function l(t){if(!(this instanceof l))return new l(t);o.call(this,t),a.c...
  function c (line 1) | function c(){this.allowHalfOpen||this._writableState.ended||i.nextTick(d...
  function d (line 1) | function d(t){t.end()}
  function n (line 1) | function n(t,e){t.emit("error",e)}
    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<this.buffer.length&&!!(this.buffer[e]&128...
    method set (line 1) | set(t,e=!0){const r=t>>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.buffer.length;t++)if(0!==this.buffer[t])r...
  function e (line 1) | function e(t,e){for(const r in e)Object.defineProperty(t,r,{value:e[r],e...
    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<this._numPieces;e++)if(!this...
    method _failedMetadata (line 1) | _failedMetadata(){this._bitfield=new qt.A(0,{grow:1e3}),this._remainin...
  function s (line 1) | function s(t,e,r){var s=e.length,o=n(e,t._cache);return t._cache=t._cach...
  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;r<t.contacts.length;++r)if(s(t.contacts[r].i...
    method remove (line 1) | remove(t){o("the id as parameter 1",t);let e=0,r=this.root;for(;null==...
    method _split (line 1) | _split(t,e){t.left={contacts:[],dontSplit:!1,left:null,right:null},t.r...
    method toArray (line 1) | toArray(){let t=[];for(const e=[this.root];e.length>0;){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<t.length;n++){const s=t[n];if(s.piece===e...
    method _encryptHandshake (line 1) | _encryptHandshake(t){const e=new Uint8Array(t);if(!this._encryptGenera...
    method _encrypt (line 1) | _encrypt(t){const e=new Uint8Array(t);if(!this._encryptGenerator||2!==...
    method _decryptHandshake (line 1) | _decryptHandshake(t){const e=new Uint8Array(t);if(!this._decryptGenera...
    method _decrypt (line 1) | _decrypt(t){const e=new Uint8Array(t);if(!this._decryptGenerator||2!==...
    method _utfToHex (line 1) | _utfToHex(t){return(0,u.V5)((0,u.L0)(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<this.buffer.length&&!!(this.buffer[e]&128...
    method set (line 1) | set(t,e=!0){const r=t>>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.buffer.length;t++)if(0!==this.buffer[t])r...
  function s (line 1) | function s(t,e,r){if(s.isBN(t))return t;this.negative=0,this.words=null,...
  function a (line 1) | function a(t,e){var r=t.charCodeAt(e);return r>=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;r<t.contacts.length;++r)if(s(t.contacts[r].i...
    method remove (line 1) | remove(t){o("the id as parameter 1",t);let e=0,r=this.root;for(;null==...
    method _split (line 1) | _split(t,e){t.left={contacts:[],dontSplit:!1,left:null,right:null},t.r...
    method toArray (line 1) | toArray(){let t=[];for(const e=[this.root];e.length>0;){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<s;o++){var ...
  function d (line 1) | function d(t,e,r){r.negative=e.negative^t.negative;var i=t.length+e.leng...
  function m (line 1) | function m(t,e,r){return(new g).mulp(t,e,r)}
  function g (line 1) | function g(t,e){this.x=t,this.y=e}
    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 b (line 1) | function b(t,e){this.name=t,this.p=new s(e,16),this.n=this.p.bitLength()...
  function v (line 1) | function v(){b.call(this,"k256","ffffffff ffffffff ffffffff ffffffff fff...
  function w (line 1) | function w(){b.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 000...
  function _ (line 1) | function _(){b.call(this,"p192","ffffffff ffffffff ffffffff fffffffe fff...
  function M (line 1) | function M(){b.call(this,"25519","7fffffffffffffff ffffffffffffffff ffff...
  function S (line 1) | function S(t){if("string"==typeof t){var e=s._prime(t);this.m=e.p,this.p...
  function k (line 1) | function k(t){S.call(this,t),this.shift=this.m.bitLength(),this.shift%26...
  function i (line 1) | function i(t,e,r,i,n,s,o){try{var a=t[s](o),h=a.value}catch(t){return vo...
  function n (line 1) | function n(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){va...
    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<this.buffer.length&&!!(this.buffer[e]&128...
    method set (line 1) | set(t,e=!0){const r=t>>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.buffer.length;t++)if(0!==this.buffer[t])r...
  function s (line 1) | function s(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=...
  function f (line 1) | function f(){return l.apply(this,arguments)}
  function l (line 1) | function l(){var t;return t=function*(){try{var t=yield a.next(),e=t.val...
  function a (line 1) | function a(t,e,r,i){var n=e>=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;r<t.contacts.length;++r)if(s(t.contacts[r].i...
    method remove (line 1) | remove(t){o("the id as parameter 1",t);let e=0,r=this.root;for(;null==...
    method _split (line 1) | _split(t,e){t.left={contacts:[],dontSplit:!1,left:null,right:null},t.r...
    method toArray (line 1) | toArray(){let t=[];for(const e=[this.root];e.length>0;){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;r<t.length;r++)t[...
  function a (line 1) | function a(t,e){this.eddsa=t,this._secret=s(e.secret),t.isPoint(e.pub)?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;r<t.contacts.length;++r)if(s(t.contacts[r].i...
    method remove (line 1) | remove(t){o("the id as parameter 1",t);let e=0,r=this.root;for(;null==...
    method _split (line 1) | _split(t,e){t.left={contacts:[],dontSplit:!1,left:null,right:null},t.r...
    method toArray (line 1) | toArray(){let t=[];for(const e=[this.root];e.length>0;){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<t.length;n++){const s=t[n];if(s.piece===e...
    method _encryptHandshake (line 1) | _encryptHandshake(t){const e=new Uint8Array(t);if(!this._encryptGenera...
    method _encrypt (line 1) | _encrypt(t){const e=new Uint8Array(t);if(!this._encryptGenerator||2!==...
    method _decryptHandshake (line 1) | _decryptHandshake(t){const e=new Uint8Array(t);if(!this._decryptGenera...
    method _decrypt (line 1) | _decrypt(t){const e=new Uint8Array(t);if(!this._decryptGenerator||2!==...
    method _utfToHex (line 1) | _utfToHex(t){return(0,u.V5)((0,u.L0)(t))}
  function h (line 1) | function h(){this.init(),this._w=a,s.call(this,64,56)}
  function f (line 1) | function f(){if(!(this instanceof f))return new f;u.call(this),this.h=[1...
  function l (line 1) | function l(t,e,r,i){return t<=15?e^r^i:t<=31?e&r|~e&i:t<=47?(e|~r)^i:t<=...
  function c (line 1) | function c(t){return t<=15?0:t<=31?1518500249:t<=47?1859775393:t<=63?240...
  function d (line 1) | function d(t){return t<=15?1352829926:t<=31?1548603684:t<=47?1836072691:...
  function o (line 1) | function o(t){if(null==t)return 0;const e=s(t);switch(e){case"buffer":re...
  function s (line 1) | function s(t){return t._prev=t._cipher.encryptBlock(t._prev),t._prev}
  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<e.length;r+...
    method constructor (line 1) | constructor(t){super(),this._wire=t,this._intervalId=null,this._lastMe...
    method start (line 1) | start(){clearInterval(this._intervalId),this._intervalId=setInterval((...
    method stop (line 1) | stop(){clearInterval(this._intervalId),this._intervalId=null}
    method reset (line 1) | reset(){this._remoteAddedPeers={},this._remoteDroppedPeers={},this._lo...
    method addPeer (line 1) | addPeer(t,e={}){this._addPeer(t,this._encodeFlags(e),4)}
    method addPeer6 (line 1) | addPeer6(t,e={}){this._addPeer(t,this._encodeFlags(e),6)}
    method _addPeer (line 1) | _addPeer(t,e,r){t.includes(":")&&(t in this._remoteAddedPeers||(t in t...
    method dropPeer (line 1) | dropPeer(t){this._dropPeer(t,4)}
    method dropPeer6 (line 1) | dropPeer6(t){this._dropPeer(t,6)}
    method _dropPeer (line 1) | _dropPeer(t,e){t.includes(":")&&(t in this._remoteDroppedPeers||(t in ...
    method onExtendedHandshake (line 1) | onExtendedHandshake(t){if(!t.m||!t.m.ut_pex)return this.emit("warning"...
    method onMessage (line 1) | onMessage(t){const e=Date.now();if(e-this._lastMessageTimestamp<6e4)re...
    method _decodeFlags (line 1) | _decodeFlags(t){return{prefersEncryption:!!(t&or.prefersEncryption),is...
    method _encodeFlags (line 1) | _encodeFlags(t){return Object.keys(t).reduce((e,r)=>!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<this.buffer.length&&!!(this.buffer[e]&128...
    m
Condensed preview — 88 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (1,592K chars).
[
  {
    "path": ".airtap.yml",
    "chars": 743,
    "preview": "browsers:\n  - name: chrome\n    version: latest\n  - name: firefox\n    version: latest\n  # https://github.com/airtap/sauce"
  },
  {
    "path": ".eslintrc.cjs",
    "chars": 413,
    "preview": "module.exports = {\n  env: {\n    es2022: true,\n    browser: true,\n    node: true,\n    serviceworker: true\n  },\n  extends:"
  },
  {
    "path": ".github/config.yml",
    "chars": 553,
    "preview": "\n# ProBot Request Info (https://probot.github.io/apps/request-info/)\n\nrequestInfoReplyComment: >\n  👋 We would appreciate"
  },
  {
    "path": ".github/no-response.yml",
    "chars": 574,
    "preview": "# ProBot No Response (https://probot.github.io/apps/no-response/)\n\n# Number of days of inactivity before an Issue is clo"
  },
  {
    "path": ".github/workflows/ci.yml",
    "chars": 848,
    "preview": "name: ci\non:\n  push:\n    branches:\n      - master\n    tags-ignore:\n      - '*'\n  pull_request:\n    branches:\n      - mas"
  },
  {
    "path": ".github/workflows/codeql-analysis.yml",
    "chars": 1729,
    "preview": "name: \"CodeQL\"\n\non:\n  push:\n    branches: [ master ]\n  pull_request:\n    # The branches below must be a subset of the br"
  },
  {
    "path": ".github/workflows/lock.yml",
    "chars": 258,
    "preview": "name: 'Lock Threads'\n\non:\n  schedule:\n    - cron: '0 13 * * *'\n  workflow_dispatch:\n\npermissions:\n  issues: write\n  pull"
  },
  {
    "path": ".github/workflows/release.yml",
    "chars": 839,
    "preview": "name: Release\n\non:\n  push:\n    branches:\n      - master\n\njobs:\n  release:\n    name: Release\n    runs-on: ubuntu-latest\n "
  },
  {
    "path": ".github/workflows/stale.yml",
    "chars": 767,
    "preview": "name: Mark stale issues and pull requests\n\non:\n  schedule:\n  - cron: '0 12 * * *'\n\njobs:\n  stale:\n    runs-on: ubuntu-la"
  },
  {
    "path": ".gitignore",
    "chars": 79,
    "preview": "node_modules/\npackage-lock.json\nwebtorrent.debug.js\nsw.debug.js\npnpm-lock.yaml\n"
  },
  {
    "path": ".npmignore",
    "chars": 59,
    "preview": ".github/\ndocs/\nscripts/\ntest/\n\n.airtap.yml\nCONTRIBUTING.md\n"
  },
  {
    "path": "AUTHORS.md",
    "chars": 9161,
    "preview": "# Authors\n\n#### Ordered by first contribution.\n\n- Feross Aboukhadijeh (feross@feross.org)\n- John Hiesey (jhiesey@cs.stan"
  },
  {
    "path": "CHANGELOG.md",
    "chars": 89458,
    "preview": "## [2.8.5](https://github.com/webtorrent/webtorrent/compare/v2.8.4...v2.8.5) (2025-11-30)\n\n\n### Bug Fixes\n\n* **deps:** u"
  },
  {
    "path": "LICENSE",
    "chars": 1101,
    "preview": "The MIT License (MIT)\n\nCopyright (c) Feross Aboukhadijeh and WebTorrent, LLC\n\nPermission is hereby granted, free of char"
  },
  {
    "path": "README.md",
    "chars": 19198,
    "preview": "<h1 align=\"center\">\n  <br>\n  <a href=\"https://webtorrent.io\"><img src=\"https://webtorrent.io/img/WebTorrent.png\" alt=\"We"
  },
  {
    "path": "dist/webtorrent.chromeapp.js",
    "chars": 1044160,
    "preview": "var t={20:(t,e,r)=>{var i=r(2861).Buffer,n=r(7108),s=r(96),o=r(6698),a=r(5359),h=r(4847),u=r(2951);function f(t){s.Writa"
  },
  {
    "path": "docs/api.md",
    "chars": 35096,
    "preview": "# WebTorrent Documentation\n\nWebTorrent is a streaming torrent client for **Node.js** and the **web**. WebTorrent\nprovide"
  },
  {
    "path": "docs/bep_support.md",
    "chars": 3101,
    "preview": "# BEP Support\n\nThese are the [BitTorrent Extension Protocols (BEP)](https://www.bittorrent.org/beps/bep_0001.html) suppo"
  },
  {
    "path": "docs/faq.md",
    "chars": 32714,
    "preview": "# Frequently Asked Questions\n\n## What is WebTorrent?\n\n**WebTorrent** is the first torrent client that works in the **bro"
  },
  {
    "path": "docs/free-torrents.md",
    "chars": 3287,
    "preview": "# Free Torrents\n\nThis is a list of public domain and Creative Commons torrents, useful for testing\npurposes.\n\n- Big Buck"
  },
  {
    "path": "docs/get-started.md",
    "chars": 13339,
    "preview": "# Get Started with WebTorrent\n\n**WebTorrent** is the first torrent client that works in the **browser**. It's easy\nto ge"
  },
  {
    "path": "docs/tutorials.md",
    "chars": 4330,
    "preview": "# WebTorrent Tutorials\n\n## Integrate WebTorrent with Video Players\n\nWebTorrent can be used to stream videos. WebTorrent "
  },
  {
    "path": "index.js",
    "chars": 17706,
    "preview": "/*! webtorrent. MIT License. WebTorrent LLC <https://webtorrent.io/opensource> */\nimport EventEmitter from 'events'\nimpo"
  },
  {
    "path": "lib/conn-pool.js",
    "chars": 5498,
    "preview": "import net from 'net' // browser exclude\nimport debugFactory from 'debug'\nimport queueMicrotask from 'queue-microtask'\n\n"
  },
  {
    "path": "lib/file-iterator.js",
    "chars": 3154,
    "preview": "import debugFactory from 'debug'\nimport EventEmitter from 'events'\n\nconst debug = debugFactory('webtorrent:file-iterator"
  },
  {
    "path": "lib/file.js",
    "chars": 5454,
    "preview": "import EventEmitter from 'events'\nimport { Readable } from 'streamx'\nimport { chunkStoreRead } from 'chunk-store-iterato"
  },
  {
    "path": "lib/peer.js",
    "chars": 10805,
    "preview": "import EventEmitter from 'events'\nimport { Transform, pipeline } from 'streamx'\nimport arrayRemove from 'unordered-array"
  },
  {
    "path": "lib/rarity-map.js",
    "chars": 2760,
    "preview": "/**\n * Mapping of torrent pieces to their respective availability in the torrent swarm. Used\n * by the torrent manager f"
  },
  {
    "path": "lib/selections.js",
    "chars": 6654,
    "preview": "/**\n * @typedef {Object} MinimalSelectionItem\n * @property {number} from\n * @property {number} to\n */\n\n/** A selection o"
  },
  {
    "path": "lib/server.js",
    "chars": 12789,
    "preview": "import http from 'http'\nimport escapeHtml from 'escape-html'\nimport pump from 'pump'\nimport rangeParser from 'range-pars"
  },
  {
    "path": "lib/torrent.js",
    "chars": 68411,
    "preview": "import EventEmitter from 'events'\nimport fs from 'fs'\nimport net from 'net' // browser exclude\nimport os from 'os' // br"
  },
  {
    "path": "lib/utp.cjs",
    "chars": 416,
    "preview": "// this file needs to conditionally import a module, ESM doesn't support this synchronously\n// we could avoid .cjs by us"
  },
  {
    "path": "lib/webconn.js",
    "chars": 4773,
    "preview": "import BitField from 'bitfield'\nimport debugFactory from 'debug'\nimport fetch from 'cross-fetch-ponyfill'\nimport ltDontH"
  },
  {
    "path": "lib/worker-server.js",
    "chars": 2459,
    "preview": "const portTimeoutDuration = 5000\nlet cancellable = false\n\nconst listener = event => {\n  const { url } = event.request\n  "
  },
  {
    "path": "lib/worker.js",
    "chars": 295,
    "preview": "import fileResponse from './worker-server.js'\n\nself.addEventListener('install', () => {\n  self.skipWaiting()\n})\n\nself.ad"
  },
  {
    "path": "package.json",
    "chars": 5486,
    "preview": "{\n  \"name\": \"webtorrent\",\n  \"description\": \"Streaming torrent client\",\n  \"version\": \"2.8.5\",\n  \"author\": {\n    \"name\": \""
  },
  {
    "path": "polyfills/inflate-sync-web.js",
    "chars": 105,
    "preview": "import { inflate } from 'pako'\n\nexport const inflateSync = (buffer) => inflate(buffer, { to: 'string' })\n"
  },
  {
    "path": "polyfills/process-fast.js",
    "chars": 1061,
    "preview": "/*!\n * Fast node `require('process')` for modern browsers\n *\n * @author   Mathias Rasmussen <mathiasvr@gmail.com>\n * @li"
  },
  {
    "path": "scripts/browser-serve.js",
    "chars": 235,
    "preview": "import serve from 'serve-static'\nimport finalhandler from 'finalhandler'\nimport { createServer } from 'http'\n\ncreateServ"
  },
  {
    "path": "scripts/browser.webpack.js",
    "chars": 938,
    "preview": "import webpack from 'webpack'\nimport TerserPlugin from 'terser-webpack-plugin'\nimport info from '../package.json' assert"
  },
  {
    "path": "scripts/chromeapp.webpack.js",
    "chars": 1193,
    "preview": "import webpack from 'webpack'\nimport TerserPlugin from 'terser-webpack-plugin'\nimport info from '../package.json' assert"
  },
  {
    "path": "scripts/update-authors.sh",
    "chars": 610,
    "preview": "#!/bin/sh\n# Update AUTHORS.md based on git history.\n\ngit log --reverse --format='%aN (%aE)' | perl -we '\nBEGIN {\n  %seen"
  },
  {
    "path": "scripts/worker.webpack.js",
    "chars": 200,
    "preview": "/** @type {import('webpack').Configuration} */\nexport default {\n  entry: './lib/worker.js',\n  devtool: 'source-map',\n  o"
  },
  {
    "path": "test/bitfield.js",
    "chars": 4678,
    "preview": "import fixtures from 'webtorrent-fixtures'\nimport test from 'tape'\nimport WebTorrent from '../index.js'\n\ntest('preloaded"
  },
  {
    "path": "test/browser/basic.js",
    "chars": 435,
    "preview": "import test from 'tape'\nimport WebTorrent from '../../index.js'\n\ntest('WebTorrent.WEBRTC_SUPPORT', t => {\n  t.plan(2)\n\n "
  },
  {
    "path": "test/browser/server.js",
    "chars": 6292,
    "preview": "import test from 'tape'\nimport WebTorrent from '../../index.js'\nimport fixtures from 'webtorrent-fixtures'\nimport get fr"
  },
  {
    "path": "test/client-add-duplicate-trackers.js",
    "chars": 3434,
    "preview": "import fixtures from 'webtorrent-fixtures'\nimport test from 'tape'\nimport WebTorrent from '../index.js'\n\ntest('client.ad"
  },
  {
    "path": "test/client-add.js",
    "chars": 7820,
    "preview": "import fixtures from 'webtorrent-fixtures'\nimport test from 'tape'\nimport WebTorrent from '../index.js'\n\ntest('client.ad"
  },
  {
    "path": "test/client-destroy.js",
    "chars": 1307,
    "preview": "import fixtures from 'webtorrent-fixtures'\nimport test from 'tape'\nimport WebTorrent from '../index.js'\n\ntest('after cli"
  },
  {
    "path": "test/client-remove.js",
    "chars": 782,
    "preview": "import fixtures from 'webtorrent-fixtures'\nimport test from 'tape'\nimport WebTorrent from '../index.js'\n\ntest('client.re"
  },
  {
    "path": "test/client-seed.js",
    "chars": 2982,
    "preview": "import fixtures from 'webtorrent-fixtures'\nimport test from 'tape'\nimport WebTorrent from '../index.js'\n\ntest('client.se"
  },
  {
    "path": "test/common.js",
    "chars": 393,
    "preview": "import os from 'os'\nimport fs from 'fs'\nimport path from 'path'\n\nconst getDownloadPath = (infix, infoHash) => {\n  let tm"
  },
  {
    "path": "test/duplicate.js",
    "chars": 5135,
    "preview": "import fixtures from 'webtorrent-fixtures'\nimport test from 'tape'\nimport WebTorrent from '../index.js'\n\ntest('client.se"
  },
  {
    "path": "test/file-buffer.js",
    "chars": 1260,
    "preview": "import fixtures from 'webtorrent-fixtures'\nimport test from 'tape'\nimport WebTorrent from '../index.js'\n\ntest('file buff"
  },
  {
    "path": "test/iterator.js",
    "chars": 2111,
    "preview": "import fixtures from 'webtorrent-fixtures'\nimport test from 'tape'\nimport FileIterator from '../lib/file-iterator.js'\nim"
  },
  {
    "path": "test/node/basic.js",
    "chars": 6773,
    "preview": "import fs from 'fs'\nimport path from 'path'\nimport http from 'http'\nimport fixtures from 'webtorrent-fixtures'\nimport te"
  },
  {
    "path": "test/node/blocklist-dht.js",
    "chars": 2862,
    "preview": "import { Server as DHT } from 'bittorrent-dht'\nimport fixtures from 'webtorrent-fixtures'\nimport series from 'run-series"
  },
  {
    "path": "test/node/blocklist-tracker.js",
    "chars": 2439,
    "preview": "import fixtures from 'webtorrent-fixtures'\nimport series from 'run-series'\nimport test from 'tape'\nimport { Server as Tr"
  },
  {
    "path": "test/node/blocklist.js",
    "chars": 7607,
    "preview": "import fs from 'fs'\nimport http from 'http'\nimport zlib from 'zlib'\nimport fixtures from 'webtorrent-fixtures'\nimport te"
  },
  {
    "path": "test/node/client-deselect.js",
    "chars": 5397,
    "preview": "import fixtures from 'webtorrent-fixtures'\nimport MemoryChunkStore from 'memory-chunk-store'\nimport test from 'tape'\nimp"
  },
  {
    "path": "test/node/conn-pool.js",
    "chars": 6873,
    "preview": "import test from 'tape'\nimport fixtures from 'webtorrent-fixtures'\nimport MemoryChunkStore from 'memory-chunk-store'\nimp"
  },
  {
    "path": "test/node/download-dht-magnet.js",
    "chars": 3132,
    "preview": "import fs from 'fs'\nimport { Server as DHT } from 'bittorrent-dht'\nimport fixtures from 'webtorrent-fixtures'\nimport Mem"
  },
  {
    "path": "test/node/download-dht-torrent.js",
    "chars": 3363,
    "preview": "import fs from 'fs'\nimport { Server as DHT } from 'bittorrent-dht'\nimport fixtures from 'webtorrent-fixtures'\nimport Mem"
  },
  {
    "path": "test/node/download-from-ip.js",
    "chars": 3606,
    "preview": "import fs from 'fs'\nimport fixtures from 'webtorrent-fixtures'\nimport MemoryChunkStore from 'memory-chunk-store'\nimport "
  },
  {
    "path": "test/node/download-lsd-magnet.js",
    "chars": 952,
    "preview": "import fixtures from 'webtorrent-fixtures'\nimport MemoryChunkStore from 'memory-chunk-store'\nimport test from 'tape'\nimp"
  },
  {
    "path": "test/node/download-lsd-torrent.js",
    "chars": 1004,
    "preview": "import fixtures from 'webtorrent-fixtures'\nimport MemoryChunkStore from 'memory-chunk-store'\nimport test from 'tape'\nimp"
  },
  {
    "path": "test/node/download-metadata.js",
    "chars": 4410,
    "preview": "import http from 'http'\nimport fixtures from 'webtorrent-fixtures'\nimport MemoryChunkStore from 'memory-chunk-store'\nimp"
  },
  {
    "path": "test/node/download-private-dht.js",
    "chars": 4730,
    "preview": "import { Server as DHT } from 'bittorrent-dht'\nimport fixtures from 'webtorrent-fixtures'\nimport MemoryChunkStore from '"
  },
  {
    "path": "test/node/download-tracker-magnet.js",
    "chars": 3793,
    "preview": "import fs from 'fs'\nimport fixtures from 'webtorrent-fixtures'\nimport MemoryChunkStore from 'memory-chunk-store'\nimport "
  },
  {
    "path": "test/node/download-tracker-torrent.js",
    "chars": 3307,
    "preview": "import fs from 'fs'\nimport fixtures from 'webtorrent-fixtures'\nimport MemoryChunkStore from 'memory-chunk-store'\nimport "
  },
  {
    "path": "test/node/download-webseed-magnet.js",
    "chars": 3324,
    "preview": "import http from 'http'\nimport path from 'path'\nimport finalhandler from 'finalhandler'\nimport fixtures from 'webtorrent"
  },
  {
    "path": "test/node/download-webseed-torrent.js",
    "chars": 3698,
    "preview": "import http from 'http'\nimport path from 'path'\nimport finalhandler from 'finalhandler'\nimport fixtures from 'webtorrent"
  },
  {
    "path": "test/node/extensions.js",
    "chars": 1626,
    "preview": "import fixtures from 'webtorrent-fixtures'\nimport test from 'tape'\nimport WebTorrent from '../../index.js'\n\ntest('extens"
  },
  {
    "path": "test/node/limit-download-upload.js",
    "chars": 2645,
    "preview": "import fixtures from 'webtorrent-fixtures'\nimport test from 'tape'\nimport MemoryChunkStore from 'memory-chunk-store'\nimp"
  },
  {
    "path": "test/node/limit-methods.js",
    "chars": 2881,
    "preview": "import fixtures from 'webtorrent-fixtures'\nimport test from 'tape'\nimport MemoryChunkStore from 'memory-chunk-store'\nimp"
  },
  {
    "path": "test/node/metadata.js",
    "chars": 1725,
    "preview": "import fixtures from 'webtorrent-fixtures'\nimport test from 'tape'\nimport WebTorrent from '../../index.js'\n\ntest('ut_met"
  },
  {
    "path": "test/node/seed-stream.js",
    "chars": 1931,
    "preview": "import { Readable } from 'stream'\nimport series from 'run-series'\nimport test from 'tape'\nimport { Server as Tracker } f"
  },
  {
    "path": "test/node/seed-while-download.js",
    "chars": 3886,
    "preview": "import fs from 'fs'\nimport { Server as DHT } from 'bittorrent-dht'\nimport fixtures from 'webtorrent-fixtures'\nimport Mem"
  },
  {
    "path": "test/node/server.js",
    "chars": 2095,
    "preview": "import fs from 'fs'\nimport fixtures from 'webtorrent-fixtures'\nimport get from 'simple-get'\nimport test from 'tape'\nimpo"
  },
  {
    "path": "test/node/swarm-basic.js",
    "chars": 1881,
    "preview": "// var randombytes = require('randombytes')\n// var Swarm = require('../../lib/swarm')\n// var test = require('tape')\n\n// "
  },
  {
    "path": "test/node/swarm-reconnect.js",
    "chars": 1938,
    "preview": "// var randombytes = require('randombytes')\n// var Swarm = require('../../lib/swarm')\n// var test = require('tape')\n\n// "
  },
  {
    "path": "test/node/swarm-timeout.js",
    "chars": 1686,
    "preview": "// var randombytes = require('randombytes')\n// var Swarm = require('../../lib/swarm')\n// var test = require('tape')\n\n// "
  },
  {
    "path": "test/node/torrent-events.js",
    "chars": 3669,
    "preview": "import fixtures from 'webtorrent-fixtures'\nimport test from 'tape'\nimport MemoryChunkStore from 'memory-chunk-store'\nimp"
  },
  {
    "path": "test/rarity-map.js",
    "chars": 3146,
    "preview": "import fixtures from 'webtorrent-fixtures'\nimport randombytes from 'randombytes'\nimport test from 'tape'\nimport Wire fro"
  },
  {
    "path": "test/selections.js",
    "chars": 4811,
    "preview": "import { Selections, isCoveringExisting, isInsideExisting, isLowerIntersecting, isUpperIntersecting } from '../lib/selec"
  },
  {
    "path": "test/swarm.js",
    "chars": 2548,
    "preview": "// var randombytes from 'randombytes')\n// var Swarm from '../lib/swarm')\n// var test from 'tape')\n\n// var infoHash = 'd2"
  },
  {
    "path": "test/torrent-destroy.js",
    "chars": 767,
    "preview": "import fixtures from 'webtorrent-fixtures'\nimport test from 'tape'\nimport WebTorrent from '../index.js'\n\ntest('torrent.d"
  },
  {
    "path": "version.cjs",
    "chars": 139,
    "preview": "// Exports package.json to work around \"with\" and \"assert\" for backwards compatability.\nmodule.exports = require('./pack"
  }
]

About this extraction

This page contains the full source code of the webtorrent/webtorrent GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 88 files (1.5 MB), approximately 523.0k tokens, and a symbol index with 1710 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!