diff --git a/.eslintignore b/.eslintignore index af07e771a10..f2be91a8c04 100644 --- a/.eslintignore +++ b/.eslintignore @@ -7,8 +7,9 @@ app/assets/landingpage/* app/assets/onepager/js/confetti.js +app/assets/v2/js/passport/* app/assets/v2/js/dataviz/* app/assets/v2/js/ethereumjs-accounts.js app/assets/onepager/js/tx.js app/assets/onepager/js/bignumber.js -app/assets/v2/js/data-chains.js \ No newline at end of file +app/assets/v2/js/data-chains.js diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 92ddae5a331..a660342d167 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -7,15 +7,8 @@ assignees: '' --- - +**Overview** +Details, details, details **Steps To Reproduce** Steps to reproduce the behavior: diff --git a/.github/workflows/ci-prod.yml b/.github/workflows/ci-prod.yml new file mode 100644 index 00000000000..b98d0cd76d2 --- /dev/null +++ b/.github/workflows/ci-prod.yml @@ -0,0 +1,287 @@ +name: Build & Deploy App to Production +on: + workflow_dispatch: + inputs: + # commit hash (for frontend deploy to fleek) + commit: + description: "Branch/Commit ref" + default: "origin/master" + type: string + +jobs: + build-and-test: + name: Build and Test + # environment: production + + # run only when code is compiling and tests are passing + runs-on: ubuntu-latest + + outputs: + dockerTag: ${{ steps.compute.outputs.docker_tag }} + + services: + # Label used to access the service container + postgres: + # Docker Hub image + image: postgres:11.5 + # Provide the password for postgres + env: + POSTGRES_DB: testdb + # Set health checks to wait until postgres has started + options: >- + --health-cmd pg_isready + --health-interval 10s + --health-timeout 5s + --health-retries 5 + ports: + # Maps tcp port 5432 on service container to the host + - 5432:5432 + + redis: + image: redis + # Set health checks to wait until redis has started + options: >- + --health-cmd "redis-cli ping" + --health-interval 10s + --health-timeout 5s + --health-retries 5 + ports: + - 6379:6379 + + env: + DJANGO_SETTINGS_MODULE: app.settings + SUPRESS_DEBUG_TOOLBAR: 1 + GITCOIN_API_USER: ${{ secrets.GITCOIN_API_USER }} + GITHUB_API_TOKEN: ${{ secrets.GITCOIN_API_TOKEN }} + POLYGONSCAN_API_KEY: ${{ secrets.POLYGONSCAN_API_KEY }} + + # steps to perform in job + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Use Node.js 14 + uses: actions/setup-node@v2 + with: + node-version: 14.20.1 + cache: "yarn" + + - name: Use Python 3.7 + uses: "actions/setup-python@v2" + with: + python-version: 3.7 + cache: "pip" + + - name: Setup Env + run: | + echo "PYTHONPATH=/home/runner/work/web/web/app" >> $GITHUB_ENV + cp app/app/ci.env app/app/.env + pip install pip==20.0.2 setuptools wheel --upgrade + + - name: Fetch and Install GeoIP database files + run: | + sudo apt-get update && sudo apt-get install -y libmaxminddb-dev libsodium-dev libsecp256k1-dev + cp dist/*.gz ./ + gunzip GeoLite2-City.mmdb.tar.gz && gunzip GeoLite2-Country.mmdb.tar.gz + tar -xvf GeoLite2-City.mmdb.tar && tar -xvf GeoLite2-Country.mmdb.tar + sudo mkdir -p /opt/GeoIP/ + sudo mv GeoLite2-City_20200128/*.mmdb /opt/GeoIP/ + sudo mv GeoLite2-Country_20200128/*.mmdb /opt/GeoIP/ + + - name: Install libvips, Node, and Python dependencies + run: | + sudo apt-get install -y libvips libvips-dev + node --version + yarn install + pip install -r requirements/test.txt + yarn run eslint + yarn run stylelint + (cd app; python ./manage.py collectstatic --noinput --disable-collectfast) + + # - name: Run management commands + # run: | + # python app/manage.py migrate + # python app/manage.py fetch_gas_prices + + # - name: Run Python and UI tests + # run: | + # pytest -p no:ethereum -p no:warnings + # bin/ci/cypress-run + + # - name: Generate Markdown documentation and static docs page + # run: pydocmd build + + # - name: Deploy to Github Pages 🚀 + # uses: peaceiris/actions-gh-pages@v3 + # if: github.ref == 'refs/heads/master' + # with: + # github_token: ${{ secrets.GITHUB_TOKEN }} + # publish_dir: _build/site + # cname: docs.gitcoin.coind + + - name: Compute some values + id: compute + run: | + echo "::set-output name=docker_tag::gitcoin/web:${GITHUB_SHA: -10}" + + - name: Login to Docker Hub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Set up Docker Buildx + id: buildx + uses: docker/setup-buildx-action@v1 + + - name: Deploy to Docker Hub 🚀 + uses: docker/build-push-action@v2 + with: + context: ./ + file: ./Dockerfile-prod + builder: ${{ steps.buildx.outputs.name }} + push: true + tags: | + ${{ steps.compute.outputs.docker_tag }} + gitcoin/web:production-gha + cache-from: type=registry,ref=${{ secrets.DOCKER_USERNAME }}/web:buildcache-production + cache-to: type=registry,ref=${{ secrets.DOCKER_USERNAME }}/web:buildcache-production,mode=max + + - run: | + npm install + pulumi stack select -c gitcoin/production/dev + pulumi config -s gitcoin/production/dev set aws:region us-west-2 --non-interactive + working-directory: infra/production + env: + PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }} + + # Run pulumi actions + # - uses: pulumi/actions@v3 + # id: pulumi + # with: + # command: preview + # stack-name: gitcoin/production/dev + # upsert: false + # work-dir: infra/production + # env: + # PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }} + # PULUMI_CONFIG_PASSPHRASE: ${{ secrets.PULUMI_CONFIG_PASSPHRASE }} + # AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} + # AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + # AWS_REGION: ${{ secrets.AWS_REGION }} + # DB_NAME: ${{ secrets.DB_NAME }} + # DB_PASSWORD: ${{ secrets.DB_PASSWORD }} + # DB_USER: ${{ secrets.DB_USER }} + # DOCKER_GTC_WEB_IMAGE: ${{ needs.build-and-test.outputs.dockerTag }} + # DATADOG_KEY: ${{ secrets.DATADOG_KEY }} + # ROUTE_53_ZONE: ${{ secrets.ROUTE_53_ZONE }} + # DOMAIN: ${{ secrets.DOMAIN }} + # SENTRY_DSN: ${{ secrets.SENTRY_DSN }} + # GITHUB_CLIENT_ID: ${{ secrets.GTC_GITHUB_CLIENT_ID }} + # GITHUB_CLIENT_SECRET: ${{ secrets.GTC_GITHUB_CLIENT_SECRET }} + # TEMP_DATABASE: ${{ secrets.TEMP_DATABASE }} + # DATABASE_URL: ${{ secrets.DATABASE_URL }} + # READ_REPLICA_1_DATABASE_URL: ${{secrets.READ_REPLICA_1_DATABASE_URL}} + # READ_REPLICA_2_DATABASE_URL: ${{secrets.READ_REPLICA_2_DATABASE_URL}} + # READ_REPLICA_3_DATABASE_URL: ${{secrets.READ_REPLICA_3_DATABASE_URL}} + # READ_REPLICA_4_DATABASE_URL: ${{secrets.READ_REPLICA_4_DATABASE_URL}} + # GITHUB_API_TOKEN: ${{ secrets.GTC_GITHUB_API_TOKEN }} + # GITHUB_API_USER: ${{ secrets.GTC_GITHUB_API_USER }} + # GITHUB_APP_NAME: ${{ secrets.GTC_GITHUB_APP_NAME }} + + deploy: + name: Deploy + needs: build-and-test + environment: production + runs-on: ubuntu-latest + + steps: + + - name: Checkout code + uses: actions/checkout@v2 + + - name: Use Node.js + uses: actions/setup-node@v2 + with: + # node-version: ${{ matrix.node-version }} + cache: "npm" + cache-dependency-path: infra/production/package-lock.json + + # Install pulumi dependencies + # Select the new pulumi stack + - run: | + npm install + pulumi stack select -c gitcoin/production/dev + pulumi config -s gitcoin/production/dev set aws:region us-west-2 --non-interactive + working-directory: infra/production + env: + PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }} + + # Run pulumi actions + - uses: pulumi/actions@v3 + id: pulumi + with: + command: up + stack-name: gitcoin/production/dev + upsert: false + work-dir: infra/production + env: + PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }} + PULUMI_CONFIG_PASSPHRASE: ${{ secrets.PULUMI_CONFIG_PASSPHRASE }} + AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + AWS_REGION: ${{ secrets.AWS_REGION }} + DB_NAME: ${{ secrets.DB_NAME }} + DB_PASSWORD: ${{ secrets.DB_PASSWORD }} + DB_USER: ${{ secrets.DB_USER }} + DOCKER_GTC_WEB_IMAGE: ${{ needs.build-and-test.outputs.dockerTag }} + DATADOG_KEY: ${{ secrets.DATADOG_KEY }} + ROUTE_53_ZONE: ${{ secrets.ROUTE_53_ZONE }} + DOMAIN: ${{ secrets.DOMAIN }} + SENTRY_DSN: ${{ secrets.SENTRY_DSN }} + GITHUB_CLIENT_ID: ${{ secrets.GTC_GITHUB_CLIENT_ID }} + GITHUB_CLIENT_SECRET: ${{ secrets.GTC_GITHUB_CLIENT_SECRET }} + TEMP_DATABASE: ${{ secrets.TEMP_DATABASE }} + DATABASE_URL: ${{ secrets.DATABASE_URL }} + READ_REPLICA_1_DATABASE_URL: ${{secrets.READ_REPLICA_1_DATABASE_URL}} + READ_REPLICA_2_DATABASE_URL: ${{secrets.READ_REPLICA_2_DATABASE_URL}} + READ_REPLICA_3_DATABASE_URL: ${{secrets.READ_REPLICA_3_DATABASE_URL}} + READ_REPLICA_4_DATABASE_URL: ${{secrets.READ_REPLICA_4_DATABASE_URL}} + GITHUB_API_TOKEN: ${{ secrets.GTC_GITHUB_API_TOKEN }} + GITHUB_API_USER: ${{ secrets.GTC_GITHUB_API_USER }} + GITHUB_APP_NAME: ${{ secrets.GTC_GITHUB_APP_NAME }} + OLD_REDIS_URL: ${{ secrets.OLD_REDIS_URL }} + SECRET_KEY: ${{ secrets.SECRET_KEY }} + ETHERSCAN_API_KEY: ${{ secrets.ETHERSCAN_API_KEY }} + GTC_DIST_KEY: ${{ secrets.GTC_DIST_KEY }} + GTC_DIST_API_URL: ${{ secrets.GTC_DIST_API_URL }} + BRIGHTID_PRIVATE_KEY: ${{ secrets.BRIGHTID_PRIVATE_KEY }} + ALCHEMY_KEY: ${{ secrets.ALCHEMY_KEY }} + AWS_STAR_GITCOIN_CERT: ${{ secrets.AWS_STAR_GITCOIN_CERT }} + SENDGRID_API_KEY: ${{ secrets.SENDGRID_API_KEY }} + + # The static files are already bundled and located in the folder /code/app/static in the container + - name: Copy static files to bucket + run: | + mkdir static_files_to_deploy + mkdir docker_bin + + cat <> docker_bin/static_files.sh + #!/bin/bash + cp -Rf /code/app/static/* /static_files_to_deploy/ + EOT + + docker run -v $(pwd)/static_files_to_deploy:/static_files_to_deploy -v $(pwd)/docker_bin:/code/app/bin -e DATABASE_URL=${{ steps.pulumi.outputs.rdsConnectionUrl }} ${{ needs.build-and-test.outputs.dockerTag }} sh /code/app/bin/static_files.sh + + echo "Syncing to bucket: ${{ steps.pulumi.outputs.bucketName }}" + echo "Source folder: $(pwd)/static_files_to_deploy" + + aws s3 sync $(pwd)/static_files_to_deploy s3://${{ steps.pulumi.outputs.bucketName }}/static --acl public-read --delete + env: + # We need AWS_EC2_METADATA_DISABLED, because: https://github.com/actions/checkout/issues/440 + AWS_EC2_METADATA_DISABLED: true + AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + BUNDLE_USE_CHECKSUM: 'false' + + diff --git a/.github/workflows/ci-review-cleanup.yml b/.github/workflows/ci-review-cleanup.yml new file mode 100644 index 00000000000..5313debde8f --- /dev/null +++ b/.github/workflows/ci-review-cleanup.yml @@ -0,0 +1,56 @@ + +name: Cleanup review environment + +# only trigger on pull request closed events +on: + pull_request: + types: [ closed ] + branches: [ master, stable ] + +jobs: + cleanup: + # https://shipit.dev/posts/trigger-github-actions-on-pr-close.html + # We want to delete the stack regardless if it has been merged or not + name: Delete review stack + environment: review + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Use Node.js + uses: actions/setup-node@v2 + with: + cache: "npm" + cache-dependency-path: infra/review-pr/package-lock.json + + # Install pulumi dependencies + # Select the new pulumi stack + - run: | + npm install + working-directory: infra/review-pr + + - name: Compute some values + id: compute + run: | + echo "::set-output name=pulumi_stack::gitcoin/review/review-${{ github.event.number }}" + echo "::set-output name=review_domain::review-${{ github.event.number }}.review.gitcoin.co" + + # Run pulumi actions + - name: Delete the pulumi stack + uses: pulumi/actions@v3 + id: pulumi + with: + command: destroy + stack-name: ${{ steps.compute.outputs.pulumi_stack }} + work-dir: infra/review-pr + env: + PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }} + PULUMI_CONFIG_PASSPHRASE: ${{ secrets.PULUMI_CONFIG_PASSPHRASE }} + AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + AWS_REGION: ${{ secrets.AWS_REGION }} + DB_NAME: ${{ secrets.DB_NAME }} + DB_PASSWORD: ${{ secrets.DB_PASSWORD }} + DB_USER: ${{ secrets.DB_USER }} diff --git a/.github/workflows/ci-review.yml b/.github/workflows/ci-review.yml new file mode 100644 index 00000000000..9132b7f91d0 --- /dev/null +++ b/.github/workflows/ci-review.yml @@ -0,0 +1,309 @@ +name: Setup review environment + +on: + # run it during pull request + pull_request: + branches: [ master, stable ] + +jobs: + build-and-test: + name: Build and Test + + # run only when code is compiling and tests are passing + runs-on: ubuntu-latest + + outputs: + dockerTag: ${{ steps.compute.outputs.docker_tag }} + + services: + # Label used to access the service container + postgres: + # Docker Hub image + image: postgres:11.5 + # Provide the password for postgres + env: + POSTGRES_DB: testdb + # Set health checks to wait until postgres has started + options: >- + --health-cmd pg_isready + --health-interval 10s + --health-timeout 5s + --health-retries 5 + ports: + # Maps tcp port 5432 on service container to the host + - 5432:5432 + + redis: + image: redis + # Set health checks to wait until redis has started + options: >- + --health-cmd "redis-cli ping" + --health-interval 10s + --health-timeout 5s + --health-retries 5 + ports: + - 6379:6379 + + env: + DJANGO_SETTINGS_MODULE: app.settings + SUPRESS_DEBUG_TOOLBAR: 1 + GITCOIN_API_USER: ${{ secrets.GITCOIN_API_USER }} + GITHUB_API_TOKEN: ${{ secrets.GITCOIN_API_TOKEN }} + POLYGONSCAN_API_KEY: ${{ secrets.POLYGONSCAN_API_KEY }} + + # steps to perform in job + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Use Node.js 14 + uses: actions/setup-node@v2 + with: + node-version: 14 + cache: "yarn" + + - name: Use Python 3.7 + uses: "actions/setup-python@v2" + with: + python-version: 3.7 + cache: "pip" + + - name: Setup Env + run: | + echo "PYTHONPATH=/home/runner/work/web/web/app" >> $GITHUB_ENV + cp app/app/ci.env app/app/.env + pip install pip==20.0.2 setuptools wheel --upgrade + + - name: Fetch and Install GeoIP database files + run: | + sudo apt-get update && sudo apt-get install -y libmaxminddb-dev libsodium-dev libsecp256k1-dev + cp dist/*.gz ./ + gunzip GeoLite2-City.mmdb.tar.gz && gunzip GeoLite2-Country.mmdb.tar.gz + tar -xvf GeoLite2-City.mmdb.tar && tar -xvf GeoLite2-Country.mmdb.tar + sudo mkdir -p /opt/GeoIP/ + sudo mv GeoLite2-City_20200128/*.mmdb /opt/GeoIP/ + sudo mv GeoLite2-Country_20200128/*.mmdb /opt/GeoIP/ + + - name: Install libvips, Node, and Python dependencies + run: | + sudo apt-get install -y libvips libvips-dev + node --version + yarn install + pip install -r requirements/test.txt + yarn run eslint + yarn run stylelint + (cd app; python ./manage.py collectstatic --noinput --disable-collectfast) + + - name: Run management commands + run: | + python app/manage.py migrate + python app/manage.py fetch_gas_prices + + - name: Run Python and UI tests + run: | + pytest -p no:ethereum -p no:warnings + bin/ci/cypress-run + + - name: Deploy to Github Pages 🚀 + uses: peaceiris/actions-gh-pages@v3 + if: github.ref == 'refs/heads/master' + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: _build/site + cname: docs.gitcoin.coind + + - name: Compute some values + id: compute + run: | + echo "::set-output name=docker_tag::gitcoin/web:${GITHUB_SHA: -10}" + + - name: Login to Docker Hub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Set up Docker Buildx + id: buildx + uses: docker/setup-buildx-action@v1 + + - name: Deploy to Docker Hub 🚀 + uses: docker/build-push-action@v2 + with: + context: ./ + file: ./Dockerfile + builder: ${{ steps.buildx.outputs.name }} + push: true + tags: ${{ steps.compute.outputs.docker_tag }} + cache-from: type=registry,ref=${{ secrets.DOCKER_USERNAME }}/web:buildcache + cache-to: type=registry,ref=${{ secrets.DOCKER_USERNAME }}/web:buildcache,mode=max + + - uses: actions/github-script@v6 + with: + script: | + console.log("Context", context) + github.rest.issues.createComment({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + body: `The new docker image for has been pushed to: \`${{ steps.compute.outputs.docker_tag }}\`` + }) + + deploy: + name: Deploy + needs: build-and-test + environment: review + runs-on: ubuntu-latest + + steps: + + - name: Checkout code + uses: actions/checkout@v2 + + - name: Compute some values + id: compute + run: | + echo "::set-output name=pulumi_stack::gitcoin/review/review-${{ github.event.number }}" + echo "::set-output name=review_domain::review-${{ github.event.number }}.review.gitcoin.co" + + ######################################################################### + # Provision the shared ressources for the review environment + ######################################################################### + - name: Use Node.js + uses: actions/setup-node@v2 + with: + cache: "npm" + cache-dependency-path: infra/review-env/package-lock.json + + # Install pulumi dependencies + # Select the new pulumi stack + - run: | + npm install + pulumi stack select -c gitcoin/review-env/review + pulumi config -s gitcoin/review-env/review set aws:region us-west-2 --non-interactive + working-directory: infra/review-env + env: + PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }} + + # Run pulumi actions + - uses: pulumi/actions@v3 + id: pulumi-env + name: Ensure the pulumi review environment shared ressources + with: + command: up + stack-name: gitcoin/review-env/review + upsert: true + work-dir: infra/review-env + env: + PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }} + PULUMI_CONFIG_PASSPHRASE: + AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + AWS_REGION: ${{ secrets.AWS_REGION }} + + + ######################################################################### + # Provision the PR specific ressources for the review environment + ######################################################################### + - name: Use Node.js + uses: actions/setup-node@v2 + with: + cache: "npm" + cache-dependency-path: infra/review-pr/package-lock.json + + # Install pulumi dependencies + # Select the new pulumi stack + - run: | + npm install + pulumi stack select -c ${{ steps.compute.outputs.pulumi_stack }} + pulumi config -s ${{ steps.compute.outputs.pulumi_stack }} set aws:region us-west-2 --non-interactive + working-directory: infra/review-pr + env: + PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }} + + # Run pulumi actions + - uses: pulumi/actions@v3 + id: pulumi + name: Create the environment specific for this PR + with: + command: up + stack-name: ${{ steps.compute.outputs.pulumi_stack }} + upsert: true + work-dir: infra/review-pr + env: + PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }} + PULUMI_CONFIG_PASSPHRASE: ${{ secrets.PULUMI_CONFIG_PASSPHRASE }} + AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + AWS_REGION: ${{ secrets.AWS_REGION }} + DB_NAME: ${{ secrets.DB_NAME }} + DB_PASSWORD: ${{ secrets.DB_PASSWORD }} + DB_USER: ${{ secrets.DB_USER }} + DOCKER_GTC_WEB_IMAGE: ${{ needs.build-and-test.outputs.dockerTag }} + GITHUB_API_USER: ${{ secrets.REVIEW_GITHUB_API_USER }} + GITHUB_API_TOKEN: ${{ secrets.REVIEW_GITHUB_API_TOKEN }} + GITHUB_APP_NAME: ${{ secrets.GTC_GITHUB_APP_NAME }} + GITHUB_CLIENT_ID: ${{ secrets.GTC_GITHUB_CLIENT_ID }} + GITHUB_CLIENT_SECRET: ${{ secrets.GTC_GITHUB_CLIENT_SECRET }} + + + # Pass in the outputs from the generic environment, we will deploy our ressources in the VPC + # and subnet that where created there + REVIEW_ENV_VPC_ID: ${{ steps.pulumi-env.outputs.vpcID }} + REVIEW_ENV_PRIVATE_SUBNET_1: ${{ steps.pulumi-env.outputs.vpcPrivateSubnetId1 }} + REVIEW_ENV_PRIVATE_SUBNET_2: ${{ steps.pulumi-env.outputs.vpcPrivateSubnetId2 }} + REVIEW_ENV_PUBLIC_SUBNET_1: ${{ steps.pulumi-env.outputs.vpcPublicSubnetId1 }} + REVIEW_ENV_PUBLIC_SUBNET_2: ${{ steps.pulumi-env.outputs.vpcPublicSubnetId2 }} + + REVIEW_ENV_ROUTE53_ZONE_ID: ${{ secrets.ROUTE53_ZONE_ID }} + REVIEW_ENV_DOMAIN: ${{ steps.compute.outputs.review_domain }} + REVIEW_ENV_NAME: ${{ github.event.number }} + + + - name: Start migration task + run: | + aws ecs run-task --launch-type FARGATE --task-definition ${{ steps.pulumi.outputs.taskDefinition }} --cluster ${{ steps.pulumi.outputs.clusterId }} --network-configuration "awsvpcConfiguration={subnets=[${{ steps.pulumi-env.outputs.vpcPrivateSubnetId1 }}],securityGroups=[${{ steps.pulumi.outputs.securityGroupForTaskDefinition }}],assignPublicIp=ENABLED}" + env: + # We need AWS_EC2_METADATA_DISABLED, because: https://github.com/actions/checkout/issues/440 + AWS_EC2_METADATA_DISABLED: true + AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + AWS_DEFAULT_REGION: us-west-2 + + - name: Copy static files to bucket + run: | + mkdir static_files_to_deploy + mkdir docker_bin + + cat <> docker_bin/static_files.sh + #!/bin/bash + python3.7 manage.py bundle + python3.7 manage.py collectstatic --disable-collectfast + EOT + + docker run -v $(pwd)/static_files_to_deploy:/code/app/static -v $(pwd)/docker_bin:/code/app/bin -e DATABASE_URL=${{ steps.pulumi.outputs.rdsConnectionUrl }} -e BUNDLE_USE_CHECKSUM=${BUNDLE_USE_CHECKSUM} ${{ needs.build-and-test.outputs.dockerTag }} sh /code/app/bin/static_files.sh + + echo "Syncing to bucket: ${{ steps.pulumi.outputs.bucketName }}" + echo "Source folder: $(pwd)/static_files_to_deploy" + + aws s3 sync $(pwd)/static_files_to_deploy s3://${{ steps.pulumi.outputs.bucketName }}/static --acl public-read --delete + env: + # We need AWS_EC2_METADATA_DISABLED, because: https://github.com/actions/checkout/issues/440 + AWS_EC2_METADATA_DISABLED: true + AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + BUNDLE_USE_CHECKSUM: 'false' + + - uses: actions/github-script@v6 + with: + script: | + github.rest.issues.createComment({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + body: `Test your commit here: \n\ + - [${{ steps.pulumi.outputs.frontendURL }}](${{ steps.pulumi.outputs.frontendURL }}) \n\ + - [https://${{ steps.compute.outputs.review_domain }}](https://${{ steps.compute.outputs.review_domain }}) \n\ + ` + }) + diff --git a/.github/workflows/ci-stage.yml b/.github/workflows/ci-stage.yml new file mode 100644 index 00000000000..0a7b69f66f9 --- /dev/null +++ b/.github/workflows/ci-stage.yml @@ -0,0 +1,234 @@ +name: Build & Deploy App to Staging +on: + workflow_dispatch: + inputs: + # commit hash (for frontend deploy to fleek) + commit: + description: "Branch/Commit ref" + default: "origin/master" + type: string + pulumi_deploy: + description: "Run the Pulumi Deployment" + default: false + type: boolean + +jobs: + build-and-test: + name: Build and Test + + # run only when code is compiling and tests are passing + runs-on: ubuntu-latest + + outputs: + dockerTag: ${{ steps.compute.outputs.docker_tag }} + + services: + # Label used to access the service container + postgres: + # Docker Hub image + image: postgres:11.5 + # Provide the password for postgres + env: + POSTGRES_DB: testdb + # Set health checks to wait until postgres has started + options: >- + --health-cmd pg_isready + --health-interval 10s + --health-timeout 5s + --health-retries 5 + ports: + # Maps tcp port 5432 on service container to the host + - 5432:5432 + + redis: + image: redis + # Set health checks to wait until redis has started + options: >- + --health-cmd "redis-cli ping" + --health-interval 10s + --health-timeout 5s + --health-retries 5 + ports: + - 6379:6379 + + env: + DJANGO_SETTINGS_MODULE: app.settings + SUPRESS_DEBUG_TOOLBAR: 1 + GITCOIN_API_USER: ${{ secrets.GITCOIN_API_USER }} + GITHUB_API_TOKEN: ${{ secrets.GITCOIN_API_TOKEN }} + POLYGONSCAN_API_KEY: ${{ secrets.POLYGONSCAN_API_KEY }} + + # steps to perform in job + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Reset to commit + run: | + git fetch + git reset --hard ${{ inputs.commit }} + + - name: Use Node.js 14 + uses: actions/setup-node@v2 + with: + node-version: 14.20.1 + cache: "yarn" + + - name: Use Python 3.7 + uses: "actions/setup-python@v2" + with: + python-version: 3.7 + cache: "pip" + + - name: Setup Env + run: | + echo "PYTHONPATH=/home/runner/work/web/web/app" >> $GITHUB_ENV + cp app/app/ci.env app/app/.env + pip install pip==20.0.2 setuptools wheel --upgrade + + - name: Fetch and Install GeoIP database files + run: | + sudo apt-get update && sudo apt-get install -y libmaxminddb-dev libsodium-dev libsecp256k1-dev + cp dist/*.gz ./ + gunzip GeoLite2-City.mmdb.tar.gz && gunzip GeoLite2-Country.mmdb.tar.gz + tar -xvf GeoLite2-City.mmdb.tar && tar -xvf GeoLite2-Country.mmdb.tar + sudo mkdir -p /opt/GeoIP/ + sudo mv GeoLite2-City_20200128/*.mmdb /opt/GeoIP/ + sudo mv GeoLite2-Country_20200128/*.mmdb /opt/GeoIP/ + + - name: Install libvips, Node, and Python dependencies + run: | + sudo apt-get install -y libvips libvips-dev + node --version + yarn install + pip install -r requirements/test.txt + yarn run eslint + yarn run stylelint + (cd app; python ./manage.py collectstatic --noinput --disable-collectfast) + + - name: Run management commands + run: | + python app/manage.py migrate + python app/manage.py fetch_gas_prices + + - name: Compute some values + id: compute + run: | + echo "::set-output name=docker_tag::gitcoin/web:${GITHUB_SHA: -10}" + + - name: Login to Docker Hub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Set up Docker Buildx + id: buildx + uses: docker/setup-buildx-action@v1 + + - name: Deploy to Docker Hub 🚀 + uses: docker/build-push-action@v2 + with: + context: ./ + file: ./Dockerfile-prod + builder: ${{ steps.buildx.outputs.name }} + push: true + tags: | + ${{ steps.compute.outputs.docker_tag }} + gitcoin/web:staging-gha + cache-from: type=registry,ref=${{ secrets.DOCKER_USERNAME }}/web:buildcache-staging + cache-to: type=registry,ref=${{ secrets.DOCKER_USERNAME }}/web:buildcache-staging,mode=max + + deploy: + name: Deploy + needs: build-and-test + environment: staging + runs-on: ubuntu-latest + env: + PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }} + PULUMI_CONFIG_PASSPHRASE: ${{ secrets.PULUMI_CONFIG_PASSPHRASE }} + AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + AWS_REGION: ${{ secrets.AWS_REGION }} + DB_NAME: ${{ secrets.DB_NAME }} + DB_PASSWORD: ${{ secrets.DB_PASSWORD }} + DB_USER: ${{ secrets.DB_USER }} + DOCKER_GTC_WEB_IMAGE: ${{ needs.build-and-test.outputs.dockerTag }} + DATADOG_KEY: ${{ secrets.DATADOG_KEY }} + ROUTE_53_ZONE: ${{ secrets.ROUTE53_ZONE_ID }} + DOMAIN: ${{ secrets.DOMAIN }} + SENTRY_DSN: ${{ secrets.SENTRY_DSN }} + GITHUB_CLIENT_ID: ${{ secrets.GTC_GITHUB_CLIENT_ID }} + GITHUB_CLIENT_SECRET: ${{ secrets.GTC_GITHUB_CLIENT_SECRET }} + TEMP_DATABASE: ${{ secrets.TEMP_DATABASE }} + ALCHEMY_KEY: ${{ secrets.ALCHEMY_KEY }} + SECRET_KEY: ${{ secrets.SECRET_KEY }} + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Reset to commit + run: | + git fetch + git reset --hard ${{ inputs.commit }} + + - name: Use Node.js + uses: actions/setup-node@v2 + with: + # node-version: ${{ matrix.node-version }} + cache: "npm" + cache-dependency-path: infra/staging/package-lock.json + + - name: Install Pulumi Dependencies + # Install pulumi dependencies + # Select the new pulumi stack + run: | + npm install + pulumi stack select -c gitcoin/staging/dev + pulumi config -s gitcoin/staging/dev set aws:region us-west-2 --non-interactive + working-directory: infra/staging + + - name: Run Pulumi Preview + uses: pulumi/actions@v3 + id: pulumi + with: + command: preview + stack-name: gitcoin/staging/dev + upsert: false + work-dir: infra/staging + + - name: Run Pulumi Up + uses: pulumi/actions@v3 + if: inputs.pulumi_deploy + with: + command: up + stack-name: gitcoin/staging/dev + upsert: false + work-dir: infra/staging + + # The static files are already bundled and located in the folder /code/app/static in the container + - name: Copy static files to bucket + run: | + mkdir static_files_to_deploy + mkdir docker_bin + cat <> docker_bin/static_files.sh + #!/bin/bash + cp -Rf /code/app/static/* /static_files_to_deploy/ + EOT + + docker run -v $(pwd)/static_files_to_deploy:/static_files_to_deploy -v $(pwd)/docker_bin:/code/app/bin -e DATABASE_URL=${{ steps.pulumi.outputs.rdsConnectionUrl }} ${{ needs.build-and-test.outputs.dockerTag }} sh /code/app/bin/static_files.sh + echo "Syncing to bucket: ${{ steps.pulumi.outputs.bucketName }}" + echo "Source folder: $(pwd)/static_files_to_deploy" + echo "aws cli version $(aws --version)" + echo " aws s3 sync $(pwd)/static_files_to_deploy s3://${{ steps.pulumi.outputs.bucketName }}/static --acl public-read --delete" + + aws s3 sync $(pwd)/static_files_to_deploy s3://${{ steps.pulumi.outputs.bucketName }}/static --acl public-read --delete + env: + # We need AWS_EC2_METADATA_DISABLED, because: https://github.com/actions/checkout/issues/440 + AWS_EC2_METADATA_DISABLED: true + AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + BUNDLE_USE_CHECKSUM: 'false' + + diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 03409276a6b..af0c4c25829 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,9 +4,6 @@ on: # run it on push to master and stable branches push: branches: [ master, stable ] - # run it during pull request to master and stable branches - pull_request: - branches: [ master, stable ] jobs: build-and-test: diff --git a/.stylelintrc b/.stylelintrc index 37f3a76395e..d023a0566a6 100644 --- a/.stylelintrc +++ b/.stylelintrc @@ -3,8 +3,10 @@ "rules": { "no-descending-specificity": null, "at-rule-no-unknown": [ - true, { + true, + { "ignoreAtRules": [ + "extend", "extends", "ignores", "mixin", @@ -36,7 +38,5 @@ "turn" ] }, - "plugins": [ - "stylelint-scss" - ], + "plugins": ["stylelint-scss"] } diff --git a/Dockerfile b/Dockerfile index 7981192e7cf..1a98874701a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,7 +5,7 @@ ENV PYTHONDONTWRITEBYTECODE 1 ENV DEBIAN_FRONTEND=noninteractive # Define packages to be installed -ARG PACKAGES="libpq-dev libxml2 libxslt1-dev libfreetype6 libjpeg-dev libmaxminddb-dev bash git tar gzip libmagic-dev build-essential python-dev libssl-dev python3-dev libsecp256k1-dev libsodium-dev python3-pip" +ARG PACKAGES="libpq-dev libxml2 libxslt1-dev libfreetype6 libjpeg-dev libmaxminddb-dev bash git tar gzip libmagic-dev build-essential python-dev libssl-dev python3.7-dev python3.7 libsecp256k1-dev libsodium-dev python3.7-distutils" ARG BUILD_DEPS="gcc g++ curl postgresql libxml2-dev libxslt-dev libfreetype6 libffi-dev libjpeg-dev autoconf automake libtool make dos2unix libvips libvips-dev" ARG CHROME_DEPS="fonts-liberation libasound2 libatk-bridge2.0-0 libatk1.0-0 libatspi2.0-0 libcairo2 libcups2 libcurl3-gnutls libdrm2 libexpat1 libgbm1 libglib2.0-0 libnspr4 libgtk-3-0 libpango-1.0-0 libx11-6 libxcb1 libxcomposite1 libxdamage1 libxext6 libxfixes3 libxkbcommon0 libxrandr2 libxshmfence1 xdg-utils" ARG CYPRESS_DEPS="libgtk2.0-0 libgbm-dev libnotify-dev libgconf-2-4 libnss3 libxss1 libxtst6 xauth xvfb" @@ -19,12 +19,16 @@ RUN apt-get install -y $PACKAGES RUN apt-get update --fix-missing RUN apt-get install -y $BUILD_DEPS --fix-missing + +RUN curl https://bootstrap.pypa.io/get-pip.py > /tmp/get-pip.py +RUN python3.7 /tmp/get-pip.py +RUN rm /tmp/get-pip.py + # Install google chrome for cypress testing WORKDIR /usr/src RUN apt-get update && apt-get install -y wget RUN wget "https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb" RUN apt-get install -y $CHROME_DEPS -RUN dpkg -i google-chrome-stable_current_amd64.deb # Install cypress dependencies RUN apt-get install -y $CYPRESS_DEPS @@ -51,7 +55,11 @@ RUN pip3 install --upgrade -r test.txt # Copy over docker-command (start-up script) COPY bin/docker-command.bash /bin/docker-command.bash +COPY bin/review-env-initial-data.bash /bin/review-env-initial-data.bash +COPY bin/celery/worker/run.sh /bin/celery/worker/run.sh + RUN dos2unix /bin/docker-command.bash +RUN dos2unix /bin/review-env-initial-data.bash # Copy over code directory COPY app/ /code/app/ @@ -62,7 +70,10 @@ RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources RUN apt-get update RUN apt-get install -y yarn RUN yarn global add n -RUN n stable +RUN n 14.20.1 + +COPY package.json /code/ +RUN cd /code && yarn install # Increase number of file watches (524288 is the max we can set this to) RUN echo fs.inotify.max_user_watches=524288 >> /etc/sysctl.conf @@ -70,7 +81,8 @@ RUN echo fs.inotify.max_user_watches=524288 >> /etc/sysctl.conf # Init EXPOSE 9222 ENTRYPOINT ["/usr/local/bin/dumb-init", "--"] -CMD ["bash", "/bin/docker-command.bash"] +WORKDIR /code/app +CMD ["gunicorn", "-w", "1", "-b", "0.0.0.0:80", "--timeout", "120", "app.wsgi:application", "--max-requests=200"] # Tag ARG BUILD_DATETIME diff --git a/Dockerfile-prod b/Dockerfile-prod new file mode 100644 index 00000000000..094e7ba2676 --- /dev/null +++ b/Dockerfile-prod @@ -0,0 +1,133 @@ +FROM ubuntu:18.04 as build + +ENV PYTHONUNBUFFERED 1 +ENV PYTHONDONTWRITEBYTECODE 1 +ENV DEBIAN_FRONTEND=noninteractive + +# Define packages to be installed +ARG PACKAGES="libpq-dev libxml2 libxslt1-dev libfreetype6 libjpeg-dev libmaxminddb-dev bash git tar gzip libmagic-dev build-essential python-dev libssl-dev python3.7-dev python3.7 libsecp256k1-dev libsodium-dev python3.7-distutils" +ARG BUILD_DEPS="gcc g++ curl postgresql libxml2-dev libxslt-dev libfreetype6 libffi-dev libjpeg-dev autoconf automake libtool make dos2unix libvips libvips-dev" + +# Install general dependencies. +RUN apt-get update +RUN apt-get install -y software-properties-common +RUN add-apt-repository universe +RUN apt-get update +RUN apt-get install -y $PACKAGES +RUN apt-get update --fix-missing +RUN apt-get install -y $BUILD_DEPS --fix-missing + +RUN curl https://bootstrap.pypa.io/get-pip.py > /tmp/get-pip.py +RUN python3.7 /tmp/get-pip.py + +# Move to /code dir and copy in working dir content +WORKDIR /code +COPY dist/* ./ + +# GeoIP2 Data Files +RUN mkdir -p /usr/share/GeoIP/ && \ + gunzip GeoLite2-City.mmdb.tar.gz && \ + gunzip GeoLite2-Country.mmdb.tar.gz && \ + tar -xvf GeoLite2-City.mmdb.tar && \ + tar -xvf GeoLite2-Country.mmdb.tar && \ + mv GeoLite2-City_20200128/*.mmdb /usr/share/GeoIP/ && \ + mv GeoLite2-Country_20200128/*.mmdb /usr/share/GeoIP/ + +# Upgrade package essentials. +RUN pip3 install --upgrade pip==20.0.2 setuptools wheel dumb-init pipenv + +# Install pip packages +COPY requirements/ /code/ +RUN pip3 install --upgrade -r test.txt + +# Copy over docker-command (start-up script) +COPY bin/docker-command.bash /bin/docker-command.bash +RUN dos2unix /bin/docker-command.bash + +# Copy over code directory +COPY app/ /code/app/ + +# Install yarn and set node version +RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - +RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list +RUN apt-get update +RUN apt-get install -y yarn +RUN yarn global add n +RUN n 14.20.1 + +COPY package.json /code/ +COPY webpack.config.js /code/ + + +RUN yarn install + +COPY app/app/ci.env /code/app/app/.env +WORKDIR /code/app +RUN BUNDLE_USE_CHECKSUM=false python3.7 manage.py bundle +WORKDIR /code +RUN yarn run build +WORKDIR /code/app +RUN python3.7 manage.py collectstatic --disable-collectfast --noinput + +################################################################################### +# Creating the final container +################################################################################### + +FROM ubuntu:18.04 + +ENV PYTHONUNBUFFERED 1 +ENV PYTHONDONTWRITEBYTECODE 1 +ENV DEBIAN_FRONTEND=noninteractive + +# Define packages to be installed +# ARG PACKAGES="libpq-dev libxml2 libxslt1-dev libfreetype6 libjpeg-dev libmaxminddb-dev bash git tar gzip libmagic-dev build-essential python-dev libssl-dev python3-dev libsecp256k1-dev libsodium-dev python3-pip" +ARG PACKAGES="git libvips python3.7-dev python3.7 libsecp256k1-dev libsodium-dev python3.7-distutils" +# ARG BUILD_DEPS="gcc g++ curl postgresql libxml2-dev libxslt-dev libfreetype6 libffi-dev libjpeg-dev autoconf automake libtool make dos2unix libvips libvips-dev" +ARG BUILD_DEPS="gcc g++ autoconf automake libtool make" + +# Install general dependencies. +RUN apt-get update +RUN apt-get install -y software-properties-common +RUN add-apt-repository universe +RUN apt-get update +RUN apt-get install -y $PACKAGES +RUN apt-get update --fix-missing +RUN apt-get install -y $BUILD_DEPS --fix-missing + +COPY --from=build /tmp/get-pip.py /tmp/get-pip.py +RUN python3.7 /tmp/get-pip.py +RUN rm /tmp/get-pip.py + +# Move to /code dir and copy in working dir content +WORKDIR /code + +# Upgrade package essentials. +RUN pip3 install --upgrade pip==20.0.2 setuptools wheel dumb-init pipenv + +# Install pip packages +COPY requirements/ /code/ +RUN pip3 install --upgrade -r test.txt + +WORKDIR /code/app + +# Init +EXPOSE 9222 +ENTRYPOINT ["/usr/local/bin/dumb-init", "--"] +CMD ["gunicorn", "-w", "1", "-b", "0.0.0.0:80", "app.wsgi:application", "--max-requests=200"] + +# Copy over code directory +COPY app/ /code/app/ +COPY --from=build /code/app/static /code/app/static +COPY --from=build /usr/share/GeoIP /usr/share/GeoIP + +# Tag +ARG BUILD_DATETIME +ARG SHA1 +LABEL co.gitcoin.description="Gitcoin web application image" \ + co.gitcoin.documentation="https://github.com/gitcoinco/web/blob/master/docs/RUNNING_LOCALLY_DOCKER.md" \ + co.gitcoin.licenses="AGPL-3.0" \ + co.gitcoin.image.revision=$SHA1 \ + co.gitcoin.image.vendor="Gitcoin" \ + co.gitcoin.image.source="https://github.com/gitcoinco/web" \ + co.gitcoin.image.title="Gitcoin Web" \ + co.gitcoin.image.created=$BUILD_DATETIME diff --git a/Makefile b/Makefile index a49db6761dd..1714491ea1d 100644 --- a/Makefile +++ b/Makefile @@ -13,14 +13,14 @@ WEB_CONTAINER_ID := $$(docker inspect --format="{{.Id}}" ${CONTAINER_NAME}) autotranslate: ## Automatically translate all untranslated entries for all LOCALES in settings.py. @echo "Starting makemessages..." - @docker-compose exec web python3 app/manage.py makemessages -a -d django -i node_modules -i static -i ipfs + @docker-compose exec web python3.7 app/manage.py makemessages -a -d django -i node_modules -i static -i ipfs @echo "Starting JS makemessages..." - @docker-compose exec web python3 app/manage.py makemessages -a -d djangojs -i node_modules -i static -i assets/v2/js/lib/ipfs-api.js + @docker-compose exec web python3.7 app/manage.py makemessages -a -d djangojs -i node_modules -i static -i assets/v2/js/lib/ipfs-api.js @echo "Starting autotranslation of messages..." - @docker-compose exec web python3 app/manage.py translate_messages -u + @docker-compose exec web python3.7 app/manage.py translate_messages -u # TODO: Add check for messed up python var strings. @echo "Starting compilemessages..." - @docker-compose exec web python3 app/manage.py compilemessages -f + @docker-compose exec web python3.7 app/manage.py compilemessages -f @echo "Translation Completed!" build: ## Build the Gitcoin Web image. @@ -40,10 +40,10 @@ push: ## Push the Docker image to the Docker Hub repository. @docker push "${REPO_NAME}" bundle: ## Create bundles for all `bundle` blocks then compress with webpack - @docker-compose exec -e DJANGO_SETTINGS_MODULE="app.settings" web bash -c "cd /code/app && python3 manage.py bundle && yarn run build" + @docker-compose exec -e DJANGO_SETTINGS_MODULE="app.settings" web bash -c "cd /code/app && python3.7 manage.py bundle && yarn run build" collect-static: ## Collect newly added static resources from the assets directory. - @docker-compose exec -e DJANGO_SETTINGS_MODULE="app.settings" web bash -c "cd /code/app && python3 manage.py collectstatic -i other --no-input" + @docker-compose exec -e DJANGO_SETTINGS_MODULE="app.settings" web bash -c "cd /code/app && python3.7 manage.py collectstatic -i other --no-input" compress-images: ## Compress and optimize images throughout the repository. Requires optipng, svgo, and jpeg-recompress. @./scripts/compress_images.bash @@ -69,13 +69,13 @@ fresh: ## Completely destroy all compose assets and start compose with a fresh b @docker-compose down -v; docker-compose up -d --build; load_initial_data: ## Load initial development fixtures. - @docker-compose exec -e DJANGO_SETTINGS_MODULE="app.settings" web python3 app/manage.py loaddata initial + @docker-compose exec -e DJANGO_SETTINGS_MODULE="app.settings" web python3.7 app/manage.py loaddata initial load_clr_grant_match_data: - @docker-compose exec -e DJANGO_SETTINGS_MODULE="app.settings" web python3 app/manage.py loaddata app/app/fixtures/users.json - @docker-compose exec -e DJANGO_SETTINGS_MODULE="app.settings" web python3 app/manage.py loaddata app/app/fixtures/profiles.json - @docker-compose exec -e DJANGO_SETTINGS_MODULE="app.settings" web python3 app/manage.py loaddata initial - @docker-compose exec -e DJANGO_SETTINGS_MODULE="app.settings" web python3 app/manage.py loaddata app/app/fixtures/clr_match.json + @docker-compose exec -e DJANGO_SETTINGS_MODULE="app.settings" web python3.7 app/manage.py loaddata app/app/fixtures/users.json + @docker-compose exec -e DJANGO_SETTINGS_MODULE="app.settings" web python3.7 app/manage.py loaddata app/app/fixtures/profiles.json + @docker-compose exec -e DJANGO_SETTINGS_MODULE="app.settings" web python3.7 app/manage.py loaddata initial + @docker-compose exec -e DJANGO_SETTINGS_MODULE="app.settings" web python3.7 app/manage.py loaddata app/app/fixtures/clr_match.json logs: ## Print and actively tail the docker compose logs. @docker-compose logs -f @@ -98,26 +98,26 @@ stylelint: ## Run stylelint against the project directory. Requires node, npm, a tests: pytest eslint stylelint ## Run the full test suite. migrate: ## Migrate the database schema with the latest unapplied migrations. - @docker-compose exec -e DJANGO_SETTINGS_MODULE="app.settings" web python3 app/manage.py migrate + @docker-compose exec -e DJANGO_SETTINGS_MODULE="app.settings" web python3.7 app/manage.py migrate migrations: ## Generate migration files for schema changes. - @docker-compose exec -e DJANGO_SETTINGS_MODULE="app.settings" web python3 app/manage.py makemigrations + @docker-compose exec -e DJANGO_SETTINGS_MODULE="app.settings" web python3.7 app/manage.py makemigrations compilemessages: ## Execute compilemessages for translations on the web container. - @docker-compose exec -e DJANGO_SETTINGS_MODULE="app.settings" web python3 app/manage.py compilemessages + @docker-compose exec -e DJANGO_SETTINGS_MODULE="app.settings" web python3.7 app/manage.py compilemessages makemessages: ## Execute makemessages for translations on the web container. - @docker-compose exec -e DJANGO_SETTINGS_MODULE="app.settings" web python3 app/manage.py makemessages + @docker-compose exec -e DJANGO_SETTINGS_MODULE="app.settings" web python3.7 app/manage.py makemessages get_ipdb_shell: ## Drop into the active Django shell for inspection via ipdb. @echo "Attaching to container: ($(CONTAINER_NAME)) - ($(WEB_CONTAINER_ID))" @docker attach $(WEB_CONTAINER_ID) get_django_shell: ## Open a standard Django shell. - @docker-compose exec -e DJANGO_SETTINGS_MODULE="app.settings" web python3 app/manage.py shell + @docker-compose exec -e DJANGO_SETTINGS_MODULE="app.settings" web python3.7 app/manage.py shell get_shell_plus: ## Open a standard Django shell. - @docker-compose exec -e DJANGO_SETTINGS_MODULE="app.settings" web python3 app/manage.py shell_plus + @docker-compose exec -e DJANGO_SETTINGS_MODULE="app.settings" web python3.7 app/manage.py shell_plus pgactivity: ## Run pg_activivty against the local postgresql instance. @docker-compose exec web scripts/pg_activity.bash diff --git a/app/app/context.py b/app/app/context.py index 63e8d9e545a..9eaf816abc8 100644 --- a/app/app/context.py +++ b/app/app/context.py @@ -32,7 +32,7 @@ from dashboard.tasks import record_join, record_visit from dashboard.utils import _get_utm_from_cookie from kudos.models import KudosTransfer -from marketing.utils import handle_marketing_callback +from marketing.common.utils import handle_marketing_callback from perftools.models import JSONStore from retail.helpers import get_ip from townsquare.models import Announcement diff --git a/app/app/fixtures/clr_match.json b/app/app/fixtures/clr_match.json index 4b5aadbc1fe..4d571de091e 100644 --- a/app/app/fixtures/clr_match.json +++ b/app/app/fixtures/clr_match.json @@ -2082,7 +2082,7 @@ "name": "GR12", "contract_address": "0xAB8d71d59827dcc90fEDc5DDb97f87eFfB1B1A5B", "network": "mainnet", - "payout_token": "DAI", + "token": 1, "status": "ready", "funding_withdrawal_date": null } diff --git a/app/app/fixtures/economy.json b/app/app/fixtures/economy.json index 53f8a672420..ade8435cbf7 100644 --- a/app/app/fixtures/economy.json +++ b/app/app/fixtures/economy.json @@ -18939,7 +18939,7 @@ "symbol": "ETH", "network": "mainnet", "decimals": 18, - "priority": 999, + "priority": 1, "metadata": {}, "approved": true } @@ -21449,21 +21449,6 @@ "approved": true } }, - { - "model": "economy.token", - "pk": 171, - "fields": { - "created_on": "2018-12-26T17:00:13.244Z", - "modified_on": "2018-12-26T17:00:13.244Z", - "address": "0x0000000000000000000000000000000000000000", - "symbol": "ETH", - "network": "ropsten", - "decimals": 18, - "priority": 999, - "metadata": {}, - "approved": true - } - }, { "model": "economy.token", "pk": 172, @@ -21509,21 +21494,6 @@ "approved": true } }, - { - "model": "economy.token", - "pk": 175, - "fields": { - "created_on": "2018-12-26T17:00:13.246Z", - "modified_on": "2018-12-26T17:00:13.246Z", - "address": "0x0000000000000000000000000000000000000000", - "symbol": "ETH", - "network": "rinkeby", - "decimals": 18, - "priority": 999, - "metadata": {}, - "approved": true - } - }, { "model": "economy.token", "pk": 176, @@ -21554,21 +21524,6 @@ "approved": true } }, - { - "model": "economy.token", - "pk": 178, - "fields": { - "created_on": "2018-12-26T17:00:13.249Z", - "modified_on": "2018-12-26T17:00:13.249Z", - "address": "0x0000000000000000000000000000000000000000", - "symbol": "ETH", - "network": "custom", - "decimals": 18, - "priority": 999, - "metadata": {}, - "approved": true - } - }, { "model": "economy.token", "pk": 179, @@ -21584,21 +21539,6 @@ "approved": true } }, - { - "model": "economy.token", - "pk": 180, - "fields": { - "created_on": "2018-12-26T17:00:13.251Z", - "modified_on": "2018-12-26T17:00:13.251Z", - "address": "0x0000000000000000000000000000000000000000", - "symbol": "ETH", - "network": "unknown", - "decimals": 18, - "priority": 999, - "metadata": {}, - "approved": true - } - }, { "model": "economy.token", "pk": 181, @@ -21629,21 +21569,6 @@ "approved": true } }, - { - "model": "economy.token", - "pk": 183, - "fields": { - "created_on": "2018-12-26T18:45:52.084Z", - "modified_on": "2018-12-26T18:45:52.084Z", - "address": "0x0000000000000000000000000000000000000000", - "symbol": "ETH", - "network": "mainnet", - "decimals": 18, - "priority": 999, - "metadata": {}, - "approved": true - } - }, { "model": "economy.token", "pk": 184, @@ -24149,21 +24074,6 @@ "approved": true } }, - { - "model": "economy.token", - "pk": 351, - "fields": { - "created_on": "2018-12-26T18:45:52.213Z", - "modified_on": "2018-12-26T18:45:52.213Z", - "address": "0x0000000000000000000000000000000000000000", - "symbol": "ETH", - "network": "ropsten", - "decimals": 18, - "priority": 999, - "metadata": {}, - "approved": true - } - }, { "model": "economy.token", "pk": 352, @@ -24209,21 +24119,6 @@ "approved": true } }, - { - "model": "economy.token", - "pk": 355, - "fields": { - "created_on": "2018-12-26T18:45:52.216Z", - "modified_on": "2018-12-26T18:45:52.216Z", - "address": "0x0000000000000000000000000000000000000000", - "symbol": "ETH", - "network": "rinkeby", - "decimals": 18, - "priority": 999, - "metadata": {}, - "approved": true - } - }, { "model": "economy.token", "pk": 356, @@ -24254,21 +24149,6 @@ "approved": true } }, - { - "model": "economy.token", - "pk": 358, - "fields": { - "created_on": "2018-12-26T18:45:52.217Z", - "modified_on": "2018-12-26T18:45:52.217Z", - "address": "0x0000000000000000000000000000000000000000", - "symbol": "ETH", - "network": "custom", - "decimals": 18, - "priority": 999, - "metadata": {}, - "approved": true - } - }, { "model": "economy.token", "pk": 359, @@ -24284,21 +24164,6 @@ "approved": true } }, - { - "model": "economy.token", - "pk": 360, - "fields": { - "created_on": "2018-12-26T18:45:52.219Z", - "modified_on": "2018-12-26T18:45:52.219Z", - "address": "0x0000000000000000000000000000000000000000", - "symbol": "ETH", - "network": "unknown", - "decimals": 18, - "priority": 999, - "metadata": {}, - "approved": true - } - }, { "model": "economy.token", "pk": 361, @@ -24373,5 +24238,176 @@ "metadata": {}, "approved": true } + }, + { + "model": "economy.token", + "pk": 365, + "fields": { + "created_on": "2022-04-04T06:28:03Z", + "modified_on": "2022-04-04T06:29:18.680Z", + "address": "0x0000000000000000000000000000000000000001", + "symbol": "ONE", + "network": "Harmony Mainnet Shard 0", + "decimals": 18, + "priority": 1, + "chain_id": 1666600000, + "network_id": 1666600000, + "metadata": {}, + "approved": true, + "conversion_rate_id": "harmony", + "conversion_rate_source": "coingecko" + } + }, + { + "model": "economy.token", + "pk": 366, + "fields": { + "created_on": "2022-04-04T06:28:03Z", + "modified_on": "2022-04-04T06:29:18.680Z", + "address": "0x0000000000000000000000000000000000000001", + "symbol": "ONE", + "network": "Harmony Mainnet Shard 1", + "decimals": 18, + "priority": 1, + "chain_id": 1666600001, + "network_id": 1666600001, + "metadata": {}, + "approved": true, + "conversion_rate_id": "harmony", + "conversion_rate_source": "coingecko" + } + }, + { + "model": "economy.token", + "pk": 367, + "fields": { + "created_on": "2022-04-04T06:28:03Z", + "modified_on": "2022-04-04T06:29:18.680Z", + "address": "0x0000000000000000000000000000000000000001", + "symbol": "ONE", + "network": "Harmony Mainnet Shard 2", + "decimals": 18, + "priority": 1, + "chain_id": 1666600002, + "network_id": 1666600002, + "metadata": {}, + "approved": true, + "conversion_rate_id": "harmony", + "conversion_rate_source": "coingecko" + } + }, + { + "model": "economy.token", + "pk": 368, + "fields": { + "created_on": "2022-04-04T06:29:18Z", + "modified_on": "2022-04-04T06:30:05.945Z", + "address": "0x0000000000000000000000000000000000000001", + "symbol": "ONE", + "network": "Harmony Mainnet Shard 3", + "decimals": 18, + "priority": 1, + "chain_id": 1666600003, + "network_id": 1666600003, + "metadata": {}, + "approved": true, + "conversion_rate_id": "harmony", + "conversion_rate_source": "coingecko" + } + }, + { + "model": "economy.token", + "pk": 369, + "fields": { + "created_on": "2022-04-04T06:29:18Z", + "modified_on": "2022-04-04T06:30:05.945Z", + "address": "0x0000000000000000000000000000000000000001", + "symbol": "ONE", + "network": "Harmony Testnet Shard 0", + "decimals": 18, + "priority": 1, + "chain_id": 1666700000, + "network_id": 1666700000, + "metadata": {}, + "approved": true, + "conversion_rate_id": "harmony", + "conversion_rate_source": "coingecko" + } + }, + { + "model": "economy.token", + "pk": 370, + "fields": { + "created_on": "2022-04-04T06:29:18Z", + "modified_on": "2022-04-04T06:30:05.945Z", + "address": "0x0000000000000000000000000000000000000001", + "symbol": "ONE", + "network": "Harmony Testnet Shard 1", + "decimals": 18, + "priority": 1, + "chain_id": 1666700001, + "network_id": 1666700001, + "metadata": {}, + "approved": true, + "conversion_rate_id": "harmony", + "conversion_rate_source": "coingecko" + } + }, + { + "model": "economy.token", + "pk": 371, + "fields": { + "created_on": "2022-04-04T06:29:18Z", + "modified_on": "2022-04-04T06:30:05.945Z", + "address": "0x0000000000000000000000000000000000000001", + "symbol": "ONE", + "network": "Harmony Testnet Shard 2", + "decimals": 18, + "priority": 1, + "chain_id": 1666700002, + "network_id": 1666700002, + "metadata": {}, + "approved": true, + "conversion_rate_id": "harmony", + "conversion_rate_source": "coingecko" + } + }, + { + "model": "economy.token", + "pk": 372, + "fields": { + "created_on": "2022-04-04T06:29:18Z", + "modified_on": "2022-04-04T06:30:05.945Z", + "address": "0x0000000000000000000000000000000000000001", + "symbol": "ONE", + "network": "Harmony Testnet Shard 3", + "decimals": 18, + "priority": 1, + "chain_id": 1666700003, + "network_id": 1666700003, + "metadata": {}, + "approved": true, + "conversion_rate_id": "harmony", + "conversion_rate_source": "coingecko" + } + }, + { + "model": "economy.token", + "pk": 374, + "fields": { + "created_on": "2022-04-22T12:35:27Z", + "modified_on": "2022-04-22T12:36:06.267Z", + "address": "0x0000000000000000000000000000000000000000", + "symbol": "ETH", + "network": "testnetrpc", + "decimals": 18, + "priority": 1, + "chain_id": 1, + "network_id": 1, + "metadata": {}, + "approved": true, + "conversion_rate_id": null, + "conversion_rate_source": null + } } ] diff --git a/app/app/local.env b/app/app/local.env index f095f3ea8f1..2b36e578f9b 100644 --- a/app/app/local.env +++ b/app/app/local.env @@ -86,3 +86,6 @@ NETWORK_NAME=localhost SECRET_WORDS= PASSWORD= CYPRESS_REMOTE_DEBUGGING_PORT=9222 + +# Datadog token for UI logging +DATADOG_TOKEN= \ No newline at end of file diff --git a/app/app/middleware.py b/app/app/middleware.py index 619ec559d92..c10cae8a357 100644 --- a/app/app/middleware.py +++ b/app/app/middleware.py @@ -19,3 +19,21 @@ def middleware(request): return response return middleware + +def drop_recaptcha_post(get_response): + """Define middleware to alter the request to act as a GET if the post data contains g-recaptcha-response + + This middleware allows us to ignore subsequent recaptcha submissions if the user has already passed + the recaptcha in a different window. + + """ + + def middleware(request): + """Define middleware to set method to GET if g-recaptcha-response is present in POST dict.""" + if request.method == "POST" and "g-recaptcha-response" in request.POST: + request.method = "GET" + request.POST = {} + + return get_response(request) + + return middleware diff --git a/app/app/settings.py b/app/app/settings.py index 33a38dc0aec..f5e892aca9f 100644 --- a/app/app/settings.py +++ b/app/app/settings.py @@ -25,6 +25,7 @@ from django.utils.translation import gettext_noop import environ +import mimetypes import raven import sentry_sdk from boto3.session import Session @@ -77,6 +78,10 @@ # Notifications - Global on / off switch ENABLE_NOTIFICATIONS_ON_NETWORK = env('ENABLE_NOTIFICATIONS_ON_NETWORK', default='mainnet') +# Set .wasm mime type for dev env +if DEBUG: + mimetypes.add_type("application/wasm", ".wasm", True) + # Application definition INSTALLED_APPS = [ 'csp', @@ -151,7 +156,9 @@ 'adminsortable2', 'debug_toolbar', 'passport', - 'quadraticlands' + 'quadraticlands', + 'mautic_logging', + 'passport_score', ] MIDDLEWARE = [ @@ -160,6 +167,7 @@ 'django.middleware.security.SecurityMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'app.middleware.drop_accept_language', + 'app.middleware.drop_recaptcha_post', 'django.middleware.locale.LocaleMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', @@ -311,7 +319,14 @@ def callback(request): # Sentry SENTRY_DSN = env.str('SENTRY_DSN', default='') SENTRY_JS_DSN = env.str('SENTRY_JS_DSN', default=SENTRY_DSN) -RELEASE = raven.fetch_git_sha(os.path.abspath(os.pardir)) if ENV == 'prod' else '' + +# In case we are running / deploying from within a git repo, we want to use the git repo SHA +# In case we are not in a github repo, we rely on an environment variable +try: + RELEASE = raven.fetch_git_sha(os.path.abspath(os.pardir)) if ENV == 'prod' else '' +except: + RELEASE = env.str('GITHUB_SHA', default=' - dev build - ') + RAVEN_JS_VERSION = env.str('RAVEN_JS_VERSION', default='6.8.0') if SENTRY_DSN: sentry_sdk.init( @@ -524,10 +539,17 @@ def callback(request): CELERY_RESULT_BACKEND = env('CELERY_RESULT_BACKEND', default=CACHEOPS_REDIS) # https://docs.celeryproject.org/en/latest/userguide/configuration.html#std-setting-task_routes CELERY_ROUTES = [ + ('dashboard.tasks.calculate_trust_bonus', {'queue': 'gitcoin_passport'}), ('grants.tasks.process_grant_contribution', {'queue': 'high_priority'}), ('grants.tasks.batch_process_grant_contributions', {'queue': 'high_priority'}), + ('grants.tasks.handle_zksync_ingestion_task', {'queue': 'high_priority'}), ('kudos.tasks.mint_token_request', {'queue': 'high_priority'}), ('dashboard.tasks.increment_view_count', {'queue': 'analytics'}), + ('dashboard.tasks.record_visit', {'queue': 'analytics'}), + ('dashboard.tasks.record_join', {'queue': 'analytics'}), + ('townsquare.tasks.increment_offer_view_counts', {'queue': 'analytics'}), + ('townsquare.tasks.increment_view_counts', {'queue': 'analytics'}), + ('townsquare.tasks.send_comment_email', {'queue': 'marketing'}), ('marketing.tasks.*', {'queue': 'marketing'}), ('grants.tasks.*', {'queue': 'default'}), ('dashboard.tasks.*', {'queue': 'default'}), @@ -566,6 +588,7 @@ def callback(request): CSRF_COOKIE_SECURE = env.bool('CSRF_COOKIE_SECURE', default=False) CSRF_COOKIE_HTTPONLY = env.bool('CSRF_COOKIE_HTTPONLY', default=True) +CSRF_FAILURE_VIEW = 'retail.views.csrf_failure' SESSION_COOKIE_SECURE = env.bool('SESSION_COOKIE_SECURE', default=False) SECURE_BROWSER_XSS_FILTER = env.bool('SECURE_BROWSER_XSS_FILTER', default=True) SECURE_CONTENT_TYPE_NOSNIFF = env.bool('SECURE_CONTENT_TYPE_NOSNIFF', default=True) @@ -802,6 +825,7 @@ def callback(request): WEB3_HTTP_PROVIDER = env('WEB3_HTTP_PROVIDER', default='https://rinkeby.infura.io') INFURA_USE_V3 = env.bool('INFURA_USE_V3', False) INFURA_V3_PROJECT_ID = env('INFURA_V3_PROJECT_ID', default='1e0a90928efe4bb78bb1eeceb8aacc27') +ALCHEMY_KEY = env('ALCHEMY_KEY', default='1e0a90928efe4bb78bb1eeceb8aacc27') # COLO Coin COLO_ACCOUNT_ADDRESS = env('COLO_ACCOUNT_ADDRESS', default='') # TODO @@ -888,6 +912,7 @@ def callback(request): ELASTIC_SEARCH_URL = env('ELASTIC_SEARCH_URL', default='') +ACTIVE_ELASTIC_INDEX = env('ACTIVE_ELASTIC_INDEX', default='search-index-1') account_sid = env('TWILIO_ACCOUNT_SID', default='') auth_token = env('TWILIO_AUTH_TOKEN', default='') @@ -936,3 +961,11 @@ def callback(request): # GTC Token Distribution GTC_DIST_API_URL = env('GTC_DIST_API_URL', default='http://localhost:8000/not-valid-url') GTC_DIST_KEY = env('GTC_DIST_KEY', default='') + +# BUNDLE settings +# Generating a checksun is optional. When egenerating the static files for a container build +# we do not want to add a checksum +BUNDLE_USE_CHECKSUM = env('BUNDLE_USE_CHECKSUM', default=True) + +# Datadog token for UI logging +DATADOG_TOKEN = env('DATADOG_TOKEN', default=None) diff --git a/app/app/sitemaps.py b/app/app/sitemaps.py index 2b81682e66d..23658d61193 100644 --- a/app/app/sitemaps.py +++ b/app/app/sitemaps.py @@ -13,7 +13,7 @@ class StaticViewSitemap(Sitemap): def items(self): return [ - 'dashboard', 'new_funding', 'tip', 'terms', 'privacy', 'cookie', 'prirp', 'apitos', 'about', 'index', + 'dashboard', 'new_bounty', 'tip', 'terms', 'privacy', 'cookie', 'prirp', 'apitos', 'about', 'index', 'help', 'whitepaper', 'whitepaper_access', '_leaderboard', 'mission', 'slack', 'labs', 'results', 'activity', 'kudos_main', 'kudos_marketplace', 'grants', 'funder_bounties', 'quests_index', 'newquest', 'products', 'avatar_landing' diff --git a/app/app/tests/test_app_urls.py b/app/app/tests/test_app_urls.py index 9948cd31f32..c4406990c65 100644 --- a/app/app/tests/test_app_urls.py +++ b/app/app/tests/test_app_urls.py @@ -98,24 +98,6 @@ def test_new_bounty_resolve(self): self.assertEqual(resolve('/bounty/new').view_name, 'new_bounty') self.assertEqual(resolve('/bounty/new/').view_name, 'new_bounty') - def test_new_funding_reverse(self): - """Test the new_funding url and check the reverse.""" - self.assertEqual(reverse('new_funding'), '/funding/new') - - def test_new_funding_resolve(self): - """Test the new_funding url and check the resolution.""" - self.assertEqual(resolve('/funding/new').view_name, 'new_funding') - self.assertEqual(resolve('/funding/new/').view_name, 'new_funding') - - def test_new_reverse(self): - """Test the new url and check the reverse.""" - self.assertEqual(reverse('new_funding_short'), '/new') - - def test_new_resolve(self): - """Test the new url and check the resolution.""" - self.assertEqual(resolve('/new').view_name, 'new_funding_short') - self.assertEqual(resolve('/new/').view_name, 'new_funding_short') - def test_uniterested_reverse(self): """Test the uninterested url and check the reverse""" self.assertEqual(reverse('uninterested', args=[1, 2]), '/actions/bounty/1/interest/2/uninterested/') diff --git a/app/app/urls.py b/app/app/urls.py index 7faeef27eb7..c8a2c7524b9 100644 --- a/app/app/urls.py +++ b/app/app/urls.py @@ -25,6 +25,7 @@ from django.urls import path, re_path from django.views.decorators.cache import cache_page from django.views.i18n import JavaScriptCatalog +from django.views.generic import RedirectView import avatar.views import credits.views @@ -60,768 +61,818 @@ from .views import redirect_view urlpatterns = [ + path('grants/explorer', RedirectView.as_view(url='https://explorer.gitcoin.co/'), name='redirect_grants_explorer'), + path('grants/cart', RedirectView.as_view(url='https://explorer.gitcoin.co/'), name='redirect_grants_cart'), + path('grants', RedirectView.as_view(url='https://explorer.gitcoin.co/'), name='redirect_grants'), + path('grants/', RedirectView.as_view(url='https://grants.gitcoin.co'), name='redirect_grants_any'), + path('explorer', RedirectView.as_view(url='https://app.buidlbox.io/'), name='redirect_explorer'), + path('settings/', RedirectView.as_view(url='https://explorer.gitcoin.co/'), name='redirect_settings_any'), + path('bounties/', RedirectView.as_view(url='https://app.buidlbox.io/'), name='redirect_bounties_any'), + path('bounty/', RedirectView.as_view(url='https://app.buidlbox.io/'), name='redirect_bounty_any'), + path('hackathons/', RedirectView.as_view(url='https://app.buidlbox.io/'), name='redirect_hackathons_any'), + path('mission', RedirectView.as_view(url='https://www.gitcoin.co/about'), name='redirect_mission'), + path('metamask', RedirectView.as_view(url='https://metamask.io/'), name='redirect_metamask'), + path('issue/', RedirectView.as_view(url='https://app.buidlbox.io/'), name='redirect_issue_any'), + path('', RedirectView.as_view(url='https://gitcoin.co'), name='redirect_home'), + + # Catch-all pattern + re_path(r'^(?P.*)$', RedirectView.as_view(url='https://gitcoin.co', permanent=False), name='catchall'), - # oauth2 provider - url('^o/', include('oauth2_provider.urls', namespace='oauth2_provider')), - path('jsi18n/', JavaScriptCatalog.as_view(), name='javascript-catalog'), - url('^api/v1/bounty/create', dashboard.views.create_bounty_v1, name='create_bounty_v1'), - url('^api/v1/bounty/cancel', dashboard.views.cancel_bounty_v1, name='cancel_bounty_v1'), - url('^api/v1/bounty/fulfill', dashboard.views.fulfill_bounty_v1, name='fulfill_bounty_v1'), - path('api/v1/bounty//close', dashboard.views.close_bounty_v1, name='close_bounty_v1'), - path('api/v1/bounty/payout/', dashboard.views.payout_bounty_v1, name='payout_bounty_v1'), - path('api/v1/reverse-proxy/', dashboard.views.reverse_proxy_rpc_v1, name='payout_tx_forwarder_v1'), - re_path(r'.*api/v0.1/video/presence$', townsquare.views.video_presence, name='video_presence'), - - # inbox - re_path(r'^inbox/?', include('inbox.urls', namespace='inbox')), - - # board - re_path(r'^dashboard/?', dashboard.views.board, name='dashboard'), - - # kudos - re_path(r'^kudos/?$', kudos.views.about, name='kudos_main'), - re_path(r'^kudos/about/?$', kudos.views.about, name='kudos_about'), - re_path(r'^kudos/sync/?$', kudos.views.sync, name='kudos_sync'), - re_path(r'^kudos/marketplace/?$', kudos.views.marketplace, name='kudos_marketplace'), - re_path(r'^kudos/mint/?$', kudos.views.mint, name='kudos_mint'), - re_path(r'^kudos/send/?$', kudos.views.send_2, name='kudos_send'), - path('kudos/send/3/', kudos.views.send_3, name='kudos_send_3'), - path('kudos/send/4/', kudos.views.send_4, name='kudos_send_4'), - re_path(r'^lazy_load_kudos/$', dashboard.views.lazy_load_kudos, name='lazy_load_kudos'), - re_path(r'^kudos/receive/v3/(?P.*)/(?P.*)/(?P.*)?', kudos.views.receive, name='kudos_receive'), - re_path(r'^kudos/redeem/(?P.*)/?$', kudos.views.receive_bulk, name='kudos_receive_bulk'), - re_path(r'^kudos/search/$', kudos.views.search, name='kudos_search'), - re_path( - r'^kudos/(?P
\w*)/(?P\d+)/(?P\w*)', - kudos.views.details_by_address_and_token_id, - name='kudos_details_by_address_and_token_id' - ), - re_path( - r'^kudos/(?P
\w*)/(?P\d+)', - kudos.views.details_by_address_and_token_id, - name='kudos_details_by_address_and_token_id2' - ), - re_path(r'^kudos/(?P\d+)/(?P\w*)', kudos.views.details, name='kudos_details'), - re_path(r'^kudos/address/(?P.*)', kudos.views.kudos_preferred_wallet, name='kudos_preferred_wallet'), - re_path(r'^dynamic/kudos/(?P\d+)/(?P\w*)', kudos.views.image, name='kudos_dynamic_img'), - re_path(r'^kudos/new/?', kudos.views.newkudos, name='newkudos'), - path('dynamic/grants_cart_thumb//', cart_thumbnail, name='cart_thumbnail'), - - # mailing list - url('mailing_list/funders/', dashboard.views.funders_mailing_list), - url('mailing_list/hunters/', dashboard.views.hunters_mailing_list), - url(r'^api/user/me', dashboard.views.oauth_connect, name='oauth_connect'), - # api views - url(r'^api/v0.1/profile/(.*)?/keywords', dashboard.views.profile_keywords, name='profile_keywords'), - url(r'^api/v0.1/profile/(.*)?/activity.json', dashboard.views.profile_activity, name='profile_activity'), - url(r'^api/v0.1/profile/(.*)?/earnings.csv', dashboard.views.profile_earnings, name='profile_earnings'), - url(r'^api/v0.1/profile/(.*)?/grants.csv', dashboard.views.profile_grants, name='profile_grants'), - url(r'^api/v0.1/profile/(.*)?/quests.csv', dashboard.views.profile_quests, name='profile_quests'), - url(r'^api/v0.1/profile/(.*)?/ratings/(.*).csv', dashboard.views.profile_ratings, name='profile_ratings'), - url(r'^api/v0.1/profile/(.*)?/viewers.csv', dashboard.views.profile_viewers, name='profile_viewers'), - url(r'^api/v0.1/profile/(.*)?/spent.csv', dashboard.views.profile_spent, name='profile_spent'), - url(r'^api/v0.1/profile/banner', dashboard.views.change_user_profile_banner, name='change_user_profile_banner'), - url(r'^api/v0.1/profile/settings', dashboard.views.profile_settings, name='profile_settings'), - url(r'^api/v0.1/profile/backup', dashboard.views.profile_backup, name='profile_backup'), - path('api/v0.1/activity/', townsquare.views.api, name='townsquare_api'), - path('api/v0.1/comment/', townsquare.views.comment_v1, name='comment_v1'), - path('api/v0.1/emailsettings/', townsquare.views.emailsettings, name='townsquare_emailsettings'), - url(r'^api/v0.1/activity', retail.views.create_status_update, name='create_status_update'), - url( - r'^api/v0.1/profile/(.*)?/jobopportunity', - dashboard.views.profile_job_opportunity, - name='profile_job_opportunity' - ), - url( - r'^api/v0.1/profile/(.*)?/setTaxSettings', - dashboard.views.profile_tax_settings, - name='profile_set_tax_settings' - ), - - # verification services - url( - r'^api/v0.1/profile/(?P.*)/request_user_sms/?$', - dashboard.views.send_verification, - name='request_verification' - ), - url( - r'^api/v0.1/profile/(?P.*)/verify_user_sms/?$', - dashboard.views.validate_verification, - name='request_verification' - ), - url( - r'^api/v0.1/profile/(?P.*)/disconnect_user_sms/?$', - dashboard.views.disconnect_sms, - name='disconnect_sms' - ), - url( - r'^api/v0.1/profile/(?P.*)/start_session_idena', - dashboard.views.start_session_idena, - name='start_session_idena' - ), - url( - r'^api/v0.1/profile/(?P.*)/authenticate_idena', - dashboard.views.authenticate_idena, - name='authenticate_idena' - ), - url(r'^api/v0.1/profile/(?P.*)/logout_idena', dashboard.views.logout_idena, name='logout_idena'), - url( - r'^api/v0.1/profile/(?P.*)/recheck_idena_status', - dashboard.views.recheck_idena_status, - name='recheck_idena_status' - ), - url( - r'^api/v0.1/profile/(?P.*)/verify_user_twitter', - dashboard.views.verify_user_twitter, - name='verify_user_twitter' - ), - url( - r'^api/v0.1/profile/(?P.*)/disconnect_user_twitter', - dashboard.views.disconnect_user_twitter, - name='disconnect_user_twitter' - ), - url( - r'^api/v0.1/profile/(?P.*)/verify_user_poap', dashboard.views.verify_user_poap, name='verify_user_poap' - ), - url( - r'^api/v0.1/profile/(?P.*)/disconnect_user_poap', - dashboard.views.disconnect_user_poap, - name='disconnect_user_poap' - ), - url( - r'^api/v0.1/profile/(?P.*)/verify_user_brightid', - dashboard.views.verify_user_brightid, - name='verify_user_brightid' - ), - url( - r'^api/v0.1/profile/(?P.*)/disconnect_user_brightid', - dashboard.views.disconnect_user_brightid, - name='disconnect_user_brightid' - ), - url(r'^api/v0.1/profile/(?P.*)/verify_user_poh', dashboard.views.verify_user_poh, name='verify_user_poh', - ), - url( - r'^api/v0.1/profile/(?P.*)/disconnect_user_poh', - dashboard.views.disconnect_user_poh, - name='disconnect_user_poh' - ), - url( - r'^api/v0.1/profile/(?P.*)/request_verify_google', - dashboard.views.request_verify_google, - name='request_verify_google' - ), - url(r'^api/v0.1/profile/verify_user_google', dashboard.views.verify_user_google, name='verify_user_google'), - url( - r'^api/v0.1/profile/(?P.*)/disconnect_user_google', - dashboard.views.disconnect_user_google, - name='disconnect_user_google' - ), - url( - r'^api/v0.1/profile/(?P.*)/request_verify_facebook', - dashboard.views.request_verify_facebook, - name='request_verify_facebook' - ), - url(r'^api/v0.1/profile/verify_user_facebook', dashboard.views.verify_user_facebook, name='verify_user_facebook'), - url( - r'^api/v0.1/profile/(?P.*)/disconnect_user_facebook', - dashboard.views.disconnect_user_facebook, - name='disconnect_user_facebook' - ), - url(r'api/v0.1/profile/(?P.*)/verify_user_ens', dashboard.views.verify_user_ens, name='verify_user_ens'), - url( - r'api/v0.1/profile/(?P.*)/disconnect_user_ens', - dashboard.views.disconnect_user_ens, - name='disconnect_user_ens' - ), - # url( - # r'^api/v0.1/profile/verify_user_duniter', - # dashboard.views.verify_user_duniter, - # name='verify_user_duniter' - # ), - url(r'^api/v0.1/profile/(?P.*)', dashboard.views.profile_details, name='profile_details'), - url(r'^api/v0.1/user_card/(?P.*)', dashboard.views.user_card, name='user_card'), - url(r'^api/v0.1/banners', dashboard.views.load_banners, name='load_banners'), - url(r'^api/v0.1/status_wallpapers', townsquare.views.load_wallpapers, name='load_wallpapers'), - url( - r'^api/v0.1/get_suggested_contributors', - dashboard.views.get_suggested_contributors, - name='get_suggested_contributors' - ), - url( - r'^api/v0.1/ignore_suggested_tribes/(?P.*)', - townsquare.views.ignored_suggested_tribe, - name='ignore_suggested_tribes' - ), - url( - r'^api/v0.1/social_contribution_email', - dashboard.views.social_contribution_email, - name='social_contribution_email' - ), - url(r'^api/v0.1/org_perms', dashboard.views.org_perms, name='org_perms'), - url(r'^api/v0.1/bulk_invite', dashboard.views.bulk_invite, name='bulk_invite'), - url(r'^api/v0.1/', include(dbrouter.urls)), - url(r'^api/v0.1/', include(kdrouter.urls)), - url(r'^api/v0.1/', include(grant_router.urls)), - url(r'^api/v0.1/', include(avatar_router.urls)), - url(r'^actions/api/v0.1/', include(dbrouter.urls)), # same as active - url(r'^api/v0.1/users_search/', dashboard.views.get_users, name='users_search'), - url(r'^api/v0.1/kudos_search/', dashboard.views.get_kudos, name='kudos_search'), - url(r'^api/v0.1/keywords_search/', dashboard.views.get_keywords, name='keywords_search'), - url(r'^api/v0.1/search/', search.views.get_search, name='search'), - url(r'^api/v0.1/choose_persona/', dashboard.views.choose_persona, name='choose_persona'), - url(r'^api/v1/onboard_save/', dashboard.views.onboard_save, name='onboard_save'), - url(r'^api/v1/file_upload/', dashboard.views.file_upload, name='file_upload'), - url(r'^api/v1/mautic/(?P.*)', dashboard.views.mautic_api, name='mautic_api'), - url(r'^api/v1/mautic_profile_save/', dashboard.views.mautic_profile_save, name='mautic_profile_save'), - - # Health check endpoint - re_path(r'^health/', include('health_check.urls')), - re_path(r'^lbcheck/?', healthcheck.views.lbcheck, name='lbcheck'), - re_path(r'^spec/?', healthcheck.views.spec, name='spec'), - - # grant views - path('grants/', include('grants.urls', namespace='grants')), - re_path(r'^grants/?', include('grants.urls', namespace='grants_catchall_')), - re_path(r'^grant/?', include('grants.urls', namespace='grants_catchall')), - - # dashboard views - re_path(r'^onboard/(?P\w+)/?$', dashboard.views.onboard, name='onboard'), - re_path(r'^onboard/contributor/avatar/?$', dashboard.views.onboard_avatar, name='onboard_avatar'), - re_path(r'^onboard/?$', dashboard.views.onboard, name='onboard'), - url(r'^postcomment/', dashboard.views.post_comment, name='post_comment'), - url(r'^explorer/?', dashboard.views.dashboard, name='explorer'), - - # Funder dashboard - path('funder_dashboard//', dashboard.views.funder_dashboard, name='funder_dashboard'), - path( - 'funder_dashboard/bounties//', - dashboard.views.funder_dashboard_bounty_info, - name='funder_dashboard_bounty_info' - ), - - # quests - re_path(r'^quests/?$', quests.views.index, name='quests_index'), - re_path(r'^quests/next?$', quests.views.next_quest, name='next_quest'), - re_path(r'^quests/(?P\d+)/feedback', quests.views.feedback, name='quest_feedback'), - re_path(r'^quests/(?P\d+)/(?P\w*)', quests.views.details, name='quest_details'), - re_path(r'^quests/new/?', quests.views.editquest, name='newquest'), - re_path(r'^quests/edit/(?P\d+)/?', quests.views.editquest, name='editquest'), - - #passport - re_path(r'^passport/$', passport.views.index, name='passport_gen'), - path('passport/', passport.views.passport, name='view_passport'), - - # Contributor dashboard - path( - 'contributor_dashboard//', dashboard.views.contributor_dashboard, name='contributor_dashboard' - ), - path('revenue/attestations/new', revenue.views.new_attestation, name='revenue_new_attestation'), - - # Hackathons / special events - path('hackathon//new/', dashboard.views.new_hackathon_bounty, name='new_hackathon_bounty'), - path('hackathon//new', dashboard.views.new_hackathon_bounty, name='new_hackathon_bounty2'), - path('hackathon//', dashboard.views.hackathon, name='hackathon'), - path('hackathon/dashboard/', dashboard.views.dashboard_sponsors, name='sponsors-dashboard'), - path( - 'hackathon/dashboard//', - dashboard.views.dashboard_sponsors, - name='sponsors-dashboard' - ), - path('hackathon/', dashboard.views.hackathon, name='hackathon2'), - path('hackathon//onboard/', dashboard.views.hackathon_onboard, name='hackathon_onboard2'), - path('hackathon///', dashboard.views.hackathon, name='hackathon'), - path('hackathon//onboard', dashboard.views.hackathon_onboard, name='hackathon_onboard'), - path('hackathon/onboard/', dashboard.views.hackathon_onboard, name='hackathon_onboard2'), - path('hackathon/onboard//', dashboard.views.hackathon_onboard, name='hackathon_onboard3'), - path('hackathon//projects/', dashboard.views.hackathon_projects, name='hackathon_projects'), - path('hackathon//showcase/', dashboard.views.hackathon, name='hackathon_showcase_proxy'), - path('hackathon//prizes/', dashboard.views.hackathon, name='hackathon_prizes'), - path('hackathon//townsquare/', dashboard.views.hackathon, name='hackathon_ts'), - path( - 'hackathon/projects//', dashboard.views.hackathon_project, name='hackathon_project' - ), - path( - 'hackathon/projects///', - dashboard.views.hackathon_project, - name='hackathon_project2' - ), - path('modal/new_project//', dashboard.views.hackathon_get_project, name='hackathon_get_project'), - path( - 'modal/new_project///', - dashboard.views.hackathon_get_project, - name='hackathon_edit_project' - ), - path( - 'hackathon//projects/', - dashboard.views.hackathon_project_page, - name='hackathon_project_page' - ), - path( - 'hackathon//projects//', - dashboard.views.hackathon_project_page, - name='hackathon_project_page' - ), - path( - 'hackathon//projects////', - dashboard.views.hackathon_project_page, - name='hackathon_project_page' - ), - path('modal/save_project/', dashboard.views.hackathon_save_project, name='hackathon_save_project'), - url(r'^hackathon//?$/?', dashboard.views.hackathon, name='hackathon'), - url(r'^hackathon///?$/?', dashboard.views.hackathon, name='hackathon'), - - # list all hackathons - re_path(r'^hackathon-list/?$', dashboard.views.get_hackathons, name='get_hackathons'), - re_path(r'^hackathon/?$', dashboard.views.get_hackathons, name='get_hackathons'), - re_path(r'^hackathons/?$', dashboard.views.get_hackathons, name='get_hackathons'), - url(r'^register_hackathon/', dashboard.views.hackathon_registration, name='hackathon_registration'), - path('api/v0.1/hackathon//save/', dashboard.views.save_hackathon, name='save_hackathon'), - path('api/v1/hackathon//prizes', dashboard.views.hackathon_prizes, name='hackathon_prizes_api'), - path('api/v0.1/hackathon//showcase/', dashboard.views.showcase, name='hackathon_showcase'), - path('api/v0.1/hackathon//events/', dashboard.views.events, name='hackathon_events'), - path('api/v0.1/projects/', dashboard.views.get_project, name='project_context'), - # action URLs - url(r'^funder', retail.views.funder_bounties_redirect, name='funder_bounties_redirect'), - re_path( - r'^contributor/?(?P.*)/?', - retail.views.contributor_bounties_redirect, - name='contributor_bounties_redirect' - ), - url(r'^bounties/funder', retail.views.funder_bounties, name='funder_bounties'), - re_path( - r'^bounties/contributor/?(?P.*)/?', retail.views.contributor_bounties, name='contributor_bounties' - ), - re_path(r'^bounty/quickstart/?', dashboard.views.quickstart, name='quickstart'), - url(r'^bounty/new/?', dashboard.views.new_bounty, name='new_bounty'), - re_path(r'^bounty/change/(?P.*)?', dashboard.views.change_bounty, name='change_bounty'), - url(r'^funding/new/?', dashboard.views.new_bounty, name='new_funding'), # TODO: Remove - url(r'^new/?', dashboard.views.new_bounty, name='new_funding_short'), # TODO: Remove - # TODO: Rename below to bounty/ - path('issue/fulfill', dashboard.views.fulfill_bounty, name='fulfill_bounty'), - path('issue/accept', dashboard.views.accept_bounty, name='process_funding'), - path('issue/advanced_payout', dashboard.views.bulk_payout_bounty, name='bulk_payout_bounty'), - path('issue/invoice', dashboard.views.invoice, name='invoice'), - path('issue/payout', dashboard.views.payout_bounty, name='payout_bounty'), - path('issue/increase', dashboard.views.increase_bounty, name='increase_bounty'), - path('issue/cancel', dashboard.views.cancel_bounty, name='kill_bounty'), - path('issue/cancel_reason', dashboard.views.cancel_reason, name='cancel_reason'), - path('modal/social_contribution', dashboard.views.social_contribution_modal, name='social_contribution_modal'), - path( - '//modal/funder_payout_reminder/', - dashboard.views.funder_payout_reminder_modal, - name='funder_payout_reminder_modal' - ), - - # Rating - path('modal/rating//', dashboard.views.rating_modal, name='rating_modal2'), - path('modal/rating///', dashboard.views.rating_modal, name='rating_modal'), - path('modal/rating_capture/', dashboard.views.rating_capture, name='rating_capture'), - url(r'^api/v0.1/unrated_bounties/', dashboard.views.unrated_bounties, name='unrated_bounties'), - - # Notify Funder Modal Submission - path( - 'actions/bounty///notify/funder_payout_reminder/', - dashboard.views.funder_payout_reminder, - name='funder_payout_reminder' - ), - path( - 'actions/bounty//extend_expiration/', - dashboard.views.extend_expiration, - name='extend_expiration' - ), - - # Avatars - path('avatar/', include('avatar.urls', namespace='avatar')), - - # Interests - path('actions/bounty//interest/new/', dashboard.views.new_interest, name='express-interest'), - path('actions/bounty//interest/remove/', dashboard.views.remove_interest, name='remove-interest'), - path( - 'actions/bounty//interest//uninterested/', - dashboard.views.uninterested, - name='uninterested' - ), - - # View Bounty - url( - r'^issue/(?P.*)/(?P.*)/(?P.*)/(?P.*)', - dashboard.views.bounty_details, - name='issue_details_new3' - ), - url( - r'^issue/(?P.*)/(?P.*)/(?P.*)', - dashboard.views.bounty_details, - name='issue_details_new2' - ), - re_path(r'^funding/details/?', dashboard.views.bounty_details, name='funding_details'), - re_path(r'^issue/(?P.*)', dashboard.views.bounty_invite_url, name='unique_bounty_invite'), - - # Tips - url( - r'^tip/receive/v3/(?P.*)/(?P.*)/(?P.*)?', - dashboard.tip_views.receive_tip_v3, - name='receive_tip' - ), - url(r'^tip/address/(?P.*)', dashboard.tip_views.tipee_address, name='tipee_address'), - url(r'^tip/send/4/?', dashboard.tip_views.send_tip_4, name='send_tip_4'), - url(r'^tip/send/3/?', dashboard.tip_views.send_tip_3, name='send_tip_3'), - url(r'^tip/send/2/?', dashboard.tip_views.send_tip_2, name='send_tip_2'), - url(r'^tip/send/?', dashboard.tip_views.send_tip, name='send_tip'), - url(r'^send/?$', dashboard.tip_views.send_tip, name='tip'), - url(r'^tip/?$', dashboard.tip_views.send_tip_2, name='tip'), - url(r'^requestmoney/?', dashboard.tip_views.request_money, name='request_money'), - # Legal - re_path(r'^terms/?', dashboard.views.terms, name='_terms'), - re_path(r'^legal/terms/?', dashboard.views.terms, name='terms'), - re_path(r'^legal/privacy/?', dashboard.views.privacy, name='privacy'), - re_path(r'^legal/cookie/?', dashboard.views.cookie, name='cookie'), - re_path(r'^legal/prirp/?', dashboard.views.prirp, name='prirp'), - re_path(r'^legal/apitos/?', dashboard.views.apitos, name='apitos'), - url(r'^legal/?$', dashboard.views.terms, name='legal'), - - # User Directory - re_path(r'^users/?', dashboard.views.users_directory, name='users_directory'), - re_path(r'^user_directory/?', dashboard.views.users_directory_elastic, name='users_directory_elastic'), - re_path(r'^user_lookup/?', dashboard.views.user_lookup, name='user_directory_lookup'), - re_path(r'^tribes/explore', dashboard.views.users_directory, name='tribes_directory'), - - # Alpha functionality - re_path(r'^profile/(.*)/(.*)?', dashboard.views.profile, name='profile_by_tab'), - re_path(r'^profile/(.*)?', dashboard.views.profile, name='profile'), - re_path(r'^labs/?$', dashboard.views.labs, name='labs'), - - # gas views - url(r'^gas/faq/?', dashboard.gas_views.gas_faq, name='gas_faq'), - url(r'^gas/intro/?', dashboard.gas_views.gas_intro, name='gas_intro'), - url(r'^gas/calculator/?', dashboard.gas_views.gas_calculator, name='gas_calculator'), - url(r'^gas/history/?', dashboard.gas_views.gas_history_view, name='gas_history_view'), - url(r'^gas/guzzlers/?', dashboard.gas_views.gas_guzzler_view, name='gas_guzzler_view'), - url(r'^gas/heatmap/?', dashboard.gas_views.gas_heatmap, name='gas_heatmap'), - url(r'^gas/?$', dashboard.gas_views.gas, name='gas'), - - # images - re_path(r'^funding/embed/?', dashboard.embed.embed, name='embed'), - re_path(r'^funding/avatar/?', avatar.views.handle_avatar, name='avatar'), - re_path(r'^dynamic/avatar/(.*)/(.*)?', avatar.views.handle_avatar, name='org_avatar'), - re_path(r'^dynamic/avatar/(.*)', avatar.views.handle_avatar, name='org_avatar2'), - re_path(r'^dynamic/viz/graph/(.*)?$', dataviz.d3_views.viz_graph, name='viz_graph'), - re_path(r'^dynamic/viz/sscatterplot/(.*)?$', dataviz.d3_views.viz_scatterplot_stripped, name='viz_sscatterplot'), - path('dynamic/js/tokens_dynamic.js', retail.views.tokens, name='tokens'), - url('^api/v1/tokens', retail.views.json_tokens, name='json_tokens'), - - # sync methods - url(r'^sync/web3/?', dashboard.views.sync_web3, name='sync_web3'), - url(r'^sync/get_amount/?', dashboard.helpers.amount, name='helpers_amount'), - re_path(r'^sync/get_issue_details/?', dashboard.helpers.issue_details, name='helpers_issue_details'), - - # modals - re_path(r'^modal/get_quickstart_video/?', dashboard.views.get_quickstart_video, name='get_quickstart_video'), - re_path(r'^modal/extend_issue_deadline/?', dashboard.views.extend_issue_deadline, name='extend_issue_deadline'), - - # brochureware views - re_path(r'^homeold/?$', retail.views.index_old, name='homeold'), - re_path(r'^home/?$', retail.views.index, name='home'), - re_path(r'^landing/?$', retail.views.index, name='landing'), - re_path(r'^earn/?$', retail.views.jtbd_earn, name='jtbd_earn'), - re_path(r'^learn/?$', retail.views.jtbd_learn, name='jtbd_learn'), - re_path(r'^connect/?$', retail.views.jtbd_connect, name='jtbd_connect'), - re_path(r'^fund/?$', retail.views.jtbd_fund, name='jtbd_fund'), - re_path(r'^about/?$', retail.views.about, name='about'), - re_path(r'^mission/?$', retail.views.mission, name='mission'), - re_path(r'^jobs/?$', retail.views.jobs, name='jobs'), - re_path(r'^products/?$', retail.views.products, name='products'), - re_path(r'^landing/avatar/?', retail.views.avatar, name='avatar_landing'), - path('not_a_token', retail.views.not_a_token, name='not_a_token'), - re_path(r'^results/?(?P.*)/?', retail.views.results, name='results_by_keyword'), - re_path(r'^results/?$', retail.views.results, name='results'), - re_path(r'^activity/?$', retail.views.activity, name='activity'), - re_path(r'^townsquare/?$', townsquare.views.town_square, name='townsquare'), - re_path(r'^$', retail.views.index, name='index'), - re_path(r'^styleguide/components/?', retail.views.styleguide_components, name='styleguide_components'), - path('action///go', townsquare.views.offer_go, name='townsquare_offer_go'), - path('action/new', townsquare.views.offer_new, name='townsquare_offer_new'), - path( - 'action///decline', - townsquare.views.offer_decline, - name='townsquare_offer_decline' - ), - path('action//', townsquare.views.offer_view, name='townsquare_offer_view'), - url(r'service/metadata/$', townsquare.views.extract_metadata_page, name='meta-extractor'), - url(r'^help/dev/?', retail.views.help_dev, name='help_dev'), - url(r'^help/repo/?', retail.views.help_repo, name='help_repo'), - url(r'^help/faq/?', retail.views.help_faq, name='help_faq'), - url(r'^help/portal/?', retail.views.portal, name='portal'), - url(r'^help/pilot/?', retail.views.help_pilot, name='help_pilot'), - url(r'^help/?$', retail.views.help, name='help'), - url(r'^docs/onboard/?', retail.views.onboard, name='onboard_doc'), - url(r'^extension/chrome/?', retail.views.browser_extension_chrome, name='browser_extension_chrome'), - url(r'^extension/firefox/?', retail.views.browser_extension_firefox, name='browser_extension_firefox'), - url(r'^extension/?', retail.views.browser_extension_chrome, name='browser_extension'), - path('how/', retail.views.how_it_works, name='how_it_works'), - re_path(r'^tribes', retail.views.tribes_home, name='tribes'), - path('tribe//join/', dashboard.views.join_tribe, name='join_tribe'), - path('tribe//save/', dashboard.views.save_tribe, name='save_tribe'), - path('tribe/title/', dashboard.views.set_tribe_title, name='set_tribe_title'), - path('tribe/leader/', dashboard.views.tribe_leader, name='tribe_leader'), - - # basic redirect retail views - re_path(r'^press/?$', retail.views.presskit, name='press'), - re_path(r'^presskit/?$', retail.views.presskit, name='presskit'), - re_path(r'^verified/?$', retail.views.verified, name='verified'), - re_path(r'^community/?$', retail.views.community, name='community'), - re_path(r'^slack/?$', retail.views.slack, name='slack'), - re_path(r'^blog/?$', retail.views.blog, name='blog'), - re_path(r'^submittoken/?$', retail.views.newtoken, name='newtoken'), - re_path(r'^itunes/?$', retail.views.itunes, name='itunes'), - re_path(r'^podcast/?$', retail.views.podcast, name='podcast'), - re_path(r'^casestudy/?$', retail.views.casestudy, name='casestudy'), - re_path(r'^casestudies/?$', retail.views.casestudy, name='casestudies'), - re_path(r'^schwag/?$', retail.views.schwag, name='schwag'), - re_path(r'^btctalk/?$', retail.views.btctalk, name='btctalk'), - re_path(r'^reddit/?$', retail.views.reddit, name='reddit'), - re_path(r'^calendar/?$', retail.views.calendar, name='calendar'), - re_path(r'^livestream/?$', retail.views.calendar, name='livestream'), - re_path(r'^feedback/?$', retail.views.feedback, name='feedback'), - re_path(r'^telegram/?$', retail.views.telegram, name='telegram'), - re_path(r'^twitter/?$', retail.views.twitter, name='twitter'), - re_path(r'^discord/?$', retail.views.discord, name='discord'), - re_path(r'^wallpaper/?$', retail.views.wallpaper, name='wallpaper'), - re_path(r'^wallpapers/?$', retail.views.wallpaper, name='wallpapers'), - re_path(r'^gitter/?$', retail.views.gitter, name='gitter'), - re_path(r'^refer/?$', retail.views.refer, name='refer'), - re_path(r'^fb/?$', retail.views.fb, name='fb'), - re_path(r'^medium/?$', retail.views.medium, name='medium'), - re_path(r'^github/?$', retail.views.github, name='github'), - re_path(r'^youtube/?$', retail.views.youtube, name='youtube'), - re_path(r'^web3/?$', retail.views.web3, name='web3'), - re_path(r'^support/?$', retail.views.support, name='support'), - - # increase funding limit - re_path(r'^requestincrease/?', retail.views.increase_funding_limit_request, name='increase_funding_limit_request'), - - # link shortener - url(r'^l/(.*)$/?', linkshortener.views.linkredirect, name='redirect'), - url(r'^credit/(.*)$/?', credits.views.credits, name='credit'), - - # admin views - re_path(r'^_administration/?', admin.site.urls, name='admin'), - path( - '_administration/email/new_bounty_daily', - marketing.views.new_bounty_daily_preview, - name='admin_new_bounty_daily' - ), - path('_administration/email/', retail.views.admin_index, name='admin_index_emails'), - path('_administration/email/grant_cancellation', retail.emails.grant_cancellation, name='admin_grant_cancellation'), - path( - '_administration/email/request_amount_email', - retail.emails.request_amount_email, - name='admin_request_amount_email' - ), - path( - '_administration/email/featured_funded_bounty', - retail.emails.featured_funded_bounty, - name='admin_featured_funded_bounty' - ), - path( - '_administration/email/subscription_terminated', - retail.emails.subscription_terminated, - name='admin_subscription_terminated' - ), - path('_administration/email/new_grant', retail.emails.new_grant, name='admin_new_grant'), - path('_administration/email/new_grant_approved', retail.emails.new_grant_approved, name='admin_new_grant_approved'), - path('_administration/email/new_contributions', retail.emails.new_contributions, name='admin_new_contributions'), - path( - '_administration/email/thank_you_for_supporting', - retail.emails.thank_you_for_supporting, - name='admin_thank_you_for_supporting' - ), - path( - '_administration/email/support_cancellation', - retail.emails.support_cancellation, - name='admin_support_cancellation' - ), - path( - '_administration/email/successful_contribution', - retail.emails.successful_contribution, - name='admin_successful_contribution' - ), - path( - '_administration/email/pending_contributions', - retail.emails.pending_contribution, - name='admin_pending_contribution' - ), - path('_administration/email/new_kudos', retail.emails.new_kudos, name='new_kudos'), - path('_administration/email/kudos_mint', retail.emails.kudos_mint, name='kudos_mint'), - path('_administration/email/kudos_mkt', retail.emails.kudos_mkt, name='kudos_mkt'), - path('_administration/email/new_bounty', retail.emails.new_bounty, name='admin_new_bounty'), - path('_administration/email/roundup', retail.emails.roundup, name='roundup'), - path('_administration/email/new_tip', retail.emails.new_tip, name='new_tip'), - path('_administration/email/new_match', retail.emails.new_match, name='new_match'), - path('_administration/email/quarterly_roundup', retail.emails.quarterly_roundup, name='quarterly_roundup'), - path('_administration/email/new_work_submission', retail.emails.new_work_submission, name='new_work_submission'), - path('_administration/email/weekly_founder_recap', retail.emails.weekly_recap, name='weekly_founder_recap'), - path( - '_administration/email/weekly_unread_notifications_email', - retail.emails.unread_notification_email_weekly_roundup, - name='unread_notifications_email_weekly_roundup' - ), - path('_administration/email/new_bounty_rejection', retail.emails.new_bounty_rejection, name='new_bounty_rejection'), - path('_administration/email/comment', retail.emails.comment, name='comment_email'), - path('_administration/email/mention', retail.emails.mention, name='mention_email'), - path('_administration/email/wallpost', retail.emails.wallpost, name='wallpost_email'), - path('_administration/email/grant_update', retail.emails.grant_update, name='grant_update_email'), - path('_administration/email/grant_recontribute', retail.emails.grant_recontribute, name='grant_recontribute_email'), - path('_administration/email/grant_txn_failed', retail.emails.grant_txn_failed, name='grant_txn_failed_email'), - path( - '_administration/email/new_bounty_acceptance', - retail.emails.new_bounty_acceptance, - name='new_bounty_acceptance' - ), - path( - '_administration/email/bounty_expire_warning', - retail.emails.bounty_expire_warning, - name='bounty_expire_warning' - ), - path('_administration/email/bounty_feedback', retail.emails.bounty_feedback, name='bounty_feedback'), - path('_administration/email/funder_stale', retail.emails.funder_stale, name='funder_stale'), - path( - '_administration/email/start_work_expire_warning', - retail.emails.start_work_expire_warning, - name='start_work_expire_warning' - ), - path('_administration/email/start_work_expired', retail.emails.start_work_expired, name='start_work_expired'), - path('_administration/email/gdpr_reconsent', retail.emails.gdpr_reconsent, name='gdpr_reconsent'), - path('_administration/email/share_bounty', retail.emails.share_bounty, name='share_bounty'), - path('_administration/email/new_tip/resend', retail.emails.resend_new_tip, name='resend_new_tip'), - path( - '_administration/email/tribe_hackathon_prizes', - retail.emails.tribe_hackathon_prizes, - name='tribe_hackathon_prizes' - ), - path('_administration/email/export_data', retail.emails.export_data, name='export_data'), - path('_administration/email/export_data_failed', retail.emails.export_data_failed, name='export_data_failed'), - re_path( - r'^_administration/process_accesscode_request/(.*)$', - tdi.views.process_accesscode_request, - name='process_accesscode_request' - ), - re_path(r'^_administration/bulkemail/', dashboard.views.bulkemail, name='bulkemail'), - re_path( - r'^_administration/email/start_work_approved$', retail.emails.start_work_approved, name='start_work_approved' - ), - re_path( - r'^_administration/email/start_work_rejected$', retail.emails.start_work_rejected, name='start_work_rejected' - ), - re_path( - r'^_administration/email/start_work_new_applicant$', - retail.emails.start_work_new_applicant, - name='start_work_new_applicant' - ), - re_path( - r'^_administration/email/start_work_applicant_about_to_expire$', - retail.emails.start_work_applicant_about_to_expire, - name='start_work_applicant_about_to_expire' - ), - re_path( - r'^_administration/email/start_work_applicant_expired$', - retail.emails.start_work_applicant_expired, - name='start_work_applicant_expired' - ), - re_path( - r'^_administration/email/funder_payout_reminder$', - retail.emails.funder_payout_reminder, - name='funder_payout_reminder' - ), - re_path( - r'^_administration/email/no_applicant_reminder$', - retail.emails.no_applicant_reminder, - name='no_applicant_reminder' - ), - re_path(r'^_administration/email/match_distribution$', retail.emails.match_distribution, name='match_distribution'), - re_path( - r'^_administration/email/clr_match_claim$', - retail.emails.grant_match_distribution_final_txn, - name='clr_match_claim' - ), +] - # docs - re_path(r'^_administration/docs/', include('django.contrib.admindocs.urls')), - - # settings - re_path(r'^settings/email/(.*)', marketing.views.email_settings, name='email_settings'), - re_path(r'^settings/privacy/?', marketing.views.privacy_settings, name='privacy_settings'), - re_path(r'^settings/matching/?', marketing.views.matching_settings, name='matching_settings'), - re_path(r'^settings/feedback/?', marketing.views.feedback_settings, name='feedback_settings'), - re_path(r'^settings/slack/?', marketing.views.slack_settings, name='slack_settings'), - re_path(r'^settings/account/?', marketing.views.account_settings, name='account_settings'), - re_path(r'^settings/tokens/?', marketing.views.token_settings, name='token_settings'), - re_path(r'^settings/job/?', marketing.views.job_settings, name='job_settings'), - re_path(r'^settings/organizations/?', marketing.views.org_settings, name='org_settings'), - re_path(r'^settings/tax/?', marketing.views.tax_settings, name='tax_settings'), - re_path(r'^settings/(.*)?', marketing.views.email_settings, name='settings'), - re_path(r'^settings$', marketing.views.org_settings, name='settings2'), - - # marketing views - url(r'^leaderboard/(.*)', marketing.views.leaderboard, name='leaderboard'), - path('leaderboard', marketing.views._leaderboard, name='_leaderboard'), - - # dataviz views - re_path(r'^_administration/stats/$', dataviz.views.stats, name='stats'), - re_path(r'^_administration/cohort/$', dataviz.views.cohort, name='cohort'), - re_path(r'^_administration/funnel/$', dataviz.views.funnel, name='funnel'), - re_path(r'^_administration/mesh/?$', dataviz.d3_views.mesh_network_viz, name='mesh_network_viz'), - url(r'^blocknative', perftools.views.blocknative, name='blocknative'), - - # quadratic lands - path('quadraticlands/', redirect_view), - re_path(r'^quadraticlands/?', redirect_view), - re_path(r'^quadraticland/?', redirect_view), - - # for robots - url(r'^robots.txt/?', retail.views.robotstxt, name='robotstxt'), - path( - 'sitemap.xml', - cache_page(604800)(sitemap_index), {'sitemaps': sitemaps}, - name='django.contrib.sitemaps.views.index' - ), - path( - 'sitemap-
.xml', - cache_page(604800)(sitemap), {'sitemaps': sitemaps}, - name='django.contrib.sitemaps.views.sitemap' - ), - # Interests - path('interest/modal', dashboard.views.get_interest_modal, name='get_interest_modal'), - path('actions/bounty//interest/new/', dashboard.views.new_interest, name='express-interest'), - path('actions/bounty//interest/remove/', dashboard.views.remove_interest, name='remove-interest'), - path( - 'actions/bounty//interest//uninterested/', - dashboard.views.uninterested, - name='uninterested' - ), - # Legacy Support - path('legacy/', include('legacy.urls', namespace='legacy')), - path('logout/', auth_views.LogoutView.as_view(), name='logout'), - re_path(r'^gh-login/$', dashboard.views.gh_login, name='gh_login'), - re_path(r'^login/github$', dashboard.views.gh_login, name='gh_login_'), - re_path(r'^complete/?$', retail.views.index, name='gh_complete_redirect'), - path('', include('social_django.urls', namespace='social')), - # webhook routes - # sendgrid webhook processing - path(settings.SENDGRID_EVENT_HOOK_URL, marketing.webhookviews.process, name='sendgrid_event_process'), - - # gitcoinbot - url(settings.GITHUB_EVENT_HOOK_URL, gitcoinbot.views.payload, name='payload'), - url(r'^impersonate/', include('impersonate.urls')), - url(r'^api/v0.1/hackathon_project/set_winner/', dashboard.views.set_project_winner, name='project_winner'), - url(r'^api/v0.1/hackathon_project/set_notes/', dashboard.views.set_project_notes, name='project_notes'), - - # users - url(r'^api/v0.1/user_bounties/', dashboard.views.get_user_bounties, name='get_user_bounties'), - url(r'^api/v0.1/users_csv/', dashboard.views.output_users_to_csv, name='users_csv'), - url(r'^api/v0.1/bounty_mentor/', dashboard.views.bounty_mentor, name='bounty_mentor'), - url(r'^api/v0.1/users_fetch/', dashboard.views.users_fetch, name='users_fetch'), -] +# urlpatterns = [ + +# # oauth2 provider +# url('^o/', include('oauth2_provider.urls', namespace='oauth2_provider')), +# path('jsi18n/', JavaScriptCatalog.as_view(), name='javascript-catalog'), +# url('^api/v1/bounty/create', dashboard.views.create_bounty_v1, name='create_bounty_v1'), +# url('^api/v1/bounty/cancel', dashboard.views.cancel_bounty_v1, name='cancel_bounty_v1'), +# url('^api/v1/bounty/fulfill', dashboard.views.fulfill_bounty_v1, name='fulfill_bounty_v1'), +# path('api/v1/bounty//close', dashboard.views.close_bounty_v1, name='close_bounty_v1'), +# path('api/v1/bounty/payout/', dashboard.views.payout_bounty_v1, name='payout_bounty_v1'), +# path('api/v1/reverse-proxy/', dashboard.views.reverse_proxy_rpc_v1, name='payout_tx_forwarder_v1'), +# re_path(r'.*api/v0.1/video/presence$', townsquare.views.video_presence, name='video_presence'), + +# # inbox +# re_path(r'^inbox/?', include('inbox.urls', namespace='inbox')), + +# # board +# re_path(r'^dashboard/?', dashboard.views.board, name='dashboard'), +# re_path(r'^passport/?', dashboard.views.passport, name='passport'), + +# # kudos +# re_path(r'^kudos/?$', kudos.views.about, name='kudos_main'), +# re_path(r'^kudos/about/?$', kudos.views.about, name='kudos_about'), +# re_path(r'^kudos/sync/?$', kudos.views.sync, name='kudos_sync'), +# re_path(r'^kudos/marketplace/?$', kudos.views.marketplace, name='kudos_marketplace'), +# re_path(r'^kudos/mint/?$', kudos.views.mint, name='kudos_mint'), +# re_path(r'^kudos/send/?$', kudos.views.send_2, name='kudos_send'), +# path('kudos/send/3/', kudos.views.send_3, name='kudos_send_3'), +# path('kudos/send/4/', kudos.views.send_4, name='kudos_send_4'), +# re_path(r'^lazy_load_kudos/$', dashboard.views.lazy_load_kudos, name='lazy_load_kudos'), +# re_path(r'^kudos/receive/v3/(?P.*)/(?P.*)/(?P.*)?', kudos.views.receive, name='kudos_receive'), +# re_path(r'^kudos/redeem/(?P.*)/?$', kudos.views.receive_bulk, name='kudos_receive_bulk'), +# re_path(r'^kudos/search/$', kudos.views.search, name='kudos_search'), +# re_path( +# r'^kudos/(?P
\w*)/(?P\d+)/(?P\w*)', +# kudos.views.details_by_address_and_token_id, +# name='kudos_details_by_address_and_token_id' +# ), +# re_path( +# r'^kudos/(?P
\w*)/(?P\d+)', +# kudos.views.details_by_address_and_token_id, +# name='kudos_details_by_address_and_token_id2' +# ), +# re_path(r'^kudos/(?P\d+)/(?P\w*)', kudos.views.details, name='kudos_details'), +# re_path(r'^kudos/address/(?P.*)', kudos.views.kudos_preferred_wallet, name='kudos_preferred_wallet'), +# re_path(r'^dynamic/kudos/(?P\d+)/(?P\w*)', kudos.views.image, name='kudos_dynamic_img'), +# re_path(r'^kudos/new/?', kudos.views.newkudos, name='newkudos'), +# path('dynamic/grants_cart_thumb//', cart_thumbnail, name='cart_thumbnail'), + +# # mailing list +# url('mailing_list/funders/', dashboard.views.funders_mailing_list), +# url('mailing_list/hunters/', dashboard.views.hunters_mailing_list), +# url(r'^api/user/me', dashboard.views.oauth_connect, name='oauth_connect'), +# # api views +# url(r'^api/v0.1/profile/(.*)?/keywords', dashboard.views.profile_keywords, name='profile_keywords'), +# url(r'^api/v0.1/profile/(.*)?/activity.json', dashboard.views.profile_activity, name='profile_activity'), +# url(r'^api/v0.1/profile/(.*)?/earnings.csv', dashboard.views.profile_earnings, name='profile_earnings'), +# url(r'^api/v0.1/profile/(.*)?/grants.csv', dashboard.views.profile_grants, name='profile_grants'), +# url(r'^api/v0.1/profile/(.*)?/quests.csv', dashboard.views.profile_quests, name='profile_quests'), +# url(r'^api/v0.1/profile/(.*)?/ratings/(.*).csv', dashboard.views.profile_ratings, name='profile_ratings'), +# url(r'^api/v0.1/profile/(.*)?/viewers.csv', dashboard.views.profile_viewers, name='profile_viewers'), +# url(r'^api/v0.1/profile/(.*)?/spent.csv', dashboard.views.profile_spent, name='profile_spent'), +# url(r'^api/v0.1/profile/banner', dashboard.views.change_user_profile_banner, name='change_user_profile_banner'), +# url(r'^api/v0.1/profile/settings', dashboard.views.profile_settings, name='profile_settings'), +# url(r'^api/v0.1/profile/backup', dashboard.views.profile_backup, name='profile_backup'), +# path('api/v0.1/activity/', townsquare.views.api, name='townsquare_api'), +# path('api/v0.1/comment/', townsquare.views.comment_v1, name='comment_v1'), +# path('api/v0.1/emailsettings/', townsquare.views.emailsettings, name='townsquare_emailsettings'), +# url(r'^api/v0.1/activity', retail.views.create_status_update, name='create_status_update'), +# url( +# r'^api/v0.1/profile/(.*)?/jobopportunity', +# dashboard.views.profile_job_opportunity, +# name='profile_job_opportunity' +# ), +# url( +# r'^api/v0.1/profile/(.*)?/setTaxSettings', +# dashboard.views.profile_tax_settings, +# name='profile_set_tax_settings' +# ), + + +# # grants2.0 Verification Services +# url( +# r'^api/v2/profile/(?P.*)/passport/stamp/check', +# dashboard.views.check_passport_stamps, +# name='check_passport_stamp' +# ), +# url( +# r'^api/v2/profile/(?P.*)/passport/verify', +# dashboard.views.verify_passport, +# name='verify_passport' +# ), +# url( +# r'^api/v2/profile/(?P.*)/passport/unlink', +# dashboard.views.unlink_passport, +# name='unlink_passport' +# ), +# url( +# r'^api/v2/profile/(?P.*)/passport/trust_bonus', +# dashboard.views.get_passport_trust_bonus, +# name='get_passport_trust_bonus' +# ), + + +# # grants1.0 Verification Services +# url( +# r'^api/v0.1/profile/(?P.*)/request_user_sms/?$', +# dashboard.views.send_verification, +# name='request_verification' +# ), +# url( +# r'^api/v0.1/profile/(?P.*)/verify_user_sms/?$', +# dashboard.views.validate_verification, +# name='request_verification' +# ), +# url( +# r'^api/v0.1/profile/(?P.*)/disconnect_user_sms/?$', +# dashboard.views.disconnect_sms, +# name='disconnect_sms' +# ), +# url( +# r'^api/v0.1/profile/(?P.*)/start_session_idena', +# dashboard.views.start_session_idena, +# name='start_session_idena' +# ), +# url( +# r'^api/v0.1/profile/(?P.*)/authenticate_idena', +# dashboard.views.authenticate_idena, +# name='authenticate_idena' +# ), +# url(r'^api/v0.1/profile/(?P.*)/logout_idena', dashboard.views.logout_idena, name='logout_idena'), +# url( +# r'^api/v0.1/profile/(?P.*)/recheck_idena_status', +# dashboard.views.recheck_idena_status, +# name='recheck_idena_status' +# ), +# url( +# r'^api/v0.1/profile/(?P.*)/verify_user_twitter', +# dashboard.views.verify_user_twitter, +# name='verify_user_twitter' +# ), +# url( +# r'^api/v0.1/profile/(?P.*)/disconnect_user_twitter', +# dashboard.views.disconnect_user_twitter, +# name='disconnect_user_twitter' +# ), +# url( +# r'^api/v0.1/profile/(?P.*)/verify_user_poap', dashboard.views.verify_user_poap, name='verify_user_poap' +# ), +# url( +# r'^api/v0.1/profile/(?P.*)/disconnect_user_poap', +# dashboard.views.disconnect_user_poap, +# name='disconnect_user_poap' +# ), +# url( +# r'^api/v0.1/profile/(?P.*)/verify_user_brightid', +# dashboard.views.verify_user_brightid, +# name='verify_user_brightid' +# ), +# url( +# r'^api/v0.1/profile/(?P.*)/disconnect_user_brightid', +# dashboard.views.disconnect_user_brightid, +# name='disconnect_user_brightid' +# ), +# url(r'^api/v0.1/profile/(?P.*)/verify_user_poh', dashboard.views.verify_user_poh, name='verify_user_poh', +# ), +# url( +# r'^api/v0.1/profile/(?P.*)/disconnect_user_poh', +# dashboard.views.disconnect_user_poh, +# name='disconnect_user_poh' +# ), +# url( +# r'^api/v0.1/profile/(?P.*)/request_verify_google', +# dashboard.views.request_verify_google, +# name='request_verify_google' +# ), +# url(r'^api/v0.1/profile/verify_user_google', dashboard.views.verify_user_google, name='verify_user_google'), +# url( +# r'^api/v0.1/profile/(?P.*)/disconnect_user_google', +# dashboard.views.disconnect_user_google, +# name='disconnect_user_google' +# ), +# url( +# r'^api/v0.1/profile/(?P.*)/request_verify_facebook', +# dashboard.views.request_verify_facebook, +# name='request_verify_facebook' +# ), +# url(r'^api/v0.1/profile/verify_user_facebook', dashboard.views.verify_user_facebook, name='verify_user_facebook'), +# url( +# r'^api/v0.1/profile/(?P.*)/disconnect_user_facebook', +# dashboard.views.disconnect_user_facebook, +# name='disconnect_user_facebook' +# ), +# url(r'api/v0.1/profile/(?P.*)/verify_user_ens', dashboard.views.verify_user_ens, name='verify_user_ens'), +# url( +# r'api/v0.1/profile/(?P.*)/disconnect_user_ens', +# dashboard.views.disconnect_user_ens, +# name='disconnect_user_ens' +# ), +# # url( +# # r'^api/v0.1/profile/verify_user_duniter', +# # dashboard.views.verify_user_duniter, +# # name='verify_user_duniter' +# # ), + + +# url(r'^api/v0.1/profile/(?P.*)', dashboard.views.profile_details, name='profile_details'), +# url(r'^api/v0.1/user_card/(?P.*)', dashboard.views.user_card, name='user_card'), +# url(r'^api/v0.1/banners', dashboard.views.load_banners, name='load_banners'), +# url(r'^api/v0.1/status_wallpapers', townsquare.views.load_wallpapers, name='load_wallpapers'), +# url( +# r'^api/v0.1/get_suggested_contributors', +# dashboard.views.get_suggested_contributors, +# name='get_suggested_contributors' +# ), +# url( +# r'^api/v0.1/ignore_suggested_tribes/(?P.*)', +# townsquare.views.ignored_suggested_tribe, +# name='ignore_suggested_tribes' +# ), +# url( +# r'^api/v0.1/social_contribution_email', +# dashboard.views.social_contribution_email, +# name='social_contribution_email' +# ), +# url(r'^api/v0.1/org_perms', dashboard.views.org_perms, name='org_perms'), +# url(r'^api/v0.1/bulk_invite', dashboard.views.bulk_invite, name='bulk_invite'), +# url(r'^api/v0.1/', include(dbrouter.urls)), +# url(r'^api/v0.1/', include(kdrouter.urls)), +# url(r'^api/v0.1/', include(grant_router.urls)), +# url(r'^api/v0.1/', include(avatar_router.urls)), +# url(r'^actions/api/v0.1/', include(dbrouter.urls)), # same as active +# url(r'^api/v0.1/users_search/', dashboard.views.get_users, name='users_search'), +# url(r'^api/v0.1/kudos_search/', dashboard.views.get_kudos, name='kudos_search'), +# url(r'^api/v0.1/keywords_search/', dashboard.views.get_keywords, name='keywords_search'), +# url(r'^api/v0.1/search/', search.views.get_search, name='search'), +# url(r'^api/v0.1/choose_persona/', dashboard.views.choose_persona, name='choose_persona'), +# url(r'^api/v1/onboard_save/', dashboard.views.onboard_save, name='onboard_save'), +# url(r'^api/v1/file_upload/', dashboard.views.file_upload, name='file_upload'), +# # url(r'^api/v1/mautic/(?P.*)', dashboard.views.mautic_api, name='mautic_api'), +# # url(r'^api/v1/mautic_profile_save/', dashboard.views.mautic_profile_save, name='mautic_profile_save'), + +# # Health check endpoint +# re_path(r'^health/', include('health_check.urls')), +# re_path(r'^lbcheck/?', healthcheck.views.lbcheck, name='lbcheck'), +# re_path(r'^spec/?', healthcheck.views.spec, name='spec'), + +# # grant views +# path('grants/', include('grants.urls', namespace='grants')), +# re_path(r'^grants/?', include('grants.urls', namespace='grants_catchall_')), +# re_path(r'^grant/?', include('grants.urls', namespace='grants_catchall')), + +# # dashboard views +# re_path(r'^onboard/(?P\w+)/?$', dashboard.views.onboard, name='onboard'), +# re_path(r'^onboard/contributor/avatar/?$', dashboard.views.onboard_avatar, name='onboard_avatar'), +# re_path(r'^onboard/?$', dashboard.views.onboard, name='onboard'), +# url(r'^postcomment/', dashboard.views.post_comment, name='post_comment'), +# url(r'^explorer/?', dashboard.views.dashboard, name='explorer'), + +# # Funder dashboard +# path('funder_dashboard//', dashboard.views.funder_dashboard, name='funder_dashboard'), +# path( +# 'funder_dashboard/bounties//', +# dashboard.views.funder_dashboard_bounty_info, +# name='funder_dashboard_bounty_info' +# ), + +# # quests +# re_path(r'^quests/?$', quests.views.index, name='quests_index'), +# re_path(r'^quests/next?$', quests.views.next_quest, name='next_quest'), +# re_path(r'^quests/(?P\d+)/feedback', quests.views.feedback, name='quest_feedback'), +# re_path(r'^quests/(?P\d+)/(?P\w*)', quests.views.details, name='quest_details'), +# re_path(r'^quests/new/?', quests.views.editquest, name='newquest'), +# re_path(r'^quests/edit/(?P\d+)/?', quests.views.editquest, name='editquest'), + +# #passport +# re_path(r'^passport/$', passport.views.index, name='passport_gen'), +# path('passport/', passport.views.passport, name='view_passport'), + +# # Contributor dashboard +# path( +# 'contributor_dashboard//', dashboard.views.contributor_dashboard, name='contributor_dashboard' +# ), +# path('revenue/attestations/new', revenue.views.new_attestation, name='revenue_new_attestation'), + +# # Hackathons / special events +# path('hackathon//new/', dashboard.views.new_hackathon_bounty, name='new_hackathon_bounty'), +# path('hackathon//new', dashboard.views.new_hackathon_bounty, name='new_hackathon_bounty2'), +# path('hackathon//', dashboard.views.hackathon, name='hackathon'), +# path('hackathon/dashboard/', dashboard.views.dashboard_sponsors, name='sponsors-dashboard'), +# path( +# 'hackathon/dashboard//', +# dashboard.views.dashboard_sponsors, +# name='sponsors-dashboard' +# ), +# path('hackathon/', dashboard.views.hackathon, name='hackathon2'), +# path('hackathon//onboard/', dashboard.views.hackathon_onboard, name='hackathon_onboard2'), +# path('hackathon///', dashboard.views.hackathon, name='hackathon'), +# path('hackathon//onboard', dashboard.views.hackathon_onboard, name='hackathon_onboard'), +# path('hackathon/onboard/', dashboard.views.hackathon_onboard, name='hackathon_onboard2'), +# path('hackathon/onboard//', dashboard.views.hackathon_onboard, name='hackathon_onboard3'), +# path('hackathon//projects/', dashboard.views.hackathon_projects, name='hackathon_projects'), +# path('hackathon//showcase/', dashboard.views.hackathon, name='hackathon_showcase_proxy'), +# path('hackathon//prizes/', dashboard.views.hackathon, name='hackathon_prizes'), +# path('hackathon//townsquare/', dashboard.views.hackathon, name='hackathon_ts'), +# path( +# 'hackathon/projects//', dashboard.views.hackathon_project, name='hackathon_project' +# ), +# path( +# 'hackathon/projects///', +# dashboard.views.hackathon_project, +# name='hackathon_project2' +# ), +# path('modal/new_project//', dashboard.views.hackathon_get_project, name='hackathon_get_project'), +# path( +# 'modal/new_project///', +# dashboard.views.hackathon_get_project, +# name='hackathon_edit_project' +# ), +# path( +# 'hackathon//projects/', +# dashboard.views.hackathon_project_page, +# name='hackathon_project_page' +# ), +# path( +# 'hackathon//projects//', +# dashboard.views.hackathon_project_page, +# name='hackathon_project_page' +# ), +# path( +# 'hackathon//projects////', +# dashboard.views.hackathon_project_page, +# name='hackathon_project_page' +# ), +# path('modal/save_project/', dashboard.views.hackathon_save_project, name='hackathon_save_project'), +# url(r'^hackathon//?$/?', dashboard.views.hackathon, name='hackathon'), +# url(r'^hackathon///?$/?', dashboard.views.hackathon, name='hackathon'), + +# # list all hackathons +# re_path(r'^hackathon-list/?$', dashboard.views.get_hackathons, name='get_hackathons'), +# re_path(r'^hackathon/?$', dashboard.views.get_hackathons, name='get_hackathons'), +# re_path(r'^hackathons/?$', dashboard.views.get_hackathons, name='get_hackathons'), +# url(r'^register_hackathon/', dashboard.views.hackathon_registration, name='hackathon_registration'), +# path('api/v0.1/hackathon//save/', dashboard.views.save_hackathon, name='save_hackathon'), +# path('api/v1/hackathon//prizes', dashboard.views.hackathon_prizes, name='hackathon_prizes_api'), +# path('api/v0.1/hackathon//showcase/', dashboard.views.showcase, name='hackathon_showcase'), +# path('api/v0.1/hackathon//events/', dashboard.views.events, name='hackathon_events'), +# path('api/v0.1/projects/', dashboard.views.get_project, name='project_context'), +# # action URLs +# url(r'^funder', retail.views.funder_bounties_redirect, name='funder_bounties_redirect'), +# re_path( +# r'^contributor/?(?P.*)/?', +# retail.views.contributor_bounties_redirect, +# name='contributor_bounties_redirect' +# ), +# url(r'^bounties/funder', retail.views.funder_bounties, name='funder_bounties'), +# re_path( +# r'^bounties/contributor/?(?P.*)/?', retail.views.contributor_bounties, name='contributor_bounties' +# ), +# re_path(r'^bounty/quickstart/?', dashboard.views.quickstart, name='quickstart'), +# url(r'^bounty/new/?', dashboard.views.move_to_buidlbox, name='new_bounty'), +# re_path(r'^bounty/change/(?P.*)?', dashboard.views.change_bounty, name='change_bounty'), +# # TODO: Rename below to bounty/ +# path('issue/fulfill', dashboard.views.fulfill_bounty, name='fulfill_bounty'), +# path('issue/accept', dashboard.views.accept_bounty, name='process_funding'), +# path('issue/advanced_payout', dashboard.views.bulk_payout_bounty, name='bulk_payout_bounty'), +# path('issue/invoice', dashboard.views.invoice, name='invoice'), +# path('issue/payout', dashboard.views.payout_bounty, name='payout_bounty'), +# path('issue/increase', dashboard.views.increase_bounty, name='increase_bounty'), +# path('issue/cancel', dashboard.views.cancel_bounty, name='kill_bounty'), +# path('issue/cancel_reason', dashboard.views.cancel_reason, name='cancel_reason'), +# path('modal/social_contribution', dashboard.views.social_contribution_modal, name='social_contribution_modal'), +# path( +# '//modal/funder_payout_reminder/', +# dashboard.views.funder_payout_reminder_modal, +# name='funder_payout_reminder_modal' +# ), + +# # Rating +# path('modal/rating//', dashboard.views.rating_modal, name='rating_modal2'), +# path('modal/rating///', dashboard.views.rating_modal, name='rating_modal'), +# path('modal/rating_capture/', dashboard.views.rating_capture, name='rating_capture'), +# url(r'^api/v0.1/unrated_bounties/', dashboard.views.unrated_bounties, name='unrated_bounties'), + +# # Notify Funder Modal Submission +# path( +# 'actions/bounty///notify/funder_payout_reminder/', +# dashboard.views.funder_payout_reminder, +# name='funder_payout_reminder' +# ), +# path( +# 'actions/bounty//extend_expiration/', +# dashboard.views.extend_expiration, +# name='extend_expiration' +# ), + +# # Avatars +# path('avatar/', include('avatar.urls', namespace='avatar')), + +# # Interests +# path('actions/bounty//interest/new/', dashboard.views.new_interest, name='express-interest'), +# path('actions/bounty//interest/remove/', dashboard.views.remove_interest, name='remove-interest'), +# path( +# 'actions/bounty//interest//uninterested/', +# dashboard.views.uninterested, +# name='uninterested' +# ), + +# # View Bounty +# # TODO: The 2 URLs below issue_details_new2 and issue_details_new3 will not be used any more (we should not create such +# # links any more), and can be removed in the future. We are keeping these for now to avoid breaking the +# # existing links that users might have saved already. +# url( +# r'^issue/(?P.*)/(?P.*)/(?P.*)/(?P.*)', +# dashboard.views.bounty_details, +# name='issue_details_new3' +# ), +# url( +# r'^issue/(?P.*)/(?P.*)/(?P.*)', +# dashboard.views.bounty_details, +# name='issue_details_new2' +# ), +# re_path(r'^funding/details/?', dashboard.views.bounty_details, name='funding_details'), +# re_path(r'^issue/(?P\d+)', dashboard.views.bounty_details, name='issue_details_new4'), +# re_path(r'^issue/(?P.*)', dashboard.views.bounty_invite_url, name='unique_bounty_invite'), + +# # Tips +# url( +# r'^tip/receive/v3/(?P.*)/(?P.*)/(?P.*)?', +# dashboard.tip_views.receive_tip_v3, +# name='receive_tip' +# ), +# url(r'^tip/address/(?P.*)', dashboard.tip_views.tipee_address, name='tipee_address'), +# url(r'^tip/send/4/?', dashboard.tip_views.send_tip_4, name='send_tip_4'), +# url(r'^tip/send/3/?', dashboard.tip_views.send_tip_3, name='send_tip_3'), +# url(r'^tip/send/2/?', dashboard.tip_views.send_tip_2, name='send_tip_2'), +# url(r'^tip/send/?', dashboard.tip_views.send_tip, name='send_tip'), +# url(r'^send/?$', dashboard.tip_views.send_tip, name='tip'), +# url(r'^tip/?$', dashboard.tip_views.send_tip_2, name='tip'), +# url(r'^requestmoney/?', dashboard.tip_views.request_money, name='request_money'), +# # Legal +# re_path(r'^terms/?', dashboard.views.terms, name='_terms'), +# re_path(r'^legal/terms/?', dashboard.views.terms, name='terms'), +# re_path(r'^legal/privacy/?', dashboard.views.privacy, name='privacy'), +# re_path(r'^legal/cookie/?', dashboard.views.cookie, name='cookie'), +# re_path(r'^legal/prirp/?', dashboard.views.prirp, name='prirp'), +# re_path(r'^legal/apitos/?', dashboard.views.apitos, name='apitos'), +# url(r'^legal/?$', dashboard.views.terms, name='legal'), + +# # User Directory +# re_path(r'^users/?', dashboard.views.users_directory, name='users_directory'), +# re_path(r'^user_directory/?', dashboard.views.users_directory_elastic, name='users_directory_elastic'), +# re_path(r'^user_lookup/?', dashboard.views.user_lookup, name='user_directory_lookup'), +# re_path(r'^tribes/explore', dashboard.views.users_directory, name='tribes_directory'), + +# # Alpha functionality +# re_path(r'^profile/(.*)/(.*)?', dashboard.views.profile, name='profile_by_tab'), +# re_path(r'^profile/(.*)?', dashboard.views.profile, name='profile'), +# re_path(r'^labs/?$', dashboard.views.labs, name='labs'), + +# # gas views +# url(r'^gas/faq/?', dashboard.gas_views.gas_faq, name='gas_faq'), +# url(r'^gas/intro/?', dashboard.gas_views.gas_intro, name='gas_intro'), +# url(r'^gas/calculator/?', dashboard.gas_views.gas_calculator, name='gas_calculator'), +# url(r'^gas/history/?', dashboard.gas_views.gas_history_view, name='gas_history_view'), +# url(r'^gas/guzzlers/?', dashboard.gas_views.gas_guzzler_view, name='gas_guzzler_view'), +# url(r'^gas/heatmap/?', dashboard.gas_views.gas_heatmap, name='gas_heatmap'), +# url(r'^gas/?$', dashboard.gas_views.gas, name='gas'), + +# # images +# re_path(r'^funding/embed/?', dashboard.embed.embed, name='embed'), +# re_path(r'^funding/avatar/?', avatar.views.handle_avatar, name='avatar'), +# re_path(r'^dynamic/avatar/(.*)/(.*)?', avatar.views.handle_avatar, name='org_avatar'), +# re_path(r'^dynamic/avatar/(.*)', avatar.views.handle_avatar, name='org_avatar2'), +# re_path(r'^dynamic/viz/graph/(.*)?$', dataviz.d3_views.viz_graph, name='viz_graph'), +# re_path(r'^dynamic/viz/sscatterplot/(.*)?$', dataviz.d3_views.viz_scatterplot_stripped, name='viz_sscatterplot'), +# path('dynamic/js/tokens_dynamic.js', retail.views.tokens, name='tokens'), +# url('^api/v1/tokens', retail.views.json_tokens, name='json_tokens'), + +# # sync methods +# url(r'^sync/web3/?', dashboard.views.sync_web3, name='sync_web3'), +# url(r'^sync/get_amount/?', dashboard.helpers.amount, name='helpers_amount'), +# re_path(r'^sync/get_issue_details/?', dashboard.helpers.issue_details, name='helpers_issue_details'), +# re_path(r'^sync/validate_org_url/?', dashboard.helpers.validate_org_url, name='helpers_validate_org_url'), + +# # modals +# re_path(r'^modal/get_quickstart_video/?', dashboard.views.get_quickstart_video, name='get_quickstart_video'), +# re_path(r'^modal/extend_issue_deadline/?', dashboard.views.extend_issue_deadline, name='extend_issue_deadline'), + +# # brochureware views +# re_path(r'^homeold/?$', retail.views.index_old, name='homeold'), +# re_path(r'^home/?$', retail.views.index, name='home'), +# re_path(r'^landing/?$', retail.views.index, name='landing'), +# re_path(r'^earn/?$', retail.views.jtbd_earn, name='jtbd_earn'), +# re_path(r'^learn/?$', retail.views.jtbd_learn, name='jtbd_learn'), +# re_path(r'^connect/?$', retail.views.jtbd_connect, name='jtbd_connect'), +# re_path(r'^fund/?$', retail.views.jtbd_fund, name='jtbd_fund'), +# re_path(r'^about/?$', retail.views.about, name='about'), +# re_path(r'^mission/?$', retail.views.mission, name='mission'), +# re_path(r'^jobs/?$', retail.views.jobs, name='jobs'), +# re_path(r'^products/?$', retail.views.products, name='products'), +# re_path(r'^landing/avatar/?', retail.views.avatar, name='avatar_landing'), +# path('not_a_token', retail.views.not_a_token, name='not_a_token'), +# re_path(r'^results', retail.views.results2023, name='results-2023'), +# re_path(r'^results/?(?P.*)/?', retail.views.results, name='results_by_keyword'), +# re_path(r'^results/?$', retail.views.results, name='results'), +# re_path(r'^activity/?$', retail.views.activity, name='activity'), +# re_path(r'^townsquare/?$', townsquare.views.town_square, name='townsquare'), +# re_path(r'^$', retail.views.index, name='index'), +# re_path(r'^styleguide/components/?', retail.views.styleguide_components, name='styleguide_components'), +# path('action///go', townsquare.views.offer_go, name='townsquare_offer_go'), +# path('action/new', townsquare.views.offer_new, name='townsquare_offer_new'), +# path( +# 'action///decline', +# townsquare.views.offer_decline, +# name='townsquare_offer_decline' +# ), +# path('action//', townsquare.views.offer_view, name='townsquare_offer_view'), +# url(r'service/metadata/$', townsquare.views.extract_metadata_page, name='meta-extractor'), +# url(r'^help/dev/?', retail.views.help_dev, name='help_dev'), +# url(r'^help/repo/?', retail.views.help_repo, name='help_repo'), +# url(r'^help/faq/?', retail.views.help_faq, name='help_faq'), +# url(r'^help/portal/?', retail.views.portal, name='portal'), +# url(r'^help/pilot/?', retail.views.help_pilot, name='help_pilot'), +# url(r'^help/?$', retail.views.help, name='help'), +# url(r'^docs/onboard/?', retail.views.onboard, name='onboard_doc'), +# url(r'^extension/chrome/?', retail.views.browser_extension_chrome, name='browser_extension_chrome'), +# url(r'^extension/firefox/?', retail.views.browser_extension_firefox, name='browser_extension_firefox'), +# url(r'^extension/?', retail.views.browser_extension_chrome, name='browser_extension'), +# path('how/', retail.views.how_it_works, name='how_it_works'), +# re_path(r'^tribes', retail.views.tribes_home, name='tribes'), +# path('tribe//join/', dashboard.views.join_tribe, name='join_tribe'), +# path('tribe//save/', dashboard.views.save_tribe, name='save_tribe'), +# path('tribe/title/', dashboard.views.set_tribe_title, name='set_tribe_title'), +# path('tribe/leader/', dashboard.views.tribe_leader, name='tribe_leader'), + +# # basic redirect retail views +# re_path(r'^press/?$', retail.views.presskit, name='press'), +# re_path(r'^presskit/?$', retail.views.presskit, name='presskit'), +# re_path(r'^verified/?$', retail.views.verified, name='verified'), +# re_path(r'^community/?$', retail.views.community, name='community'), +# re_path(r'^slack/?$', retail.views.slack, name='slack'), +# re_path(r'^blog/?$', retail.views.blog, name='blog'), +# re_path(r'^submittoken/?$', retail.views.newtoken, name='newtoken'), +# re_path(r'^itunes/?$', retail.views.itunes, name='itunes'), +# re_path(r'^podcast/?$', retail.views.podcast, name='podcast'), +# re_path(r'^casestudy/?$', retail.views.casestudy, name='casestudy'), +# re_path(r'^casestudies/?$', retail.views.casestudy, name='casestudies'), +# re_path(r'^schwag/?$', retail.views.schwag, name='schwag'), +# re_path(r'^btctalk/?$', retail.views.btctalk, name='btctalk'), +# re_path(r'^reddit/?$', retail.views.reddit, name='reddit'), +# re_path(r'^calendar/?$', retail.views.calendar, name='calendar'), +# re_path(r'^livestream/?$', retail.views.calendar, name='livestream'), +# re_path(r'^feedback/?$', retail.views.feedback, name='feedback'), +# re_path(r'^telegram/?$', retail.views.telegram, name='telegram'), +# re_path(r'^twitter/?$', retail.views.twitter, name='twitter'), +# re_path(r'^discord/?$', retail.views.discord, name='discord'), +# re_path(r'^wallpaper/?$', retail.views.wallpaper, name='wallpaper'), +# re_path(r'^wallpapers/?$', retail.views.wallpaper, name='wallpapers'), +# re_path(r'^gitter/?$', retail.views.gitter, name='gitter'), +# re_path(r'^refer/?$', retail.views.refer, name='refer'), +# re_path(r'^fb/?$', retail.views.fb, name='fb'), +# re_path(r'^medium/?$', retail.views.medium, name='medium'), +# re_path(r'^github/?$', retail.views.github, name='github'), +# re_path(r'^youtube/?$', retail.views.youtube, name='youtube'), +# re_path(r'^web3/?$', retail.views.web3, name='web3'), +# re_path(r'^support/?$', retail.views.support, name='support'), + +# # increase funding limit +# re_path(r'^requestincrease/?', retail.views.increase_funding_limit_request, name='increase_funding_limit_request'), + +# # link shortener +# url(r'^l/(.*)$/?', linkshortener.views.linkredirect, name='redirect'), +# url(r'^credit/(.*)$/?', credits.views.credits, name='credit'), + +# # admin views +# re_path(r'^_administration/?', admin.site.urls, name='admin'), +# path( +# '_administration/email/new_bounty_daily', +# marketing.views.new_bounty_daily_preview, +# name='admin_new_bounty_daily' +# ), +# path('_administration/email/', retail.views.admin_index, name='admin_index_emails'), +# path('_administration/email/grant_cancellation', retail.emails.grant_cancellation, name='admin_grant_cancellation'), +# path( +# '_administration/email/request_amount_email', +# retail.emails.request_amount_email, +# name='admin_request_amount_email' +# ), +# path( +# '_administration/email/featured_funded_bounty', +# retail.emails.featured_funded_bounty, +# name='admin_featured_funded_bounty' +# ), +# path( +# '_administration/email/subscription_terminated', +# retail.emails.subscription_terminated, +# name='admin_subscription_terminated' +# ), +# path('_administration/email/new_grant', retail.emails.new_grant, name='admin_new_grant'), +# path('_administration/email/new_grant_approved', retail.emails.new_grant_approved, name='admin_new_grant_approved'), +# path('_administration/email/new_contributions', retail.emails.new_contributions, name='admin_new_contributions'), +# path( +# '_administration/email/thank_you_for_supporting', +# retail.emails.thank_you_for_supporting, +# name='admin_thank_you_for_supporting' +# ), +# path( +# '_administration/email/support_cancellation', +# retail.emails.support_cancellation, +# name='admin_support_cancellation' +# ), +# path( +# '_administration/email/successful_contribution', +# retail.emails.successful_contribution, +# name='admin_successful_contribution' +# ), +# path( +# '_administration/email/pending_contributions', +# retail.emails.pending_contribution, +# name='admin_pending_contribution' +# ), +# path('_administration/email/new_kudos', retail.emails.new_kudos, name='new_kudos'), +# path('_administration/email/kudos_mint', retail.emails.kudos_mint, name='kudos_mint'), +# path('_administration/email/kudos_mkt', retail.emails.kudos_mkt, name='kudos_mkt'), +# path('_administration/email/new_bounty', retail.emails.new_bounty, name='admin_new_bounty'), +# path('_administration/email/roundup', retail.emails.roundup, name='roundup'), +# path('_administration/email/new_tip', retail.emails.new_tip, name='new_tip'), +# path('_administration/email/new_match', retail.emails.new_match, name='new_match'), +# path('_administration/email/quarterly_roundup', retail.emails.quarterly_roundup, name='quarterly_roundup'), +# path('_administration/email/new_work_submission', retail.emails.new_work_submission, name='new_work_submission'), +# path('_administration/email/weekly_founder_recap', retail.emails.weekly_recap, name='weekly_founder_recap'), +# path( +# '_administration/email/weekly_unread_notifications_email', +# retail.emails.unread_notification_email_weekly_roundup, +# name='unread_notifications_email_weekly_roundup' +# ), +# path('_administration/email/new_bounty_rejection', retail.emails.new_bounty_rejection, name='new_bounty_rejection'), +# path('_administration/email/comment', retail.emails.comment, name='comment_email'), +# path('_administration/email/mention', retail.emails.mention, name='mention_email'), +# path('_administration/email/wallpost', retail.emails.wallpost, name='wallpost_email'), +# path('_administration/email/grant_update', retail.emails.grant_update, name='grant_update_email'), +# path('_administration/email/grant_recontribute', retail.emails.grant_recontribute, name='grant_recontribute_email'), +# path('_administration/email/grant_txn_failed', retail.emails.grant_txn_failed, name='grant_txn_failed_email'), +# path( +# '_administration/email/new_bounty_acceptance', +# retail.emails.new_bounty_acceptance, +# name='new_bounty_acceptance' +# ), +# path( +# '_administration/email/bounty_expire_warning', +# retail.emails.bounty_expire_warning, +# name='bounty_expire_warning' +# ), +# path( +# '_administration/email/start_work_expire_warning', +# retail.emails.start_work_expire_warning, +# name='start_work_expire_warning' +# ), +# path('_administration/email/start_work_expired', retail.emails.start_work_expired, name='start_work_expired'), +# path('_administration/email/gdpr_reconsent', retail.emails.gdpr_reconsent, name='gdpr_reconsent'), +# path('_administration/email/share_bounty', retail.emails.share_bounty, name='share_bounty'), +# path('_administration/email/new_tip/resend', retail.emails.resend_new_tip, name='resend_new_tip'), +# path( +# '_administration/email/tribe_hackathon_prizes', +# retail.emails.tribe_hackathon_prizes, +# name='tribe_hackathon_prizes' +# ), +# path('_administration/email/export_data', retail.emails.export_data, name='export_data'), +# path('_administration/email/export_data_failed', retail.emails.export_data_failed, name='export_data_failed'), +# re_path( +# r'^_administration/process_accesscode_request/(.*)$', +# tdi.views.process_accesscode_request, +# name='process_accesscode_request' +# ), +# re_path(r'^_administration/bulkemail/', dashboard.views.bulkemail, name='bulkemail'), +# re_path( +# r'^_administration/email/start_work_approved$', retail.emails.start_work_approved, name='start_work_approved' +# ), +# re_path( +# r'^_administration/email/start_work_rejected$', retail.emails.start_work_rejected, name='start_work_rejected' +# ), +# re_path( +# r'^_administration/email/start_work_new_applicant$', +# retail.emails.start_work_new_applicant, +# name='start_work_new_applicant' +# ), +# re_path( +# r'^_administration/email/start_work_applicant_about_to_expire$', +# retail.emails.start_work_applicant_about_to_expire, +# name='start_work_applicant_about_to_expire' +# ), +# re_path( +# r'^_administration/email/start_work_applicant_expired$', +# retail.emails.start_work_applicant_expired, +# name='start_work_applicant_expired' +# ), +# re_path( +# r'^_administration/email/funder_payout_reminder$', +# retail.emails.funder_payout_reminder, +# name='funder_payout_reminder' +# ), +# re_path( +# r'^_administration/email/no_applicant_reminder$', +# retail.emails.no_applicant_reminder, +# name='no_applicant_reminder' +# ), +# re_path(r'^_administration/email/match_distribution$', retail.emails.match_distribution, name='match_distribution'), +# re_path( +# r'^_administration/email/clr_match_claim$', +# retail.emails.grant_match_distribution_final_txn, +# name='clr_match_claim' +# ), +# re_path(r'^_administration/export_grants_ethelo', dashboard.views.export_grants_ethelo, name='export_grants_ethelo'), + +# # docs +# re_path(r'^_administration/docs/', include('django.contrib.admindocs.urls')), + +# # settings +# re_path(r'^settings/email/(.*)', marketing.views.email_settings, name='email_settings'), +# re_path(r'^settings/privacy/?', marketing.views.privacy_settings, name='privacy_settings'), +# re_path(r'^settings/matching/?', marketing.views.matching_settings, name='matching_settings'), +# re_path(r'^settings/slack/?', marketing.views.slack_settings, name='slack_settings'), +# re_path(r'^settings/account/?', marketing.views.account_settings, name='account_settings'), +# re_path(r'^settings/tokens/?', marketing.views.token_settings, name='token_settings'), +# re_path(r'^settings/job/?', marketing.views.job_settings, name='job_settings'), +# re_path(r'^settings/organizations/?', marketing.views.org_settings, name='org_settings'), +# re_path(r'^settings/tax/?', marketing.views.tax_settings, name='tax_settings'), +# re_path(r'^settings/(.*)?', marketing.views.email_settings, name='settings'), +# re_path(r'^settings$', marketing.views.org_settings, name='settings2'), + +# # marketing views +# url(r'^leaderboard/(.*)', marketing.views.leaderboard, name='leaderboard'), +# path('leaderboard', marketing.views._leaderboard, name='_leaderboard'), + +# # dataviz views +# re_path(r'^_administration/stats/$', dataviz.views.stats, name='stats'), +# re_path(r'^_administration/cohort/$', dataviz.views.cohort, name='cohort'), +# re_path(r'^_administration/funnel/$', dataviz.views.funnel, name='funnel'), +# re_path(r'^_administration/mesh/?$', dataviz.d3_views.mesh_network_viz, name='mesh_network_viz'), +# url(r'^blocknative', perftools.views.blocknative, name='blocknative'), + +# # quadratic lands +# path('quadraticlands/', redirect_view), +# re_path(r'^quadraticlands/?', redirect_view), +# re_path(r'^quadraticland/?', redirect_view), + +# # for robots +# url(r'^robots.txt/?', retail.views.robotstxt, name='robotstxt'), +# path( +# 'sitemap.xml', +# cache_page(604800)(sitemap_index), {'sitemaps': sitemaps}, +# name='django.contrib.sitemaps.views.index' +# ), +# path( +# 'sitemap-
.xml', +# cache_page(604800)(sitemap), {'sitemaps': sitemaps}, +# name='django.contrib.sitemaps.views.sitemap' +# ), +# # Interests +# path('interest/modal', dashboard.views.get_interest_modal, name='get_interest_modal'), +# path('actions/bounty//interest/new/', dashboard.views.new_interest, name='express-interest'), +# path('actions/bounty//interest/remove/', dashboard.views.remove_interest, name='remove-interest'), +# path( +# 'actions/bounty//interest//uninterested/', +# dashboard.views.uninterested, +# name='uninterested' +# ), + +# # Legacy Support +# path('legacy/', include('legacy.urls', namespace='legacy')), +# path('logout/', auth_views.LogoutView.as_view(), name='logout'), +# re_path(r'^gh-login/$', dashboard.views.gh_login, name='gh_login'), +# re_path(r'^login/github$', dashboard.views.gh_login, name='gh_login_'), +# re_path(r'^complete/?$', retail.views.index, name='gh_complete_redirect'), +# path('', include('social_django.urls', namespace='social')), +# # webhook routes +# # sendgrid webhook processing +# path(settings.SENDGRID_EVENT_HOOK_URL, marketing.webhookviews.process, name='sendgrid_event_process'), + +# # gitcoinbot +# url(settings.GITHUB_EVENT_HOOK_URL, gitcoinbot.views.payload, name='payload'), +# url(r'^impersonate/', include('impersonate.urls')), +# url(r'^api/v0.1/hackathon_project/set_winner/', dashboard.views.set_project_winner, name='project_winner'), +# url(r'^api/v0.1/hackathon_project/set_notes/', dashboard.views.set_project_notes, name='project_notes'), + +# # users +# url(r'^api/v0.1/user_bounties/', dashboard.views.get_user_bounties, name='get_user_bounties'), +# url(r'^api/v0.1/users_csv/', dashboard.views.output_users_to_csv, name='users_csv'), +# url(r'^api/v0.1/bounty_mentor/', dashboard.views.bounty_mentor, name='bounty_mentor'), +# url(r'^api/v0.1/users_fetch/', dashboard.views.users_fetch, name='users_fetch'), +# ] if settings.ENABLE_SILK: urlpatterns += [url(r'^silk/', include('silk.urls', namespace='silk'))] diff --git a/app/app/utils.py b/app/app/utils.py index 29f4637f1d8..6e0ca698fea 100644 --- a/app/app/utils.py +++ b/app/app/utils.py @@ -25,7 +25,7 @@ from geoip2.errors import AddressNotFoundError from git.utils import get_user from ipware.ip import get_real_ip -from marketing.utils import get_or_save_email_subscriber +from marketing.common.utils import get_or_save_email_subscriber from social_core.backends.github import GithubOAuth2 from social_django.models import UserSocialAuth diff --git a/app/assets/onepager/js/receive.js b/app/assets/onepager/js/receive.js index ca5b7118df6..e0df8d2ef35 100644 --- a/app/assets/onepager/js/receive.js +++ b/app/assets/onepager/js/receive.js @@ -132,7 +132,7 @@ $(document).ready(function() { var token_address = document.tip['token_address']; var token_contract = new web3.eth.Contract(token_abi, token_address); var holding_address = document.tip['holding_address']; - var amount_in_wei = new web3.utils.BN(String(document.tip['amount_in_wei'])); + var amount_in_wei = BigInt(document.tip['amount_in_wei']).toString(); web3.eth.getTransactionCount(holding_address, function(error, result) { var nonce = result; @@ -156,7 +156,7 @@ $(document).ready(function() { nonce: web3.utils.toHex(nonce), to: forwarding_address, from: holding_address, - value: amount_in_wei.toString() + value: amount_in_wei }; web3.eth.estimateGas(rawTx, function(err, gasLimit) { var buffer = new web3.utils.BN(0); @@ -188,7 +188,7 @@ $(document).ready(function() { } else { // send ERC20 - var encoded_amount = new web3.utils.BN(BigInt(document.tip['amount_in_wei'])).toString(); + var encoded_amount = amount_in_wei; var data = token_contract.methods.transfer(forwarding_address, encoded_amount).encodeABI(); rawTx = { diff --git a/app/assets/v2/images/buidlbox/landing-bg.svg b/app/assets/v2/images/buidlbox/landing-bg.svg new file mode 100644 index 00000000000..2020bcec227 --- /dev/null +++ b/app/assets/v2/images/buidlbox/landing-bg.svg @@ -0,0 +1,511 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/assets/v2/images/chains/cosmos.svg b/app/assets/v2/images/chains/cosmos.svg new file mode 100644 index 00000000000..a9717443948 --- /dev/null +++ b/app/assets/v2/images/chains/cosmos.svg @@ -0,0 +1 @@ +cosmos-atom-logo \ No newline at end of file diff --git a/app/assets/v2/images/grants/garden_qf_landing.png b/app/assets/v2/images/grants/garden_qf_landing.png new file mode 100644 index 00000000000..8b5b33c8389 Binary files /dev/null and b/app/assets/v2/images/grants/garden_qf_landing.png differ diff --git a/app/assets/v2/images/grants/gr13-banner-half.jpeg b/app/assets/v2/images/grants/gr13-banner-half.jpeg deleted file mode 100644 index b26840ea6ee..00000000000 Binary files a/app/assets/v2/images/grants/gr13-banner-half.jpeg and /dev/null differ diff --git a/app/assets/v2/images/grants/gr14-banner.png b/app/assets/v2/images/grants/gr14-banner.png new file mode 100644 index 00000000000..6da20f0e5ef Binary files /dev/null and b/app/assets/v2/images/grants/gr14-banner.png differ diff --git a/app/assets/v2/images/grants/protocol/grants-protocol-banner.png b/app/assets/v2/images/grants/protocol/grants-protocol-banner.png new file mode 100644 index 00000000000..20f8d53fa7d Binary files /dev/null and b/app/assets/v2/images/grants/protocol/grants-protocol-banner.png differ diff --git a/app/assets/v2/images/home/Flying_ppl_optimized.svg b/app/assets/v2/images/home/Flying_ppl_optimized.svg new file mode 100644 index 00000000000..cb005ac9167 --- /dev/null +++ b/app/assets/v2/images/home/Flying_ppl_optimized.svg @@ -0,0 +1,239 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/assets/v2/images/home/GR13_Logo_desktop.png b/app/assets/v2/images/home/GR13_Logo_desktop.png new file mode 100644 index 00000000000..f21c789d40c Binary files /dev/null and b/app/assets/v2/images/home/GR13_Logo_desktop.png differ diff --git a/app/assets/v2/images/home/GR13_desktopBanner_bg.png b/app/assets/v2/images/home/GR13_desktopBanner_bg.png new file mode 100644 index 00000000000..dc71635b7e4 Binary files /dev/null and b/app/assets/v2/images/home/GR13_desktopBanner_bg.png differ diff --git a/app/assets/v2/images/home/gr15/GR15_Logo.png b/app/assets/v2/images/home/gr15/GR15_Logo.png new file mode 100644 index 00000000000..84072cee996 Binary files /dev/null and b/app/assets/v2/images/home/gr15/GR15_Logo.png differ diff --git a/app/assets/v2/images/home/gr15/background.jpeg b/app/assets/v2/images/home/gr15/background.jpeg new file mode 100644 index 00000000000..2493a7f53ad Binary files /dev/null and b/app/assets/v2/images/home/gr15/background.jpeg differ diff --git a/app/assets/v2/images/home/gr15/gr15-bg-thanks.webp b/app/assets/v2/images/home/gr15/gr15-bg-thanks.webp new file mode 100644 index 00000000000..e6ee9947048 Binary files /dev/null and b/app/assets/v2/images/home/gr15/gr15-bg-thanks.webp differ diff --git a/app/assets/v2/images/home/protocol-grants/home-banner-circle.png b/app/assets/v2/images/home/protocol-grants/home-banner-circle.png new file mode 100644 index 00000000000..dca966dee09 Binary files /dev/null and b/app/assets/v2/images/home/protocol-grants/home-banner-circle.png differ diff --git a/app/assets/v2/images/home/protocol-grants/home-banner-dark.jpg b/app/assets/v2/images/home/protocol-grants/home-banner-dark.jpg new file mode 100644 index 00000000000..abcef6cff78 Binary files /dev/null and b/app/assets/v2/images/home/protocol-grants/home-banner-dark.jpg differ diff --git a/app/assets/v2/images/home/protocol-grants/home-banner-grants-mobile.svg b/app/assets/v2/images/home/protocol-grants/home-banner-grants-mobile.svg new file mode 100644 index 00000000000..81a259b95c5 --- /dev/null +++ b/app/assets/v2/images/home/protocol-grants/home-banner-grants-mobile.svg @@ -0,0 +1,623 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/assets/v2/images/home/protocol-grants/home-banner-grants.svg b/app/assets/v2/images/home/protocol-grants/home-banner-grants.svg new file mode 100644 index 00000000000..5c4bfd8c91f --- /dev/null +++ b/app/assets/v2/images/home/protocol-grants/home-banner-grants.svg @@ -0,0 +1,824 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/assets/v2/images/home/protocol-grants/home-banner-light.jpg b/app/assets/v2/images/home/protocol-grants/home-banner-light.jpg new file mode 100644 index 00000000000..23ae8a292ea Binary files /dev/null and b/app/assets/v2/images/home/protocol-grants/home-banner-light.jpg differ diff --git a/app/assets/v2/images/home/protocol-grants/home-banner-protocol-mobile.svg b/app/assets/v2/images/home/protocol-grants/home-banner-protocol-mobile.svg new file mode 100644 index 00000000000..560a7bb3b6d --- /dev/null +++ b/app/assets/v2/images/home/protocol-grants/home-banner-protocol-mobile.svg @@ -0,0 +1,704 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/assets/v2/images/home/protocol-grants/home-banner-protocol.svg b/app/assets/v2/images/home/protocol-grants/home-banner-protocol.svg new file mode 100644 index 00000000000..82b0b73cc02 --- /dev/null +++ b/app/assets/v2/images/home/protocol-grants/home-banner-protocol.svg @@ -0,0 +1,1169 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/assets/v2/images/loading_v2.gif b/app/assets/v2/images/loading_v2.gif index 57e4c901b2c..7c0deef3ad2 100644 Binary files a/app/assets/v2/images/loading_v2.gif and b/app/assets/v2/images/loading_v2.gif differ diff --git a/app/assets/v2/images/passport-landing-1.png b/app/assets/v2/images/passport-landing-1.png new file mode 100644 index 00000000000..c3117a2aadb Binary files /dev/null and b/app/assets/v2/images/passport-landing-1.png differ diff --git a/app/assets/v2/images/passport-landing-2.png b/app/assets/v2/images/passport-landing-2.png new file mode 100644 index 00000000000..0dc92d45f42 Binary files /dev/null and b/app/assets/v2/images/passport-landing-2.png differ diff --git a/app/assets/v2/images/rounds/gitcoin-alpha/alpha-round-sponsors1.png b/app/assets/v2/images/rounds/gitcoin-alpha/alpha-round-sponsors1.png new file mode 100644 index 00000000000..cad0d9e3b32 Binary files /dev/null and b/app/assets/v2/images/rounds/gitcoin-alpha/alpha-round-sponsors1.png differ diff --git a/app/assets/v2/images/stamps/BrightidStampIcon.svg b/app/assets/v2/images/stamps/BrightidStampIcon.svg new file mode 100644 index 00000000000..85dceb23904 --- /dev/null +++ b/app/assets/v2/images/stamps/BrightidStampIcon.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/app/assets/v2/images/stamps/DiscordStampIcon.svg b/app/assets/v2/images/stamps/DiscordStampIcon.svg new file mode 100644 index 00000000000..3efe1ec110f --- /dev/null +++ b/app/assets/v2/images/stamps/DiscordStampIcon.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/app/assets/v2/images/stamps/EnsStampIcon.svg b/app/assets/v2/images/stamps/EnsStampIcon.svg new file mode 100644 index 00000000000..be951759e52 --- /dev/null +++ b/app/assets/v2/images/stamps/EnsStampIcon.svg @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/assets/v2/images/stamps/EthStampIcon.svg b/app/assets/v2/images/stamps/EthStampIcon.svg new file mode 100644 index 00000000000..8bda02f0114 --- /dev/null +++ b/app/assets/v2/images/stamps/EthStampIcon.svg @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/app/assets/v2/images/stamps/FacebookStampIcon.svg b/app/assets/v2/images/stamps/FacebookStampIcon.svg new file mode 100644 index 00000000000..06c6312d094 --- /dev/null +++ b/app/assets/v2/images/stamps/FacebookStampIcon.svg @@ -0,0 +1,4 @@ + + + + diff --git a/app/assets/v2/images/stamps/GitPOAPStampIcon.svg b/app/assets/v2/images/stamps/GitPOAPStampIcon.svg new file mode 100644 index 00000000000..5ac91301025 --- /dev/null +++ b/app/assets/v2/images/stamps/GitPOAPStampIcon.svg @@ -0,0 +1,20 @@ + + + + + + + + \ No newline at end of file diff --git a/app/assets/v2/images/stamps/GithubStampIcon.svg b/app/assets/v2/images/stamps/GithubStampIcon.svg new file mode 100644 index 00000000000..c12ba250267 --- /dev/null +++ b/app/assets/v2/images/stamps/GithubStampIcon.svg @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/app/assets/v2/images/stamps/GoogleStampIcon.svg b/app/assets/v2/images/stamps/GoogleStampIcon.svg new file mode 100644 index 00000000000..57314c1e056 --- /dev/null +++ b/app/assets/v2/images/stamps/GoogleStampIcon.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/app/assets/v2/images/stamps/IdenaStampIcon.svg b/app/assets/v2/images/stamps/IdenaStampIcon.svg new file mode 100644 index 00000000000..6c46fdcb7e3 --- /dev/null +++ b/app/assets/v2/images/stamps/IdenaStampIcon.svg @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/app/assets/v2/images/stamps/LinkedinStampIcon.svg b/app/assets/v2/images/stamps/LinkedinStampIcon.svg new file mode 100644 index 00000000000..43ce43eb01a --- /dev/null +++ b/app/assets/v2/images/stamps/LinkedinStampIcon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/app/assets/v2/images/stamps/PoapStampIcon.svg b/app/assets/v2/images/stamps/PoapStampIcon.svg new file mode 100644 index 00000000000..f267cba5723 --- /dev/null +++ b/app/assets/v2/images/stamps/PoapStampIcon.svg @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + diff --git a/app/assets/v2/images/stamps/PohStampIcon.svg b/app/assets/v2/images/stamps/PohStampIcon.svg new file mode 100644 index 00000000000..a96fd5ad7eb --- /dev/null +++ b/app/assets/v2/images/stamps/PohStampIcon.svg @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/app/assets/v2/images/stamps/TwitterStampIcon.svg b/app/assets/v2/images/stamps/TwitterStampIcon.svg new file mode 100644 index 00000000000..f67782a6e1c --- /dev/null +++ b/app/assets/v2/images/stamps/TwitterStampIcon.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/app/assets/v2/images/top-bar/passport-symbol.svg b/app/assets/v2/images/top-bar/passport-symbol.svg new file mode 100644 index 00000000000..b0acc928101 --- /dev/null +++ b/app/assets/v2/images/top-bar/passport-symbol.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/app/assets/v2/images/trust/no-trust-man.svg b/app/assets/v2/images/trust/no-trust-man.svg new file mode 100644 index 00000000000..c0be10faf67 --- /dev/null +++ b/app/assets/v2/images/trust/no-trust-man.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/app/assets/v2/images/twitter_cards/GenericTwitterUnfurl.png b/app/assets/v2/images/twitter_cards/GenericTwitterUnfurl.png new file mode 100644 index 00000000000..3df07631c72 Binary files /dev/null and b/app/assets/v2/images/twitter_cards/GenericTwitterUnfurl.png differ diff --git a/app/assets/v2/images/twitter_cards/grants10.png b/app/assets/v2/images/twitter_cards/grants10.png deleted file mode 100644 index 45e457c054a..00000000000 Binary files a/app/assets/v2/images/twitter_cards/grants10.png and /dev/null differ diff --git a/app/assets/v2/images/twitter_cards/grants11.png b/app/assets/v2/images/twitter_cards/grants11.png deleted file mode 100644 index 3f206d58d91..00000000000 Binary files a/app/assets/v2/images/twitter_cards/grants11.png and /dev/null differ diff --git a/app/assets/v2/images/twitter_cards/grants12.png b/app/assets/v2/images/twitter_cards/grants12.png deleted file mode 100644 index 20f154cb840..00000000000 Binary files a/app/assets/v2/images/twitter_cards/grants12.png and /dev/null differ diff --git a/app/assets/v2/images/twitter_cards/grants7-2.png b/app/assets/v2/images/twitter_cards/grants7-2.png deleted file mode 100644 index 8868cc2009f..00000000000 Binary files a/app/assets/v2/images/twitter_cards/grants7-2.png and /dev/null differ diff --git a/app/assets/v2/images/twitter_cards/grants7.png b/app/assets/v2/images/twitter_cards/grants7.png deleted file mode 100644 index 9cd61dd13bd..00000000000 Binary files a/app/assets/v2/images/twitter_cards/grants7.png and /dev/null differ diff --git a/app/assets/v2/images/twitter_cards/grants8.png b/app/assets/v2/images/twitter_cards/grants8.png deleted file mode 100644 index 37acd5c64e9..00000000000 Binary files a/app/assets/v2/images/twitter_cards/grants8.png and /dev/null differ diff --git a/app/assets/v2/images/twitter_cards/grants9.png b/app/assets/v2/images/twitter_cards/grants9.png deleted file mode 100644 index 4056688a0fc..00000000000 Binary files a/app/assets/v2/images/twitter_cards/grants9.png and /dev/null differ diff --git a/app/assets/v2/js/base.js b/app/assets/v2/js/base.js index 209784ae5fd..824b6debcd7 100644 --- a/app/assets/v2/js/base.js +++ b/app/assets/v2/js/base.js @@ -434,3 +434,28 @@ this.objectifySerialized = function(data) { return objectData; }; + + +window.onscroll = function() { + scrollFunction(); +}; + +const backToTop = () => { + document.body.scrollTop = 0; + document.documentElement.scrollTop = 0; +}; + +const scrollFunction = () => { + let scrollBackToTop = document.getElementById('btn-back-to-top'); + + if ( + document.body.scrollTop > 20 || + document.documentElement.scrollTop > 20 + ) { + scrollBackToTop.style.display = 'block'; + } else { + scrollBackToTop.style.display = 'none'; + } +}; + +document.getElementById('btn-back-to-top').addEventListener('click', backToTop); \ No newline at end of file diff --git a/app/assets/v2/js/carousel-extensions.js b/app/assets/v2/js/carousel-extensions.js new file mode 100644 index 00000000000..1467700814e --- /dev/null +++ b/app/assets/v2/js/carousel-extensions.js @@ -0,0 +1,16 @@ +$(document).ready(function() { + const dataAttr = 'carousel-item-href'; + + $(`.carousel .carousel-item[data-${dataAttr}]`).on('click', function(event) { + if (event.target.tagName.toLowerCase() === 'a') { + return; + } + + event.preventDefault(); + const href = $(event.currentTarget).data(dataAttr); + + if (href !== undefined) { + document.location.href = href; + } + }); +}); diff --git a/app/assets/v2/js/cart-ethereum-polygon.js b/app/assets/v2/js/cart-ethereum-polygon.js index b20fe11320a..1c733cb169b 100644 --- a/app/assets/v2/js/cart-ethereum-polygon.js +++ b/app/assets/v2/js/cart-ethereum-polygon.js @@ -31,11 +31,13 @@ Vue.component('grantsCartEthereumPolygon', { user: { requiredAmounts: null - } + }, + ethereum: null }; }, async mounted() { + this.ethereum = window.ethereum; // Update Polygon checkout connection, state, and data frontend needs when wallet connection changes window.addEventListener('dataWalletReady', async(e) => { await this.onChangeHandler(this.donationInputs); @@ -89,7 +91,7 @@ Vue.component('grantsCartEthereumPolygon', { appCart.$refs.cart.activeCheckout !== undefined ) || this.cart.unsupportedTokens.length > 0 || - !ethereum.selectedAddress + !this.ethereum?.selectedAddress ); } }, @@ -218,7 +220,7 @@ Vue.component('grantsCartEthereumPolygon', { }, // Send a batch transfer based on donation inputs - async checkoutWithPolygon() { + async checkoutWithPolygon(onlyPolygon) { // Prompt web3 login if not connected if (!provider) { await onConnect(); @@ -245,10 +247,10 @@ Vue.component('grantsCartEthereumPolygon', { ga('send', 'event', 'Grant Checkout', 'click', 'Person'); } - if (web3.currentProvider && !web3.currentProvider.isMetaMask) { - _alert('Polygon Checkout is not supported on this wallet. Select another checkout option or switch to MetaMask.', 'danger'); - return; - } + // if (web3.currentProvider && !web3.currentProvider.isMetaMask) { + // _alert('Polygon Checkout is not supported on this wallet. Select another checkout option or switch to MetaMask.', 'danger'); + // return; + // } // Throw if invalid Gitcoin contribution percentage if (Number(this.gitcoinFactorRaw) < 0 || Number(this.gitcoinFactorRaw) > 99) { @@ -264,13 +266,13 @@ Vue.component('grantsCartEthereumPolygon', { } }); - if (!ethereum.selectedAddress) { - _alert('Please unlock MetaMask to proceed with Polygon checkout', 'danger'); + if (!selectedAccount) { + _alert('Please unlock your wallet provider to proceed with Polygon checkout', 'danger'); return; } - // Some grants are multisig, so we display modal to prompt the split of the cart - if (this.multisigGrants.length < this.grantsByTenant.length) { + // If some grants are multisig, we display modal to prompt the split of the cart + if (!onlyPolygon && this.multisigGrants.length > 0 && this.multisigGrants.length < this.grantsByTenant.length) { this.polygon.showModal = true; return; } @@ -291,12 +293,12 @@ Vue.component('grantsCartEthereumPolygon', { } indicateMetamaskPopup(); - await setupPolygon(network = appCart.$refs.cart.network); + await switchChain(appCart.$refs.cart.network === 'mainnet' ? 137 : 80001); // Token approvals and balance checks from bulk checkout contract // (just checks data, does not execute approvals) const allowanceData = await this.getAllowanceData( - ethereum.selectedAddress, bulkCheckoutAddressPolygon + this.ethereum?.selectedAddress, bulkCheckoutAddressPolygon ); // Save off cart data @@ -305,17 +307,17 @@ Vue.component('grantsCartEthereumPolygon', { if (allowanceData.length === 0) { // Send transaction and exit function - await this.sendDonationTx(ethereum.selectedAddress); + await this.sendDonationTx(this.ethereum?.selectedAddress); return; } // Request approvals then send donations --------------------------------------------------- await this.requestAllowanceApprovalsThenExecuteCallback( allowanceData, - ethereum.selectedAddress, + this.ethereum?.selectedAddress, bulkCheckoutAddressPolygon, this.sendDonationTx, - [ethereum.selectedAddress] + [this.ethereum?.selectedAddress] ); } catch (e) { @@ -324,6 +326,7 @@ Vue.component('grantsCartEthereumPolygon', { }, async sendDonationTx(userAddress) { + appCart.$refs.cart.sendPaymentInfoEvent('polygon'); const bulkCheckoutAddressPolygon = this.getBulkCheckoutAddress(); // Get our donation inputs @@ -341,9 +344,11 @@ Vue.component('grantsCartEthereumPolygon', { // Send transaction appCart.$refs.cart.showConfirmationModal = true; + const bnGasPrice = web3.utils.toWei(document.polygonGasPrice, 'gwei'); + bulkTransaction.methods .donate(donationInputsFiltered) - .send({ from: userAddress, gas: this.polygon.estimatedGasCost, value: this.donationInputsNativeAmount }) + .send({ from: userAddress, value: this.donationInputsNativeAmount, gasPrice: bnGasPrice }) .on('transactionHash', async(txHash) => { indicateMetamaskPopup(true); console.log('Donation transaction hash: ', txHash); @@ -451,7 +456,7 @@ Vue.component('grantsCartEthereumPolygon', { // Compare amounts needed to balance const web3 = this.initWeb3(); - const userAddress = ethereum.selectedAddress; + const userAddress = this.ethereum?.selectedAddress; let isBalanceSufficient = true; for (let i = 0; i < this.cart.tokenList.length; i += 1) { diff --git a/app/assets/v2/js/cart-ethereum-zksync.js b/app/assets/v2/js/cart-ethereum-zksync.js index 796c699f45e..d03d3c1d838 100644 --- a/app/assets/v2/js/cart-ethereum-zksync.js +++ b/app/assets/v2/js/cart-ethereum-zksync.js @@ -195,6 +195,7 @@ Vue.component('grantsCartEthereumZksync', { // Send a batch transfer based on donation inputs async checkoutWithZksync() { + appCart.$refs.cart.sendPaymentInfoEvent('zksync'); // Prompt web3 login if not connected if (!provider) { await onConnect(); diff --git a/app/assets/v2/js/cart-nav.js b/app/assets/v2/js/cart-nav.js index a708c40bda1..8b7d8806fde 100644 --- a/app/assets/v2/js/cart-nav.js +++ b/app/assets/v2/js/cart-nav.js @@ -2,16 +2,17 @@ Vue.component('gc-cart-content', { template: '#gc-cart-content', delimiters: [ '[[', ']]' ], data: () => { - return { items: [] }; }, + methods: { init: function() { // update items each time we open the dropdown this.items = CartData.loadCart(); }, + removeGrantFromCart: function(grant_id) { // remove the item CartData.removeIdFromCart(grant_id); @@ -24,19 +25,59 @@ Vue.component('gc-cart-content', { if (document.getElementById('gc-cart')) { var app = new Vue({ delimiters: [ '[[', ']]' ], + el: '#gc-cart', + data: { cart_data_count: CartData.length() }, + methods: { updateCartCount: function(e) { this.cart_data_count = e.detail.list.length || 0; + }, + + onLinkMouseOver: function(e) { + if (this.isMobile()) { + return; + } + + e.preventDefault(); + e.stopPropagation(); + + const el = $(e.currentTarget); + const visible = el.parent().hasClass('show'); + + if (visible) { + return; + } + + this.$refs.navCart.init(); + el.trigger('click'); + }, + + onLinkClick: function(e) { + if (this.isMobile()) { + this.$refs.navCart.init(); + return; + } + + e.preventDefault(); + e.stopPropagation(); + + window.location.href = $(e.currentTarget).attr('href'); + }, + + isMobile: function() { + return 'ontouchstart' in window; } }, + mounted() { // watch for cartUpdates window.addEventListener('cartDataUpdated', this.updateCartCount); }, + beforeDestroy() { // unwatch cartUpdates window.removeEventListener('cartDataUpdated', this.updateCartCount); diff --git a/app/assets/v2/js/cart.js b/app/assets/v2/js/cart.js index 534b5859197..d7f8d89558f 100644 --- a/app/assets/v2/js/cart.js +++ b/app/assets/v2/js/cart.js @@ -11,7 +11,11 @@ let appCart; document.addEventListener('dataWalletReady', async function(e) { appCart.$refs['cart'].network = networkName; - appCart.$refs['cart'].networkId = String(Number(web3.eth.currentProvider.chainId)); + if (web3.eth.currentProvider.isPortis) { + appCart.$refs['cart'].networkId = web3.eth.currentProvider._portis._config.network.chainId; + } else { + appCart.$refs['cart'].networkId = String(Number(web3.eth.currentProvider.chainId)); + } }, false); // needWalletConnection(); @@ -36,7 +40,7 @@ Vue.component('eth-checkout-button', { delimiters: [ '[[', ']]' ], template: '#eth-checkout-template', props: [ - 'maxCartItems', 'network', 'isZkSyncDown', 'isPolygonDown', 'onPolygonUpdate', 'onZkSyncUpdate', 'donationInputs', + 'maxCartItems', 'network', 'isZkSyncDown', 'isPolygonDown', 'onPolygonUpdate', 'onZkSyncUpdate', 'donationInputs', 'donationInputsPolygon', 'currentTokens', 'grantsByTenant', 'grantsUnderMinimalContribution', 'activeCheckout', 'standardCheckout', 'multisigGrants', 'tabSelected' ] @@ -48,6 +52,9 @@ Vue.component('grants-cart', { data: function() { return { // Checkout, shared + grantAnalyticsItems: [], + cartTotal: 0, + analyticsHash: null, selectedZcashPayment: 'taddress', optionsZcashPayment: [ { text: 'Wallet t-address', value: 'taddress' }, @@ -60,6 +67,11 @@ Vue.component('grants-cart', { ], selectedETHCartToken: 'DAI', preferredAmount: 25, + tokenListOptions: { + strict: false, + chainId: '', + network: '' + }, chainId: '', networkId: '', network: 'mainnet', @@ -101,12 +113,6 @@ Vue.component('grants-cart', { `${static_url}v2/js/grants/cart/binance_extension.js` ], 'HARMONY': [ - `${static_url}v2/js/lib/harmony/HarmonyUtils.browser.js`, - `${static_url}v2/js/lib/harmony/HarmonyJs.browser.js`, - `${static_url}v2/js/lib/harmony/HarmonyAccount.browser.js`, - `${static_url}v2/js/lib/harmony/HarmonyCrypto.browser.js`, - `${static_url}v2/js/lib/harmony/HarmonyNetwork.browser.js`, - `${static_url}v2/js/lib/harmony/utils.js`, `${static_url}v2/js/grants/cart/harmony_extension.js` ], 'RSK': [ @@ -115,6 +121,10 @@ Vue.component('grants-cart', { 'ALGORAND': [ `${static_url}v2/js/tokens.js`, `${static_url}v2/js/grants/cart/algorand_extension.js` + ], + 'COSMOS': [ + `${static_url}v2/js/lib/cosmos/cosmwasmjs.js`, + `${static_url}v2/js/grants/cart/cosmos_extension.js` ] } }; @@ -171,36 +181,64 @@ Vue.component('grants-cart', { }, filterByNetwork: function() { const vm = this; + let result; + let network; + + network = vm.tokenListOptions.network || vm.network; if (vm.network == '') { - return vm.sortByPriority; + result = vm.sortByPriority; + } else if (vm.tokenListOptions.strict) { + result = vm.sortByPriority.filter((item) => { + return item.network === network; + }); + } else { + result = vm.sortByPriority.filter((item) => { + return item.network.toLowerCase().indexOf(network.toLowerCase()) >= 0; + }); } - return vm.sortByPriority.filter((item)=>{ - return item.network.toLowerCase().indexOf(vm.network.toLowerCase()) >= 0; - }); + + return result; }, filterByChainId: function() { const vm = this; let result; + let chainId; + + chainId = vm.tokenListOptions.chainId || vm.chainId; - if (vm.chainId == '') { + if (chainId == '') { result = vm.filterByNetwork; + } else if (vm.tokenListOptions.strict) { + result = vm.sortByPriority.filter((item) => { + return item.chainId == chainId; + }); + return result; } else { result = vm.filterByNetwork.filter((item) => { - return String(item.chainId) === vm.chainId; + return String(item.chainId) === chainId; }); } + return result; }, filterByNetworkId: function() { const vm = this; let result; + let networkId; + + networkId = vm.tokenListOptions.networkId || vm.networkId; if (vm.networkId == '') { result = vm.filterByChainId; + } else if (vm.tokenListOptions.strict) { + result = vm.sortByPriority.filter((item) => { + return String(item.networkId) == networkId; + }); + return result; } else { result = vm.filterByChainId.filter((item) => { - return String(item.networkId) === vm.networkId; + return String(item.networkId) === networkId; }); } return result; @@ -383,43 +421,8 @@ Vue.component('grants-cart', { return gasLimit; }, - // Make a recommendation to the user about which checkout to use - checkoutRecommendation() { - const estimateL1 = Number(this.donationInputsGasLimitL1); // L1 gas cost estimate - const estimateZkSync = Number(this.zkSyncEstimatedGasCost); // zkSync gas cost estimate - const estimatePolygon = Number(this.polygonEstimatedGasCost); // polygon gas cost estimate - - const compareWithL2 = (estimateL2, name) => { - if (estimateL1 < estimateL2) { - const savingsInGas = estimateL2 - estimateL1; - const savingsInPercent = Math.round(savingsInGas / estimateL2 * 100); - - return { name: 'Standard checkout', savingsInGas, savingsInPercent }; - } - - const savingsInGas = estimateL1 - estimateL2; - const percentSavings = savingsInGas / estimateL1 * 100; - const savingsInPercent = percentSavings > 99 ? 99 : Math.round(percentSavings); // max value of 99% - - return { name, savingsInGas, savingsInPercent }; - }; - - zkSyncComparisonResult = compareWithL2(estimateZkSync, 'zkSync'); - polygonComparisonResult = compareWithL2(estimatePolygon, 'Polygon'); - zkSyncSavings = zkSyncComparisonResult.name === 'zkSync' ? zkSyncComparisonResult.savingsInPercent : 0; - polygonSavings = polygonComparisonResult.name === 'Polygon' ? polygonComparisonResult.savingsInPercent : 0; - - if (zkSyncSavings > polygonSavings) { - return zkSyncComparisonResult; - } else if (zkSyncSavings < polygonSavings) { - return polygonComparisonResult; - } - - return zkSyncComparisonResult; // recommendation will be standard checkout - }, - isHarmonyExtInstalled() { - return window.onewallet && window.onewallet.isOneWallet; + return window.ethereum && window.ethereum.isMetaMask; }, isBinanceExtInstalled() { @@ -427,7 +430,11 @@ Vue.component('grants-cart', { }, isAlgorandExtInstalled() { - return window.AlgoSigner || false; + return window.WalletConnect || window.MyAlgoConnect || window.AlgoSigner || false; + }, + + isCosmosExtInstalled() { + return window.keplr || false; }, isRskExtInstalled() { @@ -449,6 +456,22 @@ Vue.component('grants-cart', { }, methods: { + formatAnalyticsItems(grants) { + return grants.map((grant) => ({ + item_id: grant.grant_id, + item_name: grant.grant_title, + item_category: grant.clr_round_num, + item_brand: grant.grant_admin_address + })); + }, + setCartTotal(grants) { + let cartTotal = 0; + + grants.forEach((grant) => { + cartTotal += grant.grant_donation_amount; + }); + this.cartTotal = cartTotal; + }, // Array of objects containing all donations and associated data computeDonationInputs(destGitcoinAddress) { let isPolygon = destGitcoinAddress == gitcoinAddressPolygon; @@ -593,6 +616,18 @@ Vue.component('grants-cart', { return vm.isPolkadotExtInstalled; }); }, + sendPaymentInfoEvent(payment_type) { + if (this.grantData.length) { + const currency = this.grantData[0].grant_donation_currency; + + gtag('event', 'add_payment_info', { + currency, + value: this.cartTotal, + payment_type, + items: this.grantAnalyticsItems + }); + } + }, // When the cart-ethereum-zksync component is updated, it emits an event with new data as the // payload. This component listens for that event and uses the data to show the user details // and suggestions about their checkout (gas cost estimates and why zkSync may not be @@ -608,6 +643,8 @@ Vue.component('grants-cart', { tabChange: async function(input) { let vm = this; + vm.tokenListOptions = { strict: false, chainId: '', network: '' }; + vm.tabSelected = vm.$refs.tabs.tabs[input].id; if (!vm.grantsCountByTenant[vm.tabSelected]) { vm.tabIndex += 1; @@ -630,7 +667,7 @@ Vue.component('grants-cart', { vm.chainId = '102'; break; case 'HARMONY': - vm.chainId = '1000'; + vm.chainId = '1666600000'; break; case 'BINANCE': vm.chainId = '56'; @@ -646,6 +683,11 @@ Vue.component('grants-cart', { break; case 'ALGORAND': vm.chainId = '1001'; + vm.tokenListOptions.chainId = '1001'; + vm.tokenListOptions.strict = true; + break; + case 'COSMOS': + vm.chainId = '1155'; break; } }, @@ -728,6 +770,9 @@ Vue.component('grants-cart', { initAlgorandConnection(grant, vm); } break; + case 'COSMOS': + contributeWithCosmosExtension(grant, vm); + break; case 'RSK': contributeWithRskExtension(grant, vm); break; @@ -784,9 +829,28 @@ Vue.component('grants-cart', { updateCartData(e) { this.grantData = (e && e.detail && e.detail.list && e.detail.list) || []; update_cart_title(); + this.grantAnalyticsItems = this.formatAnalyticsItems(this.grantData); }, removeGrantFromCart(id) { + const removal = this.grantData.find(grant => grant.grant_id === id); + + if (removal) { + gtag('event', 'remove_from_cart', { + currency: this.selectedETHCartToken, + value: removal.grant_donation_amount, + items: [ + { + item_id: id, + item_name: removal.grant_title, + quantity: 1, + item_category: removal.clr_round_num, + item_brand: removal.grant_admin_address + } + ] + }); + } + CartData.removeIdFromCart(id); this.grantData = CartData.loadCart(); update_cart_title(); @@ -967,30 +1031,23 @@ Vue.component('grants-cart', { // Must be called at the beginning of the standard L1 bulk checkout flow async initializeStandardCheckout() { + this.sendPaymentInfoEvent('eth'); // Prompt web3 login if not connected if (!provider) { - await await onConnect(); + await onConnect(); } - let networkId = String(Number(web3.eth.currentProvider.chainId)); - let networkName = getDataChains(networkId, 'chainId')[0] && getDataChains(networkId, 'chainId')[0].network; + if (this.nativeCurrency == 'MATIC') { + this.networkId = this.networkId == '80001' ? '4' : '1'; + } - if (networkName == 'mainnet' && networkId !== '1') { - // User MetaMask must be connected to Ethereum mainnet - try { - await ethereum.request({ - method: 'wallet_switchEthereumChain', - params: [{ chainId: '0x1' }] - }); - } catch (switchError) { - if (switchError.code === 4001) { - throw new Error('Please connect MetaMask to Ethereum network.'); - } else if (switchError.code === -32002) { - throw new Error('Please respond to a pending MetaMask request.'); - } else { - console.error(switchError); - } - } + let networkName = getDataChains(this.networkId, 'chainId')[0] && getDataChains(this.networkId, 'chainId')[0].network; + + // User's wallet must be connected to Ethereum mainnet or rinkeby + if (networkName == 'mainnet') { + await switchChain(1); + } else { + await switchChain(4); } if (typeof ga !== 'undefined') { @@ -1155,19 +1212,11 @@ Vue.component('grants-cart', { } }, - resetNetwork() { - if (this.nativeCurrency == 'MATIC') { - this.network = this.network == 'testnet' ? 'rinkeby' : 'mainnet'; - this.networkId = this.networkId == '80001' ? '4' : '1'; - } - }, - // Standard L1 checkout flow async standardCheckout() { try { // Setup ----------------------------------------------------------------------------------- this.activeCheckout = 'standard'; - this.resetNetwork(); const userAddress = await this.initializeStandardCheckout(); // Token approvals and balance checks (just checks data, does not execute approavals) @@ -1264,6 +1313,10 @@ Vue.component('grants-cart', { // If standard checkout, stretch it so there's one hash for each donation (required for `for` loop below) const txHashes = checkout_type === 'eth_zksync' ? this.formatZkSyncTx(txHash) : new Array(donations.length).fill(txHash[0]); + if (txHashes) { + this.analyticsHash = txHashes[0]; + } + // Configure template payload const saveSubscriptionPayload = { // Values that are constant for all donations @@ -1462,6 +1515,13 @@ Vue.component('grants-cart', { CartData.setCheckedOut(this.grantsByTenant); + gtag('event', 'purchase', { + currency: this.selectedETHCartToken, + transaction_id: this.analyticsHash, + value: this.cartTotal, + items: this.grantAnalyticsItems + }); + // Remove each grant from the cart which has just been checkout this.grantsByTenant.forEach((grant) => { CartData.removeIdFromCart(grant.grant_id); @@ -1672,6 +1732,12 @@ Vue.component('grants-cart', { // Show loading dialog this.isLoading = true; + // Check if shared/global wallet functions are loaded from shared.js + if (!window.indicateMetamaskPopup) { + // rerender component to pickup load of global fncts + vm.$forceUpdate(); + } + // Load list of all tokens const tokensResponse = await fetch('/api/v1/tokens'); const allTokens = await tokensResponse.json(); @@ -1718,6 +1784,7 @@ Vue.component('grants-cart', { this.grantData = []; } + // Load needed scripts based on tenants this.setChainScripts(); @@ -1729,6 +1796,19 @@ Vue.component('grants-cart', { // Show user cart now this.isLoading = false; + if (grantData.length) { + const currency = grantData[0].grant_donation_currency; + + const cartTotal = this.setCartTotal(grantData); + const items = this.formatAnalyticsItems(grantData); + + vm.grantAnalyticsItems; + gtag('event', 'begin_checkout', { + currency, + value: cartTotal, + items + }); + } }, beforeDestroy() { diff --git a/app/assets/v2/js/data-chains.js b/app/assets/v2/js/data-chains.js index 576473ffefc..dd93eca9251 100644 --- a/app/assets/v2/js/data-chains.js +++ b/app/assets/v2/js/data-chains.js @@ -1,5 +1,6 @@ // https://chainid.network/chains.json // 20200603145449 +// Note: information about harmony network have been appended on 20220330 var dataChains = [ { @@ -1293,8 +1294,179 @@ var dataChains = "symbol": "MATIC", "decimals": 18 }, - "infoURL":"https://matic.network/" - } + "infoURL": "https://matic.network/" + }, + { + "name": "Harmony Mainnet Shard 0", + "chain": "Harmony", + "rpc": [ + "https://api.harmony.one" + ], + "faucets": [ + "https://free-online-app.com/faucet-for-eth-evm-chains/" + ], + "nativeCurrency": { + "name": "ONE", + "symbol": "ONE", + "decimals": 18 + }, + "infoURL": "https://www.harmony.one/", + "shortName": "hmy-s0", + "chainId": 1666600000, + "networkId": 1666600000, + "explorers": [ + { + "name": "Harmony Block Explorer", + "url": "https://explorer.harmony.one", + "standard": "EIP3091" + } + ] + }, + { + "name": "Harmony Mainnet Shard 1", + "chain": "Harmony", + "rpc": [ + "https://s1.api.harmony.one" + ], + "faucets": [], + "nativeCurrency": { + "name": "ONE", + "symbol": "ONE", + "decimals": 18 + }, + "infoURL": "https://www.harmony.one/", + "shortName": "hmy-s1", + "chainId": 1666600001, + "networkId": 1666600001 + }, + { + "name": "Harmony Mainnet Shard 2", + "chain": "Harmony", + "rpc": [ + "https://s2.api.harmony.one" + ], + "faucets": [], + "nativeCurrency": { + "name": "ONE", + "symbol": "ONE", + "decimals": 18 + }, + "infoURL": "https://www.harmony.one/", + "shortName": "hmy-s2", + "chainId": 1666600002, + "networkId": 1666600002 + }, + { + "name": "Harmony Mainnet Shard 3", + "chain": "Harmony", + "rpc": [ + "https://s3.api.harmony.one" + ], + "faucets": [], + "nativeCurrency": { + "name": "ONE", + "symbol": "ONE", + "decimals": 18 + }, + "infoURL": "https://www.harmony.one/", + "shortName": "hmy-s3", + "chainId": 1666600003, + "networkId": 1666600003 + }, + { + "name": "Harmony Testnet Shard 0", + "chain": "Harmony", + "rpc": [ + "https://api.s0.b.hmny.io" + ], + "faucets": [ + "https://faucet.pops.one" + ], + "nativeCurrency": { + "name": "ONE", + "symbol": "ONE", + "decimals": 18 + }, + "infoURL": "https://www.harmony.one/", + "shortName": "hmy-b-s0", + "chainId": 1666700000, + "networkId": 1666700000, + "explorers": [ + { + "name": "Harmony Testnet Block Explorer", + "url": "https://explorer.pops.one", + "standard": "EIP3091" + } + ] + }, + { + "name": "Harmony Testnet Shard 1", + "chain": "Harmony", + "rpc": [ + "https://api.s1.b.hmny.io" + ], + "faucets": [], + "nativeCurrency": { + "name": "ONE", + "symbol": "ONE", + "decimals": 18 + }, + "infoURL": "https://www.harmony.one/", + "shortName": "hmy-b-s1", + "chainId": 1666700001, + "networkId": 1666700001 + }, + { + "name": "Harmony Testnet Shard 2", + "chain": "Harmony", + "rpc": [ + "https://api.s2.b.hmny.io" + ], + "faucets": [], + "nativeCurrency": { + "name": "ONE", + "symbol": "ONE", + "decimals": 18 + }, + "infoURL": "https://www.harmony.one/", + "shortName": "hmy-b-s2", + "chainId": 1666700002, + "networkId": 1666700002 + }, + { + "name": "Harmony Testnet Shard 3", + "chain": "Harmony", + "rpc": [ + "https://api.s3.b.hmny.io" + ], + "faucets": [], + "nativeCurrency": { + "name": "ONE", + "symbol": "ONE", + "decimals": 18 + }, + "infoURL": "https://www.harmony.one/", + "shortName": "hmy-b-s3", + "chainId": 1666700003, + "networkId": 1666700003 + }, + { // Creating a testnet entry, with the ID 1111111111, such that it is possible to use testnet when running integration tests for payments + "name": "Ethereum Testnet RPC", + "chainId": 1111111111, + "shortName": "rpc", + "chain": "ETH", + "network": "testnetrpc", + "networkId": 1111111111, + "nativeCurrency": { + "name": "Testnet Ether", + "symbol": "ETH", + "decimals": 18 + }, + "rpc": [ + ], + "faucets": [ + ], + }, ]; function searchDataChains(name, obj) { diff --git a/app/assets/v2/js/grants/_detail-component.js b/app/assets/v2/js/grants/_detail-component.js index 9953b48cd7a..4d54973de60 100644 --- a/app/assets/v2/js/grants/_detail-component.js +++ b/app/assets/v2/js/grants/_detail-component.js @@ -31,10 +31,40 @@ Vue.mixin({ vm.$set(vm.grant, 'isInCart', true); CartData.addToCart(response.grant); + + gtag('event', 'add_to_cart', { + // value, currency are set when checking out, but required + value: 0, + currency: 'USD', + items: [ + { + item_id: vm.grant.id, + item_name: vm.grant.title, + item_category: vm.grant?.active_round_names?.toString(), + item_brand: vm.grant?.admin_profile?.handle, + quantity: 1 + } + ] + }); }, removeFromCart: function() { const vm = this; + gtag('event', 'remove_from_cart', { + // value, currency are set when checking out, but required + value: 0, + currency: 'USD', + items: [ + { + item_id: vm.grant.id, + item_name: vm.grant.title, + item_category: vm.grant?.active_round_names?.toString(), + item_brand: vm.grant?.admin_profile?.handle, + quantity: 1 + } + ] + }); + vm.$set(vm.grant, 'isInCart', false); CartData.removeIdFromCart(vm.grant.id); }, @@ -81,6 +111,7 @@ Vue.mixin({ 'kusama_payout_address': vm.grant.kusama_payout_address, 'rsk_payout_address': vm.grant.rsk_payout_address, 'algorand_payout_address': vm.grant.algorand_payout_address, + 'cosmos_payout_address': vm.grant.cosmos_payout_address, 'region': vm.grant.region?.name || undefined, 'has_external_funding': vm.grant.has_external_funding, 'grant_tags[]': JSON.stringify(vm.grantTagsFormatted) @@ -167,6 +198,7 @@ Vue.mixin({ if (response.action === 'follow') { vm.grant.favorite = true; + vm.dismissFavoriteAlertCountDown = 10; } else { vm.grant.favorite = false; } @@ -373,7 +405,7 @@ Vue.mixin({ computed: { teamFormatted: { get() { - return this.grant.team_members.map((user)=> { + return this.grant.team_members ? this.grant.team_members.map((user)=> { if (!user?.fields) { return user; } @@ -383,11 +415,11 @@ Vue.mixin({ newTeam['avatar_url'] = `/dynamic/avatar/${user.fields.handle}`; newTeam['text'] = user.fields.handle; return newTeam; - }); + }) : []; }, set(value) { - this.grant.team_members = value.map((user) => { + this.grant.team_members = value ? value.map((user) => { return { fields: { @@ -396,7 +428,7 @@ Vue.mixin({ model: 'dashboard.profile', pk: user.id }; - }); + }) : []; } }, grantTagsFormatted: { @@ -496,6 +528,7 @@ Vue.component('grant-details', { logo: null, logoPreview: null, logoBackground: null, + dismissFavoriteAlertCountDown: 0, rows: 0, perPage: 4, currentPage: 1, @@ -556,7 +589,7 @@ Vue.component('grant-details', { { 'name': 'kusama', 'label': 'Kusama'}, { 'name': 'algorand', 'label': 'Algorand'} ], - grant_tags: document.grant_tags, + grant_tags: document.grant_tags ?? [], grant_salected_tags: [], externalFundingOptions: [ {'key': 'yes', 'value': 'Yes, this project has raised external funding.'}, @@ -564,10 +597,8 @@ Vue.component('grant-details', { ] }; }, - computed: { - async grantIsContract() { - const { admin_address } = this.grant; - + methods: { + grantIsContract: async function(admin_address) { if (admin_address && web3 && web3.eth) { const code = await web3.eth.getCode(admin_address); @@ -576,14 +607,20 @@ Vue.component('grant-details', { return false; } }, - mounted: function() { + mounted: async function() { const vm = this; vm.grant_twitter_handle_1 = vm.grant.twitter_handle_1; vm.grant.description_rich_edited = vm.grant.description_rich; - vm.grant_salected_tags = vm.grant.grant_tags.map(tag => tag.pk); + vm.grant_salected_tags = vm.grant.grant_tags ? vm.grant.grant_tags.map(tag => tag.pk) : []; vm.chainId = vm.grant.tenants.length > 0 ? vm.grant.tenants[0].toLowerCase() : ''; + const amount_received = isNaN(vm.grant.amount_received) ? Number(vm.grant.amount_received.replace(',', '')) : Number(vm.grant.amount_received); + const rounded_lifetime_amount = Math.round(amount_received / 1000) * 1000; + + vm.grant.rounded_lifetime_amount = (rounded_lifetime_amount > 1000) ? + `~$${rounded_lifetime_amount.toLocaleString()}` : 'Less than $1,000'; + if (vm.grant.description_rich_edited) { vm.editor.updateContents(JSON.parse(vm.grant.description_rich)); } @@ -591,6 +628,20 @@ Vue.component('grant-details', { // watch for cartUpdates window.addEventListener('cartDataUpdated', vm.updateCartData); + + gtag('event', 'view_item', { + // currency and value are required items but value is not known until cart + currency: 'USD', + value: 0, + items: [ + { + item_id: vm.grant.id, + item_name: vm.grant.title, + item_category: vm.grant.clr_round_num, + item_brand: vm.grant.admin_address + } + ] + }); }, beforeDestroy() { const vm = this; diff --git a/app/assets/v2/js/grants/_detail.js b/app/assets/v2/js/grants/_detail.js index bbdde81bbd4..499ac2396e6 100644 --- a/app/assets/v2/js/grants/_detail.js +++ b/app/assets/v2/js/grants/_detail.js @@ -6,6 +6,21 @@ Quill.register('modules/ImageExtend', ImageExtend); Vue.mixin({ methods: { + formatDonationAmounts(grant) { + const amountReceived = Vue.filter('round')(grant.amount_received || 0); + const amountRecievedInRound = Vue.filter('round')(grant.amount_received_in_round || 0); + + grant.clr_prediction_curve = grant.clr_prediction_curve.map((prediction) => { + prediction[0] = Vue.filter('round')(prediction[0] || 0); + prediction[1] = Vue.filter('round')(prediction[1] || 0); + prediction[2] = Vue.filter('round')(prediction[2] || 0); + return prediction; + }); + grant.last_update = Vue.filter('moment')(grant.last_update); + grant.amount_received = Vue.filter('formatNumber')(amountReceived); + grant.amount_received_in_round = Vue.filter('formatNumber')(amountRecievedInRound); + return grant; + }, fetchGrantDetails: function(id) { const vm = this; @@ -21,7 +36,7 @@ Vue.mixin({ fetch(url).then(function(res) { return res.json(); }).then(function(json) { - vm.grant = json.grants; + vm.grant = vm.formatDonationAmounts(json.grants); vm.loading = false; // pick up the curve from the grants model @@ -124,17 +139,6 @@ Vue.mixin({ }).catch(console.error); }, - backNavigation: function() { - const vm = this; - const lgt = localStorage.getItem('last_grants_title') || 'Grants'; - - const lgi = (document.referrer.indexOf(location.host) != -1 && !document.referrer.includes('grants/new')) ? 'javascript:history.back()' : '/grants/explorer'; - - if (lgi && lgt) { - vm.$set(vm.backLink, 'url', lgi); - vm.$set(vm.backLink, 'title', lgt); - } - }, scrollToElement(element) { const container = this.$refs[element]; @@ -173,16 +177,11 @@ if (document.getElementById('gc-grant-detail')) { isStaff: isStaff, grant: {}, tabSelected: 0, - tab: null, - backLink: { - url: '/grants', - title: 'Grants' - } + tab: null }; }, mounted: function() { this.enableTab(); - this.backNavigation(); this.fetchGrantDetails(); } }); diff --git a/app/assets/v2/js/grants/_new.js b/app/assets/v2/js/grants/_new.js index 75a01010f0c..3776033cec5 100644 --- a/app/assets/v2/js/grants/_new.js +++ b/app/assets/v2/js/grants/_new.js @@ -1,7 +1,7 @@ Vue.component('v-select', VueSelect.VueSelect); Vue.use(VueQuillEditor); -const step1Errors = [ 'grant_tags', 'has_external_funding' ]; +const step1Errors = [ 'grant_tags', 'tag_eligibility_reason', 'has_external_funding' ]; const step2Errors = [ 'title', 'description', 'reference_url', 'twitter_handle_1' ]; const step3Errors = ['chainId']; const errorsByStep = [ step1Errors, step2Errors, step3Errors ]; @@ -98,7 +98,6 @@ Vue.mixin({ checkForm: function(e) { let vm = this; - vm.submitted = true; vm.errors = {}; if (!vm.form.title.length) { vm.$set(vm.errors, 'title', 'Please enter the title'); @@ -148,6 +147,8 @@ Vue.mixin({ vm.$set(vm.errors, 'rsk_payout_address', 'Please enter RSK address'); } else if (vm.chainId == 'algorand' && !vm.form.algorand_payout_address) { vm.$set(vm.errors, 'algorand_payout_address', 'Please enter Algorand address'); + } else if (vm.chainId == 'cosmos' && !vm.form.cosmos_payout_address) { + vm.$set(vm.errors, 'cosmos_payout_address', 'Please enter Cosmos address'); } if (!vm.form.grant_type) { @@ -156,6 +157,9 @@ Vue.mixin({ if (!vm.form.grant_tags.length > 0) { vm.$set(vm.errors, 'grant_tags', 'Please select one or more grant tag'); } + if (!vm.form.tag_eligibility_reason.length) { + vm.$set(vm.errors, 'tag_eligibility_reason', 'Please enter eligibility tag reasoning'); + } if (vm.richDescription.length < 10) { vm.$set(vm.errors, 'description', 'Please enter description for the grant'); } @@ -215,8 +219,10 @@ Vue.mixin({ 'kusama_payout_address': form.kusama_payout_address, 'rsk_payout_address': form.rsk_payout_address, 'algorand_payout_address': form.algorand_payout_address, + 'cosmos_payout_address': form.cosmos_payout_address, 'grant_type': form.grant_type, 'tags[]': form.grant_tags, + 'tag_eligibility_reason': form.tag_eligibility_reason, 'network': form.network, 'region': form.region, 'has_external_funding': form.has_external_funding @@ -294,6 +300,7 @@ Vue.mixin({ form.kusama_payout_address = ''; form.rsk_payout_address = ''; form.algorand_payout_address = ''; + form.cosmos_payout_address = ''; }, onFileChange(e) { let vm = this; @@ -333,11 +340,15 @@ Vue.mixin({ this.$set(this.form, inputField.id, extracted); }, updateNav: function(direction) { - if (this.step === this.currentSteps.length) { - this.submitForm(); - return; + if (direction === 1) { + if (this.step === this.currentSteps.length) { + this.submitForm(); + return; + } + this.step += direction; + } else if (this.step > 1) { + this.step += direction; } - this.step += direction; } }, watch: { @@ -388,12 +399,13 @@ const grant_chains = [ { 'name': 'binance', 'label': 'Binance'}, { 'name': 'polkadot', 'label': 'Polkadot'}, { 'name': 'kusama', 'label': 'Kusama'}, - { 'name': 'algorand', 'label': 'Algorand'} + { 'name': 'algorand', 'label': 'Algorand'}, + { 'name': 'rsk', 'label': 'RSK'}, + { 'name': 'cosmos', 'label': 'Cosmos'} ]; if (document.contxt.is_staff) { const staff_chains = [ - { 'name': 'rsk', 'label': 'RSK'} ]; grant_chains.push(...staff_chains); @@ -444,8 +456,10 @@ if (document.getElementById('gc-new-grant')) { kusama_payout_address: '', rsk_payout_address: '', algorand_payout_address: '', + cosmos_payout_address: '', grant_type: 'gr12', grant_tags: [], + tag_eligibility_reason: '', network: 'mainnet' }, editorOptionPrio: { @@ -464,6 +478,29 @@ if (document.getElementById('gc-new-grant')) { }; }, computed: { + disableConfirm() { + return this.submitted && this.step === this.currentSteps.length && Object.keys(this.errors).length === 0; + }, + grantTagOptions() { + const sorted_tags = this.grant_tags.sort((a, b) => a.id - b.id); + const next_id = sorted_tags[sorted_tags.length - 1].id + 1; + const all_tags = this.grant_tags.sort((a, b) => b.is_eligibility_tag - a.is_eligibility_tag); + const first_discovery = (tag) => tag.is_eligibility_tag === 0; + + all_tags.unshift({ + id: 0, + name: 'eligibility tags'.toUpperCase(), + is_eligibility_tag: 'label' + }); + + all_tags.splice(all_tags.findIndex(first_discovery), 0, { + id: next_id, + name: 'discovery tags'.toUpperCase(), + is_eligibility_tag: 'label' + }); + + return all_tags; + }, queryParams() { return new URLSearchParams(window.location.search); }, @@ -504,14 +541,17 @@ if (document.getElementById('gc-new-grant')) { { text: 'Owner Information', active: false + }, + { + text: 'Review Grant', + active: false } - // commented out until preview step is created - // { - // text: 'Review Grant', - // active: false - // } ]; + if (this.step == 100) { + this.step = steps.length; + } + steps[this.step - 1].active = true; return steps; } @@ -528,7 +568,8 @@ if (document.getElementById('gc-new-grant')) { 'eth_payout_address', 'grant_type', 'team_members', - 'grant_tags' + 'grant_tags', + 'tag_eligibility_reason' ]; for (const key of writeToRoot) { diff --git a/app/assets/v2/js/grants/cart/algorand_extension.js b/app/assets/v2/js/grants/cart/algorand_extension.js index eb8083e8021..c22bfa1f992 100644 --- a/app/assets/v2/js/grants/cart/algorand_extension.js +++ b/app/assets/v2/js/grants/cart/algorand_extension.js @@ -237,21 +237,15 @@ const initAlgorandConnectionMyAlgo = async(grant, vm) => { } // 1. get connected accounts let addresses; - const address = localStorage.getItem('addr'); - if (address) { - addresses = [{ address }]; - } else { - const myAlgoConnect = new MyAlgoConnect(); - const accountsSharedByUser = await myAlgoConnect.connect(); + const myAlgoConnect = new MyAlgoConnect(); + const accountsSharedByUser = await myAlgoConnect.connect(); + + addresses = accountsSharedByUser.map((el) => ({ address: el.address })); - addresses = accountsSharedByUser.map((el) => ({ address: el.address })); - localStorage.setItem('addr', addresses[0].address); - } vm.updatePaymentStatus(grant.grant_id, 'waiting-on-user-input', null, { addresses }); - true; }; const initAlgorandConnectionWalletConnect = async(grant, vm) => { // 1. check if wallet is available @@ -324,8 +318,7 @@ const initAlgorandConnectionWalletConnect = async(grant, vm) => { const initAlgorandConnection = async(grant, vm) => { let callback; - switch (localStorage.getItem('algowallet') || 'AlgoSigner') { - default: + switch (localStorage.getItem('algowallet')) { case 'AlgoSigner': callback = initAlgorandConnectionAlgoSigner; break; @@ -335,6 +328,23 @@ const initAlgorandConnection = async(grant, vm) => { case 'WalletConnect': callback = initAlgorandConnectionWalletConnect; break; + default: + // initialize wallet through chain of fallbacks + // MyAlgo Connect -> Wallet Connect -> AlgoSigner + + if (MyAlgoConnect) { + callback = initAlgorandConnectionMyAlgo; + } else if (WalletConnect) { + callback = initAlgorandConnectionWalletConnect; + } else if (AlgoSigner) { + callback = initAlgorandConnectionAlgoSigner; + } else { + _alert( + { message: 'Unable to initialize MyAlgo Connect' }, + 'danger' + ); + return; + } } callback(grant, vm); }; @@ -350,17 +360,17 @@ const contributeWithAlgorandExtensionAlgoSigner = async( try { AlgoSigner.connect() .then(async() => { - // step3: check if enough balance is present + // check if enough balance is present const balance = await getBalance(NETWORK, from_address); if (!checkWalletBalance(grant, vm, from_address, balance)) { return; } - // step4: set modal to waiting state + // set modal to waiting state vm.updatePaymentStatus(grant.grant_id, 'waiting'); - // step5: get txnParams + // get txnParams console.log('Setting up params ...'); @@ -385,7 +395,7 @@ const contributeWithAlgorandExtensionAlgoSigner = async( let binariySignedTx = AlgoSigner.encoding.base64ToMsgpack( signedTxs[0].blob ); - // step7: broadcast txn + // broadcast txn algodClient .sendRawTransaction(binariySignedTx) @@ -449,14 +459,9 @@ const contributeWithAlgorandExtensionMyAlgo = async( try { const myAlgoConnect = new MyAlgoConnect(); - // step3: check if enough balance is present - const balance = await getBalance(NETWORK, from_address); - - if (!checkWalletBalance(grant, vm, from_address, balance)) { - return; - } + // TODO: check if enough balance is present - // step4: set modal to waiting state + // set modal to waiting state vm.updatePaymentStatus(grant.grant_id, 'waiting'); const algodClient = new algosdk.Algodv2( @@ -476,7 +481,7 @@ const contributeWithAlgorandExtensionMyAlgo = async( myAlgoConnect .signTransaction(binaryTx) .then((stx) => { - // step7: broadcast txn + // broadcast txn algodClient .sendRawTransaction(stx.blob) .do() @@ -491,12 +496,14 @@ const contributeWithAlgorandExtensionMyAlgo = async( }) .catch((e) => { console.log(e); - _alert( - { - message: 'Unable to broadcast transaction. Please try again' - }, - 'danger' - ); + + let message = 'Unable to broadcast transaction. Please try again'; + + if (e.message.includes('overspend')) { + message = `Insufficient balance in address ${from_address}`; + } + + _alert({ message }, 'danger'); vm.updatePaymentStatus(grant.grant_id, 'failed'); return; }); @@ -510,7 +517,7 @@ const contributeWithAlgorandExtensionMyAlgo = async( vm.updatePaymentStatus(grant.grant_id, 'failed'); return; }); - } catch (e) { + } catch (err) { contributeWithAlgorandExtensionCallback(err); return; } @@ -536,17 +543,12 @@ const contributeWithAlgorandExtensionWalletConnect = async( connector.createSession(); } - // step3: check if enough balance is present - const balance = await getBalance(NETWORK, from_address); - - if (!checkWalletBalance(grant, vm, from_address, balance)) { - return; - } + // TODO: check if enough balance is present - // step4: set modal to waiting state + // set modal to waiting state vm.updatePaymentStatus(grant.grant_id, 'waiting'); - // step5: get txnParams + // get txnParams const algodClient = new algosdk.Algodv2( '', 'https://node.algoexplorerapi.io', @@ -577,6 +579,7 @@ const contributeWithAlgorandExtensionWalletConnect = async( ); }) .catch((e) => { + console.log(e); _alert( { message: 'Unable to broadcast transaction. Please try again' }, 'danger' @@ -584,7 +587,7 @@ const contributeWithAlgorandExtensionWalletConnect = async( vm.updatePaymentStatus(grant.grant_id, 'failed'); return; }); - } catch (e) { + } catch (err) { contributeWithAlgorandExtensionCallback(err); return; } @@ -604,7 +607,7 @@ const contributeWithAlgorandExtension = async(grant, vm, from_address) => { } let callback; - switch (localStorage.getItem('algowallet') || 'AlgoSigner') { + switch (localStorage.getItem('algowallet') || 'MyAlgoConnect') { default: case 'AlgoSigner': callback = contributeWithAlgorandExtensionAlgoSigner; diff --git a/app/assets/v2/js/grants/cart/cosmos_extension.js b/app/assets/v2/js/grants/cart/cosmos_extension.js new file mode 100644 index 00000000000..cee3119a0ff --- /dev/null +++ b/app/assets/v2/js/grants/cart/cosmos_extension.js @@ -0,0 +1,100 @@ +const contributeWithCosmosExtension = async(grant, vm) => { + let decimals = vm.filterByChainId.filter(token => { + return token.name == grant.grant_donation_currency; + })[0].decimals; + const amount = grant.grant_donation_amount * 10 ** decimals; + const to_address = grant.cosmos_payout_address; + const chainId = 'cosmoshub-4'; + + if (!window.keplr) { + _alert({ message: gettext('Please download or enable Keplr browser wallet extension.') }, 'danger'); + } + + try { + await window.keplr.enable(chainId); + } catch (e) { + _alert({ message: gettext('Please unlock Keplr browser wallet extension.') }, 'danger'); + return; + } + + let client = await window.CosmWasmJS.setupWebKeplr({ + chainId, + rpcEndpoint: `${window.location.origin}/api/v1/reverse-proxy/cosmos`, + gasPrice: '0.0008uatom' + }); + + const from_address = (await client.signer.getAccounts())[0].address; + + let atomBalance = (await client.getBalance(from_address, 'uatom')).amount; + + if (Number(atomBalance) < amount) { + _alert({ message: gettext(`Insufficient balance in address ${from_address}`) }, 'danger'); + return; + } + + try { + const result = await client.sendTokens( + from_address, + to_address, + [{ amount: amount.toString(), denom: 'uatom' }], + 'auto' + ); + + if (result.code !== undefined && result.code !== 0) { + throw new Error(result.log || result.rawLog); + } + + callback(null, from_address, result.transactionHash); + } catch (e) { + callback(e); + } + + function callback(error, from_address, txn) { + if (error) { + vm.updatePaymentStatus(grant.grant_id, 'failed'); + _alert({ message: gettext('Unable to contribute to grant due to ' + error) }, 'danger'); + console.log(error); + } else { + + const payload = { + 'contributions': [{ + 'grant_id': grant.grant_id, + 'contributor_address': from_address, + 'tx_id': txn, + 'token_symbol': grant.grant_donation_currency, + 'tenant': 'COSMOS', + 'amount_per_period': grant.grant_donation_amount + }] + }; + + const apiUrlBounty = 'v1/api/contribute'; + + fetchData(apiUrlBounty, 'POST', JSON.stringify(payload)).then(response => { + if (200 <= response.status && response.status <= 204) { + MauticEvent.createEvent({ + 'alias': 'products', + 'data': [ + { + 'name': 'product', + 'attributes': { + 'product': 'grants', + 'persona': 'grants-contributor', + 'action': 'contribute' + } + } + ] + }); + vm.updatePaymentStatus(grant.grant_id, 'done', txn); + } else { + vm.updatePaymentStatus(grant.grant_id, 'failed'); + _alert('Unable to contribute to grant. Please try again later', 'danger'); + console.error(`error: grant contribution failed with status: ${response.status} and message: ${response.message}`); + } + }).catch(function(error) { + vm.updatePaymentStatus(grant.grant_id, 'failed'); + _alert('Unable to contribute to grant. Please try again later', 'danger'); + console.log(error); + }); + } + } +}; diff --git a/app/assets/v2/js/grants/cart/harmony_extension.js b/app/assets/v2/js/grants/cart/harmony_extension.js index 2380deed858..5045863c9ae 100644 --- a/app/assets/v2/js/grants/cart/harmony_extension.js +++ b/app/assets/v2/js/grants/cart/harmony_extension.js @@ -1,44 +1,46 @@ -const contributeWithHarmonyExtension = async(grant, vm, modal) => { +const contributeWithHarmonyExtension = async(grant, vm) => { - if (!harmony_utils.isOnewalletInstalled()) { - _alert({ message: 'Please ensure your Harmony One wallet is installed and unlocked'}, 'danger'); - return; + // Connect to Harmony Mainnet Shard 0 network with MetaMask + if (!provider) { + await onConnect(); } const amount = grant.grant_donation_amount; const to_address = grant.harmony_payout_address; + const from_address = selectedAccount; - // step 1: init harmony - let hmy = harmony_utils.initHarmony(); - - // step 2: init extension - let harmonyExt = await harmony_utils.initHarmonyExtension(); + await switchChain(1666600000); - // step 3: check balance - const from_address = await harmony_utils.loginHarmonyExtension(harmonyExt); - const account_balance = await harmony_utils.getAddressBalance(hmy, from_address); + // Check balance sufficiency + const account_balance = web3.utils.fromWei(balance, 'ether'); - if (account_balance < amount) { + if (Number(account_balance) < amount) { _alert({ message: `Account needs to have more than ${amount} ONE in shard 0 for payout`}, 'danger'); - harmony_utils.logoutHarmonyExtension(harmonyExt); return; } - // step 4: payout - harmony_utils.transfer( - hmy, - harmonyExt, - from_address, - to_address, - amount - ).then(txn => { - if (txn) { - callback(null, from_address, txn); - } else { - callback('error in signing transaction'); - } - }).catch(err => callback(err)); + // Payout + // Gas limit as indicated here: https://docs.harmony.one/home/general/wallets/browser-extensions-wallets/metamask-wallet/sending-and-receiving#sending-a-regular-transaction + try { + let web3 = new Web3(provider); + + const txHash = await web3.currentProvider.request({ + method: 'eth_sendTransaction', + params: [{ + to: to_address, + from: from_address, + value: web3.utils.toHex(web3.utils.toWei(String(amount))), + gasPrice: web3.utils.toHex(30 * Math.pow(10, 9)), + gas: web3.utils.toHex(25000), + gasLimit: web3.utils.toHex(25000) + }] + }); + + callback(null, from_address, txHash); + } catch (e) { + callback(e.message); + } function callback(error, from_address, txn) { if (error) { @@ -54,15 +56,13 @@ const contributeWithHarmonyExtension = async(grant, vm, modal) => { 'tx_id': txn, 'token_symbol': grant.grant_donation_currency, 'tenant': 'HARMONY', - 'amount_per_period': grant.grant_donation_amount + 'amount_per_period': amount }] }; const apiUrlBounty = 'v1/api/contribute'; fetchData(apiUrlBounty, 'POST', JSON.stringify(payload)).then(response => { - console.log(response); - console.log(payload); if (200 <= response.status && response.status <= 204) { console.log('success', response); MauticEvent.createEvent({ @@ -78,19 +78,18 @@ const contributeWithHarmonyExtension = async(grant, vm, modal) => { } ] }); + console.log('e reach here'); vm.updatePaymentStatus(grant.grant_id, 'done', txn); } else { vm.updatePaymentStatus(grant.grant_id, 'failed'); _alert('Unable to contribute to grant. Please try again later', 'danger'); - harmony_utils.logoutHarmonyExtension(harmonyExt); console.error(`error: grant contribution failed with status: ${response.status} and message: ${response.message}`); } }).catch(function(error) { vm.updatePaymentStatus(grant.grant_id, 'failed'); _alert('Unable to contribute to grant. Please try again later', 'danger'); - harmony_utils.logoutHarmonyExtension(harmonyExt); console.log(error); }); } diff --git a/app/assets/v2/js/grants/cart/rsk_extension.js b/app/assets/v2/js/grants/cart/rsk_extension.js index b88b318b0b5..10885841b68 100644 --- a/app/assets/v2/js/grants/cart/rsk_extension.js +++ b/app/assets/v2/js/grants/cart/rsk_extension.js @@ -1,4 +1,4 @@ -const contributeWithRskExtension = async(grant, vm, modal) => { +const contributeWithRskExtension = async(grant, vm) => { const token_name = grant.grant_donation_currency; const amount = grant.grant_donation_amount; const to_address = grant.rsk_payout_address; @@ -19,15 +19,13 @@ const contributeWithRskExtension = async(grant, vm, modal) => { try { console.log(ethereum.selectedAddress); } catch (e) { - modal.closeModal(); _alert({ message: 'Please download or enable Nifty Wallet extension' }, 'danger'); return; } if (!ethereum.selectedAddress) { - modal.closeModal(); return onConnect().then(() => { - modal.openModal(); + console.log('wallet connected'); }); } } diff --git a/app/assets/v2/js/grants/components.js b/app/assets/v2/js/grants/components.js index a43b70382a6..b0c5b3d9d62 100644 --- a/app/assets/v2/js/grants/components.js +++ b/app/assets/v2/js/grants/components.js @@ -72,6 +72,7 @@ Vue.component('grant-card', { if (response.action === 'follow') { this.grant.favorite = true; + this.$emit('dismiss-favorite-alert'); } else { this.grant.favorite = false; } @@ -85,10 +86,38 @@ Vue.component('grant-card', { vm.$set(vm.grant, 'isInCart', true); CartData.addToCart(response.grant); + gtag('event', 'add_to_cart', { + // value, currency are set when checking out, but required + currency: 'USD', + value: 0, + items: [ + { + item_id: vm.grant.id, + item_name: vm.grant.title, + item_category: vm.grant.active_round_names.toString(), + item_brand: vm.grant?.admin_profile?.handle, + quantity: 1 + } + ] + }); }, removeFromCart: function() { let vm = this; + gtag('event', 'remove_from_cart', { + // value, currency are set when checking out, but required + value: 0, + currency: 'USD', + items: [ + { + item_id: vm.grant.id, + item_name: vm.grant.title, + item_category: vm.grant.active_round_names.toString(), + item_brand: vm.grant?.admin_profile?.handle, + quantity: 1 + } + ] + }); vm.$set(vm.grant, 'isInCart', false); CartData.removeIdFromCart(vm.grant.id); }, @@ -214,6 +243,9 @@ Vue.component('grant-collection', { }, getGrantTitle(index) { return `${this.collection.cache?.grants[index]?.title}`; + }, + getGrantUrl(index) { + return `${this.collection.cache?.grants[index]?.url}`; } } }); diff --git a/app/assets/v2/js/grants/form_wrapper.js b/app/assets/v2/js/grants/form_wrapper.js index a9eb72a8273..809946ac486 100644 --- a/app/assets/v2/js/grants/form_wrapper.js +++ b/app/assets/v2/js/grants/form_wrapper.js @@ -9,6 +9,14 @@ Vue.component('form-wrapper', { }, 'total-steps': { type: Number, required: true + }, + 'disable-confirm': { + type: Boolean, + 'default': false + }, + isPreview: { + type: Boolean, + 'default': false } }, template: '#form-wrapper' diff --git a/app/assets/v2/js/grants/historical_claim.js b/app/assets/v2/js/grants/historical_claim.js index 4ab51266e9c..0ee49aa450f 100644 --- a/app/assets/v2/js/grants/historical_claim.js +++ b/app/assets/v2/js/grants/historical_claim.js @@ -3,7 +3,7 @@ Vue.component('historical-claim', { props: ['match'], computed: { payoutToken() { - return this.match.grant_payout.payout_token; + return this.match.grant_payout.token.symbol; } } }); diff --git a/app/assets/v2/js/grants/index.js b/app/assets/v2/js/grants/index.js index 93c806b1baf..6119765f2bc 100644 --- a/app/assets/v2/js/grants/index.js +++ b/app/assets/v2/js/grants/index.js @@ -33,13 +33,15 @@ if (document.getElementById('grants-showcase')) { network: 'mainnet', state: 'active', profile: false, - sub_round_slug: false, + round_num: document.round_num ? document.round_num : 0, + customer_name: document.customer_name ? document.customer_name : false, + sub_round_slug: document.sub_round_slug ? document.sub_round_slug : false, collections_page: 1, grant_regions: [], grant_types: [], grant_tags: [], tenants: [], - idle: false, + idle: true, featured: true, round_type: false }; @@ -66,7 +68,8 @@ if (document.getElementById('grants-showcase')) { {'name': 'KUSAMA', 'label': 'Kusama'}, {'name': 'BINANCE', 'label': 'Binance'}, {'name': 'RSK', 'label': 'Rsk'}, - {'name': 'ALGORAND', 'label': 'Algorand'} + {'name': 'ALGORAND', 'label': 'Algorand'}, + {'name': 'COSMOS', 'label': 'Cosmos'} ]; var appGrants = new Vue({ @@ -80,6 +83,7 @@ if (document.getElementById('grants-showcase')) { grantTenants: grantTenants, grant_tags: [], grant: {}, + dismissFavoriteAlertCountDown: 0, collectionsPage: null, cart_data_count: CartData.length(), network: document.network, @@ -100,7 +104,9 @@ if (document.getElementById('grants-showcase')) { view: localStorage.getItem('grants_view') || 'grid', shortView: true, bottom: false, - sub_round_slug: false, + round_num: document.round_num, + customer_name: document.customer_name, + sub_round_slug: document.sub_round_slug, cart_lock: false, collection_id: document.collection_id, collection_title: document.collection_title, @@ -138,6 +144,7 @@ if (document.getElementById('grants-showcase')) { {label: 'Weighted Shuffle', value: 'weighted_shuffle'}, {label: 'Trending', value: '-metadata__upcoming'}, {label: 'Undiscovered Gems', value: '-metadata__gem'}, + {label: 'GTC Conviction Voting', value: '-metadata__cv'}, {label: 'Recently Updated', value: '-last_update'}, {label: 'Newest', value: '-created_on'}, {label: 'Oldest', value: 'created_on'}, @@ -360,6 +367,13 @@ if (document.getElementById('grants-showcase')) { } getGrants.grants.forEach(function(item) { + + const amount_received = Number(item.amount_received.replace(',', '')); + const rounded_lifetime_amount = Math.round(amount_received / 1000) * 1000; + + item.rounded_lifetime_amount = (rounded_lifetime_amount > 1000) ? + `~$${rounded_lifetime_amount.toLocaleString()}` : 'Less than $1,000'; + if (!vm.prevouslyLoadedGrants[item.id]) { vm.grants.push(item); vm.previouslyLoadedGrants[item.id] = item; @@ -755,6 +769,7 @@ if (document.getElementById('grants-showcase')) { }; currentCLR.formatted_dates = formatted_dates; + currentCLR.shareURL = window.location.origin + '/grants/clr/' + currentCLR.sub_round_slug; } return currentCLR; diff --git a/app/assets/v2/js/grants/ingest-missing-contributions.js b/app/assets/v2/js/grants/ingest-missing-contributions.js index fb84e171eb2..34178dfff2e 100644 --- a/app/assets/v2/js/grants/ingest-missing-contributions.js +++ b/app/assets/v2/js/grants/ingest-missing-contributions.js @@ -140,15 +140,11 @@ Vue.component('grants-ingest-contributions', { throw new Error('Please connect a wallet'); } - if (!ethereum) { - throw new Error('Please connect to MetaMask wallet!'); - } - // Parse out provided form inputs and verify them, but bypass address checks if user is staff ({ txHash, userAddress, checkoutType } = formParams); if (checkoutType === 'eth_polygon') { - await setupPolygon(); // handles switching to polygon network + adding network config if doesn't exist + await switchChain(networkName === 'mainnet' ? 137 : 80001); // handles switching to polygon network + adding network config if doesn't exist } // If user entered an address, verify that it matches the user's connected wallet address diff --git a/app/assets/v2/js/grants/landingpage.js b/app/assets/v2/js/grants/landingpage.js index 620030559d0..fbcb2ed9db8 100644 --- a/app/assets/v2/js/grants/landingpage.js +++ b/app/assets/v2/js/grants/landingpage.js @@ -1,133 +1,24 @@ -const grantsNumPages = ''; -const grantsHasNext = false; -const numGrants = ''; - - if (document.getElementById('grants-showcase')) { - let sort = getParam('sort'); - - if (!sort) { - sort = 'weighted_shuffle'; - } var appGrants = new Vue({ delimiters: [ '[[', ']]' ], el: '#grants-showcase', data: { activePage: document.activePage, - grants: [], - grant: {}, - page: 1, - collectionsPage: null, - limit: 6, - sort: sort, - network: document.network, - keyword: document.keyword, - current_type: document.current_type, - idle_grants: document.idle_grants, - following: document.following, - featured: document.featured, state: 'active', - category: document.selected_category, - credentials: false, - grant_types: [], - contributions: {}, - collections: [], - show_contributions: document.show_contributions, - lock: false, - view: localStorage.getItem('grants_view') || 'grid', - shortView: true, - bottom: false, - cart_lock: false, - collection_id: document.collection_id, - round_num: document.round_num, - sub_round_slug: document.sub_round_slug, - customer_name: document.customer_name, - activeCollection: null, - grantsNumPages, - grantsHasNext, - numGrants, mainBanner: document.current_style, - visibleModal: false, - bannerCollapsed: false, - loadingCollections: false + visibleModal: false }, - methods: { - fetchCollections: async function(append_mode) { - let vm = this; - - if (vm.loadingCollections) - return; - - vm.loadingCollections = true; - - // vm.updateUrlParams(); - - let url = '/api/v0.1/grants_collections/?featured=true'; - - if (vm.collectionsPage) { - url = vm.collectionsPage; - } - let getCollections = await fetch(url); - let collectionsJson = await getCollections.json(); - - console.log(collectionsJson); - - if (append_mode) { - vm.collections = [ ...vm.collections, ...collectionsJson.results ]; - } else { - vm.collections = collectionsJson.results; - } - - - vm.collectionsPage = collectionsJson.next; - vm.loadingCollections = false; - - }, - scrollEnd: async function(event) { - const vm = this; - - const scrollY = window.scrollY; - const visible = document.documentElement.clientHeight; - const pageHeight = document.documentElement.scrollHeight - 500; - const bottomOfPage = visible + scrollY >= pageHeight; - - // if (bottomOfPage || pageHeight < visible) { - - // } + computed: { + isLandingPage() { + return (this.activePage == 'grants_landing'); }, showModal(modalName) { this.visibleModal = modalName; }, hideModal() { this.visibleModal = 'none'; - }, - toggleBannerCollapse() { - this.bannerCollapsed = !this.bannerCollapsed; - // record into ls - localStorage.setItem('bannerCollapsed', this.bannerCollapsed); } - }, - computed: { - isLandingPage() { - return (this.activePage == 'grants_landing'); - } - }, - beforeMount() { - this.fetchCollections(); - window.addEventListener('scroll', () => { - this.bottom = this.scrollEnd(); - }, false); - }, - beforeDestroy() { - window.removeEventListener('scroll', () => { - this.bottom = this.scrollEnd(); - }); - }, - mounted() { - const vm = this; - - vm.bannerCollapsed = localStorage.getItem('bannerCollapsed') == 'true'; } }); } diff --git a/app/assets/v2/js/grants/matching_funds.js b/app/assets/v2/js/grants/matching_funds.js index 8a060f6ea6e..2aa2f371933 100644 --- a/app/assets/v2/js/grants/matching_funds.js +++ b/app/assets/v2/js/grants/matching_funds.js @@ -23,19 +23,22 @@ Vue.mixin({ } window.history.replaceState({}, document.title, `${window.location.pathname}`); }, + async fetchGrants() { let vm = this; vm.loading = true; // fetch owned grants with clr matches - const url = '/grants/v1/api/clr-matches/'; + const url = '/grants/v1/api/clr-matches?expand=token'; try { - let result = await (await fetch(url)).json(); + let grants = await (await fetch(url)).json(); + // fetch only ETH grants + grants = grants.filter(grant => grant.admin_address != '0x0'); // update claim status + format date fields - await Promise.all(result.map(async grant => { + await Promise.all(grants.map(async grant => { await Promise.all(grant.clr_matches.map(async m => { if (m.grant_payout) { m.grant_payout.funding_withdrawal_date = m.grant_payout.funding_withdrawal_date @@ -46,7 +49,8 @@ Vue.mixin({ e.claim_start_date = e.claim_start_date ? moment(e.claim_start_date).format('MMM D') : null; e.claim_end_date = e.claim_end_date ? moment(e.claim_end_date).format('MMM D, Y') : null; }); - const claimData = await vm.checkClaimStatus(m, grant.admin_address); + + const claimData = await vm.checkClaimStatus(m); m.status = claimData.status; @@ -62,8 +66,7 @@ Vue.mixin({ })); })); - vm.grants = result; - + vm.grants = grants; vm.loading = false; } catch (e) { @@ -71,8 +74,8 @@ Vue.mixin({ _alert('Something went wrong. Please try again later', 'danger'); } }, - async checkClaimStatus(match, admin_address) { - const recipientAddress = admin_address; + + async checkClaimStatus(match, adminAddress) { const contractAddress = match.grant_payout.contract_address; const txHash = match.claim_tx; @@ -81,50 +84,42 @@ Vue.mixin({ web3 = new Web3(`wss://mainnet.infura.io/ws/v3/${document.contxt.INFURA_V3_PROJECT_ID}`); - // check if contract has funds for recipientAddress - const payout_contract = await new web3.eth.Contract( + const payoutContract = await new web3.eth.Contract( JSON.parse(document.contxt.match_payouts_abi), contractAddress ); - // After payouts are claimed, this will return 0 which updates value of claim_tx - const amount = await payout_contract.methods.payouts(recipientAddress).call(); - if (amount == 0) { - status = 'no-balance-to-claim'; - return { status, timestamp }; + const hexAmount = match.merkle_claim?.amount || '0x00'; + const index = match.merkle_claim?.index; + const amount = web3.utils.toBN(hexAmount); + + if (index === undefined || amount.toString() === '0') { + return { + status: 'no-balance-to-claim', + timestamp + }; } if (!txHash) { return { status, timestamp }; } + const claimed = await payoutContract.methods.hasClaimed(index).call(); - let tx = await web3.eth.getTransaction(txHash); - - if (tx && tx.to == contractAddress) { - status = 'pending'; // claim transaction is pending - - addressWithout0x = recipientAddress.replace('0x', '').toLowerCase(); - - // check if user attempted to claim match payout - // 0x8658b34 is the method id of the claimMatchPayout(address _recipient) function - userClaimedMatchPayout = tx.input.startsWith('0x8658b34') && tx.input.endsWith(addressWithout0x); - - if (userClaimedMatchPayout) { - let receipt = await web3.eth.getTransactionReceipt(txHash); - - if (receipt && receipt.status) { - status = 'claimed'; - timestamp = (await web3.eth.getBlock(receipt.blockNumber)).timestamp; // fetch claim date - } - } + if (claimed) { + return { + status: 'claimed', + timestamp + }; } - return { status, timestamp }; + return { + status: 'pending', + timestamp + }; }, - async claimMatch(match, admin_address) { - const vm = this; + async claimMatch(match, adminAddress) { // Helper method to manage state const waitingState = (state) => { if (state === true) { @@ -150,9 +145,10 @@ Vue.mixin({ const chainId = Number(web3.eth.currentProvider.chainId); - if (chainId < 1 || chainId > 5) { + // At this moment claims can only be completed on mainnet + if (chainId !== 1) { waitingState(false); - _alert('Please connect to a valid Ethereum network', 'danger'); + _alert('Please connect to Ethereum mainnet.', 'danger'); return; } @@ -172,14 +168,25 @@ Vue.mixin({ match.grant_payout.contract_address ); + const hexAmount = match.merkle_claim?.amount || '0x0'; + const index = match.merkle_claim?.index; + const merkleProof = match.merkle_claim?.merkleProof || []; + // Claim payout - matchPayouts.methods.claimMatchPayout(admin_address) + const claimArgs = { + index: index, + claimee: adminAddress, + amount: hexAmount, + merkleProof: merkleProof + }; + + matchPayouts.methods.claim(claimArgs) .send({from: user}) - .on('transactionHash', async function(txHash) { - await vm.postToDatabase(match.pk, txHash); - await vm.fetchGrants(); - vm.$forceUpdate(); - vm.tabSelected = 1; + .on('transactionHash', async txHash => { + await this.postToDatabase(match.pk, txHash); + await this.fetchGrants(); + this.$forceUpdate(); + this.tabSelected = 1; waitingState(false); _alert('Your matching funds claim is being processed', 'success'); }) @@ -189,7 +196,7 @@ Vue.mixin({ }); }, async postToDatabase(matchPk, claimTx) { - const url = '/grants/v1/api/clr-matches/'; + const url = '/grants/v1/api/clr-matches/?expand=token'; const csrfmiddlewaretoken = document.querySelector('[name=csrfmiddlewaretoken]').value; try { @@ -231,34 +238,30 @@ Vue.mixin({ } }); }, - stringifyClrs(clrs) { - let c = clrs.map(a => a.display_text); - let g = []; - - c.every(elem => { - g.push(elem); - if (g.join(', ').length > 24) { - g.splice(-1); - g.push(`+${c.length - g.length} more`); - return false; - } - return true; - }); - - return g.slice(0, -1).join(', ') + ' ' + g.slice(-1); - }, scrollToElement(element) { const container = this.$refs[element][this.tabSelected]; container.scrollIntoView(true); }, hasHistoricalMatches(grant) { - return grant.clr_matches.length && grant.clr_matches.filter(a => a.claim_tx).length; + return grant.clr_matches.length && + ( + grant.clr_matches.filter(a => a.claim_tx).length || + grant.clr_matches.filter(a => [ 8, 9 ].includes(a.round_number)).length + ); }, canClaimMatch(grant) { - return grant.clr_matches.length && grant.clr_matches.filter( - a => a.claim_tx === null && - a.grant_payout).length; + return grant.clr_matches.length && + grant.clr_matches.filter(a => + a.claim_tx === null && + a.grant_payout && + [ 'ready', 'pending' ].includes(a.grant_payout.status) + ).length; + }, + filterPendingClaims(matches) { + return this.filterMatchingPayout(matches).filter( + match => !match.claim_tx || match.claim_tx == '' + ); }, filterMatchingPayout(matches) { return matches.filter(match => match.grant_payout); @@ -295,4 +298,4 @@ if (document.getElementById('gc-matching-funds')) { } } }); -} \ No newline at end of file +} diff --git a/app/assets/v2/js/grants/ready_claim.js b/app/assets/v2/js/grants/ready_claim.js index 2982d60aca8..3968df9ee0c 100644 --- a/app/assets/v2/js/grants/ready_claim.js +++ b/app/assets/v2/js/grants/ready_claim.js @@ -1,6 +1,6 @@ Vue.component('matching-claim', { delimiters: [ '[[', ']]' ], - props: ['match'], + props: [ 'match', 'grant' ], methods: { filterMatchingPayout(matches) { return matches.filter(match => match.grant_payout); @@ -17,6 +17,9 @@ Vue.component('matching-claim', { return this.status === 'pending'; }, + isKYCPending() { + return !this.match.ready_for_payout && this.match.grant_payout.status == 'ready'; + }, claimStartDate() { return this.match.grant_payout.grant_clrs[0].claim_start_date; }, diff --git a/app/assets/v2/js/lib/cosmos/cosmwasmjs.js b/app/assets/v2/js/lib/cosmos/cosmwasmjs.js new file mode 100644 index 00000000000..d00597774ec --- /dev/null +++ b/app/assets/v2/js/lib/cosmos/cosmwasmjs.js @@ -0,0 +1,3 @@ +/*! For license information please see bundle.js.LICENSE.txt */ +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.CosmWasmJS=t():e.CosmWasmJS=t()}(self,(function(){return(()=>{var __webpack_modules__={8926:e=>{function t(e,t,n,r,o,i,a){try{var s=e[i](a),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,o)}e.exports=function(e){return function(){var n=this,r=arguments;return new Promise((function(o,i){var a=e.apply(n,r);function s(e){t(a,o,i,s,c,"next",e)}function c(e){t(a,o,i,s,c,"throw",e)}s(void 0)}))}},e.exports.__esModule=!0,e.exports.default=e.exports},4575:e=>{e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},e.exports.__esModule=!0,e.exports.default=e.exports},3913:e=>{function t(e,t){for(var n=0;n{e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.__esModule=!0,e.exports.default=e.exports},8:e=>{function t(n){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},7757:(e,t,n)=>{e.exports=n(5666)},4453:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decompress=t.compress=void 0;const r=n(641);function o(e){const t=[],n=[],r=new Map;for(const o of e.entries)if(o.exist){const e={exist:i(o.exist,n,r)};t.push(e)}else{if(!o.nonexist)throw new Error("Unexpected batch entry during compress");{const e=o.nonexist,a={nonexist:{key:e.key,left:i(e.left,n,r),right:i(e.right,n,r)}};t.push(a)}}return{entries:t,lookupInners:n}}function i(e,t,n){if(!e)return;const o=e.path.map((e=>{const o=r.ics23.InnerOp.encode(e).finish();let i=n.get(o);return void 0===i&&(i=t.length,t.push(e),n.set(o,i)),i}));return{key:e.key,value:e.value,leaf:e.leaf,path:o}}function a(e){const t=e.lookupInners;return{entries:e.entries.map((e=>{if(e.exist)return{exist:s(e.exist,t)};if(e.nonexist){const n=e.nonexist;return{nonexist:{key:n.key,left:s(n.left,t),right:s(n.right,t)}}}throw new Error("Unexpected batch entry during compress")}))}}function s(e,t){if(!e)return;const{key:n,value:r,leaf:o,path:i}=e;return{key:n,value:r,leaf:o,path:(i||[]).map((e=>t[e]))}}t.compress=function(e){return e.batch?{compressed:o(e.batch)}:e},t.decompress=function(e){return e.compressed?{batch:a(e.compressed)}:e}},641:(e,t,n)=>{"use strict";var r,o,i,a=n(3302),s=a.Reader,c=a.Writer,d=a.util,u=a.roots.default||(a.roots.default={});u.ics23=((i={}).HashOp=(r={},(o=Object.create(r))[r[0]="NO_HASH"]=0,o[r[1]="SHA256"]=1,o[r[2]="SHA512"]=2,o[r[3]="KECCAK"]=3,o[r[4]="RIPEMD160"]=4,o[r[5]="BITCOIN"]=5,o[r[6]="SHA512_256"]=6,o),i.LengthOp=function(){var e={},t=Object.create(e);return t[e[0]="NO_PREFIX"]=0,t[e[1]="VAR_PROTO"]=1,t[e[2]="VAR_RLP"]=2,t[e[3]="FIXED32_BIG"]=3,t[e[4]="FIXED32_LITTLE"]=4,t[e[5]="FIXED64_BIG"]=5,t[e[6]="FIXED64_LITTLE"]=6,t[e[7]="REQUIRE_32_BYTES"]=7,t[e[8]="REQUIRE_64_BYTES"]=8,t}(),i.ExistenceProof=function(){function e(e){if(this.path=[],e)for(var t=Object.keys(e),n=0;n>>3){case 1:r.key=e.bytes();break;case 2:r.value=e.bytes();break;case 3:r.leaf=u.ics23.LeafOp.decode(e,e.uint32());break;case 4:r.path&&r.path.length||(r.path=[]),r.path.push(u.ics23.InnerOp.decode(e,e.uint32()));break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof s||(e=new s(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.key&&e.hasOwnProperty("key")&&!(e.key&&"number"==typeof e.key.length||d.isString(e.key)))return"key: buffer expected";if(null!=e.value&&e.hasOwnProperty("value")&&!(e.value&&"number"==typeof e.value.length||d.isString(e.value)))return"value: buffer expected";if(null!=e.leaf&&e.hasOwnProperty("leaf")&&(n=u.ics23.LeafOp.verify(e.leaf)))return"leaf."+n;if(null!=e.path&&e.hasOwnProperty("path")){if(!Array.isArray(e.path))return"path: array expected";for(var t=0;t>>3){case 1:r.key=e.bytes();break;case 2:r.left=u.ics23.ExistenceProof.decode(e,e.uint32());break;case 3:r.right=u.ics23.ExistenceProof.decode(e,e.uint32());break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof s||(e=new s(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.key&&e.hasOwnProperty("key")&&!(e.key&&"number"==typeof e.key.length||d.isString(e.key))?"key: buffer expected":null!=e.left&&e.hasOwnProperty("left")&&(t=u.ics23.ExistenceProof.verify(e.left))?"left."+t:null!=e.right&&e.hasOwnProperty("right")&&(t=u.ics23.ExistenceProof.verify(e.right))?"right."+t:null;var t},e.fromObject=function(e){if(e instanceof u.ics23.NonExistenceProof)return e;var t=new u.ics23.NonExistenceProof;if(null!=e.key&&("string"==typeof e.key?d.base64.decode(e.key,t.key=d.newBuffer(d.base64.length(e.key)),0):e.key.length&&(t.key=e.key)),null!=e.left){if("object"!=typeof e.left)throw TypeError(".ics23.NonExistenceProof.left: object expected");t.left=u.ics23.ExistenceProof.fromObject(e.left)}if(null!=e.right){if("object"!=typeof e.right)throw TypeError(".ics23.NonExistenceProof.right: object expected");t.right=u.ics23.ExistenceProof.fromObject(e.right)}return t},e.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(t.bytes===String?n.key="":(n.key=[],t.bytes!==Array&&(n.key=d.newBuffer(n.key))),n.left=null,n.right=null),null!=e.key&&e.hasOwnProperty("key")&&(n.key=t.bytes===String?d.base64.encode(e.key,0,e.key.length):t.bytes===Array?Array.prototype.slice.call(e.key):e.key),null!=e.left&&e.hasOwnProperty("left")&&(n.left=u.ics23.ExistenceProof.toObject(e.left,t)),null!=e.right&&e.hasOwnProperty("right")&&(n.right=u.ics23.ExistenceProof.toObject(e.right,t)),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,a.util.toJSONOptions)},e}(),i.CommitmentProof=function(){function e(e){if(e)for(var t=Object.keys(e),n=0;n>>3){case 1:r.exist=u.ics23.ExistenceProof.decode(e,e.uint32());break;case 2:r.nonexist=u.ics23.NonExistenceProof.decode(e,e.uint32());break;case 3:r.batch=u.ics23.BatchProof.decode(e,e.uint32());break;case 4:r.compressed=u.ics23.CompressedBatchProof.decode(e,e.uint32());break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof s||(e=new s(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";var t={};if(null!=e.exist&&e.hasOwnProperty("exist")&&(t.proof=1,n=u.ics23.ExistenceProof.verify(e.exist)))return"exist."+n;if(null!=e.nonexist&&e.hasOwnProperty("nonexist")){if(1===t.proof)return"proof: multiple values";if(t.proof=1,n=u.ics23.NonExistenceProof.verify(e.nonexist))return"nonexist."+n}if(null!=e.batch&&e.hasOwnProperty("batch")){if(1===t.proof)return"proof: multiple values";if(t.proof=1,n=u.ics23.BatchProof.verify(e.batch))return"batch."+n}if(null!=e.compressed&&e.hasOwnProperty("compressed")){if(1===t.proof)return"proof: multiple values";var n;if(t.proof=1,n=u.ics23.CompressedBatchProof.verify(e.compressed))return"compressed."+n}return null},e.fromObject=function(e){if(e instanceof u.ics23.CommitmentProof)return e;var t=new u.ics23.CommitmentProof;if(null!=e.exist){if("object"!=typeof e.exist)throw TypeError(".ics23.CommitmentProof.exist: object expected");t.exist=u.ics23.ExistenceProof.fromObject(e.exist)}if(null!=e.nonexist){if("object"!=typeof e.nonexist)throw TypeError(".ics23.CommitmentProof.nonexist: object expected");t.nonexist=u.ics23.NonExistenceProof.fromObject(e.nonexist)}if(null!=e.batch){if("object"!=typeof e.batch)throw TypeError(".ics23.CommitmentProof.batch: object expected");t.batch=u.ics23.BatchProof.fromObject(e.batch)}if(null!=e.compressed){if("object"!=typeof e.compressed)throw TypeError(".ics23.CommitmentProof.compressed: object expected");t.compressed=u.ics23.CompressedBatchProof.fromObject(e.compressed)}return t},e.toObject=function(e,t){t||(t={});var n={};return null!=e.exist&&e.hasOwnProperty("exist")&&(n.exist=u.ics23.ExistenceProof.toObject(e.exist,t),t.oneofs&&(n.proof="exist")),null!=e.nonexist&&e.hasOwnProperty("nonexist")&&(n.nonexist=u.ics23.NonExistenceProof.toObject(e.nonexist,t),t.oneofs&&(n.proof="nonexist")),null!=e.batch&&e.hasOwnProperty("batch")&&(n.batch=u.ics23.BatchProof.toObject(e.batch,t),t.oneofs&&(n.proof="batch")),null!=e.compressed&&e.hasOwnProperty("compressed")&&(n.compressed=u.ics23.CompressedBatchProof.toObject(e.compressed,t),t.oneofs&&(n.proof="compressed")),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,a.util.toJSONOptions)},e}(),i.LeafOp=function(){function e(e){if(e)for(var t=Object.keys(e),n=0;n>>3){case 1:r.hash=e.int32();break;case 2:r.prehashKey=e.int32();break;case 3:r.prehashValue=e.int32();break;case 4:r.length=e.int32();break;case 5:r.prefix=e.bytes();break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof s||(e=new s(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.hash&&e.hasOwnProperty("hash"))switch(e.hash){default:return"hash: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:case 6:}if(null!=e.prehashKey&&e.hasOwnProperty("prehashKey"))switch(e.prehashKey){default:return"prehashKey: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:case 6:}if(null!=e.prehashValue&&e.hasOwnProperty("prehashValue"))switch(e.prehashValue){default:return"prehashValue: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:case 6:}if(null!=e.length&&e.hasOwnProperty("length"))switch(e.length){default:return"length: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:}return null!=e.prefix&&e.hasOwnProperty("prefix")&&!(e.prefix&&"number"==typeof e.prefix.length||d.isString(e.prefix))?"prefix: buffer expected":null},e.fromObject=function(e){if(e instanceof u.ics23.LeafOp)return e;var t=new u.ics23.LeafOp;switch(e.hash){case"NO_HASH":case 0:t.hash=0;break;case"SHA256":case 1:t.hash=1;break;case"SHA512":case 2:t.hash=2;break;case"KECCAK":case 3:t.hash=3;break;case"RIPEMD160":case 4:t.hash=4;break;case"BITCOIN":case 5:t.hash=5;break;case"SHA512_256":case 6:t.hash=6}switch(e.prehashKey){case"NO_HASH":case 0:t.prehashKey=0;break;case"SHA256":case 1:t.prehashKey=1;break;case"SHA512":case 2:t.prehashKey=2;break;case"KECCAK":case 3:t.prehashKey=3;break;case"RIPEMD160":case 4:t.prehashKey=4;break;case"BITCOIN":case 5:t.prehashKey=5;break;case"SHA512_256":case 6:t.prehashKey=6}switch(e.prehashValue){case"NO_HASH":case 0:t.prehashValue=0;break;case"SHA256":case 1:t.prehashValue=1;break;case"SHA512":case 2:t.prehashValue=2;break;case"KECCAK":case 3:t.prehashValue=3;break;case"RIPEMD160":case 4:t.prehashValue=4;break;case"BITCOIN":case 5:t.prehashValue=5;break;case"SHA512_256":case 6:t.prehashValue=6}switch(e.length){case"NO_PREFIX":case 0:t.length=0;break;case"VAR_PROTO":case 1:t.length=1;break;case"VAR_RLP":case 2:t.length=2;break;case"FIXED32_BIG":case 3:t.length=3;break;case"FIXED32_LITTLE":case 4:t.length=4;break;case"FIXED64_BIG":case 5:t.length=5;break;case"FIXED64_LITTLE":case 6:t.length=6;break;case"REQUIRE_32_BYTES":case 7:t.length=7;break;case"REQUIRE_64_BYTES":case 8:t.length=8}return null!=e.prefix&&("string"==typeof e.prefix?d.base64.decode(e.prefix,t.prefix=d.newBuffer(d.base64.length(e.prefix)),0):e.prefix.length&&(t.prefix=e.prefix)),t},e.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.hash=t.enums===String?"NO_HASH":0,n.prehashKey=t.enums===String?"NO_HASH":0,n.prehashValue=t.enums===String?"NO_HASH":0,n.length=t.enums===String?"NO_PREFIX":0,t.bytes===String?n.prefix="":(n.prefix=[],t.bytes!==Array&&(n.prefix=d.newBuffer(n.prefix)))),null!=e.hash&&e.hasOwnProperty("hash")&&(n.hash=t.enums===String?u.ics23.HashOp[e.hash]:e.hash),null!=e.prehashKey&&e.hasOwnProperty("prehashKey")&&(n.prehashKey=t.enums===String?u.ics23.HashOp[e.prehashKey]:e.prehashKey),null!=e.prehashValue&&e.hasOwnProperty("prehashValue")&&(n.prehashValue=t.enums===String?u.ics23.HashOp[e.prehashValue]:e.prehashValue),null!=e.length&&e.hasOwnProperty("length")&&(n.length=t.enums===String?u.ics23.LengthOp[e.length]:e.length),null!=e.prefix&&e.hasOwnProperty("prefix")&&(n.prefix=t.bytes===String?d.base64.encode(e.prefix,0,e.prefix.length):t.bytes===Array?Array.prototype.slice.call(e.prefix):e.prefix),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,a.util.toJSONOptions)},e}(),i.InnerOp=function(){function e(e){if(e)for(var t=Object.keys(e),n=0;n>>3){case 1:r.hash=e.int32();break;case 2:r.prefix=e.bytes();break;case 3:r.suffix=e.bytes();break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof s||(e=new s(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.hash&&e.hasOwnProperty("hash"))switch(e.hash){default:return"hash: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:case 6:}return null!=e.prefix&&e.hasOwnProperty("prefix")&&!(e.prefix&&"number"==typeof e.prefix.length||d.isString(e.prefix))?"prefix: buffer expected":null!=e.suffix&&e.hasOwnProperty("suffix")&&!(e.suffix&&"number"==typeof e.suffix.length||d.isString(e.suffix))?"suffix: buffer expected":null},e.fromObject=function(e){if(e instanceof u.ics23.InnerOp)return e;var t=new u.ics23.InnerOp;switch(e.hash){case"NO_HASH":case 0:t.hash=0;break;case"SHA256":case 1:t.hash=1;break;case"SHA512":case 2:t.hash=2;break;case"KECCAK":case 3:t.hash=3;break;case"RIPEMD160":case 4:t.hash=4;break;case"BITCOIN":case 5:t.hash=5;break;case"SHA512_256":case 6:t.hash=6}return null!=e.prefix&&("string"==typeof e.prefix?d.base64.decode(e.prefix,t.prefix=d.newBuffer(d.base64.length(e.prefix)),0):e.prefix.length&&(t.prefix=e.prefix)),null!=e.suffix&&("string"==typeof e.suffix?d.base64.decode(e.suffix,t.suffix=d.newBuffer(d.base64.length(e.suffix)),0):e.suffix.length&&(t.suffix=e.suffix)),t},e.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.hash=t.enums===String?"NO_HASH":0,t.bytes===String?n.prefix="":(n.prefix=[],t.bytes!==Array&&(n.prefix=d.newBuffer(n.prefix))),t.bytes===String?n.suffix="":(n.suffix=[],t.bytes!==Array&&(n.suffix=d.newBuffer(n.suffix)))),null!=e.hash&&e.hasOwnProperty("hash")&&(n.hash=t.enums===String?u.ics23.HashOp[e.hash]:e.hash),null!=e.prefix&&e.hasOwnProperty("prefix")&&(n.prefix=t.bytes===String?d.base64.encode(e.prefix,0,e.prefix.length):t.bytes===Array?Array.prototype.slice.call(e.prefix):e.prefix),null!=e.suffix&&e.hasOwnProperty("suffix")&&(n.suffix=t.bytes===String?d.base64.encode(e.suffix,0,e.suffix.length):t.bytes===Array?Array.prototype.slice.call(e.suffix):e.suffix),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,a.util.toJSONOptions)},e}(),i.ProofSpec=function(){function e(e){if(e)for(var t=Object.keys(e),n=0;n>>3){case 1:r.leafSpec=u.ics23.LeafOp.decode(e,e.uint32());break;case 2:r.innerSpec=u.ics23.InnerSpec.decode(e,e.uint32());break;case 3:r.maxDepth=e.int32();break;case 4:r.minDepth=e.int32();break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof s||(e=new s(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.leafSpec&&e.hasOwnProperty("leafSpec")&&(t=u.ics23.LeafOp.verify(e.leafSpec))?"leafSpec."+t:null!=e.innerSpec&&e.hasOwnProperty("innerSpec")&&(t=u.ics23.InnerSpec.verify(e.innerSpec))?"innerSpec."+t:null!=e.maxDepth&&e.hasOwnProperty("maxDepth")&&!d.isInteger(e.maxDepth)?"maxDepth: integer expected":null!=e.minDepth&&e.hasOwnProperty("minDepth")&&!d.isInteger(e.minDepth)?"minDepth: integer expected":null;var t},e.fromObject=function(e){if(e instanceof u.ics23.ProofSpec)return e;var t=new u.ics23.ProofSpec;if(null!=e.leafSpec){if("object"!=typeof e.leafSpec)throw TypeError(".ics23.ProofSpec.leafSpec: object expected");t.leafSpec=u.ics23.LeafOp.fromObject(e.leafSpec)}if(null!=e.innerSpec){if("object"!=typeof e.innerSpec)throw TypeError(".ics23.ProofSpec.innerSpec: object expected");t.innerSpec=u.ics23.InnerSpec.fromObject(e.innerSpec)}return null!=e.maxDepth&&(t.maxDepth=0|e.maxDepth),null!=e.minDepth&&(t.minDepth=0|e.minDepth),t},e.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.leafSpec=null,n.innerSpec=null,n.maxDepth=0,n.minDepth=0),null!=e.leafSpec&&e.hasOwnProperty("leafSpec")&&(n.leafSpec=u.ics23.LeafOp.toObject(e.leafSpec,t)),null!=e.innerSpec&&e.hasOwnProperty("innerSpec")&&(n.innerSpec=u.ics23.InnerSpec.toObject(e.innerSpec,t)),null!=e.maxDepth&&e.hasOwnProperty("maxDepth")&&(n.maxDepth=e.maxDepth),null!=e.minDepth&&e.hasOwnProperty("minDepth")&&(n.minDepth=e.minDepth),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,a.util.toJSONOptions)},e}(),i.InnerSpec=function(){function e(e){if(this.childOrder=[],e)for(var t=Object.keys(e),n=0;n>>3){case 1:if(r.childOrder&&r.childOrder.length||(r.childOrder=[]),2==(7&o))for(var i=e.uint32()+e.pos;e.pos>>3==1?(r.entries&&r.entries.length||(r.entries=[]),r.entries.push(u.ics23.BatchEntry.decode(e,e.uint32()))):e.skipType(7&o)}return r},e.decodeDelimited=function(e){return e instanceof s||(e=new s(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.entries&&e.hasOwnProperty("entries")){if(!Array.isArray(e.entries))return"entries: array expected";for(var t=0;t>>3){case 1:r.exist=u.ics23.ExistenceProof.decode(e,e.uint32());break;case 2:r.nonexist=u.ics23.NonExistenceProof.decode(e,e.uint32());break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof s||(e=new s(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";var t={};if(null!=e.exist&&e.hasOwnProperty("exist")&&(t.proof=1,n=u.ics23.ExistenceProof.verify(e.exist)))return"exist."+n;if(null!=e.nonexist&&e.hasOwnProperty("nonexist")){if(1===t.proof)return"proof: multiple values";var n;if(t.proof=1,n=u.ics23.NonExistenceProof.verify(e.nonexist))return"nonexist."+n}return null},e.fromObject=function(e){if(e instanceof u.ics23.BatchEntry)return e;var t=new u.ics23.BatchEntry;if(null!=e.exist){if("object"!=typeof e.exist)throw TypeError(".ics23.BatchEntry.exist: object expected");t.exist=u.ics23.ExistenceProof.fromObject(e.exist)}if(null!=e.nonexist){if("object"!=typeof e.nonexist)throw TypeError(".ics23.BatchEntry.nonexist: object expected");t.nonexist=u.ics23.NonExistenceProof.fromObject(e.nonexist)}return t},e.toObject=function(e,t){t||(t={});var n={};return null!=e.exist&&e.hasOwnProperty("exist")&&(n.exist=u.ics23.ExistenceProof.toObject(e.exist,t),t.oneofs&&(n.proof="exist")),null!=e.nonexist&&e.hasOwnProperty("nonexist")&&(n.nonexist=u.ics23.NonExistenceProof.toObject(e.nonexist,t),t.oneofs&&(n.proof="nonexist")),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,a.util.toJSONOptions)},e}(),i.CompressedBatchProof=function(){function e(e){if(this.entries=[],this.lookupInners=[],e)for(var t=Object.keys(e),n=0;n>>3){case 1:r.entries&&r.entries.length||(r.entries=[]),r.entries.push(u.ics23.CompressedBatchEntry.decode(e,e.uint32()));break;case 2:r.lookupInners&&r.lookupInners.length||(r.lookupInners=[]),r.lookupInners.push(u.ics23.InnerOp.decode(e,e.uint32()));break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof s||(e=new s(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.entries&&e.hasOwnProperty("entries")){if(!Array.isArray(e.entries))return"entries: array expected";for(var t=0;t>>3){case 1:r.exist=u.ics23.CompressedExistenceProof.decode(e,e.uint32());break;case 2:r.nonexist=u.ics23.CompressedNonExistenceProof.decode(e,e.uint32());break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof s||(e=new s(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";var t={};if(null!=e.exist&&e.hasOwnProperty("exist")&&(t.proof=1,n=u.ics23.CompressedExistenceProof.verify(e.exist)))return"exist."+n;if(null!=e.nonexist&&e.hasOwnProperty("nonexist")){if(1===t.proof)return"proof: multiple values";var n;if(t.proof=1,n=u.ics23.CompressedNonExistenceProof.verify(e.nonexist))return"nonexist."+n}return null},e.fromObject=function(e){if(e instanceof u.ics23.CompressedBatchEntry)return e;var t=new u.ics23.CompressedBatchEntry;if(null!=e.exist){if("object"!=typeof e.exist)throw TypeError(".ics23.CompressedBatchEntry.exist: object expected");t.exist=u.ics23.CompressedExistenceProof.fromObject(e.exist)}if(null!=e.nonexist){if("object"!=typeof e.nonexist)throw TypeError(".ics23.CompressedBatchEntry.nonexist: object expected");t.nonexist=u.ics23.CompressedNonExistenceProof.fromObject(e.nonexist)}return t},e.toObject=function(e,t){t||(t={});var n={};return null!=e.exist&&e.hasOwnProperty("exist")&&(n.exist=u.ics23.CompressedExistenceProof.toObject(e.exist,t),t.oneofs&&(n.proof="exist")),null!=e.nonexist&&e.hasOwnProperty("nonexist")&&(n.nonexist=u.ics23.CompressedNonExistenceProof.toObject(e.nonexist,t),t.oneofs&&(n.proof="nonexist")),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,a.util.toJSONOptions)},e}(),i.CompressedExistenceProof=function(){function e(e){if(this.path=[],e)for(var t=Object.keys(e),n=0;n>>3){case 1:r.key=e.bytes();break;case 2:r.value=e.bytes();break;case 3:r.leaf=u.ics23.LeafOp.decode(e,e.uint32());break;case 4:if(r.path&&r.path.length||(r.path=[]),2==(7&o))for(var i=e.uint32()+e.pos;e.pos>>3){case 1:r.key=e.bytes();break;case 2:r.left=u.ics23.CompressedExistenceProof.decode(e,e.uint32());break;case 3:r.right=u.ics23.CompressedExistenceProof.decode(e,e.uint32());break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof s||(e=new s(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.key&&e.hasOwnProperty("key")&&!(e.key&&"number"==typeof e.key.length||d.isString(e.key))?"key: buffer expected":null!=e.left&&e.hasOwnProperty("left")&&(t=u.ics23.CompressedExistenceProof.verify(e.left))?"left."+t:null!=e.right&&e.hasOwnProperty("right")&&(t=u.ics23.CompressedExistenceProof.verify(e.right))?"right."+t:null;var t},e.fromObject=function(e){if(e instanceof u.ics23.CompressedNonExistenceProof)return e;var t=new u.ics23.CompressedNonExistenceProof;if(null!=e.key&&("string"==typeof e.key?d.base64.decode(e.key,t.key=d.newBuffer(d.base64.length(e.key)),0):e.key.length&&(t.key=e.key)),null!=e.left){if("object"!=typeof e.left)throw TypeError(".ics23.CompressedNonExistenceProof.left: object expected");t.left=u.ics23.CompressedExistenceProof.fromObject(e.left)}if(null!=e.right){if("object"!=typeof e.right)throw TypeError(".ics23.CompressedNonExistenceProof.right: object expected");t.right=u.ics23.CompressedExistenceProof.fromObject(e.right)}return t},e.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(t.bytes===String?n.key="":(n.key=[],t.bytes!==Array&&(n.key=d.newBuffer(n.key))),n.left=null,n.right=null),null!=e.key&&e.hasOwnProperty("key")&&(n.key=t.bytes===String?d.base64.encode(e.key,0,e.key.length):t.bytes===Array?Array.prototype.slice.call(e.key):e.key),null!=e.left&&e.hasOwnProperty("left")&&(n.left=u.ics23.CompressedExistenceProof.toObject(e.left,t)),null!=e.right&&e.hasOwnProperty("right")&&(n.right=u.ics23.CompressedExistenceProof.toObject(e.right,t)),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,a.util.toJSONOptions)},e}(),i),e.exports=u},1708:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.batchVerifyNonMembership=t.batchVerifyMembership=t.verifyNonMembership=t.verifyMembership=void 0;const r=n(4453),o=n(4659),i=n(3824);function a(e,t,n,a,s){const c=function(e,t){const n=e=>!!e&&(0,i.bytesEqual)(t,e.key);return n(e.exist)?e.exist:e.batch?e.batch.entries.map((e=>e.exist||null)).find(n):void 0}((0,r.decompress)(e),a);if(!c)return!1;try{return(0,o.verifyExistence)(c,t,n,a,s),!0}catch(e){return!1}}function s(e,t,n,a){const s=function(e,t){const n=e=>!!e&&(!e.left||(0,i.bytesBefore)(e.left.key,t))&&(!e.right||(0,i.bytesBefore)(t,e.right.key));return n(e.nonexist)?e.nonexist:e.batch?e.batch.entries.map((e=>e.nonexist||null)).find(n):void 0}((0,r.decompress)(e),a);if(!s)return!1;try{return(0,o.verifyNonExistence)(s,t,n,a),!0}catch(e){return!1}}t.verifyMembership=a,t.verifyNonMembership=s,t.batchVerifyMembership=function(e,t,n,o){const i=(0,r.decompress)(e);for(const[e,r]of o.entries())if(!a(i,t,n,e,r))return!1;return!0},t.batchVerifyNonMembership=function(e,t,n,o){const i=(0,r.decompress)(e);for(const e of o)if(!s(i,t,n,e))return!1;return!0}},5201:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.verifyNonExistence=t.verifyExistence=t.tendermintSpec=t.iavlSpec=t.calculateExistenceRoot=t.verifyNonMembership=t.verifyMembership=t.ics23=void 0;var r=n(641);Object.defineProperty(t,"ics23",{enumerable:!0,get:function(){return r.ics23}});var o=n(1708);Object.defineProperty(t,"verifyMembership",{enumerable:!0,get:function(){return o.verifyMembership}}),Object.defineProperty(t,"verifyNonMembership",{enumerable:!0,get:function(){return o.verifyNonMembership}});var i=n(4659);Object.defineProperty(t,"calculateExistenceRoot",{enumerable:!0,get:function(){return i.calculateExistenceRoot}}),Object.defineProperty(t,"iavlSpec",{enumerable:!0,get:function(){return i.iavlSpec}}),Object.defineProperty(t,"tendermintSpec",{enumerable:!0,get:function(){return i.tendermintSpec}}),Object.defineProperty(t,"verifyExistence",{enumerable:!0,get:function(){return i.verifyExistence}}),Object.defineProperty(t,"verifyNonExistence",{enumerable:!0,get:function(){return i.verifyNonExistence}})},9768:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.doHash=t.applyInner=t.applyLeaf=void 0;const r=n(830),o=n(3061),i=n(6262),a=n(641);function s(e,t){return null==e?t:e}t.applyLeaf=function(e,t,n){if(0===t.length)throw new Error("Missing key");if(0===n.length)throw new Error("Missing value");const r=l(c(e.prehashKey),d(e.length),t),o=l(c(e.prehashValue),d(e.length),n),i=new Uint8Array([...u(e.prefix),...r,...o]);return A(c(e.hash),i)},t.applyInner=function(e,t){if(0===t.length)throw new Error("Inner op needs child value");const n=new Uint8Array([...u(e.prefix),...t,...u(e.suffix)]);return A(c(e.hash),n)};const c=e=>s(e,a.ics23.HashOp.NO_HASH),d=e=>s(e,a.ics23.LengthOp.NO_PREFIX),u=e=>s(e,new Uint8Array([]));function l(e,t,n){const r=function(e,t){return e===a.ics23.HashOp.NO_HASH?t:A(e,t)}(e,n);return function(e,t){switch(e){case a.ics23.LengthOp.NO_PREFIX:return t;case a.ics23.LengthOp.VAR_PROTO:return new Uint8Array([...f(t.length),...t]);case a.ics23.LengthOp.REQUIRE_32_BYTES:if(32!==t.length)throw new Error(`Length is ${t.length}, not 32 bytes`);return t;case a.ics23.LengthOp.REQUIRE_64_BYTES:if(64!==t.length)throw new Error(`Length is ${t.length}, not 64 bytes`);return t;case a.ics23.LengthOp.FIXED32_LITTLE:return new Uint8Array([...h(t.length),...t])}throw new Error(`Unsupported lengthop: ${e}`)}(t,r)}function A(e,t){switch(e){case a.ics23.HashOp.SHA256:return(0,o.sha256)(t);case a.ics23.HashOp.SHA512:return(0,i.sha512)(t);case a.ics23.HashOp.RIPEMD160:return(0,r.ripemd160)(t);case a.ics23.HashOp.BITCOIN:return(0,r.ripemd160)((0,o.sha256)(t));case a.ics23.HashOp.SHA512_256:return(0,i.sha512_256)(t)}throw new Error(`Unsupported hashop: ${e}`)}function f(e){let t=[],n=e;for(;n>=128;){const e=n%128+128;t=[...t,e],n/=128}return t=[...t,n],new Uint8Array(t)}function h(e){const t=new Uint8Array(4);let n=e;for(let e=t.length;e>0;e--)t[Math.abs(e-t.length)]=n%256,n=Math.floor(n/256);return t}t.doHash=A},4659:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ensureLeftNeighbor=t.ensureSpec=t.calculateExistenceRoot=t.verifyNonExistence=t.verifyExistence=t.smtSpec=t.tendermintSpec=t.iavlSpec=void 0;const r=n(641),o=n(9768),i=n(3824);function a(e,t,n,r,o){c(e,t);const a=s(e);(0,i.ensureBytesEqual)(a,n),(0,i.ensureBytesEqual)(r,e.key),(0,i.ensureBytesEqual)(o,e.value)}function s(e){if(!e.key||!e.value)throw new Error("Existence proof needs key and value set");if(!e.leaf)throw new Error("Existence proof must start with a leaf operation");const t=e.path||[];let n=(0,o.applyLeaf)(e.leaf,e.key,e.value);for(const e of t)n=(0,o.applyInner)(e,n);return n}function c(e,t){if(!e.leaf)throw new Error("Existence proof must start with a leaf operation");if(!t.leafSpec)throw new Error("Spec must include leafSpec");if(!t.innerSpec)throw new Error("Spec must include innerSpec");(0,i.ensureLeaf)(e.leaf,t.leafSpec);const n=e.path||[];if(t.minDepth&&n.lengtht.maxDepth)throw new Error(`Too many inner nodes ${n.length}`);for(const e of n)(0,i.ensureInner)(e,t.leafSpec.prefix,t.innerSpec)}function d(e,t){const{minPrefix:n,maxPrefix:r,suffix:o}=h(e,0);for(const e of t)if(!f(e,n,r,o))throw new Error("Step not leftmost")}function u(e,t){const n=e.childOrder.length-1,{minPrefix:r,maxPrefix:o,suffix:i}=h(e,n);for(const e of t)if(!f(e,r,o,i))throw new Error("Step not leftmost")}function l(e,t,n){const r=[...t],o=[...n];let a=r.pop(),s=o.pop();for(;(0,i.bytesEqual)(a.prefix,s.prefix)&&(0,i.bytesEqual)(a.suffix,s.suffix);)a=r.pop(),s=o.pop();if(!function(e,t,n){const r=A(e,t);return A(e,n)===r+1}(e,a,s))throw new Error("Not left neightbor at first divergent step");u(e,r),d(e,o)}function A(e,t){for(let n=0;nn||(e.suffix||[]).length!==r)}function h(e,t){const n=function(e,t){if(t<0||t>=e.length)throw new Error(`Invalid branch: ${t}`);return e.findIndex((e=>e===t))}(e.childOrder,t),r=n*e.childSize;return{minPrefix:r+e.minPrefixLength,maxPrefix:r+e.maxPrefixLength,suffix:(e.childOrder.length-1-n)*e.childSize}}t.iavlSpec={leafSpec:{prefix:Uint8Array.from([0]),hash:r.ics23.HashOp.SHA256,prehashValue:r.ics23.HashOp.SHA256,prehashKey:r.ics23.HashOp.NO_HASH,length:r.ics23.LengthOp.VAR_PROTO},innerSpec:{childOrder:[0,1],minPrefixLength:4,maxPrefixLength:12,childSize:33,hash:r.ics23.HashOp.SHA256}},t.tendermintSpec={leafSpec:{prefix:Uint8Array.from([0]),hash:r.ics23.HashOp.SHA256,prehashValue:r.ics23.HashOp.SHA256,prehashKey:r.ics23.HashOp.NO_HASH,length:r.ics23.LengthOp.VAR_PROTO},innerSpec:{childOrder:[0,1],minPrefixLength:1,maxPrefixLength:1,childSize:32,hash:r.ics23.HashOp.SHA256}},t.smtSpec={leafSpec:{hash:r.ics23.HashOp.SHA256,prehashKey:r.ics23.HashOp.NO_HASH,prehashValue:r.ics23.HashOp.SHA256,length:r.ics23.LengthOp.NO_PREFIX,prefix:Uint8Array.from([0])},innerSpec:{childOrder:[0,1],childSize:32,minPrefixLength:1,maxPrefixLength:1,emptyChild:new Uint8Array(32),hash:r.ics23.HashOp.SHA256},maxDepth:256},t.verifyExistence=a,t.verifyNonExistence=function(e,t,n,r){let o,s;if(e.left&&(a(e.left,t,n,e.left.key,e.left.value),o=e.left.key),e.right&&(a(e.right,t,n,e.right.key,e.right.value),s=e.right.key),!o&&!s)throw new Error("neither left nor right proof defined");if(o&&(0,i.ensureBytesBefore)(o,r),s&&(0,i.ensureBytesBefore)(r,s),!t.innerSpec)throw new Error("no inner spec");o?s?l(t.innerSpec,e.left.path,e.right.path):u(t.innerSpec,e.left.path):d(t.innerSpec,e.right.path)},t.calculateExistenceRoot=s,t.ensureSpec=c,t.ensureLeftNeighbor=l},3824:(e,t)=>{"use strict";function n(e,t){if(e.length!==t.length)throw new Error(`Different lengths ${e.length} vs ${t.length}`);for(let n=0;nt[r])return!1}return e.length(n.maxPrefixLength||0)+r)throw new Error(`Prefix too long: ${e.prefix.length} bytes`)},t.ensureBytesEqual=n,t.bytesEqual=function(e,t){if(e.length!==t.length)return!1;for(let n=0;n{"use strict";e.exports=n(6401)},6401:(e,t,n)=>{"use strict";var r=t;function o(){r.util._configure(),r.Writer._configure(r.BufferWriter),r.Reader._configure(r.BufferReader)}r.build="minimal",r.Writer=n(7490),r.BufferWriter=n(7094),r.Reader=n(952),r.BufferReader=n(3318),r.util=n(493),r.rpc=n(7365),r.roots=n(6756),r.configure=o,o()},952:(e,t,n)=>{"use strict";e.exports=c;var r,o=n(493),i=o.LongBits,a=o.utf8;function s(e,t){return RangeError("index out of range: "+e.pos+" + "+(t||1)+" > "+e.len)}function c(e){this.buf=e,this.pos=0,this.len=e.length}var d,u="undefined"!=typeof Uint8Array?function(e){if(e instanceof Uint8Array||Array.isArray(e))return new c(e);throw Error("illegal buffer")}:function(e){if(Array.isArray(e))return new c(e);throw Error("illegal buffer")},l=function(){return o.Buffer?function(e){return(c.create=function(e){return o.Buffer.isBuffer(e)?new r(e):u(e)})(e)}:u};function A(){var e=new i(0,0),t=0;if(!(this.len-this.pos>4)){for(;t<3;++t){if(this.pos>=this.len)throw s(this);if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e}return e.lo=(e.lo|(127&this.buf[this.pos++])<<7*t)>>>0,e}for(;t<4;++t)if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e;if(e.lo=(e.lo|(127&this.buf[this.pos])<<28)>>>0,e.hi=(e.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return e;if(t=0,this.len-this.pos>4){for(;t<5;++t)if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}else for(;t<5;++t){if(this.pos>=this.len)throw s(this);if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}throw Error("invalid varint encoding")}function f(e,t){return(e[t-4]|e[t-3]<<8|e[t-2]<<16|e[t-1]<<24)>>>0}function h(){if(this.pos+8>this.len)throw s(this,8);return new i(f(this.buf,this.pos+=4),f(this.buf,this.pos+=4))}c.create=l(),c.prototype._slice=o.Array.prototype.subarray||o.Array.prototype.slice,c.prototype.uint32=(d=4294967295,function(){if(d=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128)return d;if(d=(d|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128)return d;if(d=(d|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128)return d;if(d=(d|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128)return d;if(d=(d|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128)return d;if((this.pos+=5)>this.len)throw this.pos=this.len,s(this,10);return d}),c.prototype.int32=function(){return 0|this.uint32()},c.prototype.sint32=function(){var e=this.uint32();return e>>>1^-(1&e)|0},c.prototype.bool=function(){return 0!==this.uint32()},c.prototype.fixed32=function(){if(this.pos+4>this.len)throw s(this,4);return f(this.buf,this.pos+=4)},c.prototype.sfixed32=function(){if(this.pos+4>this.len)throw s(this,4);return 0|f(this.buf,this.pos+=4)},c.prototype.float=function(){if(this.pos+4>this.len)throw s(this,4);var e=o.float.readFloatLE(this.buf,this.pos);return this.pos+=4,e},c.prototype.double=function(){if(this.pos+8>this.len)throw s(this,4);var e=o.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,e},c.prototype.bytes=function(){var e=this.uint32(),t=this.pos,n=this.pos+e;if(n>this.len)throw s(this,e);return this.pos+=e,Array.isArray(this.buf)?this.buf.slice(t,n):t===n?new this.buf.constructor(0):this._slice.call(this.buf,t,n)},c.prototype.string=function(){var e=this.bytes();return a.read(e,0,e.length)},c.prototype.skip=function(e){if("number"==typeof e){if(this.pos+e>this.len)throw s(this,e);this.pos+=e}else do{if(this.pos>=this.len)throw s(this)}while(128&this.buf[this.pos++]);return this},c.prototype.skipType=function(e){switch(e){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;4!=(e=7&this.uint32());)this.skipType(e);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+e+" at offset "+this.pos)}return this},c._configure=function(e){r=e,c.create=l(),r._configure();var t=o.Long?"toLong":"toNumber";o.merge(c.prototype,{int64:function(){return A.call(this)[t](!1)},uint64:function(){return A.call(this)[t](!0)},sint64:function(){return A.call(this).zzDecode()[t](!1)},fixed64:function(){return h.call(this)[t](!0)},sfixed64:function(){return h.call(this)[t](!1)}})}},3318:(e,t,n)=>{"use strict";e.exports=i;var r=n(952);(i.prototype=Object.create(r.prototype)).constructor=i;var o=n(493);function i(e){r.call(this,e)}i._configure=function(){o.Buffer&&(i.prototype._slice=o.Buffer.prototype.slice)},i.prototype.string=function(){var e=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+e,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+e,this.len))},i._configure()},6756:e=>{"use strict";e.exports={}},7365:(e,t,n)=>{"use strict";t.Service=n(1216)},1216:(e,t,n)=>{"use strict";e.exports=o;var r=n(493);function o(e,t,n){if("function"!=typeof e)throw TypeError("rpcImpl must be a function");r.EventEmitter.call(this),this.rpcImpl=e,this.requestDelimited=Boolean(t),this.responseDelimited=Boolean(n)}(o.prototype=Object.create(r.EventEmitter.prototype)).constructor=o,o.prototype.rpcCall=function e(t,n,o,i,a){if(!i)throw TypeError("request must be specified");var s=this;if(!a)return r.asPromise(e,s,t,n,o,i);if(s.rpcImpl)try{return s.rpcImpl(t,n[s.requestDelimited?"encodeDelimited":"encode"](i).finish(),(function(e,n){if(e)return s.emit("error",e,t),a(e);if(null!==n){if(!(n instanceof o))try{n=o[s.responseDelimited?"decodeDelimited":"decode"](n)}catch(e){return s.emit("error",e,t),a(e)}return s.emit("data",n,t),a(null,n)}s.end(!0)}))}catch(e){return s.emit("error",e,t),void setTimeout((function(){a(e)}),0)}else setTimeout((function(){a(Error("already ended"))}),0)},o.prototype.end=function(e){return this.rpcImpl&&(e||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}},1877:(e,t,n)=>{"use strict";e.exports=o;var r=n(493);function o(e,t){this.lo=e>>>0,this.hi=t>>>0}var i=o.zero=new o(0,0);i.toNumber=function(){return 0},i.zzEncode=i.zzDecode=function(){return this},i.length=function(){return 1};var a=o.zeroHash="\0\0\0\0\0\0\0\0";o.fromNumber=function(e){if(0===e)return i;var t=e<0;t&&(e=-e);var n=e>>>0,r=(e-n)/4294967296>>>0;return t&&(r=~r>>>0,n=~n>>>0,++n>4294967295&&(n=0,++r>4294967295&&(r=0))),new o(n,r)},o.from=function(e){if("number"==typeof e)return o.fromNumber(e);if(r.isString(e)){if(!r.Long)return o.fromNumber(parseInt(e,10));e=r.Long.fromString(e)}return e.low||e.high?new o(e.low>>>0,e.high>>>0):i},o.prototype.toNumber=function(e){if(!e&&this.hi>>>31){var t=1+~this.lo>>>0,n=~this.hi>>>0;return t||(n=n+1>>>0),-(t+4294967296*n)}return this.lo+4294967296*this.hi},o.prototype.toLong=function(e){return r.Long?new r.Long(0|this.lo,0|this.hi,Boolean(e)):{low:0|this.lo,high:0|this.hi,unsigned:Boolean(e)}};var s=String.prototype.charCodeAt;o.fromHash=function(e){return e===a?i:new o((s.call(e,0)|s.call(e,1)<<8|s.call(e,2)<<16|s.call(e,3)<<24)>>>0,(s.call(e,4)|s.call(e,5)<<8|s.call(e,6)<<16|s.call(e,7)<<24)>>>0)},o.prototype.toHash=function(){return String.fromCharCode(255&this.lo,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,255&this.hi,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},o.prototype.zzEncode=function(){var e=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^e)>>>0,this.lo=(this.lo<<1^e)>>>0,this},o.prototype.zzDecode=function(){var e=-(1&this.lo);return this.lo=((this.lo>>>1|this.hi<<31)^e)>>>0,this.hi=(this.hi>>>1^e)>>>0,this},o.prototype.length=function(){var e=this.lo,t=(this.lo>>>28|this.hi<<4)>>>0,n=this.hi>>>24;return 0===n?0===t?e<16384?e<128?1:2:e<2097152?3:4:t<16384?t<128?5:6:t<2097152?7:8:n<128?9:10}},493:function(e,t,n){"use strict";var r=t;function o(e,t,n){for(var r=Object.keys(t),o=0;o0)},r.Buffer=function(){try{var e=r.inquire("buffer").Buffer;return e.prototype.utf8Write?e:null}catch(e){return null}}(),r._Buffer_from=null,r._Buffer_allocUnsafe=null,r.newBuffer=function(e){return"number"==typeof e?r.Buffer?r._Buffer_allocUnsafe(e):new r.Array(e):r.Buffer?r._Buffer_from(e):"undefined"==typeof Uint8Array?e:new Uint8Array(e)},r.Array="undefined"!=typeof Uint8Array?Uint8Array:Array,r.Long=r.global.dcodeIO&&r.global.dcodeIO.Long||r.global.Long||r.inquire("long"),r.key2Re=/^true|false|0|1$/,r.key32Re=/^-?(?:0|[1-9][0-9]*)$/,r.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/,r.longToHash=function(e){return e?r.LongBits.from(e).toHash():r.LongBits.zeroHash},r.longFromHash=function(e,t){var n=r.LongBits.fromHash(e);return r.Long?r.Long.fromBits(n.lo,n.hi,t):n.toNumber(Boolean(t))},r.merge=o,r.lcFirst=function(e){return e.charAt(0).toLowerCase()+e.substring(1)},r.newError=i,r.ProtocolError=i("ProtocolError"),r.oneOfGetter=function(e){for(var t={},n=0;n-1;--n)if(1===t[e[n]]&&void 0!==this[e[n]]&&null!==this[e[n]])return e[n]}},r.oneOfSetter=function(e){return function(t){for(var n=0;n{"use strict";e.exports=l;var r,o=n(493),i=o.LongBits,a=o.base64,s=o.utf8;function c(e,t,n){this.fn=e,this.len=t,this.next=void 0,this.val=n}function d(){}function u(e){this.head=e.head,this.tail=e.tail,this.len=e.len,this.next=e.states}function l(){this.len=0,this.head=new c(d,0,0),this.tail=this.head,this.states=null}var A=function(){return o.Buffer?function(){return(l.create=function(){return new r})()}:function(){return new l}};function f(e,t,n){t[n]=255&e}function h(e,t){this.len=e,this.next=void 0,this.val=t}function g(e,t,n){for(;e.hi;)t[n++]=127&e.lo|128,e.lo=(e.lo>>>7|e.hi<<25)>>>0,e.hi>>>=7;for(;e.lo>127;)t[n++]=127&e.lo|128,e.lo=e.lo>>>7;t[n++]=e.lo}function p(e,t,n){t[n]=255&e,t[n+1]=e>>>8&255,t[n+2]=e>>>16&255,t[n+3]=e>>>24}l.create=A(),l.alloc=function(e){return new o.Array(e)},o.Array!==Array&&(l.alloc=o.pool(l.alloc,o.Array.prototype.subarray)),l.prototype._push=function(e,t,n){return this.tail=this.tail.next=new c(e,t,n),this.len+=t,this},h.prototype=Object.create(c.prototype),h.prototype.fn=function(e,t,n){for(;e>127;)t[n++]=127&e|128,e>>>=7;t[n]=e},l.prototype.uint32=function(e){return this.len+=(this.tail=this.tail.next=new h((e>>>=0)<128?1:e<16384?2:e<2097152?3:e<268435456?4:5,e)).len,this},l.prototype.int32=function(e){return e<0?this._push(g,10,i.fromNumber(e)):this.uint32(e)},l.prototype.sint32=function(e){return this.uint32((e<<1^e>>31)>>>0)},l.prototype.uint64=function(e){var t=i.from(e);return this._push(g,t.length(),t)},l.prototype.int64=l.prototype.uint64,l.prototype.sint64=function(e){var t=i.from(e).zzEncode();return this._push(g,t.length(),t)},l.prototype.bool=function(e){return this._push(f,1,e?1:0)},l.prototype.fixed32=function(e){return this._push(p,4,e>>>0)},l.prototype.sfixed32=l.prototype.fixed32,l.prototype.fixed64=function(e){var t=i.from(e);return this._push(p,4,t.lo)._push(p,4,t.hi)},l.prototype.sfixed64=l.prototype.fixed64,l.prototype.float=function(e){return this._push(o.float.writeFloatLE,4,e)},l.prototype.double=function(e){return this._push(o.float.writeDoubleLE,8,e)};var m=o.Array.prototype.set?function(e,t,n){t.set(e,n)}:function(e,t,n){for(var r=0;r>>0;if(!t)return this._push(f,1,0);if(o.isString(e)){var n=l.alloc(t=a.length(e));a.decode(e,n,0),e=n}return this.uint32(t)._push(m,t,e)},l.prototype.string=function(e){var t=s.length(e);return t?this.uint32(t)._push(s.write,t,e):this._push(f,1,0)},l.prototype.fork=function(){return this.states=new u(this),this.head=this.tail=new c(d,0,0),this.len=0,this},l.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new c(d,0,0),this.len=0),this},l.prototype.ldelim=function(){var e=this.head,t=this.tail,n=this.len;return this.reset().uint32(n),n&&(this.tail.next=e.next,this.tail=t,this.len+=n),this},l.prototype.finish=function(){for(var e=this.head.next,t=this.constructor.alloc(this.len),n=0;e;)e.fn(e.val,t,n),n+=e.len,e=e.next;return t},l._configure=function(e){r=e,l.create=A(),r._configure()}},7094:(e,t,n)=>{"use strict";e.exports=i;var r=n(7490);(i.prototype=Object.create(r.prototype)).constructor=i;var o=n(493);function i(){r.call(this)}function a(e,t,n){e.length<40?o.utf8.write(e,t,n):t.utf8Write?t.utf8Write(e,n):t.write(e,n)}i._configure=function(){i.alloc=o._Buffer_allocUnsafe,i.writeBytesBuffer=o.Buffer&&o.Buffer.prototype instanceof Uint8Array&&"set"===o.Buffer.prototype.set.name?function(e,t,n){t.set(e,n)}:function(e,t,n){if(e.copy)e.copy(t,n,0,e.length);else for(var r=0;r>>0;return this.uint32(t),t&&this._push(i.writeBytesBuffer,t,e),this},i.prototype.string=function(e){var t=o.Buffer.byteLength(e);return this.uint32(t),t&&this._push(a,t,e),this},i._configure()},3217:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.pubkeyToAddress=t.pubkeyToRawAddress=t.rawSecp256k1PubkeyToRawAddress=t.rawEd25519PubkeyToRawAddress=void 0;const r=n(9562),o=n(8972),i=n(11),a=n(3554);function s(e){if(32!==e.length)throw new Error(`Invalid Ed25519 pubkey length: ${e.length}`);return(0,r.sha256)(e).slice(0,20)}function c(e){if(33!==e.length)throw new Error(`Invalid Secp256k1 pubkey length (compressed): ${e.length}`);return(0,r.ripemd160)((0,r.sha256)(e))}function d(e){if((0,a.isSecp256k1Pubkey)(e))return c((0,o.fromBase64)(e.value));if((0,a.isEd25519Pubkey)(e))return s((0,o.fromBase64)(e.value));if((0,a.isMultisigThresholdPubkey)(e)){const t=(0,i.encodeAminoPubkey)(e);return(0,r.sha256)(t).slice(0,20)}throw new Error("Unsupported public key type")}t.rawEd25519PubkeyToRawAddress=s,t.rawSecp256k1PubkeyToRawAddress=c,t.pubkeyToRawAddress=d,t.pubkeyToAddress=function(e,t){return(0,o.toBech32)(t,d(e))}},8709:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseCoins=t.coins=t.coin=void 0;const r=n(6961);function o(e,t){let n;if("number"==typeof e)try{n=new r.Uint53(e).toString()}catch(e){throw new Error("Given amount is not a safe integer. Consider using a string instead to overcome the limitations of JS numbers.")}else{if(!e.match(/^[0-9]+$/))throw new Error("Invalid unsigned integer string format");n=e.replace(/^0*/,"")||"0"}return{amount:n,denom:t}}t.coin=o,t.coins=function(e,t){return[o(e,t)]},t.parseCoins=function(e){return e.replace(/\s/g,"").split(",").filter(Boolean).map((e=>{const t=e.match(/^([0-9]+)([a-zA-Z]+)/);if(!t)throw new Error("Got an invalid coin string");return{amount:r.Uint64.fromString(t[1]).toString(),denom:t[2]}}))}},11:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.encodeBech32Pubkey=t.encodeAminoPubkey=t.decodeBech32Pubkey=t.decodeAminoPubkey=t.encodeSecp256k1Pubkey=void 0;const r=n(8972),o=n(6961),i=n(5553),a=n(3554);t.encodeSecp256k1Pubkey=function(e){if(33!==e.length||2!==e[0]&&3!==e[0])throw new Error("Public key must be compressed secp256k1, i.e. 33 bytes starting with 0x02 or 0x03");return{type:a.pubkeyType.secp256k1,value:(0,r.toBase64)(e)}};const s=(0,r.fromHex)("eb5ae98721"),c=(0,r.fromHex)("1624de6420"),d=(0,r.fromHex)("0dfb100520"),u=(0,r.fromHex)("22c1f7e2");function l(e){if((0,i.arrayContentStartsWith)(e,s)){const t=e.slice(s.length);if(33!==t.length)throw new Error("Invalid rest data length. Expected 33 bytes (compressed secp256k1 pubkey).");return{type:a.pubkeyType.secp256k1,value:(0,r.toBase64)(t)}}if((0,i.arrayContentStartsWith)(e,c)){const t=e.slice(c.length);if(32!==t.length)throw new Error("Invalid rest data length. Expected 32 bytes (Ed25519 pubkey).");return{type:a.pubkeyType.ed25519,value:(0,r.toBase64)(t)}}if((0,i.arrayContentStartsWith)(e,d)){const t=e.slice(d.length);if(32!==t.length)throw new Error("Invalid rest data length. Expected 32 bytes (Sr25519 pubkey).");return{type:a.pubkeyType.sr25519,value:(0,r.toBase64)(t)}}if((0,i.arrayContentStartsWith)(e,u))return function(e){const t=Array.from(e),n=t.splice(0,u.length);if(!(0,i.arrayContentStartsWith)(n,u))throw new Error("Invalid multisig prefix.");if(8!=t.shift())throw new Error("Invalid multisig data. Expecting 0x08 prefix before threshold.");const[r,o]=A(t);t.splice(0,o);const s=[];for(;t.length>0;){if(18!=t.shift())throw new Error("Invalid multisig data. Expecting 0x12 prefix before participant pubkey length.");const[e,n]=A(t);if(t.splice(0,n),t.length127)throw new Error("Decoding numbers > 127 is not supported here. Please tell those lazy CosmJS maintainers to port the binary.Varint implementation from the Go standard library and write some tests.");return[e[0],1]}function f(e){const t=o.Uint53.fromString(e.toString()).toNumber();if(t>127)throw new Error("Encoding numbers > 127 is not supported here. Please tell those lazy CosmJS maintainers to port the binary.PutUvarint implementation from the Go standard library and write some tests.");return[t]}function h(e){if((0,a.isMultisigThresholdPubkey)(e)){const t=Array.from(u);t.push(8),t.push(...f(e.value.threshold));for(const n of e.value.pubkeys.map((e=>h(e))))t.push(18),t.push(...f(n.length)),t.push(...n);return new Uint8Array(t)}if((0,a.isEd25519Pubkey)(e))return new Uint8Array([...c,...(0,r.fromBase64)(e.value)]);if((0,a.isSecp256k1Pubkey)(e))return new Uint8Array([...s,...(0,r.fromBase64)(e.value)]);throw new Error("Unsupported pubkey type")}t.decodeAminoPubkey=l,t.decodeBech32Pubkey=function(e){const{data:t}=(0,r.fromBech32)(e);return l(t)},t.encodeAminoPubkey=h,t.encodeBech32Pubkey=function(e,t){return(0,r.toBech32)(t,h(e))}},3359:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.executeKdf=t.makeStdTx=t.isStdTx=t.serializeSignDoc=t.makeSignDoc=t.encodeSecp256k1Signature=t.decodeSignature=t.Secp256k1Wallet=t.Secp256k1HdWallet=t.extractKdfConfiguration=t.pubkeyType=t.isSinglePubkey=t.isSecp256k1Pubkey=t.isMultisigThresholdPubkey=t.isEd25519Pubkey=t.makeCosmoshubPath=t.createMultisigThresholdPubkey=t.encodeSecp256k1Pubkey=t.encodeBech32Pubkey=t.encodeAminoPubkey=t.decodeBech32Pubkey=t.decodeAminoPubkey=t.parseCoins=t.coins=t.coin=t.rawSecp256k1PubkeyToRawAddress=t.rawEd25519PubkeyToRawAddress=t.pubkeyToRawAddress=t.pubkeyToAddress=void 0;var r=n(3217);Object.defineProperty(t,"pubkeyToAddress",{enumerable:!0,get:function(){return r.pubkeyToAddress}}),Object.defineProperty(t,"pubkeyToRawAddress",{enumerable:!0,get:function(){return r.pubkeyToRawAddress}}),Object.defineProperty(t,"rawEd25519PubkeyToRawAddress",{enumerable:!0,get:function(){return r.rawEd25519PubkeyToRawAddress}}),Object.defineProperty(t,"rawSecp256k1PubkeyToRawAddress",{enumerable:!0,get:function(){return r.rawSecp256k1PubkeyToRawAddress}});var o=n(8709);Object.defineProperty(t,"coin",{enumerable:!0,get:function(){return o.coin}}),Object.defineProperty(t,"coins",{enumerable:!0,get:function(){return o.coins}}),Object.defineProperty(t,"parseCoins",{enumerable:!0,get:function(){return o.parseCoins}});var i=n(11);Object.defineProperty(t,"decodeAminoPubkey",{enumerable:!0,get:function(){return i.decodeAminoPubkey}}),Object.defineProperty(t,"decodeBech32Pubkey",{enumerable:!0,get:function(){return i.decodeBech32Pubkey}}),Object.defineProperty(t,"encodeAminoPubkey",{enumerable:!0,get:function(){return i.encodeAminoPubkey}}),Object.defineProperty(t,"encodeBech32Pubkey",{enumerable:!0,get:function(){return i.encodeBech32Pubkey}}),Object.defineProperty(t,"encodeSecp256k1Pubkey",{enumerable:!0,get:function(){return i.encodeSecp256k1Pubkey}});var a=n(7851);Object.defineProperty(t,"createMultisigThresholdPubkey",{enumerable:!0,get:function(){return a.createMultisigThresholdPubkey}});var s=n(959);Object.defineProperty(t,"makeCosmoshubPath",{enumerable:!0,get:function(){return s.makeCosmoshubPath}});var c=n(3554);Object.defineProperty(t,"isEd25519Pubkey",{enumerable:!0,get:function(){return c.isEd25519Pubkey}}),Object.defineProperty(t,"isMultisigThresholdPubkey",{enumerable:!0,get:function(){return c.isMultisigThresholdPubkey}}),Object.defineProperty(t,"isSecp256k1Pubkey",{enumerable:!0,get:function(){return c.isSecp256k1Pubkey}}),Object.defineProperty(t,"isSinglePubkey",{enumerable:!0,get:function(){return c.isSinglePubkey}}),Object.defineProperty(t,"pubkeyType",{enumerable:!0,get:function(){return c.pubkeyType}});var d=n(4531);Object.defineProperty(t,"extractKdfConfiguration",{enumerable:!0,get:function(){return d.extractKdfConfiguration}}),Object.defineProperty(t,"Secp256k1HdWallet",{enumerable:!0,get:function(){return d.Secp256k1HdWallet}});var u=n(1295);Object.defineProperty(t,"Secp256k1Wallet",{enumerable:!0,get:function(){return u.Secp256k1Wallet}});var l=n(6891);Object.defineProperty(t,"decodeSignature",{enumerable:!0,get:function(){return l.decodeSignature}}),Object.defineProperty(t,"encodeSecp256k1Signature",{enumerable:!0,get:function(){return l.encodeSecp256k1Signature}});var A=n(1361);Object.defineProperty(t,"makeSignDoc",{enumerable:!0,get:function(){return A.makeSignDoc}}),Object.defineProperty(t,"serializeSignDoc",{enumerable:!0,get:function(){return A.serializeSignDoc}});var f=n(489);Object.defineProperty(t,"isStdTx",{enumerable:!0,get:function(){return f.isStdTx}}),Object.defineProperty(t,"makeStdTx",{enumerable:!0,get:function(){return f.makeStdTx}});var h=n(5077);Object.defineProperty(t,"executeKdf",{enumerable:!0,get:function(){return h.executeKdf}})},7851:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createMultisigThresholdPubkey=t.compareArrays=void 0;const r=n(8972),o=n(6961),i=n(3217);function a(e,t){const n=(0,r.toHex)(e),o=(0,r.toHex)(t);return n===o?0:ne.length)throw new Error(`Threshold k = ${r.toNumber()} exceeds number of keys n = ${e.length}`);const s=n?e:Array.from(e).sort(((e,t)=>a((0,i.pubkeyToRawAddress)(e),(0,i.pubkeyToRawAddress)(t))));return{type:"tendermint/PubKeyMultisigThreshold",value:{threshold:r.toString(),pubkeys:s}}}},959:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.makeCosmoshubPath=void 0;const r=n(9562);t.makeCosmoshubPath=function(e){return[r.Slip10RawIndex.hardened(44),r.Slip10RawIndex.hardened(118),r.Slip10RawIndex.hardened(0),r.Slip10RawIndex.normal(0),r.Slip10RawIndex.normal(e)]}},3554:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isMultisigThresholdPubkey=t.isSinglePubkey=t.pubkeyType=t.isSecp256k1Pubkey=t.isEd25519Pubkey=void 0,t.isEd25519Pubkey=function(e){return"tendermint/PubKeyEd25519"===e.type},t.isSecp256k1Pubkey=function(e){return"tendermint/PubKeySecp256k1"===e.type},t.pubkeyType={secp256k1:"tendermint/PubKeySecp256k1",ed25519:"tendermint/PubKeyEd25519",sr25519:"tendermint/PubKeySr25519",multisigThreshold:"tendermint/PubKeyMultisigThreshold"},t.isSinglePubkey=function(e){return[t.pubkeyType.ed25519,t.pubkeyType.secp256k1,t.pubkeyType.sr25519].includes(e.type)},t.isMultisigThresholdPubkey=function(e){return"tendermint/PubKeyMultisigThreshold"===e.type}},4531:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Secp256k1HdWallet=t.extractKdfConfiguration=void 0;const r=n(9562),o=n(8972),i=n(5553),a=n(3217),s=n(959),c=n(6891),d=n(1361),u=n(5077),l="secp256k1wallet-v1",A={algorithm:"argon2id",params:{outputLength:32,opsLimit:24,memLimitKib:12288}};t.extractKdfConfiguration=function(e){const t=JSON.parse(e);if(!(0,i.isNonNullObject)(t))throw new Error("Root document is not an object.");if(t.type===l)return t.kdf;throw new Error("Unsupported serialization type")};const f={bip39Password:"",hdPaths:[(0,s.makeCosmoshubPath)(0)],prefix:"cosmos"};class h{constructor(e,t){var n,r;const o=null!==(n=t.hdPaths)&&void 0!==n?n:f.hdPaths,i=null!==(r=t.prefix)&&void 0!==r?r:f.prefix;this.secret=e,this.seed=t.seed,this.accounts=o.map((e=>({hdPath:e,prefix:i})))}static async fromMnemonic(e,t={}){const n=new r.EnglishMnemonic(e),o=await r.Bip39.mnemonicToSeed(n,t.bip39Password);return new h(n,{...t,seed:o})}static async generate(e=12,t={}){const n=4*Math.floor(11*e/33),o=r.Random.getBytes(n),i=r.Bip39.encode(o);return h.fromMnemonic(i.toString(),t)}static async deserialize(e,t){const n=JSON.parse(e);if(!(0,i.isNonNullObject)(n))throw new Error("Root document is not an object.");if(n.type===l)return h.deserializeTypeV1(e,t);throw new Error("Unsupported serialization type")}static async deserializeWithEncryptionKey(e,t){const n=JSON.parse(e);if(!(0,i.isNonNullObject)(n))throw new Error("Root document is not an object.");const a=n;if(a.type===l){const e=await(0,u.decrypt)((0,o.fromBase64)(a.data),t,a.encryption),n=JSON.parse((0,o.fromUtf8)(e)),{mnemonic:s,accounts:c}=n;if((0,i.assert)("string"==typeof s),!Array.isArray(c))throw new Error("Property 'accounts' is not an array");if(!c.every((e=>{return t=e,!!(0,i.isNonNullObject)(t)&&"string"==typeof t.hdPath&&"string"==typeof t.prefix;var t})))throw new Error("Account is not in the correct format.");const d=c[0].prefix;if(!c.every((({prefix:e})=>e===d)))throw new Error("Accounts do not all have the same prefix");const l=c.map((({hdPath:e})=>(0,r.stringToPath)(e)));return h.fromMnemonic(s,{hdPaths:l,prefix:d})}throw new Error("Unsupported serialization type")}static async deserializeTypeV1(e,t){const n=JSON.parse(e);if(!(0,i.isNonNullObject)(n))throw new Error("Root document is not an object.");const r=await(0,u.executeKdf)(t,n.kdf);return h.deserializeWithEncryptionKey(e,r)}get mnemonic(){return this.secret.toString()}async getAccounts(){return(await this.getAccountsWithPrivkeys()).map((({algo:e,pubkey:t,address:n})=>({algo:e,pubkey:t,address:n})))}async signAmino(e,t){const n=(await this.getAccountsWithPrivkeys()).find((({address:t})=>t===e));if(void 0===n)throw new Error(`Address ${e} not found in wallet`);const{privkey:o,pubkey:i}=n,a=(0,r.sha256)((0,d.serializeSignDoc)(t)),s=await r.Secp256k1.createSignature(a,o),u=new Uint8Array([...s.r(32),...s.s(32)]);return{signed:t,signature:(0,c.encodeSecp256k1Signature)(i,u)}}async serialize(e){const t=A,n=await(0,u.executeKdf)(e,t);return this.serializeWithEncryptionKey(n,t)}async serializeWithEncryptionKey(e,t){const n={mnemonic:this.mnemonic,accounts:this.accounts.map((({hdPath:e,prefix:t})=>({hdPath:(0,r.pathToString)(e),prefix:t})))},i=(0,o.toUtf8)(JSON.stringify(n)),a={algorithm:u.supportedAlgorithms.xchacha20poly1305Ietf},s=await(0,u.encrypt)(i,e,a),c={type:l,kdf:t,encryption:a,data:(0,o.toBase64)(s)};return JSON.stringify(c)}async getKeyPair(e){const{privkey:t}=r.Slip10.derivePath(r.Slip10Curve.Secp256k1,this.seed,e),{pubkey:n}=await r.Secp256k1.makeKeypair(t);return{privkey:t,pubkey:r.Secp256k1.compressPubkey(n)}}async getAccountsWithPrivkeys(){return Promise.all(this.accounts.map((async({hdPath:e,prefix:t})=>{const{privkey:n,pubkey:r}=await this.getKeyPair(e);return{algo:"secp256k1",privkey:n,pubkey:r,address:(0,o.toBech32)(t,(0,a.rawSecp256k1PubkeyToRawAddress)(r))}})))}}t.Secp256k1HdWallet=h},1295:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Secp256k1Wallet=void 0;const r=n(9562),o=n(8972),i=n(3217),a=n(6891),s=n(1361);class c{constructor(e,t,n){this.privkey=e,this.pubkey=t,this.prefix=n}static async fromKey(e,t="cosmos"){const n=(await r.Secp256k1.makeKeypair(e)).pubkey;return new c(e,r.Secp256k1.compressPubkey(n),t)}get address(){return(0,o.toBech32)(this.prefix,(0,i.rawSecp256k1PubkeyToRawAddress)(this.pubkey))}async getAccounts(){return[{algo:"secp256k1",address:this.address,pubkey:this.pubkey}]}async signAmino(e,t){if(e!==this.address)throw new Error(`Address ${e} not found in wallet`);const n=new r.Sha256((0,s.serializeSignDoc)(t)).digest(),o=await r.Secp256k1.createSignature(n,this.privkey),i=new Uint8Array([...o.r(32),...o.s(32)]);return{signed:t,signature:(0,a.encodeSecp256k1Signature)(this.pubkey,i)}}}t.Secp256k1Wallet=c},6891:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decodeSignature=t.encodeSecp256k1Signature=void 0;const r=n(8972),o=n(11),i=n(3554);t.encodeSecp256k1Signature=function(e,t){if(64!==t.length)throw new Error("Signature must be 64 bytes long. Cosmos SDK uses a 2x32 byte fixed length encoding for the secp256k1 signature integers r and s.");return{pub_key:(0,o.encodeSecp256k1Pubkey)(e),signature:(0,r.toBase64)(t)}},t.decodeSignature=function(e){if(e.pub_key.type===i.pubkeyType.secp256k1)return{pubkey:(0,r.fromBase64)(e.pub_key.value),signature:(0,r.fromBase64)(e.signature)};throw new Error("Unsupported pubkey type")}},1361:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeSignDoc=t.makeSignDoc=t.sortedJsonStringify=void 0;const r=n(8972),o=n(6961);function i(e){if("object"!=typeof e||null===e)return e;if(Array.isArray(e))return e.map(i);const t=Object.keys(e).sort(),n={};return t.forEach((t=>{n[t]=i(e[t])})),n}function a(e){return JSON.stringify(i(e))}t.sortedJsonStringify=a,t.makeSignDoc=function(e,t,n,r,i,a){return{chain_id:n,account_number:o.Uint53.fromString(i.toString()).toString(),sequence:o.Uint53.fromString(a.toString()).toString(),fee:t,msgs:e,memo:r||""}},t.serializeSignDoc=function(e){return(0,r.toUtf8)(a(e))}},489:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.makeStdTx=t.isStdTx=void 0,t.isStdTx=function(e){const{memo:t,msg:n,fee:r,signatures:o}=e;return"string"==typeof t&&Array.isArray(n)&&"object"==typeof r&&Array.isArray(o)},t.makeStdTx=function(e,t){return{msg:e.msgs,fee:e.fee,memo:e.memo,signatures:Array.isArray(t)?t:[t]}}},5077:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decrypt=t.encrypt=t.supportedAlgorithms=t.executeKdf=t.cosmjsSalt=void 0;const r=n(9562),o=n(8972);t.cosmjsSalt=(0,o.toAscii)("The CosmJS salt."),t.executeKdf=async function(e,n){if("argon2id"===n.algorithm){const o=n.params;if(!(0,r.isArgon2idOptions)(o))throw new Error("Invalid format of argon2id params");return r.Argon2id.execute(e,t.cosmjsSalt,o)}throw new Error("Unsupported KDF algorithm")},t.supportedAlgorithms={xchacha20poly1305Ietf:"xchacha20poly1305-ietf"},t.encrypt=async function(e,n,o){if(o.algorithm===t.supportedAlgorithms.xchacha20poly1305Ietf){const t=r.Random.getBytes(r.xchacha20NonceLength);return new Uint8Array([...t,...await r.Xchacha20poly1305Ietf.encrypt(e,n,t)])}throw new Error(`Unsupported encryption algorithm: '${o.algorithm}'`)},t.decrypt=async function(e,n,o){if(o.algorithm===t.supportedAlgorithms.xchacha20poly1305Ietf){const t=e.slice(0,r.xchacha20NonceLength);return r.Xchacha20poly1305Ietf.decrypt(e.slice(r.xchacha20NonceLength),n,t)}throw new Error(`Unsupported encryption algorithm: '${o.algorithm}'`)}},2599:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.cosmWasmTypes=void 0;const o=n(8972),i=r(n(3720));t.cosmWasmTypes={"/cosmwasm.wasm.v1.MsgStoreCode":{aminoType:"wasm/MsgStoreCode",toAmino:({sender:e,wasmByteCode:t})=>({sender:e,wasm_byte_code:(0,o.toBase64)(t)}),fromAmino:({sender:e,wasm_byte_code:t})=>({sender:e,wasmByteCode:(0,o.fromBase64)(t),instantiatePermission:void 0})},"/cosmwasm.wasm.v1.MsgInstantiateContract":{aminoType:"wasm/MsgInstantiateContract",toAmino:({sender:e,codeId:t,label:n,msg:r,funds:i,admin:a})=>({sender:e,code_id:t.toString(),label:n,msg:JSON.parse((0,o.fromUtf8)(r)),funds:i,admin:a||void 0}),fromAmino:({sender:e,code_id:t,label:n,msg:r,funds:a,admin:s})=>({sender:e,codeId:i.default.fromString(t),label:n,msg:(0,o.toUtf8)(JSON.stringify(r)),funds:[...a],admin:null!=s?s:""})},"/cosmwasm.wasm.v1.MsgUpdateAdmin":{aminoType:"wasm/MsgUpdateAdmin",toAmino:({sender:e,newAdmin:t,contract:n})=>({sender:e,new_admin:t,contract:n}),fromAmino:({sender:e,new_admin:t,contract:n})=>({sender:e,newAdmin:t,contract:n})},"/cosmwasm.wasm.v1.MsgClearAdmin":{aminoType:"wasm/MsgClearAdmin",toAmino:({sender:e,contract:t})=>({sender:e,contract:t}),fromAmino:({sender:e,contract:t})=>({sender:e,contract:t})},"/cosmwasm.wasm.v1.MsgExecuteContract":{aminoType:"wasm/MsgExecuteContract",toAmino:({sender:e,contract:t,msg:n,funds:r})=>({sender:e,contract:t,msg:JSON.parse((0,o.fromUtf8)(n)),funds:r}),fromAmino:({sender:e,contract:t,msg:n,funds:r})=>({sender:e,contract:t,msg:(0,o.toUtf8)(JSON.stringify(n)),funds:[...r]})},"/cosmwasm.wasm.v1.MsgMigrateContract":{aminoType:"wasm/MsgMigrateContract",toAmino:({sender:e,contract:t,codeId:n,msg:r})=>({sender:e,contract:t,code_id:n.toString(),msg:JSON.parse((0,o.fromUtf8)(r))}),fromAmino:({sender:e,contract:t,code_id:n,msg:r})=>({sender:e,contract:t,codeId:i.default.fromString(n),msg:(0,o.toUtf8)(JSON.stringify(r))})}}},53:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CosmWasmClient=void 0;const r=n(8972),o=n(6961),i=n(4658),a=n(3034),s=n(5553),c=n(9374),d=n(6820);class u{constructor(e){this.codesCache=new Map,e&&(this.tmClient=e,this.queryClient=i.QueryClient.withExtensions(e,i.setupAuthExtension,i.setupBankExtension,d.setupWasmExtension,i.setupTxExtension))}static async connect(e){const t=await a.Tendermint34Client.connect(e);return new u(t)}getTmClient(){return this.tmClient}forceGetTmClient(){if(!this.tmClient)throw new Error("Tendermint client not available. You cannot use online functionality in offline mode.");return this.tmClient}getQueryClient(){return this.queryClient}forceGetQueryClient(){if(!this.queryClient)throw new Error("Query client not available. You cannot use online functionality in offline mode.");return this.queryClient}async getChainId(){if(!this.chainId){const e=(await this.forceGetTmClient().status()).nodeInfo.network;if(!e)throw new Error("Chain ID must not be empty");this.chainId=e}return this.chainId}async getHeight(){return(await this.forceGetTmClient().status()).syncInfo.latestBlockHeight}async getAccount(e){try{const t=await this.forceGetQueryClient().auth.account(e);return t?(0,i.accountFromAny)(t):null}catch(e){if(/rpc error: code = NotFound/i.test(e.toString()))return null;throw e}}async getSequence(e){const t=await this.getAccount(e);if(!t)throw new Error("Account does not exist on chain. Send some tokens there before trying to query sequence.");return{accountNumber:t.accountNumber,sequence:t.sequence}}async getBlock(e){const t=await this.forceGetTmClient().block(e);return{id:(0,r.toHex)(t.blockId.hash).toUpperCase(),header:{version:{block:new o.Uint53(t.block.header.version.block).toString(),app:new o.Uint53(t.block.header.version.app).toString()},height:t.block.header.height,chainId:t.block.header.chainId,time:(0,a.toRfc3339WithNanoseconds)(t.block.header.time)},txs:t.block.txs}}async getBalance(e,t){return this.forceGetQueryClient().bank.balance(e,t)}async getTx(e){var t;return null!==(t=(await this.txsQuery(`tx.hash='${e}'`))[0])&&void 0!==t?t:null}async searchTx(e,t={}){const n=t.minHeight||0,r=t.maxHeight||Number.MAX_SAFE_INTEGER;if(r=${n} AND tx.height<=${r}`}let a;if((0,i.isSearchByHeightQuery)(e))a=e.height>=n&&e.height<=r?await this.txsQuery(`tx.height=${e.height}`):[];else if((0,i.isSearchBySentFromOrToQuery)(e)){const t=o(`message.module='bank' AND transfer.sender='${e.sentFromOrTo}'`),n=o(`message.module='bank' AND transfer.recipient='${e.sentFromOrTo}'`),[r,i]=await Promise.all([t,n].map((e=>this.txsQuery(e)))),s=r.map((e=>e.hash));a=[...r,...i.filter((e=>!s.includes(e.hash)))]}else{if(!(0,i.isSearchByTagsQuery)(e))throw new Error("Unknown query type");{const t=o(e.tags.map((e=>`${e.key}='${e.value}'`)).join(" AND "));a=await this.txsQuery(t)}}return a.filter((e=>e.height>=n&&e.height<=r))}disconnect(){this.tmClient&&this.tmClient.disconnect()}async broadcastTx(e,t=6e4,n=3e3){let o=!1;const a=setTimeout((()=>{o=!0}),t),c=async e=>{if(o)throw new i.TimeoutError(`Transaction with ID ${e} was submitted but was not yet found on the chain. You might want to check later.`,e);await(0,s.sleep)(n);const t=await this.getTx(e);return t?{code:t.code,height:t.height,rawLog:t.rawLog,transactionHash:e,gasUsed:t.gasUsed,gasWanted:t.gasWanted}:c(e)},d=await this.forceGetTmClient().broadcastTxSync({tx:e});if(d.code)throw new Error(`Broadcasting transaction failed with code ${d.code} (codespace: ${d.codeSpace}). Log: ${d.log}`);const u=(0,r.toHex)(d.hash).toUpperCase();return new Promise(((e,t)=>c(u).then((t=>{clearTimeout(a),e(t)}),(e=>{clearTimeout(a),t(e)}))))}async getCodes(){const{codeInfos:e}=await this.forceGetQueryClient().wasm.listCodeInfo();return(e||[]).map((e=>((0,s.assert)(e.creator&&e.codeId&&e.dataHash,"entry incomplete"),{id:e.codeId.toNumber(),creator:e.creator,checksum:(0,r.toHex)(e.dataHash)})))}async getCodeDetails(e){const t=this.codesCache.get(e);if(t)return t;const{codeInfo:n,data:o}=await this.forceGetQueryClient().wasm.getCode(e);(0,s.assert)(n&&n.codeId&&n.creator&&n.dataHash&&o,"codeInfo missing or incomplete");const i={id:n.codeId.toNumber(),creator:n.creator,checksum:(0,r.toHex)(n.dataHash),data:o};return this.codesCache.set(e,i),i}async getContracts(e){const{contracts:t}=await this.forceGetQueryClient().wasm.listContractsByCodeId(e);return t}async getContract(e){const{address:t,contractInfo:n}=await this.forceGetQueryClient().wasm.getContractInfo(e);if(!n)throw new Error(`No contract found at address "${e}"`);return(0,s.assert)(t,"address missing"),(0,s.assert)(n.codeId&&n.creator&&n.label,"contractInfo incomplete"),{address:t,codeId:n.codeId.toNumber(),creator:n.creator,admin:n.admin||void 0,label:n.label,ibcPortId:n.ibcPortId||void 0}}async getContractCodeHistory(e){const t=await this.forceGetQueryClient().wasm.getContractCodeHistory(e);if(!t)throw new Error(`No contract history found for address "${e}"`);const n={[c.ContractCodeHistoryOperationType.CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT]:"Init",[c.ContractCodeHistoryOperationType.CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS]:"Genesis",[c.ContractCodeHistoryOperationType.CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE]:"Migrate"};return(t.entries||[]).map((e=>((0,s.assert)(e.operation&&e.codeId&&e.msg),{operation:n[e.operation],codeId:e.codeId.toNumber(),msg:JSON.parse((0,r.fromAscii)(e.msg))})))}async queryContractRaw(e,t){await this.getContract(e);const{data:n}=await this.forceGetQueryClient().wasm.queryContractRaw(e,t);return null!=n?n:null}async queryContractSmart(e,t){try{return await this.forceGetQueryClient().wasm.queryContractSmart(e,t)}catch(t){throw t instanceof Error&&t.message.startsWith("not found: contract")?new Error(`No contract found at address "${e}"`):t}}async txsQuery(e){return(await this.forceGetTmClient().txSearchAll({query:e})).txs.map((e=>({height:e.height,hash:(0,r.toHex)(e.hash).toUpperCase(),code:e.result.code,rawLog:e.result.log||"",tx:e.tx,gasUsed:e.result.gasUsed,gasWanted:e.result.gasWanted})))}}t.CosmWasmClient=u},5994:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isMsgExecuteEncodeObject=t.isMsgMigrateEncodeObject=t.isMsgClearAdminEncodeObject=t.isMsgUpdateAdminEncodeObject=t.isMsgInstantiateContractEncodeObject=t.isMsgStoreCodeEncodeObject=void 0,t.isMsgStoreCodeEncodeObject=function(e){return"/cosmwasm.wasm.v1.MsgStoreCode"===e.typeUrl},t.isMsgInstantiateContractEncodeObject=function(e){return"/cosmwasm.wasm.v1.MsgInstantiateContract"===e.typeUrl},t.isMsgUpdateAdminEncodeObject=function(e){return"/cosmwasm.wasm.v1.MsgUpdateAdmin"===e.typeUrl},t.isMsgClearAdminEncodeObject=function(e){return"/cosmwasm.wasm.v1.MsgClearAdmin"===e.typeUrl},t.isMsgMigrateEncodeObject=function(e){return"/cosmwasm.wasm.v1.MsgMigrateContract"===e.typeUrl},t.isMsgExecuteEncodeObject=function(e){return"/cosmwasm.wasm.v1.MsgExecuteContract"===e.typeUrl}},2854:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fromBinary=t.toBinary=void 0;const r=n(8972);t.toBinary=function(e){return(0,r.toBase64)((0,r.toUtf8)(JSON.stringify(e)))},t.fromBinary=function(e){return JSON.parse((0,r.fromUtf8)((0,r.fromBase64)(e)))}},4926:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SigningCosmWasmClient=t.setupWasmExtension=t.toBinary=t.fromBinary=t.isMsgUpdateAdminEncodeObject=t.isMsgStoreCodeEncodeObject=t.isMsgMigrateEncodeObject=t.isMsgInstantiateContractEncodeObject=t.isMsgExecuteEncodeObject=t.isMsgClearAdminEncodeObject=t.CosmWasmClient=t.cosmWasmTypes=void 0;var r=n(2599);Object.defineProperty(t,"cosmWasmTypes",{enumerable:!0,get:function(){return r.cosmWasmTypes}});var o=n(53);Object.defineProperty(t,"CosmWasmClient",{enumerable:!0,get:function(){return o.CosmWasmClient}});var i=n(5994);Object.defineProperty(t,"isMsgClearAdminEncodeObject",{enumerable:!0,get:function(){return i.isMsgClearAdminEncodeObject}}),Object.defineProperty(t,"isMsgExecuteEncodeObject",{enumerable:!0,get:function(){return i.isMsgExecuteEncodeObject}}),Object.defineProperty(t,"isMsgInstantiateContractEncodeObject",{enumerable:!0,get:function(){return i.isMsgInstantiateContractEncodeObject}}),Object.defineProperty(t,"isMsgMigrateEncodeObject",{enumerable:!0,get:function(){return i.isMsgMigrateEncodeObject}}),Object.defineProperty(t,"isMsgStoreCodeEncodeObject",{enumerable:!0,get:function(){return i.isMsgStoreCodeEncodeObject}}),Object.defineProperty(t,"isMsgUpdateAdminEncodeObject",{enumerable:!0,get:function(){return i.isMsgUpdateAdminEncodeObject}});var a=n(2854);Object.defineProperty(t,"fromBinary",{enumerable:!0,get:function(){return a.fromBinary}}),Object.defineProperty(t,"toBinary",{enumerable:!0,get:function(){return a.toBinary}});var s=n(6820);Object.defineProperty(t,"setupWasmExtension",{enumerable:!0,get:function(){return s.setupWasmExtension}});var c=n(2994);Object.defineProperty(t,"SigningCosmWasmClient",{enumerable:!0,get:function(){return c.SigningCosmWasmClient}})},6820:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setupWasmExtension=void 0;var r=n(5371);Object.defineProperty(t,"setupWasmExtension",{enumerable:!0,get:function(){return r.setupWasmExtension}})},5371:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.setupWasmExtension=void 0;const o=n(8972),i=n(4658),a=n(6218),s=r(n(3720));t.setupWasmExtension=function(e){const t=(0,i.createProtobufRpcClient)(e),n=new a.QueryClientImpl(t);return{wasm:{listCodeInfo:async e=>{const t={pagination:(0,i.createPagination)(e)};return n.Codes(t)},getCode:async e=>{const t={codeId:s.default.fromNumber(e)};return n.Code(t)},listContractsByCodeId:async(e,t)=>{const r={codeId:s.default.fromNumber(e),pagination:(0,i.createPagination)(t)};return n.ContractsByCode(r)},getContractInfo:async e=>{const t={address:e};return n.ContractInfo(t)},getContractCodeHistory:async(e,t)=>{const r={address:e,pagination:(0,i.createPagination)(t)};return n.ContractHistory(r)},getAllContractState:async(e,t)=>{const r={address:e,pagination:(0,i.createPagination)(t)};return n.AllContractState(r)},queryContractRaw:async(e,t)=>{const r={address:e,queryData:t};return n.RawContractState(r)},queryContractSmart:async(e,t)=>{const r={address:e,queryData:(0,o.toAscii)(JSON.stringify(t))},{data:i}=await n.SmartContractState(r);let a;try{a=(0,o.fromUtf8)(i)}catch(e){throw new Error(`Could not UTF-8 decode smart query response from contract: ${e}`)}try{return JSON.parse(a)}catch(e){throw new Error(`Could not JSON parse smart query response from contract: ${e}`)}}}}}},2994:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.SigningCosmWasmClient=void 0;const o=n(3359),i=n(9562),a=n(8972),s=n(6961),c=n(4087),d=n(4658),u=n(3034),l=n(5553),A=n(3773),f=n(422),h=n(2574),g=n(9639),p=n(1814),m=r(n(3720)),v=r(n(9591)),y=n(2599),b=n(53);function I(e){return`Error when broadcasting tx ${e.transactionHash} at height ${e.height}. Code: ${e.code}; Raw log: ${e.rawLog}`}function C(){const e=new c.Registry(d.defaultRegistryTypes);return e.register("/cosmwasm.wasm.v1.MsgClearAdmin",p.MsgClearAdmin),e.register("/cosmwasm.wasm.v1.MsgExecuteContract",p.MsgExecuteContract),e.register("/cosmwasm.wasm.v1.MsgMigrateContract",p.MsgMigrateContract),e.register("/cosmwasm.wasm.v1.MsgStoreCode",p.MsgStoreCode),e.register("/cosmwasm.wasm.v1.MsgInstantiateContract",p.MsgInstantiateContract),e.register("/cosmwasm.wasm.v1.MsgUpdateAdmin",p.MsgUpdateAdmin),e}class E extends b.CosmWasmClient{constructor(e,t,n){var r;super(e);const o=null!==(r=n.prefix)&&void 0!==r?r:"cosmos",{registry:i=C(),aminoTypes:a=new d.AminoTypes({prefix:o,additions:y.cosmWasmTypes})}=n;this.registry=i,this.aminoTypes=a,this.signer=t,this.broadcastTimeoutMs=n.broadcastTimeoutMs,this.broadcastPollIntervalMs=n.broadcastPollIntervalMs,this.gasPrice=n.gasPrice}static async connectWithSigner(e,t,n={}){const r=await u.Tendermint34Client.connect(e);return new E(r,t,n)}static async offline(e,t={}){return new E(void 0,e,t)}async simulate(e,t,n){const r=t.map((e=>this.registry.encodeAsAny(e))),i=(await this.signer.getAccounts()).find((t=>t.address===e));if(!i)throw new Error("Failed to retrieve account from signer");const a=(0,o.encodeSecp256k1Pubkey)(i.pubkey),{sequence:c}=await this.getSequence(e),{gasInfo:d}=await this.forceGetQueryClient().tx.simulate(r,n,a,c);return(0,l.assertDefined)(d),s.Uint53.fromString(d.gasUsed.toString()).toNumber()}async upload(e,t,n,r=""){const o=v.default.gzip(t,{level:9}),s={typeUrl:"/cosmwasm.wasm.v1.MsgStoreCode",value:p.MsgStoreCode.fromPartial({sender:e,wasmByteCode:o})},c=await this.signAndBroadcast(e,[s],n,r);if((0,d.isDeliverTxFailure)(c))throw new Error(I(c));const u=d.logs.parseRawLog(c.rawLog),l=d.logs.findAttribute(u,"store_code","code_id");return{originalSize:t.length,originalChecksum:(0,a.toHex)((0,i.sha256)(t)),compressedSize:o.length,compressedChecksum:(0,a.toHex)((0,i.sha256)(o)),codeId:Number.parseInt(l.value,10),logs:u,height:c.height,transactionHash:c.transactionHash,gasWanted:c.gasWanted,gasUsed:c.gasUsed}}async instantiate(e,t,n,r,o,i={}){const c={typeUrl:"/cosmwasm.wasm.v1.MsgInstantiateContract",value:p.MsgInstantiateContract.fromPartial({sender:e,codeId:m.default.fromString(new s.Uint53(t).toString()),label:r,msg:(0,a.toUtf8)(JSON.stringify(n)),funds:[...i.funds||[]],admin:i.admin})},u=await this.signAndBroadcast(e,[c],o,i.memo);if((0,d.isDeliverTxFailure)(u))throw new Error(I(u));const l=d.logs.parseRawLog(u.rawLog);return{contractAddress:d.logs.findAttribute(l,"instantiate","_contract_address").value,logs:l,height:u.height,transactionHash:u.transactionHash,gasWanted:u.gasWanted,gasUsed:u.gasUsed}}async updateAdmin(e,t,n,r,o=""){const i={typeUrl:"/cosmwasm.wasm.v1.MsgUpdateAdmin",value:p.MsgUpdateAdmin.fromPartial({sender:e,contract:t,newAdmin:n})},a=await this.signAndBroadcast(e,[i],r,o);if((0,d.isDeliverTxFailure)(a))throw new Error(I(a));return{logs:d.logs.parseRawLog(a.rawLog),height:a.height,transactionHash:a.transactionHash,gasWanted:a.gasWanted,gasUsed:a.gasUsed}}async clearAdmin(e,t,n,r=""){const o={typeUrl:"/cosmwasm.wasm.v1.MsgClearAdmin",value:p.MsgClearAdmin.fromPartial({sender:e,contract:t})},i=await this.signAndBroadcast(e,[o],n,r);if((0,d.isDeliverTxFailure)(i))throw new Error(I(i));return{logs:d.logs.parseRawLog(i.rawLog),height:i.height,transactionHash:i.transactionHash,gasWanted:i.gasWanted,gasUsed:i.gasUsed}}async migrate(e,t,n,r,o,i=""){const c={typeUrl:"/cosmwasm.wasm.v1.MsgMigrateContract",value:p.MsgMigrateContract.fromPartial({sender:e,contract:t,codeId:m.default.fromString(new s.Uint53(n).toString()),msg:(0,a.toUtf8)(JSON.stringify(r))})},u=await this.signAndBroadcast(e,[c],o,i);if((0,d.isDeliverTxFailure)(u))throw new Error(I(u));return{logs:d.logs.parseRawLog(u.rawLog),height:u.height,transactionHash:u.transactionHash,gasWanted:u.gasWanted,gasUsed:u.gasUsed}}async execute(e,t,n,r,o="",i){const s={typeUrl:"/cosmwasm.wasm.v1.MsgExecuteContract",value:p.MsgExecuteContract.fromPartial({sender:e,contract:t,msg:(0,a.toUtf8)(JSON.stringify(n)),funds:[...i||[]]})},c=await this.signAndBroadcast(e,[s],r,o);if((0,d.isDeliverTxFailure)(c))throw new Error(I(c));return{logs:d.logs.parseRawLog(c.rawLog),height:c.height,transactionHash:c.transactionHash,gasWanted:c.gasWanted,gasUsed:c.gasUsed}}async sendTokens(e,t,n,r,o=""){const i={typeUrl:"/cosmos.bank.v1beta1.MsgSend",value:{fromAddress:e,toAddress:t,amount:[...n]}};return this.signAndBroadcast(e,[i],r,o)}async delegateTokens(e,t,n,r,o=""){const i={typeUrl:"/cosmos.staking.v1beta1.MsgDelegate",value:f.MsgDelegate.fromPartial({delegatorAddress:e,validatorAddress:t,amount:n})};return this.signAndBroadcast(e,[i],r,o)}async undelegateTokens(e,t,n,r,o=""){const i={typeUrl:"/cosmos.staking.v1beta1.MsgUndelegate",value:f.MsgUndelegate.fromPartial({delegatorAddress:e,validatorAddress:t,amount:n})};return this.signAndBroadcast(e,[i],r,o)}async withdrawRewards(e,t,n,r=""){const o={typeUrl:"/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward",value:A.MsgWithdrawDelegatorReward.fromPartial({delegatorAddress:e,validatorAddress:t})};return this.signAndBroadcast(e,[o],n,r)}async signAndBroadcast(e,t,n,r=""){let o;if("auto"==n||"number"==typeof n){(0,l.assertDefined)(this.gasPrice,"Gas price must be set in the client options when auto gas is used.");const i=await this.simulate(e,t,r),a="number"==typeof n?n:1.3;o=(0,d.calculateFee)(Math.round(i*a),this.gasPrice)}else o=n;const i=await this.sign(e,t,o,r),a=g.TxRaw.encode(i).finish();return this.broadcastTx(a,this.broadcastTimeoutMs,this.broadcastPollIntervalMs)}async sign(e,t,n,r,o){let i;if(o)i=o;else{const{accountNumber:t,sequence:n}=await this.getSequence(e);i={accountNumber:t,sequence:n,chainId:await this.getChainId()}}return(0,c.isOfflineDirectSigner)(this.signer)?this.signDirect(e,t,n,r,i):this.signAmino(e,t,n,r,i)}async signAmino(e,t,n,r,{accountNumber:i,sequence:d,chainId:u}){(0,l.assert)(!(0,c.isOfflineDirectSigner)(this.signer));const A=(await this.signer.getAccounts()).find((t=>t.address===e));if(!A)throw new Error("Failed to retrieve account from signer");const f=(0,c.encodePubkey)((0,o.encodeSecp256k1Pubkey)(A.pubkey)),p=h.SignMode.SIGN_MODE_LEGACY_AMINO_JSON,m=t.map((e=>this.aminoTypes.toAmino(e))),v=(0,o.makeSignDoc)(m,n,u,r,i,d),{signature:y,signed:b}=await this.signer.signAmino(e,v),I={typeUrl:"/cosmos.tx.v1beta1.TxBody",value:{messages:b.msgs.map((e=>this.aminoTypes.fromAmino(e))),memo:b.memo}},C=this.registry.encode(I),E=s.Int53.fromString(b.fee.gas).toNumber(),w=s.Int53.fromString(b.sequence).toNumber(),B=(0,c.makeAuthInfoBytes)([{pubkey:f,sequence:w}],b.fee.amount,E,p);return g.TxRaw.fromPartial({bodyBytes:C,authInfoBytes:B,signatures:[(0,a.fromBase64)(y.signature)]})}async signDirect(e,t,n,r,{accountNumber:i,sequence:d,chainId:u}){(0,l.assert)((0,c.isOfflineDirectSigner)(this.signer));const A=(await this.signer.getAccounts()).find((t=>t.address===e));if(!A)throw new Error("Failed to retrieve account from signer");const f=(0,c.encodePubkey)((0,o.encodeSecp256k1Pubkey)(A.pubkey)),h={typeUrl:"/cosmos.tx.v1beta1.TxBody",value:{messages:t,memo:r}},p=this.registry.encode(h),m=s.Int53.fromString(n.gas).toNumber(),v=(0,c.makeAuthInfoBytes)([{pubkey:f,sequence:d}],n.amount,m),y=(0,c.makeSignDoc)(p,v,u,i),{signature:b,signed:I}=await this.signer.signDirect(e,y);return g.TxRaw.fromPartial({bodyBytes:I.bodyBytes,authInfoBytes:I.authInfoBytes,signatures:[(0,a.fromBase64)(b.signature)]})}}t.SigningCosmWasmClient=E},9549:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Bip39=t.EnglishMnemonic=t.mnemonicToEntropy=t.entropyToMnemonic=void 0;const r=n(8972),o=n(2997),i=n(2387),a=["abandon","ability","able","about","above","absent","absorb","abstract","absurd","abuse","access","accident","account","accuse","achieve","acid","acoustic","acquire","across","act","action","actor","actress","actual","adapt","add","addict","address","adjust","admit","adult","advance","advice","aerobic","affair","afford","afraid","again","age","agent","agree","ahead","aim","air","airport","aisle","alarm","album","alcohol","alert","alien","all","alley","allow","almost","alone","alpha","already","also","alter","always","amateur","amazing","among","amount","amused","analyst","anchor","ancient","anger","angle","angry","animal","ankle","announce","annual","another","answer","antenna","antique","anxiety","any","apart","apology","appear","apple","approve","april","arch","arctic","area","arena","argue","arm","armed","armor","army","around","arrange","arrest","arrive","arrow","art","artefact","artist","artwork","ask","aspect","assault","asset","assist","assume","asthma","athlete","atom","attack","attend","attitude","attract","auction","audit","august","aunt","author","auto","autumn","average","avocado","avoid","awake","aware","away","awesome","awful","awkward","axis","baby","bachelor","bacon","badge","bag","balance","balcony","ball","bamboo","banana","banner","bar","barely","bargain","barrel","base","basic","basket","battle","beach","bean","beauty","because","become","beef","before","begin","behave","behind","believe","below","belt","bench","benefit","best","betray","better","between","beyond","bicycle","bid","bike","bind","biology","bird","birth","bitter","black","blade","blame","blanket","blast","bleak","bless","blind","blood","blossom","blouse","blue","blur","blush","board","boat","body","boil","bomb","bone","bonus","book","boost","border","boring","borrow","boss","bottom","bounce","box","boy","bracket","brain","brand","brass","brave","bread","breeze","brick","bridge","brief","bright","bring","brisk","broccoli","broken","bronze","broom","brother","brown","brush","bubble","buddy","budget","buffalo","build","bulb","bulk","bullet","bundle","bunker","burden","burger","burst","bus","business","busy","butter","buyer","buzz","cabbage","cabin","cable","cactus","cage","cake","call","calm","camera","camp","can","canal","cancel","candy","cannon","canoe","canvas","canyon","capable","capital","captain","car","carbon","card","cargo","carpet","carry","cart","case","cash","casino","castle","casual","cat","catalog","catch","category","cattle","caught","cause","caution","cave","ceiling","celery","cement","census","century","cereal","certain","chair","chalk","champion","change","chaos","chapter","charge","chase","chat","cheap","check","cheese","chef","cherry","chest","chicken","chief","child","chimney","choice","choose","chronic","chuckle","chunk","churn","cigar","cinnamon","circle","citizen","city","civil","claim","clap","clarify","claw","clay","clean","clerk","clever","click","client","cliff","climb","clinic","clip","clock","clog","close","cloth","cloud","clown","club","clump","cluster","clutch","coach","coast","coconut","code","coffee","coil","coin","collect","color","column","combine","come","comfort","comic","common","company","concert","conduct","confirm","congress","connect","consider","control","convince","cook","cool","copper","copy","coral","core","corn","correct","cost","cotton","couch","country","couple","course","cousin","cover","coyote","crack","cradle","craft","cram","crane","crash","crater","crawl","crazy","cream","credit","creek","crew","cricket","crime","crisp","critic","crop","cross","crouch","crowd","crucial","cruel","cruise","crumble","crunch","crush","cry","crystal","cube","culture","cup","cupboard","curious","current","curtain","curve","cushion","custom","cute","cycle","dad","damage","damp","dance","danger","daring","dash","daughter","dawn","day","deal","debate","debris","decade","december","decide","decline","decorate","decrease","deer","defense","define","defy","degree","delay","deliver","demand","demise","denial","dentist","deny","depart","depend","deposit","depth","deputy","derive","describe","desert","design","desk","despair","destroy","detail","detect","develop","device","devote","diagram","dial","diamond","diary","dice","diesel","diet","differ","digital","dignity","dilemma","dinner","dinosaur","direct","dirt","disagree","discover","disease","dish","dismiss","disorder","display","distance","divert","divide","divorce","dizzy","doctor","document","dog","doll","dolphin","domain","donate","donkey","donor","door","dose","double","dove","draft","dragon","drama","drastic","draw","dream","dress","drift","drill","drink","drip","drive","drop","drum","dry","duck","dumb","dune","during","dust","dutch","duty","dwarf","dynamic","eager","eagle","early","earn","earth","easily","east","easy","echo","ecology","economy","edge","edit","educate","effort","egg","eight","either","elbow","elder","electric","elegant","element","elephant","elevator","elite","else","embark","embody","embrace","emerge","emotion","employ","empower","empty","enable","enact","end","endless","endorse","enemy","energy","enforce","engage","engine","enhance","enjoy","enlist","enough","enrich","enroll","ensure","enter","entire","entry","envelope","episode","equal","equip","era","erase","erode","erosion","error","erupt","escape","essay","essence","estate","eternal","ethics","evidence","evil","evoke","evolve","exact","example","excess","exchange","excite","exclude","excuse","execute","exercise","exhaust","exhibit","exile","exist","exit","exotic","expand","expect","expire","explain","expose","express","extend","extra","eye","eyebrow","fabric","face","faculty","fade","faint","faith","fall","false","fame","family","famous","fan","fancy","fantasy","farm","fashion","fat","fatal","father","fatigue","fault","favorite","feature","february","federal","fee","feed","feel","female","fence","festival","fetch","fever","few","fiber","fiction","field","figure","file","film","filter","final","find","fine","finger","finish","fire","firm","first","fiscal","fish","fit","fitness","fix","flag","flame","flash","flat","flavor","flee","flight","flip","float","flock","floor","flower","fluid","flush","fly","foam","focus","fog","foil","fold","follow","food","foot","force","forest","forget","fork","fortune","forum","forward","fossil","foster","found","fox","fragile","frame","frequent","fresh","friend","fringe","frog","front","frost","frown","frozen","fruit","fuel","fun","funny","furnace","fury","future","gadget","gain","galaxy","gallery","game","gap","garage","garbage","garden","garlic","garment","gas","gasp","gate","gather","gauge","gaze","general","genius","genre","gentle","genuine","gesture","ghost","giant","gift","giggle","ginger","giraffe","girl","give","glad","glance","glare","glass","glide","glimpse","globe","gloom","glory","glove","glow","glue","goat","goddess","gold","good","goose","gorilla","gospel","gossip","govern","gown","grab","grace","grain","grant","grape","grass","gravity","great","green","grid","grief","grit","grocery","group","grow","grunt","guard","guess","guide","guilt","guitar","gun","gym","habit","hair","half","hammer","hamster","hand","happy","harbor","hard","harsh","harvest","hat","have","hawk","hazard","head","health","heart","heavy","hedgehog","height","hello","helmet","help","hen","hero","hidden","high","hill","hint","hip","hire","history","hobby","hockey","hold","hole","holiday","hollow","home","honey","hood","hope","horn","horror","horse","hospital","host","hotel","hour","hover","hub","huge","human","humble","humor","hundred","hungry","hunt","hurdle","hurry","hurt","husband","hybrid","ice","icon","idea","identify","idle","ignore","ill","illegal","illness","image","imitate","immense","immune","impact","impose","improve","impulse","inch","include","income","increase","index","indicate","indoor","industry","infant","inflict","inform","inhale","inherit","initial","inject","injury","inmate","inner","innocent","input","inquiry","insane","insect","inside","inspire","install","intact","interest","into","invest","invite","involve","iron","island","isolate","issue","item","ivory","jacket","jaguar","jar","jazz","jealous","jeans","jelly","jewel","job","join","joke","journey","joy","judge","juice","jump","jungle","junior","junk","just","kangaroo","keen","keep","ketchup","key","kick","kid","kidney","kind","kingdom","kiss","kit","kitchen","kite","kitten","kiwi","knee","knife","knock","know","lab","label","labor","ladder","lady","lake","lamp","language","laptop","large","later","latin","laugh","laundry","lava","law","lawn","lawsuit","layer","lazy","leader","leaf","learn","leave","lecture","left","leg","legal","legend","leisure","lemon","lend","length","lens","leopard","lesson","letter","level","liar","liberty","library","license","life","lift","light","like","limb","limit","link","lion","liquid","list","little","live","lizard","load","loan","lobster","local","lock","logic","lonely","long","loop","lottery","loud","lounge","love","loyal","lucky","luggage","lumber","lunar","lunch","luxury","lyrics","machine","mad","magic","magnet","maid","mail","main","major","make","mammal","man","manage","mandate","mango","mansion","manual","maple","marble","march","margin","marine","market","marriage","mask","mass","master","match","material","math","matrix","matter","maximum","maze","meadow","mean","measure","meat","mechanic","medal","media","melody","melt","member","memory","mention","menu","mercy","merge","merit","merry","mesh","message","metal","method","middle","midnight","milk","million","mimic","mind","minimum","minor","minute","miracle","mirror","misery","miss","mistake","mix","mixed","mixture","mobile","model","modify","mom","moment","monitor","monkey","monster","month","moon","moral","more","morning","mosquito","mother","motion","motor","mountain","mouse","move","movie","much","muffin","mule","multiply","muscle","museum","mushroom","music","must","mutual","myself","mystery","myth","naive","name","napkin","narrow","nasty","nation","nature","near","neck","need","negative","neglect","neither","nephew","nerve","nest","net","network","neutral","never","news","next","nice","night","noble","noise","nominee","noodle","normal","north","nose","notable","note","nothing","notice","novel","now","nuclear","number","nurse","nut","oak","obey","object","oblige","obscure","observe","obtain","obvious","occur","ocean","october","odor","off","offer","office","often","oil","okay","old","olive","olympic","omit","once","one","onion","online","only","open","opera","opinion","oppose","option","orange","orbit","orchard","order","ordinary","organ","orient","original","orphan","ostrich","other","outdoor","outer","output","outside","oval","oven","over","own","owner","oxygen","oyster","ozone","pact","paddle","page","pair","palace","palm","panda","panel","panic","panther","paper","parade","parent","park","parrot","party","pass","patch","path","patient","patrol","pattern","pause","pave","payment","peace","peanut","pear","peasant","pelican","pen","penalty","pencil","people","pepper","perfect","permit","person","pet","phone","photo","phrase","physical","piano","picnic","picture","piece","pig","pigeon","pill","pilot","pink","pioneer","pipe","pistol","pitch","pizza","place","planet","plastic","plate","play","please","pledge","pluck","plug","plunge","poem","poet","point","polar","pole","police","pond","pony","pool","popular","portion","position","possible","post","potato","pottery","poverty","powder","power","practice","praise","predict","prefer","prepare","present","pretty","prevent","price","pride","primary","print","priority","prison","private","prize","problem","process","produce","profit","program","project","promote","proof","property","prosper","protect","proud","provide","public","pudding","pull","pulp","pulse","pumpkin","punch","pupil","puppy","purchase","purity","purpose","purse","push","put","puzzle","pyramid","quality","quantum","quarter","question","quick","quit","quiz","quote","rabbit","raccoon","race","rack","radar","radio","rail","rain","raise","rally","ramp","ranch","random","range","rapid","rare","rate","rather","raven","raw","razor","ready","real","reason","rebel","rebuild","recall","receive","recipe","record","recycle","reduce","reflect","reform","refuse","region","regret","regular","reject","relax","release","relief","rely","remain","remember","remind","remove","render","renew","rent","reopen","repair","repeat","replace","report","require","rescue","resemble","resist","resource","response","result","retire","retreat","return","reunion","reveal","review","reward","rhythm","rib","ribbon","rice","rich","ride","ridge","rifle","right","rigid","ring","riot","ripple","risk","ritual","rival","river","road","roast","robot","robust","rocket","romance","roof","rookie","room","rose","rotate","rough","round","route","royal","rubber","rude","rug","rule","run","runway","rural","sad","saddle","sadness","safe","sail","salad","salmon","salon","salt","salute","same","sample","sand","satisfy","satoshi","sauce","sausage","save","say","scale","scan","scare","scatter","scene","scheme","school","science","scissors","scorpion","scout","scrap","screen","script","scrub","sea","search","season","seat","second","secret","section","security","seed","seek","segment","select","sell","seminar","senior","sense","sentence","series","service","session","settle","setup","seven","shadow","shaft","shallow","share","shed","shell","sheriff","shield","shift","shine","ship","shiver","shock","shoe","shoot","shop","short","shoulder","shove","shrimp","shrug","shuffle","shy","sibling","sick","side","siege","sight","sign","silent","silk","silly","silver","similar","simple","since","sing","siren","sister","situate","six","size","skate","sketch","ski","skill","skin","skirt","skull","slab","slam","sleep","slender","slice","slide","slight","slim","slogan","slot","slow","slush","small","smart","smile","smoke","smooth","snack","snake","snap","sniff","snow","soap","soccer","social","sock","soda","soft","solar","soldier","solid","solution","solve","someone","song","soon","sorry","sort","soul","sound","soup","source","south","space","spare","spatial","spawn","speak","special","speed","spell","spend","sphere","spice","spider","spike","spin","spirit","split","spoil","sponsor","spoon","sport","spot","spray","spread","spring","spy","square","squeeze","squirrel","stable","stadium","staff","stage","stairs","stamp","stand","start","state","stay","steak","steel","stem","step","stereo","stick","still","sting","stock","stomach","stone","stool","story","stove","strategy","street","strike","strong","struggle","student","stuff","stumble","style","subject","submit","subway","success","such","sudden","suffer","sugar","suggest","suit","summer","sun","sunny","sunset","super","supply","supreme","sure","surface","surge","surprise","surround","survey","suspect","sustain","swallow","swamp","swap","swarm","swear","sweet","swift","swim","swing","switch","sword","symbol","symptom","syrup","system","table","tackle","tag","tail","talent","talk","tank","tape","target","task","taste","tattoo","taxi","teach","team","tell","ten","tenant","tennis","tent","term","test","text","thank","that","theme","then","theory","there","they","thing","this","thought","three","thrive","throw","thumb","thunder","ticket","tide","tiger","tilt","timber","time","tiny","tip","tired","tissue","title","toast","tobacco","today","toddler","toe","together","toilet","token","tomato","tomorrow","tone","tongue","tonight","tool","tooth","top","topic","topple","torch","tornado","tortoise","toss","total","tourist","toward","tower","town","toy","track","trade","traffic","tragic","train","transfer","trap","trash","travel","tray","treat","tree","trend","trial","tribe","trick","trigger","trim","trip","trophy","trouble","truck","true","truly","trumpet","trust","truth","try","tube","tuition","tumble","tuna","tunnel","turkey","turn","turtle","twelve","twenty","twice","twin","twist","two","type","typical","ugly","umbrella","unable","unaware","uncle","uncover","under","undo","unfair","unfold","unhappy","uniform","unique","unit","universe","unknown","unlock","until","unusual","unveil","update","upgrade","uphold","upon","upper","upset","urban","urge","usage","use","used","useful","useless","usual","utility","vacant","vacuum","vague","valid","valley","valve","van","vanish","vapor","various","vast","vault","vehicle","velvet","vendor","venture","venue","verb","verify","version","very","vessel","veteran","viable","vibrant","vicious","victory","video","view","village","vintage","violin","virtual","virus","visa","visit","visual","vital","vivid","vocal","voice","void","volcano","volume","vote","voyage","wage","wagon","wait","walk","wall","walnut","want","warfare","warm","warrior","wash","wasp","waste","water","wave","way","wealth","weapon","wear","weasel","weather","web","wedding","weekend","weird","welcome","west","wet","whale","what","wheat","wheel","when","where","whip","whisper","wide","width","wife","wild","will","win","window","wine","wing","wink","winner","winter","wire","wisdom","wise","wish","witness","wolf","woman","wonder","wood","wool","word","work","world","worry","worth","wrap","wreck","wrestle","wrist","write","wrong","yard","year","yellow","you","young","youth","zebra","zero","zone","zoo"];function s(e){return Array.from(e).map((e=>e.toString(2).padStart(8,"0"))).join("")}function c(e){const t=8*e.length/32;return s((0,i.sha256)(e)).slice(0,t)}function d(e){return parseInt(e,2)}const u=[16,20,24,28,32],l=[12,15,18,21,24];function A(e){if(-1===u.indexOf(e.length))throw new Error("invalid input length");return(s(e)+c(e)).match(/(.{11})/g).map((e=>{const t=d(e);return a[t]})).join(" ")}function f(e){return e.normalize("NFKD")}function h(e){const t=f(e).split(" ");if(!l.includes(t.length))throw new Error("Invalid number of words");const n=t.map((e=>{const t=a.indexOf(e);if(-1===t)throw new Error("Found word that is not in the wordlist");return t.toString(2).padStart(11,"0")})).join(""),r=32*Math.floor(n.length/33),o=n.slice(0,r),i=n.slice(r),s=o.match(/(.{1,8})/g).map(d);if(s.length<16||s.length>32||s.length%4!=0)throw new Error("Invalid entropy");const u=Uint8Array.from(s);if(c(u)!==i)throw new Error("Invalid mnemonic checksum");return u}t.entropyToMnemonic=A,t.mnemonicToEntropy=h;class g{constructor(e){if(!g.mnemonicMatcher.test(e))throw new Error("Invalid mnemonic format");const t=e.split(" "),n=[12,15,18,21,24];if(-1===n.indexOf(t.length))throw new Error(`Invalid word count in mnemonic (allowed: ${n} got: ${t.length})`);for(const e of t)if(-1===g.wordlist.indexOf(e))throw new Error("Mnemonic contains invalid word");h(e),this.data=e}toString(){return this.data}}t.EnglishMnemonic=g,g.wordlist=a,g.mnemonicMatcher=/^[a-z]+( [a-z]+)*$/,t.Bip39=class{static encode(e){return new g(A(e))}static decode(e){return h(e.toString())}static async mnemonicToSeed(e,t){const n=(0,r.toUtf8)(f(e.toString())),i="mnemonic"+(t?f(t):""),a=(0,r.toUtf8)(i);return(0,o.pbkdf2Sha512)(n,a,2048,64)}}},3955:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Hmac=void 0,t.Hmac=class{constructor(e,t){const n=(new e).blockSize;this.hash=t=>(new e).update(t).digest();let r=t;if(r.length>n&&(r=this.hash(r)),r.length92^e)),this.iKeyPad=r.map((e=>54^e)),this.messageHasher=new e,this.blockSize=n,this.update(this.iKeyPad)}update(e){return this.messageHasher.update(e),this}digest(){const e=this.messageHasher.digest();return this.hash(new Uint8Array([...this.oKeyPad,...e]))}}},9562:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.stringToPath=t.Slip10RawIndex=t.slip10CurveFromString=t.Slip10Curve=t.Slip10=t.pathToString=t.sha512=t.Sha512=t.sha256=t.Sha256=t.Secp256k1Signature=t.ExtendedSecp256k1Signature=t.Secp256k1=t.ripemd160=t.Ripemd160=t.Random=t.Xchacha20poly1305Ietf=t.xchacha20NonceLength=t.isArgon2idOptions=t.Ed25519Keypair=t.Ed25519=t.Argon2id=t.keccak256=t.Keccak256=t.Hmac=t.EnglishMnemonic=t.Bip39=void 0;var r=n(9549);Object.defineProperty(t,"Bip39",{enumerable:!0,get:function(){return r.Bip39}}),Object.defineProperty(t,"EnglishMnemonic",{enumerable:!0,get:function(){return r.EnglishMnemonic}});var o=n(3955);Object.defineProperty(t,"Hmac",{enumerable:!0,get:function(){return o.Hmac}});var i=n(9372);Object.defineProperty(t,"Keccak256",{enumerable:!0,get:function(){return i.Keccak256}}),Object.defineProperty(t,"keccak256",{enumerable:!0,get:function(){return i.keccak256}});var a=n(3942);Object.defineProperty(t,"Argon2id",{enumerable:!0,get:function(){return a.Argon2id}}),Object.defineProperty(t,"Ed25519",{enumerable:!0,get:function(){return a.Ed25519}}),Object.defineProperty(t,"Ed25519Keypair",{enumerable:!0,get:function(){return a.Ed25519Keypair}}),Object.defineProperty(t,"isArgon2idOptions",{enumerable:!0,get:function(){return a.isArgon2idOptions}}),Object.defineProperty(t,"xchacha20NonceLength",{enumerable:!0,get:function(){return a.xchacha20NonceLength}}),Object.defineProperty(t,"Xchacha20poly1305Ietf",{enumerable:!0,get:function(){return a.Xchacha20poly1305Ietf}});var s=n(616);Object.defineProperty(t,"Random",{enumerable:!0,get:function(){return s.Random}});var c=n(568);Object.defineProperty(t,"Ripemd160",{enumerable:!0,get:function(){return c.Ripemd160}}),Object.defineProperty(t,"ripemd160",{enumerable:!0,get:function(){return c.ripemd160}});var d=n(6649);Object.defineProperty(t,"Secp256k1",{enumerable:!0,get:function(){return d.Secp256k1}});var u=n(8222);Object.defineProperty(t,"ExtendedSecp256k1Signature",{enumerable:!0,get:function(){return u.ExtendedSecp256k1Signature}}),Object.defineProperty(t,"Secp256k1Signature",{enumerable:!0,get:function(){return u.Secp256k1Signature}});var l=n(2387);Object.defineProperty(t,"Sha256",{enumerable:!0,get:function(){return l.Sha256}}),Object.defineProperty(t,"sha256",{enumerable:!0,get:function(){return l.sha256}}),Object.defineProperty(t,"Sha512",{enumerable:!0,get:function(){return l.Sha512}}),Object.defineProperty(t,"sha512",{enumerable:!0,get:function(){return l.sha512}});var A=n(2081);Object.defineProperty(t,"pathToString",{enumerable:!0,get:function(){return A.pathToString}}),Object.defineProperty(t,"Slip10",{enumerable:!0,get:function(){return A.Slip10}}),Object.defineProperty(t,"Slip10Curve",{enumerable:!0,get:function(){return A.Slip10Curve}}),Object.defineProperty(t,"slip10CurveFromString",{enumerable:!0,get:function(){return A.slip10CurveFromString}}),Object.defineProperty(t,"Slip10RawIndex",{enumerable:!0,get:function(){return A.Slip10RawIndex}}),Object.defineProperty(t,"stringToPath",{enumerable:!0,get:function(){return A.stringToPath}})},9372:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.keccak256=t.Keccak256=void 0;const r=n(5426),o=n(9583);class i{constructor(e){this.blockSize=64,this.impl=r.keccak_256.create(),e&&this.update(e)}update(e){return this.impl.update((0,o.toRealUint8Array)(e)),this}digest(){return this.impl.digest()}}t.Keccak256=i,t.keccak256=function(e){return new i(e).digest()}},3942:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Xchacha20poly1305Ietf=t.xchacha20NonceLength=t.Ed25519=t.Ed25519Keypair=t.Argon2id=t.isArgon2idOptions=void 0;const o=n(5553),i=r(n(6869));t.isArgon2idOptions=function(e){return!!(0,o.isNonNullObject)(e)&&"number"==typeof e.outputLength&&"number"==typeof e.opsLimit&&"number"==typeof e.memLimitKib},t.Argon2id=class{static async execute(e,t,n){return await i.default.ready,i.default.crypto_pwhash(n.outputLength,e,t,n.opsLimit,1024*n.memLimitKib,i.default.crypto_pwhash_ALG_ARGON2ID13)}};class a{constructor(e,t){this.privkey=e,this.pubkey=t}static fromLibsodiumPrivkey(e){if(64!==e.length)throw new Error(`Unexpected key length ${e.length}. Must be 64.`);return new a(e.slice(0,32),e.slice(32,64))}toLibsodiumPrivkey(){return new Uint8Array([...this.privkey,...this.pubkey])}}t.Ed25519Keypair=a,t.Ed25519=class{static async makeKeypair(e){await i.default.ready;const t=i.default.crypto_sign_seed_keypair(e);return a.fromLibsodiumPrivkey(t.privateKey)}static async createSignature(e,t){return await i.default.ready,i.default.crypto_sign_detached(e,t.toLibsodiumPrivkey())}static async verifySignature(e,t,n){return await i.default.ready,i.default.crypto_sign_verify_detached(e,t,n)}},t.xchacha20NonceLength=24,t.Xchacha20poly1305Ietf=class{static async encrypt(e,t,n){return await i.default.ready,i.default.crypto_aead_xchacha20poly1305_ietf_encrypt(e,null,null,n,t)}static async decrypt(e,t,n){return await i.default.ready,i.default.crypto_aead_xchacha20poly1305_ietf_decrypt(null,e,null,n,t)}}},2997:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.pbkdf2Sha512=t.pbkdf2Sha512Noble=t.pbkdf2Sha512Crypto=t.pbkdf2Sha512Subtle=t.getSubtle=t.getCryptoModule=void 0;const a=n(5553),s=n(9023),c=n(6262);async function d(){try{const e=await Promise.resolve().then((()=>i(n(8010))));if("object"==typeof e&&Object.keys(e).length<=1)return;return e}catch(e){return}}async function u(){const e=globalThis;let t=e.crypto&&e.crypto.subtle;if(!t){const e=await d();e&&e.webcrypto&&e.webcrypto.subtle&&(t=e.webcrypto.subtle)}return t}async function l(e,t,n,r,o){return(0,a.assert)(e,"Argument subtle is falsy"),(0,a.assert)("object"==typeof e,"Argument subtle is not of type object"),(0,a.assert)("function"==typeof e.importKey,"subtle.importKey is not a function"),(0,a.assert)("function"==typeof e.deriveBits,"subtle.deriveBits is not a function"),e.importKey("raw",t,{name:"PBKDF2"},!1,["deriveBits"]).then((t=>e.deriveBits({name:"PBKDF2",salt:n,iterations:r,hash:{name:"SHA-512"}},t,8*o).then((e=>new Uint8Array(e)))))}async function A(e,t,n,r,o){return(0,a.assert)(e,"Argument crypto is falsy"),(0,a.assert)("object"==typeof e,"Argument crypto is not of type object"),(0,a.assert)("function"==typeof e.pbkdf2,"crypto.pbkdf2 is not a function"),new Promise(((i,a)=>{e.pbkdf2(t,n,r,o,"sha512",((e,t)=>{e?a(e):i(Uint8Array.from(t))}))}))}async function f(e,t,n,r){return(0,s.pbkdf2Async)(c.sha512,e,t,{c:n,dkLen:r})}t.getCryptoModule=d,t.getSubtle=u,t.pbkdf2Sha512Subtle=l,t.pbkdf2Sha512Crypto=A,t.pbkdf2Sha512Noble=f,t.pbkdf2Sha512=async function(e,t,n,r){const o=await u();if(o)return l(o,e,t,n,r);{const o=await d();return o?A(o,e,t,n,r):f(e,t,n,r)}}},616:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Random=void 0,t.Random=class{static getBytes(e){try{const t="object"==typeof window?window:self,n=void 0!==t.crypto?t.crypto:t.msCrypto,r=new Uint8Array(e);return n.getRandomValues(r),r}catch(t){try{const t=n(8010);return new Uint8Array([...t.randomBytes(e)])}catch(e){throw new Error("No secure random number generator found")}}}}},568:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ripemd160=t.Ripemd160=void 0;const r=n(830),o=n(9583);class i{constructor(e){this.blockSize=64,this.impl=r.ripemd160.create(),e&&this.update(e)}update(e){return this.impl.update((0,o.toRealUint8Array)(e)),this}digest(){return this.impl.digest()}}t.Ripemd160=i,t.ripemd160=function(e){return new i(e).digest()}},6649:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Secp256k1=void 0;const o=n(8972),i=r(n(3550)),a=r(n(6266)),s=n(8222),c=new a.default.ec("secp256k1"),d=new i.default("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141","hex");t.Secp256k1=class{static async makeKeypair(e){if(32!==e.length)throw new Error("input data is not a valid secp256k1 private key");const t=c.keyFromPrivate(e);if(!0!==t.validate().result)throw new Error("input data is not a valid secp256k1 private key");if(new i.default(e).gte(d))throw new Error("input data is not a valid secp256k1 private key");return{privkey:(0,o.fromHex)(t.getPrivate("hex")),pubkey:Uint8Array.from(t.getPublic("array"))}}static async createSignature(e,t){if(0===e.length)throw new Error("Message hash must not be empty");if(e.length>32)throw new Error("Message hash length must not exceed 32 bytes");const n=c.keyFromPrivate(t),{r,s:o,recoveryParam:i}=n.sign(e,{canonical:!0});if("number"!=typeof i)throw new Error("Recovery param missing");return new s.ExtendedSecp256k1Signature(Uint8Array.from(r.toArray()),Uint8Array.from(o.toArray()),i)}static async verifySignature(e,t,n){if(0===t.length)throw new Error("Message hash must not be empty");if(t.length>32)throw new Error("Message hash length must not exceed 32 bytes");const r=c.keyFromPublic(n);try{return r.verify(t,e.toDer())}catch(e){return!1}}static recoverPubkey(e,t){const n={r:(0,o.toHex)(e.r()),s:(0,o.toHex)(e.s())},r=c.recoverPubKey(t,n,e.recovery),i=c.keyFromPublic(r);return(0,o.fromHex)(i.getPublic(!1,"hex"))}static compressPubkey(e){switch(e.length){case 33:return e;case 65:return Uint8Array.from(c.keyFromPublic(e).getPublic(!0,"array"));default:throw new Error("Invalid pubkey length")}}static uncompressPubkey(e){switch(e.length){case 33:return Uint8Array.from(c.keyFromPublic(e).getPublic(!1,"array"));case 65:return e;default:throw new Error("Invalid pubkey length")}}static trimRecoveryByte(e){switch(e.length){case 64:return e;case 65:return e.slice(0,64);default:throw new Error("Invalid signature length")}}}},8222:(e,t)=>{"use strict";function n(e){let t=0;for(const n of e){if(0!==n)break;t++}return e.slice(t)}Object.defineProperty(t,"__esModule",{value:!0}),t.ExtendedSecp256k1Signature=t.Secp256k1Signature=void 0;class r{constructor(e,t){if(e.length>32||0===e.length||0===e[0])throw new Error("Unsigned integer r must be encoded as unpadded big endian.");if(t.length>32||0===t.length||0===t[0])throw new Error("Unsigned integer s must be encoded as unpadded big endian.");this.data={r:e,s:t}}static fromFixedLength(e){if(64!==e.length)throw new Error(`Got invalid data length: ${e.length}. Expected 2x 32 bytes for the pair (r, s)`);return new r(n(e.slice(0,32)),n(e.slice(32,64)))}static fromDer(e){let t=0;if(48!==e[t++])throw new Error("Prefix 0x30 expected");const o=e[t++];if(e.length-t!==o)throw new Error("Data length mismatch detected");if(2!==e[t++])throw new Error("INTEGER tag expected");const i=e[t++];if(i>=128)throw new Error("Decoding length values above 127 not supported");const a=e.slice(t,t+i);if(t+=i,2!==e[t++])throw new Error("INTEGER tag expected");const s=e[t++];if(s>=128)throw new Error("Decoding length values above 127 not supported");const c=e.slice(t,t+s);return t+=s,new r(n(a),n(c))}r(e){if(void 0===e)return this.data.r;{const t=e-this.data.r.length;if(t<0)throw new Error("Length too small to hold parameter r");const n=new Uint8Array(t);return new Uint8Array([...n,...this.data.r])}}s(e){if(void 0===e)return this.data.s;{const t=e-this.data.s.length;if(t<0)throw new Error("Length too small to hold parameter s");const n=new Uint8Array(t);return new Uint8Array([...n,...this.data.s])}}toFixedLength(){return new Uint8Array([...this.r(32),...this.s(32)])}toDer(){const e=this.data.r[0]>=128?new Uint8Array([0,...this.data.r]):this.data.r,t=this.data.s[0]>=128?new Uint8Array([0,...this.data.s]):this.data.s,n=e.length,r=t.length,o=new Uint8Array([2,n,...e,2,r,...t]);return new Uint8Array([48,o.length,...o])}}t.Secp256k1Signature=r;class o extends r{constructor(e,t,n){if(super(e,t),!Number.isInteger(n))throw new Error("The recovery parameter must be an integer.");if(n<0||n>4)throw new Error("The recovery parameter must be one of 0, 1, 2, 3.");this.recovery=n}static fromFixedLength(e){if(65!==e.length)throw new Error(`Got invalid data length ${e.length}. Expected 32 + 32 + 1`);return new o(n(e.slice(0,32)),n(e.slice(32,64)),e[64])}toFixedLength(){return new Uint8Array([...this.r(32),...this.s(32),this.recovery])}}t.ExtendedSecp256k1Signature=o},2387:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sha512=t.Sha512=t.sha256=t.Sha256=void 0;const r=n(3061),o=n(6262),i=n(9583);class a{constructor(e){this.blockSize=64,this.impl=r.sha256.create(),e&&this.update(e)}update(e){return this.impl.update((0,i.toRealUint8Array)(e)),this}digest(){return this.impl.digest()}}t.Sha256=a,t.sha256=function(e){return new a(e).digest()};class s{constructor(e){this.blockSize=128,this.impl=o.sha512.create(),e&&this.update(e)}update(e){return this.impl.update((0,i.toRealUint8Array)(e)),this}digest(){return this.impl.digest()}}t.Sha512=s,t.sha512=function(e){return new s(e).digest()}},2081:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.stringToPath=t.pathToString=t.Slip10=t.Slip10RawIndex=t.slip10CurveFromString=t.Slip10Curve=void 0;const o=n(8972),i=n(6961),a=r(n(3550)),s=r(n(6266)),c=n(3955),d=n(2387);var u;!function(e){e.Secp256k1="Bitcoin seed",e.Ed25519="ed25519 seed"}(u=t.Slip10Curve||(t.Slip10Curve={})),t.slip10CurveFromString=function(e){switch(e){case u.Ed25519:return u.Ed25519;case u.Secp256k1:return u.Secp256k1;default:throw new Error(`Unknown curve string: '${e}'`)}};class l extends i.Uint32{static hardened(e){return new l(e+2**31)}static normal(e){return new l(e)}isHardened(){return this.data>=2**31}}t.Slip10RawIndex=l;const A=new s.default.ec("secp256k1");class f{static derivePath(e,t,n){let r=this.master(e,t);for(const t of n)r=this.child(e,r.privkey,r.chainCode,t);return r}static master(e,t){const n=new c.Hmac(d.Sha512,(0,o.toAscii)(e)).update(t).digest(),r=n.slice(0,32),i=n.slice(32,64);return e!==u.Ed25519&&(this.isZero(r)||this.isGteN(e,r))?this.master(e,n):{chainCode:i,privkey:r}}static child(e,t,n,r){let o;if(r.isHardened()){const e=new Uint8Array([0,...t,...r.toBytesBigEndian()]);o=new c.Hmac(d.Sha512,n).update(e).digest()}else{if(e===u.Ed25519)throw new Error("Normal keys are not allowed with ed25519");{const i=new Uint8Array([...f.serializedPoint(e,new a.default(t)),...r.toBytesBigEndian()]);o=new c.Hmac(d.Sha512,n).update(i).digest()}}return this.childImpl(e,t,n,r,o)}static serializedPoint(e,t){if(e===u.Secp256k1)return(0,o.fromHex)(A.g.mul(t).encodeCompressed("hex"));throw new Error("curve not supported")}static childImpl(e,t,n,r,o){const i=o.slice(0,32),s=o.slice(32,64),l=s;if(e===u.Ed25519)return{chainCode:l,privkey:i};const A=this.n(e),f=new a.default(i).add(new a.default(t)).mod(A),h=Uint8Array.from(f.toArray("be",32));if(this.isGteN(e,i)||this.isZero(h)){const o=new c.Hmac(d.Sha512,n).update(new Uint8Array([1,...s,...r.toBytesBigEndian()])).digest();return this.childImpl(e,t,n,r,o)}return{chainCode:l,privkey:h}}static isZero(e){return e.every((e=>0===e))}static isGteN(e,t){return new a.default(t).gte(this.n(e))}static n(e){if(e===u.Secp256k1)return new a.default("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141",16);throw new Error("curve not supported")}}t.Slip10=f,t.pathToString=function(e){return e.reduce(((e,t)=>e+"/"+(t.isHardened()?t.toNumber()-2**31+"'":t.toString())),"m")},t.stringToPath=function(e){if(!e.startsWith("m"))throw new Error("Path string must start with 'm'");let t=e.slice(1);const n=new Array;for(;t;){const e=t.match(/^\/([0-9]+)('?)/);if(!e)throw new Error("Syntax error while reading path component");const[r,o,a]=e,s=i.Uint53.fromString(o).toNumber();if(s>=2**31)throw new Error("Component value too high. Must not exceed 2**31-1.");a?n.push(l.hardened(s)):n.push(l.normal(s)),t=t.slice(r.length)}return n}},9583:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toRealUint8Array=void 0,t.toRealUint8Array=function(e){return e instanceof Uint8Array?e:Uint8Array.from(e)}},7768:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fromAscii=t.toAscii=void 0,t.toAscii=function(e){return Uint8Array.from(e.split("").map((e=>{const t=e.charCodeAt(0);if(t<32||t>126)throw new Error("Cannot encode character that is out of printable ASCII range: "+t);return t})))},t.fromAscii=function(e){return(t=Array.from(e),t.map((e=>{if(e<32||e>126)throw new Error("Cannot decode character that is out of printable ASCII range: "+e);return String.fromCharCode(e)}))).join("");var t}},3431:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.fromBase64=t.toBase64=void 0;const a=i(n(9742));t.toBase64=function(e){return a.fromByteArray(e)},t.fromBase64=function(e){if(!e.match(/^[a-zA-Z0-9+/]*={0,2}$/))throw new Error("Invalid base64 string format");return a.toByteArray(e)}},5438:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Bech32=t.fromBech32=t.toBech32=void 0;const a=i(n(2882));function s(e,t,n){return a.encode(e,a.toWords(t),n)}function c(e,t=1/0){const n=a.decode(e,t);return{prefix:n.prefix,data:new Uint8Array(a.fromWords(n.words))}}t.toBech32=s,t.fromBech32=c,t.Bech32=class{static encode(e,t,n){return s(e,t,n)}static decode(e,t=1/0){return c(e,t)}}},6135:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fromHex=t.toHex=void 0,t.toHex=function(e){let t="";for(const n of e)t+=("0"+n.toString(16)).slice(-2);return t},t.fromHex=function(e){if(e.length%2!=0)throw new Error("hex string length must be a multiple of 2");const t=new Uint8Array(e.length/2);for(let n=0;n{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toUtf8=t.fromUtf8=t.toRfc3339=t.fromRfc3339=t.toHex=t.fromHex=t.toBech32=t.fromBech32=t.Bech32=t.toBase64=t.fromBase64=t.toAscii=t.fromAscii=void 0;var r=n(7768);Object.defineProperty(t,"fromAscii",{enumerable:!0,get:function(){return r.fromAscii}}),Object.defineProperty(t,"toAscii",{enumerable:!0,get:function(){return r.toAscii}});var o=n(3431);Object.defineProperty(t,"fromBase64",{enumerable:!0,get:function(){return o.fromBase64}}),Object.defineProperty(t,"toBase64",{enumerable:!0,get:function(){return o.toBase64}});var i=n(5438);Object.defineProperty(t,"Bech32",{enumerable:!0,get:function(){return i.Bech32}}),Object.defineProperty(t,"fromBech32",{enumerable:!0,get:function(){return i.fromBech32}}),Object.defineProperty(t,"toBech32",{enumerable:!0,get:function(){return i.toBech32}});var a=n(6135);Object.defineProperty(t,"fromHex",{enumerable:!0,get:function(){return a.fromHex}}),Object.defineProperty(t,"toHex",{enumerable:!0,get:function(){return a.toHex}});var s=n(7310);Object.defineProperty(t,"fromRfc3339",{enumerable:!0,get:function(){return s.fromRfc3339}}),Object.defineProperty(t,"toRfc3339",{enumerable:!0,get:function(){return s.toRfc3339}});var c=n(6081);Object.defineProperty(t,"fromUtf8",{enumerable:!0,get:function(){return c.fromUtf8}}),Object.defineProperty(t,"toUtf8",{enumerable:!0,get:function(){return c.toUtf8}})},7310:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toRfc3339=t.fromRfc3339=void 0;const n=/^(\d{4})-(\d{2})-(\d{2})[T ](\d{2}):(\d{2}):(\d{2})(\.\d{1,9})?((?:[+-]\d{2}:\d{2})|Z)$/;function r(e,t=2){const n="00000"+e.toString();return n.substring(n.length-t)}t.fromRfc3339=function(e){const t=n.exec(e);if(!t)throw new Error("Date string is not in RFC3339 format");const r=+t[1],o=+t[2],i=+t[3],a=+t[4],s=+t[5],c=+t[6],d=t[7]?Math.floor(1e3*+t[7]):0;let u,l,A;"Z"===t[8]?(u=1,l=0,A=0):(u="-"===t[8].substring(0,1)?-1:1,l=+t[8].substring(1,3),A=+t[8].substring(4,6));const f=u*(60*l+A)*60,h=Date.UTC(r,o-1,i,a,s,c,d)-1e3*f;return new Date(h)},t.toRfc3339=function(e){return`${e.getUTCFullYear()}-${r(e.getUTCMonth()+1)}-${r(e.getUTCDate())}T${r(e.getUTCHours())}:${r(e.getUTCMinutes())}:${r(e.getUTCSeconds())}.${r(e.getUTCMilliseconds(),3)}Z`}},6081:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fromUtf8=t.toUtf8=void 0,t.toUtf8=function(e){return(new TextEncoder).encode(e)},t.fromUtf8=function(e){return new TextDecoder("utf-8",{fatal:!0}).decode(e)}},240:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.FaucetClient=void 0;const o=r(n(9669));t.FaucetClient=class{constructor(e){if(!e.match(/^https?:\/\//))throw new Error("Expected base url to start with http:// or https://");const t=e.replace(/(\/+)$/,"");this.baseUrl=t}async credit(e,t){const n={address:e,denom:t};try{await o.default.post(this.baseUrl+"/credit",n)}catch(e){throw e.response?new Error(`${e}; response body: ${JSON.stringify(e.response.data)}`):e}}}},1467:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FaucetClient=void 0;var r=n(240);Object.defineProperty(t,"FaucetClient",{enumerable:!0,get:function(){return r.FaucetClient}})},4111:(e,t)=>{"use strict";function n(e){return!("string"!=typeof e&&"number"!=typeof e&&"boolean"!=typeof e&&null!==e&&!r(e)&&!o(e))}function r(e){if(!Array.isArray(e))return!1;for(const t of e)if(!n(t))return!1;return!0}function o(e){return"object"==typeof e&&null!==e&&"[object Object]"===Object.prototype.toString.call(e)&&Object.values(e).every(n)}Object.defineProperty(t,"__esModule",{value:!0}),t.isJsonCompatibleDictionary=t.isJsonCompatibleArray=t.isJsonCompatibleValue=void 0,t.isJsonCompatibleValue=n,t.isJsonCompatibleArray=r,t.isJsonCompatibleDictionary=o},8729:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.makeJsonRpcId=void 0;let n=1e4;t.makeJsonRpcId=function(){return n+=1}},2812:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.jsonRpcCode=t.isJsonRpcSuccessResponse=t.isJsonRpcErrorResponse=t.parseJsonRpcSuccessResponse=t.parseJsonRpcResponse=t.parseJsonRpcRequest=t.parseJsonRpcId=t.parseJsonRpcErrorResponse=t.JsonRpcClient=t.makeJsonRpcId=void 0;var r=n(8729);Object.defineProperty(t,"makeJsonRpcId",{enumerable:!0,get:function(){return r.makeJsonRpcId}});var o=n(1123);Object.defineProperty(t,"JsonRpcClient",{enumerable:!0,get:function(){return o.JsonRpcClient}});var i=n(2743);Object.defineProperty(t,"parseJsonRpcErrorResponse",{enumerable:!0,get:function(){return i.parseJsonRpcErrorResponse}}),Object.defineProperty(t,"parseJsonRpcId",{enumerable:!0,get:function(){return i.parseJsonRpcId}}),Object.defineProperty(t,"parseJsonRpcRequest",{enumerable:!0,get:function(){return i.parseJsonRpcRequest}}),Object.defineProperty(t,"parseJsonRpcResponse",{enumerable:!0,get:function(){return i.parseJsonRpcResponse}}),Object.defineProperty(t,"parseJsonRpcSuccessResponse",{enumerable:!0,get:function(){return i.parseJsonRpcSuccessResponse}});var a=n(3974);Object.defineProperty(t,"isJsonRpcErrorResponse",{enumerable:!0,get:function(){return a.isJsonRpcErrorResponse}}),Object.defineProperty(t,"isJsonRpcSuccessResponse",{enumerable:!0,get:function(){return a.isJsonRpcSuccessResponse}}),Object.defineProperty(t,"jsonRpcCode",{enumerable:!0,get:function(){return a.jsonRpcCode}})},1123:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.JsonRpcClient=void 0;const r=n(1459),o=n(3974);t.JsonRpcClient=class{constructor(e){this.connection=e}async run(e){const t=this.connection.responseStream.filter((t=>t.id===e.id)),n=(0,r.firstEvent)(t);this.connection.sendRequest(e);const i=await n;if((0,o.isJsonRpcErrorResponse)(i)){const e=i.error;throw new Error(`JSON RPC error: code=${e.code}; message='${e.message}'`)}return i}}},2743:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseJsonRpcResponse=t.parseJsonRpcSuccessResponse=t.parseJsonRpcErrorResponse=t.parseJsonRpcRequest=t.parseJsonRpcId=void 0;const r=n(4111);function o(e){if(!(0,r.isJsonCompatibleDictionary)(e))throw new Error("Data must be JSON compatible dictionary");const t=e.id;return"number"!=typeof t&&"string"!=typeof t?null:t}function i(e){if("number"!=typeof e.code)throw new Error("Error property 'code' is not a number");if("string"!=typeof e.message)throw new Error("Error property 'message' is not a string");let t;if(void 0===e.data)t=void 0;else{if(!(0,r.isJsonCompatibleValue)(e.data))throw new Error("Error property 'data' is defined but not a JSON compatible value.");t=e.data}return{code:e.code,message:e.message,...void 0!==t?{data:t}:{}}}function a(e){if(!(0,r.isJsonCompatibleDictionary)(e))throw new Error("Data must be JSON compatible dictionary");if("2.0"!==e.jsonrpc)throw new Error(`Got unexpected jsonrpc version: ${JSON.stringify(e)}`);const t=e.id;if("number"!=typeof t&&"string"!=typeof t&&null!==t)throw new Error("Invalid id field");if(void 0===e.error||!(0,r.isJsonCompatibleDictionary)(e.error))throw new Error("Invalid error field");return{jsonrpc:"2.0",id:t,error:i(e.error)}}function s(e){if(!(0,r.isJsonCompatibleDictionary)(e))throw new Error("Data must be JSON compatible dictionary");if("2.0"!==e.jsonrpc)throw new Error(`Got unexpected jsonrpc version: ${JSON.stringify(e)}`);const t=e.id;if("number"!=typeof t&&"string"!=typeof t)throw new Error("Invalid id field");if(void 0===e.result)throw new Error("Invalid result field");return{jsonrpc:"2.0",id:t,result:e.result}}t.parseJsonRpcId=o,t.parseJsonRpcRequest=function(e){if(!(0,r.isJsonCompatibleDictionary)(e))throw new Error("Data must be JSON compatible dictionary");if("2.0"!==e.jsonrpc)throw new Error(`Got unexpected jsonrpc version: ${e.jsonrpc}`);const t=o(e);if(null===t)throw new Error("Invalid id field");const n=e.method;if("string"!=typeof n)throw new Error("Invalid method field");if(!(0,r.isJsonCompatibleArray)(e.params)&&!(0,r.isJsonCompatibleDictionary)(e.params))throw new Error("Invalid params field");return{jsonrpc:"2.0",id:t,method:n,params:e.params}},t.parseJsonRpcErrorResponse=a,t.parseJsonRpcSuccessResponse=s,t.parseJsonRpcResponse=function(e){let t;try{t=a(e)}catch(n){t=s(e)}return t}},3974:(e,t)=>{"use strict";function n(e){return"object"==typeof e.error}Object.defineProperty(t,"__esModule",{value:!0}),t.jsonRpcCode=t.isJsonRpcSuccessResponse=t.isJsonRpcErrorResponse=void 0,t.isJsonRpcErrorResponse=n,t.isJsonRpcSuccessResponse=function(e){return!n(e)},t.jsonRpcCode={parseError:-32700,invalidRequest:-32600,methodNotFound:-32601,invalidParams:-32602,internalError:-32603,serverError:{default:-32e3}}},8121:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LedgerSigner=t.LedgerConnector=void 0;var r=n(7960);Object.defineProperty(t,"LedgerConnector",{enumerable:!0,get:function(){return r.LedgerConnector}});var o=n(4009);Object.defineProperty(t,"LedgerSigner",{enumerable:!0,get:function(){return o.LedgerSigner}})},7960:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.LedgerConnector=void 0;const o=n(3359),i=n(9562),a=n(8972),s=n(5553),c=r(n(9246)),d=r(n(1249));function u(e){return e.map((e=>e.isHardened()?e.toNumber()-2**31:e.toNumber()))}const l=(0,o.makeCosmoshubPath)(0);t.LedgerConnector=class{constructor(e,t={}){var n,r,o,i,a;const s={hdPaths:[l],prefix:"cosmos",testModeAllowed:!1,ledgerAppName:"Cosmos",requiredLedgerAppVersion:"1.5.3"};this.testModeAllowed=null!==(n=t.testModeAllowed)&&void 0!==n?n:s.testModeAllowed,this.hdPaths=null!==(r=t.hdPaths)&&void 0!==r?r:s.hdPaths,this.prefix=null!==(o=t.prefix)&&void 0!==o?o:s.prefix,this.ledgerAppName=null!==(i=t.ledgerAppName)&&void 0!==i?i:s.ledgerAppName,this.minLedgerAppVersion=null!==(a=t.minLedgerAppVersion)&&void 0!==a?a:s.requiredLedgerAppVersion,this.app=new c.default(e)}async getCosmosAppVersion(){await this.verifyCosmosAppIsOpen(),(0,s.assert)(this.app,`${this.ledgerAppName} Ledger App is not connected`);const e=await this.app.getVersion();this.handleLedgerErrors(e);const{major:t,minor:n,patch:r,test_mode:o}=e;return this.verifyAppMode(o),`${t}.${n}.${r}`}async getPubkey(e){await this.verifyDeviceIsReady(),(0,s.assert)(this.app,`${this.ledgerAppName} Ledger App is not connected`);const t=e||this.hdPaths[0],n=await this.app.publicKey(u(t));return this.handleLedgerErrors(n),Uint8Array.from(n.compressed_pk)}async getPubkeys(){return this.hdPaths.reduce(((e,t)=>e.then((async e=>[...e,await this.getPubkey(t)]))),Promise.resolve([]))}async getCosmosAddress(e){const t=e||await this.getPubkey();return(0,o.pubkeyToAddress)((0,o.encodeSecp256k1Pubkey)(t),this.prefix)}async sign(e,t){await this.verifyDeviceIsReady(),(0,s.assert)(this.app,`${this.ledgerAppName} Ledger App is not connected`);const n=t||this.hdPaths[0],r=await this.app.sign(u(n),(0,a.fromUtf8)(e));return this.handleLedgerErrors(r,"Transaction signing request was rejected by the user"),i.Secp256k1Signature.fromDer(r.signature).toFixedLength()}verifyAppMode(e){if(e&&!this.testModeAllowed)throw new Error(`DANGER: The ${this.ledgerAppName} Ledger app is in test mode and should not be used on mainnet!`)}async getOpenAppName(){(0,s.assert)(this.app,`${this.ledgerAppName} Ledger App is not connected`);const e=await this.app.appInfo();return this.handleLedgerErrors(e),e.appName}async verifyAppVersion(){const e=await this.getCosmosAppVersion();if(!d.default.gte(e,this.minLedgerAppVersion))throw new Error(`Outdated version: Please update ${this.ledgerAppName} Ledger App to the latest version.`)}async verifyCosmosAppIsOpen(){const e=await this.getOpenAppName();if("dashboard"===e.toLowerCase())throw new Error(`Please open the ${this.ledgerAppName} Ledger app on your Ledger device.`);if(e.toLowerCase()!==this.ledgerAppName.toLowerCase())throw new Error(`Please close ${e} and open the ${this.ledgerAppName} Ledger app on your Ledger device.`)}async verifyDeviceIsReady(){await this.verifyAppVersion(),await this.verifyCosmosAppIsOpen()}async showAddress(e){await this.verifyDeviceIsReady();const t=e||this.hdPaths[0],n=await this.app.showAddressAndPubKey(u(t),this.prefix);this.handleLedgerErrors(n);const{address:r,compressed_pk:i}=n;return{address:r,pubkey:(0,o.encodeSecp256k1Pubkey)(i)}}handleLedgerErrors({error_message:e="No errors",device_locked:t=!1},n="Request was rejected by the user"){if(t)throw new Error("Ledger’s screensaver mode is on");switch(e){case"U2F: Timeout":throw new Error("Connection timed out. Please try again.");case"Cosmos app does not seem to be open":throw new Error(`${this.ledgerAppName} app is not open`);case"Command not allowed":throw new Error("Transaction rejected");case"Transaction rejected":throw new Error(n);case"Unknown Status Code: 26628":throw new Error("Ledger’s screensaver mode is on");case"Instruction not supported":throw new Error(`Your ${this.ledgerAppName} Ledger App is not up to date. Please update to version ${this.minLedgerAppVersion} or newer.`);case"No errors":break;default:throw new Error(`Ledger Native Error: ${e}`)}}}},4009:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LedgerSigner=void 0;const r=n(3359),o=n(7960);t.LedgerSigner=class{constructor(e,t={}){this.hdPaths=t.hdPaths||[(0,r.makeCosmoshubPath)(0)],this.connector=new o.LedgerConnector(e,t)}async getAccounts(){if(!this.accounts){const e=await this.connector.getPubkeys();this.accounts=await Promise.all(e.map((async e=>({algo:"secp256k1",address:await this.connector.getCosmosAddress(e),pubkey:e}))))}return this.accounts}async showAddress(e){return this.connector.showAddress(e)}async signAmino(e,t){const n=this.accounts||await this.getAccounts(),o=n.findIndex((t=>t.address===e));if(-1===o)throw new Error(`Address ${e} not found in wallet`);const i=(0,r.serializeSignDoc)(t),a=n[o],s=this.hdPaths[o],c=await this.connector.sign(i,s);return{signed:t,signature:(0,r.encodeSecp256k1Signature)(a.pubkey,c)}}}},8828:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Decimal=void 0;const o=r(n(3550));class i{constructor(e,t){this.data={atomics:new o.default(e),fractionalDigits:t}}static fromUserInput(e,t){i.verifyFractionalDigits(t);const n=e.match(/[^0-9.]/);if(n)throw new Error(`Invalid character at position ${n.index+1}`);let r,o;if(-1===e.search(/\./))r=e,o="";else{const t=e.split(".");switch(t.length){case 0:case 1:throw new Error("Fewer than two elements in split result. This must not happen here.");case 2:if(!t[1])throw new Error("Fractional part missing");r=t[0],o=t[1].replace(/0+$/,"");break;default:throw new Error("More than one separator found")}}if(o.length>t)throw new Error("Got more fractional digits than supported");const a=`${r}${o.padEnd(t,"0")}`;return new i(a,t)}static fromAtomics(e,t){return i.verifyFractionalDigits(t),new i(e,t)}static verifyFractionalDigits(e){if(!Number.isInteger(e))throw new Error("Fractional digits is not an integer");if(e<0)throw new Error("Fractional digits must not be negative");if(e>100)throw new Error("Fractional digits must not exceed 100")}static compare(e,t){if(e.fractionalDigits!==t.fractionalDigits)throw new Error("Fractional digits do not match");return e.data.atomics.cmp(new o.default(t.atomics))}get atomics(){return this.data.atomics.toString()}get fractionalDigits(){return this.data.fractionalDigits}toString(){const e=new o.default(10).pow(new o.default(this.data.fractionalDigits)),t=this.data.atomics.div(e),n=this.data.atomics.mod(e);if(n.isZero())return t.toString();{const e=n.toString().padStart(this.data.fractionalDigits,"0").replace(/0+$/,"");return`${t.toString()}.${e}`}}toFloatApproximation(){const e=Number(this.toString());if(Number.isNaN(e))throw new Error("Conversion to number failed");return e}plus(e){if(this.fractionalDigits!==e.fractionalDigits)throw new Error("Fractional digits do not match");const t=this.data.atomics.add(new o.default(e.atomics));return new i(t.toString(),this.fractionalDigits)}minus(e){if(this.fractionalDigits!==e.fractionalDigits)throw new Error("Fractional digits do not match");const t=this.data.atomics.sub(new o.default(e.atomics));if(t.ltn(0))throw new Error("Difference must not be negative");return new i(t.toString(),this.fractionalDigits)}multiply(e){const t=this.data.atomics.mul(new o.default(e.toString()));return new i(t.toString(),this.fractionalDigits)}equals(e){return 0===i.compare(this,e)}isLessThan(e){return i.compare(this,e)<0}isLessThanOrEqual(e){return i.compare(this,e)<=0}isGreaterThan(e){return i.compare(this,e)>0}isGreaterThanOrEqual(e){return i.compare(this,e)>=0}}t.Decimal=i},6961:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Uint64=t.Uint53=t.Uint32=t.Int53=t.Decimal=void 0;var r=n(8828);Object.defineProperty(t,"Decimal",{enumerable:!0,get:function(){return r.Decimal}});var o=n(172);Object.defineProperty(t,"Int53",{enumerable:!0,get:function(){return o.Int53}}),Object.defineProperty(t,"Uint32",{enumerable:!0,get:function(){return o.Uint32}}),Object.defineProperty(t,"Uint53",{enumerable:!0,get:function(){return o.Uint53}}),Object.defineProperty(t,"Uint64",{enumerable:!0,get:function(){return o.Uint64}})},172:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Uint64=t.Uint53=t.Int53=t.Uint32=void 0;const o=r(n(3550)),i=new o.default("18446744073709551615",10,"be");class a{constructor(e){if(Number.isNaN(e))throw new Error("Input is not a number");if(!Number.isInteger(e))throw new Error("Input is not an integer");if(e<0||e>4294967295)throw new Error("Input not in uint32 range: "+e.toString());this.data=e}static fromBigEndianBytes(e){return a.fromBytes(e)}static fromBytes(e,t="be"){if(4!==e.length)throw new Error("Invalid input length. Expected 4 bytes.");for(let t=0;t255||e[t]<0)throw new Error("Invalid value in byte. Found: "+e[t]);const n="be"===t?e:Array.from(e).reverse();return new a(n[0]*2**24+65536*n[1]+256*n[2]+n[3])}static fromString(e){if(!e.match(/^[0-9]+$/))throw new Error("Invalid string format");return new a(Number.parseInt(e,10))}toBytesBigEndian(){return new Uint8Array([255&Math.floor(this.data/2**24),255&Math.floor(this.data/65536),255&Math.floor(this.data/256),255&Math.floor(this.data/1)])}toBytesLittleEndian(){return new Uint8Array([255&Math.floor(this.data/1),255&Math.floor(this.data/256),255&Math.floor(this.data/65536),255&Math.floor(this.data/2**24)])}toNumber(){return this.data}toString(){return this.data.toString()}}t.Uint32=a;class s{constructor(e){if(Number.isNaN(e))throw new Error("Input is not a number");if(!Number.isInteger(e))throw new Error("Input is not an integer");if(eNumber.MAX_SAFE_INTEGER)throw new Error("Input not in int53 range: "+e.toString());this.data=e}static fromString(e){if(!e.match(/^-?[0-9]+$/))throw new Error("Invalid string format");return new s(Number.parseInt(e,10))}toNumber(){return this.data}toString(){return this.data.toString()}}t.Int53=s;class c{constructor(e){const t=new s(e);if(t.toNumber()<0)throw new Error("Input is negative");this.data=t}static fromString(e){const t=s.fromString(e);return new c(t.toNumber())}toNumber(){return this.data.toNumber()}toString(){return this.data.toString()}}t.Uint53=c;class d{constructor(e){if(e.isNeg())throw new Error("Input is negative");if(e.gt(i))throw new Error("Input exceeds uint64 range");this.data=e}static fromBytesBigEndian(e){return d.fromBytes(e)}static fromBytes(e,t="be"){if(8!==e.length)throw new Error("Invalid input length. Expected 8 bytes.");for(let t=0;t255||e[t]<0)throw new Error("Invalid value in byte. Found: "+e[t]);const n="be"===t?Array.from(e):Array.from(e).reverse();return new d(new o.default(n))}static fromString(e){if(!e.match(/^[0-9]+$/))throw new Error("Invalid string format");return new d(new o.default(e,10,"be"))}static fromNumber(e){if(Number.isNaN(e))throw new Error("Input is not a number");if(!Number.isInteger(e))throw new Error("Input is not an integer");let t;try{t=new o.default(e)}catch(e){throw new Error("Input is not a safe integer")}return new d(t)}toBytesBigEndian(){return Uint8Array.from(this.data.toArray("be",8))}toBytesLittleEndian(){return Uint8Array.from(this.data.toArray("le",8))}toString(){return this.data.toString(10)}toNumber(){return this.data.toNumber()}}t.Uint64=d},8296:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseCoins=void 0;const r=n(6961);t.parseCoins=function(e){return e.replace(/\s/g,"").split(",").filter(Boolean).map((e=>{const t=e.match(/^([0-9]+)([a-zA-Z][a-zA-Z0-9/]{2,127})$/);if(!t)throw new Error("Got an invalid coin string");return{amount:r.Uint64.fromString(t[1]).toString(),denom:t[2]}}))}},7358:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decodeTxRaw=void 0;const r=n(9639);t.decodeTxRaw=function(e){const t=r.TxRaw.decode(e);return{authInfo:r.AuthInfo.decode(t.authInfoBytes),body:r.TxBody.decode(t.bodyBytes),signatures:t.signatures}}},5443:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DirectSecp256k1HdWallet=t.extractKdfConfiguration=void 0;const r=n(3359),o=n(9562),i=n(8972),a=n(5553),s=n(9153),c=n(3580),d="directsecp256k1hdwallet-v1",u={algorithm:"argon2id",params:{outputLength:32,opsLimit:24,memLimitKib:12288}};t.extractKdfConfiguration=function(e){const t=JSON.parse(e);if(!(0,a.isNonNullObject)(t))throw new Error("Root document is not an object.");if(t.type===d)return t.kdf;throw new Error("Unsupported serialization type")};const l={bip39Password:"",hdPaths:[(0,r.makeCosmoshubPath)(0)],prefix:"cosmos"};class A{constructor(e,t){var n,r;const o=null!==(n=t.prefix)&&void 0!==n?n:l.prefix,i=null!==(r=t.hdPaths)&&void 0!==r?r:l.hdPaths;this.secret=e,this.seed=t.seed,this.accounts=i.map((e=>({hdPath:e,prefix:o})))}static async fromMnemonic(e,t={}){const n=new o.EnglishMnemonic(e),r=await o.Bip39.mnemonicToSeed(n,t.bip39Password);return new A(n,{...t,seed:r})}static async generate(e=12,t={}){const n=4*Math.floor(11*e/33),r=o.Random.getBytes(n),i=o.Bip39.encode(r);return A.fromMnemonic(i.toString(),t)}static async deserialize(e,t){const n=JSON.parse(e);if(!(0,a.isNonNullObject)(n))throw new Error("Root document is not an object.");if(n.type===d)return A.deserializeTypeV1(e,t);throw new Error("Unsupported serialization type")}static async deserializeWithEncryptionKey(e,t){const n=JSON.parse(e);if(!(0,a.isNonNullObject)(n))throw new Error("Root document is not an object.");const r=n;if(r.type===d){const e=await(0,c.decrypt)((0,i.fromBase64)(r.data),t,r.encryption),n=JSON.parse((0,i.fromUtf8)(e)),{mnemonic:s,accounts:d}=n;if((0,a.assert)("string"==typeof s),!Array.isArray(d))throw new Error("Property 'accounts' is not an array");if(!d.every((e=>{return t=e,!!(0,a.isNonNullObject)(t)&&"string"==typeof t.hdPath&&"string"==typeof t.prefix;var t})))throw new Error("Account is not in the correct format.");const u=d[0].prefix;if(!d.every((({prefix:e})=>e===u)))throw new Error("Accounts do not all have the same prefix");const l=d.map((({hdPath:e})=>(0,o.stringToPath)(e)));return A.fromMnemonic(s,{hdPaths:l,prefix:u})}throw new Error("Unsupported serialization type")}static async deserializeTypeV1(e,t){const n=JSON.parse(e);if(!(0,a.isNonNullObject)(n))throw new Error("Root document is not an object.");const r=await(0,c.executeKdf)(t,n.kdf);return A.deserializeWithEncryptionKey(e,r)}get mnemonic(){return this.secret.toString()}async getAccounts(){return(await this.getAccountsWithPrivkeys()).map((({algo:e,pubkey:t,address:n})=>({algo:e,pubkey:t,address:n})))}async signDirect(e,t){const n=(await this.getAccountsWithPrivkeys()).find((({address:t})=>t===e));if(void 0===n)throw new Error(`Address ${e} not found in wallet`);const{privkey:i,pubkey:a}=n,c=(0,s.makeSignBytes)(t),d=(0,o.sha256)(c),u=await o.Secp256k1.createSignature(d,i),l=new Uint8Array([...u.r(32),...u.s(32)]);return{signed:t,signature:(0,r.encodeSecp256k1Signature)(a,l)}}async serialize(e){const t=u,n=await(0,c.executeKdf)(e,t);return this.serializeWithEncryptionKey(n,t)}async serializeWithEncryptionKey(e,t){const n={mnemonic:this.mnemonic,accounts:this.accounts.map((({hdPath:e,prefix:t})=>({hdPath:(0,o.pathToString)(e),prefix:t})))},r=(0,i.toUtf8)(JSON.stringify(n)),a={algorithm:c.supportedAlgorithms.xchacha20poly1305Ietf},s=await(0,c.encrypt)(r,e,a),u={type:d,kdf:t,encryption:a,data:(0,i.toBase64)(s)};return JSON.stringify(u)}async getKeyPair(e){const{privkey:t}=o.Slip10.derivePath(o.Slip10Curve.Secp256k1,this.seed,e),{pubkey:n}=await o.Secp256k1.makeKeypair(t);return{privkey:t,pubkey:o.Secp256k1.compressPubkey(n)}}async getAccountsWithPrivkeys(){return Promise.all(this.accounts.map((async({hdPath:e,prefix:t})=>{const{privkey:n,pubkey:o}=await this.getKeyPair(e);return{algo:"secp256k1",privkey:n,pubkey:o,address:(0,i.toBech32)(t,(0,r.rawSecp256k1PubkeyToRawAddress)(o))}})))}}t.DirectSecp256k1HdWallet=A},4134:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DirectSecp256k1Wallet=void 0;const r=n(3359),o=n(9562),i=n(8972),a=n(9153);class s{constructor(e,t,n){this.privkey=e,this.pubkey=t,this.prefix=n}static async fromKey(e,t="cosmos"){const n=(await o.Secp256k1.makeKeypair(e)).pubkey;return new s(e,o.Secp256k1.compressPubkey(n),t)}get address(){return(0,i.toBech32)(this.prefix,(0,r.rawSecp256k1PubkeyToRawAddress)(this.pubkey))}async getAccounts(){return[{algo:"secp256k1",address:this.address,pubkey:this.pubkey}]}async signDirect(e,t){const n=(0,a.makeSignBytes)(t);if(e!==this.address)throw new Error(`Address ${e} not found in wallet`);const i=(0,o.sha256)(n),s=await o.Secp256k1.createSignature(i,this.privkey),c=new Uint8Array([...s.r(32),...s.s(32)]);return{signed:t,signature:(0,r.encodeSecp256k1Signature)(this.pubkey,c)}}}t.DirectSecp256k1Wallet=s},4087:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.coins=t.coin=t.executeKdf=t.makeSignDoc=t.makeSignBytes=t.makeAuthInfoBytes=t.isOfflineDirectSigner=t.Registry=t.isTxBodyEncodeObject=t.isTsProtoGeneratedType=t.isPbjsGeneratedType=t.encodePubkey=t.decodePubkey=t.makeCosmoshubPath=t.DirectSecp256k1Wallet=t.extractKdfConfiguration=t.DirectSecp256k1HdWallet=t.decodeTxRaw=t.parseCoins=void 0;var r=n(8296);Object.defineProperty(t,"parseCoins",{enumerable:!0,get:function(){return r.parseCoins}});var o=n(7358);Object.defineProperty(t,"decodeTxRaw",{enumerable:!0,get:function(){return o.decodeTxRaw}});var i=n(5443);Object.defineProperty(t,"DirectSecp256k1HdWallet",{enumerable:!0,get:function(){return i.DirectSecp256k1HdWallet}}),Object.defineProperty(t,"extractKdfConfiguration",{enumerable:!0,get:function(){return i.extractKdfConfiguration}});var a=n(4134);Object.defineProperty(t,"DirectSecp256k1Wallet",{enumerable:!0,get:function(){return a.DirectSecp256k1Wallet}});var s=n(8549);Object.defineProperty(t,"makeCosmoshubPath",{enumerable:!0,get:function(){return s.makeCosmoshubPath}});var c=n(4594);Object.defineProperty(t,"decodePubkey",{enumerable:!0,get:function(){return c.decodePubkey}}),Object.defineProperty(t,"encodePubkey",{enumerable:!0,get:function(){return c.encodePubkey}});var d=n(9030);Object.defineProperty(t,"isPbjsGeneratedType",{enumerable:!0,get:function(){return d.isPbjsGeneratedType}}),Object.defineProperty(t,"isTsProtoGeneratedType",{enumerable:!0,get:function(){return d.isTsProtoGeneratedType}}),Object.defineProperty(t,"isTxBodyEncodeObject",{enumerable:!0,get:function(){return d.isTxBodyEncodeObject}}),Object.defineProperty(t,"Registry",{enumerable:!0,get:function(){return d.Registry}});var u=n(1183);Object.defineProperty(t,"isOfflineDirectSigner",{enumerable:!0,get:function(){return u.isOfflineDirectSigner}});var l=n(9153);Object.defineProperty(t,"makeAuthInfoBytes",{enumerable:!0,get:function(){return l.makeAuthInfoBytes}}),Object.defineProperty(t,"makeSignBytes",{enumerable:!0,get:function(){return l.makeSignBytes}}),Object.defineProperty(t,"makeSignDoc",{enumerable:!0,get:function(){return l.makeSignDoc}});var A=n(3580);Object.defineProperty(t,"executeKdf",{enumerable:!0,get:function(){return A.executeKdf}});var f=n(3359);Object.defineProperty(t,"coin",{enumerable:!0,get:function(){return f.coin}}),Object.defineProperty(t,"coins",{enumerable:!0,get:function(){return f.coins}})},8549:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.makeCosmoshubPath=void 0;const r=n(9562);t.makeCosmoshubPath=function(e){return[r.Slip10RawIndex.hardened(44),r.Slip10RawIndex.hardened(118),r.Slip10RawIndex.hardened(0),r.Slip10RawIndex.normal(0),r.Slip10RawIndex.normal(e)]}},4594:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decodePubkey=t.encodePubkey=void 0;const r=n(3359),o=n(8972),i=n(6961),a=n(479),s=n(7228),c=n(3862);function d(e){if("/cosmos.crypto.secp256k1.PubKey"===e.typeUrl){const{key:t}=s.PubKey.decode(e.value);return(0,r.encodeSecp256k1Pubkey)(t)}throw new Error(`Pubkey type_url ${e.typeUrl} not recognized as single public key type`)}t.encodePubkey=function e(t){if((0,r.isSecp256k1Pubkey)(t)){const e=s.PubKey.fromPartial({key:(0,o.fromBase64)(t.value)});return c.Any.fromPartial({typeUrl:"/cosmos.crypto.secp256k1.PubKey",value:Uint8Array.from(s.PubKey.encode(e).finish())})}if((0,r.isMultisigThresholdPubkey)(t)){const n=a.LegacyAminoPubKey.fromPartial({threshold:i.Uint53.fromString(t.value.threshold).toNumber(),publicKeys:t.value.pubkeys.map(e)});return c.Any.fromPartial({typeUrl:"/cosmos.crypto.multisig.LegacyAminoPubKey",value:Uint8Array.from(a.LegacyAminoPubKey.encode(n).finish())})}throw new Error(`Pubkey type ${t.type} not recognized`)},t.decodePubkey=function(e){if(!e||!e.value)return null;switch(e.typeUrl){case"/cosmos.crypto.secp256k1.PubKey":return d(e);case"/cosmos.crypto.multisig.LegacyAminoPubKey":{const{threshold:t,publicKeys:n}=a.LegacyAminoPubKey.decode(e.value);return{type:"tendermint/PubKeyMultisigThreshold",value:{threshold:t.toString(),pubkeys:n.map(d)}}}default:throw new Error(`Pubkey type_url ${e.typeUrl} not recognized`)}}},9030:(e,t,n)=>{"use strict";var r=n(8764).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.Registry=t.isTxBodyEncodeObject=t.isPbjsGeneratedType=t.isTsProtoGeneratedType=void 0;const o=n(8994),i=n(891),a=n(9639),s=n(3862);function c(e){return"function"==typeof e.fromPartial}t.isTsProtoGeneratedType=c,t.isPbjsGeneratedType=function(e){return!c(e)};const d={cosmosCoin:"/cosmos.base.v1beta1.Coin",cosmosMsgSend:"/cosmos.bank.v1beta1.MsgSend",cosmosTxBody:"/cosmos.tx.v1beta1.TxBody",googleAny:"/google.protobuf.Any"};function u(e){return"/cosmos.tx.v1beta1.TxBody"===e.typeUrl}t.isTxBodyEncodeObject=u,t.Registry=class{constructor(e){const{cosmosCoin:t,cosmosMsgSend:n}=d;this.types=e?new Map([...e]):new Map([[t,i.Coin],[n,o.MsgSend]])}register(e,t){this.types.set(e,t)}lookupType(e){return this.types.get(e)}lookupTypeWithError(e){const t=this.lookupType(e);if(!t)throw new Error(`Unregistered type url: ${e}`);return t}encode(e){const{value:t,typeUrl:n}=e;if(u(e))return this.encodeTxBody(t);const r=this.lookupTypeWithError(n),o=c(r)?r.fromPartial(t):r.create(t);return r.encode(o).finish()}encodeAsAny(e){const t=this.encode(e);return s.Any.fromPartial({typeUrl:e.typeUrl,value:t})}encodeTxBody(e){const t=e.messages.map((e=>this.encodeAsAny(e))),n=a.TxBody.fromPartial({...e,messages:t});return a.TxBody.encode(n).finish()}decode({typeUrl:e,value:t}){if(e===d.cosmosTxBody)return this.decodeTxBody(t);const n=this.lookupTypeWithError(e).decode(t);return Object.entries(n).forEach((([e,t])=>{void 0!==r&&void 0!==r.isBuffer&&r.isBuffer(t)&&(n[e]=Uint8Array.from(t))})),n}decodeTxBody(e){const t=a.TxBody.decode(e);return{...t,messages:t.messages.map((({typeUrl:e,value:t})=>{if(!e)throw new Error("Missing type_url in Any");if(!t)throw new Error("Missing value in Any");return this.decode({typeUrl:e,value:t})}))}}}},1183:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isOfflineDirectSigner=void 0,t.isOfflineDirectSigner=function(e){return void 0!==e.signDirect}},9153:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.makeSignBytes=t.makeSignDoc=t.makeAuthInfoBytes=void 0;const o=n(2574),i=n(9639),a=r(n(3720));function s(e,t){return e.map((({pubkey:e,sequence:n})=>({publicKey:e,modeInfo:{single:{mode:t}},sequence:a.default.fromNumber(n)})))}t.makeAuthInfoBytes=function(e,t,n,r=o.SignMode.SIGN_MODE_DIRECT){const c={signerInfos:s(e,r),fee:{amount:[...t],gasLimit:a.default.fromNumber(n)}};return i.AuthInfo.encode(i.AuthInfo.fromPartial(c)).finish()},t.makeSignDoc=function(e,t,n,r){return{bodyBytes:e,authInfoBytes:t,chainId:n,accountNumber:a.default.fromNumber(r)}},t.makeSignBytes=function({accountNumber:e,authInfoBytes:t,bodyBytes:n,chainId:r}){const o=i.SignDoc.fromPartial({accountNumber:e,authInfoBytes:t,bodyBytes:n,chainId:r});return i.SignDoc.encode(o).finish()}},3580:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decrypt=t.encrypt=t.supportedAlgorithms=t.executeKdf=t.cosmjsSalt=void 0;const r=n(9562),o=n(8972);t.cosmjsSalt=(0,o.toAscii)("The CosmJS salt."),t.executeKdf=async function(e,n){if("argon2id"===n.algorithm){const o=n.params;if(!(0,r.isArgon2idOptions)(o))throw new Error("Invalid format of argon2id params");return r.Argon2id.execute(e,t.cosmjsSalt,o)}throw new Error("Unsupported KDF algorithm")},t.supportedAlgorithms={xchacha20poly1305Ietf:"xchacha20poly1305-ietf"},t.encrypt=async function(e,n,o){if(o.algorithm===t.supportedAlgorithms.xchacha20poly1305Ietf){const t=r.Random.getBytes(r.xchacha20NonceLength);return new Uint8Array([...t,...await r.Xchacha20poly1305Ietf.encrypt(e,n,t)])}throw new Error(`Unsupported encryption algorithm: '${o.algorithm}'`)},t.decrypt=async function(e,n,o){if(o.algorithm===t.supportedAlgorithms.xchacha20poly1305Ietf){const t=e.slice(0,r.xchacha20NonceLength);return r.Xchacha20poly1305Ietf.decrypt(e.slice(r.xchacha20NonceLength),n,t)}throw new Error(`Unsupported encryption algorithm: '${o.algorithm}'`)}},3830:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StreamingSocket=t.SocketWrapper=t.ReconnectingSocket=t.QueueingStreamingSocket=t.ConnectionStatus=void 0;var r=n(2365);Object.defineProperty(t,"ConnectionStatus",{enumerable:!0,get:function(){return r.ConnectionStatus}}),Object.defineProperty(t,"QueueingStreamingSocket",{enumerable:!0,get:function(){return r.QueueingStreamingSocket}});var o=n(5850);Object.defineProperty(t,"ReconnectingSocket",{enumerable:!0,get:function(){return o.ReconnectingSocket}});var i=n(9320);Object.defineProperty(t,"SocketWrapper",{enumerable:!0,get:function(){return i.SocketWrapper}});var a=n(6794);Object.defineProperty(t,"StreamingSocket",{enumerable:!0,get:function(){return a.StreamingSocket}})},2365:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QueueingStreamingSocket=t.ConnectionStatus=void 0;const r=n(1459),o=n(3813),i=n(6794);var a;!function(e){e[e.Unconnected=0]="Unconnected",e[e.Connecting=1]="Connecting",e[e.Connected=2]="Connected",e[e.Disconnected=3]="Disconnected"}(a=t.ConnectionStatus||(t.ConnectionStatus={})),t.QueueingStreamingSocket=class{constructor(e,t=1e4,n){this.queue=[],this.isProcessingQueue=!1,this.url=e,this.timeout=t,this.reconnectedHandler=n;const s={start:e=>this.eventProducerListener=e,stop:()=>this.eventProducerListener=void 0};this.events=o.Stream.create(s),this.connectionStatusProducer=new r.DefaultValueProducer(a.Unconnected),this.connectionStatus=new r.ValueAndUpdates(this.connectionStatusProducer),this.socket=new i.StreamingSocket(this.url,this.timeout),this.socket.events.subscribe({next:e=>{if(!this.eventProducerListener)throw new Error("No event producer listener set");this.eventProducerListener.next(e)},error:()=>this.connectionStatusProducer.update(a.Disconnected)})}connect(){this.connectionStatusProducer.update(a.Connecting),this.socket.connected.then((async()=>(this.connectionStatusProducer.update(a.Connected),this.processQueue())),(()=>this.connectionStatusProducer.update(a.Disconnected))),this.socket.connect()}disconnect(){this.connectionStatusProducer.update(a.Disconnected),this.socket.disconnect()}reconnect(){this.socket=new i.StreamingSocket(this.url,this.timeout),this.socket.events.subscribe({next:e=>{if(!this.eventProducerListener)throw new Error("No event producer listener set");this.eventProducerListener.next(e)},error:()=>this.connectionStatusProducer.update(a.Disconnected)}),this.socket.connected.then((()=>{this.reconnectedHandler&&this.reconnectedHandler()})),this.connect()}getQueueLength(){return this.queue.length}queueRequest(e){this.queue.push(e),this.processQueue()}async processQueue(){if(this.isProcessingQueue||this.connectionStatus.value!==a.Connected)return;let e;for(this.isProcessingQueue=!0;e=this.queue.shift();)try{await this.socket.send(e),this.isProcessingQueue=!1}catch(t){return this.queue.unshift(e),void(this.isProcessingQueue=!1)}}}},5850:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ReconnectingSocket=void 0;const r=n(3813),o=n(2365);class i{constructor(e,t=1e4,n){this.unconnected=!0,this.disconnected=!1,this.timeoutIndex=0,this.reconnectTimeout=null;const a={start:e=>this.eventProducerListener=e,stop:()=>this.eventProducerListener=void 0};this.events=r.Stream.create(a),this.socket=new o.QueueingStreamingSocket(e,t,n),this.socket.events.subscribe({next:e=>{this.eventProducerListener&&this.eventProducerListener.next(e)},error:e=>{this.eventProducerListener&&this.eventProducerListener.error(e)}}),this.connectionStatus=this.socket.connectionStatus,this.connectionStatus.updates.subscribe({next:e=>{e===o.ConnectionStatus.Connected&&(this.timeoutIndex=0),e===o.ConnectionStatus.Disconnected&&(this.reconnectTimeout&&(clearTimeout(this.reconnectTimeout),this.reconnectTimeout=null),this.reconnectTimeout=setTimeout((()=>this.socket.reconnect()),i.calculateTimeout(this.timeoutIndex++)))}})}static calculateTimeout(e){return Math.min(2**e*100,5e3)}connect(){if(!this.unconnected)throw new Error("Cannot connect: socket has already connected");this.socket.connect(),this.unconnected=!1}disconnect(){if(this.unconnected)throw new Error("Cannot disconnect: socket has not yet connected");this.socket.disconnect(),this.eventProducerListener&&this.eventProducerListener.complete(),this.disconnected=!0}queueRequest(e){if(this.disconnected)throw new Error("Cannot queue request: socket has disconnected");this.socket.queueRequest(e)}}t.ReconnectingSocket=i},9320:function(e,t,n){"use strict";var r=n(4155),o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.SocketWrapper=void 0;const i=o(n(6792));t.SocketWrapper=class{constructor(e,t,n,r,o,i=1e4){this.closed=!1,this.connected=new Promise(((e,t)=>{this.connectedResolver=e,this.connectedRejecter=t})),this.url=e,this.messageHandler=t,this.errorHandler=n,this.openHandler=r,this.closeHandler=o,this.timeout=i}connect(){const e=new i.default(this.url);e.onerror=e=>{this.clearTimeout(),this.errorHandler&&this.errorHandler(e)},e.onmessage=e=>{this.messageHandler({type:e.type,data:e.data})},e.onopen=e=>{this.clearTimeout(),this.connectedResolver(),this.openHandler&&this.openHandler()},e.onclose=e=>{this.closed=!0,this.closeHandler&&this.closeHandler(e)};const t=Date.now();this.timeoutId=setTimeout((()=>{e.onmessage=()=>0,e.onerror=()=>0,e.onopen=()=>0,e.onclose=()=>0,e.close(),this.socket=void 0;const n=Math.floor(Date.now()-t);this.connectedRejecter(`Connection attempt timed out after ${n} ms`)}),this.timeout),this.socket=e}disconnect(){if(!this.socket)throw new Error("Socket undefined. This must be called after connecting.");switch(this.clearTimeout(),this.socket.readyState){case i.default.OPEN:this.socket.close(1e3);break;case i.default.CLOSED:break;case i.default.CONNECTING:this.socket.onopen=()=>0,this.socket.onclose=()=>0,this.socket.onerror=()=>0,this.socket.onmessage=()=>0,this.socket=void 0,this.closeHandler&&this.closeHandler({wasClean:!1,code:4001});break;case i.default.CLOSING:break;default:throw new Error(`Unknown readyState: ${this.socket.readyState}`)}}async send(e){return new Promise(((t,n)=>{if(!this.socket)throw new Error("Socket undefined. This must be called after connecting.");if(this.closed)throw new Error("Socket was closed, so no data can be sent anymore.");if(this.socket.readyState!==i.default.OPEN)throw new Error("Websocket is not open");void 0!==r&&void 0!==r.versions&&void 0!==r.versions.node?this.socket.send(e,(e=>e?n(e):t())):(this.socket.send(e),t())}))}clearTimeout(){if(!this.timeoutId)throw new Error("Timeout ID not set. This should not happen and usually means connect() was not called.");clearTimeout(this.timeoutId)}}},6794:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StreamingSocket=void 0;const r=n(3813),o=n(9320);t.StreamingSocket=class{constructor(e,t=1e4){this.socket=new o.SocketWrapper(e,(e=>{this.eventProducerListener&&this.eventProducerListener.next(e)}),(e=>{this.eventProducerListener&&this.eventProducerListener.error(e)}),(()=>{}),(e=>{this.eventProducerListener&&(e.wasClean?this.eventProducerListener.complete():this.eventProducerListener.error("Socket was closed unclean"))}),t),this.connected=this.socket.connected;const n={start:e=>this.eventProducerListener=e,stop:()=>this.eventProducerListener=void 0};this.events=r.Stream.create(n)}connect(){this.socket.connect()}disconnect(){this.socket.disconnect()}async send(e){return this.socket.send(e)}}},2538:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.accountFromAny=void 0;const r=n(6961),o=n(4087),i=n(5553),a=n(3487),s=n(5303);function c(e){return r.Uint64.fromString(e.toString())}function d(e){const{address:t,pubKey:n,accountNumber:r,sequence:i}=e;return{address:t,pubkey:(0,o.decodePubkey)(n),accountNumber:c(r).toNumber(),sequence:c(i).toNumber()}}t.accountFromAny=function(e){var t,n,r,o,c,u,l;const{typeUrl:A,value:f}=e;switch(A){case"/cosmos.auth.v1beta1.BaseAccount":return d(a.BaseAccount.decode(f));case"/cosmos.auth.v1beta1.ModuleAccount":{const e=a.ModuleAccount.decode(f).baseAccount;return(0,i.assert)(e),d(e)}case"/cosmos.vesting.v1beta1.BaseVestingAccount":{const e=null===(t=s.BaseVestingAccount.decode(f))||void 0===t?void 0:t.baseAccount;return(0,i.assert)(e),d(e)}case"/cosmos.vesting.v1beta1.ContinuousVestingAccount":{const e=null===(r=null===(n=s.ContinuousVestingAccount.decode(f))||void 0===n?void 0:n.baseVestingAccount)||void 0===r?void 0:r.baseAccount;return(0,i.assert)(e),d(e)}case"/cosmos.vesting.v1beta1.DelayedVestingAccount":{const e=null===(c=null===(o=s.DelayedVestingAccount.decode(f))||void 0===o?void 0:o.baseVestingAccount)||void 0===c?void 0:c.baseAccount;return(0,i.assert)(e),d(e)}case"/cosmos.vesting.v1beta1.PeriodicVestingAccount":{const e=null===(l=null===(u=s.PeriodicVestingAccount.decode(f))||void 0===u?void 0:u.baseVestingAccount)||void 0===l?void 0:l.baseAccount;return(0,i.assert)(e),d(e)}default:throw new Error(`Unsupported type: '${A}'`)}}},2552:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isAminoMsgTransfer=t.isAminoMsgUndelegate=t.isAminoMsgBeginRedelegate=t.isAminoMsgDelegate=t.isAminoMsgEditValidator=t.isAminoMsgCreateValidator=t.isAminoMsgUnjail=t.isAminoMsgDeposit=t.isAminoMsgVote=t.isAminoMsgSubmitProposal=t.isAminoMsgSubmitEvidence=t.isAminoMsgFundCommunityPool=t.isAminoMsgWithdrawValidatorCommission=t.isAminoMsgWithdrawDelegatorReward=t.isAminoMsgSetWithdrawAddress=t.isAminoMsgVerifyInvariant=t.isAminoMsgMultiSend=t.isAminoMsgSend=void 0,t.isAminoMsgSend=function(e){return"cosmos-sdk/MsgSend"===e.type},t.isAminoMsgMultiSend=function(e){return"cosmos-sdk/MsgMultiSend"===e.type},t.isAminoMsgVerifyInvariant=function(e){return"cosmos-sdk/MsgVerifyInvariant"===e.type},t.isAminoMsgSetWithdrawAddress=function(e){return"cosmos-sdk/MsgModifyWithdrawAddress"===e.type},t.isAminoMsgWithdrawDelegatorReward=function(e){return"cosmos-sdk/MsgWithdrawDelegationReward"===e.type},t.isAminoMsgWithdrawValidatorCommission=function(e){return"cosmos-sdk/MsgWithdrawValidatorCommission"===e.type},t.isAminoMsgFundCommunityPool=function(e){return"cosmos-sdk/MsgFundCommunityPool"===e.type},t.isAminoMsgSubmitEvidence=function(e){return"cosmos-sdk/MsgSubmitEvidence"===e.type},t.isAminoMsgSubmitProposal=function(e){return"cosmos-sdk/MsgSubmitProposal"===e.type},t.isAminoMsgVote=function(e){return"cosmos-sdk/MsgVote"===e.type},t.isAminoMsgDeposit=function(e){return"cosmos-sdk/MsgDeposit"===e.type},t.isAminoMsgUnjail=function(e){return"cosmos-sdk/MsgUnjail"===e.type},t.isAminoMsgCreateValidator=function(e){return"cosmos-sdk/MsgCreateValidator"===e.type},t.isAminoMsgEditValidator=function(e){return"cosmos-sdk/MsgEditValidator"===e.type},t.isAminoMsgDelegate=function(e){return"cosmos-sdk/MsgDelegate"===e.type},t.isAminoMsgBeginRedelegate=function(e){return"cosmos-sdk/MsgBeginRedelegate"===e.type},t.isAminoMsgUndelegate=function(e){return"cosmos-sdk/MsgUndelegate"===e.type},t.isAminoMsgTransfer=function(e){return"cosmos-sdk/MsgTransfer"===e.type}},6111:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.AminoTypes=void 0;const o=n(3359),i=n(8972),a=n(5553),s=n(9876),c=n(3862),d=r(n(3720));function u(e){if("string"==typeof e)return""===e?void 0:e;if("number"==typeof e)return 0===e?void 0:e;if(d.default.isLong(e))return e.isZero()?void 0:e;throw new Error(`Got unsupported type '${typeof e}'`)}function l(e){return"string"!=typeof e[1]}t.AminoTypes=class{constructor({prefix:e,additions:t={}}){const n=function(e){return{"/cosmos.authz.v1beta1.MsgGrant":"not_supported_by_chain","/cosmos.authz.v1beta1.MsgExec":"not_supported_by_chain","/cosmos.authz.v1beta1.MsgRevoke":"not_supported_by_chain","/cosmos.bank.v1beta1.MsgSend":{aminoType:"cosmos-sdk/MsgSend",toAmino:({fromAddress:e,toAddress:t,amount:n})=>({from_address:e,to_address:t,amount:[...n]}),fromAmino:({from_address:e,to_address:t,amount:n})=>({fromAddress:e,toAddress:t,amount:[...n]})},"/cosmos.bank.v1beta1.MsgMultiSend":{aminoType:"cosmos-sdk/MsgMultiSend",toAmino:({inputs:e,outputs:t})=>({inputs:e.map((e=>({address:e.address,coins:[...e.coins]}))),outputs:t.map((e=>({address:e.address,coins:[...e.coins]})))}),fromAmino:({inputs:e,outputs:t})=>({inputs:e.map((e=>({address:e.address,coins:[...e.coins]}))),outputs:t.map((e=>({address:e.address,coins:[...e.coins]})))})},"/cosmos.distribution.v1beta1.MsgFundCommunityPool":{aminoType:"cosmos-sdk/MsgFundCommunityPool",toAmino:({amount:e,depositor:t})=>({amount:[...e],depositor:t}),fromAmino:({amount:e,depositor:t})=>({amount:[...e],depositor:t})},"/cosmos.distribution.v1beta1.MsgSetWithdrawAddress":{aminoType:"cosmos-sdk/MsgModifyWithdrawAddress",toAmino:({delegatorAddress:e,withdrawAddress:t})=>({delegator_address:e,withdraw_address:t}),fromAmino:({delegator_address:e,withdraw_address:t})=>({delegatorAddress:e,withdrawAddress:t})},"/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward":{aminoType:"cosmos-sdk/MsgWithdrawDelegationReward",toAmino:({delegatorAddress:e,validatorAddress:t})=>({delegator_address:e,validator_address:t}),fromAmino:({delegator_address:e,validator_address:t})=>({delegatorAddress:e,validatorAddress:t})},"/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission":{aminoType:"cosmos-sdk/MsgWithdrawValidatorCommission",toAmino:({validatorAddress:e})=>({validator_address:e}),fromAmino:({validator_address:e})=>({validatorAddress:e})},"/cosmos.gov.v1beta1.MsgDeposit":{aminoType:"cosmos-sdk/MsgDeposit",toAmino:({amount:e,depositor:t,proposalId:n})=>({amount:e,depositor:t,proposal_id:n.toString()}),fromAmino:({amount:e,depositor:t,proposal_id:n})=>({amount:Array.from(e),depositor:t,proposalId:d.default.fromString(n)})},"/cosmos.gov.v1beta1.MsgVote":{aminoType:"cosmos-sdk/MsgVote",toAmino:({option:e,proposalId:t,voter:n})=>({option:e,proposal_id:t.toString(),voter:n}),fromAmino:({option:e,proposal_id:t,voter:n})=>({option:(0,s.voteOptionFromJSON)(e),proposalId:d.default.fromString(t),voter:n})},"/cosmos.gov.v1beta1.MsgSubmitProposal":{aminoType:"cosmos-sdk/MsgSubmitProposal",toAmino:({initialDeposit:e,proposer:t,content:n})=>{let r;switch((0,a.assertDefinedAndNotNull)(n),n.typeUrl){case"/cosmos.gov.v1beta1.TextProposal":{const e=s.TextProposal.decode(n.value);r={type:"cosmos-sdk/TextProposal",value:{description:e.description,title:e.title}};break}default:throw new Error(`Unsupported proposal type: '${n.typeUrl}'`)}return{initial_deposit:e,proposer:t,content:r}},fromAmino:({initial_deposit:e,proposer:t,content:n})=>{let r;switch(n.type){case"cosmos-sdk/TextProposal":{const{value:e}=n;(0,a.assert)((0,a.isNonNullObject)(e));const{title:t,description:o}=e;(0,a.assert)("string"==typeof t),(0,a.assert)("string"==typeof o),r=c.Any.fromPartial({typeUrl:"/cosmos.gov.v1beta1.TextProposal",value:s.TextProposal.encode(s.TextProposal.fromPartial({title:t,description:o})).finish()});break}default:throw new Error(`Unsupported proposal type: '${n.type}'`)}return{initialDeposit:Array.from(e),proposer:t,content:r}}},"/cosmos.staking.v1beta1.MsgBeginRedelegate":{aminoType:"cosmos-sdk/MsgBeginRedelegate",toAmino:({delegatorAddress:e,validatorSrcAddress:t,validatorDstAddress:n,amount:r})=>((0,a.assertDefinedAndNotNull)(r,"missing amount"),{delegator_address:e,validator_src_address:t,validator_dst_address:n,amount:r}),fromAmino:({delegator_address:e,validator_src_address:t,validator_dst_address:n,amount:r})=>({delegatorAddress:e,validatorSrcAddress:t,validatorDstAddress:n,amount:r})},"/cosmos.staking.v1beta1.MsgCreateValidator":{aminoType:"cosmos-sdk/MsgCreateValidator",toAmino:({description:t,commission:n,minSelfDelegation:r,delegatorAddress:s,validatorAddress:c,pubkey:d,value:u})=>((0,a.assertDefinedAndNotNull)(t,"missing description"),(0,a.assertDefinedAndNotNull)(n,"missing commission"),(0,a.assertDefinedAndNotNull)(d,"missing pubkey"),(0,a.assertDefinedAndNotNull)(u,"missing value"),{description:{moniker:t.moniker,identity:t.identity,website:t.website,security_contact:t.securityContact,details:t.details},commission:{rate:n.rate,max_rate:n.maxRate,max_change_rate:n.maxChangeRate},min_self_delegation:r,delegator_address:s,validator_address:c,pubkey:(0,o.encodeBech32Pubkey)({type:"tendermint/PubKeySecp256k1",value:(0,i.toBase64)(d.value)},e),value:u}),fromAmino:({description:e,commission:t,min_self_delegation:n,delegator_address:r,validator_address:a,pubkey:s,value:c})=>{const d=(0,o.decodeBech32Pubkey)(s);if("tendermint/PubKeySecp256k1"!==d.type)throw new Error("Only Secp256k1 public keys are supported");return{description:{moniker:e.moniker,identity:e.identity,website:e.website,securityContact:e.security_contact,details:e.details},commission:{rate:t.rate,maxRate:t.max_rate,maxChangeRate:t.max_change_rate},minSelfDelegation:n,delegatorAddress:r,validatorAddress:a,pubkey:{typeUrl:"/cosmos.crypto.secp256k1.PubKey",value:(0,i.fromBase64)(d.value)},value:c}}},"/cosmos.staking.v1beta1.MsgDelegate":{aminoType:"cosmos-sdk/MsgDelegate",toAmino:({delegatorAddress:e,validatorAddress:t,amount:n})=>((0,a.assertDefinedAndNotNull)(n,"missing amount"),{delegator_address:e,validator_address:t,amount:n}),fromAmino:({delegator_address:e,validator_address:t,amount:n})=>({delegatorAddress:e,validatorAddress:t,amount:n})},"/cosmos.staking.v1beta1.MsgEditValidator":{aminoType:"cosmos-sdk/MsgEditValidator",toAmino:({description:e,commissionRate:t,minSelfDelegation:n,validatorAddress:r})=>((0,a.assertDefinedAndNotNull)(e,"missing description"),{description:{moniker:e.moniker,identity:e.identity,website:e.website,security_contact:e.securityContact,details:e.details},commission_rate:t,min_self_delegation:n,validator_address:r}),fromAmino:({description:e,commission_rate:t,min_self_delegation:n,validator_address:r})=>({description:{moniker:e.moniker,identity:e.identity,website:e.website,securityContact:e.security_contact,details:e.details},commissionRate:t,minSelfDelegation:n,validatorAddress:r})},"/cosmos.staking.v1beta1.MsgUndelegate":{aminoType:"cosmos-sdk/MsgUndelegate",toAmino:({delegatorAddress:e,validatorAddress:t,amount:n})=>((0,a.assertDefinedAndNotNull)(n,"missing amount"),{delegator_address:e,validator_address:t,amount:n}),fromAmino:({delegator_address:e,validator_address:t,amount:n})=>({delegatorAddress:e,validatorAddress:t,amount:n})},"/ibc.applications.transfer.v1.MsgTransfer":{aminoType:"cosmos-sdk/MsgTransfer",toAmino:({sourcePort:e,sourceChannel:t,token:n,sender:r,receiver:o,timeoutHeight:i,timeoutTimestamp:a})=>{var s,c,d;return{source_port:e,source_channel:t,token:n,sender:r,receiver:o,timeout_height:i?{revision_height:null===(s=u(i.revisionHeight))||void 0===s?void 0:s.toString(),revision_number:null===(c=u(i.revisionNumber))||void 0===c?void 0:c.toString()}:{},timeout_timestamp:null===(d=u(a))||void 0===d?void 0:d.toString()}},fromAmino:({source_port:e,source_channel:t,token:n,sender:r,receiver:o,timeout_height:i,timeout_timestamp:a})=>({sourcePort:e,sourceChannel:t,token:n,sender:r,receiver:o,timeoutHeight:i?{revisionHeight:d.default.fromString(i.revision_height||"0",!0),revisionNumber:d.default.fromString(i.revision_number||"0",!0)}:void 0,timeoutTimestamp:d.default.fromString(a||"0",!0)})},"/cosmos.feegrant.v1beta1.MsgGrantAllowance":"not_supported_by_chain","/cosmos.feegrant.v1beta1.MsgRevokeAllowance":"not_supported_by_chain"}}(e);this.register={...n,...t}}toAmino({typeUrl:e,value:t}){const n=this.register[e];if("not_supported_by_chain"===n)throw new Error(`The message type '${e}' cannot be signed using the Amino JSON sign mode because this is not supported by chain.`);if(!n)throw new Error(`Type URL '${e}' does not exist in the Amino message type register. If you need support for this message type, you can pass in additional entries to the AminoTypes constructor. If you think this message type should be included by default, please open an issue at https://github.com/cosmos/cosmjs/issues.`);return{type:n.aminoType,value:n.toAmino(t)}}fromAmino({type:e,value:t}){const n=Object.entries(this.register).filter(l).filter((([t,{aminoType:n}])=>n===e));switch(n.length){case 0:throw new Error(`Amino type identifier '${e}' does not exist in the Amino message type register. If you need support for this message type, you can pass in additional entries to the AminoTypes constructor. If you think this message type should be included by default, please open an issue at https://github.com/cosmos/cosmjs/issues.`);case 1:{const[e,r]=n[0];return{typeUrl:e,value:r.fromAmino(t)}}default:throw new Error(`Multiple types are registered with Amino type identifier '${e}': '`+n.map((([e,t])=>e)).sort().join("', '")+"'. Thus fromAmino cannot be performed.")}}}},3357:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isMsgVoteEncodeObject=t.isMsgSubmitProposalEncodeObject=t.isMsgDepositEncodeObject=t.isMsgTransferEncodeObject=t.isMsgWithdrawDelegatorRewardEncodeObject=t.isMsgUndelegateEncodeObject=t.isMsgDelegateEncodeObject=t.isMsgSendEncodeObject=void 0,t.isMsgSendEncodeObject=function(e){return"/cosmos.bank.v1beta1.MsgSend"===e.typeUrl},t.isMsgDelegateEncodeObject=function(e){return"/cosmos.staking.v1beta1.MsgDelegate"===e.typeUrl},t.isMsgUndelegateEncodeObject=function(e){return"/cosmos.staking.v1beta1.MsgUndelegate"===e.typeUrl},t.isMsgWithdrawDelegatorRewardEncodeObject=function(e){return"/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward"===e.typeUrl},t.isMsgTransferEncodeObject=function(e){return"/ibc.applications.transfer.v1.MsgTransfer"===e.typeUrl},t.isMsgDepositEncodeObject=function(e){return"/cosmos.gov.v1beta1.MsgDeposit"===e.typeUrl},t.isMsgSubmitProposalEncodeObject=function(e){return"/cosmos.gov.v1beta1.MsgSubmitProposal"===e.typeUrl},t.isMsgVoteEncodeObject=function(e){return"/cosmos.gov.v1beta1.MsgVote"===e.typeUrl}},1371:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.calculateFee=t.GasPrice=void 0;const r=n(6961),o=n(4087);class i{constructor(e,t){this.amount=e,this.denom=t}static fromString(e){const t=e.match(/^([0-9.]+)([a-z][a-z0-9]*)$/i);if(!t)throw new Error("Invalid gas price string");const[n,o,a]=t;!function(e){if(e.length<3||e.length>128)throw new Error("Denom must be between 3 and 128 characters")}(a);const s=r.Decimal.fromUserInput(o,18);return new i(s,a)}toString(){return this.amount.toString()+this.denom}}t.GasPrice=i,t.calculateFee=function(e,t){const n="string"==typeof t?i.fromString(t):t,{denom:a,amount:s}=n,c=Math.ceil(s.multiply(new r.Uint53(e)).toFloatApproximation());return{amount:(0,o.coins)(c,a),gas:e.toString()}}},4658:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.assertIsDeliverTxSuccess=t.assertIsDeliverTxFailure=t.SigningStargateClient=t.defaultRegistryTypes=t.isSearchByTagsQuery=t.isSearchBySentFromOrToQuery=t.isSearchByHeightQuery=t.setupTxExtension=t.setupStakingExtension=t.setupMintExtension=t.setupIbcExtension=t.setupGovExtension=t.setupDistributionExtension=t.setupBankExtension=t.setupAuthExtension=t.QueryClient=t.decodeCosmosSdkDecFromProto=t.createProtobufRpcClient=t.createPagination=t.makeMultisignedTx=t.logs=t.GasPrice=t.calculateFee=t.isMsgWithdrawDelegatorRewardEncodeObject=t.isMsgVoteEncodeObject=t.isMsgUndelegateEncodeObject=t.isMsgTransferEncodeObject=t.isMsgSubmitProposalEncodeObject=t.isMsgSendEncodeObject=t.isMsgDepositEncodeObject=t.isMsgDelegateEncodeObject=t.AminoTypes=t.isAminoMsgWithdrawValidatorCommission=t.isAminoMsgWithdrawDelegatorReward=t.isAminoMsgVote=t.isAminoMsgVerifyInvariant=t.isAminoMsgUnjail=t.isAminoMsgUndelegate=t.isAminoMsgSubmitProposal=t.isAminoMsgSubmitEvidence=t.isAminoMsgSetWithdrawAddress=t.isAminoMsgSend=t.isAminoMsgMultiSend=t.isAminoMsgFundCommunityPool=t.isAminoMsgEditValidator=t.isAminoMsgDeposit=t.isAminoMsgDelegate=t.isAminoMsgCreateValidator=t.isAminoMsgBeginRedelegate=t.accountFromAny=void 0,t.parseCoins=t.makeCosmoshubPath=t.coins=t.coin=t.TimeoutError=t.StargateClient=t.isDeliverTxSuccess=t.isDeliverTxFailure=void 0;var a=n(2538);Object.defineProperty(t,"accountFromAny",{enumerable:!0,get:function(){return a.accountFromAny}});var s=n(2552);Object.defineProperty(t,"isAminoMsgBeginRedelegate",{enumerable:!0,get:function(){return s.isAminoMsgBeginRedelegate}}),Object.defineProperty(t,"isAminoMsgCreateValidator",{enumerable:!0,get:function(){return s.isAminoMsgCreateValidator}}),Object.defineProperty(t,"isAminoMsgDelegate",{enumerable:!0,get:function(){return s.isAminoMsgDelegate}}),Object.defineProperty(t,"isAminoMsgDeposit",{enumerable:!0,get:function(){return s.isAminoMsgDeposit}}),Object.defineProperty(t,"isAminoMsgEditValidator",{enumerable:!0,get:function(){return s.isAminoMsgEditValidator}}),Object.defineProperty(t,"isAminoMsgFundCommunityPool",{enumerable:!0,get:function(){return s.isAminoMsgFundCommunityPool}}),Object.defineProperty(t,"isAminoMsgMultiSend",{enumerable:!0,get:function(){return s.isAminoMsgMultiSend}}),Object.defineProperty(t,"isAminoMsgSend",{enumerable:!0,get:function(){return s.isAminoMsgSend}}),Object.defineProperty(t,"isAminoMsgSetWithdrawAddress",{enumerable:!0,get:function(){return s.isAminoMsgSetWithdrawAddress}}),Object.defineProperty(t,"isAminoMsgSubmitEvidence",{enumerable:!0,get:function(){return s.isAminoMsgSubmitEvidence}}),Object.defineProperty(t,"isAminoMsgSubmitProposal",{enumerable:!0,get:function(){return s.isAminoMsgSubmitProposal}}),Object.defineProperty(t,"isAminoMsgUndelegate",{enumerable:!0,get:function(){return s.isAminoMsgUndelegate}}),Object.defineProperty(t,"isAminoMsgUnjail",{enumerable:!0,get:function(){return s.isAminoMsgUnjail}}),Object.defineProperty(t,"isAminoMsgVerifyInvariant",{enumerable:!0,get:function(){return s.isAminoMsgVerifyInvariant}}),Object.defineProperty(t,"isAminoMsgVote",{enumerable:!0,get:function(){return s.isAminoMsgVote}}),Object.defineProperty(t,"isAminoMsgWithdrawDelegatorReward",{enumerable:!0,get:function(){return s.isAminoMsgWithdrawDelegatorReward}}),Object.defineProperty(t,"isAminoMsgWithdrawValidatorCommission",{enumerable:!0,get:function(){return s.isAminoMsgWithdrawValidatorCommission}});var c=n(6111);Object.defineProperty(t,"AminoTypes",{enumerable:!0,get:function(){return c.AminoTypes}});var d=n(3357);Object.defineProperty(t,"isMsgDelegateEncodeObject",{enumerable:!0,get:function(){return d.isMsgDelegateEncodeObject}}),Object.defineProperty(t,"isMsgDepositEncodeObject",{enumerable:!0,get:function(){return d.isMsgDepositEncodeObject}}),Object.defineProperty(t,"isMsgSendEncodeObject",{enumerable:!0,get:function(){return d.isMsgSendEncodeObject}}),Object.defineProperty(t,"isMsgSubmitProposalEncodeObject",{enumerable:!0,get:function(){return d.isMsgSubmitProposalEncodeObject}}),Object.defineProperty(t,"isMsgTransferEncodeObject",{enumerable:!0,get:function(){return d.isMsgTransferEncodeObject}}),Object.defineProperty(t,"isMsgUndelegateEncodeObject",{enumerable:!0,get:function(){return d.isMsgUndelegateEncodeObject}}),Object.defineProperty(t,"isMsgVoteEncodeObject",{enumerable:!0,get:function(){return d.isMsgVoteEncodeObject}}),Object.defineProperty(t,"isMsgWithdrawDelegatorRewardEncodeObject",{enumerable:!0,get:function(){return d.isMsgWithdrawDelegatorRewardEncodeObject}});var u=n(1371);Object.defineProperty(t,"calculateFee",{enumerable:!0,get:function(){return u.calculateFee}}),Object.defineProperty(t,"GasPrice",{enumerable:!0,get:function(){return u.GasPrice}}),t.logs=i(n(2082));var l=n(9625);Object.defineProperty(t,"makeMultisignedTx",{enumerable:!0,get:function(){return l.makeMultisignedTx}});var A=n(1627);Object.defineProperty(t,"createPagination",{enumerable:!0,get:function(){return A.createPagination}}),Object.defineProperty(t,"createProtobufRpcClient",{enumerable:!0,get:function(){return A.createProtobufRpcClient}}),Object.defineProperty(t,"decodeCosmosSdkDecFromProto",{enumerable:!0,get:function(){return A.decodeCosmosSdkDecFromProto}}),Object.defineProperty(t,"QueryClient",{enumerable:!0,get:function(){return A.QueryClient}}),Object.defineProperty(t,"setupAuthExtension",{enumerable:!0,get:function(){return A.setupAuthExtension}}),Object.defineProperty(t,"setupBankExtension",{enumerable:!0,get:function(){return A.setupBankExtension}}),Object.defineProperty(t,"setupDistributionExtension",{enumerable:!0,get:function(){return A.setupDistributionExtension}}),Object.defineProperty(t,"setupGovExtension",{enumerable:!0,get:function(){return A.setupGovExtension}}),Object.defineProperty(t,"setupIbcExtension",{enumerable:!0,get:function(){return A.setupIbcExtension}}),Object.defineProperty(t,"setupMintExtension",{enumerable:!0,get:function(){return A.setupMintExtension}}),Object.defineProperty(t,"setupStakingExtension",{enumerable:!0,get:function(){return A.setupStakingExtension}}),Object.defineProperty(t,"setupTxExtension",{enumerable:!0,get:function(){return A.setupTxExtension}});var f=n(494);Object.defineProperty(t,"isSearchByHeightQuery",{enumerable:!0,get:function(){return f.isSearchByHeightQuery}}),Object.defineProperty(t,"isSearchBySentFromOrToQuery",{enumerable:!0,get:function(){return f.isSearchBySentFromOrToQuery}}),Object.defineProperty(t,"isSearchByTagsQuery",{enumerable:!0,get:function(){return f.isSearchByTagsQuery}});var h=n(9438);Object.defineProperty(t,"defaultRegistryTypes",{enumerable:!0,get:function(){return h.defaultRegistryTypes}}),Object.defineProperty(t,"SigningStargateClient",{enumerable:!0,get:function(){return h.SigningStargateClient}});var g=n(6499);Object.defineProperty(t,"assertIsDeliverTxFailure",{enumerable:!0,get:function(){return g.assertIsDeliverTxFailure}}),Object.defineProperty(t,"assertIsDeliverTxSuccess",{enumerable:!0,get:function(){return g.assertIsDeliverTxSuccess}}),Object.defineProperty(t,"isDeliverTxFailure",{enumerable:!0,get:function(){return g.isDeliverTxFailure}}),Object.defineProperty(t,"isDeliverTxSuccess",{enumerable:!0,get:function(){return g.isDeliverTxSuccess}}),Object.defineProperty(t,"StargateClient",{enumerable:!0,get:function(){return g.StargateClient}}),Object.defineProperty(t,"TimeoutError",{enumerable:!0,get:function(){return g.TimeoutError}});var p=n(4087);Object.defineProperty(t,"coin",{enumerable:!0,get:function(){return p.coin}}),Object.defineProperty(t,"coins",{enumerable:!0,get:function(){return p.coins}}),Object.defineProperty(t,"makeCosmoshubPath",{enumerable:!0,get:function(){return p.makeCosmoshubPath}}),Object.defineProperty(t,"parseCoins",{enumerable:!0,get:function(){return p.parseCoins}})},2082:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.findAttribute=t.parseRawLog=t.parseLogs=t.parseLog=t.parseEvent=t.parseAttribute=void 0;const r=n(5553);function o(e){if(!(0,r.isNonNullObject)(e))throw new Error("Attribute must be a non-null object");const{key:t,value:n}=e;if("string"!=typeof t||!t)throw new Error("Attribute's key must be a non-empty string");if("string"!=typeof n&&void 0!==n)throw new Error("Attribute's value must be a string or unset");return{key:t,value:n||""}}function i(e){if(!(0,r.isNonNullObject)(e))throw new Error("Event must be a non-null object");const{type:t,attributes:n}=e;if("string"!=typeof t||""===t)throw new Error("Event type must be a non-empty string");if(!Array.isArray(n))throw new Error("Event's attributes must be an array");return{type:t,attributes:n.map(o)}}function a(e){if(!(0,r.isNonNullObject)(e))throw new Error("Log must be a non-null object");const{msg_index:t,log:n,events:o}=e;if("number"!=typeof t)throw new Error("Log's msg_index must be a number");if("string"!=typeof n)throw new Error("Log's log must be a string");if(!Array.isArray(o))throw new Error("Log's events must be an array");return{msg_index:t,log:n,events:o.map(i)}}function s(e){if(!Array.isArray(e))throw new Error("Logs must be an array");return e.map(a)}t.parseAttribute=o,t.parseEvent=i,t.parseLog=a,t.parseLogs=s,t.parseRawLog=function(e="[]"){return s(JSON.parse(e).map((({events:e},t)=>({msg_index:t,events:e,log:""}))))},t.findAttribute=function(e,t,n){var r;const o=e.find((()=>!0)),i=null===(r=null==o?void 0:o.events.find((e=>e.type===t)))||void 0===r?void 0:r.attributes.find((e=>e.key===n));if(!i)throw new Error(`Could not find attribute '${n}' in first event of type '${t}' in first log.`);return i}},9625:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.makeMultisignedTx=t.makeCompactBitArray=void 0;const o=n(3359),i=n(8972),a=n(4087),s=n(7381),c=n(2574),d=n(9639),u=n(9639),l=r(n(3720));function A(e){const t=Math.ceil(e.length/8),n=e.length-8*Math.floor(e.length/8),r=new Uint8Array(t);return e.forEach(((e,t)=>{const n=Math.floor(t/8),o=t%8;e&&(r[n]|=1<<7-o)})),s.CompactBitArray.fromPartial({elems:r,extraBitsStored:n})}t.makeCompactBitArray=A,t.makeMultisignedTx=function(e,t,n,r,f){const h=Array.from(f.keys()),g=(0,i.fromBech32)(h[0]).prefix,p=Array(e.value.pubkeys.length).fill(!1),m=new Array;for(let t=0;t({single:{mode:c.SignMode.SIGN_MODE_LEGACY_AMINO_JSON}})))}},sequence:l.default.fromNumber(t)},y=d.AuthInfo.fromPartial({signerInfos:[v],fee:{amount:[...n.amount],gasLimit:l.default.fromString(n.gas)}}),b=d.AuthInfo.encode(y).finish();return u.TxRaw.fromPartial({bodyBytes:r,authInfoBytes:b,signatures:[s.MultiSignature.encode(s.MultiSignature.fromPartial({signatures:m})).finish()]})}},4812:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setupAuthExtension=void 0;const r=n(4443),o=n(437);t.setupAuthExtension=function(e){const t=(0,o.createProtobufRpcClient)(e),n=new r.QueryClientImpl(t);return{auth:{account:async e=>{const{account:t}=await n.Account({address:e});return null!=t?t:null}}}}},5536:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setupBankExtension=void 0;const r=n(5553),o=n(2916),i=n(437);t.setupBankExtension=function(e){const t=(0,i.createProtobufRpcClient)(e),n=new o.QueryClientImpl(t);return{bank:{balance:async(e,t)=>{const{balance:o}=await n.Balance({address:e,denom:t});return(0,r.assert)(o),o},allBalances:async e=>{const{balances:t}=await n.AllBalances({address:e});return t},totalSupply:async()=>{const{supply:e}=await n.TotalSupply({});return e},supplyOf:async e=>{const{amount:t}=await n.SupplyOf({denom:e});return(0,r.assert)(t),t},denomMetadata:async e=>{const{metadata:t}=await n.DenomMetadata({denom:e});return(0,r.assert)(t),t},denomsMetadata:async()=>{const{metadatas:e}=await n.DenomsMetadata({pagination:void 0});return e}}}}},7382:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.setupDistributionExtension=void 0;const o=n(6208),i=r(n(3720)),a=n(437);t.setupDistributionExtension=function(e){const t=(0,a.createProtobufRpcClient)(e),n=new o.QueryClientImpl(t);return{distribution:{communityPool:async()=>await n.CommunityPool({}),delegationRewards:async(e,t)=>await n.DelegationRewards({delegatorAddress:e,validatorAddress:t}),delegationTotalRewards:async e=>await n.DelegationTotalRewards({delegatorAddress:e}),delegatorValidators:async e=>await n.DelegatorValidators({delegatorAddress:e}),delegatorWithdrawAddress:async e=>await n.DelegatorWithdrawAddress({delegatorAddress:e}),params:async()=>await n.Params({}),validatorCommission:async e=>await n.ValidatorCommission({validatorAddress:e}),validatorOutstandingRewards:async e=>await n.ValidatorOutstandingRewards({validatorAddress:e}),validatorSlashes:async(e,t,r,o)=>await n.ValidatorSlashes({validatorAddress:e,startingHeight:i.default.fromNumber(t,!0),endingHeight:i.default.fromNumber(r,!0),pagination:(0,a.createPagination)(o)})}}}},466:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setupGovExtension=void 0;const r=n(9207),o=n(437);t.setupGovExtension=function(e){const t=(0,o.createProtobufRpcClient)(e),n=new r.QueryClientImpl(t);return{gov:{params:async e=>await n.Params({paramsType:e}),proposals:async(e,t,r,i)=>await n.Proposals({proposalStatus:e,depositor:t,voter:r,pagination:(0,o.createPagination)(i)}),proposal:async e=>await n.Proposal({proposalId:(0,o.longify)(e)}),deposits:async(e,t)=>await n.Deposits({proposalId:(0,o.longify)(e),pagination:(0,o.createPagination)(t)}),deposit:async(e,t)=>await n.Deposit({proposalId:(0,o.longify)(e),depositor:t}),tally:async e=>await n.TallyResult({proposalId:(0,o.longify)(e)}),votes:async(e,t)=>await n.Votes({proposalId:(0,o.longify)(e),pagination:(0,o.createPagination)(t)}),vote:async(e,t)=>await n.Vote({proposalId:(0,o.longify)(e),voter:t})}}}},5815:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.setupIbcExtension=void 0;const o=n(8972),i=n(6961),a=n(5892),s=n(1787),c=n(6688),d=n(6448),u=n(2329),l=n(1234),A=r(n(3720)),f=n(437);function h(e){if("/ibc.lightclients.tendermint.v1.ClientState"!==(null==e?void 0:e.typeUrl))throw new Error(`Unexpected client state type: ${null==e?void 0:e.typeUrl}`);return l.ClientState.decode(e.value)}t.setupIbcExtension=function(e){const t=(0,f.createProtobufRpcClient)(e),n=new c.QueryClientImpl(t),r=new d.QueryClientImpl(t),g=new u.QueryClientImpl(t),p=new a.QueryClientImpl(t);return{ibc:{channel:{channel:async(e,t)=>n.Channel({portId:e,channelId:t}),channels:async e=>n.Channels({pagination:(0,f.createPagination)(e)}),allChannels:async()=>{var e;const t=[];let r,o;do{r=await n.Channels({pagination:(0,f.createPagination)(o)}),t.push(...r.channels),o=null===(e=r.pagination)||void 0===e?void 0:e.nextKey}while(o&&o.length);return{channels:t,height:r.height}},connectionChannels:async(e,t)=>n.ConnectionChannels({connection:e,pagination:(0,f.createPagination)(t)}),allConnectionChannels:async e=>{var t;const r=[];let o,i;do{o=await n.ConnectionChannels({connection:e,pagination:(0,f.createPagination)(i)}),r.push(...o.channels),i=null===(t=o.pagination)||void 0===t?void 0:t.nextKey}while(i&&i.length);return{channels:r,height:o.height}},clientState:async(e,t)=>n.ChannelClientState({portId:e,channelId:t}),consensusState:async(e,t,r,o)=>n.ChannelConsensusState({portId:e,channelId:t,revisionNumber:A.default.fromNumber(r,!0),revisionHeight:A.default.fromNumber(o,!0)}),packetCommitment:async(e,t,r)=>n.PacketCommitment({portId:e,channelId:t,sequence:r}),packetCommitments:async(e,t,r)=>n.PacketCommitments({channelId:t,portId:e,pagination:(0,f.createPagination)(r)}),allPacketCommitments:async(e,t)=>{var r;const o=[];let i,a;do{i=await n.PacketCommitments({channelId:t,portId:e,pagination:(0,f.createPagination)(a)}),o.push(...i.commitments),a=null===(r=i.pagination)||void 0===r?void 0:r.nextKey}while(a&&a.length);return{commitments:o,height:i.height}},packetReceipt:async(e,t,r)=>n.PacketReceipt({portId:e,channelId:t,sequence:A.default.fromNumber(r,!0)}),packetAcknowledgement:async(e,t,r)=>n.PacketAcknowledgement({portId:e,channelId:t,sequence:A.default.fromNumber(r,!0)}),packetAcknowledgements:async(e,t,r)=>n.PacketAcknowledgements({portId:e,channelId:t,pagination:(0,f.createPagination)(r)}),allPacketAcknowledgements:async(e,t)=>{var r;const o=[];let i,a;do{i=await n.PacketAcknowledgements({channelId:t,portId:e,pagination:(0,f.createPagination)(a)}),o.push(...i.acknowledgements),a=null===(r=i.pagination)||void 0===r?void 0:r.nextKey}while(a&&a.length);return{acknowledgements:o,height:i.height}},unreceivedPackets:async(e,t,r)=>n.UnreceivedPackets({portId:e,channelId:t,packetCommitmentSequences:r.map((e=>A.default.fromNumber(e,!0)))}),unreceivedAcks:async(e,t,r)=>n.UnreceivedAcks({portId:e,channelId:t,packetAckSequences:r.map((e=>A.default.fromNumber(e,!0)))}),nextSequenceReceive:async(e,t)=>n.NextSequenceReceive({portId:e,channelId:t})},client:{state:async e=>r.ClientState({clientId:e}),states:async e=>r.ClientStates({pagination:(0,f.createPagination)(e)}),allStates:async()=>{var e;const t=[];let n,o;do{n=await r.ClientStates({pagination:(0,f.createPagination)(o)}),t.push(...n.clientStates),o=null===(e=n.pagination)||void 0===e?void 0:e.nextKey}while(o&&o.length);return{clientStates:t}},consensusState:async(e,t)=>r.ConsensusState(d.QueryConsensusStateRequest.fromPartial({clientId:e,revisionHeight:void 0!==t?A.default.fromNumber(t,!0):void 0,latestHeight:void 0===t})),consensusStates:async(e,t)=>r.ConsensusStates({clientId:e,pagination:(0,f.createPagination)(t)}),allConsensusStates:async e=>{var t;const n=[];let o,i;do{o=await r.ConsensusStates({clientId:e,pagination:(0,f.createPagination)(i)}),n.push(...o.consensusStates),i=null===(t=o.pagination)||void 0===t?void 0:t.nextKey}while(i&&i.length);return{consensusStates:n}},params:async()=>r.ClientParams({}),stateTm:async e=>h((await r.ClientState({clientId:e})).clientState),statesTm:async e=>{const{clientStates:t}=await r.ClientStates({pagination:(0,f.createPagination)(e)});return t.map((({clientState:e})=>h(e)))},allStatesTm:async()=>{var e;const t=[];let n,o;do{n=await r.ClientStates({pagination:(0,f.createPagination)(o)}),t.push(...n.clientStates),o=null===(e=n.pagination)||void 0===e?void 0:e.nextKey}while(o&&o.length);return t.map((({clientState:e})=>h(e)))},consensusStateTm:async(e,t)=>function(e){if("/ibc.lightclients.tendermint.v1.ConsensusState"!==(null==e?void 0:e.typeUrl))throw new Error(`Unexpected client state type: ${null==e?void 0:e.typeUrl}`);return l.ConsensusState.decode(e.value)}((await r.ConsensusState(d.QueryConsensusStateRequest.fromPartial({clientId:e,revisionHeight:null==t?void 0:t.revisionHeight,revisionNumber:null==t?void 0:t.revisionNumber,latestHeight:void 0===t}))).consensusState)},connection:{connection:async e=>g.Connection({connectionId:e}),connections:async e=>g.Connections({pagination:(0,f.createPagination)(e)}),allConnections:async()=>{var e;const t=[];let n,r;do{n=await g.Connections({pagination:(0,f.createPagination)(r)}),t.push(...n.connections),r=null===(e=n.pagination)||void 0===e?void 0:e.nextKey}while(r&&r.length);return{connections:t,height:n.height}},clientConnections:async e=>g.ClientConnections({clientId:e}),clientState:async e=>g.ConnectionClientState({connectionId:e}),consensusState:async(e,t)=>g.ConnectionConsensusState(u.QueryConnectionConsensusStateRequest.fromPartial({connectionId:e,revisionHeight:A.default.fromNumber(t,!0)}))},transfer:{denomTrace:async e=>p.DenomTrace({hash:e}),denomTraces:async e=>p.DenomTraces({pagination:(0,f.createPagination)(e)}),allDenomTraces:async()=>{var e;const t=[];let n,r;do{n=await p.DenomTraces({pagination:(0,f.createPagination)(r)}),t.push(...n.denomTraces),r=null===(e=n.pagination)||void 0===e?void 0:e.nextKey}while(r&&r.length);return{denomTraces:t}},params:async()=>p.Params({})},verified:{channel:{channel:async(t,n)=>{const r=(0,o.toAscii)(`channelEnds/ports/${t}/channels/${n}`),i=await e.queryVerified("ibc",r);return i.length?s.Channel.decode(i):null},packetCommitment:async(t,n,r)=>{const i=(0,o.toAscii)(`commitments/ports/${t}/channels/${n}/packets/${r}`);return await e.queryVerified("ibc",i)},packetAcknowledgement:async(t,n,r)=>{const i=(0,o.toAscii)(`acks/ports/${t}/channels/${n}/acknowledgements/${r}`);return await e.queryVerified("ibc",i)},nextSequenceReceive:async(t,n)=>{const r=(0,o.toAscii)(`seqAcks/ports/${t}/channels/${n}/nextSequenceAck`),a=await e.queryVerified("ibc",r);return a.length?i.Uint64.fromBytes(a).toNumber():null}}}}}}},1627:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decodeCosmosSdkDecFromProto=t.createProtobufRpcClient=t.createPagination=t.setupTxExtension=t.setupStakingExtension=t.setupSlashingExtension=t.setupMintExtension=t.setupIbcExtension=t.setupGovExtension=t.setupDistributionExtension=t.setupBankExtension=t.setupAuthExtension=t.QueryClient=void 0;var r=n(6314);Object.defineProperty(t,"QueryClient",{enumerable:!0,get:function(){return r.QueryClient}});var o=n(4812);Object.defineProperty(t,"setupAuthExtension",{enumerable:!0,get:function(){return o.setupAuthExtension}});var i=n(5536);Object.defineProperty(t,"setupBankExtension",{enumerable:!0,get:function(){return i.setupBankExtension}});var a=n(7382);Object.defineProperty(t,"setupDistributionExtension",{enumerable:!0,get:function(){return a.setupDistributionExtension}});var s=n(466);Object.defineProperty(t,"setupGovExtension",{enumerable:!0,get:function(){return s.setupGovExtension}});var c=n(5815);Object.defineProperty(t,"setupIbcExtension",{enumerable:!0,get:function(){return c.setupIbcExtension}});var d=n(9112);Object.defineProperty(t,"setupMintExtension",{enumerable:!0,get:function(){return d.setupMintExtension}});var u=n(1885);Object.defineProperty(t,"setupSlashingExtension",{enumerable:!0,get:function(){return u.setupSlashingExtension}});var l=n(7175);Object.defineProperty(t,"setupStakingExtension",{enumerable:!0,get:function(){return l.setupStakingExtension}});var A=n(3462);Object.defineProperty(t,"setupTxExtension",{enumerable:!0,get:function(){return A.setupTxExtension}});var f=n(437);Object.defineProperty(t,"createPagination",{enumerable:!0,get:function(){return f.createPagination}}),Object.defineProperty(t,"createProtobufRpcClient",{enumerable:!0,get:function(){return f.createProtobufRpcClient}}),Object.defineProperty(t,"decodeCosmosSdkDecFromProto",{enumerable:!0,get:function(){return f.decodeCosmosSdkDecFromProto}})},9112:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setupMintExtension=void 0;const r=n(5553),o=n(2879),i=n(4658),a=n(437);t.setupMintExtension=function(e){const t=(0,i.createProtobufRpcClient)(e),n=new o.QueryClientImpl(t);return{mint:{params:async()=>{const{params:e}=await n.Params({});return(0,r.assert)(e),{blocksPerYear:e.blocksPerYear,goalBonded:(0,a.decodeCosmosSdkDecFromProto)(e.goalBonded),inflationMin:(0,a.decodeCosmosSdkDecFromProto)(e.inflationMin),inflationMax:(0,a.decodeCosmosSdkDecFromProto)(e.inflationMax),inflationRateChange:(0,a.decodeCosmosSdkDecFromProto)(e.inflationRateChange),mintDenom:e.mintDenom}},inflation:async()=>{const{inflation:e}=await n.Inflation({});return(0,a.decodeCosmosSdkDecFromProto)(e)},annualProvisions:async()=>{const{annualProvisions:e}=await n.AnnualProvisions({});return(0,a.decodeCosmosSdkDecFromProto)(e)}}}}},6314:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QueryClient=void 0;const r=n(5201),o=n(8972),i=n(1459),a=n(5553);function s(e,t,n){if(e.type!==t)throw new Error(`Op expected to be ${t}, got "${e.type}`);if(!(0,a.arrayContentEquals)(n,e.key))throw new Error(`Proven key different than queried key.\nQuery: ${(0,o.toHex)(n)}\nProven: ${(0,o.toHex)(e.key)}`);return r.ics23.CommitmentProof.decode(e.data)}class c{constructor(e){this.tmClient=e}static withExtensions(e,...t){const n=new c(e),r=t.map((e=>e(n)));for(const e of r){(0,a.assert)((0,a.isNonNullObject)(e),"Extension must be a non-null object");for(const[t,r]of Object.entries(e)){(0,a.assert)((0,a.isNonNullObject)(r),`Module must be a non-null object. Found type ${typeof r} for module "${t}".`);const e=n[t]||{};n[t]={...e,...r}}}return n}async queryVerified(e,t,n){const{height:i,proof:c,value:d}=await this.queryRawProof(e,t,n),u=s(c.ops[0],"ics23:iavl",t),l=s(c.ops[1],"ics23:simple",(0,o.toAscii)(e));(0,a.assert)(l.exist),(0,a.assert)(l.exist.value),d&&0!==d.length?((0,a.assert)(u.exist),(0,a.assert)(u.exist.value),(0,r.verifyExistence)(u.exist,r.iavlSpec,l.exist.value,t,d)):((0,a.assert)(u.nonexist),(0,r.verifyNonExistence)(u.nonexist,r.iavlSpec,l.exist.value,t));const A=await this.getNextHeader(i);return(0,r.verifyExistence)(l.exist,r.tendermintSpec,A.appHash,(0,o.toAscii)(e),l.exist.value),d}async queryRawProof(e,t,n){var r;const{key:i,value:c,height:d,proof:u,code:l,log:A}=await this.tmClient.abciQuery({path:`/store/${e}/key`,data:t,prove:!0,height:n});if(l)throw new Error(`Query failed with (${l}): ${A}`);if(!(0,a.arrayContentEquals)(t,i))throw new Error(`Response key ${(0,o.toHex)(i)} doesn't match query key ${(0,o.toHex)(t)}`);if(!d)throw new Error("No query height returned");if(!u||2!==u.ops.length)throw new Error(`Expected 2 proof ops, got ${null!==(r=null==u?void 0:u.ops.length)&&void 0!==r?r:0}. Are you using stargate?`);return s(u.ops[0],"ics23:iavl",i),s(u.ops[1],"ics23:simple",(0,o.toAscii)(e)),{key:i,value:c,height:d,proof:{ops:[...u.ops]}}}async queryUnverified(e,t){const n=await this.tmClient.abciQuery({path:e,data:t,prove:!1});if(n.code)throw new Error(`Query failed with (${n.code}): ${n.log}`);return n.value}async getNextHeader(e){if((0,a.assertDefined)(e),0===e)throw new Error("Query returned height 0, cannot prove it");const t=e+1;let n,r;try{r=this.tmClient.subscribeNewBlockHeader()}catch(e){}if(r){const e=await(0,i.firstEvent)(r);e.height===t&&(n=e)}for(;!n;){const r=(await this.tmClient.blockchain(e,t)).blockMetas.map((e=>e.header)).find((e=>e.height===t));r?n=r:await(0,a.sleep)(1e3)}return(0,a.assert)(n.height===t,"Got wrong header. This is a bug in the logic above."),n}}t.QueryClient=c},1885:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setupSlashingExtension=void 0;const r=n(6701),o=n(437);t.setupSlashingExtension=function(e){const t=(0,o.createProtobufRpcClient)(e),n=new r.QueryClientImpl(t);return{slashing:{signingInfo:async e=>await n.SigningInfo({consAddress:e}),signingInfos:async e=>await n.SigningInfos({pagination:(0,o.createPagination)(e)}),params:async()=>await n.Params({})}}}},7175:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.setupStakingExtension=void 0;const o=n(4438),i=r(n(3720)),a=n(437);t.setupStakingExtension=function(e){const t=(0,a.createProtobufRpcClient)(e),n=new o.QueryClientImpl(t);return{staking:{delegation:async(e,t)=>await n.Delegation({delegatorAddr:e,validatorAddr:t}),delegatorDelegations:async(e,t)=>await n.DelegatorDelegations({delegatorAddr:e,pagination:(0,a.createPagination)(t)}),delegatorUnbondingDelegations:async(e,t)=>await n.DelegatorUnbondingDelegations({delegatorAddr:e,pagination:(0,a.createPagination)(t)}),delegatorValidator:async(e,t)=>await n.DelegatorValidator({delegatorAddr:e,validatorAddr:t}),delegatorValidators:async(e,t)=>await n.DelegatorValidators({delegatorAddr:e,pagination:(0,a.createPagination)(t)}),historicalInfo:async e=>await n.HistoricalInfo({height:i.default.fromNumber(e,!0)}),params:async()=>await n.Params({}),pool:async()=>await n.Pool({}),redelegations:async(e,t,r,o)=>await n.Redelegations({delegatorAddr:e,srcValidatorAddr:t,dstValidatorAddr:r,pagination:(0,a.createPagination)(o)}),unbondingDelegation:async(e,t)=>await n.UnbondingDelegation({delegatorAddr:e,validatorAddr:t}),validator:async e=>await n.Validator({validatorAddr:e}),validatorDelegations:async(e,t)=>await n.ValidatorDelegations({validatorAddr:e,pagination:(0,a.createPagination)(t)}),validators:async(e,t)=>await n.Validators({status:e,pagination:(0,a.createPagination)(t)}),validatorUnbondingDelegations:async(e,t)=>await n.ValidatorUnbondingDelegations({validatorAddr:e,pagination:(0,a.createPagination)(t)})}}}},3462:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.setupTxExtension=void 0;const o=n(4087),i=n(2574),a=n(4616),s=n(9639),c=r(n(3720)),d=n(437);t.setupTxExtension=function(e){const t=(0,d.createProtobufRpcClient)(e),n=new a.ServiceClientImpl(t);return{tx:{getTx:async e=>{const t={hash:e};return await n.GetTx(t)},simulate:async(e,t,r,d)=>{const u=a.SimulateRequest.fromPartial({tx:s.Tx.fromPartial({authInfo:s.AuthInfo.fromPartial({fee:s.Fee.fromPartial({}),signerInfos:[{publicKey:(0,o.encodePubkey)(r),sequence:c.default.fromNumber(d,!0),modeInfo:{single:{mode:i.SignMode.SIGN_MODE_UNSPECIFIED}}}]}),body:s.TxBody.fromPartial({messages:Array.from(e),memo:t}),signatures:[new Uint8Array]}),txBytes:void 0});return await n.Simulate(u)}}}}},437:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.decodeCosmosSdkDecFromProto=t.longify=t.createProtobufRpcClient=t.createPagination=t.toAccAddress=void 0;const o=n(8972),i=n(6961),a=n(9551),s=r(n(3720));t.toAccAddress=function(e){return(0,o.fromBech32)(e).data},t.createPagination=function(e){return e?a.PageRequest.fromPartial({key:e,offset:s.default.fromNumber(0,!0),limit:s.default.fromNumber(0,!0),countTotal:!1}):void 0},t.createProtobufRpcClient=function(e){return{request:(t,n,r)=>{const o=`/${t}/${n}`;return e.queryUnverified(o,r)}}},t.longify=function(e){const t=i.Uint64.fromString(e.toString());return s.default.fromBytesBE([...t.toBytesBigEndian()],!0)},t.decodeCosmosSdkDecFromProto=function(e){const t="string"==typeof e?e:(0,o.fromAscii)(e);return i.Decimal.fromAtomics(t,18)}},494:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isSearchByTagsQuery=t.isSearchBySentFromOrToQuery=t.isSearchByHeightQuery=void 0,t.isSearchByHeightQuery=function(e){return void 0!==e.height},t.isSearchBySentFromOrToQuery=function(e){return void 0!==e.sentFromOrTo},t.isSearchByTagsQuery=function(e){return void 0!==e.tags}},9438:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.SigningStargateClient=t.defaultRegistryTypes=void 0;const o=n(3359),i=n(8972),a=n(6961),s=n(4087),c=n(3034),d=n(5553),u=n(895),l=n(8994),A=n(891),f=n(3773),h=n(5192),g=n(750),p=n(422),m=n(2574),v=n(9639),y=n(9385),b=n(7375),I=n(9548),C=n(4848),E=r(n(3720)),w=n(6111),B=n(1371),_=n(6499);function S(){return new s.Registry(t.defaultRegistryTypes)}t.defaultRegistryTypes=[["/cosmos.authz.v1beta1.MsgExec",u.MsgExec],["/cosmos.authz.v1beta1.MsgGrant",u.MsgGrant],["/cosmos.authz.v1beta1.MsgRevoke",u.MsgRevoke],["/cosmos.bank.v1beta1.MsgMultiSend",l.MsgMultiSend],["/cosmos.bank.v1beta1.MsgSend",l.MsgSend],["/cosmos.base.v1beta1.Coin",A.Coin],["/cosmos.distribution.v1beta1.MsgFundCommunityPool",f.MsgFundCommunityPool],["/cosmos.distribution.v1beta1.MsgSetWithdrawAddress",f.MsgSetWithdrawAddress],["/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward",f.MsgWithdrawDelegatorReward],["/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission",f.MsgWithdrawValidatorCommission],["/cosmos.feegrant.v1beta1.MsgGrantAllowance",h.MsgGrantAllowance],["/cosmos.feegrant.v1beta1.MsgRevokeAllowance",h.MsgRevokeAllowance],["/cosmos.gov.v1beta1.MsgDeposit",g.MsgDeposit],["/cosmos.gov.v1beta1.MsgSubmitProposal",g.MsgSubmitProposal],["/cosmos.gov.v1beta1.MsgVote",g.MsgVote],["/cosmos.staking.v1beta1.MsgBeginRedelegate",p.MsgBeginRedelegate],["/cosmos.staking.v1beta1.MsgCreateValidator",p.MsgCreateValidator],["/cosmos.staking.v1beta1.MsgDelegate",p.MsgDelegate],["/cosmos.staking.v1beta1.MsgEditValidator",p.MsgEditValidator],["/cosmos.staking.v1beta1.MsgUndelegate",p.MsgUndelegate],["/ibc.applications.transfer.v1.MsgTransfer",y.MsgTransfer],["/ibc.core.channel.v1.MsgAcknowledgement",b.MsgAcknowledgement],["/ibc.core.channel.v1.MsgChannelCloseConfirm",b.MsgChannelCloseConfirm],["/ibc.core.channel.v1.MsgChannelCloseInit",b.MsgChannelCloseInit],["/ibc.core.channel.v1.MsgChannelOpenAck",b.MsgChannelOpenAck],["/ibc.core.channel.v1.MsgChannelOpenConfirm",b.MsgChannelOpenConfirm],["/ibc.core.channel.v1.MsgChannelOpenInit",b.MsgChannelOpenInit],["/ibc.core.channel.v1.MsgChannelOpenTry",b.MsgChannelOpenTry],["/ibc.core.channel.v1.MsgRecvPacket",b.MsgRecvPacket],["/ibc.core.channel.v1.MsgTimeout",b.MsgTimeout],["/ibc.core.channel.v1.MsgTimeoutOnClose",b.MsgTimeoutOnClose],["/ibc.core.client.v1.MsgCreateClient",I.MsgCreateClient],["/ibc.core.client.v1.MsgSubmitMisbehaviour",I.MsgSubmitMisbehaviour],["/ibc.core.client.v1.MsgUpdateClient",I.MsgUpdateClient],["/ibc.core.client.v1.MsgUpgradeClient",I.MsgUpgradeClient],["/ibc.core.connection.v1.MsgConnectionOpenAck",C.MsgConnectionOpenAck],["/ibc.core.connection.v1.MsgConnectionOpenConfirm",C.MsgConnectionOpenConfirm],["/ibc.core.connection.v1.MsgConnectionOpenInit",C.MsgConnectionOpenInit],["/ibc.core.connection.v1.MsgConnectionOpenTry",C.MsgConnectionOpenTry]];class k extends _.StargateClient{constructor(e,t,n){var r;super(e);const o=null!==(r=n.prefix)&&void 0!==r?r:"cosmos",{registry:i=S(),aminoTypes:a=new w.AminoTypes({prefix:o})}=n;this.registry=i,this.aminoTypes=a,this.signer=t,this.broadcastTimeoutMs=n.broadcastTimeoutMs,this.broadcastPollIntervalMs=n.broadcastPollIntervalMs,this.gasPrice=n.gasPrice}static async connectWithSigner(e,t,n={}){const r=await c.Tendermint34Client.connect(e);return new k(r,t,n)}static async offline(e,t={}){return new k(void 0,e,t)}async simulate(e,t,n){const r=t.map((e=>this.registry.encodeAsAny(e))),i=(await this.signer.getAccounts()).find((t=>t.address===e));if(!i)throw new Error("Failed to retrieve account from signer");const s=(0,o.encodeSecp256k1Pubkey)(i.pubkey),{sequence:c}=await this.getSequence(e),{gasInfo:u}=await this.forceGetQueryClient().tx.simulate(r,n,s,c);return(0,d.assertDefined)(u),a.Uint53.fromString(u.gasUsed.toString()).toNumber()}async sendTokens(e,t,n,r,o=""){const i={typeUrl:"/cosmos.bank.v1beta1.MsgSend",value:{fromAddress:e,toAddress:t,amount:[...n]}};return this.signAndBroadcast(e,[i],r,o)}async delegateTokens(e,t,n,r,o=""){const i={typeUrl:"/cosmos.staking.v1beta1.MsgDelegate",value:p.MsgDelegate.fromPartial({delegatorAddress:e,validatorAddress:t,amount:n})};return this.signAndBroadcast(e,[i],r,o)}async undelegateTokens(e,t,n,r,o=""){const i={typeUrl:"/cosmos.staking.v1beta1.MsgUndelegate",value:p.MsgUndelegate.fromPartial({delegatorAddress:e,validatorAddress:t,amount:n})};return this.signAndBroadcast(e,[i],r,o)}async withdrawRewards(e,t,n,r=""){const o={typeUrl:"/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward",value:f.MsgWithdrawDelegatorReward.fromPartial({delegatorAddress:e,validatorAddress:t})};return this.signAndBroadcast(e,[o],n,r)}async sendIbcTokens(e,t,n,r,o,i,a,s,c=""){const d=a?E.default.fromNumber(a).multiply(1e9):void 0,u={typeUrl:"/ibc.applications.transfer.v1.MsgTransfer",value:y.MsgTransfer.fromPartial({sourcePort:r,sourceChannel:o,sender:e,receiver:t,token:n,timeoutHeight:i,timeoutTimestamp:d})};return this.signAndBroadcast(e,[u],s,c)}async signAndBroadcast(e,t,n,r=""){let o;if("auto"==n||"number"==typeof n){(0,d.assertDefined)(this.gasPrice,"Gas price must be set in the client options when auto gas is used.");const i=await this.simulate(e,t,r),a="number"==typeof n?n:1.3;o=(0,B.calculateFee)(Math.round(i*a),this.gasPrice)}else o=n;const i=await this.sign(e,t,o,r),a=v.TxRaw.encode(i).finish();return this.broadcastTx(a,this.broadcastTimeoutMs,this.broadcastPollIntervalMs)}async sign(e,t,n,r,o){let i;if(o)i=o;else{const{accountNumber:t,sequence:n}=await this.getSequence(e);i={accountNumber:t,sequence:n,chainId:await this.getChainId()}}return(0,s.isOfflineDirectSigner)(this.signer)?this.signDirect(e,t,n,r,i):this.signAmino(e,t,n,r,i)}async signAmino(e,t,n,r,{accountNumber:c,sequence:u,chainId:l}){(0,d.assert)(!(0,s.isOfflineDirectSigner)(this.signer));const A=(await this.signer.getAccounts()).find((t=>t.address===e));if(!A)throw new Error("Failed to retrieve account from signer");const f=(0,s.encodePubkey)((0,o.encodeSecp256k1Pubkey)(A.pubkey)),h=m.SignMode.SIGN_MODE_LEGACY_AMINO_JSON,g=t.map((e=>this.aminoTypes.toAmino(e))),p=(0,o.makeSignDoc)(g,n,l,r,c,u),{signature:y,signed:b}=await this.signer.signAmino(e,p),I={typeUrl:"/cosmos.tx.v1beta1.TxBody",value:{messages:b.msgs.map((e=>this.aminoTypes.fromAmino(e))),memo:b.memo}},C=this.registry.encode(I),E=a.Int53.fromString(b.fee.gas).toNumber(),w=a.Int53.fromString(b.sequence).toNumber(),B=(0,s.makeAuthInfoBytes)([{pubkey:f,sequence:w}],b.fee.amount,E,h);return v.TxRaw.fromPartial({bodyBytes:C,authInfoBytes:B,signatures:[(0,i.fromBase64)(y.signature)]})}async signDirect(e,t,n,r,{accountNumber:c,sequence:u,chainId:l}){(0,d.assert)((0,s.isOfflineDirectSigner)(this.signer));const A=(await this.signer.getAccounts()).find((t=>t.address===e));if(!A)throw new Error("Failed to retrieve account from signer");const f=(0,s.encodePubkey)((0,o.encodeSecp256k1Pubkey)(A.pubkey)),h={typeUrl:"/cosmos.tx.v1beta1.TxBody",value:{messages:t,memo:r}},g=this.registry.encode(h),p=a.Int53.fromString(n.gas).toNumber(),m=(0,s.makeAuthInfoBytes)([{pubkey:f,sequence:u}],n.amount,p),y=(0,s.makeSignDoc)(g,m,l,c),{signature:b,signed:I}=await this.signer.signDirect(e,y);return v.TxRaw.fromPartial({bodyBytes:I.bodyBytes,authInfoBytes:I.authInfoBytes,signatures:[(0,i.fromBase64)(b.signature)]})}}t.SigningStargateClient=k},6499:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StargateClient=t.assertIsDeliverTxFailure=t.assertIsDeliverTxSuccess=t.isDeliverTxSuccess=t.isDeliverTxFailure=t.TimeoutError=void 0;const r=n(8972),o=n(6961),i=n(3034),a=n(5553),s=n(2538),c=n(1627),d=n(494);class u extends Error{constructor(e,t){super(e),this.txId=t}}function l(e){return!!e.code}function A(e){return!l(e)}t.TimeoutError=u,t.isDeliverTxFailure=l,t.isDeliverTxSuccess=A,t.assertIsDeliverTxSuccess=function(e){if(l(e))throw new Error(`Error when broadcasting tx ${e.transactionHash} at height ${e.height}. Code: ${e.code}; Raw log: ${e.rawLog}`)},t.assertIsDeliverTxFailure=function(e){if(A(e))throw new Error(`Transaction ${e.transactionHash} did not fail at height ${e.height}. Code: ${e.code}; Raw log: ${e.rawLog}`)};class f{constructor(e){e&&(this.tmClient=e,this.queryClient=c.QueryClient.withExtensions(e,c.setupAuthExtension,c.setupBankExtension,c.setupStakingExtension,c.setupTxExtension))}static async connect(e){const t=await i.Tendermint34Client.connect(e);return new f(t)}getTmClient(){return this.tmClient}forceGetTmClient(){if(!this.tmClient)throw new Error("Tendermint client not available. You cannot use online functionality in offline mode.");return this.tmClient}getQueryClient(){return this.queryClient}forceGetQueryClient(){if(!this.queryClient)throw new Error("Query client not available. You cannot use online functionality in offline mode.");return this.queryClient}async getChainId(){if(!this.chainId){const e=(await this.forceGetTmClient().status()).nodeInfo.network;if(!e)throw new Error("Chain ID must not be empty");this.chainId=e}return this.chainId}async getHeight(){return(await this.forceGetTmClient().status()).syncInfo.latestBlockHeight}async getAccount(e){try{const t=await this.forceGetQueryClient().auth.account(e);return t?(0,s.accountFromAny)(t):null}catch(e){if(/rpc error: code = NotFound/i.test(e.toString()))return null;throw e}}async getSequence(e){const t=await this.getAccount(e);if(!t)throw new Error("Account does not exist on chain. Send some tokens there before trying to query sequence.");return{accountNumber:t.accountNumber,sequence:t.sequence}}async getBlock(e){const t=await this.forceGetTmClient().block(e);return{id:(0,r.toHex)(t.blockId.hash).toUpperCase(),header:{version:{block:new o.Uint53(t.block.header.version.block).toString(),app:new o.Uint53(t.block.header.version.app).toString()},height:t.block.header.height,chainId:t.block.header.chainId,time:(0,i.toRfc3339WithNanoseconds)(t.block.header.time)},txs:t.block.txs}}async getBalance(e,t){return this.forceGetQueryClient().bank.balance(e,t)}async getAllBalances(e){return this.forceGetQueryClient().bank.allBalances(e)}async getDelegation(e,t){var n;let r;try{r=null===(n=(await this.forceGetQueryClient().staking.delegation(e,t)).delegationResponse)||void 0===n?void 0:n.balance}catch(e){if(!e.toString().includes("key not found"))throw e}return r||null}async getTx(e){var t;return null!==(t=(await this.txsQuery(`tx.hash='${e}'`))[0])&&void 0!==t?t:null}async searchTx(e,t={}){const n=t.minHeight||0,r=t.maxHeight||Number.MAX_SAFE_INTEGER;if(r=${n} AND tx.height<=${r}`}let i;if((0,d.isSearchByHeightQuery)(e))i=e.height>=n&&e.height<=r?await this.txsQuery(`tx.height=${e.height}`):[];else if((0,d.isSearchBySentFromOrToQuery)(e)){const t=o(`message.module='bank' AND transfer.sender='${e.sentFromOrTo}'`),n=o(`message.module='bank' AND transfer.recipient='${e.sentFromOrTo}'`),[r,a]=await Promise.all([t,n].map((e=>this.txsQuery(e)))),s=r.map((e=>e.hash));i=[...r,...a.filter((e=>!s.includes(e.hash)))]}else{if(!(0,d.isSearchByTagsQuery)(e))throw new Error("Unknown query type");{const t=o(e.tags.map((e=>`${e.key}='${e.value}'`)).join(" AND "));i=await this.txsQuery(t)}}return i.filter((e=>e.height>=n&&e.height<=r))}disconnect(){this.tmClient&&this.tmClient.disconnect()}async broadcastTx(e,t=6e4,n=3e3){let o=!1;const i=setTimeout((()=>{o=!0}),t),s=async e=>{if(o)throw new u(`Transaction with ID ${e} was submitted but was not yet found on the chain. You might want to check later.`,e);await(0,a.sleep)(n);const t=await this.getTx(e);return t?{code:t.code,height:t.height,rawLog:t.rawLog,transactionHash:e,gasUsed:t.gasUsed,gasWanted:t.gasWanted}:s(e)},c=await this.forceGetTmClient().broadcastTxSync({tx:e});if(c.code)throw new Error(`Broadcasting transaction failed with code ${c.code} (codespace: ${c.codeSpace}). Log: ${c.log}`);const d=(0,r.toHex)(c.hash).toUpperCase();return new Promise(((e,t)=>s(d).then((t=>{clearTimeout(i),e(t)}),(e=>{clearTimeout(i),t(e)}))))}async txsQuery(e){return(await this.forceGetTmClient().txSearchAll({query:e})).txs.map((e=>({height:e.height,hash:(0,r.toHex)(e.hash).toUpperCase(),code:e.result.code,rawLog:e.result.log||"",tx:e.tx,gasUsed:e.result.gasUsed,gasWanted:e.result.gasWanted})))}}t.StargateClient=f},2118:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.concat=void 0;const r=n(3813);t.concat=function(...e){const t=new Array,n=new Array,o=new Set;let i=0;function a(){for(;t.length>0;)t.shift().unsubscribe();n.length=0,o.clear(),i=0}const s={start:r=>{function s(e){for(;;){const t=n[e].shift();if(void 0===t)return;r.next(t)}}function c(){return i>=e.length}e.forEach((e=>n.push([]))),c()?r.complete():e.forEach(((e,d)=>{t.push(e.subscribe({next:e=>{d===i?r.next(e):n[d].push(e)},complete:()=>{for(o.add(d);o.has(i);)s(i),i++;c()?r.complete():s(i)},error:e=>{r.error(e),a()}}))}))},stop:()=>{a()}};return r.Stream.create(s)}},7606:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DefaultValueProducer=void 0,t.DefaultValueProducer=class{constructor(e,t){this.callbacks=t,this.internalValue=e}get value(){return this.internalValue}update(e){this.internalValue=e,this.listener&&this.listener.next(e)}error(e){this.listener&&this.listener.error(e)}start(e){this.listener=e,e.next(this.internalValue),this.callbacks&&this.callbacks.onStarted()}stop(){this.callbacks&&this.callbacks.onStop(),this.listener=void 0}}},2889:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.dropDuplicates=void 0,t.dropDuplicates=function(e){return t=>{const n=new Set;return t.filter((t=>!n.has(e(t)))).debug((t=>n.add(e(t))))}}},1459:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.ValueAndUpdates=t.toListPromise=t.fromListPromise=t.firstEvent=t.dropDuplicates=t.DefaultValueProducer=t.concat=void 0;var i=n(2118);Object.defineProperty(t,"concat",{enumerable:!0,get:function(){return i.concat}});var a=n(7606);Object.defineProperty(t,"DefaultValueProducer",{enumerable:!0,get:function(){return a.DefaultValueProducer}});var s=n(2889);Object.defineProperty(t,"dropDuplicates",{enumerable:!0,get:function(){return s.dropDuplicates}});var c=n(3511);Object.defineProperty(t,"firstEvent",{enumerable:!0,get:function(){return c.firstEvent}}),Object.defineProperty(t,"fromListPromise",{enumerable:!0,get:function(){return c.fromListPromise}}),Object.defineProperty(t,"toListPromise",{enumerable:!0,get:function(){return c.toListPromise}}),o(n(165),t);var d=n(3633);Object.defineProperty(t,"ValueAndUpdates",{enumerable:!0,get:function(){return d.ValueAndUpdates}})},3511:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.firstEvent=t.toListPromise=t.fromListPromise=void 0;const r=n(3813);async function o(e,t){return new Promise(((n,r)=>{if(0===t)return void n([]);const o=new Array;e.take(t).subscribe({next:e=>{o.push(e),o.length===t&&n(o)},complete:()=>{r(`Stream completed before all events could be collected. Collected ${o.length}, expected ${t}`)},error:e=>r(e)})}))}t.fromListPromise=function(e){const t={start:t=>{e.then((e=>{for(const n of e)t.next(n);t.complete()})).catch((e=>t.error(e)))},stop:()=>{}};return r.Stream.create(t)},t.toListPromise=o,t.firstEvent=async function(e){return(await o(e,1))[0]}},165:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.lastValue=t.asArray=t.countStream=t.Reducer=void 0;class n{constructor(e,t,n){this.stream=e,this.reducer=t,this.state=n,this.completed=new Promise(((e,t)=>{const n=this.stream.subscribe({next:e=>{this.state=this.reducer(this.state,e)},complete:()=>{e(),n.unsubscribe()},error:e=>{t(e),n.unsubscribe()}})}))}value(){return this.state}async finished(){return this.completed}}function r(e,t){return e+1}function o(e,t){return[...e,t]}function i(e,t){return t}t.Reducer=n,t.countStream=function(e){return new n(e,r,0)},t.asArray=function(e){return new n(e,o,[])},t.lastValue=function(e){return new n(e,i,void 0)}},3633:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ValueAndUpdates=void 0;const r=n(3813);t.ValueAndUpdates=class{constructor(e){this.producer=e,this.updates=r.MemoryStream.createWithMemory(this.producer)}get value(){return this.producer.value}async waitFor(e){const t="function"==typeof e?e:t=>t===e;return new Promise(((e,n)=>{const r=this.updates.subscribe({next:n=>{t(n)&&(e(n),setTimeout((()=>r.unsubscribe()),0))},complete:()=>{r.unsubscribe(),n("Update stream completed without expected value")},error:e=>{n(e)}})}))}}},2522:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.pubkeyToAddress=t.pubkeyToRawAddress=t.rawSecp256k1PubkeyToRawAddress=t.rawEd25519PubkeyToRawAddress=void 0;const r=n(9562),o=n(8972);function i(e){if(32!==e.length)throw new Error(`Invalid Ed25519 pubkey length: ${e.length}`);return(0,r.sha256)(e).slice(0,20)}function a(e){if(33!==e.length)throw new Error(`Invalid Secp256k1 pubkey length (compressed): ${e.length}`);return(0,r.ripemd160)((0,r.sha256)(e))}function s(e,t){switch(e){case"ed25519":return i(t);case"secp256k1":return a(t);default:throw new Error(`Pubkey type ${e} not supported`)}}t.rawEd25519PubkeyToRawAddress=i,t.rawSecp256k1PubkeyToRawAddress=a,t.pubkeyToRawAddress=s,t.pubkeyToAddress=function(e,t){return(0,o.toHex)(s(e,t)).toUpperCase()}},8477:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DateTime=t.toSeconds=t.fromSeconds=t.toRfc3339WithNanoseconds=t.fromRfc3339WithNanoseconds=void 0;const r=n(8972),o=n(6961);function i(e){const t=(0,r.fromRfc3339)(e),n=e.match(/\.(\d+)Z$/),o=n?n[1].slice(3):"";return t.nanoseconds=parseInt(o.padEnd(6,"0"),10),t}function a(e){var t,n;const r=e.toISOString(),o=null!==(n=null===(t=e.nanoseconds)||void 0===t?void 0:t.toString())&&void 0!==n?n:"";return`${r.slice(0,-1)}${o.padStart(6,"0")}Z`}t.fromRfc3339WithNanoseconds=i,t.toRfc3339WithNanoseconds=a,t.fromSeconds=function(e,t=0){const n=new o.Uint32(t).toNumber();if(n>999999999)throw new Error("Nano seconds must not exceed 999999999");const r=new Date(1e3*e+Math.floor(n/1e6));return r.nanoseconds=n%1e6,r},t.toSeconds=function(e){var t;return{seconds:Math.floor(e.getTime()/1e3),nanos:e.getTime()%1e3*1e6+(null!==(t=e.nanoseconds)&&void 0!==t?t:0)}},t.DateTime=class{static decode(e){return i(e)}static encode(e){return a(e)}}},3034:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.BlockIdFlag=t.Tendermint34Client=t.tendermint34=t.VoteType=t.SubscriptionEventType=t.Method=t.broadcastTxSyncSuccess=t.broadcastTxCommitSuccess=t.WebsocketClient=t.HttpClient=t.toSeconds=t.toRfc3339WithNanoseconds=t.fromSeconds=t.fromRfc3339WithNanoseconds=t.DateTime=t.rawSecp256k1PubkeyToRawAddress=t.rawEd25519PubkeyToRawAddress=t.pubkeyToRawAddress=t.pubkeyToAddress=void 0;var a=n(2522);Object.defineProperty(t,"pubkeyToAddress",{enumerable:!0,get:function(){return a.pubkeyToAddress}}),Object.defineProperty(t,"pubkeyToRawAddress",{enumerable:!0,get:function(){return a.pubkeyToRawAddress}}),Object.defineProperty(t,"rawEd25519PubkeyToRawAddress",{enumerable:!0,get:function(){return a.rawEd25519PubkeyToRawAddress}}),Object.defineProperty(t,"rawSecp256k1PubkeyToRawAddress",{enumerable:!0,get:function(){return a.rawSecp256k1PubkeyToRawAddress}});var s=n(8477);Object.defineProperty(t,"DateTime",{enumerable:!0,get:function(){return s.DateTime}}),Object.defineProperty(t,"fromRfc3339WithNanoseconds",{enumerable:!0,get:function(){return s.fromRfc3339WithNanoseconds}}),Object.defineProperty(t,"fromSeconds",{enumerable:!0,get:function(){return s.fromSeconds}}),Object.defineProperty(t,"toRfc3339WithNanoseconds",{enumerable:!0,get:function(){return s.toRfc3339WithNanoseconds}}),Object.defineProperty(t,"toSeconds",{enumerable:!0,get:function(){return s.toSeconds}});var c=n(8443);Object.defineProperty(t,"HttpClient",{enumerable:!0,get:function(){return c.HttpClient}}),Object.defineProperty(t,"WebsocketClient",{enumerable:!0,get:function(){return c.WebsocketClient}});var d=n(7468);Object.defineProperty(t,"broadcastTxCommitSuccess",{enumerable:!0,get:function(){return d.broadcastTxCommitSuccess}}),Object.defineProperty(t,"broadcastTxSyncSuccess",{enumerable:!0,get:function(){return d.broadcastTxSyncSuccess}}),Object.defineProperty(t,"Method",{enumerable:!0,get:function(){return d.Method}}),Object.defineProperty(t,"SubscriptionEventType",{enumerable:!0,get:function(){return d.SubscriptionEventType}}),Object.defineProperty(t,"VoteType",{enumerable:!0,get:function(){return d.VoteType}}),t.tendermint34=i(n(7468));var u=n(7468);Object.defineProperty(t,"Tendermint34Client",{enumerable:!0,get:function(){return u.Tendermint34Client}});var l=n(3508);Object.defineProperty(t,"BlockIdFlag",{enumerable:!0,get:function(){return l.BlockIdFlag}})},7793:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createJsonRpcRequest=void 0;const n="123456789";t.createJsonRpcRequest=function(e,t){const r=t?{...t}:{};return{jsonrpc:"2.0",id:parseInt(Array.from({length:12}).map((()=>n[Math.floor(Math.random()*n.length)])).join(""),10),method:e,params:r}}},5398:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.HttpClient=t.http=void 0;const o=n(2812),i=r(n(9669)),a=n(5734);function s(e){if(e.status>=400)throw new Error(`Bad status on response: ${e.status}`);return e}async function c(e,t,n){if("undefined"!=typeof fetch){const r=n?JSON.stringify(n):void 0;return fetch(t,{method:e,body:r}).then(s).then((e=>e.json()))}return i.default.request({url:t,method:e,data:n}).then((e=>e.data))}t.http=c,t.HttpClient=class{constructor(e){this.url=(0,a.hasProtocol)(e)?e:"http://"+e}disconnect(){}async execute(e){const t=(0,o.parseJsonRpcResponse)(await c("POST",this.url,e));if((0,o.isJsonRpcErrorResponse)(t))throw new Error(JSON.stringify(t.error));return t}}},8443:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WebsocketClient=t.instanceOfRpcStreamingClient=t.HttpClient=void 0;var r=n(5398);Object.defineProperty(t,"HttpClient",{enumerable:!0,get:function(){return r.HttpClient}});var o=n(5734);Object.defineProperty(t,"instanceOfRpcStreamingClient",{enumerable:!0,get:function(){return o.instanceOfRpcStreamingClient}});var i=n(2494);Object.defineProperty(t,"WebsocketClient",{enumerable:!0,get:function(){return i.WebsocketClient}})},5734:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hasProtocol=t.instanceOfRpcStreamingClient=void 0,t.instanceOfRpcStreamingClient=function(e){return"function"==typeof e.listen},t.hasProtocol=function(e){return-1!==e.search("://")}},2494:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WebsocketClient=void 0;const r=n(2812),o=n(3830),i=n(1459),a=n(3813),s=n(5734);function c(e){throw e}function d(e){if("message"!==e.type)throw new Error(`Unexcepted message type on websocket: ${e.type}`);return(0,r.parseJsonRpcResponse)(JSON.parse(e.data))}class u{constructor(e,t){this.running=!1,this.subscriptions=[],this.request=e,this.socket=t}start(e){if(this.running)throw Error("Already started. Please stop first before restarting.");this.running=!0,this.connectToClient(e),this.socket.queueRequest(JSON.stringify(this.request))}stop(){this.running=!1;const e={...this.request,method:"unsubscribe"};try{this.socket.queueRequest(JSON.stringify(e))}catch(e){if(!(e instanceof Error&&e.message.match(/socket has disconnected/i)))throw e}}connectToClient(e){const t=this.socket.events.map(d),n=t.filter((e=>e.id===this.request.id)).subscribe({next:t=>{(0,r.isJsonRpcErrorResponse)(t)&&(this.closeSubscriptions(),e.error(JSON.stringify(t.error))),n.unsubscribe()}}),o=t.filter((e=>e.id===this.request.id)).subscribe({next:t=>{(0,r.isJsonRpcErrorResponse)(t)?(this.closeSubscriptions(),e.error(JSON.stringify(t.error))):e.next(t.result)}}),i=t.subscribe({error:t=>{this.closeSubscriptions(),e.error(t)},complete:()=>{this.closeSubscriptions(),e.complete()}});this.subscriptions.push(n,o,i)}closeSubscriptions(){for(const e of this.subscriptions)e.unsubscribe();this.subscriptions=[]}}t.WebsocketClient=class{constructor(e,t=c){this.subscriptionStreams=new Map;const n=e.endsWith("/")?"websocket":"/websocket",r=(0,s.hasProtocol)(e)?e:"ws://"+e;this.url=r+n,this.socket=new o.ReconnectingSocket(this.url);const i=this.socket.events.subscribe({error:e=>{t(e),i.unsubscribe()}});this.jsonRpcResponseStream=this.socket.events.map(d),this.socket.connect()}async execute(e){const t=this.responseForRequestId(e.id);this.socket.queueRequest(JSON.stringify(e));const n=await t;if((0,r.isJsonRpcErrorResponse)(n))throw new Error(JSON.stringify(n.error));return n}listen(e){if("subscribe"!==e.method)throw new Error('Request method must be "subscribe" to start event listening');const t=e.params.query;if("string"!=typeof t)throw new Error("request.params.query must be a string");if(!this.subscriptionStreams.has(t)){const n=new u(e,this.socket),r=a.Stream.create(n);this.subscriptionStreams.set(t,r)}return this.subscriptionStreams.get(t).filter((e=>void 0!==e.query))}async connected(){await this.socket.connectionStatus.waitFor(o.ConnectionStatus.Connected)}disconnect(){this.socket.disconnect()}async responseForRequestId(e){return(0,i.firstEvent)(this.jsonRpcResponseStream.filter((t=>t.id===e)))}}},1731:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.adaptor34=void 0;const r=n(9057),o=n(5240),i=n(3106);t.adaptor34={params:o.Params,responses:i.Responses,hashTx:r.hashTx,hashBlock:r.hashBlock}},5240:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Params=void 0;const a=n(8972),s=n(7793),c=n(122),d=i(n(4920));function u(e){return{height:(0,c.may)(c.Integer.encode,e.height)}}t.Params=class{static encodeAbciInfo(e){return(0,s.createJsonRpcRequest)(e.method)}static encodeAbciQuery(e){return(0,s.createJsonRpcRequest)(e.method,(t=e.params,{path:(0,c.assertNotEmpty)(t.path),data:(0,a.toHex)(t.data),height:(0,c.may)(c.Integer.encode,t.height),prove:t.prove}));var t}static encodeBlock(e){return(0,s.createJsonRpcRequest)(e.method,u(e.params))}static encodeBlockchain(e){return(0,s.createJsonRpcRequest)(e.method,(t=e.params,{minHeight:(0,c.may)(c.Integer.encode,t.minHeight),maxHeight:(0,c.may)(c.Integer.encode,t.maxHeight)}));var t}static encodeBlockResults(e){return(0,s.createJsonRpcRequest)(e.method,u(e.params))}static encodeBlockSearch(e){return(0,s.createJsonRpcRequest)(e.method,{query:(t=e.params).query,page:(0,c.may)(c.Integer.encode,t.page),per_page:(0,c.may)(c.Integer.encode,t.per_page),order_by:t.order_by});var t}static encodeBroadcastTx(e){return(0,s.createJsonRpcRequest)(e.method,(t=e.params,{tx:(0,a.toBase64)((0,c.assertNotEmpty)(t.tx))}));var t}static encodeCommit(e){return(0,s.createJsonRpcRequest)(e.method,u(e.params))}static encodeGenesis(e){return(0,s.createJsonRpcRequest)(e.method)}static encodeHealth(e){return(0,s.createJsonRpcRequest)(e.method)}static encodeStatus(e){return(0,s.createJsonRpcRequest)(e.method)}static encodeSubscribe(e){const t={key:"tm.event",value:e.query.type},n=d.buildQuery({tags:[t],raw:e.query.raw});return(0,s.createJsonRpcRequest)("subscribe",{query:n})}static encodeTx(e){return(0,s.createJsonRpcRequest)(e.method,(t=e.params,{hash:(0,a.toBase64)((0,c.assertNotEmpty)(t.hash)),prove:t.prove}));var t}static encodeTxSearch(e){return(0,s.createJsonRpcRequest)(e.method,{query:(t=e.params).query,prove:t.prove,page:(0,c.may)(c.Integer.encode,t.page),per_page:(0,c.may)(c.Integer.encode,t.per_page),order_by:t.order_by});var t}static encodeValidators(e){return(0,s.createJsonRpcRequest)(e.method,(t=e.params,{height:(0,c.may)(c.Integer.encode,t.height),page:(0,c.may)(c.Integer.encode,t.page),per_page:(0,c.may)(c.Integer.encode,t.per_page)}));var t}}},3106:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Responses=void 0;const r=n(8972),o=n(5553),i=n(8477),a=n(3508),s=n(122),c=n(9057);function d(e){return{ops:e.ops.map((e=>({type:e.type,key:(0,r.fromBase64)(e.key),data:(0,r.fromBase64)(e.data)})))}}function u(e){return{key:(0,r.fromBase64)((0,s.assertNotEmpty)(e.key)),value:(0,r.fromBase64)((0,s.optional)(e.value,""))}}function l(e){return{type:e.type,attributes:(t=e.attributes,(0,s.assertArray)(t).map(u))};var t}function A(e){return(0,s.assertArray)(e).map(l)}function f(e){return{code:s.Integer.parse((0,s.assertNumber)((0,s.optional)(e.code,0))),codeSpace:e.codespace,log:e.log,data:(0,s.may)(r.fromBase64,e.data),events:e.events?A(e.events):[],gasWanted:s.Integer.parse((0,s.optional)(e.gas_wanted,"0")),gasUsed:s.Integer.parse((0,s.optional)(e.gas_used,"0"))}}function h(e){switch(e.type){case"tendermint/PubKeyEd25519":return{algorithm:"ed25519",data:(0,r.fromBase64)((0,s.assertNotEmpty)(e.value))};case"tendermint/PubKeySecp256k1":return{algorithm:"secp256k1",data:(0,r.fromBase64)((0,s.assertNotEmpty)(e.value))};default:throw new Error(`unknown pubkey type: ${e.type}`)}}function g(e){return{pubkey:h((0,s.assertObject)(e.pub_key)),votingPower:s.Integer.parse((0,s.assertNotEmpty)(e.voting_power)),address:(0,r.fromHex)((0,s.assertNotEmpty)(e.address)),proposerPriority:s.Integer.parse(e.proposer_priority)}}function p(e){return{maxBytes:s.Integer.parse((0,s.assertNotEmpty)(e.max_bytes)),maxGas:s.Integer.parse((0,s.assertNotEmpty)(e.max_gas))}}function m(e){return{maxAgeNumBlocks:s.Integer.parse((0,s.assertNotEmpty)(e.max_age_num_blocks)),maxAgeDuration:s.Integer.parse((0,s.assertNotEmpty)(e.max_age_duration))}}function v(e){return{block:p((0,s.assertObject)(e.block)),evidence:m((0,s.assertObject)(e.evidence))}}function y(e){return{hash:(0,r.fromHex)((0,s.assertNotEmpty)(e.hash)),parts:{total:(0,s.assertNotEmpty)(e.parts.total),hash:(0,r.fromHex)((0,s.assertNotEmpty)(e.parts.hash))}}}function b(e){var t;return{block:s.Integer.parse(e.block),app:s.Integer.parse(null!==(t=e.app)&&void 0!==t?t:0)}}function I(e){return{version:b(e.version),chainId:(0,s.assertNotEmpty)(e.chain_id),height:s.Integer.parse((0,s.assertNotEmpty)(e.height)),time:(0,i.fromRfc3339WithNanoseconds)((0,s.assertNotEmpty)(e.time)),lastBlockId:e.last_block_id.hash?y(e.last_block_id):null,lastCommitHash:(0,r.fromHex)((0,s.assertSet)(e.last_commit_hash)),dataHash:(0,r.fromHex)((0,s.assertSet)(e.data_hash)),validatorsHash:(0,r.fromHex)((0,s.assertSet)(e.validators_hash)),nextValidatorsHash:(0,r.fromHex)((0,s.assertSet)(e.next_validators_hash)),consensusHash:(0,r.fromHex)((0,s.assertSet)(e.consensus_hash)),appHash:(0,r.fromHex)((0,s.assertSet)(e.app_hash)),lastResultsHash:(0,r.fromHex)((0,s.assertSet)(e.last_results_hash)),evidenceHash:(0,r.fromHex)((0,s.assertSet)(e.evidence_hash)),proposerAddress:(0,r.fromHex)((0,s.assertNotEmpty)(e.proposer_address))}}function C(e){return{blockId:y(e.block_id),blockSize:s.Integer.parse((0,s.assertNotEmpty)(e.block_size)),header:I(e.header),numTxs:s.Integer.parse((0,s.assertNotEmpty)(e.num_txs))}}function E(e){return{blockIdFlag:(n=e.block_id_flag,(0,o.assert)(n in a.BlockIdFlag),n),validatorAddress:e.validator_address?(0,r.fromHex)(e.validator_address):void 0,timestamp:(t=e.timestamp,t&&!t.startsWith("0001-01-01")?(0,i.fromRfc3339WithNanoseconds)(t):void 0),signature:e.signature?(0,r.fromBase64)(e.signature):void 0};var t,n}function w(e){return{blockId:y((0,s.assertObject)(e.block_id)),height:s.Integer.parse((0,s.assertNotEmpty)(e.height)),round:s.Integer.parse(e.round),signatures:(0,s.assertArray)(e.signatures).map(E)}}function B(e){return{address:(0,r.fromHex)((0,s.assertNotEmpty)(e.address)),pubkey:h((0,s.assertObject)(e.pub_key)),votingPower:s.Integer.parse((0,s.assertNotEmpty)(e.power))}}function _(e){return{pubkey:h((0,s.assertObject)(e.pub_key)),votingPower:s.Integer.parse((0,s.assertNotEmpty)(e.voting_power)),address:(0,r.fromHex)((0,s.assertNotEmpty)(e.address))}}function S(e){return{id:(0,r.fromHex)((0,s.assertNotEmpty)(e.id)),listenAddr:(0,s.assertNotEmpty)(e.listen_addr),network:(0,s.assertNotEmpty)(e.network),version:(0,s.assertString)(e.version),channels:(0,s.assertNotEmpty)(e.channels),moniker:(0,s.assertNotEmpty)(e.moniker),other:(0,s.dictionaryToStringMap)(e.other),protocolVersion:{app:s.Integer.parse((0,s.assertNotEmpty)(e.protocol_version.app)),block:s.Integer.parse((0,s.assertNotEmpty)(e.protocol_version.block)),p2p:s.Integer.parse((0,s.assertNotEmpty)(e.protocol_version.p2p))}}}function k(e){return{latestBlockHash:(0,r.fromHex)((0,s.assertNotEmpty)(e.latest_block_hash)),latestAppHash:(0,r.fromHex)((0,s.assertNotEmpty)(e.latest_app_hash)),latestBlockTime:(0,i.fromRfc3339WithNanoseconds)((0,s.assertNotEmpty)(e.latest_block_time)),latestBlockHeight:s.Integer.parse((0,s.assertNotEmpty)(e.latest_block_height)),catchingUp:(0,s.assertBoolean)(e.catching_up)}}function O(e){return{data:(0,r.fromBase64)((0,s.assertNotEmpty)(e.data)),rootHash:(0,r.fromHex)((0,s.assertNotEmpty)(e.root_hash)),proof:{total:s.Integer.parse((0,s.assertNotEmpty)(e.proof.total)),index:s.Integer.parse((0,s.assertNotEmpty)(e.proof.index)),leafHash:(0,r.fromBase64)((0,s.assertNotEmpty)(e.proof.leaf_hash)),aunts:(0,s.assertArray)(e.proof.aunts).map(r.fromBase64)}}}function Q(e){return{tx:(0,r.fromBase64)((0,s.assertNotEmpty)(e.tx)),result:f((0,s.assertObject)(e.tx_result)),height:s.Integer.parse((0,s.assertNotEmpty)(e.height)),index:s.Integer.parse((0,s.assertNumber)(e.index)),hash:(0,r.fromHex)((0,s.assertNotEmpty)(e.hash)),proof:(0,s.may)(O,e.proof)}}function R(e){var t,n;return{header:I((0,s.assertObject)(e.header)),lastCommit:e.last_commit.block_id.hash?w((0,s.assertObject)(e.last_commit)):null,txs:e.data.txs?(0,s.assertArray)(e.data.txs).map(r.fromBase64):[],evidence:null!==(n=null===(t=e.evidence)||void 0===t?void 0:t.evidence)&&void 0!==n?n:[]}}function P(e){return{blockId:y(e.block_id),block:R(e.block)}}class N{static decodeAbciInfo(e){return{data:(t=(0,s.assertObject)(e.result.response)).data,lastBlockHeight:(0,s.may)(s.Integer.parse,t.last_block_height),lastBlockAppHash:(0,s.may)(r.fromBase64,t.last_block_app_hash)};var t}static decodeAbciQuery(e){return t=(0,s.assertObject)(e.result.response),{key:(0,r.fromBase64)((0,s.optional)(t.key,"")),value:(0,r.fromBase64)((0,s.optional)(t.value,"")),proof:(0,s.may)(d,t.proofOps),height:(0,s.may)(s.Integer.parse,t.height),code:(0,s.may)(s.Integer.parse,t.code),index:(0,s.may)(s.Integer.parse,t.index),log:t.log};var t}static decodeBlock(e){return P(e.result)}static decodeBlockResults(e){return t=e.result,{height:s.Integer.parse((0,s.assertNotEmpty)(t.height)),results:(t.txs_results||[]).map(f),validatorUpdates:(t.validator_updates||[]).map(g),consensusUpdates:(0,s.may)(v,t.consensus_param_updates),beginBlockEvents:A(t.begin_block_events||[]),endBlockEvents:A(t.end_block_events||[])};var t}static decodeBlockSearch(e){return t=e.result,{totalCount:s.Integer.parse((0,s.assertNotEmpty)(t.total_count)),blocks:(0,s.assertArray)(t.blocks).map(P)};var t}static decodeBlockchain(e){return t=e.result,{lastHeight:s.Integer.parse((0,s.assertNotEmpty)(t.last_height)),blockMetas:(0,s.assertArray)(t.block_metas).map(C)};var t}static decodeBroadcastTxSync(e){return{...f(t=e.result),hash:(0,r.fromHex)((0,s.assertNotEmpty)(t.hash))};var t}static decodeBroadcastTxAsync(e){return N.decodeBroadcastTxSync(e)}static decodeBroadcastTxCommit(e){return t=e.result,{height:s.Integer.parse(t.height),hash:(0,r.fromHex)((0,s.assertNotEmpty)(t.hash)),checkTx:f((0,s.assertObject)(t.check_tx)),deliverTx:(0,s.may)(f,t.deliver_tx)};var t}static decodeCommit(e){return t=e.result,{canonical:(0,s.assertBoolean)(t.canonical),header:I(t.signed_header.header),commit:w(t.signed_header.commit)};var t}static decodeGenesis(e){return t=(0,s.assertObject)(e.result.genesis),{genesisTime:(0,i.fromRfc3339WithNanoseconds)((0,s.assertNotEmpty)(t.genesis_time)),chainId:(0,s.assertNotEmpty)(t.chain_id),consensusParams:v(t.consensus_params),validators:t.validators?(0,s.assertArray)(t.validators).map(B):[],appHash:(0,r.fromHex)((0,s.assertSet)(t.app_hash)),appState:t.app_state};var t}static decodeHealth(){return null}static decodeStatus(e){return{nodeInfo:S((t=e.result).node_info),syncInfo:k(t.sync_info),validatorInfo:_(t.validator_info)};var t}static decodeNewBlockEvent(e){return R(e.data.value.block)}static decodeNewBlockHeaderEvent(e){return I(e.data.value.header)}static decodeTxEvent(e){return function(e){const t=(0,r.fromBase64)((0,s.assertNotEmpty)(e.tx));return{tx:t,hash:(0,c.hashTx)(t),result:f(e.result),height:s.Integer.parse((0,s.assertNotEmpty)(e.height)),index:(0,s.may)(s.Integer.parse,e.index)}}(e.data.value.TxResult)}static decodeTx(e){return Q(e.result)}static decodeTxSearch(e){return t=e.result,{totalCount:s.Integer.parse((0,s.assertNotEmpty)(t.total_count)),txs:(0,s.assertArray)(t.txs).map(Q)};var t}static decodeValidators(e){return t=e.result,{blockHeight:s.Integer.parse((0,s.assertNotEmpty)(t.block_height)),validators:(0,s.assertArray)(t.validators).map(g),count:s.Integer.parse((0,s.assertNotEmpty)(t.count)),total:s.Integer.parse((0,s.assertNotEmpty)(t.total))};var t}}t.Responses=N},122:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.encodeBlockId=t.encodeVersion=t.encodeBytes=t.encodeTime=t.encodeInt=t.encodeString=t.Integer=t.dictionaryToStringMap=t.may=t.optional=t.assertNotEmpty=t.assertObject=t.assertArray=t.assertNumber=t.assertString=t.assertBoolean=t.assertSet=void 0;const r=n(8972),o=n(6961);function i(e){if(void 0===e)throw new Error("Value must not be undefined");if(null===e)throw new Error("Value must not be null");return e}function a(e){return e>=128?Uint8Array.from([255&e|128,...a(e>>7)]):Uint8Array.from([255&e])}t.assertSet=i,t.assertBoolean=function(e){if(i(e),"boolean"!=typeof e)throw new Error("Value must be a boolean");return e},t.assertString=function(e){if(i(e),"string"!=typeof e)throw new Error("Value must be a string");return e},t.assertNumber=function(e){if(i(e),"number"!=typeof e)throw new Error("Value must be a number");return e},t.assertArray=function(e){if(i(e),!Array.isArray(e))throw new Error("Value must be a an array");return e},t.assertObject=function(e){if(i(e),"object"!=typeof e)throw new Error("Value must be an object");if("[object Object]"!==Object.prototype.toString.call(e))throw new Error("Value must be a simple object");return e},t.assertNotEmpty=function(e){if(i(e),"number"==typeof e&&0===e)throw new Error("must provide a non-zero value");if(0===e.length)throw new Error("must provide a non-empty value");return e},t.optional=function(e,t){return null==e?t:e},t.may=function(e,t){return null==t?void 0:e(t)},t.dictionaryToStringMap=function(e){const t=new Map;for(const n of Object.keys(e)){const r=e[n];if("string"!=typeof r)throw new Error("Found dictionary value of type other than string");t.set(n,r)}return t},t.Integer=class{static parse(e){return("number"==typeof e?new o.Int53(e):o.Int53.fromString(e)).toNumber()}static encode(e){return new o.Int53(e).toString()}},t.encodeString=function(e){const t=(0,r.toUtf8)(e);return Uint8Array.from([t.length,...t])},t.encodeInt=a,t.encodeTime=function(e){const t=e.getTime(),n=Math.floor(t/1e3),r=n?[8,...a(n)]:new Uint8Array,o=(e.nanoseconds||0)+t%1e3*1e6,i=o?[16,...a(o)]:new Uint8Array;return Uint8Array.from([...r,...i])},t.encodeBytes=function(e){if(e.length>=128)throw new Error("Not implemented for byte arrays of length 128 or more");return e.length?Uint8Array.from([e.length,...e]):new Uint8Array},t.encodeVersion=function(e){const t=e.block?Uint8Array.from([8,...a(e.block)]):new Uint8Array,n=e.app?Uint8Array.from([16,...a(e.app)]):new Uint8Array;return Uint8Array.from([...t,...n])},t.encodeBlockId=function(e){return Uint8Array.from([10,e.hash.length,...e.hash,18,e.parts.hash.length+4,8,e.parts.total,18,e.parts.hash.length,...e.parts.hash])}},9057:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hashBlock=t.hashTx=void 0;const r=n(9562),o=n(122);function i(e){switch(e.length){case 0:throw new Error("Cannot hash empty tree");case 1:return function(e){const t=new r.Sha256(Uint8Array.from([0]));return t.update(e),t.digest()}(e[0]);default:{const t=function(e){if(e<1)throw new Error("Cannot split an empty tree");const t=2**Math.floor(Math.log2(e));return t{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Tendermint34Client=t.VoteType=t.broadcastTxSyncSuccess=t.broadcastTxCommitSuccess=t.SubscriptionEventType=t.Method=void 0;var r=n(4920);Object.defineProperty(t,"Method",{enumerable:!0,get:function(){return r.Method}}),Object.defineProperty(t,"SubscriptionEventType",{enumerable:!0,get:function(){return r.SubscriptionEventType}});var o=n(6802);Object.defineProperty(t,"broadcastTxCommitSuccess",{enumerable:!0,get:function(){return o.broadcastTxCommitSuccess}}),Object.defineProperty(t,"broadcastTxSyncSuccess",{enumerable:!0,get:function(){return o.broadcastTxSyncSuccess}}),Object.defineProperty(t,"VoteType",{enumerable:!0,get:function(){return o.VoteType}});var i=n(4533);Object.defineProperty(t,"Tendermint34Client",{enumerable:!0,get:function(){return i.Tendermint34Client}})},4920:(e,t)=>{"use strict";var n,r;Object.defineProperty(t,"__esModule",{value:!0}),t.buildQuery=t.SubscriptionEventType=t.Method=void 0,(r=t.Method||(t.Method={})).AbciInfo="abci_info",r.AbciQuery="abci_query",r.Block="block",r.Blockchain="blockchain",r.BlockResults="block_results",r.BlockSearch="block_search",r.BroadcastTxAsync="broadcast_tx_async",r.BroadcastTxSync="broadcast_tx_sync",r.BroadcastTxCommit="broadcast_tx_commit",r.Commit="commit",r.Genesis="genesis",r.Health="health",r.Status="status",r.Subscribe="subscribe",r.Tx="tx",r.TxSearch="tx_search",r.Validators="validators",r.Unsubscribe="unsubscribe",(n=t.SubscriptionEventType||(t.SubscriptionEventType={})).NewBlock="NewBlock",n.NewBlockHeader="NewBlockHeader",n.Tx="Tx",t.buildQuery=function(e){return[...(e.tags?e.tags:[]).map((e=>`${e.key}='${e.value}'`)),...e.raw?[e.raw]:[]].join(" AND ")}},6802:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.VoteType=t.broadcastTxCommitSuccess=t.broadcastTxSyncSuccess=void 0,t.broadcastTxSyncSuccess=function(e){return 0===e.code},t.broadcastTxCommitSuccess=function(e){return 0===e.checkTx.code&&!!e.deliverTx&&0===e.deliverTx.code},(n=t.VoteType||(t.VoteType={}))[n.PreVote=1]="PreVote",n[n.PreCommit=2]="PreCommit"},4533:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Tendermint34Client=void 0;const a=n(7793),s=n(8443),c=n(1731),d=i(n(4920));class u{constructor(e){this.client=e,this.p=c.adaptor34.params,this.r=c.adaptor34.responses}static async connect(e){const t=e.startsWith("http://")||e.startsWith("https://")?new s.HttpClient(e):new s.WebsocketClient(e);return u.create(t)}static async create(e){return await this.detectVersion(e),new u(e)}static async detectVersion(e){const t=(0,a.createJsonRpcRequest)(d.Method.Status),n=(await e.execute(t)).result;if(!n||!n.node_info)throw new Error("Unrecognized format for status response");const r=n.node_info.version;if("string"!=typeof r)throw new Error("Unrecognized version format: must be string");return r}disconnect(){this.client.disconnect()}async abciInfo(){const e={method:d.Method.AbciInfo};return this.doCall(e,this.p.encodeAbciInfo,this.r.decodeAbciInfo)}async abciQuery(e){const t={params:e,method:d.Method.AbciQuery};return this.doCall(t,this.p.encodeAbciQuery,this.r.decodeAbciQuery)}async block(e){const t={method:d.Method.Block,params:{height:e}};return this.doCall(t,this.p.encodeBlock,this.r.decodeBlock)}async blockResults(e){const t={method:d.Method.BlockResults,params:{height:e}};return this.doCall(t,this.p.encodeBlockResults,this.r.decodeBlockResults)}async blockSearch(e){const t={params:e,method:d.Method.BlockSearch},n=await this.doCall(t,this.p.encodeBlockSearch,this.r.decodeBlockSearch);return{...n,blocks:[...n.blocks].sort(((e,t)=>e.block.header.height-t.block.header.height))}}async blockSearchAll(e){let t=e.page||1;const n=[];let r=!1;for(;!r;){const o=await this.blockSearch({...e,page:t});n.push(...o.blocks),n.lengthe.block.header.height-t.block.header.height)),{totalCount:n.length,blocks:n}}async blockchain(e,t){const n={method:d.Method.Blockchain,params:{minHeight:e,maxHeight:t}};return this.doCall(n,this.p.encodeBlockchain,this.r.decodeBlockchain)}async broadcastTxSync(e){const t={params:e,method:d.Method.BroadcastTxSync};return this.doCall(t,this.p.encodeBroadcastTx,this.r.decodeBroadcastTxSync)}async broadcastTxAsync(e){const t={params:e,method:d.Method.BroadcastTxAsync};return this.doCall(t,this.p.encodeBroadcastTx,this.r.decodeBroadcastTxAsync)}async broadcastTxCommit(e){const t={params:e,method:d.Method.BroadcastTxCommit};return this.doCall(t,this.p.encodeBroadcastTx,this.r.decodeBroadcastTxCommit)}async commit(e){const t={method:d.Method.Commit,params:{height:e}};return this.doCall(t,this.p.encodeCommit,this.r.decodeCommit)}async genesis(){const e={method:d.Method.Genesis};return this.doCall(e,this.p.encodeGenesis,this.r.decodeGenesis)}async health(){const e={method:d.Method.Health};return this.doCall(e,this.p.encodeHealth,this.r.decodeHealth)}async status(){const e={method:d.Method.Status};return this.doCall(e,this.p.encodeStatus,this.r.decodeStatus)}subscribeNewBlock(){const e={method:d.Method.Subscribe,query:{type:d.SubscriptionEventType.NewBlock}};return this.subscribe(e,this.r.decodeNewBlockEvent)}subscribeNewBlockHeader(){const e={method:d.Method.Subscribe,query:{type:d.SubscriptionEventType.NewBlockHeader}};return this.subscribe(e,this.r.decodeNewBlockHeaderEvent)}subscribeTx(e){const t={method:d.Method.Subscribe,query:{type:d.SubscriptionEventType.Tx,raw:e}};return this.subscribe(t,this.r.decodeTxEvent)}async tx(e){const t={params:e,method:d.Method.Tx};return this.doCall(t,this.p.encodeTx,this.r.decodeTx)}async txSearch(e){const t={params:e,method:d.Method.TxSearch};return this.doCall(t,this.p.encodeTxSearch,this.r.decodeTxSearch)}async txSearchAll(e){let t=e.page||1;const n=[];let r=!1;for(;!r;){const o=await this.txSearch({...e,page:t});n.push(...o.txs),n.lengtht(e)))}}t.Tendermint34Client=u},3508:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.BlockIdFlag=void 0,(n=t.BlockIdFlag||(t.BlockIdFlag={}))[n.Unknown=0]="Unknown",n[n.Absent=1]="Absent",n[n.Commit=2]="Commit",n[n.Nil=3]="Nil",n[n.Unrecognized=-1]="Unrecognized"},1057:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.arrayContentStartsWith=t.arrayContentEquals=void 0,t.arrayContentEquals=function(e,t){if(e.length!==t.length)return!1;for(let n=0;n{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.assertDefinedAndNotNull=t.assertDefined=t.assert=void 0,t.assert=function(e,t){if(!e)throw new Error(t||"condition is not truthy")},t.assertDefined=function(e,t){if(void 0===e)throw new Error(null!=t?t:"value is undefined")},t.assertDefinedAndNotNull=function(e,t){if(null==e)throw new Error(null!=t?t:"value is undefined or null")}},5553:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isUint8Array=t.isNonNullObject=t.sleep=t.assertDefinedAndNotNull=t.assertDefined=t.assert=t.arrayContentStartsWith=t.arrayContentEquals=void 0;var r=n(1057);Object.defineProperty(t,"arrayContentEquals",{enumerable:!0,get:function(){return r.arrayContentEquals}}),Object.defineProperty(t,"arrayContentStartsWith",{enumerable:!0,get:function(){return r.arrayContentStartsWith}});var o=n(4427);Object.defineProperty(t,"assert",{enumerable:!0,get:function(){return o.assert}}),Object.defineProperty(t,"assertDefined",{enumerable:!0,get:function(){return o.assertDefined}}),Object.defineProperty(t,"assertDefinedAndNotNull",{enumerable:!0,get:function(){return o.assertDefinedAndNotNull}});var i=n(3029);Object.defineProperty(t,"sleep",{enumerable:!0,get:function(){return i.sleep}});var a=n(5012);Object.defineProperty(t,"isNonNullObject",{enumerable:!0,get:function(){return a.isNonNullObject}}),Object.defineProperty(t,"isUint8Array",{enumerable:!0,get:function(){return a.isUint8Array}})},3029:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sleep=void 0,t.sleep=async function(e){return new Promise((t=>setTimeout(t,e)))}},5012:(e,t,n)=>{"use strict";var r=n(8764).Buffer;function o(e){return"object"==typeof e&&null!==e}Object.defineProperty(t,"__esModule",{value:!0}),t.isUint8Array=t.isNonNullObject=void 0,t.isNonNullObject=o,t.isUint8Array=function(e){return!(!o(e)||"[object Uint8Array]"!==Object.prototype.toString.call(e)||void 0!==r&&void 0!==r.isBuffer&&r.isBuffer(e))}},7505:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SHA2=void 0;const r=n(8089);class o extends r.Hash{constructor(e,t,n,o){super(),this.blockLen=e,this.outputLen=t,this.padOffset=n,this.isLE=o,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=(0,r.createView)(this.buffer)}update(e){if(this.destroyed)throw new Error("instance is destroyed");const{view:t,buffer:n,blockLen:o,finished:i}=this;if(i)throw new Error("digest() was already called");const a=(e=(0,r.toBytes)(e)).length;for(let i=0;io-a&&(this.process(n,0),a=0);for(let e=a;e>o&i),s=Number(n&i),c=r?4:0,d=r?0:4;e.setUint32(t+c,a,r),e.setUint32(t+d,s,r)}(n,o-8,BigInt(8*this.length),i),this.process(n,0);const s=(0,r.createView)(e);this.get().forEach(((e,t)=>s.setUint32(4*t,e,i)))}digest(){const{buffer:e,outputLen:t}=this;this.digestInto(e);const n=e.slice(0,t);return this.destroy(),n}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());const{blockLen:t,buffer:n,length:r,finished:o,destroyed:i,pos:a}=this;return e.length=r,e.pos=a,e.finished=o,e.destroyed=i,r%t&&e.buffer.set(n),e}}t.SHA2=o},6873:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.add5H=t.add5L=t.add4H=t.add4L=t.add3H=t.add3L=t.add=t.rotlBL=t.rotlBH=t.rotlSL=t.rotlSH=t.rotr32L=t.rotr32H=t.rotrBL=t.rotrBH=t.rotrSL=t.rotrSH=t.shrSL=t.shrSH=t.toBig=t.split=t.fromBig=void 0;const n=BigInt(2**32-1),r=BigInt(32);function o(e,t=!1){return t?{h:Number(e&n),l:Number(e>>r&n)}:{h:0|Number(e>>r&n),l:0|Number(e&n)}}t.fromBig=o,t.split=function(e,t=!1){let n=new Uint32Array(e.length),r=new Uint32Array(e.length);for(let i=0;iBigInt(e>>>0)<>>0),t.shrSH=(e,t,n)=>e>>>n,t.shrSL=(e,t,n)=>e<<32-n|t>>>n,t.rotrSH=(e,t,n)=>e>>>n|t<<32-n,t.rotrSL=(e,t,n)=>e<<32-n|t>>>n,t.rotrBH=(e,t,n)=>e<<64-n|t>>>n-32,t.rotrBL=(e,t,n)=>e>>>n-32|t<<64-n,t.rotr32H=(e,t)=>t,t.rotr32L=(e,t)=>e,t.rotlSH=(e,t,n)=>e<>>32-n,t.rotlSL=(e,t,n)=>t<>>32-n,t.rotlBH=(e,t,n)=>t<>>64-n,t.rotlBL=(e,t,n)=>e<>>64-n,t.add=function(e,t,n,r){const o=(t>>>0)+(r>>>0);return{h:e+n+(o/2**32|0)|0,l:0|o}},t.add3L=(e,t,n)=>(e>>>0)+(t>>>0)+(n>>>0),t.add3H=(e,t,n,r)=>t+n+r+(e/2**32|0)|0,t.add4L=(e,t,n,r)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0),t.add4H=(e,t,n,r,o)=>t+n+r+o+(e/2**32|0)|0,t.add5L=(e,t,n,r,o)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0)+(o>>>0),t.add5H=(e,t,n,r,o,i)=>t+n+r+o+i+(e/2**32|0)|0},4421:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.crypto=void 0,t.crypto={node:void 0,web:"object"==typeof self&&"crypto"in self?self.crypto:void 0}},9569:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hmac=void 0;const r=n(8089);class o extends r.Hash{constructor(e,t){super(),this.finished=!1,this.destroyed=!1,(0,r.assertHash)(e);const n=(0,r.toBytes)(t);if(this.iHash=e.create(),!(this.iHash instanceof r.Hash))throw new TypeError("Expected instance of class which extends utils.Hash");const o=this.blockLen=this.iHash.blockLen;this.outputLen=this.iHash.outputLen;const i=new Uint8Array(o);i.set(n.length>this.iHash.blockLen?e.create().update(n).digest():n);for(let e=0;enew o(e,t).update(n).digest(),t.hmac.create=(e,t)=>new o(e,t)},9023:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.pbkdf2Async=t.pbkdf2=void 0;const r=n(9569),o=n(8089);function i(e,t,n,i){(0,o.assertHash)(e);const a=(0,o.checkOpts)({dkLen:32,asyncTick:10},i),{c:s,dkLen:c,asyncTick:d}=a;if((0,o.assertNumber)(s),(0,o.assertNumber)(c),(0,o.assertNumber)(d),s<1)throw new Error("PBKDF2: iterations (c) should be >= 1");const u=(0,o.toBytes)(t),l=(0,o.toBytes)(n),A=new Uint8Array(c),f=r.hmac.create(e,u),h=f._cloneInto().update(l);return{c:s,dkLen:c,asyncTick:d,DK:A,PRF:f,PRFSalt:h}}function a(e,t,n,r,o){return e.destroy(),t.destroy(),r&&r.destroy(),o.fill(0),n}t.pbkdf2=function(e,t,n,r){const{c:s,dkLen:c,DK:d,PRF:u,PRFSalt:l}=i(e,t,n,r);let A;const f=new Uint8Array(4),h=(0,o.createView)(f),g=new Uint8Array(u.outputLen);for(let e=1,t=0;t{l._cloneInto(f).update(p).digestInto(p);for(let e=0;e{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ripemd160=t.RIPEMD160=void 0;const r=n(7505),o=n(8089),i=new Uint8Array([7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8]),a=Uint8Array.from({length:16},((e,t)=>t)),s=a.map((e=>(9*e+5)%16));let c=[a],d=[s];for(let e=0;e<4;e++)for(let t of[c,d])t.push(t[e].map((e=>i[e])));const u=[[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8],[12,13,11,15,6,9,9,7,12,15,11,13,7,8,7,7],[13,15,14,11,7,7,6,8,13,14,13,12,5,5,6,9],[14,11,12,14,8,6,5,5,15,12,15,14,9,9,8,6],[15,12,13,13,9,5,8,6,14,11,12,11,8,6,5,5]].map((e=>new Uint8Array(e))),l=c.map(((e,t)=>e.map((e=>u[t][e])))),A=d.map(((e,t)=>e.map((e=>u[t][e])))),f=new Uint32Array([0,1518500249,1859775393,2400959708,2840853838]),h=new Uint32Array([1352829926,1548603684,1836072691,2053994217,0]),g=(e,t)=>e<>>32-t;function p(e,t,n,r){return 0===e?t^n^r:1===e?t&n|~t&r:2===e?(t|~n)^r:3===e?t&r|n&~r:t^(n|~r)}const m=new Uint32Array(16);class v extends r.SHA2{constructor(){super(64,20,8,!0),this.h0=1732584193,this.h1=-271733879,this.h2=-1732584194,this.h3=271733878,this.h4=-1009589776}get(){const{h0:e,h1:t,h2:n,h3:r,h4:o}=this;return[e,t,n,r,o]}set(e,t,n,r,o){this.h0=0|e,this.h1=0|t,this.h2=0|n,this.h3=0|r,this.h4=0|o}process(e,t){for(let n=0;n<16;n++,t+=4)m[n]=e.getUint32(t,!0);let n=0|this.h0,r=n,o=0|this.h1,i=o,a=0|this.h2,s=a,u=0|this.h3,v=u,y=0|this.h4,b=y;for(let e=0;e<5;e++){const t=4-e,I=f[e],C=h[e],E=c[e],w=d[e],B=l[e],_=A[e];for(let t=0;t<16;t++){const r=g(n+p(e,o,a,u)+m[E[t]]+I,B[t])+y|0;n=y,y=u,u=0|g(a,10),a=o,o=r}for(let e=0;e<16;e++){const n=g(r+p(t,i,s,v)+m[w[e]]+C,_[e])+b|0;r=b,b=v,v=0|g(s,10),s=i,i=n}}this.set(this.h1+a+v|0,this.h2+u+b|0,this.h3+y+r|0,this.h4+n+i|0,this.h0+o+s|0)}roundClean(){m.fill(0)}destroy(){this.destroyed=!0,this.buffer.fill(0),this.set(0,0,0,0,0)}}t.RIPEMD160=v,t.ripemd160=(0,o.wrapConstructor)((()=>new v))},3061:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sha256=void 0;const r=n(7505),o=n(8089),i=(e,t,n)=>e&t^e&n^t&n,a=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),s=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),c=new Uint32Array(64);class d extends r.SHA2{constructor(){super(64,32,8,!1),this.A=0|s[0],this.B=0|s[1],this.C=0|s[2],this.D=0|s[3],this.E=0|s[4],this.F=0|s[5],this.G=0|s[6],this.H=0|s[7]}get(){const{A:e,B:t,C:n,D:r,E:o,F:i,G:a,H:s}=this;return[e,t,n,r,o,i,a,s]}set(e,t,n,r,o,i,a,s){this.A=0|e,this.B=0|t,this.C=0|n,this.D=0|r,this.E=0|o,this.F=0|i,this.G=0|a,this.H=0|s}process(e,t){for(let n=0;n<16;n++,t+=4)c[n]=e.getUint32(t,!1);for(let e=16;e<64;e++){const t=c[e-15],n=c[e-2],r=(0,o.rotr)(t,7)^(0,o.rotr)(t,18)^t>>>3,i=(0,o.rotr)(n,17)^(0,o.rotr)(n,19)^n>>>10;c[e]=i+c[e-7]+r+c[e-16]|0}let{A:n,B:r,C:s,D:d,E:u,F:l,G:A,H:f}=this;for(let e=0;e<64;e++){const t=f+((0,o.rotr)(u,6)^(0,o.rotr)(u,11)^(0,o.rotr)(u,25))+((h=u)&l^~h&A)+a[e]+c[e]|0,g=((0,o.rotr)(n,2)^(0,o.rotr)(n,13)^(0,o.rotr)(n,22))+i(n,r,s)|0;f=A,A=l,l=u,u=d+t|0,d=s,s=r,r=n,n=t+g|0}var h;n=n+this.A|0,r=r+this.B|0,s=s+this.C|0,d=d+this.D|0,u=u+this.E|0,l=l+this.F|0,A=A+this.G|0,f=f+this.H|0,this.set(n,r,s,d,u,l,A,f)}roundClean(){c.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}t.sha256=(0,o.wrapConstructor)((()=>new d))},5426:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.shake256=t.shake128=t.keccak_512=t.keccak_384=t.keccak_256=t.keccak_224=t.sha3_512=t.sha3_384=t.sha3_256=t.sha3_224=t.Keccak=t.keccakP=void 0;const a=i(n(6873)),s=n(8089),[c,d,u]=[[],[],[]],l=BigInt(0),A=BigInt(1),f=BigInt(2),h=BigInt(7),g=BigInt(256),p=BigInt(113);for(let e=0,t=A,n=1,r=0;e<24;e++){[n,r]=[r,(2*n+3*r)%5],c.push(2*(5*r+n)),d.push((e+1)*(e+2)/2%64);let o=l;for(let e=0;e<7;e++)t=(t<>h)*p)%g,t&f&&(o^=A<<(A<n>32?a.rotlBH(e,t,n):a.rotlSH(e,t,n),b=(e,t,n)=>n>32?a.rotlBL(e,t,n):a.rotlSL(e,t,n);function I(e,t=24){const n=new Uint32Array(10);for(let r=24-t;r<24;r++){for(let t=0;t<10;t++)n[t]=e[t]^e[t+10]^e[t+20]^e[t+30]^e[t+40];for(let t=0;t<10;t+=2){const r=(t+8)%10,o=(t+2)%10,i=n[o],a=n[o+1],s=y(i,a,1)^n[r],c=b(i,a,1)^n[r+1];for(let n=0;n<50;n+=10)e[t+n]^=s,e[t+n+1]^=c}let t=e[2],o=e[3];for(let n=0;n<24;n++){const r=d[n],i=y(t,o,r),a=b(t,o,r),s=c[n];t=e[s],o=e[s+1],e[s]=i,e[s+1]=a}for(let t=0;t<50;t+=10){for(let r=0;r<10;r++)n[r]=e[t+r];for(let r=0;r<10;r++)e[t+r]^=~n[(r+2)%10]&n[(r+4)%10]}e[0]^=m[r],e[1]^=v[r]}n.fill(0)}t.keccakP=I;class C extends s.Hash{constructor(e,t,n,r=!1,o=24){if(super(),this.blockLen=e,this.suffix=t,this.outputLen=n,this.enableXOF=r,this.rounds=o,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,(0,s.assertNumber)(n),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=(0,s.u32)(this.state)}keccak(){I(this.state32,this.rounds),this.posOut=0,this.pos=0}update(e){if(this.destroyed)throw new Error("instance is destroyed");if(this.finished)throw new Error("digest() was already called");const{blockLen:t,state:n}=this,r=(e=(0,s.toBytes)(e)).length;for(let o=0;o=this.blockLen&&this.keccak();const r=Math.min(this.blockLen-this.posOut,n-t);e.set(this.state.subarray(this.posOut,this.posOut+r),t),this.posOut+=r,t+=r}return e}xofInto(e){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return(0,s.assertNumber)(e),this.xofInto(new Uint8Array(e))}digestInto(e){if(e.length(0,s.wrapConstructor)((()=>new C(t,e,n)));t.sha3_224=E(6,144,28),t.sha3_256=E(6,136,32),t.sha3_384=E(6,104,48),t.sha3_512=E(6,72,64),t.keccak_224=E(1,144,28),t.keccak_256=E(1,136,32),t.keccak_384=E(1,104,48),t.keccak_512=E(1,72,64);const w=(e,t,n)=>(0,s.wrapConstructorWithOpts)(((r={})=>new C(t,e,void 0!==r.dkLen?r.dkLen:n,!0)));t.shake128=w(31,168,16),t.shake256=w(31,136,32)},6262:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.sha384=t.sha512_256=t.sha512=t.SHA512=void 0;const a=n(7505),s=i(n(6873)),c=n(8089),[d,u]=s.split(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map((e=>BigInt(e)))),l=new Uint32Array(80),A=new Uint32Array(80);class f extends a.SHA2{constructor(){super(128,64,16,!1),this.Ah=1779033703,this.Al=-205731576,this.Bh=-1150833019,this.Bl=-2067093701,this.Ch=1013904242,this.Cl=-23791573,this.Dh=-1521486534,this.Dl=1595750129,this.Eh=1359893119,this.El=-1377402159,this.Fh=-1694144372,this.Fl=725511199,this.Gh=528734635,this.Gl=-79577749,this.Hh=1541459225,this.Hl=327033209}get(){const{Ah:e,Al:t,Bh:n,Bl:r,Ch:o,Cl:i,Dh:a,Dl:s,Eh:c,El:d,Fh:u,Fl:l,Gh:A,Gl:f,Hh:h,Hl:g}=this;return[e,t,n,r,o,i,a,s,c,d,u,l,A,f,h,g]}set(e,t,n,r,o,i,a,s,c,d,u,l,A,f,h,g){this.Ah=0|e,this.Al=0|t,this.Bh=0|n,this.Bl=0|r,this.Ch=0|o,this.Cl=0|i,this.Dh=0|a,this.Dl=0|s,this.Eh=0|c,this.El=0|d,this.Fh=0|u,this.Fl=0|l,this.Gh=0|A,this.Gl=0|f,this.Hh=0|h,this.Hl=0|g}process(e,t){for(let n=0;n<16;n++,t+=4)l[n]=e.getUint32(t),A[n]=e.getUint32(t+=4);for(let e=16;e<80;e++){const t=0|l[e-15],n=0|A[e-15],r=s.rotrSH(t,n,1)^s.rotrSH(t,n,8)^s.shrSH(t,n,7),o=s.rotrSL(t,n,1)^s.rotrSL(t,n,8)^s.shrSL(t,n,7),i=0|l[e-2],a=0|A[e-2],c=s.rotrSH(i,a,19)^s.rotrBH(i,a,61)^s.shrSH(i,a,6),d=s.rotrSL(i,a,19)^s.rotrBL(i,a,61)^s.shrSL(i,a,6),u=s.add4L(o,d,A[e-7],A[e-16]),f=s.add4H(u,r,c,l[e-7],l[e-16]);l[e]=0|f,A[e]=0|u}let{Ah:n,Al:r,Bh:o,Bl:i,Ch:a,Cl:c,Dh:f,Dl:h,Eh:g,El:p,Fh:m,Fl:v,Gh:y,Gl:b,Hh:I,Hl:C}=this;for(let e=0;e<80;e++){const t=s.rotrSH(g,p,14)^s.rotrSH(g,p,18)^s.rotrBH(g,p,41),E=s.rotrSL(g,p,14)^s.rotrSL(g,p,18)^s.rotrBL(g,p,41),w=g&m^~g&y,B=p&v^~p&b,_=s.add5L(C,E,B,u[e],A[e]),S=s.add5H(_,I,t,w,d[e],l[e]),k=0|_,O=s.rotrSH(n,r,28)^s.rotrBH(n,r,34)^s.rotrBH(n,r,39),Q=s.rotrSL(n,r,28)^s.rotrBL(n,r,34)^s.rotrBL(n,r,39),R=n&o^n&a^o&a,P=r&i^r&c^i&c;I=0|y,C=0|b,y=0|m,b=0|v,m=0|g,v=0|p,({h:g,l:p}=s.add(0|f,0|h,0|S,0|k)),f=0|a,h=0|c,a=0|o,c=0|i,o=0|n,i=0|r;const N=s.add3L(k,Q,P);n=s.add3H(N,S,O,R),r=0|N}({h:n,l:r}=s.add(0|this.Ah,0|this.Al,0|n,0|r)),({h:o,l:i}=s.add(0|this.Bh,0|this.Bl,0|o,0|i)),({h:a,l:c}=s.add(0|this.Ch,0|this.Cl,0|a,0|c)),({h:f,l:h}=s.add(0|this.Dh,0|this.Dl,0|f,0|h)),({h:g,l:p}=s.add(0|this.Eh,0|this.El,0|g,0|p)),({h:m,l:v}=s.add(0|this.Fh,0|this.Fl,0|m,0|v)),({h:y,l:b}=s.add(0|this.Gh,0|this.Gl,0|y,0|b)),({h:I,l:C}=s.add(0|this.Hh,0|this.Hl,0|I,0|C)),this.set(n,r,o,i,a,c,f,h,g,p,m,v,y,b,I,C)}roundClean(){l.fill(0),A.fill(0)}destroy(){this.buffer.fill(0),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}t.SHA512=f;class h extends f{constructor(){super(),this.Ah=573645204,this.Al=-64227540,this.Bh=-1621794909,this.Bl=-934517566,this.Ch=596883563,this.Cl=1867755857,this.Dh=-1774684391,this.Dl=1497426621,this.Eh=-1775747358,this.El=-1467023389,this.Fh=-1101128155,this.Fl=1401305490,this.Gh=721525244,this.Gl=746961066,this.Hh=246885852,this.Hl=-2117784414,this.outputLen=32}}class g extends f{constructor(){super(),this.Ah=-876896931,this.Al=-1056596264,this.Bh=1654270250,this.Bl=914150663,this.Ch=-1856437926,this.Cl=812702999,this.Dh=355462360,this.Dl=-150054599,this.Eh=1731405415,this.El=-4191439,this.Fh=-1900787065,this.Fl=1750603025,this.Gh=-619958771,this.Gl=1694076839,this.Hh=1203062813,this.Hl=-1090891868,this.outputLen=48}}t.sha512=(0,c.wrapConstructor)((()=>new f)),t.sha512_256=(0,c.wrapConstructor)((()=>new h)),t.sha384=(0,c.wrapConstructor)((()=>new g))},8089:(e,t,n)=>{"use strict";e=n.nmd(e),Object.defineProperty(t,"__esModule",{value:!0}),t.randomBytes=t.wrapConstructorWithOpts=t.wrapConstructor=t.checkOpts=t.Hash=t.assertHash=t.assertBytes=t.assertBool=t.assertNumber=t.concatBytes=t.toBytes=t.utf8ToBytes=t.asyncLoop=t.nextTick=t.hexToBytes=t.bytesToHex=t.isLE=t.rotr=t.createView=t.u32=t.u8=void 0;const r=n(4421);if(t.u8=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength),t.u32=e=>new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4)),t.createView=e=>new DataView(e.buffer,e.byteOffset,e.byteLength),t.rotr=(e,t)=>e<<32-t|e>>>t,t.isLE=68===new Uint8Array(new Uint32Array([287454020]).buffer)[0],!t.isLE)throw new Error("Non little-endian hardware is not supported");const o=Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0")));function i(e){if("string"!=typeof e)throw new TypeError("utf8ToBytes expected string, got "+typeof e);return(new TextEncoder).encode(e)}function a(e){if("string"==typeof e&&(e=i(e)),!(e instanceof Uint8Array))throw new TypeError(`Expected input type is Uint8Array (got ${typeof e})`);return e}function s(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`Wrong positive integer: ${e}`)}t.bytesToHex=function(e){let t="";for(let n=0;n{const t="function"==typeof e.require&&e.require.bind(e);try{if(t){const{setImmediate:e}=t("timers");return()=>new Promise((t=>e(t)))}}catch(e){}return()=>new Promise((e=>setTimeout(e,0)))})(),t.asyncLoop=async function(e,n,r){let o=Date.now();for(let i=0;i=0&&ee instanceof Uint8Array)))throw new Error("Uint8Array list expected");if(1===e.length)return e[0];const t=e.reduce(((e,t)=>e+t.length),0),n=new Uint8Array(t);for(let t=0,r=0;te().update(a(t)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t},t.wrapConstructorWithOpts=function(e){const t=(t,n)=>e(n).update(a(t)).digest(),n=e({});return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=t=>e(t),t},t.randomBytes=function(e=32){if(r.crypto.web)return r.crypto.web.getRandomValues(new Uint8Array(e));if(r.crypto.node)return new Uint8Array(r.crypto.node.randomBytes(e).buffer);throw new Error("The environment doesn't have randomBytes function")}},4537:e=>{"use strict";e.exports=function(e,t){for(var n=new Array(arguments.length-1),r=0,o=2,i=!0;o{"use strict";var n=t;n.length=function(e){var t=e.length;if(!t)return 0;for(var n=0;--t%4>1&&"="===e.charAt(t);)++n;return Math.ceil(3*e.length)/4-n};for(var r=new Array(64),o=new Array(123),i=0;i<64;)o[r[i]=i<26?i+65:i<52?i+71:i<62?i-4:i-59|43]=i++;n.encode=function(e,t,n){for(var o,i=null,a=[],s=0,c=0;t>2],o=(3&d)<<4,c=1;break;case 1:a[s++]=r[o|d>>4],o=(15&d)<<2,c=2;break;case 2:a[s++]=r[o|d>>6],a[s++]=r[63&d],c=0}s>8191&&((i||(i=[])).push(String.fromCharCode.apply(String,a)),s=0)}return c&&(a[s++]=r[o],a[s++]=61,1===c&&(a[s++]=61)),i?(s&&i.push(String.fromCharCode.apply(String,a.slice(0,s))),i.join("")):String.fromCharCode.apply(String,a.slice(0,s))};var a="invalid encoding";n.decode=function(e,t,n){for(var r,i=n,s=0,c=0;c1)break;if(void 0===(d=o[d]))throw Error(a);switch(s){case 0:r=d,s=1;break;case 1:t[n++]=r<<2|(48&d)>>4,r=d,s=2;break;case 2:t[n++]=(15&r)<<4|(60&d)>>2,r=d,s=3;break;case 3:t[n++]=(3&r)<<6|d,s=0}}if(1===s)throw Error(a);return n-i},n.test=function(e){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(e)}},9211:e=>{"use strict";function t(){this._listeners={}}e.exports=t,t.prototype.on=function(e,t,n){return(this._listeners[e]||(this._listeners[e]=[])).push({fn:t,ctx:n||this}),this},t.prototype.off=function(e,t){if(void 0===e)this._listeners={};else if(void 0===t)this._listeners[e]=[];else for(var n=this._listeners[e],r=0;r{"use strict";function t(e){return"undefined"!=typeof Float32Array?function(){var t=new Float32Array([-0]),n=new Uint8Array(t.buffer),r=128===n[3];function o(e,r,o){t[0]=e,r[o]=n[0],r[o+1]=n[1],r[o+2]=n[2],r[o+3]=n[3]}function i(e,r,o){t[0]=e,r[o]=n[3],r[o+1]=n[2],r[o+2]=n[1],r[o+3]=n[0]}function a(e,r){return n[0]=e[r],n[1]=e[r+1],n[2]=e[r+2],n[3]=e[r+3],t[0]}function s(e,r){return n[3]=e[r],n[2]=e[r+1],n[1]=e[r+2],n[0]=e[r+3],t[0]}e.writeFloatLE=r?o:i,e.writeFloatBE=r?i:o,e.readFloatLE=r?a:s,e.readFloatBE=r?s:a}():function(){function t(e,t,n,r){var o=t<0?1:0;if(o&&(t=-t),0===t)e(1/t>0?0:2147483648,n,r);else if(isNaN(t))e(2143289344,n,r);else if(t>34028234663852886e22)e((o<<31|2139095040)>>>0,n,r);else if(t<11754943508222875e-54)e((o<<31|Math.round(t/1401298464324817e-60))>>>0,n,r);else{var i=Math.floor(Math.log(t)/Math.LN2);e((o<<31|i+127<<23|8388607&Math.round(t*Math.pow(2,-i)*8388608))>>>0,n,r)}}function a(e,t,n){var r=e(t,n),o=2*(r>>31)+1,i=r>>>23&255,a=8388607&r;return 255===i?a?NaN:o*(1/0):0===i?1401298464324817e-60*o*a:o*Math.pow(2,i-150)*(a+8388608)}e.writeFloatLE=t.bind(null,n),e.writeFloatBE=t.bind(null,r),e.readFloatLE=a.bind(null,o),e.readFloatBE=a.bind(null,i)}(),"undefined"!=typeof Float64Array?function(){var t=new Float64Array([-0]),n=new Uint8Array(t.buffer),r=128===n[7];function o(e,r,o){t[0]=e,r[o]=n[0],r[o+1]=n[1],r[o+2]=n[2],r[o+3]=n[3],r[o+4]=n[4],r[o+5]=n[5],r[o+6]=n[6],r[o+7]=n[7]}function i(e,r,o){t[0]=e,r[o]=n[7],r[o+1]=n[6],r[o+2]=n[5],r[o+3]=n[4],r[o+4]=n[3],r[o+5]=n[2],r[o+6]=n[1],r[o+7]=n[0]}function a(e,r){return n[0]=e[r],n[1]=e[r+1],n[2]=e[r+2],n[3]=e[r+3],n[4]=e[r+4],n[5]=e[r+5],n[6]=e[r+6],n[7]=e[r+7],t[0]}function s(e,r){return n[7]=e[r],n[6]=e[r+1],n[5]=e[r+2],n[4]=e[r+3],n[3]=e[r+4],n[2]=e[r+5],n[1]=e[r+6],n[0]=e[r+7],t[0]}e.writeDoubleLE=r?o:i,e.writeDoubleBE=r?i:o,e.readDoubleLE=r?a:s,e.readDoubleBE=r?s:a}():function(){function t(e,t,n,r,o,i){var a=r<0?1:0;if(a&&(r=-r),0===r)e(0,o,i+t),e(1/r>0?0:2147483648,o,i+n);else if(isNaN(r))e(0,o,i+t),e(2146959360,o,i+n);else if(r>17976931348623157e292)e(0,o,i+t),e((a<<31|2146435072)>>>0,o,i+n);else{var s;if(r<22250738585072014e-324)e((s=r/5e-324)>>>0,o,i+t),e((a<<31|s/4294967296)>>>0,o,i+n);else{var c=Math.floor(Math.log(r)/Math.LN2);1024===c&&(c=1023),e(4503599627370496*(s=r*Math.pow(2,-c))>>>0,o,i+t),e((a<<31|c+1023<<20|1048576*s&1048575)>>>0,o,i+n)}}}function a(e,t,n,r,o){var i=e(r,o+t),a=e(r,o+n),s=2*(a>>31)+1,c=a>>>20&2047,d=4294967296*(1048575&a)+i;return 2047===c?d?NaN:s*(1/0):0===c?5e-324*s*d:s*Math.pow(2,c-1075)*(d+4503599627370496)}e.writeDoubleLE=t.bind(null,n,0,4),e.writeDoubleBE=t.bind(null,r,4,0),e.readDoubleLE=a.bind(null,o,0,4),e.readDoubleBE=a.bind(null,i,4,0)}(),e}function n(e,t,n){t[n]=255&e,t[n+1]=e>>>8&255,t[n+2]=e>>>16&255,t[n+3]=e>>>24}function r(e,t,n){t[n]=e>>>24,t[n+1]=e>>>16&255,t[n+2]=e>>>8&255,t[n+3]=255&e}function o(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)>>>0}function i(e,t){return(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0}e.exports=t(t)},7199:module=>{"use strict";function inquire(moduleName){try{var mod=eval("quire".replace(/^/,"re"))(moduleName);if(mod&&(mod.length||Object.keys(mod).length))return mod}catch(e){}return null}module.exports=inquire},6662:e=>{"use strict";e.exports=function(e,t,n){var r=n||8192,o=r>>>1,i=null,a=r;return function(n){if(n<1||n>o)return e(n);a+n>r&&(i=e(r),a=0);var s=t.call(i,a,a+=n);return 7&a&&(a=1+(7|a)),s}}},4997:(e,t)=>{"use strict";var n=t;n.length=function(e){for(var t=0,n=0,r=0;r191&&r<224?i[a++]=(31&r)<<6|63&e[t++]:r>239&&r<365?(r=((7&r)<<18|(63&e[t++])<<12|(63&e[t++])<<6|63&e[t++])-65536,i[a++]=55296+(r>>10),i[a++]=56320+(1023&r)):i[a++]=(15&r)<<12|(63&e[t++])<<6|63&e[t++],a>8191&&((o||(o=[])).push(String.fromCharCode.apply(String,i)),a=0);return o?(a&&o.push(String.fromCharCode.apply(String,i.slice(0,a))),o.join("")):String.fromCharCode.apply(String,i.slice(0,a))},n.write=function(e,t,n){for(var r,o,i=n,a=0;a>6|192,t[n++]=63&r|128):55296==(64512&r)&&56320==(64512&(o=e.charCodeAt(a+1)))?(r=65536+((1023&r)<<10)+(1023&o),++a,t[n++]=r>>18|240,t[n++]=r>>12&63|128,t[n++]=r>>6&63|128,t[n++]=63&r|128):(t[n++]=r>>12|224,t[n++]=r>>6&63|128,t[n++]=63&r|128);return n-i}},9669:(e,t,n)=>{e.exports=n(1609)},5448:(e,t,n)=>{"use strict";var r=n(4867),o=n(6026),i=n(4372),a=n(5327),s=n(4097),c=n(4109),d=n(7985),u=n(5061);e.exports=function(e){return new Promise((function(t,n){var l=e.data,A=e.headers,f=e.responseType;r.isFormData(l)&&delete A["Content-Type"];var h=new XMLHttpRequest;if(e.auth){var g=e.auth.username||"",p=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";A.Authorization="Basic "+btoa(g+":"+p)}var m=s(e.baseURL,e.url);function v(){if(h){var r="getAllResponseHeaders"in h?c(h.getAllResponseHeaders()):null,i={data:f&&"text"!==f&&"json"!==f?h.response:h.responseText,status:h.status,statusText:h.statusText,headers:r,config:e,request:h};o(t,n,i),h=null}}if(h.open(e.method.toUpperCase(),a(m,e.params,e.paramsSerializer),!0),h.timeout=e.timeout,"onloadend"in h?h.onloadend=v:h.onreadystatechange=function(){h&&4===h.readyState&&(0!==h.status||h.responseURL&&0===h.responseURL.indexOf("file:"))&&setTimeout(v)},h.onabort=function(){h&&(n(u("Request aborted",e,"ECONNABORTED",h)),h=null)},h.onerror=function(){n(u("Network Error",e,null,h)),h=null},h.ontimeout=function(){var t="timeout of "+e.timeout+"ms exceeded";e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(u(t,e,e.transitional&&e.transitional.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",h)),h=null},r.isStandardBrowserEnv()){var y=(e.withCredentials||d(m))&&e.xsrfCookieName?i.read(e.xsrfCookieName):void 0;y&&(A[e.xsrfHeaderName]=y)}"setRequestHeader"in h&&r.forEach(A,(function(e,t){void 0===l&&"content-type"===t.toLowerCase()?delete A[t]:h.setRequestHeader(t,e)})),r.isUndefined(e.withCredentials)||(h.withCredentials=!!e.withCredentials),f&&"json"!==f&&(h.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&h.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&h.upload&&h.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then((function(e){h&&(h.abort(),n(e),h=null)})),l||(l=null),h.send(l)}))}},1609:(e,t,n)=>{"use strict";var r=n(4867),o=n(1849),i=n(321),a=n(7185);function s(e){var t=new i(e),n=o(i.prototype.request,t);return r.extend(n,i.prototype,t),r.extend(n,t),n}var c=s(n(5655));c.Axios=i,c.create=function(e){return s(a(c.defaults,e))},c.Cancel=n(5263),c.CancelToken=n(4972),c.isCancel=n(6502),c.all=function(e){return Promise.all(e)},c.spread=n(8713),c.isAxiosError=n(6268),e.exports=c,e.exports.default=c},5263:e=>{"use strict";function t(e){this.message=e}t.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},t.prototype.__CANCEL__=!0,e.exports=t},4972:(e,t,n)=>{"use strict";var r=n(5263);function o(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var n=this;e((function(e){n.reason||(n.reason=new r(e),t(n.reason))}))}o.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},o.source=function(){var e;return{token:new o((function(t){e=t})),cancel:e}},e.exports=o},6502:e=>{"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},321:(e,t,n)=>{"use strict";var r=n(4867),o=n(5327),i=n(782),a=n(3572),s=n(7185),c=n(4875),d=c.validators;function u(e){this.defaults=e,this.interceptors={request:new i,response:new i}}u.prototype.request=function(e){"string"==typeof e?(e=arguments[1]||{}).url=arguments[0]:e=e||{},(e=s(this.defaults,e)).method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var t=e.transitional;void 0!==t&&c.assertOptions(t,{silentJSONParsing:d.transitional(d.boolean,"1.0.0"),forcedJSONParsing:d.transitional(d.boolean,"1.0.0"),clarifyTimeoutError:d.transitional(d.boolean,"1.0.0")},!1);var n=[],r=!0;this.interceptors.request.forEach((function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(r=r&&t.synchronous,n.unshift(t.fulfilled,t.rejected))}));var o,i=[];if(this.interceptors.response.forEach((function(e){i.push(e.fulfilled,e.rejected)})),!r){var u=[a,void 0];for(Array.prototype.unshift.apply(u,n),u=u.concat(i),o=Promise.resolve(e);u.length;)o=o.then(u.shift(),u.shift());return o}for(var l=e;n.length;){var A=n.shift(),f=n.shift();try{l=A(l)}catch(e){f(e);break}}try{o=a(l)}catch(e){return Promise.reject(e)}for(;i.length;)o=o.then(i.shift(),i.shift());return o},u.prototype.getUri=function(e){return e=s(this.defaults,e),o(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},r.forEach(["delete","get","head","options"],(function(e){u.prototype[e]=function(t,n){return this.request(s(n||{},{method:e,url:t,data:(n||{}).data}))}})),r.forEach(["post","put","patch"],(function(e){u.prototype[e]=function(t,n,r){return this.request(s(r||{},{method:e,url:t,data:n}))}})),e.exports=u},782:(e,t,n)=>{"use strict";var r=n(4867);function o(){this.handlers=[]}o.prototype.use=function(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1},o.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},o.prototype.forEach=function(e){r.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=o},4097:(e,t,n)=>{"use strict";var r=n(1793),o=n(7303);e.exports=function(e,t){return e&&!r(t)?o(e,t):t}},5061:(e,t,n)=>{"use strict";var r=n(481);e.exports=function(e,t,n,o,i){var a=new Error(e);return r(a,t,n,o,i)}},3572:(e,t,n)=>{"use strict";var r=n(4867),o=n(8527),i=n(6502),a=n(5655);function s(e){e.cancelToken&&e.cancelToken.throwIfRequested()}e.exports=function(e){return s(e),e.headers=e.headers||{},e.data=o.call(e,e.data,e.headers,e.transformRequest),e.headers=r.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),r.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||a.adapter)(e).then((function(t){return s(e),t.data=o.call(e,t.data,t.headers,e.transformResponse),t}),(function(t){return i(t)||(s(e),t&&t.response&&(t.response.data=o.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},481:e=>{"use strict";e.exports=function(e,t,n,r,o){return e.config=t,n&&(e.code=n),e.request=r,e.response=o,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},e}},7185:(e,t,n)=>{"use strict";var r=n(4867);e.exports=function(e,t){t=t||{};var n={},o=["url","method","data"],i=["headers","auth","proxy","params"],a=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],s=["validateStatus"];function c(e,t){return r.isPlainObject(e)&&r.isPlainObject(t)?r.merge(e,t):r.isPlainObject(t)?r.merge({},t):r.isArray(t)?t.slice():t}function d(o){r.isUndefined(t[o])?r.isUndefined(e[o])||(n[o]=c(void 0,e[o])):n[o]=c(e[o],t[o])}r.forEach(o,(function(e){r.isUndefined(t[e])||(n[e]=c(void 0,t[e]))})),r.forEach(i,d),r.forEach(a,(function(o){r.isUndefined(t[o])?r.isUndefined(e[o])||(n[o]=c(void 0,e[o])):n[o]=c(void 0,t[o])})),r.forEach(s,(function(r){r in t?n[r]=c(e[r],t[r]):r in e&&(n[r]=c(void 0,e[r]))}));var u=o.concat(i).concat(a).concat(s),l=Object.keys(e).concat(Object.keys(t)).filter((function(e){return-1===u.indexOf(e)}));return r.forEach(l,d),n}},6026:(e,t,n)=>{"use strict";var r=n(5061);e.exports=function(e,t,n){var o=n.config.validateStatus;n.status&&o&&!o(n.status)?t(r("Request failed with status code "+n.status,n.config,null,n.request,n)):e(n)}},8527:(e,t,n)=>{"use strict";var r=n(4867),o=n(5655);e.exports=function(e,t,n){var i=this||o;return r.forEach(n,(function(n){e=n.call(i,e,t)})),e}},5655:(e,t,n)=>{"use strict";var r=n(4155),o=n(4867),i=n(6016),a=n(481),s={"Content-Type":"application/x-www-form-urlencoded"};function c(e,t){!o.isUndefined(e)&&o.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var d,u={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:(("undefined"!=typeof XMLHttpRequest||void 0!==r&&"[object process]"===Object.prototype.toString.call(r))&&(d=n(5448)),d),transformRequest:[function(e,t){return i(t,"Accept"),i(t,"Content-Type"),o.isFormData(e)||o.isArrayBuffer(e)||o.isBuffer(e)||o.isStream(e)||o.isFile(e)||o.isBlob(e)?e:o.isArrayBufferView(e)?e.buffer:o.isURLSearchParams(e)?(c(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):o.isObject(e)||t&&"application/json"===t["Content-Type"]?(c(t,"application/json"),function(e,t,n){if(o.isString(e))try{return(0,JSON.parse)(e),o.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional,n=t&&t.silentJSONParsing,r=t&&t.forcedJSONParsing,i=!n&&"json"===this.responseType;if(i||r&&o.isString(e)&&e.length)try{return JSON.parse(e)}catch(e){if(i){if("SyntaxError"===e.name)throw a(e,this,"E_JSON_PARSE");throw e}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};o.forEach(["delete","get","head"],(function(e){u.headers[e]={}})),o.forEach(["post","put","patch"],(function(e){u.headers[e]=o.merge(s)})),e.exports=u},1849:e=>{"use strict";e.exports=function(e,t){return function(){for(var n=new Array(arguments.length),r=0;r{"use strict";var r=n(4867);function o(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,n){if(!t)return e;var i;if(n)i=n(t);else if(r.isURLSearchParams(t))i=t.toString();else{var a=[];r.forEach(t,(function(e,t){null!=e&&(r.isArray(e)?t+="[]":e=[e],r.forEach(e,(function(e){r.isDate(e)?e=e.toISOString():r.isObject(e)&&(e=JSON.stringify(e)),a.push(o(t)+"="+o(e))})))})),i=a.join("&")}if(i){var s=e.indexOf("#");-1!==s&&(e=e.slice(0,s)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}},7303:e=>{"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},4372:(e,t,n)=>{"use strict";var r=n(4867);e.exports=r.isStandardBrowserEnv()?{write:function(e,t,n,o,i,a){var s=[];s.push(e+"="+encodeURIComponent(t)),r.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),r.isString(o)&&s.push("path="+o),r.isString(i)&&s.push("domain="+i),!0===a&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},1793:e=>{"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},6268:e=>{"use strict";e.exports=function(e){return"object"==typeof e&&!0===e.isAxiosError}},7985:(e,t,n)=>{"use strict";var r=n(4867);e.exports=r.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function o(e){var r=e;return t&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=o(window.location.href),function(t){var n=r.isString(t)?o(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0}},6016:(e,t,n)=>{"use strict";var r=n(4867);e.exports=function(e,t){r.forEach(e,(function(n,r){r!==t&&r.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[r])}))}},4109:(e,t,n)=>{"use strict";var r=n(4867),o=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,n,i,a={};return e?(r.forEach(e.split("\n"),(function(e){if(i=e.indexOf(":"),t=r.trim(e.substr(0,i)).toLowerCase(),n=r.trim(e.substr(i+1)),t){if(a[t]&&o.indexOf(t)>=0)return;a[t]="set-cookie"===t?(a[t]?a[t]:[]).concat([n]):a[t]?a[t]+", "+n:n}})),a):a}},8713:e=>{"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},4875:(e,t,n)=>{"use strict";var r=n(8593),o={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){o[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));var i={},a=r.version.split(".");function s(e,t){for(var n=t?t.split("."):a,r=e.split("."),o=0;o<3;o++){if(n[o]>r[o])return!0;if(n[o]0;){var i=r[o],a=t[i];if(a){var s=e[i],c=void 0===s||a(s,i,e);if(!0!==c)throw new TypeError("option "+i+" must be "+c)}else if(!0!==n)throw Error("Unknown option "+i)}},validators:o}},4867:(e,t,n)=>{"use strict";var r=n(1849),o=Object.prototype.toString;function i(e){return"[object Array]"===o.call(e)}function a(e){return void 0===e}function s(e){return null!==e&&"object"==typeof e}function c(e){if("[object Object]"!==o.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function d(e){return"[object Function]"===o.call(e)}function u(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),i(e))for(var n=0,r=e.length;n{"use strict";t.byteLength=function(e){var t=c(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){var t,n,i=c(e),a=i[0],s=i[1],d=new o(function(e,t,n){return 3*(t+n)/4-n}(0,a,s)),u=0,l=s>0?a-4:a;for(n=0;n>16&255,d[u++]=t>>8&255,d[u++]=255&t;return 2===s&&(t=r[e.charCodeAt(n)]<<2|r[e.charCodeAt(n+1)]>>4,d[u++]=255&t),1===s&&(t=r[e.charCodeAt(n)]<<10|r[e.charCodeAt(n+1)]<<4|r[e.charCodeAt(n+2)]>>2,d[u++]=t>>8&255,d[u++]=255&t),d},t.fromByteArray=function(e){for(var t,r=e.length,o=r%3,i=[],a=16383,s=0,c=r-o;sc?c:s+a));return 1===o?(t=e[r-1],i.push(n[t>>2]+n[t<<4&63]+"==")):2===o&&(t=(e[r-2]<<8)+e[r-1],i.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"=")),i.join("")};for(var n=[],r=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,s=i.length;a0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function d(e,t,r){for(var o,i,a=[],s=t;s>18&63]+n[i>>12&63]+n[i>>6&63]+n[63&i]);return a.join("")}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},2882:e=>{"use strict";for(var t="qpzry9x8gf2tvdw0s3jn54khce6mua7l",n={},r=0;r>25;return(33554431&e)<<5^996825010&-(t>>0&1)^642813549&-(t>>1&1)^513874426&-(t>>2&1)^1027748829&-(t>>3&1)^705979059&-(t>>4&1)}function a(e){for(var t=1,n=0;n126)return"Invalid prefix ("+e+")";t=i(t)^r>>5}for(t=i(t),n=0;nt)return"Exceeds length limit";var r=e.toLowerCase(),o=e.toUpperCase();if(e!==r&&e!==o)return"Mixed-case string "+e;var s=(e=r).lastIndexOf("1");if(-1===s)return"No separator character for "+e;if(0===s)return"Missing prefix for "+e;var c=e.slice(0,s),d=e.slice(s+1);if(d.length<6)return"Data too short";var u=a(c);if("string"==typeof u)return u;for(var l=[],A=0;A=d.length||l.push(h)}return 1!==u?"Invalid checksum for "+e:{prefix:c,words:l}}function c(e,t,n,r){for(var o=0,i=0,a=(1<=n;)i-=n,s.push(o>>i&a);if(r)i>0&&s.push(o<=t)return"Excess padding";if(o<r)throw new TypeError("Exceeds length limit");var o=a(e=e.toLowerCase());if("string"==typeof o)throw new Error(o);for(var s=e+"1",c=0;c>5!=0)throw new Error("Non 5-bit word");o=i(o)^d,s+=t.charAt(d)}for(c=0;c<6;++c)o=i(o);for(o^=1,c=0;c<6;++c)s+=t.charAt(o>>5*(5-c)&31);return s},toWordsUnsafe:function(e){var t=c(e,8,5,!0);if(Array.isArray(t))return t},toWords:function(e){var t=c(e,8,5,!0);if(Array.isArray(t))return t;throw new Error(t)},fromWordsUnsafe:function(e){var t=c(e,5,8,!1);if(Array.isArray(t))return t},fromWords:function(e){var t=c(e,5,8,!1);if(Array.isArray(t))return t;throw new Error(t)}}},3550:function(e,t,n){!function(e,t){"use strict";function r(e,t){if(!e)throw new Error(t||"Assertion failed")}function o(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}function i(e,t,n){if(i.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(n=t,t=10),this._init(e||0,t||10,n||"be"))}var a;"object"==typeof e?e.exports=i:t.BN=i,i.BN=i,i.wordSize=26;try{a="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:n(6601).Buffer}catch(e){}function s(e,t){var n=e.charCodeAt(t);return n>=48&&n<=57?n-48:n>=65&&n<=70?n-55:n>=97&&n<=102?n-87:void r(!1,"Invalid character in "+e)}function c(e,t,n){var r=s(e,n);return n-1>=t&&(r|=s(e,n-1)<<4),r}function d(e,t,n,o){for(var i=0,a=0,s=Math.min(e.length,n),c=t;c=49?d-49+10:d>=17?d-17+10:d,r(d>=0&&a0?e:t},i.min=function(e,t){return e.cmp(t)<0?e:t},i.prototype._init=function(e,t,n){if("number"==typeof e)return this._initNumber(e,t,n);if("object"==typeof e)return this._initArray(e,t,n);"hex"===t&&(t=16),r(t===(0|t)&&t>=2&&t<=36);var o=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(o++,this.negative=1),o=0;o-=3)a=e[o]|e[o-1]<<8|e[o-2]<<16,this.words[i]|=a<>>26-s&67108863,(s+=24)>=26&&(s-=26,i++);else if("le"===n)for(o=0,i=0;o>>26-s&67108863,(s+=24)>=26&&(s-=26,i++);return this._strip()},i.prototype._parseHex=function(e,t,n){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var r=0;r=t;r-=2)o=c(e,t,r)<=18?(i-=18,a+=1,this.words[a]|=o>>>26):i+=8;else for(r=(e.length-t)%2==0?t+1:t;r=18?(i-=18,a+=1,this.words[a]|=o>>>26):i+=8;this._strip()},i.prototype._parseBase=function(e,t,n){this.words=[0],this.length=1;for(var r=0,o=1;o<=67108863;o*=t)r++;r--,o=o/t|0;for(var i=e.length-n,a=i%r,s=Math.min(i,i-a)+n,c=0,u=n;u1&&0===this.words[this.length-1];)this.length--;return this._normSign()},i.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{i.prototype[Symbol.for("nodejs.util.inspect.custom")]=l}catch(e){i.prototype.inspect=l}else i.prototype.inspect=l;function l(){return(this.red?""}var A=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],f=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],h=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function g(e,t,n){n.negative=t.negative^e.negative;var r=e.length+t.length|0;n.length=r,r=r-1|0;var o=0|e.words[0],i=0|t.words[0],a=o*i,s=67108863&a,c=a/67108864|0;n.words[0]=s;for(var d=1;d>>26,l=67108863&c,A=Math.min(d,t.length-1),f=Math.max(0,d-e.length+1);f<=A;f++){var h=d-f|0;u+=(a=(o=0|e.words[h])*(i=0|t.words[f])+l)/67108864|0,l=67108863&a}n.words[d]=0|l,c=0|u}return 0!==c?n.words[d]=0|c:n.length--,n._strip()}i.prototype.toString=function(e,t){var n;if(t=0|t||1,16===(e=e||10)||"hex"===e){n="";for(var o=0,i=0,a=0;a>>24-o&16777215)||a!==this.length-1?A[6-c.length]+c+n:c+n,(o+=2)>=26&&(o-=26,a--)}for(0!==i&&(n=i.toString(16)+n);n.length%t!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(e===(0|e)&&e>=2&&e<=36){var d=f[e],u=h[e];n="";var l=this.clone();for(l.negative=0;!l.isZero();){var g=l.modrn(u).toString(e);n=(l=l.idivn(u)).isZero()?g+n:A[d-g.length]+g+n}for(this.isZero()&&(n="0"+n);n.length%t!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}r(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},i.prototype.toJSON=function(){return this.toString(16,2)},a&&(i.prototype.toBuffer=function(e,t){return this.toArrayLike(a,e,t)}),i.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},i.prototype.toArrayLike=function(e,t,n){this._strip();var o=this.byteLength(),i=n||Math.max(1,o);r(o<=i,"byte array longer than desired length"),r(i>0,"Requested array length <= 0");var a=function(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t)}(e,i);return this["_toArrayLike"+("le"===t?"LE":"BE")](a,o),a},i.prototype._toArrayLikeLE=function(e,t){for(var n=0,r=0,o=0,i=0;o>8&255),n>16&255),6===i?(n>24&255),r=0,i=0):(r=a>>>24,i+=2)}if(n=0&&(e[n--]=a>>8&255),n>=0&&(e[n--]=a>>16&255),6===i?(n>=0&&(e[n--]=a>>24&255),r=0,i=0):(r=a>>>24,i+=2)}if(n>=0)for(e[n--]=r;n>=0;)e[n--]=0},Math.clz32?i.prototype._countBits=function(e){return 32-Math.clz32(e)}:i.prototype._countBits=function(e){var t=e,n=0;return t>=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},i.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,n=0;return 0==(8191&t)&&(n+=13,t>>>=13),0==(127&t)&&(n+=7,t>>>=7),0==(15&t)&&(n+=4,t>>>=4),0==(3&t)&&(n+=2,t>>>=2),0==(1&t)&&n++,n},i.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},i.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},i.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var n=0;ne.length?this.clone().iand(e):e.clone().iand(this)},i.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},i.prototype.iuxor=function(e){var t,n;this.length>e.length?(t=this,n=e):(t=e,n=this);for(var r=0;re.length?this.clone().ixor(e):e.clone().ixor(this)},i.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},i.prototype.inotn=function(e){r("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),n=e%26;this._expand(t),n>0&&t--;for(var o=0;o0&&(this.words[o]=~this.words[o]&67108863>>26-n),this._strip()},i.prototype.notn=function(e){return this.clone().inotn(e)},i.prototype.setn=function(e,t){r("number"==typeof e&&e>=0);var n=e/26|0,o=e%26;return this._expand(n+1),this.words[n]=t?this.words[n]|1<e.length?(n=this,r=e):(n=e,r=this);for(var o=0,i=0;i>>26;for(;0!==o&&i>>26;if(this.length=n.length,0!==o)this.words[this.length]=o,this.length++;else if(n!==this)for(;ie.length?this.clone().iadd(e):e.clone().iadd(this)},i.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var n,r,o=this.cmp(e);if(0===o)return this.negative=0,this.length=1,this.words[0]=0,this;o>0?(n=this,r=e):(n=e,r=this);for(var i=0,a=0;a>26,this.words[a]=67108863&t;for(;0!==i&&a>26,this.words[a]=67108863&t;if(0===i&&a>>13,f=0|a[1],h=8191&f,g=f>>>13,p=0|a[2],m=8191&p,v=p>>>13,y=0|a[3],b=8191&y,I=y>>>13,C=0|a[4],E=8191&C,w=C>>>13,B=0|a[5],_=8191&B,S=B>>>13,k=0|a[6],O=8191&k,Q=k>>>13,R=0|a[7],P=8191&R,N=R>>>13,x=0|a[8],D=8191&x,M=x>>>13,T=0|a[9],U=8191&T,H=T>>>13,j=0|s[0],J=8191&j,F=j>>>13,G=0|s[1],L=8191&G,q=G>>>13,Y=0|s[2],V=8191&Y,W=Y>>>13,K=0|s[3],Z=8191&K,z=K>>>13,X=0|s[4],$=8191&X,ee=X>>>13,te=0|s[5],ne=8191&te,re=te>>>13,oe=0|s[6],ie=8191&oe,ae=oe>>>13,se=0|s[7],ce=8191&se,de=se>>>13,ue=0|s[8],le=8191&ue,Ae=ue>>>13,fe=0|s[9],he=8191&fe,ge=fe>>>13;n.negative=e.negative^t.negative,n.length=19;var pe=(d+(r=Math.imul(l,J))|0)+((8191&(o=(o=Math.imul(l,F))+Math.imul(A,J)|0))<<13)|0;d=((i=Math.imul(A,F))+(o>>>13)|0)+(pe>>>26)|0,pe&=67108863,r=Math.imul(h,J),o=(o=Math.imul(h,F))+Math.imul(g,J)|0,i=Math.imul(g,F);var me=(d+(r=r+Math.imul(l,L)|0)|0)+((8191&(o=(o=o+Math.imul(l,q)|0)+Math.imul(A,L)|0))<<13)|0;d=((i=i+Math.imul(A,q)|0)+(o>>>13)|0)+(me>>>26)|0,me&=67108863,r=Math.imul(m,J),o=(o=Math.imul(m,F))+Math.imul(v,J)|0,i=Math.imul(v,F),r=r+Math.imul(h,L)|0,o=(o=o+Math.imul(h,q)|0)+Math.imul(g,L)|0,i=i+Math.imul(g,q)|0;var ve=(d+(r=r+Math.imul(l,V)|0)|0)+((8191&(o=(o=o+Math.imul(l,W)|0)+Math.imul(A,V)|0))<<13)|0;d=((i=i+Math.imul(A,W)|0)+(o>>>13)|0)+(ve>>>26)|0,ve&=67108863,r=Math.imul(b,J),o=(o=Math.imul(b,F))+Math.imul(I,J)|0,i=Math.imul(I,F),r=r+Math.imul(m,L)|0,o=(o=o+Math.imul(m,q)|0)+Math.imul(v,L)|0,i=i+Math.imul(v,q)|0,r=r+Math.imul(h,V)|0,o=(o=o+Math.imul(h,W)|0)+Math.imul(g,V)|0,i=i+Math.imul(g,W)|0;var ye=(d+(r=r+Math.imul(l,Z)|0)|0)+((8191&(o=(o=o+Math.imul(l,z)|0)+Math.imul(A,Z)|0))<<13)|0;d=((i=i+Math.imul(A,z)|0)+(o>>>13)|0)+(ye>>>26)|0,ye&=67108863,r=Math.imul(E,J),o=(o=Math.imul(E,F))+Math.imul(w,J)|0,i=Math.imul(w,F),r=r+Math.imul(b,L)|0,o=(o=o+Math.imul(b,q)|0)+Math.imul(I,L)|0,i=i+Math.imul(I,q)|0,r=r+Math.imul(m,V)|0,o=(o=o+Math.imul(m,W)|0)+Math.imul(v,V)|0,i=i+Math.imul(v,W)|0,r=r+Math.imul(h,Z)|0,o=(o=o+Math.imul(h,z)|0)+Math.imul(g,Z)|0,i=i+Math.imul(g,z)|0;var be=(d+(r=r+Math.imul(l,$)|0)|0)+((8191&(o=(o=o+Math.imul(l,ee)|0)+Math.imul(A,$)|0))<<13)|0;d=((i=i+Math.imul(A,ee)|0)+(o>>>13)|0)+(be>>>26)|0,be&=67108863,r=Math.imul(_,J),o=(o=Math.imul(_,F))+Math.imul(S,J)|0,i=Math.imul(S,F),r=r+Math.imul(E,L)|0,o=(o=o+Math.imul(E,q)|0)+Math.imul(w,L)|0,i=i+Math.imul(w,q)|0,r=r+Math.imul(b,V)|0,o=(o=o+Math.imul(b,W)|0)+Math.imul(I,V)|0,i=i+Math.imul(I,W)|0,r=r+Math.imul(m,Z)|0,o=(o=o+Math.imul(m,z)|0)+Math.imul(v,Z)|0,i=i+Math.imul(v,z)|0,r=r+Math.imul(h,$)|0,o=(o=o+Math.imul(h,ee)|0)+Math.imul(g,$)|0,i=i+Math.imul(g,ee)|0;var Ie=(d+(r=r+Math.imul(l,ne)|0)|0)+((8191&(o=(o=o+Math.imul(l,re)|0)+Math.imul(A,ne)|0))<<13)|0;d=((i=i+Math.imul(A,re)|0)+(o>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,r=Math.imul(O,J),o=(o=Math.imul(O,F))+Math.imul(Q,J)|0,i=Math.imul(Q,F),r=r+Math.imul(_,L)|0,o=(o=o+Math.imul(_,q)|0)+Math.imul(S,L)|0,i=i+Math.imul(S,q)|0,r=r+Math.imul(E,V)|0,o=(o=o+Math.imul(E,W)|0)+Math.imul(w,V)|0,i=i+Math.imul(w,W)|0,r=r+Math.imul(b,Z)|0,o=(o=o+Math.imul(b,z)|0)+Math.imul(I,Z)|0,i=i+Math.imul(I,z)|0,r=r+Math.imul(m,$)|0,o=(o=o+Math.imul(m,ee)|0)+Math.imul(v,$)|0,i=i+Math.imul(v,ee)|0,r=r+Math.imul(h,ne)|0,o=(o=o+Math.imul(h,re)|0)+Math.imul(g,ne)|0,i=i+Math.imul(g,re)|0;var Ce=(d+(r=r+Math.imul(l,ie)|0)|0)+((8191&(o=(o=o+Math.imul(l,ae)|0)+Math.imul(A,ie)|0))<<13)|0;d=((i=i+Math.imul(A,ae)|0)+(o>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,r=Math.imul(P,J),o=(o=Math.imul(P,F))+Math.imul(N,J)|0,i=Math.imul(N,F),r=r+Math.imul(O,L)|0,o=(o=o+Math.imul(O,q)|0)+Math.imul(Q,L)|0,i=i+Math.imul(Q,q)|0,r=r+Math.imul(_,V)|0,o=(o=o+Math.imul(_,W)|0)+Math.imul(S,V)|0,i=i+Math.imul(S,W)|0,r=r+Math.imul(E,Z)|0,o=(o=o+Math.imul(E,z)|0)+Math.imul(w,Z)|0,i=i+Math.imul(w,z)|0,r=r+Math.imul(b,$)|0,o=(o=o+Math.imul(b,ee)|0)+Math.imul(I,$)|0,i=i+Math.imul(I,ee)|0,r=r+Math.imul(m,ne)|0,o=(o=o+Math.imul(m,re)|0)+Math.imul(v,ne)|0,i=i+Math.imul(v,re)|0,r=r+Math.imul(h,ie)|0,o=(o=o+Math.imul(h,ae)|0)+Math.imul(g,ie)|0,i=i+Math.imul(g,ae)|0;var Ee=(d+(r=r+Math.imul(l,ce)|0)|0)+((8191&(o=(o=o+Math.imul(l,de)|0)+Math.imul(A,ce)|0))<<13)|0;d=((i=i+Math.imul(A,de)|0)+(o>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,r=Math.imul(D,J),o=(o=Math.imul(D,F))+Math.imul(M,J)|0,i=Math.imul(M,F),r=r+Math.imul(P,L)|0,o=(o=o+Math.imul(P,q)|0)+Math.imul(N,L)|0,i=i+Math.imul(N,q)|0,r=r+Math.imul(O,V)|0,o=(o=o+Math.imul(O,W)|0)+Math.imul(Q,V)|0,i=i+Math.imul(Q,W)|0,r=r+Math.imul(_,Z)|0,o=(o=o+Math.imul(_,z)|0)+Math.imul(S,Z)|0,i=i+Math.imul(S,z)|0,r=r+Math.imul(E,$)|0,o=(o=o+Math.imul(E,ee)|0)+Math.imul(w,$)|0,i=i+Math.imul(w,ee)|0,r=r+Math.imul(b,ne)|0,o=(o=o+Math.imul(b,re)|0)+Math.imul(I,ne)|0,i=i+Math.imul(I,re)|0,r=r+Math.imul(m,ie)|0,o=(o=o+Math.imul(m,ae)|0)+Math.imul(v,ie)|0,i=i+Math.imul(v,ae)|0,r=r+Math.imul(h,ce)|0,o=(o=o+Math.imul(h,de)|0)+Math.imul(g,ce)|0,i=i+Math.imul(g,de)|0;var we=(d+(r=r+Math.imul(l,le)|0)|0)+((8191&(o=(o=o+Math.imul(l,Ae)|0)+Math.imul(A,le)|0))<<13)|0;d=((i=i+Math.imul(A,Ae)|0)+(o>>>13)|0)+(we>>>26)|0,we&=67108863,r=Math.imul(U,J),o=(o=Math.imul(U,F))+Math.imul(H,J)|0,i=Math.imul(H,F),r=r+Math.imul(D,L)|0,o=(o=o+Math.imul(D,q)|0)+Math.imul(M,L)|0,i=i+Math.imul(M,q)|0,r=r+Math.imul(P,V)|0,o=(o=o+Math.imul(P,W)|0)+Math.imul(N,V)|0,i=i+Math.imul(N,W)|0,r=r+Math.imul(O,Z)|0,o=(o=o+Math.imul(O,z)|0)+Math.imul(Q,Z)|0,i=i+Math.imul(Q,z)|0,r=r+Math.imul(_,$)|0,o=(o=o+Math.imul(_,ee)|0)+Math.imul(S,$)|0,i=i+Math.imul(S,ee)|0,r=r+Math.imul(E,ne)|0,o=(o=o+Math.imul(E,re)|0)+Math.imul(w,ne)|0,i=i+Math.imul(w,re)|0,r=r+Math.imul(b,ie)|0,o=(o=o+Math.imul(b,ae)|0)+Math.imul(I,ie)|0,i=i+Math.imul(I,ae)|0,r=r+Math.imul(m,ce)|0,o=(o=o+Math.imul(m,de)|0)+Math.imul(v,ce)|0,i=i+Math.imul(v,de)|0,r=r+Math.imul(h,le)|0,o=(o=o+Math.imul(h,Ae)|0)+Math.imul(g,le)|0,i=i+Math.imul(g,Ae)|0;var Be=(d+(r=r+Math.imul(l,he)|0)|0)+((8191&(o=(o=o+Math.imul(l,ge)|0)+Math.imul(A,he)|0))<<13)|0;d=((i=i+Math.imul(A,ge)|0)+(o>>>13)|0)+(Be>>>26)|0,Be&=67108863,r=Math.imul(U,L),o=(o=Math.imul(U,q))+Math.imul(H,L)|0,i=Math.imul(H,q),r=r+Math.imul(D,V)|0,o=(o=o+Math.imul(D,W)|0)+Math.imul(M,V)|0,i=i+Math.imul(M,W)|0,r=r+Math.imul(P,Z)|0,o=(o=o+Math.imul(P,z)|0)+Math.imul(N,Z)|0,i=i+Math.imul(N,z)|0,r=r+Math.imul(O,$)|0,o=(o=o+Math.imul(O,ee)|0)+Math.imul(Q,$)|0,i=i+Math.imul(Q,ee)|0,r=r+Math.imul(_,ne)|0,o=(o=o+Math.imul(_,re)|0)+Math.imul(S,ne)|0,i=i+Math.imul(S,re)|0,r=r+Math.imul(E,ie)|0,o=(o=o+Math.imul(E,ae)|0)+Math.imul(w,ie)|0,i=i+Math.imul(w,ae)|0,r=r+Math.imul(b,ce)|0,o=(o=o+Math.imul(b,de)|0)+Math.imul(I,ce)|0,i=i+Math.imul(I,de)|0,r=r+Math.imul(m,le)|0,o=(o=o+Math.imul(m,Ae)|0)+Math.imul(v,le)|0,i=i+Math.imul(v,Ae)|0;var _e=(d+(r=r+Math.imul(h,he)|0)|0)+((8191&(o=(o=o+Math.imul(h,ge)|0)+Math.imul(g,he)|0))<<13)|0;d=((i=i+Math.imul(g,ge)|0)+(o>>>13)|0)+(_e>>>26)|0,_e&=67108863,r=Math.imul(U,V),o=(o=Math.imul(U,W))+Math.imul(H,V)|0,i=Math.imul(H,W),r=r+Math.imul(D,Z)|0,o=(o=o+Math.imul(D,z)|0)+Math.imul(M,Z)|0,i=i+Math.imul(M,z)|0,r=r+Math.imul(P,$)|0,o=(o=o+Math.imul(P,ee)|0)+Math.imul(N,$)|0,i=i+Math.imul(N,ee)|0,r=r+Math.imul(O,ne)|0,o=(o=o+Math.imul(O,re)|0)+Math.imul(Q,ne)|0,i=i+Math.imul(Q,re)|0,r=r+Math.imul(_,ie)|0,o=(o=o+Math.imul(_,ae)|0)+Math.imul(S,ie)|0,i=i+Math.imul(S,ae)|0,r=r+Math.imul(E,ce)|0,o=(o=o+Math.imul(E,de)|0)+Math.imul(w,ce)|0,i=i+Math.imul(w,de)|0,r=r+Math.imul(b,le)|0,o=(o=o+Math.imul(b,Ae)|0)+Math.imul(I,le)|0,i=i+Math.imul(I,Ae)|0;var Se=(d+(r=r+Math.imul(m,he)|0)|0)+((8191&(o=(o=o+Math.imul(m,ge)|0)+Math.imul(v,he)|0))<<13)|0;d=((i=i+Math.imul(v,ge)|0)+(o>>>13)|0)+(Se>>>26)|0,Se&=67108863,r=Math.imul(U,Z),o=(o=Math.imul(U,z))+Math.imul(H,Z)|0,i=Math.imul(H,z),r=r+Math.imul(D,$)|0,o=(o=o+Math.imul(D,ee)|0)+Math.imul(M,$)|0,i=i+Math.imul(M,ee)|0,r=r+Math.imul(P,ne)|0,o=(o=o+Math.imul(P,re)|0)+Math.imul(N,ne)|0,i=i+Math.imul(N,re)|0,r=r+Math.imul(O,ie)|0,o=(o=o+Math.imul(O,ae)|0)+Math.imul(Q,ie)|0,i=i+Math.imul(Q,ae)|0,r=r+Math.imul(_,ce)|0,o=(o=o+Math.imul(_,de)|0)+Math.imul(S,ce)|0,i=i+Math.imul(S,de)|0,r=r+Math.imul(E,le)|0,o=(o=o+Math.imul(E,Ae)|0)+Math.imul(w,le)|0,i=i+Math.imul(w,Ae)|0;var ke=(d+(r=r+Math.imul(b,he)|0)|0)+((8191&(o=(o=o+Math.imul(b,ge)|0)+Math.imul(I,he)|0))<<13)|0;d=((i=i+Math.imul(I,ge)|0)+(o>>>13)|0)+(ke>>>26)|0,ke&=67108863,r=Math.imul(U,$),o=(o=Math.imul(U,ee))+Math.imul(H,$)|0,i=Math.imul(H,ee),r=r+Math.imul(D,ne)|0,o=(o=o+Math.imul(D,re)|0)+Math.imul(M,ne)|0,i=i+Math.imul(M,re)|0,r=r+Math.imul(P,ie)|0,o=(o=o+Math.imul(P,ae)|0)+Math.imul(N,ie)|0,i=i+Math.imul(N,ae)|0,r=r+Math.imul(O,ce)|0,o=(o=o+Math.imul(O,de)|0)+Math.imul(Q,ce)|0,i=i+Math.imul(Q,de)|0,r=r+Math.imul(_,le)|0,o=(o=o+Math.imul(_,Ae)|0)+Math.imul(S,le)|0,i=i+Math.imul(S,Ae)|0;var Oe=(d+(r=r+Math.imul(E,he)|0)|0)+((8191&(o=(o=o+Math.imul(E,ge)|0)+Math.imul(w,he)|0))<<13)|0;d=((i=i+Math.imul(w,ge)|0)+(o>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,r=Math.imul(U,ne),o=(o=Math.imul(U,re))+Math.imul(H,ne)|0,i=Math.imul(H,re),r=r+Math.imul(D,ie)|0,o=(o=o+Math.imul(D,ae)|0)+Math.imul(M,ie)|0,i=i+Math.imul(M,ae)|0,r=r+Math.imul(P,ce)|0,o=(o=o+Math.imul(P,de)|0)+Math.imul(N,ce)|0,i=i+Math.imul(N,de)|0,r=r+Math.imul(O,le)|0,o=(o=o+Math.imul(O,Ae)|0)+Math.imul(Q,le)|0,i=i+Math.imul(Q,Ae)|0;var Qe=(d+(r=r+Math.imul(_,he)|0)|0)+((8191&(o=(o=o+Math.imul(_,ge)|0)+Math.imul(S,he)|0))<<13)|0;d=((i=i+Math.imul(S,ge)|0)+(o>>>13)|0)+(Qe>>>26)|0,Qe&=67108863,r=Math.imul(U,ie),o=(o=Math.imul(U,ae))+Math.imul(H,ie)|0,i=Math.imul(H,ae),r=r+Math.imul(D,ce)|0,o=(o=o+Math.imul(D,de)|0)+Math.imul(M,ce)|0,i=i+Math.imul(M,de)|0,r=r+Math.imul(P,le)|0,o=(o=o+Math.imul(P,Ae)|0)+Math.imul(N,le)|0,i=i+Math.imul(N,Ae)|0;var Re=(d+(r=r+Math.imul(O,he)|0)|0)+((8191&(o=(o=o+Math.imul(O,ge)|0)+Math.imul(Q,he)|0))<<13)|0;d=((i=i+Math.imul(Q,ge)|0)+(o>>>13)|0)+(Re>>>26)|0,Re&=67108863,r=Math.imul(U,ce),o=(o=Math.imul(U,de))+Math.imul(H,ce)|0,i=Math.imul(H,de),r=r+Math.imul(D,le)|0,o=(o=o+Math.imul(D,Ae)|0)+Math.imul(M,le)|0,i=i+Math.imul(M,Ae)|0;var Pe=(d+(r=r+Math.imul(P,he)|0)|0)+((8191&(o=(o=o+Math.imul(P,ge)|0)+Math.imul(N,he)|0))<<13)|0;d=((i=i+Math.imul(N,ge)|0)+(o>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,r=Math.imul(U,le),o=(o=Math.imul(U,Ae))+Math.imul(H,le)|0,i=Math.imul(H,Ae);var Ne=(d+(r=r+Math.imul(D,he)|0)|0)+((8191&(o=(o=o+Math.imul(D,ge)|0)+Math.imul(M,he)|0))<<13)|0;d=((i=i+Math.imul(M,ge)|0)+(o>>>13)|0)+(Ne>>>26)|0,Ne&=67108863;var xe=(d+(r=Math.imul(U,he))|0)+((8191&(o=(o=Math.imul(U,ge))+Math.imul(H,he)|0))<<13)|0;return d=((i=Math.imul(H,ge))+(o>>>13)|0)+(xe>>>26)|0,xe&=67108863,c[0]=pe,c[1]=me,c[2]=ve,c[3]=ye,c[4]=be,c[5]=Ie,c[6]=Ce,c[7]=Ee,c[8]=we,c[9]=Be,c[10]=_e,c[11]=Se,c[12]=ke,c[13]=Oe,c[14]=Qe,c[15]=Re,c[16]=Pe,c[17]=Ne,c[18]=xe,0!==d&&(c[19]=d,n.length++),n};function m(e,t,n){n.negative=t.negative^e.negative,n.length=e.length+t.length;for(var r=0,o=0,i=0;i>>26)|0)>>>26,a&=67108863}n.words[i]=s,r=a,a=o}return 0!==r?n.words[i]=r:n.length--,n._strip()}function v(e,t,n){return m(e,t,n)}function y(e,t){this.x=e,this.y=t}Math.imul||(p=g),i.prototype.mulTo=function(e,t){var n=this.length+e.length;return 10===this.length&&10===e.length?p(this,e,t):n<63?g(this,e,t):n<1024?m(this,e,t):v(this,e,t)},y.prototype.makeRBT=function(e){for(var t=new Array(e),n=i.prototype._countBits(e)-1,r=0;r>=1;return r},y.prototype.permute=function(e,t,n,r,o,i){for(var a=0;a>>=1)o++;return 1<>>=13,n[2*a+1]=8191&i,i>>>=13;for(a=2*t;a>=26,n+=i/67108864|0,n+=a>>>26,this.words[o]=67108863&a}return 0!==n&&(this.words[o]=n,this.length++),t?this.ineg():this},i.prototype.muln=function(e){return this.clone().imuln(e)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),n=0;n>>o&1}return t}(e);if(0===t.length)return new i(1);for(var n=this,r=0;r=0);var t,n=e%26,o=(e-n)/26,i=67108863>>>26-n<<26-n;if(0!==n){var a=0;for(t=0;t>>26-n}a&&(this.words[t]=a,this.length++)}if(0!==o){for(t=this.length-1;t>=0;t--)this.words[t+o]=this.words[t];for(t=0;t=0),o=t?(t-t%26)/26:0;var i=e%26,a=Math.min((e-i)/26,this.length),s=67108863^67108863>>>i<a)for(this.length-=a,d=0;d=0&&(0!==u||d>=o);d--){var l=0|this.words[d];this.words[d]=u<<26-i|l>>>i,u=l&s}return c&&0!==u&&(c.words[c.length++]=u),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},i.prototype.ishrn=function(e,t,n){return r(0===this.negative),this.iushrn(e,t,n)},i.prototype.shln=function(e){return this.clone().ishln(e)},i.prototype.ushln=function(e){return this.clone().iushln(e)},i.prototype.shrn=function(e){return this.clone().ishrn(e)},i.prototype.ushrn=function(e){return this.clone().iushrn(e)},i.prototype.testn=function(e){r("number"==typeof e&&e>=0);var t=e%26,n=(e-t)/26,o=1<=0);var t=e%26,n=(e-t)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==t&&n++,this.length=Math.min(n,this.length),0!==t){var o=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},i.prototype.isubn=function(e){if(r("number"==typeof e),r(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(c/67108864|0),this.words[o+n]=67108863&i}for(;o>26,this.words[o+n]=67108863&i;if(0===s)return this._strip();for(r(-1===s),s=0,o=0;o>26,this.words[o]=67108863&i;return this.negative=1,this._strip()},i.prototype._wordDiv=function(e,t){var n=(this.length,e.length),r=this.clone(),o=e,a=0|o.words[o.length-1];0!=(n=26-this._countBits(a))&&(o=o.ushln(n),r.iushln(n),a=0|o.words[o.length-1]);var s,c=r.length-o.length;if("mod"!==t){(s=new i(null)).length=c+1,s.words=new Array(s.length);for(var d=0;d=0;l--){var A=67108864*(0|r.words[o.length+l])+(0|r.words[o.length+l-1]);for(A=Math.min(A/a|0,67108863),r._ishlnsubmul(o,A,l);0!==r.negative;)A--,r.negative=0,r._ishlnsubmul(o,1,l),r.isZero()||(r.negative^=1);s&&(s.words[l]=A)}return s&&s._strip(),r._strip(),"div"!==t&&0!==n&&r.iushrn(n),{div:s||null,mod:r}},i.prototype.divmod=function(e,t,n){return r(!e.isZero()),this.isZero()?{div:new i(0),mod:new i(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(o=s.div.neg()),"div"!==t&&(a=s.mod.neg(),n&&0!==a.negative&&a.iadd(e)),{div:o,mod:a}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(o=s.div.neg()),{div:o,mod:s.mod}):0!=(this.negative&e.negative)?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(a=s.mod.neg(),n&&0!==a.negative&&a.isub(e)),{div:s.div,mod:a}):e.length>this.length||this.cmp(e)<0?{div:new i(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new i(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new i(this.modrn(e.words[0]))}:this._wordDiv(e,t);var o,a,s},i.prototype.div=function(e){return this.divmod(e,"div",!1).div},i.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},i.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},i.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var n=0!==t.div.negative?t.mod.isub(e):t.mod,r=e.ushrn(1),o=e.andln(1),i=n.cmp(r);return i<0||1===o&&0===i?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},i.prototype.modrn=function(e){var t=e<0;t&&(e=-e),r(e<=67108863);for(var n=(1<<26)%e,o=0,i=this.length-1;i>=0;i--)o=(n*o+(0|this.words[i]))%e;return t?-o:o},i.prototype.modn=function(e){return this.modrn(e)},i.prototype.idivn=function(e){var t=e<0;t&&(e=-e),r(e<=67108863);for(var n=0,o=this.length-1;o>=0;o--){var i=(0|this.words[o])+67108864*n;this.words[o]=i/e|0,n=i%e}return this._strip(),t?this.ineg():this},i.prototype.divn=function(e){return this.clone().idivn(e)},i.prototype.egcd=function(e){r(0===e.negative),r(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var o=new i(1),a=new i(0),s=new i(0),c=new i(1),d=0;t.isEven()&&n.isEven();)t.iushrn(1),n.iushrn(1),++d;for(var u=n.clone(),l=t.clone();!t.isZero();){for(var A=0,f=1;0==(t.words[0]&f)&&A<26;++A,f<<=1);if(A>0)for(t.iushrn(A);A-- >0;)(o.isOdd()||a.isOdd())&&(o.iadd(u),a.isub(l)),o.iushrn(1),a.iushrn(1);for(var h=0,g=1;0==(n.words[0]&g)&&h<26;++h,g<<=1);if(h>0)for(n.iushrn(h);h-- >0;)(s.isOdd()||c.isOdd())&&(s.iadd(u),c.isub(l)),s.iushrn(1),c.iushrn(1);t.cmp(n)>=0?(t.isub(n),o.isub(s),a.isub(c)):(n.isub(t),s.isub(o),c.isub(a))}return{a:s,b:c,gcd:n.iushln(d)}},i.prototype._invmp=function(e){r(0===e.negative),r(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var o,a=new i(1),s=new i(0),c=n.clone();t.cmpn(1)>0&&n.cmpn(1)>0;){for(var d=0,u=1;0==(t.words[0]&u)&&d<26;++d,u<<=1);if(d>0)for(t.iushrn(d);d-- >0;)a.isOdd()&&a.iadd(c),a.iushrn(1);for(var l=0,A=1;0==(n.words[0]&A)&&l<26;++l,A<<=1);if(l>0)for(n.iushrn(l);l-- >0;)s.isOdd()&&s.iadd(c),s.iushrn(1);t.cmp(n)>=0?(t.isub(n),a.isub(s)):(n.isub(t),s.isub(a))}return(o=0===t.cmpn(1)?a:s).cmpn(0)<0&&o.iadd(e),o},i.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),n=e.clone();t.negative=0,n.negative=0;for(var r=0;t.isEven()&&n.isEven();r++)t.iushrn(1),n.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;n.isEven();)n.iushrn(1);var o=t.cmp(n);if(o<0){var i=t;t=n,n=i}else if(0===o||0===n.cmpn(1))break;t.isub(n)}return n.iushln(r)},i.prototype.invm=function(e){return this.egcd(e).a.umod(e)},i.prototype.isEven=function(){return 0==(1&this.words[0])},i.prototype.isOdd=function(){return 1==(1&this.words[0])},i.prototype.andln=function(e){return this.words[0]&e},i.prototype.bincn=function(e){r("number"==typeof e);var t=e%26,n=(e-t)/26,o=1<>>26,s&=67108863,this.words[a]=s}return 0!==i&&(this.words[a]=i,this.length++),this},i.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},i.prototype.cmpn=function(e){var t,n=e<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this._strip(),this.length>1)t=1;else{n&&(e=-e),r(e<=67108863,"Number is too big");var o=0|this.words[0];t=o===e?0:oe.length)return 1;if(this.length=0;n--){var r=0|this.words[n],o=0|e.words[n];if(r!==o){ro&&(t=1);break}}return t},i.prototype.gtn=function(e){return 1===this.cmpn(e)},i.prototype.gt=function(e){return 1===this.cmp(e)},i.prototype.gten=function(e){return this.cmpn(e)>=0},i.prototype.gte=function(e){return this.cmp(e)>=0},i.prototype.ltn=function(e){return-1===this.cmpn(e)},i.prototype.lt=function(e){return-1===this.cmp(e)},i.prototype.lten=function(e){return this.cmpn(e)<=0},i.prototype.lte=function(e){return this.cmp(e)<=0},i.prototype.eqn=function(e){return 0===this.cmpn(e)},i.prototype.eq=function(e){return 0===this.cmp(e)},i.red=function(e){return new _(e)},i.prototype.toRed=function(e){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},i.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(e){return this.red=e,this},i.prototype.forceRed=function(e){return r(!this.red,"Already a number in reduction context"),this._forceRed(e)},i.prototype.redAdd=function(e){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},i.prototype.redIAdd=function(e){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},i.prototype.redSub=function(e){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},i.prototype.redISub=function(e){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},i.prototype.redShl=function(e){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},i.prototype.redMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},i.prototype.redIMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},i.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(e){return r(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var b={k256:null,p224:null,p192:null,p25519:null};function I(e,t){this.name=e,this.p=new i(t,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function C(){I.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function E(){I.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){I.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function B(){I.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function _(e){if("string"==typeof e){var t=i._prime(e);this.m=t.p,this.prime=t}else r(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function S(e){_.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new i(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}I.prototype._tmp=function(){var e=new i(null);return e.words=new Array(Math.ceil(this.n/13)),e},I.prototype.ireduce=function(e){var t,n=e;do{this.split(n,this.tmp),t=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(t>this.n);var r=t0?n.isub(this.p):void 0!==n.strip?n.strip():n._strip(),n},I.prototype.split=function(e,t){e.iushrn(this.n,0,t)},I.prototype.imulK=function(e){return e.imul(this.k)},o(C,I),C.prototype.split=function(e,t){for(var n=4194303,r=Math.min(e.length,9),o=0;o>>22,i=a}i>>>=22,e.words[o-10]=i,0===i&&e.length>10?e.length-=10:e.length-=9},C.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,n=0;n>>=26,e.words[n]=o,t=r}return 0!==t&&(e.words[e.length++]=t),e},i._prime=function(e){if(b[e])return b[e];var t;if("k256"===e)t=new C;else if("p224"===e)t=new E;else if("p192"===e)t=new w;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new B}return b[e]=t,t},_.prototype._verify1=function(e){r(0===e.negative,"red works only with positives"),r(e.red,"red works only with red numbers")},_.prototype._verify2=function(e,t){r(0==(e.negative|t.negative),"red works only with positives"),r(e.red&&e.red===t.red,"red works only with red numbers")},_.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(u(e,e.umod(this.m)._forceRed(this)),e)},_.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},_.prototype.add=function(e,t){this._verify2(e,t);var n=e.add(t);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},_.prototype.iadd=function(e,t){this._verify2(e,t);var n=e.iadd(t);return n.cmp(this.m)>=0&&n.isub(this.m),n},_.prototype.sub=function(e,t){this._verify2(e,t);var n=e.sub(t);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},_.prototype.isub=function(e,t){this._verify2(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},_.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},_.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},_.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},_.prototype.isqr=function(e){return this.imul(e,e.clone())},_.prototype.sqr=function(e){return this.mul(e,e)},_.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(r(t%2==1),3===t){var n=this.m.add(new i(1)).iushrn(2);return this.pow(e,n)}for(var o=this.m.subn(1),a=0;!o.isZero()&&0===o.andln(1);)a++,o.iushrn(1);r(!o.isZero());var s=new i(1).toRed(this),c=s.redNeg(),d=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new i(2*u*u).toRed(this);0!==this.pow(u,d).cmp(c);)u.redIAdd(c);for(var l=this.pow(u,o),A=this.pow(e,o.addn(1).iushrn(1)),f=this.pow(e,o),h=a;0!==f.cmp(s);){for(var g=f,p=0;0!==g.cmp(s);p++)g=g.redSqr();r(p=0;r--){for(var d=t.words[r],u=c-1;u>=0;u--){var l=d>>u&1;o!==n[0]&&(o=this.sqr(o)),0!==l||0!==a?(a<<=1,a|=l,(4==++s||0===r&&0===u)&&(o=this.mul(o,n[a]),s=0,a=0)):s=0}c=26}return o},_.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},_.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},i.mont=function(e){return new S(e)},o(S,_),S.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},S.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},S.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=n.isub(r).iushrn(this.shift),i=o;return o.cmp(this.m)>=0?i=o.isub(this.m):o.cmpn(0)<0&&(i=o.iadd(this.m)),i._forceRed(this)},S.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new i(0)._forceRed(this);var n=e.mul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=n.isub(r).iushrn(this.shift),a=o;return o.cmp(this.m)>=0?a=o.isub(this.m):o.cmpn(0)<0&&(a=o.iadd(this.m)),a._forceRed(this)},S.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=n.nmd(e),this)},9931:(e,t,n)=>{var r;function o(e){this.rand=e}if(e.exports=function(e){return r||(r=new o(null)),r.generate(e)},e.exports.Rand=o,o.prototype.generate=function(e){return this._rand(e)},o.prototype._rand=function(e){if(this.rand.getBytes)return this.rand.getBytes(e);for(var t=new Uint8Array(e),n=0;n{"use strict";const r=n(9742),o=n(645),i="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=c,t.SlowBuffer=function(e){return+e!=e&&(e=0),c.alloc(+e)},t.INSPECT_MAX_BYTES=50;const a=2147483647;function s(e){if(e>a)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,c.prototype),t}function c(e,t,n){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return l(e)}return d(e,t,n)}function d(e,t,n){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!c.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const n=0|g(e,t);let r=s(n);const o=r.write(e,t);return o!==n&&(r=r.slice(0,o)),r}(e,t);if(ArrayBuffer.isView(e))return function(e){if(K(e,Uint8Array)){const t=new Uint8Array(e);return f(t.buffer,t.byteOffset,t.byteLength)}return A(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(K(e,ArrayBuffer)||e&&K(e.buffer,ArrayBuffer))return f(e,t,n);if("undefined"!=typeof SharedArrayBuffer&&(K(e,SharedArrayBuffer)||e&&K(e.buffer,SharedArrayBuffer)))return f(e,t,n);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const r=e.valueOf&&e.valueOf();if(null!=r&&r!==e)return c.from(r,t,n);const o=function(e){if(c.isBuffer(e)){const t=0|h(e.length),n=s(t);return 0===n.length||e.copy(n,0,0,t),n}return void 0!==e.length?"number"!=typeof e.length||Z(e.length)?s(0):A(e):"Buffer"===e.type&&Array.isArray(e.data)?A(e.data):void 0}(e);if(o)return o;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return c.from(e[Symbol.toPrimitive]("string"),t,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function u(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function l(e){return u(e),s(e<0?0:0|h(e))}function A(e){const t=e.length<0?0:0|h(e.length),n=s(t);for(let r=0;r=a)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a.toString(16)+" bytes");return 0|e}function g(e,t){if(c.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||K(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const n=e.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===n)return 0;let o=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return Y(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return V(e).length;default:if(o)return r?-1:Y(e).length;t=(""+t).toLowerCase(),o=!0}}function p(e,t,n){let r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return Q(this,t,n);case"utf8":case"utf-8":return _(this,t,n);case"ascii":return k(this,t,n);case"latin1":case"binary":return O(this,t,n);case"base64":return B(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return R(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function m(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function v(e,t,n,r,o){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),Z(n=+n)&&(n=o?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(o)return-1;n=e.length-1}else if(n<0){if(!o)return-1;n=0}if("string"==typeof t&&(t=c.from(t,r)),c.isBuffer(t))return 0===t.length?-1:y(e,t,n,r,o);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):y(e,[t],n,r,o);throw new TypeError("val must be string, number or Buffer")}function y(e,t,n,r,o){let i,a=1,s=e.length,c=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;a=2,s/=2,c/=2,n/=2}function d(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(o){let r=-1;for(i=n;is&&(n=s-c),i=n;i>=0;i--){let n=!0;for(let r=0;ro&&(r=o):r=o;const i=t.length;let a;for(r>i/2&&(r=i/2),a=0;a>8,o=n%256,i.push(o),i.push(r);return i}(t,e.length-n),e,n,r)}function B(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function _(e,t,n){n=Math.min(e.length,n);const r=[];let o=t;for(;o239?4:t>223?3:t>191?2:1;if(o+a<=n){let n,r,s,c;switch(a){case 1:t<128&&(i=t);break;case 2:n=e[o+1],128==(192&n)&&(c=(31&t)<<6|63&n,c>127&&(i=c));break;case 3:n=e[o+1],r=e[o+2],128==(192&n)&&128==(192&r)&&(c=(15&t)<<12|(63&n)<<6|63&r,c>2047&&(c<55296||c>57343)&&(i=c));break;case 4:n=e[o+1],r=e[o+2],s=e[o+3],128==(192&n)&&128==(192&r)&&128==(192&s)&&(c=(15&t)<<18|(63&n)<<12|(63&r)<<6|63&s,c>65535&&c<1114112&&(i=c))}}null===i?(i=65533,a=1):i>65535&&(i-=65536,r.push(i>>>10&1023|55296),i=56320|1023&i),r.push(i),o+=a}return function(e){const t=e.length;if(t<=S)return String.fromCharCode.apply(String,e);let n="",r=0;for(;rr.length?(c.isBuffer(t)||(t=c.from(t)),t.copy(r,o)):Uint8Array.prototype.set.call(r,t,o);else{if(!c.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(r,o)}o+=t.length}return r},c.byteLength=g,c.prototype._isBuffer=!0,c.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;tn&&(e+=" ... "),""},i&&(c.prototype[i]=c.prototype.inspect),c.prototype.compare=function(e,t,n,r,o){if(K(e,Uint8Array)&&(e=c.from(e,e.offset,e.byteLength)),!c.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===o&&(o=this.length),t<0||n>e.length||r<0||o>this.length)throw new RangeError("out of range index");if(r>=o&&t>=n)return 0;if(r>=o)return-1;if(t>=n)return 1;if(this===e)return 0;let i=(o>>>=0)-(r>>>=0),a=(n>>>=0)-(t>>>=0);const s=Math.min(i,a),d=this.slice(r,o),u=e.slice(t,n);for(let e=0;e>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}const o=this.length-t;if((void 0===n||n>o)&&(n=o),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");let i=!1;for(;;)switch(r){case"hex":return b(this,e,t,n);case"utf8":case"utf-8":return I(this,e,t,n);case"ascii":case"latin1":case"binary":return C(this,e,t,n);case"base64":return E(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return w(this,e,t,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const S=4096;function k(e,t,n){let r="";n=Math.min(e.length,n);for(let o=t;or)&&(n=r);let o="";for(let r=t;rn)throw new RangeError("Trying to access beyond buffer length")}function N(e,t,n,r,o,i){if(!c.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||te.length)throw new RangeError("Index out of range")}function x(e,t,n,r,o){F(t,r,o,e,n,7);let i=Number(t&BigInt(4294967295));e[n++]=i,i>>=8,e[n++]=i,i>>=8,e[n++]=i,i>>=8,e[n++]=i;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[n++]=a,a>>=8,e[n++]=a,a>>=8,e[n++]=a,a>>=8,e[n++]=a,n}function D(e,t,n,r,o){F(t,r,o,e,n,7);let i=Number(t&BigInt(4294967295));e[n+7]=i,i>>=8,e[n+6]=i,i>>=8,e[n+5]=i,i>>=8,e[n+4]=i;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[n+3]=a,a>>=8,e[n+2]=a,a>>=8,e[n+1]=a,a>>=8,e[n]=a,n+8}function M(e,t,n,r,o,i){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function T(e,t,n,r,i){return t=+t,n>>>=0,i||M(e,0,n,4),o.write(e,t,n,r,23,4),n+4}function U(e,t,n,r,i){return t=+t,n>>>=0,i||M(e,0,n,8),o.write(e,t,n,r,52,8),n+8}c.prototype.slice=function(e,t){const n=this.length;(e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t>>=0,t>>>=0,n||P(e,t,this.length);let r=this[e],o=1,i=0;for(;++i>>=0,t>>>=0,n||P(e,t,this.length);let r=this[e+--t],o=1;for(;t>0&&(o*=256);)r+=this[e+--t]*o;return r},c.prototype.readUint8=c.prototype.readUInt8=function(e,t){return e>>>=0,t||P(e,1,this.length),this[e]},c.prototype.readUint16LE=c.prototype.readUInt16LE=function(e,t){return e>>>=0,t||P(e,2,this.length),this[e]|this[e+1]<<8},c.prototype.readUint16BE=c.prototype.readUInt16BE=function(e,t){return e>>>=0,t||P(e,2,this.length),this[e]<<8|this[e+1]},c.prototype.readUint32LE=c.prototype.readUInt32LE=function(e,t){return e>>>=0,t||P(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},c.prototype.readUint32BE=c.prototype.readUInt32BE=function(e,t){return e>>>=0,t||P(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},c.prototype.readBigUInt64LE=X((function(e){G(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||L(e,this.length-8);const r=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,o=this[++e]+256*this[++e]+65536*this[++e]+n*2**24;return BigInt(r)+(BigInt(o)<>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||L(e,this.length-8);const r=t*2**24+65536*this[++e]+256*this[++e]+this[++e],o=this[++e]*2**24+65536*this[++e]+256*this[++e]+n;return(BigInt(r)<>>=0,t>>>=0,n||P(e,t,this.length);let r=this[e],o=1,i=0;for(;++i=o&&(r-=Math.pow(2,8*t)),r},c.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||P(e,t,this.length);let r=t,o=1,i=this[e+--r];for(;r>0&&(o*=256);)i+=this[e+--r]*o;return o*=128,i>=o&&(i-=Math.pow(2,8*t)),i},c.prototype.readInt8=function(e,t){return e>>>=0,t||P(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},c.prototype.readInt16LE=function(e,t){e>>>=0,t||P(e,2,this.length);const n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt16BE=function(e,t){e>>>=0,t||P(e,2,this.length);const n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt32LE=function(e,t){return e>>>=0,t||P(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},c.prototype.readInt32BE=function(e,t){return e>>>=0,t||P(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},c.prototype.readBigInt64LE=X((function(e){G(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||L(e,this.length-8);const r=this[e+4]+256*this[e+5]+65536*this[e+6]+(n<<24);return(BigInt(r)<>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||L(e,this.length-8);const r=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(r)<>>=0,t||P(e,4,this.length),o.read(this,e,!0,23,4)},c.prototype.readFloatBE=function(e,t){return e>>>=0,t||P(e,4,this.length),o.read(this,e,!1,23,4)},c.prototype.readDoubleLE=function(e,t){return e>>>=0,t||P(e,8,this.length),o.read(this,e,!0,52,8)},c.prototype.readDoubleBE=function(e,t){return e>>>=0,t||P(e,8,this.length),o.read(this,e,!1,52,8)},c.prototype.writeUintLE=c.prototype.writeUIntLE=function(e,t,n,r){e=+e,t>>>=0,n>>>=0,r||N(this,e,t,n,Math.pow(2,8*n)-1,0);let o=1,i=0;for(this[t]=255&e;++i>>=0,n>>>=0,r||N(this,e,t,n,Math.pow(2,8*n)-1,0);let o=n-1,i=1;for(this[t+o]=255&e;--o>=0&&(i*=256);)this[t+o]=e/i&255;return t+n},c.prototype.writeUint8=c.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||N(this,e,t,1,255,0),this[t]=255&e,t+1},c.prototype.writeUint16LE=c.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||N(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},c.prototype.writeUint16BE=c.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||N(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},c.prototype.writeUint32LE=c.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||N(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},c.prototype.writeUint32BE=c.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||N(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},c.prototype.writeBigUInt64LE=X((function(e,t=0){return x(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),c.prototype.writeBigUInt64BE=X((function(e,t=0){return D(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),c.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t>>>=0,!r){const r=Math.pow(2,8*n-1);N(this,e,t,n,r-1,-r)}let o=0,i=1,a=0;for(this[t]=255&e;++o>0)-a&255;return t+n},c.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t>>>=0,!r){const r=Math.pow(2,8*n-1);N(this,e,t,n,r-1,-r)}let o=n-1,i=1,a=0;for(this[t+o]=255&e;--o>=0&&(i*=256);)e<0&&0===a&&0!==this[t+o+1]&&(a=1),this[t+o]=(e/i>>0)-a&255;return t+n},c.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||N(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},c.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||N(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},c.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||N(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},c.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||N(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},c.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||N(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},c.prototype.writeBigInt64LE=X((function(e,t=0){return x(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),c.prototype.writeBigInt64BE=X((function(e,t=0){return D(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),c.prototype.writeFloatLE=function(e,t,n){return T(this,e,t,!0,n)},c.prototype.writeFloatBE=function(e,t,n){return T(this,e,t,!1,n)},c.prototype.writeDoubleLE=function(e,t,n){return U(this,e,t,!0,n)},c.prototype.writeDoubleBE=function(e,t,n){return U(this,e,t,!1,n)},c.prototype.copy=function(e,t,n,r){if(!c.isBuffer(e))throw new TypeError("argument should be a Buffer");if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r=this.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(o=t;o=r+4;n-=3)t=`_${e.slice(n-3,n)}${t}`;return`${e.slice(0,n)}${t}`}function F(e,t,n,r,o,i){if(e>n||e3?0===t||t===BigInt(0)?`>= 0${r} and < 2${r} ** ${8*(i+1)}${r}`:`>= -(2${r} ** ${8*(i+1)-1}${r}) and < 2 ** ${8*(i+1)-1}${r}`:`>= ${t}${r} and <= ${n}${r}`,new H.ERR_OUT_OF_RANGE("value",o,e)}!function(e,t,n){G(t,"offset"),void 0!==e[t]&&void 0!==e[t+n]||L(t,e.length-(n+1))}(r,o,i)}function G(e,t){if("number"!=typeof e)throw new H.ERR_INVALID_ARG_TYPE(t,"number",e)}function L(e,t,n){if(Math.floor(e)!==e)throw G(e,n),new H.ERR_OUT_OF_RANGE(n||"offset","an integer",e);if(t<0)throw new H.ERR_BUFFER_OUT_OF_BOUNDS;throw new H.ERR_OUT_OF_RANGE(n||"offset",`>= ${n?1:0} and <= ${t}`,e)}j("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),j("ERR_INVALID_ARG_TYPE",(function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`}),TypeError),j("ERR_OUT_OF_RANGE",(function(e,t,n){let r=`The value of "${e}" is out of range.`,o=n;return Number.isInteger(n)&&Math.abs(n)>2**32?o=J(String(n)):"bigint"==typeof n&&(o=String(n),(n>BigInt(2)**BigInt(32)||n<-(BigInt(2)**BigInt(32)))&&(o=J(o)),o+="n"),r+=` It must be ${t}. Received ${o}`,r}),RangeError);const q=/[^+/0-9A-Za-z-_]/g;function Y(e,t){let n;t=t||1/0;const r=e.length;let o=null;const i=[];for(let a=0;a55295&&n<57344){if(!o){if(n>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&i.push(239,191,189);continue}o=n;continue}if(n<56320){(t-=3)>-1&&i.push(239,191,189),o=n;continue}n=65536+(o-55296<<10|n-56320)}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,n<128){if((t-=1)<0)break;i.push(n)}else if(n<2048){if((t-=2)<0)break;i.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;i.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return i}function V(e){return r.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(q,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function W(e,t,n,r){let o;for(o=0;o=t.length||o>=e.length);++o)t[o+n]=e[o];return o}function K(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function Z(e){return e!=e}const z=function(){const e="0123456789abcdef",t=new Array(256);for(let n=0;n<16;++n){const r=16*n;for(let o=0;o<16;++o)t[r+o]=e[n]+e[o]}return t}();function X(e){return"undefined"==typeof BigInt?$:e}function $(){throw new Error("BigInt not supported")}},2912:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.CompressedNonExistenceProof=t.CompressedExistenceProof=t.CompressedBatchEntry=t.CompressedBatchProof=t.BatchEntry=t.BatchProof=t.InnerSpec=t.ProofSpec=t.InnerOp=t.LeafOp=t.CommitmentProof=t.NonExistenceProof=t.ExistenceProof=t.lengthOpToJSON=t.lengthOpFromJSON=t.LengthOp=t.hashOpToJSON=t.hashOpFromJSON=t.HashOp=t.protobufPackage=void 0;const o=r(n(3720)),i=r(n(3789));var a,s;function c(e){switch(e){case 0:case"NO_HASH":return a.NO_HASH;case 1:case"SHA256":return a.SHA256;case 2:case"SHA512":return a.SHA512;case 3:case"KECCAK":return a.KECCAK;case 4:case"RIPEMD160":return a.RIPEMD160;case 5:case"BITCOIN":return a.BITCOIN;default:return a.UNRECOGNIZED}}function d(e){switch(e){case a.NO_HASH:return"NO_HASH";case a.SHA256:return"SHA256";case a.SHA512:return"SHA512";case a.KECCAK:return"KECCAK";case a.RIPEMD160:return"RIPEMD160";case a.BITCOIN:return"BITCOIN";default:return"UNKNOWN"}}function u(e){switch(e){case 0:case"NO_PREFIX":return s.NO_PREFIX;case 1:case"VAR_PROTO":return s.VAR_PROTO;case 2:case"VAR_RLP":return s.VAR_RLP;case 3:case"FIXED32_BIG":return s.FIXED32_BIG;case 4:case"FIXED32_LITTLE":return s.FIXED32_LITTLE;case 5:case"FIXED64_BIG":return s.FIXED64_BIG;case 6:case"FIXED64_LITTLE":return s.FIXED64_LITTLE;case 7:case"REQUIRE_32_BYTES":return s.REQUIRE_32_BYTES;case 8:case"REQUIRE_64_BYTES":return s.REQUIRE_64_BYTES;default:return s.UNRECOGNIZED}}function l(e){switch(e){case s.NO_PREFIX:return"NO_PREFIX";case s.VAR_PROTO:return"VAR_PROTO";case s.VAR_RLP:return"VAR_RLP";case s.FIXED32_BIG:return"FIXED32_BIG";case s.FIXED32_LITTLE:return"FIXED32_LITTLE";case s.FIXED64_BIG:return"FIXED64_BIG";case s.FIXED64_LITTLE:return"FIXED64_LITTLE";case s.REQUIRE_32_BYTES:return"REQUIRE_32_BYTES";case s.REQUIRE_64_BYTES:return"REQUIRE_64_BYTES";default:return"UNKNOWN"}}t.protobufPackage="ics23",function(e){e[e.NO_HASH=0]="NO_HASH",e[e.SHA256=1]="SHA256",e[e.SHA512=2]="SHA512",e[e.KECCAK=3]="KECCAK",e[e.RIPEMD160=4]="RIPEMD160",e[e.BITCOIN=5]="BITCOIN",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(a=t.HashOp||(t.HashOp={})),t.hashOpFromJSON=c,t.hashOpToJSON=d,function(e){e[e.NO_PREFIX=0]="NO_PREFIX",e[e.VAR_PROTO=1]="VAR_PROTO",e[e.VAR_RLP=2]="VAR_RLP",e[e.FIXED32_BIG=3]="FIXED32_BIG",e[e.FIXED32_LITTLE=4]="FIXED32_LITTLE",e[e.FIXED64_BIG=5]="FIXED64_BIG",e[e.FIXED64_LITTLE=6]="FIXED64_LITTLE",e[e.REQUIRE_32_BYTES=7]="REQUIRE_32_BYTES",e[e.REQUIRE_64_BYTES=8]="REQUIRE_64_BYTES",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(s=t.LengthOp||(t.LengthOp={})),t.lengthOpFromJSON=u,t.lengthOpToJSON=l;const A={};t.ExistenceProof={encode(e,n=i.default.Writer.create()){0!==e.key.length&&n.uint32(10).bytes(e.key),0!==e.value.length&&n.uint32(18).bytes(e.value),void 0!==e.leaf&&t.LeafOp.encode(e.leaf,n.uint32(26).fork()).ldelim();for(const r of e.path)t.InnerOp.encode(r,n.uint32(34).fork()).ldelim();return n},decode(e,n){const r=e instanceof i.default.Reader?e:new i.default.Reader(e);let o=void 0===n?r.len:r.pos+n;const a=Object.assign({},A);for(a.path=[],a.key=new Uint8Array,a.value=new Uint8Array;r.pos>>3){case 1:a.key=r.bytes();break;case 2:a.value=r.bytes();break;case 3:a.leaf=t.LeafOp.decode(r,r.uint32());break;case 4:a.path.push(t.InnerOp.decode(r,r.uint32()));break;default:r.skipType(7&e)}}return a},fromJSON(e){var n;const r=Object.assign({},A);return r.key=void 0!==e.key&&null!==e.key?S(e.key):new Uint8Array,r.value=void 0!==e.value&&null!==e.value?S(e.value):new Uint8Array,r.leaf=void 0!==e.leaf&&null!==e.leaf?t.LeafOp.fromJSON(e.leaf):void 0,r.path=(null!==(n=e.path)&&void 0!==n?n:[]).map((e=>t.InnerOp.fromJSON(e))),r},toJSON(e){const n={};return void 0!==e.key&&(n.key=O(void 0!==e.key?e.key:new Uint8Array)),void 0!==e.value&&(n.value=O(void 0!==e.value?e.value:new Uint8Array)),void 0!==e.leaf&&(n.leaf=e.leaf?t.LeafOp.toJSON(e.leaf):void 0),e.path?n.path=e.path.map((e=>e?t.InnerOp.toJSON(e):void 0)):n.path=[],n},fromPartial(e){var n,r,o;const i=Object.assign({},A);return i.key=null!==(n=e.key)&&void 0!==n?n:new Uint8Array,i.value=null!==(r=e.value)&&void 0!==r?r:new Uint8Array,i.leaf=void 0!==e.leaf&&null!==e.leaf?t.LeafOp.fromPartial(e.leaf):void 0,i.path=(null===(o=e.path)||void 0===o?void 0:o.map((e=>t.InnerOp.fromPartial(e))))||[],i}};const f={};t.NonExistenceProof={encode:(e,n=i.default.Writer.create())=>(0!==e.key.length&&n.uint32(10).bytes(e.key),void 0!==e.left&&t.ExistenceProof.encode(e.left,n.uint32(18).fork()).ldelim(),void 0!==e.right&&t.ExistenceProof.encode(e.right,n.uint32(26).fork()).ldelim(),n),decode(e,n){const r=e instanceof i.default.Reader?e:new i.default.Reader(e);let o=void 0===n?r.len:r.pos+n;const a=Object.assign({},f);for(a.key=new Uint8Array;r.pos>>3){case 1:a.key=r.bytes();break;case 2:a.left=t.ExistenceProof.decode(r,r.uint32());break;case 3:a.right=t.ExistenceProof.decode(r,r.uint32());break;default:r.skipType(7&e)}}return a},fromJSON(e){const n=Object.assign({},f);return n.key=void 0!==e.key&&null!==e.key?S(e.key):new Uint8Array,n.left=void 0!==e.left&&null!==e.left?t.ExistenceProof.fromJSON(e.left):void 0,n.right=void 0!==e.right&&null!==e.right?t.ExistenceProof.fromJSON(e.right):void 0,n},toJSON(e){const n={};return void 0!==e.key&&(n.key=O(void 0!==e.key?e.key:new Uint8Array)),void 0!==e.left&&(n.left=e.left?t.ExistenceProof.toJSON(e.left):void 0),void 0!==e.right&&(n.right=e.right?t.ExistenceProof.toJSON(e.right):void 0),n},fromPartial(e){var n;const r=Object.assign({},f);return r.key=null!==(n=e.key)&&void 0!==n?n:new Uint8Array,r.left=void 0!==e.left&&null!==e.left?t.ExistenceProof.fromPartial(e.left):void 0,r.right=void 0!==e.right&&null!==e.right?t.ExistenceProof.fromPartial(e.right):void 0,r}};const h={};t.CommitmentProof={encode:(e,n=i.default.Writer.create())=>(void 0!==e.exist&&t.ExistenceProof.encode(e.exist,n.uint32(10).fork()).ldelim(),void 0!==e.nonexist&&t.NonExistenceProof.encode(e.nonexist,n.uint32(18).fork()).ldelim(),void 0!==e.batch&&t.BatchProof.encode(e.batch,n.uint32(26).fork()).ldelim(),void 0!==e.compressed&&t.CompressedBatchProof.encode(e.compressed,n.uint32(34).fork()).ldelim(),n),decode(e,n){const r=e instanceof i.default.Reader?e:new i.default.Reader(e);let o=void 0===n?r.len:r.pos+n;const a=Object.assign({},h);for(;r.pos>>3){case 1:a.exist=t.ExistenceProof.decode(r,r.uint32());break;case 2:a.nonexist=t.NonExistenceProof.decode(r,r.uint32());break;case 3:a.batch=t.BatchProof.decode(r,r.uint32());break;case 4:a.compressed=t.CompressedBatchProof.decode(r,r.uint32());break;default:r.skipType(7&e)}}return a},fromJSON(e){const n=Object.assign({},h);return n.exist=void 0!==e.exist&&null!==e.exist?t.ExistenceProof.fromJSON(e.exist):void 0,n.nonexist=void 0!==e.nonexist&&null!==e.nonexist?t.NonExistenceProof.fromJSON(e.nonexist):void 0,n.batch=void 0!==e.batch&&null!==e.batch?t.BatchProof.fromJSON(e.batch):void 0,n.compressed=void 0!==e.compressed&&null!==e.compressed?t.CompressedBatchProof.fromJSON(e.compressed):void 0,n},toJSON(e){const n={};return void 0!==e.exist&&(n.exist=e.exist?t.ExistenceProof.toJSON(e.exist):void 0),void 0!==e.nonexist&&(n.nonexist=e.nonexist?t.NonExistenceProof.toJSON(e.nonexist):void 0),void 0!==e.batch&&(n.batch=e.batch?t.BatchProof.toJSON(e.batch):void 0),void 0!==e.compressed&&(n.compressed=e.compressed?t.CompressedBatchProof.toJSON(e.compressed):void 0),n},fromPartial(e){const n=Object.assign({},h);return n.exist=void 0!==e.exist&&null!==e.exist?t.ExistenceProof.fromPartial(e.exist):void 0,n.nonexist=void 0!==e.nonexist&&null!==e.nonexist?t.NonExistenceProof.fromPartial(e.nonexist):void 0,n.batch=void 0!==e.batch&&null!==e.batch?t.BatchProof.fromPartial(e.batch):void 0,n.compressed=void 0!==e.compressed&&null!==e.compressed?t.CompressedBatchProof.fromPartial(e.compressed):void 0,n}};const g={hash:0,prehashKey:0,prehashValue:0,length:0};t.LeafOp={encode:(e,t=i.default.Writer.create())=>(0!==e.hash&&t.uint32(8).int32(e.hash),0!==e.prehashKey&&t.uint32(16).int32(e.prehashKey),0!==e.prehashValue&&t.uint32(24).int32(e.prehashValue),0!==e.length&&t.uint32(32).int32(e.length),0!==e.prefix.length&&t.uint32(42).bytes(e.prefix),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},g);for(o.prefix=new Uint8Array;n.pos>>3){case 1:o.hash=n.int32();break;case 2:o.prehashKey=n.int32();break;case 3:o.prehashValue=n.int32();break;case 4:o.length=n.int32();break;case 5:o.prefix=n.bytes();break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},g);return t.hash=void 0!==e.hash&&null!==e.hash?c(e.hash):0,t.prehashKey=void 0!==e.prehashKey&&null!==e.prehashKey?c(e.prehashKey):0,t.prehashValue=void 0!==e.prehashValue&&null!==e.prehashValue?c(e.prehashValue):0,t.length=void 0!==e.length&&null!==e.length?u(e.length):0,t.prefix=void 0!==e.prefix&&null!==e.prefix?S(e.prefix):new Uint8Array,t},toJSON(e){const t={};return void 0!==e.hash&&(t.hash=d(e.hash)),void 0!==e.prehashKey&&(t.prehashKey=d(e.prehashKey)),void 0!==e.prehashValue&&(t.prehashValue=d(e.prehashValue)),void 0!==e.length&&(t.length=l(e.length)),void 0!==e.prefix&&(t.prefix=O(void 0!==e.prefix?e.prefix:new Uint8Array)),t},fromPartial(e){var t,n,r,o,i;const a=Object.assign({},g);return a.hash=null!==(t=e.hash)&&void 0!==t?t:0,a.prehashKey=null!==(n=e.prehashKey)&&void 0!==n?n:0,a.prehashValue=null!==(r=e.prehashValue)&&void 0!==r?r:0,a.length=null!==(o=e.length)&&void 0!==o?o:0,a.prefix=null!==(i=e.prefix)&&void 0!==i?i:new Uint8Array,a}};const p={hash:0};t.InnerOp={encode:(e,t=i.default.Writer.create())=>(0!==e.hash&&t.uint32(8).int32(e.hash),0!==e.prefix.length&&t.uint32(18).bytes(e.prefix),0!==e.suffix.length&&t.uint32(26).bytes(e.suffix),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},p);for(o.prefix=new Uint8Array,o.suffix=new Uint8Array;n.pos>>3){case 1:o.hash=n.int32();break;case 2:o.prefix=n.bytes();break;case 3:o.suffix=n.bytes();break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},p);return t.hash=void 0!==e.hash&&null!==e.hash?c(e.hash):0,t.prefix=void 0!==e.prefix&&null!==e.prefix?S(e.prefix):new Uint8Array,t.suffix=void 0!==e.suffix&&null!==e.suffix?S(e.suffix):new Uint8Array,t},toJSON(e){const t={};return void 0!==e.hash&&(t.hash=d(e.hash)),void 0!==e.prefix&&(t.prefix=O(void 0!==e.prefix?e.prefix:new Uint8Array)),void 0!==e.suffix&&(t.suffix=O(void 0!==e.suffix?e.suffix:new Uint8Array)),t},fromPartial(e){var t,n,r;const o=Object.assign({},p);return o.hash=null!==(t=e.hash)&&void 0!==t?t:0,o.prefix=null!==(n=e.prefix)&&void 0!==n?n:new Uint8Array,o.suffix=null!==(r=e.suffix)&&void 0!==r?r:new Uint8Array,o}};const m={maxDepth:0,minDepth:0};t.ProofSpec={encode:(e,n=i.default.Writer.create())=>(void 0!==e.leafSpec&&t.LeafOp.encode(e.leafSpec,n.uint32(10).fork()).ldelim(),void 0!==e.innerSpec&&t.InnerSpec.encode(e.innerSpec,n.uint32(18).fork()).ldelim(),0!==e.maxDepth&&n.uint32(24).int32(e.maxDepth),0!==e.minDepth&&n.uint32(32).int32(e.minDepth),n),decode(e,n){const r=e instanceof i.default.Reader?e:new i.default.Reader(e);let o=void 0===n?r.len:r.pos+n;const a=Object.assign({},m);for(;r.pos>>3){case 1:a.leafSpec=t.LeafOp.decode(r,r.uint32());break;case 2:a.innerSpec=t.InnerSpec.decode(r,r.uint32());break;case 3:a.maxDepth=r.int32();break;case 4:a.minDepth=r.int32();break;default:r.skipType(7&e)}}return a},fromJSON(e){const n=Object.assign({},m);return n.leafSpec=void 0!==e.leafSpec&&null!==e.leafSpec?t.LeafOp.fromJSON(e.leafSpec):void 0,n.innerSpec=void 0!==e.innerSpec&&null!==e.innerSpec?t.InnerSpec.fromJSON(e.innerSpec):void 0,n.maxDepth=void 0!==e.maxDepth&&null!==e.maxDepth?Number(e.maxDepth):0,n.minDepth=void 0!==e.minDepth&&null!==e.minDepth?Number(e.minDepth):0,n},toJSON(e){const n={};return void 0!==e.leafSpec&&(n.leafSpec=e.leafSpec?t.LeafOp.toJSON(e.leafSpec):void 0),void 0!==e.innerSpec&&(n.innerSpec=e.innerSpec?t.InnerSpec.toJSON(e.innerSpec):void 0),void 0!==e.maxDepth&&(n.maxDepth=e.maxDepth),void 0!==e.minDepth&&(n.minDepth=e.minDepth),n},fromPartial(e){var n,r;const o=Object.assign({},m);return o.leafSpec=void 0!==e.leafSpec&&null!==e.leafSpec?t.LeafOp.fromPartial(e.leafSpec):void 0,o.innerSpec=void 0!==e.innerSpec&&null!==e.innerSpec?t.InnerSpec.fromPartial(e.innerSpec):void 0,o.maxDepth=null!==(n=e.maxDepth)&&void 0!==n?n:0,o.minDepth=null!==(r=e.minDepth)&&void 0!==r?r:0,o}};const v={childOrder:0,childSize:0,minPrefixLength:0,maxPrefixLength:0,hash:0};t.InnerSpec={encode(e,t=i.default.Writer.create()){t.uint32(10).fork();for(const n of e.childOrder)t.int32(n);return t.ldelim(),0!==e.childSize&&t.uint32(16).int32(e.childSize),0!==e.minPrefixLength&&t.uint32(24).int32(e.minPrefixLength),0!==e.maxPrefixLength&&t.uint32(32).int32(e.maxPrefixLength),0!==e.emptyChild.length&&t.uint32(42).bytes(e.emptyChild),0!==e.hash&&t.uint32(48).int32(e.hash),t},decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},v);for(o.childOrder=[],o.emptyChild=new Uint8Array;n.pos>>3){case 1:if(2==(7&e)){const e=n.uint32()+n.pos;for(;n.posNumber(e))),n.childSize=void 0!==e.childSize&&null!==e.childSize?Number(e.childSize):0,n.minPrefixLength=void 0!==e.minPrefixLength&&null!==e.minPrefixLength?Number(e.minPrefixLength):0,n.maxPrefixLength=void 0!==e.maxPrefixLength&&null!==e.maxPrefixLength?Number(e.maxPrefixLength):0,n.emptyChild=void 0!==e.emptyChild&&null!==e.emptyChild?S(e.emptyChild):new Uint8Array,n.hash=void 0!==e.hash&&null!==e.hash?c(e.hash):0,n},toJSON(e){const t={};return e.childOrder?t.childOrder=e.childOrder.map((e=>e)):t.childOrder=[],void 0!==e.childSize&&(t.childSize=e.childSize),void 0!==e.minPrefixLength&&(t.minPrefixLength=e.minPrefixLength),void 0!==e.maxPrefixLength&&(t.maxPrefixLength=e.maxPrefixLength),void 0!==e.emptyChild&&(t.emptyChild=O(void 0!==e.emptyChild?e.emptyChild:new Uint8Array)),void 0!==e.hash&&(t.hash=d(e.hash)),t},fromPartial(e){var t,n,r,o,i,a;const s=Object.assign({},v);return s.childOrder=(null===(t=e.childOrder)||void 0===t?void 0:t.map((e=>e)))||[],s.childSize=null!==(n=e.childSize)&&void 0!==n?n:0,s.minPrefixLength=null!==(r=e.minPrefixLength)&&void 0!==r?r:0,s.maxPrefixLength=null!==(o=e.maxPrefixLength)&&void 0!==o?o:0,s.emptyChild=null!==(i=e.emptyChild)&&void 0!==i?i:new Uint8Array,s.hash=null!==(a=e.hash)&&void 0!==a?a:0,s}};const y={};t.BatchProof={encode(e,n=i.default.Writer.create()){for(const r of e.entries)t.BatchEntry.encode(r,n.uint32(10).fork()).ldelim();return n},decode(e,n){const r=e instanceof i.default.Reader?e:new i.default.Reader(e);let o=void 0===n?r.len:r.pos+n;const a=Object.assign({},y);for(a.entries=[];r.pos>>3==1?a.entries.push(t.BatchEntry.decode(r,r.uint32())):r.skipType(7&e)}return a},fromJSON(e){var n;const r=Object.assign({},y);return r.entries=(null!==(n=e.entries)&&void 0!==n?n:[]).map((e=>t.BatchEntry.fromJSON(e))),r},toJSON(e){const n={};return e.entries?n.entries=e.entries.map((e=>e?t.BatchEntry.toJSON(e):void 0)):n.entries=[],n},fromPartial(e){var n;const r=Object.assign({},y);return r.entries=(null===(n=e.entries)||void 0===n?void 0:n.map((e=>t.BatchEntry.fromPartial(e))))||[],r}};const b={};t.BatchEntry={encode:(e,n=i.default.Writer.create())=>(void 0!==e.exist&&t.ExistenceProof.encode(e.exist,n.uint32(10).fork()).ldelim(),void 0!==e.nonexist&&t.NonExistenceProof.encode(e.nonexist,n.uint32(18).fork()).ldelim(),n),decode(e,n){const r=e instanceof i.default.Reader?e:new i.default.Reader(e);let o=void 0===n?r.len:r.pos+n;const a=Object.assign({},b);for(;r.pos>>3){case 1:a.exist=t.ExistenceProof.decode(r,r.uint32());break;case 2:a.nonexist=t.NonExistenceProof.decode(r,r.uint32());break;default:r.skipType(7&e)}}return a},fromJSON(e){const n=Object.assign({},b);return n.exist=void 0!==e.exist&&null!==e.exist?t.ExistenceProof.fromJSON(e.exist):void 0,n.nonexist=void 0!==e.nonexist&&null!==e.nonexist?t.NonExistenceProof.fromJSON(e.nonexist):void 0,n},toJSON(e){const n={};return void 0!==e.exist&&(n.exist=e.exist?t.ExistenceProof.toJSON(e.exist):void 0),void 0!==e.nonexist&&(n.nonexist=e.nonexist?t.NonExistenceProof.toJSON(e.nonexist):void 0),n},fromPartial(e){const n=Object.assign({},b);return n.exist=void 0!==e.exist&&null!==e.exist?t.ExistenceProof.fromPartial(e.exist):void 0,n.nonexist=void 0!==e.nonexist&&null!==e.nonexist?t.NonExistenceProof.fromPartial(e.nonexist):void 0,n}};const I={};t.CompressedBatchProof={encode(e,n=i.default.Writer.create()){for(const r of e.entries)t.CompressedBatchEntry.encode(r,n.uint32(10).fork()).ldelim();for(const r of e.lookupInners)t.InnerOp.encode(r,n.uint32(18).fork()).ldelim();return n},decode(e,n){const r=e instanceof i.default.Reader?e:new i.default.Reader(e);let o=void 0===n?r.len:r.pos+n;const a=Object.assign({},I);for(a.entries=[],a.lookupInners=[];r.pos>>3){case 1:a.entries.push(t.CompressedBatchEntry.decode(r,r.uint32()));break;case 2:a.lookupInners.push(t.InnerOp.decode(r,r.uint32()));break;default:r.skipType(7&e)}}return a},fromJSON(e){var n,r;const o=Object.assign({},I);return o.entries=(null!==(n=e.entries)&&void 0!==n?n:[]).map((e=>t.CompressedBatchEntry.fromJSON(e))),o.lookupInners=(null!==(r=e.lookupInners)&&void 0!==r?r:[]).map((e=>t.InnerOp.fromJSON(e))),o},toJSON(e){const n={};return e.entries?n.entries=e.entries.map((e=>e?t.CompressedBatchEntry.toJSON(e):void 0)):n.entries=[],e.lookupInners?n.lookupInners=e.lookupInners.map((e=>e?t.InnerOp.toJSON(e):void 0)):n.lookupInners=[],n},fromPartial(e){var n,r;const o=Object.assign({},I);return o.entries=(null===(n=e.entries)||void 0===n?void 0:n.map((e=>t.CompressedBatchEntry.fromPartial(e))))||[],o.lookupInners=(null===(r=e.lookupInners)||void 0===r?void 0:r.map((e=>t.InnerOp.fromPartial(e))))||[],o}};const C={};t.CompressedBatchEntry={encode:(e,n=i.default.Writer.create())=>(void 0!==e.exist&&t.CompressedExistenceProof.encode(e.exist,n.uint32(10).fork()).ldelim(),void 0!==e.nonexist&&t.CompressedNonExistenceProof.encode(e.nonexist,n.uint32(18).fork()).ldelim(),n),decode(e,n){const r=e instanceof i.default.Reader?e:new i.default.Reader(e);let o=void 0===n?r.len:r.pos+n;const a=Object.assign({},C);for(;r.pos>>3){case 1:a.exist=t.CompressedExistenceProof.decode(r,r.uint32());break;case 2:a.nonexist=t.CompressedNonExistenceProof.decode(r,r.uint32());break;default:r.skipType(7&e)}}return a},fromJSON(e){const n=Object.assign({},C);return n.exist=void 0!==e.exist&&null!==e.exist?t.CompressedExistenceProof.fromJSON(e.exist):void 0,n.nonexist=void 0!==e.nonexist&&null!==e.nonexist?t.CompressedNonExistenceProof.fromJSON(e.nonexist):void 0,n},toJSON(e){const n={};return void 0!==e.exist&&(n.exist=e.exist?t.CompressedExistenceProof.toJSON(e.exist):void 0),void 0!==e.nonexist&&(n.nonexist=e.nonexist?t.CompressedNonExistenceProof.toJSON(e.nonexist):void 0),n},fromPartial(e){const n=Object.assign({},C);return n.exist=void 0!==e.exist&&null!==e.exist?t.CompressedExistenceProof.fromPartial(e.exist):void 0,n.nonexist=void 0!==e.nonexist&&null!==e.nonexist?t.CompressedNonExistenceProof.fromPartial(e.nonexist):void 0,n}};const E={path:0};t.CompressedExistenceProof={encode(e,n=i.default.Writer.create()){0!==e.key.length&&n.uint32(10).bytes(e.key),0!==e.value.length&&n.uint32(18).bytes(e.value),void 0!==e.leaf&&t.LeafOp.encode(e.leaf,n.uint32(26).fork()).ldelim(),n.uint32(34).fork();for(const t of e.path)n.int32(t);return n.ldelim(),n},decode(e,n){const r=e instanceof i.default.Reader?e:new i.default.Reader(e);let o=void 0===n?r.len:r.pos+n;const a=Object.assign({},E);for(a.path=[],a.key=new Uint8Array,a.value=new Uint8Array;r.pos>>3){case 1:a.key=r.bytes();break;case 2:a.value=r.bytes();break;case 3:a.leaf=t.LeafOp.decode(r,r.uint32());break;case 4:if(2==(7&e)){const e=r.uint32()+r.pos;for(;r.posNumber(e))),r},toJSON(e){const n={};return void 0!==e.key&&(n.key=O(void 0!==e.key?e.key:new Uint8Array)),void 0!==e.value&&(n.value=O(void 0!==e.value?e.value:new Uint8Array)),void 0!==e.leaf&&(n.leaf=e.leaf?t.LeafOp.toJSON(e.leaf):void 0),e.path?n.path=e.path.map((e=>e)):n.path=[],n},fromPartial(e){var n,r,o;const i=Object.assign({},E);return i.key=null!==(n=e.key)&&void 0!==n?n:new Uint8Array,i.value=null!==(r=e.value)&&void 0!==r?r:new Uint8Array,i.leaf=void 0!==e.leaf&&null!==e.leaf?t.LeafOp.fromPartial(e.leaf):void 0,i.path=(null===(o=e.path)||void 0===o?void 0:o.map((e=>e)))||[],i}};const w={};t.CompressedNonExistenceProof={encode:(e,n=i.default.Writer.create())=>(0!==e.key.length&&n.uint32(10).bytes(e.key),void 0!==e.left&&t.CompressedExistenceProof.encode(e.left,n.uint32(18).fork()).ldelim(),void 0!==e.right&&t.CompressedExistenceProof.encode(e.right,n.uint32(26).fork()).ldelim(),n),decode(e,n){const r=e instanceof i.default.Reader?e:new i.default.Reader(e);let o=void 0===n?r.len:r.pos+n;const a=Object.assign({},w);for(a.key=new Uint8Array;r.pos>>3){case 1:a.key=r.bytes();break;case 2:a.left=t.CompressedExistenceProof.decode(r,r.uint32());break;case 3:a.right=t.CompressedExistenceProof.decode(r,r.uint32());break;default:r.skipType(7&e)}}return a},fromJSON(e){const n=Object.assign({},w);return n.key=void 0!==e.key&&null!==e.key?S(e.key):new Uint8Array,n.left=void 0!==e.left&&null!==e.left?t.CompressedExistenceProof.fromJSON(e.left):void 0,n.right=void 0!==e.right&&null!==e.right?t.CompressedExistenceProof.fromJSON(e.right):void 0,n},toJSON(e){const n={};return void 0!==e.key&&(n.key=O(void 0!==e.key?e.key:new Uint8Array)),void 0!==e.left&&(n.left=e.left?t.CompressedExistenceProof.toJSON(e.left):void 0),void 0!==e.right&&(n.right=e.right?t.CompressedExistenceProof.toJSON(e.right):void 0),n},fromPartial(e){var n;const r=Object.assign({},w);return r.key=null!==(n=e.key)&&void 0!==n?n:new Uint8Array,r.left=void 0!==e.left&&null!==e.left?t.CompressedExistenceProof.fromPartial(e.left):void 0,r.right=void 0!==e.right&&null!==e.right?t.CompressedExistenceProof.fromPartial(e.right):void 0,r}};var B=(()=>{if(void 0!==B)return B;if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==n.g)return n.g;throw"Unable to locate global object"})();const _=B.atob||(e=>B.Buffer.from(e,"base64").toString("binary"));function S(e){const t=_(e),n=new Uint8Array(t.length);for(let e=0;eB.Buffer.from(e,"binary").toString("base64"));function O(e){const t=[];for(const n of e)t.push(String.fromCharCode(n));return k(t.join(""))}i.default.util.Long!==o.default&&(i.default.util.Long=o.default,i.default.configure())},3487:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Params=t.ModuleAccount=t.BaseAccount=t.protobufPackage=void 0;const o=r(n(3720)),i=r(n(3789)),a=n(3862);t.protobufPackage="cosmos.auth.v1beta1";const s={address:"",accountNumber:o.default.UZERO,sequence:o.default.UZERO};t.BaseAccount={encode:(e,t=i.default.Writer.create())=>(""!==e.address&&t.uint32(10).string(e.address),void 0!==e.pubKey&&a.Any.encode(e.pubKey,t.uint32(18).fork()).ldelim(),e.accountNumber.isZero()||t.uint32(24).uint64(e.accountNumber),e.sequence.isZero()||t.uint32(32).uint64(e.sequence),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},s);for(;n.pos>>3){case 1:o.address=n.string();break;case 2:o.pubKey=a.Any.decode(n,n.uint32());break;case 3:o.accountNumber=n.uint64();break;case 4:o.sequence=n.uint64();break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},s);return t.address=void 0!==e.address&&null!==e.address?String(e.address):"",t.pubKey=void 0!==e.pubKey&&null!==e.pubKey?a.Any.fromJSON(e.pubKey):void 0,t.accountNumber=void 0!==e.accountNumber&&null!==e.accountNumber?o.default.fromString(e.accountNumber):o.default.UZERO,t.sequence=void 0!==e.sequence&&null!==e.sequence?o.default.fromString(e.sequence):o.default.UZERO,t},toJSON(e){const t={};return void 0!==e.address&&(t.address=e.address),void 0!==e.pubKey&&(t.pubKey=e.pubKey?a.Any.toJSON(e.pubKey):void 0),void 0!==e.accountNumber&&(t.accountNumber=(e.accountNumber||o.default.UZERO).toString()),void 0!==e.sequence&&(t.sequence=(e.sequence||o.default.UZERO).toString()),t},fromPartial(e){var t;const n=Object.assign({},s);return n.address=null!==(t=e.address)&&void 0!==t?t:"",n.pubKey=void 0!==e.pubKey&&null!==e.pubKey?a.Any.fromPartial(e.pubKey):void 0,n.accountNumber=void 0!==e.accountNumber&&null!==e.accountNumber?o.default.fromValue(e.accountNumber):o.default.UZERO,n.sequence=void 0!==e.sequence&&null!==e.sequence?o.default.fromValue(e.sequence):o.default.UZERO,n}};const c={name:"",permissions:""};t.ModuleAccount={encode(e,n=i.default.Writer.create()){void 0!==e.baseAccount&&t.BaseAccount.encode(e.baseAccount,n.uint32(10).fork()).ldelim(),""!==e.name&&n.uint32(18).string(e.name);for(const t of e.permissions)n.uint32(26).string(t);return n},decode(e,n){const r=e instanceof i.default.Reader?e:new i.default.Reader(e);let o=void 0===n?r.len:r.pos+n;const a=Object.assign({},c);for(a.permissions=[];r.pos>>3){case 1:a.baseAccount=t.BaseAccount.decode(r,r.uint32());break;case 2:a.name=r.string();break;case 3:a.permissions.push(r.string());break;default:r.skipType(7&e)}}return a},fromJSON(e){var n;const r=Object.assign({},c);return r.baseAccount=void 0!==e.baseAccount&&null!==e.baseAccount?t.BaseAccount.fromJSON(e.baseAccount):void 0,r.name=void 0!==e.name&&null!==e.name?String(e.name):"",r.permissions=(null!==(n=e.permissions)&&void 0!==n?n:[]).map((e=>String(e))),r},toJSON(e){const n={};return void 0!==e.baseAccount&&(n.baseAccount=e.baseAccount?t.BaseAccount.toJSON(e.baseAccount):void 0),void 0!==e.name&&(n.name=e.name),e.permissions?n.permissions=e.permissions.map((e=>e)):n.permissions=[],n},fromPartial(e){var n,r;const o=Object.assign({},c);return o.baseAccount=void 0!==e.baseAccount&&null!==e.baseAccount?t.BaseAccount.fromPartial(e.baseAccount):void 0,o.name=null!==(n=e.name)&&void 0!==n?n:"",o.permissions=(null===(r=e.permissions)||void 0===r?void 0:r.map((e=>e)))||[],o}};const d={maxMemoCharacters:o.default.UZERO,txSigLimit:o.default.UZERO,txSizeCostPerByte:o.default.UZERO,sigVerifyCostEd25519:o.default.UZERO,sigVerifyCostSecp256k1:o.default.UZERO};t.Params={encode:(e,t=i.default.Writer.create())=>(e.maxMemoCharacters.isZero()||t.uint32(8).uint64(e.maxMemoCharacters),e.txSigLimit.isZero()||t.uint32(16).uint64(e.txSigLimit),e.txSizeCostPerByte.isZero()||t.uint32(24).uint64(e.txSizeCostPerByte),e.sigVerifyCostEd25519.isZero()||t.uint32(32).uint64(e.sigVerifyCostEd25519),e.sigVerifyCostSecp256k1.isZero()||t.uint32(40).uint64(e.sigVerifyCostSecp256k1),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},d);for(;n.pos>>3){case 1:o.maxMemoCharacters=n.uint64();break;case 2:o.txSigLimit=n.uint64();break;case 3:o.txSizeCostPerByte=n.uint64();break;case 4:o.sigVerifyCostEd25519=n.uint64();break;case 5:o.sigVerifyCostSecp256k1=n.uint64();break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},d);return t.maxMemoCharacters=void 0!==e.maxMemoCharacters&&null!==e.maxMemoCharacters?o.default.fromString(e.maxMemoCharacters):o.default.UZERO,t.txSigLimit=void 0!==e.txSigLimit&&null!==e.txSigLimit?o.default.fromString(e.txSigLimit):o.default.UZERO,t.txSizeCostPerByte=void 0!==e.txSizeCostPerByte&&null!==e.txSizeCostPerByte?o.default.fromString(e.txSizeCostPerByte):o.default.UZERO,t.sigVerifyCostEd25519=void 0!==e.sigVerifyCostEd25519&&null!==e.sigVerifyCostEd25519?o.default.fromString(e.sigVerifyCostEd25519):o.default.UZERO,t.sigVerifyCostSecp256k1=void 0!==e.sigVerifyCostSecp256k1&&null!==e.sigVerifyCostSecp256k1?o.default.fromString(e.sigVerifyCostSecp256k1):o.default.UZERO,t},toJSON(e){const t={};return void 0!==e.maxMemoCharacters&&(t.maxMemoCharacters=(e.maxMemoCharacters||o.default.UZERO).toString()),void 0!==e.txSigLimit&&(t.txSigLimit=(e.txSigLimit||o.default.UZERO).toString()),void 0!==e.txSizeCostPerByte&&(t.txSizeCostPerByte=(e.txSizeCostPerByte||o.default.UZERO).toString()),void 0!==e.sigVerifyCostEd25519&&(t.sigVerifyCostEd25519=(e.sigVerifyCostEd25519||o.default.UZERO).toString()),void 0!==e.sigVerifyCostSecp256k1&&(t.sigVerifyCostSecp256k1=(e.sigVerifyCostSecp256k1||o.default.UZERO).toString()),t},fromPartial(e){const t=Object.assign({},d);return t.maxMemoCharacters=void 0!==e.maxMemoCharacters&&null!==e.maxMemoCharacters?o.default.fromValue(e.maxMemoCharacters):o.default.UZERO,t.txSigLimit=void 0!==e.txSigLimit&&null!==e.txSigLimit?o.default.fromValue(e.txSigLimit):o.default.UZERO,t.txSizeCostPerByte=void 0!==e.txSizeCostPerByte&&null!==e.txSizeCostPerByte?o.default.fromValue(e.txSizeCostPerByte):o.default.UZERO,t.sigVerifyCostEd25519=void 0!==e.sigVerifyCostEd25519&&null!==e.sigVerifyCostEd25519?o.default.fromValue(e.sigVerifyCostEd25519):o.default.UZERO,t.sigVerifyCostSecp256k1=void 0!==e.sigVerifyCostSecp256k1&&null!==e.sigVerifyCostSecp256k1?o.default.fromValue(e.sigVerifyCostSecp256k1):o.default.UZERO,t}},i.default.util.Long!==o.default&&(i.default.util.Long=o.default,i.default.configure())},4443:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.QueryClientImpl=t.QueryParamsResponse=t.QueryParamsRequest=t.QueryAccountResponse=t.QueryAccountRequest=t.QueryAccountsResponse=t.QueryAccountsRequest=t.protobufPackage=void 0;const o=r(n(3720)),i=r(n(3789)),a=n(9551),s=n(3862),c=n(3487);t.protobufPackage="cosmos.auth.v1beta1";const d={};t.QueryAccountsRequest={encode:(e,t=i.default.Writer.create())=>(void 0!==e.pagination&&a.PageRequest.encode(e.pagination,t.uint32(10).fork()).ldelim(),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},d);for(;n.pos>>3==1?o.pagination=a.PageRequest.decode(n,n.uint32()):n.skipType(7&e)}return o},fromJSON(e){const t=Object.assign({},d);return t.pagination=void 0!==e.pagination&&null!==e.pagination?a.PageRequest.fromJSON(e.pagination):void 0,t},toJSON(e){const t={};return void 0!==e.pagination&&(t.pagination=e.pagination?a.PageRequest.toJSON(e.pagination):void 0),t},fromPartial(e){const t=Object.assign({},d);return t.pagination=void 0!==e.pagination&&null!==e.pagination?a.PageRequest.fromPartial(e.pagination):void 0,t}};const u={};t.QueryAccountsResponse={encode(e,t=i.default.Writer.create()){for(const n of e.accounts)s.Any.encode(n,t.uint32(10).fork()).ldelim();return void 0!==e.pagination&&a.PageResponse.encode(e.pagination,t.uint32(18).fork()).ldelim(),t},decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},u);for(o.accounts=[];n.pos>>3){case 1:o.accounts.push(s.Any.decode(n,n.uint32()));break;case 2:o.pagination=a.PageResponse.decode(n,n.uint32());break;default:n.skipType(7&e)}}return o},fromJSON(e){var t;const n=Object.assign({},u);return n.accounts=(null!==(t=e.accounts)&&void 0!==t?t:[]).map((e=>s.Any.fromJSON(e))),n.pagination=void 0!==e.pagination&&null!==e.pagination?a.PageResponse.fromJSON(e.pagination):void 0,n},toJSON(e){const t={};return e.accounts?t.accounts=e.accounts.map((e=>e?s.Any.toJSON(e):void 0)):t.accounts=[],void 0!==e.pagination&&(t.pagination=e.pagination?a.PageResponse.toJSON(e.pagination):void 0),t},fromPartial(e){var t;const n=Object.assign({},u);return n.accounts=(null===(t=e.accounts)||void 0===t?void 0:t.map((e=>s.Any.fromPartial(e))))||[],n.pagination=void 0!==e.pagination&&null!==e.pagination?a.PageResponse.fromPartial(e.pagination):void 0,n}};const l={address:""};t.QueryAccountRequest={encode:(e,t=i.default.Writer.create())=>(""!==e.address&&t.uint32(10).string(e.address),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},l);for(;n.pos>>3==1?o.address=n.string():n.skipType(7&e)}return o},fromJSON(e){const t=Object.assign({},l);return t.address=void 0!==e.address&&null!==e.address?String(e.address):"",t},toJSON(e){const t={};return void 0!==e.address&&(t.address=e.address),t},fromPartial(e){var t;const n=Object.assign({},l);return n.address=null!==(t=e.address)&&void 0!==t?t:"",n}};const A={};t.QueryAccountResponse={encode:(e,t=i.default.Writer.create())=>(void 0!==e.account&&s.Any.encode(e.account,t.uint32(10).fork()).ldelim(),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},A);for(;n.pos>>3==1?o.account=s.Any.decode(n,n.uint32()):n.skipType(7&e)}return o},fromJSON(e){const t=Object.assign({},A);return t.account=void 0!==e.account&&null!==e.account?s.Any.fromJSON(e.account):void 0,t},toJSON(e){const t={};return void 0!==e.account&&(t.account=e.account?s.Any.toJSON(e.account):void 0),t},fromPartial(e){const t=Object.assign({},A);return t.account=void 0!==e.account&&null!==e.account?s.Any.fromPartial(e.account):void 0,t}};const f={};t.QueryParamsRequest={encode:(e,t=i.default.Writer.create())=>t,decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},f);for(;n.posObject.assign({},f),toJSON:e=>({}),fromPartial:e=>Object.assign({},f)};const h={};t.QueryParamsResponse={encode:(e,t=i.default.Writer.create())=>(void 0!==e.params&&c.Params.encode(e.params,t.uint32(10).fork()).ldelim(),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},h);for(;n.pos>>3==1?o.params=c.Params.decode(n,n.uint32()):n.skipType(7&e)}return o},fromJSON(e){const t=Object.assign({},h);return t.params=void 0!==e.params&&null!==e.params?c.Params.fromJSON(e.params):void 0,t},toJSON(e){const t={};return void 0!==e.params&&(t.params=e.params?c.Params.toJSON(e.params):void 0),t},fromPartial(e){const t=Object.assign({},h);return t.params=void 0!==e.params&&null!==e.params?c.Params.fromPartial(e.params):void 0,t}},t.QueryClientImpl=class{constructor(e){this.rpc=e,this.Accounts=this.Accounts.bind(this),this.Account=this.Account.bind(this),this.Params=this.Params.bind(this)}Accounts(e){const n=t.QueryAccountsRequest.encode(e).finish();return this.rpc.request("cosmos.auth.v1beta1.Query","Accounts",n).then((e=>t.QueryAccountsResponse.decode(new i.default.Reader(e))))}Account(e){const n=t.QueryAccountRequest.encode(e).finish();return this.rpc.request("cosmos.auth.v1beta1.Query","Account",n).then((e=>t.QueryAccountResponse.decode(new i.default.Reader(e))))}Params(e){const n=t.QueryParamsRequest.encode(e).finish();return this.rpc.request("cosmos.auth.v1beta1.Query","Params",n).then((e=>t.QueryParamsResponse.decode(new i.default.Reader(e))))}},i.default.util.Long!==o.default&&(i.default.util.Long=o.default,i.default.configure())},8436:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Grant=t.GenericAuthorization=t.protobufPackage=void 0;const o=r(n(3720)),i=r(n(3789)),a=n(3862),s=n(5522);t.protobufPackage="cosmos.authz.v1beta1";const c={msg:""};t.GenericAuthorization={encode:(e,t=i.default.Writer.create())=>(""!==e.msg&&t.uint32(10).string(e.msg),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},c);for(;n.pos>>3==1?o.msg=n.string():n.skipType(7&e)}return o},fromJSON(e){const t=Object.assign({},c);return t.msg=void 0!==e.msg&&null!==e.msg?String(e.msg):"",t},toJSON(e){const t={};return void 0!==e.msg&&(t.msg=e.msg),t},fromPartial(e){var t;const n=Object.assign({},c);return n.msg=null!==(t=e.msg)&&void 0!==t?t:"",n}};const d={};function u(e){var t;return{seconds:(t=e.getTime()/1e3,o.default.fromNumber(t)),nanos:e.getTime()%1e3*1e6}}t.Grant={encode:(e,t=i.default.Writer.create())=>(void 0!==e.authorization&&a.Any.encode(e.authorization,t.uint32(10).fork()).ldelim(),void 0!==e.expiration&&s.Timestamp.encode(e.expiration,t.uint32(18).fork()).ldelim(),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},d);for(;n.pos>>3){case 1:o.authorization=a.Any.decode(n,n.uint32());break;case 2:o.expiration=s.Timestamp.decode(n,n.uint32());break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},d);var n;return t.authorization=void 0!==e.authorization&&null!==e.authorization?a.Any.fromJSON(e.authorization):void 0,t.expiration=void 0!==e.expiration&&null!==e.expiration?(n=e.expiration)instanceof Date?u(n):"string"==typeof n?u(new Date(n)):s.Timestamp.fromJSON(n):void 0,t},toJSON(e){const t={};return void 0!==e.authorization&&(t.authorization=e.authorization?a.Any.toJSON(e.authorization):void 0),void 0!==e.expiration&&(t.expiration=function(e){let t=1e3*e.seconds.toNumber();return t+=e.nanos/1e6,new Date(t)}(e.expiration).toISOString()),t},fromPartial(e){const t=Object.assign({},d);return t.authorization=void 0!==e.authorization&&null!==e.authorization?a.Any.fromPartial(e.authorization):void 0,t.expiration=void 0!==e.expiration&&null!==e.expiration?s.Timestamp.fromPartial(e.expiration):void 0,t}},i.default.util.Long!==o.default&&(i.default.util.Long=o.default,i.default.configure())},895:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.MsgClientImpl=t.MsgRevokeResponse=t.MsgRevoke=t.MsgGrantResponse=t.MsgExec=t.MsgExecResponse=t.MsgGrant=t.protobufPackage=void 0;const o=r(n(3720)),i=r(n(3789)),a=n(8436),s=n(3862);t.protobufPackage="cosmos.authz.v1beta1";const c={granter:"",grantee:""};t.MsgGrant={encode:(e,t=i.default.Writer.create())=>(""!==e.granter&&t.uint32(10).string(e.granter),""!==e.grantee&&t.uint32(18).string(e.grantee),void 0!==e.grant&&a.Grant.encode(e.grant,t.uint32(26).fork()).ldelim(),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},c);for(;n.pos>>3){case 1:o.granter=n.string();break;case 2:o.grantee=n.string();break;case 3:o.grant=a.Grant.decode(n,n.uint32());break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},c);return t.granter=void 0!==e.granter&&null!==e.granter?String(e.granter):"",t.grantee=void 0!==e.grantee&&null!==e.grantee?String(e.grantee):"",t.grant=void 0!==e.grant&&null!==e.grant?a.Grant.fromJSON(e.grant):void 0,t},toJSON(e){const t={};return void 0!==e.granter&&(t.granter=e.granter),void 0!==e.grantee&&(t.grantee=e.grantee),void 0!==e.grant&&(t.grant=e.grant?a.Grant.toJSON(e.grant):void 0),t},fromPartial(e){var t,n;const r=Object.assign({},c);return r.granter=null!==(t=e.granter)&&void 0!==t?t:"",r.grantee=null!==(n=e.grantee)&&void 0!==n?n:"",r.grant=void 0!==e.grant&&null!==e.grant?a.Grant.fromPartial(e.grant):void 0,r}};const d={};t.MsgExecResponse={encode(e,t=i.default.Writer.create()){for(const n of e.results)t.uint32(10).bytes(n);return t},decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},d);for(o.results=[];n.pos>>3==1?o.results.push(n.bytes()):n.skipType(7&e)}return o},fromJSON(e){var t;const n=Object.assign({},d);return n.results=(null!==(t=e.results)&&void 0!==t?t:[]).map((e=>function(e){const t=g(e),n=new Uint8Array(t.length);for(let e=0;efunction(e){const t=[];for(const n of e)t.push(String.fromCharCode(n));return p(t.join(""))}(void 0!==e?e:new Uint8Array))):t.results=[],t},fromPartial(e){var t;const n=Object.assign({},d);return n.results=(null===(t=e.results)||void 0===t?void 0:t.map((e=>e)))||[],n}};const u={grantee:""};t.MsgExec={encode(e,t=i.default.Writer.create()){""!==e.grantee&&t.uint32(10).string(e.grantee);for(const n of e.msgs)s.Any.encode(n,t.uint32(18).fork()).ldelim();return t},decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},u);for(o.msgs=[];n.pos>>3){case 1:o.grantee=n.string();break;case 2:o.msgs.push(s.Any.decode(n,n.uint32()));break;default:n.skipType(7&e)}}return o},fromJSON(e){var t;const n=Object.assign({},u);return n.grantee=void 0!==e.grantee&&null!==e.grantee?String(e.grantee):"",n.msgs=(null!==(t=e.msgs)&&void 0!==t?t:[]).map((e=>s.Any.fromJSON(e))),n},toJSON(e){const t={};return void 0!==e.grantee&&(t.grantee=e.grantee),e.msgs?t.msgs=e.msgs.map((e=>e?s.Any.toJSON(e):void 0)):t.msgs=[],t},fromPartial(e){var t,n;const r=Object.assign({},u);return r.grantee=null!==(t=e.grantee)&&void 0!==t?t:"",r.msgs=(null===(n=e.msgs)||void 0===n?void 0:n.map((e=>s.Any.fromPartial(e))))||[],r}};const l={};t.MsgGrantResponse={encode:(e,t=i.default.Writer.create())=>t,decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},l);for(;n.posObject.assign({},l),toJSON:e=>({}),fromPartial:e=>Object.assign({},l)};const A={granter:"",grantee:"",msgTypeUrl:""};t.MsgRevoke={encode:(e,t=i.default.Writer.create())=>(""!==e.granter&&t.uint32(10).string(e.granter),""!==e.grantee&&t.uint32(18).string(e.grantee),""!==e.msgTypeUrl&&t.uint32(26).string(e.msgTypeUrl),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},A);for(;n.pos>>3){case 1:o.granter=n.string();break;case 2:o.grantee=n.string();break;case 3:o.msgTypeUrl=n.string();break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},A);return t.granter=void 0!==e.granter&&null!==e.granter?String(e.granter):"",t.grantee=void 0!==e.grantee&&null!==e.grantee?String(e.grantee):"",t.msgTypeUrl=void 0!==e.msgTypeUrl&&null!==e.msgTypeUrl?String(e.msgTypeUrl):"",t},toJSON(e){const t={};return void 0!==e.granter&&(t.granter=e.granter),void 0!==e.grantee&&(t.grantee=e.grantee),void 0!==e.msgTypeUrl&&(t.msgTypeUrl=e.msgTypeUrl),t},fromPartial(e){var t,n,r;const o=Object.assign({},A);return o.granter=null!==(t=e.granter)&&void 0!==t?t:"",o.grantee=null!==(n=e.grantee)&&void 0!==n?n:"",o.msgTypeUrl=null!==(r=e.msgTypeUrl)&&void 0!==r?r:"",o}};const f={};t.MsgRevokeResponse={encode:(e,t=i.default.Writer.create())=>t,decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},f);for(;n.posObject.assign({},f),toJSON:e=>({}),fromPartial:e=>Object.assign({},f)},t.MsgClientImpl=class{constructor(e){this.rpc=e,this.Grant=this.Grant.bind(this),this.Exec=this.Exec.bind(this),this.Revoke=this.Revoke.bind(this)}Grant(e){const n=t.MsgGrant.encode(e).finish();return this.rpc.request("cosmos.authz.v1beta1.Msg","Grant",n).then((e=>t.MsgGrantResponse.decode(new i.default.Reader(e))))}Exec(e){const n=t.MsgExec.encode(e).finish();return this.rpc.request("cosmos.authz.v1beta1.Msg","Exec",n).then((e=>t.MsgExecResponse.decode(new i.default.Reader(e))))}Revoke(e){const n=t.MsgRevoke.encode(e).finish();return this.rpc.request("cosmos.authz.v1beta1.Msg","Revoke",n).then((e=>t.MsgRevokeResponse.decode(new i.default.Reader(e))))}};var h=(()=>{if(void 0!==h)return h;if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==n.g)return n.g;throw"Unable to locate global object"})();const g=h.atob||(e=>h.Buffer.from(e,"base64").toString("binary")),p=h.btoa||(e=>h.Buffer.from(e,"binary").toString("base64"));i.default.util.Long!==o.default&&(i.default.util.Long=o.default,i.default.configure())},4343:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Metadata=t.DenomUnit=t.Supply=t.Output=t.Input=t.SendEnabled=t.Params=t.protobufPackage=void 0;const o=r(n(3720)),i=r(n(3789)),a=n(891);t.protobufPackage="cosmos.bank.v1beta1";const s={defaultSendEnabled:!1};t.Params={encode(e,n=i.default.Writer.create()){for(const r of e.sendEnabled)t.SendEnabled.encode(r,n.uint32(10).fork()).ldelim();return!0===e.defaultSendEnabled&&n.uint32(16).bool(e.defaultSendEnabled),n},decode(e,n){const r=e instanceof i.default.Reader?e:new i.default.Reader(e);let o=void 0===n?r.len:r.pos+n;const a=Object.assign({},s);for(a.sendEnabled=[];r.pos>>3){case 1:a.sendEnabled.push(t.SendEnabled.decode(r,r.uint32()));break;case 2:a.defaultSendEnabled=r.bool();break;default:r.skipType(7&e)}}return a},fromJSON(e){var n;const r=Object.assign({},s);return r.sendEnabled=(null!==(n=e.sendEnabled)&&void 0!==n?n:[]).map((e=>t.SendEnabled.fromJSON(e))),r.defaultSendEnabled=void 0!==e.defaultSendEnabled&&null!==e.defaultSendEnabled&&Boolean(e.defaultSendEnabled),r},toJSON(e){const n={};return e.sendEnabled?n.sendEnabled=e.sendEnabled.map((e=>e?t.SendEnabled.toJSON(e):void 0)):n.sendEnabled=[],void 0!==e.defaultSendEnabled&&(n.defaultSendEnabled=e.defaultSendEnabled),n},fromPartial(e){var n,r;const o=Object.assign({},s);return o.sendEnabled=(null===(n=e.sendEnabled)||void 0===n?void 0:n.map((e=>t.SendEnabled.fromPartial(e))))||[],o.defaultSendEnabled=null!==(r=e.defaultSendEnabled)&&void 0!==r&&r,o}};const c={denom:"",enabled:!1};t.SendEnabled={encode:(e,t=i.default.Writer.create())=>(""!==e.denom&&t.uint32(10).string(e.denom),!0===e.enabled&&t.uint32(16).bool(e.enabled),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},c);for(;n.pos>>3){case 1:o.denom=n.string();break;case 2:o.enabled=n.bool();break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},c);return t.denom=void 0!==e.denom&&null!==e.denom?String(e.denom):"",t.enabled=void 0!==e.enabled&&null!==e.enabled&&Boolean(e.enabled),t},toJSON(e){const t={};return void 0!==e.denom&&(t.denom=e.denom),void 0!==e.enabled&&(t.enabled=e.enabled),t},fromPartial(e){var t,n;const r=Object.assign({},c);return r.denom=null!==(t=e.denom)&&void 0!==t?t:"",r.enabled=null!==(n=e.enabled)&&void 0!==n&&n,r}};const d={address:""};t.Input={encode(e,t=i.default.Writer.create()){""!==e.address&&t.uint32(10).string(e.address);for(const n of e.coins)a.Coin.encode(n,t.uint32(18).fork()).ldelim();return t},decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},d);for(o.coins=[];n.pos>>3){case 1:o.address=n.string();break;case 2:o.coins.push(a.Coin.decode(n,n.uint32()));break;default:n.skipType(7&e)}}return o},fromJSON(e){var t;const n=Object.assign({},d);return n.address=void 0!==e.address&&null!==e.address?String(e.address):"",n.coins=(null!==(t=e.coins)&&void 0!==t?t:[]).map((e=>a.Coin.fromJSON(e))),n},toJSON(e){const t={};return void 0!==e.address&&(t.address=e.address),e.coins?t.coins=e.coins.map((e=>e?a.Coin.toJSON(e):void 0)):t.coins=[],t},fromPartial(e){var t,n;const r=Object.assign({},d);return r.address=null!==(t=e.address)&&void 0!==t?t:"",r.coins=(null===(n=e.coins)||void 0===n?void 0:n.map((e=>a.Coin.fromPartial(e))))||[],r}};const u={address:""};t.Output={encode(e,t=i.default.Writer.create()){""!==e.address&&t.uint32(10).string(e.address);for(const n of e.coins)a.Coin.encode(n,t.uint32(18).fork()).ldelim();return t},decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},u);for(o.coins=[];n.pos>>3){case 1:o.address=n.string();break;case 2:o.coins.push(a.Coin.decode(n,n.uint32()));break;default:n.skipType(7&e)}}return o},fromJSON(e){var t;const n=Object.assign({},u);return n.address=void 0!==e.address&&null!==e.address?String(e.address):"",n.coins=(null!==(t=e.coins)&&void 0!==t?t:[]).map((e=>a.Coin.fromJSON(e))),n},toJSON(e){const t={};return void 0!==e.address&&(t.address=e.address),e.coins?t.coins=e.coins.map((e=>e?a.Coin.toJSON(e):void 0)):t.coins=[],t},fromPartial(e){var t,n;const r=Object.assign({},u);return r.address=null!==(t=e.address)&&void 0!==t?t:"",r.coins=(null===(n=e.coins)||void 0===n?void 0:n.map((e=>a.Coin.fromPartial(e))))||[],r}};const l={};t.Supply={encode(e,t=i.default.Writer.create()){for(const n of e.total)a.Coin.encode(n,t.uint32(10).fork()).ldelim();return t},decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},l);for(o.total=[];n.pos>>3==1?o.total.push(a.Coin.decode(n,n.uint32())):n.skipType(7&e)}return o},fromJSON(e){var t;const n=Object.assign({},l);return n.total=(null!==(t=e.total)&&void 0!==t?t:[]).map((e=>a.Coin.fromJSON(e))),n},toJSON(e){const t={};return e.total?t.total=e.total.map((e=>e?a.Coin.toJSON(e):void 0)):t.total=[],t},fromPartial(e){var t;const n=Object.assign({},l);return n.total=(null===(t=e.total)||void 0===t?void 0:t.map((e=>a.Coin.fromPartial(e))))||[],n}};const A={denom:"",exponent:0,aliases:""};t.DenomUnit={encode(e,t=i.default.Writer.create()){""!==e.denom&&t.uint32(10).string(e.denom),0!==e.exponent&&t.uint32(16).uint32(e.exponent);for(const n of e.aliases)t.uint32(26).string(n);return t},decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},A);for(o.aliases=[];n.pos>>3){case 1:o.denom=n.string();break;case 2:o.exponent=n.uint32();break;case 3:o.aliases.push(n.string());break;default:n.skipType(7&e)}}return o},fromJSON(e){var t;const n=Object.assign({},A);return n.denom=void 0!==e.denom&&null!==e.denom?String(e.denom):"",n.exponent=void 0!==e.exponent&&null!==e.exponent?Number(e.exponent):0,n.aliases=(null!==(t=e.aliases)&&void 0!==t?t:[]).map((e=>String(e))),n},toJSON(e){const t={};return void 0!==e.denom&&(t.denom=e.denom),void 0!==e.exponent&&(t.exponent=e.exponent),e.aliases?t.aliases=e.aliases.map((e=>e)):t.aliases=[],t},fromPartial(e){var t,n,r;const o=Object.assign({},A);return o.denom=null!==(t=e.denom)&&void 0!==t?t:"",o.exponent=null!==(n=e.exponent)&&void 0!==n?n:0,o.aliases=(null===(r=e.aliases)||void 0===r?void 0:r.map((e=>e)))||[],o}};const f={description:"",base:"",display:"",name:"",symbol:""};t.Metadata={encode(e,n=i.default.Writer.create()){""!==e.description&&n.uint32(10).string(e.description);for(const r of e.denomUnits)t.DenomUnit.encode(r,n.uint32(18).fork()).ldelim();return""!==e.base&&n.uint32(26).string(e.base),""!==e.display&&n.uint32(34).string(e.display),""!==e.name&&n.uint32(42).string(e.name),""!==e.symbol&&n.uint32(50).string(e.symbol),n},decode(e,n){const r=e instanceof i.default.Reader?e:new i.default.Reader(e);let o=void 0===n?r.len:r.pos+n;const a=Object.assign({},f);for(a.denomUnits=[];r.pos>>3){case 1:a.description=r.string();break;case 2:a.denomUnits.push(t.DenomUnit.decode(r,r.uint32()));break;case 3:a.base=r.string();break;case 4:a.display=r.string();break;case 5:a.name=r.string();break;case 6:a.symbol=r.string();break;default:r.skipType(7&e)}}return a},fromJSON(e){var n;const r=Object.assign({},f);return r.description=void 0!==e.description&&null!==e.description?String(e.description):"",r.denomUnits=(null!==(n=e.denomUnits)&&void 0!==n?n:[]).map((e=>t.DenomUnit.fromJSON(e))),r.base=void 0!==e.base&&null!==e.base?String(e.base):"",r.display=void 0!==e.display&&null!==e.display?String(e.display):"",r.name=void 0!==e.name&&null!==e.name?String(e.name):"",r.symbol=void 0!==e.symbol&&null!==e.symbol?String(e.symbol):"",r},toJSON(e){const n={};return void 0!==e.description&&(n.description=e.description),e.denomUnits?n.denomUnits=e.denomUnits.map((e=>e?t.DenomUnit.toJSON(e):void 0)):n.denomUnits=[],void 0!==e.base&&(n.base=e.base),void 0!==e.display&&(n.display=e.display),void 0!==e.name&&(n.name=e.name),void 0!==e.symbol&&(n.symbol=e.symbol),n},fromPartial(e){var n,r,o,i,a,s;const c=Object.assign({},f);return c.description=null!==(n=e.description)&&void 0!==n?n:"",c.denomUnits=(null===(r=e.denomUnits)||void 0===r?void 0:r.map((e=>t.DenomUnit.fromPartial(e))))||[],c.base=null!==(o=e.base)&&void 0!==o?o:"",c.display=null!==(i=e.display)&&void 0!==i?i:"",c.name=null!==(a=e.name)&&void 0!==a?a:"",c.symbol=null!==(s=e.symbol)&&void 0!==s?s:"",c}},i.default.util.Long!==o.default&&(i.default.util.Long=o.default,i.default.configure())},2916:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.QueryClientImpl=t.QueryDenomMetadataResponse=t.QueryDenomMetadataRequest=t.QueryDenomsMetadataResponse=t.QueryDenomsMetadataRequest=t.QueryParamsResponse=t.QueryParamsRequest=t.QuerySupplyOfResponse=t.QuerySupplyOfRequest=t.QueryTotalSupplyResponse=t.QueryTotalSupplyRequest=t.QueryAllBalancesResponse=t.QueryAllBalancesRequest=t.QueryBalanceResponse=t.QueryBalanceRequest=t.protobufPackage=void 0;const o=r(n(3720)),i=r(n(3789)),a=n(891),s=n(9551),c=n(4343);t.protobufPackage="cosmos.bank.v1beta1";const d={address:"",denom:""};t.QueryBalanceRequest={encode:(e,t=i.default.Writer.create())=>(""!==e.address&&t.uint32(10).string(e.address),""!==e.denom&&t.uint32(18).string(e.denom),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},d);for(;n.pos>>3){case 1:o.address=n.string();break;case 2:o.denom=n.string();break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},d);return t.address=void 0!==e.address&&null!==e.address?String(e.address):"",t.denom=void 0!==e.denom&&null!==e.denom?String(e.denom):"",t},toJSON(e){const t={};return void 0!==e.address&&(t.address=e.address),void 0!==e.denom&&(t.denom=e.denom),t},fromPartial(e){var t,n;const r=Object.assign({},d);return r.address=null!==(t=e.address)&&void 0!==t?t:"",r.denom=null!==(n=e.denom)&&void 0!==n?n:"",r}};const u={};t.QueryBalanceResponse={encode:(e,t=i.default.Writer.create())=>(void 0!==e.balance&&a.Coin.encode(e.balance,t.uint32(10).fork()).ldelim(),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},u);for(;n.pos>>3==1?o.balance=a.Coin.decode(n,n.uint32()):n.skipType(7&e)}return o},fromJSON(e){const t=Object.assign({},u);return t.balance=void 0!==e.balance&&null!==e.balance?a.Coin.fromJSON(e.balance):void 0,t},toJSON(e){const t={};return void 0!==e.balance&&(t.balance=e.balance?a.Coin.toJSON(e.balance):void 0),t},fromPartial(e){const t=Object.assign({},u);return t.balance=void 0!==e.balance&&null!==e.balance?a.Coin.fromPartial(e.balance):void 0,t}};const l={address:""};t.QueryAllBalancesRequest={encode:(e,t=i.default.Writer.create())=>(""!==e.address&&t.uint32(10).string(e.address),void 0!==e.pagination&&s.PageRequest.encode(e.pagination,t.uint32(18).fork()).ldelim(),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},l);for(;n.pos>>3){case 1:o.address=n.string();break;case 2:o.pagination=s.PageRequest.decode(n,n.uint32());break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},l);return t.address=void 0!==e.address&&null!==e.address?String(e.address):"",t.pagination=void 0!==e.pagination&&null!==e.pagination?s.PageRequest.fromJSON(e.pagination):void 0,t},toJSON(e){const t={};return void 0!==e.address&&(t.address=e.address),void 0!==e.pagination&&(t.pagination=e.pagination?s.PageRequest.toJSON(e.pagination):void 0),t},fromPartial(e){var t;const n=Object.assign({},l);return n.address=null!==(t=e.address)&&void 0!==t?t:"",n.pagination=void 0!==e.pagination&&null!==e.pagination?s.PageRequest.fromPartial(e.pagination):void 0,n}};const A={};t.QueryAllBalancesResponse={encode(e,t=i.default.Writer.create()){for(const n of e.balances)a.Coin.encode(n,t.uint32(10).fork()).ldelim();return void 0!==e.pagination&&s.PageResponse.encode(e.pagination,t.uint32(18).fork()).ldelim(),t},decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},A);for(o.balances=[];n.pos>>3){case 1:o.balances.push(a.Coin.decode(n,n.uint32()));break;case 2:o.pagination=s.PageResponse.decode(n,n.uint32());break;default:n.skipType(7&e)}}return o},fromJSON(e){var t;const n=Object.assign({},A);return n.balances=(null!==(t=e.balances)&&void 0!==t?t:[]).map((e=>a.Coin.fromJSON(e))),n.pagination=void 0!==e.pagination&&null!==e.pagination?s.PageResponse.fromJSON(e.pagination):void 0,n},toJSON(e){const t={};return e.balances?t.balances=e.balances.map((e=>e?a.Coin.toJSON(e):void 0)):t.balances=[],void 0!==e.pagination&&(t.pagination=e.pagination?s.PageResponse.toJSON(e.pagination):void 0),t},fromPartial(e){var t;const n=Object.assign({},A);return n.balances=(null===(t=e.balances)||void 0===t?void 0:t.map((e=>a.Coin.fromPartial(e))))||[],n.pagination=void 0!==e.pagination&&null!==e.pagination?s.PageResponse.fromPartial(e.pagination):void 0,n}};const f={};t.QueryTotalSupplyRequest={encode:(e,t=i.default.Writer.create())=>(void 0!==e.pagination&&s.PageRequest.encode(e.pagination,t.uint32(10).fork()).ldelim(),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},f);for(;n.pos>>3==1?o.pagination=s.PageRequest.decode(n,n.uint32()):n.skipType(7&e)}return o},fromJSON(e){const t=Object.assign({},f);return t.pagination=void 0!==e.pagination&&null!==e.pagination?s.PageRequest.fromJSON(e.pagination):void 0,t},toJSON(e){const t={};return void 0!==e.pagination&&(t.pagination=e.pagination?s.PageRequest.toJSON(e.pagination):void 0),t},fromPartial(e){const t=Object.assign({},f);return t.pagination=void 0!==e.pagination&&null!==e.pagination?s.PageRequest.fromPartial(e.pagination):void 0,t}};const h={};t.QueryTotalSupplyResponse={encode(e,t=i.default.Writer.create()){for(const n of e.supply)a.Coin.encode(n,t.uint32(10).fork()).ldelim();return void 0!==e.pagination&&s.PageResponse.encode(e.pagination,t.uint32(18).fork()).ldelim(),t},decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},h);for(o.supply=[];n.pos>>3){case 1:o.supply.push(a.Coin.decode(n,n.uint32()));break;case 2:o.pagination=s.PageResponse.decode(n,n.uint32());break;default:n.skipType(7&e)}}return o},fromJSON(e){var t;const n=Object.assign({},h);return n.supply=(null!==(t=e.supply)&&void 0!==t?t:[]).map((e=>a.Coin.fromJSON(e))),n.pagination=void 0!==e.pagination&&null!==e.pagination?s.PageResponse.fromJSON(e.pagination):void 0,n},toJSON(e){const t={};return e.supply?t.supply=e.supply.map((e=>e?a.Coin.toJSON(e):void 0)):t.supply=[],void 0!==e.pagination&&(t.pagination=e.pagination?s.PageResponse.toJSON(e.pagination):void 0),t},fromPartial(e){var t;const n=Object.assign({},h);return n.supply=(null===(t=e.supply)||void 0===t?void 0:t.map((e=>a.Coin.fromPartial(e))))||[],n.pagination=void 0!==e.pagination&&null!==e.pagination?s.PageResponse.fromPartial(e.pagination):void 0,n}};const g={denom:""};t.QuerySupplyOfRequest={encode:(e,t=i.default.Writer.create())=>(""!==e.denom&&t.uint32(10).string(e.denom),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},g);for(;n.pos>>3==1?o.denom=n.string():n.skipType(7&e)}return o},fromJSON(e){const t=Object.assign({},g);return t.denom=void 0!==e.denom&&null!==e.denom?String(e.denom):"",t},toJSON(e){const t={};return void 0!==e.denom&&(t.denom=e.denom),t},fromPartial(e){var t;const n=Object.assign({},g);return n.denom=null!==(t=e.denom)&&void 0!==t?t:"",n}};const p={};t.QuerySupplyOfResponse={encode:(e,t=i.default.Writer.create())=>(void 0!==e.amount&&a.Coin.encode(e.amount,t.uint32(10).fork()).ldelim(),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},p);for(;n.pos>>3==1?o.amount=a.Coin.decode(n,n.uint32()):n.skipType(7&e)}return o},fromJSON(e){const t=Object.assign({},p);return t.amount=void 0!==e.amount&&null!==e.amount?a.Coin.fromJSON(e.amount):void 0,t},toJSON(e){const t={};return void 0!==e.amount&&(t.amount=e.amount?a.Coin.toJSON(e.amount):void 0),t},fromPartial(e){const t=Object.assign({},p);return t.amount=void 0!==e.amount&&null!==e.amount?a.Coin.fromPartial(e.amount):void 0,t}};const m={};t.QueryParamsRequest={encode:(e,t=i.default.Writer.create())=>t,decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},m);for(;n.posObject.assign({},m),toJSON:e=>({}),fromPartial:e=>Object.assign({},m)};const v={};t.QueryParamsResponse={encode:(e,t=i.default.Writer.create())=>(void 0!==e.params&&c.Params.encode(e.params,t.uint32(10).fork()).ldelim(),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},v);for(;n.pos>>3==1?o.params=c.Params.decode(n,n.uint32()):n.skipType(7&e)}return o},fromJSON(e){const t=Object.assign({},v);return t.params=void 0!==e.params&&null!==e.params?c.Params.fromJSON(e.params):void 0,t},toJSON(e){const t={};return void 0!==e.params&&(t.params=e.params?c.Params.toJSON(e.params):void 0),t},fromPartial(e){const t=Object.assign({},v);return t.params=void 0!==e.params&&null!==e.params?c.Params.fromPartial(e.params):void 0,t}};const y={};t.QueryDenomsMetadataRequest={encode:(e,t=i.default.Writer.create())=>(void 0!==e.pagination&&s.PageRequest.encode(e.pagination,t.uint32(10).fork()).ldelim(),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},y);for(;n.pos>>3==1?o.pagination=s.PageRequest.decode(n,n.uint32()):n.skipType(7&e)}return o},fromJSON(e){const t=Object.assign({},y);return t.pagination=void 0!==e.pagination&&null!==e.pagination?s.PageRequest.fromJSON(e.pagination):void 0,t},toJSON(e){const t={};return void 0!==e.pagination&&(t.pagination=e.pagination?s.PageRequest.toJSON(e.pagination):void 0),t},fromPartial(e){const t=Object.assign({},y);return t.pagination=void 0!==e.pagination&&null!==e.pagination?s.PageRequest.fromPartial(e.pagination):void 0,t}};const b={};t.QueryDenomsMetadataResponse={encode(e,t=i.default.Writer.create()){for(const n of e.metadatas)c.Metadata.encode(n,t.uint32(10).fork()).ldelim();return void 0!==e.pagination&&s.PageResponse.encode(e.pagination,t.uint32(18).fork()).ldelim(),t},decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},b);for(o.metadatas=[];n.pos>>3){case 1:o.metadatas.push(c.Metadata.decode(n,n.uint32()));break;case 2:o.pagination=s.PageResponse.decode(n,n.uint32());break;default:n.skipType(7&e)}}return o},fromJSON(e){var t;const n=Object.assign({},b);return n.metadatas=(null!==(t=e.metadatas)&&void 0!==t?t:[]).map((e=>c.Metadata.fromJSON(e))),n.pagination=void 0!==e.pagination&&null!==e.pagination?s.PageResponse.fromJSON(e.pagination):void 0,n},toJSON(e){const t={};return e.metadatas?t.metadatas=e.metadatas.map((e=>e?c.Metadata.toJSON(e):void 0)):t.metadatas=[],void 0!==e.pagination&&(t.pagination=e.pagination?s.PageResponse.toJSON(e.pagination):void 0),t},fromPartial(e){var t;const n=Object.assign({},b);return n.metadatas=(null===(t=e.metadatas)||void 0===t?void 0:t.map((e=>c.Metadata.fromPartial(e))))||[],n.pagination=void 0!==e.pagination&&null!==e.pagination?s.PageResponse.fromPartial(e.pagination):void 0,n}};const I={denom:""};t.QueryDenomMetadataRequest={encode:(e,t=i.default.Writer.create())=>(""!==e.denom&&t.uint32(10).string(e.denom),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},I);for(;n.pos>>3==1?o.denom=n.string():n.skipType(7&e)}return o},fromJSON(e){const t=Object.assign({},I);return t.denom=void 0!==e.denom&&null!==e.denom?String(e.denom):"",t},toJSON(e){const t={};return void 0!==e.denom&&(t.denom=e.denom),t},fromPartial(e){var t;const n=Object.assign({},I);return n.denom=null!==(t=e.denom)&&void 0!==t?t:"",n}};const C={};t.QueryDenomMetadataResponse={encode:(e,t=i.default.Writer.create())=>(void 0!==e.metadata&&c.Metadata.encode(e.metadata,t.uint32(10).fork()).ldelim(),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},C);for(;n.pos>>3==1?o.metadata=c.Metadata.decode(n,n.uint32()):n.skipType(7&e)}return o},fromJSON(e){const t=Object.assign({},C);return t.metadata=void 0!==e.metadata&&null!==e.metadata?c.Metadata.fromJSON(e.metadata):void 0,t},toJSON(e){const t={};return void 0!==e.metadata&&(t.metadata=e.metadata?c.Metadata.toJSON(e.metadata):void 0),t},fromPartial(e){const t=Object.assign({},C);return t.metadata=void 0!==e.metadata&&null!==e.metadata?c.Metadata.fromPartial(e.metadata):void 0,t}},t.QueryClientImpl=class{constructor(e){this.rpc=e,this.Balance=this.Balance.bind(this),this.AllBalances=this.AllBalances.bind(this),this.TotalSupply=this.TotalSupply.bind(this),this.SupplyOf=this.SupplyOf.bind(this),this.Params=this.Params.bind(this),this.DenomMetadata=this.DenomMetadata.bind(this),this.DenomsMetadata=this.DenomsMetadata.bind(this)}Balance(e){const n=t.QueryBalanceRequest.encode(e).finish();return this.rpc.request("cosmos.bank.v1beta1.Query","Balance",n).then((e=>t.QueryBalanceResponse.decode(new i.default.Reader(e))))}AllBalances(e){const n=t.QueryAllBalancesRequest.encode(e).finish();return this.rpc.request("cosmos.bank.v1beta1.Query","AllBalances",n).then((e=>t.QueryAllBalancesResponse.decode(new i.default.Reader(e))))}TotalSupply(e){const n=t.QueryTotalSupplyRequest.encode(e).finish();return this.rpc.request("cosmos.bank.v1beta1.Query","TotalSupply",n).then((e=>t.QueryTotalSupplyResponse.decode(new i.default.Reader(e))))}SupplyOf(e){const n=t.QuerySupplyOfRequest.encode(e).finish();return this.rpc.request("cosmos.bank.v1beta1.Query","SupplyOf",n).then((e=>t.QuerySupplyOfResponse.decode(new i.default.Reader(e))))}Params(e){const n=t.QueryParamsRequest.encode(e).finish();return this.rpc.request("cosmos.bank.v1beta1.Query","Params",n).then((e=>t.QueryParamsResponse.decode(new i.default.Reader(e))))}DenomMetadata(e){const n=t.QueryDenomMetadataRequest.encode(e).finish();return this.rpc.request("cosmos.bank.v1beta1.Query","DenomMetadata",n).then((e=>t.QueryDenomMetadataResponse.decode(new i.default.Reader(e))))}DenomsMetadata(e){const n=t.QueryDenomsMetadataRequest.encode(e).finish();return this.rpc.request("cosmos.bank.v1beta1.Query","DenomsMetadata",n).then((e=>t.QueryDenomsMetadataResponse.decode(new i.default.Reader(e))))}},i.default.util.Long!==o.default&&(i.default.util.Long=o.default,i.default.configure())},8994:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.MsgClientImpl=t.MsgMultiSendResponse=t.MsgMultiSend=t.MsgSendResponse=t.MsgSend=t.protobufPackage=void 0;const o=r(n(3720)),i=r(n(3789)),a=n(891),s=n(4343);t.protobufPackage="cosmos.bank.v1beta1";const c={fromAddress:"",toAddress:""};t.MsgSend={encode(e,t=i.default.Writer.create()){""!==e.fromAddress&&t.uint32(10).string(e.fromAddress),""!==e.toAddress&&t.uint32(18).string(e.toAddress);for(const n of e.amount)a.Coin.encode(n,t.uint32(26).fork()).ldelim();return t},decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},c);for(o.amount=[];n.pos>>3){case 1:o.fromAddress=n.string();break;case 2:o.toAddress=n.string();break;case 3:o.amount.push(a.Coin.decode(n,n.uint32()));break;default:n.skipType(7&e)}}return o},fromJSON(e){var t;const n=Object.assign({},c);return n.fromAddress=void 0!==e.fromAddress&&null!==e.fromAddress?String(e.fromAddress):"",n.toAddress=void 0!==e.toAddress&&null!==e.toAddress?String(e.toAddress):"",n.amount=(null!==(t=e.amount)&&void 0!==t?t:[]).map((e=>a.Coin.fromJSON(e))),n},toJSON(e){const t={};return void 0!==e.fromAddress&&(t.fromAddress=e.fromAddress),void 0!==e.toAddress&&(t.toAddress=e.toAddress),e.amount?t.amount=e.amount.map((e=>e?a.Coin.toJSON(e):void 0)):t.amount=[],t},fromPartial(e){var t,n,r;const o=Object.assign({},c);return o.fromAddress=null!==(t=e.fromAddress)&&void 0!==t?t:"",o.toAddress=null!==(n=e.toAddress)&&void 0!==n?n:"",o.amount=(null===(r=e.amount)||void 0===r?void 0:r.map((e=>a.Coin.fromPartial(e))))||[],o}};const d={};t.MsgSendResponse={encode:(e,t=i.default.Writer.create())=>t,decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},d);for(;n.posObject.assign({},d),toJSON:e=>({}),fromPartial:e=>Object.assign({},d)};const u={};t.MsgMultiSend={encode(e,t=i.default.Writer.create()){for(const n of e.inputs)s.Input.encode(n,t.uint32(10).fork()).ldelim();for(const n of e.outputs)s.Output.encode(n,t.uint32(18).fork()).ldelim();return t},decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},u);for(o.inputs=[],o.outputs=[];n.pos>>3){case 1:o.inputs.push(s.Input.decode(n,n.uint32()));break;case 2:o.outputs.push(s.Output.decode(n,n.uint32()));break;default:n.skipType(7&e)}}return o},fromJSON(e){var t,n;const r=Object.assign({},u);return r.inputs=(null!==(t=e.inputs)&&void 0!==t?t:[]).map((e=>s.Input.fromJSON(e))),r.outputs=(null!==(n=e.outputs)&&void 0!==n?n:[]).map((e=>s.Output.fromJSON(e))),r},toJSON(e){const t={};return e.inputs?t.inputs=e.inputs.map((e=>e?s.Input.toJSON(e):void 0)):t.inputs=[],e.outputs?t.outputs=e.outputs.map((e=>e?s.Output.toJSON(e):void 0)):t.outputs=[],t},fromPartial(e){var t,n;const r=Object.assign({},u);return r.inputs=(null===(t=e.inputs)||void 0===t?void 0:t.map((e=>s.Input.fromPartial(e))))||[],r.outputs=(null===(n=e.outputs)||void 0===n?void 0:n.map((e=>s.Output.fromPartial(e))))||[],r}};const l={};t.MsgMultiSendResponse={encode:(e,t=i.default.Writer.create())=>t,decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},l);for(;n.posObject.assign({},l),toJSON:e=>({}),fromPartial:e=>Object.assign({},l)},t.MsgClientImpl=class{constructor(e){this.rpc=e,this.Send=this.Send.bind(this),this.MultiSend=this.MultiSend.bind(this)}Send(e){const n=t.MsgSend.encode(e).finish();return this.rpc.request("cosmos.bank.v1beta1.Msg","Send",n).then((e=>t.MsgSendResponse.decode(new i.default.Reader(e))))}MultiSend(e){const n=t.MsgMultiSend.encode(e).finish();return this.rpc.request("cosmos.bank.v1beta1.Msg","MultiSend",n).then((e=>t.MsgMultiSendResponse.decode(new i.default.Reader(e))))}},i.default.util.Long!==o.default&&(i.default.util.Long=o.default,i.default.configure())},4194:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.SearchTxsResult=t.TxMsgData=t.MsgData=t.SimulationResponse=t.Result=t.GasInfo=t.Attribute=t.StringEvent=t.ABCIMessageLog=t.TxResponse=t.protobufPackage=void 0;const o=r(n(3720)),i=r(n(3789)),a=n(3862),s=n(9492);t.protobufPackage="cosmos.base.abci.v1beta1";const c={height:o.default.ZERO,txhash:"",codespace:"",code:0,data:"",rawLog:"",info:"",gasWanted:o.default.ZERO,gasUsed:o.default.ZERO,timestamp:""};t.TxResponse={encode(e,n=i.default.Writer.create()){e.height.isZero()||n.uint32(8).int64(e.height),""!==e.txhash&&n.uint32(18).string(e.txhash),""!==e.codespace&&n.uint32(26).string(e.codespace),0!==e.code&&n.uint32(32).uint32(e.code),""!==e.data&&n.uint32(42).string(e.data),""!==e.rawLog&&n.uint32(50).string(e.rawLog);for(const r of e.logs)t.ABCIMessageLog.encode(r,n.uint32(58).fork()).ldelim();""!==e.info&&n.uint32(66).string(e.info),e.gasWanted.isZero()||n.uint32(72).int64(e.gasWanted),e.gasUsed.isZero()||n.uint32(80).int64(e.gasUsed),void 0!==e.tx&&a.Any.encode(e.tx,n.uint32(90).fork()).ldelim(),""!==e.timestamp&&n.uint32(98).string(e.timestamp);for(const t of e.events)s.Event.encode(t,n.uint32(106).fork()).ldelim();return n},decode(e,n){const r=e instanceof i.default.Reader?e:new i.default.Reader(e);let o=void 0===n?r.len:r.pos+n;const d=Object.assign({},c);for(d.logs=[],d.events=[];r.pos>>3){case 1:d.height=r.int64();break;case 2:d.txhash=r.string();break;case 3:d.codespace=r.string();break;case 4:d.code=r.uint32();break;case 5:d.data=r.string();break;case 6:d.rawLog=r.string();break;case 7:d.logs.push(t.ABCIMessageLog.decode(r,r.uint32()));break;case 8:d.info=r.string();break;case 9:d.gasWanted=r.int64();break;case 10:d.gasUsed=r.int64();break;case 11:d.tx=a.Any.decode(r,r.uint32());break;case 12:d.timestamp=r.string();break;case 13:d.events.push(s.Event.decode(r,r.uint32()));break;default:r.skipType(7&e)}}return d},fromJSON(e){var n,r;const i=Object.assign({},c);return i.height=void 0!==e.height&&null!==e.height?o.default.fromString(e.height):o.default.ZERO,i.txhash=void 0!==e.txhash&&null!==e.txhash?String(e.txhash):"",i.codespace=void 0!==e.codespace&&null!==e.codespace?String(e.codespace):"",i.code=void 0!==e.code&&null!==e.code?Number(e.code):0,i.data=void 0!==e.data&&null!==e.data?String(e.data):"",i.rawLog=void 0!==e.rawLog&&null!==e.rawLog?String(e.rawLog):"",i.logs=(null!==(n=e.logs)&&void 0!==n?n:[]).map((e=>t.ABCIMessageLog.fromJSON(e))),i.info=void 0!==e.info&&null!==e.info?String(e.info):"",i.gasWanted=void 0!==e.gasWanted&&null!==e.gasWanted?o.default.fromString(e.gasWanted):o.default.ZERO,i.gasUsed=void 0!==e.gasUsed&&null!==e.gasUsed?o.default.fromString(e.gasUsed):o.default.ZERO,i.tx=void 0!==e.tx&&null!==e.tx?a.Any.fromJSON(e.tx):void 0,i.timestamp=void 0!==e.timestamp&&null!==e.timestamp?String(e.timestamp):"",i.events=(null!==(r=e.events)&&void 0!==r?r:[]).map((e=>s.Event.fromJSON(e))),i},toJSON(e){const n={};return void 0!==e.height&&(n.height=(e.height||o.default.ZERO).toString()),void 0!==e.txhash&&(n.txhash=e.txhash),void 0!==e.codespace&&(n.codespace=e.codespace),void 0!==e.code&&(n.code=e.code),void 0!==e.data&&(n.data=e.data),void 0!==e.rawLog&&(n.rawLog=e.rawLog),e.logs?n.logs=e.logs.map((e=>e?t.ABCIMessageLog.toJSON(e):void 0)):n.logs=[],void 0!==e.info&&(n.info=e.info),void 0!==e.gasWanted&&(n.gasWanted=(e.gasWanted||o.default.ZERO).toString()),void 0!==e.gasUsed&&(n.gasUsed=(e.gasUsed||o.default.ZERO).toString()),void 0!==e.tx&&(n.tx=e.tx?a.Any.toJSON(e.tx):void 0),void 0!==e.timestamp&&(n.timestamp=e.timestamp),e.events?n.events=e.events.map((e=>e?s.Event.toJSON(e):void 0)):n.events=[],n},fromPartial(e){var n,r,i,d,u,l,A,f,h;const g=Object.assign({},c);return g.height=void 0!==e.height&&null!==e.height?o.default.fromValue(e.height):o.default.ZERO,g.txhash=null!==(n=e.txhash)&&void 0!==n?n:"",g.codespace=null!==(r=e.codespace)&&void 0!==r?r:"",g.code=null!==(i=e.code)&&void 0!==i?i:0,g.data=null!==(d=e.data)&&void 0!==d?d:"",g.rawLog=null!==(u=e.rawLog)&&void 0!==u?u:"",g.logs=(null===(l=e.logs)||void 0===l?void 0:l.map((e=>t.ABCIMessageLog.fromPartial(e))))||[],g.info=null!==(A=e.info)&&void 0!==A?A:"",g.gasWanted=void 0!==e.gasWanted&&null!==e.gasWanted?o.default.fromValue(e.gasWanted):o.default.ZERO,g.gasUsed=void 0!==e.gasUsed&&null!==e.gasUsed?o.default.fromValue(e.gasUsed):o.default.ZERO,g.tx=void 0!==e.tx&&null!==e.tx?a.Any.fromPartial(e.tx):void 0,g.timestamp=null!==(f=e.timestamp)&&void 0!==f?f:"",g.events=(null===(h=e.events)||void 0===h?void 0:h.map((e=>s.Event.fromPartial(e))))||[],g}};const d={msgIndex:0,log:""};t.ABCIMessageLog={encode(e,n=i.default.Writer.create()){0!==e.msgIndex&&n.uint32(8).uint32(e.msgIndex),""!==e.log&&n.uint32(18).string(e.log);for(const r of e.events)t.StringEvent.encode(r,n.uint32(26).fork()).ldelim();return n},decode(e,n){const r=e instanceof i.default.Reader?e:new i.default.Reader(e);let o=void 0===n?r.len:r.pos+n;const a=Object.assign({},d);for(a.events=[];r.pos>>3){case 1:a.msgIndex=r.uint32();break;case 2:a.log=r.string();break;case 3:a.events.push(t.StringEvent.decode(r,r.uint32()));break;default:r.skipType(7&e)}}return a},fromJSON(e){var n;const r=Object.assign({},d);return r.msgIndex=void 0!==e.msgIndex&&null!==e.msgIndex?Number(e.msgIndex):0,r.log=void 0!==e.log&&null!==e.log?String(e.log):"",r.events=(null!==(n=e.events)&&void 0!==n?n:[]).map((e=>t.StringEvent.fromJSON(e))),r},toJSON(e){const n={};return void 0!==e.msgIndex&&(n.msgIndex=e.msgIndex),void 0!==e.log&&(n.log=e.log),e.events?n.events=e.events.map((e=>e?t.StringEvent.toJSON(e):void 0)):n.events=[],n},fromPartial(e){var n,r,o;const i=Object.assign({},d);return i.msgIndex=null!==(n=e.msgIndex)&&void 0!==n?n:0,i.log=null!==(r=e.log)&&void 0!==r?r:"",i.events=(null===(o=e.events)||void 0===o?void 0:o.map((e=>t.StringEvent.fromPartial(e))))||[],i}};const u={type:""};t.StringEvent={encode(e,n=i.default.Writer.create()){""!==e.type&&n.uint32(10).string(e.type);for(const r of e.attributes)t.Attribute.encode(r,n.uint32(18).fork()).ldelim();return n},decode(e,n){const r=e instanceof i.default.Reader?e:new i.default.Reader(e);let o=void 0===n?r.len:r.pos+n;const a=Object.assign({},u);for(a.attributes=[];r.pos>>3){case 1:a.type=r.string();break;case 2:a.attributes.push(t.Attribute.decode(r,r.uint32()));break;default:r.skipType(7&e)}}return a},fromJSON(e){var n;const r=Object.assign({},u);return r.type=void 0!==e.type&&null!==e.type?String(e.type):"",r.attributes=(null!==(n=e.attributes)&&void 0!==n?n:[]).map((e=>t.Attribute.fromJSON(e))),r},toJSON(e){const n={};return void 0!==e.type&&(n.type=e.type),e.attributes?n.attributes=e.attributes.map((e=>e?t.Attribute.toJSON(e):void 0)):n.attributes=[],n},fromPartial(e){var n,r;const o=Object.assign({},u);return o.type=null!==(n=e.type)&&void 0!==n?n:"",o.attributes=(null===(r=e.attributes)||void 0===r?void 0:r.map((e=>t.Attribute.fromPartial(e))))||[],o}};const l={key:"",value:""};t.Attribute={encode:(e,t=i.default.Writer.create())=>(""!==e.key&&t.uint32(10).string(e.key),""!==e.value&&t.uint32(18).string(e.value),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},l);for(;n.pos>>3){case 1:o.key=n.string();break;case 2:o.value=n.string();break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},l);return t.key=void 0!==e.key&&null!==e.key?String(e.key):"",t.value=void 0!==e.value&&null!==e.value?String(e.value):"",t},toJSON(e){const t={};return void 0!==e.key&&(t.key=e.key),void 0!==e.value&&(t.value=e.value),t},fromPartial(e){var t,n;const r=Object.assign({},l);return r.key=null!==(t=e.key)&&void 0!==t?t:"",r.value=null!==(n=e.value)&&void 0!==n?n:"",r}};const A={gasWanted:o.default.UZERO,gasUsed:o.default.UZERO};t.GasInfo={encode:(e,t=i.default.Writer.create())=>(e.gasWanted.isZero()||t.uint32(8).uint64(e.gasWanted),e.gasUsed.isZero()||t.uint32(16).uint64(e.gasUsed),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},A);for(;n.pos>>3){case 1:o.gasWanted=n.uint64();break;case 2:o.gasUsed=n.uint64();break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},A);return t.gasWanted=void 0!==e.gasWanted&&null!==e.gasWanted?o.default.fromString(e.gasWanted):o.default.UZERO,t.gasUsed=void 0!==e.gasUsed&&null!==e.gasUsed?o.default.fromString(e.gasUsed):o.default.UZERO,t},toJSON(e){const t={};return void 0!==e.gasWanted&&(t.gasWanted=(e.gasWanted||o.default.UZERO).toString()),void 0!==e.gasUsed&&(t.gasUsed=(e.gasUsed||o.default.UZERO).toString()),t},fromPartial(e){const t=Object.assign({},A);return t.gasWanted=void 0!==e.gasWanted&&null!==e.gasWanted?o.default.fromValue(e.gasWanted):o.default.UZERO,t.gasUsed=void 0!==e.gasUsed&&null!==e.gasUsed?o.default.fromValue(e.gasUsed):o.default.UZERO,t}};const f={log:""};t.Result={encode(e,t=i.default.Writer.create()){0!==e.data.length&&t.uint32(10).bytes(e.data),""!==e.log&&t.uint32(18).string(e.log);for(const n of e.events)s.Event.encode(n,t.uint32(26).fork()).ldelim();return t},decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},f);for(o.events=[],o.data=new Uint8Array;n.pos>>3){case 1:o.data=n.bytes();break;case 2:o.log=n.string();break;case 3:o.events.push(s.Event.decode(n,n.uint32()));break;default:n.skipType(7&e)}}return o},fromJSON(e){var t;const n=Object.assign({},f);return n.data=void 0!==e.data&&null!==e.data?b(e.data):new Uint8Array,n.log=void 0!==e.log&&null!==e.log?String(e.log):"",n.events=(null!==(t=e.events)&&void 0!==t?t:[]).map((e=>s.Event.fromJSON(e))),n},toJSON(e){const t={};return void 0!==e.data&&(t.data=C(void 0!==e.data?e.data:new Uint8Array)),void 0!==e.log&&(t.log=e.log),e.events?t.events=e.events.map((e=>e?s.Event.toJSON(e):void 0)):t.events=[],t},fromPartial(e){var t,n,r;const o=Object.assign({},f);return o.data=null!==(t=e.data)&&void 0!==t?t:new Uint8Array,o.log=null!==(n=e.log)&&void 0!==n?n:"",o.events=(null===(r=e.events)||void 0===r?void 0:r.map((e=>s.Event.fromPartial(e))))||[],o}};const h={};t.SimulationResponse={encode:(e,n=i.default.Writer.create())=>(void 0!==e.gasInfo&&t.GasInfo.encode(e.gasInfo,n.uint32(10).fork()).ldelim(),void 0!==e.result&&t.Result.encode(e.result,n.uint32(18).fork()).ldelim(),n),decode(e,n){const r=e instanceof i.default.Reader?e:new i.default.Reader(e);let o=void 0===n?r.len:r.pos+n;const a=Object.assign({},h);for(;r.pos>>3){case 1:a.gasInfo=t.GasInfo.decode(r,r.uint32());break;case 2:a.result=t.Result.decode(r,r.uint32());break;default:r.skipType(7&e)}}return a},fromJSON(e){const n=Object.assign({},h);return n.gasInfo=void 0!==e.gasInfo&&null!==e.gasInfo?t.GasInfo.fromJSON(e.gasInfo):void 0,n.result=void 0!==e.result&&null!==e.result?t.Result.fromJSON(e.result):void 0,n},toJSON(e){const n={};return void 0!==e.gasInfo&&(n.gasInfo=e.gasInfo?t.GasInfo.toJSON(e.gasInfo):void 0),void 0!==e.result&&(n.result=e.result?t.Result.toJSON(e.result):void 0),n},fromPartial(e){const n=Object.assign({},h);return n.gasInfo=void 0!==e.gasInfo&&null!==e.gasInfo?t.GasInfo.fromPartial(e.gasInfo):void 0,n.result=void 0!==e.result&&null!==e.result?t.Result.fromPartial(e.result):void 0,n}};const g={msgType:""};t.MsgData={encode:(e,t=i.default.Writer.create())=>(""!==e.msgType&&t.uint32(10).string(e.msgType),0!==e.data.length&&t.uint32(18).bytes(e.data),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},g);for(o.data=new Uint8Array;n.pos>>3){case 1:o.msgType=n.string();break;case 2:o.data=n.bytes();break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},g);return t.msgType=void 0!==e.msgType&&null!==e.msgType?String(e.msgType):"",t.data=void 0!==e.data&&null!==e.data?b(e.data):new Uint8Array,t},toJSON(e){const t={};return void 0!==e.msgType&&(t.msgType=e.msgType),void 0!==e.data&&(t.data=C(void 0!==e.data?e.data:new Uint8Array)),t},fromPartial(e){var t,n;const r=Object.assign({},g);return r.msgType=null!==(t=e.msgType)&&void 0!==t?t:"",r.data=null!==(n=e.data)&&void 0!==n?n:new Uint8Array,r}};const p={};t.TxMsgData={encode(e,n=i.default.Writer.create()){for(const r of e.data)t.MsgData.encode(r,n.uint32(10).fork()).ldelim();return n},decode(e,n){const r=e instanceof i.default.Reader?e:new i.default.Reader(e);let o=void 0===n?r.len:r.pos+n;const a=Object.assign({},p);for(a.data=[];r.pos>>3==1?a.data.push(t.MsgData.decode(r,r.uint32())):r.skipType(7&e)}return a},fromJSON(e){var n;const r=Object.assign({},p);return r.data=(null!==(n=e.data)&&void 0!==n?n:[]).map((e=>t.MsgData.fromJSON(e))),r},toJSON(e){const n={};return e.data?n.data=e.data.map((e=>e?t.MsgData.toJSON(e):void 0)):n.data=[],n},fromPartial(e){var n;const r=Object.assign({},p);return r.data=(null===(n=e.data)||void 0===n?void 0:n.map((e=>t.MsgData.fromPartial(e))))||[],r}};const m={totalCount:o.default.UZERO,count:o.default.UZERO,pageNumber:o.default.UZERO,pageTotal:o.default.UZERO,limit:o.default.UZERO};t.SearchTxsResult={encode(e,n=i.default.Writer.create()){e.totalCount.isZero()||n.uint32(8).uint64(e.totalCount),e.count.isZero()||n.uint32(16).uint64(e.count),e.pageNumber.isZero()||n.uint32(24).uint64(e.pageNumber),e.pageTotal.isZero()||n.uint32(32).uint64(e.pageTotal),e.limit.isZero()||n.uint32(40).uint64(e.limit);for(const r of e.txs)t.TxResponse.encode(r,n.uint32(50).fork()).ldelim();return n},decode(e,n){const r=e instanceof i.default.Reader?e:new i.default.Reader(e);let o=void 0===n?r.len:r.pos+n;const a=Object.assign({},m);for(a.txs=[];r.pos>>3){case 1:a.totalCount=r.uint64();break;case 2:a.count=r.uint64();break;case 3:a.pageNumber=r.uint64();break;case 4:a.pageTotal=r.uint64();break;case 5:a.limit=r.uint64();break;case 6:a.txs.push(t.TxResponse.decode(r,r.uint32()));break;default:r.skipType(7&e)}}return a},fromJSON(e){var n;const r=Object.assign({},m);return r.totalCount=void 0!==e.totalCount&&null!==e.totalCount?o.default.fromString(e.totalCount):o.default.UZERO,r.count=void 0!==e.count&&null!==e.count?o.default.fromString(e.count):o.default.UZERO,r.pageNumber=void 0!==e.pageNumber&&null!==e.pageNumber?o.default.fromString(e.pageNumber):o.default.UZERO,r.pageTotal=void 0!==e.pageTotal&&null!==e.pageTotal?o.default.fromString(e.pageTotal):o.default.UZERO,r.limit=void 0!==e.limit&&null!==e.limit?o.default.fromString(e.limit):o.default.UZERO,r.txs=(null!==(n=e.txs)&&void 0!==n?n:[]).map((e=>t.TxResponse.fromJSON(e))),r},toJSON(e){const n={};return void 0!==e.totalCount&&(n.totalCount=(e.totalCount||o.default.UZERO).toString()),void 0!==e.count&&(n.count=(e.count||o.default.UZERO).toString()),void 0!==e.pageNumber&&(n.pageNumber=(e.pageNumber||o.default.UZERO).toString()),void 0!==e.pageTotal&&(n.pageTotal=(e.pageTotal||o.default.UZERO).toString()),void 0!==e.limit&&(n.limit=(e.limit||o.default.UZERO).toString()),e.txs?n.txs=e.txs.map((e=>e?t.TxResponse.toJSON(e):void 0)):n.txs=[],n},fromPartial(e){var n;const r=Object.assign({},m);return r.totalCount=void 0!==e.totalCount&&null!==e.totalCount?o.default.fromValue(e.totalCount):o.default.UZERO,r.count=void 0!==e.count&&null!==e.count?o.default.fromValue(e.count):o.default.UZERO,r.pageNumber=void 0!==e.pageNumber&&null!==e.pageNumber?o.default.fromValue(e.pageNumber):o.default.UZERO,r.pageTotal=void 0!==e.pageTotal&&null!==e.pageTotal?o.default.fromValue(e.pageTotal):o.default.UZERO,r.limit=void 0!==e.limit&&null!==e.limit?o.default.fromValue(e.limit):o.default.UZERO,r.txs=(null===(n=e.txs)||void 0===n?void 0:n.map((e=>t.TxResponse.fromPartial(e))))||[],r}};var v=(()=>{if(void 0!==v)return v;if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==n.g)return n.g;throw"Unable to locate global object"})();const y=v.atob||(e=>v.Buffer.from(e,"base64").toString("binary"));function b(e){const t=y(e),n=new Uint8Array(t.length);for(let e=0;ev.Buffer.from(e,"binary").toString("base64"));function C(e){const t=[];for(const n of e)t.push(String.fromCharCode(n));return I(t.join(""))}i.default.util.Long!==o.default&&(i.default.util.Long=o.default,i.default.configure())},9551:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.PageResponse=t.PageRequest=t.protobufPackage=void 0;const o=r(n(3720)),i=r(n(3789));t.protobufPackage="cosmos.base.query.v1beta1";const a={offset:o.default.UZERO,limit:o.default.UZERO,countTotal:!1,reverse:!1};t.PageRequest={encode:(e,t=i.default.Writer.create())=>(0!==e.key.length&&t.uint32(10).bytes(e.key),e.offset.isZero()||t.uint32(16).uint64(e.offset),e.limit.isZero()||t.uint32(24).uint64(e.limit),!0===e.countTotal&&t.uint32(32).bool(e.countTotal),!0===e.reverse&&t.uint32(40).bool(e.reverse),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},a);for(o.key=new Uint8Array;n.pos>>3){case 1:o.key=n.bytes();break;case 2:o.offset=n.uint64();break;case 3:o.limit=n.uint64();break;case 4:o.countTotal=n.bool();break;case 5:o.reverse=n.bool();break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},a);return t.key=void 0!==e.key&&null!==e.key?u(e.key):new Uint8Array,t.offset=void 0!==e.offset&&null!==e.offset?o.default.fromString(e.offset):o.default.UZERO,t.limit=void 0!==e.limit&&null!==e.limit?o.default.fromString(e.limit):o.default.UZERO,t.countTotal=void 0!==e.countTotal&&null!==e.countTotal&&Boolean(e.countTotal),t.reverse=void 0!==e.reverse&&null!==e.reverse&&Boolean(e.reverse),t},toJSON(e){const t={};return void 0!==e.key&&(t.key=A(void 0!==e.key?e.key:new Uint8Array)),void 0!==e.offset&&(t.offset=(e.offset||o.default.UZERO).toString()),void 0!==e.limit&&(t.limit=(e.limit||o.default.UZERO).toString()),void 0!==e.countTotal&&(t.countTotal=e.countTotal),void 0!==e.reverse&&(t.reverse=e.reverse),t},fromPartial(e){var t,n,r;const i=Object.assign({},a);return i.key=null!==(t=e.key)&&void 0!==t?t:new Uint8Array,i.offset=void 0!==e.offset&&null!==e.offset?o.default.fromValue(e.offset):o.default.UZERO,i.limit=void 0!==e.limit&&null!==e.limit?o.default.fromValue(e.limit):o.default.UZERO,i.countTotal=null!==(n=e.countTotal)&&void 0!==n&&n,i.reverse=null!==(r=e.reverse)&&void 0!==r&&r,i}};const s={total:o.default.UZERO};t.PageResponse={encode:(e,t=i.default.Writer.create())=>(0!==e.nextKey.length&&t.uint32(10).bytes(e.nextKey),e.total.isZero()||t.uint32(16).uint64(e.total),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},s);for(o.nextKey=new Uint8Array;n.pos>>3){case 1:o.nextKey=n.bytes();break;case 2:o.total=n.uint64();break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},s);return t.nextKey=void 0!==e.nextKey&&null!==e.nextKey?u(e.nextKey):new Uint8Array,t.total=void 0!==e.total&&null!==e.total?o.default.fromString(e.total):o.default.UZERO,t},toJSON(e){const t={};return void 0!==e.nextKey&&(t.nextKey=A(void 0!==e.nextKey?e.nextKey:new Uint8Array)),void 0!==e.total&&(t.total=(e.total||o.default.UZERO).toString()),t},fromPartial(e){var t;const n=Object.assign({},s);return n.nextKey=null!==(t=e.nextKey)&&void 0!==t?t:new Uint8Array,n.total=void 0!==e.total&&null!==e.total?o.default.fromValue(e.total):o.default.UZERO,n}};var c=(()=>{if(void 0!==c)return c;if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==n.g)return n.g;throw"Unable to locate global object"})();const d=c.atob||(e=>c.Buffer.from(e,"base64").toString("binary"));function u(e){const t=d(e),n=new Uint8Array(t.length);for(let e=0;ec.Buffer.from(e,"binary").toString("base64"));function A(e){const t=[];for(const n of e)t.push(String.fromCharCode(n));return l(t.join(""))}i.default.util.Long!==o.default&&(i.default.util.Long=o.default,i.default.configure())},891:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.DecProto=t.IntProto=t.DecCoin=t.Coin=t.protobufPackage=void 0;const o=r(n(3720)),i=r(n(3789));t.protobufPackage="cosmos.base.v1beta1";const a={denom:"",amount:""};t.Coin={encode:(e,t=i.default.Writer.create())=>(""!==e.denom&&t.uint32(10).string(e.denom),""!==e.amount&&t.uint32(18).string(e.amount),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},a);for(;n.pos>>3){case 1:o.denom=n.string();break;case 2:o.amount=n.string();break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},a);return t.denom=void 0!==e.denom&&null!==e.denom?String(e.denom):"",t.amount=void 0!==e.amount&&null!==e.amount?String(e.amount):"",t},toJSON(e){const t={};return void 0!==e.denom&&(t.denom=e.denom),void 0!==e.amount&&(t.amount=e.amount),t},fromPartial(e){var t,n;const r=Object.assign({},a);return r.denom=null!==(t=e.denom)&&void 0!==t?t:"",r.amount=null!==(n=e.amount)&&void 0!==n?n:"",r}};const s={denom:"",amount:""};t.DecCoin={encode:(e,t=i.default.Writer.create())=>(""!==e.denom&&t.uint32(10).string(e.denom),""!==e.amount&&t.uint32(18).string(e.amount),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},s);for(;n.pos>>3){case 1:o.denom=n.string();break;case 2:o.amount=n.string();break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},s);return t.denom=void 0!==e.denom&&null!==e.denom?String(e.denom):"",t.amount=void 0!==e.amount&&null!==e.amount?String(e.amount):"",t},toJSON(e){const t={};return void 0!==e.denom&&(t.denom=e.denom),void 0!==e.amount&&(t.amount=e.amount),t},fromPartial(e){var t,n;const r=Object.assign({},s);return r.denom=null!==(t=e.denom)&&void 0!==t?t:"",r.amount=null!==(n=e.amount)&&void 0!==n?n:"",r}};const c={int:""};t.IntProto={encode:(e,t=i.default.Writer.create())=>(""!==e.int&&t.uint32(10).string(e.int),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},c);for(;n.pos>>3==1?o.int=n.string():n.skipType(7&e)}return o},fromJSON(e){const t=Object.assign({},c);return t.int=void 0!==e.int&&null!==e.int?String(e.int):"",t},toJSON(e){const t={};return void 0!==e.int&&(t.int=e.int),t},fromPartial(e){var t;const n=Object.assign({},c);return n.int=null!==(t=e.int)&&void 0!==t?t:"",n}};const d={dec:""};t.DecProto={encode:(e,t=i.default.Writer.create())=>(""!==e.dec&&t.uint32(10).string(e.dec),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},d);for(;n.pos>>3==1?o.dec=n.string():n.skipType(7&e)}return o},fromJSON(e){const t=Object.assign({},d);return t.dec=void 0!==e.dec&&null!==e.dec?String(e.dec):"",t},toJSON(e){const t={};return void 0!==e.dec&&(t.dec=e.dec),t},fromPartial(e){var t;const n=Object.assign({},d);return n.dec=null!==(t=e.dec)&&void 0!==t?t:"",n}},i.default.util.Long!==o.default&&(i.default.util.Long=o.default,i.default.configure())},479:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.LegacyAminoPubKey=t.protobufPackage=void 0;const o=r(n(3720)),i=r(n(3789)),a=n(3862);t.protobufPackage="cosmos.crypto.multisig";const s={threshold:0};t.LegacyAminoPubKey={encode(e,t=i.default.Writer.create()){0!==e.threshold&&t.uint32(8).uint32(e.threshold);for(const n of e.publicKeys)a.Any.encode(n,t.uint32(18).fork()).ldelim();return t},decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},s);for(o.publicKeys=[];n.pos>>3){case 1:o.threshold=n.uint32();break;case 2:o.publicKeys.push(a.Any.decode(n,n.uint32()));break;default:n.skipType(7&e)}}return o},fromJSON(e){var t;const n=Object.assign({},s);return n.threshold=void 0!==e.threshold&&null!==e.threshold?Number(e.threshold):0,n.publicKeys=(null!==(t=e.publicKeys)&&void 0!==t?t:[]).map((e=>a.Any.fromJSON(e))),n},toJSON(e){const t={};return void 0!==e.threshold&&(t.threshold=e.threshold),e.publicKeys?t.publicKeys=e.publicKeys.map((e=>e?a.Any.toJSON(e):void 0)):t.publicKeys=[],t},fromPartial(e){var t,n;const r=Object.assign({},s);return r.threshold=null!==(t=e.threshold)&&void 0!==t?t:0,r.publicKeys=(null===(n=e.publicKeys)||void 0===n?void 0:n.map((e=>a.Any.fromPartial(e))))||[],r}},i.default.util.Long!==o.default&&(i.default.util.Long=o.default,i.default.configure())},7381:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.CompactBitArray=t.MultiSignature=t.protobufPackage=void 0;const o=r(n(3720)),i=r(n(3789));t.protobufPackage="cosmos.crypto.multisig.v1beta1";const a={};t.MultiSignature={encode(e,t=i.default.Writer.create()){for(const n of e.signatures)t.uint32(10).bytes(n);return t},decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},a);for(o.signatures=[];n.pos>>3==1?o.signatures.push(n.bytes()):n.skipType(7&e)}return o},fromJSON(e){var t;const n=Object.assign({},a);return n.signatures=(null!==(t=e.signatures)&&void 0!==t?t:[]).map((e=>u(e))),n},toJSON(e){const t={};return e.signatures?t.signatures=e.signatures.map((e=>A(void 0!==e?e:new Uint8Array))):t.signatures=[],t},fromPartial(e){var t;const n=Object.assign({},a);return n.signatures=(null===(t=e.signatures)||void 0===t?void 0:t.map((e=>e)))||[],n}};const s={extraBitsStored:0};t.CompactBitArray={encode:(e,t=i.default.Writer.create())=>(0!==e.extraBitsStored&&t.uint32(8).uint32(e.extraBitsStored),0!==e.elems.length&&t.uint32(18).bytes(e.elems),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},s);for(o.elems=new Uint8Array;n.pos>>3){case 1:o.extraBitsStored=n.uint32();break;case 2:o.elems=n.bytes();break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},s);return t.extraBitsStored=void 0!==e.extraBitsStored&&null!==e.extraBitsStored?Number(e.extraBitsStored):0,t.elems=void 0!==e.elems&&null!==e.elems?u(e.elems):new Uint8Array,t},toJSON(e){const t={};return void 0!==e.extraBitsStored&&(t.extraBitsStored=e.extraBitsStored),void 0!==e.elems&&(t.elems=A(void 0!==e.elems?e.elems:new Uint8Array)),t},fromPartial(e){var t,n;const r=Object.assign({},s);return r.extraBitsStored=null!==(t=e.extraBitsStored)&&void 0!==t?t:0,r.elems=null!==(n=e.elems)&&void 0!==n?n:new Uint8Array,r}};var c=(()=>{if(void 0!==c)return c;if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==n.g)return n.g;throw"Unable to locate global object"})();const d=c.atob||(e=>c.Buffer.from(e,"base64").toString("binary"));function u(e){const t=d(e),n=new Uint8Array(t.length);for(let e=0;ec.Buffer.from(e,"binary").toString("base64"));function A(e){const t=[];for(const n of e)t.push(String.fromCharCode(n));return l(t.join(""))}i.default.util.Long!==o.default&&(i.default.util.Long=o.default,i.default.configure())},7228:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.PrivKey=t.PubKey=t.protobufPackage=void 0;const o=r(n(3720)),i=r(n(3789));t.protobufPackage="cosmos.crypto.secp256k1";const a={};t.PubKey={encode:(e,t=i.default.Writer.create())=>(0!==e.key.length&&t.uint32(10).bytes(e.key),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},a);for(o.key=new Uint8Array;n.pos>>3==1?o.key=n.bytes():n.skipType(7&e)}return o},fromJSON(e){const t=Object.assign({},a);return t.key=void 0!==e.key&&null!==e.key?u(e.key):new Uint8Array,t},toJSON(e){const t={};return void 0!==e.key&&(t.key=A(void 0!==e.key?e.key:new Uint8Array)),t},fromPartial(e){var t;const n=Object.assign({},a);return n.key=null!==(t=e.key)&&void 0!==t?t:new Uint8Array,n}};const s={};t.PrivKey={encode:(e,t=i.default.Writer.create())=>(0!==e.key.length&&t.uint32(10).bytes(e.key),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},s);for(o.key=new Uint8Array;n.pos>>3==1?o.key=n.bytes():n.skipType(7&e)}return o},fromJSON(e){const t=Object.assign({},s);return t.key=void 0!==e.key&&null!==e.key?u(e.key):new Uint8Array,t},toJSON(e){const t={};return void 0!==e.key&&(t.key=A(void 0!==e.key?e.key:new Uint8Array)),t},fromPartial(e){var t;const n=Object.assign({},s);return n.key=null!==(t=e.key)&&void 0!==t?t:new Uint8Array,n}};var c=(()=>{if(void 0!==c)return c;if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==n.g)return n.g;throw"Unable to locate global object"})();const d=c.atob||(e=>c.Buffer.from(e,"base64").toString("binary"));function u(e){const t=d(e),n=new Uint8Array(t.length);for(let e=0;ec.Buffer.from(e,"binary").toString("base64"));function A(e){const t=[];for(const n of e)t.push(String.fromCharCode(n));return l(t.join(""))}i.default.util.Long!==o.default&&(i.default.util.Long=o.default,i.default.configure())},1790:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.CommunityPoolSpendProposalWithDeposit=t.DelegationDelegatorReward=t.DelegatorStartingInfo=t.CommunityPoolSpendProposal=t.FeePool=t.ValidatorSlashEvents=t.ValidatorSlashEvent=t.ValidatorOutstandingRewards=t.ValidatorAccumulatedCommission=t.ValidatorCurrentRewards=t.ValidatorHistoricalRewards=t.Params=t.protobufPackage=void 0;const o=r(n(3720)),i=r(n(3789)),a=n(891);t.protobufPackage="cosmos.distribution.v1beta1";const s={communityTax:"",baseProposerReward:"",bonusProposerReward:"",withdrawAddrEnabled:!1};t.Params={encode:(e,t=i.default.Writer.create())=>(""!==e.communityTax&&t.uint32(10).string(e.communityTax),""!==e.baseProposerReward&&t.uint32(18).string(e.baseProposerReward),""!==e.bonusProposerReward&&t.uint32(26).string(e.bonusProposerReward),!0===e.withdrawAddrEnabled&&t.uint32(32).bool(e.withdrawAddrEnabled),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},s);for(;n.pos>>3){case 1:o.communityTax=n.string();break;case 2:o.baseProposerReward=n.string();break;case 3:o.bonusProposerReward=n.string();break;case 4:o.withdrawAddrEnabled=n.bool();break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},s);return t.communityTax=void 0!==e.communityTax&&null!==e.communityTax?String(e.communityTax):"",t.baseProposerReward=void 0!==e.baseProposerReward&&null!==e.baseProposerReward?String(e.baseProposerReward):"",t.bonusProposerReward=void 0!==e.bonusProposerReward&&null!==e.bonusProposerReward?String(e.bonusProposerReward):"",t.withdrawAddrEnabled=void 0!==e.withdrawAddrEnabled&&null!==e.withdrawAddrEnabled&&Boolean(e.withdrawAddrEnabled),t},toJSON(e){const t={};return void 0!==e.communityTax&&(t.communityTax=e.communityTax),void 0!==e.baseProposerReward&&(t.baseProposerReward=e.baseProposerReward),void 0!==e.bonusProposerReward&&(t.bonusProposerReward=e.bonusProposerReward),void 0!==e.withdrawAddrEnabled&&(t.withdrawAddrEnabled=e.withdrawAddrEnabled),t},fromPartial(e){var t,n,r,o;const i=Object.assign({},s);return i.communityTax=null!==(t=e.communityTax)&&void 0!==t?t:"",i.baseProposerReward=null!==(n=e.baseProposerReward)&&void 0!==n?n:"",i.bonusProposerReward=null!==(r=e.bonusProposerReward)&&void 0!==r?r:"",i.withdrawAddrEnabled=null!==(o=e.withdrawAddrEnabled)&&void 0!==o&&o,i}};const c={referenceCount:0};t.ValidatorHistoricalRewards={encode(e,t=i.default.Writer.create()){for(const n of e.cumulativeRewardRatio)a.DecCoin.encode(n,t.uint32(10).fork()).ldelim();return 0!==e.referenceCount&&t.uint32(16).uint32(e.referenceCount),t},decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},c);for(o.cumulativeRewardRatio=[];n.pos>>3){case 1:o.cumulativeRewardRatio.push(a.DecCoin.decode(n,n.uint32()));break;case 2:o.referenceCount=n.uint32();break;default:n.skipType(7&e)}}return o},fromJSON(e){var t;const n=Object.assign({},c);return n.cumulativeRewardRatio=(null!==(t=e.cumulativeRewardRatio)&&void 0!==t?t:[]).map((e=>a.DecCoin.fromJSON(e))),n.referenceCount=void 0!==e.referenceCount&&null!==e.referenceCount?Number(e.referenceCount):0,n},toJSON(e){const t={};return e.cumulativeRewardRatio?t.cumulativeRewardRatio=e.cumulativeRewardRatio.map((e=>e?a.DecCoin.toJSON(e):void 0)):t.cumulativeRewardRatio=[],void 0!==e.referenceCount&&(t.referenceCount=e.referenceCount),t},fromPartial(e){var t,n;const r=Object.assign({},c);return r.cumulativeRewardRatio=(null===(t=e.cumulativeRewardRatio)||void 0===t?void 0:t.map((e=>a.DecCoin.fromPartial(e))))||[],r.referenceCount=null!==(n=e.referenceCount)&&void 0!==n?n:0,r}};const d={period:o.default.UZERO};t.ValidatorCurrentRewards={encode(e,t=i.default.Writer.create()){for(const n of e.rewards)a.DecCoin.encode(n,t.uint32(10).fork()).ldelim();return e.period.isZero()||t.uint32(16).uint64(e.period),t},decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},d);for(o.rewards=[];n.pos>>3){case 1:o.rewards.push(a.DecCoin.decode(n,n.uint32()));break;case 2:o.period=n.uint64();break;default:n.skipType(7&e)}}return o},fromJSON(e){var t;const n=Object.assign({},d);return n.rewards=(null!==(t=e.rewards)&&void 0!==t?t:[]).map((e=>a.DecCoin.fromJSON(e))),n.period=void 0!==e.period&&null!==e.period?o.default.fromString(e.period):o.default.UZERO,n},toJSON(e){const t={};return e.rewards?t.rewards=e.rewards.map((e=>e?a.DecCoin.toJSON(e):void 0)):t.rewards=[],void 0!==e.period&&(t.period=(e.period||o.default.UZERO).toString()),t},fromPartial(e){var t;const n=Object.assign({},d);return n.rewards=(null===(t=e.rewards)||void 0===t?void 0:t.map((e=>a.DecCoin.fromPartial(e))))||[],n.period=void 0!==e.period&&null!==e.period?o.default.fromValue(e.period):o.default.UZERO,n}};const u={};t.ValidatorAccumulatedCommission={encode(e,t=i.default.Writer.create()){for(const n of e.commission)a.DecCoin.encode(n,t.uint32(10).fork()).ldelim();return t},decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},u);for(o.commission=[];n.pos>>3==1?o.commission.push(a.DecCoin.decode(n,n.uint32())):n.skipType(7&e)}return o},fromJSON(e){var t;const n=Object.assign({},u);return n.commission=(null!==(t=e.commission)&&void 0!==t?t:[]).map((e=>a.DecCoin.fromJSON(e))),n},toJSON(e){const t={};return e.commission?t.commission=e.commission.map((e=>e?a.DecCoin.toJSON(e):void 0)):t.commission=[],t},fromPartial(e){var t;const n=Object.assign({},u);return n.commission=(null===(t=e.commission)||void 0===t?void 0:t.map((e=>a.DecCoin.fromPartial(e))))||[],n}};const l={};t.ValidatorOutstandingRewards={encode(e,t=i.default.Writer.create()){for(const n of e.rewards)a.DecCoin.encode(n,t.uint32(10).fork()).ldelim();return t},decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},l);for(o.rewards=[];n.pos>>3==1?o.rewards.push(a.DecCoin.decode(n,n.uint32())):n.skipType(7&e)}return o},fromJSON(e){var t;const n=Object.assign({},l);return n.rewards=(null!==(t=e.rewards)&&void 0!==t?t:[]).map((e=>a.DecCoin.fromJSON(e))),n},toJSON(e){const t={};return e.rewards?t.rewards=e.rewards.map((e=>e?a.DecCoin.toJSON(e):void 0)):t.rewards=[],t},fromPartial(e){var t;const n=Object.assign({},l);return n.rewards=(null===(t=e.rewards)||void 0===t?void 0:t.map((e=>a.DecCoin.fromPartial(e))))||[],n}};const A={validatorPeriod:o.default.UZERO,fraction:""};t.ValidatorSlashEvent={encode:(e,t=i.default.Writer.create())=>(e.validatorPeriod.isZero()||t.uint32(8).uint64(e.validatorPeriod),""!==e.fraction&&t.uint32(18).string(e.fraction),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},A);for(;n.pos>>3){case 1:o.validatorPeriod=n.uint64();break;case 2:o.fraction=n.string();break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},A);return t.validatorPeriod=void 0!==e.validatorPeriod&&null!==e.validatorPeriod?o.default.fromString(e.validatorPeriod):o.default.UZERO,t.fraction=void 0!==e.fraction&&null!==e.fraction?String(e.fraction):"",t},toJSON(e){const t={};return void 0!==e.validatorPeriod&&(t.validatorPeriod=(e.validatorPeriod||o.default.UZERO).toString()),void 0!==e.fraction&&(t.fraction=e.fraction),t},fromPartial(e){var t;const n=Object.assign({},A);return n.validatorPeriod=void 0!==e.validatorPeriod&&null!==e.validatorPeriod?o.default.fromValue(e.validatorPeriod):o.default.UZERO,n.fraction=null!==(t=e.fraction)&&void 0!==t?t:"",n}};const f={};t.ValidatorSlashEvents={encode(e,n=i.default.Writer.create()){for(const r of e.validatorSlashEvents)t.ValidatorSlashEvent.encode(r,n.uint32(10).fork()).ldelim();return n},decode(e,n){const r=e instanceof i.default.Reader?e:new i.default.Reader(e);let o=void 0===n?r.len:r.pos+n;const a=Object.assign({},f);for(a.validatorSlashEvents=[];r.pos>>3==1?a.validatorSlashEvents.push(t.ValidatorSlashEvent.decode(r,r.uint32())):r.skipType(7&e)}return a},fromJSON(e){var n;const r=Object.assign({},f);return r.validatorSlashEvents=(null!==(n=e.validatorSlashEvents)&&void 0!==n?n:[]).map((e=>t.ValidatorSlashEvent.fromJSON(e))),r},toJSON(e){const n={};return e.validatorSlashEvents?n.validatorSlashEvents=e.validatorSlashEvents.map((e=>e?t.ValidatorSlashEvent.toJSON(e):void 0)):n.validatorSlashEvents=[],n},fromPartial(e){var n;const r=Object.assign({},f);return r.validatorSlashEvents=(null===(n=e.validatorSlashEvents)||void 0===n?void 0:n.map((e=>t.ValidatorSlashEvent.fromPartial(e))))||[],r}};const h={};t.FeePool={encode(e,t=i.default.Writer.create()){for(const n of e.communityPool)a.DecCoin.encode(n,t.uint32(10).fork()).ldelim();return t},decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},h);for(o.communityPool=[];n.pos>>3==1?o.communityPool.push(a.DecCoin.decode(n,n.uint32())):n.skipType(7&e)}return o},fromJSON(e){var t;const n=Object.assign({},h);return n.communityPool=(null!==(t=e.communityPool)&&void 0!==t?t:[]).map((e=>a.DecCoin.fromJSON(e))),n},toJSON(e){const t={};return e.communityPool?t.communityPool=e.communityPool.map((e=>e?a.DecCoin.toJSON(e):void 0)):t.communityPool=[],t},fromPartial(e){var t;const n=Object.assign({},h);return n.communityPool=(null===(t=e.communityPool)||void 0===t?void 0:t.map((e=>a.DecCoin.fromPartial(e))))||[],n}};const g={title:"",description:"",recipient:""};t.CommunityPoolSpendProposal={encode(e,t=i.default.Writer.create()){""!==e.title&&t.uint32(10).string(e.title),""!==e.description&&t.uint32(18).string(e.description),""!==e.recipient&&t.uint32(26).string(e.recipient);for(const n of e.amount)a.Coin.encode(n,t.uint32(34).fork()).ldelim();return t},decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},g);for(o.amount=[];n.pos>>3){case 1:o.title=n.string();break;case 2:o.description=n.string();break;case 3:o.recipient=n.string();break;case 4:o.amount.push(a.Coin.decode(n,n.uint32()));break;default:n.skipType(7&e)}}return o},fromJSON(e){var t;const n=Object.assign({},g);return n.title=void 0!==e.title&&null!==e.title?String(e.title):"",n.description=void 0!==e.description&&null!==e.description?String(e.description):"",n.recipient=void 0!==e.recipient&&null!==e.recipient?String(e.recipient):"",n.amount=(null!==(t=e.amount)&&void 0!==t?t:[]).map((e=>a.Coin.fromJSON(e))),n},toJSON(e){const t={};return void 0!==e.title&&(t.title=e.title),void 0!==e.description&&(t.description=e.description),void 0!==e.recipient&&(t.recipient=e.recipient),e.amount?t.amount=e.amount.map((e=>e?a.Coin.toJSON(e):void 0)):t.amount=[],t},fromPartial(e){var t,n,r,o;const i=Object.assign({},g);return i.title=null!==(t=e.title)&&void 0!==t?t:"",i.description=null!==(n=e.description)&&void 0!==n?n:"",i.recipient=null!==(r=e.recipient)&&void 0!==r?r:"",i.amount=(null===(o=e.amount)||void 0===o?void 0:o.map((e=>a.Coin.fromPartial(e))))||[],i}};const p={previousPeriod:o.default.UZERO,stake:"",height:o.default.UZERO};t.DelegatorStartingInfo={encode:(e,t=i.default.Writer.create())=>(e.previousPeriod.isZero()||t.uint32(8).uint64(e.previousPeriod),""!==e.stake&&t.uint32(18).string(e.stake),e.height.isZero()||t.uint32(24).uint64(e.height),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},p);for(;n.pos>>3){case 1:o.previousPeriod=n.uint64();break;case 2:o.stake=n.string();break;case 3:o.height=n.uint64();break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},p);return t.previousPeriod=void 0!==e.previousPeriod&&null!==e.previousPeriod?o.default.fromString(e.previousPeriod):o.default.UZERO,t.stake=void 0!==e.stake&&null!==e.stake?String(e.stake):"",t.height=void 0!==e.height&&null!==e.height?o.default.fromString(e.height):o.default.UZERO,t},toJSON(e){const t={};return void 0!==e.previousPeriod&&(t.previousPeriod=(e.previousPeriod||o.default.UZERO).toString()),void 0!==e.stake&&(t.stake=e.stake),void 0!==e.height&&(t.height=(e.height||o.default.UZERO).toString()),t},fromPartial(e){var t;const n=Object.assign({},p);return n.previousPeriod=void 0!==e.previousPeriod&&null!==e.previousPeriod?o.default.fromValue(e.previousPeriod):o.default.UZERO,n.stake=null!==(t=e.stake)&&void 0!==t?t:"",n.height=void 0!==e.height&&null!==e.height?o.default.fromValue(e.height):o.default.UZERO,n}};const m={validatorAddress:""};t.DelegationDelegatorReward={encode(e,t=i.default.Writer.create()){""!==e.validatorAddress&&t.uint32(10).string(e.validatorAddress);for(const n of e.reward)a.DecCoin.encode(n,t.uint32(18).fork()).ldelim();return t},decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},m);for(o.reward=[];n.pos>>3){case 1:o.validatorAddress=n.string();break;case 2:o.reward.push(a.DecCoin.decode(n,n.uint32()));break;default:n.skipType(7&e)}}return o},fromJSON(e){var t;const n=Object.assign({},m);return n.validatorAddress=void 0!==e.validatorAddress&&null!==e.validatorAddress?String(e.validatorAddress):"",n.reward=(null!==(t=e.reward)&&void 0!==t?t:[]).map((e=>a.DecCoin.fromJSON(e))),n},toJSON(e){const t={};return void 0!==e.validatorAddress&&(t.validatorAddress=e.validatorAddress),e.reward?t.reward=e.reward.map((e=>e?a.DecCoin.toJSON(e):void 0)):t.reward=[],t},fromPartial(e){var t,n;const r=Object.assign({},m);return r.validatorAddress=null!==(t=e.validatorAddress)&&void 0!==t?t:"",r.reward=(null===(n=e.reward)||void 0===n?void 0:n.map((e=>a.DecCoin.fromPartial(e))))||[],r}};const v={title:"",description:"",recipient:"",amount:"",deposit:""};t.CommunityPoolSpendProposalWithDeposit={encode:(e,t=i.default.Writer.create())=>(""!==e.title&&t.uint32(10).string(e.title),""!==e.description&&t.uint32(18).string(e.description),""!==e.recipient&&t.uint32(26).string(e.recipient),""!==e.amount&&t.uint32(34).string(e.amount),""!==e.deposit&&t.uint32(42).string(e.deposit),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},v);for(;n.pos>>3){case 1:o.title=n.string();break;case 2:o.description=n.string();break;case 3:o.recipient=n.string();break;case 4:o.amount=n.string();break;case 5:o.deposit=n.string();break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},v);return t.title=void 0!==e.title&&null!==e.title?String(e.title):"",t.description=void 0!==e.description&&null!==e.description?String(e.description):"",t.recipient=void 0!==e.recipient&&null!==e.recipient?String(e.recipient):"",t.amount=void 0!==e.amount&&null!==e.amount?String(e.amount):"",t.deposit=void 0!==e.deposit&&null!==e.deposit?String(e.deposit):"",t},toJSON(e){const t={};return void 0!==e.title&&(t.title=e.title),void 0!==e.description&&(t.description=e.description),void 0!==e.recipient&&(t.recipient=e.recipient),void 0!==e.amount&&(t.amount=e.amount),void 0!==e.deposit&&(t.deposit=e.deposit),t},fromPartial(e){var t,n,r,o,i;const a=Object.assign({},v);return a.title=null!==(t=e.title)&&void 0!==t?t:"",a.description=null!==(n=e.description)&&void 0!==n?n:"",a.recipient=null!==(r=e.recipient)&&void 0!==r?r:"",a.amount=null!==(o=e.amount)&&void 0!==o?o:"",a.deposit=null!==(i=e.deposit)&&void 0!==i?i:"",a}},i.default.util.Long!==o.default&&(i.default.util.Long=o.default,i.default.configure())},6208:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.QueryClientImpl=t.QueryCommunityPoolResponse=t.QueryCommunityPoolRequest=t.QueryDelegatorWithdrawAddressResponse=t.QueryDelegatorWithdrawAddressRequest=t.QueryDelegatorValidatorsResponse=t.QueryDelegatorValidatorsRequest=t.QueryDelegationTotalRewardsResponse=t.QueryDelegationTotalRewardsRequest=t.QueryDelegationRewardsResponse=t.QueryDelegationRewardsRequest=t.QueryValidatorSlashesResponse=t.QueryValidatorSlashesRequest=t.QueryValidatorCommissionResponse=t.QueryValidatorCommissionRequest=t.QueryValidatorOutstandingRewardsResponse=t.QueryValidatorOutstandingRewardsRequest=t.QueryParamsResponse=t.QueryParamsRequest=t.protobufPackage=void 0;const o=r(n(3720)),i=r(n(3789)),a=n(1790),s=n(9551),c=n(891);t.protobufPackage="cosmos.distribution.v1beta1";const d={};t.QueryParamsRequest={encode:(e,t=i.default.Writer.create())=>t,decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},d);for(;n.posObject.assign({},d),toJSON:e=>({}),fromPartial:e=>Object.assign({},d)};const u={};t.QueryParamsResponse={encode:(e,t=i.default.Writer.create())=>(void 0!==e.params&&a.Params.encode(e.params,t.uint32(10).fork()).ldelim(),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},u);for(;n.pos>>3==1?o.params=a.Params.decode(n,n.uint32()):n.skipType(7&e)}return o},fromJSON(e){const t=Object.assign({},u);return t.params=void 0!==e.params&&null!==e.params?a.Params.fromJSON(e.params):void 0,t},toJSON(e){const t={};return void 0!==e.params&&(t.params=e.params?a.Params.toJSON(e.params):void 0),t},fromPartial(e){const t=Object.assign({},u);return t.params=void 0!==e.params&&null!==e.params?a.Params.fromPartial(e.params):void 0,t}};const l={validatorAddress:""};t.QueryValidatorOutstandingRewardsRequest={encode:(e,t=i.default.Writer.create())=>(""!==e.validatorAddress&&t.uint32(10).string(e.validatorAddress),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},l);for(;n.pos>>3==1?o.validatorAddress=n.string():n.skipType(7&e)}return o},fromJSON(e){const t=Object.assign({},l);return t.validatorAddress=void 0!==e.validatorAddress&&null!==e.validatorAddress?String(e.validatorAddress):"",t},toJSON(e){const t={};return void 0!==e.validatorAddress&&(t.validatorAddress=e.validatorAddress),t},fromPartial(e){var t;const n=Object.assign({},l);return n.validatorAddress=null!==(t=e.validatorAddress)&&void 0!==t?t:"",n}};const A={};t.QueryValidatorOutstandingRewardsResponse={encode:(e,t=i.default.Writer.create())=>(void 0!==e.rewards&&a.ValidatorOutstandingRewards.encode(e.rewards,t.uint32(10).fork()).ldelim(),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},A);for(;n.pos>>3==1?o.rewards=a.ValidatorOutstandingRewards.decode(n,n.uint32()):n.skipType(7&e)}return o},fromJSON(e){const t=Object.assign({},A);return t.rewards=void 0!==e.rewards&&null!==e.rewards?a.ValidatorOutstandingRewards.fromJSON(e.rewards):void 0,t},toJSON(e){const t={};return void 0!==e.rewards&&(t.rewards=e.rewards?a.ValidatorOutstandingRewards.toJSON(e.rewards):void 0),t},fromPartial(e){const t=Object.assign({},A);return t.rewards=void 0!==e.rewards&&null!==e.rewards?a.ValidatorOutstandingRewards.fromPartial(e.rewards):void 0,t}};const f={validatorAddress:""};t.QueryValidatorCommissionRequest={encode:(e,t=i.default.Writer.create())=>(""!==e.validatorAddress&&t.uint32(10).string(e.validatorAddress),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},f);for(;n.pos>>3==1?o.validatorAddress=n.string():n.skipType(7&e)}return o},fromJSON(e){const t=Object.assign({},f);return t.validatorAddress=void 0!==e.validatorAddress&&null!==e.validatorAddress?String(e.validatorAddress):"",t},toJSON(e){const t={};return void 0!==e.validatorAddress&&(t.validatorAddress=e.validatorAddress),t},fromPartial(e){var t;const n=Object.assign({},f);return n.validatorAddress=null!==(t=e.validatorAddress)&&void 0!==t?t:"",n}};const h={};t.QueryValidatorCommissionResponse={encode:(e,t=i.default.Writer.create())=>(void 0!==e.commission&&a.ValidatorAccumulatedCommission.encode(e.commission,t.uint32(10).fork()).ldelim(),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},h);for(;n.pos>>3==1?o.commission=a.ValidatorAccumulatedCommission.decode(n,n.uint32()):n.skipType(7&e)}return o},fromJSON(e){const t=Object.assign({},h);return t.commission=void 0!==e.commission&&null!==e.commission?a.ValidatorAccumulatedCommission.fromJSON(e.commission):void 0,t},toJSON(e){const t={};return void 0!==e.commission&&(t.commission=e.commission?a.ValidatorAccumulatedCommission.toJSON(e.commission):void 0),t},fromPartial(e){const t=Object.assign({},h);return t.commission=void 0!==e.commission&&null!==e.commission?a.ValidatorAccumulatedCommission.fromPartial(e.commission):void 0,t}};const g={validatorAddress:"",startingHeight:o.default.UZERO,endingHeight:o.default.UZERO};t.QueryValidatorSlashesRequest={encode:(e,t=i.default.Writer.create())=>(""!==e.validatorAddress&&t.uint32(10).string(e.validatorAddress),e.startingHeight.isZero()||t.uint32(16).uint64(e.startingHeight),e.endingHeight.isZero()||t.uint32(24).uint64(e.endingHeight),void 0!==e.pagination&&s.PageRequest.encode(e.pagination,t.uint32(34).fork()).ldelim(),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},g);for(;n.pos>>3){case 1:o.validatorAddress=n.string();break;case 2:o.startingHeight=n.uint64();break;case 3:o.endingHeight=n.uint64();break;case 4:o.pagination=s.PageRequest.decode(n,n.uint32());break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},g);return t.validatorAddress=void 0!==e.validatorAddress&&null!==e.validatorAddress?String(e.validatorAddress):"",t.startingHeight=void 0!==e.startingHeight&&null!==e.startingHeight?o.default.fromString(e.startingHeight):o.default.UZERO,t.endingHeight=void 0!==e.endingHeight&&null!==e.endingHeight?o.default.fromString(e.endingHeight):o.default.UZERO,t.pagination=void 0!==e.pagination&&null!==e.pagination?s.PageRequest.fromJSON(e.pagination):void 0,t},toJSON(e){const t={};return void 0!==e.validatorAddress&&(t.validatorAddress=e.validatorAddress),void 0!==e.startingHeight&&(t.startingHeight=(e.startingHeight||o.default.UZERO).toString()),void 0!==e.endingHeight&&(t.endingHeight=(e.endingHeight||o.default.UZERO).toString()),void 0!==e.pagination&&(t.pagination=e.pagination?s.PageRequest.toJSON(e.pagination):void 0),t},fromPartial(e){var t;const n=Object.assign({},g);return n.validatorAddress=null!==(t=e.validatorAddress)&&void 0!==t?t:"",n.startingHeight=void 0!==e.startingHeight&&null!==e.startingHeight?o.default.fromValue(e.startingHeight):o.default.UZERO,n.endingHeight=void 0!==e.endingHeight&&null!==e.endingHeight?o.default.fromValue(e.endingHeight):o.default.UZERO,n.pagination=void 0!==e.pagination&&null!==e.pagination?s.PageRequest.fromPartial(e.pagination):void 0,n}};const p={};t.QueryValidatorSlashesResponse={encode(e,t=i.default.Writer.create()){for(const n of e.slashes)a.ValidatorSlashEvent.encode(n,t.uint32(10).fork()).ldelim();return void 0!==e.pagination&&s.PageResponse.encode(e.pagination,t.uint32(18).fork()).ldelim(),t},decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},p);for(o.slashes=[];n.pos>>3){case 1:o.slashes.push(a.ValidatorSlashEvent.decode(n,n.uint32()));break;case 2:o.pagination=s.PageResponse.decode(n,n.uint32());break;default:n.skipType(7&e)}}return o},fromJSON(e){var t;const n=Object.assign({},p);return n.slashes=(null!==(t=e.slashes)&&void 0!==t?t:[]).map((e=>a.ValidatorSlashEvent.fromJSON(e))),n.pagination=void 0!==e.pagination&&null!==e.pagination?s.PageResponse.fromJSON(e.pagination):void 0,n},toJSON(e){const t={};return e.slashes?t.slashes=e.slashes.map((e=>e?a.ValidatorSlashEvent.toJSON(e):void 0)):t.slashes=[],void 0!==e.pagination&&(t.pagination=e.pagination?s.PageResponse.toJSON(e.pagination):void 0),t},fromPartial(e){var t;const n=Object.assign({},p);return n.slashes=(null===(t=e.slashes)||void 0===t?void 0:t.map((e=>a.ValidatorSlashEvent.fromPartial(e))))||[],n.pagination=void 0!==e.pagination&&null!==e.pagination?s.PageResponse.fromPartial(e.pagination):void 0,n}};const m={delegatorAddress:"",validatorAddress:""};t.QueryDelegationRewardsRequest={encode:(e,t=i.default.Writer.create())=>(""!==e.delegatorAddress&&t.uint32(10).string(e.delegatorAddress),""!==e.validatorAddress&&t.uint32(18).string(e.validatorAddress),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},m);for(;n.pos>>3){case 1:o.delegatorAddress=n.string();break;case 2:o.validatorAddress=n.string();break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},m);return t.delegatorAddress=void 0!==e.delegatorAddress&&null!==e.delegatorAddress?String(e.delegatorAddress):"",t.validatorAddress=void 0!==e.validatorAddress&&null!==e.validatorAddress?String(e.validatorAddress):"",t},toJSON(e){const t={};return void 0!==e.delegatorAddress&&(t.delegatorAddress=e.delegatorAddress),void 0!==e.validatorAddress&&(t.validatorAddress=e.validatorAddress),t},fromPartial(e){var t,n;const r=Object.assign({},m);return r.delegatorAddress=null!==(t=e.delegatorAddress)&&void 0!==t?t:"",r.validatorAddress=null!==(n=e.validatorAddress)&&void 0!==n?n:"",r}};const v={};t.QueryDelegationRewardsResponse={encode(e,t=i.default.Writer.create()){for(const n of e.rewards)c.DecCoin.encode(n,t.uint32(10).fork()).ldelim();return t},decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},v);for(o.rewards=[];n.pos>>3==1?o.rewards.push(c.DecCoin.decode(n,n.uint32())):n.skipType(7&e)}return o},fromJSON(e){var t;const n=Object.assign({},v);return n.rewards=(null!==(t=e.rewards)&&void 0!==t?t:[]).map((e=>c.DecCoin.fromJSON(e))),n},toJSON(e){const t={};return e.rewards?t.rewards=e.rewards.map((e=>e?c.DecCoin.toJSON(e):void 0)):t.rewards=[],t},fromPartial(e){var t;const n=Object.assign({},v);return n.rewards=(null===(t=e.rewards)||void 0===t?void 0:t.map((e=>c.DecCoin.fromPartial(e))))||[],n}};const y={delegatorAddress:""};t.QueryDelegationTotalRewardsRequest={encode:(e,t=i.default.Writer.create())=>(""!==e.delegatorAddress&&t.uint32(10).string(e.delegatorAddress),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},y);for(;n.pos>>3==1?o.delegatorAddress=n.string():n.skipType(7&e)}return o},fromJSON(e){const t=Object.assign({},y);return t.delegatorAddress=void 0!==e.delegatorAddress&&null!==e.delegatorAddress?String(e.delegatorAddress):"",t},toJSON(e){const t={};return void 0!==e.delegatorAddress&&(t.delegatorAddress=e.delegatorAddress),t},fromPartial(e){var t;const n=Object.assign({},y);return n.delegatorAddress=null!==(t=e.delegatorAddress)&&void 0!==t?t:"",n}};const b={};t.QueryDelegationTotalRewardsResponse={encode(e,t=i.default.Writer.create()){for(const n of e.rewards)a.DelegationDelegatorReward.encode(n,t.uint32(10).fork()).ldelim();for(const n of e.total)c.DecCoin.encode(n,t.uint32(18).fork()).ldelim();return t},decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},b);for(o.rewards=[],o.total=[];n.pos>>3){case 1:o.rewards.push(a.DelegationDelegatorReward.decode(n,n.uint32()));break;case 2:o.total.push(c.DecCoin.decode(n,n.uint32()));break;default:n.skipType(7&e)}}return o},fromJSON(e){var t,n;const r=Object.assign({},b);return r.rewards=(null!==(t=e.rewards)&&void 0!==t?t:[]).map((e=>a.DelegationDelegatorReward.fromJSON(e))),r.total=(null!==(n=e.total)&&void 0!==n?n:[]).map((e=>c.DecCoin.fromJSON(e))),r},toJSON(e){const t={};return e.rewards?t.rewards=e.rewards.map((e=>e?a.DelegationDelegatorReward.toJSON(e):void 0)):t.rewards=[],e.total?t.total=e.total.map((e=>e?c.DecCoin.toJSON(e):void 0)):t.total=[],t},fromPartial(e){var t,n;const r=Object.assign({},b);return r.rewards=(null===(t=e.rewards)||void 0===t?void 0:t.map((e=>a.DelegationDelegatorReward.fromPartial(e))))||[],r.total=(null===(n=e.total)||void 0===n?void 0:n.map((e=>c.DecCoin.fromPartial(e))))||[],r}};const I={delegatorAddress:""};t.QueryDelegatorValidatorsRequest={encode:(e,t=i.default.Writer.create())=>(""!==e.delegatorAddress&&t.uint32(10).string(e.delegatorAddress),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},I);for(;n.pos>>3==1?o.delegatorAddress=n.string():n.skipType(7&e)}return o},fromJSON(e){const t=Object.assign({},I);return t.delegatorAddress=void 0!==e.delegatorAddress&&null!==e.delegatorAddress?String(e.delegatorAddress):"",t},toJSON(e){const t={};return void 0!==e.delegatorAddress&&(t.delegatorAddress=e.delegatorAddress),t},fromPartial(e){var t;const n=Object.assign({},I);return n.delegatorAddress=null!==(t=e.delegatorAddress)&&void 0!==t?t:"",n}};const C={validators:""};t.QueryDelegatorValidatorsResponse={encode(e,t=i.default.Writer.create()){for(const n of e.validators)t.uint32(10).string(n);return t},decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},C);for(o.validators=[];n.pos>>3==1?o.validators.push(n.string()):n.skipType(7&e)}return o},fromJSON(e){var t;const n=Object.assign({},C);return n.validators=(null!==(t=e.validators)&&void 0!==t?t:[]).map((e=>String(e))),n},toJSON(e){const t={};return e.validators?t.validators=e.validators.map((e=>e)):t.validators=[],t},fromPartial(e){var t;const n=Object.assign({},C);return n.validators=(null===(t=e.validators)||void 0===t?void 0:t.map((e=>e)))||[],n}};const E={delegatorAddress:""};t.QueryDelegatorWithdrawAddressRequest={encode:(e,t=i.default.Writer.create())=>(""!==e.delegatorAddress&&t.uint32(10).string(e.delegatorAddress),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},E);for(;n.pos>>3==1?o.delegatorAddress=n.string():n.skipType(7&e)}return o},fromJSON(e){const t=Object.assign({},E);return t.delegatorAddress=void 0!==e.delegatorAddress&&null!==e.delegatorAddress?String(e.delegatorAddress):"",t},toJSON(e){const t={};return void 0!==e.delegatorAddress&&(t.delegatorAddress=e.delegatorAddress),t},fromPartial(e){var t;const n=Object.assign({},E);return n.delegatorAddress=null!==(t=e.delegatorAddress)&&void 0!==t?t:"",n}};const w={withdrawAddress:""};t.QueryDelegatorWithdrawAddressResponse={encode:(e,t=i.default.Writer.create())=>(""!==e.withdrawAddress&&t.uint32(10).string(e.withdrawAddress),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},w);for(;n.pos>>3==1?o.withdrawAddress=n.string():n.skipType(7&e)}return o},fromJSON(e){const t=Object.assign({},w);return t.withdrawAddress=void 0!==e.withdrawAddress&&null!==e.withdrawAddress?String(e.withdrawAddress):"",t},toJSON(e){const t={};return void 0!==e.withdrawAddress&&(t.withdrawAddress=e.withdrawAddress),t},fromPartial(e){var t;const n=Object.assign({},w);return n.withdrawAddress=null!==(t=e.withdrawAddress)&&void 0!==t?t:"",n}};const B={};t.QueryCommunityPoolRequest={encode:(e,t=i.default.Writer.create())=>t,decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},B);for(;n.posObject.assign({},B),toJSON:e=>({}),fromPartial:e=>Object.assign({},B)};const _={};t.QueryCommunityPoolResponse={encode(e,t=i.default.Writer.create()){for(const n of e.pool)c.DecCoin.encode(n,t.uint32(10).fork()).ldelim();return t},decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},_);for(o.pool=[];n.pos>>3==1?o.pool.push(c.DecCoin.decode(n,n.uint32())):n.skipType(7&e)}return o},fromJSON(e){var t;const n=Object.assign({},_);return n.pool=(null!==(t=e.pool)&&void 0!==t?t:[]).map((e=>c.DecCoin.fromJSON(e))),n},toJSON(e){const t={};return e.pool?t.pool=e.pool.map((e=>e?c.DecCoin.toJSON(e):void 0)):t.pool=[],t},fromPartial(e){var t;const n=Object.assign({},_);return n.pool=(null===(t=e.pool)||void 0===t?void 0:t.map((e=>c.DecCoin.fromPartial(e))))||[],n}},t.QueryClientImpl=class{constructor(e){this.rpc=e,this.Params=this.Params.bind(this),this.ValidatorOutstandingRewards=this.ValidatorOutstandingRewards.bind(this),this.ValidatorCommission=this.ValidatorCommission.bind(this),this.ValidatorSlashes=this.ValidatorSlashes.bind(this),this.DelegationRewards=this.DelegationRewards.bind(this),this.DelegationTotalRewards=this.DelegationTotalRewards.bind(this),this.DelegatorValidators=this.DelegatorValidators.bind(this),this.DelegatorWithdrawAddress=this.DelegatorWithdrawAddress.bind(this),this.CommunityPool=this.CommunityPool.bind(this)}Params(e){const n=t.QueryParamsRequest.encode(e).finish();return this.rpc.request("cosmos.distribution.v1beta1.Query","Params",n).then((e=>t.QueryParamsResponse.decode(new i.default.Reader(e))))}ValidatorOutstandingRewards(e){const n=t.QueryValidatorOutstandingRewardsRequest.encode(e).finish();return this.rpc.request("cosmos.distribution.v1beta1.Query","ValidatorOutstandingRewards",n).then((e=>t.QueryValidatorOutstandingRewardsResponse.decode(new i.default.Reader(e))))}ValidatorCommission(e){const n=t.QueryValidatorCommissionRequest.encode(e).finish();return this.rpc.request("cosmos.distribution.v1beta1.Query","ValidatorCommission",n).then((e=>t.QueryValidatorCommissionResponse.decode(new i.default.Reader(e))))}ValidatorSlashes(e){const n=t.QueryValidatorSlashesRequest.encode(e).finish();return this.rpc.request("cosmos.distribution.v1beta1.Query","ValidatorSlashes",n).then((e=>t.QueryValidatorSlashesResponse.decode(new i.default.Reader(e))))}DelegationRewards(e){const n=t.QueryDelegationRewardsRequest.encode(e).finish();return this.rpc.request("cosmos.distribution.v1beta1.Query","DelegationRewards",n).then((e=>t.QueryDelegationRewardsResponse.decode(new i.default.Reader(e))))}DelegationTotalRewards(e){const n=t.QueryDelegationTotalRewardsRequest.encode(e).finish();return this.rpc.request("cosmos.distribution.v1beta1.Query","DelegationTotalRewards",n).then((e=>t.QueryDelegationTotalRewardsResponse.decode(new i.default.Reader(e))))}DelegatorValidators(e){const n=t.QueryDelegatorValidatorsRequest.encode(e).finish();return this.rpc.request("cosmos.distribution.v1beta1.Query","DelegatorValidators",n).then((e=>t.QueryDelegatorValidatorsResponse.decode(new i.default.Reader(e))))}DelegatorWithdrawAddress(e){const n=t.QueryDelegatorWithdrawAddressRequest.encode(e).finish();return this.rpc.request("cosmos.distribution.v1beta1.Query","DelegatorWithdrawAddress",n).then((e=>t.QueryDelegatorWithdrawAddressResponse.decode(new i.default.Reader(e))))}CommunityPool(e){const n=t.QueryCommunityPoolRequest.encode(e).finish();return this.rpc.request("cosmos.distribution.v1beta1.Query","CommunityPool",n).then((e=>t.QueryCommunityPoolResponse.decode(new i.default.Reader(e))))}},i.default.util.Long!==o.default&&(i.default.util.Long=o.default,i.default.configure())},3773:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.MsgClientImpl=t.MsgFundCommunityPoolResponse=t.MsgFundCommunityPool=t.MsgWithdrawValidatorCommissionResponse=t.MsgWithdrawValidatorCommission=t.MsgWithdrawDelegatorRewardResponse=t.MsgWithdrawDelegatorReward=t.MsgSetWithdrawAddressResponse=t.MsgSetWithdrawAddress=t.protobufPackage=void 0;const o=r(n(3720)),i=r(n(3789)),a=n(891);t.protobufPackage="cosmos.distribution.v1beta1";const s={delegatorAddress:"",withdrawAddress:""};t.MsgSetWithdrawAddress={encode:(e,t=i.default.Writer.create())=>(""!==e.delegatorAddress&&t.uint32(10).string(e.delegatorAddress),""!==e.withdrawAddress&&t.uint32(18).string(e.withdrawAddress),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},s);for(;n.pos>>3){case 1:o.delegatorAddress=n.string();break;case 2:o.withdrawAddress=n.string();break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},s);return t.delegatorAddress=void 0!==e.delegatorAddress&&null!==e.delegatorAddress?String(e.delegatorAddress):"",t.withdrawAddress=void 0!==e.withdrawAddress&&null!==e.withdrawAddress?String(e.withdrawAddress):"",t},toJSON(e){const t={};return void 0!==e.delegatorAddress&&(t.delegatorAddress=e.delegatorAddress),void 0!==e.withdrawAddress&&(t.withdrawAddress=e.withdrawAddress),t},fromPartial(e){var t,n;const r=Object.assign({},s);return r.delegatorAddress=null!==(t=e.delegatorAddress)&&void 0!==t?t:"",r.withdrawAddress=null!==(n=e.withdrawAddress)&&void 0!==n?n:"",r}};const c={};t.MsgSetWithdrawAddressResponse={encode:(e,t=i.default.Writer.create())=>t,decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},c);for(;n.posObject.assign({},c),toJSON:e=>({}),fromPartial:e=>Object.assign({},c)};const d={delegatorAddress:"",validatorAddress:""};t.MsgWithdrawDelegatorReward={encode:(e,t=i.default.Writer.create())=>(""!==e.delegatorAddress&&t.uint32(10).string(e.delegatorAddress),""!==e.validatorAddress&&t.uint32(18).string(e.validatorAddress),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},d);for(;n.pos>>3){case 1:o.delegatorAddress=n.string();break;case 2:o.validatorAddress=n.string();break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},d);return t.delegatorAddress=void 0!==e.delegatorAddress&&null!==e.delegatorAddress?String(e.delegatorAddress):"",t.validatorAddress=void 0!==e.validatorAddress&&null!==e.validatorAddress?String(e.validatorAddress):"",t},toJSON(e){const t={};return void 0!==e.delegatorAddress&&(t.delegatorAddress=e.delegatorAddress),void 0!==e.validatorAddress&&(t.validatorAddress=e.validatorAddress),t},fromPartial(e){var t,n;const r=Object.assign({},d);return r.delegatorAddress=null!==(t=e.delegatorAddress)&&void 0!==t?t:"",r.validatorAddress=null!==(n=e.validatorAddress)&&void 0!==n?n:"",r}};const u={};t.MsgWithdrawDelegatorRewardResponse={encode:(e,t=i.default.Writer.create())=>t,decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},u);for(;n.posObject.assign({},u),toJSON:e=>({}),fromPartial:e=>Object.assign({},u)};const l={validatorAddress:""};t.MsgWithdrawValidatorCommission={encode:(e,t=i.default.Writer.create())=>(""!==e.validatorAddress&&t.uint32(10).string(e.validatorAddress),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},l);for(;n.pos>>3==1?o.validatorAddress=n.string():n.skipType(7&e)}return o},fromJSON(e){const t=Object.assign({},l);return t.validatorAddress=void 0!==e.validatorAddress&&null!==e.validatorAddress?String(e.validatorAddress):"",t},toJSON(e){const t={};return void 0!==e.validatorAddress&&(t.validatorAddress=e.validatorAddress),t},fromPartial(e){var t;const n=Object.assign({},l);return n.validatorAddress=null!==(t=e.validatorAddress)&&void 0!==t?t:"",n}};const A={};t.MsgWithdrawValidatorCommissionResponse={encode:(e,t=i.default.Writer.create())=>t,decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},A);for(;n.posObject.assign({},A),toJSON:e=>({}),fromPartial:e=>Object.assign({},A)};const f={depositor:""};t.MsgFundCommunityPool={encode(e,t=i.default.Writer.create()){for(const n of e.amount)a.Coin.encode(n,t.uint32(10).fork()).ldelim();return""!==e.depositor&&t.uint32(18).string(e.depositor),t},decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},f);for(o.amount=[];n.pos>>3){case 1:o.amount.push(a.Coin.decode(n,n.uint32()));break;case 2:o.depositor=n.string();break;default:n.skipType(7&e)}}return o},fromJSON(e){var t;const n=Object.assign({},f);return n.amount=(null!==(t=e.amount)&&void 0!==t?t:[]).map((e=>a.Coin.fromJSON(e))),n.depositor=void 0!==e.depositor&&null!==e.depositor?String(e.depositor):"",n},toJSON(e){const t={};return e.amount?t.amount=e.amount.map((e=>e?a.Coin.toJSON(e):void 0)):t.amount=[],void 0!==e.depositor&&(t.depositor=e.depositor),t},fromPartial(e){var t,n;const r=Object.assign({},f);return r.amount=(null===(t=e.amount)||void 0===t?void 0:t.map((e=>a.Coin.fromPartial(e))))||[],r.depositor=null!==(n=e.depositor)&&void 0!==n?n:"",r}};const h={};t.MsgFundCommunityPoolResponse={encode:(e,t=i.default.Writer.create())=>t,decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},h);for(;n.posObject.assign({},h),toJSON:e=>({}),fromPartial:e=>Object.assign({},h)},t.MsgClientImpl=class{constructor(e){this.rpc=e,this.SetWithdrawAddress=this.SetWithdrawAddress.bind(this),this.WithdrawDelegatorReward=this.WithdrawDelegatorReward.bind(this),this.WithdrawValidatorCommission=this.WithdrawValidatorCommission.bind(this),this.FundCommunityPool=this.FundCommunityPool.bind(this)}SetWithdrawAddress(e){const n=t.MsgSetWithdrawAddress.encode(e).finish();return this.rpc.request("cosmos.distribution.v1beta1.Msg","SetWithdrawAddress",n).then((e=>t.MsgSetWithdrawAddressResponse.decode(new i.default.Reader(e))))}WithdrawDelegatorReward(e){const n=t.MsgWithdrawDelegatorReward.encode(e).finish();return this.rpc.request("cosmos.distribution.v1beta1.Msg","WithdrawDelegatorReward",n).then((e=>t.MsgWithdrawDelegatorRewardResponse.decode(new i.default.Reader(e))))}WithdrawValidatorCommission(e){const n=t.MsgWithdrawValidatorCommission.encode(e).finish();return this.rpc.request("cosmos.distribution.v1beta1.Msg","WithdrawValidatorCommission",n).then((e=>t.MsgWithdrawValidatorCommissionResponse.decode(new i.default.Reader(e))))}FundCommunityPool(e){const n=t.MsgFundCommunityPool.encode(e).finish();return this.rpc.request("cosmos.distribution.v1beta1.Msg","FundCommunityPool",n).then((e=>t.MsgFundCommunityPoolResponse.decode(new i.default.Reader(e))))}},i.default.util.Long!==o.default&&(i.default.util.Long=o.default,i.default.configure())},5192:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.MsgClientImpl=t.MsgRevokeAllowanceResponse=t.MsgRevokeAllowance=t.MsgGrantAllowanceResponse=t.MsgGrantAllowance=t.protobufPackage=void 0;const o=r(n(3720)),i=r(n(3789)),a=n(3862);t.protobufPackage="cosmos.feegrant.v1beta1";const s={granter:"",grantee:""};t.MsgGrantAllowance={encode:(e,t=i.default.Writer.create())=>(""!==e.granter&&t.uint32(10).string(e.granter),""!==e.grantee&&t.uint32(18).string(e.grantee),void 0!==e.allowance&&a.Any.encode(e.allowance,t.uint32(26).fork()).ldelim(),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},s);for(;n.pos>>3){case 1:o.granter=n.string();break;case 2:o.grantee=n.string();break;case 3:o.allowance=a.Any.decode(n,n.uint32());break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},s);return t.granter=void 0!==e.granter&&null!==e.granter?String(e.granter):"",t.grantee=void 0!==e.grantee&&null!==e.grantee?String(e.grantee):"",t.allowance=void 0!==e.allowance&&null!==e.allowance?a.Any.fromJSON(e.allowance):void 0,t},toJSON(e){const t={};return void 0!==e.granter&&(t.granter=e.granter),void 0!==e.grantee&&(t.grantee=e.grantee),void 0!==e.allowance&&(t.allowance=e.allowance?a.Any.toJSON(e.allowance):void 0),t},fromPartial(e){var t,n;const r=Object.assign({},s);return r.granter=null!==(t=e.granter)&&void 0!==t?t:"",r.grantee=null!==(n=e.grantee)&&void 0!==n?n:"",r.allowance=void 0!==e.allowance&&null!==e.allowance?a.Any.fromPartial(e.allowance):void 0,r}};const c={};t.MsgGrantAllowanceResponse={encode:(e,t=i.default.Writer.create())=>t,decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},c);for(;n.posObject.assign({},c),toJSON:e=>({}),fromPartial:e=>Object.assign({},c)};const d={granter:"",grantee:""};t.MsgRevokeAllowance={encode:(e,t=i.default.Writer.create())=>(""!==e.granter&&t.uint32(10).string(e.granter),""!==e.grantee&&t.uint32(18).string(e.grantee),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},d);for(;n.pos>>3){case 1:o.granter=n.string();break;case 2:o.grantee=n.string();break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},d);return t.granter=void 0!==e.granter&&null!==e.granter?String(e.granter):"",t.grantee=void 0!==e.grantee&&null!==e.grantee?String(e.grantee):"",t},toJSON(e){const t={};return void 0!==e.granter&&(t.granter=e.granter),void 0!==e.grantee&&(t.grantee=e.grantee),t},fromPartial(e){var t,n;const r=Object.assign({},d);return r.granter=null!==(t=e.granter)&&void 0!==t?t:"",r.grantee=null!==(n=e.grantee)&&void 0!==n?n:"",r}};const u={};t.MsgRevokeAllowanceResponse={encode:(e,t=i.default.Writer.create())=>t,decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},u);for(;n.posObject.assign({},u),toJSON:e=>({}),fromPartial:e=>Object.assign({},u)},t.MsgClientImpl=class{constructor(e){this.rpc=e,this.GrantAllowance=this.GrantAllowance.bind(this),this.RevokeAllowance=this.RevokeAllowance.bind(this)}GrantAllowance(e){const n=t.MsgGrantAllowance.encode(e).finish();return this.rpc.request("cosmos.feegrant.v1beta1.Msg","GrantAllowance",n).then((e=>t.MsgGrantAllowanceResponse.decode(new i.default.Reader(e))))}RevokeAllowance(e){const n=t.MsgRevokeAllowance.encode(e).finish();return this.rpc.request("cosmos.feegrant.v1beta1.Msg","RevokeAllowance",n).then((e=>t.MsgRevokeAllowanceResponse.decode(new i.default.Reader(e))))}},i.default.util.Long!==o.default&&(i.default.util.Long=o.default,i.default.configure())},9876:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.TallyParams=t.VotingParams=t.DepositParams=t.Vote=t.TallyResult=t.Proposal=t.Deposit=t.TextProposal=t.WeightedVoteOption=t.proposalStatusToJSON=t.proposalStatusFromJSON=t.ProposalStatus=t.voteOptionToJSON=t.voteOptionFromJSON=t.VoteOption=t.protobufPackage=void 0;const o=r(n(3720)),i=r(n(3789)),a=n(3862),s=n(5522),c=n(281),d=n(891);var u,l;function A(e){switch(e){case 0:case"VOTE_OPTION_UNSPECIFIED":return u.VOTE_OPTION_UNSPECIFIED;case 1:case"VOTE_OPTION_YES":return u.VOTE_OPTION_YES;case 2:case"VOTE_OPTION_ABSTAIN":return u.VOTE_OPTION_ABSTAIN;case 3:case"VOTE_OPTION_NO":return u.VOTE_OPTION_NO;case 4:case"VOTE_OPTION_NO_WITH_VETO":return u.VOTE_OPTION_NO_WITH_VETO;default:return u.UNRECOGNIZED}}function f(e){switch(e){case u.VOTE_OPTION_UNSPECIFIED:return"VOTE_OPTION_UNSPECIFIED";case u.VOTE_OPTION_YES:return"VOTE_OPTION_YES";case u.VOTE_OPTION_ABSTAIN:return"VOTE_OPTION_ABSTAIN";case u.VOTE_OPTION_NO:return"VOTE_OPTION_NO";case u.VOTE_OPTION_NO_WITH_VETO:return"VOTE_OPTION_NO_WITH_VETO";default:return"UNKNOWN"}}function h(e){switch(e){case 0:case"PROPOSAL_STATUS_UNSPECIFIED":return l.PROPOSAL_STATUS_UNSPECIFIED;case 1:case"PROPOSAL_STATUS_DEPOSIT_PERIOD":return l.PROPOSAL_STATUS_DEPOSIT_PERIOD;case 2:case"PROPOSAL_STATUS_VOTING_PERIOD":return l.PROPOSAL_STATUS_VOTING_PERIOD;case 3:case"PROPOSAL_STATUS_PASSED":return l.PROPOSAL_STATUS_PASSED;case 4:case"PROPOSAL_STATUS_REJECTED":return l.PROPOSAL_STATUS_REJECTED;case 5:case"PROPOSAL_STATUS_FAILED":return l.PROPOSAL_STATUS_FAILED;default:return l.UNRECOGNIZED}}function g(e){switch(e){case l.PROPOSAL_STATUS_UNSPECIFIED:return"PROPOSAL_STATUS_UNSPECIFIED";case l.PROPOSAL_STATUS_DEPOSIT_PERIOD:return"PROPOSAL_STATUS_DEPOSIT_PERIOD";case l.PROPOSAL_STATUS_VOTING_PERIOD:return"PROPOSAL_STATUS_VOTING_PERIOD";case l.PROPOSAL_STATUS_PASSED:return"PROPOSAL_STATUS_PASSED";case l.PROPOSAL_STATUS_REJECTED:return"PROPOSAL_STATUS_REJECTED";case l.PROPOSAL_STATUS_FAILED:return"PROPOSAL_STATUS_FAILED";default:return"UNKNOWN"}}t.protobufPackage="cosmos.gov.v1beta1",function(e){e[e.VOTE_OPTION_UNSPECIFIED=0]="VOTE_OPTION_UNSPECIFIED",e[e.VOTE_OPTION_YES=1]="VOTE_OPTION_YES",e[e.VOTE_OPTION_ABSTAIN=2]="VOTE_OPTION_ABSTAIN",e[e.VOTE_OPTION_NO=3]="VOTE_OPTION_NO",e[e.VOTE_OPTION_NO_WITH_VETO=4]="VOTE_OPTION_NO_WITH_VETO",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(u=t.VoteOption||(t.VoteOption={})),t.voteOptionFromJSON=A,t.voteOptionToJSON=f,function(e){e[e.PROPOSAL_STATUS_UNSPECIFIED=0]="PROPOSAL_STATUS_UNSPECIFIED",e[e.PROPOSAL_STATUS_DEPOSIT_PERIOD=1]="PROPOSAL_STATUS_DEPOSIT_PERIOD",e[e.PROPOSAL_STATUS_VOTING_PERIOD=2]="PROPOSAL_STATUS_VOTING_PERIOD",e[e.PROPOSAL_STATUS_PASSED=3]="PROPOSAL_STATUS_PASSED",e[e.PROPOSAL_STATUS_REJECTED=4]="PROPOSAL_STATUS_REJECTED",e[e.PROPOSAL_STATUS_FAILED=5]="PROPOSAL_STATUS_FAILED",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(l=t.ProposalStatus||(t.ProposalStatus={})),t.proposalStatusFromJSON=h,t.proposalStatusToJSON=g;const p={option:0,weight:""};t.WeightedVoteOption={encode:(e,t=i.default.Writer.create())=>(0!==e.option&&t.uint32(8).int32(e.option),""!==e.weight&&t.uint32(18).string(e.weight),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},p);for(;n.pos>>3){case 1:o.option=n.int32();break;case 2:o.weight=n.string();break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},p);return t.option=void 0!==e.option&&null!==e.option?A(e.option):0,t.weight=void 0!==e.weight&&null!==e.weight?String(e.weight):"",t},toJSON(e){const t={};return void 0!==e.option&&(t.option=f(e.option)),void 0!==e.weight&&(t.weight=e.weight),t},fromPartial(e){var t,n;const r=Object.assign({},p);return r.option=null!==(t=e.option)&&void 0!==t?t:0,r.weight=null!==(n=e.weight)&&void 0!==n?n:"",r}};const m={title:"",description:""};t.TextProposal={encode:(e,t=i.default.Writer.create())=>(""!==e.title&&t.uint32(10).string(e.title),""!==e.description&&t.uint32(18).string(e.description),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},m);for(;n.pos>>3){case 1:o.title=n.string();break;case 2:o.description=n.string();break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},m);return t.title=void 0!==e.title&&null!==e.title?String(e.title):"",t.description=void 0!==e.description&&null!==e.description?String(e.description):"",t},toJSON(e){const t={};return void 0!==e.title&&(t.title=e.title),void 0!==e.description&&(t.description=e.description),t},fromPartial(e){var t,n;const r=Object.assign({},m);return r.title=null!==(t=e.title)&&void 0!==t?t:"",r.description=null!==(n=e.description)&&void 0!==n?n:"",r}};const v={proposalId:o.default.UZERO,depositor:""};t.Deposit={encode(e,t=i.default.Writer.create()){e.proposalId.isZero()||t.uint32(8).uint64(e.proposalId),""!==e.depositor&&t.uint32(18).string(e.depositor);for(const n of e.amount)d.Coin.encode(n,t.uint32(26).fork()).ldelim();return t},decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},v);for(o.amount=[];n.pos>>3){case 1:o.proposalId=n.uint64();break;case 2:o.depositor=n.string();break;case 3:o.amount.push(d.Coin.decode(n,n.uint32()));break;default:n.skipType(7&e)}}return o},fromJSON(e){var t;const n=Object.assign({},v);return n.proposalId=void 0!==e.proposalId&&null!==e.proposalId?o.default.fromString(e.proposalId):o.default.UZERO,n.depositor=void 0!==e.depositor&&null!==e.depositor?String(e.depositor):"",n.amount=(null!==(t=e.amount)&&void 0!==t?t:[]).map((e=>d.Coin.fromJSON(e))),n},toJSON(e){const t={};return void 0!==e.proposalId&&(t.proposalId=(e.proposalId||o.default.UZERO).toString()),void 0!==e.depositor&&(t.depositor=e.depositor),e.amount?t.amount=e.amount.map((e=>e?d.Coin.toJSON(e):void 0)):t.amount=[],t},fromPartial(e){var t,n;const r=Object.assign({},v);return r.proposalId=void 0!==e.proposalId&&null!==e.proposalId?o.default.fromValue(e.proposalId):o.default.UZERO,r.depositor=null!==(t=e.depositor)&&void 0!==t?t:"",r.amount=(null===(n=e.amount)||void 0===n?void 0:n.map((e=>d.Coin.fromPartial(e))))||[],r}};const y={proposalId:o.default.UZERO,status:0};t.Proposal={encode(e,n=i.default.Writer.create()){e.proposalId.isZero()||n.uint32(8).uint64(e.proposalId),void 0!==e.content&&a.Any.encode(e.content,n.uint32(18).fork()).ldelim(),0!==e.status&&n.uint32(24).int32(e.status),void 0!==e.finalTallyResult&&t.TallyResult.encode(e.finalTallyResult,n.uint32(34).fork()).ldelim(),void 0!==e.submitTime&&s.Timestamp.encode(e.submitTime,n.uint32(42).fork()).ldelim(),void 0!==e.depositEndTime&&s.Timestamp.encode(e.depositEndTime,n.uint32(50).fork()).ldelim();for(const t of e.totalDeposit)d.Coin.encode(t,n.uint32(58).fork()).ldelim();return void 0!==e.votingStartTime&&s.Timestamp.encode(e.votingStartTime,n.uint32(66).fork()).ldelim(),void 0!==e.votingEndTime&&s.Timestamp.encode(e.votingEndTime,n.uint32(74).fork()).ldelim(),n},decode(e,n){const r=e instanceof i.default.Reader?e:new i.default.Reader(e);let o=void 0===n?r.len:r.pos+n;const c=Object.assign({},y);for(c.totalDeposit=[];r.pos>>3){case 1:c.proposalId=r.uint64();break;case 2:c.content=a.Any.decode(r,r.uint32());break;case 3:c.status=r.int32();break;case 4:c.finalTallyResult=t.TallyResult.decode(r,r.uint32());break;case 5:c.submitTime=s.Timestamp.decode(r,r.uint32());break;case 6:c.depositEndTime=s.Timestamp.decode(r,r.uint32());break;case 7:c.totalDeposit.push(d.Coin.decode(r,r.uint32()));break;case 8:c.votingStartTime=s.Timestamp.decode(r,r.uint32());break;case 9:c.votingEndTime=s.Timestamp.decode(r,r.uint32());break;default:r.skipType(7&e)}}return c},fromJSON(e){var n;const r=Object.assign({},y);return r.proposalId=void 0!==e.proposalId&&null!==e.proposalId?o.default.fromString(e.proposalId):o.default.UZERO,r.content=void 0!==e.content&&null!==e.content?a.Any.fromJSON(e.content):void 0,r.status=void 0!==e.status&&null!==e.status?h(e.status):0,r.finalTallyResult=void 0!==e.finalTallyResult&&null!==e.finalTallyResult?t.TallyResult.fromJSON(e.finalTallyResult):void 0,r.submitTime=void 0!==e.submitTime&&null!==e.submitTime?P(e.submitTime):void 0,r.depositEndTime=void 0!==e.depositEndTime&&null!==e.depositEndTime?P(e.depositEndTime):void 0,r.totalDeposit=(null!==(n=e.totalDeposit)&&void 0!==n?n:[]).map((e=>d.Coin.fromJSON(e))),r.votingStartTime=void 0!==e.votingStartTime&&null!==e.votingStartTime?P(e.votingStartTime):void 0,r.votingEndTime=void 0!==e.votingEndTime&&null!==e.votingEndTime?P(e.votingEndTime):void 0,r},toJSON(e){const n={};return void 0!==e.proposalId&&(n.proposalId=(e.proposalId||o.default.UZERO).toString()),void 0!==e.content&&(n.content=e.content?a.Any.toJSON(e.content):void 0),void 0!==e.status&&(n.status=g(e.status)),void 0!==e.finalTallyResult&&(n.finalTallyResult=e.finalTallyResult?t.TallyResult.toJSON(e.finalTallyResult):void 0),void 0!==e.submitTime&&(n.submitTime=R(e.submitTime).toISOString()),void 0!==e.depositEndTime&&(n.depositEndTime=R(e.depositEndTime).toISOString()),e.totalDeposit?n.totalDeposit=e.totalDeposit.map((e=>e?d.Coin.toJSON(e):void 0)):n.totalDeposit=[],void 0!==e.votingStartTime&&(n.votingStartTime=R(e.votingStartTime).toISOString()),void 0!==e.votingEndTime&&(n.votingEndTime=R(e.votingEndTime).toISOString()),n},fromPartial(e){var n,r;const i=Object.assign({},y);return i.proposalId=void 0!==e.proposalId&&null!==e.proposalId?o.default.fromValue(e.proposalId):o.default.UZERO,i.content=void 0!==e.content&&null!==e.content?a.Any.fromPartial(e.content):void 0,i.status=null!==(n=e.status)&&void 0!==n?n:0,i.finalTallyResult=void 0!==e.finalTallyResult&&null!==e.finalTallyResult?t.TallyResult.fromPartial(e.finalTallyResult):void 0,i.submitTime=void 0!==e.submitTime&&null!==e.submitTime?s.Timestamp.fromPartial(e.submitTime):void 0,i.depositEndTime=void 0!==e.depositEndTime&&null!==e.depositEndTime?s.Timestamp.fromPartial(e.depositEndTime):void 0,i.totalDeposit=(null===(r=e.totalDeposit)||void 0===r?void 0:r.map((e=>d.Coin.fromPartial(e))))||[],i.votingStartTime=void 0!==e.votingStartTime&&null!==e.votingStartTime?s.Timestamp.fromPartial(e.votingStartTime):void 0,i.votingEndTime=void 0!==e.votingEndTime&&null!==e.votingEndTime?s.Timestamp.fromPartial(e.votingEndTime):void 0,i}};const b={yes:"",abstain:"",no:"",noWithVeto:""};t.TallyResult={encode:(e,t=i.default.Writer.create())=>(""!==e.yes&&t.uint32(10).string(e.yes),""!==e.abstain&&t.uint32(18).string(e.abstain),""!==e.no&&t.uint32(26).string(e.no),""!==e.noWithVeto&&t.uint32(34).string(e.noWithVeto),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},b);for(;n.pos>>3){case 1:o.yes=n.string();break;case 2:o.abstain=n.string();break;case 3:o.no=n.string();break;case 4:o.noWithVeto=n.string();break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},b);return t.yes=void 0!==e.yes&&null!==e.yes?String(e.yes):"",t.abstain=void 0!==e.abstain&&null!==e.abstain?String(e.abstain):"",t.no=void 0!==e.no&&null!==e.no?String(e.no):"",t.noWithVeto=void 0!==e.noWithVeto&&null!==e.noWithVeto?String(e.noWithVeto):"",t},toJSON(e){const t={};return void 0!==e.yes&&(t.yes=e.yes),void 0!==e.abstain&&(t.abstain=e.abstain),void 0!==e.no&&(t.no=e.no),void 0!==e.noWithVeto&&(t.noWithVeto=e.noWithVeto),t},fromPartial(e){var t,n,r,o;const i=Object.assign({},b);return i.yes=null!==(t=e.yes)&&void 0!==t?t:"",i.abstain=null!==(n=e.abstain)&&void 0!==n?n:"",i.no=null!==(r=e.no)&&void 0!==r?r:"",i.noWithVeto=null!==(o=e.noWithVeto)&&void 0!==o?o:"",i}};const I={proposalId:o.default.UZERO,voter:"",option:0};t.Vote={encode(e,n=i.default.Writer.create()){e.proposalId.isZero()||n.uint32(8).uint64(e.proposalId),""!==e.voter&&n.uint32(18).string(e.voter),0!==e.option&&n.uint32(24).int32(e.option);for(const r of e.options)t.WeightedVoteOption.encode(r,n.uint32(34).fork()).ldelim();return n},decode(e,n){const r=e instanceof i.default.Reader?e:new i.default.Reader(e);let o=void 0===n?r.len:r.pos+n;const a=Object.assign({},I);for(a.options=[];r.pos>>3){case 1:a.proposalId=r.uint64();break;case 2:a.voter=r.string();break;case 3:a.option=r.int32();break;case 4:a.options.push(t.WeightedVoteOption.decode(r,r.uint32()));break;default:r.skipType(7&e)}}return a},fromJSON(e){var n;const r=Object.assign({},I);return r.proposalId=void 0!==e.proposalId&&null!==e.proposalId?o.default.fromString(e.proposalId):o.default.UZERO,r.voter=void 0!==e.voter&&null!==e.voter?String(e.voter):"",r.option=void 0!==e.option&&null!==e.option?A(e.option):0,r.options=(null!==(n=e.options)&&void 0!==n?n:[]).map((e=>t.WeightedVoteOption.fromJSON(e))),r},toJSON(e){const n={};return void 0!==e.proposalId&&(n.proposalId=(e.proposalId||o.default.UZERO).toString()),void 0!==e.voter&&(n.voter=e.voter),void 0!==e.option&&(n.option=f(e.option)),e.options?n.options=e.options.map((e=>e?t.WeightedVoteOption.toJSON(e):void 0)):n.options=[],n},fromPartial(e){var n,r,i;const a=Object.assign({},I);return a.proposalId=void 0!==e.proposalId&&null!==e.proposalId?o.default.fromValue(e.proposalId):o.default.UZERO,a.voter=null!==(n=e.voter)&&void 0!==n?n:"",a.option=null!==(r=e.option)&&void 0!==r?r:0,a.options=(null===(i=e.options)||void 0===i?void 0:i.map((e=>t.WeightedVoteOption.fromPartial(e))))||[],a}};const C={};t.DepositParams={encode(e,t=i.default.Writer.create()){for(const n of e.minDeposit)d.Coin.encode(n,t.uint32(10).fork()).ldelim();return void 0!==e.maxDepositPeriod&&c.Duration.encode(e.maxDepositPeriod,t.uint32(18).fork()).ldelim(),t},decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},C);for(o.minDeposit=[];n.pos>>3){case 1:o.minDeposit.push(d.Coin.decode(n,n.uint32()));break;case 2:o.maxDepositPeriod=c.Duration.decode(n,n.uint32());break;default:n.skipType(7&e)}}return o},fromJSON(e){var t;const n=Object.assign({},C);return n.minDeposit=(null!==(t=e.minDeposit)&&void 0!==t?t:[]).map((e=>d.Coin.fromJSON(e))),n.maxDepositPeriod=void 0!==e.maxDepositPeriod&&null!==e.maxDepositPeriod?c.Duration.fromJSON(e.maxDepositPeriod):void 0,n},toJSON(e){const t={};return e.minDeposit?t.minDeposit=e.minDeposit.map((e=>e?d.Coin.toJSON(e):void 0)):t.minDeposit=[],void 0!==e.maxDepositPeriod&&(t.maxDepositPeriod=e.maxDepositPeriod?c.Duration.toJSON(e.maxDepositPeriod):void 0),t},fromPartial(e){var t;const n=Object.assign({},C);return n.minDeposit=(null===(t=e.minDeposit)||void 0===t?void 0:t.map((e=>d.Coin.fromPartial(e))))||[],n.maxDepositPeriod=void 0!==e.maxDepositPeriod&&null!==e.maxDepositPeriod?c.Duration.fromPartial(e.maxDepositPeriod):void 0,n}};const E={};t.VotingParams={encode:(e,t=i.default.Writer.create())=>(void 0!==e.votingPeriod&&c.Duration.encode(e.votingPeriod,t.uint32(10).fork()).ldelim(),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},E);for(;n.pos>>3==1?o.votingPeriod=c.Duration.decode(n,n.uint32()):n.skipType(7&e)}return o},fromJSON(e){const t=Object.assign({},E);return t.votingPeriod=void 0!==e.votingPeriod&&null!==e.votingPeriod?c.Duration.fromJSON(e.votingPeriod):void 0,t},toJSON(e){const t={};return void 0!==e.votingPeriod&&(t.votingPeriod=e.votingPeriod?c.Duration.toJSON(e.votingPeriod):void 0),t},fromPartial(e){const t=Object.assign({},E);return t.votingPeriod=void 0!==e.votingPeriod&&null!==e.votingPeriod?c.Duration.fromPartial(e.votingPeriod):void 0,t}};const w={};t.TallyParams={encode:(e,t=i.default.Writer.create())=>(0!==e.quorum.length&&t.uint32(10).bytes(e.quorum),0!==e.threshold.length&&t.uint32(18).bytes(e.threshold),0!==e.vetoThreshold.length&&t.uint32(26).bytes(e.vetoThreshold),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},w);for(o.quorum=new Uint8Array,o.threshold=new Uint8Array,o.vetoThreshold=new Uint8Array;n.pos>>3){case 1:o.quorum=n.bytes();break;case 2:o.threshold=n.bytes();break;case 3:o.vetoThreshold=n.bytes();break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},w);return t.quorum=void 0!==e.quorum&&null!==e.quorum?S(e.quorum):new Uint8Array,t.threshold=void 0!==e.threshold&&null!==e.threshold?S(e.threshold):new Uint8Array,t.vetoThreshold=void 0!==e.vetoThreshold&&null!==e.vetoThreshold?S(e.vetoThreshold):new Uint8Array,t},toJSON(e){const t={};return void 0!==e.quorum&&(t.quorum=O(void 0!==e.quorum?e.quorum:new Uint8Array)),void 0!==e.threshold&&(t.threshold=O(void 0!==e.threshold?e.threshold:new Uint8Array)),void 0!==e.vetoThreshold&&(t.vetoThreshold=O(void 0!==e.vetoThreshold?e.vetoThreshold:new Uint8Array)),t},fromPartial(e){var t,n,r;const o=Object.assign({},w);return o.quorum=null!==(t=e.quorum)&&void 0!==t?t:new Uint8Array,o.threshold=null!==(n=e.threshold)&&void 0!==n?n:new Uint8Array,o.vetoThreshold=null!==(r=e.vetoThreshold)&&void 0!==r?r:new Uint8Array,o}};var B=(()=>{if(void 0!==B)return B;if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==n.g)return n.g;throw"Unable to locate global object"})();const _=B.atob||(e=>B.Buffer.from(e,"base64").toString("binary"));function S(e){const t=_(e),n=new Uint8Array(t.length);for(let e=0;eB.Buffer.from(e,"binary").toString("base64"));function O(e){const t=[];for(const n of e)t.push(String.fromCharCode(n));return k(t.join(""))}function Q(e){var t;return{seconds:(t=e.getTime()/1e3,o.default.fromNumber(t)),nanos:e.getTime()%1e3*1e6}}function R(e){let t=1e3*e.seconds.toNumber();return t+=e.nanos/1e6,new Date(t)}function P(e){return e instanceof Date?Q(e):"string"==typeof e?Q(new Date(e)):s.Timestamp.fromJSON(e)}i.default.util.Long!==o.default&&(i.default.util.Long=o.default,i.default.configure())},9207:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.QueryClientImpl=t.QueryTallyResultResponse=t.QueryTallyResultRequest=t.QueryDepositsResponse=t.QueryDepositsRequest=t.QueryDepositResponse=t.QueryDepositRequest=t.QueryParamsResponse=t.QueryParamsRequest=t.QueryVotesResponse=t.QueryVotesRequest=t.QueryVoteResponse=t.QueryVoteRequest=t.QueryProposalsResponse=t.QueryProposalsRequest=t.QueryProposalResponse=t.QueryProposalRequest=t.protobufPackage=void 0;const o=r(n(3720)),i=r(n(3789)),a=n(9876),s=n(9551);t.protobufPackage="cosmos.gov.v1beta1";const c={proposalId:o.default.UZERO};t.QueryProposalRequest={encode:(e,t=i.default.Writer.create())=>(e.proposalId.isZero()||t.uint32(8).uint64(e.proposalId),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},c);for(;n.pos>>3==1?o.proposalId=n.uint64():n.skipType(7&e)}return o},fromJSON(e){const t=Object.assign({},c);return t.proposalId=void 0!==e.proposalId&&null!==e.proposalId?o.default.fromString(e.proposalId):o.default.UZERO,t},toJSON(e){const t={};return void 0!==e.proposalId&&(t.proposalId=(e.proposalId||o.default.UZERO).toString()),t},fromPartial(e){const t=Object.assign({},c);return t.proposalId=void 0!==e.proposalId&&null!==e.proposalId?o.default.fromValue(e.proposalId):o.default.UZERO,t}};const d={};t.QueryProposalResponse={encode:(e,t=i.default.Writer.create())=>(void 0!==e.proposal&&a.Proposal.encode(e.proposal,t.uint32(10).fork()).ldelim(),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},d);for(;n.pos>>3==1?o.proposal=a.Proposal.decode(n,n.uint32()):n.skipType(7&e)}return o},fromJSON(e){const t=Object.assign({},d);return t.proposal=void 0!==e.proposal&&null!==e.proposal?a.Proposal.fromJSON(e.proposal):void 0,t},toJSON(e){const t={};return void 0!==e.proposal&&(t.proposal=e.proposal?a.Proposal.toJSON(e.proposal):void 0),t},fromPartial(e){const t=Object.assign({},d);return t.proposal=void 0!==e.proposal&&null!==e.proposal?a.Proposal.fromPartial(e.proposal):void 0,t}};const u={proposalStatus:0,voter:"",depositor:""};t.QueryProposalsRequest={encode:(e,t=i.default.Writer.create())=>(0!==e.proposalStatus&&t.uint32(8).int32(e.proposalStatus),""!==e.voter&&t.uint32(18).string(e.voter),""!==e.depositor&&t.uint32(26).string(e.depositor),void 0!==e.pagination&&s.PageRequest.encode(e.pagination,t.uint32(34).fork()).ldelim(),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},u);for(;n.pos>>3){case 1:o.proposalStatus=n.int32();break;case 2:o.voter=n.string();break;case 3:o.depositor=n.string();break;case 4:o.pagination=s.PageRequest.decode(n,n.uint32());break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},u);return t.proposalStatus=void 0!==e.proposalStatus&&null!==e.proposalStatus?a.proposalStatusFromJSON(e.proposalStatus):0,t.voter=void 0!==e.voter&&null!==e.voter?String(e.voter):"",t.depositor=void 0!==e.depositor&&null!==e.depositor?String(e.depositor):"",t.pagination=void 0!==e.pagination&&null!==e.pagination?s.PageRequest.fromJSON(e.pagination):void 0,t},toJSON(e){const t={};return void 0!==e.proposalStatus&&(t.proposalStatus=a.proposalStatusToJSON(e.proposalStatus)),void 0!==e.voter&&(t.voter=e.voter),void 0!==e.depositor&&(t.depositor=e.depositor),void 0!==e.pagination&&(t.pagination=e.pagination?s.PageRequest.toJSON(e.pagination):void 0),t},fromPartial(e){var t,n,r;const o=Object.assign({},u);return o.proposalStatus=null!==(t=e.proposalStatus)&&void 0!==t?t:0,o.voter=null!==(n=e.voter)&&void 0!==n?n:"",o.depositor=null!==(r=e.depositor)&&void 0!==r?r:"",o.pagination=void 0!==e.pagination&&null!==e.pagination?s.PageRequest.fromPartial(e.pagination):void 0,o}};const l={};t.QueryProposalsResponse={encode(e,t=i.default.Writer.create()){for(const n of e.proposals)a.Proposal.encode(n,t.uint32(10).fork()).ldelim();return void 0!==e.pagination&&s.PageResponse.encode(e.pagination,t.uint32(18).fork()).ldelim(),t},decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},l);for(o.proposals=[];n.pos>>3){case 1:o.proposals.push(a.Proposal.decode(n,n.uint32()));break;case 2:o.pagination=s.PageResponse.decode(n,n.uint32());break;default:n.skipType(7&e)}}return o},fromJSON(e){var t;const n=Object.assign({},l);return n.proposals=(null!==(t=e.proposals)&&void 0!==t?t:[]).map((e=>a.Proposal.fromJSON(e))),n.pagination=void 0!==e.pagination&&null!==e.pagination?s.PageResponse.fromJSON(e.pagination):void 0,n},toJSON(e){const t={};return e.proposals?t.proposals=e.proposals.map((e=>e?a.Proposal.toJSON(e):void 0)):t.proposals=[],void 0!==e.pagination&&(t.pagination=e.pagination?s.PageResponse.toJSON(e.pagination):void 0),t},fromPartial(e){var t;const n=Object.assign({},l);return n.proposals=(null===(t=e.proposals)||void 0===t?void 0:t.map((e=>a.Proposal.fromPartial(e))))||[],n.pagination=void 0!==e.pagination&&null!==e.pagination?s.PageResponse.fromPartial(e.pagination):void 0,n}};const A={proposalId:o.default.UZERO,voter:""};t.QueryVoteRequest={encode:(e,t=i.default.Writer.create())=>(e.proposalId.isZero()||t.uint32(8).uint64(e.proposalId),""!==e.voter&&t.uint32(18).string(e.voter),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},A);for(;n.pos>>3){case 1:o.proposalId=n.uint64();break;case 2:o.voter=n.string();break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},A);return t.proposalId=void 0!==e.proposalId&&null!==e.proposalId?o.default.fromString(e.proposalId):o.default.UZERO,t.voter=void 0!==e.voter&&null!==e.voter?String(e.voter):"",t},toJSON(e){const t={};return void 0!==e.proposalId&&(t.proposalId=(e.proposalId||o.default.UZERO).toString()),void 0!==e.voter&&(t.voter=e.voter),t},fromPartial(e){var t;const n=Object.assign({},A);return n.proposalId=void 0!==e.proposalId&&null!==e.proposalId?o.default.fromValue(e.proposalId):o.default.UZERO,n.voter=null!==(t=e.voter)&&void 0!==t?t:"",n}};const f={};t.QueryVoteResponse={encode:(e,t=i.default.Writer.create())=>(void 0!==e.vote&&a.Vote.encode(e.vote,t.uint32(10).fork()).ldelim(),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},f);for(;n.pos>>3==1?o.vote=a.Vote.decode(n,n.uint32()):n.skipType(7&e)}return o},fromJSON(e){const t=Object.assign({},f);return t.vote=void 0!==e.vote&&null!==e.vote?a.Vote.fromJSON(e.vote):void 0,t},toJSON(e){const t={};return void 0!==e.vote&&(t.vote=e.vote?a.Vote.toJSON(e.vote):void 0),t},fromPartial(e){const t=Object.assign({},f);return t.vote=void 0!==e.vote&&null!==e.vote?a.Vote.fromPartial(e.vote):void 0,t}};const h={proposalId:o.default.UZERO};t.QueryVotesRequest={encode:(e,t=i.default.Writer.create())=>(e.proposalId.isZero()||t.uint32(8).uint64(e.proposalId),void 0!==e.pagination&&s.PageRequest.encode(e.pagination,t.uint32(18).fork()).ldelim(),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},h);for(;n.pos>>3){case 1:o.proposalId=n.uint64();break;case 2:o.pagination=s.PageRequest.decode(n,n.uint32());break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},h);return t.proposalId=void 0!==e.proposalId&&null!==e.proposalId?o.default.fromString(e.proposalId):o.default.UZERO,t.pagination=void 0!==e.pagination&&null!==e.pagination?s.PageRequest.fromJSON(e.pagination):void 0,t},toJSON(e){const t={};return void 0!==e.proposalId&&(t.proposalId=(e.proposalId||o.default.UZERO).toString()),void 0!==e.pagination&&(t.pagination=e.pagination?s.PageRequest.toJSON(e.pagination):void 0),t},fromPartial(e){const t=Object.assign({},h);return t.proposalId=void 0!==e.proposalId&&null!==e.proposalId?o.default.fromValue(e.proposalId):o.default.UZERO,t.pagination=void 0!==e.pagination&&null!==e.pagination?s.PageRequest.fromPartial(e.pagination):void 0,t}};const g={};t.QueryVotesResponse={encode(e,t=i.default.Writer.create()){for(const n of e.votes)a.Vote.encode(n,t.uint32(10).fork()).ldelim();return void 0!==e.pagination&&s.PageResponse.encode(e.pagination,t.uint32(18).fork()).ldelim(),t},decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},g);for(o.votes=[];n.pos>>3){case 1:o.votes.push(a.Vote.decode(n,n.uint32()));break;case 2:o.pagination=s.PageResponse.decode(n,n.uint32());break;default:n.skipType(7&e)}}return o},fromJSON(e){var t;const n=Object.assign({},g);return n.votes=(null!==(t=e.votes)&&void 0!==t?t:[]).map((e=>a.Vote.fromJSON(e))),n.pagination=void 0!==e.pagination&&null!==e.pagination?s.PageResponse.fromJSON(e.pagination):void 0,n},toJSON(e){const t={};return e.votes?t.votes=e.votes.map((e=>e?a.Vote.toJSON(e):void 0)):t.votes=[],void 0!==e.pagination&&(t.pagination=e.pagination?s.PageResponse.toJSON(e.pagination):void 0),t},fromPartial(e){var t;const n=Object.assign({},g);return n.votes=(null===(t=e.votes)||void 0===t?void 0:t.map((e=>a.Vote.fromPartial(e))))||[],n.pagination=void 0!==e.pagination&&null!==e.pagination?s.PageResponse.fromPartial(e.pagination):void 0,n}};const p={paramsType:""};t.QueryParamsRequest={encode:(e,t=i.default.Writer.create())=>(""!==e.paramsType&&t.uint32(10).string(e.paramsType),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},p);for(;n.pos>>3==1?o.paramsType=n.string():n.skipType(7&e)}return o},fromJSON(e){const t=Object.assign({},p);return t.paramsType=void 0!==e.paramsType&&null!==e.paramsType?String(e.paramsType):"",t},toJSON(e){const t={};return void 0!==e.paramsType&&(t.paramsType=e.paramsType),t},fromPartial(e){var t;const n=Object.assign({},p);return n.paramsType=null!==(t=e.paramsType)&&void 0!==t?t:"",n}};const m={};t.QueryParamsResponse={encode:(e,t=i.default.Writer.create())=>(void 0!==e.votingParams&&a.VotingParams.encode(e.votingParams,t.uint32(10).fork()).ldelim(),void 0!==e.depositParams&&a.DepositParams.encode(e.depositParams,t.uint32(18).fork()).ldelim(),void 0!==e.tallyParams&&a.TallyParams.encode(e.tallyParams,t.uint32(26).fork()).ldelim(),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},m);for(;n.pos>>3){case 1:o.votingParams=a.VotingParams.decode(n,n.uint32());break;case 2:o.depositParams=a.DepositParams.decode(n,n.uint32());break;case 3:o.tallyParams=a.TallyParams.decode(n,n.uint32());break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},m);return t.votingParams=void 0!==e.votingParams&&null!==e.votingParams?a.VotingParams.fromJSON(e.votingParams):void 0,t.depositParams=void 0!==e.depositParams&&null!==e.depositParams?a.DepositParams.fromJSON(e.depositParams):void 0,t.tallyParams=void 0!==e.tallyParams&&null!==e.tallyParams?a.TallyParams.fromJSON(e.tallyParams):void 0,t},toJSON(e){const t={};return void 0!==e.votingParams&&(t.votingParams=e.votingParams?a.VotingParams.toJSON(e.votingParams):void 0),void 0!==e.depositParams&&(t.depositParams=e.depositParams?a.DepositParams.toJSON(e.depositParams):void 0),void 0!==e.tallyParams&&(t.tallyParams=e.tallyParams?a.TallyParams.toJSON(e.tallyParams):void 0),t},fromPartial(e){const t=Object.assign({},m);return t.votingParams=void 0!==e.votingParams&&null!==e.votingParams?a.VotingParams.fromPartial(e.votingParams):void 0,t.depositParams=void 0!==e.depositParams&&null!==e.depositParams?a.DepositParams.fromPartial(e.depositParams):void 0,t.tallyParams=void 0!==e.tallyParams&&null!==e.tallyParams?a.TallyParams.fromPartial(e.tallyParams):void 0,t}};const v={proposalId:o.default.UZERO,depositor:""};t.QueryDepositRequest={encode:(e,t=i.default.Writer.create())=>(e.proposalId.isZero()||t.uint32(8).uint64(e.proposalId),""!==e.depositor&&t.uint32(18).string(e.depositor),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},v);for(;n.pos>>3){case 1:o.proposalId=n.uint64();break;case 2:o.depositor=n.string();break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},v);return t.proposalId=void 0!==e.proposalId&&null!==e.proposalId?o.default.fromString(e.proposalId):o.default.UZERO,t.depositor=void 0!==e.depositor&&null!==e.depositor?String(e.depositor):"",t},toJSON(e){const t={};return void 0!==e.proposalId&&(t.proposalId=(e.proposalId||o.default.UZERO).toString()),void 0!==e.depositor&&(t.depositor=e.depositor),t},fromPartial(e){var t;const n=Object.assign({},v);return n.proposalId=void 0!==e.proposalId&&null!==e.proposalId?o.default.fromValue(e.proposalId):o.default.UZERO,n.depositor=null!==(t=e.depositor)&&void 0!==t?t:"",n}};const y={};t.QueryDepositResponse={encode:(e,t=i.default.Writer.create())=>(void 0!==e.deposit&&a.Deposit.encode(e.deposit,t.uint32(10).fork()).ldelim(),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},y);for(;n.pos>>3==1?o.deposit=a.Deposit.decode(n,n.uint32()):n.skipType(7&e)}return o},fromJSON(e){const t=Object.assign({},y);return t.deposit=void 0!==e.deposit&&null!==e.deposit?a.Deposit.fromJSON(e.deposit):void 0,t},toJSON(e){const t={};return void 0!==e.deposit&&(t.deposit=e.deposit?a.Deposit.toJSON(e.deposit):void 0),t},fromPartial(e){const t=Object.assign({},y);return t.deposit=void 0!==e.deposit&&null!==e.deposit?a.Deposit.fromPartial(e.deposit):void 0,t}};const b={proposalId:o.default.UZERO};t.QueryDepositsRequest={encode:(e,t=i.default.Writer.create())=>(e.proposalId.isZero()||t.uint32(8).uint64(e.proposalId),void 0!==e.pagination&&s.PageRequest.encode(e.pagination,t.uint32(18).fork()).ldelim(),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},b);for(;n.pos>>3){case 1:o.proposalId=n.uint64();break;case 2:o.pagination=s.PageRequest.decode(n,n.uint32());break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},b);return t.proposalId=void 0!==e.proposalId&&null!==e.proposalId?o.default.fromString(e.proposalId):o.default.UZERO,t.pagination=void 0!==e.pagination&&null!==e.pagination?s.PageRequest.fromJSON(e.pagination):void 0,t},toJSON(e){const t={};return void 0!==e.proposalId&&(t.proposalId=(e.proposalId||o.default.UZERO).toString()),void 0!==e.pagination&&(t.pagination=e.pagination?s.PageRequest.toJSON(e.pagination):void 0),t},fromPartial(e){const t=Object.assign({},b);return t.proposalId=void 0!==e.proposalId&&null!==e.proposalId?o.default.fromValue(e.proposalId):o.default.UZERO,t.pagination=void 0!==e.pagination&&null!==e.pagination?s.PageRequest.fromPartial(e.pagination):void 0,t}};const I={};t.QueryDepositsResponse={encode(e,t=i.default.Writer.create()){for(const n of e.deposits)a.Deposit.encode(n,t.uint32(10).fork()).ldelim();return void 0!==e.pagination&&s.PageResponse.encode(e.pagination,t.uint32(18).fork()).ldelim(),t},decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},I);for(o.deposits=[];n.pos>>3){case 1:o.deposits.push(a.Deposit.decode(n,n.uint32()));break;case 2:o.pagination=s.PageResponse.decode(n,n.uint32());break;default:n.skipType(7&e)}}return o},fromJSON(e){var t;const n=Object.assign({},I);return n.deposits=(null!==(t=e.deposits)&&void 0!==t?t:[]).map((e=>a.Deposit.fromJSON(e))),n.pagination=void 0!==e.pagination&&null!==e.pagination?s.PageResponse.fromJSON(e.pagination):void 0,n},toJSON(e){const t={};return e.deposits?t.deposits=e.deposits.map((e=>e?a.Deposit.toJSON(e):void 0)):t.deposits=[],void 0!==e.pagination&&(t.pagination=e.pagination?s.PageResponse.toJSON(e.pagination):void 0),t},fromPartial(e){var t;const n=Object.assign({},I);return n.deposits=(null===(t=e.deposits)||void 0===t?void 0:t.map((e=>a.Deposit.fromPartial(e))))||[],n.pagination=void 0!==e.pagination&&null!==e.pagination?s.PageResponse.fromPartial(e.pagination):void 0,n}};const C={proposalId:o.default.UZERO};t.QueryTallyResultRequest={encode:(e,t=i.default.Writer.create())=>(e.proposalId.isZero()||t.uint32(8).uint64(e.proposalId),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},C);for(;n.pos>>3==1?o.proposalId=n.uint64():n.skipType(7&e)}return o},fromJSON(e){const t=Object.assign({},C);return t.proposalId=void 0!==e.proposalId&&null!==e.proposalId?o.default.fromString(e.proposalId):o.default.UZERO,t},toJSON(e){const t={};return void 0!==e.proposalId&&(t.proposalId=(e.proposalId||o.default.UZERO).toString()),t},fromPartial(e){const t=Object.assign({},C);return t.proposalId=void 0!==e.proposalId&&null!==e.proposalId?o.default.fromValue(e.proposalId):o.default.UZERO,t}};const E={};t.QueryTallyResultResponse={encode:(e,t=i.default.Writer.create())=>(void 0!==e.tally&&a.TallyResult.encode(e.tally,t.uint32(10).fork()).ldelim(),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},E);for(;n.pos>>3==1?o.tally=a.TallyResult.decode(n,n.uint32()):n.skipType(7&e)}return o},fromJSON(e){const t=Object.assign({},E);return t.tally=void 0!==e.tally&&null!==e.tally?a.TallyResult.fromJSON(e.tally):void 0,t},toJSON(e){const t={};return void 0!==e.tally&&(t.tally=e.tally?a.TallyResult.toJSON(e.tally):void 0),t},fromPartial(e){const t=Object.assign({},E);return t.tally=void 0!==e.tally&&null!==e.tally?a.TallyResult.fromPartial(e.tally):void 0,t}},t.QueryClientImpl=class{constructor(e){this.rpc=e,this.Proposal=this.Proposal.bind(this),this.Proposals=this.Proposals.bind(this),this.Vote=this.Vote.bind(this),this.Votes=this.Votes.bind(this),this.Params=this.Params.bind(this),this.Deposit=this.Deposit.bind(this),this.Deposits=this.Deposits.bind(this),this.TallyResult=this.TallyResult.bind(this)}Proposal(e){const n=t.QueryProposalRequest.encode(e).finish();return this.rpc.request("cosmos.gov.v1beta1.Query","Proposal",n).then((e=>t.QueryProposalResponse.decode(new i.default.Reader(e))))}Proposals(e){const n=t.QueryProposalsRequest.encode(e).finish();return this.rpc.request("cosmos.gov.v1beta1.Query","Proposals",n).then((e=>t.QueryProposalsResponse.decode(new i.default.Reader(e))))}Vote(e){const n=t.QueryVoteRequest.encode(e).finish();return this.rpc.request("cosmos.gov.v1beta1.Query","Vote",n).then((e=>t.QueryVoteResponse.decode(new i.default.Reader(e))))}Votes(e){const n=t.QueryVotesRequest.encode(e).finish();return this.rpc.request("cosmos.gov.v1beta1.Query","Votes",n).then((e=>t.QueryVotesResponse.decode(new i.default.Reader(e))))}Params(e){const n=t.QueryParamsRequest.encode(e).finish();return this.rpc.request("cosmos.gov.v1beta1.Query","Params",n).then((e=>t.QueryParamsResponse.decode(new i.default.Reader(e))))}Deposit(e){const n=t.QueryDepositRequest.encode(e).finish();return this.rpc.request("cosmos.gov.v1beta1.Query","Deposit",n).then((e=>t.QueryDepositResponse.decode(new i.default.Reader(e))))}Deposits(e){const n=t.QueryDepositsRequest.encode(e).finish();return this.rpc.request("cosmos.gov.v1beta1.Query","Deposits",n).then((e=>t.QueryDepositsResponse.decode(new i.default.Reader(e))))}TallyResult(e){const n=t.QueryTallyResultRequest.encode(e).finish();return this.rpc.request("cosmos.gov.v1beta1.Query","TallyResult",n).then((e=>t.QueryTallyResultResponse.decode(new i.default.Reader(e))))}},i.default.util.Long!==o.default&&(i.default.util.Long=o.default,i.default.configure())},750:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.MsgClientImpl=t.MsgDepositResponse=t.MsgDeposit=t.MsgVoteWeightedResponse=t.MsgVoteWeighted=t.MsgVoteResponse=t.MsgVote=t.MsgSubmitProposalResponse=t.MsgSubmitProposal=t.protobufPackage=void 0;const o=r(n(3720)),i=r(n(3789)),a=n(3862),s=n(9876),c=n(891);t.protobufPackage="cosmos.gov.v1beta1";const d={proposer:""};t.MsgSubmitProposal={encode(e,t=i.default.Writer.create()){void 0!==e.content&&a.Any.encode(e.content,t.uint32(10).fork()).ldelim();for(const n of e.initialDeposit)c.Coin.encode(n,t.uint32(18).fork()).ldelim();return""!==e.proposer&&t.uint32(26).string(e.proposer),t},decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},d);for(o.initialDeposit=[];n.pos>>3){case 1:o.content=a.Any.decode(n,n.uint32());break;case 2:o.initialDeposit.push(c.Coin.decode(n,n.uint32()));break;case 3:o.proposer=n.string();break;default:n.skipType(7&e)}}return o},fromJSON(e){var t;const n=Object.assign({},d);return n.content=void 0!==e.content&&null!==e.content?a.Any.fromJSON(e.content):void 0,n.initialDeposit=(null!==(t=e.initialDeposit)&&void 0!==t?t:[]).map((e=>c.Coin.fromJSON(e))),n.proposer=void 0!==e.proposer&&null!==e.proposer?String(e.proposer):"",n},toJSON(e){const t={};return void 0!==e.content&&(t.content=e.content?a.Any.toJSON(e.content):void 0),e.initialDeposit?t.initialDeposit=e.initialDeposit.map((e=>e?c.Coin.toJSON(e):void 0)):t.initialDeposit=[],void 0!==e.proposer&&(t.proposer=e.proposer),t},fromPartial(e){var t,n;const r=Object.assign({},d);return r.content=void 0!==e.content&&null!==e.content?a.Any.fromPartial(e.content):void 0,r.initialDeposit=(null===(t=e.initialDeposit)||void 0===t?void 0:t.map((e=>c.Coin.fromPartial(e))))||[],r.proposer=null!==(n=e.proposer)&&void 0!==n?n:"",r}};const u={proposalId:o.default.UZERO};t.MsgSubmitProposalResponse={encode:(e,t=i.default.Writer.create())=>(e.proposalId.isZero()||t.uint32(8).uint64(e.proposalId),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},u);for(;n.pos>>3==1?o.proposalId=n.uint64():n.skipType(7&e)}return o},fromJSON(e){const t=Object.assign({},u);return t.proposalId=void 0!==e.proposalId&&null!==e.proposalId?o.default.fromString(e.proposalId):o.default.UZERO,t},toJSON(e){const t={};return void 0!==e.proposalId&&(t.proposalId=(e.proposalId||o.default.UZERO).toString()),t},fromPartial(e){const t=Object.assign({},u);return t.proposalId=void 0!==e.proposalId&&null!==e.proposalId?o.default.fromValue(e.proposalId):o.default.UZERO,t}};const l={proposalId:o.default.UZERO,voter:"",option:0};t.MsgVote={encode:(e,t=i.default.Writer.create())=>(e.proposalId.isZero()||t.uint32(8).uint64(e.proposalId),""!==e.voter&&t.uint32(18).string(e.voter),0!==e.option&&t.uint32(24).int32(e.option),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},l);for(;n.pos>>3){case 1:o.proposalId=n.uint64();break;case 2:o.voter=n.string();break;case 3:o.option=n.int32();break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},l);return t.proposalId=void 0!==e.proposalId&&null!==e.proposalId?o.default.fromString(e.proposalId):o.default.UZERO,t.voter=void 0!==e.voter&&null!==e.voter?String(e.voter):"",t.option=void 0!==e.option&&null!==e.option?s.voteOptionFromJSON(e.option):0,t},toJSON(e){const t={};return void 0!==e.proposalId&&(t.proposalId=(e.proposalId||o.default.UZERO).toString()),void 0!==e.voter&&(t.voter=e.voter),void 0!==e.option&&(t.option=s.voteOptionToJSON(e.option)),t},fromPartial(e){var t,n;const r=Object.assign({},l);return r.proposalId=void 0!==e.proposalId&&null!==e.proposalId?o.default.fromValue(e.proposalId):o.default.UZERO,r.voter=null!==(t=e.voter)&&void 0!==t?t:"",r.option=null!==(n=e.option)&&void 0!==n?n:0,r}};const A={};t.MsgVoteResponse={encode:(e,t=i.default.Writer.create())=>t,decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},A);for(;n.posObject.assign({},A),toJSON:e=>({}),fromPartial:e=>Object.assign({},A)};const f={proposalId:o.default.UZERO,voter:""};t.MsgVoteWeighted={encode(e,t=i.default.Writer.create()){e.proposalId.isZero()||t.uint32(8).uint64(e.proposalId),""!==e.voter&&t.uint32(18).string(e.voter);for(const n of e.options)s.WeightedVoteOption.encode(n,t.uint32(26).fork()).ldelim();return t},decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},f);for(o.options=[];n.pos>>3){case 1:o.proposalId=n.uint64();break;case 2:o.voter=n.string();break;case 3:o.options.push(s.WeightedVoteOption.decode(n,n.uint32()));break;default:n.skipType(7&e)}}return o},fromJSON(e){var t;const n=Object.assign({},f);return n.proposalId=void 0!==e.proposalId&&null!==e.proposalId?o.default.fromString(e.proposalId):o.default.UZERO,n.voter=void 0!==e.voter&&null!==e.voter?String(e.voter):"",n.options=(null!==(t=e.options)&&void 0!==t?t:[]).map((e=>s.WeightedVoteOption.fromJSON(e))),n},toJSON(e){const t={};return void 0!==e.proposalId&&(t.proposalId=(e.proposalId||o.default.UZERO).toString()),void 0!==e.voter&&(t.voter=e.voter),e.options?t.options=e.options.map((e=>e?s.WeightedVoteOption.toJSON(e):void 0)):t.options=[],t},fromPartial(e){var t,n;const r=Object.assign({},f);return r.proposalId=void 0!==e.proposalId&&null!==e.proposalId?o.default.fromValue(e.proposalId):o.default.UZERO,r.voter=null!==(t=e.voter)&&void 0!==t?t:"",r.options=(null===(n=e.options)||void 0===n?void 0:n.map((e=>s.WeightedVoteOption.fromPartial(e))))||[],r}};const h={};t.MsgVoteWeightedResponse={encode:(e,t=i.default.Writer.create())=>t,decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},h);for(;n.posObject.assign({},h),toJSON:e=>({}),fromPartial:e=>Object.assign({},h)};const g={proposalId:o.default.UZERO,depositor:""};t.MsgDeposit={encode(e,t=i.default.Writer.create()){e.proposalId.isZero()||t.uint32(8).uint64(e.proposalId),""!==e.depositor&&t.uint32(18).string(e.depositor);for(const n of e.amount)c.Coin.encode(n,t.uint32(26).fork()).ldelim();return t},decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},g);for(o.amount=[];n.pos>>3){case 1:o.proposalId=n.uint64();break;case 2:o.depositor=n.string();break;case 3:o.amount.push(c.Coin.decode(n,n.uint32()));break;default:n.skipType(7&e)}}return o},fromJSON(e){var t;const n=Object.assign({},g);return n.proposalId=void 0!==e.proposalId&&null!==e.proposalId?o.default.fromString(e.proposalId):o.default.UZERO,n.depositor=void 0!==e.depositor&&null!==e.depositor?String(e.depositor):"",n.amount=(null!==(t=e.amount)&&void 0!==t?t:[]).map((e=>c.Coin.fromJSON(e))),n},toJSON(e){const t={};return void 0!==e.proposalId&&(t.proposalId=(e.proposalId||o.default.UZERO).toString()),void 0!==e.depositor&&(t.depositor=e.depositor),e.amount?t.amount=e.amount.map((e=>e?c.Coin.toJSON(e):void 0)):t.amount=[],t},fromPartial(e){var t,n;const r=Object.assign({},g);return r.proposalId=void 0!==e.proposalId&&null!==e.proposalId?o.default.fromValue(e.proposalId):o.default.UZERO,r.depositor=null!==(t=e.depositor)&&void 0!==t?t:"",r.amount=(null===(n=e.amount)||void 0===n?void 0:n.map((e=>c.Coin.fromPartial(e))))||[],r}};const p={};t.MsgDepositResponse={encode:(e,t=i.default.Writer.create())=>t,decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},p);for(;n.posObject.assign({},p),toJSON:e=>({}),fromPartial:e=>Object.assign({},p)},t.MsgClientImpl=class{constructor(e){this.rpc=e,this.SubmitProposal=this.SubmitProposal.bind(this),this.Vote=this.Vote.bind(this),this.VoteWeighted=this.VoteWeighted.bind(this),this.Deposit=this.Deposit.bind(this)}SubmitProposal(e){const n=t.MsgSubmitProposal.encode(e).finish();return this.rpc.request("cosmos.gov.v1beta1.Msg","SubmitProposal",n).then((e=>t.MsgSubmitProposalResponse.decode(new i.default.Reader(e))))}Vote(e){const n=t.MsgVote.encode(e).finish();return this.rpc.request("cosmos.gov.v1beta1.Msg","Vote",n).then((e=>t.MsgVoteResponse.decode(new i.default.Reader(e))))}VoteWeighted(e){const n=t.MsgVoteWeighted.encode(e).finish();return this.rpc.request("cosmos.gov.v1beta1.Msg","VoteWeighted",n).then((e=>t.MsgVoteWeightedResponse.decode(new i.default.Reader(e))))}Deposit(e){const n=t.MsgDeposit.encode(e).finish();return this.rpc.request("cosmos.gov.v1beta1.Msg","Deposit",n).then((e=>t.MsgDepositResponse.decode(new i.default.Reader(e))))}},i.default.util.Long!==o.default&&(i.default.util.Long=o.default,i.default.configure())},4638:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Params=t.Minter=t.protobufPackage=void 0;const o=r(n(3720)),i=r(n(3789));t.protobufPackage="cosmos.mint.v1beta1";const a={inflation:"",annualProvisions:""};t.Minter={encode:(e,t=i.default.Writer.create())=>(""!==e.inflation&&t.uint32(10).string(e.inflation),""!==e.annualProvisions&&t.uint32(18).string(e.annualProvisions),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},a);for(;n.pos>>3){case 1:o.inflation=n.string();break;case 2:o.annualProvisions=n.string();break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},a);return t.inflation=void 0!==e.inflation&&null!==e.inflation?String(e.inflation):"",t.annualProvisions=void 0!==e.annualProvisions&&null!==e.annualProvisions?String(e.annualProvisions):"",t},toJSON(e){const t={};return void 0!==e.inflation&&(t.inflation=e.inflation),void 0!==e.annualProvisions&&(t.annualProvisions=e.annualProvisions),t},fromPartial(e){var t,n;const r=Object.assign({},a);return r.inflation=null!==(t=e.inflation)&&void 0!==t?t:"",r.annualProvisions=null!==(n=e.annualProvisions)&&void 0!==n?n:"",r}};const s={mintDenom:"",inflationRateChange:"",inflationMax:"",inflationMin:"",goalBonded:"",blocksPerYear:o.default.UZERO};t.Params={encode:(e,t=i.default.Writer.create())=>(""!==e.mintDenom&&t.uint32(10).string(e.mintDenom),""!==e.inflationRateChange&&t.uint32(18).string(e.inflationRateChange),""!==e.inflationMax&&t.uint32(26).string(e.inflationMax),""!==e.inflationMin&&t.uint32(34).string(e.inflationMin),""!==e.goalBonded&&t.uint32(42).string(e.goalBonded),e.blocksPerYear.isZero()||t.uint32(48).uint64(e.blocksPerYear),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},s);for(;n.pos>>3){case 1:o.mintDenom=n.string();break;case 2:o.inflationRateChange=n.string();break;case 3:o.inflationMax=n.string();break;case 4:o.inflationMin=n.string();break;case 5:o.goalBonded=n.string();break;case 6:o.blocksPerYear=n.uint64();break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},s);return t.mintDenom=void 0!==e.mintDenom&&null!==e.mintDenom?String(e.mintDenom):"",t.inflationRateChange=void 0!==e.inflationRateChange&&null!==e.inflationRateChange?String(e.inflationRateChange):"",t.inflationMax=void 0!==e.inflationMax&&null!==e.inflationMax?String(e.inflationMax):"",t.inflationMin=void 0!==e.inflationMin&&null!==e.inflationMin?String(e.inflationMin):"",t.goalBonded=void 0!==e.goalBonded&&null!==e.goalBonded?String(e.goalBonded):"",t.blocksPerYear=void 0!==e.blocksPerYear&&null!==e.blocksPerYear?o.default.fromString(e.blocksPerYear):o.default.UZERO,t},toJSON(e){const t={};return void 0!==e.mintDenom&&(t.mintDenom=e.mintDenom),void 0!==e.inflationRateChange&&(t.inflationRateChange=e.inflationRateChange),void 0!==e.inflationMax&&(t.inflationMax=e.inflationMax),void 0!==e.inflationMin&&(t.inflationMin=e.inflationMin),void 0!==e.goalBonded&&(t.goalBonded=e.goalBonded),void 0!==e.blocksPerYear&&(t.blocksPerYear=(e.blocksPerYear||o.default.UZERO).toString()),t},fromPartial(e){var t,n,r,i,a;const c=Object.assign({},s);return c.mintDenom=null!==(t=e.mintDenom)&&void 0!==t?t:"",c.inflationRateChange=null!==(n=e.inflationRateChange)&&void 0!==n?n:"",c.inflationMax=null!==(r=e.inflationMax)&&void 0!==r?r:"",c.inflationMin=null!==(i=e.inflationMin)&&void 0!==i?i:"",c.goalBonded=null!==(a=e.goalBonded)&&void 0!==a?a:"",c.blocksPerYear=void 0!==e.blocksPerYear&&null!==e.blocksPerYear?o.default.fromValue(e.blocksPerYear):o.default.UZERO,c}},i.default.util.Long!==o.default&&(i.default.util.Long=o.default,i.default.configure())},2879:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.QueryClientImpl=t.QueryAnnualProvisionsResponse=t.QueryAnnualProvisionsRequest=t.QueryInflationResponse=t.QueryInflationRequest=t.QueryParamsResponse=t.QueryParamsRequest=t.protobufPackage=void 0;const o=r(n(3720)),i=r(n(3789)),a=n(4638);t.protobufPackage="cosmos.mint.v1beta1";const s={};t.QueryParamsRequest={encode:(e,t=i.default.Writer.create())=>t,decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},s);for(;n.posObject.assign({},s),toJSON:e=>({}),fromPartial:e=>Object.assign({},s)};const c={};t.QueryParamsResponse={encode:(e,t=i.default.Writer.create())=>(void 0!==e.params&&a.Params.encode(e.params,t.uint32(10).fork()).ldelim(),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},c);for(;n.pos>>3==1?o.params=a.Params.decode(n,n.uint32()):n.skipType(7&e)}return o},fromJSON(e){const t=Object.assign({},c);return t.params=void 0!==e.params&&null!==e.params?a.Params.fromJSON(e.params):void 0,t},toJSON(e){const t={};return void 0!==e.params&&(t.params=e.params?a.Params.toJSON(e.params):void 0),t},fromPartial(e){const t=Object.assign({},c);return t.params=void 0!==e.params&&null!==e.params?a.Params.fromPartial(e.params):void 0,t}};const d={};t.QueryInflationRequest={encode:(e,t=i.default.Writer.create())=>t,decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},d);for(;n.posObject.assign({},d),toJSON:e=>({}),fromPartial:e=>Object.assign({},d)};const u={};t.QueryInflationResponse={encode:(e,t=i.default.Writer.create())=>(0!==e.inflation.length&&t.uint32(10).bytes(e.inflation),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},u);for(o.inflation=new Uint8Array;n.pos>>3==1?o.inflation=n.bytes():n.skipType(7&e)}return o},fromJSON(e){const t=Object.assign({},u);return t.inflation=void 0!==e.inflation&&null!==e.inflation?g(e.inflation):new Uint8Array,t},toJSON(e){const t={};return void 0!==e.inflation&&(t.inflation=m(void 0!==e.inflation?e.inflation:new Uint8Array)),t},fromPartial(e){var t;const n=Object.assign({},u);return n.inflation=null!==(t=e.inflation)&&void 0!==t?t:new Uint8Array,n}};const l={};t.QueryAnnualProvisionsRequest={encode:(e,t=i.default.Writer.create())=>t,decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},l);for(;n.posObject.assign({},l),toJSON:e=>({}),fromPartial:e=>Object.assign({},l)};const A={};t.QueryAnnualProvisionsResponse={encode:(e,t=i.default.Writer.create())=>(0!==e.annualProvisions.length&&t.uint32(10).bytes(e.annualProvisions),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},A);for(o.annualProvisions=new Uint8Array;n.pos>>3==1?o.annualProvisions=n.bytes():n.skipType(7&e)}return o},fromJSON(e){const t=Object.assign({},A);return t.annualProvisions=void 0!==e.annualProvisions&&null!==e.annualProvisions?g(e.annualProvisions):new Uint8Array,t},toJSON(e){const t={};return void 0!==e.annualProvisions&&(t.annualProvisions=m(void 0!==e.annualProvisions?e.annualProvisions:new Uint8Array)),t},fromPartial(e){var t;const n=Object.assign({},A);return n.annualProvisions=null!==(t=e.annualProvisions)&&void 0!==t?t:new Uint8Array,n}},t.QueryClientImpl=class{constructor(e){this.rpc=e,this.Params=this.Params.bind(this),this.Inflation=this.Inflation.bind(this),this.AnnualProvisions=this.AnnualProvisions.bind(this)}Params(e){const n=t.QueryParamsRequest.encode(e).finish();return this.rpc.request("cosmos.mint.v1beta1.Query","Params",n).then((e=>t.QueryParamsResponse.decode(new i.default.Reader(e))))}Inflation(e){const n=t.QueryInflationRequest.encode(e).finish();return this.rpc.request("cosmos.mint.v1beta1.Query","Inflation",n).then((e=>t.QueryInflationResponse.decode(new i.default.Reader(e))))}AnnualProvisions(e){const n=t.QueryAnnualProvisionsRequest.encode(e).finish();return this.rpc.request("cosmos.mint.v1beta1.Query","AnnualProvisions",n).then((e=>t.QueryAnnualProvisionsResponse.decode(new i.default.Reader(e))))}};var f=(()=>{if(void 0!==f)return f;if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==n.g)return n.g;throw"Unable to locate global object"})();const h=f.atob||(e=>f.Buffer.from(e,"base64").toString("binary"));function g(e){const t=h(e),n=new Uint8Array(t.length);for(let e=0;ef.Buffer.from(e,"binary").toString("base64"));function m(e){const t=[];for(const n of e)t.push(String.fromCharCode(n));return p(t.join(""))}i.default.util.Long!==o.default&&(i.default.util.Long=o.default,i.default.configure())},6701:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.QueryClientImpl=t.QuerySigningInfosResponse=t.QuerySigningInfosRequest=t.QuerySigningInfoResponse=t.QuerySigningInfoRequest=t.QueryParamsResponse=t.QueryParamsRequest=t.protobufPackage=void 0;const o=r(n(3720)),i=r(n(3789)),a=n(9726),s=n(9551);t.protobufPackage="cosmos.slashing.v1beta1";const c={};t.QueryParamsRequest={encode:(e,t=i.default.Writer.create())=>t,decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},c);for(;n.posObject.assign({},c),toJSON:e=>({}),fromPartial:e=>Object.assign({},c)};const d={};t.QueryParamsResponse={encode:(e,t=i.default.Writer.create())=>(void 0!==e.params&&a.Params.encode(e.params,t.uint32(10).fork()).ldelim(),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},d);for(;n.pos>>3==1?o.params=a.Params.decode(n,n.uint32()):n.skipType(7&e)}return o},fromJSON(e){const t=Object.assign({},d);return t.params=void 0!==e.params&&null!==e.params?a.Params.fromJSON(e.params):void 0,t},toJSON(e){const t={};return void 0!==e.params&&(t.params=e.params?a.Params.toJSON(e.params):void 0),t},fromPartial(e){const t=Object.assign({},d);return t.params=void 0!==e.params&&null!==e.params?a.Params.fromPartial(e.params):void 0,t}};const u={consAddress:""};t.QuerySigningInfoRequest={encode:(e,t=i.default.Writer.create())=>(""!==e.consAddress&&t.uint32(10).string(e.consAddress),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},u);for(;n.pos>>3==1?o.consAddress=n.string():n.skipType(7&e)}return o},fromJSON(e){const t=Object.assign({},u);return t.consAddress=void 0!==e.consAddress&&null!==e.consAddress?String(e.consAddress):"",t},toJSON(e){const t={};return void 0!==e.consAddress&&(t.consAddress=e.consAddress),t},fromPartial(e){var t;const n=Object.assign({},u);return n.consAddress=null!==(t=e.consAddress)&&void 0!==t?t:"",n}};const l={};t.QuerySigningInfoResponse={encode:(e,t=i.default.Writer.create())=>(void 0!==e.valSigningInfo&&a.ValidatorSigningInfo.encode(e.valSigningInfo,t.uint32(10).fork()).ldelim(),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},l);for(;n.pos>>3==1?o.valSigningInfo=a.ValidatorSigningInfo.decode(n,n.uint32()):n.skipType(7&e)}return o},fromJSON(e){const t=Object.assign({},l);return t.valSigningInfo=void 0!==e.valSigningInfo&&null!==e.valSigningInfo?a.ValidatorSigningInfo.fromJSON(e.valSigningInfo):void 0,t},toJSON(e){const t={};return void 0!==e.valSigningInfo&&(t.valSigningInfo=e.valSigningInfo?a.ValidatorSigningInfo.toJSON(e.valSigningInfo):void 0),t},fromPartial(e){const t=Object.assign({},l);return t.valSigningInfo=void 0!==e.valSigningInfo&&null!==e.valSigningInfo?a.ValidatorSigningInfo.fromPartial(e.valSigningInfo):void 0,t}};const A={};t.QuerySigningInfosRequest={encode:(e,t=i.default.Writer.create())=>(void 0!==e.pagination&&s.PageRequest.encode(e.pagination,t.uint32(10).fork()).ldelim(),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},A);for(;n.pos>>3==1?o.pagination=s.PageRequest.decode(n,n.uint32()):n.skipType(7&e)}return o},fromJSON(e){const t=Object.assign({},A);return t.pagination=void 0!==e.pagination&&null!==e.pagination?s.PageRequest.fromJSON(e.pagination):void 0,t},toJSON(e){const t={};return void 0!==e.pagination&&(t.pagination=e.pagination?s.PageRequest.toJSON(e.pagination):void 0),t},fromPartial(e){const t=Object.assign({},A);return t.pagination=void 0!==e.pagination&&null!==e.pagination?s.PageRequest.fromPartial(e.pagination):void 0,t}};const f={};t.QuerySigningInfosResponse={encode(e,t=i.default.Writer.create()){for(const n of e.info)a.ValidatorSigningInfo.encode(n,t.uint32(10).fork()).ldelim();return void 0!==e.pagination&&s.PageResponse.encode(e.pagination,t.uint32(18).fork()).ldelim(),t},decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},f);for(o.info=[];n.pos>>3){case 1:o.info.push(a.ValidatorSigningInfo.decode(n,n.uint32()));break;case 2:o.pagination=s.PageResponse.decode(n,n.uint32());break;default:n.skipType(7&e)}}return o},fromJSON(e){var t;const n=Object.assign({},f);return n.info=(null!==(t=e.info)&&void 0!==t?t:[]).map((e=>a.ValidatorSigningInfo.fromJSON(e))),n.pagination=void 0!==e.pagination&&null!==e.pagination?s.PageResponse.fromJSON(e.pagination):void 0,n},toJSON(e){const t={};return e.info?t.info=e.info.map((e=>e?a.ValidatorSigningInfo.toJSON(e):void 0)):t.info=[],void 0!==e.pagination&&(t.pagination=e.pagination?s.PageResponse.toJSON(e.pagination):void 0),t},fromPartial(e){var t;const n=Object.assign({},f);return n.info=(null===(t=e.info)||void 0===t?void 0:t.map((e=>a.ValidatorSigningInfo.fromPartial(e))))||[],n.pagination=void 0!==e.pagination&&null!==e.pagination?s.PageResponse.fromPartial(e.pagination):void 0,n}},t.QueryClientImpl=class{constructor(e){this.rpc=e,this.Params=this.Params.bind(this),this.SigningInfo=this.SigningInfo.bind(this),this.SigningInfos=this.SigningInfos.bind(this)}Params(e){const n=t.QueryParamsRequest.encode(e).finish();return this.rpc.request("cosmos.slashing.v1beta1.Query","Params",n).then((e=>t.QueryParamsResponse.decode(new i.default.Reader(e))))}SigningInfo(e){const n=t.QuerySigningInfoRequest.encode(e).finish();return this.rpc.request("cosmos.slashing.v1beta1.Query","SigningInfo",n).then((e=>t.QuerySigningInfoResponse.decode(new i.default.Reader(e))))}SigningInfos(e){const n=t.QuerySigningInfosRequest.encode(e).finish();return this.rpc.request("cosmos.slashing.v1beta1.Query","SigningInfos",n).then((e=>t.QuerySigningInfosResponse.decode(new i.default.Reader(e))))}},i.default.util.Long!==o.default&&(i.default.util.Long=o.default,i.default.configure())},9726:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Params=t.ValidatorSigningInfo=t.protobufPackage=void 0;const o=r(n(3720)),i=r(n(3789)),a=n(5522),s=n(281);t.protobufPackage="cosmos.slashing.v1beta1";const c={address:"",startHeight:o.default.ZERO,indexOffset:o.default.ZERO,tombstoned:!1,missedBlocksCounter:o.default.ZERO};t.ValidatorSigningInfo={encode:(e,t=i.default.Writer.create())=>(""!==e.address&&t.uint32(10).string(e.address),e.startHeight.isZero()||t.uint32(16).int64(e.startHeight),e.indexOffset.isZero()||t.uint32(24).int64(e.indexOffset),void 0!==e.jailedUntil&&a.Timestamp.encode(e.jailedUntil,t.uint32(34).fork()).ldelim(),!0===e.tombstoned&&t.uint32(40).bool(e.tombstoned),e.missedBlocksCounter.isZero()||t.uint32(48).int64(e.missedBlocksCounter),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},c);for(;n.pos>>3){case 1:o.address=n.string();break;case 2:o.startHeight=n.int64();break;case 3:o.indexOffset=n.int64();break;case 4:o.jailedUntil=a.Timestamp.decode(n,n.uint32());break;case 5:o.tombstoned=n.bool();break;case 6:o.missedBlocksCounter=n.int64();break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},c);var n;return t.address=void 0!==e.address&&null!==e.address?String(e.address):"",t.startHeight=void 0!==e.startHeight&&null!==e.startHeight?o.default.fromString(e.startHeight):o.default.ZERO,t.indexOffset=void 0!==e.indexOffset&&null!==e.indexOffset?o.default.fromString(e.indexOffset):o.default.ZERO,t.jailedUntil=void 0!==e.jailedUntil&&null!==e.jailedUntil?(n=e.jailedUntil)instanceof Date?g(n):"string"==typeof n?g(new Date(n)):a.Timestamp.fromJSON(n):void 0,t.tombstoned=void 0!==e.tombstoned&&null!==e.tombstoned&&Boolean(e.tombstoned),t.missedBlocksCounter=void 0!==e.missedBlocksCounter&&null!==e.missedBlocksCounter?o.default.fromString(e.missedBlocksCounter):o.default.ZERO,t},toJSON(e){const t={};return void 0!==e.address&&(t.address=e.address),void 0!==e.startHeight&&(t.startHeight=(e.startHeight||o.default.ZERO).toString()),void 0!==e.indexOffset&&(t.indexOffset=(e.indexOffset||o.default.ZERO).toString()),void 0!==e.jailedUntil&&(t.jailedUntil=function(e){let t=1e3*e.seconds.toNumber();return t+=e.nanos/1e6,new Date(t)}(e.jailedUntil).toISOString()),void 0!==e.tombstoned&&(t.tombstoned=e.tombstoned),void 0!==e.missedBlocksCounter&&(t.missedBlocksCounter=(e.missedBlocksCounter||o.default.ZERO).toString()),t},fromPartial(e){var t,n;const r=Object.assign({},c);return r.address=null!==(t=e.address)&&void 0!==t?t:"",r.startHeight=void 0!==e.startHeight&&null!==e.startHeight?o.default.fromValue(e.startHeight):o.default.ZERO,r.indexOffset=void 0!==e.indexOffset&&null!==e.indexOffset?o.default.fromValue(e.indexOffset):o.default.ZERO,r.jailedUntil=void 0!==e.jailedUntil&&null!==e.jailedUntil?a.Timestamp.fromPartial(e.jailedUntil):void 0,r.tombstoned=null!==(n=e.tombstoned)&&void 0!==n&&n,r.missedBlocksCounter=void 0!==e.missedBlocksCounter&&null!==e.missedBlocksCounter?o.default.fromValue(e.missedBlocksCounter):o.default.ZERO,r}};const d={signedBlocksWindow:o.default.ZERO};t.Params={encode:(e,t=i.default.Writer.create())=>(e.signedBlocksWindow.isZero()||t.uint32(8).int64(e.signedBlocksWindow),0!==e.minSignedPerWindow.length&&t.uint32(18).bytes(e.minSignedPerWindow),void 0!==e.downtimeJailDuration&&s.Duration.encode(e.downtimeJailDuration,t.uint32(26).fork()).ldelim(),0!==e.slashFractionDoubleSign.length&&t.uint32(34).bytes(e.slashFractionDoubleSign),0!==e.slashFractionDowntime.length&&t.uint32(42).bytes(e.slashFractionDowntime),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},d);for(o.minSignedPerWindow=new Uint8Array,o.slashFractionDoubleSign=new Uint8Array,o.slashFractionDowntime=new Uint8Array;n.pos>>3){case 1:o.signedBlocksWindow=n.int64();break;case 2:o.minSignedPerWindow=n.bytes();break;case 3:o.downtimeJailDuration=s.Duration.decode(n,n.uint32());break;case 4:o.slashFractionDoubleSign=n.bytes();break;case 5:o.slashFractionDowntime=n.bytes();break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},d);return t.signedBlocksWindow=void 0!==e.signedBlocksWindow&&null!==e.signedBlocksWindow?o.default.fromString(e.signedBlocksWindow):o.default.ZERO,t.minSignedPerWindow=void 0!==e.minSignedPerWindow&&null!==e.minSignedPerWindow?A(e.minSignedPerWindow):new Uint8Array,t.downtimeJailDuration=void 0!==e.downtimeJailDuration&&null!==e.downtimeJailDuration?s.Duration.fromJSON(e.downtimeJailDuration):void 0,t.slashFractionDoubleSign=void 0!==e.slashFractionDoubleSign&&null!==e.slashFractionDoubleSign?A(e.slashFractionDoubleSign):new Uint8Array,t.slashFractionDowntime=void 0!==e.slashFractionDowntime&&null!==e.slashFractionDowntime?A(e.slashFractionDowntime):new Uint8Array,t},toJSON(e){const t={};return void 0!==e.signedBlocksWindow&&(t.signedBlocksWindow=(e.signedBlocksWindow||o.default.ZERO).toString()),void 0!==e.minSignedPerWindow&&(t.minSignedPerWindow=h(void 0!==e.minSignedPerWindow?e.minSignedPerWindow:new Uint8Array)),void 0!==e.downtimeJailDuration&&(t.downtimeJailDuration=e.downtimeJailDuration?s.Duration.toJSON(e.downtimeJailDuration):void 0),void 0!==e.slashFractionDoubleSign&&(t.slashFractionDoubleSign=h(void 0!==e.slashFractionDoubleSign?e.slashFractionDoubleSign:new Uint8Array)),void 0!==e.slashFractionDowntime&&(t.slashFractionDowntime=h(void 0!==e.slashFractionDowntime?e.slashFractionDowntime:new Uint8Array)),t},fromPartial(e){var t,n,r;const i=Object.assign({},d);return i.signedBlocksWindow=void 0!==e.signedBlocksWindow&&null!==e.signedBlocksWindow?o.default.fromValue(e.signedBlocksWindow):o.default.ZERO,i.minSignedPerWindow=null!==(t=e.minSignedPerWindow)&&void 0!==t?t:new Uint8Array,i.downtimeJailDuration=void 0!==e.downtimeJailDuration&&null!==e.downtimeJailDuration?s.Duration.fromPartial(e.downtimeJailDuration):void 0,i.slashFractionDoubleSign=null!==(n=e.slashFractionDoubleSign)&&void 0!==n?n:new Uint8Array,i.slashFractionDowntime=null!==(r=e.slashFractionDowntime)&&void 0!==r?r:new Uint8Array,i}};var u=(()=>{if(void 0!==u)return u;if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==n.g)return n.g;throw"Unable to locate global object"})();const l=u.atob||(e=>u.Buffer.from(e,"base64").toString("binary"));function A(e){const t=l(e),n=new Uint8Array(t.length);for(let e=0;eu.Buffer.from(e,"binary").toString("base64"));function h(e){const t=[];for(const n of e)t.push(String.fromCharCode(n));return f(t.join(""))}function g(e){var t;return{seconds:(t=e.getTime()/1e3,o.default.fromNumber(t)),nanos:e.getTime()%1e3*1e6}}i.default.util.Long!==o.default&&(i.default.util.Long=o.default,i.default.configure())},4438:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.QueryClientImpl=t.QueryParamsResponse=t.QueryParamsRequest=t.QueryPoolResponse=t.QueryPoolRequest=t.QueryHistoricalInfoResponse=t.QueryHistoricalInfoRequest=t.QueryDelegatorValidatorResponse=t.QueryDelegatorValidatorRequest=t.QueryDelegatorValidatorsResponse=t.QueryDelegatorValidatorsRequest=t.QueryRedelegationsResponse=t.QueryRedelegationsRequest=t.QueryDelegatorUnbondingDelegationsResponse=t.QueryDelegatorUnbondingDelegationsRequest=t.QueryDelegatorDelegationsResponse=t.QueryDelegatorDelegationsRequest=t.QueryUnbondingDelegationResponse=t.QueryUnbondingDelegationRequest=t.QueryDelegationResponse=t.QueryDelegationRequest=t.QueryValidatorUnbondingDelegationsResponse=t.QueryValidatorUnbondingDelegationsRequest=t.QueryValidatorDelegationsResponse=t.QueryValidatorDelegationsRequest=t.QueryValidatorResponse=t.QueryValidatorRequest=t.QueryValidatorsResponse=t.QueryValidatorsRequest=t.protobufPackage=void 0;const o=r(n(3720)),i=r(n(3789)),a=n(9551),s=n(9355);t.protobufPackage="cosmos.staking.v1beta1";const c={status:""};t.QueryValidatorsRequest={encode:(e,t=i.default.Writer.create())=>(""!==e.status&&t.uint32(10).string(e.status),void 0!==e.pagination&&a.PageRequest.encode(e.pagination,t.uint32(18).fork()).ldelim(),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},c);for(;n.pos>>3){case 1:o.status=n.string();break;case 2:o.pagination=a.PageRequest.decode(n,n.uint32());break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},c);return t.status=void 0!==e.status&&null!==e.status?String(e.status):"",t.pagination=void 0!==e.pagination&&null!==e.pagination?a.PageRequest.fromJSON(e.pagination):void 0,t},toJSON(e){const t={};return void 0!==e.status&&(t.status=e.status),void 0!==e.pagination&&(t.pagination=e.pagination?a.PageRequest.toJSON(e.pagination):void 0),t},fromPartial(e){var t;const n=Object.assign({},c);return n.status=null!==(t=e.status)&&void 0!==t?t:"",n.pagination=void 0!==e.pagination&&null!==e.pagination?a.PageRequest.fromPartial(e.pagination):void 0,n}};const d={};t.QueryValidatorsResponse={encode(e,t=i.default.Writer.create()){for(const n of e.validators)s.Validator.encode(n,t.uint32(10).fork()).ldelim();return void 0!==e.pagination&&a.PageResponse.encode(e.pagination,t.uint32(18).fork()).ldelim(),t},decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},d);for(o.validators=[];n.pos>>3){case 1:o.validators.push(s.Validator.decode(n,n.uint32()));break;case 2:o.pagination=a.PageResponse.decode(n,n.uint32());break;default:n.skipType(7&e)}}return o},fromJSON(e){var t;const n=Object.assign({},d);return n.validators=(null!==(t=e.validators)&&void 0!==t?t:[]).map((e=>s.Validator.fromJSON(e))),n.pagination=void 0!==e.pagination&&null!==e.pagination?a.PageResponse.fromJSON(e.pagination):void 0,n},toJSON(e){const t={};return e.validators?t.validators=e.validators.map((e=>e?s.Validator.toJSON(e):void 0)):t.validators=[],void 0!==e.pagination&&(t.pagination=e.pagination?a.PageResponse.toJSON(e.pagination):void 0),t},fromPartial(e){var t;const n=Object.assign({},d);return n.validators=(null===(t=e.validators)||void 0===t?void 0:t.map((e=>s.Validator.fromPartial(e))))||[],n.pagination=void 0!==e.pagination&&null!==e.pagination?a.PageResponse.fromPartial(e.pagination):void 0,n}};const u={validatorAddr:""};t.QueryValidatorRequest={encode:(e,t=i.default.Writer.create())=>(""!==e.validatorAddr&&t.uint32(10).string(e.validatorAddr),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},u);for(;n.pos>>3==1?o.validatorAddr=n.string():n.skipType(7&e)}return o},fromJSON(e){const t=Object.assign({},u);return t.validatorAddr=void 0!==e.validatorAddr&&null!==e.validatorAddr?String(e.validatorAddr):"",t},toJSON(e){const t={};return void 0!==e.validatorAddr&&(t.validatorAddr=e.validatorAddr),t},fromPartial(e){var t;const n=Object.assign({},u);return n.validatorAddr=null!==(t=e.validatorAddr)&&void 0!==t?t:"",n}};const l={};t.QueryValidatorResponse={encode:(e,t=i.default.Writer.create())=>(void 0!==e.validator&&s.Validator.encode(e.validator,t.uint32(10).fork()).ldelim(),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},l);for(;n.pos>>3==1?o.validator=s.Validator.decode(n,n.uint32()):n.skipType(7&e)}return o},fromJSON(e){const t=Object.assign({},l);return t.validator=void 0!==e.validator&&null!==e.validator?s.Validator.fromJSON(e.validator):void 0,t},toJSON(e){const t={};return void 0!==e.validator&&(t.validator=e.validator?s.Validator.toJSON(e.validator):void 0),t},fromPartial(e){const t=Object.assign({},l);return t.validator=void 0!==e.validator&&null!==e.validator?s.Validator.fromPartial(e.validator):void 0,t}};const A={validatorAddr:""};t.QueryValidatorDelegationsRequest={encode:(e,t=i.default.Writer.create())=>(""!==e.validatorAddr&&t.uint32(10).string(e.validatorAddr),void 0!==e.pagination&&a.PageRequest.encode(e.pagination,t.uint32(18).fork()).ldelim(),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},A);for(;n.pos>>3){case 1:o.validatorAddr=n.string();break;case 2:o.pagination=a.PageRequest.decode(n,n.uint32());break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},A);return t.validatorAddr=void 0!==e.validatorAddr&&null!==e.validatorAddr?String(e.validatorAddr):"",t.pagination=void 0!==e.pagination&&null!==e.pagination?a.PageRequest.fromJSON(e.pagination):void 0,t},toJSON(e){const t={};return void 0!==e.validatorAddr&&(t.validatorAddr=e.validatorAddr),void 0!==e.pagination&&(t.pagination=e.pagination?a.PageRequest.toJSON(e.pagination):void 0),t},fromPartial(e){var t;const n=Object.assign({},A);return n.validatorAddr=null!==(t=e.validatorAddr)&&void 0!==t?t:"",n.pagination=void 0!==e.pagination&&null!==e.pagination?a.PageRequest.fromPartial(e.pagination):void 0,n}};const f={};t.QueryValidatorDelegationsResponse={encode(e,t=i.default.Writer.create()){for(const n of e.delegationResponses)s.DelegationResponse.encode(n,t.uint32(10).fork()).ldelim();return void 0!==e.pagination&&a.PageResponse.encode(e.pagination,t.uint32(18).fork()).ldelim(),t},decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},f);for(o.delegationResponses=[];n.pos>>3){case 1:o.delegationResponses.push(s.DelegationResponse.decode(n,n.uint32()));break;case 2:o.pagination=a.PageResponse.decode(n,n.uint32());break;default:n.skipType(7&e)}}return o},fromJSON(e){var t;const n=Object.assign({},f);return n.delegationResponses=(null!==(t=e.delegationResponses)&&void 0!==t?t:[]).map((e=>s.DelegationResponse.fromJSON(e))),n.pagination=void 0!==e.pagination&&null!==e.pagination?a.PageResponse.fromJSON(e.pagination):void 0,n},toJSON(e){const t={};return e.delegationResponses?t.delegationResponses=e.delegationResponses.map((e=>e?s.DelegationResponse.toJSON(e):void 0)):t.delegationResponses=[],void 0!==e.pagination&&(t.pagination=e.pagination?a.PageResponse.toJSON(e.pagination):void 0),t},fromPartial(e){var t;const n=Object.assign({},f);return n.delegationResponses=(null===(t=e.delegationResponses)||void 0===t?void 0:t.map((e=>s.DelegationResponse.fromPartial(e))))||[],n.pagination=void 0!==e.pagination&&null!==e.pagination?a.PageResponse.fromPartial(e.pagination):void 0,n}};const h={validatorAddr:""};t.QueryValidatorUnbondingDelegationsRequest={encode:(e,t=i.default.Writer.create())=>(""!==e.validatorAddr&&t.uint32(10).string(e.validatorAddr),void 0!==e.pagination&&a.PageRequest.encode(e.pagination,t.uint32(18).fork()).ldelim(),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},h);for(;n.pos>>3){case 1:o.validatorAddr=n.string();break;case 2:o.pagination=a.PageRequest.decode(n,n.uint32());break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},h);return t.validatorAddr=void 0!==e.validatorAddr&&null!==e.validatorAddr?String(e.validatorAddr):"",t.pagination=void 0!==e.pagination&&null!==e.pagination?a.PageRequest.fromJSON(e.pagination):void 0,t},toJSON(e){const t={};return void 0!==e.validatorAddr&&(t.validatorAddr=e.validatorAddr),void 0!==e.pagination&&(t.pagination=e.pagination?a.PageRequest.toJSON(e.pagination):void 0),t},fromPartial(e){var t;const n=Object.assign({},h);return n.validatorAddr=null!==(t=e.validatorAddr)&&void 0!==t?t:"",n.pagination=void 0!==e.pagination&&null!==e.pagination?a.PageRequest.fromPartial(e.pagination):void 0,n}};const g={};t.QueryValidatorUnbondingDelegationsResponse={encode(e,t=i.default.Writer.create()){for(const n of e.unbondingResponses)s.UnbondingDelegation.encode(n,t.uint32(10).fork()).ldelim();return void 0!==e.pagination&&a.PageResponse.encode(e.pagination,t.uint32(18).fork()).ldelim(),t},decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},g);for(o.unbondingResponses=[];n.pos>>3){case 1:o.unbondingResponses.push(s.UnbondingDelegation.decode(n,n.uint32()));break;case 2:o.pagination=a.PageResponse.decode(n,n.uint32());break;default:n.skipType(7&e)}}return o},fromJSON(e){var t;const n=Object.assign({},g);return n.unbondingResponses=(null!==(t=e.unbondingResponses)&&void 0!==t?t:[]).map((e=>s.UnbondingDelegation.fromJSON(e))),n.pagination=void 0!==e.pagination&&null!==e.pagination?a.PageResponse.fromJSON(e.pagination):void 0,n},toJSON(e){const t={};return e.unbondingResponses?t.unbondingResponses=e.unbondingResponses.map((e=>e?s.UnbondingDelegation.toJSON(e):void 0)):t.unbondingResponses=[],void 0!==e.pagination&&(t.pagination=e.pagination?a.PageResponse.toJSON(e.pagination):void 0),t},fromPartial(e){var t;const n=Object.assign({},g);return n.unbondingResponses=(null===(t=e.unbondingResponses)||void 0===t?void 0:t.map((e=>s.UnbondingDelegation.fromPartial(e))))||[],n.pagination=void 0!==e.pagination&&null!==e.pagination?a.PageResponse.fromPartial(e.pagination):void 0,n}};const p={delegatorAddr:"",validatorAddr:""};t.QueryDelegationRequest={encode:(e,t=i.default.Writer.create())=>(""!==e.delegatorAddr&&t.uint32(10).string(e.delegatorAddr),""!==e.validatorAddr&&t.uint32(18).string(e.validatorAddr),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},p);for(;n.pos>>3){case 1:o.delegatorAddr=n.string();break;case 2:o.validatorAddr=n.string();break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},p);return t.delegatorAddr=void 0!==e.delegatorAddr&&null!==e.delegatorAddr?String(e.delegatorAddr):"",t.validatorAddr=void 0!==e.validatorAddr&&null!==e.validatorAddr?String(e.validatorAddr):"",t},toJSON(e){const t={};return void 0!==e.delegatorAddr&&(t.delegatorAddr=e.delegatorAddr),void 0!==e.validatorAddr&&(t.validatorAddr=e.validatorAddr),t},fromPartial(e){var t,n;const r=Object.assign({},p);return r.delegatorAddr=null!==(t=e.delegatorAddr)&&void 0!==t?t:"",r.validatorAddr=null!==(n=e.validatorAddr)&&void 0!==n?n:"",r}};const m={};t.QueryDelegationResponse={encode:(e,t=i.default.Writer.create())=>(void 0!==e.delegationResponse&&s.DelegationResponse.encode(e.delegationResponse,t.uint32(10).fork()).ldelim(),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},m);for(;n.pos>>3==1?o.delegationResponse=s.DelegationResponse.decode(n,n.uint32()):n.skipType(7&e)}return o},fromJSON(e){const t=Object.assign({},m);return t.delegationResponse=void 0!==e.delegationResponse&&null!==e.delegationResponse?s.DelegationResponse.fromJSON(e.delegationResponse):void 0,t},toJSON(e){const t={};return void 0!==e.delegationResponse&&(t.delegationResponse=e.delegationResponse?s.DelegationResponse.toJSON(e.delegationResponse):void 0),t},fromPartial(e){const t=Object.assign({},m);return t.delegationResponse=void 0!==e.delegationResponse&&null!==e.delegationResponse?s.DelegationResponse.fromPartial(e.delegationResponse):void 0,t}};const v={delegatorAddr:"",validatorAddr:""};t.QueryUnbondingDelegationRequest={encode:(e,t=i.default.Writer.create())=>(""!==e.delegatorAddr&&t.uint32(10).string(e.delegatorAddr),""!==e.validatorAddr&&t.uint32(18).string(e.validatorAddr),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},v);for(;n.pos>>3){case 1:o.delegatorAddr=n.string();break;case 2:o.validatorAddr=n.string();break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},v);return t.delegatorAddr=void 0!==e.delegatorAddr&&null!==e.delegatorAddr?String(e.delegatorAddr):"",t.validatorAddr=void 0!==e.validatorAddr&&null!==e.validatorAddr?String(e.validatorAddr):"",t},toJSON(e){const t={};return void 0!==e.delegatorAddr&&(t.delegatorAddr=e.delegatorAddr),void 0!==e.validatorAddr&&(t.validatorAddr=e.validatorAddr),t},fromPartial(e){var t,n;const r=Object.assign({},v);return r.delegatorAddr=null!==(t=e.delegatorAddr)&&void 0!==t?t:"",r.validatorAddr=null!==(n=e.validatorAddr)&&void 0!==n?n:"",r}};const y={};t.QueryUnbondingDelegationResponse={encode:(e,t=i.default.Writer.create())=>(void 0!==e.unbond&&s.UnbondingDelegation.encode(e.unbond,t.uint32(10).fork()).ldelim(),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},y);for(;n.pos>>3==1?o.unbond=s.UnbondingDelegation.decode(n,n.uint32()):n.skipType(7&e)}return o},fromJSON(e){const t=Object.assign({},y);return t.unbond=void 0!==e.unbond&&null!==e.unbond?s.UnbondingDelegation.fromJSON(e.unbond):void 0,t},toJSON(e){const t={};return void 0!==e.unbond&&(t.unbond=e.unbond?s.UnbondingDelegation.toJSON(e.unbond):void 0),t},fromPartial(e){const t=Object.assign({},y);return t.unbond=void 0!==e.unbond&&null!==e.unbond?s.UnbondingDelegation.fromPartial(e.unbond):void 0,t}};const b={delegatorAddr:""};t.QueryDelegatorDelegationsRequest={encode:(e,t=i.default.Writer.create())=>(""!==e.delegatorAddr&&t.uint32(10).string(e.delegatorAddr),void 0!==e.pagination&&a.PageRequest.encode(e.pagination,t.uint32(18).fork()).ldelim(),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},b);for(;n.pos>>3){case 1:o.delegatorAddr=n.string();break;case 2:o.pagination=a.PageRequest.decode(n,n.uint32());break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},b);return t.delegatorAddr=void 0!==e.delegatorAddr&&null!==e.delegatorAddr?String(e.delegatorAddr):"",t.pagination=void 0!==e.pagination&&null!==e.pagination?a.PageRequest.fromJSON(e.pagination):void 0,t},toJSON(e){const t={};return void 0!==e.delegatorAddr&&(t.delegatorAddr=e.delegatorAddr),void 0!==e.pagination&&(t.pagination=e.pagination?a.PageRequest.toJSON(e.pagination):void 0),t},fromPartial(e){var t;const n=Object.assign({},b);return n.delegatorAddr=null!==(t=e.delegatorAddr)&&void 0!==t?t:"",n.pagination=void 0!==e.pagination&&null!==e.pagination?a.PageRequest.fromPartial(e.pagination):void 0,n}};const I={};t.QueryDelegatorDelegationsResponse={encode(e,t=i.default.Writer.create()){for(const n of e.delegationResponses)s.DelegationResponse.encode(n,t.uint32(10).fork()).ldelim();return void 0!==e.pagination&&a.PageResponse.encode(e.pagination,t.uint32(18).fork()).ldelim(),t},decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},I);for(o.delegationResponses=[];n.pos>>3){case 1:o.delegationResponses.push(s.DelegationResponse.decode(n,n.uint32()));break;case 2:o.pagination=a.PageResponse.decode(n,n.uint32());break;default:n.skipType(7&e)}}return o},fromJSON(e){var t;const n=Object.assign({},I);return n.delegationResponses=(null!==(t=e.delegationResponses)&&void 0!==t?t:[]).map((e=>s.DelegationResponse.fromJSON(e))),n.pagination=void 0!==e.pagination&&null!==e.pagination?a.PageResponse.fromJSON(e.pagination):void 0,n},toJSON(e){const t={};return e.delegationResponses?t.delegationResponses=e.delegationResponses.map((e=>e?s.DelegationResponse.toJSON(e):void 0)):t.delegationResponses=[],void 0!==e.pagination&&(t.pagination=e.pagination?a.PageResponse.toJSON(e.pagination):void 0),t},fromPartial(e){var t;const n=Object.assign({},I);return n.delegationResponses=(null===(t=e.delegationResponses)||void 0===t?void 0:t.map((e=>s.DelegationResponse.fromPartial(e))))||[],n.pagination=void 0!==e.pagination&&null!==e.pagination?a.PageResponse.fromPartial(e.pagination):void 0,n}};const C={delegatorAddr:""};t.QueryDelegatorUnbondingDelegationsRequest={encode:(e,t=i.default.Writer.create())=>(""!==e.delegatorAddr&&t.uint32(10).string(e.delegatorAddr),void 0!==e.pagination&&a.PageRequest.encode(e.pagination,t.uint32(18).fork()).ldelim(),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},C);for(;n.pos>>3){case 1:o.delegatorAddr=n.string();break;case 2:o.pagination=a.PageRequest.decode(n,n.uint32());break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},C);return t.delegatorAddr=void 0!==e.delegatorAddr&&null!==e.delegatorAddr?String(e.delegatorAddr):"",t.pagination=void 0!==e.pagination&&null!==e.pagination?a.PageRequest.fromJSON(e.pagination):void 0,t},toJSON(e){const t={};return void 0!==e.delegatorAddr&&(t.delegatorAddr=e.delegatorAddr),void 0!==e.pagination&&(t.pagination=e.pagination?a.PageRequest.toJSON(e.pagination):void 0),t},fromPartial(e){var t;const n=Object.assign({},C);return n.delegatorAddr=null!==(t=e.delegatorAddr)&&void 0!==t?t:"",n.pagination=void 0!==e.pagination&&null!==e.pagination?a.PageRequest.fromPartial(e.pagination):void 0,n}};const E={};t.QueryDelegatorUnbondingDelegationsResponse={encode(e,t=i.default.Writer.create()){for(const n of e.unbondingResponses)s.UnbondingDelegation.encode(n,t.uint32(10).fork()).ldelim();return void 0!==e.pagination&&a.PageResponse.encode(e.pagination,t.uint32(18).fork()).ldelim(),t},decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},E);for(o.unbondingResponses=[];n.pos>>3){case 1:o.unbondingResponses.push(s.UnbondingDelegation.decode(n,n.uint32()));break;case 2:o.pagination=a.PageResponse.decode(n,n.uint32());break;default:n.skipType(7&e)}}return o},fromJSON(e){var t;const n=Object.assign({},E);return n.unbondingResponses=(null!==(t=e.unbondingResponses)&&void 0!==t?t:[]).map((e=>s.UnbondingDelegation.fromJSON(e))),n.pagination=void 0!==e.pagination&&null!==e.pagination?a.PageResponse.fromJSON(e.pagination):void 0,n},toJSON(e){const t={};return e.unbondingResponses?t.unbondingResponses=e.unbondingResponses.map((e=>e?s.UnbondingDelegation.toJSON(e):void 0)):t.unbondingResponses=[],void 0!==e.pagination&&(t.pagination=e.pagination?a.PageResponse.toJSON(e.pagination):void 0),t},fromPartial(e){var t;const n=Object.assign({},E);return n.unbondingResponses=(null===(t=e.unbondingResponses)||void 0===t?void 0:t.map((e=>s.UnbondingDelegation.fromPartial(e))))||[],n.pagination=void 0!==e.pagination&&null!==e.pagination?a.PageResponse.fromPartial(e.pagination):void 0,n}};const w={delegatorAddr:"",srcValidatorAddr:"",dstValidatorAddr:""};t.QueryRedelegationsRequest={encode:(e,t=i.default.Writer.create())=>(""!==e.delegatorAddr&&t.uint32(10).string(e.delegatorAddr),""!==e.srcValidatorAddr&&t.uint32(18).string(e.srcValidatorAddr),""!==e.dstValidatorAddr&&t.uint32(26).string(e.dstValidatorAddr),void 0!==e.pagination&&a.PageRequest.encode(e.pagination,t.uint32(34).fork()).ldelim(),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},w);for(;n.pos>>3){case 1:o.delegatorAddr=n.string();break;case 2:o.srcValidatorAddr=n.string();break;case 3:o.dstValidatorAddr=n.string();break;case 4:o.pagination=a.PageRequest.decode(n,n.uint32());break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},w);return t.delegatorAddr=void 0!==e.delegatorAddr&&null!==e.delegatorAddr?String(e.delegatorAddr):"",t.srcValidatorAddr=void 0!==e.srcValidatorAddr&&null!==e.srcValidatorAddr?String(e.srcValidatorAddr):"",t.dstValidatorAddr=void 0!==e.dstValidatorAddr&&null!==e.dstValidatorAddr?String(e.dstValidatorAddr):"",t.pagination=void 0!==e.pagination&&null!==e.pagination?a.PageRequest.fromJSON(e.pagination):void 0,t},toJSON(e){const t={};return void 0!==e.delegatorAddr&&(t.delegatorAddr=e.delegatorAddr),void 0!==e.srcValidatorAddr&&(t.srcValidatorAddr=e.srcValidatorAddr),void 0!==e.dstValidatorAddr&&(t.dstValidatorAddr=e.dstValidatorAddr),void 0!==e.pagination&&(t.pagination=e.pagination?a.PageRequest.toJSON(e.pagination):void 0),t},fromPartial(e){var t,n,r;const o=Object.assign({},w);return o.delegatorAddr=null!==(t=e.delegatorAddr)&&void 0!==t?t:"",o.srcValidatorAddr=null!==(n=e.srcValidatorAddr)&&void 0!==n?n:"",o.dstValidatorAddr=null!==(r=e.dstValidatorAddr)&&void 0!==r?r:"",o.pagination=void 0!==e.pagination&&null!==e.pagination?a.PageRequest.fromPartial(e.pagination):void 0,o}};const B={};t.QueryRedelegationsResponse={encode(e,t=i.default.Writer.create()){for(const n of e.redelegationResponses)s.RedelegationResponse.encode(n,t.uint32(10).fork()).ldelim();return void 0!==e.pagination&&a.PageResponse.encode(e.pagination,t.uint32(18).fork()).ldelim(),t},decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},B);for(o.redelegationResponses=[];n.pos>>3){case 1:o.redelegationResponses.push(s.RedelegationResponse.decode(n,n.uint32()));break;case 2:o.pagination=a.PageResponse.decode(n,n.uint32());break;default:n.skipType(7&e)}}return o},fromJSON(e){var t;const n=Object.assign({},B);return n.redelegationResponses=(null!==(t=e.redelegationResponses)&&void 0!==t?t:[]).map((e=>s.RedelegationResponse.fromJSON(e))),n.pagination=void 0!==e.pagination&&null!==e.pagination?a.PageResponse.fromJSON(e.pagination):void 0,n},toJSON(e){const t={};return e.redelegationResponses?t.redelegationResponses=e.redelegationResponses.map((e=>e?s.RedelegationResponse.toJSON(e):void 0)):t.redelegationResponses=[],void 0!==e.pagination&&(t.pagination=e.pagination?a.PageResponse.toJSON(e.pagination):void 0),t},fromPartial(e){var t;const n=Object.assign({},B);return n.redelegationResponses=(null===(t=e.redelegationResponses)||void 0===t?void 0:t.map((e=>s.RedelegationResponse.fromPartial(e))))||[],n.pagination=void 0!==e.pagination&&null!==e.pagination?a.PageResponse.fromPartial(e.pagination):void 0,n}};const _={delegatorAddr:""};t.QueryDelegatorValidatorsRequest={encode:(e,t=i.default.Writer.create())=>(""!==e.delegatorAddr&&t.uint32(10).string(e.delegatorAddr),void 0!==e.pagination&&a.PageRequest.encode(e.pagination,t.uint32(18).fork()).ldelim(),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},_);for(;n.pos>>3){case 1:o.delegatorAddr=n.string();break;case 2:o.pagination=a.PageRequest.decode(n,n.uint32());break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},_);return t.delegatorAddr=void 0!==e.delegatorAddr&&null!==e.delegatorAddr?String(e.delegatorAddr):"",t.pagination=void 0!==e.pagination&&null!==e.pagination?a.PageRequest.fromJSON(e.pagination):void 0,t},toJSON(e){const t={};return void 0!==e.delegatorAddr&&(t.delegatorAddr=e.delegatorAddr),void 0!==e.pagination&&(t.pagination=e.pagination?a.PageRequest.toJSON(e.pagination):void 0),t},fromPartial(e){var t;const n=Object.assign({},_);return n.delegatorAddr=null!==(t=e.delegatorAddr)&&void 0!==t?t:"",n.pagination=void 0!==e.pagination&&null!==e.pagination?a.PageRequest.fromPartial(e.pagination):void 0,n}};const S={};t.QueryDelegatorValidatorsResponse={encode(e,t=i.default.Writer.create()){for(const n of e.validators)s.Validator.encode(n,t.uint32(10).fork()).ldelim();return void 0!==e.pagination&&a.PageResponse.encode(e.pagination,t.uint32(18).fork()).ldelim(),t},decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},S);for(o.validators=[];n.pos>>3){case 1:o.validators.push(s.Validator.decode(n,n.uint32()));break;case 2:o.pagination=a.PageResponse.decode(n,n.uint32());break;default:n.skipType(7&e)}}return o},fromJSON(e){var t;const n=Object.assign({},S);return n.validators=(null!==(t=e.validators)&&void 0!==t?t:[]).map((e=>s.Validator.fromJSON(e))),n.pagination=void 0!==e.pagination&&null!==e.pagination?a.PageResponse.fromJSON(e.pagination):void 0,n},toJSON(e){const t={};return e.validators?t.validators=e.validators.map((e=>e?s.Validator.toJSON(e):void 0)):t.validators=[],void 0!==e.pagination&&(t.pagination=e.pagination?a.PageResponse.toJSON(e.pagination):void 0),t},fromPartial(e){var t;const n=Object.assign({},S);return n.validators=(null===(t=e.validators)||void 0===t?void 0:t.map((e=>s.Validator.fromPartial(e))))||[],n.pagination=void 0!==e.pagination&&null!==e.pagination?a.PageResponse.fromPartial(e.pagination):void 0,n}};const k={delegatorAddr:"",validatorAddr:""};t.QueryDelegatorValidatorRequest={encode:(e,t=i.default.Writer.create())=>(""!==e.delegatorAddr&&t.uint32(10).string(e.delegatorAddr),""!==e.validatorAddr&&t.uint32(18).string(e.validatorAddr),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},k);for(;n.pos>>3){case 1:o.delegatorAddr=n.string();break;case 2:o.validatorAddr=n.string();break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},k);return t.delegatorAddr=void 0!==e.delegatorAddr&&null!==e.delegatorAddr?String(e.delegatorAddr):"",t.validatorAddr=void 0!==e.validatorAddr&&null!==e.validatorAddr?String(e.validatorAddr):"",t},toJSON(e){const t={};return void 0!==e.delegatorAddr&&(t.delegatorAddr=e.delegatorAddr),void 0!==e.validatorAddr&&(t.validatorAddr=e.validatorAddr),t},fromPartial(e){var t,n;const r=Object.assign({},k);return r.delegatorAddr=null!==(t=e.delegatorAddr)&&void 0!==t?t:"",r.validatorAddr=null!==(n=e.validatorAddr)&&void 0!==n?n:"",r}};const O={};t.QueryDelegatorValidatorResponse={encode:(e,t=i.default.Writer.create())=>(void 0!==e.validator&&s.Validator.encode(e.validator,t.uint32(10).fork()).ldelim(),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},O);for(;n.pos>>3==1?o.validator=s.Validator.decode(n,n.uint32()):n.skipType(7&e)}return o},fromJSON(e){const t=Object.assign({},O);return t.validator=void 0!==e.validator&&null!==e.validator?s.Validator.fromJSON(e.validator):void 0,t},toJSON(e){const t={};return void 0!==e.validator&&(t.validator=e.validator?s.Validator.toJSON(e.validator):void 0),t},fromPartial(e){const t=Object.assign({},O);return t.validator=void 0!==e.validator&&null!==e.validator?s.Validator.fromPartial(e.validator):void 0,t}};const Q={height:o.default.ZERO};t.QueryHistoricalInfoRequest={encode:(e,t=i.default.Writer.create())=>(e.height.isZero()||t.uint32(8).int64(e.height),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},Q);for(;n.pos>>3==1?o.height=n.int64():n.skipType(7&e)}return o},fromJSON(e){const t=Object.assign({},Q);return t.height=void 0!==e.height&&null!==e.height?o.default.fromString(e.height):o.default.ZERO,t},toJSON(e){const t={};return void 0!==e.height&&(t.height=(e.height||o.default.ZERO).toString()),t},fromPartial(e){const t=Object.assign({},Q);return t.height=void 0!==e.height&&null!==e.height?o.default.fromValue(e.height):o.default.ZERO,t}};const R={};t.QueryHistoricalInfoResponse={encode:(e,t=i.default.Writer.create())=>(void 0!==e.hist&&s.HistoricalInfo.encode(e.hist,t.uint32(10).fork()).ldelim(),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},R);for(;n.pos>>3==1?o.hist=s.HistoricalInfo.decode(n,n.uint32()):n.skipType(7&e)}return o},fromJSON(e){const t=Object.assign({},R);return t.hist=void 0!==e.hist&&null!==e.hist?s.HistoricalInfo.fromJSON(e.hist):void 0,t},toJSON(e){const t={};return void 0!==e.hist&&(t.hist=e.hist?s.HistoricalInfo.toJSON(e.hist):void 0),t},fromPartial(e){const t=Object.assign({},R);return t.hist=void 0!==e.hist&&null!==e.hist?s.HistoricalInfo.fromPartial(e.hist):void 0,t}};const P={};t.QueryPoolRequest={encode:(e,t=i.default.Writer.create())=>t,decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},P);for(;n.posObject.assign({},P),toJSON:e=>({}),fromPartial:e=>Object.assign({},P)};const N={};t.QueryPoolResponse={encode:(e,t=i.default.Writer.create())=>(void 0!==e.pool&&s.Pool.encode(e.pool,t.uint32(10).fork()).ldelim(),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},N);for(;n.pos>>3==1?o.pool=s.Pool.decode(n,n.uint32()):n.skipType(7&e)}return o},fromJSON(e){const t=Object.assign({},N);return t.pool=void 0!==e.pool&&null!==e.pool?s.Pool.fromJSON(e.pool):void 0,t},toJSON(e){const t={};return void 0!==e.pool&&(t.pool=e.pool?s.Pool.toJSON(e.pool):void 0),t},fromPartial(e){const t=Object.assign({},N);return t.pool=void 0!==e.pool&&null!==e.pool?s.Pool.fromPartial(e.pool):void 0,t}};const x={};t.QueryParamsRequest={encode:(e,t=i.default.Writer.create())=>t,decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},x);for(;n.posObject.assign({},x),toJSON:e=>({}),fromPartial:e=>Object.assign({},x)};const D={};t.QueryParamsResponse={encode:(e,t=i.default.Writer.create())=>(void 0!==e.params&&s.Params.encode(e.params,t.uint32(10).fork()).ldelim(),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},D);for(;n.pos>>3==1?o.params=s.Params.decode(n,n.uint32()):n.skipType(7&e)}return o},fromJSON(e){const t=Object.assign({},D);return t.params=void 0!==e.params&&null!==e.params?s.Params.fromJSON(e.params):void 0,t},toJSON(e){const t={};return void 0!==e.params&&(t.params=e.params?s.Params.toJSON(e.params):void 0),t},fromPartial(e){const t=Object.assign({},D);return t.params=void 0!==e.params&&null!==e.params?s.Params.fromPartial(e.params):void 0,t}},t.QueryClientImpl=class{constructor(e){this.rpc=e,this.Validators=this.Validators.bind(this),this.Validator=this.Validator.bind(this),this.ValidatorDelegations=this.ValidatorDelegations.bind(this),this.ValidatorUnbondingDelegations=this.ValidatorUnbondingDelegations.bind(this),this.Delegation=this.Delegation.bind(this),this.UnbondingDelegation=this.UnbondingDelegation.bind(this),this.DelegatorDelegations=this.DelegatorDelegations.bind(this),this.DelegatorUnbondingDelegations=this.DelegatorUnbondingDelegations.bind(this),this.Redelegations=this.Redelegations.bind(this),this.DelegatorValidators=this.DelegatorValidators.bind(this),this.DelegatorValidator=this.DelegatorValidator.bind(this),this.HistoricalInfo=this.HistoricalInfo.bind(this),this.Pool=this.Pool.bind(this),this.Params=this.Params.bind(this)}Validators(e){const n=t.QueryValidatorsRequest.encode(e).finish();return this.rpc.request("cosmos.staking.v1beta1.Query","Validators",n).then((e=>t.QueryValidatorsResponse.decode(new i.default.Reader(e))))}Validator(e){const n=t.QueryValidatorRequest.encode(e).finish();return this.rpc.request("cosmos.staking.v1beta1.Query","Validator",n).then((e=>t.QueryValidatorResponse.decode(new i.default.Reader(e))))}ValidatorDelegations(e){const n=t.QueryValidatorDelegationsRequest.encode(e).finish();return this.rpc.request("cosmos.staking.v1beta1.Query","ValidatorDelegations",n).then((e=>t.QueryValidatorDelegationsResponse.decode(new i.default.Reader(e))))}ValidatorUnbondingDelegations(e){const n=t.QueryValidatorUnbondingDelegationsRequest.encode(e).finish();return this.rpc.request("cosmos.staking.v1beta1.Query","ValidatorUnbondingDelegations",n).then((e=>t.QueryValidatorUnbondingDelegationsResponse.decode(new i.default.Reader(e))))}Delegation(e){const n=t.QueryDelegationRequest.encode(e).finish();return this.rpc.request("cosmos.staking.v1beta1.Query","Delegation",n).then((e=>t.QueryDelegationResponse.decode(new i.default.Reader(e))))}UnbondingDelegation(e){const n=t.QueryUnbondingDelegationRequest.encode(e).finish();return this.rpc.request("cosmos.staking.v1beta1.Query","UnbondingDelegation",n).then((e=>t.QueryUnbondingDelegationResponse.decode(new i.default.Reader(e))))}DelegatorDelegations(e){const n=t.QueryDelegatorDelegationsRequest.encode(e).finish();return this.rpc.request("cosmos.staking.v1beta1.Query","DelegatorDelegations",n).then((e=>t.QueryDelegatorDelegationsResponse.decode(new i.default.Reader(e))))}DelegatorUnbondingDelegations(e){const n=t.QueryDelegatorUnbondingDelegationsRequest.encode(e).finish();return this.rpc.request("cosmos.staking.v1beta1.Query","DelegatorUnbondingDelegations",n).then((e=>t.QueryDelegatorUnbondingDelegationsResponse.decode(new i.default.Reader(e))))}Redelegations(e){const n=t.QueryRedelegationsRequest.encode(e).finish();return this.rpc.request("cosmos.staking.v1beta1.Query","Redelegations",n).then((e=>t.QueryRedelegationsResponse.decode(new i.default.Reader(e))))}DelegatorValidators(e){const n=t.QueryDelegatorValidatorsRequest.encode(e).finish();return this.rpc.request("cosmos.staking.v1beta1.Query","DelegatorValidators",n).then((e=>t.QueryDelegatorValidatorsResponse.decode(new i.default.Reader(e))))}DelegatorValidator(e){const n=t.QueryDelegatorValidatorRequest.encode(e).finish();return this.rpc.request("cosmos.staking.v1beta1.Query","DelegatorValidator",n).then((e=>t.QueryDelegatorValidatorResponse.decode(new i.default.Reader(e))))}HistoricalInfo(e){const n=t.QueryHistoricalInfoRequest.encode(e).finish();return this.rpc.request("cosmos.staking.v1beta1.Query","HistoricalInfo",n).then((e=>t.QueryHistoricalInfoResponse.decode(new i.default.Reader(e))))}Pool(e){const n=t.QueryPoolRequest.encode(e).finish();return this.rpc.request("cosmos.staking.v1beta1.Query","Pool",n).then((e=>t.QueryPoolResponse.decode(new i.default.Reader(e))))}Params(e){const n=t.QueryParamsRequest.encode(e).finish();return this.rpc.request("cosmos.staking.v1beta1.Query","Params",n).then((e=>t.QueryParamsResponse.decode(new i.default.Reader(e))))}},i.default.util.Long!==o.default&&(i.default.util.Long=o.default,i.default.configure())},9355:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Pool=t.RedelegationResponse=t.RedelegationEntryResponse=t.DelegationResponse=t.Params=t.Redelegation=t.RedelegationEntry=t.UnbondingDelegationEntry=t.UnbondingDelegation=t.Delegation=t.DVVTriplets=t.DVVTriplet=t.DVPairs=t.DVPair=t.ValAddresses=t.Validator=t.Description=t.Commission=t.CommissionRates=t.HistoricalInfo=t.bondStatusToJSON=t.bondStatusFromJSON=t.BondStatus=t.protobufPackage=void 0;const o=r(n(3720)),i=r(n(3789)),a=n(1258),s=n(5522),c=n(3862),d=n(281),u=n(891);var l;function A(e){switch(e){case 0:case"BOND_STATUS_UNSPECIFIED":return l.BOND_STATUS_UNSPECIFIED;case 1:case"BOND_STATUS_UNBONDED":return l.BOND_STATUS_UNBONDED;case 2:case"BOND_STATUS_UNBONDING":return l.BOND_STATUS_UNBONDING;case 3:case"BOND_STATUS_BONDED":return l.BOND_STATUS_BONDED;default:return l.UNRECOGNIZED}}function f(e){switch(e){case l.BOND_STATUS_UNSPECIFIED:return"BOND_STATUS_UNSPECIFIED";case l.BOND_STATUS_UNBONDED:return"BOND_STATUS_UNBONDED";case l.BOND_STATUS_UNBONDING:return"BOND_STATUS_UNBONDING";case l.BOND_STATUS_BONDED:return"BOND_STATUS_BONDED";default:return"UNKNOWN"}}t.protobufPackage="cosmos.staking.v1beta1",function(e){e[e.BOND_STATUS_UNSPECIFIED=0]="BOND_STATUS_UNSPECIFIED",e[e.BOND_STATUS_UNBONDED=1]="BOND_STATUS_UNBONDED",e[e.BOND_STATUS_UNBONDING=2]="BOND_STATUS_UNBONDING",e[e.BOND_STATUS_BONDED=3]="BOND_STATUS_BONDED",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(l=t.BondStatus||(t.BondStatus={})),t.bondStatusFromJSON=A,t.bondStatusToJSON=f;const h={};t.HistoricalInfo={encode(e,n=i.default.Writer.create()){void 0!==e.header&&a.Header.encode(e.header,n.uint32(10).fork()).ldelim();for(const r of e.valset)t.Validator.encode(r,n.uint32(18).fork()).ldelim();return n},decode(e,n){const r=e instanceof i.default.Reader?e:new i.default.Reader(e);let o=void 0===n?r.len:r.pos+n;const s=Object.assign({},h);for(s.valset=[];r.pos>>3){case 1:s.header=a.Header.decode(r,r.uint32());break;case 2:s.valset.push(t.Validator.decode(r,r.uint32()));break;default:r.skipType(7&e)}}return s},fromJSON(e){var n;const r=Object.assign({},h);return r.header=void 0!==e.header&&null!==e.header?a.Header.fromJSON(e.header):void 0,r.valset=(null!==(n=e.valset)&&void 0!==n?n:[]).map((e=>t.Validator.fromJSON(e))),r},toJSON(e){const n={};return void 0!==e.header&&(n.header=e.header?a.Header.toJSON(e.header):void 0),e.valset?n.valset=e.valset.map((e=>e?t.Validator.toJSON(e):void 0)):n.valset=[],n},fromPartial(e){var n;const r=Object.assign({},h);return r.header=void 0!==e.header&&null!==e.header?a.Header.fromPartial(e.header):void 0,r.valset=(null===(n=e.valset)||void 0===n?void 0:n.map((e=>t.Validator.fromPartial(e))))||[],r}};const g={rate:"",maxRate:"",maxChangeRate:""};t.CommissionRates={encode:(e,t=i.default.Writer.create())=>(""!==e.rate&&t.uint32(10).string(e.rate),""!==e.maxRate&&t.uint32(18).string(e.maxRate),""!==e.maxChangeRate&&t.uint32(26).string(e.maxChangeRate),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},g);for(;n.pos>>3){case 1:o.rate=n.string();break;case 2:o.maxRate=n.string();break;case 3:o.maxChangeRate=n.string();break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},g);return t.rate=void 0!==e.rate&&null!==e.rate?String(e.rate):"",t.maxRate=void 0!==e.maxRate&&null!==e.maxRate?String(e.maxRate):"",t.maxChangeRate=void 0!==e.maxChangeRate&&null!==e.maxChangeRate?String(e.maxChangeRate):"",t},toJSON(e){const t={};return void 0!==e.rate&&(t.rate=e.rate),void 0!==e.maxRate&&(t.maxRate=e.maxRate),void 0!==e.maxChangeRate&&(t.maxChangeRate=e.maxChangeRate),t},fromPartial(e){var t,n,r;const o=Object.assign({},g);return o.rate=null!==(t=e.rate)&&void 0!==t?t:"",o.maxRate=null!==(n=e.maxRate)&&void 0!==n?n:"",o.maxChangeRate=null!==(r=e.maxChangeRate)&&void 0!==r?r:"",o}};const p={};t.Commission={encode:(e,n=i.default.Writer.create())=>(void 0!==e.commissionRates&&t.CommissionRates.encode(e.commissionRates,n.uint32(10).fork()).ldelim(),void 0!==e.updateTime&&s.Timestamp.encode(e.updateTime,n.uint32(18).fork()).ldelim(),n),decode(e,n){const r=e instanceof i.default.Reader?e:new i.default.Reader(e);let o=void 0===n?r.len:r.pos+n;const a=Object.assign({},p);for(;r.pos>>3){case 1:a.commissionRates=t.CommissionRates.decode(r,r.uint32());break;case 2:a.updateTime=s.Timestamp.decode(r,r.uint32());break;default:r.skipType(7&e)}}return a},fromJSON(e){const n=Object.assign({},p);return n.commissionRates=void 0!==e.commissionRates&&null!==e.commissionRates?t.CommissionRates.fromJSON(e.commissionRates):void 0,n.updateTime=void 0!==e.updateTime&&null!==e.updateTime?M(e.updateTime):void 0,n},toJSON(e){const n={};return void 0!==e.commissionRates&&(n.commissionRates=e.commissionRates?t.CommissionRates.toJSON(e.commissionRates):void 0),void 0!==e.updateTime&&(n.updateTime=D(e.updateTime).toISOString()),n},fromPartial(e){const n=Object.assign({},p);return n.commissionRates=void 0!==e.commissionRates&&null!==e.commissionRates?t.CommissionRates.fromPartial(e.commissionRates):void 0,n.updateTime=void 0!==e.updateTime&&null!==e.updateTime?s.Timestamp.fromPartial(e.updateTime):void 0,n}};const m={moniker:"",identity:"",website:"",securityContact:"",details:""};t.Description={encode:(e,t=i.default.Writer.create())=>(""!==e.moniker&&t.uint32(10).string(e.moniker),""!==e.identity&&t.uint32(18).string(e.identity),""!==e.website&&t.uint32(26).string(e.website),""!==e.securityContact&&t.uint32(34).string(e.securityContact),""!==e.details&&t.uint32(42).string(e.details),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},m);for(;n.pos>>3){case 1:o.moniker=n.string();break;case 2:o.identity=n.string();break;case 3:o.website=n.string();break;case 4:o.securityContact=n.string();break;case 5:o.details=n.string();break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},m);return t.moniker=void 0!==e.moniker&&null!==e.moniker?String(e.moniker):"",t.identity=void 0!==e.identity&&null!==e.identity?String(e.identity):"",t.website=void 0!==e.website&&null!==e.website?String(e.website):"",t.securityContact=void 0!==e.securityContact&&null!==e.securityContact?String(e.securityContact):"",t.details=void 0!==e.details&&null!==e.details?String(e.details):"",t},toJSON(e){const t={};return void 0!==e.moniker&&(t.moniker=e.moniker),void 0!==e.identity&&(t.identity=e.identity),void 0!==e.website&&(t.website=e.website),void 0!==e.securityContact&&(t.securityContact=e.securityContact),void 0!==e.details&&(t.details=e.details),t},fromPartial(e){var t,n,r,o,i;const a=Object.assign({},m);return a.moniker=null!==(t=e.moniker)&&void 0!==t?t:"",a.identity=null!==(n=e.identity)&&void 0!==n?n:"",a.website=null!==(r=e.website)&&void 0!==r?r:"",a.securityContact=null!==(o=e.securityContact)&&void 0!==o?o:"",a.details=null!==(i=e.details)&&void 0!==i?i:"",a}};const v={operatorAddress:"",jailed:!1,status:0,tokens:"",delegatorShares:"",unbondingHeight:o.default.ZERO,minSelfDelegation:""};t.Validator={encode:(e,n=i.default.Writer.create())=>(""!==e.operatorAddress&&n.uint32(10).string(e.operatorAddress),void 0!==e.consensusPubkey&&c.Any.encode(e.consensusPubkey,n.uint32(18).fork()).ldelim(),!0===e.jailed&&n.uint32(24).bool(e.jailed),0!==e.status&&n.uint32(32).int32(e.status),""!==e.tokens&&n.uint32(42).string(e.tokens),""!==e.delegatorShares&&n.uint32(50).string(e.delegatorShares),void 0!==e.description&&t.Description.encode(e.description,n.uint32(58).fork()).ldelim(),e.unbondingHeight.isZero()||n.uint32(64).int64(e.unbondingHeight),void 0!==e.unbondingTime&&s.Timestamp.encode(e.unbondingTime,n.uint32(74).fork()).ldelim(),void 0!==e.commission&&t.Commission.encode(e.commission,n.uint32(82).fork()).ldelim(),""!==e.minSelfDelegation&&n.uint32(90).string(e.minSelfDelegation),n),decode(e,n){const r=e instanceof i.default.Reader?e:new i.default.Reader(e);let o=void 0===n?r.len:r.pos+n;const a=Object.assign({},v);for(;r.pos>>3){case 1:a.operatorAddress=r.string();break;case 2:a.consensusPubkey=c.Any.decode(r,r.uint32());break;case 3:a.jailed=r.bool();break;case 4:a.status=r.int32();break;case 5:a.tokens=r.string();break;case 6:a.delegatorShares=r.string();break;case 7:a.description=t.Description.decode(r,r.uint32());break;case 8:a.unbondingHeight=r.int64();break;case 9:a.unbondingTime=s.Timestamp.decode(r,r.uint32());break;case 10:a.commission=t.Commission.decode(r,r.uint32());break;case 11:a.minSelfDelegation=r.string();break;default:r.skipType(7&e)}}return a},fromJSON(e){const n=Object.assign({},v);return n.operatorAddress=void 0!==e.operatorAddress&&null!==e.operatorAddress?String(e.operatorAddress):"",n.consensusPubkey=void 0!==e.consensusPubkey&&null!==e.consensusPubkey?c.Any.fromJSON(e.consensusPubkey):void 0,n.jailed=void 0!==e.jailed&&null!==e.jailed&&Boolean(e.jailed),n.status=void 0!==e.status&&null!==e.status?A(e.status):0,n.tokens=void 0!==e.tokens&&null!==e.tokens?String(e.tokens):"",n.delegatorShares=void 0!==e.delegatorShares&&null!==e.delegatorShares?String(e.delegatorShares):"",n.description=void 0!==e.description&&null!==e.description?t.Description.fromJSON(e.description):void 0,n.unbondingHeight=void 0!==e.unbondingHeight&&null!==e.unbondingHeight?o.default.fromString(e.unbondingHeight):o.default.ZERO,n.unbondingTime=void 0!==e.unbondingTime&&null!==e.unbondingTime?M(e.unbondingTime):void 0,n.commission=void 0!==e.commission&&null!==e.commission?t.Commission.fromJSON(e.commission):void 0,n.minSelfDelegation=void 0!==e.minSelfDelegation&&null!==e.minSelfDelegation?String(e.minSelfDelegation):"",n},toJSON(e){const n={};return void 0!==e.operatorAddress&&(n.operatorAddress=e.operatorAddress),void 0!==e.consensusPubkey&&(n.consensusPubkey=e.consensusPubkey?c.Any.toJSON(e.consensusPubkey):void 0),void 0!==e.jailed&&(n.jailed=e.jailed),void 0!==e.status&&(n.status=f(e.status)),void 0!==e.tokens&&(n.tokens=e.tokens),void 0!==e.delegatorShares&&(n.delegatorShares=e.delegatorShares),void 0!==e.description&&(n.description=e.description?t.Description.toJSON(e.description):void 0),void 0!==e.unbondingHeight&&(n.unbondingHeight=(e.unbondingHeight||o.default.ZERO).toString()),void 0!==e.unbondingTime&&(n.unbondingTime=D(e.unbondingTime).toISOString()),void 0!==e.commission&&(n.commission=e.commission?t.Commission.toJSON(e.commission):void 0),void 0!==e.minSelfDelegation&&(n.minSelfDelegation=e.minSelfDelegation),n},fromPartial(e){var n,r,i,a,d,u;const l=Object.assign({},v);return l.operatorAddress=null!==(n=e.operatorAddress)&&void 0!==n?n:"",l.consensusPubkey=void 0!==e.consensusPubkey&&null!==e.consensusPubkey?c.Any.fromPartial(e.consensusPubkey):void 0,l.jailed=null!==(r=e.jailed)&&void 0!==r&&r,l.status=null!==(i=e.status)&&void 0!==i?i:0,l.tokens=null!==(a=e.tokens)&&void 0!==a?a:"",l.delegatorShares=null!==(d=e.delegatorShares)&&void 0!==d?d:"",l.description=void 0!==e.description&&null!==e.description?t.Description.fromPartial(e.description):void 0,l.unbondingHeight=void 0!==e.unbondingHeight&&null!==e.unbondingHeight?o.default.fromValue(e.unbondingHeight):o.default.ZERO,l.unbondingTime=void 0!==e.unbondingTime&&null!==e.unbondingTime?s.Timestamp.fromPartial(e.unbondingTime):void 0,l.commission=void 0!==e.commission&&null!==e.commission?t.Commission.fromPartial(e.commission):void 0,l.minSelfDelegation=null!==(u=e.minSelfDelegation)&&void 0!==u?u:"",l}};const y={addresses:""};t.ValAddresses={encode(e,t=i.default.Writer.create()){for(const n of e.addresses)t.uint32(10).string(n);return t},decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},y);for(o.addresses=[];n.pos>>3==1?o.addresses.push(n.string()):n.skipType(7&e)}return o},fromJSON(e){var t;const n=Object.assign({},y);return n.addresses=(null!==(t=e.addresses)&&void 0!==t?t:[]).map((e=>String(e))),n},toJSON(e){const t={};return e.addresses?t.addresses=e.addresses.map((e=>e)):t.addresses=[],t},fromPartial(e){var t;const n=Object.assign({},y);return n.addresses=(null===(t=e.addresses)||void 0===t?void 0:t.map((e=>e)))||[],n}};const b={delegatorAddress:"",validatorAddress:""};t.DVPair={encode:(e,t=i.default.Writer.create())=>(""!==e.delegatorAddress&&t.uint32(10).string(e.delegatorAddress),""!==e.validatorAddress&&t.uint32(18).string(e.validatorAddress),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},b);for(;n.pos>>3){case 1:o.delegatorAddress=n.string();break;case 2:o.validatorAddress=n.string();break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},b);return t.delegatorAddress=void 0!==e.delegatorAddress&&null!==e.delegatorAddress?String(e.delegatorAddress):"",t.validatorAddress=void 0!==e.validatorAddress&&null!==e.validatorAddress?String(e.validatorAddress):"",t},toJSON(e){const t={};return void 0!==e.delegatorAddress&&(t.delegatorAddress=e.delegatorAddress),void 0!==e.validatorAddress&&(t.validatorAddress=e.validatorAddress),t},fromPartial(e){var t,n;const r=Object.assign({},b);return r.delegatorAddress=null!==(t=e.delegatorAddress)&&void 0!==t?t:"",r.validatorAddress=null!==(n=e.validatorAddress)&&void 0!==n?n:"",r}};const I={};t.DVPairs={encode(e,n=i.default.Writer.create()){for(const r of e.pairs)t.DVPair.encode(r,n.uint32(10).fork()).ldelim();return n},decode(e,n){const r=e instanceof i.default.Reader?e:new i.default.Reader(e);let o=void 0===n?r.len:r.pos+n;const a=Object.assign({},I);for(a.pairs=[];r.pos>>3==1?a.pairs.push(t.DVPair.decode(r,r.uint32())):r.skipType(7&e)}return a},fromJSON(e){var n;const r=Object.assign({},I);return r.pairs=(null!==(n=e.pairs)&&void 0!==n?n:[]).map((e=>t.DVPair.fromJSON(e))),r},toJSON(e){const n={};return e.pairs?n.pairs=e.pairs.map((e=>e?t.DVPair.toJSON(e):void 0)):n.pairs=[],n},fromPartial(e){var n;const r=Object.assign({},I);return r.pairs=(null===(n=e.pairs)||void 0===n?void 0:n.map((e=>t.DVPair.fromPartial(e))))||[],r}};const C={delegatorAddress:"",validatorSrcAddress:"",validatorDstAddress:""};t.DVVTriplet={encode:(e,t=i.default.Writer.create())=>(""!==e.delegatorAddress&&t.uint32(10).string(e.delegatorAddress),""!==e.validatorSrcAddress&&t.uint32(18).string(e.validatorSrcAddress),""!==e.validatorDstAddress&&t.uint32(26).string(e.validatorDstAddress),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},C);for(;n.pos>>3){case 1:o.delegatorAddress=n.string();break;case 2:o.validatorSrcAddress=n.string();break;case 3:o.validatorDstAddress=n.string();break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},C);return t.delegatorAddress=void 0!==e.delegatorAddress&&null!==e.delegatorAddress?String(e.delegatorAddress):"",t.validatorSrcAddress=void 0!==e.validatorSrcAddress&&null!==e.validatorSrcAddress?String(e.validatorSrcAddress):"",t.validatorDstAddress=void 0!==e.validatorDstAddress&&null!==e.validatorDstAddress?String(e.validatorDstAddress):"",t},toJSON(e){const t={};return void 0!==e.delegatorAddress&&(t.delegatorAddress=e.delegatorAddress),void 0!==e.validatorSrcAddress&&(t.validatorSrcAddress=e.validatorSrcAddress),void 0!==e.validatorDstAddress&&(t.validatorDstAddress=e.validatorDstAddress),t},fromPartial(e){var t,n,r;const o=Object.assign({},C);return o.delegatorAddress=null!==(t=e.delegatorAddress)&&void 0!==t?t:"",o.validatorSrcAddress=null!==(n=e.validatorSrcAddress)&&void 0!==n?n:"",o.validatorDstAddress=null!==(r=e.validatorDstAddress)&&void 0!==r?r:"",o}};const E={};t.DVVTriplets={encode(e,n=i.default.Writer.create()){for(const r of e.triplets)t.DVVTriplet.encode(r,n.uint32(10).fork()).ldelim();return n},decode(e,n){const r=e instanceof i.default.Reader?e:new i.default.Reader(e);let o=void 0===n?r.len:r.pos+n;const a=Object.assign({},E);for(a.triplets=[];r.pos>>3==1?a.triplets.push(t.DVVTriplet.decode(r,r.uint32())):r.skipType(7&e)}return a},fromJSON(e){var n;const r=Object.assign({},E);return r.triplets=(null!==(n=e.triplets)&&void 0!==n?n:[]).map((e=>t.DVVTriplet.fromJSON(e))),r},toJSON(e){const n={};return e.triplets?n.triplets=e.triplets.map((e=>e?t.DVVTriplet.toJSON(e):void 0)):n.triplets=[],n},fromPartial(e){var n;const r=Object.assign({},E);return r.triplets=(null===(n=e.triplets)||void 0===n?void 0:n.map((e=>t.DVVTriplet.fromPartial(e))))||[],r}};const w={delegatorAddress:"",validatorAddress:"",shares:""};t.Delegation={encode:(e,t=i.default.Writer.create())=>(""!==e.delegatorAddress&&t.uint32(10).string(e.delegatorAddress),""!==e.validatorAddress&&t.uint32(18).string(e.validatorAddress),""!==e.shares&&t.uint32(26).string(e.shares),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},w);for(;n.pos>>3){case 1:o.delegatorAddress=n.string();break;case 2:o.validatorAddress=n.string();break;case 3:o.shares=n.string();break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},w);return t.delegatorAddress=void 0!==e.delegatorAddress&&null!==e.delegatorAddress?String(e.delegatorAddress):"",t.validatorAddress=void 0!==e.validatorAddress&&null!==e.validatorAddress?String(e.validatorAddress):"",t.shares=void 0!==e.shares&&null!==e.shares?String(e.shares):"",t},toJSON(e){const t={};return void 0!==e.delegatorAddress&&(t.delegatorAddress=e.delegatorAddress),void 0!==e.validatorAddress&&(t.validatorAddress=e.validatorAddress),void 0!==e.shares&&(t.shares=e.shares),t},fromPartial(e){var t,n,r;const o=Object.assign({},w);return o.delegatorAddress=null!==(t=e.delegatorAddress)&&void 0!==t?t:"",o.validatorAddress=null!==(n=e.validatorAddress)&&void 0!==n?n:"",o.shares=null!==(r=e.shares)&&void 0!==r?r:"",o}};const B={delegatorAddress:"",validatorAddress:""};t.UnbondingDelegation={encode(e,n=i.default.Writer.create()){""!==e.delegatorAddress&&n.uint32(10).string(e.delegatorAddress),""!==e.validatorAddress&&n.uint32(18).string(e.validatorAddress);for(const r of e.entries)t.UnbondingDelegationEntry.encode(r,n.uint32(26).fork()).ldelim();return n},decode(e,n){const r=e instanceof i.default.Reader?e:new i.default.Reader(e);let o=void 0===n?r.len:r.pos+n;const a=Object.assign({},B);for(a.entries=[];r.pos>>3){case 1:a.delegatorAddress=r.string();break;case 2:a.validatorAddress=r.string();break;case 3:a.entries.push(t.UnbondingDelegationEntry.decode(r,r.uint32()));break;default:r.skipType(7&e)}}return a},fromJSON(e){var n;const r=Object.assign({},B);return r.delegatorAddress=void 0!==e.delegatorAddress&&null!==e.delegatorAddress?String(e.delegatorAddress):"",r.validatorAddress=void 0!==e.validatorAddress&&null!==e.validatorAddress?String(e.validatorAddress):"",r.entries=(null!==(n=e.entries)&&void 0!==n?n:[]).map((e=>t.UnbondingDelegationEntry.fromJSON(e))),r},toJSON(e){const n={};return void 0!==e.delegatorAddress&&(n.delegatorAddress=e.delegatorAddress),void 0!==e.validatorAddress&&(n.validatorAddress=e.validatorAddress),e.entries?n.entries=e.entries.map((e=>e?t.UnbondingDelegationEntry.toJSON(e):void 0)):n.entries=[],n},fromPartial(e){var n,r,o;const i=Object.assign({},B);return i.delegatorAddress=null!==(n=e.delegatorAddress)&&void 0!==n?n:"",i.validatorAddress=null!==(r=e.validatorAddress)&&void 0!==r?r:"",i.entries=(null===(o=e.entries)||void 0===o?void 0:o.map((e=>t.UnbondingDelegationEntry.fromPartial(e))))||[],i}};const _={creationHeight:o.default.ZERO,initialBalance:"",balance:""};t.UnbondingDelegationEntry={encode:(e,t=i.default.Writer.create())=>(e.creationHeight.isZero()||t.uint32(8).int64(e.creationHeight),void 0!==e.completionTime&&s.Timestamp.encode(e.completionTime,t.uint32(18).fork()).ldelim(),""!==e.initialBalance&&t.uint32(26).string(e.initialBalance),""!==e.balance&&t.uint32(34).string(e.balance),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},_);for(;n.pos>>3){case 1:o.creationHeight=n.int64();break;case 2:o.completionTime=s.Timestamp.decode(n,n.uint32());break;case 3:o.initialBalance=n.string();break;case 4:o.balance=n.string();break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},_);return t.creationHeight=void 0!==e.creationHeight&&null!==e.creationHeight?o.default.fromString(e.creationHeight):o.default.ZERO,t.completionTime=void 0!==e.completionTime&&null!==e.completionTime?M(e.completionTime):void 0,t.initialBalance=void 0!==e.initialBalance&&null!==e.initialBalance?String(e.initialBalance):"",t.balance=void 0!==e.balance&&null!==e.balance?String(e.balance):"",t},toJSON(e){const t={};return void 0!==e.creationHeight&&(t.creationHeight=(e.creationHeight||o.default.ZERO).toString()),void 0!==e.completionTime&&(t.completionTime=D(e.completionTime).toISOString()),void 0!==e.initialBalance&&(t.initialBalance=e.initialBalance),void 0!==e.balance&&(t.balance=e.balance),t},fromPartial(e){var t,n;const r=Object.assign({},_);return r.creationHeight=void 0!==e.creationHeight&&null!==e.creationHeight?o.default.fromValue(e.creationHeight):o.default.ZERO,r.completionTime=void 0!==e.completionTime&&null!==e.completionTime?s.Timestamp.fromPartial(e.completionTime):void 0,r.initialBalance=null!==(t=e.initialBalance)&&void 0!==t?t:"",r.balance=null!==(n=e.balance)&&void 0!==n?n:"",r}};const S={creationHeight:o.default.ZERO,initialBalance:"",sharesDst:""};t.RedelegationEntry={encode:(e,t=i.default.Writer.create())=>(e.creationHeight.isZero()||t.uint32(8).int64(e.creationHeight),void 0!==e.completionTime&&s.Timestamp.encode(e.completionTime,t.uint32(18).fork()).ldelim(),""!==e.initialBalance&&t.uint32(26).string(e.initialBalance),""!==e.sharesDst&&t.uint32(34).string(e.sharesDst),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},S);for(;n.pos>>3){case 1:o.creationHeight=n.int64();break;case 2:o.completionTime=s.Timestamp.decode(n,n.uint32());break;case 3:o.initialBalance=n.string();break;case 4:o.sharesDst=n.string();break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},S);return t.creationHeight=void 0!==e.creationHeight&&null!==e.creationHeight?o.default.fromString(e.creationHeight):o.default.ZERO,t.completionTime=void 0!==e.completionTime&&null!==e.completionTime?M(e.completionTime):void 0,t.initialBalance=void 0!==e.initialBalance&&null!==e.initialBalance?String(e.initialBalance):"",t.sharesDst=void 0!==e.sharesDst&&null!==e.sharesDst?String(e.sharesDst):"",t},toJSON(e){const t={};return void 0!==e.creationHeight&&(t.creationHeight=(e.creationHeight||o.default.ZERO).toString()),void 0!==e.completionTime&&(t.completionTime=D(e.completionTime).toISOString()),void 0!==e.initialBalance&&(t.initialBalance=e.initialBalance),void 0!==e.sharesDst&&(t.sharesDst=e.sharesDst),t},fromPartial(e){var t,n;const r=Object.assign({},S);return r.creationHeight=void 0!==e.creationHeight&&null!==e.creationHeight?o.default.fromValue(e.creationHeight):o.default.ZERO,r.completionTime=void 0!==e.completionTime&&null!==e.completionTime?s.Timestamp.fromPartial(e.completionTime):void 0,r.initialBalance=null!==(t=e.initialBalance)&&void 0!==t?t:"",r.sharesDst=null!==(n=e.sharesDst)&&void 0!==n?n:"",r}};const k={delegatorAddress:"",validatorSrcAddress:"",validatorDstAddress:""};t.Redelegation={encode(e,n=i.default.Writer.create()){""!==e.delegatorAddress&&n.uint32(10).string(e.delegatorAddress),""!==e.validatorSrcAddress&&n.uint32(18).string(e.validatorSrcAddress),""!==e.validatorDstAddress&&n.uint32(26).string(e.validatorDstAddress);for(const r of e.entries)t.RedelegationEntry.encode(r,n.uint32(34).fork()).ldelim();return n},decode(e,n){const r=e instanceof i.default.Reader?e:new i.default.Reader(e);let o=void 0===n?r.len:r.pos+n;const a=Object.assign({},k);for(a.entries=[];r.pos>>3){case 1:a.delegatorAddress=r.string();break;case 2:a.validatorSrcAddress=r.string();break;case 3:a.validatorDstAddress=r.string();break;case 4:a.entries.push(t.RedelegationEntry.decode(r,r.uint32()));break;default:r.skipType(7&e)}}return a},fromJSON(e){var n;const r=Object.assign({},k);return r.delegatorAddress=void 0!==e.delegatorAddress&&null!==e.delegatorAddress?String(e.delegatorAddress):"",r.validatorSrcAddress=void 0!==e.validatorSrcAddress&&null!==e.validatorSrcAddress?String(e.validatorSrcAddress):"",r.validatorDstAddress=void 0!==e.validatorDstAddress&&null!==e.validatorDstAddress?String(e.validatorDstAddress):"",r.entries=(null!==(n=e.entries)&&void 0!==n?n:[]).map((e=>t.RedelegationEntry.fromJSON(e))),r},toJSON(e){const n={};return void 0!==e.delegatorAddress&&(n.delegatorAddress=e.delegatorAddress),void 0!==e.validatorSrcAddress&&(n.validatorSrcAddress=e.validatorSrcAddress),void 0!==e.validatorDstAddress&&(n.validatorDstAddress=e.validatorDstAddress),e.entries?n.entries=e.entries.map((e=>e?t.RedelegationEntry.toJSON(e):void 0)):n.entries=[],n},fromPartial(e){var n,r,o,i;const a=Object.assign({},k);return a.delegatorAddress=null!==(n=e.delegatorAddress)&&void 0!==n?n:"",a.validatorSrcAddress=null!==(r=e.validatorSrcAddress)&&void 0!==r?r:"",a.validatorDstAddress=null!==(o=e.validatorDstAddress)&&void 0!==o?o:"",a.entries=(null===(i=e.entries)||void 0===i?void 0:i.map((e=>t.RedelegationEntry.fromPartial(e))))||[],a}};const O={maxValidators:0,maxEntries:0,historicalEntries:0,bondDenom:""};t.Params={encode:(e,t=i.default.Writer.create())=>(void 0!==e.unbondingTime&&d.Duration.encode(e.unbondingTime,t.uint32(10).fork()).ldelim(),0!==e.maxValidators&&t.uint32(16).uint32(e.maxValidators),0!==e.maxEntries&&t.uint32(24).uint32(e.maxEntries),0!==e.historicalEntries&&t.uint32(32).uint32(e.historicalEntries),""!==e.bondDenom&&t.uint32(42).string(e.bondDenom),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},O);for(;n.pos>>3){case 1:o.unbondingTime=d.Duration.decode(n,n.uint32());break;case 2:o.maxValidators=n.uint32();break;case 3:o.maxEntries=n.uint32();break;case 4:o.historicalEntries=n.uint32();break;case 5:o.bondDenom=n.string();break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},O);return t.unbondingTime=void 0!==e.unbondingTime&&null!==e.unbondingTime?d.Duration.fromJSON(e.unbondingTime):void 0,t.maxValidators=void 0!==e.maxValidators&&null!==e.maxValidators?Number(e.maxValidators):0,t.maxEntries=void 0!==e.maxEntries&&null!==e.maxEntries?Number(e.maxEntries):0,t.historicalEntries=void 0!==e.historicalEntries&&null!==e.historicalEntries?Number(e.historicalEntries):0,t.bondDenom=void 0!==e.bondDenom&&null!==e.bondDenom?String(e.bondDenom):"",t},toJSON(e){const t={};return void 0!==e.unbondingTime&&(t.unbondingTime=e.unbondingTime?d.Duration.toJSON(e.unbondingTime):void 0),void 0!==e.maxValidators&&(t.maxValidators=e.maxValidators),void 0!==e.maxEntries&&(t.maxEntries=e.maxEntries),void 0!==e.historicalEntries&&(t.historicalEntries=e.historicalEntries),void 0!==e.bondDenom&&(t.bondDenom=e.bondDenom),t},fromPartial(e){var t,n,r,o;const i=Object.assign({},O);return i.unbondingTime=void 0!==e.unbondingTime&&null!==e.unbondingTime?d.Duration.fromPartial(e.unbondingTime):void 0,i.maxValidators=null!==(t=e.maxValidators)&&void 0!==t?t:0,i.maxEntries=null!==(n=e.maxEntries)&&void 0!==n?n:0,i.historicalEntries=null!==(r=e.historicalEntries)&&void 0!==r?r:0,i.bondDenom=null!==(o=e.bondDenom)&&void 0!==o?o:"",i}};const Q={};t.DelegationResponse={encode:(e,n=i.default.Writer.create())=>(void 0!==e.delegation&&t.Delegation.encode(e.delegation,n.uint32(10).fork()).ldelim(),void 0!==e.balance&&u.Coin.encode(e.balance,n.uint32(18).fork()).ldelim(),n),decode(e,n){const r=e instanceof i.default.Reader?e:new i.default.Reader(e);let o=void 0===n?r.len:r.pos+n;const a=Object.assign({},Q);for(;r.pos>>3){case 1:a.delegation=t.Delegation.decode(r,r.uint32());break;case 2:a.balance=u.Coin.decode(r,r.uint32());break;default:r.skipType(7&e)}}return a},fromJSON(e){const n=Object.assign({},Q);return n.delegation=void 0!==e.delegation&&null!==e.delegation?t.Delegation.fromJSON(e.delegation):void 0,n.balance=void 0!==e.balance&&null!==e.balance?u.Coin.fromJSON(e.balance):void 0,n},toJSON(e){const n={};return void 0!==e.delegation&&(n.delegation=e.delegation?t.Delegation.toJSON(e.delegation):void 0),void 0!==e.balance&&(n.balance=e.balance?u.Coin.toJSON(e.balance):void 0),n},fromPartial(e){const n=Object.assign({},Q);return n.delegation=void 0!==e.delegation&&null!==e.delegation?t.Delegation.fromPartial(e.delegation):void 0,n.balance=void 0!==e.balance&&null!==e.balance?u.Coin.fromPartial(e.balance):void 0,n}};const R={balance:""};t.RedelegationEntryResponse={encode:(e,n=i.default.Writer.create())=>(void 0!==e.redelegationEntry&&t.RedelegationEntry.encode(e.redelegationEntry,n.uint32(10).fork()).ldelim(),""!==e.balance&&n.uint32(34).string(e.balance),n),decode(e,n){const r=e instanceof i.default.Reader?e:new i.default.Reader(e);let o=void 0===n?r.len:r.pos+n;const a=Object.assign({},R);for(;r.pos>>3){case 1:a.redelegationEntry=t.RedelegationEntry.decode(r,r.uint32());break;case 4:a.balance=r.string();break;default:r.skipType(7&e)}}return a},fromJSON(e){const n=Object.assign({},R);return n.redelegationEntry=void 0!==e.redelegationEntry&&null!==e.redelegationEntry?t.RedelegationEntry.fromJSON(e.redelegationEntry):void 0,n.balance=void 0!==e.balance&&null!==e.balance?String(e.balance):"",n},toJSON(e){const n={};return void 0!==e.redelegationEntry&&(n.redelegationEntry=e.redelegationEntry?t.RedelegationEntry.toJSON(e.redelegationEntry):void 0),void 0!==e.balance&&(n.balance=e.balance),n},fromPartial(e){var n;const r=Object.assign({},R);return r.redelegationEntry=void 0!==e.redelegationEntry&&null!==e.redelegationEntry?t.RedelegationEntry.fromPartial(e.redelegationEntry):void 0,r.balance=null!==(n=e.balance)&&void 0!==n?n:"",r}};const P={};t.RedelegationResponse={encode(e,n=i.default.Writer.create()){void 0!==e.redelegation&&t.Redelegation.encode(e.redelegation,n.uint32(10).fork()).ldelim();for(const r of e.entries)t.RedelegationEntryResponse.encode(r,n.uint32(18).fork()).ldelim();return n},decode(e,n){const r=e instanceof i.default.Reader?e:new i.default.Reader(e);let o=void 0===n?r.len:r.pos+n;const a=Object.assign({},P);for(a.entries=[];r.pos>>3){case 1:a.redelegation=t.Redelegation.decode(r,r.uint32());break;case 2:a.entries.push(t.RedelegationEntryResponse.decode(r,r.uint32()));break;default:r.skipType(7&e)}}return a},fromJSON(e){var n;const r=Object.assign({},P);return r.redelegation=void 0!==e.redelegation&&null!==e.redelegation?t.Redelegation.fromJSON(e.redelegation):void 0,r.entries=(null!==(n=e.entries)&&void 0!==n?n:[]).map((e=>t.RedelegationEntryResponse.fromJSON(e))),r},toJSON(e){const n={};return void 0!==e.redelegation&&(n.redelegation=e.redelegation?t.Redelegation.toJSON(e.redelegation):void 0),e.entries?n.entries=e.entries.map((e=>e?t.RedelegationEntryResponse.toJSON(e):void 0)):n.entries=[],n},fromPartial(e){var n;const r=Object.assign({},P);return r.redelegation=void 0!==e.redelegation&&null!==e.redelegation?t.Redelegation.fromPartial(e.redelegation):void 0,r.entries=(null===(n=e.entries)||void 0===n?void 0:n.map((e=>t.RedelegationEntryResponse.fromPartial(e))))||[],r}};const N={notBondedTokens:"",bondedTokens:""};function x(e){var t;return{seconds:(t=e.getTime()/1e3,o.default.fromNumber(t)),nanos:e.getTime()%1e3*1e6}}function D(e){let t=1e3*e.seconds.toNumber();return t+=e.nanos/1e6,new Date(t)}function M(e){return e instanceof Date?x(e):"string"==typeof e?x(new Date(e)):s.Timestamp.fromJSON(e)}t.Pool={encode:(e,t=i.default.Writer.create())=>(""!==e.notBondedTokens&&t.uint32(10).string(e.notBondedTokens),""!==e.bondedTokens&&t.uint32(18).string(e.bondedTokens),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},N);for(;n.pos>>3){case 1:o.notBondedTokens=n.string();break;case 2:o.bondedTokens=n.string();break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},N);return t.notBondedTokens=void 0!==e.notBondedTokens&&null!==e.notBondedTokens?String(e.notBondedTokens):"",t.bondedTokens=void 0!==e.bondedTokens&&null!==e.bondedTokens?String(e.bondedTokens):"",t},toJSON(e){const t={};return void 0!==e.notBondedTokens&&(t.notBondedTokens=e.notBondedTokens),void 0!==e.bondedTokens&&(t.bondedTokens=e.bondedTokens),t},fromPartial(e){var t,n;const r=Object.assign({},N);return r.notBondedTokens=null!==(t=e.notBondedTokens)&&void 0!==t?t:"",r.bondedTokens=null!==(n=e.bondedTokens)&&void 0!==n?n:"",r}},i.default.util.Long!==o.default&&(i.default.util.Long=o.default,i.default.configure())},422:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.MsgClientImpl=t.MsgUndelegateResponse=t.MsgUndelegate=t.MsgBeginRedelegateResponse=t.MsgBeginRedelegate=t.MsgDelegateResponse=t.MsgDelegate=t.MsgEditValidatorResponse=t.MsgEditValidator=t.MsgCreateValidatorResponse=t.MsgCreateValidator=t.protobufPackage=void 0;const o=r(n(3720)),i=r(n(3789)),a=n(9355),s=n(3862),c=n(891),d=n(5522);t.protobufPackage="cosmos.staking.v1beta1";const u={minSelfDelegation:"",delegatorAddress:"",validatorAddress:""};t.MsgCreateValidator={encode:(e,t=i.default.Writer.create())=>(void 0!==e.description&&a.Description.encode(e.description,t.uint32(10).fork()).ldelim(),void 0!==e.commission&&a.CommissionRates.encode(e.commission,t.uint32(18).fork()).ldelim(),""!==e.minSelfDelegation&&t.uint32(26).string(e.minSelfDelegation),""!==e.delegatorAddress&&t.uint32(34).string(e.delegatorAddress),""!==e.validatorAddress&&t.uint32(42).string(e.validatorAddress),void 0!==e.pubkey&&s.Any.encode(e.pubkey,t.uint32(50).fork()).ldelim(),void 0!==e.value&&c.Coin.encode(e.value,t.uint32(58).fork()).ldelim(),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},u);for(;n.pos>>3){case 1:o.description=a.Description.decode(n,n.uint32());break;case 2:o.commission=a.CommissionRates.decode(n,n.uint32());break;case 3:o.minSelfDelegation=n.string();break;case 4:o.delegatorAddress=n.string();break;case 5:o.validatorAddress=n.string();break;case 6:o.pubkey=s.Any.decode(n,n.uint32());break;case 7:o.value=c.Coin.decode(n,n.uint32());break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},u);return t.description=void 0!==e.description&&null!==e.description?a.Description.fromJSON(e.description):void 0,t.commission=void 0!==e.commission&&null!==e.commission?a.CommissionRates.fromJSON(e.commission):void 0,t.minSelfDelegation=void 0!==e.minSelfDelegation&&null!==e.minSelfDelegation?String(e.minSelfDelegation):"",t.delegatorAddress=void 0!==e.delegatorAddress&&null!==e.delegatorAddress?String(e.delegatorAddress):"",t.validatorAddress=void 0!==e.validatorAddress&&null!==e.validatorAddress?String(e.validatorAddress):"",t.pubkey=void 0!==e.pubkey&&null!==e.pubkey?s.Any.fromJSON(e.pubkey):void 0,t.value=void 0!==e.value&&null!==e.value?c.Coin.fromJSON(e.value):void 0,t},toJSON(e){const t={};return void 0!==e.description&&(t.description=e.description?a.Description.toJSON(e.description):void 0),void 0!==e.commission&&(t.commission=e.commission?a.CommissionRates.toJSON(e.commission):void 0),void 0!==e.minSelfDelegation&&(t.minSelfDelegation=e.minSelfDelegation),void 0!==e.delegatorAddress&&(t.delegatorAddress=e.delegatorAddress),void 0!==e.validatorAddress&&(t.validatorAddress=e.validatorAddress),void 0!==e.pubkey&&(t.pubkey=e.pubkey?s.Any.toJSON(e.pubkey):void 0),void 0!==e.value&&(t.value=e.value?c.Coin.toJSON(e.value):void 0),t},fromPartial(e){var t,n,r;const o=Object.assign({},u);return o.description=void 0!==e.description&&null!==e.description?a.Description.fromPartial(e.description):void 0,o.commission=void 0!==e.commission&&null!==e.commission?a.CommissionRates.fromPartial(e.commission):void 0,o.minSelfDelegation=null!==(t=e.minSelfDelegation)&&void 0!==t?t:"",o.delegatorAddress=null!==(n=e.delegatorAddress)&&void 0!==n?n:"",o.validatorAddress=null!==(r=e.validatorAddress)&&void 0!==r?r:"",o.pubkey=void 0!==e.pubkey&&null!==e.pubkey?s.Any.fromPartial(e.pubkey):void 0,o.value=void 0!==e.value&&null!==e.value?c.Coin.fromPartial(e.value):void 0,o}};const l={};t.MsgCreateValidatorResponse={encode:(e,t=i.default.Writer.create())=>t,decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},l);for(;n.posObject.assign({},l),toJSON:e=>({}),fromPartial:e=>Object.assign({},l)};const A={validatorAddress:"",commissionRate:"",minSelfDelegation:""};t.MsgEditValidator={encode:(e,t=i.default.Writer.create())=>(void 0!==e.description&&a.Description.encode(e.description,t.uint32(10).fork()).ldelim(),""!==e.validatorAddress&&t.uint32(18).string(e.validatorAddress),""!==e.commissionRate&&t.uint32(26).string(e.commissionRate),""!==e.minSelfDelegation&&t.uint32(34).string(e.minSelfDelegation),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},A);for(;n.pos>>3){case 1:o.description=a.Description.decode(n,n.uint32());break;case 2:o.validatorAddress=n.string();break;case 3:o.commissionRate=n.string();break;case 4:o.minSelfDelegation=n.string();break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},A);return t.description=void 0!==e.description&&null!==e.description?a.Description.fromJSON(e.description):void 0,t.validatorAddress=void 0!==e.validatorAddress&&null!==e.validatorAddress?String(e.validatorAddress):"",t.commissionRate=void 0!==e.commissionRate&&null!==e.commissionRate?String(e.commissionRate):"",t.minSelfDelegation=void 0!==e.minSelfDelegation&&null!==e.minSelfDelegation?String(e.minSelfDelegation):"",t},toJSON(e){const t={};return void 0!==e.description&&(t.description=e.description?a.Description.toJSON(e.description):void 0),void 0!==e.validatorAddress&&(t.validatorAddress=e.validatorAddress),void 0!==e.commissionRate&&(t.commissionRate=e.commissionRate),void 0!==e.minSelfDelegation&&(t.minSelfDelegation=e.minSelfDelegation),t},fromPartial(e){var t,n,r;const o=Object.assign({},A);return o.description=void 0!==e.description&&null!==e.description?a.Description.fromPartial(e.description):void 0,o.validatorAddress=null!==(t=e.validatorAddress)&&void 0!==t?t:"",o.commissionRate=null!==(n=e.commissionRate)&&void 0!==n?n:"",o.minSelfDelegation=null!==(r=e.minSelfDelegation)&&void 0!==r?r:"",o}};const f={};t.MsgEditValidatorResponse={encode:(e,t=i.default.Writer.create())=>t,decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},f);for(;n.posObject.assign({},f),toJSON:e=>({}),fromPartial:e=>Object.assign({},f)};const h={delegatorAddress:"",validatorAddress:""};t.MsgDelegate={encode:(e,t=i.default.Writer.create())=>(""!==e.delegatorAddress&&t.uint32(10).string(e.delegatorAddress),""!==e.validatorAddress&&t.uint32(18).string(e.validatorAddress),void 0!==e.amount&&c.Coin.encode(e.amount,t.uint32(26).fork()).ldelim(),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},h);for(;n.pos>>3){case 1:o.delegatorAddress=n.string();break;case 2:o.validatorAddress=n.string();break;case 3:o.amount=c.Coin.decode(n,n.uint32());break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},h);return t.delegatorAddress=void 0!==e.delegatorAddress&&null!==e.delegatorAddress?String(e.delegatorAddress):"",t.validatorAddress=void 0!==e.validatorAddress&&null!==e.validatorAddress?String(e.validatorAddress):"",t.amount=void 0!==e.amount&&null!==e.amount?c.Coin.fromJSON(e.amount):void 0,t},toJSON(e){const t={};return void 0!==e.delegatorAddress&&(t.delegatorAddress=e.delegatorAddress),void 0!==e.validatorAddress&&(t.validatorAddress=e.validatorAddress),void 0!==e.amount&&(t.amount=e.amount?c.Coin.toJSON(e.amount):void 0),t},fromPartial(e){var t,n;const r=Object.assign({},h);return r.delegatorAddress=null!==(t=e.delegatorAddress)&&void 0!==t?t:"",r.validatorAddress=null!==(n=e.validatorAddress)&&void 0!==n?n:"",r.amount=void 0!==e.amount&&null!==e.amount?c.Coin.fromPartial(e.amount):void 0,r}};const g={};t.MsgDelegateResponse={encode:(e,t=i.default.Writer.create())=>t,decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},g);for(;n.posObject.assign({},g),toJSON:e=>({}),fromPartial:e=>Object.assign({},g)};const p={delegatorAddress:"",validatorSrcAddress:"",validatorDstAddress:""};t.MsgBeginRedelegate={encode:(e,t=i.default.Writer.create())=>(""!==e.delegatorAddress&&t.uint32(10).string(e.delegatorAddress),""!==e.validatorSrcAddress&&t.uint32(18).string(e.validatorSrcAddress),""!==e.validatorDstAddress&&t.uint32(26).string(e.validatorDstAddress),void 0!==e.amount&&c.Coin.encode(e.amount,t.uint32(34).fork()).ldelim(),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},p);for(;n.pos>>3){case 1:o.delegatorAddress=n.string();break;case 2:o.validatorSrcAddress=n.string();break;case 3:o.validatorDstAddress=n.string();break;case 4:o.amount=c.Coin.decode(n,n.uint32());break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},p);return t.delegatorAddress=void 0!==e.delegatorAddress&&null!==e.delegatorAddress?String(e.delegatorAddress):"",t.validatorSrcAddress=void 0!==e.validatorSrcAddress&&null!==e.validatorSrcAddress?String(e.validatorSrcAddress):"",t.validatorDstAddress=void 0!==e.validatorDstAddress&&null!==e.validatorDstAddress?String(e.validatorDstAddress):"",t.amount=void 0!==e.amount&&null!==e.amount?c.Coin.fromJSON(e.amount):void 0,t},toJSON(e){const t={};return void 0!==e.delegatorAddress&&(t.delegatorAddress=e.delegatorAddress),void 0!==e.validatorSrcAddress&&(t.validatorSrcAddress=e.validatorSrcAddress),void 0!==e.validatorDstAddress&&(t.validatorDstAddress=e.validatorDstAddress),void 0!==e.amount&&(t.amount=e.amount?c.Coin.toJSON(e.amount):void 0),t},fromPartial(e){var t,n,r;const o=Object.assign({},p);return o.delegatorAddress=null!==(t=e.delegatorAddress)&&void 0!==t?t:"",o.validatorSrcAddress=null!==(n=e.validatorSrcAddress)&&void 0!==n?n:"",o.validatorDstAddress=null!==(r=e.validatorDstAddress)&&void 0!==r?r:"",o.amount=void 0!==e.amount&&null!==e.amount?c.Coin.fromPartial(e.amount):void 0,o}};const m={};t.MsgBeginRedelegateResponse={encode:(e,t=i.default.Writer.create())=>(void 0!==e.completionTime&&d.Timestamp.encode(e.completionTime,t.uint32(10).fork()).ldelim(),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},m);for(;n.pos>>3==1?o.completionTime=d.Timestamp.decode(n,n.uint32()):n.skipType(7&e)}return o},fromJSON(e){const t=Object.assign({},m);return t.completionTime=void 0!==e.completionTime&&null!==e.completionTime?C(e.completionTime):void 0,t},toJSON(e){const t={};return void 0!==e.completionTime&&(t.completionTime=I(e.completionTime).toISOString()),t},fromPartial(e){const t=Object.assign({},m);return t.completionTime=void 0!==e.completionTime&&null!==e.completionTime?d.Timestamp.fromPartial(e.completionTime):void 0,t}};const v={delegatorAddress:"",validatorAddress:""};t.MsgUndelegate={encode:(e,t=i.default.Writer.create())=>(""!==e.delegatorAddress&&t.uint32(10).string(e.delegatorAddress),""!==e.validatorAddress&&t.uint32(18).string(e.validatorAddress),void 0!==e.amount&&c.Coin.encode(e.amount,t.uint32(26).fork()).ldelim(),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},v);for(;n.pos>>3){case 1:o.delegatorAddress=n.string();break;case 2:o.validatorAddress=n.string();break;case 3:o.amount=c.Coin.decode(n,n.uint32());break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},v);return t.delegatorAddress=void 0!==e.delegatorAddress&&null!==e.delegatorAddress?String(e.delegatorAddress):"",t.validatorAddress=void 0!==e.validatorAddress&&null!==e.validatorAddress?String(e.validatorAddress):"",t.amount=void 0!==e.amount&&null!==e.amount?c.Coin.fromJSON(e.amount):void 0,t},toJSON(e){const t={};return void 0!==e.delegatorAddress&&(t.delegatorAddress=e.delegatorAddress),void 0!==e.validatorAddress&&(t.validatorAddress=e.validatorAddress),void 0!==e.amount&&(t.amount=e.amount?c.Coin.toJSON(e.amount):void 0),t},fromPartial(e){var t,n;const r=Object.assign({},v);return r.delegatorAddress=null!==(t=e.delegatorAddress)&&void 0!==t?t:"",r.validatorAddress=null!==(n=e.validatorAddress)&&void 0!==n?n:"",r.amount=void 0!==e.amount&&null!==e.amount?c.Coin.fromPartial(e.amount):void 0,r}};const y={};function b(e){var t;return{seconds:(t=e.getTime()/1e3,o.default.fromNumber(t)),nanos:e.getTime()%1e3*1e6}}function I(e){let t=1e3*e.seconds.toNumber();return t+=e.nanos/1e6,new Date(t)}function C(e){return e instanceof Date?b(e):"string"==typeof e?b(new Date(e)):d.Timestamp.fromJSON(e)}t.MsgUndelegateResponse={encode:(e,t=i.default.Writer.create())=>(void 0!==e.completionTime&&d.Timestamp.encode(e.completionTime,t.uint32(10).fork()).ldelim(),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},y);for(;n.pos>>3==1?o.completionTime=d.Timestamp.decode(n,n.uint32()):n.skipType(7&e)}return o},fromJSON(e){const t=Object.assign({},y);return t.completionTime=void 0!==e.completionTime&&null!==e.completionTime?C(e.completionTime):void 0,t},toJSON(e){const t={};return void 0!==e.completionTime&&(t.completionTime=I(e.completionTime).toISOString()),t},fromPartial(e){const t=Object.assign({},y);return t.completionTime=void 0!==e.completionTime&&null!==e.completionTime?d.Timestamp.fromPartial(e.completionTime):void 0,t}},t.MsgClientImpl=class{constructor(e){this.rpc=e,this.CreateValidator=this.CreateValidator.bind(this),this.EditValidator=this.EditValidator.bind(this),this.Delegate=this.Delegate.bind(this),this.BeginRedelegate=this.BeginRedelegate.bind(this),this.Undelegate=this.Undelegate.bind(this)}CreateValidator(e){const n=t.MsgCreateValidator.encode(e).finish();return this.rpc.request("cosmos.staking.v1beta1.Msg","CreateValidator",n).then((e=>t.MsgCreateValidatorResponse.decode(new i.default.Reader(e))))}EditValidator(e){const n=t.MsgEditValidator.encode(e).finish();return this.rpc.request("cosmos.staking.v1beta1.Msg","EditValidator",n).then((e=>t.MsgEditValidatorResponse.decode(new i.default.Reader(e))))}Delegate(e){const n=t.MsgDelegate.encode(e).finish();return this.rpc.request("cosmos.staking.v1beta1.Msg","Delegate",n).then((e=>t.MsgDelegateResponse.decode(new i.default.Reader(e))))}BeginRedelegate(e){const n=t.MsgBeginRedelegate.encode(e).finish();return this.rpc.request("cosmos.staking.v1beta1.Msg","BeginRedelegate",n).then((e=>t.MsgBeginRedelegateResponse.decode(new i.default.Reader(e))))}Undelegate(e){const n=t.MsgUndelegate.encode(e).finish();return this.rpc.request("cosmos.staking.v1beta1.Msg","Undelegate",n).then((e=>t.MsgUndelegateResponse.decode(new i.default.Reader(e))))}},i.default.util.Long!==o.default&&(i.default.util.Long=o.default,i.default.configure())},2574:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.SignatureDescriptor_Data_Multi=t.SignatureDescriptor_Data_Single=t.SignatureDescriptor_Data=t.SignatureDescriptor=t.SignatureDescriptors=t.signModeToJSON=t.signModeFromJSON=t.SignMode=t.protobufPackage=void 0;const o=r(n(3720)),i=r(n(3789)),a=n(3862),s=n(7381);var c;function d(e){switch(e){case 0:case"SIGN_MODE_UNSPECIFIED":return c.SIGN_MODE_UNSPECIFIED;case 1:case"SIGN_MODE_DIRECT":return c.SIGN_MODE_DIRECT;case 2:case"SIGN_MODE_TEXTUAL":return c.SIGN_MODE_TEXTUAL;case 127:case"SIGN_MODE_LEGACY_AMINO_JSON":return c.SIGN_MODE_LEGACY_AMINO_JSON;default:return c.UNRECOGNIZED}}function u(e){switch(e){case c.SIGN_MODE_UNSPECIFIED:return"SIGN_MODE_UNSPECIFIED";case c.SIGN_MODE_DIRECT:return"SIGN_MODE_DIRECT";case c.SIGN_MODE_TEXTUAL:return"SIGN_MODE_TEXTUAL";case c.SIGN_MODE_LEGACY_AMINO_JSON:return"SIGN_MODE_LEGACY_AMINO_JSON";default:return"UNKNOWN"}}t.protobufPackage="cosmos.tx.signing.v1beta1",function(e){e[e.SIGN_MODE_UNSPECIFIED=0]="SIGN_MODE_UNSPECIFIED",e[e.SIGN_MODE_DIRECT=1]="SIGN_MODE_DIRECT",e[e.SIGN_MODE_TEXTUAL=2]="SIGN_MODE_TEXTUAL",e[e.SIGN_MODE_LEGACY_AMINO_JSON=127]="SIGN_MODE_LEGACY_AMINO_JSON",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(c=t.SignMode||(t.SignMode={})),t.signModeFromJSON=d,t.signModeToJSON=u;const l={};t.SignatureDescriptors={encode(e,n=i.default.Writer.create()){for(const r of e.signatures)t.SignatureDescriptor.encode(r,n.uint32(10).fork()).ldelim();return n},decode(e,n){const r=e instanceof i.default.Reader?e:new i.default.Reader(e);let o=void 0===n?r.len:r.pos+n;const a=Object.assign({},l);for(a.signatures=[];r.pos>>3==1?a.signatures.push(t.SignatureDescriptor.decode(r,r.uint32())):r.skipType(7&e)}return a},fromJSON(e){var n;const r=Object.assign({},l);return r.signatures=(null!==(n=e.signatures)&&void 0!==n?n:[]).map((e=>t.SignatureDescriptor.fromJSON(e))),r},toJSON(e){const n={};return e.signatures?n.signatures=e.signatures.map((e=>e?t.SignatureDescriptor.toJSON(e):void 0)):n.signatures=[],n},fromPartial(e){var n;const r=Object.assign({},l);return r.signatures=(null===(n=e.signatures)||void 0===n?void 0:n.map((e=>t.SignatureDescriptor.fromPartial(e))))||[],r}};const A={sequence:o.default.UZERO};t.SignatureDescriptor={encode:(e,n=i.default.Writer.create())=>(void 0!==e.publicKey&&a.Any.encode(e.publicKey,n.uint32(10).fork()).ldelim(),void 0!==e.data&&t.SignatureDescriptor_Data.encode(e.data,n.uint32(18).fork()).ldelim(),e.sequence.isZero()||n.uint32(24).uint64(e.sequence),n),decode(e,n){const r=e instanceof i.default.Reader?e:new i.default.Reader(e);let o=void 0===n?r.len:r.pos+n;const s=Object.assign({},A);for(;r.pos>>3){case 1:s.publicKey=a.Any.decode(r,r.uint32());break;case 2:s.data=t.SignatureDescriptor_Data.decode(r,r.uint32());break;case 3:s.sequence=r.uint64();break;default:r.skipType(7&e)}}return s},fromJSON(e){const n=Object.assign({},A);return n.publicKey=void 0!==e.publicKey&&null!==e.publicKey?a.Any.fromJSON(e.publicKey):void 0,n.data=void 0!==e.data&&null!==e.data?t.SignatureDescriptor_Data.fromJSON(e.data):void 0,n.sequence=void 0!==e.sequence&&null!==e.sequence?o.default.fromString(e.sequence):o.default.UZERO,n},toJSON(e){const n={};return void 0!==e.publicKey&&(n.publicKey=e.publicKey?a.Any.toJSON(e.publicKey):void 0),void 0!==e.data&&(n.data=e.data?t.SignatureDescriptor_Data.toJSON(e.data):void 0),void 0!==e.sequence&&(n.sequence=(e.sequence||o.default.UZERO).toString()),n},fromPartial(e){const n=Object.assign({},A);return n.publicKey=void 0!==e.publicKey&&null!==e.publicKey?a.Any.fromPartial(e.publicKey):void 0,n.data=void 0!==e.data&&null!==e.data?t.SignatureDescriptor_Data.fromPartial(e.data):void 0,n.sequence=void 0!==e.sequence&&null!==e.sequence?o.default.fromValue(e.sequence):o.default.UZERO,n}};const f={};t.SignatureDescriptor_Data={encode:(e,n=i.default.Writer.create())=>(void 0!==e.single&&t.SignatureDescriptor_Data_Single.encode(e.single,n.uint32(10).fork()).ldelim(),void 0!==e.multi&&t.SignatureDescriptor_Data_Multi.encode(e.multi,n.uint32(18).fork()).ldelim(),n),decode(e,n){const r=e instanceof i.default.Reader?e:new i.default.Reader(e);let o=void 0===n?r.len:r.pos+n;const a=Object.assign({},f);for(;r.pos>>3){case 1:a.single=t.SignatureDescriptor_Data_Single.decode(r,r.uint32());break;case 2:a.multi=t.SignatureDescriptor_Data_Multi.decode(r,r.uint32());break;default:r.skipType(7&e)}}return a},fromJSON(e){const n=Object.assign({},f);return n.single=void 0!==e.single&&null!==e.single?t.SignatureDescriptor_Data_Single.fromJSON(e.single):void 0,n.multi=void 0!==e.multi&&null!==e.multi?t.SignatureDescriptor_Data_Multi.fromJSON(e.multi):void 0,n},toJSON(e){const n={};return void 0!==e.single&&(n.single=e.single?t.SignatureDescriptor_Data_Single.toJSON(e.single):void 0),void 0!==e.multi&&(n.multi=e.multi?t.SignatureDescriptor_Data_Multi.toJSON(e.multi):void 0),n},fromPartial(e){const n=Object.assign({},f);return n.single=void 0!==e.single&&null!==e.single?t.SignatureDescriptor_Data_Single.fromPartial(e.single):void 0,n.multi=void 0!==e.multi&&null!==e.multi?t.SignatureDescriptor_Data_Multi.fromPartial(e.multi):void 0,n}};const h={mode:0};t.SignatureDescriptor_Data_Single={encode:(e,t=i.default.Writer.create())=>(0!==e.mode&&t.uint32(8).int32(e.mode),0!==e.signature.length&&t.uint32(18).bytes(e.signature),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},h);for(o.signature=new Uint8Array;n.pos>>3){case 1:o.mode=n.int32();break;case 2:o.signature=n.bytes();break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},h);return t.mode=void 0!==e.mode&&null!==e.mode?d(e.mode):0,t.signature=void 0!==e.signature&&null!==e.signature?function(e){const t=m(e),n=new Uint8Array(t.length);for(let e=0;e>>3){case 1:a.bitarray=s.CompactBitArray.decode(r,r.uint32());break;case 2:a.signatures.push(t.SignatureDescriptor_Data.decode(r,r.uint32()));break;default:r.skipType(7&e)}}return a},fromJSON(e){var n;const r=Object.assign({},g);return r.bitarray=void 0!==e.bitarray&&null!==e.bitarray?s.CompactBitArray.fromJSON(e.bitarray):void 0,r.signatures=(null!==(n=e.signatures)&&void 0!==n?n:[]).map((e=>t.SignatureDescriptor_Data.fromJSON(e))),r},toJSON(e){const n={};return void 0!==e.bitarray&&(n.bitarray=e.bitarray?s.CompactBitArray.toJSON(e.bitarray):void 0),e.signatures?n.signatures=e.signatures.map((e=>e?t.SignatureDescriptor_Data.toJSON(e):void 0)):n.signatures=[],n},fromPartial(e){var n;const r=Object.assign({},g);return r.bitarray=void 0!==e.bitarray&&null!==e.bitarray?s.CompactBitArray.fromPartial(e.bitarray):void 0,r.signatures=(null===(n=e.signatures)||void 0===n?void 0:n.map((e=>t.SignatureDescriptor_Data.fromPartial(e))))||[],r}};var p=(()=>{if(void 0!==p)return p;if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==n.g)return n.g;throw"Unable to locate global object"})();const m=p.atob||(e=>p.Buffer.from(e,"base64").toString("binary")),v=p.btoa||(e=>p.Buffer.from(e,"binary").toString("base64"));i.default.util.Long!==o.default&&(i.default.util.Long=o.default,i.default.configure())},4616:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ServiceClientImpl=t.GetTxResponse=t.GetTxRequest=t.SimulateResponse=t.SimulateRequest=t.BroadcastTxResponse=t.BroadcastTxRequest=t.GetTxsEventResponse=t.GetTxsEventRequest=t.broadcastModeToJSON=t.broadcastModeFromJSON=t.BroadcastMode=t.orderByToJSON=t.orderByFromJSON=t.OrderBy=t.protobufPackage=void 0;const o=r(n(3720)),i=r(n(3789)),a=n(9551),s=n(4194),c=n(9639);var d,u;function l(e){switch(e){case 0:case"ORDER_BY_UNSPECIFIED":return d.ORDER_BY_UNSPECIFIED;case 1:case"ORDER_BY_ASC":return d.ORDER_BY_ASC;case 2:case"ORDER_BY_DESC":return d.ORDER_BY_DESC;default:return d.UNRECOGNIZED}}function A(e){switch(e){case d.ORDER_BY_UNSPECIFIED:return"ORDER_BY_UNSPECIFIED";case d.ORDER_BY_ASC:return"ORDER_BY_ASC";case d.ORDER_BY_DESC:return"ORDER_BY_DESC";default:return"UNKNOWN"}}function f(e){switch(e){case 0:case"BROADCAST_MODE_UNSPECIFIED":return u.BROADCAST_MODE_UNSPECIFIED;case 1:case"BROADCAST_MODE_BLOCK":return u.BROADCAST_MODE_BLOCK;case 2:case"BROADCAST_MODE_SYNC":return u.BROADCAST_MODE_SYNC;case 3:case"BROADCAST_MODE_ASYNC":return u.BROADCAST_MODE_ASYNC;default:return u.UNRECOGNIZED}}function h(e){switch(e){case u.BROADCAST_MODE_UNSPECIFIED:return"BROADCAST_MODE_UNSPECIFIED";case u.BROADCAST_MODE_BLOCK:return"BROADCAST_MODE_BLOCK";case u.BROADCAST_MODE_SYNC:return"BROADCAST_MODE_SYNC";case u.BROADCAST_MODE_ASYNC:return"BROADCAST_MODE_ASYNC";default:return"UNKNOWN"}}t.protobufPackage="cosmos.tx.v1beta1",function(e){e[e.ORDER_BY_UNSPECIFIED=0]="ORDER_BY_UNSPECIFIED",e[e.ORDER_BY_ASC=1]="ORDER_BY_ASC",e[e.ORDER_BY_DESC=2]="ORDER_BY_DESC",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(d=t.OrderBy||(t.OrderBy={})),t.orderByFromJSON=l,t.orderByToJSON=A,function(e){e[e.BROADCAST_MODE_UNSPECIFIED=0]="BROADCAST_MODE_UNSPECIFIED",e[e.BROADCAST_MODE_BLOCK=1]="BROADCAST_MODE_BLOCK",e[e.BROADCAST_MODE_SYNC=2]="BROADCAST_MODE_SYNC",e[e.BROADCAST_MODE_ASYNC=3]="BROADCAST_MODE_ASYNC",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(u=t.BroadcastMode||(t.BroadcastMode={})),t.broadcastModeFromJSON=f,t.broadcastModeToJSON=h;const g={events:"",orderBy:0};t.GetTxsEventRequest={encode(e,t=i.default.Writer.create()){for(const n of e.events)t.uint32(10).string(n);return void 0!==e.pagination&&a.PageRequest.encode(e.pagination,t.uint32(18).fork()).ldelim(),0!==e.orderBy&&t.uint32(24).int32(e.orderBy),t},decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},g);for(o.events=[];n.pos>>3){case 1:o.events.push(n.string());break;case 2:o.pagination=a.PageRequest.decode(n,n.uint32());break;case 3:o.orderBy=n.int32();break;default:n.skipType(7&e)}}return o},fromJSON(e){var t;const n=Object.assign({},g);return n.events=(null!==(t=e.events)&&void 0!==t?t:[]).map((e=>String(e))),n.pagination=void 0!==e.pagination&&null!==e.pagination?a.PageRequest.fromJSON(e.pagination):void 0,n.orderBy=void 0!==e.orderBy&&null!==e.orderBy?l(e.orderBy):0,n},toJSON(e){const t={};return e.events?t.events=e.events.map((e=>e)):t.events=[],void 0!==e.pagination&&(t.pagination=e.pagination?a.PageRequest.toJSON(e.pagination):void 0),void 0!==e.orderBy&&(t.orderBy=A(e.orderBy)),t},fromPartial(e){var t,n;const r=Object.assign({},g);return r.events=(null===(t=e.events)||void 0===t?void 0:t.map((e=>e)))||[],r.pagination=void 0!==e.pagination&&null!==e.pagination?a.PageRequest.fromPartial(e.pagination):void 0,r.orderBy=null!==(n=e.orderBy)&&void 0!==n?n:0,r}};const p={};t.GetTxsEventResponse={encode(e,t=i.default.Writer.create()){for(const n of e.txs)c.Tx.encode(n,t.uint32(10).fork()).ldelim();for(const n of e.txResponses)s.TxResponse.encode(n,t.uint32(18).fork()).ldelim();return void 0!==e.pagination&&a.PageResponse.encode(e.pagination,t.uint32(26).fork()).ldelim(),t},decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},p);for(o.txs=[],o.txResponses=[];n.pos>>3){case 1:o.txs.push(c.Tx.decode(n,n.uint32()));break;case 2:o.txResponses.push(s.TxResponse.decode(n,n.uint32()));break;case 3:o.pagination=a.PageResponse.decode(n,n.uint32());break;default:n.skipType(7&e)}}return o},fromJSON(e){var t,n;const r=Object.assign({},p);return r.txs=(null!==(t=e.txs)&&void 0!==t?t:[]).map((e=>c.Tx.fromJSON(e))),r.txResponses=(null!==(n=e.txResponses)&&void 0!==n?n:[]).map((e=>s.TxResponse.fromJSON(e))),r.pagination=void 0!==e.pagination&&null!==e.pagination?a.PageResponse.fromJSON(e.pagination):void 0,r},toJSON(e){const t={};return e.txs?t.txs=e.txs.map((e=>e?c.Tx.toJSON(e):void 0)):t.txs=[],e.txResponses?t.txResponses=e.txResponses.map((e=>e?s.TxResponse.toJSON(e):void 0)):t.txResponses=[],void 0!==e.pagination&&(t.pagination=e.pagination?a.PageResponse.toJSON(e.pagination):void 0),t},fromPartial(e){var t,n;const r=Object.assign({},p);return r.txs=(null===(t=e.txs)||void 0===t?void 0:t.map((e=>c.Tx.fromPartial(e))))||[],r.txResponses=(null===(n=e.txResponses)||void 0===n?void 0:n.map((e=>s.TxResponse.fromPartial(e))))||[],r.pagination=void 0!==e.pagination&&null!==e.pagination?a.PageResponse.fromPartial(e.pagination):void 0,r}};const m={mode:0};t.BroadcastTxRequest={encode:(e,t=i.default.Writer.create())=>(0!==e.txBytes.length&&t.uint32(10).bytes(e.txBytes),0!==e.mode&&t.uint32(16).int32(e.mode),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},m);for(o.txBytes=new Uint8Array;n.pos>>3){case 1:o.txBytes=n.bytes();break;case 2:o.mode=n.int32();break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},m);return t.txBytes=void 0!==e.txBytes&&null!==e.txBytes?B(e.txBytes):new Uint8Array,t.mode=void 0!==e.mode&&null!==e.mode?f(e.mode):0,t},toJSON(e){const t={};return void 0!==e.txBytes&&(t.txBytes=S(void 0!==e.txBytes?e.txBytes:new Uint8Array)),void 0!==e.mode&&(t.mode=h(e.mode)),t},fromPartial(e){var t,n;const r=Object.assign({},m);return r.txBytes=null!==(t=e.txBytes)&&void 0!==t?t:new Uint8Array,r.mode=null!==(n=e.mode)&&void 0!==n?n:0,r}};const v={};t.BroadcastTxResponse={encode:(e,t=i.default.Writer.create())=>(void 0!==e.txResponse&&s.TxResponse.encode(e.txResponse,t.uint32(10).fork()).ldelim(),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},v);for(;n.pos>>3==1?o.txResponse=s.TxResponse.decode(n,n.uint32()):n.skipType(7&e)}return o},fromJSON(e){const t=Object.assign({},v);return t.txResponse=void 0!==e.txResponse&&null!==e.txResponse?s.TxResponse.fromJSON(e.txResponse):void 0,t},toJSON(e){const t={};return void 0!==e.txResponse&&(t.txResponse=e.txResponse?s.TxResponse.toJSON(e.txResponse):void 0),t},fromPartial(e){const t=Object.assign({},v);return t.txResponse=void 0!==e.txResponse&&null!==e.txResponse?s.TxResponse.fromPartial(e.txResponse):void 0,t}};const y={};t.SimulateRequest={encode:(e,t=i.default.Writer.create())=>(void 0!==e.tx&&c.Tx.encode(e.tx,t.uint32(10).fork()).ldelim(),0!==e.txBytes.length&&t.uint32(18).bytes(e.txBytes),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},y);for(o.txBytes=new Uint8Array;n.pos>>3){case 1:o.tx=c.Tx.decode(n,n.uint32());break;case 2:o.txBytes=n.bytes();break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},y);return t.tx=void 0!==e.tx&&null!==e.tx?c.Tx.fromJSON(e.tx):void 0,t.txBytes=void 0!==e.txBytes&&null!==e.txBytes?B(e.txBytes):new Uint8Array,t},toJSON(e){const t={};return void 0!==e.tx&&(t.tx=e.tx?c.Tx.toJSON(e.tx):void 0),void 0!==e.txBytes&&(t.txBytes=S(void 0!==e.txBytes?e.txBytes:new Uint8Array)),t},fromPartial(e){var t;const n=Object.assign({},y);return n.tx=void 0!==e.tx&&null!==e.tx?c.Tx.fromPartial(e.tx):void 0,n.txBytes=null!==(t=e.txBytes)&&void 0!==t?t:new Uint8Array,n}};const b={};t.SimulateResponse={encode:(e,t=i.default.Writer.create())=>(void 0!==e.gasInfo&&s.GasInfo.encode(e.gasInfo,t.uint32(10).fork()).ldelim(),void 0!==e.result&&s.Result.encode(e.result,t.uint32(18).fork()).ldelim(),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},b);for(;n.pos>>3){case 1:o.gasInfo=s.GasInfo.decode(n,n.uint32());break;case 2:o.result=s.Result.decode(n,n.uint32());break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},b);return t.gasInfo=void 0!==e.gasInfo&&null!==e.gasInfo?s.GasInfo.fromJSON(e.gasInfo):void 0,t.result=void 0!==e.result&&null!==e.result?s.Result.fromJSON(e.result):void 0,t},toJSON(e){const t={};return void 0!==e.gasInfo&&(t.gasInfo=e.gasInfo?s.GasInfo.toJSON(e.gasInfo):void 0),void 0!==e.result&&(t.result=e.result?s.Result.toJSON(e.result):void 0),t},fromPartial(e){const t=Object.assign({},b);return t.gasInfo=void 0!==e.gasInfo&&null!==e.gasInfo?s.GasInfo.fromPartial(e.gasInfo):void 0,t.result=void 0!==e.result&&null!==e.result?s.Result.fromPartial(e.result):void 0,t}};const I={hash:""};t.GetTxRequest={encode:(e,t=i.default.Writer.create())=>(""!==e.hash&&t.uint32(10).string(e.hash),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},I);for(;n.pos>>3==1?o.hash=n.string():n.skipType(7&e)}return o},fromJSON(e){const t=Object.assign({},I);return t.hash=void 0!==e.hash&&null!==e.hash?String(e.hash):"",t},toJSON(e){const t={};return void 0!==e.hash&&(t.hash=e.hash),t},fromPartial(e){var t;const n=Object.assign({},I);return n.hash=null!==(t=e.hash)&&void 0!==t?t:"",n}};const C={};t.GetTxResponse={encode:(e,t=i.default.Writer.create())=>(void 0!==e.tx&&c.Tx.encode(e.tx,t.uint32(10).fork()).ldelim(),void 0!==e.txResponse&&s.TxResponse.encode(e.txResponse,t.uint32(18).fork()).ldelim(),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},C);for(;n.pos>>3){case 1:o.tx=c.Tx.decode(n,n.uint32());break;case 2:o.txResponse=s.TxResponse.decode(n,n.uint32());break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},C);return t.tx=void 0!==e.tx&&null!==e.tx?c.Tx.fromJSON(e.tx):void 0,t.txResponse=void 0!==e.txResponse&&null!==e.txResponse?s.TxResponse.fromJSON(e.txResponse):void 0,t},toJSON(e){const t={};return void 0!==e.tx&&(t.tx=e.tx?c.Tx.toJSON(e.tx):void 0),void 0!==e.txResponse&&(t.txResponse=e.txResponse?s.TxResponse.toJSON(e.txResponse):void 0),t},fromPartial(e){const t=Object.assign({},C);return t.tx=void 0!==e.tx&&null!==e.tx?c.Tx.fromPartial(e.tx):void 0,t.txResponse=void 0!==e.txResponse&&null!==e.txResponse?s.TxResponse.fromPartial(e.txResponse):void 0,t}},t.ServiceClientImpl=class{constructor(e){this.rpc=e,this.Simulate=this.Simulate.bind(this),this.GetTx=this.GetTx.bind(this),this.BroadcastTx=this.BroadcastTx.bind(this),this.GetTxsEvent=this.GetTxsEvent.bind(this)}Simulate(e){const n=t.SimulateRequest.encode(e).finish();return this.rpc.request("cosmos.tx.v1beta1.Service","Simulate",n).then((e=>t.SimulateResponse.decode(new i.default.Reader(e))))}GetTx(e){const n=t.GetTxRequest.encode(e).finish();return this.rpc.request("cosmos.tx.v1beta1.Service","GetTx",n).then((e=>t.GetTxResponse.decode(new i.default.Reader(e))))}BroadcastTx(e){const n=t.BroadcastTxRequest.encode(e).finish();return this.rpc.request("cosmos.tx.v1beta1.Service","BroadcastTx",n).then((e=>t.BroadcastTxResponse.decode(new i.default.Reader(e))))}GetTxsEvent(e){const n=t.GetTxsEventRequest.encode(e).finish();return this.rpc.request("cosmos.tx.v1beta1.Service","GetTxsEvent",n).then((e=>t.GetTxsEventResponse.decode(new i.default.Reader(e))))}};var E=(()=>{if(void 0!==E)return E;if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==n.g)return n.g;throw"Unable to locate global object"})();const w=E.atob||(e=>E.Buffer.from(e,"base64").toString("binary"));function B(e){const t=w(e),n=new Uint8Array(t.length);for(let e=0;eE.Buffer.from(e,"binary").toString("base64"));function S(e){const t=[];for(const n of e)t.push(String.fromCharCode(n));return _(t.join(""))}i.default.util.Long!==o.default&&(i.default.util.Long=o.default,i.default.configure())},9639:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Fee=t.ModeInfo_Multi=t.ModeInfo_Single=t.ModeInfo=t.SignerInfo=t.AuthInfo=t.TxBody=t.SignDoc=t.TxRaw=t.Tx=t.protobufPackage=void 0;const o=r(n(3720)),i=r(n(3789)),a=n(3862),s=n(2574),c=n(7381),d=n(891);t.protobufPackage="cosmos.tx.v1beta1";const u={};t.Tx={encode(e,n=i.default.Writer.create()){void 0!==e.body&&t.TxBody.encode(e.body,n.uint32(10).fork()).ldelim(),void 0!==e.authInfo&&t.AuthInfo.encode(e.authInfo,n.uint32(18).fork()).ldelim();for(const t of e.signatures)n.uint32(26).bytes(t);return n},decode(e,n){const r=e instanceof i.default.Reader?e:new i.default.Reader(e);let o=void 0===n?r.len:r.pos+n;const a=Object.assign({},u);for(a.signatures=[];r.pos>>3){case 1:a.body=t.TxBody.decode(r,r.uint32());break;case 2:a.authInfo=t.AuthInfo.decode(r,r.uint32());break;case 3:a.signatures.push(r.bytes());break;default:r.skipType(7&e)}}return a},fromJSON(e){var n;const r=Object.assign({},u);return r.body=void 0!==e.body&&null!==e.body?t.TxBody.fromJSON(e.body):void 0,r.authInfo=void 0!==e.authInfo&&null!==e.authInfo?t.AuthInfo.fromJSON(e.authInfo):void 0,r.signatures=(null!==(n=e.signatures)&&void 0!==n?n:[]).map((e=>C(e))),r},toJSON(e){const n={};return void 0!==e.body&&(n.body=e.body?t.TxBody.toJSON(e.body):void 0),void 0!==e.authInfo&&(n.authInfo=e.authInfo?t.AuthInfo.toJSON(e.authInfo):void 0),e.signatures?n.signatures=e.signatures.map((e=>w(void 0!==e?e:new Uint8Array))):n.signatures=[],n},fromPartial(e){var n;const r=Object.assign({},u);return r.body=void 0!==e.body&&null!==e.body?t.TxBody.fromPartial(e.body):void 0,r.authInfo=void 0!==e.authInfo&&null!==e.authInfo?t.AuthInfo.fromPartial(e.authInfo):void 0,r.signatures=(null===(n=e.signatures)||void 0===n?void 0:n.map((e=>e)))||[],r}};const l={};t.TxRaw={encode(e,t=i.default.Writer.create()){0!==e.bodyBytes.length&&t.uint32(10).bytes(e.bodyBytes),0!==e.authInfoBytes.length&&t.uint32(18).bytes(e.authInfoBytes);for(const n of e.signatures)t.uint32(26).bytes(n);return t},decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},l);for(o.signatures=[],o.bodyBytes=new Uint8Array,o.authInfoBytes=new Uint8Array;n.pos>>3){case 1:o.bodyBytes=n.bytes();break;case 2:o.authInfoBytes=n.bytes();break;case 3:o.signatures.push(n.bytes());break;default:n.skipType(7&e)}}return o},fromJSON(e){var t;const n=Object.assign({},l);return n.bodyBytes=void 0!==e.bodyBytes&&null!==e.bodyBytes?C(e.bodyBytes):new Uint8Array,n.authInfoBytes=void 0!==e.authInfoBytes&&null!==e.authInfoBytes?C(e.authInfoBytes):new Uint8Array,n.signatures=(null!==(t=e.signatures)&&void 0!==t?t:[]).map((e=>C(e))),n},toJSON(e){const t={};return void 0!==e.bodyBytes&&(t.bodyBytes=w(void 0!==e.bodyBytes?e.bodyBytes:new Uint8Array)),void 0!==e.authInfoBytes&&(t.authInfoBytes=w(void 0!==e.authInfoBytes?e.authInfoBytes:new Uint8Array)),e.signatures?t.signatures=e.signatures.map((e=>w(void 0!==e?e:new Uint8Array))):t.signatures=[],t},fromPartial(e){var t,n,r;const o=Object.assign({},l);return o.bodyBytes=null!==(t=e.bodyBytes)&&void 0!==t?t:new Uint8Array,o.authInfoBytes=null!==(n=e.authInfoBytes)&&void 0!==n?n:new Uint8Array,o.signatures=(null===(r=e.signatures)||void 0===r?void 0:r.map((e=>e)))||[],o}};const A={chainId:"",accountNumber:o.default.UZERO};t.SignDoc={encode:(e,t=i.default.Writer.create())=>(0!==e.bodyBytes.length&&t.uint32(10).bytes(e.bodyBytes),0!==e.authInfoBytes.length&&t.uint32(18).bytes(e.authInfoBytes),""!==e.chainId&&t.uint32(26).string(e.chainId),e.accountNumber.isZero()||t.uint32(32).uint64(e.accountNumber),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},A);for(o.bodyBytes=new Uint8Array,o.authInfoBytes=new Uint8Array;n.pos>>3){case 1:o.bodyBytes=n.bytes();break;case 2:o.authInfoBytes=n.bytes();break;case 3:o.chainId=n.string();break;case 4:o.accountNumber=n.uint64();break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},A);return t.bodyBytes=void 0!==e.bodyBytes&&null!==e.bodyBytes?C(e.bodyBytes):new Uint8Array,t.authInfoBytes=void 0!==e.authInfoBytes&&null!==e.authInfoBytes?C(e.authInfoBytes):new Uint8Array,t.chainId=void 0!==e.chainId&&null!==e.chainId?String(e.chainId):"",t.accountNumber=void 0!==e.accountNumber&&null!==e.accountNumber?o.default.fromString(e.accountNumber):o.default.UZERO,t},toJSON(e){const t={};return void 0!==e.bodyBytes&&(t.bodyBytes=w(void 0!==e.bodyBytes?e.bodyBytes:new Uint8Array)),void 0!==e.authInfoBytes&&(t.authInfoBytes=w(void 0!==e.authInfoBytes?e.authInfoBytes:new Uint8Array)),void 0!==e.chainId&&(t.chainId=e.chainId),void 0!==e.accountNumber&&(t.accountNumber=(e.accountNumber||o.default.UZERO).toString()),t},fromPartial(e){var t,n,r;const i=Object.assign({},A);return i.bodyBytes=null!==(t=e.bodyBytes)&&void 0!==t?t:new Uint8Array,i.authInfoBytes=null!==(n=e.authInfoBytes)&&void 0!==n?n:new Uint8Array,i.chainId=null!==(r=e.chainId)&&void 0!==r?r:"",i.accountNumber=void 0!==e.accountNumber&&null!==e.accountNumber?o.default.fromValue(e.accountNumber):o.default.UZERO,i}};const f={memo:"",timeoutHeight:o.default.UZERO};t.TxBody={encode(e,t=i.default.Writer.create()){for(const n of e.messages)a.Any.encode(n,t.uint32(10).fork()).ldelim();""!==e.memo&&t.uint32(18).string(e.memo),e.timeoutHeight.isZero()||t.uint32(24).uint64(e.timeoutHeight);for(const n of e.extensionOptions)a.Any.encode(n,t.uint32(8186).fork()).ldelim();for(const n of e.nonCriticalExtensionOptions)a.Any.encode(n,t.uint32(16378).fork()).ldelim();return t},decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},f);for(o.messages=[],o.extensionOptions=[],o.nonCriticalExtensionOptions=[];n.pos>>3){case 1:o.messages.push(a.Any.decode(n,n.uint32()));break;case 2:o.memo=n.string();break;case 3:o.timeoutHeight=n.uint64();break;case 1023:o.extensionOptions.push(a.Any.decode(n,n.uint32()));break;case 2047:o.nonCriticalExtensionOptions.push(a.Any.decode(n,n.uint32()));break;default:n.skipType(7&e)}}return o},fromJSON(e){var t,n,r;const i=Object.assign({},f);return i.messages=(null!==(t=e.messages)&&void 0!==t?t:[]).map((e=>a.Any.fromJSON(e))),i.memo=void 0!==e.memo&&null!==e.memo?String(e.memo):"",i.timeoutHeight=void 0!==e.timeoutHeight&&null!==e.timeoutHeight?o.default.fromString(e.timeoutHeight):o.default.UZERO,i.extensionOptions=(null!==(n=e.extensionOptions)&&void 0!==n?n:[]).map((e=>a.Any.fromJSON(e))),i.nonCriticalExtensionOptions=(null!==(r=e.nonCriticalExtensionOptions)&&void 0!==r?r:[]).map((e=>a.Any.fromJSON(e))),i},toJSON(e){const t={};return e.messages?t.messages=e.messages.map((e=>e?a.Any.toJSON(e):void 0)):t.messages=[],void 0!==e.memo&&(t.memo=e.memo),void 0!==e.timeoutHeight&&(t.timeoutHeight=(e.timeoutHeight||o.default.UZERO).toString()),e.extensionOptions?t.extensionOptions=e.extensionOptions.map((e=>e?a.Any.toJSON(e):void 0)):t.extensionOptions=[],e.nonCriticalExtensionOptions?t.nonCriticalExtensionOptions=e.nonCriticalExtensionOptions.map((e=>e?a.Any.toJSON(e):void 0)):t.nonCriticalExtensionOptions=[],t},fromPartial(e){var t,n,r,i;const s=Object.assign({},f);return s.messages=(null===(t=e.messages)||void 0===t?void 0:t.map((e=>a.Any.fromPartial(e))))||[],s.memo=null!==(n=e.memo)&&void 0!==n?n:"",s.timeoutHeight=void 0!==e.timeoutHeight&&null!==e.timeoutHeight?o.default.fromValue(e.timeoutHeight):o.default.UZERO,s.extensionOptions=(null===(r=e.extensionOptions)||void 0===r?void 0:r.map((e=>a.Any.fromPartial(e))))||[],s.nonCriticalExtensionOptions=(null===(i=e.nonCriticalExtensionOptions)||void 0===i?void 0:i.map((e=>a.Any.fromPartial(e))))||[],s}};const h={};t.AuthInfo={encode(e,n=i.default.Writer.create()){for(const r of e.signerInfos)t.SignerInfo.encode(r,n.uint32(10).fork()).ldelim();return void 0!==e.fee&&t.Fee.encode(e.fee,n.uint32(18).fork()).ldelim(),n},decode(e,n){const r=e instanceof i.default.Reader?e:new i.default.Reader(e);let o=void 0===n?r.len:r.pos+n;const a=Object.assign({},h);for(a.signerInfos=[];r.pos>>3){case 1:a.signerInfos.push(t.SignerInfo.decode(r,r.uint32()));break;case 2:a.fee=t.Fee.decode(r,r.uint32());break;default:r.skipType(7&e)}}return a},fromJSON(e){var n;const r=Object.assign({},h);return r.signerInfos=(null!==(n=e.signerInfos)&&void 0!==n?n:[]).map((e=>t.SignerInfo.fromJSON(e))),r.fee=void 0!==e.fee&&null!==e.fee?t.Fee.fromJSON(e.fee):void 0,r},toJSON(e){const n={};return e.signerInfos?n.signerInfos=e.signerInfos.map((e=>e?t.SignerInfo.toJSON(e):void 0)):n.signerInfos=[],void 0!==e.fee&&(n.fee=e.fee?t.Fee.toJSON(e.fee):void 0),n},fromPartial(e){var n;const r=Object.assign({},h);return r.signerInfos=(null===(n=e.signerInfos)||void 0===n?void 0:n.map((e=>t.SignerInfo.fromPartial(e))))||[],r.fee=void 0!==e.fee&&null!==e.fee?t.Fee.fromPartial(e.fee):void 0,r}};const g={sequence:o.default.UZERO};t.SignerInfo={encode:(e,n=i.default.Writer.create())=>(void 0!==e.publicKey&&a.Any.encode(e.publicKey,n.uint32(10).fork()).ldelim(),void 0!==e.modeInfo&&t.ModeInfo.encode(e.modeInfo,n.uint32(18).fork()).ldelim(),e.sequence.isZero()||n.uint32(24).uint64(e.sequence),n),decode(e,n){const r=e instanceof i.default.Reader?e:new i.default.Reader(e);let o=void 0===n?r.len:r.pos+n;const s=Object.assign({},g);for(;r.pos>>3){case 1:s.publicKey=a.Any.decode(r,r.uint32());break;case 2:s.modeInfo=t.ModeInfo.decode(r,r.uint32());break;case 3:s.sequence=r.uint64();break;default:r.skipType(7&e)}}return s},fromJSON(e){const n=Object.assign({},g);return n.publicKey=void 0!==e.publicKey&&null!==e.publicKey?a.Any.fromJSON(e.publicKey):void 0,n.modeInfo=void 0!==e.modeInfo&&null!==e.modeInfo?t.ModeInfo.fromJSON(e.modeInfo):void 0,n.sequence=void 0!==e.sequence&&null!==e.sequence?o.default.fromString(e.sequence):o.default.UZERO,n},toJSON(e){const n={};return void 0!==e.publicKey&&(n.publicKey=e.publicKey?a.Any.toJSON(e.publicKey):void 0),void 0!==e.modeInfo&&(n.modeInfo=e.modeInfo?t.ModeInfo.toJSON(e.modeInfo):void 0),void 0!==e.sequence&&(n.sequence=(e.sequence||o.default.UZERO).toString()),n},fromPartial(e){const n=Object.assign({},g);return n.publicKey=void 0!==e.publicKey&&null!==e.publicKey?a.Any.fromPartial(e.publicKey):void 0,n.modeInfo=void 0!==e.modeInfo&&null!==e.modeInfo?t.ModeInfo.fromPartial(e.modeInfo):void 0,n.sequence=void 0!==e.sequence&&null!==e.sequence?o.default.fromValue(e.sequence):o.default.UZERO,n}};const p={};t.ModeInfo={encode:(e,n=i.default.Writer.create())=>(void 0!==e.single&&t.ModeInfo_Single.encode(e.single,n.uint32(10).fork()).ldelim(),void 0!==e.multi&&t.ModeInfo_Multi.encode(e.multi,n.uint32(18).fork()).ldelim(),n),decode(e,n){const r=e instanceof i.default.Reader?e:new i.default.Reader(e);let o=void 0===n?r.len:r.pos+n;const a=Object.assign({},p);for(;r.pos>>3){case 1:a.single=t.ModeInfo_Single.decode(r,r.uint32());break;case 2:a.multi=t.ModeInfo_Multi.decode(r,r.uint32());break;default:r.skipType(7&e)}}return a},fromJSON(e){const n=Object.assign({},p);return n.single=void 0!==e.single&&null!==e.single?t.ModeInfo_Single.fromJSON(e.single):void 0,n.multi=void 0!==e.multi&&null!==e.multi?t.ModeInfo_Multi.fromJSON(e.multi):void 0,n},toJSON(e){const n={};return void 0!==e.single&&(n.single=e.single?t.ModeInfo_Single.toJSON(e.single):void 0),void 0!==e.multi&&(n.multi=e.multi?t.ModeInfo_Multi.toJSON(e.multi):void 0),n},fromPartial(e){const n=Object.assign({},p);return n.single=void 0!==e.single&&null!==e.single?t.ModeInfo_Single.fromPartial(e.single):void 0,n.multi=void 0!==e.multi&&null!==e.multi?t.ModeInfo_Multi.fromPartial(e.multi):void 0,n}};const m={mode:0};t.ModeInfo_Single={encode:(e,t=i.default.Writer.create())=>(0!==e.mode&&t.uint32(8).int32(e.mode),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},m);for(;n.pos>>3==1?o.mode=n.int32():n.skipType(7&e)}return o},fromJSON(e){const t=Object.assign({},m);return t.mode=void 0!==e.mode&&null!==e.mode?s.signModeFromJSON(e.mode):0,t},toJSON(e){const t={};return void 0!==e.mode&&(t.mode=s.signModeToJSON(e.mode)),t},fromPartial(e){var t;const n=Object.assign({},m);return n.mode=null!==(t=e.mode)&&void 0!==t?t:0,n}};const v={};t.ModeInfo_Multi={encode(e,n=i.default.Writer.create()){void 0!==e.bitarray&&c.CompactBitArray.encode(e.bitarray,n.uint32(10).fork()).ldelim();for(const r of e.modeInfos)t.ModeInfo.encode(r,n.uint32(18).fork()).ldelim();return n},decode(e,n){const r=e instanceof i.default.Reader?e:new i.default.Reader(e);let o=void 0===n?r.len:r.pos+n;const a=Object.assign({},v);for(a.modeInfos=[];r.pos>>3){case 1:a.bitarray=c.CompactBitArray.decode(r,r.uint32());break;case 2:a.modeInfos.push(t.ModeInfo.decode(r,r.uint32()));break;default:r.skipType(7&e)}}return a},fromJSON(e){var n;const r=Object.assign({},v);return r.bitarray=void 0!==e.bitarray&&null!==e.bitarray?c.CompactBitArray.fromJSON(e.bitarray):void 0,r.modeInfos=(null!==(n=e.modeInfos)&&void 0!==n?n:[]).map((e=>t.ModeInfo.fromJSON(e))),r},toJSON(e){const n={};return void 0!==e.bitarray&&(n.bitarray=e.bitarray?c.CompactBitArray.toJSON(e.bitarray):void 0),e.modeInfos?n.modeInfos=e.modeInfos.map((e=>e?t.ModeInfo.toJSON(e):void 0)):n.modeInfos=[],n},fromPartial(e){var n;const r=Object.assign({},v);return r.bitarray=void 0!==e.bitarray&&null!==e.bitarray?c.CompactBitArray.fromPartial(e.bitarray):void 0,r.modeInfos=(null===(n=e.modeInfos)||void 0===n?void 0:n.map((e=>t.ModeInfo.fromPartial(e))))||[],r}};const y={gasLimit:o.default.UZERO,payer:"",granter:""};t.Fee={encode(e,t=i.default.Writer.create()){for(const n of e.amount)d.Coin.encode(n,t.uint32(10).fork()).ldelim();return e.gasLimit.isZero()||t.uint32(16).uint64(e.gasLimit),""!==e.payer&&t.uint32(26).string(e.payer),""!==e.granter&&t.uint32(34).string(e.granter),t},decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},y);for(o.amount=[];n.pos>>3){case 1:o.amount.push(d.Coin.decode(n,n.uint32()));break;case 2:o.gasLimit=n.uint64();break;case 3:o.payer=n.string();break;case 4:o.granter=n.string();break;default:n.skipType(7&e)}}return o},fromJSON(e){var t;const n=Object.assign({},y);return n.amount=(null!==(t=e.amount)&&void 0!==t?t:[]).map((e=>d.Coin.fromJSON(e))),n.gasLimit=void 0!==e.gasLimit&&null!==e.gasLimit?o.default.fromString(e.gasLimit):o.default.UZERO,n.payer=void 0!==e.payer&&null!==e.payer?String(e.payer):"",n.granter=void 0!==e.granter&&null!==e.granter?String(e.granter):"",n},toJSON(e){const t={};return e.amount?t.amount=e.amount.map((e=>e?d.Coin.toJSON(e):void 0)):t.amount=[],void 0!==e.gasLimit&&(t.gasLimit=(e.gasLimit||o.default.UZERO).toString()),void 0!==e.payer&&(t.payer=e.payer),void 0!==e.granter&&(t.granter=e.granter),t},fromPartial(e){var t,n,r;const i=Object.assign({},y);return i.amount=(null===(t=e.amount)||void 0===t?void 0:t.map((e=>d.Coin.fromPartial(e))))||[],i.gasLimit=void 0!==e.gasLimit&&null!==e.gasLimit?o.default.fromValue(e.gasLimit):o.default.UZERO,i.payer=null!==(n=e.payer)&&void 0!==n?n:"",i.granter=null!==(r=e.granter)&&void 0!==r?r:"",i}};var b=(()=>{if(void 0!==b)return b;if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==n.g)return n.g;throw"Unable to locate global object"})();const I=b.atob||(e=>b.Buffer.from(e,"base64").toString("binary"));function C(e){const t=I(e),n=new Uint8Array(t.length);for(let e=0;eb.Buffer.from(e,"binary").toString("base64"));function w(e){const t=[];for(const n of e)t.push(String.fromCharCode(n));return E(t.join(""))}i.default.util.Long!==o.default&&(i.default.util.Long=o.default,i.default.configure())},5303:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.PermanentLockedAccount=t.PeriodicVestingAccount=t.Period=t.DelayedVestingAccount=t.ContinuousVestingAccount=t.BaseVestingAccount=t.protobufPackage=void 0;const o=r(n(3720)),i=r(n(3789)),a=n(3487),s=n(891);t.protobufPackage="cosmos.vesting.v1beta1";const c={endTime:o.default.ZERO};t.BaseVestingAccount={encode(e,t=i.default.Writer.create()){void 0!==e.baseAccount&&a.BaseAccount.encode(e.baseAccount,t.uint32(10).fork()).ldelim();for(const n of e.originalVesting)s.Coin.encode(n,t.uint32(18).fork()).ldelim();for(const n of e.delegatedFree)s.Coin.encode(n,t.uint32(26).fork()).ldelim();for(const n of e.delegatedVesting)s.Coin.encode(n,t.uint32(34).fork()).ldelim();return e.endTime.isZero()||t.uint32(40).int64(e.endTime),t},decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},c);for(o.originalVesting=[],o.delegatedFree=[],o.delegatedVesting=[];n.pos>>3){case 1:o.baseAccount=a.BaseAccount.decode(n,n.uint32());break;case 2:o.originalVesting.push(s.Coin.decode(n,n.uint32()));break;case 3:o.delegatedFree.push(s.Coin.decode(n,n.uint32()));break;case 4:o.delegatedVesting.push(s.Coin.decode(n,n.uint32()));break;case 5:o.endTime=n.int64();break;default:n.skipType(7&e)}}return o},fromJSON(e){var t,n,r;const i=Object.assign({},c);return i.baseAccount=void 0!==e.baseAccount&&null!==e.baseAccount?a.BaseAccount.fromJSON(e.baseAccount):void 0,i.originalVesting=(null!==(t=e.originalVesting)&&void 0!==t?t:[]).map((e=>s.Coin.fromJSON(e))),i.delegatedFree=(null!==(n=e.delegatedFree)&&void 0!==n?n:[]).map((e=>s.Coin.fromJSON(e))),i.delegatedVesting=(null!==(r=e.delegatedVesting)&&void 0!==r?r:[]).map((e=>s.Coin.fromJSON(e))),i.endTime=void 0!==e.endTime&&null!==e.endTime?o.default.fromString(e.endTime):o.default.ZERO,i},toJSON(e){const t={};return void 0!==e.baseAccount&&(t.baseAccount=e.baseAccount?a.BaseAccount.toJSON(e.baseAccount):void 0),e.originalVesting?t.originalVesting=e.originalVesting.map((e=>e?s.Coin.toJSON(e):void 0)):t.originalVesting=[],e.delegatedFree?t.delegatedFree=e.delegatedFree.map((e=>e?s.Coin.toJSON(e):void 0)):t.delegatedFree=[],e.delegatedVesting?t.delegatedVesting=e.delegatedVesting.map((e=>e?s.Coin.toJSON(e):void 0)):t.delegatedVesting=[],void 0!==e.endTime&&(t.endTime=(e.endTime||o.default.ZERO).toString()),t},fromPartial(e){var t,n,r;const i=Object.assign({},c);return i.baseAccount=void 0!==e.baseAccount&&null!==e.baseAccount?a.BaseAccount.fromPartial(e.baseAccount):void 0,i.originalVesting=(null===(t=e.originalVesting)||void 0===t?void 0:t.map((e=>s.Coin.fromPartial(e))))||[],i.delegatedFree=(null===(n=e.delegatedFree)||void 0===n?void 0:n.map((e=>s.Coin.fromPartial(e))))||[],i.delegatedVesting=(null===(r=e.delegatedVesting)||void 0===r?void 0:r.map((e=>s.Coin.fromPartial(e))))||[],i.endTime=void 0!==e.endTime&&null!==e.endTime?o.default.fromValue(e.endTime):o.default.ZERO,i}};const d={startTime:o.default.ZERO};t.ContinuousVestingAccount={encode:(e,n=i.default.Writer.create())=>(void 0!==e.baseVestingAccount&&t.BaseVestingAccount.encode(e.baseVestingAccount,n.uint32(10).fork()).ldelim(),e.startTime.isZero()||n.uint32(16).int64(e.startTime),n),decode(e,n){const r=e instanceof i.default.Reader?e:new i.default.Reader(e);let o=void 0===n?r.len:r.pos+n;const a=Object.assign({},d);for(;r.pos>>3){case 1:a.baseVestingAccount=t.BaseVestingAccount.decode(r,r.uint32());break;case 2:a.startTime=r.int64();break;default:r.skipType(7&e)}}return a},fromJSON(e){const n=Object.assign({},d);return n.baseVestingAccount=void 0!==e.baseVestingAccount&&null!==e.baseVestingAccount?t.BaseVestingAccount.fromJSON(e.baseVestingAccount):void 0,n.startTime=void 0!==e.startTime&&null!==e.startTime?o.default.fromString(e.startTime):o.default.ZERO,n},toJSON(e){const n={};return void 0!==e.baseVestingAccount&&(n.baseVestingAccount=e.baseVestingAccount?t.BaseVestingAccount.toJSON(e.baseVestingAccount):void 0),void 0!==e.startTime&&(n.startTime=(e.startTime||o.default.ZERO).toString()),n},fromPartial(e){const n=Object.assign({},d);return n.baseVestingAccount=void 0!==e.baseVestingAccount&&null!==e.baseVestingAccount?t.BaseVestingAccount.fromPartial(e.baseVestingAccount):void 0,n.startTime=void 0!==e.startTime&&null!==e.startTime?o.default.fromValue(e.startTime):o.default.ZERO,n}};const u={};t.DelayedVestingAccount={encode:(e,n=i.default.Writer.create())=>(void 0!==e.baseVestingAccount&&t.BaseVestingAccount.encode(e.baseVestingAccount,n.uint32(10).fork()).ldelim(),n),decode(e,n){const r=e instanceof i.default.Reader?e:new i.default.Reader(e);let o=void 0===n?r.len:r.pos+n;const a=Object.assign({},u);for(;r.pos>>3==1?a.baseVestingAccount=t.BaseVestingAccount.decode(r,r.uint32()):r.skipType(7&e)}return a},fromJSON(e){const n=Object.assign({},u);return n.baseVestingAccount=void 0!==e.baseVestingAccount&&null!==e.baseVestingAccount?t.BaseVestingAccount.fromJSON(e.baseVestingAccount):void 0,n},toJSON(e){const n={};return void 0!==e.baseVestingAccount&&(n.baseVestingAccount=e.baseVestingAccount?t.BaseVestingAccount.toJSON(e.baseVestingAccount):void 0),n},fromPartial(e){const n=Object.assign({},u);return n.baseVestingAccount=void 0!==e.baseVestingAccount&&null!==e.baseVestingAccount?t.BaseVestingAccount.fromPartial(e.baseVestingAccount):void 0,n}};const l={length:o.default.ZERO};t.Period={encode(e,t=i.default.Writer.create()){e.length.isZero()||t.uint32(8).int64(e.length);for(const n of e.amount)s.Coin.encode(n,t.uint32(18).fork()).ldelim();return t},decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},l);for(o.amount=[];n.pos>>3){case 1:o.length=n.int64();break;case 2:o.amount.push(s.Coin.decode(n,n.uint32()));break;default:n.skipType(7&e)}}return o},fromJSON(e){var t;const n=Object.assign({},l);return n.length=void 0!==e.length&&null!==e.length?o.default.fromString(e.length):o.default.ZERO,n.amount=(null!==(t=e.amount)&&void 0!==t?t:[]).map((e=>s.Coin.fromJSON(e))),n},toJSON(e){const t={};return void 0!==e.length&&(t.length=(e.length||o.default.ZERO).toString()),e.amount?t.amount=e.amount.map((e=>e?s.Coin.toJSON(e):void 0)):t.amount=[],t},fromPartial(e){var t;const n=Object.assign({},l);return n.length=void 0!==e.length&&null!==e.length?o.default.fromValue(e.length):o.default.ZERO,n.amount=(null===(t=e.amount)||void 0===t?void 0:t.map((e=>s.Coin.fromPartial(e))))||[],n}};const A={startTime:o.default.ZERO};t.PeriodicVestingAccount={encode(e,n=i.default.Writer.create()){void 0!==e.baseVestingAccount&&t.BaseVestingAccount.encode(e.baseVestingAccount,n.uint32(10).fork()).ldelim(),e.startTime.isZero()||n.uint32(16).int64(e.startTime);for(const r of e.vestingPeriods)t.Period.encode(r,n.uint32(26).fork()).ldelim();return n},decode(e,n){const r=e instanceof i.default.Reader?e:new i.default.Reader(e);let o=void 0===n?r.len:r.pos+n;const a=Object.assign({},A);for(a.vestingPeriods=[];r.pos>>3){case 1:a.baseVestingAccount=t.BaseVestingAccount.decode(r,r.uint32());break;case 2:a.startTime=r.int64();break;case 3:a.vestingPeriods.push(t.Period.decode(r,r.uint32()));break;default:r.skipType(7&e)}}return a},fromJSON(e){var n;const r=Object.assign({},A);return r.baseVestingAccount=void 0!==e.baseVestingAccount&&null!==e.baseVestingAccount?t.BaseVestingAccount.fromJSON(e.baseVestingAccount):void 0,r.startTime=void 0!==e.startTime&&null!==e.startTime?o.default.fromString(e.startTime):o.default.ZERO,r.vestingPeriods=(null!==(n=e.vestingPeriods)&&void 0!==n?n:[]).map((e=>t.Period.fromJSON(e))),r},toJSON(e){const n={};return void 0!==e.baseVestingAccount&&(n.baseVestingAccount=e.baseVestingAccount?t.BaseVestingAccount.toJSON(e.baseVestingAccount):void 0),void 0!==e.startTime&&(n.startTime=(e.startTime||o.default.ZERO).toString()),e.vestingPeriods?n.vestingPeriods=e.vestingPeriods.map((e=>e?t.Period.toJSON(e):void 0)):n.vestingPeriods=[],n},fromPartial(e){var n;const r=Object.assign({},A);return r.baseVestingAccount=void 0!==e.baseVestingAccount&&null!==e.baseVestingAccount?t.BaseVestingAccount.fromPartial(e.baseVestingAccount):void 0,r.startTime=void 0!==e.startTime&&null!==e.startTime?o.default.fromValue(e.startTime):o.default.ZERO,r.vestingPeriods=(null===(n=e.vestingPeriods)||void 0===n?void 0:n.map((e=>t.Period.fromPartial(e))))||[],r}};const f={};t.PermanentLockedAccount={encode:(e,n=i.default.Writer.create())=>(void 0!==e.baseVestingAccount&&t.BaseVestingAccount.encode(e.baseVestingAccount,n.uint32(10).fork()).ldelim(),n),decode(e,n){const r=e instanceof i.default.Reader?e:new i.default.Reader(e);let o=void 0===n?r.len:r.pos+n;const a=Object.assign({},f);for(;r.pos>>3==1?a.baseVestingAccount=t.BaseVestingAccount.decode(r,r.uint32()):r.skipType(7&e)}return a},fromJSON(e){const n=Object.assign({},f);return n.baseVestingAccount=void 0!==e.baseVestingAccount&&null!==e.baseVestingAccount?t.BaseVestingAccount.fromJSON(e.baseVestingAccount):void 0,n},toJSON(e){const n={};return void 0!==e.baseVestingAccount&&(n.baseVestingAccount=e.baseVestingAccount?t.BaseVestingAccount.toJSON(e.baseVestingAccount):void 0),n},fromPartial(e){const n=Object.assign({},f);return n.baseVestingAccount=void 0!==e.baseVestingAccount&&null!==e.baseVestingAccount?t.BaseVestingAccount.fromPartial(e.baseVestingAccount):void 0,n}},i.default.util.Long!==o.default&&(i.default.util.Long=o.default,i.default.configure())},6218:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.QueryClientImpl=t.QueryCodesResponse=t.QueryCodesRequest=t.QueryCodeResponse=t.CodeInfoResponse=t.QueryCodeRequest=t.QuerySmartContractStateResponse=t.QuerySmartContractStateRequest=t.QueryRawContractStateResponse=t.QueryRawContractStateRequest=t.QueryAllContractStateResponse=t.QueryAllContractStateRequest=t.QueryContractsByCodeResponse=t.QueryContractsByCodeRequest=t.QueryContractHistoryResponse=t.QueryContractHistoryRequest=t.QueryContractInfoResponse=t.QueryContractInfoRequest=t.protobufPackage=void 0;const o=r(n(3720)),i=r(n(3789)),a=n(9374),s=n(9551);t.protobufPackage="cosmwasm.wasm.v1";const c={address:""};t.QueryContractInfoRequest={encode:(e,t=i.default.Writer.create())=>(""!==e.address&&t.uint32(10).string(e.address),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},c);for(;n.pos>>3==1?o.address=n.string():n.skipType(7&e)}return o},fromJSON(e){const t=Object.assign({},c);return t.address=void 0!==e.address&&null!==e.address?String(e.address):"",t},toJSON(e){const t={};return void 0!==e.address&&(t.address=e.address),t},fromPartial(e){var t;const n=Object.assign({},c);return n.address=null!==(t=e.address)&&void 0!==t?t:"",n}};const d={address:""};t.QueryContractInfoResponse={encode:(e,t=i.default.Writer.create())=>(""!==e.address&&t.uint32(10).string(e.address),void 0!==e.contractInfo&&a.ContractInfo.encode(e.contractInfo,t.uint32(18).fork()).ldelim(),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},d);for(;n.pos>>3){case 1:o.address=n.string();break;case 2:o.contractInfo=a.ContractInfo.decode(n,n.uint32());break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},d);return t.address=void 0!==e.address&&null!==e.address?String(e.address):"",t.contractInfo=void 0!==e.contractInfo&&null!==e.contractInfo?a.ContractInfo.fromJSON(e.contractInfo):void 0,t},toJSON(e){const t={};return void 0!==e.address&&(t.address=e.address),void 0!==e.contractInfo&&(t.contractInfo=e.contractInfo?a.ContractInfo.toJSON(e.contractInfo):void 0),t},fromPartial(e){var t;const n=Object.assign({},d);return n.address=null!==(t=e.address)&&void 0!==t?t:"",n.contractInfo=void 0!==e.contractInfo&&null!==e.contractInfo?a.ContractInfo.fromPartial(e.contractInfo):void 0,n}};const u={address:""};t.QueryContractHistoryRequest={encode:(e,t=i.default.Writer.create())=>(""!==e.address&&t.uint32(10).string(e.address),void 0!==e.pagination&&s.PageRequest.encode(e.pagination,t.uint32(18).fork()).ldelim(),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},u);for(;n.pos>>3){case 1:o.address=n.string();break;case 2:o.pagination=s.PageRequest.decode(n,n.uint32());break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},u);return t.address=void 0!==e.address&&null!==e.address?String(e.address):"",t.pagination=void 0!==e.pagination&&null!==e.pagination?s.PageRequest.fromJSON(e.pagination):void 0,t},toJSON(e){const t={};return void 0!==e.address&&(t.address=e.address),void 0!==e.pagination&&(t.pagination=e.pagination?s.PageRequest.toJSON(e.pagination):void 0),t},fromPartial(e){var t;const n=Object.assign({},u);return n.address=null!==(t=e.address)&&void 0!==t?t:"",n.pagination=void 0!==e.pagination&&null!==e.pagination?s.PageRequest.fromPartial(e.pagination):void 0,n}};const l={};t.QueryContractHistoryResponse={encode(e,t=i.default.Writer.create()){for(const n of e.entries)a.ContractCodeHistoryEntry.encode(n,t.uint32(10).fork()).ldelim();return void 0!==e.pagination&&s.PageResponse.encode(e.pagination,t.uint32(18).fork()).ldelim(),t},decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},l);for(o.entries=[];n.pos>>3){case 1:o.entries.push(a.ContractCodeHistoryEntry.decode(n,n.uint32()));break;case 2:o.pagination=s.PageResponse.decode(n,n.uint32());break;default:n.skipType(7&e)}}return o},fromJSON(e){var t;const n=Object.assign({},l);return n.entries=(null!==(t=e.entries)&&void 0!==t?t:[]).map((e=>a.ContractCodeHistoryEntry.fromJSON(e))),n.pagination=void 0!==e.pagination&&null!==e.pagination?s.PageResponse.fromJSON(e.pagination):void 0,n},toJSON(e){const t={};return e.entries?t.entries=e.entries.map((e=>e?a.ContractCodeHistoryEntry.toJSON(e):void 0)):t.entries=[],void 0!==e.pagination&&(t.pagination=e.pagination?s.PageResponse.toJSON(e.pagination):void 0),t},fromPartial(e){var t;const n=Object.assign({},l);return n.entries=(null===(t=e.entries)||void 0===t?void 0:t.map((e=>a.ContractCodeHistoryEntry.fromPartial(e))))||[],n.pagination=void 0!==e.pagination&&null!==e.pagination?s.PageResponse.fromPartial(e.pagination):void 0,n}};const A={codeId:o.default.UZERO};t.QueryContractsByCodeRequest={encode:(e,t=i.default.Writer.create())=>(e.codeId.isZero()||t.uint32(8).uint64(e.codeId),void 0!==e.pagination&&s.PageRequest.encode(e.pagination,t.uint32(18).fork()).ldelim(),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},A);for(;n.pos>>3){case 1:o.codeId=n.uint64();break;case 2:o.pagination=s.PageRequest.decode(n,n.uint32());break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},A);return t.codeId=void 0!==e.codeId&&null!==e.codeId?o.default.fromString(e.codeId):o.default.UZERO,t.pagination=void 0!==e.pagination&&null!==e.pagination?s.PageRequest.fromJSON(e.pagination):void 0,t},toJSON(e){const t={};return void 0!==e.codeId&&(t.codeId=(e.codeId||o.default.UZERO).toString()),void 0!==e.pagination&&(t.pagination=e.pagination?s.PageRequest.toJSON(e.pagination):void 0),t},fromPartial(e){const t=Object.assign({},A);return t.codeId=void 0!==e.codeId&&null!==e.codeId?o.default.fromValue(e.codeId):o.default.UZERO,t.pagination=void 0!==e.pagination&&null!==e.pagination?s.PageRequest.fromPartial(e.pagination):void 0,t}};const f={contracts:""};t.QueryContractsByCodeResponse={encode(e,t=i.default.Writer.create()){for(const n of e.contracts)t.uint32(10).string(n);return void 0!==e.pagination&&s.PageResponse.encode(e.pagination,t.uint32(18).fork()).ldelim(),t},decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},f);for(o.contracts=[];n.pos>>3){case 1:o.contracts.push(n.string());break;case 2:o.pagination=s.PageResponse.decode(n,n.uint32());break;default:n.skipType(7&e)}}return o},fromJSON(e){var t;const n=Object.assign({},f);return n.contracts=(null!==(t=e.contracts)&&void 0!==t?t:[]).map((e=>String(e))),n.pagination=void 0!==e.pagination&&null!==e.pagination?s.PageResponse.fromJSON(e.pagination):void 0,n},toJSON(e){const t={};return e.contracts?t.contracts=e.contracts.map((e=>e)):t.contracts=[],void 0!==e.pagination&&(t.pagination=e.pagination?s.PageResponse.toJSON(e.pagination):void 0),t},fromPartial(e){var t;const n=Object.assign({},f);return n.contracts=(null===(t=e.contracts)||void 0===t?void 0:t.map((e=>e)))||[],n.pagination=void 0!==e.pagination&&null!==e.pagination?s.PageResponse.fromPartial(e.pagination):void 0,n}};const h={address:""};t.QueryAllContractStateRequest={encode:(e,t=i.default.Writer.create())=>(""!==e.address&&t.uint32(10).string(e.address),void 0!==e.pagination&&s.PageRequest.encode(e.pagination,t.uint32(18).fork()).ldelim(),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},h);for(;n.pos>>3){case 1:o.address=n.string();break;case 2:o.pagination=s.PageRequest.decode(n,n.uint32());break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},h);return t.address=void 0!==e.address&&null!==e.address?String(e.address):"",t.pagination=void 0!==e.pagination&&null!==e.pagination?s.PageRequest.fromJSON(e.pagination):void 0,t},toJSON(e){const t={};return void 0!==e.address&&(t.address=e.address),void 0!==e.pagination&&(t.pagination=e.pagination?s.PageRequest.toJSON(e.pagination):void 0),t},fromPartial(e){var t;const n=Object.assign({},h);return n.address=null!==(t=e.address)&&void 0!==t?t:"",n.pagination=void 0!==e.pagination&&null!==e.pagination?s.PageRequest.fromPartial(e.pagination):void 0,n}};const g={};t.QueryAllContractStateResponse={encode(e,t=i.default.Writer.create()){for(const n of e.models)a.Model.encode(n,t.uint32(10).fork()).ldelim();return void 0!==e.pagination&&s.PageResponse.encode(e.pagination,t.uint32(18).fork()).ldelim(),t},decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},g);for(o.models=[];n.pos>>3){case 1:o.models.push(a.Model.decode(n,n.uint32()));break;case 2:o.pagination=s.PageResponse.decode(n,n.uint32());break;default:n.skipType(7&e)}}return o},fromJSON(e){var t;const n=Object.assign({},g);return n.models=(null!==(t=e.models)&&void 0!==t?t:[]).map((e=>a.Model.fromJSON(e))),n.pagination=void 0!==e.pagination&&null!==e.pagination?s.PageResponse.fromJSON(e.pagination):void 0,n},toJSON(e){const t={};return e.models?t.models=e.models.map((e=>e?a.Model.toJSON(e):void 0)):t.models=[],void 0!==e.pagination&&(t.pagination=e.pagination?s.PageResponse.toJSON(e.pagination):void 0),t},fromPartial(e){var t;const n=Object.assign({},g);return n.models=(null===(t=e.models)||void 0===t?void 0:t.map((e=>a.Model.fromPartial(e))))||[],n.pagination=void 0!==e.pagination&&null!==e.pagination?s.PageResponse.fromPartial(e.pagination):void 0,n}};const p={address:""};t.QueryRawContractStateRequest={encode:(e,t=i.default.Writer.create())=>(""!==e.address&&t.uint32(10).string(e.address),0!==e.queryData.length&&t.uint32(18).bytes(e.queryData),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},p);for(o.queryData=new Uint8Array;n.pos>>3){case 1:o.address=n.string();break;case 2:o.queryData=n.bytes();break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},p);return t.address=void 0!==e.address&&null!==e.address?String(e.address):"",t.queryData=void 0!==e.queryData&&null!==e.queryData?S(e.queryData):new Uint8Array,t},toJSON(e){const t={};return void 0!==e.address&&(t.address=e.address),void 0!==e.queryData&&(t.queryData=O(void 0!==e.queryData?e.queryData:new Uint8Array)),t},fromPartial(e){var t,n;const r=Object.assign({},p);return r.address=null!==(t=e.address)&&void 0!==t?t:"",r.queryData=null!==(n=e.queryData)&&void 0!==n?n:new Uint8Array,r}};const m={};t.QueryRawContractStateResponse={encode:(e,t=i.default.Writer.create())=>(0!==e.data.length&&t.uint32(10).bytes(e.data),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},m);for(o.data=new Uint8Array;n.pos>>3==1?o.data=n.bytes():n.skipType(7&e)}return o},fromJSON(e){const t=Object.assign({},m);return t.data=void 0!==e.data&&null!==e.data?S(e.data):new Uint8Array,t},toJSON(e){const t={};return void 0!==e.data&&(t.data=O(void 0!==e.data?e.data:new Uint8Array)),t},fromPartial(e){var t;const n=Object.assign({},m);return n.data=null!==(t=e.data)&&void 0!==t?t:new Uint8Array,n}};const v={address:""};t.QuerySmartContractStateRequest={encode:(e,t=i.default.Writer.create())=>(""!==e.address&&t.uint32(10).string(e.address),0!==e.queryData.length&&t.uint32(18).bytes(e.queryData),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},v);for(o.queryData=new Uint8Array;n.pos>>3){case 1:o.address=n.string();break;case 2:o.queryData=n.bytes();break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},v);return t.address=void 0!==e.address&&null!==e.address?String(e.address):"",t.queryData=void 0!==e.queryData&&null!==e.queryData?S(e.queryData):new Uint8Array,t},toJSON(e){const t={};return void 0!==e.address&&(t.address=e.address),void 0!==e.queryData&&(t.queryData=O(void 0!==e.queryData?e.queryData:new Uint8Array)),t},fromPartial(e){var t,n;const r=Object.assign({},v);return r.address=null!==(t=e.address)&&void 0!==t?t:"",r.queryData=null!==(n=e.queryData)&&void 0!==n?n:new Uint8Array,r}};const y={};t.QuerySmartContractStateResponse={encode:(e,t=i.default.Writer.create())=>(0!==e.data.length&&t.uint32(10).bytes(e.data),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},y);for(o.data=new Uint8Array;n.pos>>3==1?o.data=n.bytes():n.skipType(7&e)}return o},fromJSON(e){const t=Object.assign({},y);return t.data=void 0!==e.data&&null!==e.data?S(e.data):new Uint8Array,t},toJSON(e){const t={};return void 0!==e.data&&(t.data=O(void 0!==e.data?e.data:new Uint8Array)),t},fromPartial(e){var t;const n=Object.assign({},y);return n.data=null!==(t=e.data)&&void 0!==t?t:new Uint8Array,n}};const b={codeId:o.default.UZERO};t.QueryCodeRequest={encode:(e,t=i.default.Writer.create())=>(e.codeId.isZero()||t.uint32(8).uint64(e.codeId),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},b);for(;n.pos>>3==1?o.codeId=n.uint64():n.skipType(7&e)}return o},fromJSON(e){const t=Object.assign({},b);return t.codeId=void 0!==e.codeId&&null!==e.codeId?o.default.fromString(e.codeId):o.default.UZERO,t},toJSON(e){const t={};return void 0!==e.codeId&&(t.codeId=(e.codeId||o.default.UZERO).toString()),t},fromPartial(e){const t=Object.assign({},b);return t.codeId=void 0!==e.codeId&&null!==e.codeId?o.default.fromValue(e.codeId):o.default.UZERO,t}};const I={codeId:o.default.UZERO,creator:""};t.CodeInfoResponse={encode:(e,t=i.default.Writer.create())=>(e.codeId.isZero()||t.uint32(8).uint64(e.codeId),""!==e.creator&&t.uint32(18).string(e.creator),0!==e.dataHash.length&&t.uint32(26).bytes(e.dataHash),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},I);for(o.dataHash=new Uint8Array;n.pos>>3){case 1:o.codeId=n.uint64();break;case 2:o.creator=n.string();break;case 3:o.dataHash=n.bytes();break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},I);return t.codeId=void 0!==e.codeId&&null!==e.codeId?o.default.fromString(e.codeId):o.default.UZERO,t.creator=void 0!==e.creator&&null!==e.creator?String(e.creator):"",t.dataHash=void 0!==e.dataHash&&null!==e.dataHash?S(e.dataHash):new Uint8Array,t},toJSON(e){const t={};return void 0!==e.codeId&&(t.codeId=(e.codeId||o.default.UZERO).toString()),void 0!==e.creator&&(t.creator=e.creator),void 0!==e.dataHash&&(t.dataHash=O(void 0!==e.dataHash?e.dataHash:new Uint8Array)),t},fromPartial(e){var t,n;const r=Object.assign({},I);return r.codeId=void 0!==e.codeId&&null!==e.codeId?o.default.fromValue(e.codeId):o.default.UZERO,r.creator=null!==(t=e.creator)&&void 0!==t?t:"",r.dataHash=null!==(n=e.dataHash)&&void 0!==n?n:new Uint8Array,r}};const C={};t.QueryCodeResponse={encode:(e,n=i.default.Writer.create())=>(void 0!==e.codeInfo&&t.CodeInfoResponse.encode(e.codeInfo,n.uint32(10).fork()).ldelim(),0!==e.data.length&&n.uint32(18).bytes(e.data),n),decode(e,n){const r=e instanceof i.default.Reader?e:new i.default.Reader(e);let o=void 0===n?r.len:r.pos+n;const a=Object.assign({},C);for(a.data=new Uint8Array;r.pos>>3){case 1:a.codeInfo=t.CodeInfoResponse.decode(r,r.uint32());break;case 2:a.data=r.bytes();break;default:r.skipType(7&e)}}return a},fromJSON(e){const n=Object.assign({},C);return n.codeInfo=void 0!==e.codeInfo&&null!==e.codeInfo?t.CodeInfoResponse.fromJSON(e.codeInfo):void 0,n.data=void 0!==e.data&&null!==e.data?S(e.data):new Uint8Array,n},toJSON(e){const n={};return void 0!==e.codeInfo&&(n.codeInfo=e.codeInfo?t.CodeInfoResponse.toJSON(e.codeInfo):void 0),void 0!==e.data&&(n.data=O(void 0!==e.data?e.data:new Uint8Array)),n},fromPartial(e){var n;const r=Object.assign({},C);return r.codeInfo=void 0!==e.codeInfo&&null!==e.codeInfo?t.CodeInfoResponse.fromPartial(e.codeInfo):void 0,r.data=null!==(n=e.data)&&void 0!==n?n:new Uint8Array,r}};const E={};t.QueryCodesRequest={encode:(e,t=i.default.Writer.create())=>(void 0!==e.pagination&&s.PageRequest.encode(e.pagination,t.uint32(10).fork()).ldelim(),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},E);for(;n.pos>>3==1?o.pagination=s.PageRequest.decode(n,n.uint32()):n.skipType(7&e)}return o},fromJSON(e){const t=Object.assign({},E);return t.pagination=void 0!==e.pagination&&null!==e.pagination?s.PageRequest.fromJSON(e.pagination):void 0,t},toJSON(e){const t={};return void 0!==e.pagination&&(t.pagination=e.pagination?s.PageRequest.toJSON(e.pagination):void 0),t},fromPartial(e){const t=Object.assign({},E);return t.pagination=void 0!==e.pagination&&null!==e.pagination?s.PageRequest.fromPartial(e.pagination):void 0,t}};const w={};t.QueryCodesResponse={encode(e,n=i.default.Writer.create()){for(const r of e.codeInfos)t.CodeInfoResponse.encode(r,n.uint32(10).fork()).ldelim();return void 0!==e.pagination&&s.PageResponse.encode(e.pagination,n.uint32(18).fork()).ldelim(),n},decode(e,n){const r=e instanceof i.default.Reader?e:new i.default.Reader(e);let o=void 0===n?r.len:r.pos+n;const a=Object.assign({},w);for(a.codeInfos=[];r.pos>>3){case 1:a.codeInfos.push(t.CodeInfoResponse.decode(r,r.uint32()));break;case 2:a.pagination=s.PageResponse.decode(r,r.uint32());break;default:r.skipType(7&e)}}return a},fromJSON(e){var n;const r=Object.assign({},w);return r.codeInfos=(null!==(n=e.codeInfos)&&void 0!==n?n:[]).map((e=>t.CodeInfoResponse.fromJSON(e))),r.pagination=void 0!==e.pagination&&null!==e.pagination?s.PageResponse.fromJSON(e.pagination):void 0,r},toJSON(e){const n={};return e.codeInfos?n.codeInfos=e.codeInfos.map((e=>e?t.CodeInfoResponse.toJSON(e):void 0)):n.codeInfos=[],void 0!==e.pagination&&(n.pagination=e.pagination?s.PageResponse.toJSON(e.pagination):void 0),n},fromPartial(e){var n;const r=Object.assign({},w);return r.codeInfos=(null===(n=e.codeInfos)||void 0===n?void 0:n.map((e=>t.CodeInfoResponse.fromPartial(e))))||[],r.pagination=void 0!==e.pagination&&null!==e.pagination?s.PageResponse.fromPartial(e.pagination):void 0,r}},t.QueryClientImpl=class{constructor(e){this.rpc=e,this.ContractInfo=this.ContractInfo.bind(this),this.ContractHistory=this.ContractHistory.bind(this),this.ContractsByCode=this.ContractsByCode.bind(this),this.AllContractState=this.AllContractState.bind(this),this.RawContractState=this.RawContractState.bind(this),this.SmartContractState=this.SmartContractState.bind(this),this.Code=this.Code.bind(this),this.Codes=this.Codes.bind(this)}ContractInfo(e){const n=t.QueryContractInfoRequest.encode(e).finish();return this.rpc.request("cosmwasm.wasm.v1.Query","ContractInfo",n).then((e=>t.QueryContractInfoResponse.decode(new i.default.Reader(e))))}ContractHistory(e){const n=t.QueryContractHistoryRequest.encode(e).finish();return this.rpc.request("cosmwasm.wasm.v1.Query","ContractHistory",n).then((e=>t.QueryContractHistoryResponse.decode(new i.default.Reader(e))))}ContractsByCode(e){const n=t.QueryContractsByCodeRequest.encode(e).finish();return this.rpc.request("cosmwasm.wasm.v1.Query","ContractsByCode",n).then((e=>t.QueryContractsByCodeResponse.decode(new i.default.Reader(e))))}AllContractState(e){const n=t.QueryAllContractStateRequest.encode(e).finish();return this.rpc.request("cosmwasm.wasm.v1.Query","AllContractState",n).then((e=>t.QueryAllContractStateResponse.decode(new i.default.Reader(e))))}RawContractState(e){const n=t.QueryRawContractStateRequest.encode(e).finish();return this.rpc.request("cosmwasm.wasm.v1.Query","RawContractState",n).then((e=>t.QueryRawContractStateResponse.decode(new i.default.Reader(e))))}SmartContractState(e){const n=t.QuerySmartContractStateRequest.encode(e).finish();return this.rpc.request("cosmwasm.wasm.v1.Query","SmartContractState",n).then((e=>t.QuerySmartContractStateResponse.decode(new i.default.Reader(e))))}Code(e){const n=t.QueryCodeRequest.encode(e).finish();return this.rpc.request("cosmwasm.wasm.v1.Query","Code",n).then((e=>t.QueryCodeResponse.decode(new i.default.Reader(e))))}Codes(e){const n=t.QueryCodesRequest.encode(e).finish();return this.rpc.request("cosmwasm.wasm.v1.Query","Codes",n).then((e=>t.QueryCodesResponse.decode(new i.default.Reader(e))))}};var B=(()=>{if(void 0!==B)return B;if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==n.g)return n.g;throw"Unable to locate global object"})();const _=B.atob||(e=>B.Buffer.from(e,"base64").toString("binary"));function S(e){const t=_(e),n=new Uint8Array(t.length);for(let e=0;eB.Buffer.from(e,"binary").toString("base64"));function O(e){const t=[];for(const n of e)t.push(String.fromCharCode(n));return k(t.join(""))}i.default.util.Long!==o.default&&(i.default.util.Long=o.default,i.default.configure())},1814:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.MsgClientImpl=t.MsgClearAdminResponse=t.MsgClearAdmin=t.MsgUpdateAdminResponse=t.MsgUpdateAdmin=t.MsgMigrateContractResponse=t.MsgMigrateContract=t.MsgExecuteContractResponse=t.MsgExecuteContract=t.MsgInstantiateContractResponse=t.MsgInstantiateContract=t.MsgStoreCodeResponse=t.MsgStoreCode=t.protobufPackage=void 0;const o=r(n(3720)),i=r(n(3789)),a=n(9374),s=n(891);t.protobufPackage="cosmwasm.wasm.v1";const c={sender:""};t.MsgStoreCode={encode:(e,t=i.default.Writer.create())=>(""!==e.sender&&t.uint32(10).string(e.sender),0!==e.wasmByteCode.length&&t.uint32(18).bytes(e.wasmByteCode),void 0!==e.instantiatePermission&&a.AccessConfig.encode(e.instantiatePermission,t.uint32(42).fork()).ldelim(),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},c);for(o.wasmByteCode=new Uint8Array;n.pos>>3){case 1:o.sender=n.string();break;case 2:o.wasmByteCode=n.bytes();break;case 5:o.instantiatePermission=a.AccessConfig.decode(n,n.uint32());break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},c);return t.sender=void 0!==e.sender&&null!==e.sender?String(e.sender):"",t.wasmByteCode=void 0!==e.wasmByteCode&&null!==e.wasmByteCode?C(e.wasmByteCode):new Uint8Array,t.instantiatePermission=void 0!==e.instantiatePermission&&null!==e.instantiatePermission?a.AccessConfig.fromJSON(e.instantiatePermission):void 0,t},toJSON(e){const t={};return void 0!==e.sender&&(t.sender=e.sender),void 0!==e.wasmByteCode&&(t.wasmByteCode=w(void 0!==e.wasmByteCode?e.wasmByteCode:new Uint8Array)),void 0!==e.instantiatePermission&&(t.instantiatePermission=e.instantiatePermission?a.AccessConfig.toJSON(e.instantiatePermission):void 0),t},fromPartial(e){var t,n;const r=Object.assign({},c);return r.sender=null!==(t=e.sender)&&void 0!==t?t:"",r.wasmByteCode=null!==(n=e.wasmByteCode)&&void 0!==n?n:new Uint8Array,r.instantiatePermission=void 0!==e.instantiatePermission&&null!==e.instantiatePermission?a.AccessConfig.fromPartial(e.instantiatePermission):void 0,r}};const d={codeId:o.default.UZERO};t.MsgStoreCodeResponse={encode:(e,t=i.default.Writer.create())=>(e.codeId.isZero()||t.uint32(8).uint64(e.codeId),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},d);for(;n.pos>>3==1?o.codeId=n.uint64():n.skipType(7&e)}return o},fromJSON(e){const t=Object.assign({},d);return t.codeId=void 0!==e.codeId&&null!==e.codeId?o.default.fromString(e.codeId):o.default.UZERO,t},toJSON(e){const t={};return void 0!==e.codeId&&(t.codeId=(e.codeId||o.default.UZERO).toString()),t},fromPartial(e){const t=Object.assign({},d);return t.codeId=void 0!==e.codeId&&null!==e.codeId?o.default.fromValue(e.codeId):o.default.UZERO,t}};const u={sender:"",admin:"",codeId:o.default.UZERO,label:""};t.MsgInstantiateContract={encode(e,t=i.default.Writer.create()){""!==e.sender&&t.uint32(10).string(e.sender),""!==e.admin&&t.uint32(18).string(e.admin),e.codeId.isZero()||t.uint32(24).uint64(e.codeId),""!==e.label&&t.uint32(34).string(e.label),0!==e.msg.length&&t.uint32(42).bytes(e.msg);for(const n of e.funds)s.Coin.encode(n,t.uint32(50).fork()).ldelim();return t},decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},u);for(o.funds=[],o.msg=new Uint8Array;n.pos>>3){case 1:o.sender=n.string();break;case 2:o.admin=n.string();break;case 3:o.codeId=n.uint64();break;case 4:o.label=n.string();break;case 5:o.msg=n.bytes();break;case 6:o.funds.push(s.Coin.decode(n,n.uint32()));break;default:n.skipType(7&e)}}return o},fromJSON(e){var t;const n=Object.assign({},u);return n.sender=void 0!==e.sender&&null!==e.sender?String(e.sender):"",n.admin=void 0!==e.admin&&null!==e.admin?String(e.admin):"",n.codeId=void 0!==e.codeId&&null!==e.codeId?o.default.fromString(e.codeId):o.default.UZERO,n.label=void 0!==e.label&&null!==e.label?String(e.label):"",n.msg=void 0!==e.msg&&null!==e.msg?C(e.msg):new Uint8Array,n.funds=(null!==(t=e.funds)&&void 0!==t?t:[]).map((e=>s.Coin.fromJSON(e))),n},toJSON(e){const t={};return void 0!==e.sender&&(t.sender=e.sender),void 0!==e.admin&&(t.admin=e.admin),void 0!==e.codeId&&(t.codeId=(e.codeId||o.default.UZERO).toString()),void 0!==e.label&&(t.label=e.label),void 0!==e.msg&&(t.msg=w(void 0!==e.msg?e.msg:new Uint8Array)),e.funds?t.funds=e.funds.map((e=>e?s.Coin.toJSON(e):void 0)):t.funds=[],t},fromPartial(e){var t,n,r,i,a;const c=Object.assign({},u);return c.sender=null!==(t=e.sender)&&void 0!==t?t:"",c.admin=null!==(n=e.admin)&&void 0!==n?n:"",c.codeId=void 0!==e.codeId&&null!==e.codeId?o.default.fromValue(e.codeId):o.default.UZERO,c.label=null!==(r=e.label)&&void 0!==r?r:"",c.msg=null!==(i=e.msg)&&void 0!==i?i:new Uint8Array,c.funds=(null===(a=e.funds)||void 0===a?void 0:a.map((e=>s.Coin.fromPartial(e))))||[],c}};const l={address:""};t.MsgInstantiateContractResponse={encode:(e,t=i.default.Writer.create())=>(""!==e.address&&t.uint32(10).string(e.address),0!==e.data.length&&t.uint32(18).bytes(e.data),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},l);for(o.data=new Uint8Array;n.pos>>3){case 1:o.address=n.string();break;case 2:o.data=n.bytes();break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},l);return t.address=void 0!==e.address&&null!==e.address?String(e.address):"",t.data=void 0!==e.data&&null!==e.data?C(e.data):new Uint8Array,t},toJSON(e){const t={};return void 0!==e.address&&(t.address=e.address),void 0!==e.data&&(t.data=w(void 0!==e.data?e.data:new Uint8Array)),t},fromPartial(e){var t,n;const r=Object.assign({},l);return r.address=null!==(t=e.address)&&void 0!==t?t:"",r.data=null!==(n=e.data)&&void 0!==n?n:new Uint8Array,r}};const A={sender:"",contract:""};t.MsgExecuteContract={encode(e,t=i.default.Writer.create()){""!==e.sender&&t.uint32(10).string(e.sender),""!==e.contract&&t.uint32(18).string(e.contract),0!==e.msg.length&&t.uint32(26).bytes(e.msg);for(const n of e.funds)s.Coin.encode(n,t.uint32(42).fork()).ldelim();return t},decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},A);for(o.funds=[],o.msg=new Uint8Array;n.pos>>3){case 1:o.sender=n.string();break;case 2:o.contract=n.string();break;case 3:o.msg=n.bytes();break;case 5:o.funds.push(s.Coin.decode(n,n.uint32()));break;default:n.skipType(7&e)}}return o},fromJSON(e){var t;const n=Object.assign({},A);return n.sender=void 0!==e.sender&&null!==e.sender?String(e.sender):"",n.contract=void 0!==e.contract&&null!==e.contract?String(e.contract):"",n.msg=void 0!==e.msg&&null!==e.msg?C(e.msg):new Uint8Array,n.funds=(null!==(t=e.funds)&&void 0!==t?t:[]).map((e=>s.Coin.fromJSON(e))),n},toJSON(e){const t={};return void 0!==e.sender&&(t.sender=e.sender),void 0!==e.contract&&(t.contract=e.contract),void 0!==e.msg&&(t.msg=w(void 0!==e.msg?e.msg:new Uint8Array)),e.funds?t.funds=e.funds.map((e=>e?s.Coin.toJSON(e):void 0)):t.funds=[],t},fromPartial(e){var t,n,r,o;const i=Object.assign({},A);return i.sender=null!==(t=e.sender)&&void 0!==t?t:"",i.contract=null!==(n=e.contract)&&void 0!==n?n:"",i.msg=null!==(r=e.msg)&&void 0!==r?r:new Uint8Array,i.funds=(null===(o=e.funds)||void 0===o?void 0:o.map((e=>s.Coin.fromPartial(e))))||[],i}};const f={};t.MsgExecuteContractResponse={encode:(e,t=i.default.Writer.create())=>(0!==e.data.length&&t.uint32(10).bytes(e.data),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},f);for(o.data=new Uint8Array;n.pos>>3==1?o.data=n.bytes():n.skipType(7&e)}return o},fromJSON(e){const t=Object.assign({},f);return t.data=void 0!==e.data&&null!==e.data?C(e.data):new Uint8Array,t},toJSON(e){const t={};return void 0!==e.data&&(t.data=w(void 0!==e.data?e.data:new Uint8Array)),t},fromPartial(e){var t;const n=Object.assign({},f);return n.data=null!==(t=e.data)&&void 0!==t?t:new Uint8Array,n}};const h={sender:"",contract:"",codeId:o.default.UZERO};t.MsgMigrateContract={encode:(e,t=i.default.Writer.create())=>(""!==e.sender&&t.uint32(10).string(e.sender),""!==e.contract&&t.uint32(18).string(e.contract),e.codeId.isZero()||t.uint32(24).uint64(e.codeId),0!==e.msg.length&&t.uint32(34).bytes(e.msg),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},h);for(o.msg=new Uint8Array;n.pos>>3){case 1:o.sender=n.string();break;case 2:o.contract=n.string();break;case 3:o.codeId=n.uint64();break;case 4:o.msg=n.bytes();break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},h);return t.sender=void 0!==e.sender&&null!==e.sender?String(e.sender):"",t.contract=void 0!==e.contract&&null!==e.contract?String(e.contract):"",t.codeId=void 0!==e.codeId&&null!==e.codeId?o.default.fromString(e.codeId):o.default.UZERO,t.msg=void 0!==e.msg&&null!==e.msg?C(e.msg):new Uint8Array,t},toJSON(e){const t={};return void 0!==e.sender&&(t.sender=e.sender),void 0!==e.contract&&(t.contract=e.contract),void 0!==e.codeId&&(t.codeId=(e.codeId||o.default.UZERO).toString()),void 0!==e.msg&&(t.msg=w(void 0!==e.msg?e.msg:new Uint8Array)),t},fromPartial(e){var t,n,r;const i=Object.assign({},h);return i.sender=null!==(t=e.sender)&&void 0!==t?t:"",i.contract=null!==(n=e.contract)&&void 0!==n?n:"",i.codeId=void 0!==e.codeId&&null!==e.codeId?o.default.fromValue(e.codeId):o.default.UZERO,i.msg=null!==(r=e.msg)&&void 0!==r?r:new Uint8Array,i}};const g={};t.MsgMigrateContractResponse={encode:(e,t=i.default.Writer.create())=>(0!==e.data.length&&t.uint32(10).bytes(e.data),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},g);for(o.data=new Uint8Array;n.pos>>3==1?o.data=n.bytes():n.skipType(7&e)}return o},fromJSON(e){const t=Object.assign({},g);return t.data=void 0!==e.data&&null!==e.data?C(e.data):new Uint8Array,t},toJSON(e){const t={};return void 0!==e.data&&(t.data=w(void 0!==e.data?e.data:new Uint8Array)),t},fromPartial(e){var t;const n=Object.assign({},g);return n.data=null!==(t=e.data)&&void 0!==t?t:new Uint8Array,n}};const p={sender:"",newAdmin:"",contract:""};t.MsgUpdateAdmin={encode:(e,t=i.default.Writer.create())=>(""!==e.sender&&t.uint32(10).string(e.sender),""!==e.newAdmin&&t.uint32(18).string(e.newAdmin),""!==e.contract&&t.uint32(26).string(e.contract),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},p);for(;n.pos>>3){case 1:o.sender=n.string();break;case 2:o.newAdmin=n.string();break;case 3:o.contract=n.string();break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},p);return t.sender=void 0!==e.sender&&null!==e.sender?String(e.sender):"",t.newAdmin=void 0!==e.newAdmin&&null!==e.newAdmin?String(e.newAdmin):"",t.contract=void 0!==e.contract&&null!==e.contract?String(e.contract):"",t},toJSON(e){const t={};return void 0!==e.sender&&(t.sender=e.sender),void 0!==e.newAdmin&&(t.newAdmin=e.newAdmin),void 0!==e.contract&&(t.contract=e.contract),t},fromPartial(e){var t,n,r;const o=Object.assign({},p);return o.sender=null!==(t=e.sender)&&void 0!==t?t:"",o.newAdmin=null!==(n=e.newAdmin)&&void 0!==n?n:"",o.contract=null!==(r=e.contract)&&void 0!==r?r:"",o}};const m={};t.MsgUpdateAdminResponse={encode:(e,t=i.default.Writer.create())=>t,decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},m);for(;n.posObject.assign({},m),toJSON:e=>({}),fromPartial:e=>Object.assign({},m)};const v={sender:"",contract:""};t.MsgClearAdmin={encode:(e,t=i.default.Writer.create())=>(""!==e.sender&&t.uint32(10).string(e.sender),""!==e.contract&&t.uint32(26).string(e.contract),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},v);for(;n.pos>>3){case 1:o.sender=n.string();break;case 3:o.contract=n.string();break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},v);return t.sender=void 0!==e.sender&&null!==e.sender?String(e.sender):"",t.contract=void 0!==e.contract&&null!==e.contract?String(e.contract):"",t},toJSON(e){const t={};return void 0!==e.sender&&(t.sender=e.sender),void 0!==e.contract&&(t.contract=e.contract),t},fromPartial(e){var t,n;const r=Object.assign({},v);return r.sender=null!==(t=e.sender)&&void 0!==t?t:"",r.contract=null!==(n=e.contract)&&void 0!==n?n:"",r}};const y={};t.MsgClearAdminResponse={encode:(e,t=i.default.Writer.create())=>t,decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},y);for(;n.posObject.assign({},y),toJSON:e=>({}),fromPartial:e=>Object.assign({},y)},t.MsgClientImpl=class{constructor(e){this.rpc=e,this.StoreCode=this.StoreCode.bind(this),this.InstantiateContract=this.InstantiateContract.bind(this),this.ExecuteContract=this.ExecuteContract.bind(this),this.MigrateContract=this.MigrateContract.bind(this),this.UpdateAdmin=this.UpdateAdmin.bind(this),this.ClearAdmin=this.ClearAdmin.bind(this)}StoreCode(e){const n=t.MsgStoreCode.encode(e).finish();return this.rpc.request("cosmwasm.wasm.v1.Msg","StoreCode",n).then((e=>t.MsgStoreCodeResponse.decode(new i.default.Reader(e))))}InstantiateContract(e){const n=t.MsgInstantiateContract.encode(e).finish();return this.rpc.request("cosmwasm.wasm.v1.Msg","InstantiateContract",n).then((e=>t.MsgInstantiateContractResponse.decode(new i.default.Reader(e))))}ExecuteContract(e){const n=t.MsgExecuteContract.encode(e).finish();return this.rpc.request("cosmwasm.wasm.v1.Msg","ExecuteContract",n).then((e=>t.MsgExecuteContractResponse.decode(new i.default.Reader(e))))}MigrateContract(e){const n=t.MsgMigrateContract.encode(e).finish();return this.rpc.request("cosmwasm.wasm.v1.Msg","MigrateContract",n).then((e=>t.MsgMigrateContractResponse.decode(new i.default.Reader(e))))}UpdateAdmin(e){const n=t.MsgUpdateAdmin.encode(e).finish();return this.rpc.request("cosmwasm.wasm.v1.Msg","UpdateAdmin",n).then((e=>t.MsgUpdateAdminResponse.decode(new i.default.Reader(e))))}ClearAdmin(e){const n=t.MsgClearAdmin.encode(e).finish();return this.rpc.request("cosmwasm.wasm.v1.Msg","ClearAdmin",n).then((e=>t.MsgClearAdminResponse.decode(new i.default.Reader(e))))}};var b=(()=>{if(void 0!==b)return b;if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==n.g)return n.g;throw"Unable to locate global object"})();const I=b.atob||(e=>b.Buffer.from(e,"base64").toString("binary"));function C(e){const t=I(e),n=new Uint8Array(t.length);for(let e=0;eb.Buffer.from(e,"binary").toString("base64"));function w(e){const t=[];for(const n of e)t.push(String.fromCharCode(n));return E(t.join(""))}i.default.util.Long!==o.default&&(i.default.util.Long=o.default,i.default.configure())},9374:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Model=t.AbsoluteTxPosition=t.ContractCodeHistoryEntry=t.ContractInfo=t.CodeInfo=t.Params=t.AccessConfig=t.AccessTypeParam=t.contractCodeHistoryOperationTypeToJSON=t.contractCodeHistoryOperationTypeFromJSON=t.ContractCodeHistoryOperationType=t.accessTypeToJSON=t.accessTypeFromJSON=t.AccessType=t.protobufPackage=void 0;const o=r(n(3720)),i=r(n(3789)),a=n(3862);var s,c;function d(e){switch(e){case 0:case"ACCESS_TYPE_UNSPECIFIED":return s.ACCESS_TYPE_UNSPECIFIED;case 1:case"ACCESS_TYPE_NOBODY":return s.ACCESS_TYPE_NOBODY;case 2:case"ACCESS_TYPE_ONLY_ADDRESS":return s.ACCESS_TYPE_ONLY_ADDRESS;case 3:case"ACCESS_TYPE_EVERYBODY":return s.ACCESS_TYPE_EVERYBODY;default:return s.UNRECOGNIZED}}function u(e){switch(e){case s.ACCESS_TYPE_UNSPECIFIED:return"ACCESS_TYPE_UNSPECIFIED";case s.ACCESS_TYPE_NOBODY:return"ACCESS_TYPE_NOBODY";case s.ACCESS_TYPE_ONLY_ADDRESS:return"ACCESS_TYPE_ONLY_ADDRESS";case s.ACCESS_TYPE_EVERYBODY:return"ACCESS_TYPE_EVERYBODY";default:return"UNKNOWN"}}function l(e){switch(e){case 0:case"CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED":return c.CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED;case 1:case"CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT":return c.CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT;case 2:case"CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE":return c.CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE;case 3:case"CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS":return c.CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS;default:return c.UNRECOGNIZED}}function A(e){switch(e){case c.CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED:return"CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED";case c.CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT:return"CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT";case c.CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE:return"CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE";case c.CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS:return"CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS";default:return"UNKNOWN"}}t.protobufPackage="cosmwasm.wasm.v1",function(e){e[e.ACCESS_TYPE_UNSPECIFIED=0]="ACCESS_TYPE_UNSPECIFIED",e[e.ACCESS_TYPE_NOBODY=1]="ACCESS_TYPE_NOBODY",e[e.ACCESS_TYPE_ONLY_ADDRESS=2]="ACCESS_TYPE_ONLY_ADDRESS",e[e.ACCESS_TYPE_EVERYBODY=3]="ACCESS_TYPE_EVERYBODY",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(s=t.AccessType||(t.AccessType={})),t.accessTypeFromJSON=d,t.accessTypeToJSON=u,function(e){e[e.CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED=0]="CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED",e[e.CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT=1]="CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT",e[e.CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE=2]="CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE",e[e.CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS=3]="CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(c=t.ContractCodeHistoryOperationType||(t.ContractCodeHistoryOperationType={})),t.contractCodeHistoryOperationTypeFromJSON=l,t.contractCodeHistoryOperationTypeToJSON=A;const f={value:0};t.AccessTypeParam={encode:(e,t=i.default.Writer.create())=>(0!==e.value&&t.uint32(8).int32(e.value),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},f);for(;n.pos>>3==1?o.value=n.int32():n.skipType(7&e)}return o},fromJSON(e){const t=Object.assign({},f);return t.value=void 0!==e.value&&null!==e.value?d(e.value):0,t},toJSON(e){const t={};return void 0!==e.value&&(t.value=u(e.value)),t},fromPartial(e){var t;const n=Object.assign({},f);return n.value=null!==(t=e.value)&&void 0!==t?t:0,n}};const h={permission:0,address:""};t.AccessConfig={encode:(e,t=i.default.Writer.create())=>(0!==e.permission&&t.uint32(8).int32(e.permission),""!==e.address&&t.uint32(18).string(e.address),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},h);for(;n.pos>>3){case 1:o.permission=n.int32();break;case 2:o.address=n.string();break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},h);return t.permission=void 0!==e.permission&&null!==e.permission?d(e.permission):0,t.address=void 0!==e.address&&null!==e.address?String(e.address):"",t},toJSON(e){const t={};return void 0!==e.permission&&(t.permission=u(e.permission)),void 0!==e.address&&(t.address=e.address),t},fromPartial(e){var t,n;const r=Object.assign({},h);return r.permission=null!==(t=e.permission)&&void 0!==t?t:0,r.address=null!==(n=e.address)&&void 0!==n?n:"",r}};const g={instantiateDefaultPermission:0,maxWasmCodeSize:o.default.UZERO};t.Params={encode:(e,n=i.default.Writer.create())=>(void 0!==e.codeUploadAccess&&t.AccessConfig.encode(e.codeUploadAccess,n.uint32(10).fork()).ldelim(),0!==e.instantiateDefaultPermission&&n.uint32(16).int32(e.instantiateDefaultPermission),e.maxWasmCodeSize.isZero()||n.uint32(24).uint64(e.maxWasmCodeSize),n),decode(e,n){const r=e instanceof i.default.Reader?e:new i.default.Reader(e);let o=void 0===n?r.len:r.pos+n;const a=Object.assign({},g);for(;r.pos>>3){case 1:a.codeUploadAccess=t.AccessConfig.decode(r,r.uint32());break;case 2:a.instantiateDefaultPermission=r.int32();break;case 3:a.maxWasmCodeSize=r.uint64();break;default:r.skipType(7&e)}}return a},fromJSON(e){const n=Object.assign({},g);return n.codeUploadAccess=void 0!==e.codeUploadAccess&&null!==e.codeUploadAccess?t.AccessConfig.fromJSON(e.codeUploadAccess):void 0,n.instantiateDefaultPermission=void 0!==e.instantiateDefaultPermission&&null!==e.instantiateDefaultPermission?d(e.instantiateDefaultPermission):0,n.maxWasmCodeSize=void 0!==e.maxWasmCodeSize&&null!==e.maxWasmCodeSize?o.default.fromString(e.maxWasmCodeSize):o.default.UZERO,n},toJSON(e){const n={};return void 0!==e.codeUploadAccess&&(n.codeUploadAccess=e.codeUploadAccess?t.AccessConfig.toJSON(e.codeUploadAccess):void 0),void 0!==e.instantiateDefaultPermission&&(n.instantiateDefaultPermission=u(e.instantiateDefaultPermission)),void 0!==e.maxWasmCodeSize&&(n.maxWasmCodeSize=(e.maxWasmCodeSize||o.default.UZERO).toString()),n},fromPartial(e){var n;const r=Object.assign({},g);return r.codeUploadAccess=void 0!==e.codeUploadAccess&&null!==e.codeUploadAccess?t.AccessConfig.fromPartial(e.codeUploadAccess):void 0,r.instantiateDefaultPermission=null!==(n=e.instantiateDefaultPermission)&&void 0!==n?n:0,r.maxWasmCodeSize=void 0!==e.maxWasmCodeSize&&null!==e.maxWasmCodeSize?o.default.fromValue(e.maxWasmCodeSize):o.default.UZERO,r}};const p={creator:""};t.CodeInfo={encode:(e,n=i.default.Writer.create())=>(0!==e.codeHash.length&&n.uint32(10).bytes(e.codeHash),""!==e.creator&&n.uint32(18).string(e.creator),void 0!==e.instantiateConfig&&t.AccessConfig.encode(e.instantiateConfig,n.uint32(42).fork()).ldelim(),n),decode(e,n){const r=e instanceof i.default.Reader?e:new i.default.Reader(e);let o=void 0===n?r.len:r.pos+n;const a=Object.assign({},p);for(a.codeHash=new Uint8Array;r.pos>>3){case 1:a.codeHash=r.bytes();break;case 2:a.creator=r.string();break;case 5:a.instantiateConfig=t.AccessConfig.decode(r,r.uint32());break;default:r.skipType(7&e)}}return a},fromJSON(e){const n=Object.assign({},p);return n.codeHash=void 0!==e.codeHash&&null!==e.codeHash?E(e.codeHash):new Uint8Array,n.creator=void 0!==e.creator&&null!==e.creator?String(e.creator):"",n.instantiateConfig=void 0!==e.instantiateConfig&&null!==e.instantiateConfig?t.AccessConfig.fromJSON(e.instantiateConfig):void 0,n},toJSON(e){const n={};return void 0!==e.codeHash&&(n.codeHash=B(void 0!==e.codeHash?e.codeHash:new Uint8Array)),void 0!==e.creator&&(n.creator=e.creator),void 0!==e.instantiateConfig&&(n.instantiateConfig=e.instantiateConfig?t.AccessConfig.toJSON(e.instantiateConfig):void 0),n},fromPartial(e){var n,r;const o=Object.assign({},p);return o.codeHash=null!==(n=e.codeHash)&&void 0!==n?n:new Uint8Array,o.creator=null!==(r=e.creator)&&void 0!==r?r:"",o.instantiateConfig=void 0!==e.instantiateConfig&&null!==e.instantiateConfig?t.AccessConfig.fromPartial(e.instantiateConfig):void 0,o}};const m={codeId:o.default.UZERO,creator:"",admin:"",label:"",ibcPortId:""};t.ContractInfo={encode:(e,n=i.default.Writer.create())=>(e.codeId.isZero()||n.uint32(8).uint64(e.codeId),""!==e.creator&&n.uint32(18).string(e.creator),""!==e.admin&&n.uint32(26).string(e.admin),""!==e.label&&n.uint32(34).string(e.label),void 0!==e.created&&t.AbsoluteTxPosition.encode(e.created,n.uint32(42).fork()).ldelim(),""!==e.ibcPortId&&n.uint32(50).string(e.ibcPortId),void 0!==e.extension&&a.Any.encode(e.extension,n.uint32(58).fork()).ldelim(),n),decode(e,n){const r=e instanceof i.default.Reader?e:new i.default.Reader(e);let o=void 0===n?r.len:r.pos+n;const s=Object.assign({},m);for(;r.pos>>3){case 1:s.codeId=r.uint64();break;case 2:s.creator=r.string();break;case 3:s.admin=r.string();break;case 4:s.label=r.string();break;case 5:s.created=t.AbsoluteTxPosition.decode(r,r.uint32());break;case 6:s.ibcPortId=r.string();break;case 7:s.extension=a.Any.decode(r,r.uint32());break;default:r.skipType(7&e)}}return s},fromJSON(e){const n=Object.assign({},m);return n.codeId=void 0!==e.codeId&&null!==e.codeId?o.default.fromString(e.codeId):o.default.UZERO,n.creator=void 0!==e.creator&&null!==e.creator?String(e.creator):"",n.admin=void 0!==e.admin&&null!==e.admin?String(e.admin):"",n.label=void 0!==e.label&&null!==e.label?String(e.label):"",n.created=void 0!==e.created&&null!==e.created?t.AbsoluteTxPosition.fromJSON(e.created):void 0,n.ibcPortId=void 0!==e.ibcPortId&&null!==e.ibcPortId?String(e.ibcPortId):"",n.extension=void 0!==e.extension&&null!==e.extension?a.Any.fromJSON(e.extension):void 0,n},toJSON(e){const n={};return void 0!==e.codeId&&(n.codeId=(e.codeId||o.default.UZERO).toString()),void 0!==e.creator&&(n.creator=e.creator),void 0!==e.admin&&(n.admin=e.admin),void 0!==e.label&&(n.label=e.label),void 0!==e.created&&(n.created=e.created?t.AbsoluteTxPosition.toJSON(e.created):void 0),void 0!==e.ibcPortId&&(n.ibcPortId=e.ibcPortId),void 0!==e.extension&&(n.extension=e.extension?a.Any.toJSON(e.extension):void 0),n},fromPartial(e){var n,r,i,s;const c=Object.assign({},m);return c.codeId=void 0!==e.codeId&&null!==e.codeId?o.default.fromValue(e.codeId):o.default.UZERO,c.creator=null!==(n=e.creator)&&void 0!==n?n:"",c.admin=null!==(r=e.admin)&&void 0!==r?r:"",c.label=null!==(i=e.label)&&void 0!==i?i:"",c.created=void 0!==e.created&&null!==e.created?t.AbsoluteTxPosition.fromPartial(e.created):void 0,c.ibcPortId=null!==(s=e.ibcPortId)&&void 0!==s?s:"",c.extension=void 0!==e.extension&&null!==e.extension?a.Any.fromPartial(e.extension):void 0,c}};const v={operation:0,codeId:o.default.UZERO};t.ContractCodeHistoryEntry={encode:(e,n=i.default.Writer.create())=>(0!==e.operation&&n.uint32(8).int32(e.operation),e.codeId.isZero()||n.uint32(16).uint64(e.codeId),void 0!==e.updated&&t.AbsoluteTxPosition.encode(e.updated,n.uint32(26).fork()).ldelim(),0!==e.msg.length&&n.uint32(34).bytes(e.msg),n),decode(e,n){const r=e instanceof i.default.Reader?e:new i.default.Reader(e);let o=void 0===n?r.len:r.pos+n;const a=Object.assign({},v);for(a.msg=new Uint8Array;r.pos>>3){case 1:a.operation=r.int32();break;case 2:a.codeId=r.uint64();break;case 3:a.updated=t.AbsoluteTxPosition.decode(r,r.uint32());break;case 4:a.msg=r.bytes();break;default:r.skipType(7&e)}}return a},fromJSON(e){const n=Object.assign({},v);return n.operation=void 0!==e.operation&&null!==e.operation?l(e.operation):0,n.codeId=void 0!==e.codeId&&null!==e.codeId?o.default.fromString(e.codeId):o.default.UZERO,n.updated=void 0!==e.updated&&null!==e.updated?t.AbsoluteTxPosition.fromJSON(e.updated):void 0,n.msg=void 0!==e.msg&&null!==e.msg?E(e.msg):new Uint8Array,n},toJSON(e){const n={};return void 0!==e.operation&&(n.operation=A(e.operation)),void 0!==e.codeId&&(n.codeId=(e.codeId||o.default.UZERO).toString()),void 0!==e.updated&&(n.updated=e.updated?t.AbsoluteTxPosition.toJSON(e.updated):void 0),void 0!==e.msg&&(n.msg=B(void 0!==e.msg?e.msg:new Uint8Array)),n},fromPartial(e){var n,r;const i=Object.assign({},v);return i.operation=null!==(n=e.operation)&&void 0!==n?n:0,i.codeId=void 0!==e.codeId&&null!==e.codeId?o.default.fromValue(e.codeId):o.default.UZERO,i.updated=void 0!==e.updated&&null!==e.updated?t.AbsoluteTxPosition.fromPartial(e.updated):void 0,i.msg=null!==(r=e.msg)&&void 0!==r?r:new Uint8Array,i}};const y={blockHeight:o.default.UZERO,txIndex:o.default.UZERO};t.AbsoluteTxPosition={encode:(e,t=i.default.Writer.create())=>(e.blockHeight.isZero()||t.uint32(8).uint64(e.blockHeight),e.txIndex.isZero()||t.uint32(16).uint64(e.txIndex),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},y);for(;n.pos>>3){case 1:o.blockHeight=n.uint64();break;case 2:o.txIndex=n.uint64();break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},y);return t.blockHeight=void 0!==e.blockHeight&&null!==e.blockHeight?o.default.fromString(e.blockHeight):o.default.UZERO,t.txIndex=void 0!==e.txIndex&&null!==e.txIndex?o.default.fromString(e.txIndex):o.default.UZERO,t},toJSON(e){const t={};return void 0!==e.blockHeight&&(t.blockHeight=(e.blockHeight||o.default.UZERO).toString()),void 0!==e.txIndex&&(t.txIndex=(e.txIndex||o.default.UZERO).toString()),t},fromPartial(e){const t=Object.assign({},y);return t.blockHeight=void 0!==e.blockHeight&&null!==e.blockHeight?o.default.fromValue(e.blockHeight):o.default.UZERO,t.txIndex=void 0!==e.txIndex&&null!==e.txIndex?o.default.fromValue(e.txIndex):o.default.UZERO,t}};const b={};t.Model={encode:(e,t=i.default.Writer.create())=>(0!==e.key.length&&t.uint32(10).bytes(e.key),0!==e.value.length&&t.uint32(18).bytes(e.value),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},b);for(o.key=new Uint8Array,o.value=new Uint8Array;n.pos>>3){case 1:o.key=n.bytes();break;case 2:o.value=n.bytes();break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},b);return t.key=void 0!==e.key&&null!==e.key?E(e.key):new Uint8Array,t.value=void 0!==e.value&&null!==e.value?E(e.value):new Uint8Array,t},toJSON(e){const t={};return void 0!==e.key&&(t.key=B(void 0!==e.key?e.key:new Uint8Array)),void 0!==e.value&&(t.value=B(void 0!==e.value?e.value:new Uint8Array)),t},fromPartial(e){var t,n;const r=Object.assign({},b);return r.key=null!==(t=e.key)&&void 0!==t?t:new Uint8Array,r.value=null!==(n=e.value)&&void 0!==n?n:new Uint8Array,r}};var I=(()=>{if(void 0!==I)return I;if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==n.g)return n.g;throw"Unable to locate global object"})();const C=I.atob||(e=>I.Buffer.from(e,"base64").toString("binary"));function E(e){const t=C(e),n=new Uint8Array(t.length);for(let e=0;eI.Buffer.from(e,"binary").toString("base64"));function B(e){const t=[];for(const n of e)t.push(String.fromCharCode(n));return w(t.join(""))}i.default.util.Long!==o.default&&(i.default.util.Long=o.default,i.default.configure())},3862:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Any=t.protobufPackage=void 0;const o=r(n(3720)),i=r(n(3789));t.protobufPackage="google.protobuf";const a={typeUrl:""};t.Any={encode:(e,t=i.default.Writer.create())=>(""!==e.typeUrl&&t.uint32(10).string(e.typeUrl),0!==e.value.length&&t.uint32(18).bytes(e.value),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},a);for(o.value=new Uint8Array;n.pos>>3){case 1:o.typeUrl=n.string();break;case 2:o.value=n.bytes();break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},a);return t.typeUrl=void 0!==e.typeUrl&&null!==e.typeUrl?String(e.typeUrl):"",t.value=void 0!==e.value&&null!==e.value?function(e){const t=c(e),n=new Uint8Array(t.length);for(let e=0;e{if(void 0!==s)return s;if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==n.g)return n.g;throw"Unable to locate global object"})();const c=s.atob||(e=>s.Buffer.from(e,"base64").toString("binary")),d=s.btoa||(e=>s.Buffer.from(e,"binary").toString("base64"));i.default.util.Long!==o.default&&(i.default.util.Long=o.default,i.default.configure())},281:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Duration=t.protobufPackage=void 0;const o=r(n(3720)),i=r(n(3789));t.protobufPackage="google.protobuf";const a={seconds:o.default.ZERO,nanos:0};t.Duration={encode:(e,t=i.default.Writer.create())=>(e.seconds.isZero()||t.uint32(8).int64(e.seconds),0!==e.nanos&&t.uint32(16).int32(e.nanos),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},a);for(;n.pos>>3){case 1:o.seconds=n.int64();break;case 2:o.nanos=n.int32();break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},a);return t.seconds=void 0!==e.seconds&&null!==e.seconds?o.default.fromString(e.seconds):o.default.ZERO,t.nanos=void 0!==e.nanos&&null!==e.nanos?Number(e.nanos):0,t},toJSON(e){const t={};return void 0!==e.seconds&&(t.seconds=(e.seconds||o.default.ZERO).toString()),void 0!==e.nanos&&(t.nanos=e.nanos),t},fromPartial(e){var t;const n=Object.assign({},a);return n.seconds=void 0!==e.seconds&&null!==e.seconds?o.default.fromValue(e.seconds):o.default.ZERO,n.nanos=null!==(t=e.nanos)&&void 0!==t?t:0,n}},i.default.util.Long!==o.default&&(i.default.util.Long=o.default,i.default.configure())},5522:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Timestamp=t.protobufPackage=void 0;const o=r(n(3720)),i=r(n(3789));t.protobufPackage="google.protobuf";const a={seconds:o.default.ZERO,nanos:0};t.Timestamp={encode:(e,t=i.default.Writer.create())=>(e.seconds.isZero()||t.uint32(8).int64(e.seconds),0!==e.nanos&&t.uint32(16).int32(e.nanos),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},a);for(;n.pos>>3){case 1:o.seconds=n.int64();break;case 2:o.nanos=n.int32();break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},a);return t.seconds=void 0!==e.seconds&&null!==e.seconds?o.default.fromString(e.seconds):o.default.ZERO,t.nanos=void 0!==e.nanos&&null!==e.nanos?Number(e.nanos):0,t},toJSON(e){const t={};return void 0!==e.seconds&&(t.seconds=(e.seconds||o.default.ZERO).toString()),void 0!==e.nanos&&(t.nanos=e.nanos),t},fromPartial(e){var t;const n=Object.assign({},a);return n.seconds=void 0!==e.seconds&&null!==e.seconds?o.default.fromValue(e.seconds):o.default.ZERO,n.nanos=null!==(t=e.nanos)&&void 0!==t?t:0,n}},i.default.util.Long!==o.default&&(i.default.util.Long=o.default,i.default.configure())},5892:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.QueryClientImpl=t.QueryParamsResponse=t.QueryParamsRequest=t.QueryDenomTracesResponse=t.QueryDenomTracesRequest=t.QueryDenomTraceResponse=t.QueryDenomTraceRequest=t.protobufPackage=void 0;const o=r(n(3720)),i=r(n(3789)),a=n(1417),s=n(9551);t.protobufPackage="ibc.applications.transfer.v1";const c={hash:""};t.QueryDenomTraceRequest={encode:(e,t=i.default.Writer.create())=>(""!==e.hash&&t.uint32(10).string(e.hash),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},c);for(;n.pos>>3==1?o.hash=n.string():n.skipType(7&e)}return o},fromJSON(e){const t=Object.assign({},c);return t.hash=void 0!==e.hash&&null!==e.hash?String(e.hash):"",t},toJSON(e){const t={};return void 0!==e.hash&&(t.hash=e.hash),t},fromPartial(e){var t;const n=Object.assign({},c);return n.hash=null!==(t=e.hash)&&void 0!==t?t:"",n}};const d={};t.QueryDenomTraceResponse={encode:(e,t=i.default.Writer.create())=>(void 0!==e.denomTrace&&a.DenomTrace.encode(e.denomTrace,t.uint32(10).fork()).ldelim(),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},d);for(;n.pos>>3==1?o.denomTrace=a.DenomTrace.decode(n,n.uint32()):n.skipType(7&e)}return o},fromJSON(e){const t=Object.assign({},d);return t.denomTrace=void 0!==e.denomTrace&&null!==e.denomTrace?a.DenomTrace.fromJSON(e.denomTrace):void 0,t},toJSON(e){const t={};return void 0!==e.denomTrace&&(t.denomTrace=e.denomTrace?a.DenomTrace.toJSON(e.denomTrace):void 0),t},fromPartial(e){const t=Object.assign({},d);return t.denomTrace=void 0!==e.denomTrace&&null!==e.denomTrace?a.DenomTrace.fromPartial(e.denomTrace):void 0,t}};const u={};t.QueryDenomTracesRequest={encode:(e,t=i.default.Writer.create())=>(void 0!==e.pagination&&s.PageRequest.encode(e.pagination,t.uint32(10).fork()).ldelim(),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},u);for(;n.pos>>3==1?o.pagination=s.PageRequest.decode(n,n.uint32()):n.skipType(7&e)}return o},fromJSON(e){const t=Object.assign({},u);return t.pagination=void 0!==e.pagination&&null!==e.pagination?s.PageRequest.fromJSON(e.pagination):void 0,t},toJSON(e){const t={};return void 0!==e.pagination&&(t.pagination=e.pagination?s.PageRequest.toJSON(e.pagination):void 0),t},fromPartial(e){const t=Object.assign({},u);return t.pagination=void 0!==e.pagination&&null!==e.pagination?s.PageRequest.fromPartial(e.pagination):void 0,t}};const l={};t.QueryDenomTracesResponse={encode(e,t=i.default.Writer.create()){for(const n of e.denomTraces)a.DenomTrace.encode(n,t.uint32(10).fork()).ldelim();return void 0!==e.pagination&&s.PageResponse.encode(e.pagination,t.uint32(18).fork()).ldelim(),t},decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},l);for(o.denomTraces=[];n.pos>>3){case 1:o.denomTraces.push(a.DenomTrace.decode(n,n.uint32()));break;case 2:o.pagination=s.PageResponse.decode(n,n.uint32());break;default:n.skipType(7&e)}}return o},fromJSON(e){var t;const n=Object.assign({},l);return n.denomTraces=(null!==(t=e.denomTraces)&&void 0!==t?t:[]).map((e=>a.DenomTrace.fromJSON(e))),n.pagination=void 0!==e.pagination&&null!==e.pagination?s.PageResponse.fromJSON(e.pagination):void 0,n},toJSON(e){const t={};return e.denomTraces?t.denomTraces=e.denomTraces.map((e=>e?a.DenomTrace.toJSON(e):void 0)):t.denomTraces=[],void 0!==e.pagination&&(t.pagination=e.pagination?s.PageResponse.toJSON(e.pagination):void 0),t},fromPartial(e){var t;const n=Object.assign({},l);return n.denomTraces=(null===(t=e.denomTraces)||void 0===t?void 0:t.map((e=>a.DenomTrace.fromPartial(e))))||[],n.pagination=void 0!==e.pagination&&null!==e.pagination?s.PageResponse.fromPartial(e.pagination):void 0,n}};const A={};t.QueryParamsRequest={encode:(e,t=i.default.Writer.create())=>t,decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},A);for(;n.posObject.assign({},A),toJSON:e=>({}),fromPartial:e=>Object.assign({},A)};const f={};t.QueryParamsResponse={encode:(e,t=i.default.Writer.create())=>(void 0!==e.params&&a.Params.encode(e.params,t.uint32(10).fork()).ldelim(),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},f);for(;n.pos>>3==1?o.params=a.Params.decode(n,n.uint32()):n.skipType(7&e)}return o},fromJSON(e){const t=Object.assign({},f);return t.params=void 0!==e.params&&null!==e.params?a.Params.fromJSON(e.params):void 0,t},toJSON(e){const t={};return void 0!==e.params&&(t.params=e.params?a.Params.toJSON(e.params):void 0),t},fromPartial(e){const t=Object.assign({},f);return t.params=void 0!==e.params&&null!==e.params?a.Params.fromPartial(e.params):void 0,t}},t.QueryClientImpl=class{constructor(e){this.rpc=e,this.DenomTrace=this.DenomTrace.bind(this),this.DenomTraces=this.DenomTraces.bind(this),this.Params=this.Params.bind(this)}DenomTrace(e){const n=t.QueryDenomTraceRequest.encode(e).finish();return this.rpc.request("ibc.applications.transfer.v1.Query","DenomTrace",n).then((e=>t.QueryDenomTraceResponse.decode(new i.default.Reader(e))))}DenomTraces(e){const n=t.QueryDenomTracesRequest.encode(e).finish();return this.rpc.request("ibc.applications.transfer.v1.Query","DenomTraces",n).then((e=>t.QueryDenomTracesResponse.decode(new i.default.Reader(e))))}Params(e){const n=t.QueryParamsRequest.encode(e).finish();return this.rpc.request("ibc.applications.transfer.v1.Query","Params",n).then((e=>t.QueryParamsResponse.decode(new i.default.Reader(e))))}},i.default.util.Long!==o.default&&(i.default.util.Long=o.default,i.default.configure())},1417:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Params=t.DenomTrace=t.FungibleTokenPacketData=t.protobufPackage=void 0;const o=r(n(3720)),i=r(n(3789));t.protobufPackage="ibc.applications.transfer.v1";const a={denom:"",amount:o.default.UZERO,sender:"",receiver:""};t.FungibleTokenPacketData={encode:(e,t=i.default.Writer.create())=>(""!==e.denom&&t.uint32(10).string(e.denom),e.amount.isZero()||t.uint32(16).uint64(e.amount),""!==e.sender&&t.uint32(26).string(e.sender),""!==e.receiver&&t.uint32(34).string(e.receiver),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},a);for(;n.pos>>3){case 1:o.denom=n.string();break;case 2:o.amount=n.uint64();break;case 3:o.sender=n.string();break;case 4:o.receiver=n.string();break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},a);return t.denom=void 0!==e.denom&&null!==e.denom?String(e.denom):"",t.amount=void 0!==e.amount&&null!==e.amount?o.default.fromString(e.amount):o.default.UZERO,t.sender=void 0!==e.sender&&null!==e.sender?String(e.sender):"",t.receiver=void 0!==e.receiver&&null!==e.receiver?String(e.receiver):"",t},toJSON(e){const t={};return void 0!==e.denom&&(t.denom=e.denom),void 0!==e.amount&&(t.amount=(e.amount||o.default.UZERO).toString()),void 0!==e.sender&&(t.sender=e.sender),void 0!==e.receiver&&(t.receiver=e.receiver),t},fromPartial(e){var t,n,r;const i=Object.assign({},a);return i.denom=null!==(t=e.denom)&&void 0!==t?t:"",i.amount=void 0!==e.amount&&null!==e.amount?o.default.fromValue(e.amount):o.default.UZERO,i.sender=null!==(n=e.sender)&&void 0!==n?n:"",i.receiver=null!==(r=e.receiver)&&void 0!==r?r:"",i}};const s={path:"",baseDenom:""};t.DenomTrace={encode:(e,t=i.default.Writer.create())=>(""!==e.path&&t.uint32(10).string(e.path),""!==e.baseDenom&&t.uint32(18).string(e.baseDenom),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},s);for(;n.pos>>3){case 1:o.path=n.string();break;case 2:o.baseDenom=n.string();break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},s);return t.path=void 0!==e.path&&null!==e.path?String(e.path):"",t.baseDenom=void 0!==e.baseDenom&&null!==e.baseDenom?String(e.baseDenom):"",t},toJSON(e){const t={};return void 0!==e.path&&(t.path=e.path),void 0!==e.baseDenom&&(t.baseDenom=e.baseDenom),t},fromPartial(e){var t,n;const r=Object.assign({},s);return r.path=null!==(t=e.path)&&void 0!==t?t:"",r.baseDenom=null!==(n=e.baseDenom)&&void 0!==n?n:"",r}};const c={sendEnabled:!1,receiveEnabled:!1};t.Params={encode:(e,t=i.default.Writer.create())=>(!0===e.sendEnabled&&t.uint32(8).bool(e.sendEnabled),!0===e.receiveEnabled&&t.uint32(16).bool(e.receiveEnabled),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},c);for(;n.pos>>3){case 1:o.sendEnabled=n.bool();break;case 2:o.receiveEnabled=n.bool();break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},c);return t.sendEnabled=void 0!==e.sendEnabled&&null!==e.sendEnabled&&Boolean(e.sendEnabled),t.receiveEnabled=void 0!==e.receiveEnabled&&null!==e.receiveEnabled&&Boolean(e.receiveEnabled),t},toJSON(e){const t={};return void 0!==e.sendEnabled&&(t.sendEnabled=e.sendEnabled),void 0!==e.receiveEnabled&&(t.receiveEnabled=e.receiveEnabled),t},fromPartial(e){var t,n;const r=Object.assign({},c);return r.sendEnabled=null!==(t=e.sendEnabled)&&void 0!==t&&t,r.receiveEnabled=null!==(n=e.receiveEnabled)&&void 0!==n&&n,r}},i.default.util.Long!==o.default&&(i.default.util.Long=o.default,i.default.configure())},9385:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.MsgClientImpl=t.MsgTransferResponse=t.MsgTransfer=t.protobufPackage=void 0;const o=r(n(3720)),i=r(n(3789)),a=n(891),s=n(5022);t.protobufPackage="ibc.applications.transfer.v1";const c={sourcePort:"",sourceChannel:"",sender:"",receiver:"",timeoutTimestamp:o.default.UZERO};t.MsgTransfer={encode:(e,t=i.default.Writer.create())=>(""!==e.sourcePort&&t.uint32(10).string(e.sourcePort),""!==e.sourceChannel&&t.uint32(18).string(e.sourceChannel),void 0!==e.token&&a.Coin.encode(e.token,t.uint32(26).fork()).ldelim(),""!==e.sender&&t.uint32(34).string(e.sender),""!==e.receiver&&t.uint32(42).string(e.receiver),void 0!==e.timeoutHeight&&s.Height.encode(e.timeoutHeight,t.uint32(50).fork()).ldelim(),e.timeoutTimestamp.isZero()||t.uint32(56).uint64(e.timeoutTimestamp),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},c);for(;n.pos>>3){case 1:o.sourcePort=n.string();break;case 2:o.sourceChannel=n.string();break;case 3:o.token=a.Coin.decode(n,n.uint32());break;case 4:o.sender=n.string();break;case 5:o.receiver=n.string();break;case 6:o.timeoutHeight=s.Height.decode(n,n.uint32());break;case 7:o.timeoutTimestamp=n.uint64();break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},c);return t.sourcePort=void 0!==e.sourcePort&&null!==e.sourcePort?String(e.sourcePort):"",t.sourceChannel=void 0!==e.sourceChannel&&null!==e.sourceChannel?String(e.sourceChannel):"",t.token=void 0!==e.token&&null!==e.token?a.Coin.fromJSON(e.token):void 0,t.sender=void 0!==e.sender&&null!==e.sender?String(e.sender):"",t.receiver=void 0!==e.receiver&&null!==e.receiver?String(e.receiver):"",t.timeoutHeight=void 0!==e.timeoutHeight&&null!==e.timeoutHeight?s.Height.fromJSON(e.timeoutHeight):void 0,t.timeoutTimestamp=void 0!==e.timeoutTimestamp&&null!==e.timeoutTimestamp?o.default.fromString(e.timeoutTimestamp):o.default.UZERO,t},toJSON(e){const t={};return void 0!==e.sourcePort&&(t.sourcePort=e.sourcePort),void 0!==e.sourceChannel&&(t.sourceChannel=e.sourceChannel),void 0!==e.token&&(t.token=e.token?a.Coin.toJSON(e.token):void 0),void 0!==e.sender&&(t.sender=e.sender),void 0!==e.receiver&&(t.receiver=e.receiver),void 0!==e.timeoutHeight&&(t.timeoutHeight=e.timeoutHeight?s.Height.toJSON(e.timeoutHeight):void 0),void 0!==e.timeoutTimestamp&&(t.timeoutTimestamp=(e.timeoutTimestamp||o.default.UZERO).toString()),t},fromPartial(e){var t,n,r,i;const d=Object.assign({},c);return d.sourcePort=null!==(t=e.sourcePort)&&void 0!==t?t:"",d.sourceChannel=null!==(n=e.sourceChannel)&&void 0!==n?n:"",d.token=void 0!==e.token&&null!==e.token?a.Coin.fromPartial(e.token):void 0,d.sender=null!==(r=e.sender)&&void 0!==r?r:"",d.receiver=null!==(i=e.receiver)&&void 0!==i?i:"",d.timeoutHeight=void 0!==e.timeoutHeight&&null!==e.timeoutHeight?s.Height.fromPartial(e.timeoutHeight):void 0,d.timeoutTimestamp=void 0!==e.timeoutTimestamp&&null!==e.timeoutTimestamp?o.default.fromValue(e.timeoutTimestamp):o.default.UZERO,d}};const d={};t.MsgTransferResponse={encode:(e,t=i.default.Writer.create())=>t,decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},d);for(;n.posObject.assign({},d),toJSON:e=>({}),fromPartial:e=>Object.assign({},d)},t.MsgClientImpl=class{constructor(e){this.rpc=e,this.Transfer=this.Transfer.bind(this)}Transfer(e){const n=t.MsgTransfer.encode(e).finish();return this.rpc.request("ibc.applications.transfer.v1.Msg","Transfer",n).then((e=>t.MsgTransferResponse.decode(new i.default.Reader(e))))}},i.default.util.Long!==o.default&&(i.default.util.Long=o.default,i.default.configure())},1787:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Acknowledgement=t.PacketState=t.Packet=t.Counterparty=t.IdentifiedChannel=t.Channel=t.orderToJSON=t.orderFromJSON=t.Order=t.stateToJSON=t.stateFromJSON=t.State=t.protobufPackage=void 0;const o=r(n(3720)),i=r(n(3789)),a=n(5022);var s,c;function d(e){switch(e){case 0:case"STATE_UNINITIALIZED_UNSPECIFIED":return s.STATE_UNINITIALIZED_UNSPECIFIED;case 1:case"STATE_INIT":return s.STATE_INIT;case 2:case"STATE_TRYOPEN":return s.STATE_TRYOPEN;case 3:case"STATE_OPEN":return s.STATE_OPEN;case 4:case"STATE_CLOSED":return s.STATE_CLOSED;default:return s.UNRECOGNIZED}}function u(e){switch(e){case s.STATE_UNINITIALIZED_UNSPECIFIED:return"STATE_UNINITIALIZED_UNSPECIFIED";case s.STATE_INIT:return"STATE_INIT";case s.STATE_TRYOPEN:return"STATE_TRYOPEN";case s.STATE_OPEN:return"STATE_OPEN";case s.STATE_CLOSED:return"STATE_CLOSED";default:return"UNKNOWN"}}function l(e){switch(e){case 0:case"ORDER_NONE_UNSPECIFIED":return c.ORDER_NONE_UNSPECIFIED;case 1:case"ORDER_UNORDERED":return c.ORDER_UNORDERED;case 2:case"ORDER_ORDERED":return c.ORDER_ORDERED;default:return c.UNRECOGNIZED}}function A(e){switch(e){case c.ORDER_NONE_UNSPECIFIED:return"ORDER_NONE_UNSPECIFIED";case c.ORDER_UNORDERED:return"ORDER_UNORDERED";case c.ORDER_ORDERED:return"ORDER_ORDERED";default:return"UNKNOWN"}}t.protobufPackage="ibc.core.channel.v1",function(e){e[e.STATE_UNINITIALIZED_UNSPECIFIED=0]="STATE_UNINITIALIZED_UNSPECIFIED",e[e.STATE_INIT=1]="STATE_INIT",e[e.STATE_TRYOPEN=2]="STATE_TRYOPEN",e[e.STATE_OPEN=3]="STATE_OPEN",e[e.STATE_CLOSED=4]="STATE_CLOSED",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(s=t.State||(t.State={})),t.stateFromJSON=d,t.stateToJSON=u,function(e){e[e.ORDER_NONE_UNSPECIFIED=0]="ORDER_NONE_UNSPECIFIED",e[e.ORDER_UNORDERED=1]="ORDER_UNORDERED",e[e.ORDER_ORDERED=2]="ORDER_ORDERED",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(c=t.Order||(t.Order={})),t.orderFromJSON=l,t.orderToJSON=A;const f={state:0,ordering:0,connectionHops:"",version:""};t.Channel={encode(e,n=i.default.Writer.create()){0!==e.state&&n.uint32(8).int32(e.state),0!==e.ordering&&n.uint32(16).int32(e.ordering),void 0!==e.counterparty&&t.Counterparty.encode(e.counterparty,n.uint32(26).fork()).ldelim();for(const t of e.connectionHops)n.uint32(34).string(t);return""!==e.version&&n.uint32(42).string(e.version),n},decode(e,n){const r=e instanceof i.default.Reader?e:new i.default.Reader(e);let o=void 0===n?r.len:r.pos+n;const a=Object.assign({},f);for(a.connectionHops=[];r.pos>>3){case 1:a.state=r.int32();break;case 2:a.ordering=r.int32();break;case 3:a.counterparty=t.Counterparty.decode(r,r.uint32());break;case 4:a.connectionHops.push(r.string());break;case 5:a.version=r.string();break;default:r.skipType(7&e)}}return a},fromJSON(e){var n;const r=Object.assign({},f);return r.state=void 0!==e.state&&null!==e.state?d(e.state):0,r.ordering=void 0!==e.ordering&&null!==e.ordering?l(e.ordering):0,r.counterparty=void 0!==e.counterparty&&null!==e.counterparty?t.Counterparty.fromJSON(e.counterparty):void 0,r.connectionHops=(null!==(n=e.connectionHops)&&void 0!==n?n:[]).map((e=>String(e))),r.version=void 0!==e.version&&null!==e.version?String(e.version):"",r},toJSON(e){const n={};return void 0!==e.state&&(n.state=u(e.state)),void 0!==e.ordering&&(n.ordering=A(e.ordering)),void 0!==e.counterparty&&(n.counterparty=e.counterparty?t.Counterparty.toJSON(e.counterparty):void 0),e.connectionHops?n.connectionHops=e.connectionHops.map((e=>e)):n.connectionHops=[],void 0!==e.version&&(n.version=e.version),n},fromPartial(e){var n,r,o,i;const a=Object.assign({},f);return a.state=null!==(n=e.state)&&void 0!==n?n:0,a.ordering=null!==(r=e.ordering)&&void 0!==r?r:0,a.counterparty=void 0!==e.counterparty&&null!==e.counterparty?t.Counterparty.fromPartial(e.counterparty):void 0,a.connectionHops=(null===(o=e.connectionHops)||void 0===o?void 0:o.map((e=>e)))||[],a.version=null!==(i=e.version)&&void 0!==i?i:"",a}};const h={state:0,ordering:0,connectionHops:"",version:"",portId:"",channelId:""};t.IdentifiedChannel={encode(e,n=i.default.Writer.create()){0!==e.state&&n.uint32(8).int32(e.state),0!==e.ordering&&n.uint32(16).int32(e.ordering),void 0!==e.counterparty&&t.Counterparty.encode(e.counterparty,n.uint32(26).fork()).ldelim();for(const t of e.connectionHops)n.uint32(34).string(t);return""!==e.version&&n.uint32(42).string(e.version),""!==e.portId&&n.uint32(50).string(e.portId),""!==e.channelId&&n.uint32(58).string(e.channelId),n},decode(e,n){const r=e instanceof i.default.Reader?e:new i.default.Reader(e);let o=void 0===n?r.len:r.pos+n;const a=Object.assign({},h);for(a.connectionHops=[];r.pos>>3){case 1:a.state=r.int32();break;case 2:a.ordering=r.int32();break;case 3:a.counterparty=t.Counterparty.decode(r,r.uint32());break;case 4:a.connectionHops.push(r.string());break;case 5:a.version=r.string();break;case 6:a.portId=r.string();break;case 7:a.channelId=r.string();break;default:r.skipType(7&e)}}return a},fromJSON(e){var n;const r=Object.assign({},h);return r.state=void 0!==e.state&&null!==e.state?d(e.state):0,r.ordering=void 0!==e.ordering&&null!==e.ordering?l(e.ordering):0,r.counterparty=void 0!==e.counterparty&&null!==e.counterparty?t.Counterparty.fromJSON(e.counterparty):void 0,r.connectionHops=(null!==(n=e.connectionHops)&&void 0!==n?n:[]).map((e=>String(e))),r.version=void 0!==e.version&&null!==e.version?String(e.version):"",r.portId=void 0!==e.portId&&null!==e.portId?String(e.portId):"",r.channelId=void 0!==e.channelId&&null!==e.channelId?String(e.channelId):"",r},toJSON(e){const n={};return void 0!==e.state&&(n.state=u(e.state)),void 0!==e.ordering&&(n.ordering=A(e.ordering)),void 0!==e.counterparty&&(n.counterparty=e.counterparty?t.Counterparty.toJSON(e.counterparty):void 0),e.connectionHops?n.connectionHops=e.connectionHops.map((e=>e)):n.connectionHops=[],void 0!==e.version&&(n.version=e.version),void 0!==e.portId&&(n.portId=e.portId),void 0!==e.channelId&&(n.channelId=e.channelId),n},fromPartial(e){var n,r,o,i,a,s;const c=Object.assign({},h);return c.state=null!==(n=e.state)&&void 0!==n?n:0,c.ordering=null!==(r=e.ordering)&&void 0!==r?r:0,c.counterparty=void 0!==e.counterparty&&null!==e.counterparty?t.Counterparty.fromPartial(e.counterparty):void 0,c.connectionHops=(null===(o=e.connectionHops)||void 0===o?void 0:o.map((e=>e)))||[],c.version=null!==(i=e.version)&&void 0!==i?i:"",c.portId=null!==(a=e.portId)&&void 0!==a?a:"",c.channelId=null!==(s=e.channelId)&&void 0!==s?s:"",c}};const g={portId:"",channelId:""};t.Counterparty={encode:(e,t=i.default.Writer.create())=>(""!==e.portId&&t.uint32(10).string(e.portId),""!==e.channelId&&t.uint32(18).string(e.channelId),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},g);for(;n.pos>>3){case 1:o.portId=n.string();break;case 2:o.channelId=n.string();break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},g);return t.portId=void 0!==e.portId&&null!==e.portId?String(e.portId):"",t.channelId=void 0!==e.channelId&&null!==e.channelId?String(e.channelId):"",t},toJSON(e){const t={};return void 0!==e.portId&&(t.portId=e.portId),void 0!==e.channelId&&(t.channelId=e.channelId),t},fromPartial(e){var t,n;const r=Object.assign({},g);return r.portId=null!==(t=e.portId)&&void 0!==t?t:"",r.channelId=null!==(n=e.channelId)&&void 0!==n?n:"",r}};const p={sequence:o.default.UZERO,sourcePort:"",sourceChannel:"",destinationPort:"",destinationChannel:"",timeoutTimestamp:o.default.UZERO};t.Packet={encode:(e,t=i.default.Writer.create())=>(e.sequence.isZero()||t.uint32(8).uint64(e.sequence),""!==e.sourcePort&&t.uint32(18).string(e.sourcePort),""!==e.sourceChannel&&t.uint32(26).string(e.sourceChannel),""!==e.destinationPort&&t.uint32(34).string(e.destinationPort),""!==e.destinationChannel&&t.uint32(42).string(e.destinationChannel),0!==e.data.length&&t.uint32(50).bytes(e.data),void 0!==e.timeoutHeight&&a.Height.encode(e.timeoutHeight,t.uint32(58).fork()).ldelim(),e.timeoutTimestamp.isZero()||t.uint32(64).uint64(e.timeoutTimestamp),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},p);for(o.data=new Uint8Array;n.pos>>3){case 1:o.sequence=n.uint64();break;case 2:o.sourcePort=n.string();break;case 3:o.sourceChannel=n.string();break;case 4:o.destinationPort=n.string();break;case 5:o.destinationChannel=n.string();break;case 6:o.data=n.bytes();break;case 7:o.timeoutHeight=a.Height.decode(n,n.uint32());break;case 8:o.timeoutTimestamp=n.uint64();break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},p);return t.sequence=void 0!==e.sequence&&null!==e.sequence?o.default.fromString(e.sequence):o.default.UZERO,t.sourcePort=void 0!==e.sourcePort&&null!==e.sourcePort?String(e.sourcePort):"",t.sourceChannel=void 0!==e.sourceChannel&&null!==e.sourceChannel?String(e.sourceChannel):"",t.destinationPort=void 0!==e.destinationPort&&null!==e.destinationPort?String(e.destinationPort):"",t.destinationChannel=void 0!==e.destinationChannel&&null!==e.destinationChannel?String(e.destinationChannel):"",t.data=void 0!==e.data&&null!==e.data?I(e.data):new Uint8Array,t.timeoutHeight=void 0!==e.timeoutHeight&&null!==e.timeoutHeight?a.Height.fromJSON(e.timeoutHeight):void 0,t.timeoutTimestamp=void 0!==e.timeoutTimestamp&&null!==e.timeoutTimestamp?o.default.fromString(e.timeoutTimestamp):o.default.UZERO,t},toJSON(e){const t={};return void 0!==e.sequence&&(t.sequence=(e.sequence||o.default.UZERO).toString()),void 0!==e.sourcePort&&(t.sourcePort=e.sourcePort),void 0!==e.sourceChannel&&(t.sourceChannel=e.sourceChannel),void 0!==e.destinationPort&&(t.destinationPort=e.destinationPort),void 0!==e.destinationChannel&&(t.destinationChannel=e.destinationChannel),void 0!==e.data&&(t.data=E(void 0!==e.data?e.data:new Uint8Array)),void 0!==e.timeoutHeight&&(t.timeoutHeight=e.timeoutHeight?a.Height.toJSON(e.timeoutHeight):void 0),void 0!==e.timeoutTimestamp&&(t.timeoutTimestamp=(e.timeoutTimestamp||o.default.UZERO).toString()),t},fromPartial(e){var t,n,r,i,s;const c=Object.assign({},p);return c.sequence=void 0!==e.sequence&&null!==e.sequence?o.default.fromValue(e.sequence):o.default.UZERO,c.sourcePort=null!==(t=e.sourcePort)&&void 0!==t?t:"",c.sourceChannel=null!==(n=e.sourceChannel)&&void 0!==n?n:"",c.destinationPort=null!==(r=e.destinationPort)&&void 0!==r?r:"",c.destinationChannel=null!==(i=e.destinationChannel)&&void 0!==i?i:"",c.data=null!==(s=e.data)&&void 0!==s?s:new Uint8Array,c.timeoutHeight=void 0!==e.timeoutHeight&&null!==e.timeoutHeight?a.Height.fromPartial(e.timeoutHeight):void 0,c.timeoutTimestamp=void 0!==e.timeoutTimestamp&&null!==e.timeoutTimestamp?o.default.fromValue(e.timeoutTimestamp):o.default.UZERO,c}};const m={portId:"",channelId:"",sequence:o.default.UZERO};t.PacketState={encode:(e,t=i.default.Writer.create())=>(""!==e.portId&&t.uint32(10).string(e.portId),""!==e.channelId&&t.uint32(18).string(e.channelId),e.sequence.isZero()||t.uint32(24).uint64(e.sequence),0!==e.data.length&&t.uint32(34).bytes(e.data),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},m);for(o.data=new Uint8Array;n.pos>>3){case 1:o.portId=n.string();break;case 2:o.channelId=n.string();break;case 3:o.sequence=n.uint64();break;case 4:o.data=n.bytes();break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},m);return t.portId=void 0!==e.portId&&null!==e.portId?String(e.portId):"",t.channelId=void 0!==e.channelId&&null!==e.channelId?String(e.channelId):"",t.sequence=void 0!==e.sequence&&null!==e.sequence?o.default.fromString(e.sequence):o.default.UZERO,t.data=void 0!==e.data&&null!==e.data?I(e.data):new Uint8Array,t},toJSON(e){const t={};return void 0!==e.portId&&(t.portId=e.portId),void 0!==e.channelId&&(t.channelId=e.channelId),void 0!==e.sequence&&(t.sequence=(e.sequence||o.default.UZERO).toString()),void 0!==e.data&&(t.data=E(void 0!==e.data?e.data:new Uint8Array)),t},fromPartial(e){var t,n,r;const i=Object.assign({},m);return i.portId=null!==(t=e.portId)&&void 0!==t?t:"",i.channelId=null!==(n=e.channelId)&&void 0!==n?n:"",i.sequence=void 0!==e.sequence&&null!==e.sequence?o.default.fromValue(e.sequence):o.default.UZERO,i.data=null!==(r=e.data)&&void 0!==r?r:new Uint8Array,i}};const v={};t.Acknowledgement={encode:(e,t=i.default.Writer.create())=>(void 0!==e.result&&t.uint32(170).bytes(e.result),void 0!==e.error&&t.uint32(178).string(e.error),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},v);for(;n.pos>>3){case 21:o.result=n.bytes();break;case 22:o.error=n.string();break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},v);return t.result=void 0!==e.result&&null!==e.result?I(e.result):void 0,t.error=void 0!==e.error&&null!==e.error?String(e.error):void 0,t},toJSON(e){const t={};return void 0!==e.result&&(t.result=void 0!==e.result?E(e.result):void 0),void 0!==e.error&&(t.error=e.error),t},fromPartial(e){var t,n;const r=Object.assign({},v);return r.result=null!==(t=e.result)&&void 0!==t?t:void 0,r.error=null!==(n=e.error)&&void 0!==n?n:void 0,r}};var y=(()=>{if(void 0!==y)return y;if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==n.g)return n.g;throw"Unable to locate global object"})();const b=y.atob||(e=>y.Buffer.from(e,"base64").toString("binary"));function I(e){const t=b(e),n=new Uint8Array(t.length);for(let e=0;ey.Buffer.from(e,"binary").toString("base64"));function E(e){const t=[];for(const n of e)t.push(String.fromCharCode(n));return C(t.join(""))}i.default.util.Long!==o.default&&(i.default.util.Long=o.default,i.default.configure())},6688:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.QueryClientImpl=t.QueryNextSequenceReceiveResponse=t.QueryNextSequenceReceiveRequest=t.QueryUnreceivedAcksResponse=t.QueryUnreceivedAcksRequest=t.QueryUnreceivedPacketsResponse=t.QueryUnreceivedPacketsRequest=t.QueryPacketAcknowledgementsResponse=t.QueryPacketAcknowledgementsRequest=t.QueryPacketAcknowledgementResponse=t.QueryPacketAcknowledgementRequest=t.QueryPacketReceiptResponse=t.QueryPacketReceiptRequest=t.QueryPacketCommitmentsResponse=t.QueryPacketCommitmentsRequest=t.QueryPacketCommitmentResponse=t.QueryPacketCommitmentRequest=t.QueryChannelConsensusStateResponse=t.QueryChannelConsensusStateRequest=t.QueryChannelClientStateResponse=t.QueryChannelClientStateRequest=t.QueryConnectionChannelsResponse=t.QueryConnectionChannelsRequest=t.QueryChannelsResponse=t.QueryChannelsRequest=t.QueryChannelResponse=t.QueryChannelRequest=t.protobufPackage=void 0;const o=r(n(3720)),i=r(n(3789)),a=n(1787),s=n(5022),c=n(9551),d=n(3862);t.protobufPackage="ibc.core.channel.v1";const u={portId:"",channelId:""};t.QueryChannelRequest={encode:(e,t=i.default.Writer.create())=>(""!==e.portId&&t.uint32(10).string(e.portId),""!==e.channelId&&t.uint32(18).string(e.channelId),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},u);for(;n.pos>>3){case 1:o.portId=n.string();break;case 2:o.channelId=n.string();break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},u);return t.portId=void 0!==e.portId&&null!==e.portId?String(e.portId):"",t.channelId=void 0!==e.channelId&&null!==e.channelId?String(e.channelId):"",t},toJSON(e){const t={};return void 0!==e.portId&&(t.portId=e.portId),void 0!==e.channelId&&(t.channelId=e.channelId),t},fromPartial(e){var t,n;const r=Object.assign({},u);return r.portId=null!==(t=e.portId)&&void 0!==t?t:"",r.channelId=null!==(n=e.channelId)&&void 0!==n?n:"",r}};const l={};t.QueryChannelResponse={encode:(e,t=i.default.Writer.create())=>(void 0!==e.channel&&a.Channel.encode(e.channel,t.uint32(10).fork()).ldelim(),0!==e.proof.length&&t.uint32(18).bytes(e.proof),void 0!==e.proofHeight&&s.Height.encode(e.proofHeight,t.uint32(26).fork()).ldelim(),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},l);for(o.proof=new Uint8Array;n.pos>>3){case 1:o.channel=a.Channel.decode(n,n.uint32());break;case 2:o.proof=n.bytes();break;case 3:o.proofHeight=s.Height.decode(n,n.uint32());break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},l);return t.channel=void 0!==e.channel&&null!==e.channel?a.Channel.fromJSON(e.channel):void 0,t.proof=void 0!==e.proof&&null!==e.proof?U(e.proof):new Uint8Array,t.proofHeight=void 0!==e.proofHeight&&null!==e.proofHeight?s.Height.fromJSON(e.proofHeight):void 0,t},toJSON(e){const t={};return void 0!==e.channel&&(t.channel=e.channel?a.Channel.toJSON(e.channel):void 0),void 0!==e.proof&&(t.proof=j(void 0!==e.proof?e.proof:new Uint8Array)),void 0!==e.proofHeight&&(t.proofHeight=e.proofHeight?s.Height.toJSON(e.proofHeight):void 0),t},fromPartial(e){var t;const n=Object.assign({},l);return n.channel=void 0!==e.channel&&null!==e.channel?a.Channel.fromPartial(e.channel):void 0,n.proof=null!==(t=e.proof)&&void 0!==t?t:new Uint8Array,n.proofHeight=void 0!==e.proofHeight&&null!==e.proofHeight?s.Height.fromPartial(e.proofHeight):void 0,n}};const A={};t.QueryChannelsRequest={encode:(e,t=i.default.Writer.create())=>(void 0!==e.pagination&&c.PageRequest.encode(e.pagination,t.uint32(10).fork()).ldelim(),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},A);for(;n.pos>>3==1?o.pagination=c.PageRequest.decode(n,n.uint32()):n.skipType(7&e)}return o},fromJSON(e){const t=Object.assign({},A);return t.pagination=void 0!==e.pagination&&null!==e.pagination?c.PageRequest.fromJSON(e.pagination):void 0,t},toJSON(e){const t={};return void 0!==e.pagination&&(t.pagination=e.pagination?c.PageRequest.toJSON(e.pagination):void 0),t},fromPartial(e){const t=Object.assign({},A);return t.pagination=void 0!==e.pagination&&null!==e.pagination?c.PageRequest.fromPartial(e.pagination):void 0,t}};const f={};t.QueryChannelsResponse={encode(e,t=i.default.Writer.create()){for(const n of e.channels)a.IdentifiedChannel.encode(n,t.uint32(10).fork()).ldelim();return void 0!==e.pagination&&c.PageResponse.encode(e.pagination,t.uint32(18).fork()).ldelim(),void 0!==e.height&&s.Height.encode(e.height,t.uint32(26).fork()).ldelim(),t},decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},f);for(o.channels=[];n.pos>>3){case 1:o.channels.push(a.IdentifiedChannel.decode(n,n.uint32()));break;case 2:o.pagination=c.PageResponse.decode(n,n.uint32());break;case 3:o.height=s.Height.decode(n,n.uint32());break;default:n.skipType(7&e)}}return o},fromJSON(e){var t;const n=Object.assign({},f);return n.channels=(null!==(t=e.channels)&&void 0!==t?t:[]).map((e=>a.IdentifiedChannel.fromJSON(e))),n.pagination=void 0!==e.pagination&&null!==e.pagination?c.PageResponse.fromJSON(e.pagination):void 0,n.height=void 0!==e.height&&null!==e.height?s.Height.fromJSON(e.height):void 0,n},toJSON(e){const t={};return e.channels?t.channels=e.channels.map((e=>e?a.IdentifiedChannel.toJSON(e):void 0)):t.channels=[],void 0!==e.pagination&&(t.pagination=e.pagination?c.PageResponse.toJSON(e.pagination):void 0),void 0!==e.height&&(t.height=e.height?s.Height.toJSON(e.height):void 0),t},fromPartial(e){var t;const n=Object.assign({},f);return n.channels=(null===(t=e.channels)||void 0===t?void 0:t.map((e=>a.IdentifiedChannel.fromPartial(e))))||[],n.pagination=void 0!==e.pagination&&null!==e.pagination?c.PageResponse.fromPartial(e.pagination):void 0,n.height=void 0!==e.height&&null!==e.height?s.Height.fromPartial(e.height):void 0,n}};const h={connection:""};t.QueryConnectionChannelsRequest={encode:(e,t=i.default.Writer.create())=>(""!==e.connection&&t.uint32(10).string(e.connection),void 0!==e.pagination&&c.PageRequest.encode(e.pagination,t.uint32(18).fork()).ldelim(),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},h);for(;n.pos>>3){case 1:o.connection=n.string();break;case 2:o.pagination=c.PageRequest.decode(n,n.uint32());break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},h);return t.connection=void 0!==e.connection&&null!==e.connection?String(e.connection):"",t.pagination=void 0!==e.pagination&&null!==e.pagination?c.PageRequest.fromJSON(e.pagination):void 0,t},toJSON(e){const t={};return void 0!==e.connection&&(t.connection=e.connection),void 0!==e.pagination&&(t.pagination=e.pagination?c.PageRequest.toJSON(e.pagination):void 0),t},fromPartial(e){var t;const n=Object.assign({},h);return n.connection=null!==(t=e.connection)&&void 0!==t?t:"",n.pagination=void 0!==e.pagination&&null!==e.pagination?c.PageRequest.fromPartial(e.pagination):void 0,n}};const g={};t.QueryConnectionChannelsResponse={encode(e,t=i.default.Writer.create()){for(const n of e.channels)a.IdentifiedChannel.encode(n,t.uint32(10).fork()).ldelim();return void 0!==e.pagination&&c.PageResponse.encode(e.pagination,t.uint32(18).fork()).ldelim(),void 0!==e.height&&s.Height.encode(e.height,t.uint32(26).fork()).ldelim(),t},decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},g);for(o.channels=[];n.pos>>3){case 1:o.channels.push(a.IdentifiedChannel.decode(n,n.uint32()));break;case 2:o.pagination=c.PageResponse.decode(n,n.uint32());break;case 3:o.height=s.Height.decode(n,n.uint32());break;default:n.skipType(7&e)}}return o},fromJSON(e){var t;const n=Object.assign({},g);return n.channels=(null!==(t=e.channels)&&void 0!==t?t:[]).map((e=>a.IdentifiedChannel.fromJSON(e))),n.pagination=void 0!==e.pagination&&null!==e.pagination?c.PageResponse.fromJSON(e.pagination):void 0,n.height=void 0!==e.height&&null!==e.height?s.Height.fromJSON(e.height):void 0,n},toJSON(e){const t={};return e.channels?t.channels=e.channels.map((e=>e?a.IdentifiedChannel.toJSON(e):void 0)):t.channels=[],void 0!==e.pagination&&(t.pagination=e.pagination?c.PageResponse.toJSON(e.pagination):void 0),void 0!==e.height&&(t.height=e.height?s.Height.toJSON(e.height):void 0),t},fromPartial(e){var t;const n=Object.assign({},g);return n.channels=(null===(t=e.channels)||void 0===t?void 0:t.map((e=>a.IdentifiedChannel.fromPartial(e))))||[],n.pagination=void 0!==e.pagination&&null!==e.pagination?c.PageResponse.fromPartial(e.pagination):void 0,n.height=void 0!==e.height&&null!==e.height?s.Height.fromPartial(e.height):void 0,n}};const p={portId:"",channelId:""};t.QueryChannelClientStateRequest={encode:(e,t=i.default.Writer.create())=>(""!==e.portId&&t.uint32(10).string(e.portId),""!==e.channelId&&t.uint32(18).string(e.channelId),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},p);for(;n.pos>>3){case 1:o.portId=n.string();break;case 2:o.channelId=n.string();break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},p);return t.portId=void 0!==e.portId&&null!==e.portId?String(e.portId):"",t.channelId=void 0!==e.channelId&&null!==e.channelId?String(e.channelId):"",t},toJSON(e){const t={};return void 0!==e.portId&&(t.portId=e.portId),void 0!==e.channelId&&(t.channelId=e.channelId),t},fromPartial(e){var t,n;const r=Object.assign({},p);return r.portId=null!==(t=e.portId)&&void 0!==t?t:"",r.channelId=null!==(n=e.channelId)&&void 0!==n?n:"",r}};const m={};t.QueryChannelClientStateResponse={encode:(e,t=i.default.Writer.create())=>(void 0!==e.identifiedClientState&&s.IdentifiedClientState.encode(e.identifiedClientState,t.uint32(10).fork()).ldelim(),0!==e.proof.length&&t.uint32(18).bytes(e.proof),void 0!==e.proofHeight&&s.Height.encode(e.proofHeight,t.uint32(26).fork()).ldelim(),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},m);for(o.proof=new Uint8Array;n.pos>>3){case 1:o.identifiedClientState=s.IdentifiedClientState.decode(n,n.uint32());break;case 2:o.proof=n.bytes();break;case 3:o.proofHeight=s.Height.decode(n,n.uint32());break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},m);return t.identifiedClientState=void 0!==e.identifiedClientState&&null!==e.identifiedClientState?s.IdentifiedClientState.fromJSON(e.identifiedClientState):void 0,t.proof=void 0!==e.proof&&null!==e.proof?U(e.proof):new Uint8Array,t.proofHeight=void 0!==e.proofHeight&&null!==e.proofHeight?s.Height.fromJSON(e.proofHeight):void 0,t},toJSON(e){const t={};return void 0!==e.identifiedClientState&&(t.identifiedClientState=e.identifiedClientState?s.IdentifiedClientState.toJSON(e.identifiedClientState):void 0),void 0!==e.proof&&(t.proof=j(void 0!==e.proof?e.proof:new Uint8Array)),void 0!==e.proofHeight&&(t.proofHeight=e.proofHeight?s.Height.toJSON(e.proofHeight):void 0),t},fromPartial(e){var t;const n=Object.assign({},m);return n.identifiedClientState=void 0!==e.identifiedClientState&&null!==e.identifiedClientState?s.IdentifiedClientState.fromPartial(e.identifiedClientState):void 0,n.proof=null!==(t=e.proof)&&void 0!==t?t:new Uint8Array,n.proofHeight=void 0!==e.proofHeight&&null!==e.proofHeight?s.Height.fromPartial(e.proofHeight):void 0,n}};const v={portId:"",channelId:"",revisionNumber:o.default.UZERO,revisionHeight:o.default.UZERO};t.QueryChannelConsensusStateRequest={encode:(e,t=i.default.Writer.create())=>(""!==e.portId&&t.uint32(10).string(e.portId),""!==e.channelId&&t.uint32(18).string(e.channelId),e.revisionNumber.isZero()||t.uint32(24).uint64(e.revisionNumber),e.revisionHeight.isZero()||t.uint32(32).uint64(e.revisionHeight),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},v);for(;n.pos>>3){case 1:o.portId=n.string();break;case 2:o.channelId=n.string();break;case 3:o.revisionNumber=n.uint64();break;case 4:o.revisionHeight=n.uint64();break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},v);return t.portId=void 0!==e.portId&&null!==e.portId?String(e.portId):"",t.channelId=void 0!==e.channelId&&null!==e.channelId?String(e.channelId):"",t.revisionNumber=void 0!==e.revisionNumber&&null!==e.revisionNumber?o.default.fromString(e.revisionNumber):o.default.UZERO,t.revisionHeight=void 0!==e.revisionHeight&&null!==e.revisionHeight?o.default.fromString(e.revisionHeight):o.default.UZERO,t},toJSON(e){const t={};return void 0!==e.portId&&(t.portId=e.portId),void 0!==e.channelId&&(t.channelId=e.channelId),void 0!==e.revisionNumber&&(t.revisionNumber=(e.revisionNumber||o.default.UZERO).toString()),void 0!==e.revisionHeight&&(t.revisionHeight=(e.revisionHeight||o.default.UZERO).toString()),t},fromPartial(e){var t,n;const r=Object.assign({},v);return r.portId=null!==(t=e.portId)&&void 0!==t?t:"",r.channelId=null!==(n=e.channelId)&&void 0!==n?n:"",r.revisionNumber=void 0!==e.revisionNumber&&null!==e.revisionNumber?o.default.fromValue(e.revisionNumber):o.default.UZERO,r.revisionHeight=void 0!==e.revisionHeight&&null!==e.revisionHeight?o.default.fromValue(e.revisionHeight):o.default.UZERO,r}};const y={clientId:""};t.QueryChannelConsensusStateResponse={encode:(e,t=i.default.Writer.create())=>(void 0!==e.consensusState&&d.Any.encode(e.consensusState,t.uint32(10).fork()).ldelim(),""!==e.clientId&&t.uint32(18).string(e.clientId),0!==e.proof.length&&t.uint32(26).bytes(e.proof),void 0!==e.proofHeight&&s.Height.encode(e.proofHeight,t.uint32(34).fork()).ldelim(),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},y);for(o.proof=new Uint8Array;n.pos>>3){case 1:o.consensusState=d.Any.decode(n,n.uint32());break;case 2:o.clientId=n.string();break;case 3:o.proof=n.bytes();break;case 4:o.proofHeight=s.Height.decode(n,n.uint32());break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},y);return t.consensusState=void 0!==e.consensusState&&null!==e.consensusState?d.Any.fromJSON(e.consensusState):void 0,t.clientId=void 0!==e.clientId&&null!==e.clientId?String(e.clientId):"",t.proof=void 0!==e.proof&&null!==e.proof?U(e.proof):new Uint8Array,t.proofHeight=void 0!==e.proofHeight&&null!==e.proofHeight?s.Height.fromJSON(e.proofHeight):void 0,t},toJSON(e){const t={};return void 0!==e.consensusState&&(t.consensusState=e.consensusState?d.Any.toJSON(e.consensusState):void 0),void 0!==e.clientId&&(t.clientId=e.clientId),void 0!==e.proof&&(t.proof=j(void 0!==e.proof?e.proof:new Uint8Array)),void 0!==e.proofHeight&&(t.proofHeight=e.proofHeight?s.Height.toJSON(e.proofHeight):void 0),t},fromPartial(e){var t,n;const r=Object.assign({},y);return r.consensusState=void 0!==e.consensusState&&null!==e.consensusState?d.Any.fromPartial(e.consensusState):void 0,r.clientId=null!==(t=e.clientId)&&void 0!==t?t:"",r.proof=null!==(n=e.proof)&&void 0!==n?n:new Uint8Array,r.proofHeight=void 0!==e.proofHeight&&null!==e.proofHeight?s.Height.fromPartial(e.proofHeight):void 0,r}};const b={portId:"",channelId:"",sequence:o.default.UZERO};t.QueryPacketCommitmentRequest={encode:(e,t=i.default.Writer.create())=>(""!==e.portId&&t.uint32(10).string(e.portId),""!==e.channelId&&t.uint32(18).string(e.channelId),e.sequence.isZero()||t.uint32(24).uint64(e.sequence),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},b);for(;n.pos>>3){case 1:o.portId=n.string();break;case 2:o.channelId=n.string();break;case 3:o.sequence=n.uint64();break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},b);return t.portId=void 0!==e.portId&&null!==e.portId?String(e.portId):"",t.channelId=void 0!==e.channelId&&null!==e.channelId?String(e.channelId):"",t.sequence=void 0!==e.sequence&&null!==e.sequence?o.default.fromString(e.sequence):o.default.UZERO,t},toJSON(e){const t={};return void 0!==e.portId&&(t.portId=e.portId),void 0!==e.channelId&&(t.channelId=e.channelId),void 0!==e.sequence&&(t.sequence=(e.sequence||o.default.UZERO).toString()),t},fromPartial(e){var t,n;const r=Object.assign({},b);return r.portId=null!==(t=e.portId)&&void 0!==t?t:"",r.channelId=null!==(n=e.channelId)&&void 0!==n?n:"",r.sequence=void 0!==e.sequence&&null!==e.sequence?o.default.fromValue(e.sequence):o.default.UZERO,r}};const I={};t.QueryPacketCommitmentResponse={encode:(e,t=i.default.Writer.create())=>(0!==e.commitment.length&&t.uint32(10).bytes(e.commitment),0!==e.proof.length&&t.uint32(18).bytes(e.proof),void 0!==e.proofHeight&&s.Height.encode(e.proofHeight,t.uint32(26).fork()).ldelim(),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},I);for(o.commitment=new Uint8Array,o.proof=new Uint8Array;n.pos>>3){case 1:o.commitment=n.bytes();break;case 2:o.proof=n.bytes();break;case 3:o.proofHeight=s.Height.decode(n,n.uint32());break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},I);return t.commitment=void 0!==e.commitment&&null!==e.commitment?U(e.commitment):new Uint8Array,t.proof=void 0!==e.proof&&null!==e.proof?U(e.proof):new Uint8Array,t.proofHeight=void 0!==e.proofHeight&&null!==e.proofHeight?s.Height.fromJSON(e.proofHeight):void 0,t},toJSON(e){const t={};return void 0!==e.commitment&&(t.commitment=j(void 0!==e.commitment?e.commitment:new Uint8Array)),void 0!==e.proof&&(t.proof=j(void 0!==e.proof?e.proof:new Uint8Array)),void 0!==e.proofHeight&&(t.proofHeight=e.proofHeight?s.Height.toJSON(e.proofHeight):void 0),t},fromPartial(e){var t,n;const r=Object.assign({},I);return r.commitment=null!==(t=e.commitment)&&void 0!==t?t:new Uint8Array,r.proof=null!==(n=e.proof)&&void 0!==n?n:new Uint8Array,r.proofHeight=void 0!==e.proofHeight&&null!==e.proofHeight?s.Height.fromPartial(e.proofHeight):void 0,r}};const C={portId:"",channelId:""};t.QueryPacketCommitmentsRequest={encode:(e,t=i.default.Writer.create())=>(""!==e.portId&&t.uint32(10).string(e.portId),""!==e.channelId&&t.uint32(18).string(e.channelId),void 0!==e.pagination&&c.PageRequest.encode(e.pagination,t.uint32(26).fork()).ldelim(),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},C);for(;n.pos>>3){case 1:o.portId=n.string();break;case 2:o.channelId=n.string();break;case 3:o.pagination=c.PageRequest.decode(n,n.uint32());break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},C);return t.portId=void 0!==e.portId&&null!==e.portId?String(e.portId):"",t.channelId=void 0!==e.channelId&&null!==e.channelId?String(e.channelId):"",t.pagination=void 0!==e.pagination&&null!==e.pagination?c.PageRequest.fromJSON(e.pagination):void 0,t},toJSON(e){const t={};return void 0!==e.portId&&(t.portId=e.portId),void 0!==e.channelId&&(t.channelId=e.channelId),void 0!==e.pagination&&(t.pagination=e.pagination?c.PageRequest.toJSON(e.pagination):void 0),t},fromPartial(e){var t,n;const r=Object.assign({},C);return r.portId=null!==(t=e.portId)&&void 0!==t?t:"",r.channelId=null!==(n=e.channelId)&&void 0!==n?n:"",r.pagination=void 0!==e.pagination&&null!==e.pagination?c.PageRequest.fromPartial(e.pagination):void 0,r}};const E={};t.QueryPacketCommitmentsResponse={encode(e,t=i.default.Writer.create()){for(const n of e.commitments)a.PacketState.encode(n,t.uint32(10).fork()).ldelim();return void 0!==e.pagination&&c.PageResponse.encode(e.pagination,t.uint32(18).fork()).ldelim(),void 0!==e.height&&s.Height.encode(e.height,t.uint32(26).fork()).ldelim(),t},decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},E);for(o.commitments=[];n.pos>>3){case 1:o.commitments.push(a.PacketState.decode(n,n.uint32()));break;case 2:o.pagination=c.PageResponse.decode(n,n.uint32());break;case 3:o.height=s.Height.decode(n,n.uint32());break;default:n.skipType(7&e)}}return o},fromJSON(e){var t;const n=Object.assign({},E);return n.commitments=(null!==(t=e.commitments)&&void 0!==t?t:[]).map((e=>a.PacketState.fromJSON(e))),n.pagination=void 0!==e.pagination&&null!==e.pagination?c.PageResponse.fromJSON(e.pagination):void 0,n.height=void 0!==e.height&&null!==e.height?s.Height.fromJSON(e.height):void 0,n},toJSON(e){const t={};return e.commitments?t.commitments=e.commitments.map((e=>e?a.PacketState.toJSON(e):void 0)):t.commitments=[],void 0!==e.pagination&&(t.pagination=e.pagination?c.PageResponse.toJSON(e.pagination):void 0),void 0!==e.height&&(t.height=e.height?s.Height.toJSON(e.height):void 0),t},fromPartial(e){var t;const n=Object.assign({},E);return n.commitments=(null===(t=e.commitments)||void 0===t?void 0:t.map((e=>a.PacketState.fromPartial(e))))||[],n.pagination=void 0!==e.pagination&&null!==e.pagination?c.PageResponse.fromPartial(e.pagination):void 0,n.height=void 0!==e.height&&null!==e.height?s.Height.fromPartial(e.height):void 0,n}};const w={portId:"",channelId:"",sequence:o.default.UZERO};t.QueryPacketReceiptRequest={encode:(e,t=i.default.Writer.create())=>(""!==e.portId&&t.uint32(10).string(e.portId),""!==e.channelId&&t.uint32(18).string(e.channelId),e.sequence.isZero()||t.uint32(24).uint64(e.sequence),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},w);for(;n.pos>>3){case 1:o.portId=n.string();break;case 2:o.channelId=n.string();break;case 3:o.sequence=n.uint64();break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},w);return t.portId=void 0!==e.portId&&null!==e.portId?String(e.portId):"",t.channelId=void 0!==e.channelId&&null!==e.channelId?String(e.channelId):"",t.sequence=void 0!==e.sequence&&null!==e.sequence?o.default.fromString(e.sequence):o.default.UZERO,t},toJSON(e){const t={};return void 0!==e.portId&&(t.portId=e.portId),void 0!==e.channelId&&(t.channelId=e.channelId),void 0!==e.sequence&&(t.sequence=(e.sequence||o.default.UZERO).toString()),t},fromPartial(e){var t,n;const r=Object.assign({},w);return r.portId=null!==(t=e.portId)&&void 0!==t?t:"",r.channelId=null!==(n=e.channelId)&&void 0!==n?n:"",r.sequence=void 0!==e.sequence&&null!==e.sequence?o.default.fromValue(e.sequence):o.default.UZERO,r}};const B={received:!1};t.QueryPacketReceiptResponse={encode:(e,t=i.default.Writer.create())=>(!0===e.received&&t.uint32(16).bool(e.received),0!==e.proof.length&&t.uint32(26).bytes(e.proof),void 0!==e.proofHeight&&s.Height.encode(e.proofHeight,t.uint32(34).fork()).ldelim(),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},B);for(o.proof=new Uint8Array;n.pos>>3){case 2:o.received=n.bool();break;case 3:o.proof=n.bytes();break;case 4:o.proofHeight=s.Height.decode(n,n.uint32());break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},B);return t.received=void 0!==e.received&&null!==e.received&&Boolean(e.received),t.proof=void 0!==e.proof&&null!==e.proof?U(e.proof):new Uint8Array,t.proofHeight=void 0!==e.proofHeight&&null!==e.proofHeight?s.Height.fromJSON(e.proofHeight):void 0,t},toJSON(e){const t={};return void 0!==e.received&&(t.received=e.received),void 0!==e.proof&&(t.proof=j(void 0!==e.proof?e.proof:new Uint8Array)),void 0!==e.proofHeight&&(t.proofHeight=e.proofHeight?s.Height.toJSON(e.proofHeight):void 0),t},fromPartial(e){var t,n;const r=Object.assign({},B);return r.received=null!==(t=e.received)&&void 0!==t&&t,r.proof=null!==(n=e.proof)&&void 0!==n?n:new Uint8Array,r.proofHeight=void 0!==e.proofHeight&&null!==e.proofHeight?s.Height.fromPartial(e.proofHeight):void 0,r}};const _={portId:"",channelId:"",sequence:o.default.UZERO};t.QueryPacketAcknowledgementRequest={encode:(e,t=i.default.Writer.create())=>(""!==e.portId&&t.uint32(10).string(e.portId),""!==e.channelId&&t.uint32(18).string(e.channelId),e.sequence.isZero()||t.uint32(24).uint64(e.sequence),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},_);for(;n.pos>>3){case 1:o.portId=n.string();break;case 2:o.channelId=n.string();break;case 3:o.sequence=n.uint64();break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},_);return t.portId=void 0!==e.portId&&null!==e.portId?String(e.portId):"",t.channelId=void 0!==e.channelId&&null!==e.channelId?String(e.channelId):"",t.sequence=void 0!==e.sequence&&null!==e.sequence?o.default.fromString(e.sequence):o.default.UZERO,t},toJSON(e){const t={};return void 0!==e.portId&&(t.portId=e.portId),void 0!==e.channelId&&(t.channelId=e.channelId),void 0!==e.sequence&&(t.sequence=(e.sequence||o.default.UZERO).toString()),t},fromPartial(e){var t,n;const r=Object.assign({},_);return r.portId=null!==(t=e.portId)&&void 0!==t?t:"",r.channelId=null!==(n=e.channelId)&&void 0!==n?n:"",r.sequence=void 0!==e.sequence&&null!==e.sequence?o.default.fromValue(e.sequence):o.default.UZERO,r}};const S={};t.QueryPacketAcknowledgementResponse={encode:(e,t=i.default.Writer.create())=>(0!==e.acknowledgement.length&&t.uint32(10).bytes(e.acknowledgement),0!==e.proof.length&&t.uint32(18).bytes(e.proof),void 0!==e.proofHeight&&s.Height.encode(e.proofHeight,t.uint32(26).fork()).ldelim(),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},S);for(o.acknowledgement=new Uint8Array,o.proof=new Uint8Array;n.pos>>3){case 1:o.acknowledgement=n.bytes();break;case 2:o.proof=n.bytes();break;case 3:o.proofHeight=s.Height.decode(n,n.uint32());break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},S);return t.acknowledgement=void 0!==e.acknowledgement&&null!==e.acknowledgement?U(e.acknowledgement):new Uint8Array,t.proof=void 0!==e.proof&&null!==e.proof?U(e.proof):new Uint8Array,t.proofHeight=void 0!==e.proofHeight&&null!==e.proofHeight?s.Height.fromJSON(e.proofHeight):void 0,t},toJSON(e){const t={};return void 0!==e.acknowledgement&&(t.acknowledgement=j(void 0!==e.acknowledgement?e.acknowledgement:new Uint8Array)),void 0!==e.proof&&(t.proof=j(void 0!==e.proof?e.proof:new Uint8Array)),void 0!==e.proofHeight&&(t.proofHeight=e.proofHeight?s.Height.toJSON(e.proofHeight):void 0),t},fromPartial(e){var t,n;const r=Object.assign({},S);return r.acknowledgement=null!==(t=e.acknowledgement)&&void 0!==t?t:new Uint8Array,r.proof=null!==(n=e.proof)&&void 0!==n?n:new Uint8Array,r.proofHeight=void 0!==e.proofHeight&&null!==e.proofHeight?s.Height.fromPartial(e.proofHeight):void 0,r}};const k={portId:"",channelId:""};t.QueryPacketAcknowledgementsRequest={encode:(e,t=i.default.Writer.create())=>(""!==e.portId&&t.uint32(10).string(e.portId),""!==e.channelId&&t.uint32(18).string(e.channelId),void 0!==e.pagination&&c.PageRequest.encode(e.pagination,t.uint32(26).fork()).ldelim(),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},k);for(;n.pos>>3){case 1:o.portId=n.string();break;case 2:o.channelId=n.string();break;case 3:o.pagination=c.PageRequest.decode(n,n.uint32());break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},k);return t.portId=void 0!==e.portId&&null!==e.portId?String(e.portId):"",t.channelId=void 0!==e.channelId&&null!==e.channelId?String(e.channelId):"",t.pagination=void 0!==e.pagination&&null!==e.pagination?c.PageRequest.fromJSON(e.pagination):void 0,t},toJSON(e){const t={};return void 0!==e.portId&&(t.portId=e.portId),void 0!==e.channelId&&(t.channelId=e.channelId),void 0!==e.pagination&&(t.pagination=e.pagination?c.PageRequest.toJSON(e.pagination):void 0),t},fromPartial(e){var t,n;const r=Object.assign({},k);return r.portId=null!==(t=e.portId)&&void 0!==t?t:"",r.channelId=null!==(n=e.channelId)&&void 0!==n?n:"",r.pagination=void 0!==e.pagination&&null!==e.pagination?c.PageRequest.fromPartial(e.pagination):void 0,r}};const O={};t.QueryPacketAcknowledgementsResponse={encode(e,t=i.default.Writer.create()){for(const n of e.acknowledgements)a.PacketState.encode(n,t.uint32(10).fork()).ldelim();return void 0!==e.pagination&&c.PageResponse.encode(e.pagination,t.uint32(18).fork()).ldelim(),void 0!==e.height&&s.Height.encode(e.height,t.uint32(26).fork()).ldelim(),t},decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},O);for(o.acknowledgements=[];n.pos>>3){case 1:o.acknowledgements.push(a.PacketState.decode(n,n.uint32()));break;case 2:o.pagination=c.PageResponse.decode(n,n.uint32());break;case 3:o.height=s.Height.decode(n,n.uint32());break;default:n.skipType(7&e)}}return o},fromJSON(e){var t;const n=Object.assign({},O);return n.acknowledgements=(null!==(t=e.acknowledgements)&&void 0!==t?t:[]).map((e=>a.PacketState.fromJSON(e))),n.pagination=void 0!==e.pagination&&null!==e.pagination?c.PageResponse.fromJSON(e.pagination):void 0,n.height=void 0!==e.height&&null!==e.height?s.Height.fromJSON(e.height):void 0,n},toJSON(e){const t={};return e.acknowledgements?t.acknowledgements=e.acknowledgements.map((e=>e?a.PacketState.toJSON(e):void 0)):t.acknowledgements=[],void 0!==e.pagination&&(t.pagination=e.pagination?c.PageResponse.toJSON(e.pagination):void 0),void 0!==e.height&&(t.height=e.height?s.Height.toJSON(e.height):void 0),t},fromPartial(e){var t;const n=Object.assign({},O);return n.acknowledgements=(null===(t=e.acknowledgements)||void 0===t?void 0:t.map((e=>a.PacketState.fromPartial(e))))||[],n.pagination=void 0!==e.pagination&&null!==e.pagination?c.PageResponse.fromPartial(e.pagination):void 0,n.height=void 0!==e.height&&null!==e.height?s.Height.fromPartial(e.height):void 0,n}};const Q={portId:"",channelId:"",packetCommitmentSequences:o.default.UZERO};t.QueryUnreceivedPacketsRequest={encode(e,t=i.default.Writer.create()){""!==e.portId&&t.uint32(10).string(e.portId),""!==e.channelId&&t.uint32(18).string(e.channelId),t.uint32(26).fork();for(const n of e.packetCommitmentSequences)t.uint64(n);return t.ldelim(),t},decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},Q);for(o.packetCommitmentSequences=[];n.pos>>3){case 1:o.portId=n.string();break;case 2:o.channelId=n.string();break;case 3:if(2==(7&e)){const e=n.uint32()+n.pos;for(;n.poso.default.fromString(e))),n},toJSON(e){const t={};return void 0!==e.portId&&(t.portId=e.portId),void 0!==e.channelId&&(t.channelId=e.channelId),e.packetCommitmentSequences?t.packetCommitmentSequences=e.packetCommitmentSequences.map((e=>(e||o.default.UZERO).toString())):t.packetCommitmentSequences=[],t},fromPartial(e){var t,n,r;const i=Object.assign({},Q);return i.portId=null!==(t=e.portId)&&void 0!==t?t:"",i.channelId=null!==(n=e.channelId)&&void 0!==n?n:"",i.packetCommitmentSequences=(null===(r=e.packetCommitmentSequences)||void 0===r?void 0:r.map((e=>o.default.fromValue(e))))||[],i}};const R={sequences:o.default.UZERO};t.QueryUnreceivedPacketsResponse={encode(e,t=i.default.Writer.create()){t.uint32(10).fork();for(const n of e.sequences)t.uint64(n);return t.ldelim(),void 0!==e.height&&s.Height.encode(e.height,t.uint32(18).fork()).ldelim(),t},decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},R);for(o.sequences=[];n.pos>>3){case 1:if(2==(7&e)){const e=n.uint32()+n.pos;for(;n.poso.default.fromString(e))),n.height=void 0!==e.height&&null!==e.height?s.Height.fromJSON(e.height):void 0,n},toJSON(e){const t={};return e.sequences?t.sequences=e.sequences.map((e=>(e||o.default.UZERO).toString())):t.sequences=[],void 0!==e.height&&(t.height=e.height?s.Height.toJSON(e.height):void 0),t},fromPartial(e){var t;const n=Object.assign({},R);return n.sequences=(null===(t=e.sequences)||void 0===t?void 0:t.map((e=>o.default.fromValue(e))))||[],n.height=void 0!==e.height&&null!==e.height?s.Height.fromPartial(e.height):void 0,n}};const P={portId:"",channelId:"",packetAckSequences:o.default.UZERO};t.QueryUnreceivedAcksRequest={encode(e,t=i.default.Writer.create()){""!==e.portId&&t.uint32(10).string(e.portId),""!==e.channelId&&t.uint32(18).string(e.channelId),t.uint32(26).fork();for(const n of e.packetAckSequences)t.uint64(n);return t.ldelim(),t},decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},P);for(o.packetAckSequences=[];n.pos>>3){case 1:o.portId=n.string();break;case 2:o.channelId=n.string();break;case 3:if(2==(7&e)){const e=n.uint32()+n.pos;for(;n.poso.default.fromString(e))),n},toJSON(e){const t={};return void 0!==e.portId&&(t.portId=e.portId),void 0!==e.channelId&&(t.channelId=e.channelId),e.packetAckSequences?t.packetAckSequences=e.packetAckSequences.map((e=>(e||o.default.UZERO).toString())):t.packetAckSequences=[],t},fromPartial(e){var t,n,r;const i=Object.assign({},P);return i.portId=null!==(t=e.portId)&&void 0!==t?t:"",i.channelId=null!==(n=e.channelId)&&void 0!==n?n:"",i.packetAckSequences=(null===(r=e.packetAckSequences)||void 0===r?void 0:r.map((e=>o.default.fromValue(e))))||[],i}};const N={sequences:o.default.UZERO};t.QueryUnreceivedAcksResponse={encode(e,t=i.default.Writer.create()){t.uint32(10).fork();for(const n of e.sequences)t.uint64(n);return t.ldelim(),void 0!==e.height&&s.Height.encode(e.height,t.uint32(18).fork()).ldelim(),t},decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},N);for(o.sequences=[];n.pos>>3){case 1:if(2==(7&e)){const e=n.uint32()+n.pos;for(;n.poso.default.fromString(e))),n.height=void 0!==e.height&&null!==e.height?s.Height.fromJSON(e.height):void 0,n},toJSON(e){const t={};return e.sequences?t.sequences=e.sequences.map((e=>(e||o.default.UZERO).toString())):t.sequences=[],void 0!==e.height&&(t.height=e.height?s.Height.toJSON(e.height):void 0),t},fromPartial(e){var t;const n=Object.assign({},N);return n.sequences=(null===(t=e.sequences)||void 0===t?void 0:t.map((e=>o.default.fromValue(e))))||[],n.height=void 0!==e.height&&null!==e.height?s.Height.fromPartial(e.height):void 0,n}};const x={portId:"",channelId:""};t.QueryNextSequenceReceiveRequest={encode:(e,t=i.default.Writer.create())=>(""!==e.portId&&t.uint32(10).string(e.portId),""!==e.channelId&&t.uint32(18).string(e.channelId),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},x);for(;n.pos>>3){case 1:o.portId=n.string();break;case 2:o.channelId=n.string();break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},x);return t.portId=void 0!==e.portId&&null!==e.portId?String(e.portId):"",t.channelId=void 0!==e.channelId&&null!==e.channelId?String(e.channelId):"",t},toJSON(e){const t={};return void 0!==e.portId&&(t.portId=e.portId),void 0!==e.channelId&&(t.channelId=e.channelId),t},fromPartial(e){var t,n;const r=Object.assign({},x);return r.portId=null!==(t=e.portId)&&void 0!==t?t:"",r.channelId=null!==(n=e.channelId)&&void 0!==n?n:"",r}};const D={nextSequenceReceive:o.default.UZERO};t.QueryNextSequenceReceiveResponse={encode:(e,t=i.default.Writer.create())=>(e.nextSequenceReceive.isZero()||t.uint32(8).uint64(e.nextSequenceReceive),0!==e.proof.length&&t.uint32(18).bytes(e.proof),void 0!==e.proofHeight&&s.Height.encode(e.proofHeight,t.uint32(26).fork()).ldelim(),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},D);for(o.proof=new Uint8Array;n.pos>>3){case 1:o.nextSequenceReceive=n.uint64();break;case 2:o.proof=n.bytes();break;case 3:o.proofHeight=s.Height.decode(n,n.uint32());break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},D);return t.nextSequenceReceive=void 0!==e.nextSequenceReceive&&null!==e.nextSequenceReceive?o.default.fromString(e.nextSequenceReceive):o.default.UZERO,t.proof=void 0!==e.proof&&null!==e.proof?U(e.proof):new Uint8Array,t.proofHeight=void 0!==e.proofHeight&&null!==e.proofHeight?s.Height.fromJSON(e.proofHeight):void 0,t},toJSON(e){const t={};return void 0!==e.nextSequenceReceive&&(t.nextSequenceReceive=(e.nextSequenceReceive||o.default.UZERO).toString()),void 0!==e.proof&&(t.proof=j(void 0!==e.proof?e.proof:new Uint8Array)),void 0!==e.proofHeight&&(t.proofHeight=e.proofHeight?s.Height.toJSON(e.proofHeight):void 0),t},fromPartial(e){var t;const n=Object.assign({},D);return n.nextSequenceReceive=void 0!==e.nextSequenceReceive&&null!==e.nextSequenceReceive?o.default.fromValue(e.nextSequenceReceive):o.default.UZERO,n.proof=null!==(t=e.proof)&&void 0!==t?t:new Uint8Array,n.proofHeight=void 0!==e.proofHeight&&null!==e.proofHeight?s.Height.fromPartial(e.proofHeight):void 0,n}},t.QueryClientImpl=class{constructor(e){this.rpc=e,this.Channel=this.Channel.bind(this),this.Channels=this.Channels.bind(this),this.ConnectionChannels=this.ConnectionChannels.bind(this),this.ChannelClientState=this.ChannelClientState.bind(this),this.ChannelConsensusState=this.ChannelConsensusState.bind(this),this.PacketCommitment=this.PacketCommitment.bind(this),this.PacketCommitments=this.PacketCommitments.bind(this),this.PacketReceipt=this.PacketReceipt.bind(this),this.PacketAcknowledgement=this.PacketAcknowledgement.bind(this),this.PacketAcknowledgements=this.PacketAcknowledgements.bind(this),this.UnreceivedPackets=this.UnreceivedPackets.bind(this),this.UnreceivedAcks=this.UnreceivedAcks.bind(this),this.NextSequenceReceive=this.NextSequenceReceive.bind(this)}Channel(e){const n=t.QueryChannelRequest.encode(e).finish();return this.rpc.request("ibc.core.channel.v1.Query","Channel",n).then((e=>t.QueryChannelResponse.decode(new i.default.Reader(e))))}Channels(e){const n=t.QueryChannelsRequest.encode(e).finish();return this.rpc.request("ibc.core.channel.v1.Query","Channels",n).then((e=>t.QueryChannelsResponse.decode(new i.default.Reader(e))))}ConnectionChannels(e){const n=t.QueryConnectionChannelsRequest.encode(e).finish();return this.rpc.request("ibc.core.channel.v1.Query","ConnectionChannels",n).then((e=>t.QueryConnectionChannelsResponse.decode(new i.default.Reader(e))))}ChannelClientState(e){const n=t.QueryChannelClientStateRequest.encode(e).finish();return this.rpc.request("ibc.core.channel.v1.Query","ChannelClientState",n).then((e=>t.QueryChannelClientStateResponse.decode(new i.default.Reader(e))))}ChannelConsensusState(e){const n=t.QueryChannelConsensusStateRequest.encode(e).finish();return this.rpc.request("ibc.core.channel.v1.Query","ChannelConsensusState",n).then((e=>t.QueryChannelConsensusStateResponse.decode(new i.default.Reader(e))))}PacketCommitment(e){const n=t.QueryPacketCommitmentRequest.encode(e).finish();return this.rpc.request("ibc.core.channel.v1.Query","PacketCommitment",n).then((e=>t.QueryPacketCommitmentResponse.decode(new i.default.Reader(e))))}PacketCommitments(e){const n=t.QueryPacketCommitmentsRequest.encode(e).finish();return this.rpc.request("ibc.core.channel.v1.Query","PacketCommitments",n).then((e=>t.QueryPacketCommitmentsResponse.decode(new i.default.Reader(e))))}PacketReceipt(e){const n=t.QueryPacketReceiptRequest.encode(e).finish();return this.rpc.request("ibc.core.channel.v1.Query","PacketReceipt",n).then((e=>t.QueryPacketReceiptResponse.decode(new i.default.Reader(e))))}PacketAcknowledgement(e){const n=t.QueryPacketAcknowledgementRequest.encode(e).finish();return this.rpc.request("ibc.core.channel.v1.Query","PacketAcknowledgement",n).then((e=>t.QueryPacketAcknowledgementResponse.decode(new i.default.Reader(e))))}PacketAcknowledgements(e){const n=t.QueryPacketAcknowledgementsRequest.encode(e).finish();return this.rpc.request("ibc.core.channel.v1.Query","PacketAcknowledgements",n).then((e=>t.QueryPacketAcknowledgementsResponse.decode(new i.default.Reader(e))))}UnreceivedPackets(e){const n=t.QueryUnreceivedPacketsRequest.encode(e).finish();return this.rpc.request("ibc.core.channel.v1.Query","UnreceivedPackets",n).then((e=>t.QueryUnreceivedPacketsResponse.decode(new i.default.Reader(e))))}UnreceivedAcks(e){const n=t.QueryUnreceivedAcksRequest.encode(e).finish();return this.rpc.request("ibc.core.channel.v1.Query","UnreceivedAcks",n).then((e=>t.QueryUnreceivedAcksResponse.decode(new i.default.Reader(e))))}NextSequenceReceive(e){const n=t.QueryNextSequenceReceiveRequest.encode(e).finish();return this.rpc.request("ibc.core.channel.v1.Query","NextSequenceReceive",n).then((e=>t.QueryNextSequenceReceiveResponse.decode(new i.default.Reader(e))))}};var M=(()=>{if(void 0!==M)return M;if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==n.g)return n.g;throw"Unable to locate global object"})();const T=M.atob||(e=>M.Buffer.from(e,"base64").toString("binary"));function U(e){const t=T(e),n=new Uint8Array(t.length);for(let e=0;eM.Buffer.from(e,"binary").toString("base64"));function j(e){const t=[];for(const n of e)t.push(String.fromCharCode(n));return H(t.join(""))}i.default.util.Long!==o.default&&(i.default.util.Long=o.default,i.default.configure())},7375:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.MsgClientImpl=t.MsgAcknowledgementResponse=t.MsgAcknowledgement=t.MsgTimeoutOnCloseResponse=t.MsgTimeoutOnClose=t.MsgTimeoutResponse=t.MsgTimeout=t.MsgRecvPacketResponse=t.MsgRecvPacket=t.MsgChannelCloseConfirmResponse=t.MsgChannelCloseConfirm=t.MsgChannelCloseInitResponse=t.MsgChannelCloseInit=t.MsgChannelOpenConfirmResponse=t.MsgChannelOpenConfirm=t.MsgChannelOpenAckResponse=t.MsgChannelOpenAck=t.MsgChannelOpenTryResponse=t.MsgChannelOpenTry=t.MsgChannelOpenInitResponse=t.MsgChannelOpenInit=t.protobufPackage=void 0;const o=r(n(3720)),i=r(n(3789)),a=n(1787),s=n(5022);t.protobufPackage="ibc.core.channel.v1";const c={portId:"",signer:""};t.MsgChannelOpenInit={encode:(e,t=i.default.Writer.create())=>(""!==e.portId&&t.uint32(10).string(e.portId),void 0!==e.channel&&a.Channel.encode(e.channel,t.uint32(18).fork()).ldelim(),""!==e.signer&&t.uint32(26).string(e.signer),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},c);for(;n.pos>>3){case 1:o.portId=n.string();break;case 2:o.channel=a.Channel.decode(n,n.uint32());break;case 3:o.signer=n.string();break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},c);return t.portId=void 0!==e.portId&&null!==e.portId?String(e.portId):"",t.channel=void 0!==e.channel&&null!==e.channel?a.Channel.fromJSON(e.channel):void 0,t.signer=void 0!==e.signer&&null!==e.signer?String(e.signer):"",t},toJSON(e){const t={};return void 0!==e.portId&&(t.portId=e.portId),void 0!==e.channel&&(t.channel=e.channel?a.Channel.toJSON(e.channel):void 0),void 0!==e.signer&&(t.signer=e.signer),t},fromPartial(e){var t,n;const r=Object.assign({},c);return r.portId=null!==(t=e.portId)&&void 0!==t?t:"",r.channel=void 0!==e.channel&&null!==e.channel?a.Channel.fromPartial(e.channel):void 0,r.signer=null!==(n=e.signer)&&void 0!==n?n:"",r}};const d={};t.MsgChannelOpenInitResponse={encode:(e,t=i.default.Writer.create())=>t,decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},d);for(;n.posObject.assign({},d),toJSON:e=>({}),fromPartial:e=>Object.assign({},d)};const u={portId:"",previousChannelId:"",counterpartyVersion:"",signer:""};t.MsgChannelOpenTry={encode:(e,t=i.default.Writer.create())=>(""!==e.portId&&t.uint32(10).string(e.portId),""!==e.previousChannelId&&t.uint32(18).string(e.previousChannelId),void 0!==e.channel&&a.Channel.encode(e.channel,t.uint32(26).fork()).ldelim(),""!==e.counterpartyVersion&&t.uint32(34).string(e.counterpartyVersion),0!==e.proofInit.length&&t.uint32(42).bytes(e.proofInit),void 0!==e.proofHeight&&s.Height.encode(e.proofHeight,t.uint32(50).fork()).ldelim(),""!==e.signer&&t.uint32(58).string(e.signer),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},u);for(o.proofInit=new Uint8Array;n.pos>>3){case 1:o.portId=n.string();break;case 2:o.previousChannelId=n.string();break;case 3:o.channel=a.Channel.decode(n,n.uint32());break;case 4:o.counterpartyVersion=n.string();break;case 5:o.proofInit=n.bytes();break;case 6:o.proofHeight=s.Height.decode(n,n.uint32());break;case 7:o.signer=n.string();break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},u);return t.portId=void 0!==e.portId&&null!==e.portId?String(e.portId):"",t.previousChannelId=void 0!==e.previousChannelId&&null!==e.previousChannelId?String(e.previousChannelId):"",t.channel=void 0!==e.channel&&null!==e.channel?a.Channel.fromJSON(e.channel):void 0,t.counterpartyVersion=void 0!==e.counterpartyVersion&&null!==e.counterpartyVersion?String(e.counterpartyVersion):"",t.proofInit=void 0!==e.proofInit&&null!==e.proofInit?Q(e.proofInit):new Uint8Array,t.proofHeight=void 0!==e.proofHeight&&null!==e.proofHeight?s.Height.fromJSON(e.proofHeight):void 0,t.signer=void 0!==e.signer&&null!==e.signer?String(e.signer):"",t},toJSON(e){const t={};return void 0!==e.portId&&(t.portId=e.portId),void 0!==e.previousChannelId&&(t.previousChannelId=e.previousChannelId),void 0!==e.channel&&(t.channel=e.channel?a.Channel.toJSON(e.channel):void 0),void 0!==e.counterpartyVersion&&(t.counterpartyVersion=e.counterpartyVersion),void 0!==e.proofInit&&(t.proofInit=P(void 0!==e.proofInit?e.proofInit:new Uint8Array)),void 0!==e.proofHeight&&(t.proofHeight=e.proofHeight?s.Height.toJSON(e.proofHeight):void 0),void 0!==e.signer&&(t.signer=e.signer),t},fromPartial(e){var t,n,r,o,i;const c=Object.assign({},u);return c.portId=null!==(t=e.portId)&&void 0!==t?t:"",c.previousChannelId=null!==(n=e.previousChannelId)&&void 0!==n?n:"",c.channel=void 0!==e.channel&&null!==e.channel?a.Channel.fromPartial(e.channel):void 0,c.counterpartyVersion=null!==(r=e.counterpartyVersion)&&void 0!==r?r:"",c.proofInit=null!==(o=e.proofInit)&&void 0!==o?o:new Uint8Array,c.proofHeight=void 0!==e.proofHeight&&null!==e.proofHeight?s.Height.fromPartial(e.proofHeight):void 0,c.signer=null!==(i=e.signer)&&void 0!==i?i:"",c}};const l={};t.MsgChannelOpenTryResponse={encode:(e,t=i.default.Writer.create())=>t,decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},l);for(;n.posObject.assign({},l),toJSON:e=>({}),fromPartial:e=>Object.assign({},l)};const A={portId:"",channelId:"",counterpartyChannelId:"",counterpartyVersion:"",signer:""};t.MsgChannelOpenAck={encode:(e,t=i.default.Writer.create())=>(""!==e.portId&&t.uint32(10).string(e.portId),""!==e.channelId&&t.uint32(18).string(e.channelId),""!==e.counterpartyChannelId&&t.uint32(26).string(e.counterpartyChannelId),""!==e.counterpartyVersion&&t.uint32(34).string(e.counterpartyVersion),0!==e.proofTry.length&&t.uint32(42).bytes(e.proofTry),void 0!==e.proofHeight&&s.Height.encode(e.proofHeight,t.uint32(50).fork()).ldelim(),""!==e.signer&&t.uint32(58).string(e.signer),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},A);for(o.proofTry=new Uint8Array;n.pos>>3){case 1:o.portId=n.string();break;case 2:o.channelId=n.string();break;case 3:o.counterpartyChannelId=n.string();break;case 4:o.counterpartyVersion=n.string();break;case 5:o.proofTry=n.bytes();break;case 6:o.proofHeight=s.Height.decode(n,n.uint32());break;case 7:o.signer=n.string();break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},A);return t.portId=void 0!==e.portId&&null!==e.portId?String(e.portId):"",t.channelId=void 0!==e.channelId&&null!==e.channelId?String(e.channelId):"",t.counterpartyChannelId=void 0!==e.counterpartyChannelId&&null!==e.counterpartyChannelId?String(e.counterpartyChannelId):"",t.counterpartyVersion=void 0!==e.counterpartyVersion&&null!==e.counterpartyVersion?String(e.counterpartyVersion):"",t.proofTry=void 0!==e.proofTry&&null!==e.proofTry?Q(e.proofTry):new Uint8Array,t.proofHeight=void 0!==e.proofHeight&&null!==e.proofHeight?s.Height.fromJSON(e.proofHeight):void 0,t.signer=void 0!==e.signer&&null!==e.signer?String(e.signer):"",t},toJSON(e){const t={};return void 0!==e.portId&&(t.portId=e.portId),void 0!==e.channelId&&(t.channelId=e.channelId),void 0!==e.counterpartyChannelId&&(t.counterpartyChannelId=e.counterpartyChannelId),void 0!==e.counterpartyVersion&&(t.counterpartyVersion=e.counterpartyVersion),void 0!==e.proofTry&&(t.proofTry=P(void 0!==e.proofTry?e.proofTry:new Uint8Array)),void 0!==e.proofHeight&&(t.proofHeight=e.proofHeight?s.Height.toJSON(e.proofHeight):void 0),void 0!==e.signer&&(t.signer=e.signer),t},fromPartial(e){var t,n,r,o,i,a;const c=Object.assign({},A);return c.portId=null!==(t=e.portId)&&void 0!==t?t:"",c.channelId=null!==(n=e.channelId)&&void 0!==n?n:"",c.counterpartyChannelId=null!==(r=e.counterpartyChannelId)&&void 0!==r?r:"",c.counterpartyVersion=null!==(o=e.counterpartyVersion)&&void 0!==o?o:"",c.proofTry=null!==(i=e.proofTry)&&void 0!==i?i:new Uint8Array,c.proofHeight=void 0!==e.proofHeight&&null!==e.proofHeight?s.Height.fromPartial(e.proofHeight):void 0,c.signer=null!==(a=e.signer)&&void 0!==a?a:"",c}};const f={};t.MsgChannelOpenAckResponse={encode:(e,t=i.default.Writer.create())=>t,decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},f);for(;n.posObject.assign({},f),toJSON:e=>({}),fromPartial:e=>Object.assign({},f)};const h={portId:"",channelId:"",signer:""};t.MsgChannelOpenConfirm={encode:(e,t=i.default.Writer.create())=>(""!==e.portId&&t.uint32(10).string(e.portId),""!==e.channelId&&t.uint32(18).string(e.channelId),0!==e.proofAck.length&&t.uint32(26).bytes(e.proofAck),void 0!==e.proofHeight&&s.Height.encode(e.proofHeight,t.uint32(34).fork()).ldelim(),""!==e.signer&&t.uint32(42).string(e.signer),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},h);for(o.proofAck=new Uint8Array;n.pos>>3){case 1:o.portId=n.string();break;case 2:o.channelId=n.string();break;case 3:o.proofAck=n.bytes();break;case 4:o.proofHeight=s.Height.decode(n,n.uint32());break;case 5:o.signer=n.string();break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},h);return t.portId=void 0!==e.portId&&null!==e.portId?String(e.portId):"",t.channelId=void 0!==e.channelId&&null!==e.channelId?String(e.channelId):"",t.proofAck=void 0!==e.proofAck&&null!==e.proofAck?Q(e.proofAck):new Uint8Array,t.proofHeight=void 0!==e.proofHeight&&null!==e.proofHeight?s.Height.fromJSON(e.proofHeight):void 0,t.signer=void 0!==e.signer&&null!==e.signer?String(e.signer):"",t},toJSON(e){const t={};return void 0!==e.portId&&(t.portId=e.portId),void 0!==e.channelId&&(t.channelId=e.channelId),void 0!==e.proofAck&&(t.proofAck=P(void 0!==e.proofAck?e.proofAck:new Uint8Array)),void 0!==e.proofHeight&&(t.proofHeight=e.proofHeight?s.Height.toJSON(e.proofHeight):void 0),void 0!==e.signer&&(t.signer=e.signer),t},fromPartial(e){var t,n,r,o;const i=Object.assign({},h);return i.portId=null!==(t=e.portId)&&void 0!==t?t:"",i.channelId=null!==(n=e.channelId)&&void 0!==n?n:"",i.proofAck=null!==(r=e.proofAck)&&void 0!==r?r:new Uint8Array,i.proofHeight=void 0!==e.proofHeight&&null!==e.proofHeight?s.Height.fromPartial(e.proofHeight):void 0,i.signer=null!==(o=e.signer)&&void 0!==o?o:"",i}};const g={};t.MsgChannelOpenConfirmResponse={encode:(e,t=i.default.Writer.create())=>t,decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},g);for(;n.posObject.assign({},g),toJSON:e=>({}),fromPartial:e=>Object.assign({},g)};const p={portId:"",channelId:"",signer:""};t.MsgChannelCloseInit={encode:(e,t=i.default.Writer.create())=>(""!==e.portId&&t.uint32(10).string(e.portId),""!==e.channelId&&t.uint32(18).string(e.channelId),""!==e.signer&&t.uint32(26).string(e.signer),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},p);for(;n.pos>>3){case 1:o.portId=n.string();break;case 2:o.channelId=n.string();break;case 3:o.signer=n.string();break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},p);return t.portId=void 0!==e.portId&&null!==e.portId?String(e.portId):"",t.channelId=void 0!==e.channelId&&null!==e.channelId?String(e.channelId):"",t.signer=void 0!==e.signer&&null!==e.signer?String(e.signer):"",t},toJSON(e){const t={};return void 0!==e.portId&&(t.portId=e.portId),void 0!==e.channelId&&(t.channelId=e.channelId),void 0!==e.signer&&(t.signer=e.signer),t},fromPartial(e){var t,n,r;const o=Object.assign({},p);return o.portId=null!==(t=e.portId)&&void 0!==t?t:"",o.channelId=null!==(n=e.channelId)&&void 0!==n?n:"",o.signer=null!==(r=e.signer)&&void 0!==r?r:"",o}};const m={};t.MsgChannelCloseInitResponse={encode:(e,t=i.default.Writer.create())=>t,decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},m);for(;n.posObject.assign({},m),toJSON:e=>({}),fromPartial:e=>Object.assign({},m)};const v={portId:"",channelId:"",signer:""};t.MsgChannelCloseConfirm={encode:(e,t=i.default.Writer.create())=>(""!==e.portId&&t.uint32(10).string(e.portId),""!==e.channelId&&t.uint32(18).string(e.channelId),0!==e.proofInit.length&&t.uint32(26).bytes(e.proofInit),void 0!==e.proofHeight&&s.Height.encode(e.proofHeight,t.uint32(34).fork()).ldelim(),""!==e.signer&&t.uint32(42).string(e.signer),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},v);for(o.proofInit=new Uint8Array;n.pos>>3){case 1:o.portId=n.string();break;case 2:o.channelId=n.string();break;case 3:o.proofInit=n.bytes();break;case 4:o.proofHeight=s.Height.decode(n,n.uint32());break;case 5:o.signer=n.string();break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},v);return t.portId=void 0!==e.portId&&null!==e.portId?String(e.portId):"",t.channelId=void 0!==e.channelId&&null!==e.channelId?String(e.channelId):"",t.proofInit=void 0!==e.proofInit&&null!==e.proofInit?Q(e.proofInit):new Uint8Array,t.proofHeight=void 0!==e.proofHeight&&null!==e.proofHeight?s.Height.fromJSON(e.proofHeight):void 0,t.signer=void 0!==e.signer&&null!==e.signer?String(e.signer):"",t},toJSON(e){const t={};return void 0!==e.portId&&(t.portId=e.portId),void 0!==e.channelId&&(t.channelId=e.channelId),void 0!==e.proofInit&&(t.proofInit=P(void 0!==e.proofInit?e.proofInit:new Uint8Array)),void 0!==e.proofHeight&&(t.proofHeight=e.proofHeight?s.Height.toJSON(e.proofHeight):void 0),void 0!==e.signer&&(t.signer=e.signer),t},fromPartial(e){var t,n,r,o;const i=Object.assign({},v);return i.portId=null!==(t=e.portId)&&void 0!==t?t:"",i.channelId=null!==(n=e.channelId)&&void 0!==n?n:"",i.proofInit=null!==(r=e.proofInit)&&void 0!==r?r:new Uint8Array,i.proofHeight=void 0!==e.proofHeight&&null!==e.proofHeight?s.Height.fromPartial(e.proofHeight):void 0,i.signer=null!==(o=e.signer)&&void 0!==o?o:"",i}};const y={};t.MsgChannelCloseConfirmResponse={encode:(e,t=i.default.Writer.create())=>t,decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},y);for(;n.posObject.assign({},y),toJSON:e=>({}),fromPartial:e=>Object.assign({},y)};const b={signer:""};t.MsgRecvPacket={encode:(e,t=i.default.Writer.create())=>(void 0!==e.packet&&a.Packet.encode(e.packet,t.uint32(10).fork()).ldelim(),0!==e.proofCommitment.length&&t.uint32(18).bytes(e.proofCommitment),void 0!==e.proofHeight&&s.Height.encode(e.proofHeight,t.uint32(26).fork()).ldelim(),""!==e.signer&&t.uint32(34).string(e.signer),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},b);for(o.proofCommitment=new Uint8Array;n.pos>>3){case 1:o.packet=a.Packet.decode(n,n.uint32());break;case 2:o.proofCommitment=n.bytes();break;case 3:o.proofHeight=s.Height.decode(n,n.uint32());break;case 4:o.signer=n.string();break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},b);return t.packet=void 0!==e.packet&&null!==e.packet?a.Packet.fromJSON(e.packet):void 0,t.proofCommitment=void 0!==e.proofCommitment&&null!==e.proofCommitment?Q(e.proofCommitment):new Uint8Array,t.proofHeight=void 0!==e.proofHeight&&null!==e.proofHeight?s.Height.fromJSON(e.proofHeight):void 0,t.signer=void 0!==e.signer&&null!==e.signer?String(e.signer):"",t},toJSON(e){const t={};return void 0!==e.packet&&(t.packet=e.packet?a.Packet.toJSON(e.packet):void 0),void 0!==e.proofCommitment&&(t.proofCommitment=P(void 0!==e.proofCommitment?e.proofCommitment:new Uint8Array)),void 0!==e.proofHeight&&(t.proofHeight=e.proofHeight?s.Height.toJSON(e.proofHeight):void 0),void 0!==e.signer&&(t.signer=e.signer),t},fromPartial(e){var t,n;const r=Object.assign({},b);return r.packet=void 0!==e.packet&&null!==e.packet?a.Packet.fromPartial(e.packet):void 0,r.proofCommitment=null!==(t=e.proofCommitment)&&void 0!==t?t:new Uint8Array,r.proofHeight=void 0!==e.proofHeight&&null!==e.proofHeight?s.Height.fromPartial(e.proofHeight):void 0,r.signer=null!==(n=e.signer)&&void 0!==n?n:"",r}};const I={};t.MsgRecvPacketResponse={encode:(e,t=i.default.Writer.create())=>t,decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},I);for(;n.posObject.assign({},I),toJSON:e=>({}),fromPartial:e=>Object.assign({},I)};const C={nextSequenceRecv:o.default.UZERO,signer:""};t.MsgTimeout={encode:(e,t=i.default.Writer.create())=>(void 0!==e.packet&&a.Packet.encode(e.packet,t.uint32(10).fork()).ldelim(),0!==e.proofUnreceived.length&&t.uint32(18).bytes(e.proofUnreceived),void 0!==e.proofHeight&&s.Height.encode(e.proofHeight,t.uint32(26).fork()).ldelim(),e.nextSequenceRecv.isZero()||t.uint32(32).uint64(e.nextSequenceRecv),""!==e.signer&&t.uint32(42).string(e.signer),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},C);for(o.proofUnreceived=new Uint8Array;n.pos>>3){case 1:o.packet=a.Packet.decode(n,n.uint32());break;case 2:o.proofUnreceived=n.bytes();break;case 3:o.proofHeight=s.Height.decode(n,n.uint32());break;case 4:o.nextSequenceRecv=n.uint64();break;case 5:o.signer=n.string();break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},C);return t.packet=void 0!==e.packet&&null!==e.packet?a.Packet.fromJSON(e.packet):void 0,t.proofUnreceived=void 0!==e.proofUnreceived&&null!==e.proofUnreceived?Q(e.proofUnreceived):new Uint8Array,t.proofHeight=void 0!==e.proofHeight&&null!==e.proofHeight?s.Height.fromJSON(e.proofHeight):void 0,t.nextSequenceRecv=void 0!==e.nextSequenceRecv&&null!==e.nextSequenceRecv?o.default.fromString(e.nextSequenceRecv):o.default.UZERO,t.signer=void 0!==e.signer&&null!==e.signer?String(e.signer):"",t},toJSON(e){const t={};return void 0!==e.packet&&(t.packet=e.packet?a.Packet.toJSON(e.packet):void 0),void 0!==e.proofUnreceived&&(t.proofUnreceived=P(void 0!==e.proofUnreceived?e.proofUnreceived:new Uint8Array)),void 0!==e.proofHeight&&(t.proofHeight=e.proofHeight?s.Height.toJSON(e.proofHeight):void 0),void 0!==e.nextSequenceRecv&&(t.nextSequenceRecv=(e.nextSequenceRecv||o.default.UZERO).toString()),void 0!==e.signer&&(t.signer=e.signer),t},fromPartial(e){var t,n;const r=Object.assign({},C);return r.packet=void 0!==e.packet&&null!==e.packet?a.Packet.fromPartial(e.packet):void 0,r.proofUnreceived=null!==(t=e.proofUnreceived)&&void 0!==t?t:new Uint8Array,r.proofHeight=void 0!==e.proofHeight&&null!==e.proofHeight?s.Height.fromPartial(e.proofHeight):void 0,r.nextSequenceRecv=void 0!==e.nextSequenceRecv&&null!==e.nextSequenceRecv?o.default.fromValue(e.nextSequenceRecv):o.default.UZERO,r.signer=null!==(n=e.signer)&&void 0!==n?n:"",r}};const E={};t.MsgTimeoutResponse={encode:(e,t=i.default.Writer.create())=>t,decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},E);for(;n.posObject.assign({},E),toJSON:e=>({}),fromPartial:e=>Object.assign({},E)};const w={nextSequenceRecv:o.default.UZERO,signer:""};t.MsgTimeoutOnClose={encode:(e,t=i.default.Writer.create())=>(void 0!==e.packet&&a.Packet.encode(e.packet,t.uint32(10).fork()).ldelim(),0!==e.proofUnreceived.length&&t.uint32(18).bytes(e.proofUnreceived),0!==e.proofClose.length&&t.uint32(26).bytes(e.proofClose),void 0!==e.proofHeight&&s.Height.encode(e.proofHeight,t.uint32(34).fork()).ldelim(),e.nextSequenceRecv.isZero()||t.uint32(40).uint64(e.nextSequenceRecv),""!==e.signer&&t.uint32(50).string(e.signer),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},w);for(o.proofUnreceived=new Uint8Array,o.proofClose=new Uint8Array;n.pos>>3){case 1:o.packet=a.Packet.decode(n,n.uint32());break;case 2:o.proofUnreceived=n.bytes();break;case 3:o.proofClose=n.bytes();break;case 4:o.proofHeight=s.Height.decode(n,n.uint32());break;case 5:o.nextSequenceRecv=n.uint64();break;case 6:o.signer=n.string();break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},w);return t.packet=void 0!==e.packet&&null!==e.packet?a.Packet.fromJSON(e.packet):void 0,t.proofUnreceived=void 0!==e.proofUnreceived&&null!==e.proofUnreceived?Q(e.proofUnreceived):new Uint8Array,t.proofClose=void 0!==e.proofClose&&null!==e.proofClose?Q(e.proofClose):new Uint8Array,t.proofHeight=void 0!==e.proofHeight&&null!==e.proofHeight?s.Height.fromJSON(e.proofHeight):void 0,t.nextSequenceRecv=void 0!==e.nextSequenceRecv&&null!==e.nextSequenceRecv?o.default.fromString(e.nextSequenceRecv):o.default.UZERO,t.signer=void 0!==e.signer&&null!==e.signer?String(e.signer):"",t},toJSON(e){const t={};return void 0!==e.packet&&(t.packet=e.packet?a.Packet.toJSON(e.packet):void 0),void 0!==e.proofUnreceived&&(t.proofUnreceived=P(void 0!==e.proofUnreceived?e.proofUnreceived:new Uint8Array)),void 0!==e.proofClose&&(t.proofClose=P(void 0!==e.proofClose?e.proofClose:new Uint8Array)),void 0!==e.proofHeight&&(t.proofHeight=e.proofHeight?s.Height.toJSON(e.proofHeight):void 0),void 0!==e.nextSequenceRecv&&(t.nextSequenceRecv=(e.nextSequenceRecv||o.default.UZERO).toString()),void 0!==e.signer&&(t.signer=e.signer),t},fromPartial(e){var t,n,r;const i=Object.assign({},w);return i.packet=void 0!==e.packet&&null!==e.packet?a.Packet.fromPartial(e.packet):void 0,i.proofUnreceived=null!==(t=e.proofUnreceived)&&void 0!==t?t:new Uint8Array,i.proofClose=null!==(n=e.proofClose)&&void 0!==n?n:new Uint8Array,i.proofHeight=void 0!==e.proofHeight&&null!==e.proofHeight?s.Height.fromPartial(e.proofHeight):void 0,i.nextSequenceRecv=void 0!==e.nextSequenceRecv&&null!==e.nextSequenceRecv?o.default.fromValue(e.nextSequenceRecv):o.default.UZERO,i.signer=null!==(r=e.signer)&&void 0!==r?r:"",i}};const B={};t.MsgTimeoutOnCloseResponse={encode:(e,t=i.default.Writer.create())=>t,decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},B);for(;n.posObject.assign({},B),toJSON:e=>({}),fromPartial:e=>Object.assign({},B)};const _={signer:""};t.MsgAcknowledgement={encode:(e,t=i.default.Writer.create())=>(void 0!==e.packet&&a.Packet.encode(e.packet,t.uint32(10).fork()).ldelim(),0!==e.acknowledgement.length&&t.uint32(18).bytes(e.acknowledgement),0!==e.proofAcked.length&&t.uint32(26).bytes(e.proofAcked),void 0!==e.proofHeight&&s.Height.encode(e.proofHeight,t.uint32(34).fork()).ldelim(),""!==e.signer&&t.uint32(42).string(e.signer),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},_);for(o.acknowledgement=new Uint8Array,o.proofAcked=new Uint8Array;n.pos>>3){case 1:o.packet=a.Packet.decode(n,n.uint32());break;case 2:o.acknowledgement=n.bytes();break;case 3:o.proofAcked=n.bytes();break;case 4:o.proofHeight=s.Height.decode(n,n.uint32());break;case 5:o.signer=n.string();break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},_);return t.packet=void 0!==e.packet&&null!==e.packet?a.Packet.fromJSON(e.packet):void 0,t.acknowledgement=void 0!==e.acknowledgement&&null!==e.acknowledgement?Q(e.acknowledgement):new Uint8Array,t.proofAcked=void 0!==e.proofAcked&&null!==e.proofAcked?Q(e.proofAcked):new Uint8Array,t.proofHeight=void 0!==e.proofHeight&&null!==e.proofHeight?s.Height.fromJSON(e.proofHeight):void 0,t.signer=void 0!==e.signer&&null!==e.signer?String(e.signer):"",t},toJSON(e){const t={};return void 0!==e.packet&&(t.packet=e.packet?a.Packet.toJSON(e.packet):void 0),void 0!==e.acknowledgement&&(t.acknowledgement=P(void 0!==e.acknowledgement?e.acknowledgement:new Uint8Array)),void 0!==e.proofAcked&&(t.proofAcked=P(void 0!==e.proofAcked?e.proofAcked:new Uint8Array)),void 0!==e.proofHeight&&(t.proofHeight=e.proofHeight?s.Height.toJSON(e.proofHeight):void 0),void 0!==e.signer&&(t.signer=e.signer),t},fromPartial(e){var t,n,r;const o=Object.assign({},_);return o.packet=void 0!==e.packet&&null!==e.packet?a.Packet.fromPartial(e.packet):void 0,o.acknowledgement=null!==(t=e.acknowledgement)&&void 0!==t?t:new Uint8Array,o.proofAcked=null!==(n=e.proofAcked)&&void 0!==n?n:new Uint8Array,o.proofHeight=void 0!==e.proofHeight&&null!==e.proofHeight?s.Height.fromPartial(e.proofHeight):void 0,o.signer=null!==(r=e.signer)&&void 0!==r?r:"",o}};const S={};t.MsgAcknowledgementResponse={encode:(e,t=i.default.Writer.create())=>t,decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},S);for(;n.posObject.assign({},S),toJSON:e=>({}),fromPartial:e=>Object.assign({},S)},t.MsgClientImpl=class{constructor(e){this.rpc=e,this.ChannelOpenInit=this.ChannelOpenInit.bind(this),this.ChannelOpenTry=this.ChannelOpenTry.bind(this),this.ChannelOpenAck=this.ChannelOpenAck.bind(this),this.ChannelOpenConfirm=this.ChannelOpenConfirm.bind(this),this.ChannelCloseInit=this.ChannelCloseInit.bind(this),this.ChannelCloseConfirm=this.ChannelCloseConfirm.bind(this),this.RecvPacket=this.RecvPacket.bind(this),this.Timeout=this.Timeout.bind(this),this.TimeoutOnClose=this.TimeoutOnClose.bind(this),this.Acknowledgement=this.Acknowledgement.bind(this)}ChannelOpenInit(e){const n=t.MsgChannelOpenInit.encode(e).finish();return this.rpc.request("ibc.core.channel.v1.Msg","ChannelOpenInit",n).then((e=>t.MsgChannelOpenInitResponse.decode(new i.default.Reader(e))))}ChannelOpenTry(e){const n=t.MsgChannelOpenTry.encode(e).finish();return this.rpc.request("ibc.core.channel.v1.Msg","ChannelOpenTry",n).then((e=>t.MsgChannelOpenTryResponse.decode(new i.default.Reader(e))))}ChannelOpenAck(e){const n=t.MsgChannelOpenAck.encode(e).finish();return this.rpc.request("ibc.core.channel.v1.Msg","ChannelOpenAck",n).then((e=>t.MsgChannelOpenAckResponse.decode(new i.default.Reader(e))))}ChannelOpenConfirm(e){const n=t.MsgChannelOpenConfirm.encode(e).finish();return this.rpc.request("ibc.core.channel.v1.Msg","ChannelOpenConfirm",n).then((e=>t.MsgChannelOpenConfirmResponse.decode(new i.default.Reader(e))))}ChannelCloseInit(e){const n=t.MsgChannelCloseInit.encode(e).finish();return this.rpc.request("ibc.core.channel.v1.Msg","ChannelCloseInit",n).then((e=>t.MsgChannelCloseInitResponse.decode(new i.default.Reader(e))))}ChannelCloseConfirm(e){const n=t.MsgChannelCloseConfirm.encode(e).finish();return this.rpc.request("ibc.core.channel.v1.Msg","ChannelCloseConfirm",n).then((e=>t.MsgChannelCloseConfirmResponse.decode(new i.default.Reader(e))))}RecvPacket(e){const n=t.MsgRecvPacket.encode(e).finish();return this.rpc.request("ibc.core.channel.v1.Msg","RecvPacket",n).then((e=>t.MsgRecvPacketResponse.decode(new i.default.Reader(e))))}Timeout(e){const n=t.MsgTimeout.encode(e).finish();return this.rpc.request("ibc.core.channel.v1.Msg","Timeout",n).then((e=>t.MsgTimeoutResponse.decode(new i.default.Reader(e))))}TimeoutOnClose(e){const n=t.MsgTimeoutOnClose.encode(e).finish();return this.rpc.request("ibc.core.channel.v1.Msg","TimeoutOnClose",n).then((e=>t.MsgTimeoutOnCloseResponse.decode(new i.default.Reader(e))))}Acknowledgement(e){const n=t.MsgAcknowledgement.encode(e).finish();return this.rpc.request("ibc.core.channel.v1.Msg","Acknowledgement",n).then((e=>t.MsgAcknowledgementResponse.decode(new i.default.Reader(e))))}};var k=(()=>{if(void 0!==k)return k;if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==n.g)return n.g;throw"Unable to locate global object"})();const O=k.atob||(e=>k.Buffer.from(e,"base64").toString("binary"));function Q(e){const t=O(e),n=new Uint8Array(t.length);for(let e=0;ek.Buffer.from(e,"binary").toString("base64"));function P(e){const t=[];for(const n of e)t.push(String.fromCharCode(n));return R(t.join(""))}i.default.util.Long!==o.default&&(i.default.util.Long=o.default,i.default.configure())},5022:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Params=t.Height=t.ClientUpdateProposal=t.ClientConsensusStates=t.ConsensusStateWithHeight=t.IdentifiedClientState=t.protobufPackage=void 0;const o=r(n(3720)),i=r(n(3789)),a=n(3862);t.protobufPackage="ibc.core.client.v1";const s={clientId:""};t.IdentifiedClientState={encode:(e,t=i.default.Writer.create())=>(""!==e.clientId&&t.uint32(10).string(e.clientId),void 0!==e.clientState&&a.Any.encode(e.clientState,t.uint32(18).fork()).ldelim(),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},s);for(;n.pos>>3){case 1:o.clientId=n.string();break;case 2:o.clientState=a.Any.decode(n,n.uint32());break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},s);return t.clientId=void 0!==e.clientId&&null!==e.clientId?String(e.clientId):"",t.clientState=void 0!==e.clientState&&null!==e.clientState?a.Any.fromJSON(e.clientState):void 0,t},toJSON(e){const t={};return void 0!==e.clientId&&(t.clientId=e.clientId),void 0!==e.clientState&&(t.clientState=e.clientState?a.Any.toJSON(e.clientState):void 0),t},fromPartial(e){var t;const n=Object.assign({},s);return n.clientId=null!==(t=e.clientId)&&void 0!==t?t:"",n.clientState=void 0!==e.clientState&&null!==e.clientState?a.Any.fromPartial(e.clientState):void 0,n}};const c={};t.ConsensusStateWithHeight={encode:(e,n=i.default.Writer.create())=>(void 0!==e.height&&t.Height.encode(e.height,n.uint32(10).fork()).ldelim(),void 0!==e.consensusState&&a.Any.encode(e.consensusState,n.uint32(18).fork()).ldelim(),n),decode(e,n){const r=e instanceof i.default.Reader?e:new i.default.Reader(e);let o=void 0===n?r.len:r.pos+n;const s=Object.assign({},c);for(;r.pos>>3){case 1:s.height=t.Height.decode(r,r.uint32());break;case 2:s.consensusState=a.Any.decode(r,r.uint32());break;default:r.skipType(7&e)}}return s},fromJSON(e){const n=Object.assign({},c);return n.height=void 0!==e.height&&null!==e.height?t.Height.fromJSON(e.height):void 0,n.consensusState=void 0!==e.consensusState&&null!==e.consensusState?a.Any.fromJSON(e.consensusState):void 0,n},toJSON(e){const n={};return void 0!==e.height&&(n.height=e.height?t.Height.toJSON(e.height):void 0),void 0!==e.consensusState&&(n.consensusState=e.consensusState?a.Any.toJSON(e.consensusState):void 0),n},fromPartial(e){const n=Object.assign({},c);return n.height=void 0!==e.height&&null!==e.height?t.Height.fromPartial(e.height):void 0,n.consensusState=void 0!==e.consensusState&&null!==e.consensusState?a.Any.fromPartial(e.consensusState):void 0,n}};const d={clientId:""};t.ClientConsensusStates={encode(e,n=i.default.Writer.create()){""!==e.clientId&&n.uint32(10).string(e.clientId);for(const r of e.consensusStates)t.ConsensusStateWithHeight.encode(r,n.uint32(18).fork()).ldelim();return n},decode(e,n){const r=e instanceof i.default.Reader?e:new i.default.Reader(e);let o=void 0===n?r.len:r.pos+n;const a=Object.assign({},d);for(a.consensusStates=[];r.pos>>3){case 1:a.clientId=r.string();break;case 2:a.consensusStates.push(t.ConsensusStateWithHeight.decode(r,r.uint32()));break;default:r.skipType(7&e)}}return a},fromJSON(e){var n;const r=Object.assign({},d);return r.clientId=void 0!==e.clientId&&null!==e.clientId?String(e.clientId):"",r.consensusStates=(null!==(n=e.consensusStates)&&void 0!==n?n:[]).map((e=>t.ConsensusStateWithHeight.fromJSON(e))),r},toJSON(e){const n={};return void 0!==e.clientId&&(n.clientId=e.clientId),e.consensusStates?n.consensusStates=e.consensusStates.map((e=>e?t.ConsensusStateWithHeight.toJSON(e):void 0)):n.consensusStates=[],n},fromPartial(e){var n,r;const o=Object.assign({},d);return o.clientId=null!==(n=e.clientId)&&void 0!==n?n:"",o.consensusStates=(null===(r=e.consensusStates)||void 0===r?void 0:r.map((e=>t.ConsensusStateWithHeight.fromPartial(e))))||[],o}};const u={title:"",description:"",clientId:""};t.ClientUpdateProposal={encode:(e,t=i.default.Writer.create())=>(""!==e.title&&t.uint32(10).string(e.title),""!==e.description&&t.uint32(18).string(e.description),""!==e.clientId&&t.uint32(26).string(e.clientId),void 0!==e.header&&a.Any.encode(e.header,t.uint32(34).fork()).ldelim(),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},u);for(;n.pos>>3){case 1:o.title=n.string();break;case 2:o.description=n.string();break;case 3:o.clientId=n.string();break;case 4:o.header=a.Any.decode(n,n.uint32());break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},u);return t.title=void 0!==e.title&&null!==e.title?String(e.title):"",t.description=void 0!==e.description&&null!==e.description?String(e.description):"",t.clientId=void 0!==e.clientId&&null!==e.clientId?String(e.clientId):"",t.header=void 0!==e.header&&null!==e.header?a.Any.fromJSON(e.header):void 0,t},toJSON(e){const t={};return void 0!==e.title&&(t.title=e.title),void 0!==e.description&&(t.description=e.description),void 0!==e.clientId&&(t.clientId=e.clientId),void 0!==e.header&&(t.header=e.header?a.Any.toJSON(e.header):void 0),t},fromPartial(e){var t,n,r;const o=Object.assign({},u);return o.title=null!==(t=e.title)&&void 0!==t?t:"",o.description=null!==(n=e.description)&&void 0!==n?n:"",o.clientId=null!==(r=e.clientId)&&void 0!==r?r:"",o.header=void 0!==e.header&&null!==e.header?a.Any.fromPartial(e.header):void 0,o}};const l={revisionNumber:o.default.UZERO,revisionHeight:o.default.UZERO};t.Height={encode:(e,t=i.default.Writer.create())=>(e.revisionNumber.isZero()||t.uint32(8).uint64(e.revisionNumber),e.revisionHeight.isZero()||t.uint32(16).uint64(e.revisionHeight),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},l);for(;n.pos>>3){case 1:o.revisionNumber=n.uint64();break;case 2:o.revisionHeight=n.uint64();break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},l);return t.revisionNumber=void 0!==e.revisionNumber&&null!==e.revisionNumber?o.default.fromString(e.revisionNumber):o.default.UZERO,t.revisionHeight=void 0!==e.revisionHeight&&null!==e.revisionHeight?o.default.fromString(e.revisionHeight):o.default.UZERO,t},toJSON(e){const t={};return void 0!==e.revisionNumber&&(t.revisionNumber=(e.revisionNumber||o.default.UZERO).toString()),void 0!==e.revisionHeight&&(t.revisionHeight=(e.revisionHeight||o.default.UZERO).toString()),t},fromPartial(e){const t=Object.assign({},l);return t.revisionNumber=void 0!==e.revisionNumber&&null!==e.revisionNumber?o.default.fromValue(e.revisionNumber):o.default.UZERO,t.revisionHeight=void 0!==e.revisionHeight&&null!==e.revisionHeight?o.default.fromValue(e.revisionHeight):o.default.UZERO,t}};const A={allowedClients:""};t.Params={encode(e,t=i.default.Writer.create()){for(const n of e.allowedClients)t.uint32(10).string(n);return t},decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},A);for(o.allowedClients=[];n.pos>>3==1?o.allowedClients.push(n.string()):n.skipType(7&e)}return o},fromJSON(e){var t;const n=Object.assign({},A);return n.allowedClients=(null!==(t=e.allowedClients)&&void 0!==t?t:[]).map((e=>String(e))),n},toJSON(e){const t={};return e.allowedClients?t.allowedClients=e.allowedClients.map((e=>e)):t.allowedClients=[],t},fromPartial(e){var t;const n=Object.assign({},A);return n.allowedClients=(null===(t=e.allowedClients)||void 0===t?void 0:t.map((e=>e)))||[],n}},i.default.util.Long!==o.default&&(i.default.util.Long=o.default,i.default.configure())},6448:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.QueryClientImpl=t.QueryClientParamsResponse=t.QueryClientParamsRequest=t.QueryConsensusStatesResponse=t.QueryConsensusStatesRequest=t.QueryConsensusStateResponse=t.QueryConsensusStateRequest=t.QueryClientStatesResponse=t.QueryClientStatesRequest=t.QueryClientStateResponse=t.QueryClientStateRequest=t.protobufPackage=void 0;const o=r(n(3720)),i=r(n(3789)),a=n(3862),s=n(5022),c=n(9551);t.protobufPackage="ibc.core.client.v1";const d={clientId:""};t.QueryClientStateRequest={encode:(e,t=i.default.Writer.create())=>(""!==e.clientId&&t.uint32(10).string(e.clientId),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},d);for(;n.pos>>3==1?o.clientId=n.string():n.skipType(7&e)}return o},fromJSON(e){const t=Object.assign({},d);return t.clientId=void 0!==e.clientId&&null!==e.clientId?String(e.clientId):"",t},toJSON(e){const t={};return void 0!==e.clientId&&(t.clientId=e.clientId),t},fromPartial(e){var t;const n=Object.assign({},d);return n.clientId=null!==(t=e.clientId)&&void 0!==t?t:"",n}};const u={};t.QueryClientStateResponse={encode:(e,t=i.default.Writer.create())=>(void 0!==e.clientState&&a.Any.encode(e.clientState,t.uint32(10).fork()).ldelim(),0!==e.proof.length&&t.uint32(18).bytes(e.proof),void 0!==e.proofHeight&&s.Height.encode(e.proofHeight,t.uint32(26).fork()).ldelim(),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},u);for(o.proof=new Uint8Array;n.pos>>3){case 1:o.clientState=a.Any.decode(n,n.uint32());break;case 2:o.proof=n.bytes();break;case 3:o.proofHeight=s.Height.decode(n,n.uint32());break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},u);return t.clientState=void 0!==e.clientState&&null!==e.clientState?a.Any.fromJSON(e.clientState):void 0,t.proof=void 0!==e.proof&&null!==e.proof?I(e.proof):new Uint8Array,t.proofHeight=void 0!==e.proofHeight&&null!==e.proofHeight?s.Height.fromJSON(e.proofHeight):void 0,t},toJSON(e){const t={};return void 0!==e.clientState&&(t.clientState=e.clientState?a.Any.toJSON(e.clientState):void 0),void 0!==e.proof&&(t.proof=E(void 0!==e.proof?e.proof:new Uint8Array)),void 0!==e.proofHeight&&(t.proofHeight=e.proofHeight?s.Height.toJSON(e.proofHeight):void 0),t},fromPartial(e){var t;const n=Object.assign({},u);return n.clientState=void 0!==e.clientState&&null!==e.clientState?a.Any.fromPartial(e.clientState):void 0,n.proof=null!==(t=e.proof)&&void 0!==t?t:new Uint8Array,n.proofHeight=void 0!==e.proofHeight&&null!==e.proofHeight?s.Height.fromPartial(e.proofHeight):void 0,n}};const l={};t.QueryClientStatesRequest={encode:(e,t=i.default.Writer.create())=>(void 0!==e.pagination&&c.PageRequest.encode(e.pagination,t.uint32(10).fork()).ldelim(),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},l);for(;n.pos>>3==1?o.pagination=c.PageRequest.decode(n,n.uint32()):n.skipType(7&e)}return o},fromJSON(e){const t=Object.assign({},l);return t.pagination=void 0!==e.pagination&&null!==e.pagination?c.PageRequest.fromJSON(e.pagination):void 0,t},toJSON(e){const t={};return void 0!==e.pagination&&(t.pagination=e.pagination?c.PageRequest.toJSON(e.pagination):void 0),t},fromPartial(e){const t=Object.assign({},l);return t.pagination=void 0!==e.pagination&&null!==e.pagination?c.PageRequest.fromPartial(e.pagination):void 0,t}};const A={};t.QueryClientStatesResponse={encode(e,t=i.default.Writer.create()){for(const n of e.clientStates)s.IdentifiedClientState.encode(n,t.uint32(10).fork()).ldelim();return void 0!==e.pagination&&c.PageResponse.encode(e.pagination,t.uint32(18).fork()).ldelim(),t},decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},A);for(o.clientStates=[];n.pos>>3){case 1:o.clientStates.push(s.IdentifiedClientState.decode(n,n.uint32()));break;case 2:o.pagination=c.PageResponse.decode(n,n.uint32());break;default:n.skipType(7&e)}}return o},fromJSON(e){var t;const n=Object.assign({},A);return n.clientStates=(null!==(t=e.clientStates)&&void 0!==t?t:[]).map((e=>s.IdentifiedClientState.fromJSON(e))),n.pagination=void 0!==e.pagination&&null!==e.pagination?c.PageResponse.fromJSON(e.pagination):void 0,n},toJSON(e){const t={};return e.clientStates?t.clientStates=e.clientStates.map((e=>e?s.IdentifiedClientState.toJSON(e):void 0)):t.clientStates=[],void 0!==e.pagination&&(t.pagination=e.pagination?c.PageResponse.toJSON(e.pagination):void 0),t},fromPartial(e){var t;const n=Object.assign({},A);return n.clientStates=(null===(t=e.clientStates)||void 0===t?void 0:t.map((e=>s.IdentifiedClientState.fromPartial(e))))||[],n.pagination=void 0!==e.pagination&&null!==e.pagination?c.PageResponse.fromPartial(e.pagination):void 0,n}};const f={clientId:"",revisionNumber:o.default.UZERO,revisionHeight:o.default.UZERO,latestHeight:!1};t.QueryConsensusStateRequest={encode:(e,t=i.default.Writer.create())=>(""!==e.clientId&&t.uint32(10).string(e.clientId),e.revisionNumber.isZero()||t.uint32(16).uint64(e.revisionNumber),e.revisionHeight.isZero()||t.uint32(24).uint64(e.revisionHeight),!0===e.latestHeight&&t.uint32(32).bool(e.latestHeight),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},f);for(;n.pos>>3){case 1:o.clientId=n.string();break;case 2:o.revisionNumber=n.uint64();break;case 3:o.revisionHeight=n.uint64();break;case 4:o.latestHeight=n.bool();break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},f);return t.clientId=void 0!==e.clientId&&null!==e.clientId?String(e.clientId):"",t.revisionNumber=void 0!==e.revisionNumber&&null!==e.revisionNumber?o.default.fromString(e.revisionNumber):o.default.UZERO,t.revisionHeight=void 0!==e.revisionHeight&&null!==e.revisionHeight?o.default.fromString(e.revisionHeight):o.default.UZERO,t.latestHeight=void 0!==e.latestHeight&&null!==e.latestHeight&&Boolean(e.latestHeight),t},toJSON(e){const t={};return void 0!==e.clientId&&(t.clientId=e.clientId),void 0!==e.revisionNumber&&(t.revisionNumber=(e.revisionNumber||o.default.UZERO).toString()),void 0!==e.revisionHeight&&(t.revisionHeight=(e.revisionHeight||o.default.UZERO).toString()),void 0!==e.latestHeight&&(t.latestHeight=e.latestHeight),t},fromPartial(e){var t,n;const r=Object.assign({},f);return r.clientId=null!==(t=e.clientId)&&void 0!==t?t:"",r.revisionNumber=void 0!==e.revisionNumber&&null!==e.revisionNumber?o.default.fromValue(e.revisionNumber):o.default.UZERO,r.revisionHeight=void 0!==e.revisionHeight&&null!==e.revisionHeight?o.default.fromValue(e.revisionHeight):o.default.UZERO,r.latestHeight=null!==(n=e.latestHeight)&&void 0!==n&&n,r}};const h={};t.QueryConsensusStateResponse={encode:(e,t=i.default.Writer.create())=>(void 0!==e.consensusState&&a.Any.encode(e.consensusState,t.uint32(10).fork()).ldelim(),0!==e.proof.length&&t.uint32(18).bytes(e.proof),void 0!==e.proofHeight&&s.Height.encode(e.proofHeight,t.uint32(26).fork()).ldelim(),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},h);for(o.proof=new Uint8Array;n.pos>>3){case 1:o.consensusState=a.Any.decode(n,n.uint32());break;case 2:o.proof=n.bytes();break;case 3:o.proofHeight=s.Height.decode(n,n.uint32());break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},h);return t.consensusState=void 0!==e.consensusState&&null!==e.consensusState?a.Any.fromJSON(e.consensusState):void 0,t.proof=void 0!==e.proof&&null!==e.proof?I(e.proof):new Uint8Array,t.proofHeight=void 0!==e.proofHeight&&null!==e.proofHeight?s.Height.fromJSON(e.proofHeight):void 0,t},toJSON(e){const t={};return void 0!==e.consensusState&&(t.consensusState=e.consensusState?a.Any.toJSON(e.consensusState):void 0),void 0!==e.proof&&(t.proof=E(void 0!==e.proof?e.proof:new Uint8Array)),void 0!==e.proofHeight&&(t.proofHeight=e.proofHeight?s.Height.toJSON(e.proofHeight):void 0),t},fromPartial(e){var t;const n=Object.assign({},h);return n.consensusState=void 0!==e.consensusState&&null!==e.consensusState?a.Any.fromPartial(e.consensusState):void 0,n.proof=null!==(t=e.proof)&&void 0!==t?t:new Uint8Array,n.proofHeight=void 0!==e.proofHeight&&null!==e.proofHeight?s.Height.fromPartial(e.proofHeight):void 0,n}};const g={clientId:""};t.QueryConsensusStatesRequest={encode:(e,t=i.default.Writer.create())=>(""!==e.clientId&&t.uint32(10).string(e.clientId),void 0!==e.pagination&&c.PageRequest.encode(e.pagination,t.uint32(18).fork()).ldelim(),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},g);for(;n.pos>>3){case 1:o.clientId=n.string();break;case 2:o.pagination=c.PageRequest.decode(n,n.uint32());break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},g);return t.clientId=void 0!==e.clientId&&null!==e.clientId?String(e.clientId):"",t.pagination=void 0!==e.pagination&&null!==e.pagination?c.PageRequest.fromJSON(e.pagination):void 0,t},toJSON(e){const t={};return void 0!==e.clientId&&(t.clientId=e.clientId),void 0!==e.pagination&&(t.pagination=e.pagination?c.PageRequest.toJSON(e.pagination):void 0),t},fromPartial(e){var t;const n=Object.assign({},g);return n.clientId=null!==(t=e.clientId)&&void 0!==t?t:"",n.pagination=void 0!==e.pagination&&null!==e.pagination?c.PageRequest.fromPartial(e.pagination):void 0,n}};const p={};t.QueryConsensusStatesResponse={encode(e,t=i.default.Writer.create()){for(const n of e.consensusStates)s.ConsensusStateWithHeight.encode(n,t.uint32(10).fork()).ldelim();return void 0!==e.pagination&&c.PageResponse.encode(e.pagination,t.uint32(18).fork()).ldelim(),t},decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},p);for(o.consensusStates=[];n.pos>>3){case 1:o.consensusStates.push(s.ConsensusStateWithHeight.decode(n,n.uint32()));break;case 2:o.pagination=c.PageResponse.decode(n,n.uint32());break;default:n.skipType(7&e)}}return o},fromJSON(e){var t;const n=Object.assign({},p);return n.consensusStates=(null!==(t=e.consensusStates)&&void 0!==t?t:[]).map((e=>s.ConsensusStateWithHeight.fromJSON(e))),n.pagination=void 0!==e.pagination&&null!==e.pagination?c.PageResponse.fromJSON(e.pagination):void 0,n},toJSON(e){const t={};return e.consensusStates?t.consensusStates=e.consensusStates.map((e=>e?s.ConsensusStateWithHeight.toJSON(e):void 0)):t.consensusStates=[],void 0!==e.pagination&&(t.pagination=e.pagination?c.PageResponse.toJSON(e.pagination):void 0),t},fromPartial(e){var t;const n=Object.assign({},p);return n.consensusStates=(null===(t=e.consensusStates)||void 0===t?void 0:t.map((e=>s.ConsensusStateWithHeight.fromPartial(e))))||[],n.pagination=void 0!==e.pagination&&null!==e.pagination?c.PageResponse.fromPartial(e.pagination):void 0,n}};const m={};t.QueryClientParamsRequest={encode:(e,t=i.default.Writer.create())=>t,decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},m);for(;n.posObject.assign({},m),toJSON:e=>({}),fromPartial:e=>Object.assign({},m)};const v={};t.QueryClientParamsResponse={encode:(e,t=i.default.Writer.create())=>(void 0!==e.params&&s.Params.encode(e.params,t.uint32(10).fork()).ldelim(),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},v);for(;n.pos>>3==1?o.params=s.Params.decode(n,n.uint32()):n.skipType(7&e)}return o},fromJSON(e){const t=Object.assign({},v);return t.params=void 0!==e.params&&null!==e.params?s.Params.fromJSON(e.params):void 0,t},toJSON(e){const t={};return void 0!==e.params&&(t.params=e.params?s.Params.toJSON(e.params):void 0),t},fromPartial(e){const t=Object.assign({},v);return t.params=void 0!==e.params&&null!==e.params?s.Params.fromPartial(e.params):void 0,t}},t.QueryClientImpl=class{constructor(e){this.rpc=e,this.ClientState=this.ClientState.bind(this),this.ClientStates=this.ClientStates.bind(this),this.ConsensusState=this.ConsensusState.bind(this),this.ConsensusStates=this.ConsensusStates.bind(this),this.ClientParams=this.ClientParams.bind(this)}ClientState(e){const n=t.QueryClientStateRequest.encode(e).finish();return this.rpc.request("ibc.core.client.v1.Query","ClientState",n).then((e=>t.QueryClientStateResponse.decode(new i.default.Reader(e))))}ClientStates(e){const n=t.QueryClientStatesRequest.encode(e).finish();return this.rpc.request("ibc.core.client.v1.Query","ClientStates",n).then((e=>t.QueryClientStatesResponse.decode(new i.default.Reader(e))))}ConsensusState(e){const n=t.QueryConsensusStateRequest.encode(e).finish();return this.rpc.request("ibc.core.client.v1.Query","ConsensusState",n).then((e=>t.QueryConsensusStateResponse.decode(new i.default.Reader(e))))}ConsensusStates(e){const n=t.QueryConsensusStatesRequest.encode(e).finish();return this.rpc.request("ibc.core.client.v1.Query","ConsensusStates",n).then((e=>t.QueryConsensusStatesResponse.decode(new i.default.Reader(e))))}ClientParams(e){const n=t.QueryClientParamsRequest.encode(e).finish();return this.rpc.request("ibc.core.client.v1.Query","ClientParams",n).then((e=>t.QueryClientParamsResponse.decode(new i.default.Reader(e))))}};var y=(()=>{if(void 0!==y)return y;if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==n.g)return n.g;throw"Unable to locate global object"})();const b=y.atob||(e=>y.Buffer.from(e,"base64").toString("binary"));function I(e){const t=b(e),n=new Uint8Array(t.length);for(let e=0;ey.Buffer.from(e,"binary").toString("base64"));function E(e){const t=[];for(const n of e)t.push(String.fromCharCode(n));return C(t.join(""))}i.default.util.Long!==o.default&&(i.default.util.Long=o.default,i.default.configure())},9548:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.MsgClientImpl=t.MsgSubmitMisbehaviourResponse=t.MsgSubmitMisbehaviour=t.MsgUpgradeClientResponse=t.MsgUpgradeClient=t.MsgUpdateClientResponse=t.MsgUpdateClient=t.MsgCreateClientResponse=t.MsgCreateClient=t.protobufPackage=void 0;const o=r(n(3720)),i=r(n(3789)),a=n(3862);t.protobufPackage="ibc.core.client.v1";const s={signer:""};t.MsgCreateClient={encode:(e,t=i.default.Writer.create())=>(void 0!==e.clientState&&a.Any.encode(e.clientState,t.uint32(10).fork()).ldelim(),void 0!==e.consensusState&&a.Any.encode(e.consensusState,t.uint32(18).fork()).ldelim(),""!==e.signer&&t.uint32(26).string(e.signer),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},s);for(;n.pos>>3){case 1:o.clientState=a.Any.decode(n,n.uint32());break;case 2:o.consensusState=a.Any.decode(n,n.uint32());break;case 3:o.signer=n.string();break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},s);return t.clientState=void 0!==e.clientState&&null!==e.clientState?a.Any.fromJSON(e.clientState):void 0,t.consensusState=void 0!==e.consensusState&&null!==e.consensusState?a.Any.fromJSON(e.consensusState):void 0,t.signer=void 0!==e.signer&&null!==e.signer?String(e.signer):"",t},toJSON(e){const t={};return void 0!==e.clientState&&(t.clientState=e.clientState?a.Any.toJSON(e.clientState):void 0),void 0!==e.consensusState&&(t.consensusState=e.consensusState?a.Any.toJSON(e.consensusState):void 0),void 0!==e.signer&&(t.signer=e.signer),t},fromPartial(e){var t;const n=Object.assign({},s);return n.clientState=void 0!==e.clientState&&null!==e.clientState?a.Any.fromPartial(e.clientState):void 0,n.consensusState=void 0!==e.consensusState&&null!==e.consensusState?a.Any.fromPartial(e.consensusState):void 0,n.signer=null!==(t=e.signer)&&void 0!==t?t:"",n}};const c={};t.MsgCreateClientResponse={encode:(e,t=i.default.Writer.create())=>t,decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},c);for(;n.posObject.assign({},c),toJSON:e=>({}),fromPartial:e=>Object.assign({},c)};const d={clientId:"",signer:""};t.MsgUpdateClient={encode:(e,t=i.default.Writer.create())=>(""!==e.clientId&&t.uint32(10).string(e.clientId),void 0!==e.header&&a.Any.encode(e.header,t.uint32(18).fork()).ldelim(),""!==e.signer&&t.uint32(26).string(e.signer),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},d);for(;n.pos>>3){case 1:o.clientId=n.string();break;case 2:o.header=a.Any.decode(n,n.uint32());break;case 3:o.signer=n.string();break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},d);return t.clientId=void 0!==e.clientId&&null!==e.clientId?String(e.clientId):"",t.header=void 0!==e.header&&null!==e.header?a.Any.fromJSON(e.header):void 0,t.signer=void 0!==e.signer&&null!==e.signer?String(e.signer):"",t},toJSON(e){const t={};return void 0!==e.clientId&&(t.clientId=e.clientId),void 0!==e.header&&(t.header=e.header?a.Any.toJSON(e.header):void 0),void 0!==e.signer&&(t.signer=e.signer),t},fromPartial(e){var t,n;const r=Object.assign({},d);return r.clientId=null!==(t=e.clientId)&&void 0!==t?t:"",r.header=void 0!==e.header&&null!==e.header?a.Any.fromPartial(e.header):void 0,r.signer=null!==(n=e.signer)&&void 0!==n?n:"",r}};const u={};t.MsgUpdateClientResponse={encode:(e,t=i.default.Writer.create())=>t,decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},u);for(;n.posObject.assign({},u),toJSON:e=>({}),fromPartial:e=>Object.assign({},u)};const l={clientId:"",signer:""};t.MsgUpgradeClient={encode:(e,t=i.default.Writer.create())=>(""!==e.clientId&&t.uint32(10).string(e.clientId),void 0!==e.clientState&&a.Any.encode(e.clientState,t.uint32(18).fork()).ldelim(),void 0!==e.consensusState&&a.Any.encode(e.consensusState,t.uint32(26).fork()).ldelim(),0!==e.proofUpgradeClient.length&&t.uint32(34).bytes(e.proofUpgradeClient),0!==e.proofUpgradeConsensusState.length&&t.uint32(42).bytes(e.proofUpgradeConsensusState),""!==e.signer&&t.uint32(50).string(e.signer),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},l);for(o.proofUpgradeClient=new Uint8Array,o.proofUpgradeConsensusState=new Uint8Array;n.pos>>3){case 1:o.clientId=n.string();break;case 2:o.clientState=a.Any.decode(n,n.uint32());break;case 3:o.consensusState=a.Any.decode(n,n.uint32());break;case 4:o.proofUpgradeClient=n.bytes();break;case 5:o.proofUpgradeConsensusState=n.bytes();break;case 6:o.signer=n.string();break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},l);return t.clientId=void 0!==e.clientId&&null!==e.clientId?String(e.clientId):"",t.clientState=void 0!==e.clientState&&null!==e.clientState?a.Any.fromJSON(e.clientState):void 0,t.consensusState=void 0!==e.consensusState&&null!==e.consensusState?a.Any.fromJSON(e.consensusState):void 0,t.proofUpgradeClient=void 0!==e.proofUpgradeClient&&null!==e.proofUpgradeClient?m(e.proofUpgradeClient):new Uint8Array,t.proofUpgradeConsensusState=void 0!==e.proofUpgradeConsensusState&&null!==e.proofUpgradeConsensusState?m(e.proofUpgradeConsensusState):new Uint8Array,t.signer=void 0!==e.signer&&null!==e.signer?String(e.signer):"",t},toJSON(e){const t={};return void 0!==e.clientId&&(t.clientId=e.clientId),void 0!==e.clientState&&(t.clientState=e.clientState?a.Any.toJSON(e.clientState):void 0),void 0!==e.consensusState&&(t.consensusState=e.consensusState?a.Any.toJSON(e.consensusState):void 0),void 0!==e.proofUpgradeClient&&(t.proofUpgradeClient=y(void 0!==e.proofUpgradeClient?e.proofUpgradeClient:new Uint8Array)),void 0!==e.proofUpgradeConsensusState&&(t.proofUpgradeConsensusState=y(void 0!==e.proofUpgradeConsensusState?e.proofUpgradeConsensusState:new Uint8Array)),void 0!==e.signer&&(t.signer=e.signer),t},fromPartial(e){var t,n,r,o;const i=Object.assign({},l);return i.clientId=null!==(t=e.clientId)&&void 0!==t?t:"",i.clientState=void 0!==e.clientState&&null!==e.clientState?a.Any.fromPartial(e.clientState):void 0,i.consensusState=void 0!==e.consensusState&&null!==e.consensusState?a.Any.fromPartial(e.consensusState):void 0,i.proofUpgradeClient=null!==(n=e.proofUpgradeClient)&&void 0!==n?n:new Uint8Array,i.proofUpgradeConsensusState=null!==(r=e.proofUpgradeConsensusState)&&void 0!==r?r:new Uint8Array,i.signer=null!==(o=e.signer)&&void 0!==o?o:"",i}};const A={};t.MsgUpgradeClientResponse={encode:(e,t=i.default.Writer.create())=>t,decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},A);for(;n.posObject.assign({},A),toJSON:e=>({}),fromPartial:e=>Object.assign({},A)};const f={clientId:"",signer:""};t.MsgSubmitMisbehaviour={encode:(e,t=i.default.Writer.create())=>(""!==e.clientId&&t.uint32(10).string(e.clientId),void 0!==e.misbehaviour&&a.Any.encode(e.misbehaviour,t.uint32(18).fork()).ldelim(),""!==e.signer&&t.uint32(26).string(e.signer),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},f);for(;n.pos>>3){case 1:o.clientId=n.string();break;case 2:o.misbehaviour=a.Any.decode(n,n.uint32());break;case 3:o.signer=n.string();break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},f);return t.clientId=void 0!==e.clientId&&null!==e.clientId?String(e.clientId):"",t.misbehaviour=void 0!==e.misbehaviour&&null!==e.misbehaviour?a.Any.fromJSON(e.misbehaviour):void 0,t.signer=void 0!==e.signer&&null!==e.signer?String(e.signer):"",t},toJSON(e){const t={};return void 0!==e.clientId&&(t.clientId=e.clientId),void 0!==e.misbehaviour&&(t.misbehaviour=e.misbehaviour?a.Any.toJSON(e.misbehaviour):void 0),void 0!==e.signer&&(t.signer=e.signer),t},fromPartial(e){var t,n;const r=Object.assign({},f);return r.clientId=null!==(t=e.clientId)&&void 0!==t?t:"",r.misbehaviour=void 0!==e.misbehaviour&&null!==e.misbehaviour?a.Any.fromPartial(e.misbehaviour):void 0,r.signer=null!==(n=e.signer)&&void 0!==n?n:"",r}};const h={};t.MsgSubmitMisbehaviourResponse={encode:(e,t=i.default.Writer.create())=>t,decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},h);for(;n.posObject.assign({},h),toJSON:e=>({}),fromPartial:e=>Object.assign({},h)},t.MsgClientImpl=class{constructor(e){this.rpc=e,this.CreateClient=this.CreateClient.bind(this),this.UpdateClient=this.UpdateClient.bind(this),this.UpgradeClient=this.UpgradeClient.bind(this),this.SubmitMisbehaviour=this.SubmitMisbehaviour.bind(this)}CreateClient(e){const n=t.MsgCreateClient.encode(e).finish();return this.rpc.request("ibc.core.client.v1.Msg","CreateClient",n).then((e=>t.MsgCreateClientResponse.decode(new i.default.Reader(e))))}UpdateClient(e){const n=t.MsgUpdateClient.encode(e).finish();return this.rpc.request("ibc.core.client.v1.Msg","UpdateClient",n).then((e=>t.MsgUpdateClientResponse.decode(new i.default.Reader(e))))}UpgradeClient(e){const n=t.MsgUpgradeClient.encode(e).finish();return this.rpc.request("ibc.core.client.v1.Msg","UpgradeClient",n).then((e=>t.MsgUpgradeClientResponse.decode(new i.default.Reader(e))))}SubmitMisbehaviour(e){const n=t.MsgSubmitMisbehaviour.encode(e).finish();return this.rpc.request("ibc.core.client.v1.Msg","SubmitMisbehaviour",n).then((e=>t.MsgSubmitMisbehaviourResponse.decode(new i.default.Reader(e))))}};var g=(()=>{if(void 0!==g)return g;if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==n.g)return n.g;throw"Unable to locate global object"})();const p=g.atob||(e=>g.Buffer.from(e,"base64").toString("binary"));function m(e){const t=p(e),n=new Uint8Array(t.length);for(let e=0;eg.Buffer.from(e,"binary").toString("base64"));function y(e){const t=[];for(const n of e)t.push(String.fromCharCode(n));return v(t.join(""))}i.default.util.Long!==o.default&&(i.default.util.Long=o.default,i.default.configure())},228:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.MerkleProof=t.MerklePath=t.MerklePrefix=t.MerkleRoot=t.protobufPackage=void 0;const o=r(n(3720)),i=r(n(3789)),a=n(2912);t.protobufPackage="ibc.core.commitment.v1";const s={};t.MerkleRoot={encode:(e,t=i.default.Writer.create())=>(0!==e.hash.length&&t.uint32(10).bytes(e.hash),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},s);for(o.hash=new Uint8Array;n.pos>>3==1?o.hash=n.bytes():n.skipType(7&e)}return o},fromJSON(e){const t=Object.assign({},s);return t.hash=void 0!==e.hash&&null!==e.hash?f(e.hash):new Uint8Array,t},toJSON(e){const t={};return void 0!==e.hash&&(t.hash=g(void 0!==e.hash?e.hash:new Uint8Array)),t},fromPartial(e){var t;const n=Object.assign({},s);return n.hash=null!==(t=e.hash)&&void 0!==t?t:new Uint8Array,n}};const c={};t.MerklePrefix={encode:(e,t=i.default.Writer.create())=>(0!==e.keyPrefix.length&&t.uint32(10).bytes(e.keyPrefix),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},c);for(o.keyPrefix=new Uint8Array;n.pos>>3==1?o.keyPrefix=n.bytes():n.skipType(7&e)}return o},fromJSON(e){const t=Object.assign({},c);return t.keyPrefix=void 0!==e.keyPrefix&&null!==e.keyPrefix?f(e.keyPrefix):new Uint8Array,t},toJSON(e){const t={};return void 0!==e.keyPrefix&&(t.keyPrefix=g(void 0!==e.keyPrefix?e.keyPrefix:new Uint8Array)),t},fromPartial(e){var t;const n=Object.assign({},c);return n.keyPrefix=null!==(t=e.keyPrefix)&&void 0!==t?t:new Uint8Array,n}};const d={keyPath:""};t.MerklePath={encode(e,t=i.default.Writer.create()){for(const n of e.keyPath)t.uint32(10).string(n);return t},decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},d);for(o.keyPath=[];n.pos>>3==1?o.keyPath.push(n.string()):n.skipType(7&e)}return o},fromJSON(e){var t;const n=Object.assign({},d);return n.keyPath=(null!==(t=e.keyPath)&&void 0!==t?t:[]).map((e=>String(e))),n},toJSON(e){const t={};return e.keyPath?t.keyPath=e.keyPath.map((e=>e)):t.keyPath=[],t},fromPartial(e){var t;const n=Object.assign({},d);return n.keyPath=(null===(t=e.keyPath)||void 0===t?void 0:t.map((e=>e)))||[],n}};const u={};t.MerkleProof={encode(e,t=i.default.Writer.create()){for(const n of e.proofs)a.CommitmentProof.encode(n,t.uint32(10).fork()).ldelim();return t},decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},u);for(o.proofs=[];n.pos>>3==1?o.proofs.push(a.CommitmentProof.decode(n,n.uint32())):n.skipType(7&e)}return o},fromJSON(e){var t;const n=Object.assign({},u);return n.proofs=(null!==(t=e.proofs)&&void 0!==t?t:[]).map((e=>a.CommitmentProof.fromJSON(e))),n},toJSON(e){const t={};return e.proofs?t.proofs=e.proofs.map((e=>e?a.CommitmentProof.toJSON(e):void 0)):t.proofs=[],t},fromPartial(e){var t;const n=Object.assign({},u);return n.proofs=(null===(t=e.proofs)||void 0===t?void 0:t.map((e=>a.CommitmentProof.fromPartial(e))))||[],n}};var l=(()=>{if(void 0!==l)return l;if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==n.g)return n.g;throw"Unable to locate global object"})();const A=l.atob||(e=>l.Buffer.from(e,"base64").toString("binary"));function f(e){const t=A(e),n=new Uint8Array(t.length);for(let e=0;el.Buffer.from(e,"binary").toString("base64"));function g(e){const t=[];for(const n of e)t.push(String.fromCharCode(n));return h(t.join(""))}i.default.util.Long!==o.default&&(i.default.util.Long=o.default,i.default.configure())},5698:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Version=t.ConnectionPaths=t.ClientPaths=t.Counterparty=t.IdentifiedConnection=t.ConnectionEnd=t.stateToJSON=t.stateFromJSON=t.State=t.protobufPackage=void 0;const o=r(n(3720)),i=r(n(3789)),a=n(228);var s;function c(e){switch(e){case 0:case"STATE_UNINITIALIZED_UNSPECIFIED":return s.STATE_UNINITIALIZED_UNSPECIFIED;case 1:case"STATE_INIT":return s.STATE_INIT;case 2:case"STATE_TRYOPEN":return s.STATE_TRYOPEN;case 3:case"STATE_OPEN":return s.STATE_OPEN;default:return s.UNRECOGNIZED}}function d(e){switch(e){case s.STATE_UNINITIALIZED_UNSPECIFIED:return"STATE_UNINITIALIZED_UNSPECIFIED";case s.STATE_INIT:return"STATE_INIT";case s.STATE_TRYOPEN:return"STATE_TRYOPEN";case s.STATE_OPEN:return"STATE_OPEN";default:return"UNKNOWN"}}t.protobufPackage="ibc.core.connection.v1",function(e){e[e.STATE_UNINITIALIZED_UNSPECIFIED=0]="STATE_UNINITIALIZED_UNSPECIFIED",e[e.STATE_INIT=1]="STATE_INIT",e[e.STATE_TRYOPEN=2]="STATE_TRYOPEN",e[e.STATE_OPEN=3]="STATE_OPEN",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(s=t.State||(t.State={})),t.stateFromJSON=c,t.stateToJSON=d;const u={clientId:"",state:0,delayPeriod:o.default.UZERO};t.ConnectionEnd={encode(e,n=i.default.Writer.create()){""!==e.clientId&&n.uint32(10).string(e.clientId);for(const r of e.versions)t.Version.encode(r,n.uint32(18).fork()).ldelim();return 0!==e.state&&n.uint32(24).int32(e.state),void 0!==e.counterparty&&t.Counterparty.encode(e.counterparty,n.uint32(34).fork()).ldelim(),e.delayPeriod.isZero()||n.uint32(40).uint64(e.delayPeriod),n},decode(e,n){const r=e instanceof i.default.Reader?e:new i.default.Reader(e);let o=void 0===n?r.len:r.pos+n;const a=Object.assign({},u);for(a.versions=[];r.pos>>3){case 1:a.clientId=r.string();break;case 2:a.versions.push(t.Version.decode(r,r.uint32()));break;case 3:a.state=r.int32();break;case 4:a.counterparty=t.Counterparty.decode(r,r.uint32());break;case 5:a.delayPeriod=r.uint64();break;default:r.skipType(7&e)}}return a},fromJSON(e){var n;const r=Object.assign({},u);return r.clientId=void 0!==e.clientId&&null!==e.clientId?String(e.clientId):"",r.versions=(null!==(n=e.versions)&&void 0!==n?n:[]).map((e=>t.Version.fromJSON(e))),r.state=void 0!==e.state&&null!==e.state?c(e.state):0,r.counterparty=void 0!==e.counterparty&&null!==e.counterparty?t.Counterparty.fromJSON(e.counterparty):void 0,r.delayPeriod=void 0!==e.delayPeriod&&null!==e.delayPeriod?o.default.fromString(e.delayPeriod):o.default.UZERO,r},toJSON(e){const n={};return void 0!==e.clientId&&(n.clientId=e.clientId),e.versions?n.versions=e.versions.map((e=>e?t.Version.toJSON(e):void 0)):n.versions=[],void 0!==e.state&&(n.state=d(e.state)),void 0!==e.counterparty&&(n.counterparty=e.counterparty?t.Counterparty.toJSON(e.counterparty):void 0),void 0!==e.delayPeriod&&(n.delayPeriod=(e.delayPeriod||o.default.UZERO).toString()),n},fromPartial(e){var n,r,i;const a=Object.assign({},u);return a.clientId=null!==(n=e.clientId)&&void 0!==n?n:"",a.versions=(null===(r=e.versions)||void 0===r?void 0:r.map((e=>t.Version.fromPartial(e))))||[],a.state=null!==(i=e.state)&&void 0!==i?i:0,a.counterparty=void 0!==e.counterparty&&null!==e.counterparty?t.Counterparty.fromPartial(e.counterparty):void 0,a.delayPeriod=void 0!==e.delayPeriod&&null!==e.delayPeriod?o.default.fromValue(e.delayPeriod):o.default.UZERO,a}};const l={id:"",clientId:"",state:0,delayPeriod:o.default.UZERO};t.IdentifiedConnection={encode(e,n=i.default.Writer.create()){""!==e.id&&n.uint32(10).string(e.id),""!==e.clientId&&n.uint32(18).string(e.clientId);for(const r of e.versions)t.Version.encode(r,n.uint32(26).fork()).ldelim();return 0!==e.state&&n.uint32(32).int32(e.state),void 0!==e.counterparty&&t.Counterparty.encode(e.counterparty,n.uint32(42).fork()).ldelim(),e.delayPeriod.isZero()||n.uint32(48).uint64(e.delayPeriod),n},decode(e,n){const r=e instanceof i.default.Reader?e:new i.default.Reader(e);let o=void 0===n?r.len:r.pos+n;const a=Object.assign({},l);for(a.versions=[];r.pos>>3){case 1:a.id=r.string();break;case 2:a.clientId=r.string();break;case 3:a.versions.push(t.Version.decode(r,r.uint32()));break;case 4:a.state=r.int32();break;case 5:a.counterparty=t.Counterparty.decode(r,r.uint32());break;case 6:a.delayPeriod=r.uint64();break;default:r.skipType(7&e)}}return a},fromJSON(e){var n;const r=Object.assign({},l);return r.id=void 0!==e.id&&null!==e.id?String(e.id):"",r.clientId=void 0!==e.clientId&&null!==e.clientId?String(e.clientId):"",r.versions=(null!==(n=e.versions)&&void 0!==n?n:[]).map((e=>t.Version.fromJSON(e))),r.state=void 0!==e.state&&null!==e.state?c(e.state):0,r.counterparty=void 0!==e.counterparty&&null!==e.counterparty?t.Counterparty.fromJSON(e.counterparty):void 0,r.delayPeriod=void 0!==e.delayPeriod&&null!==e.delayPeriod?o.default.fromString(e.delayPeriod):o.default.UZERO,r},toJSON(e){const n={};return void 0!==e.id&&(n.id=e.id),void 0!==e.clientId&&(n.clientId=e.clientId),e.versions?n.versions=e.versions.map((e=>e?t.Version.toJSON(e):void 0)):n.versions=[],void 0!==e.state&&(n.state=d(e.state)),void 0!==e.counterparty&&(n.counterparty=e.counterparty?t.Counterparty.toJSON(e.counterparty):void 0),void 0!==e.delayPeriod&&(n.delayPeriod=(e.delayPeriod||o.default.UZERO).toString()),n},fromPartial(e){var n,r,i,a;const s=Object.assign({},l);return s.id=null!==(n=e.id)&&void 0!==n?n:"",s.clientId=null!==(r=e.clientId)&&void 0!==r?r:"",s.versions=(null===(i=e.versions)||void 0===i?void 0:i.map((e=>t.Version.fromPartial(e))))||[],s.state=null!==(a=e.state)&&void 0!==a?a:0,s.counterparty=void 0!==e.counterparty&&null!==e.counterparty?t.Counterparty.fromPartial(e.counterparty):void 0,s.delayPeriod=void 0!==e.delayPeriod&&null!==e.delayPeriod?o.default.fromValue(e.delayPeriod):o.default.UZERO,s}};const A={clientId:"",connectionId:""};t.Counterparty={encode:(e,t=i.default.Writer.create())=>(""!==e.clientId&&t.uint32(10).string(e.clientId),""!==e.connectionId&&t.uint32(18).string(e.connectionId),void 0!==e.prefix&&a.MerklePrefix.encode(e.prefix,t.uint32(26).fork()).ldelim(),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},A);for(;n.pos>>3){case 1:o.clientId=n.string();break;case 2:o.connectionId=n.string();break;case 3:o.prefix=a.MerklePrefix.decode(n,n.uint32());break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},A);return t.clientId=void 0!==e.clientId&&null!==e.clientId?String(e.clientId):"",t.connectionId=void 0!==e.connectionId&&null!==e.connectionId?String(e.connectionId):"",t.prefix=void 0!==e.prefix&&null!==e.prefix?a.MerklePrefix.fromJSON(e.prefix):void 0,t},toJSON(e){const t={};return void 0!==e.clientId&&(t.clientId=e.clientId),void 0!==e.connectionId&&(t.connectionId=e.connectionId),void 0!==e.prefix&&(t.prefix=e.prefix?a.MerklePrefix.toJSON(e.prefix):void 0),t},fromPartial(e){var t,n;const r=Object.assign({},A);return r.clientId=null!==(t=e.clientId)&&void 0!==t?t:"",r.connectionId=null!==(n=e.connectionId)&&void 0!==n?n:"",r.prefix=void 0!==e.prefix&&null!==e.prefix?a.MerklePrefix.fromPartial(e.prefix):void 0,r}};const f={paths:""};t.ClientPaths={encode(e,t=i.default.Writer.create()){for(const n of e.paths)t.uint32(10).string(n);return t},decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},f);for(o.paths=[];n.pos>>3==1?o.paths.push(n.string()):n.skipType(7&e)}return o},fromJSON(e){var t;const n=Object.assign({},f);return n.paths=(null!==(t=e.paths)&&void 0!==t?t:[]).map((e=>String(e))),n},toJSON(e){const t={};return e.paths?t.paths=e.paths.map((e=>e)):t.paths=[],t},fromPartial(e){var t;const n=Object.assign({},f);return n.paths=(null===(t=e.paths)||void 0===t?void 0:t.map((e=>e)))||[],n}};const h={clientId:"",paths:""};t.ConnectionPaths={encode(e,t=i.default.Writer.create()){""!==e.clientId&&t.uint32(10).string(e.clientId);for(const n of e.paths)t.uint32(18).string(n);return t},decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},h);for(o.paths=[];n.pos>>3){case 1:o.clientId=n.string();break;case 2:o.paths.push(n.string());break;default:n.skipType(7&e)}}return o},fromJSON(e){var t;const n=Object.assign({},h);return n.clientId=void 0!==e.clientId&&null!==e.clientId?String(e.clientId):"",n.paths=(null!==(t=e.paths)&&void 0!==t?t:[]).map((e=>String(e))),n},toJSON(e){const t={};return void 0!==e.clientId&&(t.clientId=e.clientId),e.paths?t.paths=e.paths.map((e=>e)):t.paths=[],t},fromPartial(e){var t,n;const r=Object.assign({},h);return r.clientId=null!==(t=e.clientId)&&void 0!==t?t:"",r.paths=(null===(n=e.paths)||void 0===n?void 0:n.map((e=>e)))||[],r}};const g={identifier:"",features:""};t.Version={encode(e,t=i.default.Writer.create()){""!==e.identifier&&t.uint32(10).string(e.identifier);for(const n of e.features)t.uint32(18).string(n);return t},decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},g);for(o.features=[];n.pos>>3){case 1:o.identifier=n.string();break;case 2:o.features.push(n.string());break;default:n.skipType(7&e)}}return o},fromJSON(e){var t;const n=Object.assign({},g);return n.identifier=void 0!==e.identifier&&null!==e.identifier?String(e.identifier):"",n.features=(null!==(t=e.features)&&void 0!==t?t:[]).map((e=>String(e))),n},toJSON(e){const t={};return void 0!==e.identifier&&(t.identifier=e.identifier),e.features?t.features=e.features.map((e=>e)):t.features=[],t},fromPartial(e){var t,n;const r=Object.assign({},g);return r.identifier=null!==(t=e.identifier)&&void 0!==t?t:"",r.features=(null===(n=e.features)||void 0===n?void 0:n.map((e=>e)))||[],r}},i.default.util.Long!==o.default&&(i.default.util.Long=o.default,i.default.configure())},2329:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.QueryClientImpl=t.QueryConnectionConsensusStateResponse=t.QueryConnectionConsensusStateRequest=t.QueryConnectionClientStateResponse=t.QueryConnectionClientStateRequest=t.QueryClientConnectionsResponse=t.QueryClientConnectionsRequest=t.QueryConnectionsResponse=t.QueryConnectionsRequest=t.QueryConnectionResponse=t.QueryConnectionRequest=t.protobufPackage=void 0;const o=r(n(3720)),i=r(n(3789)),a=n(5698),s=n(5022),c=n(9551),d=n(3862);t.protobufPackage="ibc.core.connection.v1";const u={connectionId:""};t.QueryConnectionRequest={encode:(e,t=i.default.Writer.create())=>(""!==e.connectionId&&t.uint32(10).string(e.connectionId),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},u);for(;n.pos>>3==1?o.connectionId=n.string():n.skipType(7&e)}return o},fromJSON(e){const t=Object.assign({},u);return t.connectionId=void 0!==e.connectionId&&null!==e.connectionId?String(e.connectionId):"",t},toJSON(e){const t={};return void 0!==e.connectionId&&(t.connectionId=e.connectionId),t},fromPartial(e){var t;const n=Object.assign({},u);return n.connectionId=null!==(t=e.connectionId)&&void 0!==t?t:"",n}};const l={};t.QueryConnectionResponse={encode:(e,t=i.default.Writer.create())=>(void 0!==e.connection&&a.ConnectionEnd.encode(e.connection,t.uint32(10).fork()).ldelim(),0!==e.proof.length&&t.uint32(18).bytes(e.proof),void 0!==e.proofHeight&&s.Height.encode(e.proofHeight,t.uint32(26).fork()).ldelim(),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},l);for(o.proof=new Uint8Array;n.pos>>3){case 1:o.connection=a.ConnectionEnd.decode(n,n.uint32());break;case 2:o.proof=n.bytes();break;case 3:o.proofHeight=s.Height.decode(n,n.uint32());break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},l);return t.connection=void 0!==e.connection&&null!==e.connection?a.ConnectionEnd.fromJSON(e.connection):void 0,t.proof=void 0!==e.proof&&null!==e.proof?C(e.proof):new Uint8Array,t.proofHeight=void 0!==e.proofHeight&&null!==e.proofHeight?s.Height.fromJSON(e.proofHeight):void 0,t},toJSON(e){const t={};return void 0!==e.connection&&(t.connection=e.connection?a.ConnectionEnd.toJSON(e.connection):void 0),void 0!==e.proof&&(t.proof=w(void 0!==e.proof?e.proof:new Uint8Array)),void 0!==e.proofHeight&&(t.proofHeight=e.proofHeight?s.Height.toJSON(e.proofHeight):void 0),t},fromPartial(e){var t;const n=Object.assign({},l);return n.connection=void 0!==e.connection&&null!==e.connection?a.ConnectionEnd.fromPartial(e.connection):void 0,n.proof=null!==(t=e.proof)&&void 0!==t?t:new Uint8Array,n.proofHeight=void 0!==e.proofHeight&&null!==e.proofHeight?s.Height.fromPartial(e.proofHeight):void 0,n}};const A={};t.QueryConnectionsRequest={encode:(e,t=i.default.Writer.create())=>(void 0!==e.pagination&&c.PageRequest.encode(e.pagination,t.uint32(10).fork()).ldelim(),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},A);for(;n.pos>>3==1?o.pagination=c.PageRequest.decode(n,n.uint32()):n.skipType(7&e)}return o},fromJSON(e){const t=Object.assign({},A);return t.pagination=void 0!==e.pagination&&null!==e.pagination?c.PageRequest.fromJSON(e.pagination):void 0,t},toJSON(e){const t={};return void 0!==e.pagination&&(t.pagination=e.pagination?c.PageRequest.toJSON(e.pagination):void 0),t},fromPartial(e){const t=Object.assign({},A);return t.pagination=void 0!==e.pagination&&null!==e.pagination?c.PageRequest.fromPartial(e.pagination):void 0,t}};const f={};t.QueryConnectionsResponse={encode(e,t=i.default.Writer.create()){for(const n of e.connections)a.IdentifiedConnection.encode(n,t.uint32(10).fork()).ldelim();return void 0!==e.pagination&&c.PageResponse.encode(e.pagination,t.uint32(18).fork()).ldelim(),void 0!==e.height&&s.Height.encode(e.height,t.uint32(26).fork()).ldelim(),t},decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},f);for(o.connections=[];n.pos>>3){case 1:o.connections.push(a.IdentifiedConnection.decode(n,n.uint32()));break;case 2:o.pagination=c.PageResponse.decode(n,n.uint32());break;case 3:o.height=s.Height.decode(n,n.uint32());break;default:n.skipType(7&e)}}return o},fromJSON(e){var t;const n=Object.assign({},f);return n.connections=(null!==(t=e.connections)&&void 0!==t?t:[]).map((e=>a.IdentifiedConnection.fromJSON(e))),n.pagination=void 0!==e.pagination&&null!==e.pagination?c.PageResponse.fromJSON(e.pagination):void 0,n.height=void 0!==e.height&&null!==e.height?s.Height.fromJSON(e.height):void 0,n},toJSON(e){const t={};return e.connections?t.connections=e.connections.map((e=>e?a.IdentifiedConnection.toJSON(e):void 0)):t.connections=[],void 0!==e.pagination&&(t.pagination=e.pagination?c.PageResponse.toJSON(e.pagination):void 0),void 0!==e.height&&(t.height=e.height?s.Height.toJSON(e.height):void 0),t},fromPartial(e){var t;const n=Object.assign({},f);return n.connections=(null===(t=e.connections)||void 0===t?void 0:t.map((e=>a.IdentifiedConnection.fromPartial(e))))||[],n.pagination=void 0!==e.pagination&&null!==e.pagination?c.PageResponse.fromPartial(e.pagination):void 0,n.height=void 0!==e.height&&null!==e.height?s.Height.fromPartial(e.height):void 0,n}};const h={clientId:""};t.QueryClientConnectionsRequest={encode:(e,t=i.default.Writer.create())=>(""!==e.clientId&&t.uint32(10).string(e.clientId),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},h);for(;n.pos>>3==1?o.clientId=n.string():n.skipType(7&e)}return o},fromJSON(e){const t=Object.assign({},h);return t.clientId=void 0!==e.clientId&&null!==e.clientId?String(e.clientId):"",t},toJSON(e){const t={};return void 0!==e.clientId&&(t.clientId=e.clientId),t},fromPartial(e){var t;const n=Object.assign({},h);return n.clientId=null!==(t=e.clientId)&&void 0!==t?t:"",n}};const g={connectionPaths:""};t.QueryClientConnectionsResponse={encode(e,t=i.default.Writer.create()){for(const n of e.connectionPaths)t.uint32(10).string(n);return 0!==e.proof.length&&t.uint32(18).bytes(e.proof),void 0!==e.proofHeight&&s.Height.encode(e.proofHeight,t.uint32(26).fork()).ldelim(),t},decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},g);for(o.connectionPaths=[],o.proof=new Uint8Array;n.pos>>3){case 1:o.connectionPaths.push(n.string());break;case 2:o.proof=n.bytes();break;case 3:o.proofHeight=s.Height.decode(n,n.uint32());break;default:n.skipType(7&e)}}return o},fromJSON(e){var t;const n=Object.assign({},g);return n.connectionPaths=(null!==(t=e.connectionPaths)&&void 0!==t?t:[]).map((e=>String(e))),n.proof=void 0!==e.proof&&null!==e.proof?C(e.proof):new Uint8Array,n.proofHeight=void 0!==e.proofHeight&&null!==e.proofHeight?s.Height.fromJSON(e.proofHeight):void 0,n},toJSON(e){const t={};return e.connectionPaths?t.connectionPaths=e.connectionPaths.map((e=>e)):t.connectionPaths=[],void 0!==e.proof&&(t.proof=w(void 0!==e.proof?e.proof:new Uint8Array)),void 0!==e.proofHeight&&(t.proofHeight=e.proofHeight?s.Height.toJSON(e.proofHeight):void 0),t},fromPartial(e){var t,n;const r=Object.assign({},g);return r.connectionPaths=(null===(t=e.connectionPaths)||void 0===t?void 0:t.map((e=>e)))||[],r.proof=null!==(n=e.proof)&&void 0!==n?n:new Uint8Array,r.proofHeight=void 0!==e.proofHeight&&null!==e.proofHeight?s.Height.fromPartial(e.proofHeight):void 0,r}};const p={connectionId:""};t.QueryConnectionClientStateRequest={encode:(e,t=i.default.Writer.create())=>(""!==e.connectionId&&t.uint32(10).string(e.connectionId),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},p);for(;n.pos>>3==1?o.connectionId=n.string():n.skipType(7&e)}return o},fromJSON(e){const t=Object.assign({},p);return t.connectionId=void 0!==e.connectionId&&null!==e.connectionId?String(e.connectionId):"",t},toJSON(e){const t={};return void 0!==e.connectionId&&(t.connectionId=e.connectionId),t},fromPartial(e){var t;const n=Object.assign({},p);return n.connectionId=null!==(t=e.connectionId)&&void 0!==t?t:"",n}};const m={};t.QueryConnectionClientStateResponse={encode:(e,t=i.default.Writer.create())=>(void 0!==e.identifiedClientState&&s.IdentifiedClientState.encode(e.identifiedClientState,t.uint32(10).fork()).ldelim(),0!==e.proof.length&&t.uint32(18).bytes(e.proof),void 0!==e.proofHeight&&s.Height.encode(e.proofHeight,t.uint32(26).fork()).ldelim(),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},m);for(o.proof=new Uint8Array;n.pos>>3){case 1:o.identifiedClientState=s.IdentifiedClientState.decode(n,n.uint32());break;case 2:o.proof=n.bytes();break;case 3:o.proofHeight=s.Height.decode(n,n.uint32());break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},m);return t.identifiedClientState=void 0!==e.identifiedClientState&&null!==e.identifiedClientState?s.IdentifiedClientState.fromJSON(e.identifiedClientState):void 0,t.proof=void 0!==e.proof&&null!==e.proof?C(e.proof):new Uint8Array,t.proofHeight=void 0!==e.proofHeight&&null!==e.proofHeight?s.Height.fromJSON(e.proofHeight):void 0,t},toJSON(e){const t={};return void 0!==e.identifiedClientState&&(t.identifiedClientState=e.identifiedClientState?s.IdentifiedClientState.toJSON(e.identifiedClientState):void 0),void 0!==e.proof&&(t.proof=w(void 0!==e.proof?e.proof:new Uint8Array)),void 0!==e.proofHeight&&(t.proofHeight=e.proofHeight?s.Height.toJSON(e.proofHeight):void 0),t},fromPartial(e){var t;const n=Object.assign({},m);return n.identifiedClientState=void 0!==e.identifiedClientState&&null!==e.identifiedClientState?s.IdentifiedClientState.fromPartial(e.identifiedClientState):void 0,n.proof=null!==(t=e.proof)&&void 0!==t?t:new Uint8Array,n.proofHeight=void 0!==e.proofHeight&&null!==e.proofHeight?s.Height.fromPartial(e.proofHeight):void 0,n}};const v={connectionId:"",revisionNumber:o.default.UZERO,revisionHeight:o.default.UZERO};t.QueryConnectionConsensusStateRequest={encode:(e,t=i.default.Writer.create())=>(""!==e.connectionId&&t.uint32(10).string(e.connectionId),e.revisionNumber.isZero()||t.uint32(16).uint64(e.revisionNumber),e.revisionHeight.isZero()||t.uint32(24).uint64(e.revisionHeight),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},v);for(;n.pos>>3){case 1:o.connectionId=n.string();break;case 2:o.revisionNumber=n.uint64();break;case 3:o.revisionHeight=n.uint64();break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},v);return t.connectionId=void 0!==e.connectionId&&null!==e.connectionId?String(e.connectionId):"",t.revisionNumber=void 0!==e.revisionNumber&&null!==e.revisionNumber?o.default.fromString(e.revisionNumber):o.default.UZERO,t.revisionHeight=void 0!==e.revisionHeight&&null!==e.revisionHeight?o.default.fromString(e.revisionHeight):o.default.UZERO,t},toJSON(e){const t={};return void 0!==e.connectionId&&(t.connectionId=e.connectionId),void 0!==e.revisionNumber&&(t.revisionNumber=(e.revisionNumber||o.default.UZERO).toString()),void 0!==e.revisionHeight&&(t.revisionHeight=(e.revisionHeight||o.default.UZERO).toString()),t},fromPartial(e){var t;const n=Object.assign({},v);return n.connectionId=null!==(t=e.connectionId)&&void 0!==t?t:"",n.revisionNumber=void 0!==e.revisionNumber&&null!==e.revisionNumber?o.default.fromValue(e.revisionNumber):o.default.UZERO,n.revisionHeight=void 0!==e.revisionHeight&&null!==e.revisionHeight?o.default.fromValue(e.revisionHeight):o.default.UZERO,n}};const y={clientId:""};t.QueryConnectionConsensusStateResponse={encode:(e,t=i.default.Writer.create())=>(void 0!==e.consensusState&&d.Any.encode(e.consensusState,t.uint32(10).fork()).ldelim(),""!==e.clientId&&t.uint32(18).string(e.clientId),0!==e.proof.length&&t.uint32(26).bytes(e.proof),void 0!==e.proofHeight&&s.Height.encode(e.proofHeight,t.uint32(34).fork()).ldelim(),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},y);for(o.proof=new Uint8Array;n.pos>>3){case 1:o.consensusState=d.Any.decode(n,n.uint32());break;case 2:o.clientId=n.string();break;case 3:o.proof=n.bytes();break;case 4:o.proofHeight=s.Height.decode(n,n.uint32());break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},y);return t.consensusState=void 0!==e.consensusState&&null!==e.consensusState?d.Any.fromJSON(e.consensusState):void 0,t.clientId=void 0!==e.clientId&&null!==e.clientId?String(e.clientId):"",t.proof=void 0!==e.proof&&null!==e.proof?C(e.proof):new Uint8Array,t.proofHeight=void 0!==e.proofHeight&&null!==e.proofHeight?s.Height.fromJSON(e.proofHeight):void 0,t},toJSON(e){const t={};return void 0!==e.consensusState&&(t.consensusState=e.consensusState?d.Any.toJSON(e.consensusState):void 0),void 0!==e.clientId&&(t.clientId=e.clientId),void 0!==e.proof&&(t.proof=w(void 0!==e.proof?e.proof:new Uint8Array)),void 0!==e.proofHeight&&(t.proofHeight=e.proofHeight?s.Height.toJSON(e.proofHeight):void 0),t},fromPartial(e){var t,n;const r=Object.assign({},y);return r.consensusState=void 0!==e.consensusState&&null!==e.consensusState?d.Any.fromPartial(e.consensusState):void 0,r.clientId=null!==(t=e.clientId)&&void 0!==t?t:"",r.proof=null!==(n=e.proof)&&void 0!==n?n:new Uint8Array,r.proofHeight=void 0!==e.proofHeight&&null!==e.proofHeight?s.Height.fromPartial(e.proofHeight):void 0,r}},t.QueryClientImpl=class{constructor(e){this.rpc=e,this.Connection=this.Connection.bind(this),this.Connections=this.Connections.bind(this),this.ClientConnections=this.ClientConnections.bind(this),this.ConnectionClientState=this.ConnectionClientState.bind(this),this.ConnectionConsensusState=this.ConnectionConsensusState.bind(this)}Connection(e){const n=t.QueryConnectionRequest.encode(e).finish();return this.rpc.request("ibc.core.connection.v1.Query","Connection",n).then((e=>t.QueryConnectionResponse.decode(new i.default.Reader(e))))}Connections(e){const n=t.QueryConnectionsRequest.encode(e).finish();return this.rpc.request("ibc.core.connection.v1.Query","Connections",n).then((e=>t.QueryConnectionsResponse.decode(new i.default.Reader(e))))}ClientConnections(e){const n=t.QueryClientConnectionsRequest.encode(e).finish();return this.rpc.request("ibc.core.connection.v1.Query","ClientConnections",n).then((e=>t.QueryClientConnectionsResponse.decode(new i.default.Reader(e))))}ConnectionClientState(e){const n=t.QueryConnectionClientStateRequest.encode(e).finish();return this.rpc.request("ibc.core.connection.v1.Query","ConnectionClientState",n).then((e=>t.QueryConnectionClientStateResponse.decode(new i.default.Reader(e))))}ConnectionConsensusState(e){const n=t.QueryConnectionConsensusStateRequest.encode(e).finish();return this.rpc.request("ibc.core.connection.v1.Query","ConnectionConsensusState",n).then((e=>t.QueryConnectionConsensusStateResponse.decode(new i.default.Reader(e))))}};var b=(()=>{if(void 0!==b)return b;if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==n.g)return n.g;throw"Unable to locate global object"})();const I=b.atob||(e=>b.Buffer.from(e,"base64").toString("binary"));function C(e){const t=I(e),n=new Uint8Array(t.length);for(let e=0;eb.Buffer.from(e,"binary").toString("base64"));function w(e){const t=[];for(const n of e)t.push(String.fromCharCode(n));return E(t.join(""))}i.default.util.Long!==o.default&&(i.default.util.Long=o.default,i.default.configure())},4848:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.MsgClientImpl=t.MsgConnectionOpenConfirmResponse=t.MsgConnectionOpenConfirm=t.MsgConnectionOpenAckResponse=t.MsgConnectionOpenAck=t.MsgConnectionOpenTryResponse=t.MsgConnectionOpenTry=t.MsgConnectionOpenInitResponse=t.MsgConnectionOpenInit=t.protobufPackage=void 0;const o=r(n(3720)),i=r(n(3789)),a=n(5698),s=n(3862),c=n(5022);t.protobufPackage="ibc.core.connection.v1";const d={clientId:"",delayPeriod:o.default.UZERO,signer:""};t.MsgConnectionOpenInit={encode:(e,t=i.default.Writer.create())=>(""!==e.clientId&&t.uint32(10).string(e.clientId),void 0!==e.counterparty&&a.Counterparty.encode(e.counterparty,t.uint32(18).fork()).ldelim(),void 0!==e.version&&a.Version.encode(e.version,t.uint32(26).fork()).ldelim(),e.delayPeriod.isZero()||t.uint32(32).uint64(e.delayPeriod),""!==e.signer&&t.uint32(42).string(e.signer),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},d);for(;n.pos>>3){case 1:o.clientId=n.string();break;case 2:o.counterparty=a.Counterparty.decode(n,n.uint32());break;case 3:o.version=a.Version.decode(n,n.uint32());break;case 4:o.delayPeriod=n.uint64();break;case 5:o.signer=n.string();break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},d);return t.clientId=void 0!==e.clientId&&null!==e.clientId?String(e.clientId):"",t.counterparty=void 0!==e.counterparty&&null!==e.counterparty?a.Counterparty.fromJSON(e.counterparty):void 0,t.version=void 0!==e.version&&null!==e.version?a.Version.fromJSON(e.version):void 0,t.delayPeriod=void 0!==e.delayPeriod&&null!==e.delayPeriod?o.default.fromString(e.delayPeriod):o.default.UZERO,t.signer=void 0!==e.signer&&null!==e.signer?String(e.signer):"",t},toJSON(e){const t={};return void 0!==e.clientId&&(t.clientId=e.clientId),void 0!==e.counterparty&&(t.counterparty=e.counterparty?a.Counterparty.toJSON(e.counterparty):void 0),void 0!==e.version&&(t.version=e.version?a.Version.toJSON(e.version):void 0),void 0!==e.delayPeriod&&(t.delayPeriod=(e.delayPeriod||o.default.UZERO).toString()),void 0!==e.signer&&(t.signer=e.signer),t},fromPartial(e){var t,n;const r=Object.assign({},d);return r.clientId=null!==(t=e.clientId)&&void 0!==t?t:"",r.counterparty=void 0!==e.counterparty&&null!==e.counterparty?a.Counterparty.fromPartial(e.counterparty):void 0,r.version=void 0!==e.version&&null!==e.version?a.Version.fromPartial(e.version):void 0,r.delayPeriod=void 0!==e.delayPeriod&&null!==e.delayPeriod?o.default.fromValue(e.delayPeriod):o.default.UZERO,r.signer=null!==(n=e.signer)&&void 0!==n?n:"",r}};const u={};t.MsgConnectionOpenInitResponse={encode:(e,t=i.default.Writer.create())=>t,decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},u);for(;n.posObject.assign({},u),toJSON:e=>({}),fromPartial:e=>Object.assign({},u)};const l={clientId:"",previousConnectionId:"",delayPeriod:o.default.UZERO,signer:""};t.MsgConnectionOpenTry={encode(e,t=i.default.Writer.create()){""!==e.clientId&&t.uint32(10).string(e.clientId),""!==e.previousConnectionId&&t.uint32(18).string(e.previousConnectionId),void 0!==e.clientState&&s.Any.encode(e.clientState,t.uint32(26).fork()).ldelim(),void 0!==e.counterparty&&a.Counterparty.encode(e.counterparty,t.uint32(34).fork()).ldelim(),e.delayPeriod.isZero()||t.uint32(40).uint64(e.delayPeriod);for(const n of e.counterpartyVersions)a.Version.encode(n,t.uint32(50).fork()).ldelim();return void 0!==e.proofHeight&&c.Height.encode(e.proofHeight,t.uint32(58).fork()).ldelim(),0!==e.proofInit.length&&t.uint32(66).bytes(e.proofInit),0!==e.proofClient.length&&t.uint32(74).bytes(e.proofClient),0!==e.proofConsensus.length&&t.uint32(82).bytes(e.proofConsensus),void 0!==e.consensusHeight&&c.Height.encode(e.consensusHeight,t.uint32(90).fork()).ldelim(),""!==e.signer&&t.uint32(98).string(e.signer),t},decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},l);for(o.counterpartyVersions=[],o.proofInit=new Uint8Array,o.proofClient=new Uint8Array,o.proofConsensus=new Uint8Array;n.pos>>3){case 1:o.clientId=n.string();break;case 2:o.previousConnectionId=n.string();break;case 3:o.clientState=s.Any.decode(n,n.uint32());break;case 4:o.counterparty=a.Counterparty.decode(n,n.uint32());break;case 5:o.delayPeriod=n.uint64();break;case 6:o.counterpartyVersions.push(a.Version.decode(n,n.uint32()));break;case 7:o.proofHeight=c.Height.decode(n,n.uint32());break;case 8:o.proofInit=n.bytes();break;case 9:o.proofClient=n.bytes();break;case 10:o.proofConsensus=n.bytes();break;case 11:o.consensusHeight=c.Height.decode(n,n.uint32());break;case 12:o.signer=n.string();break;default:n.skipType(7&e)}}return o},fromJSON(e){var t;const n=Object.assign({},l);return n.clientId=void 0!==e.clientId&&null!==e.clientId?String(e.clientId):"",n.previousConnectionId=void 0!==e.previousConnectionId&&null!==e.previousConnectionId?String(e.previousConnectionId):"",n.clientState=void 0!==e.clientState&&null!==e.clientState?s.Any.fromJSON(e.clientState):void 0,n.counterparty=void 0!==e.counterparty&&null!==e.counterparty?a.Counterparty.fromJSON(e.counterparty):void 0,n.delayPeriod=void 0!==e.delayPeriod&&null!==e.delayPeriod?o.default.fromString(e.delayPeriod):o.default.UZERO,n.counterpartyVersions=(null!==(t=e.counterpartyVersions)&&void 0!==t?t:[]).map((e=>a.Version.fromJSON(e))),n.proofHeight=void 0!==e.proofHeight&&null!==e.proofHeight?c.Height.fromJSON(e.proofHeight):void 0,n.proofInit=void 0!==e.proofInit&&null!==e.proofInit?y(e.proofInit):new Uint8Array,n.proofClient=void 0!==e.proofClient&&null!==e.proofClient?y(e.proofClient):new Uint8Array,n.proofConsensus=void 0!==e.proofConsensus&&null!==e.proofConsensus?y(e.proofConsensus):new Uint8Array,n.consensusHeight=void 0!==e.consensusHeight&&null!==e.consensusHeight?c.Height.fromJSON(e.consensusHeight):void 0,n.signer=void 0!==e.signer&&null!==e.signer?String(e.signer):"",n},toJSON(e){const t={};return void 0!==e.clientId&&(t.clientId=e.clientId),void 0!==e.previousConnectionId&&(t.previousConnectionId=e.previousConnectionId),void 0!==e.clientState&&(t.clientState=e.clientState?s.Any.toJSON(e.clientState):void 0),void 0!==e.counterparty&&(t.counterparty=e.counterparty?a.Counterparty.toJSON(e.counterparty):void 0),void 0!==e.delayPeriod&&(t.delayPeriod=(e.delayPeriod||o.default.UZERO).toString()),e.counterpartyVersions?t.counterpartyVersions=e.counterpartyVersions.map((e=>e?a.Version.toJSON(e):void 0)):t.counterpartyVersions=[],void 0!==e.proofHeight&&(t.proofHeight=e.proofHeight?c.Height.toJSON(e.proofHeight):void 0),void 0!==e.proofInit&&(t.proofInit=I(void 0!==e.proofInit?e.proofInit:new Uint8Array)),void 0!==e.proofClient&&(t.proofClient=I(void 0!==e.proofClient?e.proofClient:new Uint8Array)),void 0!==e.proofConsensus&&(t.proofConsensus=I(void 0!==e.proofConsensus?e.proofConsensus:new Uint8Array)),void 0!==e.consensusHeight&&(t.consensusHeight=e.consensusHeight?c.Height.toJSON(e.consensusHeight):void 0),void 0!==e.signer&&(t.signer=e.signer),t},fromPartial(e){var t,n,r,i,d,u,A;const f=Object.assign({},l);return f.clientId=null!==(t=e.clientId)&&void 0!==t?t:"",f.previousConnectionId=null!==(n=e.previousConnectionId)&&void 0!==n?n:"",f.clientState=void 0!==e.clientState&&null!==e.clientState?s.Any.fromPartial(e.clientState):void 0,f.counterparty=void 0!==e.counterparty&&null!==e.counterparty?a.Counterparty.fromPartial(e.counterparty):void 0,f.delayPeriod=void 0!==e.delayPeriod&&null!==e.delayPeriod?o.default.fromValue(e.delayPeriod):o.default.UZERO,f.counterpartyVersions=(null===(r=e.counterpartyVersions)||void 0===r?void 0:r.map((e=>a.Version.fromPartial(e))))||[],f.proofHeight=void 0!==e.proofHeight&&null!==e.proofHeight?c.Height.fromPartial(e.proofHeight):void 0,f.proofInit=null!==(i=e.proofInit)&&void 0!==i?i:new Uint8Array,f.proofClient=null!==(d=e.proofClient)&&void 0!==d?d:new Uint8Array,f.proofConsensus=null!==(u=e.proofConsensus)&&void 0!==u?u:new Uint8Array,f.consensusHeight=void 0!==e.consensusHeight&&null!==e.consensusHeight?c.Height.fromPartial(e.consensusHeight):void 0,f.signer=null!==(A=e.signer)&&void 0!==A?A:"",f}};const A={};t.MsgConnectionOpenTryResponse={encode:(e,t=i.default.Writer.create())=>t,decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},A);for(;n.posObject.assign({},A),toJSON:e=>({}),fromPartial:e=>Object.assign({},A)};const f={connectionId:"",counterpartyConnectionId:"",signer:""};t.MsgConnectionOpenAck={encode:(e,t=i.default.Writer.create())=>(""!==e.connectionId&&t.uint32(10).string(e.connectionId),""!==e.counterpartyConnectionId&&t.uint32(18).string(e.counterpartyConnectionId),void 0!==e.version&&a.Version.encode(e.version,t.uint32(26).fork()).ldelim(),void 0!==e.clientState&&s.Any.encode(e.clientState,t.uint32(34).fork()).ldelim(),void 0!==e.proofHeight&&c.Height.encode(e.proofHeight,t.uint32(42).fork()).ldelim(),0!==e.proofTry.length&&t.uint32(50).bytes(e.proofTry),0!==e.proofClient.length&&t.uint32(58).bytes(e.proofClient),0!==e.proofConsensus.length&&t.uint32(66).bytes(e.proofConsensus),void 0!==e.consensusHeight&&c.Height.encode(e.consensusHeight,t.uint32(74).fork()).ldelim(),""!==e.signer&&t.uint32(82).string(e.signer),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},f);for(o.proofTry=new Uint8Array,o.proofClient=new Uint8Array,o.proofConsensus=new Uint8Array;n.pos>>3){case 1:o.connectionId=n.string();break;case 2:o.counterpartyConnectionId=n.string();break;case 3:o.version=a.Version.decode(n,n.uint32());break;case 4:o.clientState=s.Any.decode(n,n.uint32());break;case 5:o.proofHeight=c.Height.decode(n,n.uint32());break;case 6:o.proofTry=n.bytes();break;case 7:o.proofClient=n.bytes();break;case 8:o.proofConsensus=n.bytes();break;case 9:o.consensusHeight=c.Height.decode(n,n.uint32());break;case 10:o.signer=n.string();break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},f);return t.connectionId=void 0!==e.connectionId&&null!==e.connectionId?String(e.connectionId):"",t.counterpartyConnectionId=void 0!==e.counterpartyConnectionId&&null!==e.counterpartyConnectionId?String(e.counterpartyConnectionId):"",t.version=void 0!==e.version&&null!==e.version?a.Version.fromJSON(e.version):void 0,t.clientState=void 0!==e.clientState&&null!==e.clientState?s.Any.fromJSON(e.clientState):void 0,t.proofHeight=void 0!==e.proofHeight&&null!==e.proofHeight?c.Height.fromJSON(e.proofHeight):void 0,t.proofTry=void 0!==e.proofTry&&null!==e.proofTry?y(e.proofTry):new Uint8Array,t.proofClient=void 0!==e.proofClient&&null!==e.proofClient?y(e.proofClient):new Uint8Array,t.proofConsensus=void 0!==e.proofConsensus&&null!==e.proofConsensus?y(e.proofConsensus):new Uint8Array,t.consensusHeight=void 0!==e.consensusHeight&&null!==e.consensusHeight?c.Height.fromJSON(e.consensusHeight):void 0,t.signer=void 0!==e.signer&&null!==e.signer?String(e.signer):"",t},toJSON(e){const t={};return void 0!==e.connectionId&&(t.connectionId=e.connectionId),void 0!==e.counterpartyConnectionId&&(t.counterpartyConnectionId=e.counterpartyConnectionId),void 0!==e.version&&(t.version=e.version?a.Version.toJSON(e.version):void 0),void 0!==e.clientState&&(t.clientState=e.clientState?s.Any.toJSON(e.clientState):void 0),void 0!==e.proofHeight&&(t.proofHeight=e.proofHeight?c.Height.toJSON(e.proofHeight):void 0),void 0!==e.proofTry&&(t.proofTry=I(void 0!==e.proofTry?e.proofTry:new Uint8Array)),void 0!==e.proofClient&&(t.proofClient=I(void 0!==e.proofClient?e.proofClient:new Uint8Array)),void 0!==e.proofConsensus&&(t.proofConsensus=I(void 0!==e.proofConsensus?e.proofConsensus:new Uint8Array)),void 0!==e.consensusHeight&&(t.consensusHeight=e.consensusHeight?c.Height.toJSON(e.consensusHeight):void 0),void 0!==e.signer&&(t.signer=e.signer),t},fromPartial(e){var t,n,r,o,i,d;const u=Object.assign({},f);return u.connectionId=null!==(t=e.connectionId)&&void 0!==t?t:"",u.counterpartyConnectionId=null!==(n=e.counterpartyConnectionId)&&void 0!==n?n:"",u.version=void 0!==e.version&&null!==e.version?a.Version.fromPartial(e.version):void 0,u.clientState=void 0!==e.clientState&&null!==e.clientState?s.Any.fromPartial(e.clientState):void 0,u.proofHeight=void 0!==e.proofHeight&&null!==e.proofHeight?c.Height.fromPartial(e.proofHeight):void 0,u.proofTry=null!==(r=e.proofTry)&&void 0!==r?r:new Uint8Array,u.proofClient=null!==(o=e.proofClient)&&void 0!==o?o:new Uint8Array,u.proofConsensus=null!==(i=e.proofConsensus)&&void 0!==i?i:new Uint8Array,u.consensusHeight=void 0!==e.consensusHeight&&null!==e.consensusHeight?c.Height.fromPartial(e.consensusHeight):void 0,u.signer=null!==(d=e.signer)&&void 0!==d?d:"",u}};const h={};t.MsgConnectionOpenAckResponse={encode:(e,t=i.default.Writer.create())=>t,decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},h);for(;n.posObject.assign({},h),toJSON:e=>({}),fromPartial:e=>Object.assign({},h)};const g={connectionId:"",signer:""};t.MsgConnectionOpenConfirm={encode:(e,t=i.default.Writer.create())=>(""!==e.connectionId&&t.uint32(10).string(e.connectionId),0!==e.proofAck.length&&t.uint32(18).bytes(e.proofAck),void 0!==e.proofHeight&&c.Height.encode(e.proofHeight,t.uint32(26).fork()).ldelim(),""!==e.signer&&t.uint32(34).string(e.signer),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},g);for(o.proofAck=new Uint8Array;n.pos>>3){case 1:o.connectionId=n.string();break;case 2:o.proofAck=n.bytes();break;case 3:o.proofHeight=c.Height.decode(n,n.uint32());break;case 4:o.signer=n.string();break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},g);return t.connectionId=void 0!==e.connectionId&&null!==e.connectionId?String(e.connectionId):"",t.proofAck=void 0!==e.proofAck&&null!==e.proofAck?y(e.proofAck):new Uint8Array,t.proofHeight=void 0!==e.proofHeight&&null!==e.proofHeight?c.Height.fromJSON(e.proofHeight):void 0,t.signer=void 0!==e.signer&&null!==e.signer?String(e.signer):"",t},toJSON(e){const t={};return void 0!==e.connectionId&&(t.connectionId=e.connectionId),void 0!==e.proofAck&&(t.proofAck=I(void 0!==e.proofAck?e.proofAck:new Uint8Array)),void 0!==e.proofHeight&&(t.proofHeight=e.proofHeight?c.Height.toJSON(e.proofHeight):void 0),void 0!==e.signer&&(t.signer=e.signer),t},fromPartial(e){var t,n,r;const o=Object.assign({},g);return o.connectionId=null!==(t=e.connectionId)&&void 0!==t?t:"",o.proofAck=null!==(n=e.proofAck)&&void 0!==n?n:new Uint8Array,o.proofHeight=void 0!==e.proofHeight&&null!==e.proofHeight?c.Height.fromPartial(e.proofHeight):void 0,o.signer=null!==(r=e.signer)&&void 0!==r?r:"",o}};const p={};t.MsgConnectionOpenConfirmResponse={encode:(e,t=i.default.Writer.create())=>t,decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},p);for(;n.posObject.assign({},p),toJSON:e=>({}),fromPartial:e=>Object.assign({},p)},t.MsgClientImpl=class{constructor(e){this.rpc=e,this.ConnectionOpenInit=this.ConnectionOpenInit.bind(this),this.ConnectionOpenTry=this.ConnectionOpenTry.bind(this),this.ConnectionOpenAck=this.ConnectionOpenAck.bind(this),this.ConnectionOpenConfirm=this.ConnectionOpenConfirm.bind(this)}ConnectionOpenInit(e){const n=t.MsgConnectionOpenInit.encode(e).finish();return this.rpc.request("ibc.core.connection.v1.Msg","ConnectionOpenInit",n).then((e=>t.MsgConnectionOpenInitResponse.decode(new i.default.Reader(e))))}ConnectionOpenTry(e){const n=t.MsgConnectionOpenTry.encode(e).finish();return this.rpc.request("ibc.core.connection.v1.Msg","ConnectionOpenTry",n).then((e=>t.MsgConnectionOpenTryResponse.decode(new i.default.Reader(e))))}ConnectionOpenAck(e){const n=t.MsgConnectionOpenAck.encode(e).finish();return this.rpc.request("ibc.core.connection.v1.Msg","ConnectionOpenAck",n).then((e=>t.MsgConnectionOpenAckResponse.decode(new i.default.Reader(e))))}ConnectionOpenConfirm(e){const n=t.MsgConnectionOpenConfirm.encode(e).finish();return this.rpc.request("ibc.core.connection.v1.Msg","ConnectionOpenConfirm",n).then((e=>t.MsgConnectionOpenConfirmResponse.decode(new i.default.Reader(e))))}};var m=(()=>{if(void 0!==m)return m;if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==n.g)return n.g;throw"Unable to locate global object"})();const v=m.atob||(e=>m.Buffer.from(e,"base64").toString("binary"));function y(e){const t=v(e),n=new Uint8Array(t.length);for(let e=0;em.Buffer.from(e,"binary").toString("base64"));function I(e){const t=[];for(const n of e)t.push(String.fromCharCode(n));return b(t.join(""))}i.default.util.Long!==o.default&&(i.default.util.Long=o.default,i.default.configure())},1234:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Fraction=t.Header=t.Misbehaviour=t.ConsensusState=t.ClientState=t.protobufPackage=void 0;const o=r(n(3720)),i=r(n(3789)),a=n(281),s=n(5022),c=n(5522),d=n(228),u=n(1258),l=n(3444),A=n(2912);t.protobufPackage="ibc.lightclients.tendermint.v1";const f={chainId:"",upgradePath:"",allowUpdateAfterExpiry:!1,allowUpdateAfterMisbehaviour:!1};t.ClientState={encode(e,n=i.default.Writer.create()){""!==e.chainId&&n.uint32(10).string(e.chainId),void 0!==e.trustLevel&&t.Fraction.encode(e.trustLevel,n.uint32(18).fork()).ldelim(),void 0!==e.trustingPeriod&&a.Duration.encode(e.trustingPeriod,n.uint32(26).fork()).ldelim(),void 0!==e.unbondingPeriod&&a.Duration.encode(e.unbondingPeriod,n.uint32(34).fork()).ldelim(),void 0!==e.maxClockDrift&&a.Duration.encode(e.maxClockDrift,n.uint32(42).fork()).ldelim(),void 0!==e.frozenHeight&&s.Height.encode(e.frozenHeight,n.uint32(50).fork()).ldelim(),void 0!==e.latestHeight&&s.Height.encode(e.latestHeight,n.uint32(58).fork()).ldelim();for(const t of e.proofSpecs)A.ProofSpec.encode(t,n.uint32(66).fork()).ldelim();for(const t of e.upgradePath)n.uint32(74).string(t);return!0===e.allowUpdateAfterExpiry&&n.uint32(80).bool(e.allowUpdateAfterExpiry),!0===e.allowUpdateAfterMisbehaviour&&n.uint32(88).bool(e.allowUpdateAfterMisbehaviour),n},decode(e,n){const r=e instanceof i.default.Reader?e:new i.default.Reader(e);let o=void 0===n?r.len:r.pos+n;const c=Object.assign({},f);for(c.proofSpecs=[],c.upgradePath=[];r.pos>>3){case 1:c.chainId=r.string();break;case 2:c.trustLevel=t.Fraction.decode(r,r.uint32());break;case 3:c.trustingPeriod=a.Duration.decode(r,r.uint32());break;case 4:c.unbondingPeriod=a.Duration.decode(r,r.uint32());break;case 5:c.maxClockDrift=a.Duration.decode(r,r.uint32());break;case 6:c.frozenHeight=s.Height.decode(r,r.uint32());break;case 7:c.latestHeight=s.Height.decode(r,r.uint32());break;case 8:c.proofSpecs.push(A.ProofSpec.decode(r,r.uint32()));break;case 9:c.upgradePath.push(r.string());break;case 10:c.allowUpdateAfterExpiry=r.bool();break;case 11:c.allowUpdateAfterMisbehaviour=r.bool();break;default:r.skipType(7&e)}}return c},fromJSON(e){var n,r;const o=Object.assign({},f);return o.chainId=void 0!==e.chainId&&null!==e.chainId?String(e.chainId):"",o.trustLevel=void 0!==e.trustLevel&&null!==e.trustLevel?t.Fraction.fromJSON(e.trustLevel):void 0,o.trustingPeriod=void 0!==e.trustingPeriod&&null!==e.trustingPeriod?a.Duration.fromJSON(e.trustingPeriod):void 0,o.unbondingPeriod=void 0!==e.unbondingPeriod&&null!==e.unbondingPeriod?a.Duration.fromJSON(e.unbondingPeriod):void 0,o.maxClockDrift=void 0!==e.maxClockDrift&&null!==e.maxClockDrift?a.Duration.fromJSON(e.maxClockDrift):void 0,o.frozenHeight=void 0!==e.frozenHeight&&null!==e.frozenHeight?s.Height.fromJSON(e.frozenHeight):void 0,o.latestHeight=void 0!==e.latestHeight&&null!==e.latestHeight?s.Height.fromJSON(e.latestHeight):void 0,o.proofSpecs=(null!==(n=e.proofSpecs)&&void 0!==n?n:[]).map((e=>A.ProofSpec.fromJSON(e))),o.upgradePath=(null!==(r=e.upgradePath)&&void 0!==r?r:[]).map((e=>String(e))),o.allowUpdateAfterExpiry=void 0!==e.allowUpdateAfterExpiry&&null!==e.allowUpdateAfterExpiry&&Boolean(e.allowUpdateAfterExpiry),o.allowUpdateAfterMisbehaviour=void 0!==e.allowUpdateAfterMisbehaviour&&null!==e.allowUpdateAfterMisbehaviour&&Boolean(e.allowUpdateAfterMisbehaviour),o},toJSON(e){const n={};return void 0!==e.chainId&&(n.chainId=e.chainId),void 0!==e.trustLevel&&(n.trustLevel=e.trustLevel?t.Fraction.toJSON(e.trustLevel):void 0),void 0!==e.trustingPeriod&&(n.trustingPeriod=e.trustingPeriod?a.Duration.toJSON(e.trustingPeriod):void 0),void 0!==e.unbondingPeriod&&(n.unbondingPeriod=e.unbondingPeriod?a.Duration.toJSON(e.unbondingPeriod):void 0),void 0!==e.maxClockDrift&&(n.maxClockDrift=e.maxClockDrift?a.Duration.toJSON(e.maxClockDrift):void 0),void 0!==e.frozenHeight&&(n.frozenHeight=e.frozenHeight?s.Height.toJSON(e.frozenHeight):void 0),void 0!==e.latestHeight&&(n.latestHeight=e.latestHeight?s.Height.toJSON(e.latestHeight):void 0),e.proofSpecs?n.proofSpecs=e.proofSpecs.map((e=>e?A.ProofSpec.toJSON(e):void 0)):n.proofSpecs=[],e.upgradePath?n.upgradePath=e.upgradePath.map((e=>e)):n.upgradePath=[],void 0!==e.allowUpdateAfterExpiry&&(n.allowUpdateAfterExpiry=e.allowUpdateAfterExpiry),void 0!==e.allowUpdateAfterMisbehaviour&&(n.allowUpdateAfterMisbehaviour=e.allowUpdateAfterMisbehaviour),n},fromPartial(e){var n,r,o,i,c;const d=Object.assign({},f);return d.chainId=null!==(n=e.chainId)&&void 0!==n?n:"",d.trustLevel=void 0!==e.trustLevel&&null!==e.trustLevel?t.Fraction.fromPartial(e.trustLevel):void 0,d.trustingPeriod=void 0!==e.trustingPeriod&&null!==e.trustingPeriod?a.Duration.fromPartial(e.trustingPeriod):void 0,d.unbondingPeriod=void 0!==e.unbondingPeriod&&null!==e.unbondingPeriod?a.Duration.fromPartial(e.unbondingPeriod):void 0,d.maxClockDrift=void 0!==e.maxClockDrift&&null!==e.maxClockDrift?a.Duration.fromPartial(e.maxClockDrift):void 0,d.frozenHeight=void 0!==e.frozenHeight&&null!==e.frozenHeight?s.Height.fromPartial(e.frozenHeight):void 0,d.latestHeight=void 0!==e.latestHeight&&null!==e.latestHeight?s.Height.fromPartial(e.latestHeight):void 0,d.proofSpecs=(null===(r=e.proofSpecs)||void 0===r?void 0:r.map((e=>A.ProofSpec.fromPartial(e))))||[],d.upgradePath=(null===(o=e.upgradePath)||void 0===o?void 0:o.map((e=>e)))||[],d.allowUpdateAfterExpiry=null!==(i=e.allowUpdateAfterExpiry)&&void 0!==i&&i,d.allowUpdateAfterMisbehaviour=null!==(c=e.allowUpdateAfterMisbehaviour)&&void 0!==c&&c,d}};const h={};t.ConsensusState={encode:(e,t=i.default.Writer.create())=>(void 0!==e.timestamp&&c.Timestamp.encode(e.timestamp,t.uint32(10).fork()).ldelim(),void 0!==e.root&&d.MerkleRoot.encode(e.root,t.uint32(18).fork()).ldelim(),0!==e.nextValidatorsHash.length&&t.uint32(26).bytes(e.nextValidatorsHash),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},h);for(o.nextValidatorsHash=new Uint8Array;n.pos>>3){case 1:o.timestamp=c.Timestamp.decode(n,n.uint32());break;case 2:o.root=d.MerkleRoot.decode(n,n.uint32());break;case 3:o.nextValidatorsHash=n.bytes();break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},h);var n;return t.timestamp=void 0!==e.timestamp&&null!==e.timestamp?(n=e.timestamp)instanceof Date?I(n):"string"==typeof n?I(new Date(n)):c.Timestamp.fromJSON(n):void 0,t.root=void 0!==e.root&&null!==e.root?d.MerkleRoot.fromJSON(e.root):void 0,t.nextValidatorsHash=void 0!==e.nextValidatorsHash&&null!==e.nextValidatorsHash?function(e){const t=y(e),n=new Uint8Array(t.length);for(let e=0;e(""!==e.clientId&&n.uint32(10).string(e.clientId),void 0!==e.header1&&t.Header.encode(e.header1,n.uint32(18).fork()).ldelim(),void 0!==e.header2&&t.Header.encode(e.header2,n.uint32(26).fork()).ldelim(),n),decode(e,n){const r=e instanceof i.default.Reader?e:new i.default.Reader(e);let o=void 0===n?r.len:r.pos+n;const a=Object.assign({},g);for(;r.pos>>3){case 1:a.clientId=r.string();break;case 2:a.header1=t.Header.decode(r,r.uint32());break;case 3:a.header2=t.Header.decode(r,r.uint32());break;default:r.skipType(7&e)}}return a},fromJSON(e){const n=Object.assign({},g);return n.clientId=void 0!==e.clientId&&null!==e.clientId?String(e.clientId):"",n.header1=void 0!==e.header1&&null!==e.header1?t.Header.fromJSON(e.header1):void 0,n.header2=void 0!==e.header2&&null!==e.header2?t.Header.fromJSON(e.header2):void 0,n},toJSON(e){const n={};return void 0!==e.clientId&&(n.clientId=e.clientId),void 0!==e.header1&&(n.header1=e.header1?t.Header.toJSON(e.header1):void 0),void 0!==e.header2&&(n.header2=e.header2?t.Header.toJSON(e.header2):void 0),n},fromPartial(e){var n;const r=Object.assign({},g);return r.clientId=null!==(n=e.clientId)&&void 0!==n?n:"",r.header1=void 0!==e.header1&&null!==e.header1?t.Header.fromPartial(e.header1):void 0,r.header2=void 0!==e.header2&&null!==e.header2?t.Header.fromPartial(e.header2):void 0,r}};const p={};t.Header={encode:(e,t=i.default.Writer.create())=>(void 0!==e.signedHeader&&u.SignedHeader.encode(e.signedHeader,t.uint32(10).fork()).ldelim(),void 0!==e.validatorSet&&l.ValidatorSet.encode(e.validatorSet,t.uint32(18).fork()).ldelim(),void 0!==e.trustedHeight&&s.Height.encode(e.trustedHeight,t.uint32(26).fork()).ldelim(),void 0!==e.trustedValidators&&l.ValidatorSet.encode(e.trustedValidators,t.uint32(34).fork()).ldelim(),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},p);for(;n.pos>>3){case 1:o.signedHeader=u.SignedHeader.decode(n,n.uint32());break;case 2:o.validatorSet=l.ValidatorSet.decode(n,n.uint32());break;case 3:o.trustedHeight=s.Height.decode(n,n.uint32());break;case 4:o.trustedValidators=l.ValidatorSet.decode(n,n.uint32());break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},p);return t.signedHeader=void 0!==e.signedHeader&&null!==e.signedHeader?u.SignedHeader.fromJSON(e.signedHeader):void 0,t.validatorSet=void 0!==e.validatorSet&&null!==e.validatorSet?l.ValidatorSet.fromJSON(e.validatorSet):void 0,t.trustedHeight=void 0!==e.trustedHeight&&null!==e.trustedHeight?s.Height.fromJSON(e.trustedHeight):void 0,t.trustedValidators=void 0!==e.trustedValidators&&null!==e.trustedValidators?l.ValidatorSet.fromJSON(e.trustedValidators):void 0,t},toJSON(e){const t={};return void 0!==e.signedHeader&&(t.signedHeader=e.signedHeader?u.SignedHeader.toJSON(e.signedHeader):void 0),void 0!==e.validatorSet&&(t.validatorSet=e.validatorSet?l.ValidatorSet.toJSON(e.validatorSet):void 0),void 0!==e.trustedHeight&&(t.trustedHeight=e.trustedHeight?s.Height.toJSON(e.trustedHeight):void 0),void 0!==e.trustedValidators&&(t.trustedValidators=e.trustedValidators?l.ValidatorSet.toJSON(e.trustedValidators):void 0),t},fromPartial(e){const t=Object.assign({},p);return t.signedHeader=void 0!==e.signedHeader&&null!==e.signedHeader?u.SignedHeader.fromPartial(e.signedHeader):void 0,t.validatorSet=void 0!==e.validatorSet&&null!==e.validatorSet?l.ValidatorSet.fromPartial(e.validatorSet):void 0,t.trustedHeight=void 0!==e.trustedHeight&&null!==e.trustedHeight?s.Height.fromPartial(e.trustedHeight):void 0,t.trustedValidators=void 0!==e.trustedValidators&&null!==e.trustedValidators?l.ValidatorSet.fromPartial(e.trustedValidators):void 0,t}};const m={numerator:o.default.UZERO,denominator:o.default.UZERO};t.Fraction={encode:(e,t=i.default.Writer.create())=>(e.numerator.isZero()||t.uint32(8).uint64(e.numerator),e.denominator.isZero()||t.uint32(16).uint64(e.denominator),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},m);for(;n.pos>>3){case 1:o.numerator=n.uint64();break;case 2:o.denominator=n.uint64();break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},m);return t.numerator=void 0!==e.numerator&&null!==e.numerator?o.default.fromString(e.numerator):o.default.UZERO,t.denominator=void 0!==e.denominator&&null!==e.denominator?o.default.fromString(e.denominator):o.default.UZERO,t},toJSON(e){const t={};return void 0!==e.numerator&&(t.numerator=(e.numerator||o.default.UZERO).toString()),void 0!==e.denominator&&(t.denominator=(e.denominator||o.default.UZERO).toString()),t},fromPartial(e){const t=Object.assign({},m);return t.numerator=void 0!==e.numerator&&null!==e.numerator?o.default.fromValue(e.numerator):o.default.UZERO,t.denominator=void 0!==e.denominator&&null!==e.denominator?o.default.fromValue(e.denominator):o.default.UZERO,t}};var v=(()=>{if(void 0!==v)return v;if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==n.g)return n.g;throw"Unable to locate global object"})();const y=v.atob||(e=>v.Buffer.from(e,"base64").toString("binary")),b=v.btoa||(e=>v.Buffer.from(e,"binary").toString("base64"));function I(e){var t;return{seconds:(t=e.getTime()/1e3,o.default.fromNumber(t)),nanos:e.getTime()%1e3*1e6}}i.default.util.Long!==o.default&&(i.default.util.Long=o.default,i.default.configure())},3789:(e,t,n)=>{"use strict";e.exports=n(9570)},9570:(e,t,n)=>{"use strict";var r=t;function o(){r.util._configure(),r.Writer._configure(r.BufferWriter),r.Reader._configure(r.BufferReader)}r.build="minimal",r.Writer=n(5683),r.BufferWriter=n(8128),r.Reader=n(8489),r.BufferReader=n(1292),r.util=n(2554),r.rpc=n(7622),r.roots=n(6474),r.configure=o,o()},8489:(e,t,n)=>{"use strict";e.exports=c;var r,o=n(2554),i=o.LongBits,a=o.utf8;function s(e,t){return RangeError("index out of range: "+e.pos+" + "+(t||1)+" > "+e.len)}function c(e){this.buf=e,this.pos=0,this.len=e.length}var d,u="undefined"!=typeof Uint8Array?function(e){if(e instanceof Uint8Array||Array.isArray(e))return new c(e);throw Error("illegal buffer")}:function(e){if(Array.isArray(e))return new c(e);throw Error("illegal buffer")},l=function(){return o.Buffer?function(e){return(c.create=function(e){return o.Buffer.isBuffer(e)?new r(e):u(e)})(e)}:u};function A(){var e=new i(0,0),t=0;if(!(this.len-this.pos>4)){for(;t<3;++t){if(this.pos>=this.len)throw s(this);if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e}return e.lo=(e.lo|(127&this.buf[this.pos++])<<7*t)>>>0,e}for(;t<4;++t)if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e;if(e.lo=(e.lo|(127&this.buf[this.pos])<<28)>>>0,e.hi=(e.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return e;if(t=0,this.len-this.pos>4){for(;t<5;++t)if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}else for(;t<5;++t){if(this.pos>=this.len)throw s(this);if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}throw Error("invalid varint encoding")}function f(e,t){return(e[t-4]|e[t-3]<<8|e[t-2]<<16|e[t-1]<<24)>>>0}function h(){if(this.pos+8>this.len)throw s(this,8);return new i(f(this.buf,this.pos+=4),f(this.buf,this.pos+=4))}c.create=l(),c.prototype._slice=o.Array.prototype.subarray||o.Array.prototype.slice,c.prototype.uint32=(d=4294967295,function(){if(d=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128)return d;if(d=(d|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128)return d;if(d=(d|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128)return d;if(d=(d|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128)return d;if(d=(d|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128)return d;if((this.pos+=5)>this.len)throw this.pos=this.len,s(this,10);return d}),c.prototype.int32=function(){return 0|this.uint32()},c.prototype.sint32=function(){var e=this.uint32();return e>>>1^-(1&e)|0},c.prototype.bool=function(){return 0!==this.uint32()},c.prototype.fixed32=function(){if(this.pos+4>this.len)throw s(this,4);return f(this.buf,this.pos+=4)},c.prototype.sfixed32=function(){if(this.pos+4>this.len)throw s(this,4);return 0|f(this.buf,this.pos+=4)},c.prototype.float=function(){if(this.pos+4>this.len)throw s(this,4);var e=o.float.readFloatLE(this.buf,this.pos);return this.pos+=4,e},c.prototype.double=function(){if(this.pos+8>this.len)throw s(this,4);var e=o.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,e},c.prototype.bytes=function(){var e=this.uint32(),t=this.pos,n=this.pos+e;if(n>this.len)throw s(this,e);return this.pos+=e,Array.isArray(this.buf)?this.buf.slice(t,n):t===n?new this.buf.constructor(0):this._slice.call(this.buf,t,n)},c.prototype.string=function(){var e=this.bytes();return a.read(e,0,e.length)},c.prototype.skip=function(e){if("number"==typeof e){if(this.pos+e>this.len)throw s(this,e);this.pos+=e}else do{if(this.pos>=this.len)throw s(this)}while(128&this.buf[this.pos++]);return this},c.prototype.skipType=function(e){switch(e){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;4!=(e=7&this.uint32());)this.skipType(e);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+e+" at offset "+this.pos)}return this},c._configure=function(e){r=e,c.create=l(),r._configure();var t=o.Long?"toLong":"toNumber";o.merge(c.prototype,{int64:function(){return A.call(this)[t](!1)},uint64:function(){return A.call(this)[t](!0)},sint64:function(){return A.call(this).zzDecode()[t](!1)},fixed64:function(){return h.call(this)[t](!0)},sfixed64:function(){return h.call(this)[t](!1)}})}},1292:(e,t,n)=>{"use strict";e.exports=i;var r=n(8489);(i.prototype=Object.create(r.prototype)).constructor=i;var o=n(2554);function i(e){r.call(this,e)}i._configure=function(){o.Buffer&&(i.prototype._slice=o.Buffer.prototype.slice)},i.prototype.string=function(){var e=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+e,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+e,this.len))},i._configure()},6474:e=>{"use strict";e.exports={}},7622:(e,t,n)=>{"use strict";t.Service=n(336)},336:(e,t,n)=>{"use strict";e.exports=o;var r=n(2554);function o(e,t,n){if("function"!=typeof e)throw TypeError("rpcImpl must be a function");r.EventEmitter.call(this),this.rpcImpl=e,this.requestDelimited=Boolean(t),this.responseDelimited=Boolean(n)}(o.prototype=Object.create(r.EventEmitter.prototype)).constructor=o,o.prototype.rpcCall=function e(t,n,o,i,a){if(!i)throw TypeError("request must be specified");var s=this;if(!a)return r.asPromise(e,s,t,n,o,i);if(s.rpcImpl)try{return s.rpcImpl(t,n[s.requestDelimited?"encodeDelimited":"encode"](i).finish(),(function(e,n){if(e)return s.emit("error",e,t),a(e);if(null!==n){if(!(n instanceof o))try{n=o[s.responseDelimited?"decodeDelimited":"decode"](n)}catch(e){return s.emit("error",e,t),a(e)}return s.emit("data",n,t),a(null,n)}s.end(!0)}))}catch(e){return s.emit("error",e,t),void setTimeout((function(){a(e)}),0)}else setTimeout((function(){a(Error("already ended"))}),0)},o.prototype.end=function(e){return this.rpcImpl&&(e||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}},8227:(e,t,n)=>{"use strict";e.exports=o;var r=n(2554);function o(e,t){this.lo=e>>>0,this.hi=t>>>0}var i=o.zero=new o(0,0);i.toNumber=function(){return 0},i.zzEncode=i.zzDecode=function(){return this},i.length=function(){return 1};var a=o.zeroHash="\0\0\0\0\0\0\0\0";o.fromNumber=function(e){if(0===e)return i;var t=e<0;t&&(e=-e);var n=e>>>0,r=(e-n)/4294967296>>>0;return t&&(r=~r>>>0,n=~n>>>0,++n>4294967295&&(n=0,++r>4294967295&&(r=0))),new o(n,r)},o.from=function(e){if("number"==typeof e)return o.fromNumber(e);if(r.isString(e)){if(!r.Long)return o.fromNumber(parseInt(e,10));e=r.Long.fromString(e)}return e.low||e.high?new o(e.low>>>0,e.high>>>0):i},o.prototype.toNumber=function(e){if(!e&&this.hi>>>31){var t=1+~this.lo>>>0,n=~this.hi>>>0;return t||(n=n+1>>>0),-(t+4294967296*n)}return this.lo+4294967296*this.hi},o.prototype.toLong=function(e){return r.Long?new r.Long(0|this.lo,0|this.hi,Boolean(e)):{low:0|this.lo,high:0|this.hi,unsigned:Boolean(e)}};var s=String.prototype.charCodeAt;o.fromHash=function(e){return e===a?i:new o((s.call(e,0)|s.call(e,1)<<8|s.call(e,2)<<16|s.call(e,3)<<24)>>>0,(s.call(e,4)|s.call(e,5)<<8|s.call(e,6)<<16|s.call(e,7)<<24)>>>0)},o.prototype.toHash=function(){return String.fromCharCode(255&this.lo,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,255&this.hi,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},o.prototype.zzEncode=function(){var e=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^e)>>>0,this.lo=(this.lo<<1^e)>>>0,this},o.prototype.zzDecode=function(){var e=-(1&this.lo);return this.lo=((this.lo>>>1|this.hi<<31)^e)>>>0,this.hi=(this.hi>>>1^e)>>>0,this},o.prototype.length=function(){var e=this.lo,t=(this.lo>>>28|this.hi<<4)>>>0,n=this.hi>>>24;return 0===n?0===t?e<16384?e<128?1:2:e<2097152?3:4:t<16384?t<128?5:6:t<2097152?7:8:n<128?9:10}},2554:function(e,t,n){"use strict";var r=t;function o(e,t,n){for(var r=Object.keys(t),o=0;o0)},r.Buffer=function(){try{var e=r.inquire("buffer").Buffer;return e.prototype.utf8Write?e:null}catch(e){return null}}(),r._Buffer_from=null,r._Buffer_allocUnsafe=null,r.newBuffer=function(e){return"number"==typeof e?r.Buffer?r._Buffer_allocUnsafe(e):new r.Array(e):r.Buffer?r._Buffer_from(e):"undefined"==typeof Uint8Array?e:new Uint8Array(e)},r.Array="undefined"!=typeof Uint8Array?Uint8Array:Array,r.Long=r.global.dcodeIO&&r.global.dcodeIO.Long||r.global.Long||r.inquire("long"),r.key2Re=/^true|false|0|1$/,r.key32Re=/^-?(?:0|[1-9][0-9]*)$/,r.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/,r.longToHash=function(e){return e?r.LongBits.from(e).toHash():r.LongBits.zeroHash},r.longFromHash=function(e,t){var n=r.LongBits.fromHash(e);return r.Long?r.Long.fromBits(n.lo,n.hi,t):n.toNumber(Boolean(t))},r.merge=o,r.lcFirst=function(e){return e.charAt(0).toLowerCase()+e.substring(1)},r.newError=i,r.ProtocolError=i("ProtocolError"),r.oneOfGetter=function(e){for(var t={},n=0;n-1;--n)if(1===t[e[n]]&&void 0!==this[e[n]]&&null!==this[e[n]])return e[n]}},r.oneOfSetter=function(e){return function(t){for(var n=0;n{"use strict";e.exports=l;var r,o=n(2554),i=o.LongBits,a=o.base64,s=o.utf8;function c(e,t,n){this.fn=e,this.len=t,this.next=void 0,this.val=n}function d(){}function u(e){this.head=e.head,this.tail=e.tail,this.len=e.len,this.next=e.states}function l(){this.len=0,this.head=new c(d,0,0),this.tail=this.head,this.states=null}var A=function(){return o.Buffer?function(){return(l.create=function(){return new r})()}:function(){return new l}};function f(e,t,n){t[n]=255&e}function h(e,t){this.len=e,this.next=void 0,this.val=t}function g(e,t,n){for(;e.hi;)t[n++]=127&e.lo|128,e.lo=(e.lo>>>7|e.hi<<25)>>>0,e.hi>>>=7;for(;e.lo>127;)t[n++]=127&e.lo|128,e.lo=e.lo>>>7;t[n++]=e.lo}function p(e,t,n){t[n]=255&e,t[n+1]=e>>>8&255,t[n+2]=e>>>16&255,t[n+3]=e>>>24}l.create=A(),l.alloc=function(e){return new o.Array(e)},o.Array!==Array&&(l.alloc=o.pool(l.alloc,o.Array.prototype.subarray)),l.prototype._push=function(e,t,n){return this.tail=this.tail.next=new c(e,t,n),this.len+=t,this},h.prototype=Object.create(c.prototype),h.prototype.fn=function(e,t,n){for(;e>127;)t[n++]=127&e|128,e>>>=7;t[n]=e},l.prototype.uint32=function(e){return this.len+=(this.tail=this.tail.next=new h((e>>>=0)<128?1:e<16384?2:e<2097152?3:e<268435456?4:5,e)).len,this},l.prototype.int32=function(e){return e<0?this._push(g,10,i.fromNumber(e)):this.uint32(e)},l.prototype.sint32=function(e){return this.uint32((e<<1^e>>31)>>>0)},l.prototype.uint64=function(e){var t=i.from(e);return this._push(g,t.length(),t)},l.prototype.int64=l.prototype.uint64,l.prototype.sint64=function(e){var t=i.from(e).zzEncode();return this._push(g,t.length(),t)},l.prototype.bool=function(e){return this._push(f,1,e?1:0)},l.prototype.fixed32=function(e){return this._push(p,4,e>>>0)},l.prototype.sfixed32=l.prototype.fixed32,l.prototype.fixed64=function(e){var t=i.from(e);return this._push(p,4,t.lo)._push(p,4,t.hi)},l.prototype.sfixed64=l.prototype.fixed64,l.prototype.float=function(e){return this._push(o.float.writeFloatLE,4,e)},l.prototype.double=function(e){return this._push(o.float.writeDoubleLE,8,e)};var m=o.Array.prototype.set?function(e,t,n){t.set(e,n)}:function(e,t,n){for(var r=0;r>>0;if(!t)return this._push(f,1,0);if(o.isString(e)){var n=l.alloc(t=a.length(e));a.decode(e,n,0),e=n}return this.uint32(t)._push(m,t,e)},l.prototype.string=function(e){var t=s.length(e);return t?this.uint32(t)._push(s.write,t,e):this._push(f,1,0)},l.prototype.fork=function(){return this.states=new u(this),this.head=this.tail=new c(d,0,0),this.len=0,this},l.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new c(d,0,0),this.len=0),this},l.prototype.ldelim=function(){var e=this.head,t=this.tail,n=this.len;return this.reset().uint32(n),n&&(this.tail.next=e.next,this.tail=t,this.len+=n),this},l.prototype.finish=function(){for(var e=this.head.next,t=this.constructor.alloc(this.len),n=0;e;)e.fn(e.val,t,n),n+=e.len,e=e.next;return t},l._configure=function(e){r=e,l.create=A(),r._configure()}},8128:(e,t,n)=>{"use strict";e.exports=i;var r=n(5683);(i.prototype=Object.create(r.prototype)).constructor=i;var o=n(2554);function i(){r.call(this)}function a(e,t,n){e.length<40?o.utf8.write(e,t,n):t.utf8Write?t.utf8Write(e,n):t.write(e,n)}i._configure=function(){i.alloc=o._Buffer_allocUnsafe,i.writeBytesBuffer=o.Buffer&&o.Buffer.prototype instanceof Uint8Array&&"set"===o.Buffer.prototype.set.name?function(e,t,n){t.set(e,n)}:function(e,t,n){if(e.copy)e.copy(t,n,0,e.length);else for(var r=0;r>>0;return this.uint32(t),t&&this._push(i.writeBytesBuffer,t,e),this},i.prototype.string=function(e){var t=o.Buffer.byteLength(e);return this.uint32(t),t&&this._push(a,t,e),this},i._configure()},9492:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Event=t.LastCommitInfo=t.BlockParams=t.ConsensusParams=t.ResponseApplySnapshotChunk=t.ResponseLoadSnapshotChunk=t.ResponseOfferSnapshot=t.ResponseListSnapshots=t.ResponseCommit=t.ResponseEndBlock=t.ResponseDeliverTx=t.ResponseCheckTx=t.ResponseBeginBlock=t.ResponseQuery=t.ResponseInitChain=t.ResponseSetOption=t.ResponseInfo=t.ResponseFlush=t.ResponseEcho=t.ResponseException=t.Response=t.RequestApplySnapshotChunk=t.RequestLoadSnapshotChunk=t.RequestOfferSnapshot=t.RequestListSnapshots=t.RequestCommit=t.RequestEndBlock=t.RequestDeliverTx=t.RequestCheckTx=t.RequestBeginBlock=t.RequestQuery=t.RequestInitChain=t.RequestSetOption=t.RequestInfo=t.RequestFlush=t.RequestEcho=t.Request=t.responseApplySnapshotChunk_ResultToJSON=t.responseApplySnapshotChunk_ResultFromJSON=t.ResponseApplySnapshotChunk_Result=t.responseOfferSnapshot_ResultToJSON=t.responseOfferSnapshot_ResultFromJSON=t.ResponseOfferSnapshot_Result=t.evidenceTypeToJSON=t.evidenceTypeFromJSON=t.EvidenceType=t.checkTxTypeToJSON=t.checkTxTypeFromJSON=t.CheckTxType=t.protobufPackage=void 0,t.ABCIApplicationClientImpl=t.Snapshot=t.Evidence=t.VoteInfo=t.ValidatorUpdate=t.Validator=t.TxResult=t.EventAttribute=void 0;const o=r(n(3720)),i=r(n(3789)),a=n(5522),s=n(1258),c=n(1494),d=n(7134),u=n(984);var l,A,f,h;function g(e){switch(e){case 0:case"NEW":return l.NEW;case 1:case"RECHECK":return l.RECHECK;default:return l.UNRECOGNIZED}}function p(e){switch(e){case l.NEW:return"NEW";case l.RECHECK:return"RECHECK";default:return"UNKNOWN"}}function m(e){switch(e){case 0:case"UNKNOWN":return A.UNKNOWN;case 1:case"DUPLICATE_VOTE":return A.DUPLICATE_VOTE;case 2:case"LIGHT_CLIENT_ATTACK":return A.LIGHT_CLIENT_ATTACK;default:return A.UNRECOGNIZED}}function v(e){switch(e){case A.UNKNOWN:return"UNKNOWN";case A.DUPLICATE_VOTE:return"DUPLICATE_VOTE";case A.LIGHT_CLIENT_ATTACK:return"LIGHT_CLIENT_ATTACK";default:return"UNKNOWN"}}function y(e){switch(e){case 0:case"UNKNOWN":return f.UNKNOWN;case 1:case"ACCEPT":return f.ACCEPT;case 2:case"ABORT":return f.ABORT;case 3:case"REJECT":return f.REJECT;case 4:case"REJECT_FORMAT":return f.REJECT_FORMAT;case 5:case"REJECT_SENDER":return f.REJECT_SENDER;default:return f.UNRECOGNIZED}}function b(e){switch(e){case f.UNKNOWN:return"UNKNOWN";case f.ACCEPT:return"ACCEPT";case f.ABORT:return"ABORT";case f.REJECT:return"REJECT";case f.REJECT_FORMAT:return"REJECT_FORMAT";case f.REJECT_SENDER:return"REJECT_SENDER";default:return"UNKNOWN"}}function I(e){switch(e){case 0:case"UNKNOWN":return h.UNKNOWN;case 1:case"ACCEPT":return h.ACCEPT;case 2:case"ABORT":return h.ABORT;case 3:case"RETRY":return h.RETRY;case 4:case"RETRY_SNAPSHOT":return h.RETRY_SNAPSHOT;case 5:case"REJECT_SNAPSHOT":return h.REJECT_SNAPSHOT;default:return h.UNRECOGNIZED}}function C(e){switch(e){case h.UNKNOWN:return"UNKNOWN";case h.ACCEPT:return"ACCEPT";case h.ABORT:return"ABORT";case h.RETRY:return"RETRY";case h.RETRY_SNAPSHOT:return"RETRY_SNAPSHOT";case h.REJECT_SNAPSHOT:return"REJECT_SNAPSHOT";default:return"UNKNOWN"}}t.protobufPackage="tendermint.abci",function(e){e[e.NEW=0]="NEW",e[e.RECHECK=1]="RECHECK",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(l=t.CheckTxType||(t.CheckTxType={})),t.checkTxTypeFromJSON=g,t.checkTxTypeToJSON=p,function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.DUPLICATE_VOTE=1]="DUPLICATE_VOTE",e[e.LIGHT_CLIENT_ATTACK=2]="LIGHT_CLIENT_ATTACK",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(A=t.EvidenceType||(t.EvidenceType={})),t.evidenceTypeFromJSON=m,t.evidenceTypeToJSON=v,function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.ACCEPT=1]="ACCEPT",e[e.ABORT=2]="ABORT",e[e.REJECT=3]="REJECT",e[e.REJECT_FORMAT=4]="REJECT_FORMAT",e[e.REJECT_SENDER=5]="REJECT_SENDER",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(f=t.ResponseOfferSnapshot_Result||(t.ResponseOfferSnapshot_Result={})),t.responseOfferSnapshot_ResultFromJSON=y,t.responseOfferSnapshot_ResultToJSON=b,function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.ACCEPT=1]="ACCEPT",e[e.ABORT=2]="ABORT",e[e.RETRY=3]="RETRY",e[e.RETRY_SNAPSHOT=4]="RETRY_SNAPSHOT",e[e.REJECT_SNAPSHOT=5]="REJECT_SNAPSHOT",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(h=t.ResponseApplySnapshotChunk_Result||(t.ResponseApplySnapshotChunk_Result={})),t.responseApplySnapshotChunk_ResultFromJSON=I,t.responseApplySnapshotChunk_ResultToJSON=C;const E={};t.Request={encode:(e,n=i.default.Writer.create())=>(void 0!==e.echo&&t.RequestEcho.encode(e.echo,n.uint32(10).fork()).ldelim(),void 0!==e.flush&&t.RequestFlush.encode(e.flush,n.uint32(18).fork()).ldelim(),void 0!==e.info&&t.RequestInfo.encode(e.info,n.uint32(26).fork()).ldelim(),void 0!==e.setOption&&t.RequestSetOption.encode(e.setOption,n.uint32(34).fork()).ldelim(),void 0!==e.initChain&&t.RequestInitChain.encode(e.initChain,n.uint32(42).fork()).ldelim(),void 0!==e.query&&t.RequestQuery.encode(e.query,n.uint32(50).fork()).ldelim(),void 0!==e.beginBlock&&t.RequestBeginBlock.encode(e.beginBlock,n.uint32(58).fork()).ldelim(),void 0!==e.checkTx&&t.RequestCheckTx.encode(e.checkTx,n.uint32(66).fork()).ldelim(),void 0!==e.deliverTx&&t.RequestDeliverTx.encode(e.deliverTx,n.uint32(74).fork()).ldelim(),void 0!==e.endBlock&&t.RequestEndBlock.encode(e.endBlock,n.uint32(82).fork()).ldelim(),void 0!==e.commit&&t.RequestCommit.encode(e.commit,n.uint32(90).fork()).ldelim(),void 0!==e.listSnapshots&&t.RequestListSnapshots.encode(e.listSnapshots,n.uint32(98).fork()).ldelim(),void 0!==e.offerSnapshot&&t.RequestOfferSnapshot.encode(e.offerSnapshot,n.uint32(106).fork()).ldelim(),void 0!==e.loadSnapshotChunk&&t.RequestLoadSnapshotChunk.encode(e.loadSnapshotChunk,n.uint32(114).fork()).ldelim(),void 0!==e.applySnapshotChunk&&t.RequestApplySnapshotChunk.encode(e.applySnapshotChunk,n.uint32(122).fork()).ldelim(),n),decode(e,n){const r=e instanceof i.default.Reader?e:new i.default.Reader(e);let o=void 0===n?r.len:r.pos+n;const a=Object.assign({},E);for(;r.pos>>3){case 1:a.echo=t.RequestEcho.decode(r,r.uint32());break;case 2:a.flush=t.RequestFlush.decode(r,r.uint32());break;case 3:a.info=t.RequestInfo.decode(r,r.uint32());break;case 4:a.setOption=t.RequestSetOption.decode(r,r.uint32());break;case 5:a.initChain=t.RequestInitChain.decode(r,r.uint32());break;case 6:a.query=t.RequestQuery.decode(r,r.uint32());break;case 7:a.beginBlock=t.RequestBeginBlock.decode(r,r.uint32());break;case 8:a.checkTx=t.RequestCheckTx.decode(r,r.uint32());break;case 9:a.deliverTx=t.RequestDeliverTx.decode(r,r.uint32());break;case 10:a.endBlock=t.RequestEndBlock.decode(r,r.uint32());break;case 11:a.commit=t.RequestCommit.decode(r,r.uint32());break;case 12:a.listSnapshots=t.RequestListSnapshots.decode(r,r.uint32());break;case 13:a.offerSnapshot=t.RequestOfferSnapshot.decode(r,r.uint32());break;case 14:a.loadSnapshotChunk=t.RequestLoadSnapshotChunk.decode(r,r.uint32());break;case 15:a.applySnapshotChunk=t.RequestApplySnapshotChunk.decode(r,r.uint32());break;default:r.skipType(7&e)}}return a},fromJSON(e){const n=Object.assign({},E);return n.echo=void 0!==e.echo&&null!==e.echo?t.RequestEcho.fromJSON(e.echo):void 0,n.flush=void 0!==e.flush&&null!==e.flush?t.RequestFlush.fromJSON(e.flush):void 0,n.info=void 0!==e.info&&null!==e.info?t.RequestInfo.fromJSON(e.info):void 0,n.setOption=void 0!==e.setOption&&null!==e.setOption?t.RequestSetOption.fromJSON(e.setOption):void 0,n.initChain=void 0!==e.initChain&&null!==e.initChain?t.RequestInitChain.fromJSON(e.initChain):void 0,n.query=void 0!==e.query&&null!==e.query?t.RequestQuery.fromJSON(e.query):void 0,n.beginBlock=void 0!==e.beginBlock&&null!==e.beginBlock?t.RequestBeginBlock.fromJSON(e.beginBlock):void 0,n.checkTx=void 0!==e.checkTx&&null!==e.checkTx?t.RequestCheckTx.fromJSON(e.checkTx):void 0,n.deliverTx=void 0!==e.deliverTx&&null!==e.deliverTx?t.RequestDeliverTx.fromJSON(e.deliverTx):void 0,n.endBlock=void 0!==e.endBlock&&null!==e.endBlock?t.RequestEndBlock.fromJSON(e.endBlock):void 0,n.commit=void 0!==e.commit&&null!==e.commit?t.RequestCommit.fromJSON(e.commit):void 0,n.listSnapshots=void 0!==e.listSnapshots&&null!==e.listSnapshots?t.RequestListSnapshots.fromJSON(e.listSnapshots):void 0,n.offerSnapshot=void 0!==e.offerSnapshot&&null!==e.offerSnapshot?t.RequestOfferSnapshot.fromJSON(e.offerSnapshot):void 0,n.loadSnapshotChunk=void 0!==e.loadSnapshotChunk&&null!==e.loadSnapshotChunk?t.RequestLoadSnapshotChunk.fromJSON(e.loadSnapshotChunk):void 0,n.applySnapshotChunk=void 0!==e.applySnapshotChunk&&null!==e.applySnapshotChunk?t.RequestApplySnapshotChunk.fromJSON(e.applySnapshotChunk):void 0,n},toJSON(e){const n={};return void 0!==e.echo&&(n.echo=e.echo?t.RequestEcho.toJSON(e.echo):void 0),void 0!==e.flush&&(n.flush=e.flush?t.RequestFlush.toJSON(e.flush):void 0),void 0!==e.info&&(n.info=e.info?t.RequestInfo.toJSON(e.info):void 0),void 0!==e.setOption&&(n.setOption=e.setOption?t.RequestSetOption.toJSON(e.setOption):void 0),void 0!==e.initChain&&(n.initChain=e.initChain?t.RequestInitChain.toJSON(e.initChain):void 0),void 0!==e.query&&(n.query=e.query?t.RequestQuery.toJSON(e.query):void 0),void 0!==e.beginBlock&&(n.beginBlock=e.beginBlock?t.RequestBeginBlock.toJSON(e.beginBlock):void 0),void 0!==e.checkTx&&(n.checkTx=e.checkTx?t.RequestCheckTx.toJSON(e.checkTx):void 0),void 0!==e.deliverTx&&(n.deliverTx=e.deliverTx?t.RequestDeliverTx.toJSON(e.deliverTx):void 0),void 0!==e.endBlock&&(n.endBlock=e.endBlock?t.RequestEndBlock.toJSON(e.endBlock):void 0),void 0!==e.commit&&(n.commit=e.commit?t.RequestCommit.toJSON(e.commit):void 0),void 0!==e.listSnapshots&&(n.listSnapshots=e.listSnapshots?t.RequestListSnapshots.toJSON(e.listSnapshots):void 0),void 0!==e.offerSnapshot&&(n.offerSnapshot=e.offerSnapshot?t.RequestOfferSnapshot.toJSON(e.offerSnapshot):void 0),void 0!==e.loadSnapshotChunk&&(n.loadSnapshotChunk=e.loadSnapshotChunk?t.RequestLoadSnapshotChunk.toJSON(e.loadSnapshotChunk):void 0),void 0!==e.applySnapshotChunk&&(n.applySnapshotChunk=e.applySnapshotChunk?t.RequestApplySnapshotChunk.toJSON(e.applySnapshotChunk):void 0),n},fromPartial(e){const n=Object.assign({},E);return n.echo=void 0!==e.echo&&null!==e.echo?t.RequestEcho.fromPartial(e.echo):void 0,n.flush=void 0!==e.flush&&null!==e.flush?t.RequestFlush.fromPartial(e.flush):void 0,n.info=void 0!==e.info&&null!==e.info?t.RequestInfo.fromPartial(e.info):void 0,n.setOption=void 0!==e.setOption&&null!==e.setOption?t.RequestSetOption.fromPartial(e.setOption):void 0,n.initChain=void 0!==e.initChain&&null!==e.initChain?t.RequestInitChain.fromPartial(e.initChain):void 0,n.query=void 0!==e.query&&null!==e.query?t.RequestQuery.fromPartial(e.query):void 0,n.beginBlock=void 0!==e.beginBlock&&null!==e.beginBlock?t.RequestBeginBlock.fromPartial(e.beginBlock):void 0,n.checkTx=void 0!==e.checkTx&&null!==e.checkTx?t.RequestCheckTx.fromPartial(e.checkTx):void 0,n.deliverTx=void 0!==e.deliverTx&&null!==e.deliverTx?t.RequestDeliverTx.fromPartial(e.deliverTx):void 0,n.endBlock=void 0!==e.endBlock&&null!==e.endBlock?t.RequestEndBlock.fromPartial(e.endBlock):void 0,n.commit=void 0!==e.commit&&null!==e.commit?t.RequestCommit.fromPartial(e.commit):void 0,n.listSnapshots=void 0!==e.listSnapshots&&null!==e.listSnapshots?t.RequestListSnapshots.fromPartial(e.listSnapshots):void 0,n.offerSnapshot=void 0!==e.offerSnapshot&&null!==e.offerSnapshot?t.RequestOfferSnapshot.fromPartial(e.offerSnapshot):void 0,n.loadSnapshotChunk=void 0!==e.loadSnapshotChunk&&null!==e.loadSnapshotChunk?t.RequestLoadSnapshotChunk.fromPartial(e.loadSnapshotChunk):void 0,n.applySnapshotChunk=void 0!==e.applySnapshotChunk&&null!==e.applySnapshotChunk?t.RequestApplySnapshotChunk.fromPartial(e.applySnapshotChunk):void 0,n}};const w={message:""};t.RequestEcho={encode:(e,t=i.default.Writer.create())=>(""!==e.message&&t.uint32(10).string(e.message),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},w);for(;n.pos>>3==1?o.message=n.string():n.skipType(7&e)}return o},fromJSON(e){const t=Object.assign({},w);return t.message=void 0!==e.message&&null!==e.message?String(e.message):"",t},toJSON(e){const t={};return void 0!==e.message&&(t.message=e.message),t},fromPartial(e){var t;const n=Object.assign({},w);return n.message=null!==(t=e.message)&&void 0!==t?t:"",n}};const B={};t.RequestFlush={encode:(e,t=i.default.Writer.create())=>t,decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},B);for(;n.posObject.assign({},B),toJSON:e=>({}),fromPartial:e=>Object.assign({},B)};const _={version:"",blockVersion:o.default.UZERO,p2pVersion:o.default.UZERO};t.RequestInfo={encode:(e,t=i.default.Writer.create())=>(""!==e.version&&t.uint32(10).string(e.version),e.blockVersion.isZero()||t.uint32(16).uint64(e.blockVersion),e.p2pVersion.isZero()||t.uint32(24).uint64(e.p2pVersion),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},_);for(;n.pos>>3){case 1:o.version=n.string();break;case 2:o.blockVersion=n.uint64();break;case 3:o.p2pVersion=n.uint64();break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},_);return t.version=void 0!==e.version&&null!==e.version?String(e.version):"",t.blockVersion=void 0!==e.blockVersion&&null!==e.blockVersion?o.default.fromString(e.blockVersion):o.default.UZERO,t.p2pVersion=void 0!==e.p2pVersion&&null!==e.p2pVersion?o.default.fromString(e.p2pVersion):o.default.UZERO,t},toJSON(e){const t={};return void 0!==e.version&&(t.version=e.version),void 0!==e.blockVersion&&(t.blockVersion=(e.blockVersion||o.default.UZERO).toString()),void 0!==e.p2pVersion&&(t.p2pVersion=(e.p2pVersion||o.default.UZERO).toString()),t},fromPartial(e){var t;const n=Object.assign({},_);return n.version=null!==(t=e.version)&&void 0!==t?t:"",n.blockVersion=void 0!==e.blockVersion&&null!==e.blockVersion?o.default.fromValue(e.blockVersion):o.default.UZERO,n.p2pVersion=void 0!==e.p2pVersion&&null!==e.p2pVersion?o.default.fromValue(e.p2pVersion):o.default.UZERO,n}};const S={key:"",value:""};t.RequestSetOption={encode:(e,t=i.default.Writer.create())=>(""!==e.key&&t.uint32(10).string(e.key),""!==e.value&&t.uint32(18).string(e.value),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},S);for(;n.pos>>3){case 1:o.key=n.string();break;case 2:o.value=n.string();break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},S);return t.key=void 0!==e.key&&null!==e.key?String(e.key):"",t.value=void 0!==e.value&&null!==e.value?String(e.value):"",t},toJSON(e){const t={};return void 0!==e.key&&(t.key=e.key),void 0!==e.value&&(t.value=e.value),t},fromPartial(e){var t,n;const r=Object.assign({},S);return r.key=null!==(t=e.key)&&void 0!==t?t:"",r.value=null!==(n=e.value)&&void 0!==n?n:"",r}};const k={chainId:"",initialHeight:o.default.ZERO};t.RequestInitChain={encode(e,n=i.default.Writer.create()){void 0!==e.time&&a.Timestamp.encode(e.time,n.uint32(10).fork()).ldelim(),""!==e.chainId&&n.uint32(18).string(e.chainId),void 0!==e.consensusParams&&t.ConsensusParams.encode(e.consensusParams,n.uint32(26).fork()).ldelim();for(const r of e.validators)t.ValidatorUpdate.encode(r,n.uint32(34).fork()).ldelim();return 0!==e.appStateBytes.length&&n.uint32(42).bytes(e.appStateBytes),e.initialHeight.isZero()||n.uint32(48).int64(e.initialHeight),n},decode(e,n){const r=e instanceof i.default.Reader?e:new i.default.Reader(e);let o=void 0===n?r.len:r.pos+n;const s=Object.assign({},k);for(s.validators=[],s.appStateBytes=new Uint8Array;r.pos>>3){case 1:s.time=a.Timestamp.decode(r,r.uint32());break;case 2:s.chainId=r.string();break;case 3:s.consensusParams=t.ConsensusParams.decode(r,r.uint32());break;case 4:s.validators.push(t.ValidatorUpdate.decode(r,r.uint32()));break;case 5:s.appStateBytes=r.bytes();break;case 6:s.initialHeight=r.int64();break;default:r.skipType(7&e)}}return s},fromJSON(e){var n;const r=Object.assign({},k);return r.time=void 0!==e.time&&null!==e.time?be(e.time):void 0,r.chainId=void 0!==e.chainId&&null!==e.chainId?String(e.chainId):"",r.consensusParams=void 0!==e.consensusParams&&null!==e.consensusParams?t.ConsensusParams.fromJSON(e.consensusParams):void 0,r.validators=(null!==(n=e.validators)&&void 0!==n?n:[]).map((e=>t.ValidatorUpdate.fromJSON(e))),r.appStateBytes=void 0!==e.appStateBytes&&null!==e.appStateBytes?ge(e.appStateBytes):new Uint8Array,r.initialHeight=void 0!==e.initialHeight&&null!==e.initialHeight?o.default.fromString(e.initialHeight):o.default.ZERO,r},toJSON(e){const n={};return void 0!==e.time&&(n.time=ye(e.time).toISOString()),void 0!==e.chainId&&(n.chainId=e.chainId),void 0!==e.consensusParams&&(n.consensusParams=e.consensusParams?t.ConsensusParams.toJSON(e.consensusParams):void 0),e.validators?n.validators=e.validators.map((e=>e?t.ValidatorUpdate.toJSON(e):void 0)):n.validators=[],void 0!==e.appStateBytes&&(n.appStateBytes=me(void 0!==e.appStateBytes?e.appStateBytes:new Uint8Array)),void 0!==e.initialHeight&&(n.initialHeight=(e.initialHeight||o.default.ZERO).toString()),n},fromPartial(e){var n,r,i;const s=Object.assign({},k);return s.time=void 0!==e.time&&null!==e.time?a.Timestamp.fromPartial(e.time):void 0,s.chainId=null!==(n=e.chainId)&&void 0!==n?n:"",s.consensusParams=void 0!==e.consensusParams&&null!==e.consensusParams?t.ConsensusParams.fromPartial(e.consensusParams):void 0,s.validators=(null===(r=e.validators)||void 0===r?void 0:r.map((e=>t.ValidatorUpdate.fromPartial(e))))||[],s.appStateBytes=null!==(i=e.appStateBytes)&&void 0!==i?i:new Uint8Array,s.initialHeight=void 0!==e.initialHeight&&null!==e.initialHeight?o.default.fromValue(e.initialHeight):o.default.ZERO,s}};const O={path:"",height:o.default.ZERO,prove:!1};t.RequestQuery={encode:(e,t=i.default.Writer.create())=>(0!==e.data.length&&t.uint32(10).bytes(e.data),""!==e.path&&t.uint32(18).string(e.path),e.height.isZero()||t.uint32(24).int64(e.height),!0===e.prove&&t.uint32(32).bool(e.prove),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},O);for(o.data=new Uint8Array;n.pos>>3){case 1:o.data=n.bytes();break;case 2:o.path=n.string();break;case 3:o.height=n.int64();break;case 4:o.prove=n.bool();break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},O);return t.data=void 0!==e.data&&null!==e.data?ge(e.data):new Uint8Array,t.path=void 0!==e.path&&null!==e.path?String(e.path):"",t.height=void 0!==e.height&&null!==e.height?o.default.fromString(e.height):o.default.ZERO,t.prove=void 0!==e.prove&&null!==e.prove&&Boolean(e.prove),t},toJSON(e){const t={};return void 0!==e.data&&(t.data=me(void 0!==e.data?e.data:new Uint8Array)),void 0!==e.path&&(t.path=e.path),void 0!==e.height&&(t.height=(e.height||o.default.ZERO).toString()),void 0!==e.prove&&(t.prove=e.prove),t},fromPartial(e){var t,n,r;const i=Object.assign({},O);return i.data=null!==(t=e.data)&&void 0!==t?t:new Uint8Array,i.path=null!==(n=e.path)&&void 0!==n?n:"",i.height=void 0!==e.height&&null!==e.height?o.default.fromValue(e.height):o.default.ZERO,i.prove=null!==(r=e.prove)&&void 0!==r&&r,i}};const Q={};t.RequestBeginBlock={encode(e,n=i.default.Writer.create()){0!==e.hash.length&&n.uint32(10).bytes(e.hash),void 0!==e.header&&s.Header.encode(e.header,n.uint32(18).fork()).ldelim(),void 0!==e.lastCommitInfo&&t.LastCommitInfo.encode(e.lastCommitInfo,n.uint32(26).fork()).ldelim();for(const r of e.byzantineValidators)t.Evidence.encode(r,n.uint32(34).fork()).ldelim();return n},decode(e,n){const r=e instanceof i.default.Reader?e:new i.default.Reader(e);let o=void 0===n?r.len:r.pos+n;const a=Object.assign({},Q);for(a.byzantineValidators=[],a.hash=new Uint8Array;r.pos>>3){case 1:a.hash=r.bytes();break;case 2:a.header=s.Header.decode(r,r.uint32());break;case 3:a.lastCommitInfo=t.LastCommitInfo.decode(r,r.uint32());break;case 4:a.byzantineValidators.push(t.Evidence.decode(r,r.uint32()));break;default:r.skipType(7&e)}}return a},fromJSON(e){var n;const r=Object.assign({},Q);return r.hash=void 0!==e.hash&&null!==e.hash?ge(e.hash):new Uint8Array,r.header=void 0!==e.header&&null!==e.header?s.Header.fromJSON(e.header):void 0,r.lastCommitInfo=void 0!==e.lastCommitInfo&&null!==e.lastCommitInfo?t.LastCommitInfo.fromJSON(e.lastCommitInfo):void 0,r.byzantineValidators=(null!==(n=e.byzantineValidators)&&void 0!==n?n:[]).map((e=>t.Evidence.fromJSON(e))),r},toJSON(e){const n={};return void 0!==e.hash&&(n.hash=me(void 0!==e.hash?e.hash:new Uint8Array)),void 0!==e.header&&(n.header=e.header?s.Header.toJSON(e.header):void 0),void 0!==e.lastCommitInfo&&(n.lastCommitInfo=e.lastCommitInfo?t.LastCommitInfo.toJSON(e.lastCommitInfo):void 0),e.byzantineValidators?n.byzantineValidators=e.byzantineValidators.map((e=>e?t.Evidence.toJSON(e):void 0)):n.byzantineValidators=[],n},fromPartial(e){var n,r;const o=Object.assign({},Q);return o.hash=null!==(n=e.hash)&&void 0!==n?n:new Uint8Array,o.header=void 0!==e.header&&null!==e.header?s.Header.fromPartial(e.header):void 0,o.lastCommitInfo=void 0!==e.lastCommitInfo&&null!==e.lastCommitInfo?t.LastCommitInfo.fromPartial(e.lastCommitInfo):void 0,o.byzantineValidators=(null===(r=e.byzantineValidators)||void 0===r?void 0:r.map((e=>t.Evidence.fromPartial(e))))||[],o}};const R={type:0};t.RequestCheckTx={encode:(e,t=i.default.Writer.create())=>(0!==e.tx.length&&t.uint32(10).bytes(e.tx),0!==e.type&&t.uint32(16).int32(e.type),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},R);for(o.tx=new Uint8Array;n.pos>>3){case 1:o.tx=n.bytes();break;case 2:o.type=n.int32();break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},R);return t.tx=void 0!==e.tx&&null!==e.tx?ge(e.tx):new Uint8Array,t.type=void 0!==e.type&&null!==e.type?g(e.type):0,t},toJSON(e){const t={};return void 0!==e.tx&&(t.tx=me(void 0!==e.tx?e.tx:new Uint8Array)),void 0!==e.type&&(t.type=p(e.type)),t},fromPartial(e){var t,n;const r=Object.assign({},R);return r.tx=null!==(t=e.tx)&&void 0!==t?t:new Uint8Array,r.type=null!==(n=e.type)&&void 0!==n?n:0,r}};const P={};t.RequestDeliverTx={encode:(e,t=i.default.Writer.create())=>(0!==e.tx.length&&t.uint32(10).bytes(e.tx),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},P);for(o.tx=new Uint8Array;n.pos>>3==1?o.tx=n.bytes():n.skipType(7&e)}return o},fromJSON(e){const t=Object.assign({},P);return t.tx=void 0!==e.tx&&null!==e.tx?ge(e.tx):new Uint8Array,t},toJSON(e){const t={};return void 0!==e.tx&&(t.tx=me(void 0!==e.tx?e.tx:new Uint8Array)),t},fromPartial(e){var t;const n=Object.assign({},P);return n.tx=null!==(t=e.tx)&&void 0!==t?t:new Uint8Array,n}};const N={height:o.default.ZERO};t.RequestEndBlock={encode:(e,t=i.default.Writer.create())=>(e.height.isZero()||t.uint32(8).int64(e.height),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},N);for(;n.pos>>3==1?o.height=n.int64():n.skipType(7&e)}return o},fromJSON(e){const t=Object.assign({},N);return t.height=void 0!==e.height&&null!==e.height?o.default.fromString(e.height):o.default.ZERO,t},toJSON(e){const t={};return void 0!==e.height&&(t.height=(e.height||o.default.ZERO).toString()),t},fromPartial(e){const t=Object.assign({},N);return t.height=void 0!==e.height&&null!==e.height?o.default.fromValue(e.height):o.default.ZERO,t}};const x={};t.RequestCommit={encode:(e,t=i.default.Writer.create())=>t,decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},x);for(;n.posObject.assign({},x),toJSON:e=>({}),fromPartial:e=>Object.assign({},x)};const D={};t.RequestListSnapshots={encode:(e,t=i.default.Writer.create())=>t,decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},D);for(;n.posObject.assign({},D),toJSON:e=>({}),fromPartial:e=>Object.assign({},D)};const M={};t.RequestOfferSnapshot={encode:(e,n=i.default.Writer.create())=>(void 0!==e.snapshot&&t.Snapshot.encode(e.snapshot,n.uint32(10).fork()).ldelim(),0!==e.appHash.length&&n.uint32(18).bytes(e.appHash),n),decode(e,n){const r=e instanceof i.default.Reader?e:new i.default.Reader(e);let o=void 0===n?r.len:r.pos+n;const a=Object.assign({},M);for(a.appHash=new Uint8Array;r.pos>>3){case 1:a.snapshot=t.Snapshot.decode(r,r.uint32());break;case 2:a.appHash=r.bytes();break;default:r.skipType(7&e)}}return a},fromJSON(e){const n=Object.assign({},M);return n.snapshot=void 0!==e.snapshot&&null!==e.snapshot?t.Snapshot.fromJSON(e.snapshot):void 0,n.appHash=void 0!==e.appHash&&null!==e.appHash?ge(e.appHash):new Uint8Array,n},toJSON(e){const n={};return void 0!==e.snapshot&&(n.snapshot=e.snapshot?t.Snapshot.toJSON(e.snapshot):void 0),void 0!==e.appHash&&(n.appHash=me(void 0!==e.appHash?e.appHash:new Uint8Array)),n},fromPartial(e){var n;const r=Object.assign({},M);return r.snapshot=void 0!==e.snapshot&&null!==e.snapshot?t.Snapshot.fromPartial(e.snapshot):void 0,r.appHash=null!==(n=e.appHash)&&void 0!==n?n:new Uint8Array,r}};const T={height:o.default.UZERO,format:0,chunk:0};t.RequestLoadSnapshotChunk={encode:(e,t=i.default.Writer.create())=>(e.height.isZero()||t.uint32(8).uint64(e.height),0!==e.format&&t.uint32(16).uint32(e.format),0!==e.chunk&&t.uint32(24).uint32(e.chunk),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},T);for(;n.pos>>3){case 1:o.height=n.uint64();break;case 2:o.format=n.uint32();break;case 3:o.chunk=n.uint32();break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},T);return t.height=void 0!==e.height&&null!==e.height?o.default.fromString(e.height):o.default.UZERO,t.format=void 0!==e.format&&null!==e.format?Number(e.format):0,t.chunk=void 0!==e.chunk&&null!==e.chunk?Number(e.chunk):0,t},toJSON(e){const t={};return void 0!==e.height&&(t.height=(e.height||o.default.UZERO).toString()),void 0!==e.format&&(t.format=e.format),void 0!==e.chunk&&(t.chunk=e.chunk),t},fromPartial(e){var t,n;const r=Object.assign({},T);return r.height=void 0!==e.height&&null!==e.height?o.default.fromValue(e.height):o.default.UZERO,r.format=null!==(t=e.format)&&void 0!==t?t:0,r.chunk=null!==(n=e.chunk)&&void 0!==n?n:0,r}};const U={index:0,sender:""};t.RequestApplySnapshotChunk={encode:(e,t=i.default.Writer.create())=>(0!==e.index&&t.uint32(8).uint32(e.index),0!==e.chunk.length&&t.uint32(18).bytes(e.chunk),""!==e.sender&&t.uint32(26).string(e.sender),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},U);for(o.chunk=new Uint8Array;n.pos>>3){case 1:o.index=n.uint32();break;case 2:o.chunk=n.bytes();break;case 3:o.sender=n.string();break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},U);return t.index=void 0!==e.index&&null!==e.index?Number(e.index):0,t.chunk=void 0!==e.chunk&&null!==e.chunk?ge(e.chunk):new Uint8Array,t.sender=void 0!==e.sender&&null!==e.sender?String(e.sender):"",t},toJSON(e){const t={};return void 0!==e.index&&(t.index=e.index),void 0!==e.chunk&&(t.chunk=me(void 0!==e.chunk?e.chunk:new Uint8Array)),void 0!==e.sender&&(t.sender=e.sender),t},fromPartial(e){var t,n,r;const o=Object.assign({},U);return o.index=null!==(t=e.index)&&void 0!==t?t:0,o.chunk=null!==(n=e.chunk)&&void 0!==n?n:new Uint8Array,o.sender=null!==(r=e.sender)&&void 0!==r?r:"",o}};const H={};t.Response={encode:(e,n=i.default.Writer.create())=>(void 0!==e.exception&&t.ResponseException.encode(e.exception,n.uint32(10).fork()).ldelim(),void 0!==e.echo&&t.ResponseEcho.encode(e.echo,n.uint32(18).fork()).ldelim(),void 0!==e.flush&&t.ResponseFlush.encode(e.flush,n.uint32(26).fork()).ldelim(),void 0!==e.info&&t.ResponseInfo.encode(e.info,n.uint32(34).fork()).ldelim(),void 0!==e.setOption&&t.ResponseSetOption.encode(e.setOption,n.uint32(42).fork()).ldelim(),void 0!==e.initChain&&t.ResponseInitChain.encode(e.initChain,n.uint32(50).fork()).ldelim(),void 0!==e.query&&t.ResponseQuery.encode(e.query,n.uint32(58).fork()).ldelim(),void 0!==e.beginBlock&&t.ResponseBeginBlock.encode(e.beginBlock,n.uint32(66).fork()).ldelim(),void 0!==e.checkTx&&t.ResponseCheckTx.encode(e.checkTx,n.uint32(74).fork()).ldelim(),void 0!==e.deliverTx&&t.ResponseDeliverTx.encode(e.deliverTx,n.uint32(82).fork()).ldelim(),void 0!==e.endBlock&&t.ResponseEndBlock.encode(e.endBlock,n.uint32(90).fork()).ldelim(),void 0!==e.commit&&t.ResponseCommit.encode(e.commit,n.uint32(98).fork()).ldelim(),void 0!==e.listSnapshots&&t.ResponseListSnapshots.encode(e.listSnapshots,n.uint32(106).fork()).ldelim(),void 0!==e.offerSnapshot&&t.ResponseOfferSnapshot.encode(e.offerSnapshot,n.uint32(114).fork()).ldelim(),void 0!==e.loadSnapshotChunk&&t.ResponseLoadSnapshotChunk.encode(e.loadSnapshotChunk,n.uint32(122).fork()).ldelim(),void 0!==e.applySnapshotChunk&&t.ResponseApplySnapshotChunk.encode(e.applySnapshotChunk,n.uint32(130).fork()).ldelim(),n),decode(e,n){const r=e instanceof i.default.Reader?e:new i.default.Reader(e);let o=void 0===n?r.len:r.pos+n;const a=Object.assign({},H);for(;r.pos>>3){case 1:a.exception=t.ResponseException.decode(r,r.uint32());break;case 2:a.echo=t.ResponseEcho.decode(r,r.uint32());break;case 3:a.flush=t.ResponseFlush.decode(r,r.uint32());break;case 4:a.info=t.ResponseInfo.decode(r,r.uint32());break;case 5:a.setOption=t.ResponseSetOption.decode(r,r.uint32());break;case 6:a.initChain=t.ResponseInitChain.decode(r,r.uint32());break;case 7:a.query=t.ResponseQuery.decode(r,r.uint32());break;case 8:a.beginBlock=t.ResponseBeginBlock.decode(r,r.uint32());break;case 9:a.checkTx=t.ResponseCheckTx.decode(r,r.uint32());break;case 10:a.deliverTx=t.ResponseDeliverTx.decode(r,r.uint32());break;case 11:a.endBlock=t.ResponseEndBlock.decode(r,r.uint32());break;case 12:a.commit=t.ResponseCommit.decode(r,r.uint32());break;case 13:a.listSnapshots=t.ResponseListSnapshots.decode(r,r.uint32());break;case 14:a.offerSnapshot=t.ResponseOfferSnapshot.decode(r,r.uint32());break;case 15:a.loadSnapshotChunk=t.ResponseLoadSnapshotChunk.decode(r,r.uint32());break;case 16:a.applySnapshotChunk=t.ResponseApplySnapshotChunk.decode(r,r.uint32());break;default:r.skipType(7&e)}}return a},fromJSON(e){const n=Object.assign({},H);return n.exception=void 0!==e.exception&&null!==e.exception?t.ResponseException.fromJSON(e.exception):void 0,n.echo=void 0!==e.echo&&null!==e.echo?t.ResponseEcho.fromJSON(e.echo):void 0,n.flush=void 0!==e.flush&&null!==e.flush?t.ResponseFlush.fromJSON(e.flush):void 0,n.info=void 0!==e.info&&null!==e.info?t.ResponseInfo.fromJSON(e.info):void 0,n.setOption=void 0!==e.setOption&&null!==e.setOption?t.ResponseSetOption.fromJSON(e.setOption):void 0,n.initChain=void 0!==e.initChain&&null!==e.initChain?t.ResponseInitChain.fromJSON(e.initChain):void 0,n.query=void 0!==e.query&&null!==e.query?t.ResponseQuery.fromJSON(e.query):void 0,n.beginBlock=void 0!==e.beginBlock&&null!==e.beginBlock?t.ResponseBeginBlock.fromJSON(e.beginBlock):void 0,n.checkTx=void 0!==e.checkTx&&null!==e.checkTx?t.ResponseCheckTx.fromJSON(e.checkTx):void 0,n.deliverTx=void 0!==e.deliverTx&&null!==e.deliverTx?t.ResponseDeliverTx.fromJSON(e.deliverTx):void 0,n.endBlock=void 0!==e.endBlock&&null!==e.endBlock?t.ResponseEndBlock.fromJSON(e.endBlock):void 0,n.commit=void 0!==e.commit&&null!==e.commit?t.ResponseCommit.fromJSON(e.commit):void 0,n.listSnapshots=void 0!==e.listSnapshots&&null!==e.listSnapshots?t.ResponseListSnapshots.fromJSON(e.listSnapshots):void 0,n.offerSnapshot=void 0!==e.offerSnapshot&&null!==e.offerSnapshot?t.ResponseOfferSnapshot.fromJSON(e.offerSnapshot):void 0,n.loadSnapshotChunk=void 0!==e.loadSnapshotChunk&&null!==e.loadSnapshotChunk?t.ResponseLoadSnapshotChunk.fromJSON(e.loadSnapshotChunk):void 0,n.applySnapshotChunk=void 0!==e.applySnapshotChunk&&null!==e.applySnapshotChunk?t.ResponseApplySnapshotChunk.fromJSON(e.applySnapshotChunk):void 0,n},toJSON(e){const n={};return void 0!==e.exception&&(n.exception=e.exception?t.ResponseException.toJSON(e.exception):void 0),void 0!==e.echo&&(n.echo=e.echo?t.ResponseEcho.toJSON(e.echo):void 0),void 0!==e.flush&&(n.flush=e.flush?t.ResponseFlush.toJSON(e.flush):void 0),void 0!==e.info&&(n.info=e.info?t.ResponseInfo.toJSON(e.info):void 0),void 0!==e.setOption&&(n.setOption=e.setOption?t.ResponseSetOption.toJSON(e.setOption):void 0),void 0!==e.initChain&&(n.initChain=e.initChain?t.ResponseInitChain.toJSON(e.initChain):void 0),void 0!==e.query&&(n.query=e.query?t.ResponseQuery.toJSON(e.query):void 0),void 0!==e.beginBlock&&(n.beginBlock=e.beginBlock?t.ResponseBeginBlock.toJSON(e.beginBlock):void 0),void 0!==e.checkTx&&(n.checkTx=e.checkTx?t.ResponseCheckTx.toJSON(e.checkTx):void 0),void 0!==e.deliverTx&&(n.deliverTx=e.deliverTx?t.ResponseDeliverTx.toJSON(e.deliverTx):void 0),void 0!==e.endBlock&&(n.endBlock=e.endBlock?t.ResponseEndBlock.toJSON(e.endBlock):void 0),void 0!==e.commit&&(n.commit=e.commit?t.ResponseCommit.toJSON(e.commit):void 0),void 0!==e.listSnapshots&&(n.listSnapshots=e.listSnapshots?t.ResponseListSnapshots.toJSON(e.listSnapshots):void 0),void 0!==e.offerSnapshot&&(n.offerSnapshot=e.offerSnapshot?t.ResponseOfferSnapshot.toJSON(e.offerSnapshot):void 0),void 0!==e.loadSnapshotChunk&&(n.loadSnapshotChunk=e.loadSnapshotChunk?t.ResponseLoadSnapshotChunk.toJSON(e.loadSnapshotChunk):void 0),void 0!==e.applySnapshotChunk&&(n.applySnapshotChunk=e.applySnapshotChunk?t.ResponseApplySnapshotChunk.toJSON(e.applySnapshotChunk):void 0),n},fromPartial(e){const n=Object.assign({},H);return n.exception=void 0!==e.exception&&null!==e.exception?t.ResponseException.fromPartial(e.exception):void 0,n.echo=void 0!==e.echo&&null!==e.echo?t.ResponseEcho.fromPartial(e.echo):void 0,n.flush=void 0!==e.flush&&null!==e.flush?t.ResponseFlush.fromPartial(e.flush):void 0,n.info=void 0!==e.info&&null!==e.info?t.ResponseInfo.fromPartial(e.info):void 0,n.setOption=void 0!==e.setOption&&null!==e.setOption?t.ResponseSetOption.fromPartial(e.setOption):void 0,n.initChain=void 0!==e.initChain&&null!==e.initChain?t.ResponseInitChain.fromPartial(e.initChain):void 0,n.query=void 0!==e.query&&null!==e.query?t.ResponseQuery.fromPartial(e.query):void 0,n.beginBlock=void 0!==e.beginBlock&&null!==e.beginBlock?t.ResponseBeginBlock.fromPartial(e.beginBlock):void 0,n.checkTx=void 0!==e.checkTx&&null!==e.checkTx?t.ResponseCheckTx.fromPartial(e.checkTx):void 0,n.deliverTx=void 0!==e.deliverTx&&null!==e.deliverTx?t.ResponseDeliverTx.fromPartial(e.deliverTx):void 0,n.endBlock=void 0!==e.endBlock&&null!==e.endBlock?t.ResponseEndBlock.fromPartial(e.endBlock):void 0,n.commit=void 0!==e.commit&&null!==e.commit?t.ResponseCommit.fromPartial(e.commit):void 0,n.listSnapshots=void 0!==e.listSnapshots&&null!==e.listSnapshots?t.ResponseListSnapshots.fromPartial(e.listSnapshots):void 0,n.offerSnapshot=void 0!==e.offerSnapshot&&null!==e.offerSnapshot?t.ResponseOfferSnapshot.fromPartial(e.offerSnapshot):void 0,n.loadSnapshotChunk=void 0!==e.loadSnapshotChunk&&null!==e.loadSnapshotChunk?t.ResponseLoadSnapshotChunk.fromPartial(e.loadSnapshotChunk):void 0,n.applySnapshotChunk=void 0!==e.applySnapshotChunk&&null!==e.applySnapshotChunk?t.ResponseApplySnapshotChunk.fromPartial(e.applySnapshotChunk):void 0,n}};const j={error:""};t.ResponseException={encode:(e,t=i.default.Writer.create())=>(""!==e.error&&t.uint32(10).string(e.error),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},j);for(;n.pos>>3==1?o.error=n.string():n.skipType(7&e)}return o},fromJSON(e){const t=Object.assign({},j);return t.error=void 0!==e.error&&null!==e.error?String(e.error):"",t},toJSON(e){const t={};return void 0!==e.error&&(t.error=e.error),t},fromPartial(e){var t;const n=Object.assign({},j);return n.error=null!==(t=e.error)&&void 0!==t?t:"",n}};const J={message:""};t.ResponseEcho={encode:(e,t=i.default.Writer.create())=>(""!==e.message&&t.uint32(10).string(e.message),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},J);for(;n.pos>>3==1?o.message=n.string():n.skipType(7&e)}return o},fromJSON(e){const t=Object.assign({},J);return t.message=void 0!==e.message&&null!==e.message?String(e.message):"",t},toJSON(e){const t={};return void 0!==e.message&&(t.message=e.message),t},fromPartial(e){var t;const n=Object.assign({},J);return n.message=null!==(t=e.message)&&void 0!==t?t:"",n}};const F={};t.ResponseFlush={encode:(e,t=i.default.Writer.create())=>t,decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},F);for(;n.posObject.assign({},F),toJSON:e=>({}),fromPartial:e=>Object.assign({},F)};const G={data:"",version:"",appVersion:o.default.UZERO,lastBlockHeight:o.default.ZERO};t.ResponseInfo={encode:(e,t=i.default.Writer.create())=>(""!==e.data&&t.uint32(10).string(e.data),""!==e.version&&t.uint32(18).string(e.version),e.appVersion.isZero()||t.uint32(24).uint64(e.appVersion),e.lastBlockHeight.isZero()||t.uint32(32).int64(e.lastBlockHeight),0!==e.lastBlockAppHash.length&&t.uint32(42).bytes(e.lastBlockAppHash),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},G);for(o.lastBlockAppHash=new Uint8Array;n.pos>>3){case 1:o.data=n.string();break;case 2:o.version=n.string();break;case 3:o.appVersion=n.uint64();break;case 4:o.lastBlockHeight=n.int64();break;case 5:o.lastBlockAppHash=n.bytes();break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},G);return t.data=void 0!==e.data&&null!==e.data?String(e.data):"",t.version=void 0!==e.version&&null!==e.version?String(e.version):"",t.appVersion=void 0!==e.appVersion&&null!==e.appVersion?o.default.fromString(e.appVersion):o.default.UZERO,t.lastBlockHeight=void 0!==e.lastBlockHeight&&null!==e.lastBlockHeight?o.default.fromString(e.lastBlockHeight):o.default.ZERO,t.lastBlockAppHash=void 0!==e.lastBlockAppHash&&null!==e.lastBlockAppHash?ge(e.lastBlockAppHash):new Uint8Array,t},toJSON(e){const t={};return void 0!==e.data&&(t.data=e.data),void 0!==e.version&&(t.version=e.version),void 0!==e.appVersion&&(t.appVersion=(e.appVersion||o.default.UZERO).toString()),void 0!==e.lastBlockHeight&&(t.lastBlockHeight=(e.lastBlockHeight||o.default.ZERO).toString()),void 0!==e.lastBlockAppHash&&(t.lastBlockAppHash=me(void 0!==e.lastBlockAppHash?e.lastBlockAppHash:new Uint8Array)),t},fromPartial(e){var t,n,r;const i=Object.assign({},G);return i.data=null!==(t=e.data)&&void 0!==t?t:"",i.version=null!==(n=e.version)&&void 0!==n?n:"",i.appVersion=void 0!==e.appVersion&&null!==e.appVersion?o.default.fromValue(e.appVersion):o.default.UZERO,i.lastBlockHeight=void 0!==e.lastBlockHeight&&null!==e.lastBlockHeight?o.default.fromValue(e.lastBlockHeight):o.default.ZERO,i.lastBlockAppHash=null!==(r=e.lastBlockAppHash)&&void 0!==r?r:new Uint8Array,i}};const L={code:0,log:"",info:""};t.ResponseSetOption={encode:(e,t=i.default.Writer.create())=>(0!==e.code&&t.uint32(8).uint32(e.code),""!==e.log&&t.uint32(26).string(e.log),""!==e.info&&t.uint32(34).string(e.info),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},L);for(;n.pos>>3){case 1:o.code=n.uint32();break;case 3:o.log=n.string();break;case 4:o.info=n.string();break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},L);return t.code=void 0!==e.code&&null!==e.code?Number(e.code):0,t.log=void 0!==e.log&&null!==e.log?String(e.log):"",t.info=void 0!==e.info&&null!==e.info?String(e.info):"",t},toJSON(e){const t={};return void 0!==e.code&&(t.code=e.code),void 0!==e.log&&(t.log=e.log),void 0!==e.info&&(t.info=e.info),t},fromPartial(e){var t,n,r;const o=Object.assign({},L);return o.code=null!==(t=e.code)&&void 0!==t?t:0,o.log=null!==(n=e.log)&&void 0!==n?n:"",o.info=null!==(r=e.info)&&void 0!==r?r:"",o}};const q={};t.ResponseInitChain={encode(e,n=i.default.Writer.create()){void 0!==e.consensusParams&&t.ConsensusParams.encode(e.consensusParams,n.uint32(10).fork()).ldelim();for(const r of e.validators)t.ValidatorUpdate.encode(r,n.uint32(18).fork()).ldelim();return 0!==e.appHash.length&&n.uint32(26).bytes(e.appHash),n},decode(e,n){const r=e instanceof i.default.Reader?e:new i.default.Reader(e);let o=void 0===n?r.len:r.pos+n;const a=Object.assign({},q);for(a.validators=[],a.appHash=new Uint8Array;r.pos>>3){case 1:a.consensusParams=t.ConsensusParams.decode(r,r.uint32());break;case 2:a.validators.push(t.ValidatorUpdate.decode(r,r.uint32()));break;case 3:a.appHash=r.bytes();break;default:r.skipType(7&e)}}return a},fromJSON(e){var n;const r=Object.assign({},q);return r.consensusParams=void 0!==e.consensusParams&&null!==e.consensusParams?t.ConsensusParams.fromJSON(e.consensusParams):void 0,r.validators=(null!==(n=e.validators)&&void 0!==n?n:[]).map((e=>t.ValidatorUpdate.fromJSON(e))),r.appHash=void 0!==e.appHash&&null!==e.appHash?ge(e.appHash):new Uint8Array,r},toJSON(e){const n={};return void 0!==e.consensusParams&&(n.consensusParams=e.consensusParams?t.ConsensusParams.toJSON(e.consensusParams):void 0),e.validators?n.validators=e.validators.map((e=>e?t.ValidatorUpdate.toJSON(e):void 0)):n.validators=[],void 0!==e.appHash&&(n.appHash=me(void 0!==e.appHash?e.appHash:new Uint8Array)),n},fromPartial(e){var n,r;const o=Object.assign({},q);return o.consensusParams=void 0!==e.consensusParams&&null!==e.consensusParams?t.ConsensusParams.fromPartial(e.consensusParams):void 0,o.validators=(null===(n=e.validators)||void 0===n?void 0:n.map((e=>t.ValidatorUpdate.fromPartial(e))))||[],o.appHash=null!==(r=e.appHash)&&void 0!==r?r:new Uint8Array,o}};const Y={code:0,log:"",info:"",index:o.default.ZERO,height:o.default.ZERO,codespace:""};t.ResponseQuery={encode:(e,t=i.default.Writer.create())=>(0!==e.code&&t.uint32(8).uint32(e.code),""!==e.log&&t.uint32(26).string(e.log),""!==e.info&&t.uint32(34).string(e.info),e.index.isZero()||t.uint32(40).int64(e.index),0!==e.key.length&&t.uint32(50).bytes(e.key),0!==e.value.length&&t.uint32(58).bytes(e.value),void 0!==e.proofOps&&c.ProofOps.encode(e.proofOps,t.uint32(66).fork()).ldelim(),e.height.isZero()||t.uint32(72).int64(e.height),""!==e.codespace&&t.uint32(82).string(e.codespace),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},Y);for(o.key=new Uint8Array,o.value=new Uint8Array;n.pos>>3){case 1:o.code=n.uint32();break;case 3:o.log=n.string();break;case 4:o.info=n.string();break;case 5:o.index=n.int64();break;case 6:o.key=n.bytes();break;case 7:o.value=n.bytes();break;case 8:o.proofOps=c.ProofOps.decode(n,n.uint32());break;case 9:o.height=n.int64();break;case 10:o.codespace=n.string();break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},Y);return t.code=void 0!==e.code&&null!==e.code?Number(e.code):0,t.log=void 0!==e.log&&null!==e.log?String(e.log):"",t.info=void 0!==e.info&&null!==e.info?String(e.info):"",t.index=void 0!==e.index&&null!==e.index?o.default.fromString(e.index):o.default.ZERO,t.key=void 0!==e.key&&null!==e.key?ge(e.key):new Uint8Array,t.value=void 0!==e.value&&null!==e.value?ge(e.value):new Uint8Array,t.proofOps=void 0!==e.proofOps&&null!==e.proofOps?c.ProofOps.fromJSON(e.proofOps):void 0,t.height=void 0!==e.height&&null!==e.height?o.default.fromString(e.height):o.default.ZERO,t.codespace=void 0!==e.codespace&&null!==e.codespace?String(e.codespace):"",t},toJSON(e){const t={};return void 0!==e.code&&(t.code=e.code),void 0!==e.log&&(t.log=e.log),void 0!==e.info&&(t.info=e.info),void 0!==e.index&&(t.index=(e.index||o.default.ZERO).toString()),void 0!==e.key&&(t.key=me(void 0!==e.key?e.key:new Uint8Array)),void 0!==e.value&&(t.value=me(void 0!==e.value?e.value:new Uint8Array)),void 0!==e.proofOps&&(t.proofOps=e.proofOps?c.ProofOps.toJSON(e.proofOps):void 0),void 0!==e.height&&(t.height=(e.height||o.default.ZERO).toString()),void 0!==e.codespace&&(t.codespace=e.codespace),t},fromPartial(e){var t,n,r,i,a,s;const d=Object.assign({},Y);return d.code=null!==(t=e.code)&&void 0!==t?t:0,d.log=null!==(n=e.log)&&void 0!==n?n:"",d.info=null!==(r=e.info)&&void 0!==r?r:"",d.index=void 0!==e.index&&null!==e.index?o.default.fromValue(e.index):o.default.ZERO,d.key=null!==(i=e.key)&&void 0!==i?i:new Uint8Array,d.value=null!==(a=e.value)&&void 0!==a?a:new Uint8Array,d.proofOps=void 0!==e.proofOps&&null!==e.proofOps?c.ProofOps.fromPartial(e.proofOps):void 0,d.height=void 0!==e.height&&null!==e.height?o.default.fromValue(e.height):o.default.ZERO,d.codespace=null!==(s=e.codespace)&&void 0!==s?s:"",d}};const V={};t.ResponseBeginBlock={encode(e,n=i.default.Writer.create()){for(const r of e.events)t.Event.encode(r,n.uint32(10).fork()).ldelim();return n},decode(e,n){const r=e instanceof i.default.Reader?e:new i.default.Reader(e);let o=void 0===n?r.len:r.pos+n;const a=Object.assign({},V);for(a.events=[];r.pos>>3==1?a.events.push(t.Event.decode(r,r.uint32())):r.skipType(7&e)}return a},fromJSON(e){var n;const r=Object.assign({},V);return r.events=(null!==(n=e.events)&&void 0!==n?n:[]).map((e=>t.Event.fromJSON(e))),r},toJSON(e){const n={};return e.events?n.events=e.events.map((e=>e?t.Event.toJSON(e):void 0)):n.events=[],n},fromPartial(e){var n;const r=Object.assign({},V);return r.events=(null===(n=e.events)||void 0===n?void 0:n.map((e=>t.Event.fromPartial(e))))||[],r}};const W={code:0,log:"",info:"",gasWanted:o.default.ZERO,gasUsed:o.default.ZERO,codespace:""};t.ResponseCheckTx={encode(e,n=i.default.Writer.create()){0!==e.code&&n.uint32(8).uint32(e.code),0!==e.data.length&&n.uint32(18).bytes(e.data),""!==e.log&&n.uint32(26).string(e.log),""!==e.info&&n.uint32(34).string(e.info),e.gasWanted.isZero()||n.uint32(40).int64(e.gasWanted),e.gasUsed.isZero()||n.uint32(48).int64(e.gasUsed);for(const r of e.events)t.Event.encode(r,n.uint32(58).fork()).ldelim();return""!==e.codespace&&n.uint32(66).string(e.codespace),n},decode(e,n){const r=e instanceof i.default.Reader?e:new i.default.Reader(e);let o=void 0===n?r.len:r.pos+n;const a=Object.assign({},W);for(a.events=[],a.data=new Uint8Array;r.pos>>3){case 1:a.code=r.uint32();break;case 2:a.data=r.bytes();break;case 3:a.log=r.string();break;case 4:a.info=r.string();break;case 5:a.gasWanted=r.int64();break;case 6:a.gasUsed=r.int64();break;case 7:a.events.push(t.Event.decode(r,r.uint32()));break;case 8:a.codespace=r.string();break;default:r.skipType(7&e)}}return a},fromJSON(e){var n;const r=Object.assign({},W);return r.code=void 0!==e.code&&null!==e.code?Number(e.code):0,r.data=void 0!==e.data&&null!==e.data?ge(e.data):new Uint8Array,r.log=void 0!==e.log&&null!==e.log?String(e.log):"",r.info=void 0!==e.info&&null!==e.info?String(e.info):"",r.gasWanted=void 0!==e.gas_wanted&&null!==e.gas_wanted?o.default.fromString(e.gas_wanted):o.default.ZERO,r.gasUsed=void 0!==e.gas_used&&null!==e.gas_used?o.default.fromString(e.gas_used):o.default.ZERO,r.events=(null!==(n=e.events)&&void 0!==n?n:[]).map((e=>t.Event.fromJSON(e))),r.codespace=void 0!==e.codespace&&null!==e.codespace?String(e.codespace):"",r},toJSON(e){const n={};return void 0!==e.code&&(n.code=e.code),void 0!==e.data&&(n.data=me(void 0!==e.data?e.data:new Uint8Array)),void 0!==e.log&&(n.log=e.log),void 0!==e.info&&(n.info=e.info),void 0!==e.gasWanted&&(n.gas_wanted=(e.gasWanted||o.default.ZERO).toString()),void 0!==e.gasUsed&&(n.gas_used=(e.gasUsed||o.default.ZERO).toString()),e.events?n.events=e.events.map((e=>e?t.Event.toJSON(e):void 0)):n.events=[],void 0!==e.codespace&&(n.codespace=e.codespace),n},fromPartial(e){var n,r,i,a,s,c;const d=Object.assign({},W);return d.code=null!==(n=e.code)&&void 0!==n?n:0,d.data=null!==(r=e.data)&&void 0!==r?r:new Uint8Array,d.log=null!==(i=e.log)&&void 0!==i?i:"",d.info=null!==(a=e.info)&&void 0!==a?a:"",d.gasWanted=void 0!==e.gasWanted&&null!==e.gasWanted?o.default.fromValue(e.gasWanted):o.default.ZERO,d.gasUsed=void 0!==e.gasUsed&&null!==e.gasUsed?o.default.fromValue(e.gasUsed):o.default.ZERO,d.events=(null===(s=e.events)||void 0===s?void 0:s.map((e=>t.Event.fromPartial(e))))||[],d.codespace=null!==(c=e.codespace)&&void 0!==c?c:"",d}};const K={code:0,log:"",info:"",gasWanted:o.default.ZERO,gasUsed:o.default.ZERO,codespace:""};t.ResponseDeliverTx={encode(e,n=i.default.Writer.create()){0!==e.code&&n.uint32(8).uint32(e.code),0!==e.data.length&&n.uint32(18).bytes(e.data),""!==e.log&&n.uint32(26).string(e.log),""!==e.info&&n.uint32(34).string(e.info),e.gasWanted.isZero()||n.uint32(40).int64(e.gasWanted),e.gasUsed.isZero()||n.uint32(48).int64(e.gasUsed);for(const r of e.events)t.Event.encode(r,n.uint32(58).fork()).ldelim();return""!==e.codespace&&n.uint32(66).string(e.codespace),n},decode(e,n){const r=e instanceof i.default.Reader?e:new i.default.Reader(e);let o=void 0===n?r.len:r.pos+n;const a=Object.assign({},K);for(a.events=[],a.data=new Uint8Array;r.pos>>3){case 1:a.code=r.uint32();break;case 2:a.data=r.bytes();break;case 3:a.log=r.string();break;case 4:a.info=r.string();break;case 5:a.gasWanted=r.int64();break;case 6:a.gasUsed=r.int64();break;case 7:a.events.push(t.Event.decode(r,r.uint32()));break;case 8:a.codespace=r.string();break;default:r.skipType(7&e)}}return a},fromJSON(e){var n;const r=Object.assign({},K);return r.code=void 0!==e.code&&null!==e.code?Number(e.code):0,r.data=void 0!==e.data&&null!==e.data?ge(e.data):new Uint8Array,r.log=void 0!==e.log&&null!==e.log?String(e.log):"",r.info=void 0!==e.info&&null!==e.info?String(e.info):"",r.gasWanted=void 0!==e.gas_wanted&&null!==e.gas_wanted?o.default.fromString(e.gas_wanted):o.default.ZERO,r.gasUsed=void 0!==e.gas_used&&null!==e.gas_used?o.default.fromString(e.gas_used):o.default.ZERO,r.events=(null!==(n=e.events)&&void 0!==n?n:[]).map((e=>t.Event.fromJSON(e))),r.codespace=void 0!==e.codespace&&null!==e.codespace?String(e.codespace):"",r},toJSON(e){const n={};return void 0!==e.code&&(n.code=e.code),void 0!==e.data&&(n.data=me(void 0!==e.data?e.data:new Uint8Array)),void 0!==e.log&&(n.log=e.log),void 0!==e.info&&(n.info=e.info),void 0!==e.gasWanted&&(n.gas_wanted=(e.gasWanted||o.default.ZERO).toString()),void 0!==e.gasUsed&&(n.gas_used=(e.gasUsed||o.default.ZERO).toString()),e.events?n.events=e.events.map((e=>e?t.Event.toJSON(e):void 0)):n.events=[],void 0!==e.codespace&&(n.codespace=e.codespace),n},fromPartial(e){var n,r,i,a,s,c;const d=Object.assign({},K);return d.code=null!==(n=e.code)&&void 0!==n?n:0,d.data=null!==(r=e.data)&&void 0!==r?r:new Uint8Array,d.log=null!==(i=e.log)&&void 0!==i?i:"",d.info=null!==(a=e.info)&&void 0!==a?a:"",d.gasWanted=void 0!==e.gasWanted&&null!==e.gasWanted?o.default.fromValue(e.gasWanted):o.default.ZERO,d.gasUsed=void 0!==e.gasUsed&&null!==e.gasUsed?o.default.fromValue(e.gasUsed):o.default.ZERO,d.events=(null===(s=e.events)||void 0===s?void 0:s.map((e=>t.Event.fromPartial(e))))||[],d.codespace=null!==(c=e.codespace)&&void 0!==c?c:"",d}};const Z={};t.ResponseEndBlock={encode(e,n=i.default.Writer.create()){for(const r of e.validatorUpdates)t.ValidatorUpdate.encode(r,n.uint32(10).fork()).ldelim();void 0!==e.consensusParamUpdates&&t.ConsensusParams.encode(e.consensusParamUpdates,n.uint32(18).fork()).ldelim();for(const r of e.events)t.Event.encode(r,n.uint32(26).fork()).ldelim();return n},decode(e,n){const r=e instanceof i.default.Reader?e:new i.default.Reader(e);let o=void 0===n?r.len:r.pos+n;const a=Object.assign({},Z);for(a.validatorUpdates=[],a.events=[];r.pos>>3){case 1:a.validatorUpdates.push(t.ValidatorUpdate.decode(r,r.uint32()));break;case 2:a.consensusParamUpdates=t.ConsensusParams.decode(r,r.uint32());break;case 3:a.events.push(t.Event.decode(r,r.uint32()));break;default:r.skipType(7&e)}}return a},fromJSON(e){var n,r;const o=Object.assign({},Z);return o.validatorUpdates=(null!==(n=e.validatorUpdates)&&void 0!==n?n:[]).map((e=>t.ValidatorUpdate.fromJSON(e))),o.consensusParamUpdates=void 0!==e.consensusParamUpdates&&null!==e.consensusParamUpdates?t.ConsensusParams.fromJSON(e.consensusParamUpdates):void 0,o.events=(null!==(r=e.events)&&void 0!==r?r:[]).map((e=>t.Event.fromJSON(e))),o},toJSON(e){const n={};return e.validatorUpdates?n.validatorUpdates=e.validatorUpdates.map((e=>e?t.ValidatorUpdate.toJSON(e):void 0)):n.validatorUpdates=[],void 0!==e.consensusParamUpdates&&(n.consensusParamUpdates=e.consensusParamUpdates?t.ConsensusParams.toJSON(e.consensusParamUpdates):void 0),e.events?n.events=e.events.map((e=>e?t.Event.toJSON(e):void 0)):n.events=[],n},fromPartial(e){var n,r;const o=Object.assign({},Z);return o.validatorUpdates=(null===(n=e.validatorUpdates)||void 0===n?void 0:n.map((e=>t.ValidatorUpdate.fromPartial(e))))||[],o.consensusParamUpdates=void 0!==e.consensusParamUpdates&&null!==e.consensusParamUpdates?t.ConsensusParams.fromPartial(e.consensusParamUpdates):void 0,o.events=(null===(r=e.events)||void 0===r?void 0:r.map((e=>t.Event.fromPartial(e))))||[],o}};const z={retainHeight:o.default.ZERO};t.ResponseCommit={encode:(e,t=i.default.Writer.create())=>(0!==e.data.length&&t.uint32(18).bytes(e.data),e.retainHeight.isZero()||t.uint32(24).int64(e.retainHeight),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},z);for(o.data=new Uint8Array;n.pos>>3){case 2:o.data=n.bytes();break;case 3:o.retainHeight=n.int64();break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},z);return t.data=void 0!==e.data&&null!==e.data?ge(e.data):new Uint8Array,t.retainHeight=void 0!==e.retainHeight&&null!==e.retainHeight?o.default.fromString(e.retainHeight):o.default.ZERO,t},toJSON(e){const t={};return void 0!==e.data&&(t.data=me(void 0!==e.data?e.data:new Uint8Array)),void 0!==e.retainHeight&&(t.retainHeight=(e.retainHeight||o.default.ZERO).toString()),t},fromPartial(e){var t;const n=Object.assign({},z);return n.data=null!==(t=e.data)&&void 0!==t?t:new Uint8Array,n.retainHeight=void 0!==e.retainHeight&&null!==e.retainHeight?o.default.fromValue(e.retainHeight):o.default.ZERO,n}};const X={};t.ResponseListSnapshots={encode(e,n=i.default.Writer.create()){for(const r of e.snapshots)t.Snapshot.encode(r,n.uint32(10).fork()).ldelim();return n},decode(e,n){const r=e instanceof i.default.Reader?e:new i.default.Reader(e);let o=void 0===n?r.len:r.pos+n;const a=Object.assign({},X);for(a.snapshots=[];r.pos>>3==1?a.snapshots.push(t.Snapshot.decode(r,r.uint32())):r.skipType(7&e)}return a},fromJSON(e){var n;const r=Object.assign({},X);return r.snapshots=(null!==(n=e.snapshots)&&void 0!==n?n:[]).map((e=>t.Snapshot.fromJSON(e))),r},toJSON(e){const n={};return e.snapshots?n.snapshots=e.snapshots.map((e=>e?t.Snapshot.toJSON(e):void 0)):n.snapshots=[],n},fromPartial(e){var n;const r=Object.assign({},X);return r.snapshots=(null===(n=e.snapshots)||void 0===n?void 0:n.map((e=>t.Snapshot.fromPartial(e))))||[],r}};const $={result:0};t.ResponseOfferSnapshot={encode:(e,t=i.default.Writer.create())=>(0!==e.result&&t.uint32(8).int32(e.result),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},$);for(;n.pos>>3==1?o.result=n.int32():n.skipType(7&e)}return o},fromJSON(e){const t=Object.assign({},$);return t.result=void 0!==e.result&&null!==e.result?y(e.result):0,t},toJSON(e){const t={};return void 0!==e.result&&(t.result=b(e.result)),t},fromPartial(e){var t;const n=Object.assign({},$);return n.result=null!==(t=e.result)&&void 0!==t?t:0,n}};const ee={};t.ResponseLoadSnapshotChunk={encode:(e,t=i.default.Writer.create())=>(0!==e.chunk.length&&t.uint32(10).bytes(e.chunk),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},ee);for(o.chunk=new Uint8Array;n.pos>>3==1?o.chunk=n.bytes():n.skipType(7&e)}return o},fromJSON(e){const t=Object.assign({},ee);return t.chunk=void 0!==e.chunk&&null!==e.chunk?ge(e.chunk):new Uint8Array,t},toJSON(e){const t={};return void 0!==e.chunk&&(t.chunk=me(void 0!==e.chunk?e.chunk:new Uint8Array)),t},fromPartial(e){var t;const n=Object.assign({},ee);return n.chunk=null!==(t=e.chunk)&&void 0!==t?t:new Uint8Array,n}};const te={result:0,refetchChunks:0,rejectSenders:""};t.ResponseApplySnapshotChunk={encode(e,t=i.default.Writer.create()){0!==e.result&&t.uint32(8).int32(e.result),t.uint32(18).fork();for(const n of e.refetchChunks)t.uint32(n);t.ldelim();for(const n of e.rejectSenders)t.uint32(26).string(n);return t},decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},te);for(o.refetchChunks=[],o.rejectSenders=[];n.pos>>3){case 1:o.result=n.int32();break;case 2:if(2==(7&e)){const e=n.uint32()+n.pos;for(;n.posNumber(e))),r.rejectSenders=(null!==(n=e.rejectSenders)&&void 0!==n?n:[]).map((e=>String(e))),r},toJSON(e){const t={};return void 0!==e.result&&(t.result=C(e.result)),e.refetchChunks?t.refetchChunks=e.refetchChunks.map((e=>e)):t.refetchChunks=[],e.rejectSenders?t.rejectSenders=e.rejectSenders.map((e=>e)):t.rejectSenders=[],t},fromPartial(e){var t,n,r;const o=Object.assign({},te);return o.result=null!==(t=e.result)&&void 0!==t?t:0,o.refetchChunks=(null===(n=e.refetchChunks)||void 0===n?void 0:n.map((e=>e)))||[],o.rejectSenders=(null===(r=e.rejectSenders)||void 0===r?void 0:r.map((e=>e)))||[],o}};const ne={};t.ConsensusParams={encode:(e,n=i.default.Writer.create())=>(void 0!==e.block&&t.BlockParams.encode(e.block,n.uint32(10).fork()).ldelim(),void 0!==e.evidence&&d.EvidenceParams.encode(e.evidence,n.uint32(18).fork()).ldelim(),void 0!==e.validator&&d.ValidatorParams.encode(e.validator,n.uint32(26).fork()).ldelim(),void 0!==e.version&&d.VersionParams.encode(e.version,n.uint32(34).fork()).ldelim(),n),decode(e,n){const r=e instanceof i.default.Reader?e:new i.default.Reader(e);let o=void 0===n?r.len:r.pos+n;const a=Object.assign({},ne);for(;r.pos>>3){case 1:a.block=t.BlockParams.decode(r,r.uint32());break;case 2:a.evidence=d.EvidenceParams.decode(r,r.uint32());break;case 3:a.validator=d.ValidatorParams.decode(r,r.uint32());break;case 4:a.version=d.VersionParams.decode(r,r.uint32());break;default:r.skipType(7&e)}}return a},fromJSON(e){const n=Object.assign({},ne);return n.block=void 0!==e.block&&null!==e.block?t.BlockParams.fromJSON(e.block):void 0,n.evidence=void 0!==e.evidence&&null!==e.evidence?d.EvidenceParams.fromJSON(e.evidence):void 0,n.validator=void 0!==e.validator&&null!==e.validator?d.ValidatorParams.fromJSON(e.validator):void 0,n.version=void 0!==e.version&&null!==e.version?d.VersionParams.fromJSON(e.version):void 0,n},toJSON(e){const n={};return void 0!==e.block&&(n.block=e.block?t.BlockParams.toJSON(e.block):void 0),void 0!==e.evidence&&(n.evidence=e.evidence?d.EvidenceParams.toJSON(e.evidence):void 0),void 0!==e.validator&&(n.validator=e.validator?d.ValidatorParams.toJSON(e.validator):void 0),void 0!==e.version&&(n.version=e.version?d.VersionParams.toJSON(e.version):void 0),n},fromPartial(e){const n=Object.assign({},ne);return n.block=void 0!==e.block&&null!==e.block?t.BlockParams.fromPartial(e.block):void 0,n.evidence=void 0!==e.evidence&&null!==e.evidence?d.EvidenceParams.fromPartial(e.evidence):void 0,n.validator=void 0!==e.validator&&null!==e.validator?d.ValidatorParams.fromPartial(e.validator):void 0,n.version=void 0!==e.version&&null!==e.version?d.VersionParams.fromPartial(e.version):void 0,n}};const re={maxBytes:o.default.ZERO,maxGas:o.default.ZERO};t.BlockParams={encode:(e,t=i.default.Writer.create())=>(e.maxBytes.isZero()||t.uint32(8).int64(e.maxBytes),e.maxGas.isZero()||t.uint32(16).int64(e.maxGas),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},re);for(;n.pos>>3){case 1:o.maxBytes=n.int64();break;case 2:o.maxGas=n.int64();break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},re);return t.maxBytes=void 0!==e.maxBytes&&null!==e.maxBytes?o.default.fromString(e.maxBytes):o.default.ZERO,t.maxGas=void 0!==e.maxGas&&null!==e.maxGas?o.default.fromString(e.maxGas):o.default.ZERO,t},toJSON(e){const t={};return void 0!==e.maxBytes&&(t.maxBytes=(e.maxBytes||o.default.ZERO).toString()),void 0!==e.maxGas&&(t.maxGas=(e.maxGas||o.default.ZERO).toString()),t},fromPartial(e){const t=Object.assign({},re);return t.maxBytes=void 0!==e.maxBytes&&null!==e.maxBytes?o.default.fromValue(e.maxBytes):o.default.ZERO,t.maxGas=void 0!==e.maxGas&&null!==e.maxGas?o.default.fromValue(e.maxGas):o.default.ZERO,t}};const oe={round:0};t.LastCommitInfo={encode(e,n=i.default.Writer.create()){0!==e.round&&n.uint32(8).int32(e.round);for(const r of e.votes)t.VoteInfo.encode(r,n.uint32(18).fork()).ldelim();return n},decode(e,n){const r=e instanceof i.default.Reader?e:new i.default.Reader(e);let o=void 0===n?r.len:r.pos+n;const a=Object.assign({},oe);for(a.votes=[];r.pos>>3){case 1:a.round=r.int32();break;case 2:a.votes.push(t.VoteInfo.decode(r,r.uint32()));break;default:r.skipType(7&e)}}return a},fromJSON(e){var n;const r=Object.assign({},oe);return r.round=void 0!==e.round&&null!==e.round?Number(e.round):0,r.votes=(null!==(n=e.votes)&&void 0!==n?n:[]).map((e=>t.VoteInfo.fromJSON(e))),r},toJSON(e){const n={};return void 0!==e.round&&(n.round=e.round),e.votes?n.votes=e.votes.map((e=>e?t.VoteInfo.toJSON(e):void 0)):n.votes=[],n},fromPartial(e){var n,r;const o=Object.assign({},oe);return o.round=null!==(n=e.round)&&void 0!==n?n:0,o.votes=(null===(r=e.votes)||void 0===r?void 0:r.map((e=>t.VoteInfo.fromPartial(e))))||[],o}};const ie={type:""};t.Event={encode(e,n=i.default.Writer.create()){""!==e.type&&n.uint32(10).string(e.type);for(const r of e.attributes)t.EventAttribute.encode(r,n.uint32(18).fork()).ldelim();return n},decode(e,n){const r=e instanceof i.default.Reader?e:new i.default.Reader(e);let o=void 0===n?r.len:r.pos+n;const a=Object.assign({},ie);for(a.attributes=[];r.pos>>3){case 1:a.type=r.string();break;case 2:a.attributes.push(t.EventAttribute.decode(r,r.uint32()));break;default:r.skipType(7&e)}}return a},fromJSON(e){var n;const r=Object.assign({},ie);return r.type=void 0!==e.type&&null!==e.type?String(e.type):"",r.attributes=(null!==(n=e.attributes)&&void 0!==n?n:[]).map((e=>t.EventAttribute.fromJSON(e))),r},toJSON(e){const n={};return void 0!==e.type&&(n.type=e.type),e.attributes?n.attributes=e.attributes.map((e=>e?t.EventAttribute.toJSON(e):void 0)):n.attributes=[],n},fromPartial(e){var n,r;const o=Object.assign({},ie);return o.type=null!==(n=e.type)&&void 0!==n?n:"",o.attributes=(null===(r=e.attributes)||void 0===r?void 0:r.map((e=>t.EventAttribute.fromPartial(e))))||[],o}};const ae={index:!1};t.EventAttribute={encode:(e,t=i.default.Writer.create())=>(0!==e.key.length&&t.uint32(10).bytes(e.key),0!==e.value.length&&t.uint32(18).bytes(e.value),!0===e.index&&t.uint32(24).bool(e.index),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},ae);for(o.key=new Uint8Array,o.value=new Uint8Array;n.pos>>3){case 1:o.key=n.bytes();break;case 2:o.value=n.bytes();break;case 3:o.index=n.bool();break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},ae);return t.key=void 0!==e.key&&null!==e.key?ge(e.key):new Uint8Array,t.value=void 0!==e.value&&null!==e.value?ge(e.value):new Uint8Array,t.index=void 0!==e.index&&null!==e.index&&Boolean(e.index),t},toJSON(e){const t={};return void 0!==e.key&&(t.key=me(void 0!==e.key?e.key:new Uint8Array)),void 0!==e.value&&(t.value=me(void 0!==e.value?e.value:new Uint8Array)),void 0!==e.index&&(t.index=e.index),t},fromPartial(e){var t,n,r;const o=Object.assign({},ae);return o.key=null!==(t=e.key)&&void 0!==t?t:new Uint8Array,o.value=null!==(n=e.value)&&void 0!==n?n:new Uint8Array,o.index=null!==(r=e.index)&&void 0!==r&&r,o}};const se={height:o.default.ZERO,index:0};t.TxResult={encode:(e,n=i.default.Writer.create())=>(e.height.isZero()||n.uint32(8).int64(e.height),0!==e.index&&n.uint32(16).uint32(e.index),0!==e.tx.length&&n.uint32(26).bytes(e.tx),void 0!==e.result&&t.ResponseDeliverTx.encode(e.result,n.uint32(34).fork()).ldelim(),n),decode(e,n){const r=e instanceof i.default.Reader?e:new i.default.Reader(e);let o=void 0===n?r.len:r.pos+n;const a=Object.assign({},se);for(a.tx=new Uint8Array;r.pos>>3){case 1:a.height=r.int64();break;case 2:a.index=r.uint32();break;case 3:a.tx=r.bytes();break;case 4:a.result=t.ResponseDeliverTx.decode(r,r.uint32());break;default:r.skipType(7&e)}}return a},fromJSON(e){const n=Object.assign({},se);return n.height=void 0!==e.height&&null!==e.height?o.default.fromString(e.height):o.default.ZERO,n.index=void 0!==e.index&&null!==e.index?Number(e.index):0,n.tx=void 0!==e.tx&&null!==e.tx?ge(e.tx):new Uint8Array,n.result=void 0!==e.result&&null!==e.result?t.ResponseDeliverTx.fromJSON(e.result):void 0,n},toJSON(e){const n={};return void 0!==e.height&&(n.height=(e.height||o.default.ZERO).toString()),void 0!==e.index&&(n.index=e.index),void 0!==e.tx&&(n.tx=me(void 0!==e.tx?e.tx:new Uint8Array)),void 0!==e.result&&(n.result=e.result?t.ResponseDeliverTx.toJSON(e.result):void 0),n},fromPartial(e){var n,r;const i=Object.assign({},se);return i.height=void 0!==e.height&&null!==e.height?o.default.fromValue(e.height):o.default.ZERO,i.index=null!==(n=e.index)&&void 0!==n?n:0,i.tx=null!==(r=e.tx)&&void 0!==r?r:new Uint8Array,i.result=void 0!==e.result&&null!==e.result?t.ResponseDeliverTx.fromPartial(e.result):void 0,i}};const ce={power:o.default.ZERO};t.Validator={encode:(e,t=i.default.Writer.create())=>(0!==e.address.length&&t.uint32(10).bytes(e.address),e.power.isZero()||t.uint32(24).int64(e.power),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},ce);for(o.address=new Uint8Array;n.pos>>3){case 1:o.address=n.bytes();break;case 3:o.power=n.int64();break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},ce);return t.address=void 0!==e.address&&null!==e.address?ge(e.address):new Uint8Array,t.power=void 0!==e.power&&null!==e.power?o.default.fromString(e.power):o.default.ZERO,t},toJSON(e){const t={};return void 0!==e.address&&(t.address=me(void 0!==e.address?e.address:new Uint8Array)),void 0!==e.power&&(t.power=(e.power||o.default.ZERO).toString()),t},fromPartial(e){var t;const n=Object.assign({},ce);return n.address=null!==(t=e.address)&&void 0!==t?t:new Uint8Array,n.power=void 0!==e.power&&null!==e.power?o.default.fromValue(e.power):o.default.ZERO,n}};const de={power:o.default.ZERO};t.ValidatorUpdate={encode:(e,t=i.default.Writer.create())=>(void 0!==e.pubKey&&u.PublicKey.encode(e.pubKey,t.uint32(10).fork()).ldelim(),e.power.isZero()||t.uint32(16).int64(e.power),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},de);for(;n.pos>>3){case 1:o.pubKey=u.PublicKey.decode(n,n.uint32());break;case 2:o.power=n.int64();break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},de);return t.pubKey=void 0!==e.pubKey&&null!==e.pubKey?u.PublicKey.fromJSON(e.pubKey):void 0,t.power=void 0!==e.power&&null!==e.power?o.default.fromString(e.power):o.default.ZERO,t},toJSON(e){const t={};return void 0!==e.pubKey&&(t.pubKey=e.pubKey?u.PublicKey.toJSON(e.pubKey):void 0),void 0!==e.power&&(t.power=(e.power||o.default.ZERO).toString()),t},fromPartial(e){const t=Object.assign({},de);return t.pubKey=void 0!==e.pubKey&&null!==e.pubKey?u.PublicKey.fromPartial(e.pubKey):void 0,t.power=void 0!==e.power&&null!==e.power?o.default.fromValue(e.power):o.default.ZERO,t}};const ue={signedLastBlock:!1};t.VoteInfo={encode:(e,n=i.default.Writer.create())=>(void 0!==e.validator&&t.Validator.encode(e.validator,n.uint32(10).fork()).ldelim(),!0===e.signedLastBlock&&n.uint32(16).bool(e.signedLastBlock),n),decode(e,n){const r=e instanceof i.default.Reader?e:new i.default.Reader(e);let o=void 0===n?r.len:r.pos+n;const a=Object.assign({},ue);for(;r.pos>>3){case 1:a.validator=t.Validator.decode(r,r.uint32());break;case 2:a.signedLastBlock=r.bool();break;default:r.skipType(7&e)}}return a},fromJSON(e){const n=Object.assign({},ue);return n.validator=void 0!==e.validator&&null!==e.validator?t.Validator.fromJSON(e.validator):void 0,n.signedLastBlock=void 0!==e.signedLastBlock&&null!==e.signedLastBlock&&Boolean(e.signedLastBlock),n},toJSON(e){const n={};return void 0!==e.validator&&(n.validator=e.validator?t.Validator.toJSON(e.validator):void 0),void 0!==e.signedLastBlock&&(n.signedLastBlock=e.signedLastBlock),n},fromPartial(e){var n;const r=Object.assign({},ue);return r.validator=void 0!==e.validator&&null!==e.validator?t.Validator.fromPartial(e.validator):void 0,r.signedLastBlock=null!==(n=e.signedLastBlock)&&void 0!==n&&n,r}};const le={type:0,height:o.default.ZERO,totalVotingPower:o.default.ZERO};t.Evidence={encode:(e,n=i.default.Writer.create())=>(0!==e.type&&n.uint32(8).int32(e.type),void 0!==e.validator&&t.Validator.encode(e.validator,n.uint32(18).fork()).ldelim(),e.height.isZero()||n.uint32(24).int64(e.height),void 0!==e.time&&a.Timestamp.encode(e.time,n.uint32(34).fork()).ldelim(),e.totalVotingPower.isZero()||n.uint32(40).int64(e.totalVotingPower),n),decode(e,n){const r=e instanceof i.default.Reader?e:new i.default.Reader(e);let o=void 0===n?r.len:r.pos+n;const s=Object.assign({},le);for(;r.pos>>3){case 1:s.type=r.int32();break;case 2:s.validator=t.Validator.decode(r,r.uint32());break;case 3:s.height=r.int64();break;case 4:s.time=a.Timestamp.decode(r,r.uint32());break;case 5:s.totalVotingPower=r.int64();break;default:r.skipType(7&e)}}return s},fromJSON(e){const n=Object.assign({},le);return n.type=void 0!==e.type&&null!==e.type?m(e.type):0,n.validator=void 0!==e.validator&&null!==e.validator?t.Validator.fromJSON(e.validator):void 0,n.height=void 0!==e.height&&null!==e.height?o.default.fromString(e.height):o.default.ZERO,n.time=void 0!==e.time&&null!==e.time?be(e.time):void 0,n.totalVotingPower=void 0!==e.totalVotingPower&&null!==e.totalVotingPower?o.default.fromString(e.totalVotingPower):o.default.ZERO,n},toJSON(e){const n={};return void 0!==e.type&&(n.type=v(e.type)),void 0!==e.validator&&(n.validator=e.validator?t.Validator.toJSON(e.validator):void 0),void 0!==e.height&&(n.height=(e.height||o.default.ZERO).toString()),void 0!==e.time&&(n.time=ye(e.time).toISOString()),void 0!==e.totalVotingPower&&(n.totalVotingPower=(e.totalVotingPower||o.default.ZERO).toString()),n},fromPartial(e){var n;const r=Object.assign({},le);return r.type=null!==(n=e.type)&&void 0!==n?n:0,r.validator=void 0!==e.validator&&null!==e.validator?t.Validator.fromPartial(e.validator):void 0,r.height=void 0!==e.height&&null!==e.height?o.default.fromValue(e.height):o.default.ZERO,r.time=void 0!==e.time&&null!==e.time?a.Timestamp.fromPartial(e.time):void 0,r.totalVotingPower=void 0!==e.totalVotingPower&&null!==e.totalVotingPower?o.default.fromValue(e.totalVotingPower):o.default.ZERO,r}};const Ae={height:o.default.UZERO,format:0,chunks:0};t.Snapshot={encode:(e,t=i.default.Writer.create())=>(e.height.isZero()||t.uint32(8).uint64(e.height),0!==e.format&&t.uint32(16).uint32(e.format),0!==e.chunks&&t.uint32(24).uint32(e.chunks),0!==e.hash.length&&t.uint32(34).bytes(e.hash),0!==e.metadata.length&&t.uint32(42).bytes(e.metadata),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},Ae);for(o.hash=new Uint8Array,o.metadata=new Uint8Array;n.pos>>3){case 1:o.height=n.uint64();break;case 2:o.format=n.uint32();break;case 3:o.chunks=n.uint32();break;case 4:o.hash=n.bytes();break;case 5:o.metadata=n.bytes();break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},Ae);return t.height=void 0!==e.height&&null!==e.height?o.default.fromString(e.height):o.default.UZERO,t.format=void 0!==e.format&&null!==e.format?Number(e.format):0,t.chunks=void 0!==e.chunks&&null!==e.chunks?Number(e.chunks):0,t.hash=void 0!==e.hash&&null!==e.hash?ge(e.hash):new Uint8Array,t.metadata=void 0!==e.metadata&&null!==e.metadata?ge(e.metadata):new Uint8Array,t},toJSON(e){const t={};return void 0!==e.height&&(t.height=(e.height||o.default.UZERO).toString()),void 0!==e.format&&(t.format=e.format),void 0!==e.chunks&&(t.chunks=e.chunks),void 0!==e.hash&&(t.hash=me(void 0!==e.hash?e.hash:new Uint8Array)),void 0!==e.metadata&&(t.metadata=me(void 0!==e.metadata?e.metadata:new Uint8Array)),t},fromPartial(e){var t,n,r,i;const a=Object.assign({},Ae);return a.height=void 0!==e.height&&null!==e.height?o.default.fromValue(e.height):o.default.UZERO,a.format=null!==(t=e.format)&&void 0!==t?t:0,a.chunks=null!==(n=e.chunks)&&void 0!==n?n:0,a.hash=null!==(r=e.hash)&&void 0!==r?r:new Uint8Array,a.metadata=null!==(i=e.metadata)&&void 0!==i?i:new Uint8Array,a}},t.ABCIApplicationClientImpl=class{constructor(e){this.rpc=e,this.Echo=this.Echo.bind(this),this.Flush=this.Flush.bind(this),this.Info=this.Info.bind(this),this.SetOption=this.SetOption.bind(this),this.DeliverTx=this.DeliverTx.bind(this),this.CheckTx=this.CheckTx.bind(this),this.Query=this.Query.bind(this),this.Commit=this.Commit.bind(this),this.InitChain=this.InitChain.bind(this),this.BeginBlock=this.BeginBlock.bind(this),this.EndBlock=this.EndBlock.bind(this),this.ListSnapshots=this.ListSnapshots.bind(this),this.OfferSnapshot=this.OfferSnapshot.bind(this),this.LoadSnapshotChunk=this.LoadSnapshotChunk.bind(this),this.ApplySnapshotChunk=this.ApplySnapshotChunk.bind(this)}Echo(e){const n=t.RequestEcho.encode(e).finish();return this.rpc.request("tendermint.abci.ABCIApplication","Echo",n).then((e=>t.ResponseEcho.decode(new i.default.Reader(e))))}Flush(e){const n=t.RequestFlush.encode(e).finish();return this.rpc.request("tendermint.abci.ABCIApplication","Flush",n).then((e=>t.ResponseFlush.decode(new i.default.Reader(e))))}Info(e){const n=t.RequestInfo.encode(e).finish();return this.rpc.request("tendermint.abci.ABCIApplication","Info",n).then((e=>t.ResponseInfo.decode(new i.default.Reader(e))))}SetOption(e){const n=t.RequestSetOption.encode(e).finish();return this.rpc.request("tendermint.abci.ABCIApplication","SetOption",n).then((e=>t.ResponseSetOption.decode(new i.default.Reader(e))))}DeliverTx(e){const n=t.RequestDeliverTx.encode(e).finish();return this.rpc.request("tendermint.abci.ABCIApplication","DeliverTx",n).then((e=>t.ResponseDeliverTx.decode(new i.default.Reader(e))))}CheckTx(e){const n=t.RequestCheckTx.encode(e).finish();return this.rpc.request("tendermint.abci.ABCIApplication","CheckTx",n).then((e=>t.ResponseCheckTx.decode(new i.default.Reader(e))))}Query(e){const n=t.RequestQuery.encode(e).finish();return this.rpc.request("tendermint.abci.ABCIApplication","Query",n).then((e=>t.ResponseQuery.decode(new i.default.Reader(e))))}Commit(e){const n=t.RequestCommit.encode(e).finish();return this.rpc.request("tendermint.abci.ABCIApplication","Commit",n).then((e=>t.ResponseCommit.decode(new i.default.Reader(e))))}InitChain(e){const n=t.RequestInitChain.encode(e).finish();return this.rpc.request("tendermint.abci.ABCIApplication","InitChain",n).then((e=>t.ResponseInitChain.decode(new i.default.Reader(e))))}BeginBlock(e){const n=t.RequestBeginBlock.encode(e).finish();return this.rpc.request("tendermint.abci.ABCIApplication","BeginBlock",n).then((e=>t.ResponseBeginBlock.decode(new i.default.Reader(e))))}EndBlock(e){const n=t.RequestEndBlock.encode(e).finish();return this.rpc.request("tendermint.abci.ABCIApplication","EndBlock",n).then((e=>t.ResponseEndBlock.decode(new i.default.Reader(e))))}ListSnapshots(e){const n=t.RequestListSnapshots.encode(e).finish();return this.rpc.request("tendermint.abci.ABCIApplication","ListSnapshots",n).then((e=>t.ResponseListSnapshots.decode(new i.default.Reader(e))))}OfferSnapshot(e){const n=t.RequestOfferSnapshot.encode(e).finish();return this.rpc.request("tendermint.abci.ABCIApplication","OfferSnapshot",n).then((e=>t.ResponseOfferSnapshot.decode(new i.default.Reader(e))))}LoadSnapshotChunk(e){const n=t.RequestLoadSnapshotChunk.encode(e).finish();return this.rpc.request("tendermint.abci.ABCIApplication","LoadSnapshotChunk",n).then((e=>t.ResponseLoadSnapshotChunk.decode(new i.default.Reader(e))))}ApplySnapshotChunk(e){const n=t.RequestApplySnapshotChunk.encode(e).finish();return this.rpc.request("tendermint.abci.ABCIApplication","ApplySnapshotChunk",n).then((e=>t.ResponseApplySnapshotChunk.decode(new i.default.Reader(e))))}};var fe=(()=>{if(void 0!==fe)return fe;if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==n.g)return n.g;throw"Unable to locate global object"})();const he=fe.atob||(e=>fe.Buffer.from(e,"base64").toString("binary"));function ge(e){const t=he(e),n=new Uint8Array(t.length);for(let e=0;efe.Buffer.from(e,"binary").toString("base64"));function me(e){const t=[];for(const n of e)t.push(String.fromCharCode(n));return pe(t.join(""))}function ve(e){var t;return{seconds:(t=e.getTime()/1e3,o.default.fromNumber(t)),nanos:e.getTime()%1e3*1e6}}function ye(e){let t=1e3*e.seconds.toNumber();return t+=e.nanos/1e6,new Date(t)}function be(e){return e instanceof Date?ve(e):"string"==typeof e?ve(new Date(e)):a.Timestamp.fromJSON(e)}i.default.util.Long!==o.default&&(i.default.util.Long=o.default,i.default.configure())},984:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.PublicKey=t.protobufPackage=void 0;const o=r(n(3720)),i=r(n(3789));t.protobufPackage="tendermint.crypto";const a={};t.PublicKey={encode:(e,t=i.default.Writer.create())=>(void 0!==e.ed25519&&t.uint32(10).bytes(e.ed25519),void 0!==e.secp256k1&&t.uint32(18).bytes(e.secp256k1),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},a);for(;n.pos>>3){case 1:o.ed25519=n.bytes();break;case 2:o.secp256k1=n.bytes();break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},a);return t.ed25519=void 0!==e.ed25519&&null!==e.ed25519?d(e.ed25519):void 0,t.secp256k1=void 0!==e.secp256k1&&null!==e.secp256k1?d(e.secp256k1):void 0,t},toJSON(e){const t={};return void 0!==e.ed25519&&(t.ed25519=void 0!==e.ed25519?l(e.ed25519):void 0),void 0!==e.secp256k1&&(t.secp256k1=void 0!==e.secp256k1?l(e.secp256k1):void 0),t},fromPartial(e){var t,n;const r=Object.assign({},a);return r.ed25519=null!==(t=e.ed25519)&&void 0!==t?t:void 0,r.secp256k1=null!==(n=e.secp256k1)&&void 0!==n?n:void 0,r}};var s=(()=>{if(void 0!==s)return s;if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==n.g)return n.g;throw"Unable to locate global object"})();const c=s.atob||(e=>s.Buffer.from(e,"base64").toString("binary"));function d(e){const t=c(e),n=new Uint8Array(t.length);for(let e=0;es.Buffer.from(e,"binary").toString("base64"));function l(e){const t=[];for(const n of e)t.push(String.fromCharCode(n));return u(t.join(""))}i.default.util.Long!==o.default&&(i.default.util.Long=o.default,i.default.configure())},1494:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ProofOps=t.ProofOp=t.DominoOp=t.ValueOp=t.Proof=t.protobufPackage=void 0;const o=r(n(3720)),i=r(n(3789));t.protobufPackage="tendermint.crypto";const a={total:o.default.ZERO,index:o.default.ZERO};t.Proof={encode(e,t=i.default.Writer.create()){e.total.isZero()||t.uint32(8).int64(e.total),e.index.isZero()||t.uint32(16).int64(e.index),0!==e.leafHash.length&&t.uint32(26).bytes(e.leafHash);for(const n of e.aunts)t.uint32(34).bytes(n);return t},decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},a);for(o.aunts=[],o.leafHash=new Uint8Array;n.pos>>3){case 1:o.total=n.int64();break;case 2:o.index=n.int64();break;case 3:o.leafHash=n.bytes();break;case 4:o.aunts.push(n.bytes());break;default:n.skipType(7&e)}}return o},fromJSON(e){var t;const n=Object.assign({},a);return n.total=void 0!==e.total&&null!==e.total?o.default.fromString(e.total):o.default.ZERO,n.index=void 0!==e.index&&null!==e.index?o.default.fromString(e.index):o.default.ZERO,n.leafHash=void 0!==e.leafHash&&null!==e.leafHash?f(e.leafHash):new Uint8Array,n.aunts=(null!==(t=e.aunts)&&void 0!==t?t:[]).map((e=>f(e))),n},toJSON(e){const t={};return void 0!==e.total&&(t.total=(e.total||o.default.ZERO).toString()),void 0!==e.index&&(t.index=(e.index||o.default.ZERO).toString()),void 0!==e.leafHash&&(t.leafHash=g(void 0!==e.leafHash?e.leafHash:new Uint8Array)),e.aunts?t.aunts=e.aunts.map((e=>g(void 0!==e?e:new Uint8Array))):t.aunts=[],t},fromPartial(e){var t,n;const r=Object.assign({},a);return r.total=void 0!==e.total&&null!==e.total?o.default.fromValue(e.total):o.default.ZERO,r.index=void 0!==e.index&&null!==e.index?o.default.fromValue(e.index):o.default.ZERO,r.leafHash=null!==(t=e.leafHash)&&void 0!==t?t:new Uint8Array,r.aunts=(null===(n=e.aunts)||void 0===n?void 0:n.map((e=>e)))||[],r}};const s={};t.ValueOp={encode:(e,n=i.default.Writer.create())=>(0!==e.key.length&&n.uint32(10).bytes(e.key),void 0!==e.proof&&t.Proof.encode(e.proof,n.uint32(18).fork()).ldelim(),n),decode(e,n){const r=e instanceof i.default.Reader?e:new i.default.Reader(e);let o=void 0===n?r.len:r.pos+n;const a=Object.assign({},s);for(a.key=new Uint8Array;r.pos>>3){case 1:a.key=r.bytes();break;case 2:a.proof=t.Proof.decode(r,r.uint32());break;default:r.skipType(7&e)}}return a},fromJSON(e){const n=Object.assign({},s);return n.key=void 0!==e.key&&null!==e.key?f(e.key):new Uint8Array,n.proof=void 0!==e.proof&&null!==e.proof?t.Proof.fromJSON(e.proof):void 0,n},toJSON(e){const n={};return void 0!==e.key&&(n.key=g(void 0!==e.key?e.key:new Uint8Array)),void 0!==e.proof&&(n.proof=e.proof?t.Proof.toJSON(e.proof):void 0),n},fromPartial(e){var n;const r=Object.assign({},s);return r.key=null!==(n=e.key)&&void 0!==n?n:new Uint8Array,r.proof=void 0!==e.proof&&null!==e.proof?t.Proof.fromPartial(e.proof):void 0,r}};const c={key:"",input:"",output:""};t.DominoOp={encode:(e,t=i.default.Writer.create())=>(""!==e.key&&t.uint32(10).string(e.key),""!==e.input&&t.uint32(18).string(e.input),""!==e.output&&t.uint32(26).string(e.output),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},c);for(;n.pos>>3){case 1:o.key=n.string();break;case 2:o.input=n.string();break;case 3:o.output=n.string();break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},c);return t.key=void 0!==e.key&&null!==e.key?String(e.key):"",t.input=void 0!==e.input&&null!==e.input?String(e.input):"",t.output=void 0!==e.output&&null!==e.output?String(e.output):"",t},toJSON(e){const t={};return void 0!==e.key&&(t.key=e.key),void 0!==e.input&&(t.input=e.input),void 0!==e.output&&(t.output=e.output),t},fromPartial(e){var t,n,r;const o=Object.assign({},c);return o.key=null!==(t=e.key)&&void 0!==t?t:"",o.input=null!==(n=e.input)&&void 0!==n?n:"",o.output=null!==(r=e.output)&&void 0!==r?r:"",o}};const d={type:""};t.ProofOp={encode:(e,t=i.default.Writer.create())=>(""!==e.type&&t.uint32(10).string(e.type),0!==e.key.length&&t.uint32(18).bytes(e.key),0!==e.data.length&&t.uint32(26).bytes(e.data),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},d);for(o.key=new Uint8Array,o.data=new Uint8Array;n.pos>>3){case 1:o.type=n.string();break;case 2:o.key=n.bytes();break;case 3:o.data=n.bytes();break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},d);return t.type=void 0!==e.type&&null!==e.type?String(e.type):"",t.key=void 0!==e.key&&null!==e.key?f(e.key):new Uint8Array,t.data=void 0!==e.data&&null!==e.data?f(e.data):new Uint8Array,t},toJSON(e){const t={};return void 0!==e.type&&(t.type=e.type),void 0!==e.key&&(t.key=g(void 0!==e.key?e.key:new Uint8Array)),void 0!==e.data&&(t.data=g(void 0!==e.data?e.data:new Uint8Array)),t},fromPartial(e){var t,n,r;const o=Object.assign({},d);return o.type=null!==(t=e.type)&&void 0!==t?t:"",o.key=null!==(n=e.key)&&void 0!==n?n:new Uint8Array,o.data=null!==(r=e.data)&&void 0!==r?r:new Uint8Array,o}};const u={};t.ProofOps={encode(e,n=i.default.Writer.create()){for(const r of e.ops)t.ProofOp.encode(r,n.uint32(10).fork()).ldelim();return n},decode(e,n){const r=e instanceof i.default.Reader?e:new i.default.Reader(e);let o=void 0===n?r.len:r.pos+n;const a=Object.assign({},u);for(a.ops=[];r.pos>>3==1?a.ops.push(t.ProofOp.decode(r,r.uint32())):r.skipType(7&e)}return a},fromJSON(e){var n;const r=Object.assign({},u);return r.ops=(null!==(n=e.ops)&&void 0!==n?n:[]).map((e=>t.ProofOp.fromJSON(e))),r},toJSON(e){const n={};return e.ops?n.ops=e.ops.map((e=>e?t.ProofOp.toJSON(e):void 0)):n.ops=[],n},fromPartial(e){var n;const r=Object.assign({},u);return r.ops=(null===(n=e.ops)||void 0===n?void 0:n.map((e=>t.ProofOp.fromPartial(e))))||[],r}};var l=(()=>{if(void 0!==l)return l;if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==n.g)return n.g;throw"Unable to locate global object"})();const A=l.atob||(e=>l.Buffer.from(e,"base64").toString("binary"));function f(e){const t=A(e),n=new Uint8Array(t.length);for(let e=0;el.Buffer.from(e,"binary").toString("base64"));function g(e){const t=[];for(const n of e)t.push(String.fromCharCode(n));return h(t.join(""))}i.default.util.Long!==o.default&&(i.default.util.Long=o.default,i.default.configure())},7134:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.HashedParams=t.VersionParams=t.ValidatorParams=t.EvidenceParams=t.BlockParams=t.ConsensusParams=t.protobufPackage=void 0;const o=r(n(3720)),i=r(n(3789)),a=n(281);t.protobufPackage="tendermint.types";const s={};t.ConsensusParams={encode:(e,n=i.default.Writer.create())=>(void 0!==e.block&&t.BlockParams.encode(e.block,n.uint32(10).fork()).ldelim(),void 0!==e.evidence&&t.EvidenceParams.encode(e.evidence,n.uint32(18).fork()).ldelim(),void 0!==e.validator&&t.ValidatorParams.encode(e.validator,n.uint32(26).fork()).ldelim(),void 0!==e.version&&t.VersionParams.encode(e.version,n.uint32(34).fork()).ldelim(),n),decode(e,n){const r=e instanceof i.default.Reader?e:new i.default.Reader(e);let o=void 0===n?r.len:r.pos+n;const a=Object.assign({},s);for(;r.pos>>3){case 1:a.block=t.BlockParams.decode(r,r.uint32());break;case 2:a.evidence=t.EvidenceParams.decode(r,r.uint32());break;case 3:a.validator=t.ValidatorParams.decode(r,r.uint32());break;case 4:a.version=t.VersionParams.decode(r,r.uint32());break;default:r.skipType(7&e)}}return a},fromJSON(e){const n=Object.assign({},s);return n.block=void 0!==e.block&&null!==e.block?t.BlockParams.fromJSON(e.block):void 0,n.evidence=void 0!==e.evidence&&null!==e.evidence?t.EvidenceParams.fromJSON(e.evidence):void 0,n.validator=void 0!==e.validator&&null!==e.validator?t.ValidatorParams.fromJSON(e.validator):void 0,n.version=void 0!==e.version&&null!==e.version?t.VersionParams.fromJSON(e.version):void 0,n},toJSON(e){const n={};return void 0!==e.block&&(n.block=e.block?t.BlockParams.toJSON(e.block):void 0),void 0!==e.evidence&&(n.evidence=e.evidence?t.EvidenceParams.toJSON(e.evidence):void 0),void 0!==e.validator&&(n.validator=e.validator?t.ValidatorParams.toJSON(e.validator):void 0),void 0!==e.version&&(n.version=e.version?t.VersionParams.toJSON(e.version):void 0),n},fromPartial(e){const n=Object.assign({},s);return n.block=void 0!==e.block&&null!==e.block?t.BlockParams.fromPartial(e.block):void 0,n.evidence=void 0!==e.evidence&&null!==e.evidence?t.EvidenceParams.fromPartial(e.evidence):void 0,n.validator=void 0!==e.validator&&null!==e.validator?t.ValidatorParams.fromPartial(e.validator):void 0,n.version=void 0!==e.version&&null!==e.version?t.VersionParams.fromPartial(e.version):void 0,n}};const c={maxBytes:o.default.ZERO,maxGas:o.default.ZERO,timeIotaMs:o.default.ZERO};t.BlockParams={encode:(e,t=i.default.Writer.create())=>(e.maxBytes.isZero()||t.uint32(8).int64(e.maxBytes),e.maxGas.isZero()||t.uint32(16).int64(e.maxGas),e.timeIotaMs.isZero()||t.uint32(24).int64(e.timeIotaMs),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},c);for(;n.pos>>3){case 1:o.maxBytes=n.int64();break;case 2:o.maxGas=n.int64();break;case 3:o.timeIotaMs=n.int64();break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},c);return t.maxBytes=void 0!==e.maxBytes&&null!==e.maxBytes?o.default.fromString(e.maxBytes):o.default.ZERO,t.maxGas=void 0!==e.maxGas&&null!==e.maxGas?o.default.fromString(e.maxGas):o.default.ZERO,t.timeIotaMs=void 0!==e.timeIotaMs&&null!==e.timeIotaMs?o.default.fromString(e.timeIotaMs):o.default.ZERO,t},toJSON(e){const t={};return void 0!==e.maxBytes&&(t.maxBytes=(e.maxBytes||o.default.ZERO).toString()),void 0!==e.maxGas&&(t.maxGas=(e.maxGas||o.default.ZERO).toString()),void 0!==e.timeIotaMs&&(t.timeIotaMs=(e.timeIotaMs||o.default.ZERO).toString()),t},fromPartial(e){const t=Object.assign({},c);return t.maxBytes=void 0!==e.maxBytes&&null!==e.maxBytes?o.default.fromValue(e.maxBytes):o.default.ZERO,t.maxGas=void 0!==e.maxGas&&null!==e.maxGas?o.default.fromValue(e.maxGas):o.default.ZERO,t.timeIotaMs=void 0!==e.timeIotaMs&&null!==e.timeIotaMs?o.default.fromValue(e.timeIotaMs):o.default.ZERO,t}};const d={maxAgeNumBlocks:o.default.ZERO,maxBytes:o.default.ZERO};t.EvidenceParams={encode:(e,t=i.default.Writer.create())=>(e.maxAgeNumBlocks.isZero()||t.uint32(8).int64(e.maxAgeNumBlocks),void 0!==e.maxAgeDuration&&a.Duration.encode(e.maxAgeDuration,t.uint32(18).fork()).ldelim(),e.maxBytes.isZero()||t.uint32(24).int64(e.maxBytes),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},d);for(;n.pos>>3){case 1:o.maxAgeNumBlocks=n.int64();break;case 2:o.maxAgeDuration=a.Duration.decode(n,n.uint32());break;case 3:o.maxBytes=n.int64();break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},d);return t.maxAgeNumBlocks=void 0!==e.maxAgeNumBlocks&&null!==e.maxAgeNumBlocks?o.default.fromString(e.maxAgeNumBlocks):o.default.ZERO,t.maxAgeDuration=void 0!==e.maxAgeDuration&&null!==e.maxAgeDuration?a.Duration.fromJSON(e.maxAgeDuration):void 0,t.maxBytes=void 0!==e.maxBytes&&null!==e.maxBytes?o.default.fromString(e.maxBytes):o.default.ZERO,t},toJSON(e){const t={};return void 0!==e.maxAgeNumBlocks&&(t.maxAgeNumBlocks=(e.maxAgeNumBlocks||o.default.ZERO).toString()),void 0!==e.maxAgeDuration&&(t.maxAgeDuration=e.maxAgeDuration?a.Duration.toJSON(e.maxAgeDuration):void 0),void 0!==e.maxBytes&&(t.maxBytes=(e.maxBytes||o.default.ZERO).toString()),t},fromPartial(e){const t=Object.assign({},d);return t.maxAgeNumBlocks=void 0!==e.maxAgeNumBlocks&&null!==e.maxAgeNumBlocks?o.default.fromValue(e.maxAgeNumBlocks):o.default.ZERO,t.maxAgeDuration=void 0!==e.maxAgeDuration&&null!==e.maxAgeDuration?a.Duration.fromPartial(e.maxAgeDuration):void 0,t.maxBytes=void 0!==e.maxBytes&&null!==e.maxBytes?o.default.fromValue(e.maxBytes):o.default.ZERO,t}};const u={pubKeyTypes:""};t.ValidatorParams={encode(e,t=i.default.Writer.create()){for(const n of e.pubKeyTypes)t.uint32(10).string(n);return t},decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},u);for(o.pubKeyTypes=[];n.pos>>3==1?o.pubKeyTypes.push(n.string()):n.skipType(7&e)}return o},fromJSON(e){var t;const n=Object.assign({},u);return n.pubKeyTypes=(null!==(t=e.pubKeyTypes)&&void 0!==t?t:[]).map((e=>String(e))),n},toJSON(e){const t={};return e.pubKeyTypes?t.pubKeyTypes=e.pubKeyTypes.map((e=>e)):t.pubKeyTypes=[],t},fromPartial(e){var t;const n=Object.assign({},u);return n.pubKeyTypes=(null===(t=e.pubKeyTypes)||void 0===t?void 0:t.map((e=>e)))||[],n}};const l={appVersion:o.default.UZERO};t.VersionParams={encode:(e,t=i.default.Writer.create())=>(e.appVersion.isZero()||t.uint32(8).uint64(e.appVersion),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},l);for(;n.pos>>3==1?o.appVersion=n.uint64():n.skipType(7&e)}return o},fromJSON(e){const t=Object.assign({},l);return t.appVersion=void 0!==e.appVersion&&null!==e.appVersion?o.default.fromString(e.appVersion):o.default.UZERO,t},toJSON(e){const t={};return void 0!==e.appVersion&&(t.appVersion=(e.appVersion||o.default.UZERO).toString()),t},fromPartial(e){const t=Object.assign({},l);return t.appVersion=void 0!==e.appVersion&&null!==e.appVersion?o.default.fromValue(e.appVersion):o.default.UZERO,t}};const A={blockMaxBytes:o.default.ZERO,blockMaxGas:o.default.ZERO};t.HashedParams={encode:(e,t=i.default.Writer.create())=>(e.blockMaxBytes.isZero()||t.uint32(8).int64(e.blockMaxBytes),e.blockMaxGas.isZero()||t.uint32(16).int64(e.blockMaxGas),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},A);for(;n.pos>>3){case 1:o.blockMaxBytes=n.int64();break;case 2:o.blockMaxGas=n.int64();break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},A);return t.blockMaxBytes=void 0!==e.blockMaxBytes&&null!==e.blockMaxBytes?o.default.fromString(e.blockMaxBytes):o.default.ZERO,t.blockMaxGas=void 0!==e.blockMaxGas&&null!==e.blockMaxGas?o.default.fromString(e.blockMaxGas):o.default.ZERO,t},toJSON(e){const t={};return void 0!==e.blockMaxBytes&&(t.blockMaxBytes=(e.blockMaxBytes||o.default.ZERO).toString()),void 0!==e.blockMaxGas&&(t.blockMaxGas=(e.blockMaxGas||o.default.ZERO).toString()),t},fromPartial(e){const t=Object.assign({},A);return t.blockMaxBytes=void 0!==e.blockMaxBytes&&null!==e.blockMaxBytes?o.default.fromValue(e.blockMaxBytes):o.default.ZERO,t.blockMaxGas=void 0!==e.blockMaxGas&&null!==e.blockMaxGas?o.default.fromValue(e.blockMaxGas):o.default.ZERO,t}},i.default.util.Long!==o.default&&(i.default.util.Long=o.default,i.default.configure())},1258:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.TxProof=t.BlockMeta=t.LightBlock=t.SignedHeader=t.Proposal=t.CommitSig=t.Commit=t.Vote=t.Data=t.Header=t.BlockID=t.Part=t.PartSetHeader=t.signedMsgTypeToJSON=t.signedMsgTypeFromJSON=t.SignedMsgType=t.blockIDFlagToJSON=t.blockIDFlagFromJSON=t.BlockIDFlag=t.protobufPackage=void 0;const o=r(n(3720)),i=r(n(3789)),a=n(1494),s=n(1083),c=n(5522),d=n(3444);var u,l;function A(e){switch(e){case 0:case"BLOCK_ID_FLAG_UNKNOWN":return u.BLOCK_ID_FLAG_UNKNOWN;case 1:case"BLOCK_ID_FLAG_ABSENT":return u.BLOCK_ID_FLAG_ABSENT;case 2:case"BLOCK_ID_FLAG_COMMIT":return u.BLOCK_ID_FLAG_COMMIT;case 3:case"BLOCK_ID_FLAG_NIL":return u.BLOCK_ID_FLAG_NIL;default:return u.UNRECOGNIZED}}function f(e){switch(e){case u.BLOCK_ID_FLAG_UNKNOWN:return"BLOCK_ID_FLAG_UNKNOWN";case u.BLOCK_ID_FLAG_ABSENT:return"BLOCK_ID_FLAG_ABSENT";case u.BLOCK_ID_FLAG_COMMIT:return"BLOCK_ID_FLAG_COMMIT";case u.BLOCK_ID_FLAG_NIL:return"BLOCK_ID_FLAG_NIL";default:return"UNKNOWN"}}function h(e){switch(e){case 0:case"SIGNED_MSG_TYPE_UNKNOWN":return l.SIGNED_MSG_TYPE_UNKNOWN;case 1:case"SIGNED_MSG_TYPE_PREVOTE":return l.SIGNED_MSG_TYPE_PREVOTE;case 2:case"SIGNED_MSG_TYPE_PRECOMMIT":return l.SIGNED_MSG_TYPE_PRECOMMIT;case 32:case"SIGNED_MSG_TYPE_PROPOSAL":return l.SIGNED_MSG_TYPE_PROPOSAL;default:return l.UNRECOGNIZED}}function g(e){switch(e){case l.SIGNED_MSG_TYPE_UNKNOWN:return"SIGNED_MSG_TYPE_UNKNOWN";case l.SIGNED_MSG_TYPE_PREVOTE:return"SIGNED_MSG_TYPE_PREVOTE";case l.SIGNED_MSG_TYPE_PRECOMMIT:return"SIGNED_MSG_TYPE_PRECOMMIT";case l.SIGNED_MSG_TYPE_PROPOSAL:return"SIGNED_MSG_TYPE_PROPOSAL";default:return"UNKNOWN"}}t.protobufPackage="tendermint.types",function(e){e[e.BLOCK_ID_FLAG_UNKNOWN=0]="BLOCK_ID_FLAG_UNKNOWN",e[e.BLOCK_ID_FLAG_ABSENT=1]="BLOCK_ID_FLAG_ABSENT",e[e.BLOCK_ID_FLAG_COMMIT=2]="BLOCK_ID_FLAG_COMMIT",e[e.BLOCK_ID_FLAG_NIL=3]="BLOCK_ID_FLAG_NIL",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(u=t.BlockIDFlag||(t.BlockIDFlag={})),t.blockIDFlagFromJSON=A,t.blockIDFlagToJSON=f,function(e){e[e.SIGNED_MSG_TYPE_UNKNOWN=0]="SIGNED_MSG_TYPE_UNKNOWN",e[e.SIGNED_MSG_TYPE_PREVOTE=1]="SIGNED_MSG_TYPE_PREVOTE",e[e.SIGNED_MSG_TYPE_PRECOMMIT=2]="SIGNED_MSG_TYPE_PRECOMMIT",e[e.SIGNED_MSG_TYPE_PROPOSAL=32]="SIGNED_MSG_TYPE_PROPOSAL",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(l=t.SignedMsgType||(t.SignedMsgType={})),t.signedMsgTypeFromJSON=h,t.signedMsgTypeToJSON=g;const p={total:0};t.PartSetHeader={encode:(e,t=i.default.Writer.create())=>(0!==e.total&&t.uint32(8).uint32(e.total),0!==e.hash.length&&t.uint32(18).bytes(e.hash),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},p);for(o.hash=new Uint8Array;n.pos>>3){case 1:o.total=n.uint32();break;case 2:o.hash=n.bytes();break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},p);return t.total=void 0!==e.total&&null!==e.total?Number(e.total):0,t.hash=void 0!==e.hash&&null!==e.hash?R(e.hash):new Uint8Array,t},toJSON(e){const t={};return void 0!==e.total&&(t.total=e.total),void 0!==e.hash&&(t.hash=N(void 0!==e.hash?e.hash:new Uint8Array)),t},fromPartial(e){var t,n;const r=Object.assign({},p);return r.total=null!==(t=e.total)&&void 0!==t?t:0,r.hash=null!==(n=e.hash)&&void 0!==n?n:new Uint8Array,r}};const m={index:0};t.Part={encode:(e,t=i.default.Writer.create())=>(0!==e.index&&t.uint32(8).uint32(e.index),0!==e.bytes.length&&t.uint32(18).bytes(e.bytes),void 0!==e.proof&&a.Proof.encode(e.proof,t.uint32(26).fork()).ldelim(),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},m);for(o.bytes=new Uint8Array;n.pos>>3){case 1:o.index=n.uint32();break;case 2:o.bytes=n.bytes();break;case 3:o.proof=a.Proof.decode(n,n.uint32());break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},m);return t.index=void 0!==e.index&&null!==e.index?Number(e.index):0,t.bytes=void 0!==e.bytes&&null!==e.bytes?R(e.bytes):new Uint8Array,t.proof=void 0!==e.proof&&null!==e.proof?a.Proof.fromJSON(e.proof):void 0,t},toJSON(e){const t={};return void 0!==e.index&&(t.index=e.index),void 0!==e.bytes&&(t.bytes=N(void 0!==e.bytes?e.bytes:new Uint8Array)),void 0!==e.proof&&(t.proof=e.proof?a.Proof.toJSON(e.proof):void 0),t},fromPartial(e){var t,n;const r=Object.assign({},m);return r.index=null!==(t=e.index)&&void 0!==t?t:0,r.bytes=null!==(n=e.bytes)&&void 0!==n?n:new Uint8Array,r.proof=void 0!==e.proof&&null!==e.proof?a.Proof.fromPartial(e.proof):void 0,r}};const v={};t.BlockID={encode:(e,n=i.default.Writer.create())=>(0!==e.hash.length&&n.uint32(10).bytes(e.hash),void 0!==e.partSetHeader&&t.PartSetHeader.encode(e.partSetHeader,n.uint32(18).fork()).ldelim(),n),decode(e,n){const r=e instanceof i.default.Reader?e:new i.default.Reader(e);let o=void 0===n?r.len:r.pos+n;const a=Object.assign({},v);for(a.hash=new Uint8Array;r.pos>>3){case 1:a.hash=r.bytes();break;case 2:a.partSetHeader=t.PartSetHeader.decode(r,r.uint32());break;default:r.skipType(7&e)}}return a},fromJSON(e){const n=Object.assign({},v);return n.hash=void 0!==e.hash&&null!==e.hash?R(e.hash):new Uint8Array,n.partSetHeader=void 0!==e.partSetHeader&&null!==e.partSetHeader?t.PartSetHeader.fromJSON(e.partSetHeader):void 0,n},toJSON(e){const n={};return void 0!==e.hash&&(n.hash=N(void 0!==e.hash?e.hash:new Uint8Array)),void 0!==e.partSetHeader&&(n.partSetHeader=e.partSetHeader?t.PartSetHeader.toJSON(e.partSetHeader):void 0),n},fromPartial(e){var n;const r=Object.assign({},v);return r.hash=null!==(n=e.hash)&&void 0!==n?n:new Uint8Array,r.partSetHeader=void 0!==e.partSetHeader&&null!==e.partSetHeader?t.PartSetHeader.fromPartial(e.partSetHeader):void 0,r}};const y={chainId:"",height:o.default.ZERO};t.Header={encode:(e,n=i.default.Writer.create())=>(void 0!==e.version&&s.Consensus.encode(e.version,n.uint32(10).fork()).ldelim(),""!==e.chainId&&n.uint32(18).string(e.chainId),e.height.isZero()||n.uint32(24).int64(e.height),void 0!==e.time&&c.Timestamp.encode(e.time,n.uint32(34).fork()).ldelim(),void 0!==e.lastBlockId&&t.BlockID.encode(e.lastBlockId,n.uint32(42).fork()).ldelim(),0!==e.lastCommitHash.length&&n.uint32(50).bytes(e.lastCommitHash),0!==e.dataHash.length&&n.uint32(58).bytes(e.dataHash),0!==e.validatorsHash.length&&n.uint32(66).bytes(e.validatorsHash),0!==e.nextValidatorsHash.length&&n.uint32(74).bytes(e.nextValidatorsHash),0!==e.consensusHash.length&&n.uint32(82).bytes(e.consensusHash),0!==e.appHash.length&&n.uint32(90).bytes(e.appHash),0!==e.lastResultsHash.length&&n.uint32(98).bytes(e.lastResultsHash),0!==e.evidenceHash.length&&n.uint32(106).bytes(e.evidenceHash),0!==e.proposerAddress.length&&n.uint32(114).bytes(e.proposerAddress),n),decode(e,n){const r=e instanceof i.default.Reader?e:new i.default.Reader(e);let o=void 0===n?r.len:r.pos+n;const a=Object.assign({},y);for(a.lastCommitHash=new Uint8Array,a.dataHash=new Uint8Array,a.validatorsHash=new Uint8Array,a.nextValidatorsHash=new Uint8Array,a.consensusHash=new Uint8Array,a.appHash=new Uint8Array,a.lastResultsHash=new Uint8Array,a.evidenceHash=new Uint8Array,a.proposerAddress=new Uint8Array;r.pos>>3){case 1:a.version=s.Consensus.decode(r,r.uint32());break;case 2:a.chainId=r.string();break;case 3:a.height=r.int64();break;case 4:a.time=c.Timestamp.decode(r,r.uint32());break;case 5:a.lastBlockId=t.BlockID.decode(r,r.uint32());break;case 6:a.lastCommitHash=r.bytes();break;case 7:a.dataHash=r.bytes();break;case 8:a.validatorsHash=r.bytes();break;case 9:a.nextValidatorsHash=r.bytes();break;case 10:a.consensusHash=r.bytes();break;case 11:a.appHash=r.bytes();break;case 12:a.lastResultsHash=r.bytes();break;case 13:a.evidenceHash=r.bytes();break;case 14:a.proposerAddress=r.bytes();break;default:r.skipType(7&e)}}return a},fromJSON(e){const n=Object.assign({},y);return n.version=void 0!==e.version&&null!==e.version?s.Consensus.fromJSON(e.version):void 0,n.chainId=void 0!==e.chainId&&null!==e.chainId?String(e.chainId):"",n.height=void 0!==e.height&&null!==e.height?o.default.fromString(e.height):o.default.ZERO,n.time=void 0!==e.time&&null!==e.time?M(e.time):void 0,n.lastBlockId=void 0!==e.lastBlockId&&null!==e.lastBlockId?t.BlockID.fromJSON(e.lastBlockId):void 0,n.lastCommitHash=void 0!==e.lastCommitHash&&null!==e.lastCommitHash?R(e.lastCommitHash):new Uint8Array,n.dataHash=void 0!==e.dataHash&&null!==e.dataHash?R(e.dataHash):new Uint8Array,n.validatorsHash=void 0!==e.validatorsHash&&null!==e.validatorsHash?R(e.validatorsHash):new Uint8Array,n.nextValidatorsHash=void 0!==e.nextValidatorsHash&&null!==e.nextValidatorsHash?R(e.nextValidatorsHash):new Uint8Array,n.consensusHash=void 0!==e.consensusHash&&null!==e.consensusHash?R(e.consensusHash):new Uint8Array,n.appHash=void 0!==e.appHash&&null!==e.appHash?R(e.appHash):new Uint8Array,n.lastResultsHash=void 0!==e.lastResultsHash&&null!==e.lastResultsHash?R(e.lastResultsHash):new Uint8Array,n.evidenceHash=void 0!==e.evidenceHash&&null!==e.evidenceHash?R(e.evidenceHash):new Uint8Array,n.proposerAddress=void 0!==e.proposerAddress&&null!==e.proposerAddress?R(e.proposerAddress):new Uint8Array,n},toJSON(e){const n={};return void 0!==e.version&&(n.version=e.version?s.Consensus.toJSON(e.version):void 0),void 0!==e.chainId&&(n.chainId=e.chainId),void 0!==e.height&&(n.height=(e.height||o.default.ZERO).toString()),void 0!==e.time&&(n.time=D(e.time).toISOString()),void 0!==e.lastBlockId&&(n.lastBlockId=e.lastBlockId?t.BlockID.toJSON(e.lastBlockId):void 0),void 0!==e.lastCommitHash&&(n.lastCommitHash=N(void 0!==e.lastCommitHash?e.lastCommitHash:new Uint8Array)),void 0!==e.dataHash&&(n.dataHash=N(void 0!==e.dataHash?e.dataHash:new Uint8Array)),void 0!==e.validatorsHash&&(n.validatorsHash=N(void 0!==e.validatorsHash?e.validatorsHash:new Uint8Array)),void 0!==e.nextValidatorsHash&&(n.nextValidatorsHash=N(void 0!==e.nextValidatorsHash?e.nextValidatorsHash:new Uint8Array)),void 0!==e.consensusHash&&(n.consensusHash=N(void 0!==e.consensusHash?e.consensusHash:new Uint8Array)),void 0!==e.appHash&&(n.appHash=N(void 0!==e.appHash?e.appHash:new Uint8Array)),void 0!==e.lastResultsHash&&(n.lastResultsHash=N(void 0!==e.lastResultsHash?e.lastResultsHash:new Uint8Array)),void 0!==e.evidenceHash&&(n.evidenceHash=N(void 0!==e.evidenceHash?e.evidenceHash:new Uint8Array)),void 0!==e.proposerAddress&&(n.proposerAddress=N(void 0!==e.proposerAddress?e.proposerAddress:new Uint8Array)),n},fromPartial(e){var n,r,i,a,d,u,l,A,f,h;const g=Object.assign({},y);return g.version=void 0!==e.version&&null!==e.version?s.Consensus.fromPartial(e.version):void 0,g.chainId=null!==(n=e.chainId)&&void 0!==n?n:"",g.height=void 0!==e.height&&null!==e.height?o.default.fromValue(e.height):o.default.ZERO,g.time=void 0!==e.time&&null!==e.time?c.Timestamp.fromPartial(e.time):void 0,g.lastBlockId=void 0!==e.lastBlockId&&null!==e.lastBlockId?t.BlockID.fromPartial(e.lastBlockId):void 0,g.lastCommitHash=null!==(r=e.lastCommitHash)&&void 0!==r?r:new Uint8Array,g.dataHash=null!==(i=e.dataHash)&&void 0!==i?i:new Uint8Array,g.validatorsHash=null!==(a=e.validatorsHash)&&void 0!==a?a:new Uint8Array,g.nextValidatorsHash=null!==(d=e.nextValidatorsHash)&&void 0!==d?d:new Uint8Array,g.consensusHash=null!==(u=e.consensusHash)&&void 0!==u?u:new Uint8Array,g.appHash=null!==(l=e.appHash)&&void 0!==l?l:new Uint8Array,g.lastResultsHash=null!==(A=e.lastResultsHash)&&void 0!==A?A:new Uint8Array,g.evidenceHash=null!==(f=e.evidenceHash)&&void 0!==f?f:new Uint8Array,g.proposerAddress=null!==(h=e.proposerAddress)&&void 0!==h?h:new Uint8Array,g}};const b={};t.Data={encode(e,t=i.default.Writer.create()){for(const n of e.txs)t.uint32(10).bytes(n);return t},decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},b);for(o.txs=[];n.pos>>3==1?o.txs.push(n.bytes()):n.skipType(7&e)}return o},fromJSON(e){var t;const n=Object.assign({},b);return n.txs=(null!==(t=e.txs)&&void 0!==t?t:[]).map((e=>R(e))),n},toJSON(e){const t={};return e.txs?t.txs=e.txs.map((e=>N(void 0!==e?e:new Uint8Array))):t.txs=[],t},fromPartial(e){var t;const n=Object.assign({},b);return n.txs=(null===(t=e.txs)||void 0===t?void 0:t.map((e=>e)))||[],n}};const I={type:0,height:o.default.ZERO,round:0,validatorIndex:0};t.Vote={encode:(e,n=i.default.Writer.create())=>(0!==e.type&&n.uint32(8).int32(e.type),e.height.isZero()||n.uint32(16).int64(e.height),0!==e.round&&n.uint32(24).int32(e.round),void 0!==e.blockId&&t.BlockID.encode(e.blockId,n.uint32(34).fork()).ldelim(),void 0!==e.timestamp&&c.Timestamp.encode(e.timestamp,n.uint32(42).fork()).ldelim(),0!==e.validatorAddress.length&&n.uint32(50).bytes(e.validatorAddress),0!==e.validatorIndex&&n.uint32(56).int32(e.validatorIndex),0!==e.signature.length&&n.uint32(66).bytes(e.signature),n),decode(e,n){const r=e instanceof i.default.Reader?e:new i.default.Reader(e);let o=void 0===n?r.len:r.pos+n;const a=Object.assign({},I);for(a.validatorAddress=new Uint8Array,a.signature=new Uint8Array;r.pos>>3){case 1:a.type=r.int32();break;case 2:a.height=r.int64();break;case 3:a.round=r.int32();break;case 4:a.blockId=t.BlockID.decode(r,r.uint32());break;case 5:a.timestamp=c.Timestamp.decode(r,r.uint32());break;case 6:a.validatorAddress=r.bytes();break;case 7:a.validatorIndex=r.int32();break;case 8:a.signature=r.bytes();break;default:r.skipType(7&e)}}return a},fromJSON(e){const n=Object.assign({},I);return n.type=void 0!==e.type&&null!==e.type?h(e.type):0,n.height=void 0!==e.height&&null!==e.height?o.default.fromString(e.height):o.default.ZERO,n.round=void 0!==e.round&&null!==e.round?Number(e.round):0,n.blockId=void 0!==e.blockId&&null!==e.blockId?t.BlockID.fromJSON(e.blockId):void 0,n.timestamp=void 0!==e.timestamp&&null!==e.timestamp?M(e.timestamp):void 0,n.validatorAddress=void 0!==e.validatorAddress&&null!==e.validatorAddress?R(e.validatorAddress):new Uint8Array,n.validatorIndex=void 0!==e.validatorIndex&&null!==e.validatorIndex?Number(e.validatorIndex):0,n.signature=void 0!==e.signature&&null!==e.signature?R(e.signature):new Uint8Array,n},toJSON(e){const n={};return void 0!==e.type&&(n.type=g(e.type)),void 0!==e.height&&(n.height=(e.height||o.default.ZERO).toString()),void 0!==e.round&&(n.round=e.round),void 0!==e.blockId&&(n.blockId=e.blockId?t.BlockID.toJSON(e.blockId):void 0),void 0!==e.timestamp&&(n.timestamp=D(e.timestamp).toISOString()),void 0!==e.validatorAddress&&(n.validatorAddress=N(void 0!==e.validatorAddress?e.validatorAddress:new Uint8Array)),void 0!==e.validatorIndex&&(n.validatorIndex=e.validatorIndex),void 0!==e.signature&&(n.signature=N(void 0!==e.signature?e.signature:new Uint8Array)),n},fromPartial(e){var n,r,i,a,s;const d=Object.assign({},I);return d.type=null!==(n=e.type)&&void 0!==n?n:0,d.height=void 0!==e.height&&null!==e.height?o.default.fromValue(e.height):o.default.ZERO,d.round=null!==(r=e.round)&&void 0!==r?r:0,d.blockId=void 0!==e.blockId&&null!==e.blockId?t.BlockID.fromPartial(e.blockId):void 0,d.timestamp=void 0!==e.timestamp&&null!==e.timestamp?c.Timestamp.fromPartial(e.timestamp):void 0,d.validatorAddress=null!==(i=e.validatorAddress)&&void 0!==i?i:new Uint8Array,d.validatorIndex=null!==(a=e.validatorIndex)&&void 0!==a?a:0,d.signature=null!==(s=e.signature)&&void 0!==s?s:new Uint8Array,d}};const C={height:o.default.ZERO,round:0};t.Commit={encode(e,n=i.default.Writer.create()){e.height.isZero()||n.uint32(8).int64(e.height),0!==e.round&&n.uint32(16).int32(e.round),void 0!==e.blockId&&t.BlockID.encode(e.blockId,n.uint32(26).fork()).ldelim();for(const r of e.signatures)t.CommitSig.encode(r,n.uint32(34).fork()).ldelim();return n},decode(e,n){const r=e instanceof i.default.Reader?e:new i.default.Reader(e);let o=void 0===n?r.len:r.pos+n;const a=Object.assign({},C);for(a.signatures=[];r.pos>>3){case 1:a.height=r.int64();break;case 2:a.round=r.int32();break;case 3:a.blockId=t.BlockID.decode(r,r.uint32());break;case 4:a.signatures.push(t.CommitSig.decode(r,r.uint32()));break;default:r.skipType(7&e)}}return a},fromJSON(e){var n;const r=Object.assign({},C);return r.height=void 0!==e.height&&null!==e.height?o.default.fromString(e.height):o.default.ZERO,r.round=void 0!==e.round&&null!==e.round?Number(e.round):0,r.blockId=void 0!==e.blockId&&null!==e.blockId?t.BlockID.fromJSON(e.blockId):void 0,r.signatures=(null!==(n=e.signatures)&&void 0!==n?n:[]).map((e=>t.CommitSig.fromJSON(e))),r},toJSON(e){const n={};return void 0!==e.height&&(n.height=(e.height||o.default.ZERO).toString()),void 0!==e.round&&(n.round=e.round),void 0!==e.blockId&&(n.blockId=e.blockId?t.BlockID.toJSON(e.blockId):void 0),e.signatures?n.signatures=e.signatures.map((e=>e?t.CommitSig.toJSON(e):void 0)):n.signatures=[],n},fromPartial(e){var n,r;const i=Object.assign({},C);return i.height=void 0!==e.height&&null!==e.height?o.default.fromValue(e.height):o.default.ZERO,i.round=null!==(n=e.round)&&void 0!==n?n:0,i.blockId=void 0!==e.blockId&&null!==e.blockId?t.BlockID.fromPartial(e.blockId):void 0,i.signatures=(null===(r=e.signatures)||void 0===r?void 0:r.map((e=>t.CommitSig.fromPartial(e))))||[],i}};const E={blockIdFlag:0};t.CommitSig={encode:(e,t=i.default.Writer.create())=>(0!==e.blockIdFlag&&t.uint32(8).int32(e.blockIdFlag),0!==e.validatorAddress.length&&t.uint32(18).bytes(e.validatorAddress),void 0!==e.timestamp&&c.Timestamp.encode(e.timestamp,t.uint32(26).fork()).ldelim(),0!==e.signature.length&&t.uint32(34).bytes(e.signature),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},E);for(o.validatorAddress=new Uint8Array,o.signature=new Uint8Array;n.pos>>3){case 1:o.blockIdFlag=n.int32();break;case 2:o.validatorAddress=n.bytes();break;case 3:o.timestamp=c.Timestamp.decode(n,n.uint32());break;case 4:o.signature=n.bytes();break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},E);return t.blockIdFlag=void 0!==e.blockIdFlag&&null!==e.blockIdFlag?A(e.blockIdFlag):0,t.validatorAddress=void 0!==e.validatorAddress&&null!==e.validatorAddress?R(e.validatorAddress):new Uint8Array,t.timestamp=void 0!==e.timestamp&&null!==e.timestamp?M(e.timestamp):void 0,t.signature=void 0!==e.signature&&null!==e.signature?R(e.signature):new Uint8Array,t},toJSON(e){const t={};return void 0!==e.blockIdFlag&&(t.blockIdFlag=f(e.blockIdFlag)),void 0!==e.validatorAddress&&(t.validatorAddress=N(void 0!==e.validatorAddress?e.validatorAddress:new Uint8Array)),void 0!==e.timestamp&&(t.timestamp=D(e.timestamp).toISOString()),void 0!==e.signature&&(t.signature=N(void 0!==e.signature?e.signature:new Uint8Array)),t},fromPartial(e){var t,n,r;const o=Object.assign({},E);return o.blockIdFlag=null!==(t=e.blockIdFlag)&&void 0!==t?t:0,o.validatorAddress=null!==(n=e.validatorAddress)&&void 0!==n?n:new Uint8Array,o.timestamp=void 0!==e.timestamp&&null!==e.timestamp?c.Timestamp.fromPartial(e.timestamp):void 0,o.signature=null!==(r=e.signature)&&void 0!==r?r:new Uint8Array,o}};const w={type:0,height:o.default.ZERO,round:0,polRound:0};t.Proposal={encode:(e,n=i.default.Writer.create())=>(0!==e.type&&n.uint32(8).int32(e.type),e.height.isZero()||n.uint32(16).int64(e.height),0!==e.round&&n.uint32(24).int32(e.round),0!==e.polRound&&n.uint32(32).int32(e.polRound),void 0!==e.blockId&&t.BlockID.encode(e.blockId,n.uint32(42).fork()).ldelim(),void 0!==e.timestamp&&c.Timestamp.encode(e.timestamp,n.uint32(50).fork()).ldelim(),0!==e.signature.length&&n.uint32(58).bytes(e.signature),n),decode(e,n){const r=e instanceof i.default.Reader?e:new i.default.Reader(e);let o=void 0===n?r.len:r.pos+n;const a=Object.assign({},w);for(a.signature=new Uint8Array;r.pos>>3){case 1:a.type=r.int32();break;case 2:a.height=r.int64();break;case 3:a.round=r.int32();break;case 4:a.polRound=r.int32();break;case 5:a.blockId=t.BlockID.decode(r,r.uint32());break;case 6:a.timestamp=c.Timestamp.decode(r,r.uint32());break;case 7:a.signature=r.bytes();break;default:r.skipType(7&e)}}return a},fromJSON(e){const n=Object.assign({},w);return n.type=void 0!==e.type&&null!==e.type?h(e.type):0,n.height=void 0!==e.height&&null!==e.height?o.default.fromString(e.height):o.default.ZERO,n.round=void 0!==e.round&&null!==e.round?Number(e.round):0,n.polRound=void 0!==e.polRound&&null!==e.polRound?Number(e.polRound):0,n.blockId=void 0!==e.blockId&&null!==e.blockId?t.BlockID.fromJSON(e.blockId):void 0,n.timestamp=void 0!==e.timestamp&&null!==e.timestamp?M(e.timestamp):void 0,n.signature=void 0!==e.signature&&null!==e.signature?R(e.signature):new Uint8Array,n},toJSON(e){const n={};return void 0!==e.type&&(n.type=g(e.type)),void 0!==e.height&&(n.height=(e.height||o.default.ZERO).toString()),void 0!==e.round&&(n.round=e.round),void 0!==e.polRound&&(n.polRound=e.polRound),void 0!==e.blockId&&(n.blockId=e.blockId?t.BlockID.toJSON(e.blockId):void 0),void 0!==e.timestamp&&(n.timestamp=D(e.timestamp).toISOString()),void 0!==e.signature&&(n.signature=N(void 0!==e.signature?e.signature:new Uint8Array)),n},fromPartial(e){var n,r,i,a;const s=Object.assign({},w);return s.type=null!==(n=e.type)&&void 0!==n?n:0,s.height=void 0!==e.height&&null!==e.height?o.default.fromValue(e.height):o.default.ZERO,s.round=null!==(r=e.round)&&void 0!==r?r:0,s.polRound=null!==(i=e.polRound)&&void 0!==i?i:0,s.blockId=void 0!==e.blockId&&null!==e.blockId?t.BlockID.fromPartial(e.blockId):void 0,s.timestamp=void 0!==e.timestamp&&null!==e.timestamp?c.Timestamp.fromPartial(e.timestamp):void 0,s.signature=null!==(a=e.signature)&&void 0!==a?a:new Uint8Array,s}};const B={};t.SignedHeader={encode:(e,n=i.default.Writer.create())=>(void 0!==e.header&&t.Header.encode(e.header,n.uint32(10).fork()).ldelim(),void 0!==e.commit&&t.Commit.encode(e.commit,n.uint32(18).fork()).ldelim(),n),decode(e,n){const r=e instanceof i.default.Reader?e:new i.default.Reader(e);let o=void 0===n?r.len:r.pos+n;const a=Object.assign({},B);for(;r.pos>>3){case 1:a.header=t.Header.decode(r,r.uint32());break;case 2:a.commit=t.Commit.decode(r,r.uint32());break;default:r.skipType(7&e)}}return a},fromJSON(e){const n=Object.assign({},B);return n.header=void 0!==e.header&&null!==e.header?t.Header.fromJSON(e.header):void 0,n.commit=void 0!==e.commit&&null!==e.commit?t.Commit.fromJSON(e.commit):void 0,n},toJSON(e){const n={};return void 0!==e.header&&(n.header=e.header?t.Header.toJSON(e.header):void 0),void 0!==e.commit&&(n.commit=e.commit?t.Commit.toJSON(e.commit):void 0),n},fromPartial(e){const n=Object.assign({},B);return n.header=void 0!==e.header&&null!==e.header?t.Header.fromPartial(e.header):void 0,n.commit=void 0!==e.commit&&null!==e.commit?t.Commit.fromPartial(e.commit):void 0,n}};const _={};t.LightBlock={encode:(e,n=i.default.Writer.create())=>(void 0!==e.signedHeader&&t.SignedHeader.encode(e.signedHeader,n.uint32(10).fork()).ldelim(),void 0!==e.validatorSet&&d.ValidatorSet.encode(e.validatorSet,n.uint32(18).fork()).ldelim(),n),decode(e,n){const r=e instanceof i.default.Reader?e:new i.default.Reader(e);let o=void 0===n?r.len:r.pos+n;const a=Object.assign({},_);for(;r.pos>>3){case 1:a.signedHeader=t.SignedHeader.decode(r,r.uint32());break;case 2:a.validatorSet=d.ValidatorSet.decode(r,r.uint32());break;default:r.skipType(7&e)}}return a},fromJSON(e){const n=Object.assign({},_);return n.signedHeader=void 0!==e.signedHeader&&null!==e.signedHeader?t.SignedHeader.fromJSON(e.signedHeader):void 0,n.validatorSet=void 0!==e.validatorSet&&null!==e.validatorSet?d.ValidatorSet.fromJSON(e.validatorSet):void 0,n},toJSON(e){const n={};return void 0!==e.signedHeader&&(n.signedHeader=e.signedHeader?t.SignedHeader.toJSON(e.signedHeader):void 0),void 0!==e.validatorSet&&(n.validatorSet=e.validatorSet?d.ValidatorSet.toJSON(e.validatorSet):void 0),n},fromPartial(e){const n=Object.assign({},_);return n.signedHeader=void 0!==e.signedHeader&&null!==e.signedHeader?t.SignedHeader.fromPartial(e.signedHeader):void 0,n.validatorSet=void 0!==e.validatorSet&&null!==e.validatorSet?d.ValidatorSet.fromPartial(e.validatorSet):void 0,n}};const S={blockSize:o.default.ZERO,numTxs:o.default.ZERO};t.BlockMeta={encode:(e,n=i.default.Writer.create())=>(void 0!==e.blockId&&t.BlockID.encode(e.blockId,n.uint32(10).fork()).ldelim(),e.blockSize.isZero()||n.uint32(16).int64(e.blockSize),void 0!==e.header&&t.Header.encode(e.header,n.uint32(26).fork()).ldelim(),e.numTxs.isZero()||n.uint32(32).int64(e.numTxs),n),decode(e,n){const r=e instanceof i.default.Reader?e:new i.default.Reader(e);let o=void 0===n?r.len:r.pos+n;const a=Object.assign({},S);for(;r.pos>>3){case 1:a.blockId=t.BlockID.decode(r,r.uint32());break;case 2:a.blockSize=r.int64();break;case 3:a.header=t.Header.decode(r,r.uint32());break;case 4:a.numTxs=r.int64();break;default:r.skipType(7&e)}}return a},fromJSON(e){const n=Object.assign({},S);return n.blockId=void 0!==e.blockId&&null!==e.blockId?t.BlockID.fromJSON(e.blockId):void 0,n.blockSize=void 0!==e.blockSize&&null!==e.blockSize?o.default.fromString(e.blockSize):o.default.ZERO,n.header=void 0!==e.header&&null!==e.header?t.Header.fromJSON(e.header):void 0,n.numTxs=void 0!==e.numTxs&&null!==e.numTxs?o.default.fromString(e.numTxs):o.default.ZERO,n},toJSON(e){const n={};return void 0!==e.blockId&&(n.blockId=e.blockId?t.BlockID.toJSON(e.blockId):void 0),void 0!==e.blockSize&&(n.blockSize=(e.blockSize||o.default.ZERO).toString()),void 0!==e.header&&(n.header=e.header?t.Header.toJSON(e.header):void 0),void 0!==e.numTxs&&(n.numTxs=(e.numTxs||o.default.ZERO).toString()),n},fromPartial(e){const n=Object.assign({},S);return n.blockId=void 0!==e.blockId&&null!==e.blockId?t.BlockID.fromPartial(e.blockId):void 0,n.blockSize=void 0!==e.blockSize&&null!==e.blockSize?o.default.fromValue(e.blockSize):o.default.ZERO,n.header=void 0!==e.header&&null!==e.header?t.Header.fromPartial(e.header):void 0,n.numTxs=void 0!==e.numTxs&&null!==e.numTxs?o.default.fromValue(e.numTxs):o.default.ZERO,n}};const k={};t.TxProof={encode:(e,t=i.default.Writer.create())=>(0!==e.rootHash.length&&t.uint32(10).bytes(e.rootHash),0!==e.data.length&&t.uint32(18).bytes(e.data),void 0!==e.proof&&a.Proof.encode(e.proof,t.uint32(26).fork()).ldelim(),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},k);for(o.rootHash=new Uint8Array,o.data=new Uint8Array;n.pos>>3){case 1:o.rootHash=n.bytes();break;case 2:o.data=n.bytes();break;case 3:o.proof=a.Proof.decode(n,n.uint32());break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},k);return t.rootHash=void 0!==e.rootHash&&null!==e.rootHash?R(e.rootHash):new Uint8Array,t.data=void 0!==e.data&&null!==e.data?R(e.data):new Uint8Array,t.proof=void 0!==e.proof&&null!==e.proof?a.Proof.fromJSON(e.proof):void 0,t},toJSON(e){const t={};return void 0!==e.rootHash&&(t.rootHash=N(void 0!==e.rootHash?e.rootHash:new Uint8Array)),void 0!==e.data&&(t.data=N(void 0!==e.data?e.data:new Uint8Array)),void 0!==e.proof&&(t.proof=e.proof?a.Proof.toJSON(e.proof):void 0),t},fromPartial(e){var t,n;const r=Object.assign({},k);return r.rootHash=null!==(t=e.rootHash)&&void 0!==t?t:new Uint8Array,r.data=null!==(n=e.data)&&void 0!==n?n:new Uint8Array,r.proof=void 0!==e.proof&&null!==e.proof?a.Proof.fromPartial(e.proof):void 0,r}};var O=(()=>{if(void 0!==O)return O;if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==n.g)return n.g;throw"Unable to locate global object"})();const Q=O.atob||(e=>O.Buffer.from(e,"base64").toString("binary"));function R(e){const t=Q(e),n=new Uint8Array(t.length);for(let e=0;eO.Buffer.from(e,"binary").toString("base64"));function N(e){const t=[];for(const n of e)t.push(String.fromCharCode(n));return P(t.join(""))}function x(e){var t;return{seconds:(t=e.getTime()/1e3,o.default.fromNumber(t)),nanos:e.getTime()%1e3*1e6}}function D(e){let t=1e3*e.seconds.toNumber();return t+=e.nanos/1e6,new Date(t)}function M(e){return e instanceof Date?x(e):"string"==typeof e?x(new Date(e)):c.Timestamp.fromJSON(e)}i.default.util.Long!==o.default&&(i.default.util.Long=o.default,i.default.configure())},3444:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.SimpleValidator=t.Validator=t.ValidatorSet=t.protobufPackage=void 0;const o=r(n(3720)),i=r(n(3789)),a=n(984);t.protobufPackage="tendermint.types";const s={totalVotingPower:o.default.ZERO};t.ValidatorSet={encode(e,n=i.default.Writer.create()){for(const r of e.validators)t.Validator.encode(r,n.uint32(10).fork()).ldelim();return void 0!==e.proposer&&t.Validator.encode(e.proposer,n.uint32(18).fork()).ldelim(),e.totalVotingPower.isZero()||n.uint32(24).int64(e.totalVotingPower),n},decode(e,n){const r=e instanceof i.default.Reader?e:new i.default.Reader(e);let o=void 0===n?r.len:r.pos+n;const a=Object.assign({},s);for(a.validators=[];r.pos>>3){case 1:a.validators.push(t.Validator.decode(r,r.uint32()));break;case 2:a.proposer=t.Validator.decode(r,r.uint32());break;case 3:a.totalVotingPower=r.int64();break;default:r.skipType(7&e)}}return a},fromJSON(e){var n;const r=Object.assign({},s);return r.validators=(null!==(n=e.validators)&&void 0!==n?n:[]).map((e=>t.Validator.fromJSON(e))),r.proposer=void 0!==e.proposer&&null!==e.proposer?t.Validator.fromJSON(e.proposer):void 0,r.totalVotingPower=void 0!==e.totalVotingPower&&null!==e.totalVotingPower?o.default.fromString(e.totalVotingPower):o.default.ZERO,r},toJSON(e){const n={};return e.validators?n.validators=e.validators.map((e=>e?t.Validator.toJSON(e):void 0)):n.validators=[],void 0!==e.proposer&&(n.proposer=e.proposer?t.Validator.toJSON(e.proposer):void 0),void 0!==e.totalVotingPower&&(n.totalVotingPower=(e.totalVotingPower||o.default.ZERO).toString()),n},fromPartial(e){var n;const r=Object.assign({},s);return r.validators=(null===(n=e.validators)||void 0===n?void 0:n.map((e=>t.Validator.fromPartial(e))))||[],r.proposer=void 0!==e.proposer&&null!==e.proposer?t.Validator.fromPartial(e.proposer):void 0,r.totalVotingPower=void 0!==e.totalVotingPower&&null!==e.totalVotingPower?o.default.fromValue(e.totalVotingPower):o.default.ZERO,r}};const c={votingPower:o.default.ZERO,proposerPriority:o.default.ZERO};t.Validator={encode:(e,t=i.default.Writer.create())=>(0!==e.address.length&&t.uint32(10).bytes(e.address),void 0!==e.pubKey&&a.PublicKey.encode(e.pubKey,t.uint32(18).fork()).ldelim(),e.votingPower.isZero()||t.uint32(24).int64(e.votingPower),e.proposerPriority.isZero()||t.uint32(32).int64(e.proposerPriority),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},c);for(o.address=new Uint8Array;n.pos>>3){case 1:o.address=n.bytes();break;case 2:o.pubKey=a.PublicKey.decode(n,n.uint32());break;case 3:o.votingPower=n.int64();break;case 4:o.proposerPriority=n.int64();break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},c);return t.address=void 0!==e.address&&null!==e.address?function(e){const t=l(e),n=new Uint8Array(t.length);for(let e=0;e(void 0!==e.pubKey&&a.PublicKey.encode(e.pubKey,t.uint32(10).fork()).ldelim(),e.votingPower.isZero()||t.uint32(16).int64(e.votingPower),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},d);for(;n.pos>>3){case 1:o.pubKey=a.PublicKey.decode(n,n.uint32());break;case 2:o.votingPower=n.int64();break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},d);return t.pubKey=void 0!==e.pubKey&&null!==e.pubKey?a.PublicKey.fromJSON(e.pubKey):void 0,t.votingPower=void 0!==e.votingPower&&null!==e.votingPower?o.default.fromString(e.votingPower):o.default.ZERO,t},toJSON(e){const t={};return void 0!==e.pubKey&&(t.pubKey=e.pubKey?a.PublicKey.toJSON(e.pubKey):void 0),void 0!==e.votingPower&&(t.votingPower=(e.votingPower||o.default.ZERO).toString()),t},fromPartial(e){const t=Object.assign({},d);return t.pubKey=void 0!==e.pubKey&&null!==e.pubKey?a.PublicKey.fromPartial(e.pubKey):void 0,t.votingPower=void 0!==e.votingPower&&null!==e.votingPower?o.default.fromValue(e.votingPower):o.default.ZERO,t}};var u=(()=>{if(void 0!==u)return u;if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==n.g)return n.g;throw"Unable to locate global object"})();const l=u.atob||(e=>u.Buffer.from(e,"base64").toString("binary")),A=u.btoa||(e=>u.Buffer.from(e,"binary").toString("base64"));i.default.util.Long!==o.default&&(i.default.util.Long=o.default,i.default.configure())},1083:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Consensus=t.App=t.protobufPackage=void 0;const o=r(n(3720)),i=r(n(3789));t.protobufPackage="tendermint.version";const a={protocol:o.default.UZERO,software:""};t.App={encode:(e,t=i.default.Writer.create())=>(e.protocol.isZero()||t.uint32(8).uint64(e.protocol),""!==e.software&&t.uint32(18).string(e.software),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},a);for(;n.pos>>3){case 1:o.protocol=n.uint64();break;case 2:o.software=n.string();break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},a);return t.protocol=void 0!==e.protocol&&null!==e.protocol?o.default.fromString(e.protocol):o.default.UZERO,t.software=void 0!==e.software&&null!==e.software?String(e.software):"",t},toJSON(e){const t={};return void 0!==e.protocol&&(t.protocol=(e.protocol||o.default.UZERO).toString()),void 0!==e.software&&(t.software=e.software),t},fromPartial(e){var t;const n=Object.assign({},a);return n.protocol=void 0!==e.protocol&&null!==e.protocol?o.default.fromValue(e.protocol):o.default.UZERO,n.software=null!==(t=e.software)&&void 0!==t?t:"",n}};const s={block:o.default.UZERO,app:o.default.UZERO};t.Consensus={encode:(e,t=i.default.Writer.create())=>(e.block.isZero()||t.uint32(8).uint64(e.block),e.app.isZero()||t.uint32(16).uint64(e.app),t),decode(e,t){const n=e instanceof i.default.Reader?e:new i.default.Reader(e);let r=void 0===t?n.len:n.pos+t;const o=Object.assign({},s);for(;n.pos>>3){case 1:o.block=n.uint64();break;case 2:o.app=n.uint64();break;default:n.skipType(7&e)}}return o},fromJSON(e){const t=Object.assign({},s);return t.block=void 0!==e.block&&null!==e.block?o.default.fromString(e.block):o.default.UZERO,t.app=void 0!==e.app&&null!==e.app?o.default.fromString(e.app):o.default.UZERO,t},toJSON(e){const t={};return void 0!==e.block&&(t.block=(e.block||o.default.UZERO).toString()),void 0!==e.app&&(t.app=(e.app||o.default.UZERO).toString()),t},fromPartial(e){const t=Object.assign({},s);return t.block=void 0!==e.block&&null!==e.block?o.default.fromValue(e.block):o.default.UZERO,t.app=void 0!==e.app&&null!==e.app?o.default.fromValue(e.app):o.default.UZERO,t}},i.default.util.Long!==o.default&&(i.default.util.Long=o.default,i.default.configure())},4289:(e,t,n)=>{"use strict";var r=n(2215),o="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),i=Object.prototype.toString,a=Array.prototype.concat,s=Object.defineProperty,c=s&&function(){var e={};try{for(var t in s(e,"x",{enumerable:!1,value:e}),e)return!1;return e.x===e}catch(e){return!1}}(),d=function(e,t,n,r){var o;(!(t in e)||"function"==typeof(o=r)&&"[object Function]"===i.call(o)&&r())&&(c?s(e,t,{configurable:!0,enumerable:!1,value:n,writable:!0}):e[t]=n)},u=function(e,t){var n=arguments.length>2?arguments[2]:{},i=r(t);o&&(i=a.call(i,Object.getOwnPropertySymbols(t)));for(var s=0;s{"use strict";var r=t;r.version=n(8597).i8,r.utils=n(953),r.rand=n(9931),r.curve=n(8254),r.curves=n(5427),r.ec=n(7954),r.eddsa=n(5980)},4918:(e,t,n)=>{"use strict";var r=n(3785),o=n(953),i=o.getNAF,a=o.getJSF,s=o.assert;function c(e,t){this.type=e,this.p=new r(t.p,16),this.red=t.prime?r.red(t.prime):r.mont(this.p),this.zero=new r(0).toRed(this.red),this.one=new r(1).toRed(this.red),this.two=new r(2).toRed(this.red),this.n=t.n&&new r(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var n=this.n&&this.p.div(this.n);!n||n.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function d(e,t){this.curve=e,this.type=t,this.precomputed=null}e.exports=c,c.prototype.point=function(){throw new Error("Not implemented")},c.prototype.validate=function(){throw new Error("Not implemented")},c.prototype._fixedNafMul=function(e,t){s(e.precomputed);var n=e._getDoubles(),r=i(t,1,this._bitLength),o=(1<=a;u--)c=(c<<1)+r[u];d.push(c)}for(var l=this.jpoint(null,null,null),A=this.jpoint(null,null,null),f=o;f>0;f--){for(a=0;a=0;d--){for(var u=0;d>=0&&0===a[d];d--)u++;if(d>=0&&u++,c=c.dblp(u),d<0)break;var l=a[d];s(0!==l),c="affine"===e.type?l>0?c.mixedAdd(o[l-1>>1]):c.mixedAdd(o[-l-1>>1].neg()):l>0?c.add(o[l-1>>1]):c.add(o[-l-1>>1].neg())}return"affine"===e.type?c.toP():c},c.prototype._wnafMulAdd=function(e,t,n,r,o){var s,c,d,u=this._wnafT1,l=this._wnafT2,A=this._wnafT3,f=0;for(s=0;s=1;s-=2){var g=s-1,p=s;if(1===u[g]&&1===u[p]){var m=[t[g],null,null,t[p]];0===t[g].y.cmp(t[p].y)?(m[1]=t[g].add(t[p]),m[2]=t[g].toJ().mixedAdd(t[p].neg())):0===t[g].y.cmp(t[p].y.redNeg())?(m[1]=t[g].toJ().mixedAdd(t[p]),m[2]=t[g].add(t[p].neg())):(m[1]=t[g].toJ().mixedAdd(t[p]),m[2]=t[g].toJ().mixedAdd(t[p].neg()));var v=[-3,-1,-5,-7,0,7,5,1,3],y=a(n[g],n[p]);for(f=Math.max(y[0].length,f),A[g]=new Array(f),A[p]=new Array(f),c=0;c=0;s--){for(var w=0;s>=0;){var B=!0;for(c=0;c=0&&w++,C=C.dblp(w),s<0)break;for(c=0;c0?d=l[c][_-1>>1]:_<0&&(d=l[c][-_-1>>1].neg()),C="affine"===d.type?C.mixedAdd(d):C.add(d))}}for(s=0;s=Math.ceil((e.bitLength()+1)/t.step)},d.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var n=[this],r=this,o=0;o{"use strict";var r=n(953),o=n(3785),i=n(5717),a=n(4918),s=r.assert;function c(e){this.twisted=1!=(0|e.a),this.mOneA=this.twisted&&-1==(0|e.a),this.extended=this.mOneA,a.call(this,"edwards",e),this.a=new o(e.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new o(e.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new o(e.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),s(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1==(0|e.c)}function d(e,t,n,r,i){a.BasePoint.call(this,e,"projective"),null===t&&null===n&&null===r?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new o(t,16),this.y=new o(n,16),this.z=r?new o(r,16):this.curve.one,this.t=i&&new o(i,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}i(c,a),e.exports=c,c.prototype._mulA=function(e){return this.mOneA?e.redNeg():this.a.redMul(e)},c.prototype._mulC=function(e){return this.oneC?e:this.c.redMul(e)},c.prototype.jpoint=function(e,t,n,r){return this.point(e,t,n,r)},c.prototype.pointFromX=function(e,t){(e=new o(e,16)).red||(e=e.toRed(this.red));var n=e.redSqr(),r=this.c2.redSub(this.a.redMul(n)),i=this.one.redSub(this.c2.redMul(this.d).redMul(n)),a=r.redMul(i.redInvm()),s=a.redSqrt();if(0!==s.redSqr().redSub(a).cmp(this.zero))throw new Error("invalid point");var c=s.fromRed().isOdd();return(t&&!c||!t&&c)&&(s=s.redNeg()),this.point(e,s)},c.prototype.pointFromY=function(e,t){(e=new o(e,16)).red||(e=e.toRed(this.red));var n=e.redSqr(),r=n.redSub(this.c2),i=n.redMul(this.d).redMul(this.c2).redSub(this.a),a=r.redMul(i.redInvm());if(0===a.cmp(this.zero)){if(t)throw new Error("invalid point");return this.point(this.zero,e)}var s=a.redSqrt();if(0!==s.redSqr().redSub(a).cmp(this.zero))throw new Error("invalid point");return s.fromRed().isOdd()!==t&&(s=s.redNeg()),this.point(s,e)},c.prototype.validate=function(e){if(e.isInfinity())return!0;e.normalize();var t=e.x.redSqr(),n=e.y.redSqr(),r=t.redMul(this.a).redAdd(n),o=this.c2.redMul(this.one.redAdd(this.d.redMul(t).redMul(n)));return 0===r.cmp(o)},i(d,a.BasePoint),c.prototype.pointFromJSON=function(e){return d.fromJSON(this,e)},c.prototype.point=function(e,t,n,r){return new d(this,e,t,n,r)},d.fromJSON=function(e,t){return new d(e,t[0],t[1],t[2])},d.prototype.inspect=function(){return this.isInfinity()?"":""},d.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},d.prototype._extDbl=function(){var e=this.x.redSqr(),t=this.y.redSqr(),n=this.z.redSqr();n=n.redIAdd(n);var r=this.curve._mulA(e),o=this.x.redAdd(this.y).redSqr().redISub(e).redISub(t),i=r.redAdd(t),a=i.redSub(n),s=r.redSub(t),c=o.redMul(a),d=i.redMul(s),u=o.redMul(s),l=a.redMul(i);return this.curve.point(c,d,l,u)},d.prototype._projDbl=function(){var e,t,n,r,o,i,a=this.x.redAdd(this.y).redSqr(),s=this.x.redSqr(),c=this.y.redSqr();if(this.curve.twisted){var d=(r=this.curve._mulA(s)).redAdd(c);this.zOne?(e=a.redSub(s).redSub(c).redMul(d.redSub(this.curve.two)),t=d.redMul(r.redSub(c)),n=d.redSqr().redSub(d).redSub(d)):(o=this.z.redSqr(),i=d.redSub(o).redISub(o),e=a.redSub(s).redISub(c).redMul(i),t=d.redMul(r.redSub(c)),n=d.redMul(i))}else r=s.redAdd(c),o=this.curve._mulC(this.z).redSqr(),i=r.redSub(o).redSub(o),e=this.curve._mulC(a.redISub(r)).redMul(i),t=this.curve._mulC(r).redMul(s.redISub(c)),n=r.redMul(i);return this.curve.point(e,t,n)},d.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},d.prototype._extAdd=function(e){var t=this.y.redSub(this.x).redMul(e.y.redSub(e.x)),n=this.y.redAdd(this.x).redMul(e.y.redAdd(e.x)),r=this.t.redMul(this.curve.dd).redMul(e.t),o=this.z.redMul(e.z.redAdd(e.z)),i=n.redSub(t),a=o.redSub(r),s=o.redAdd(r),c=n.redAdd(t),d=i.redMul(a),u=s.redMul(c),l=i.redMul(c),A=a.redMul(s);return this.curve.point(d,u,A,l)},d.prototype._projAdd=function(e){var t,n,r=this.z.redMul(e.z),o=r.redSqr(),i=this.x.redMul(e.x),a=this.y.redMul(e.y),s=this.curve.d.redMul(i).redMul(a),c=o.redSub(s),d=o.redAdd(s),u=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(i).redISub(a),l=r.redMul(c).redMul(u);return this.curve.twisted?(t=r.redMul(d).redMul(a.redSub(this.curve._mulA(i))),n=c.redMul(d)):(t=r.redMul(d).redMul(a.redSub(i)),n=this.curve._mulC(c).redMul(d)),this.curve.point(l,t,n)},d.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)},d.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)},d.prototype.mulAdd=function(e,t,n){return this.curve._wnafMulAdd(1,[this,t],[e,n],2,!1)},d.prototype.jmulAdd=function(e,t,n){return this.curve._wnafMulAdd(1,[this,t],[e,n],2,!0)},d.prototype.normalize=function(){if(this.zOne)return this;var e=this.z.redInvm();return this.x=this.x.redMul(e),this.y=this.y.redMul(e),this.t&&(this.t=this.t.redMul(e)),this.z=this.curve.one,this.zOne=!0,this},d.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},d.prototype.getX=function(){return this.normalize(),this.x.fromRed()},d.prototype.getY=function(){return this.normalize(),this.y.fromRed()},d.prototype.eq=function(e){return this===e||0===this.getX().cmp(e.getX())&&0===this.getY().cmp(e.getY())},d.prototype.eqXToP=function(e){var t=e.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(t))return!0;for(var n=e.clone(),r=this.curve.redN.redMul(this.z);;){if(n.iadd(this.curve.n),n.cmp(this.curve.p)>=0)return!1;if(t.redIAdd(r),0===this.x.cmp(t))return!0}},d.prototype.toP=d.prototype.normalize,d.prototype.mixedAdd=d.prototype.add},8254:(e,t,n)=>{"use strict";var r=t;r.base=n(4918),r.short=n(6673),r.mont=n(2881),r.edwards=n(1138)},2881:(e,t,n)=>{"use strict";var r=n(3785),o=n(5717),i=n(4918),a=n(953);function s(e){i.call(this,"mont",e),this.a=new r(e.a,16).toRed(this.red),this.b=new r(e.b,16).toRed(this.red),this.i4=new r(4).toRed(this.red).redInvm(),this.two=new r(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function c(e,t,n){i.BasePoint.call(this,e,"projective"),null===t&&null===n?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new r(t,16),this.z=new r(n,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}o(s,i),e.exports=s,s.prototype.validate=function(e){var t=e.normalize().x,n=t.redSqr(),r=n.redMul(t).redAdd(n.redMul(this.a)).redAdd(t);return 0===r.redSqrt().redSqr().cmp(r)},o(c,i.BasePoint),s.prototype.decodePoint=function(e,t){return this.point(a.toArray(e,t),1)},s.prototype.point=function(e,t){return new c(this,e,t)},s.prototype.pointFromJSON=function(e){return c.fromJSON(this,e)},c.prototype.precompute=function(){},c.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},c.fromJSON=function(e,t){return new c(e,t[0],t[1]||e.one)},c.prototype.inspect=function(){return this.isInfinity()?"":""},c.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},c.prototype.dbl=function(){var e=this.x.redAdd(this.z).redSqr(),t=this.x.redSub(this.z).redSqr(),n=e.redSub(t),r=e.redMul(t),o=n.redMul(t.redAdd(this.curve.a24.redMul(n)));return this.curve.point(r,o)},c.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},c.prototype.diffAdd=function(e,t){var n=this.x.redAdd(this.z),r=this.x.redSub(this.z),o=e.x.redAdd(e.z),i=e.x.redSub(e.z).redMul(n),a=o.redMul(r),s=t.z.redMul(i.redAdd(a).redSqr()),c=t.x.redMul(i.redISub(a).redSqr());return this.curve.point(s,c)},c.prototype.mul=function(e){for(var t=e.clone(),n=this,r=this.curve.point(null,null),o=[];0!==t.cmpn(0);t.iushrn(1))o.push(t.andln(1));for(var i=o.length-1;i>=0;i--)0===o[i]?(n=n.diffAdd(r,this),r=r.dbl()):(r=n.diffAdd(r,this),n=n.dbl());return r},c.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},c.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},c.prototype.eq=function(e){return 0===this.getX().cmp(e.getX())},c.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},c.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},6673:(e,t,n)=>{"use strict";var r=n(953),o=n(3785),i=n(5717),a=n(4918),s=r.assert;function c(e){a.call(this,"short",e),this.a=new o(e.a,16).toRed(this.red),this.b=new o(e.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(e),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function d(e,t,n,r){a.BasePoint.call(this,e,"affine"),null===t&&null===n?(this.x=null,this.y=null,this.inf=!0):(this.x=new o(t,16),this.y=new o(n,16),r&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function u(e,t,n,r){a.BasePoint.call(this,e,"jacobian"),null===t&&null===n&&null===r?(this.x=this.curve.one,this.y=this.curve.one,this.z=new o(0)):(this.x=new o(t,16),this.y=new o(n,16),this.z=new o(r,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}i(c,a),e.exports=c,c.prototype._getEndomorphism=function(e){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var t,n;if(e.beta)t=new o(e.beta,16).toRed(this.red);else{var r=this._getEndoRoots(this.p);t=(t=r[0].cmp(r[1])<0?r[0]:r[1]).toRed(this.red)}if(e.lambda)n=new o(e.lambda,16);else{var i=this._getEndoRoots(this.n);0===this.g.mul(i[0]).x.cmp(this.g.x.redMul(t))?n=i[0]:(n=i[1],s(0===this.g.mul(n).x.cmp(this.g.x.redMul(t))))}return{beta:t,lambda:n,basis:e.basis?e.basis.map((function(e){return{a:new o(e.a,16),b:new o(e.b,16)}})):this._getEndoBasis(n)}}},c.prototype._getEndoRoots=function(e){var t=e===this.p?this.red:o.mont(e),n=new o(2).toRed(t).redInvm(),r=n.redNeg(),i=new o(3).toRed(t).redNeg().redSqrt().redMul(n);return[r.redAdd(i).fromRed(),r.redSub(i).fromRed()]},c.prototype._getEndoBasis=function(e){for(var t,n,r,i,a,s,c,d,u,l=this.n.ushrn(Math.floor(this.n.bitLength()/2)),A=e,f=this.n.clone(),h=new o(1),g=new o(0),p=new o(0),m=new o(1),v=0;0!==A.cmpn(0);){var y=f.div(A);d=f.sub(y.mul(A)),u=p.sub(y.mul(h));var b=m.sub(y.mul(g));if(!r&&d.cmp(l)<0)t=c.neg(),n=h,r=d.neg(),i=u;else if(r&&2==++v)break;c=d,f=A,A=d,p=h,h=u,m=g,g=b}a=d.neg(),s=u;var I=r.sqr().add(i.sqr());return a.sqr().add(s.sqr()).cmp(I)>=0&&(a=t,s=n),r.negative&&(r=r.neg(),i=i.neg()),a.negative&&(a=a.neg(),s=s.neg()),[{a:r,b:i},{a,b:s}]},c.prototype._endoSplit=function(e){var t=this.endo.basis,n=t[0],r=t[1],o=r.b.mul(e).divRound(this.n),i=n.b.neg().mul(e).divRound(this.n),a=o.mul(n.a),s=i.mul(r.a),c=o.mul(n.b),d=i.mul(r.b);return{k1:e.sub(a).sub(s),k2:c.add(d).neg()}},c.prototype.pointFromX=function(e,t){(e=new o(e,16)).red||(e=e.toRed(this.red));var n=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),r=n.redSqrt();if(0!==r.redSqr().redSub(n).cmp(this.zero))throw new Error("invalid point");var i=r.fromRed().isOdd();return(t&&!i||!t&&i)&&(r=r.redNeg()),this.point(e,r)},c.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,n=e.y,r=this.a.redMul(t),o=t.redSqr().redMul(t).redIAdd(r).redIAdd(this.b);return 0===n.redSqr().redISub(o).cmpn(0)},c.prototype._endoWnafMulAdd=function(e,t,n){for(var r=this._endoWnafT1,o=this._endoWnafT2,i=0;i":""},d.prototype.isInfinity=function(){return this.inf},d.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(0===this.x.cmp(e.x))return this.curve.point(null,null);var t=this.y.redSub(e.y);0!==t.cmpn(0)&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var n=t.redSqr().redISub(this.x).redISub(e.x),r=t.redMul(this.x.redSub(n)).redISub(this.y);return this.curve.point(n,r)},d.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(0===e.cmpn(0))return this.curve.point(null,null);var t=this.curve.a,n=this.x.redSqr(),r=e.redInvm(),o=n.redAdd(n).redIAdd(n).redIAdd(t).redMul(r),i=o.redSqr().redISub(this.x.redAdd(this.x)),a=o.redMul(this.x.redSub(i)).redISub(this.y);return this.curve.point(i,a)},d.prototype.getX=function(){return this.x.fromRed()},d.prototype.getY=function(){return this.y.fromRed()},d.prototype.mul=function(e){return e=new o(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},d.prototype.mulAdd=function(e,t,n){var r=[this,t],o=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(r,o):this.curve._wnafMulAdd(1,r,o,2)},d.prototype.jmulAdd=function(e,t,n){var r=[this,t],o=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(r,o,!0):this.curve._wnafMulAdd(1,r,o,2,!0)},d.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||0===this.x.cmp(e.x)&&0===this.y.cmp(e.y))},d.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var n=this.precomputed,r=function(e){return e.neg()};t.precomputed={naf:n.naf&&{wnd:n.naf.wnd,points:n.naf.points.map(r)},doubles:n.doubles&&{step:n.doubles.step,points:n.doubles.points.map(r)}}}return t},d.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},i(u,a.BasePoint),c.prototype.jpoint=function(e,t,n){return new u(this,e,t,n)},u.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),n=this.x.redMul(t),r=this.y.redMul(t).redMul(e);return this.curve.point(n,r)},u.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},u.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),n=this.z.redSqr(),r=this.x.redMul(t),o=e.x.redMul(n),i=this.y.redMul(t.redMul(e.z)),a=e.y.redMul(n.redMul(this.z)),s=r.redSub(o),c=i.redSub(a);if(0===s.cmpn(0))return 0!==c.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var d=s.redSqr(),u=d.redMul(s),l=r.redMul(d),A=c.redSqr().redIAdd(u).redISub(l).redISub(l),f=c.redMul(l.redISub(A)).redISub(i.redMul(u)),h=this.z.redMul(e.z).redMul(s);return this.curve.jpoint(A,f,h)},u.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),n=this.x,r=e.x.redMul(t),o=this.y,i=e.y.redMul(t).redMul(this.z),a=n.redSub(r),s=o.redSub(i);if(0===a.cmpn(0))return 0!==s.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var c=a.redSqr(),d=c.redMul(a),u=n.redMul(c),l=s.redSqr().redIAdd(d).redISub(u).redISub(u),A=s.redMul(u.redISub(l)).redISub(o.redMul(d)),f=this.z.redMul(a);return this.curve.jpoint(l,A,f)},u.prototype.dblp=function(e){if(0===e)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var t;if(this.curve.zeroA||this.curve.threeA){var n=this;for(t=0;t=0)return!1;if(n.redIAdd(o),0===this.x.cmp(n))return!0}},u.prototype.inspect=function(){return this.isInfinity()?"":""},u.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},5427:(e,t,n)=>{"use strict";var r,o=t,i=n(3715),a=n(8254),s=n(953).assert;function c(e){"short"===e.type?this.curve=new a.short(e):"edwards"===e.type?this.curve=new a.edwards(e):this.curve=new a.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,s(this.g.validate(),"Invalid curve"),s(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function d(e,t){Object.defineProperty(o,e,{configurable:!0,enumerable:!0,get:function(){var n=new c(t);return Object.defineProperty(o,e,{configurable:!0,enumerable:!0,value:n}),n}})}o.PresetCurve=c,d("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:i.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),d("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:i.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),d("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:i.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),d("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:i.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"]}),d("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:i.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"]}),d("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:i.sha256,gRed:!1,g:["9"]}),d("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:i.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{r=n(1037)}catch(e){r=void 0}d("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:i.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",r]})},7954:(e,t,n)=>{"use strict";var r=n(3785),o=n(2156),i=n(953),a=n(5427),s=n(9931),c=i.assert,d=n(1251),u=n(611);function l(e){if(!(this instanceof l))return new l(e);"string"==typeof e&&(c(Object.prototype.hasOwnProperty.call(a,e),"Unknown curve "+e),e=a[e]),e instanceof a.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),this.hash=e.hash||e.curve.hash}e.exports=l,l.prototype.keyPair=function(e){return new d(this,e)},l.prototype.keyFromPrivate=function(e,t){return d.fromPrivate(this,e,t)},l.prototype.keyFromPublic=function(e,t){return d.fromPublic(this,e,t)},l.prototype.genKeyPair=function(e){e||(e={});for(var t=new o({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||s(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),n=this.n.byteLength(),i=this.n.sub(new r(2));;){var a=new r(t.generate(n));if(!(a.cmp(i)>0))return a.iaddn(1),this.keyFromPrivate(a)}},l.prototype._truncateToN=function(e,t){var n=8*e.byteLength()-this.n.bitLength();return n>0&&(e=e.ushrn(n)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e},l.prototype.sign=function(e,t,n,i){"object"==typeof n&&(i=n,n=null),i||(i={}),t=this.keyFromPrivate(t,n),e=this._truncateToN(new r(e,16));for(var a=this.n.byteLength(),s=t.getPrivate().toArray("be",a),c=e.toArray("be",a),d=new o({hash:this.hash,entropy:s,nonce:c,pers:i.pers,persEnc:i.persEnc||"utf8"}),l=this.n.sub(new r(1)),A=0;;A++){var f=i.k?i.k(A):new r(d.generate(this.n.byteLength()));if(!((f=this._truncateToN(f,!0)).cmpn(1)<=0||f.cmp(l)>=0)){var h=this.g.mul(f);if(!h.isInfinity()){var g=h.getX(),p=g.umod(this.n);if(0!==p.cmpn(0)){var m=f.invm(this.n).mul(p.mul(t.getPrivate()).iadd(e));if(0!==(m=m.umod(this.n)).cmpn(0)){var v=(h.getY().isOdd()?1:0)|(0!==g.cmp(p)?2:0);return i.canonical&&m.cmp(this.nh)>0&&(m=this.n.sub(m),v^=1),new u({r:p,s:m,recoveryParam:v})}}}}}},l.prototype.verify=function(e,t,n,o){e=this._truncateToN(new r(e,16)),n=this.keyFromPublic(n,o);var i=(t=new u(t,"hex")).r,a=t.s;if(i.cmpn(1)<0||i.cmp(this.n)>=0)return!1;if(a.cmpn(1)<0||a.cmp(this.n)>=0)return!1;var s,c=a.invm(this.n),d=c.mul(e).umod(this.n),l=c.mul(i).umod(this.n);return this.curve._maxwellTrick?!(s=this.g.jmulAdd(d,n.getPublic(),l)).isInfinity()&&s.eqXToP(i):!(s=this.g.mulAdd(d,n.getPublic(),l)).isInfinity()&&0===s.getX().umod(this.n).cmp(i)},l.prototype.recoverPubKey=function(e,t,n,o){c((3&n)===n,"The recovery param is more than two bits"),t=new u(t,o);var i=this.n,a=new r(e),s=t.r,d=t.s,l=1&n,A=n>>1;if(s.cmp(this.curve.p.umod(this.curve.n))>=0&&A)throw new Error("Unable to find sencond key candinate");s=A?this.curve.pointFromX(s.add(this.curve.n),l):this.curve.pointFromX(s,l);var f=t.r.invm(i),h=i.sub(a).mul(f).umod(i),g=d.mul(f).umod(i);return this.g.mulAdd(h,s,g)},l.prototype.getKeyRecoveryParam=function(e,t,n,r){if(null!==(t=new u(t,r)).recoveryParam)return t.recoveryParam;for(var o=0;o<4;o++){var i;try{i=this.recoverPubKey(e,t,o)}catch(e){continue}if(i.eq(n))return o}throw new Error("Unable to find valid recovery factor")}},1251:(e,t,n)=>{"use strict";var r=n(3785),o=n(953).assert;function i(e,t){this.ec=e,this.priv=null,this.pub=null,t.priv&&this._importPrivate(t.priv,t.privEnc),t.pub&&this._importPublic(t.pub,t.pubEnc)}e.exports=i,i.fromPublic=function(e,t,n){return t instanceof i?t:new i(e,{pub:t,pubEnc:n})},i.fromPrivate=function(e,t,n){return t instanceof i?t:new i(e,{priv:t,privEnc:n})},i.prototype.validate=function(){var e=this.getPublic();return e.isInfinity()?{result:!1,reason:"Invalid public key"}:e.validate()?e.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},i.prototype.getPublic=function(e,t){return"string"==typeof e&&(t=e,e=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),t?this.pub.encode(t,e):this.pub},i.prototype.getPrivate=function(e){return"hex"===e?this.priv.toString(16,2):this.priv},i.prototype._importPrivate=function(e,t){this.priv=new r(e,t||16),this.priv=this.priv.umod(this.ec.curve.n)},i.prototype._importPublic=function(e,t){if(e.x||e.y)return"mont"===this.ec.curve.type?o(e.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||o(e.x&&e.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(e.x,e.y));this.pub=this.ec.curve.decodePoint(e,t)},i.prototype.derive=function(e){return e.validate()||o(e.validate(),"public point not validated"),e.mul(this.priv).getX()},i.prototype.sign=function(e,t,n){return this.ec.sign(e,this,t,n)},i.prototype.verify=function(e,t){return this.ec.verify(e,t,this)},i.prototype.inspect=function(){return""}},611:(e,t,n)=>{"use strict";var r=n(3785),o=n(953),i=o.assert;function a(e,t){if(e instanceof a)return e;this._importDER(e,t)||(i(e.r&&e.s,"Signature without r or s"),this.r=new r(e.r,16),this.s=new r(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}function s(){this.place=0}function c(e,t){var n=e[t.place++];if(!(128&n))return n;var r=15&n;if(0===r||r>4)return!1;for(var o=0,i=0,a=t.place;i>>=0;return!(o<=127)&&(t.place=a,o)}function d(e){for(var t=0,n=e.length-1;!e[t]&&!(128&e[t+1])&&t>>3);for(e.push(128|n);--n;)e.push(t>>>(n<<3)&255);e.push(t)}}e.exports=a,a.prototype._importDER=function(e,t){e=o.toArray(e,t);var n=new s;if(48!==e[n.place++])return!1;var i=c(e,n);if(!1===i)return!1;if(i+n.place!==e.length)return!1;if(2!==e[n.place++])return!1;var a=c(e,n);if(!1===a)return!1;var d=e.slice(n.place,a+n.place);if(n.place+=a,2!==e[n.place++])return!1;var u=c(e,n);if(!1===u)return!1;if(e.length!==u+n.place)return!1;var l=e.slice(n.place,u+n.place);if(0===d[0]){if(!(128&d[1]))return!1;d=d.slice(1)}if(0===l[0]){if(!(128&l[1]))return!1;l=l.slice(1)}return this.r=new r(d),this.s=new r(l),this.recoveryParam=null,!0},a.prototype.toDER=function(e){var t=this.r.toArray(),n=this.s.toArray();for(128&t[0]&&(t=[0].concat(t)),128&n[0]&&(n=[0].concat(n)),t=d(t),n=d(n);!(n[0]||128&n[1]);)n=n.slice(1);var r=[2];u(r,t.length),(r=r.concat(t)).push(2),u(r,n.length);var i=r.concat(n),a=[48];return u(a,i.length),a=a.concat(i),o.encode(a,e)}},5980:(e,t,n)=>{"use strict";var r=n(3715),o=n(5427),i=n(953),a=i.assert,s=i.parseBytes,c=n(9087),d=n(3622);function u(e){if(a("ed25519"===e,"only tested with ed25519 so far"),!(this instanceof u))return new u(e);e=o[e].curve,this.curve=e,this.g=e.g,this.g.precompute(e.n.bitLength()+1),this.pointClass=e.point().constructor,this.encodingLength=Math.ceil(e.n.bitLength()/8),this.hash=r.sha512}e.exports=u,u.prototype.sign=function(e,t){e=s(e);var n=this.keyFromSecret(t),r=this.hashInt(n.messagePrefix(),e),o=this.g.mul(r),i=this.encodePoint(o),a=this.hashInt(i,n.pubBytes(),e).mul(n.priv()),c=r.add(a).umod(this.curve.n);return this.makeSignature({R:o,S:c,Rencoded:i})},u.prototype.verify=function(e,t,n){e=s(e),t=this.makeSignature(t);var r=this.keyFromPublic(n),o=this.hashInt(t.Rencoded(),r.pubBytes(),e),i=this.g.mul(t.S());return t.R().add(r.pub().mul(o)).eq(i)},u.prototype.hashInt=function(){for(var e=this.hash(),t=0;t{"use strict";var r=n(953),o=r.assert,i=r.parseBytes,a=r.cachedProperty;function s(e,t){this.eddsa=e,this._secret=i(t.secret),e.isPoint(t.pub)?this._pub=t.pub:this._pubBytes=i(t.pub)}s.fromPublic=function(e,t){return t instanceof s?t:new s(e,{pub:t})},s.fromSecret=function(e,t){return t instanceof s?t:new s(e,{secret:t})},s.prototype.secret=function(){return this._secret},a(s,"pubBytes",(function(){return this.eddsa.encodePoint(this.pub())})),a(s,"pub",(function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())})),a(s,"privBytes",(function(){var e=this.eddsa,t=this.hash(),n=e.encodingLength-1,r=t.slice(0,e.encodingLength);return r[0]&=248,r[n]&=127,r[n]|=64,r})),a(s,"priv",(function(){return this.eddsa.decodeInt(this.privBytes())})),a(s,"hash",(function(){return this.eddsa.hash().update(this.secret()).digest()})),a(s,"messagePrefix",(function(){return this.hash().slice(this.eddsa.encodingLength)})),s.prototype.sign=function(e){return o(this._secret,"KeyPair can only verify"),this.eddsa.sign(e,this)},s.prototype.verify=function(e,t){return this.eddsa.verify(e,t,this)},s.prototype.getSecret=function(e){return o(this._secret,"KeyPair is public only"),r.encode(this.secret(),e)},s.prototype.getPublic=function(e){return r.encode(this.pubBytes(),e)},e.exports=s},3622:(e,t,n)=>{"use strict";var r=n(3785),o=n(953),i=o.assert,a=o.cachedProperty,s=o.parseBytes;function c(e,t){this.eddsa=e,"object"!=typeof t&&(t=s(t)),Array.isArray(t)&&(t={R:t.slice(0,e.encodingLength),S:t.slice(e.encodingLength)}),i(t.R&&t.S,"Signature without R or S"),e.isPoint(t.R)&&(this._R=t.R),t.S instanceof r&&(this._S=t.S),this._Rencoded=Array.isArray(t.R)?t.R:t.Rencoded,this._Sencoded=Array.isArray(t.S)?t.S:t.Sencoded}a(c,"S",(function(){return this.eddsa.decodeInt(this.Sencoded())})),a(c,"R",(function(){return this.eddsa.decodePoint(this.Rencoded())})),a(c,"Rencoded",(function(){return this.eddsa.encodePoint(this.R())})),a(c,"Sencoded",(function(){return this.eddsa.encodeInt(this.S())})),c.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},c.prototype.toHex=function(){return o.encode(this.toBytes(),"hex").toUpperCase()},e.exports=c},1037:e=>{e.exports={doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}}},953:(e,t,n)=>{"use strict";var r=t,o=n(3785),i=n(9746),a=n(4504);r.assert=i,r.toArray=a.toArray,r.zero2=a.zero2,r.toHex=a.toHex,r.encode=a.encode,r.getNAF=function(e,t,n){var r=new Array(Math.max(e.bitLength(),n)+1);r.fill(0);for(var o=1<(o>>1)-1?(o>>1)-c:c,i.isubn(s)):s=0,r[a]=s,i.iushrn(1)}return r},r.getJSF=function(e,t){var n=[[],[]];e=e.clone(),t=t.clone();for(var r,o=0,i=0;e.cmpn(-o)>0||t.cmpn(-i)>0;){var a,s,c=e.andln(3)+o&3,d=t.andln(3)+i&3;3===c&&(c=-1),3===d&&(d=-1),a=0==(1&c)?0:3!=(r=e.andln(7)+o&7)&&5!==r||2!==d?c:-c,n[0].push(a),s=0==(1&d)?0:3!=(r=t.andln(7)+i&7)&&5!==r||2!==c?d:-d,n[1].push(s),2*o===a+1&&(o=1-o),2*i===s+1&&(i=1-i),e.iushrn(1),t.iushrn(1)}return n},r.cachedProperty=function(e,t,n){var r="_"+t;e.prototype[t]=function(){return void 0!==this[r]?this[r]:this[r]=n.call(this)}},r.parseBytes=function(e){return"string"==typeof e?r.toArray(e,"hex"):e},r.intFromLE=function(e){return new o(e,"hex","le")}},3785:function(e,t,n){!function(e,t){"use strict";function r(e,t){if(!e)throw new Error(t||"Assertion failed")}function o(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}function i(e,t,n){if(i.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(n=t,t=10),this._init(e||0,t||10,n||"be"))}var a;"object"==typeof e?e.exports=i:t.BN=i,i.BN=i,i.wordSize=26;try{a="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:n(5568).Buffer}catch(e){}function s(e,t){var n=e.charCodeAt(t);return n>=65&&n<=70?n-55:n>=97&&n<=102?n-87:n-48&15}function c(e,t,n){var r=s(e,n);return n-1>=t&&(r|=s(e,n-1)<<4),r}function d(e,t,n,r){for(var o=0,i=Math.min(e.length,n),a=t;a=49?s-49+10:s>=17?s-17+10:s}return o}i.isBN=function(e){return e instanceof i||null!==e&&"object"==typeof e&&e.constructor.wordSize===i.wordSize&&Array.isArray(e.words)},i.max=function(e,t){return e.cmp(t)>0?e:t},i.min=function(e,t){return e.cmp(t)<0?e:t},i.prototype._init=function(e,t,n){if("number"==typeof e)return this._initNumber(e,t,n);if("object"==typeof e)return this._initArray(e,t,n);"hex"===t&&(t=16),r(t===(0|t)&&t>=2&&t<=36);var o=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(o++,this.negative=1),o=0;o-=3)a=e[o]|e[o-1]<<8|e[o-2]<<16,this.words[i]|=a<>>26-s&67108863,(s+=24)>=26&&(s-=26,i++);else if("le"===n)for(o=0,i=0;o>>26-s&67108863,(s+=24)>=26&&(s-=26,i++);return this.strip()},i.prototype._parseHex=function(e,t,n){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var r=0;r=t;r-=2)o=c(e,t,r)<=18?(i-=18,a+=1,this.words[a]|=o>>>26):i+=8;else for(r=(e.length-t)%2==0?t+1:t;r=18?(i-=18,a+=1,this.words[a]|=o>>>26):i+=8;this.strip()},i.prototype._parseBase=function(e,t,n){this.words=[0],this.length=1;for(var r=0,o=1;o<=67108863;o*=t)r++;r--,o=o/t|0;for(var i=e.length-n,a=i%r,s=Math.min(i,i-a)+n,c=0,u=n;u1&&0===this.words[this.length-1];)this.length--;return this._normSign()},i.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},i.prototype.inspect=function(){return(this.red?""};var u=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],l=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],A=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function f(e,t,n){n.negative=t.negative^e.negative;var r=e.length+t.length|0;n.length=r,r=r-1|0;var o=0|e.words[0],i=0|t.words[0],a=o*i,s=67108863&a,c=a/67108864|0;n.words[0]=s;for(var d=1;d>>26,l=67108863&c,A=Math.min(d,t.length-1),f=Math.max(0,d-e.length+1);f<=A;f++){var h=d-f|0;u+=(a=(o=0|e.words[h])*(i=0|t.words[f])+l)/67108864|0,l=67108863&a}n.words[d]=0|l,c=0|u}return 0!==c?n.words[d]=0|c:n.length--,n.strip()}i.prototype.toString=function(e,t){var n;if(t=0|t||1,16===(e=e||10)||"hex"===e){n="";for(var o=0,i=0,a=0;a>>24-o&16777215)||a!==this.length-1?u[6-c.length]+c+n:c+n,(o+=2)>=26&&(o-=26,a--)}for(0!==i&&(n=i.toString(16)+n);n.length%t!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(e===(0|e)&&e>=2&&e<=36){var d=l[e],f=A[e];n="";var h=this.clone();for(h.negative=0;!h.isZero();){var g=h.modn(f).toString(e);n=(h=h.idivn(f)).isZero()?g+n:u[d-g.length]+g+n}for(this.isZero()&&(n="0"+n);n.length%t!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}r(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},i.prototype.toJSON=function(){return this.toString(16)},i.prototype.toBuffer=function(e,t){return r(void 0!==a),this.toArrayLike(a,e,t)},i.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},i.prototype.toArrayLike=function(e,t,n){var o=this.byteLength(),i=n||Math.max(1,o);r(o<=i,"byte array longer than desired length"),r(i>0,"Requested array length <= 0"),this.strip();var a,s,c="le"===t,d=new e(i),u=this.clone();if(c){for(s=0;!u.isZero();s++)a=u.andln(255),u.iushrn(8),d[s]=a;for(;s=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},i.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,n=0;return 0==(8191&t)&&(n+=13,t>>>=13),0==(127&t)&&(n+=7,t>>>=7),0==(15&t)&&(n+=4,t>>>=4),0==(3&t)&&(n+=2,t>>>=2),0==(1&t)&&n++,n},i.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},i.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},i.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var n=0;ne.length?this.clone().iand(e):e.clone().iand(this)},i.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},i.prototype.iuxor=function(e){var t,n;this.length>e.length?(t=this,n=e):(t=e,n=this);for(var r=0;re.length?this.clone().ixor(e):e.clone().ixor(this)},i.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},i.prototype.inotn=function(e){r("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),n=e%26;this._expand(t),n>0&&t--;for(var o=0;o0&&(this.words[o]=~this.words[o]&67108863>>26-n),this.strip()},i.prototype.notn=function(e){return this.clone().inotn(e)},i.prototype.setn=function(e,t){r("number"==typeof e&&e>=0);var n=e/26|0,o=e%26;return this._expand(n+1),this.words[n]=t?this.words[n]|1<e.length?(n=this,r=e):(n=e,r=this);for(var o=0,i=0;i>>26;for(;0!==o&&i>>26;if(this.length=n.length,0!==o)this.words[this.length]=o,this.length++;else if(n!==this)for(;ie.length?this.clone().iadd(e):e.clone().iadd(this)},i.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var n,r,o=this.cmp(e);if(0===o)return this.negative=0,this.length=1,this.words[0]=0,this;o>0?(n=this,r=e):(n=e,r=this);for(var i=0,a=0;a>26,this.words[a]=67108863&t;for(;0!==i&&a>26,this.words[a]=67108863&t;if(0===i&&a>>13,f=0|a[1],h=8191&f,g=f>>>13,p=0|a[2],m=8191&p,v=p>>>13,y=0|a[3],b=8191&y,I=y>>>13,C=0|a[4],E=8191&C,w=C>>>13,B=0|a[5],_=8191&B,S=B>>>13,k=0|a[6],O=8191&k,Q=k>>>13,R=0|a[7],P=8191&R,N=R>>>13,x=0|a[8],D=8191&x,M=x>>>13,T=0|a[9],U=8191&T,H=T>>>13,j=0|s[0],J=8191&j,F=j>>>13,G=0|s[1],L=8191&G,q=G>>>13,Y=0|s[2],V=8191&Y,W=Y>>>13,K=0|s[3],Z=8191&K,z=K>>>13,X=0|s[4],$=8191&X,ee=X>>>13,te=0|s[5],ne=8191&te,re=te>>>13,oe=0|s[6],ie=8191&oe,ae=oe>>>13,se=0|s[7],ce=8191&se,de=se>>>13,ue=0|s[8],le=8191&ue,Ae=ue>>>13,fe=0|s[9],he=8191&fe,ge=fe>>>13;n.negative=e.negative^t.negative,n.length=19;var pe=(d+(r=Math.imul(l,J))|0)+((8191&(o=(o=Math.imul(l,F))+Math.imul(A,J)|0))<<13)|0;d=((i=Math.imul(A,F))+(o>>>13)|0)+(pe>>>26)|0,pe&=67108863,r=Math.imul(h,J),o=(o=Math.imul(h,F))+Math.imul(g,J)|0,i=Math.imul(g,F);var me=(d+(r=r+Math.imul(l,L)|0)|0)+((8191&(o=(o=o+Math.imul(l,q)|0)+Math.imul(A,L)|0))<<13)|0;d=((i=i+Math.imul(A,q)|0)+(o>>>13)|0)+(me>>>26)|0,me&=67108863,r=Math.imul(m,J),o=(o=Math.imul(m,F))+Math.imul(v,J)|0,i=Math.imul(v,F),r=r+Math.imul(h,L)|0,o=(o=o+Math.imul(h,q)|0)+Math.imul(g,L)|0,i=i+Math.imul(g,q)|0;var ve=(d+(r=r+Math.imul(l,V)|0)|0)+((8191&(o=(o=o+Math.imul(l,W)|0)+Math.imul(A,V)|0))<<13)|0;d=((i=i+Math.imul(A,W)|0)+(o>>>13)|0)+(ve>>>26)|0,ve&=67108863,r=Math.imul(b,J),o=(o=Math.imul(b,F))+Math.imul(I,J)|0,i=Math.imul(I,F),r=r+Math.imul(m,L)|0,o=(o=o+Math.imul(m,q)|0)+Math.imul(v,L)|0,i=i+Math.imul(v,q)|0,r=r+Math.imul(h,V)|0,o=(o=o+Math.imul(h,W)|0)+Math.imul(g,V)|0,i=i+Math.imul(g,W)|0;var ye=(d+(r=r+Math.imul(l,Z)|0)|0)+((8191&(o=(o=o+Math.imul(l,z)|0)+Math.imul(A,Z)|0))<<13)|0;d=((i=i+Math.imul(A,z)|0)+(o>>>13)|0)+(ye>>>26)|0,ye&=67108863,r=Math.imul(E,J),o=(o=Math.imul(E,F))+Math.imul(w,J)|0,i=Math.imul(w,F),r=r+Math.imul(b,L)|0,o=(o=o+Math.imul(b,q)|0)+Math.imul(I,L)|0,i=i+Math.imul(I,q)|0,r=r+Math.imul(m,V)|0,o=(o=o+Math.imul(m,W)|0)+Math.imul(v,V)|0,i=i+Math.imul(v,W)|0,r=r+Math.imul(h,Z)|0,o=(o=o+Math.imul(h,z)|0)+Math.imul(g,Z)|0,i=i+Math.imul(g,z)|0;var be=(d+(r=r+Math.imul(l,$)|0)|0)+((8191&(o=(o=o+Math.imul(l,ee)|0)+Math.imul(A,$)|0))<<13)|0;d=((i=i+Math.imul(A,ee)|0)+(o>>>13)|0)+(be>>>26)|0,be&=67108863,r=Math.imul(_,J),o=(o=Math.imul(_,F))+Math.imul(S,J)|0,i=Math.imul(S,F),r=r+Math.imul(E,L)|0,o=(o=o+Math.imul(E,q)|0)+Math.imul(w,L)|0,i=i+Math.imul(w,q)|0,r=r+Math.imul(b,V)|0,o=(o=o+Math.imul(b,W)|0)+Math.imul(I,V)|0,i=i+Math.imul(I,W)|0,r=r+Math.imul(m,Z)|0,o=(o=o+Math.imul(m,z)|0)+Math.imul(v,Z)|0,i=i+Math.imul(v,z)|0,r=r+Math.imul(h,$)|0,o=(o=o+Math.imul(h,ee)|0)+Math.imul(g,$)|0,i=i+Math.imul(g,ee)|0;var Ie=(d+(r=r+Math.imul(l,ne)|0)|0)+((8191&(o=(o=o+Math.imul(l,re)|0)+Math.imul(A,ne)|0))<<13)|0;d=((i=i+Math.imul(A,re)|0)+(o>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,r=Math.imul(O,J),o=(o=Math.imul(O,F))+Math.imul(Q,J)|0,i=Math.imul(Q,F),r=r+Math.imul(_,L)|0,o=(o=o+Math.imul(_,q)|0)+Math.imul(S,L)|0,i=i+Math.imul(S,q)|0,r=r+Math.imul(E,V)|0,o=(o=o+Math.imul(E,W)|0)+Math.imul(w,V)|0,i=i+Math.imul(w,W)|0,r=r+Math.imul(b,Z)|0,o=(o=o+Math.imul(b,z)|0)+Math.imul(I,Z)|0,i=i+Math.imul(I,z)|0,r=r+Math.imul(m,$)|0,o=(o=o+Math.imul(m,ee)|0)+Math.imul(v,$)|0,i=i+Math.imul(v,ee)|0,r=r+Math.imul(h,ne)|0,o=(o=o+Math.imul(h,re)|0)+Math.imul(g,ne)|0,i=i+Math.imul(g,re)|0;var Ce=(d+(r=r+Math.imul(l,ie)|0)|0)+((8191&(o=(o=o+Math.imul(l,ae)|0)+Math.imul(A,ie)|0))<<13)|0;d=((i=i+Math.imul(A,ae)|0)+(o>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,r=Math.imul(P,J),o=(o=Math.imul(P,F))+Math.imul(N,J)|0,i=Math.imul(N,F),r=r+Math.imul(O,L)|0,o=(o=o+Math.imul(O,q)|0)+Math.imul(Q,L)|0,i=i+Math.imul(Q,q)|0,r=r+Math.imul(_,V)|0,o=(o=o+Math.imul(_,W)|0)+Math.imul(S,V)|0,i=i+Math.imul(S,W)|0,r=r+Math.imul(E,Z)|0,o=(o=o+Math.imul(E,z)|0)+Math.imul(w,Z)|0,i=i+Math.imul(w,z)|0,r=r+Math.imul(b,$)|0,o=(o=o+Math.imul(b,ee)|0)+Math.imul(I,$)|0,i=i+Math.imul(I,ee)|0,r=r+Math.imul(m,ne)|0,o=(o=o+Math.imul(m,re)|0)+Math.imul(v,ne)|0,i=i+Math.imul(v,re)|0,r=r+Math.imul(h,ie)|0,o=(o=o+Math.imul(h,ae)|0)+Math.imul(g,ie)|0,i=i+Math.imul(g,ae)|0;var Ee=(d+(r=r+Math.imul(l,ce)|0)|0)+((8191&(o=(o=o+Math.imul(l,de)|0)+Math.imul(A,ce)|0))<<13)|0;d=((i=i+Math.imul(A,de)|0)+(o>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,r=Math.imul(D,J),o=(o=Math.imul(D,F))+Math.imul(M,J)|0,i=Math.imul(M,F),r=r+Math.imul(P,L)|0,o=(o=o+Math.imul(P,q)|0)+Math.imul(N,L)|0,i=i+Math.imul(N,q)|0,r=r+Math.imul(O,V)|0,o=(o=o+Math.imul(O,W)|0)+Math.imul(Q,V)|0,i=i+Math.imul(Q,W)|0,r=r+Math.imul(_,Z)|0,o=(o=o+Math.imul(_,z)|0)+Math.imul(S,Z)|0,i=i+Math.imul(S,z)|0,r=r+Math.imul(E,$)|0,o=(o=o+Math.imul(E,ee)|0)+Math.imul(w,$)|0,i=i+Math.imul(w,ee)|0,r=r+Math.imul(b,ne)|0,o=(o=o+Math.imul(b,re)|0)+Math.imul(I,ne)|0,i=i+Math.imul(I,re)|0,r=r+Math.imul(m,ie)|0,o=(o=o+Math.imul(m,ae)|0)+Math.imul(v,ie)|0,i=i+Math.imul(v,ae)|0,r=r+Math.imul(h,ce)|0,o=(o=o+Math.imul(h,de)|0)+Math.imul(g,ce)|0,i=i+Math.imul(g,de)|0;var we=(d+(r=r+Math.imul(l,le)|0)|0)+((8191&(o=(o=o+Math.imul(l,Ae)|0)+Math.imul(A,le)|0))<<13)|0;d=((i=i+Math.imul(A,Ae)|0)+(o>>>13)|0)+(we>>>26)|0,we&=67108863,r=Math.imul(U,J),o=(o=Math.imul(U,F))+Math.imul(H,J)|0,i=Math.imul(H,F),r=r+Math.imul(D,L)|0,o=(o=o+Math.imul(D,q)|0)+Math.imul(M,L)|0,i=i+Math.imul(M,q)|0,r=r+Math.imul(P,V)|0,o=(o=o+Math.imul(P,W)|0)+Math.imul(N,V)|0,i=i+Math.imul(N,W)|0,r=r+Math.imul(O,Z)|0,o=(o=o+Math.imul(O,z)|0)+Math.imul(Q,Z)|0,i=i+Math.imul(Q,z)|0,r=r+Math.imul(_,$)|0,o=(o=o+Math.imul(_,ee)|0)+Math.imul(S,$)|0,i=i+Math.imul(S,ee)|0,r=r+Math.imul(E,ne)|0,o=(o=o+Math.imul(E,re)|0)+Math.imul(w,ne)|0,i=i+Math.imul(w,re)|0,r=r+Math.imul(b,ie)|0,o=(o=o+Math.imul(b,ae)|0)+Math.imul(I,ie)|0,i=i+Math.imul(I,ae)|0,r=r+Math.imul(m,ce)|0,o=(o=o+Math.imul(m,de)|0)+Math.imul(v,ce)|0,i=i+Math.imul(v,de)|0,r=r+Math.imul(h,le)|0,o=(o=o+Math.imul(h,Ae)|0)+Math.imul(g,le)|0,i=i+Math.imul(g,Ae)|0;var Be=(d+(r=r+Math.imul(l,he)|0)|0)+((8191&(o=(o=o+Math.imul(l,ge)|0)+Math.imul(A,he)|0))<<13)|0;d=((i=i+Math.imul(A,ge)|0)+(o>>>13)|0)+(Be>>>26)|0,Be&=67108863,r=Math.imul(U,L),o=(o=Math.imul(U,q))+Math.imul(H,L)|0,i=Math.imul(H,q),r=r+Math.imul(D,V)|0,o=(o=o+Math.imul(D,W)|0)+Math.imul(M,V)|0,i=i+Math.imul(M,W)|0,r=r+Math.imul(P,Z)|0,o=(o=o+Math.imul(P,z)|0)+Math.imul(N,Z)|0,i=i+Math.imul(N,z)|0,r=r+Math.imul(O,$)|0,o=(o=o+Math.imul(O,ee)|0)+Math.imul(Q,$)|0,i=i+Math.imul(Q,ee)|0,r=r+Math.imul(_,ne)|0,o=(o=o+Math.imul(_,re)|0)+Math.imul(S,ne)|0,i=i+Math.imul(S,re)|0,r=r+Math.imul(E,ie)|0,o=(o=o+Math.imul(E,ae)|0)+Math.imul(w,ie)|0,i=i+Math.imul(w,ae)|0,r=r+Math.imul(b,ce)|0,o=(o=o+Math.imul(b,de)|0)+Math.imul(I,ce)|0,i=i+Math.imul(I,de)|0,r=r+Math.imul(m,le)|0,o=(o=o+Math.imul(m,Ae)|0)+Math.imul(v,le)|0,i=i+Math.imul(v,Ae)|0;var _e=(d+(r=r+Math.imul(h,he)|0)|0)+((8191&(o=(o=o+Math.imul(h,ge)|0)+Math.imul(g,he)|0))<<13)|0;d=((i=i+Math.imul(g,ge)|0)+(o>>>13)|0)+(_e>>>26)|0,_e&=67108863,r=Math.imul(U,V),o=(o=Math.imul(U,W))+Math.imul(H,V)|0,i=Math.imul(H,W),r=r+Math.imul(D,Z)|0,o=(o=o+Math.imul(D,z)|0)+Math.imul(M,Z)|0,i=i+Math.imul(M,z)|0,r=r+Math.imul(P,$)|0,o=(o=o+Math.imul(P,ee)|0)+Math.imul(N,$)|0,i=i+Math.imul(N,ee)|0,r=r+Math.imul(O,ne)|0,o=(o=o+Math.imul(O,re)|0)+Math.imul(Q,ne)|0,i=i+Math.imul(Q,re)|0,r=r+Math.imul(_,ie)|0,o=(o=o+Math.imul(_,ae)|0)+Math.imul(S,ie)|0,i=i+Math.imul(S,ae)|0,r=r+Math.imul(E,ce)|0,o=(o=o+Math.imul(E,de)|0)+Math.imul(w,ce)|0,i=i+Math.imul(w,de)|0,r=r+Math.imul(b,le)|0,o=(o=o+Math.imul(b,Ae)|0)+Math.imul(I,le)|0,i=i+Math.imul(I,Ae)|0;var Se=(d+(r=r+Math.imul(m,he)|0)|0)+((8191&(o=(o=o+Math.imul(m,ge)|0)+Math.imul(v,he)|0))<<13)|0;d=((i=i+Math.imul(v,ge)|0)+(o>>>13)|0)+(Se>>>26)|0,Se&=67108863,r=Math.imul(U,Z),o=(o=Math.imul(U,z))+Math.imul(H,Z)|0,i=Math.imul(H,z),r=r+Math.imul(D,$)|0,o=(o=o+Math.imul(D,ee)|0)+Math.imul(M,$)|0,i=i+Math.imul(M,ee)|0,r=r+Math.imul(P,ne)|0,o=(o=o+Math.imul(P,re)|0)+Math.imul(N,ne)|0,i=i+Math.imul(N,re)|0,r=r+Math.imul(O,ie)|0,o=(o=o+Math.imul(O,ae)|0)+Math.imul(Q,ie)|0,i=i+Math.imul(Q,ae)|0,r=r+Math.imul(_,ce)|0,o=(o=o+Math.imul(_,de)|0)+Math.imul(S,ce)|0,i=i+Math.imul(S,de)|0,r=r+Math.imul(E,le)|0,o=(o=o+Math.imul(E,Ae)|0)+Math.imul(w,le)|0,i=i+Math.imul(w,Ae)|0;var ke=(d+(r=r+Math.imul(b,he)|0)|0)+((8191&(o=(o=o+Math.imul(b,ge)|0)+Math.imul(I,he)|0))<<13)|0;d=((i=i+Math.imul(I,ge)|0)+(o>>>13)|0)+(ke>>>26)|0,ke&=67108863,r=Math.imul(U,$),o=(o=Math.imul(U,ee))+Math.imul(H,$)|0,i=Math.imul(H,ee),r=r+Math.imul(D,ne)|0,o=(o=o+Math.imul(D,re)|0)+Math.imul(M,ne)|0,i=i+Math.imul(M,re)|0,r=r+Math.imul(P,ie)|0,o=(o=o+Math.imul(P,ae)|0)+Math.imul(N,ie)|0,i=i+Math.imul(N,ae)|0,r=r+Math.imul(O,ce)|0,o=(o=o+Math.imul(O,de)|0)+Math.imul(Q,ce)|0,i=i+Math.imul(Q,de)|0,r=r+Math.imul(_,le)|0,o=(o=o+Math.imul(_,Ae)|0)+Math.imul(S,le)|0,i=i+Math.imul(S,Ae)|0;var Oe=(d+(r=r+Math.imul(E,he)|0)|0)+((8191&(o=(o=o+Math.imul(E,ge)|0)+Math.imul(w,he)|0))<<13)|0;d=((i=i+Math.imul(w,ge)|0)+(o>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,r=Math.imul(U,ne),o=(o=Math.imul(U,re))+Math.imul(H,ne)|0,i=Math.imul(H,re),r=r+Math.imul(D,ie)|0,o=(o=o+Math.imul(D,ae)|0)+Math.imul(M,ie)|0,i=i+Math.imul(M,ae)|0,r=r+Math.imul(P,ce)|0,o=(o=o+Math.imul(P,de)|0)+Math.imul(N,ce)|0,i=i+Math.imul(N,de)|0,r=r+Math.imul(O,le)|0,o=(o=o+Math.imul(O,Ae)|0)+Math.imul(Q,le)|0,i=i+Math.imul(Q,Ae)|0;var Qe=(d+(r=r+Math.imul(_,he)|0)|0)+((8191&(o=(o=o+Math.imul(_,ge)|0)+Math.imul(S,he)|0))<<13)|0;d=((i=i+Math.imul(S,ge)|0)+(o>>>13)|0)+(Qe>>>26)|0,Qe&=67108863,r=Math.imul(U,ie),o=(o=Math.imul(U,ae))+Math.imul(H,ie)|0,i=Math.imul(H,ae),r=r+Math.imul(D,ce)|0,o=(o=o+Math.imul(D,de)|0)+Math.imul(M,ce)|0,i=i+Math.imul(M,de)|0,r=r+Math.imul(P,le)|0,o=(o=o+Math.imul(P,Ae)|0)+Math.imul(N,le)|0,i=i+Math.imul(N,Ae)|0;var Re=(d+(r=r+Math.imul(O,he)|0)|0)+((8191&(o=(o=o+Math.imul(O,ge)|0)+Math.imul(Q,he)|0))<<13)|0;d=((i=i+Math.imul(Q,ge)|0)+(o>>>13)|0)+(Re>>>26)|0,Re&=67108863,r=Math.imul(U,ce),o=(o=Math.imul(U,de))+Math.imul(H,ce)|0,i=Math.imul(H,de),r=r+Math.imul(D,le)|0,o=(o=o+Math.imul(D,Ae)|0)+Math.imul(M,le)|0,i=i+Math.imul(M,Ae)|0;var Pe=(d+(r=r+Math.imul(P,he)|0)|0)+((8191&(o=(o=o+Math.imul(P,ge)|0)+Math.imul(N,he)|0))<<13)|0;d=((i=i+Math.imul(N,ge)|0)+(o>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,r=Math.imul(U,le),o=(o=Math.imul(U,Ae))+Math.imul(H,le)|0,i=Math.imul(H,Ae);var Ne=(d+(r=r+Math.imul(D,he)|0)|0)+((8191&(o=(o=o+Math.imul(D,ge)|0)+Math.imul(M,he)|0))<<13)|0;d=((i=i+Math.imul(M,ge)|0)+(o>>>13)|0)+(Ne>>>26)|0,Ne&=67108863;var xe=(d+(r=Math.imul(U,he))|0)+((8191&(o=(o=Math.imul(U,ge))+Math.imul(H,he)|0))<<13)|0;return d=((i=Math.imul(H,ge))+(o>>>13)|0)+(xe>>>26)|0,xe&=67108863,c[0]=pe,c[1]=me,c[2]=ve,c[3]=ye,c[4]=be,c[5]=Ie,c[6]=Ce,c[7]=Ee,c[8]=we,c[9]=Be,c[10]=_e,c[11]=Se,c[12]=ke,c[13]=Oe,c[14]=Qe,c[15]=Re,c[16]=Pe,c[17]=Ne,c[18]=xe,0!==d&&(c[19]=d,n.length++),n};function g(e,t,n){return(new p).mulp(e,t,n)}function p(e,t){this.x=e,this.y=t}Math.imul||(h=f),i.prototype.mulTo=function(e,t){var n,r=this.length+e.length;return n=10===this.length&&10===e.length?h(this,e,t):r<63?f(this,e,t):r<1024?function(e,t,n){n.negative=t.negative^e.negative,n.length=e.length+t.length;for(var r=0,o=0,i=0;i>>26)|0)>>>26,a&=67108863}n.words[i]=s,r=a,a=o}return 0!==r?n.words[i]=r:n.length--,n.strip()}(this,e,t):g(this,e,t),n},p.prototype.makeRBT=function(e){for(var t=new Array(e),n=i.prototype._countBits(e)-1,r=0;r>=1;return r},p.prototype.permute=function(e,t,n,r,o,i){for(var a=0;a>>=1)o++;return 1<>>=13,n[2*a+1]=8191&i,i>>>=13;for(a=2*t;a>=26,t+=o/67108864|0,t+=i>>>26,this.words[n]=67108863&i}return 0!==t&&(this.words[n]=t,this.length++),this},i.prototype.muln=function(e){return this.clone().imuln(e)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),n=0;n>>o}return t}(e);if(0===t.length)return new i(1);for(var n=this,r=0;r=0);var t,n=e%26,o=(e-n)/26,i=67108863>>>26-n<<26-n;if(0!==n){var a=0;for(t=0;t>>26-n}a&&(this.words[t]=a,this.length++)}if(0!==o){for(t=this.length-1;t>=0;t--)this.words[t+o]=this.words[t];for(t=0;t=0),o=t?(t-t%26)/26:0;var i=e%26,a=Math.min((e-i)/26,this.length),s=67108863^67108863>>>i<a)for(this.length-=a,d=0;d=0&&(0!==u||d>=o);d--){var l=0|this.words[d];this.words[d]=u<<26-i|l>>>i,u=l&s}return c&&0!==u&&(c.words[c.length++]=u),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},i.prototype.ishrn=function(e,t,n){return r(0===this.negative),this.iushrn(e,t,n)},i.prototype.shln=function(e){return this.clone().ishln(e)},i.prototype.ushln=function(e){return this.clone().iushln(e)},i.prototype.shrn=function(e){return this.clone().ishrn(e)},i.prototype.ushrn=function(e){return this.clone().iushrn(e)},i.prototype.testn=function(e){r("number"==typeof e&&e>=0);var t=e%26,n=(e-t)/26,o=1<=0);var t=e%26,n=(e-t)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==t&&n++,this.length=Math.min(n,this.length),0!==t){var o=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},i.prototype.isubn=function(e){if(r("number"==typeof e),r(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(c/67108864|0),this.words[o+n]=67108863&i}for(;o>26,this.words[o+n]=67108863&i;if(0===s)return this.strip();for(r(-1===s),s=0,o=0;o>26,this.words[o]=67108863&i;return this.negative=1,this.strip()},i.prototype._wordDiv=function(e,t){var n=(this.length,e.length),r=this.clone(),o=e,a=0|o.words[o.length-1];0!=(n=26-this._countBits(a))&&(o=o.ushln(n),r.iushln(n),a=0|o.words[o.length-1]);var s,c=r.length-o.length;if("mod"!==t){(s=new i(null)).length=c+1,s.words=new Array(s.length);for(var d=0;d=0;l--){var A=67108864*(0|r.words[o.length+l])+(0|r.words[o.length+l-1]);for(A=Math.min(A/a|0,67108863),r._ishlnsubmul(o,A,l);0!==r.negative;)A--,r.negative=0,r._ishlnsubmul(o,1,l),r.isZero()||(r.negative^=1);s&&(s.words[l]=A)}return s&&s.strip(),r.strip(),"div"!==t&&0!==n&&r.iushrn(n),{div:s||null,mod:r}},i.prototype.divmod=function(e,t,n){return r(!e.isZero()),this.isZero()?{div:new i(0),mod:new i(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(o=s.div.neg()),"div"!==t&&(a=s.mod.neg(),n&&0!==a.negative&&a.iadd(e)),{div:o,mod:a}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(o=s.div.neg()),{div:o,mod:s.mod}):0!=(this.negative&e.negative)?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(a=s.mod.neg(),n&&0!==a.negative&&a.isub(e)),{div:s.div,mod:a}):e.length>this.length||this.cmp(e)<0?{div:new i(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new i(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new i(this.modn(e.words[0]))}:this._wordDiv(e,t);var o,a,s},i.prototype.div=function(e){return this.divmod(e,"div",!1).div},i.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},i.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},i.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var n=0!==t.div.negative?t.mod.isub(e):t.mod,r=e.ushrn(1),o=e.andln(1),i=n.cmp(r);return i<0||1===o&&0===i?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},i.prototype.modn=function(e){r(e<=67108863);for(var t=(1<<26)%e,n=0,o=this.length-1;o>=0;o--)n=(t*n+(0|this.words[o]))%e;return n},i.prototype.idivn=function(e){r(e<=67108863);for(var t=0,n=this.length-1;n>=0;n--){var o=(0|this.words[n])+67108864*t;this.words[n]=o/e|0,t=o%e}return this.strip()},i.prototype.divn=function(e){return this.clone().idivn(e)},i.prototype.egcd=function(e){r(0===e.negative),r(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var o=new i(1),a=new i(0),s=new i(0),c=new i(1),d=0;t.isEven()&&n.isEven();)t.iushrn(1),n.iushrn(1),++d;for(var u=n.clone(),l=t.clone();!t.isZero();){for(var A=0,f=1;0==(t.words[0]&f)&&A<26;++A,f<<=1);if(A>0)for(t.iushrn(A);A-- >0;)(o.isOdd()||a.isOdd())&&(o.iadd(u),a.isub(l)),o.iushrn(1),a.iushrn(1);for(var h=0,g=1;0==(n.words[0]&g)&&h<26;++h,g<<=1);if(h>0)for(n.iushrn(h);h-- >0;)(s.isOdd()||c.isOdd())&&(s.iadd(u),c.isub(l)),s.iushrn(1),c.iushrn(1);t.cmp(n)>=0?(t.isub(n),o.isub(s),a.isub(c)):(n.isub(t),s.isub(o),c.isub(a))}return{a:s,b:c,gcd:n.iushln(d)}},i.prototype._invmp=function(e){r(0===e.negative),r(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var o,a=new i(1),s=new i(0),c=n.clone();t.cmpn(1)>0&&n.cmpn(1)>0;){for(var d=0,u=1;0==(t.words[0]&u)&&d<26;++d,u<<=1);if(d>0)for(t.iushrn(d);d-- >0;)a.isOdd()&&a.iadd(c),a.iushrn(1);for(var l=0,A=1;0==(n.words[0]&A)&&l<26;++l,A<<=1);if(l>0)for(n.iushrn(l);l-- >0;)s.isOdd()&&s.iadd(c),s.iushrn(1);t.cmp(n)>=0?(t.isub(n),a.isub(s)):(n.isub(t),s.isub(a))}return(o=0===t.cmpn(1)?a:s).cmpn(0)<0&&o.iadd(e),o},i.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),n=e.clone();t.negative=0,n.negative=0;for(var r=0;t.isEven()&&n.isEven();r++)t.iushrn(1),n.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;n.isEven();)n.iushrn(1);var o=t.cmp(n);if(o<0){var i=t;t=n,n=i}else if(0===o||0===n.cmpn(1))break;t.isub(n)}return n.iushln(r)},i.prototype.invm=function(e){return this.egcd(e).a.umod(e)},i.prototype.isEven=function(){return 0==(1&this.words[0])},i.prototype.isOdd=function(){return 1==(1&this.words[0])},i.prototype.andln=function(e){return this.words[0]&e},i.prototype.bincn=function(e){r("number"==typeof e);var t=e%26,n=(e-t)/26,o=1<>>26,s&=67108863,this.words[a]=s}return 0!==i&&(this.words[a]=i,this.length++),this},i.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},i.prototype.cmpn=function(e){var t,n=e<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this.strip(),this.length>1)t=1;else{n&&(e=-e),r(e<=67108863,"Number is too big");var o=0|this.words[0];t=o===e?0:oe.length)return 1;if(this.length=0;n--){var r=0|this.words[n],o=0|e.words[n];if(r!==o){ro&&(t=1);break}}return t},i.prototype.gtn=function(e){return 1===this.cmpn(e)},i.prototype.gt=function(e){return 1===this.cmp(e)},i.prototype.gten=function(e){return this.cmpn(e)>=0},i.prototype.gte=function(e){return this.cmp(e)>=0},i.prototype.ltn=function(e){return-1===this.cmpn(e)},i.prototype.lt=function(e){return-1===this.cmp(e)},i.prototype.lten=function(e){return this.cmpn(e)<=0},i.prototype.lte=function(e){return this.cmp(e)<=0},i.prototype.eqn=function(e){return 0===this.cmpn(e)},i.prototype.eq=function(e){return 0===this.cmp(e)},i.red=function(e){return new E(e)},i.prototype.toRed=function(e){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},i.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(e){return this.red=e,this},i.prototype.forceRed=function(e){return r(!this.red,"Already a number in reduction context"),this._forceRed(e)},i.prototype.redAdd=function(e){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},i.prototype.redIAdd=function(e){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},i.prototype.redSub=function(e){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},i.prototype.redISub=function(e){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},i.prototype.redShl=function(e){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},i.prototype.redMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},i.prototype.redIMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},i.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(e){return r(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var m={k256:null,p224:null,p192:null,p25519:null};function v(e,t){this.name=e,this.p=new i(t,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function y(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function b(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function I(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function C(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function E(e){if("string"==typeof e){var t=i._prime(e);this.m=t.p,this.prime=t}else r(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function w(e){E.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new i(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}v.prototype._tmp=function(){var e=new i(null);return e.words=new Array(Math.ceil(this.n/13)),e},v.prototype.ireduce=function(e){var t,n=e;do{this.split(n,this.tmp),t=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(t>this.n);var r=t0?n.isub(this.p):void 0!==n.strip?n.strip():n._strip(),n},v.prototype.split=function(e,t){e.iushrn(this.n,0,t)},v.prototype.imulK=function(e){return e.imul(this.k)},o(y,v),y.prototype.split=function(e,t){for(var n=4194303,r=Math.min(e.length,9),o=0;o>>22,i=a}i>>>=22,e.words[o-10]=i,0===i&&e.length>10?e.length-=10:e.length-=9},y.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,n=0;n>>=26,e.words[n]=o,t=r}return 0!==t&&(e.words[e.length++]=t),e},i._prime=function(e){if(m[e])return m[e];var t;if("k256"===e)t=new y;else if("p224"===e)t=new b;else if("p192"===e)t=new I;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new C}return m[e]=t,t},E.prototype._verify1=function(e){r(0===e.negative,"red works only with positives"),r(e.red,"red works only with red numbers")},E.prototype._verify2=function(e,t){r(0==(e.negative|t.negative),"red works only with positives"),r(e.red&&e.red===t.red,"red works only with red numbers")},E.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},E.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},E.prototype.add=function(e,t){this._verify2(e,t);var n=e.add(t);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},E.prototype.iadd=function(e,t){this._verify2(e,t);var n=e.iadd(t);return n.cmp(this.m)>=0&&n.isub(this.m),n},E.prototype.sub=function(e,t){this._verify2(e,t);var n=e.sub(t);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},E.prototype.isub=function(e,t){this._verify2(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},E.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},E.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},E.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},E.prototype.isqr=function(e){return this.imul(e,e.clone())},E.prototype.sqr=function(e){return this.mul(e,e)},E.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(r(t%2==1),3===t){var n=this.m.add(new i(1)).iushrn(2);return this.pow(e,n)}for(var o=this.m.subn(1),a=0;!o.isZero()&&0===o.andln(1);)a++,o.iushrn(1);r(!o.isZero());var s=new i(1).toRed(this),c=s.redNeg(),d=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new i(2*u*u).toRed(this);0!==this.pow(u,d).cmp(c);)u.redIAdd(c);for(var l=this.pow(u,o),A=this.pow(e,o.addn(1).iushrn(1)),f=this.pow(e,o),h=a;0!==f.cmp(s);){for(var g=f,p=0;0!==g.cmp(s);p++)g=g.redSqr();r(p=0;r--){for(var d=t.words[r],u=c-1;u>=0;u--){var l=d>>u&1;o!==n[0]&&(o=this.sqr(o)),0!==l||0!==a?(a<<=1,a|=l,(4==++s||0===r&&0===u)&&(o=this.mul(o,n[a]),s=0,a=0)):s=0}c=26}return o},E.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},E.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},i.mont=function(e){return new w(e)},o(w,E),w.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},w.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},w.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=n.isub(r).iushrn(this.shift),i=o;return o.cmp(this.m)>=0?i=o.isub(this.m):o.cmpn(0)<0&&(i=o.iadd(this.m)),i._forceRed(this)},w.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new i(0)._forceRed(this);var n=e.mul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=n.isub(r).iushrn(this.shift),a=o;return o.cmp(this.m)>=0?a=o.isub(this.m):o.cmpn(0)<0&&(a=o.iadd(this.m)),a._forceRed(this)},w.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=n.nmd(e),this)},7187:e=>{"use strict";var t,n="object"==typeof Reflect?Reflect:null,r=n&&"function"==typeof n.apply?n.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};t=n&&"function"==typeof n.ownKeys?n.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var o=Number.isNaN||function(e){return e!=e};function i(){i.init.call(this)}e.exports=i,e.exports.once=function(e,t){return new Promise((function(n,r){function o(n){e.removeListener(t,i),r(n)}function i(){"function"==typeof e.removeListener&&e.removeListener("error",o),n([].slice.call(arguments))}g(e,t,i,{once:!0}),"error"!==t&&function(e,t,n){"function"==typeof e.on&&g(e,"error",t,{once:!0})}(e,o)}))},i.EventEmitter=i,i.prototype._events=void 0,i.prototype._eventsCount=0,i.prototype._maxListeners=void 0;var a=10;function s(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function c(e){return void 0===e._maxListeners?i.defaultMaxListeners:e._maxListeners}function d(e,t,n,r){var o,i,a,d;if(s(n),void 0===(i=e._events)?(i=e._events=Object.create(null),e._eventsCount=0):(void 0!==i.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),i=e._events),a=i[t]),void 0===a)a=i[t]=n,++e._eventsCount;else if("function"==typeof a?a=i[t]=r?[n,a]:[a,n]:r?a.unshift(n):a.push(n),(o=c(e))>0&&a.length>o&&!a.warned){a.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=e,u.type=t,u.count=a.length,d=u,console&&console.warn&&console.warn(d)}return e}function u(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function l(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},o=u.bind(r);return o.listener=n,r.wrapFn=o,o}function A(e,t,n){var r=e._events;if(void 0===r)return[];var o=r[t];return void 0===o?[]:"function"==typeof o?n?[o.listener||o]:[o]:n?function(e){for(var t=new Array(e.length),n=0;n0&&(a=t[0]),a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var c=i[e];if(void 0===c)return!1;if("function"==typeof c)r(c,this,t);else{var d=c.length,u=h(c,d);for(n=0;n=0;i--)if(n[i]===t||n[i].listener===t){a=n[i].listener,o=i;break}if(o<0)return this;0===o?n.shift():function(e,t){for(;t+1=0;r--)this.removeListener(e,t[r]);return this},i.prototype.listeners=function(e){return A(this,e,!0)},i.prototype.rawListeners=function(e){return A(this,e,!1)},i.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):f.call(e,t)},i.prototype.listenerCount=f,i.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},1221:e=>{"use strict";"undefined"!=typeof self?e.exports=self:"undefined"!=typeof window?e.exports=window:e.exports=Function("return this")()},2503:(e,t,n)=>{"use strict";var r=n(4289),o=n(1221),i=n(2168),a=n(9471),s=i(),c=function(){return s};r(c,{getPolyfill:i,implementation:o,shim:a}),e.exports=c},2168:(e,t,n)=>{"use strict";var r=n(1221);e.exports=function(){return"object"==typeof n.g&&n.g&&n.g.Math===Math&&n.g.Array===Array?n.g:r}},9471:(e,t,n)=>{"use strict";var r=n(4289),o=n(2168);e.exports=function(){var e=o();if(r.supportsDescriptors){var t=Object.getOwnPropertyDescriptor(e,"globalThis");(!t||t.configurable&&(t.enumerable||t.writable||globalThis!==e))&&Object.defineProperty(e,"globalThis",{configurable:!0,enumerable:!1,value:e,writable:!1})}else"object"==typeof globalThis&&globalThis===e||(e.globalThis=e);return e}},3349:(e,t,n)=>{"use strict";var r=n(9509).Buffer,o=n(8473).Transform;function i(e){o.call(this),this._block=r.allocUnsafe(e),this._blockSize=e,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}n(5717)(i,o),i.prototype._transform=function(e,t,n){var r=null;try{this.update(e,t)}catch(e){r=e}n(r)},i.prototype._flush=function(e){var t=null;try{this.push(this.digest())}catch(e){t=e}e(t)},i.prototype.update=function(e,t){if(function(e,t){if(!r.isBuffer(e)&&"string"!=typeof e)throw new TypeError("Data must be a string or a buffer")}(e),this._finalized)throw new Error("Digest already called");r.isBuffer(e)||(e=r.from(e,t));for(var n=this._block,o=0;this._blockOffset+e.length-o>=this._blockSize;){for(var i=this._blockOffset;i0;++a)this._length[a]+=s,(s=this._length[a]/4294967296|0)>0&&(this._length[a]-=4294967296*s);return this},i.prototype._update=function(){throw new Error("_update is not implemented")},i.prototype.digest=function(e){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var t=this._digest();void 0!==e&&(t=t.toString(e)),this._block.fill(0),this._blockOffset=0;for(var n=0;n<4;++n)this._length[n]=0;return t},i.prototype._digest=function(){throw new Error("_digest is not implemented")},e.exports=i},3715:(e,t,n)=>{var r=t;r.utils=n(6436),r.common=n(5772),r.sha=n(9041),r.ripemd=n(2949),r.hmac=n(2344),r.sha1=r.sha.sha1,r.sha256=r.sha.sha256,r.sha224=r.sha.sha224,r.sha384=r.sha.sha384,r.sha512=r.sha.sha512,r.ripemd160=r.ripemd.ripemd160},5772:(e,t,n)=>{"use strict";var r=n(6436),o=n(9746);function i(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}t.BlockHash=i,i.prototype.update=function(e,t){if(e=r.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){var n=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-n,e.length),0===this.pending.length&&(this.pending=null),e=r.join32(e,0,e.length-n,this.endian);for(var o=0;o>>24&255,r[o++]=e>>>16&255,r[o++]=e>>>8&255,r[o++]=255&e}else for(r[o++]=255&e,r[o++]=e>>>8&255,r[o++]=e>>>16&255,r[o++]=e>>>24&255,r[o++]=0,r[o++]=0,r[o++]=0,r[o++]=0,i=8;i{"use strict";var r=n(6436),o=n(9746);function i(e,t,n){if(!(this instanceof i))return new i(e,t,n);this.Hash=e,this.blockSize=e.blockSize/8,this.outSize=e.outSize/8,this.inner=null,this.outer=null,this._init(r.toArray(t,n))}e.exports=i,i.prototype._init=function(e){e.length>this.blockSize&&(e=(new this.Hash).update(e).digest()),o(e.length<=this.blockSize);for(var t=e.length;t{"use strict";var r=n(6436),o=n(5772),i=r.rotl32,a=r.sum32,s=r.sum32_3,c=r.sum32_4,d=o.BlockHash;function u(){if(!(this instanceof u))return new u;d.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function l(e,t,n,r){return e<=15?t^n^r:e<=31?t&n|~t&r:e<=47?(t|~n)^r:e<=63?t&r|n&~r:t^(n|~r)}function A(e){return e<=15?0:e<=31?1518500249:e<=47?1859775393:e<=63?2400959708:2840853838}function f(e){return e<=15?1352829926:e<=31?1548603684:e<=47?1836072691:e<=63?2053994217:0}r.inherits(u,d),t.ripemd160=u,u.blockSize=512,u.outSize=160,u.hmacStrength=192,u.padLength=64,u.prototype._update=function(e,t){for(var n=this.h[0],r=this.h[1],o=this.h[2],d=this.h[3],u=this.h[4],v=n,y=r,b=o,I=d,C=u,E=0;E<80;E++){var w=a(i(c(n,l(E,r,o,d),e[h[E]+t],A(E)),p[E]),u);n=u,u=d,d=i(o,10),o=r,r=w,w=a(i(c(v,l(79-E,y,b,I),e[g[E]+t],f(E)),m[E]),C),v=C,C=I,I=i(b,10),b=y,y=w}w=s(this.h[1],o,I),this.h[1]=s(this.h[2],d,C),this.h[2]=s(this.h[3],u,v),this.h[3]=s(this.h[4],n,y),this.h[4]=s(this.h[0],r,b),this.h[0]=w},u.prototype._digest=function(e){return"hex"===e?r.toHex32(this.h,"little"):r.split32(this.h,"little")};var h=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],g=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],p=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],m=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]},9041:(e,t,n)=>{"use strict";t.sha1=n(4761),t.sha224=n(799),t.sha256=n(9344),t.sha384=n(772),t.sha512=n(5900)},4761:(e,t,n)=>{"use strict";var r=n(6436),o=n(5772),i=n(7038),a=r.rotl32,s=r.sum32,c=r.sum32_5,d=i.ft_1,u=o.BlockHash,l=[1518500249,1859775393,2400959708,3395469782];function A(){if(!(this instanceof A))return new A;u.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}r.inherits(A,u),e.exports=A,A.blockSize=512,A.outSize=160,A.hmacStrength=80,A.padLength=64,A.prototype._update=function(e,t){for(var n=this.W,r=0;r<16;r++)n[r]=e[t+r];for(;r{"use strict";var r=n(6436),o=n(9344);function i(){if(!(this instanceof i))return new i;o.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}r.inherits(i,o),e.exports=i,i.blockSize=512,i.outSize=224,i.hmacStrength=192,i.padLength=64,i.prototype._digest=function(e){return"hex"===e?r.toHex32(this.h.slice(0,7),"big"):r.split32(this.h.slice(0,7),"big")}},9344:(e,t,n)=>{"use strict";var r=n(6436),o=n(5772),i=n(7038),a=n(9746),s=r.sum32,c=r.sum32_4,d=r.sum32_5,u=i.ch32,l=i.maj32,A=i.s0_256,f=i.s1_256,h=i.g0_256,g=i.g1_256,p=o.BlockHash,m=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function v(){if(!(this instanceof v))return new v;p.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=m,this.W=new Array(64)}r.inherits(v,p),e.exports=v,v.blockSize=512,v.outSize=256,v.hmacStrength=192,v.padLength=64,v.prototype._update=function(e,t){for(var n=this.W,r=0;r<16;r++)n[r]=e[t+r];for(;r{"use strict";var r=n(6436),o=n(5900);function i(){if(!(this instanceof i))return new i;o.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}r.inherits(i,o),e.exports=i,i.blockSize=1024,i.outSize=384,i.hmacStrength=192,i.padLength=128,i.prototype._digest=function(e){return"hex"===e?r.toHex32(this.h.slice(0,12),"big"):r.split32(this.h.slice(0,12),"big")}},5900:(e,t,n)=>{"use strict";var r=n(6436),o=n(5772),i=n(9746),a=r.rotr64_hi,s=r.rotr64_lo,c=r.shr64_hi,d=r.shr64_lo,u=r.sum64,l=r.sum64_hi,A=r.sum64_lo,f=r.sum64_4_hi,h=r.sum64_4_lo,g=r.sum64_5_hi,p=r.sum64_5_lo,m=o.BlockHash,v=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function y(){if(!(this instanceof y))return new y;m.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=v,this.W=new Array(160)}function b(e,t,n,r,o){var i=e&n^~e&o;return i<0&&(i+=4294967296),i}function I(e,t,n,r,o,i){var a=t&r^~t&i;return a<0&&(a+=4294967296),a}function C(e,t,n,r,o){var i=e&n^e&o^n&o;return i<0&&(i+=4294967296),i}function E(e,t,n,r,o,i){var a=t&r^t&i^r&i;return a<0&&(a+=4294967296),a}function w(e,t){var n=a(e,t,28)^a(t,e,2)^a(t,e,7);return n<0&&(n+=4294967296),n}function B(e,t){var n=s(e,t,28)^s(t,e,2)^s(t,e,7);return n<0&&(n+=4294967296),n}function _(e,t){var n=s(e,t,14)^s(e,t,18)^s(t,e,9);return n<0&&(n+=4294967296),n}function S(e,t){var n=a(e,t,1)^a(e,t,8)^c(e,t,7);return n<0&&(n+=4294967296),n}function k(e,t){var n=s(e,t,1)^s(e,t,8)^d(e,t,7);return n<0&&(n+=4294967296),n}function O(e,t){var n=s(e,t,19)^s(t,e,29)^d(e,t,6);return n<0&&(n+=4294967296),n}r.inherits(y,m),e.exports=y,y.blockSize=1024,y.outSize=512,y.hmacStrength=192,y.padLength=128,y.prototype._prepareBlock=function(e,t){for(var n=this.W,r=0;r<32;r++)n[r]=e[t+r];for(;r{"use strict";var r=n(6436).rotr32;function o(e,t,n){return e&t^~e&n}function i(e,t,n){return e&t^e&n^t&n}function a(e,t,n){return e^t^n}t.ft_1=function(e,t,n,r){return 0===e?o(t,n,r):1===e||3===e?a(t,n,r):2===e?i(t,n,r):void 0},t.ch32=o,t.maj32=i,t.p32=a,t.s0_256=function(e){return r(e,2)^r(e,13)^r(e,22)},t.s1_256=function(e){return r(e,6)^r(e,11)^r(e,25)},t.g0_256=function(e){return r(e,7)^r(e,18)^e>>>3},t.g1_256=function(e){return r(e,17)^r(e,19)^e>>>10}},6436:(e,t,n)=>{"use strict";var r=n(9746),o=n(5717);function i(e,t){return 55296==(64512&e.charCodeAt(t))&&!(t<0||t+1>=e.length)&&56320==(64512&e.charCodeAt(t+1))}function a(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function s(e){return 1===e.length?"0"+e:e}function c(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}t.inherits=o,t.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var n=[];if("string"==typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),o=0;o>6|192,n[r++]=63&a|128):i(e,o)?(a=65536+((1023&a)<<10)+(1023&e.charCodeAt(++o)),n[r++]=a>>18|240,n[r++]=a>>12&63|128,n[r++]=a>>6&63|128,n[r++]=63&a|128):(n[r++]=a>>12|224,n[r++]=a>>6&63|128,n[r++]=63&a|128)}else for(o=0;o>>0}return a},t.split32=function(e,t){for(var n=new Array(4*e.length),r=0,o=0;r>>24,n[o+1]=i>>>16&255,n[o+2]=i>>>8&255,n[o+3]=255&i):(n[o+3]=i>>>24,n[o+2]=i>>>16&255,n[o+1]=i>>>8&255,n[o]=255&i)}return n},t.rotr32=function(e,t){return e>>>t|e<<32-t},t.rotl32=function(e,t){return e<>>32-t},t.sum32=function(e,t){return e+t>>>0},t.sum32_3=function(e,t,n){return e+t+n>>>0},t.sum32_4=function(e,t,n,r){return e+t+n+r>>>0},t.sum32_5=function(e,t,n,r,o){return e+t+n+r+o>>>0},t.sum64=function(e,t,n,r){var o=e[t],i=r+e[t+1]>>>0,a=(i>>0,e[t+1]=i},t.sum64_hi=function(e,t,n,r){return(t+r>>>0>>0},t.sum64_lo=function(e,t,n,r){return t+r>>>0},t.sum64_4_hi=function(e,t,n,r,o,i,a,s){var c=0,d=t;return c+=(d=d+r>>>0)>>0)>>0)>>0},t.sum64_4_lo=function(e,t,n,r,o,i,a,s){return t+r+i+s>>>0},t.sum64_5_hi=function(e,t,n,r,o,i,a,s,c,d){var u=0,l=t;return u+=(l=l+r>>>0)>>0)>>0)>>0)>>0},t.sum64_5_lo=function(e,t,n,r,o,i,a,s,c,d){return t+r+i+s+d>>>0},t.rotr64_hi=function(e,t,n){return(t<<32-n|e>>>n)>>>0},t.rotr64_lo=function(e,t,n){return(e<<32-n|t>>>n)>>>0},t.shr64_hi=function(e,t,n){return e>>>n},t.shr64_lo=function(e,t,n){return(e<<32-n|t>>>n)>>>0}},2156:(e,t,n)=>{"use strict";var r=n(3715),o=n(4504),i=n(9746);function a(e){if(!(this instanceof a))return new a(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var t=o.toArray(e.entropy,e.entropyEnc||"hex"),n=o.toArray(e.nonce,e.nonceEnc||"hex"),r=o.toArray(e.pers,e.persEnc||"hex");i(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,n,r)}e.exports=a,a.prototype._init=function(e,t,n){var r=e.concat(t).concat(n);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var o=0;o=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(n||[])),this._reseed=1},a.prototype.generate=function(e,t,n,r){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof t&&(r=n,n=t,t=null),n&&(n=o.toArray(n,r||"hex"),this._update(n));for(var i=[];i.length{t.read=function(e,t,n,r,o){var i,a,s=8*o-r-1,c=(1<>1,u=-7,l=n?o-1:0,A=n?-1:1,f=e[t+l];for(l+=A,i=f&(1<<-u)-1,f>>=-u,u+=s;u>0;i=256*i+e[t+l],l+=A,u-=8);for(a=i&(1<<-u)-1,i>>=-u,u+=r;u>0;a=256*a+e[t+l],l+=A,u-=8);if(0===i)i=1-d;else{if(i===c)return a?NaN:1/0*(f?-1:1);a+=Math.pow(2,r),i-=d}return(f?-1:1)*a*Math.pow(2,i-r)},t.write=function(e,t,n,r,o,i){var a,s,c,d=8*i-o-1,u=(1<>1,A=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,f=r?0:i-1,h=r?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=u):(a=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-a))<1&&(a--,c*=2),(t+=a+l>=1?A/c:A*Math.pow(2,1-l))*c>=2&&(a++,c/=2),a+l>=u?(s=0,a=u):a+l>=1?(s=(t*c-1)*Math.pow(2,o),a+=l):(s=t*Math.pow(2,l-1)*Math.pow(2,o),a=0));o>=8;e[n+f]=255&s,f+=h,s/=256,o-=8);for(a=a<0;e[n+f]=255&a,f+=h,a/=256,d-=8);e[n+f-h]|=128*g}},5717:e=>{"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}},6792:(e,t,n)=>{var r=null;"undefined"!=typeof WebSocket?r=WebSocket:"undefined"!=typeof MozWebSocket?r=MozWebSocket:void 0!==n.g?r=n.g.WebSocket||n.g.MozWebSocket:"undefined"!=typeof window?r=window.WebSocket||window.MozWebSocket:"undefined"!=typeof self&&(r=self.WebSocket||self.MozWebSocket),e.exports=r},5793:(e,t,n)=>{"use strict";var r=n(5318);Object.defineProperty(t,"__esModule",{value:!0}),t.errorCodeToString=d,t.processErrorResponse=u,t.getVersion=function(e){return l.apply(this,arguments)},t.ERROR_CODE=t.P1_VALUES=t.PAYLOAD_TYPE=t.INS=t.APP_KEY=t.CHUNK_SIZE=t.CLA=void 0;var o=r(n(7757)),i=r(n(8926)),a=r(n(8));t.CLA=85,t.CHUNK_SIZE=250,t.APP_KEY="CSM";var s={GET_VERSION:0,INS_PUBLIC_KEY_SECP256K1:1,SIGN_SECP256K1:2,GET_ADDR_SECP256K1:4};t.INS=s,t.PAYLOAD_TYPE={INIT:0,ADD:1,LAST:2},t.P1_VALUES={ONLY_RETRIEVE:0,SHOW_ADDRESS_IN_DEVICE:1},t.ERROR_CODE={NoError:36864};var c={1:"U2F: Unknown",2:"U2F: Bad request",3:"U2F: Configuration unsupported",4:"U2F: Device Ineligible",5:"U2F: Timeout",14:"Timeout",36864:"No errors",36865:"Device is busy",26626:"Error deriving keys",25600:"Execution Error",26368:"Wrong Length",27010:"Empty Buffer",27011:"Output buffer too small",27012:"Data is invalid",27013:"Conditions not satisfied",27014:"Transaction rejected",27264:"Bad key handle",27392:"Invalid P1/P2",27904:"Instruction not supported",28160:"App does not seem to be open",28416:"Unknown error",28417:"Sign/verify error"};function d(e){return e in c?c[e]:"Unknown Status Code: ".concat(e)}function u(e){if(e){if(t=e,!("object"!==(0,a.default)(t)||null===t||t instanceof Array||t instanceof Date)){if(Object.prototype.hasOwnProperty.call(e,"statusCode"))return{return_code:e.statusCode,error_message:d(e.statusCode)};if(Object.prototype.hasOwnProperty.call(e,"return_code")&&Object.prototype.hasOwnProperty.call(e,"error_message"))return e}return{return_code:65535,error_message:e.toString()}}var t;return{return_code:65535,error_message:e.toString()}}function l(){return(l=(0,i.default)(o.default.mark((function e(t){return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",t.send(85,s.GET_VERSION,0,0).then((function(e){var t=e.slice(-2),n=256*t[0]+t[1],r=0;return e.length>=9&&(r=(e[5]<<24)+(e[6]<<16)+(e[7]<<8)+(e[8]<<0)),{return_code:n,error_message:d(n),test_mode:0!==e[0],major:e[1],minor:e[2],patch:e[3],device_locked:1===e[4],target_id:r.toString(16)}}),u));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}},5496:(e,t,n)=>{"use strict";var r=n(8764).Buffer,o=n(5318);Object.defineProperty(t,"__esModule",{value:!0}),t.serializePathv1=function(e){if(null==e||e.length<3)throw new Error("Invalid path.");if(e.length>10)throw new Error("Invalid path. Length should be <= 10");var t=r.alloc(1+4*e.length);t.writeUInt8(e.length,0);for(var n=0;n2&&(o=e.slice(0,e.length-2)),{signature:o,return_code:n,error_message:r}}),s.processErrorResponse));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function d(e){if(65!==e.length)throw new Error("decompressed public key length should be 65 bytes");var t=e.slice(33,65),n=r.from([2+(1&t[t.length-1])]);return r.concat([n,e.slice(1,33)])}function u(){return(u=(0,a.default)(i.default.mark((function e(t,n){return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",t.transport.send(s.CLA,s.INS.INS_PUBLIC_KEY_SECP256K1,0,0,n,[s.ERROR_CODE.NoError]).then((function(e){var t=e.slice(-2),n=256*t[0]+t[1],o=r.from(e.slice(0,65));return{pk:o,compressed_pk:d(o),return_code:n,error_message:(0,s.errorCodeToString)(n)}}),s.processErrorResponse));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}},2449:(e,t,n)=>{"use strict";var r=n(8764).Buffer,o=n(5318);Object.defineProperty(t,"__esModule",{value:!0}),t.serializePathv2=function(e){if(!e||5!==e.length)throw new Error("Invalid path.");var t=r.alloc(20);return t.writeUInt32LE(2147483648+e[0],0),t.writeUInt32LE(2147483648+e[1],4),t.writeUInt32LE(2147483648+e[2],8),t.writeUInt32LE(e[3],12),t.writeUInt32LE(e[4],16),t},t.signSendChunkv2=function(e,t,n,r){return d.apply(this,arguments)},t.publicKeyv2=function(e,t){return u.apply(this,arguments)};var i=o(n(7757)),a=o(n(8926)),s=n(5496),c=n(5793);function d(){return(d=(0,a.default)(i.default.mark((function e(t,n,r,o){var a;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=c.PAYLOAD_TYPE.ADD,1===n&&(a=c.PAYLOAD_TYPE.INIT),n===r&&(a=c.PAYLOAD_TYPE.LAST),e.abrupt("return",(0,s.signSendChunkv1)(t,a,0,o));case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function u(){return(u=(0,a.default)(i.default.mark((function e(t,n){return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",t.transport.send(c.CLA,c.INS.GET_ADDR_SECP256K1,0,0,n,[c.ERROR_CODE.NoError]).then((function(e){var t=e.slice(-2),n=256*t[0]+t[1];return{pk:"OBSOLETE PROPERTY",compressed_pk:r.from(e.slice(0,33)),return_code:n,error_message:(0,c.errorCodeToString)(n)}}),c.processErrorResponse));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}},9246:(e,t,n)=>{"use strict";var r=n(8764).Buffer,o=n(5318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(n(7757)),a=o(n(8926)),s=o(n(4575)),c=o(n(3913)),d=o(n(8010)),u=o(n(9785)),l=o(n(2882)),A=n(5496),f=n(2449),h=n(5793),g=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:h.APP_KEY;if((0,s.default)(this,e),!t)throw new Error("Transport has not been defined");this.transport=t,t.decorateAppAPIMethods(this,["getVersion","sign","getAddressAndPubKey","appInfo","deviceInfo","getBech32FromPK"],n)}var t,n,o,g,p,m,v,y,b,I;return(0,c.default)(e,[{key:"serializePath",value:(I=(0,a.default)(i.default.mark((function e(t){return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,h.getVersion)(this.transport);case 2:if(this.versionResponse=e.sent,this.versionResponse.return_code===h.ERROR_CODE.NoError){e.next=5;break}throw this.versionResponse;case 5:e.t0=this.versionResponse.major,e.next=1===e.t0?8:2===e.t0?9:10;break;case 8:return e.abrupt("return",(0,A.serializePathv1)(t));case 9:return e.abrupt("return",(0,f.serializePathv2)(t));case 10:return e.abrupt("return",{return_code:25600,error_message:"App Version is not supported"});case 11:case"end":return e.stop()}}),e,this)}))),function(e){return I.apply(this,arguments)})},{key:"signGetChunks",value:(b=(0,a.default)(i.default.mark((function e(t,n){var o,a,s,c,d;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.serializePath(t);case 2:for(o=e.sent,(a=[]).push(o),s=r.from(n),c=0;cs.length&&(d=s.length),a.push(s.slice(c,d));return e.abrupt("return",a);case 8:case"end":return e.stop()}}),e,this)}))),function(e,t){return b.apply(this,arguments)})},{key:"getVersion",value:(y=(0,a.default)(i.default.mark((function e(){return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,(0,h.getVersion)(this.transport);case 3:return this.versionResponse=e.sent,e.abrupt("return",this.versionResponse);case 7:return e.prev=7,e.t0=e.catch(0),e.abrupt("return",(0,h.processErrorResponse)(e.t0));case 10:case"end":return e.stop()}}),e,this,[[0,7]])}))),function(){return y.apply(this,arguments)})},{key:"appInfo",value:(v=(0,a.default)(i.default.mark((function e(){return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.transport.send(176,1,0,0).then((function(e){var t=e.slice(-2),n=256*t[0]+t[1],r={},o="err",i="err",a=0,s=0;if(1!==e[0])r.error_message="response format ID not recognized",r.return_code=36865;else{var c=e[1];o=e.slice(2,2+c).toString("ascii");var d=2+c,u=e[d];d+=1,i=e.slice(d,d+u).toString("ascii"),a=e[d+=u],s=e[d+=1]}return{return_code:n,error_message:(0,h.errorCodeToString)(n),appName:o,appVersion:i,flagLen:a,flagsValue:s,flag_recovery:0!=(1&s),flag_signed_mcu_code:0!=(2&s),flag_onboarded:0!=(4&s),flag_pin_validated:0!=(128&s)}}),h.processErrorResponse));case 1:case"end":return e.stop()}}),e,this)}))),function(){return v.apply(this,arguments)})},{key:"deviceInfo",value:(m=(0,a.default)(i.default.mark((function e(){return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.transport.send(224,1,0,0,r.from([]),[h.ERROR_CODE.NoError,28160]).then((function(e){var t=e.slice(-2),n=256*t[0]+t[1];if(28160===n)return{return_code:n,error_message:"This command is only available in the Dashboard"};var r=e.slice(0,4).toString("hex"),o=4,i=e[o];o+=1;var a=e.slice(o,o+i).toString(),s=e[o+=i];o+=1;var c=e.slice(o,o+s).toString("hex"),d=e[o+=s];o+=1;var u=e.slice(o,o+d);0===u[d-1]&&(u=e.slice(o,o+d-1));var l=u.toString();return{return_code:n,error_message:(0,h.errorCodeToString)(n),targetId:r,seVersion:a,flag:c,mcuVersion:l}}),h.processErrorResponse));case 1:case"end":return e.stop()}}),e,this)}))),function(){return m.apply(this,arguments)})},{key:"publicKey",value:(p=(0,a.default)(i.default.mark((function t(n){var o,a;return i.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.serializePath(n);case 3:o=t.sent,t.t0=this.versionResponse.major,t.next=1===t.t0?7:2===t.t0?8:10;break;case 7:return t.abrupt("return",(0,A.publicKeyv1)(this,o));case 8:return a=r.concat([e.serializeHRP("cosmos"),o]),t.abrupt("return",(0,f.publicKeyv2)(this,a));case 10:return t.abrupt("return",{return_code:25600,error_message:"App Version is not supported"});case 11:t.next=16;break;case 13:return t.prev=13,t.t1=t.catch(0),t.abrupt("return",(0,h.processErrorResponse)(t.t1));case 16:case"end":return t.stop()}}),t,this,[[0,13]])}))),function(e){return p.apply(this,arguments)})},{key:"getAddressAndPubKey",value:(g=(0,a.default)(i.default.mark((function t(n,o){var a=this;return i.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.abrupt("return",this.serializePath(n).then((function(t){var n=r.concat([e.serializeHRP(o),t]);return a.transport.send(h.CLA,h.INS.GET_ADDR_SECP256K1,h.P1_VALUES.ONLY_RETRIEVE,0,n,[h.ERROR_CODE.NoError]).then((function(e){var t=e.slice(-2),n=256*t[0]+t[1],o=r.from(e.slice(0,33));return{bech32_address:r.from(e.slice(33,-2)).toString(),compressed_pk:o,return_code:n,error_message:(0,h.errorCodeToString)(n)}}),h.processErrorResponse)})).catch((function(e){return(0,h.processErrorResponse)(e)})));case 4:return t.prev=4,t.t0=t.catch(0),t.abrupt("return",(0,h.processErrorResponse)(t.t0));case 7:case"end":return t.stop()}}),t,this,[[0,4]])}))),function(e,t){return g.apply(this,arguments)})},{key:"showAddressAndPubKey",value:(o=(0,a.default)(i.default.mark((function t(n,o){var a=this;return i.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.abrupt("return",this.serializePath(n).then((function(t){var n=r.concat([e.serializeHRP(o),t]);return a.transport.send(h.CLA,h.INS.GET_ADDR_SECP256K1,h.P1_VALUES.SHOW_ADDRESS_IN_DEVICE,0,n,[h.ERROR_CODE.NoError]).then((function(e){var t=e.slice(-2),n=256*t[0]+t[1],o=r.from(e.slice(0,33));return{bech32_address:r.from(e.slice(33,-2)).toString(),compressed_pk:o,return_code:n,error_message:(0,h.errorCodeToString)(n)}}),h.processErrorResponse)})).catch((function(e){return(0,h.processErrorResponse)(e)})));case 4:return t.prev=4,t.t0=t.catch(0),t.abrupt("return",(0,h.processErrorResponse)(t.t0));case 7:case"end":return t.stop()}}),t,this,[[0,4]])}))),function(e,t){return o.apply(this,arguments)})},{key:"signSendChunk",value:(n=(0,a.default)(i.default.mark((function e(t,n,r){return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:e.t0=this.versionResponse.major,e.next=1===e.t0?3:2===e.t0?4:5;break;case 3:return e.abrupt("return",(0,A.signSendChunkv1)(this,t,n,r));case 4:return e.abrupt("return",(0,f.signSendChunkv2)(this,t,n,r));case 5:return e.abrupt("return",{return_code:25600,error_message:"App Version is not supported"});case 6:case"end":return e.stop()}}),e,this)}))),function(e,t,r){return n.apply(this,arguments)})},{key:"sign",value:(t=(0,a.default)(i.default.mark((function e(t,n){var r=this;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.signGetChunks(t,n).then((function(e){return r.signSendChunk(1,e.length,e[0],[h.ERROR_CODE.NoError]).then(function(){var t=(0,a.default)(i.default.mark((function t(n){var o,a;return i.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:o={return_code:n.return_code,error_message:n.error_message,signature:null},a=1;case 2:if(!(a83)throw new Error("Invalid HRP");var t=r.alloc(1+e.length);return t.writeUInt8(e.length,0),t.write(e,1),t}},{key:"getBech32FromPK",value:function(e,t){if(33!==t.length)throw new Error("expected compressed public key [31 bytes]");var n=d.default.createHash("sha256").update(t).digest(),r=(new u.default).update(n).digest();return l.default.encode(e,l.default.toWords(r))}}]),e}();t.default=g},6869:function(e,t,n){var r,o,i,a,s;s="object"==typeof(a=this).sodium&&"function"==typeof a.sodium.onload?a.sodium.onload:null,o=[t,n(4608)],r=function(e,t){"use strict";var n,r=t.ready.then((function(){function r(){if(0!==n._sodium_init())throw new Error("libsodium was not correctly initialized.");for(var t=["crypto_aead_chacha20poly1305_decrypt","crypto_aead_chacha20poly1305_decrypt_detached","crypto_aead_chacha20poly1305_encrypt","crypto_aead_chacha20poly1305_encrypt_detached","crypto_aead_chacha20poly1305_ietf_decrypt","crypto_aead_chacha20poly1305_ietf_decrypt_detached","crypto_aead_chacha20poly1305_ietf_encrypt","crypto_aead_chacha20poly1305_ietf_encrypt_detached","crypto_aead_chacha20poly1305_ietf_keygen","crypto_aead_chacha20poly1305_keygen","crypto_aead_xchacha20poly1305_ietf_decrypt","crypto_aead_xchacha20poly1305_ietf_decrypt_detached","crypto_aead_xchacha20poly1305_ietf_encrypt","crypto_aead_xchacha20poly1305_ietf_encrypt_detached","crypto_aead_xchacha20poly1305_ietf_keygen","crypto_auth","crypto_auth_hmacsha256","crypto_auth_hmacsha256_keygen","crypto_auth_hmacsha256_verify","crypto_auth_hmacsha512","crypto_auth_hmacsha512_keygen","crypto_auth_hmacsha512_verify","crypto_auth_keygen","crypto_auth_verify","crypto_box_beforenm","crypto_box_curve25519xchacha20poly1305_keypair","crypto_box_curve25519xchacha20poly1305_seal","crypto_box_curve25519xchacha20poly1305_seal_open","crypto_box_detached","crypto_box_easy","crypto_box_easy_afternm","crypto_box_keypair","crypto_box_open_detached","crypto_box_open_easy","crypto_box_open_easy_afternm","crypto_box_seal","crypto_box_seal_open","crypto_box_seed_keypair","crypto_core_ed25519_add","crypto_core_ed25519_from_hash","crypto_core_ed25519_from_uniform","crypto_core_ed25519_is_valid_point","crypto_core_ed25519_random","crypto_core_ed25519_scalar_add","crypto_core_ed25519_scalar_complement","crypto_core_ed25519_scalar_invert","crypto_core_ed25519_scalar_mul","crypto_core_ed25519_scalar_negate","crypto_core_ed25519_scalar_random","crypto_core_ed25519_scalar_reduce","crypto_core_ed25519_scalar_sub","crypto_core_ed25519_sub","crypto_core_ristretto255_add","crypto_core_ristretto255_from_hash","crypto_core_ristretto255_is_valid_point","crypto_core_ristretto255_random","crypto_core_ristretto255_scalar_add","crypto_core_ristretto255_scalar_complement","crypto_core_ristretto255_scalar_invert","crypto_core_ristretto255_scalar_mul","crypto_core_ristretto255_scalar_negate","crypto_core_ristretto255_scalar_random","crypto_core_ristretto255_scalar_reduce","crypto_core_ristretto255_scalar_sub","crypto_core_ristretto255_sub","crypto_generichash","crypto_generichash_blake2b_salt_personal","crypto_generichash_final","crypto_generichash_init","crypto_generichash_keygen","crypto_generichash_update","crypto_hash","crypto_hash_sha256","crypto_hash_sha256_final","crypto_hash_sha256_init","crypto_hash_sha256_update","crypto_hash_sha512","crypto_hash_sha512_final","crypto_hash_sha512_init","crypto_hash_sha512_update","crypto_kdf_derive_from_key","crypto_kdf_keygen","crypto_kx_client_session_keys","crypto_kx_keypair","crypto_kx_seed_keypair","crypto_kx_server_session_keys","crypto_onetimeauth","crypto_onetimeauth_final","crypto_onetimeauth_init","crypto_onetimeauth_keygen","crypto_onetimeauth_update","crypto_onetimeauth_verify","crypto_pwhash","crypto_pwhash_scryptsalsa208sha256","crypto_pwhash_scryptsalsa208sha256_ll","crypto_pwhash_scryptsalsa208sha256_str","crypto_pwhash_scryptsalsa208sha256_str_verify","crypto_pwhash_str","crypto_pwhash_str_needs_rehash","crypto_pwhash_str_verify","crypto_scalarmult","crypto_scalarmult_base","crypto_scalarmult_ed25519","crypto_scalarmult_ed25519_base","crypto_scalarmult_ed25519_base_noclamp","crypto_scalarmult_ed25519_noclamp","crypto_scalarmult_ristretto255","crypto_scalarmult_ristretto255_base","crypto_secretbox_detached","crypto_secretbox_easy","crypto_secretbox_keygen","crypto_secretbox_open_detached","crypto_secretbox_open_easy","crypto_secretstream_xchacha20poly1305_init_pull","crypto_secretstream_xchacha20poly1305_init_push","crypto_secretstream_xchacha20poly1305_keygen","crypto_secretstream_xchacha20poly1305_pull","crypto_secretstream_xchacha20poly1305_push","crypto_secretstream_xchacha20poly1305_rekey","crypto_shorthash","crypto_shorthash_keygen","crypto_shorthash_siphashx24","crypto_sign","crypto_sign_detached","crypto_sign_ed25519_pk_to_curve25519","crypto_sign_ed25519_sk_to_curve25519","crypto_sign_ed25519_sk_to_pk","crypto_sign_ed25519_sk_to_seed","crypto_sign_final_create","crypto_sign_final_verify","crypto_sign_init","crypto_sign_keypair","crypto_sign_open","crypto_sign_seed_keypair","crypto_sign_update","crypto_sign_verify_detached","crypto_stream_chacha20","crypto_stream_chacha20_ietf_xor","crypto_stream_chacha20_ietf_xor_ic","crypto_stream_chacha20_keygen","crypto_stream_chacha20_xor","crypto_stream_chacha20_xor_ic","crypto_stream_keygen","crypto_stream_xchacha20_keygen","crypto_stream_xchacha20_xor","crypto_stream_xchacha20_xor_ic","randombytes_buf","randombytes_buf_deterministic","randombytes_close","randombytes_random","randombytes_set_implementation","randombytes_stir","randombytes_uniform","sodium_version_string"],r=[I,C,E,w,B,_,S,k,O,Q,R,P,N,x,D,M,T,U,H,j,J,F,G,L,q,Y,V,W,K,Z,z,X,$,ee,te,ne,re,oe,ie,ae,se,ce,de,ue,le,Ae,fe,he,ge,pe,me,ve,ye,be,Ie,Ce,Ee,we,Be,_e,Se,ke,Oe,Qe,Re,Pe,Ne,xe,De,Me,Te,Ue,He,je,Je,Fe,Ge,Le,qe,Ye,Ve,We,Ke,Ze,ze,Xe,$e,et,tt,nt,rt,ot,it,at,st,ct,dt,ut,lt,At,ft,ht,gt,pt,mt,vt,yt,bt,It,Ct,Et,wt,Bt,_t,St,kt,Ot,Qt,Rt,Pt,Nt,xt,Dt,Mt,Tt,Ut,Ht,jt,Jt,Ft,Gt,Lt,qt,Yt,Vt,Wt,Kt,Zt,zt,Xt,$t,en,tn,nn,rn,on,an,sn,cn,dn,un,ln,An,fn],o=0;o=240?(u=4,c=!0):l>=224?(u=3,c=!0):l>=192?(u=2,c=!0):l<128&&(u=1,c=!0)}while(!c);for(var A=u-(s.length-d),f=0;f>8&-39)<<8|87+(t=e[i]>>>4)+(t-10>>8&-39),o+=String.fromCharCode(255&r)+String.fromCharCode(r>>>8);return o}var s={ORIGINAL:1,ORIGINAL_NO_PADDING:3,URLSAFE:5,URLSAFE_NO_PADDING:7};function c(e){if(null==e)return s.URLSAFE_NO_PADDING;if(e!==s.ORIGINAL&&e!==s.ORIGINAL_NO_PADDING&&e!==s.URLSAFE&&e!=s.URLSAFE_NO_PADDING)throw new Error("unsupported base64 variant");return e}function d(e,t){t=c(t),e=b(o,e,"input");var r,o=[],a=0|Math.floor(e.length/3),s=e.length-3*a,d=4*a+(0!==s?0==(2&t)?4:2+(s>>>1):0),u=new f(d+1),l=h(e);return o.push(l),o.push(u.address),0===n._sodium_bin2base64(u.address,u.length,l,e.length,t)&&m(o,"conversion failed"),u.length=d,r=i(u.to_Uint8Array()),p(o),r}function u(e,t){var n=t||"uint8array";if(!l(n))throw new Error(n+" output format is not available");if(e instanceof f){if("uint8array"===n)return e.to_Uint8Array();if("text"===n)return i(e.to_Uint8Array());if("hex"===n)return a(e.to_Uint8Array());if("base64"===n)return d(e.to_Uint8Array(),s.URLSAFE_NO_PADDING);throw new Error('What is output format "'+n+'"?')}if("object"==typeof e){for(var r=Object.keys(e),o={},c=0;c>>24>>>8,c,l);var C=u(m,a);return p(s),C}function We(e){var t=[];A(e);var r=new f(0|n._crypto_kdf_keybytes()),o=r.address;t.push(o),n._crypto_kdf_keygen(o);var i=u(r,e);return p(t),i}function Ke(e,t,r,o){var i=[];A(o),e=b(i,e,"clientPublicKey");var a,s=0|n._crypto_kx_publickeybytes();e.length!==s&&v(i,"invalid clientPublicKey length"),a=h(e),i.push(a),t=b(i,t,"clientSecretKey");var c,d=0|n._crypto_kx_secretkeybytes();t.length!==d&&v(i,"invalid clientSecretKey length"),c=h(t),i.push(c),r=b(i,r,"serverPublicKey");var l,g=0|n._crypto_kx_publickeybytes();r.length!==g&&v(i,"invalid serverPublicKey length"),l=h(r),i.push(l);var y=new f(0|n._crypto_kx_sessionkeybytes()),I=y.address;i.push(I);var C=new f(0|n._crypto_kx_sessionkeybytes()),E=C.address;if(i.push(E),0==(0|n._crypto_kx_client_session_keys(I,E,a,c,l))){var w=u({sharedRx:y,sharedTx:C},o);return p(i),w}m(i,"invalid usage")}function Ze(e){var t=[];A(e);var r=new f(0|n._crypto_kx_publickeybytes()),o=r.address;t.push(o);var i=new f(0|n._crypto_kx_secretkeybytes()),a=i.address;if(t.push(a),0==(0|n._crypto_kx_keypair(o,a))){var s={publicKey:u(r,e),privateKey:u(i,e),keyType:"x25519"};return p(t),s}m(t,"internal error")}function ze(e,t){var r=[];A(t),e=b(r,e,"seed");var o,i=0|n._crypto_kx_seedbytes();e.length!==i&&v(r,"invalid seed length"),o=h(e),r.push(o);var a=new f(0|n._crypto_kx_publickeybytes()),s=a.address;r.push(s);var c=new f(0|n._crypto_kx_secretkeybytes()),d=c.address;if(r.push(d),0==(0|n._crypto_kx_seed_keypair(s,d,o))){var l={publicKey:u(a,t),privateKey:u(c,t),keyType:"x25519"};return p(r),l}m(r,"internal error")}function Xe(e,t,r,o){var i=[];A(o),e=b(i,e,"serverPublicKey");var a,s=0|n._crypto_kx_publickeybytes();e.length!==s&&v(i,"invalid serverPublicKey length"),a=h(e),i.push(a),t=b(i,t,"serverSecretKey");var c,d=0|n._crypto_kx_secretkeybytes();t.length!==d&&v(i,"invalid serverSecretKey length"),c=h(t),i.push(c),r=b(i,r,"clientPublicKey");var l,g=0|n._crypto_kx_publickeybytes();r.length!==g&&v(i,"invalid clientPublicKey length"),l=h(r),i.push(l);var y=new f(0|n._crypto_kx_sessionkeybytes()),I=y.address;i.push(I);var C=new f(0|n._crypto_kx_sessionkeybytes()),E=C.address;if(i.push(E),0==(0|n._crypto_kx_server_session_keys(I,E,a,c,l))){var w=u({sharedRx:y,sharedTx:C},o);return p(i),w}m(i,"invalid usage")}function $e(e,t,r){var o=[];A(r);var i=h(e=b(o,e,"message")),a=e.length;o.push(i),t=b(o,t,"key");var s,c=0|n._crypto_onetimeauth_keybytes();t.length!==c&&v(o,"invalid key length"),s=h(t),o.push(s);var d=new f(0|n._crypto_onetimeauth_bytes()),l=d.address;if(o.push(l),0==(0|n._crypto_onetimeauth(l,i,a,0,s))){var g=u(d,r);return p(o),g}m(o,"invalid usage")}function et(e,t){var r=[];A(t),y(r,e,"state_address");var o=new f(0|n._crypto_onetimeauth_bytes()),i=o.address;if(r.push(i),0==(0|n._crypto_onetimeauth_final(e,i))){var a=(n._free(e),u(o,t));return p(r),a}m(r,"invalid usage")}function tt(e,t){var r=[];A(t);var o=null;null!=e&&(o=h(e=b(r,e,"key")),e.length,r.push(o));var i=new f(144).address;if(0==(0|n._crypto_onetimeauth_init(i,o))){var a=i;return p(r),a}m(r,"invalid usage")}function nt(e){var t=[];A(e);var r=new f(0|n._crypto_onetimeauth_keybytes()),o=r.address;t.push(o),n._crypto_onetimeauth_keygen(o);var i=u(r,e);return p(t),i}function rt(e,t,r){var o=[];A(r),y(o,e,"state_address");var i=h(t=b(o,t,"message_chunk")),a=t.length;o.push(i),0!=(0|n._crypto_onetimeauth_update(e,i,a))&&m(o,"invalid usage"),p(o)}function ot(e,t,r){var o=[];e=b(o,e,"hash");var i,a=0|n._crypto_onetimeauth_bytes();e.length!==a&&v(o,"invalid hash length"),i=h(e),o.push(i);var s=h(t=b(o,t,"message")),c=t.length;o.push(s),r=b(o,r,"key");var d,u=0|n._crypto_onetimeauth_keybytes();r.length!==u&&v(o,"invalid key length"),d=h(r),o.push(d);var l=0==(0|n._crypto_onetimeauth_verify(i,s,c,0,d));return p(o),l}function it(e,t,r,o,i,a,s){var c=[];A(s),y(c,e,"keyLength"),("number"!=typeof e||(0|e)!==e||e<0)&&v(c,"keyLength must be an unsigned integer");var d=h(t=b(c,t,"password")),l=t.length;c.push(d),r=b(c,r,"salt");var g,I=0|n._crypto_pwhash_saltbytes();r.length!==I&&v(c,"invalid salt length"),g=h(r),c.push(g),y(c,o,"opsLimit"),("number"!=typeof o||(0|o)!==o||o<0)&&v(c,"opsLimit must be an unsigned integer"),y(c,i,"memLimit"),("number"!=typeof i||(0|i)!==i||i<0)&&v(c,"memLimit must be an unsigned integer"),y(c,a,"algorithm"),("number"!=typeof a||(0|a)!==a||a<0)&&v(c,"algorithm must be an unsigned integer");var C=new f(0|e),E=C.address;if(c.push(E),0==(0|n._crypto_pwhash(E,e,0,d,l,0,g,o,0,i,a))){var w=u(C,s);return p(c),w}m(c,"invalid usage")}function at(e,t,r,o,i,a){var s=[];A(a),y(s,e,"keyLength"),("number"!=typeof e||(0|e)!==e||e<0)&&v(s,"keyLength must be an unsigned integer");var c=h(t=b(s,t,"password")),d=t.length;s.push(c),r=b(s,r,"salt");var l,g=0|n._crypto_pwhash_scryptsalsa208sha256_saltbytes();r.length!==g&&v(s,"invalid salt length"),l=h(r),s.push(l),y(s,o,"opsLimit"),("number"!=typeof o||(0|o)!==o||o<0)&&v(s,"opsLimit must be an unsigned integer"),y(s,i,"memLimit"),("number"!=typeof i||(0|i)!==i||i<0)&&v(s,"memLimit must be an unsigned integer");var I=new f(0|e),C=I.address;if(s.push(C),0==(0|n._crypto_pwhash_scryptsalsa208sha256(C,e,0,c,d,0,l,o,0,i))){var E=u(I,a);return p(s),E}m(s,"invalid usage")}function st(e,t,r,o,i,a,s){var c=[];A(s);var d=h(e=b(c,e,"password")),l=e.length;c.push(d);var g=h(t=b(c,t,"salt")),I=t.length;c.push(g),y(c,r,"opsLimit"),("number"!=typeof r||(0|r)!==r||r<0)&&v(c,"opsLimit must be an unsigned integer"),y(c,o,"r"),("number"!=typeof o||(0|o)!==o||o<0)&&v(c,"r must be an unsigned integer"),y(c,i,"p"),("number"!=typeof i||(0|i)!==i||i<0)&&v(c,"p must be an unsigned integer"),y(c,a,"keyLength"),("number"!=typeof a||(0|a)!==a||a<0)&&v(c,"keyLength must be an unsigned integer");var C=new f(0|a),E=C.address;if(c.push(E),0==(0|n._crypto_pwhash_scryptsalsa208sha256_ll(d,l,g,I,r,0,o,i,E,a))){var w=u(C,s);return p(c),w}m(c,"invalid usage")}function ct(e,t,r,o){var i=[];A(o);var a=h(e=b(i,e,"password")),s=e.length;i.push(a),y(i,t,"opsLimit"),("number"!=typeof t||(0|t)!==t||t<0)&&v(i,"opsLimit must be an unsigned integer"),y(i,r,"memLimit"),("number"!=typeof r||(0|r)!==r||r<0)&&v(i,"memLimit must be an unsigned integer");var c=new f(0|n._crypto_pwhash_scryptsalsa208sha256_strbytes()).address;if(i.push(c),0==(0|n._crypto_pwhash_scryptsalsa208sha256_str(c,a,s,0,t,0,r))){var d=n.UTF8ToString(c);return p(i),d}m(i,"invalid usage")}function dt(e,t,r){var i=[];A(r),"string"!=typeof e&&v(i,"hashed_password must be a string"),e=o(e+"\0"),null!=s&&e.length-1!==s&&v(i,"invalid hashed_password length");var a=h(e),s=e.length-1;i.push(a);var c=h(t=b(i,t,"password")),d=t.length;i.push(c);var u=0==(0|n._crypto_pwhash_scryptsalsa208sha256_str_verify(a,c,d,0));return p(i),u}function ut(e,t,r,o){var i=[];A(o);var a=h(e=b(i,e,"password")),s=e.length;i.push(a),y(i,t,"opsLimit"),("number"!=typeof t||(0|t)!==t||t<0)&&v(i,"opsLimit must be an unsigned integer"),y(i,r,"memLimit"),("number"!=typeof r||(0|r)!==r||r<0)&&v(i,"memLimit must be an unsigned integer");var c=new f(0|n._crypto_pwhash_strbytes()).address;if(i.push(c),0==(0|n._crypto_pwhash_str(c,a,s,0,t,0,r))){var d=n.UTF8ToString(c);return p(i),d}m(i,"invalid usage")}function lt(e,t,r,i){var a=[];A(i),"string"!=typeof e&&v(a,"hashed_password must be a string"),e=o(e+"\0"),null!=c&&e.length-1!==c&&v(a,"invalid hashed_password length");var s=h(e),c=e.length-1;a.push(s),y(a,t,"opsLimit"),("number"!=typeof t||(0|t)!==t||t<0)&&v(a,"opsLimit must be an unsigned integer"),y(a,r,"memLimit"),("number"!=typeof r||(0|r)!==r||r<0)&&v(a,"memLimit must be an unsigned integer");var d=0!=(0|n._crypto_pwhash_str_needs_rehash(s,t,0,r));return p(a),d}function At(e,t,r){var i=[];A(r),"string"!=typeof e&&v(i,"hashed_password must be a string"),e=o(e+"\0"),null!=s&&e.length-1!==s&&v(i,"invalid hashed_password length");var a=h(e),s=e.length-1;i.push(a);var c=h(t=b(i,t,"password")),d=t.length;i.push(c);var u=0==(0|n._crypto_pwhash_str_verify(a,c,d,0));return p(i),u}function ft(e,t,r){var o=[];A(r),e=b(o,e,"privateKey");var i,a=0|n._crypto_scalarmult_scalarbytes();e.length!==a&&v(o,"invalid privateKey length"),i=h(e),o.push(i),t=b(o,t,"publicKey");var s,c=0|n._crypto_scalarmult_bytes();t.length!==c&&v(o,"invalid publicKey length"),s=h(t),o.push(s);var d=new f(0|n._crypto_scalarmult_bytes()),l=d.address;if(o.push(l),0==(0|n._crypto_scalarmult(l,i,s))){var g=u(d,r);return p(o),g}m(o,"weak public key")}function ht(e,t){var r=[];A(t),e=b(r,e,"privateKey");var o,i=0|n._crypto_scalarmult_scalarbytes();e.length!==i&&v(r,"invalid privateKey length"),o=h(e),r.push(o);var a=new f(0|n._crypto_scalarmult_bytes()),s=a.address;if(r.push(s),0==(0|n._crypto_scalarmult_base(s,o))){var c=u(a,t);return p(r),c}m(r,"unknown error")}function gt(e,t,r){var o=[];A(r),e=b(o,e,"n");var i,a=0|n._crypto_scalarmult_ed25519_scalarbytes();e.length!==a&&v(o,"invalid n length"),i=h(e),o.push(i),t=b(o,t,"p");var s,c=0|n._crypto_scalarmult_ed25519_bytes();t.length!==c&&v(o,"invalid p length"),s=h(t),o.push(s);var d=new f(0|n._crypto_scalarmult_ed25519_bytes()),l=d.address;if(o.push(l),0==(0|n._crypto_scalarmult_ed25519(l,i,s))){var g=u(d,r);return p(o),g}m(o,"invalid point or scalar is 0")}function pt(e,t){var r=[];A(t),e=b(r,e,"scalar");var o,i=0|n._crypto_scalarmult_ed25519_scalarbytes();e.length!==i&&v(r,"invalid scalar length"),o=h(e),r.push(o);var a=new f(0|n._crypto_scalarmult_ed25519_bytes()),s=a.address;if(r.push(s),0==(0|n._crypto_scalarmult_ed25519_base(s,o))){var c=u(a,t);return p(r),c}m(r,"scalar is 0")}function mt(e,t){var r=[];A(t),e=b(r,e,"scalar");var o,i=0|n._crypto_scalarmult_ed25519_scalarbytes();e.length!==i&&v(r,"invalid scalar length"),o=h(e),r.push(o);var a=new f(0|n._crypto_scalarmult_ed25519_bytes()),s=a.address;if(r.push(s),0==(0|n._crypto_scalarmult_ed25519_base_noclamp(s,o))){var c=u(a,t);return p(r),c}m(r,"scalar is 0")}function vt(e,t,r){var o=[];A(r),e=b(o,e,"n");var i,a=0|n._crypto_scalarmult_ed25519_scalarbytes();e.length!==a&&v(o,"invalid n length"),i=h(e),o.push(i),t=b(o,t,"p");var s,c=0|n._crypto_scalarmult_ed25519_bytes();t.length!==c&&v(o,"invalid p length"),s=h(t),o.push(s);var d=new f(0|n._crypto_scalarmult_ed25519_bytes()),l=d.address;if(o.push(l),0==(0|n._crypto_scalarmult_ed25519_noclamp(l,i,s))){var g=u(d,r);return p(o),g}m(o,"invalid point or scalar is 0")}function yt(e,t,r){var o=[];A(r),e=b(o,e,"scalar");var i,a=0|n._crypto_scalarmult_ristretto255_scalarbytes();e.length!==a&&v(o,"invalid scalar length"),i=h(e),o.push(i),t=b(o,t,"element");var s,c=0|n._crypto_scalarmult_ristretto255_bytes();t.length!==c&&v(o,"invalid element length"),s=h(t),o.push(s);var d=new f(0|n._crypto_scalarmult_ristretto255_bytes()),l=d.address;if(o.push(l),0==(0|n._crypto_scalarmult_ristretto255(l,i,s))){var g=u(d,r);return p(o),g}m(o,"result is identity element")}function bt(e,t){var r=[];A(t),e=b(r,e,"scalar");var o,i=0|n._crypto_core_ristretto255_scalarbytes();e.length!==i&&v(r,"invalid scalar length"),o=h(e),r.push(o);var a=new f(0|n._crypto_core_ristretto255_bytes()),s=a.address;if(r.push(s),0==(0|n._crypto_scalarmult_ristretto255_base(s,o))){var c=u(a,t);return p(r),c}m(r,"scalar is 0")}function It(e,t,r,o){var i=[];A(o);var a=h(e=b(i,e,"message")),s=e.length;i.push(a),t=b(i,t,"nonce");var c,d=0|n._crypto_secretbox_noncebytes();t.length!==d&&v(i,"invalid nonce length"),c=h(t),i.push(c),r=b(i,r,"key");var l,g=0|n._crypto_secretbox_keybytes();r.length!==g&&v(i,"invalid key length"),l=h(r),i.push(l);var y=new f(0|s),I=y.address;i.push(I);var C=new f(0|n._crypto_secretbox_macbytes()),E=C.address;if(i.push(E),0==(0|n._crypto_secretbox_detached(I,E,a,s,0,c,l))){var w=u({mac:C,cipher:y},o);return p(i),w}m(i,"invalid usage")}function Ct(e,t,r,o){var i=[];A(o);var a=h(e=b(i,e,"message")),s=e.length;i.push(a),t=b(i,t,"nonce");var c,d=0|n._crypto_secretbox_noncebytes();t.length!==d&&v(i,"invalid nonce length"),c=h(t),i.push(c),r=b(i,r,"key");var l,g=0|n._crypto_secretbox_keybytes();r.length!==g&&v(i,"invalid key length"),l=h(r),i.push(l);var y=new f(s+n._crypto_secretbox_macbytes()|0),I=y.address;if(i.push(I),0==(0|n._crypto_secretbox_easy(I,a,s,0,c,l))){var C=u(y,o);return p(i),C}m(i,"invalid usage")}function Et(e){var t=[];A(e);var r=new f(0|n._crypto_secretbox_keybytes()),o=r.address;t.push(o),n._crypto_secretbox_keygen(o);var i=u(r,e);return p(t),i}function wt(e,t,r,o,i){var a=[];A(i);var s=h(e=b(a,e,"ciphertext")),c=e.length;a.push(s),t=b(a,t,"mac");var d,l=0|n._crypto_secretbox_macbytes();t.length!==l&&v(a,"invalid mac length"),d=h(t),a.push(d),r=b(a,r,"nonce");var g,y=0|n._crypto_secretbox_noncebytes();r.length!==y&&v(a,"invalid nonce length"),g=h(r),a.push(g),o=b(a,o,"key");var I,C=0|n._crypto_secretbox_keybytes();o.length!==C&&v(a,"invalid key length"),I=h(o),a.push(I);var E=new f(0|c),w=E.address;if(a.push(w),0==(0|n._crypto_secretbox_open_detached(w,s,d,c,0,g,I))){var B=u(E,i);return p(a),B}m(a,"wrong secret key for the given ciphertext")}function Bt(e,t,r,o){var i=[];A(o),e=b(i,e,"ciphertext");var a,s=n._crypto_secretbox_macbytes(),c=e.length;c>>0;return p([]),t}function un(e,t){var r=[];A(t);for(var o=n._malloc(24),i=0;i<6;i++)n.setValue(o+4*i,n.Runtime.addFunction(e[["implementation_name","random","stir","uniform","buf","close"][i]]),"i32");0!=(0|n._randombytes_set_implementation(o))&&m(r,"unsupported implementation"),p(r)}function ln(e){A(e),n._randombytes_stir()}function An(e,t){var r=[];A(t),y(r,e,"upper_bound"),("number"!=typeof e||(0|e)!==e||e<0)&&v(r,"upper_bound must be an unsigned integer");var o=n._randombytes_uniform(e)>>>0;return p(r),o}function fn(){var e=n._sodium_version_string(),t=n.UTF8ToString(e);return p([]),t}return f.prototype.to_Uint8Array=function(){var e=new Uint8Array(this.length);return e.set(n.HEAPU8.subarray(this.address,this.address+this.length)),e},e.add=function(e,t){if(!(e instanceof Uint8Array&&t instanceof Uint8Array))throw new TypeError("Only Uint8Array instances can added");var n=e.length,r=0,o=0;if(t.length!=e.length)throw new TypeError("Arguments must have the same length");for(o=0;o>=8,r+=e[o]+t[o],e[o]=255&r},e.base64_variants=s,e.compare=function(e,t){if(!(e instanceof Uint8Array&&t instanceof Uint8Array))throw new TypeError("Only Uint8Array instances can be compared");if(e.length!==t.length)throw new TypeError("Only instances of identical length can be compared");for(var n=0,r=1,o=e.length;o-- >0;)n|=t[o]-e[o]>>8&r,r&=(t[o]^e[o])-1>>8;return n+n+r-1},e.from_base64=function(e,t){t=c(t);var r,o=[],i=new f(3*(e=b(o,e,"input")).length/4),a=h(e),s=g(4),d=g(4);return o.push(a),o.push(i.address),o.push(i.result_bin_len_p),o.push(i.b64_end_p),0!==n._sodium_base642bin(i.address,i.length,a,e.length,0,s,d,t)&&m(o,"invalid input"),n.getValue(d,"i32")-a!==e.length&&m(o,"incomplete input"),i.length=n.getValue(s,"i32"),r=i.to_Uint8Array(),p(o),r},e.from_hex=function(e){var t,r=[],o=new f((e=b(r,e,"input")).length/2),i=h(e),a=g(4);return r.push(i),r.push(o.address),r.push(o.hex_end_p),0!==n._sodium_hex2bin(o.address,o.length,i,e.length,0,0,a)&&m(r,"invalid input"),n.getValue(a,"i32")-i!==e.length&&m(r,"incomplete input"),t=o.to_Uint8Array(),p(r),t},e.from_string=o,e.increment=function(e){if(!(e instanceof Uint8Array))throw new TypeError("Only Uint8Array instances can be incremented");for(var t=256,n=0,r=e.length;n>=8,t+=e[n],e[n]=255&t},e.is_zero=function(e){if(!(e instanceof Uint8Array))throw new TypeError("Only Uint8Array instances can be checked");for(var t=0,n=0,r=e.length;n 0");var r,o=[],i=g(4),a=1,s=0,c=0|e.length,d=new f(c+t);o.push(i),o.push(d.address);for(var u=d.address,l=d.address+c+t;u>>48|c>>>32|c>>>16|c))-1>>16);return 0!==n._sodium_pad(i,d.address,e.length,t,d.length)&&m(o,"internal error"),d.length=n.getValue(i,"i32"),r=d.to_Uint8Array(),p(o),r},e.unpad=function(e,t){if(!(e instanceof Uint8Array))throw new TypeError("buffer must be a Uint8Array");if((t|=0)<=0)throw new Error("block size must be > 0");var r=[],o=h(e),i=g(4);return r.push(o),r.push(i),0!==n._sodium_unpad(i,o,e.length,t)&&m(r,"unsupported/invalid padding"),e=(e=new Uint8Array(e)).subarray(0,n.getValue(i,"i32")),p(r),e},e.ready=r,e.symbols=function(){return Object.keys(e).sort()},e.to_base64=d,e.to_hex=a,e.to_string=i,e},void 0!==(i=r.apply(t,o))&&(e.exports=i),s&&a.sodium.ready.then((function(){s(a.sodium)}))},4608:function(e,t,n){var r,o,i=n(4155),a=n(8764).Buffer;r=function(t){"use strict";var r;void 0===(r=t)&&(r={});var o=r;"object"!=typeof o.sodium&&("object"==typeof n.g?o=n.g:"object"==typeof window&&(o=window)),"object"==typeof o.sodium&&"number"==typeof o.sodium.totalMemory&&(r.TOTAL_MEMORY=o.sodium.totalMemory);var s=r;return r.ready=new Promise((function(t,r){(c=s).onAbort=r,c.print=function(e){},c.printErr=function(e){},c.onRuntimeInitialized=function(){try{c._crypto_secretbox_keybytes(),t()}catch(e){r(e)}},c.useBackupModule=function(){return new Promise((function(t,r){(c={}).onAbort=r,c.onRuntimeInitialized=function(){Object.keys(s).forEach((function(e){"getRandomValue"!==e&&delete s[e]})),Object.keys(c).forEach((function(e){s[e]=c[e]})),t()};var o,c=void 0!==c?c:{},d={};for(o in c)c.hasOwnProperty(o)&&(d[o]=c[o]);var u=[],l=!1,A=!1,f=!1,h=!1;l="object"==typeof window,A="function"==typeof importScripts,f="object"==typeof i&&"object"==typeof i.versions&&"string"==typeof i.versions.node,h=!l&&!f&&!A;var g,p,m,v,y,b="";function I(e){return c.locateFile?c.locateFile(e,b):b+e}f?(b=A?n(6470).dirname(b)+"/":"//",g=function(e,t){var r=xe(e);return r?t?r:r.toString():(v||(v=n(5992)),y||(y=n(6470)),e=y.normalize(e),v.readFileSync(e,t?null:"utf8"))},m=function(e){var t=g(e,!0);return t.buffer||(t=new Uint8Array(t)),O(t.buffer),t},i.argv.length>1&&i.argv[1].replace(/\\/g,"/"),u=i.argv.slice(2),e.exports=c,c.inspect=function(){return"[Emscripten Module object]"}):h?("undefined"!=typeof read&&(g=function(e){var t=xe(e);return t?Re(t):read(e)}),m=function(e){var t;return(t=xe(e))?t:"function"==typeof readbuffer?new Uint8Array(readbuffer(e)):(O("object"==typeof(t=read(e,"binary"))),t)},"undefined"!=typeof scriptArgs?u=scriptArgs:void 0!==arguments&&(u=arguments),"undefined"!=typeof print&&("undefined"==typeof console&&(console={}),console.log=print,console.warn=console.error="undefined"!=typeof printErr?printErr:print)):(l||A)&&(A?b=self.location.href:"undefined"!=typeof document&&document.currentScript&&(b=document.currentScript.src),b=0!==b.indexOf("blob:")?b.substr(0,b.lastIndexOf("/")+1):"",g=function(e){try{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText}catch(t){var n=xe(e);if(n)return Re(n);throw t}},A&&(m=function(e){try{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}catch(t){var n=xe(e);if(n)return n;throw t}}),p=function(e,t,n){var r=new XMLHttpRequest;r.open("GET",e,!0),r.responseType="arraybuffer",r.onload=function(){if(200==r.status||0==r.status&&r.response)t(r.response);else{var o=xe(e);o?t(o.buffer):n()}},r.onerror=n,r.send(null)}),c.print;var C,E=c.printErr||void 0;for(o in d)d.hasOwnProperty(o)&&(c[o]=d[o]);d=null,c.arguments&&(u=c.arguments),c.thisProgram&&c.thisProgram,c.quit&&c.quit,c.wasmBinary&&(C=c.wasmBinary),c.noExitRuntime&&c.noExitRuntime;var w,B={Memory:function(e){this.buffer=new ArrayBuffer(65536*e.initial)},Module:function(e){},Instance:function(e,t){this.exports=function(e){for(var t,n=new Uint8Array(123),r=25;r>=0;--r)n[48+r]=52+r,n[65+r]=r,n[97+r]=26+r;function o(e,t,r){for(var o,i,a=0,s=t,c=r.length,d=t+(3*c>>2)-("="==r[c-2])-("="==r[c-1]);a>4,s>2),s>2]=c[0|G]|c[G+1|0]<<8|c[G+2|0]<<16|c[G+3|0]<<24,s[Y+4>>2]=oe,16!=(0|(Z=Z+1|0)););for(n=q(V,e,64),G=s[(t=n)>>2],Z=s[t+4>>2],d=G,G=(oe=s[t+32>>2])+(V=s[t+128>>2])|0,t=($=s[t+36>>2])+s[t+132>>2]|0,t=G>>>0>>0?t+1|0:t,V=G,t=t+Z|0,V=t=(G=d+G|0)>>>0>>0?t+1|0:t,J=Cn((Z=G)^(c[0|(G=e- -64|0)]|c[G+1|0]<<8|c[G+2|0]<<16|c[G+3|0]<<24)^-1377402159,t^(c[G+4|0]|c[G+5|0]<<8|c[G+6|0]<<16|c[G+7|0]<<24)^1359893119,32),G=t=C,t=t+1779033703|0,d=oe^(Y=J-205731576|0),oe=t=Y>>>0<4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t=C,t=t+1013904242|0,u=K^($=m-23791573|0),K=t=$>>>0<4271175723?t+1|0:t,t=Cn(u,p^t,24),g=oe,o=s[n+172>>2],u=t,A=m,m=t,ue=t+ue|0,t=(p=C)+Z|0,t=(t=m>>>0>ue>>>0?t+1|0:t)+(j=o)|0,ee=Cn(A^(w=Z=(oe=s[n+168>>2])+(m=ue)|0),(j=m>>>0>w>>>0?t+1|0:t)^g,16),t=K+(M=C)|0,p=Cn(u^(S=Z=$+ee|0),(K=S>>>0<$>>>0?t+1|0:t)^p,63),g=C,m=s[n+28>>2],$=(Z=s[n+176>>2])+(b=ue=s[n+56>>2])|0,t=(pe=s[n+180>>2])+(v=s[n+60>>2])|0,t=(t=b>>>0>$>>>0?t+1|0:t)+m|0,t=(b=$)>>>0>(P=$=b+s[n+24>>2]|0)>>>0?t+1|0:t,x=Cn(P^(c[e+88|0]|c[e+89|0]<<8|c[e+90|0]<<16|c[e+91|0]<<24)^327033209,t^(c[e+92|0]|c[e+93|0]<<8|c[e+94|0]<<16|c[e+95|0]<<24)^1541459225,32),m=Cn(A=(u=(m=x)+1595750129|0)^ue,v^(ue=($=C)-((m>>>0<2699217167)+1521486533|0)|0),24),v=ue,O=$,ue=s[n+188>>2],A=m,U=u,t=(b=C)+t|0,t=(t=(P=m+P|0)>>>0>>0?t+1|0:t)+(D=ue)|0,z=m=($=s[n+184>>2])+P|0,u=Cn(m^x,(u=O)^(O=m>>>0

>>0?t+1|0:t),16),t=(t=v)+(v=C)|0,P=m=U+u|0,x=b,b=t=m>>>0>>0?t+1|0:t,A=Cn(A^m,x^t,63),m=C,x=R,U=J,F=S,t=R+B|0,R=l=l+J|0,t=(t=l>>>0>>0?t+1|0:t)+(D=L=s[n+196>>2])|0,S=Cn((l=J=(te=s[n+192>>2])+l|0)^u,(J=R>>>0>l>>>0?t+1|0:t)^v,32),t=(t=K)+(K=C)|0,B=t=(R=F+(B=S)|0)>>>0>>0?t+1|0:t,t=Cn(U^R,t^x,24),he=s[n+204>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[e+37|0]<<8|c[e+38|0]<<16|c[e+39|0]<<24,z=kt(e+39|0),j=C,O=kt(e+42|0),B=c[e+44|0]|c[e+45|0]<<8|c[e+46|0]<<16|c[e+47|0]<<24,w=kt(e+47|0),I=2097151&((3&E)<<30|_>>>2),_=fn(t=2097151&((3&(k=C))<<30|w>>>2),0,136657,0)+I|0,E=C,E=I>>>0>_>>>0?E+1|0:E,w=fn(n=(c[e+49|0]|c[e+50|0]<<8|c[e+51|0]<<16|c[e+52|0]<<24)>>>7&2097151,0,-997805,-1),I=C+E|0,I=w>>>0>(_=w+_|0)>>>0?I+1|0:I,E=fn(r=(c[e+52|0]|c[e+53|0]<<8|c[e+54|0]<<16|c[e+55|0]<<24)>>>4&2097151,0,654183,0),w=C+I|0,w=E>>>0>(_=E+_|0)>>>0?w+1|0:w,I=_,E=kt(e+55|0),_=I+(E=fn(o=2097151&((1&(_=C))<<31|E>>>1),0,470296,0))|0,I=C+w|0,I=E>>>0>_>>>0?I+1|0:I,w=fn(a=(c[e+57|0]|c[e+58|0]<<8|c[e+59|0]<<16|c[e+60|0]<<24)>>>6&2097151,0,666643,0),E=C+I|0,N=E=w>>>0>(_=w+_|0)>>>0?E+1|0:E,w=E,Q=B>>>5&2097151,E=2097151&O,B=fn(s=(c[e+60|0]|c[e+61|0]<<8|c[e+62|0]<<16|c[e+63|0]<<24)>>>3|0,0,-683901,-1)+E|0,I=C,O=B,x=I=E>>>0>B>>>0?I+1|0:I,D=(I=B)- -1048576|0,F=B=x-((I>>>0<4293918720)-1|0)|0,I=B>>21,u=Q=(B=(2097151&B)<<11|D>>>21)+Q|0,Y=E=B>>>0>Q>>>0?I+1|0:I,I=fn(Q,E,-683901,-1),E=C+w|0,K=k=I+_|0,P=I>>>0>k>>>0?E+1|0:E,w=S>>>5&2097151,k=fn(t,0,-997805,-1)+w|0,I=C,I=w>>>0>k>>>0?I+1|0:I,E=fn(n,0,654183,0),w=C+I|0,w=E>>>0>(k=E+k|0)>>>0?w+1|0:w,I=fn(r,0,470296,0),E=C+w|0,E=I>>>0>(k=I+k|0)>>>0?E+1|0:E,w=fn(o,0,666643,0),I=C+E|0,w=w>>>0>(S=k=w+k|0)>>>0?I+1|0:I,I=2097151&R,k=fn(t,0,654183,0)+I|0,E=C,E=I>>>0>k>>>0?E+1|0:E,B=(I=k)+(k=fn(n,0,470296,0))|0,I=C+E|0,I=B>>>0>>0?I+1|0:I,k=fn(r,0,666643,0),E=C+I|0,Q=B=k+B|0,B=E=B>>>0>>0?E+1|0:E,X=(I=Q)- -1048576|0,H=k=E-((I>>>0<4293918720)-1|0)|0,w=(I=k>>>21|0)+w|0,R=w=(E=(2097151&k)<<11|X>>>21)>>>0>(S=k=E+S|0)>>>0?w+1|0:w,G=(I=S)- -1048576|0,h=_- -1048576|0,N=N-((_>>>0<4293918720)-1|0)|0,E=(I=(w=J=w-((I>>>0<4293918720)-1|0)|0)>>21)+P|0,N=(E=(_=(2097151&w)<<11|G>>>21)>>>0>(J=_+K|0)>>>0?E+1|0:E)-(((I=-2097152&h)>>>0>(_=J)>>>0)+(k=N)|0)|0,oe=(I=_-I|0)-(E=-2097152&(g=I- -1048576|0))|0,ie=N-((I>>>0>>0)+(_=N-((I>>>0<4293918720)-1|0)|0)|0)|0,E=fn(u,Y,136657,0)+S|0,I=R+C|0,I=E>>>0>>0?I+1|0:I,$=(S=E)-(E=-2097152&G)|0,K=I-((E>>>0>S>>>0)+w|0)|0,N=O-(I=-2097152&D)|0,P=x-((I>>>0>O>>>0)+F|0)|0,I=2097151&((7&j)<<29|z>>>3),w=fn(s,0,136657,0)+I|0,E=C,E=I>>>0>w>>>0?E+1|0:E,S=(I=w)+(w=fn(a,0,-683901,-1))|0,I=C+E|0,O=S,S=w>>>0>S>>>0?I+1|0:I,I=fn(o,0,-683901,-1),E=C,w=I,E=(I=U>>>6&2097151)>>>0>(w=w+I|0)>>>0?E+1|0:E,R=(I=fn(s,0,-997805,-1))+w|0,w=C+E|0,w=I>>>0>R>>>0?w+1|0:w,E=fn(a,0,136657,0),I=C+w|0,G=E=(D=I=E>>>0>(R=E+R|0)>>>0?I+1|0:I)-(((I=R)>>>0<4293918720)-1|0)|0,I=(2097151&E)<<11|(z=I- -1048576|0)>>>21,E=(E>>21)+S|0,x=E=I>>>0>(O=I+O|0)>>>0?E+1|0:E,J=(I=O)- -1048576|0,F=E=E-((I>>>0<4293918720)-1|0)|0,I=(w=E>>21)+P|0,l=S=(E=(2097151&E)<<11|J>>>21)+N|0,q=I=E>>>0>S>>>0?I+1|0:I,E=fn(S,I,-683901,-1),I=C+K|0,ae=w=E+$|0,U=E>>>0>w>>>0?I+1|0:I,P=Q,I=2097151&((7&T)<<29|Z>>>3),w=fn(t,0,470296,0)+I|0,E=C,E=I>>>0>w>>>0?E+1|0:E,I=fn(n,0,666643,0),E=C+E|0,N=w=I+w|0,w=I>>>0>w>>>0?E+1|0:E,S=M>>>6&2097151,Q=fn(t,0,666643,0)+S|0,I=C,T=S=(M=I=S>>>0>Q>>>0?I+1|0:I)-(((I=Q)>>>0<4293918720)-1|0)|0,E=(E=S>>>21|0)+w|0,j=E=(I=(2097151&S)<<11|($=I- -1048576|0)>>>21)>>>0>(S=I+N|0)>>>0?E+1|0:E,Z=E-(((I=S)>>>0<4293918720)-1|0)|0,K=I- -1048576|0,d=O-(I=-2097152&J)|0,A=w=x-((I>>>0>O>>>0)+F|0)|0,I=((N=Z)>>>21|0)+B|0,I=(O=(2097151&N)<<11|K>>>21)>>>0>(P=O+P|0)>>>0?I+1|0:I,P=(B=fn(u,Y,-997805,-1))+((O=P)-(E=-2097152&X)|0)|0,E=C+(I-((8191&H)+(E>>>0>O>>>0)|0)|0)|0,E=B>>>0>P>>>0?E+1|0:E,I=fn(l,q,136657,0),E=C+E|0,E=I>>>0>(B=I+P|0)>>>0?E+1|0:E,w=fn(d,w,-683901,-1),I=C+E|0,x=I=w>>>0>(B=w+B|0)>>>0?I+1|0:I,J=(I=B)- -1048576|0,F=w=x-((I>>>0<4293918720)-1|0)|0,E=(I=w>>21)+U|0,P=E=(w=(2097151&w)<<11|J>>>21)>>>0>(O=w+ae|0)>>>0?E+1|0:E,H=(I=w=O)- -1048576|0,I=(I=(O=U=E-((I>>>0<4293918720)-1|0)|0)>>21)+ie|0,oe=U=(E=(2097151&O)<<11|H>>>21)+oe|0,U=E>>>0>U>>>0?I+1|0:I,ie=w-(I=-2097152&H)|0,ae=P-((I>>>0>w>>>0)+O|0)|0,Z=B-(I=-2097152&J)|0,X=x-((I>>>0>B>>>0)+F|0)|0,I=fn(u,Y,654183,0),w=C+(j-((8191&N)+((E=-2097152&K)>>>0>S>>>0)|0)|0)|0,w=I>>>0>(B=I+(S-E|0)|0)>>>0?w+1|0:w,E=fn(l,q,-997805,-1),I=C+w|0,I=E>>>0>(B=E+B|0)>>>0?I+1|0:I,w=fn(d,A,136657,0),E=C+I|0,J=B=w+B|0,O=w>>>0>B>>>0?E+1|0:E,H=R-(I=-2097152&z)|0,j=D-((I>>>0>R>>>0)+G|0)|0,E=2097151&((1&V)<<31|W>>>1),B=fn(r,0,-683901,-1)+E|0,I=C,I=E>>>0>B>>>0?I+1|0:I,E=fn(o,0,136657,0),I=C+I|0,I=E>>>0>(w=E+B|0)>>>0?I+1|0:I,B=(E=w)+(w=fn(s,0,654183,0))|0,E=C+I|0,E=w>>>0>B>>>0?E+1|0:E,I=fn(a,0,-997805,-1),E=C+E|0,R=w=I+B|0,B=I>>>0>w>>>0?E+1|0:E,I=fn(n,0,-683901,-1),w=C,E=I,w=(I=L>>>4&2097151)>>>0>(E=E+I|0)>>>0?w+1|0:w,S=(I=E)+(E=fn(r,0,136657,0))|0,I=C+w|0,I=E>>>0>S>>>0?I+1|0:I,w=fn(o,0,-997805,-1),E=C+I|0,E=w>>>0>(S=w+S|0)>>>0?E+1|0:E,w=fn(s,0,470296,0),I=C+E|0,I=w>>>0>(S=w+S|0)>>>0?I+1|0:I,w=fn(a,0,654183,0),E=C+I|0,x=E=w>>>0>(S=w+S|0)>>>0?E+1|0:E,G=(I=S)- -1048576|0,F=w=E-((I>>>0<4293918720)-1|0)|0,I=(I=w>>21)+B|0,B=w=(E=(2097151&w)<<11|G>>>21)+R|0,P=I=E>>>0>w>>>0?I+1|0:I,N=(I=w)- -1048576|0,R=w=P-((I>>>0<4293918720)-1|0)|0,E=(I=w>>21)+j|0,f=D=(w=(2097151&w)<<11|N>>>21)+H|0,L=E=w>>>0>D>>>0?E+1|0:E,I=fn(D,E,-683901,-1),w=C+O|0,j=E=I+J|0,O=I>>>0>E>>>0?w+1|0:w,W=B-(I=-2097152&N)|0,V=R=P-((I>>>0>B>>>0)+R|0)|0,w=(I=fn(u,Y,470296,0))+(Q-(E=-2097152&$)|0)|0,E=C+(M-((2047&T)+(E>>>0>Q>>>0)|0)|0)|0,E=I>>>0>w>>>0?E+1|0:E,I=fn(l,q,654183,0),E=C+E|0,E=I>>>0>(w=I+w|0)>>>0?E+1|0:E,B=(I=fn(d,A,-997805,-1))+w|0,w=C+E|0,w=I>>>0>B>>>0?w+1|0:w,E=fn(D,L,136657,0),I=C+w|0,I=E>>>0>(B=E+B|0)>>>0?I+1|0:I,w=fn(W,R,-683901,-1),E=C+I|0,P=E=w>>>0>(B=w+B|0)>>>0?E+1|0:E,T=(I=B)- -1048576|0,R=w=E-((I>>>0<4293918720)-1|0)|0,I=(I=w>>21)+O|0,O=I=(E=(2097151&w)<<11|T>>>21)>>>0>(w=E+j|0)>>>0?I+1|0:I,N=(I=w)- -1048576|0,E=(I=(Q=j=O-((I>>>0<4293918720)-1|0)|0)>>21)+X|0,Z=M=(j=(2097151&Q)<<11|N>>>21)+Z|0,j=M>>>0>>0?E+1|0:E,X=w-(I=-2097152&N)|0,z=O-((I>>>0>w>>>0)+Q|0)|0,J=B-(I=-2097152&T)|0,D=P-((I>>>0>B>>>0)+R|0)|0,E=2097151&((1&re)<<31|b>>>1),B=fn(u,Y,666643,0)+E|0,I=C,I=E>>>0>B>>>0?I+1|0:I,w=fn(l,q,470296,0),E=C+I|0,E=w>>>0>(B=w+B|0)>>>0?E+1|0:E,w=fn(d,A,654183,0),I=C+E|0,I=w>>>0>(B=w+B|0)>>>0?I+1|0:I,E=fn(f,L,-997805,-1),w=C+I|0,w=E>>>0>(B=E+B|0)>>>0?w+1|0:w,I=fn(W,V,136657,0),E=C+w|0,R=B=I+B|0,Q=I>>>0>B>>>0?E+1|0:E,O=S-(I=-2097152&G)|0,S=x-((I>>>0>S>>>0)+F|0)|0,I=fn(t,0,-683901,-1),E=C,w=I,E=(I=ee>>>7&2097151)>>>0>(w=w+I|0)>>>0?E+1|0:E,B=(I=fn(n,0,136657,0))+w|0,w=C+E|0,w=I>>>0>B>>>0?w+1|0:w,E=fn(r,0,-997805,-1),I=C+w|0,I=E>>>0>(B=E+B|0)>>>0?I+1|0:I,w=fn(o,0,654183,0),E=C+I|0,E=w>>>0>(B=w+B|0)>>>0?E+1|0:E,w=fn(s,0,666643,0),I=C+E|0,I=w>>>0>(B=w+B|0)>>>0?I+1|0:I,w=fn(a,0,470296,0),E=C+I|0,I=E=w>>>0>(B=w+B|0)>>>0?E+1|0:E,E=k>>21,B=(k=(2097151&k)<<11|h>>>21)+(w=B)|0,w=I+E|0,F=w=B>>>0>>0?w+1|0:w,x=(I=B)- -1048576|0,P=w=w-((I>>>0<4293918720)-1|0)|0,I=(E=w>>21)+S|0,Y=k=(w=(2097151&w)<<11|x>>>21)+O|0,H=I=w>>>0>k>>>0?I+1|0:I,I=fn(k,I,-683901,-1),E=C+Q|0,Q=w=I+R|0,k=I>>>0>w>>>0?E+1|0:E,I=fn(l,q,666643,0),w=C,E=I,w=(I=ne>>>4&2097151)>>>0>(E=E+I|0)>>>0?w+1|0:w,S=(I=E)+(E=fn(d,A,470296,0))|0,I=C+w|0,I=E>>>0>S>>>0?I+1|0:I,w=fn(f,L,654183,0),E=C+I|0,E=w>>>0>(S=w+S|0)>>>0?E+1|0:E,I=fn(W,V,-997805,-1),E=C+E|0,E=I>>>0>(w=I+S|0)>>>0?E+1|0:E,S=(I=w)+(w=fn(Y,H,136657,0))|0,I=C+E|0,R=I=w>>>0>S>>>0?I+1|0:I,M=(I=S)- -1048576|0,O=w=R-((I>>>0<4293918720)-1|0)|0,I=(E=w>>21)+k|0,w=I=(w=(2097151&w)<<11|M>>>21)>>>0>(k=Q=w+Q|0)>>>0?I+1|0:I,T=(I=k)- -1048576|0,I=(E=(Q=N=w-((I>>>0<4293918720)-1|0)|0)>>21)+D|0,$=G=(N=(2097151&Q)<<11|T>>>21)+J|0,N=N>>>0>G>>>0?I+1|0:I,I=B-(E=-2097152&x)|0,B=F-((E>>>0>B>>>0)+P|0)|0,P=I,I=(I=_>>21)+B|0,x=I=(E=(2097151&_)<<11|g>>>21)>>>0>(B=_=P+E|0)>>>0?I+1|0:I,G=(I=B)- -1048576|0,F=_=x-((I>>>0<4293918720)-1|0)|0,D=I=_>>21,I=fn(q=(2097151&_)<<11|G>>>21,I,-683901,-1),E=C+w|0,E=I>>>0>(_=I+k|0)>>>0?E+1|0:E,K=(w=_)-(I=-2097152&T)|0,J=E-((I>>>0>w>>>0)+Q|0)|0,E=fn(q,D,136657,0)+S|0,I=R+C|0,I=E>>>0>>0?I+1|0:I,ee=(w=E)-(E=-2097152&M)|0,M=I-((E>>>0>w>>>0)+O|0)|0,I=fn(d,A,666643,0),E=C,w=I,E=(I=te>>>7&2097151)>>>0>(w=w+I|0)>>>0?E+1|0:E,_=(I=fn(f,L,470296,0))+w|0,w=C+E|0,w=I>>>0>_>>>0?w+1|0:w,E=fn(W,V,654183,0),I=C+w|0,I=E>>>0>(_=E+_|0)>>>0?I+1|0:I,E=fn(Y,H,-997805,-1),I=C+I|0,O=w=E+_|0,w=E>>>0>w>>>0?I+1|0:I,I=2097151&((3&y)<<30|v>>>2),_=fn(f,L,666643,0)+I|0,E=C,E=I>>>0>_>>>0?E+1|0:E,I=fn(W,V,470296,0),E=C+E|0,E=I>>>0>(_=I+_|0)>>>0?E+1|0:E,k=(I=_)+(_=fn(Y,H,654183,0))|0,I=C+E|0,Q=I=_>>>0>k>>>0?I+1|0:I,T=(I=_=k)- -1048576|0,I=(E=(S=k=Q-((I>>>0<4293918720)-1|0)|0)>>21)+w|0,R=O=(k=(2097151&S)<<11|T>>>21)+O|0,w=I=k>>>0>O>>>0?I+1|0:I,O=(I=O)- -1048576|0,I=(E=(k=P=w-((I>>>0<4293918720)-1|0)|0)>>21)+M|0,te=L=(P=(2097151&k)<<11|O>>>21)+ee|0,P=P>>>0>L>>>0?I+1|0:I,I=fn(q,D,-997805,-1),w=C+w|0,w=I>>>0>(E=I+R|0)>>>0?w+1|0:w,ne=E-(I=-2097152&O)|0,re=w-((I>>>0>E>>>0)+k|0)|0,I=fn(q,D,654183,0)+_|0,E=Q+C|0,E=I>>>0<_>>>0?E+1|0:E,ee=(w=I)-(I=-2097152&T)|0,L=E-((I>>>0>w>>>0)+S|0)|0,I=fn(W,V,666643,0),w=C,E=I,w=(I=m>>>5&2097151)>>>0>(E=E+I|0)>>>0?w+1|0:w,_=(I=E)+(E=fn(Y,H,470296,0))|0,I=C+w|0,S=_,w=E>>>0>_>>>0?I+1|0:I,E=2097151&p,_=fn(Y,H,666643,0)+E|0,I=C,k=_,O=_=(R=I=E>>>0>_>>>0?I+1|0:I)-(((I=_)>>>0<4293918720)-1|0)|0,w=(E=_>>21)+w|0,Q=w=(I=(2097151&_)<<11|(M=I- -1048576|0)>>>21)>>>0>(_=I+S|0)>>>0?w+1|0:w,T=(I=_)- -1048576|0,S=w=w-((I>>>0<4293918720)-1|0)|0,I=(E=w>>21)+L|0,w=I=(w=(2097151&w)<<11|T>>>21)>>>0>(H=w+ee|0)>>>0?I+1|0:I,I=fn(q,D,470296,0)+_|0,E=Q+C|0,S=(E=I>>>0<_>>>0?E+1|0:E)-(((_=-2097152&T)>>>0>(Q=I)>>>0)+S|0)|0,Q=I=I-_|0,_=(E=fn(q,D,666643,0))+(k-(I=-2097152&M)|0)|0,I=C+(R-((I>>>0>k>>>0)+O|0)|0)|0,k=_,E=(E=(I=E>>>0>_>>>0?I+1|0:I)>>21)+S|0,V=_=Q+(I=(2097151&I)<<11|_>>>21)|0,w=(I=(E=I>>>0>_>>>0?E+1|0:E)>>21)+w|0,S=_=(E=(2097151&E)<<11|_>>>21)+H|0,E=(w=E>>>0>(I=_)>>>0?w+1|0:w)>>21,w=(2097151&w)<<11|I>>>21,I=E+re|0,O=_=w+ne|0,w=(I=w>>>0>(E=_)>>>0?I+1|0:I)>>21,I=(2097151&I)<<11|E>>>21,E=w+P|0,P=_=I+te|0,I=(I=(E=I>>>0>(w=_)>>>0?E+1|0:E)>>21)+J|0,H=w=(E=(2097151&E)<<11|w>>>21)+K|0,E=(E=(I=E>>>0>w>>>0?I+1|0:I)>>21)+N|0,D=w=(I=(2097151&I)<<11|w>>>21)+$|0,I=(E=I>>>0>w>>>0?E+1|0:E)>>21,E=(2097151&E)<<11|w>>>21,w=I+z|0,M=_=E+X|0,E=(w=E>>>0>(I=_)>>>0?w+1|0:w)>>21,w=(2097151&w)<<11|I>>>21,I=E+j|0,T=_=w+Z|0,w=(I=w>>>0>(E=_)>>>0?I+1|0:I)>>21,I=(2097151&I)<<11|E>>>21,E=w+ae|0,j=_=I+ie|0,I=(I=(E=I>>>0>(w=_)>>>0?E+1|0:E)>>21)+U|0,N=w=(E=(2097151&E)<<11|w>>>21)+oe|0,E=(I=E>>>0>w>>>0?I+1|0:I)>>21,_=(2097151&I)<<11|w>>>21,I=B-(w=-2097152&G)|0,w=(x-((w>>>0>B>>>0)+F|0)|0)+E|0,F=_=_+I|0,U=(2097151&(w=I>>>0>(E=_)>>>0?w+1|0:w))<<11|E>>>21,R=I=w>>21,E=2097151&k,w=fn(U,I,666643,0)+E|0,I=C,Q=w,_=I=E>>>0>w>>>0?I+1|0:I,i[0|e]=w,i[e+1|0]=(255&I)<<24|w>>>8,I=2097151&V,w=fn(U,R,470296,0)+I|0,E=C,E=I>>>0>w>>>0?E+1|0:E,k=w,B=(2097151&(w=_))<<11|Q>>>21,w=(I=w>>21)+E|0,w=B>>>0>(x=k+B|0)>>>0?w+1|0:w,B=x,i[e+4|0]=(2047&w)<<21|B>>>11,I=E=w,w=B,i[e+3|0]=(7&I)<<29|w>>>3,w=2097151&S,S=fn(U,R,654183,0)+w|0,I=C,I=w>>>0>S>>>0?I+1|0:I,w=S,S=(2097151&E)<<11|B>>>21,E=(E>>21)+I|0,E=S>>>0>(x=w+S|0)>>>0?E+1|0:E,S=x,I=E,i[e+6|0]=(63&I)<<26|S>>>6,k=0,w=31&((65535&_)<<16|Q>>>16),E=Q=2097151&B,i[e+2|0]=w|E<<5,w=2097151&O,B=fn(U,R,-997805,-1)+w|0,E=C,w=E=w>>>0>B>>>0?E+1|0:E,w=(E=I>>21)+w|0,O=B=(I=(2097151&I)<<11|S>>>21)+B|0,w=I>>>0>B>>>0?w+1|0:w,i[e+9|0]=(511&w)<<23|B>>>9,I=E=w,w=B,i[e+8|0]=(1&I)<<31|w>>>1,B=0,w=S&=2097151,i[e+5|0]=(524287&k)<<13|Q>>>19|w<<2,w=2097151&P,k=fn(U,R,136657,0)+w|0,I=C,I=(I=w>>>0>k>>>0?I+1|0:I)+(w=E>>21)|0,Q=k=(E=(2097151&E)<<11|O>>>21)+k|0,I=E>>>0>k>>>0?I+1|0:I,E=k,i[e+12|0]=(4095&I)<<20|E>>>12,w=I,i[e+11|0]=(15&I)<<28|E>>>4,k=0,E=P=2097151&O,i[e+7|0]=(16383&B)<<18|S>>>14|E<<7,I=2097151&H,B=fn(U,R,-683901,-1)+I|0,E=C,E=I>>>0>B>>>0?E+1|0:E,E=(I=w>>21)+E|0,S=B=(w=(2097151&w)<<11|Q>>>21)+B|0,I=E=w>>>0>B>>>0?E+1|0:E,i[e+14|0]=(127&I)<<25|B>>>7,B=0,w=O=2097151&Q,i[e+10|0]=(131071&k)<<15|P>>>17|w<<4,E=I>>21,w=(I=(2097151&I)<<11|S>>>21)>>>0>(Q=I+(2097151&D)|0)>>>0?E+1|0:E,i[e+17|0]=(1023&w)<<22|Q>>>10,I=w,w=Q,i[e+16|0]=(3&I)<<30|w>>>2,w=R=2097151&S,i[e+13|0]=(1048575&B)<<12|O>>>20|w<<1,w=(2097151&I)<<11|Q>>>21,I>>=21,I=w>>>0>(S=w+(2097151&M)|0)>>>0?I+1|0:I,E=S,i[e+20|0]=(8191&I)<<19|E>>>13,i[e+19|0]=(31&I)<<27|E>>>5,E=O=2097151&Q,i[e+15|0]=(32767&k)<<17|R>>>15|E<<6,_=(2097151&I)<<11|S>>>21,I=E=I>>21,_=I=_>>>0>(R=_+(2097151&T)|0)>>>0?I+1|0:I,i[e+21|0]=R,I=S,i[e+18|0]=(262143&B)<<14|O>>>18|I<<3,I=_,i[e+22|0]=(255&I)<<24|R>>>8,w=I,I>>=21,w=(S=(k=(2097151&w)<<11|R>>>21)+(2097151&j)|0)>>>0>>0?I+1|0:I,i[(E=e)+25|0]=(2047&w)<<21|S>>>11,I=w,w=S,i[E+24|0]=(7&I)<<29|w>>>3,w=E,k=(2097151&I)<<11|S>>>21,I>>=21,E=I=k>>>0>(B=Q=k+(2097151&N)|0)>>>0?I+1|0:I,i[w+27|0]=(63&I)<<26|B>>>6,k=0,I=Q=2097151&S,i[w+23|0]=31&((65535&_)<<16|R>>>16)|I<<5,E=(I=E)>>21,E=(I=(2097151&I)<<11|B>>>21)>>>0>(_=I+(2097151&F)|0)>>>0?E+1|0:E,w=_,i[e+31|0]=(131071&E)<<15|w>>>17,I=E,i[e+30|0]=(511&I)<<23|w>>>9,i[e+29|0]=(1&I)<<31|w>>>1,E=0,B&=2097151,i[e+26|0]=(524287&k)<<13|Q>>>19|B<<2,i[e+28|0]=(16383&E)<<18|B>>>14|w<<7}function _(e){var t,n=0,r=0,o=0,i=0,a=0,u=0,l=0,f=0,h=0,g=0,p=0,m=0,v=0;y=t=y-16|0;e:{t:{n:{r:{o:{i:{a:{s:{c:{d:{u:{l:{if((e|=0)>>>0<=244){if(3&(n=(a=s[8961])>>>(r=(f=e>>>0<11?16:e+11&-8)>>>3|0)|0)){e=(i=s[35892+(n=(o=r+(1&(-1^n))|0)<<3)>>2])+8|0,(0|(r=s[i+8>>2]))!=(0|(n=n+35884|0))?(s[r+12>>2]=n,s[n+8>>2]=r):(m=35844,v=Pt(-2,o)&a,s[m>>2]=v),n=o<<3,s[i+4>>2]=3|n,s[4+(n=n+i|0)>>2]=1|s[n+4>>2];break e}if((g=s[8963])>>>0>=f>>>0)break l;if(n){r=e=(n=(0-(e=(0-(e=2<>>12&16,r|=e=(n=n>>>e|0)>>>5&8,r|=e=(n=n>>>e|0)>>>2&4,u=s[35892+(e=(r=((r|=e=(n=n>>>e|0)>>>1&2)|(e=(n=n>>>e|0)>>>1&1))+(n>>>e|0)|0)<<3)>>2],(0|(n=s[u+8>>2]))!=(0|(e=e+35884|0))?(s[n+12>>2]=e,s[e+8>>2]=n):(a=Pt(-2,r)&a,s[8961]=a),e=u+8|0,s[u+4>>2]=3|f,i=(n=r<<3)-f|0,s[4+(o=u+f|0)>>2]=1|i,s[n+u>>2]=i,g&&(r=35884+((n=g>>>3|0)<<3)|0,u=s[8966],(n=1<>2]:(s[8961]=n|a,n=r),s[r+8>>2]=u,s[n+12>>2]=u,s[u+12>>2]=r,s[u+8>>2]=n),s[8966]=o,s[8963]=i;break e}if(!(l=s[8962]))break l;for(r=e=(n=(l&0-l)-1|0)>>>12&16,r|=e=(n=n>>>e|0)>>>5&8,r|=e=(n=n>>>e|0)>>>2&4,n=s[36148+(((r|=e=(n=n>>>e|0)>>>1&2)|(e=(n=n>>>e|0)>>>1&1))+(n>>>e|0)<<2)>>2],i=(-8&s[n+4>>2])-f|0,r=n;(e=s[r+16>>2])||(e=s[r+20>>2]);)i=(o=(r=(-8&s[e+4>>2])-f|0)>>>0>>0)?r:i,n=o?e:n,r=e;if((h=n+f|0)>>>0<=n>>>0)break u;if(p=s[n+24>>2],(0|(o=s[n+12>>2]))!=(0|n)){e=s[n+8>>2],s[e+12>>2]=o,s[o+8>>2]=e;break t}if(!(e=s[(r=n+20|0)>>2])){if(!(e=s[n+16>>2]))break d;r=n+16|0}for(;u=r,o=e,(e=s[(r=e+20|0)>>2])||(r=o+16|0,e=s[o+16>>2]););s[u>>2]=0;break t}if(f=-1,!(e>>>0>4294967231)&&(f=-8&(e=e+11|0),h=s[8962])){a=31,i=0-f|0,f>>>0<=16777215&&(e=e>>>8|0,e<<=u=e+1048320>>>16&8,a=28+((e=((e<<=r=e+520192>>>16&4)<<(n=e+245760>>>16&2)>>>15|0)-(n|r|u)|0)<<1|f>>>e+21&1)|0);A:{f:{if(r=s[36148+(a<<2)>>2])for(e=0,n=f<<(31==(0|a)?0:25-(a>>>1|0)|0);;){if(!((u=(-8&s[r+4>>2])-f|0)>>>0>=i>>>0||(o=r,i=u))){i=0,e=r;break f}if(u=s[r+20>>2],r=s[16+((n>>>29&4)+r|0)>>2],e=u?(0|u)==(0|r)?e:u:e,n<<=1,!r)break}else e=0;if(!(e|o)){if(!(e=(0-(e=2<>>12&16,r|=e=(n=n>>>e|0)>>>5&8,r|=e=(n=n>>>e|0)>>>2&4,e=s[36148+(((r|=e=(n=n>>>e|0)>>>1&2)|(e=(n=n>>>e|0)>>>1&1))+(n>>>e|0)<<2)>>2]}if(!e)break A}for(;i=(r=(n=(-8&s[e+4>>2])-f|0)>>>0>>0)?n:i,o=r?e:o,e=(n=s[e+16>>2])||s[e+20>>2];);}if(!(!o|s[8963]-f>>>0<=i>>>0)){if((l=o+f|0)>>>0<=o>>>0)break u;if(a=s[o+24>>2],(0|o)!=(0|(n=s[o+12>>2]))){e=s[o+8>>2],s[e+12>>2]=n,s[n+8>>2]=e;break n}if(!(e=s[(r=o+20|0)>>2])){if(!(e=s[o+16>>2]))break c;r=o+16|0}for(;u=r,n=e,(e=s[(r=e+20|0)>>2])||(r=n+16|0,e=s[n+16>>2]););s[u>>2]=0;break n}}}if((r=s[8963])>>>0>=f>>>0){o=s[8966],(n=r-f|0)>>>0>=16?(s[8963]=n,e=o+f|0,s[8966]=e,s[e+4>>2]=1|n,s[r+o>>2]=n,s[o+4>>2]=3|f):(s[8966]=0,s[8963]=0,s[o+4>>2]=3|r,s[4+(e=r+o|0)>>2]=1|s[e+4>>2]),e=o+8|0;break e}if((l=s[8964])>>>0>f>>>0){n=l-f|0,s[8964]=n,e=(r=s[8967])+f|0,s[8967]=e,s[e+4>>2]=1|n,s[r+4>>2]=3|f,e=r+8|0;break e}if(e=0,n=h=f+47|0,s[9079]?r=s[9081]:(s[9082]=-1,s[9083]=-1,s[9080]=4096,s[9081]=4096,s[9079]=t+12&-16^1431655768,s[9084]=0,s[9072]=0,r=4096),(r=(u=n+r|0)&(i=0-r|0))>>>0<=f>>>0)break e;if((o=s[9071])&&o>>>0<(a=(n=s[9069])+r|0)>>>0|n>>>0>=a>>>0)break e;if(4&c[36288])break i;l:{A:{if(o=s[8967])for(e=36292;;){if(o>>>0<(n=s[e>>2])+s[e+4>>2]>>>0&&n>>>0<=o>>>0)break A;if(!(e=s[e+8>>2]))break}if(-1==(0|(n=tt(0))))break a;if(a=r,(e=(o=s[9080])-1|0)&n&&(a=(r-n|0)+(e+n&0-o)|0),a>>>0<=f>>>0|a>>>0>2147483646)break a;if((o=s[9071])&&o>>>0<(i=(e=s[9069])+a|0)>>>0|e>>>0>=i>>>0)break a;if((0|n)!=(0|(e=tt(a))))break l;break o}if((a=i&u-l)>>>0>2147483646)break a;if((0|(n=tt(a)))==(s[e>>2]+s[e+4>>2]|0))break s;e=n}if(!(-1==(0|e)|f+48>>>0<=a>>>0)){if((n=(n=s[9081])+(h-a|0)&0-n)>>>0>2147483646){n=e;break o}if(-1!=(0|tt(n))){a=n+a|0,n=e;break o}tt(0-a|0);break a}if(n=e,-1!=(0|e))break o;break a}A()}o=0;break t}n=0;break n}if(-1!=(0|n))break o}s[9072]=4|s[9072]}if(r>>>0>2147483646)break r;if((n=tt(r))>>>0>=(e=tt(0))>>>0|-1==(0|n)|-1==(0|e))break r;if((a=e-n|0)>>>0<=f+40>>>0)break r}e=s[9069]+a|0,s[9069]=e,e>>>0>d[9070]&&(s[9070]=e);o:{i:{a:{if(u=s[8967]){for(e=36292;;){if(((o=s[e>>2])+(r=s[e+4>>2])|0)==(0|n))break a;if(!(e=s[e+8>>2]))break}break i}for((e=s[8965])>>>0<=n>>>0&&e||(s[8965]=n),e=0,s[9074]=a,s[9073]=n,s[8969]=-1,s[8970]=s[9079],s[9076]=0;r=35884+(o=e<<3)|0,s[o+35892>>2]=r,s[o+35896>>2]=r,32!=(0|(e=e+1|0)););r=(o=a-40|0)-(e=n+8&7?-8-n&7:0)|0,s[8964]=r,e=e+n|0,s[8967]=e,s[e+4>>2]=1|r,s[4+(n+o|0)>>2]=40,s[8968]=s[9083];break o}if(!(8&c[e+12|0]|n>>>0<=u>>>0|o>>>0>u>>>0)){s[e+4>>2]=r+a,r=(e=u+8&7?-8-u&7:0)+u|0,s[8967]=r,e=(n=s[8964]+a|0)-e|0,s[8964]=e,s[r+4>>2]=1|e,s[4+(n+u|0)>>2]=40,s[8968]=s[9083];break o}}(o=s[8965])>>>0>n>>>0&&(s[8965]=n,o=0),r=n+a|0,e=36292;i:{a:{s:{c:{d:{u:{for(;;){if((0|r)!=s[e>>2]){if(e=s[e+8>>2])continue;break u}break}if(!(8&c[e+12|0]))break d}for(e=36292;;){if((r=s[e>>2])>>>0<=u>>>0&&(i=r+s[e+4>>2]|0)>>>0>u>>>0)break c;e=s[e+8>>2]}}if(s[e>>2]=n,s[e+4>>2]=s[e+4>>2]+a,s[4+(h=(n+8&7?-8-n&7:0)+n|0)>>2]=3|f,r=((a=r+(r+8&7?-8-r&7:0)|0)-h|0)-f|0,l=f+h|0,(0|a)==(0|u)){s[8967]=l,e=s[8964]+r|0,s[8964]=e,s[l+4>>2]=1|e;break a}if(s[8966]==(0|a)){s[8966]=l,e=s[8963]+r|0,s[8963]=e,s[l+4>>2]=1|e,s[e+l>>2]=e;break a}if(1==(3&(e=s[a+4>>2]))){u=-8&e;d:if(e>>>0<=255){if(o=s[a+8>>2],e=e>>>3|0,(0|(n=s[a+12>>2]))==(0|o)){m=35844,v=s[8961]&Pt(-2,e),s[m>>2]=v;break d}s[o+12>>2]=n,s[n+8>>2]=o}else{if(f=s[a+24>>2],(0|a)==(0|(n=s[a+12>>2])))if((i=s[(e=a+20|0)>>2])||(i=s[(e=a+16|0)>>2])){for(;o=e,(i=s[(e=(n=i)+20|0)>>2])||(e=n+16|0,i=s[n+16>>2]););s[o>>2]=0}else n=0;else e=s[a+8>>2],s[e+12>>2]=n,s[n+8>>2]=e;if(f){o=s[a+28>>2];u:{if(s[(e=36148+(o<<2)|0)>>2]==(0|a)){if(s[e>>2]=n,n)break u;m=35848,v=s[8962]&Pt(-2,o),s[m>>2]=v;break d}if(s[f+(s[f+16>>2]==(0|a)?16:20)>>2]=n,!n)break d}s[n+24>>2]=f,(e=s[a+16>>2])&&(s[n+16>>2]=e,s[e+24>>2]=n),(e=s[a+20>>2])&&(s[n+20>>2]=e,s[e+24>>2]=n)}}a=a+u|0,r=r+u|0}if(s[a+4>>2]=-2&s[a+4>>2],s[l+4>>2]=1|r,s[r+l>>2]=r,r>>>0<=255){n=35884+((e=r>>>3|0)<<3)|0,(r=s[8961])&(e=1<>2]:(s[8961]=e|r,e=n),s[n+8>>2]=l,s[e+12>>2]=l,s[l+12>>2]=n,s[l+8>>2]=e;break a}if(e=31,r>>>0<=16777215&&(e=r>>>8|0,e<<=i=e+1048320>>>16&8,e=28+((e=((e<<=o=e+520192>>>16&4)<<(n=e+245760>>>16&2)>>>15|0)-(n|o|i)|0)<<1|r>>>e+21&1)|0),s[l+28>>2]=e,s[l+16>>2]=0,s[l+20>>2]=0,i=36148+(e<<2)|0,(o=s[8962])&(n=1<>>1|0)|0),n=s[i>>2];;){if(o=n,(-8&s[n+4>>2])==(0|r))break s;if(n=e>>>29|0,e<<=1,!(n=s[16+(i=o+(4&n)|0)>>2]))break}s[i+16>>2]=l,s[l+24>>2]=o}else s[8962]=n|o,s[i>>2]=l,s[l+24>>2]=i;s[l+12>>2]=l,s[l+8>>2]=l;break a}for(r=(o=a-40|0)-(e=n+8&7?-8-n&7:0)|0,s[8964]=r,e=e+n|0,s[8967]=e,s[e+4>>2]=1|r,s[4+(n+o|0)>>2]=40,s[8968]=s[9083],s[(r=(e=(i+(i-39&7?39-i&7:0)|0)-47|0)>>>0>>0?u:e)+4>>2]=27,e=s[9076],s[r+16>>2]=s[9075],s[r+20>>2]=e,e=s[9074],s[r+8>>2]=s[9073],s[r+12>>2]=e,s[9075]=r+8,s[9074]=a,s[9073]=n,s[9076]=0,e=r+24|0;s[e+4>>2]=7,n=e+8|0,e=e+4|0,n>>>0>>0;);if((0|r)==(0|u))break o;if(s[r+4>>2]=-2&s[r+4>>2],i=r-u|0,s[u+4>>2]=1|i,s[r>>2]=i,i>>>0<=255){n=35884+((e=i>>>3|0)<<3)|0,(r=s[8961])&(e=1<>2]:(s[8961]=e|r,e=n),s[n+8>>2]=u,s[e+12>>2]=u,s[u+12>>2]=n,s[u+8>>2]=e;break o}if(e=31,s[u+16>>2]=0,s[u+20>>2]=0,i>>>0<=16777215&&(e=i>>>8|0,e<<=o=e+1048320>>>16&8,e=28+((e=((e<<=r=e+520192>>>16&4)<<(n=e+245760>>>16&2)>>>15|0)-(n|r|o)|0)<<1|i>>>e+21&1)|0),s[u+28>>2]=e,o=36148+(e<<2)|0,(r=s[8962])&(n=1<>>1|0)|0),n=s[o>>2];;){if(r=n,(0|i)==(-8&s[n+4>>2]))break i;if(n=e>>>29|0,e<<=1,!(n=s[16+(o=r+(4&n)|0)>>2]))break}s[o+16>>2]=u,s[u+24>>2]=r}else s[8962]=n|r,s[o>>2]=u,s[u+24>>2]=o;s[u+12>>2]=u,s[u+8>>2]=u;break o}e=s[o+8>>2],s[e+12>>2]=l,s[o+8>>2]=l,s[l+24>>2]=0,s[l+12>>2]=o,s[l+8>>2]=e}e=h+8|0;break e}e=s[r+8>>2],s[e+12>>2]=u,s[r+8>>2]=u,s[u+24>>2]=0,s[u+12>>2]=r,s[u+8>>2]=e}if(!((e=s[8964])>>>0<=f>>>0)){n=e-f|0,s[8964]=n,e=(r=s[8967])+f|0,s[8967]=e,s[e+4>>2]=1|n,s[r+4>>2]=3|f,e=r+8|0;break e}}s[8960]=48,e=0;break e}n:if(a){r=s[o+28>>2];r:{if(s[(e=36148+(r<<2)|0)>>2]==(0|o)){if(s[e>>2]=n,n)break r;h=Pt(-2,r)&h,s[8962]=h;break n}if(s[a+(s[a+16>>2]==(0|o)?16:20)>>2]=n,!n)break n}s[n+24>>2]=a,(e=s[o+16>>2])&&(s[n+16>>2]=e,s[e+24>>2]=n),(e=s[o+20>>2])&&(s[n+20>>2]=e,s[e+24>>2]=n)}n:if(i>>>0<=15)e=i+f|0,s[o+4>>2]=3|e,s[4+(e=e+o|0)>>2]=1|s[e+4>>2];else if(s[o+4>>2]=3|f,s[l+4>>2]=1|i,s[i+l>>2]=i,i>>>0<=255)n=35884+((e=i>>>3|0)<<3)|0,(r=s[8961])&(e=1<>2]:(s[8961]=e|r,e=n),s[n+8>>2]=l,s[e+12>>2]=l,s[l+12>>2]=n,s[l+8>>2]=e;else{e=31,i>>>0<=16777215&&(e=i>>>8|0,e<<=u=e+1048320>>>16&8,e=28+((e=((e<<=r=e+520192>>>16&4)<<(n=e+245760>>>16&2)>>>15|0)-(n|r|u)|0)<<1|i>>>e+21&1)|0),s[l+28>>2]=e,s[l+16>>2]=0,s[l+20>>2]=0,r=36148+(e<<2)|0;r:{if((n=1<>>1|0)|0),f=s[r>>2];;){if((-8&s[(n=f)+4>>2])==(0|i))break r;if(r=e>>>29|0,e<<=1,!(f=s[16+(r=n+(4&r)|0)>>2]))break}s[r+16>>2]=l,s[l+24>>2]=n}else s[8962]=n|h,s[r>>2]=l,s[l+24>>2]=r;s[l+12>>2]=l,s[l+8>>2]=l;break n}e=s[n+8>>2],s[e+12>>2]=l,s[n+8>>2]=l,s[l+24>>2]=0,s[l+12>>2]=n,s[l+8>>2]=e}e=o+8|0;break e}t:if(p){r=s[n+28>>2];n:{if(s[(e=36148+(r<<2)|0)>>2]==(0|n)){if(s[e>>2]=o,o)break n;m=35848,v=Pt(-2,r)&l,s[m>>2]=v;break t}if(s[(s[p+16>>2]==(0|n)?16:20)+p>>2]=o,!o)break t}s[o+24>>2]=p,(e=s[n+16>>2])&&(s[o+16>>2]=e,s[e+24>>2]=o),(e=s[n+20>>2])&&(s[o+20>>2]=e,s[e+24>>2]=o)}i>>>0<=15?(e=i+f|0,s[n+4>>2]=3|e,s[4+(e=e+n|0)>>2]=1|s[e+4>>2]):(s[n+4>>2]=3|f,s[h+4>>2]=1|i,s[i+h>>2]=i,g&&(r=35884+((e=g>>>3|0)<<3)|0,o=s[8966],(e=1<>2]:(s[8961]=e|a,e=r),s[r+8>>2]=o,s[e+12>>2]=o,s[o+12>>2]=r,s[o+8>>2]=e),s[8966]=h,s[8963]=i),e=n+8|0}return y=t+16|0,0|e}function S(e,t,n){var r,o,i,a,c,d,l,A,f,h,g,p,m,v,y,b,I,E,w,B,_,S,k,O,Q,R,P,N,x,D,M,T,U,H,j,J,F,G,L,q,Y,V,W,K,Z,z,X,$,ee,te,ne,re,oe,ie,ae=0,se=0,ce=0,de=0,ue=0,le=0,Ae=0,fe=0,he=0,ge=0,pe=0,me=0,ve=0,ye=0,be=0,Ie=0,Ce=0,Ee=0,we=0,Be=0,_e=0,Se=0,ke=0,Oe=0,Qe=0;Ae=e,r=ae=ke=s[n+4>>2],f=ae>>31,J=ae=(be=s[t+20>>2])<<1,ae=fn(r,f,ae,k=ae>>31),ce=C,se=ae,o=ae=s[n>>2],i=ae>>31,h=ae=s[t+24>>2],ue=fn(o,i,ae,a=ae>>31),ae=C+ce|0,ae=(se=se+ue|0)>>>0>>0?ae+1|0:ae,ce=se,F=se=le=s[n+8>>2],I=se>>31,g=se=s[t+16>>2],se=ce+(ue=fn(le,I,se,c=se>>31))|0,ce=C+ae|0,ce=se>>>0>>0?ce+1|0:ce,G=ae=Ce=s[n+12>>2],E=ae>>31,L=ae=(me=s[t+12>>2])<<1,ae=(ue=fn(Ce,E,ae,O=ae>>31))+se|0,se=C+ce|0,se=ae>>>0>>0?se+1|0:se,ce=ae,z=ae=Ie=s[n+16>>2],_=ae>>31,p=ae=s[t+8>>2],ue=fn(Ie,_,ae,d=ae>>31),ae=C+se|0,ae=(ce=ce+ue|0)>>>0>>0?ae+1|0:ae,de=ce,X=se=ge=s[n+20>>2],Q=se>>31,q=se=(he=s[t+4>>2])<<1,ce=fn(ge,Q,se,R=se>>31),ae=C+ae|0,ae=(se=de+ce|0)>>>0>>0?ae+1|0:ae,ce=se,$=se=pe=s[n+24>>2],Y=se>>31,m=se=s[t>>2],ue=fn(pe,Y,se,l=se>>31),se=C+ae|0,se=(ce=ce+ue|0)>>>0>>0?se+1|0:se,Ee=s[n+28>>2],w=ae=u(Ee,19),B=ae>>31,V=ae=(ve=s[t+36>>2])<<1,ae=(ue=fn(w,B,ae,P=ae>>31))+ce|0,ce=C+se|0,ce=ae>>>0>>0?ce+1|0:ce,se=ae,ye=s[n+32>>2],we=ae=u(ye,19),Be=ae>>31,v=ae=s[t+32>>2],ue=fn(we,Be,ae,A=ae>>31),ae=C+ce|0,ae=(se=se+ue|0)>>>0>>0?ae+1|0:ae,ce=se,ee=s[n+36>>2],y=n=u(ee,19),b=n>>31,W=n=(t=s[t+28>>2])<<1,se=fn(y,b,n,N=n>>31),ae=C+ae|0,fe=n=ce+se|0,n=n>>>0>>0?ae+1|0:ae,ae=fn(g,c,r,f),se=C,be=fn(o,i,ue=be,x=ue>>31),ce=C+se|0,ce=(ae=be+ae|0)>>>0>>0?ce+1|0:ce,be=me,me=fn(le,I,me,D=me>>31),se=C+ce|0,se=(ae=me+ae|0)>>>0>>0?se+1|0:se,ce=(me=fn(p,d,Ce,E))+ae|0,ae=C+se|0,ae=ce>>>0>>0?ae+1|0:ae,se=ce,me=he,ce=fn(Ie,_,he,M=he>>31),ae=C+ae|0,ae=(se=se+ce|0)>>>0>>0?ae+1|0:ae,ce=fn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=le+ce|0)>>>0>>0?ae+1|0:ae,se=(le=fn(g,c,w,B))+ce|0,ce=C+ae|0,ce=se>>>0>>0?ce+1|0:ce,le=fn(we,Be,be,D),ae=C+ce|0,ae=(se=le+se|0)>>>0>>0?ae+1|0:ae,ce=fn(y,b,p,d),ae=C+ae|0,Qe=se=ce+se|0,le=se>>>0>>0?ae+1|0:ae,ae=fn(ae=u(r,19),ae>>31,V,P),se=C,ce=fn(o,i,m,l),se=C+se|0,se=(ae=ce+ae|0)>>>0>>0?se+1|0:se,ce=(ke=fn(v,A,Ie,_e))+ae|0,ae=C+se|0,se=(Ae=fn(Ae,Ce,W,N))+ce|0,ce=C+(ce>>>0>>0?ae+1|0:ae)|0,ce=se>>>0>>0?ce+1|0:ce,Ae=fn(h,a,te,Z),ae=C+ce|0,ae=(se=Ae+se|0)>>>0>>0?ae+1|0:ae,ce=fn(J,k,K,j),ae=C+ae|0,ae=(se=ce+se|0)>>>0>>0?ae+1|0:ae,ce=(Ae=fn(g,c,T,S))+se|0,se=C+ae|0,se=ce>>>0>>0?se+1|0:se,Ae=fn(w,B,L,O),ae=C+se|0,ae=(ce=Ae+ce|0)>>>0>>0?ae+1|0:ae,se=(Ae=fn(we,Be,p,d))+ce|0,ce=C+ae|0,ce=se>>>0>>0?ce+1|0:ce,Ae=fn(y,b,q,R),ae=C+ce|0,ae=(se=Ae+se|0)>>>0>>0?ae+1|0:ae,Ae=se,ke=ae,Ce=se=se+33554432|0,Ie=ae=se>>>0<33554432?ae+1|0:ae,_e=(67108863&ae)<<6|se>>>26,se=(ce=ae>>26)+le|0,le=ae=_e+Qe|0,ce=de,ae=ae>>>0<_e>>>0?se+1|0:se,ie=se=le+16777216|0,de=(33554431&(ae=se>>>0<16777216?ae+1|0:ae))<<7|se>>>25,ae=(ae>>25)+n|0,ae=(se=ce+de|0)>>>0>>0?ae+1|0:ae,_e=n=se+33554432|0,n=ae=n>>>0<33554432?ae+1|0:ae,ae=-67108864&_e,s[fe+8>>2]=se-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>>0>>0?ce+1|0:ce,ae=(de=fn(h,a,w,B))+se|0,se=C+ce|0,se=ae>>>0>>0?se+1|0:se,ce=(de=fn(we,Be,ue,x))+ae|0,ae=C+se|0,ae=ce>>>0>>0?ae+1|0:ae,se=ce,ce=fn(y,b,g,c),ae=C+ae|0,de=se=se+ce|0,ae=(ae=se>>>0>>0?ae+1|0:ae)+(se=n>>26)|0,ae=(n=de+(ce=(67108863&n)<<6|_e>>>26)|0)>>>0>>0?ae+1|0:ae,we=n=(se=n)+16777216|0,n=ce=n>>>0<16777216?ae+1|0:ae,ae=-33554432&we,s[Ee+12>>2]=se-ae,ae=fn(r,f,W,N),ce=C,se=(de=fn(o,i,v,A))+ae|0,ae=C+ce|0,ae=se>>>0>>0?ae+1|0:ae,ce=fn(h,a,F,I),ae=C+ae|0,ae=(se=ce+se|0)>>>0>>0?ae+1|0:ae,de=fn(G,E,J,k),ce=C+ae|0,ce=(se=de+se|0)>>>0>>0?ce+1|0:ce,ae=(de=fn(g,c,z,_))+se|0,se=C+ce|0,se=ae>>>0>>0?se+1|0:se,ce=(de=fn(L,O,X,Q))+ae|0,ae=C+se|0,ae=ce>>>0>>0?ae+1|0:ae,se=ce,ce=fn(p,d,$,Y),ae=C+ae|0,ae=(se=se+ce|0)>>>0>>0?ae+1|0:ae,ce=fn(fe,Qe,q,R),ae=C+ae|0,ae=(se=ce+se|0)>>>0>>0?ae+1|0:ae,ye=fn(m,l,de=ye,Be=de>>31),ce=C+ae|0,ce=(se=ye+se|0)>>>0>>0?ce+1|0:ce,ae=(ye=fn(y,b,V,P))+se|0,se=C+ce|0,se=ae>>>0>>0?se+1|0:se,ye=ae,ae=(ae=t>>25)+se|0,ae=(t=ye+(ce=(33554431&t)<<7|Oe>>>25)|0)>>>0>>0?ae+1|0:ae,ye=t=(se=t)+33554432|0,t=ae=t>>>0<33554432?ae+1|0:ae,ae=-67108864&ye,s[Ee+32>>2]=se-ae,ce=se=ge-(ae=-67108864&pe)|0,ae=(ae=ne-((ae>>>0>ge>>>0)+re|0)|0)+(se=n>>25)|0,ae=(n=ce+(ge=(33554431&n)<<7|we>>>25)|0)>>>0>>0?ae+1|0:ae,(se=n+33554432|0)>>>0<33554432&&(ae=ae+1|0),ae=(Se-(-33554432&oe)|0)+((67108863&ae)<<6|se>>>26)|0,s[e+20>>2]=ae,ae=-67108864&se,s[e+16>>2]=n-ae,ae=fn(v,A,r,f),ce=C,se=(he=fn(o,i,he,U))+ae|0,ae=C+ce|0,ae=se>>>0>>0?ae+1|0:ae,ce=(he=fn(F,I,ve,H))+se|0,se=C+ae|0,se=ce>>>0>>0?se+1|0:se,ae=(he=fn(h,a,G,E))+ce|0,ce=C+se|0,se=(ue=fn(z,_,ue,x))+ae|0,ae=C+(ae>>>0>>0?ce+1|0:ce)|0,ae=se>>>0>>0?ae+1|0:ae,ce=fn(g,c,X,Q),ae=C+ae|0,ae=(se=ce+se|0)>>>0>>0?ae+1|0:ae,ce=fn(be,D,$,Y),ae=C+ae|0,ae=(se=ce+se|0)>>>0>>0?ae+1|0:ae,ce=(ue=fn(p,d,fe,Qe))+se|0,se=C+ae|0,se=ce>>>0>>0?se+1|0:se,ae=(ue=fn(de,Be,me,M))+ce|0,ce=C+se|0,ce=ae>>>0>>0?ce+1|0:ce,se=(ue=fn(m,l,ee,ee>>31))+ae|0,ae=C+ce|0,n=se,ae=(ae=se>>>0>>0?ae+1|0:ae)+(se=t>>26)|0,ae=(t=n+(ce=(67108863&t)<<6|ye>>>26)|0)>>>0>>0?ae+1|0:ae,ae=(t=(n=t)+16777216|0)>>>0<16777216?ae+1|0:ae,t=-33554432&(se=t),s[e+36>>2]=n-t,ce=le-(-33554432&ie)|0,ue=Ae-(t=-67108864&Ce)|0,be=ke-((t>>>0>Ae>>>0)+Ie|0)|0,ae=fn((33554431&(t=ae))<<7|se>>>25,ae>>=25,19,0),se=C+be|0,ae=se=(t=ae+ue|0)>>>0>>0?se+1|0:se,n=((67108863&(ae=(n=t+33554432|0)>>>0<33554432?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F=C+G|0,G=t=L+t|0,F=(t=t>>>0>>0?F+1|0:F)+(F=q>>26)|0,F=(G=(q=(67108863&q)<<6|ee>>>26)+G|0)>>>0>>0?F+1|0:F,q=G,t=F,t=(F=G+16777216|0)>>>0<16777216?t+1|0:t,G=-33554432&F,s[Y+36>>2]=q-G,L=fn((33554431&t)<<7|F>>>25,t>>25,19,0),F=C+(te-(((G=-67108864&re)>>>0>X>>>0)+J|0)|0)|0,G=t=L+(X-G|0)|0,t=t>>>0>>0?F+1|0:F,t=(V-(-33554432&ne)|0)+((67108863&(t=(F=G+33554432|0)>>>0<33554432?t+1|0:t))<<6|F>>>26)|0,s[Y+4>>2]=t,e=-67108864&F,s[Y>>2]=G-e}function O(e,t,n){var r,o=0,i=0,a=0,c=0,d=0,u=0,l=0,A=0,f=0,h=0,g=0,p=0,m=0,v=0,b=0,I=0,E=0,w=0,B=0,_=0,S=0,k=0,O=0,Q=0,R=0,P=0,N=0,x=0,D=0,M=0,T=0,U=0,H=0,j=0,J=0,F=0,G=0,L=0,q=0,Y=0,V=0,W=0,K=0,Z=0,z=0,X=0,$=0,ee=0,te=0,ne=0,re=0,oe=0,ie=0;for(y=r=y-2048|0,Qn(r+1024|0,t),ot(r+1024|0,e),Qn(r,r+1024|0),ot(r,n),t=0;c=s[(o=h=(r+1024|0)+(64|(e=w<<7))|0)>>2],A=s[(a=f=(r+1024|0)+(96|e)|0)>>2],a=s[a+4>>2],d=c,v=s[o+4>>2],l=A,o=e+(r+1024|0)|0,u=s[(c=(r+1024|0)+(32|e)|0)>>2],A=s[c+4>>2],l=Cn(l^(E=ut(s[o>>2],s[o+4>>2],u,A)),(i=a)^(a=C),32),A=Cn(d=(m=ut(d,v,l,i=C))^u,A^(u=C),24),U=Cn((R=ut(E,d=a,A,a=C))^l,(p=C)^i,16),a=Cn(A^(H=ut(m,u,U,x=C)),(D=C)^a,63),A=C,l=s[(u=(r+1024|0)+(104|e)|0)>>2],m=s[u+4>>2],k=s[(i=E=(r+1024|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=C),24),v=w,m=Cn((l=ut(c,h,o,w=C))^a,(i=C)^A,16),w=Cn(o^(N=ut(u,v,m,d=C)),(_=C)^w,63),h=C,o=s[e+780>>2],I=s[e+520>>2],p=s[e+524>>2],u=Cn((B=s[e+776>>2])^(A=ut(v=s[(c=f=(r+1024|0)+(8|f)|0)>>2],A=s[c+4>>2],c=s[e+264>>2],a=s[e+268>>2])),(v=o)^(o=C),32),a=Cn(v=(B=ut(I,p,u,E=C))^c,a^(c=C),24),p=B,I=Cn((B=ut(A,v=o,a,o=C))^u,(v=C)^E,16),o=Cn(a^(O=ut(p,c,I,Q=C)),(T=C)^o,63),c=C,a=s[e+900>>2],b=s[e+640>>2],R=s[e+644>>2],g=s[e+896>>2],A=s[e+384>>2],u=s[e+388>>2],k=Cn(g^(E=ut(s[e+128>>2],s[e+132>>2],A,u)),(p=a)^(a=C),32),u=Cn(p=(g=ut(b,R,k,S=C))^A,u^(A=C),24),b=g,g=Cn((g=k)^(k=ut(E,p=a,u,a=C)),(p=S)^(S=C),16),a=Cn(u^(p=ut(b,A,g,R=C)),(U=C)^a,63),A=C,u=s[e+908>>2],L=s[e+648>>2],K=s[e+652>>2],P=s[e+904>>2],E=s[e+392>>2],x=s[e+396>>2],D=Cn(P^(H=ut(s[e+136>>2],s[e+140>>2],E,x)),(b=u)^(u=C),32),P=x=Cn(b=(j=ut(L,K,D,M=C))^E,x^(E=C),24),D=Cn((x=ut(H,b=u,x,u=C))^D,(H=C)^M,16),u=Cn(P^(j=ut(j,E,D,M=C)),(Y=C)^u,63),E=C,P=p,b=U,p=Cn(D^(l=ut(l,i,o,c)),M^(i=C),32),o=Cn((D=ut(P,b,p,U=C))^o,(M=C)^c,24),c=ut(c=l,i,o,l=C),i=C,s[e>>2]=c,s[e+4>>2]=i,c=Cn(c^p,U^i,16),i=C,s[e+904>>2]=c,s[e+908>>2]=i,c=ut(D,M,c,i),i=C,s[e+640>>2]=c,s[e+644>>2]=i,oe=e,ie=Cn(o^c,l^i,63),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,o=Cn(te^(h=ut(J,W,a,A)),ne^(f=C),32),e=Cn(i^(u=ut(z,X,o,a=C)),(e=A)^(A=C),24),h=ut(h,i=f,e,f=C),i=l=C,s[k>>2]=h,s[k+4>>2]=i,h=Cn(o^h,a^i,16),o=C,s[N>>2]=h,s[N+4>>2]=o,h=ut(u,A,h,o),s[E>>2]=h,o=C,s[E+4>>2]=o,oe=c,ie=Cn(e^h,o^f,63),s[oe>>2]=ie,s[c+4>>2]=C,8!=(0|(w=w+1|0)););for(;w=s[768+(e=(f=t<<4)+(r+1024|0)|0)>>2],h=s[e+772>>2],d=s[(o=e+512|0)>>2],l=s[o+4>>2],i=w,w=s[e+256>>2],o=s[e+260>>2],a=Cn(i^(c=ut(s[e>>2],s[e+4>>2],w,o)),(a=h)^(h=C),32),o=Cn(i=(u=ut(d,l,a,A=C))^w,o^(w=C),24),v=w,m=Cn((l=ut(c,h,o,w=C))^a,(i=C)^A,16),w=Cn(o^(N=ut(u,v,m,d=C)),(_=C)^w,63),h=C,o=s[e+780>>2],I=s[e+520>>2],p=s[e+524>>2],u=Cn((B=s[e+776>>2])^(A=ut(v=s[(c=f=(r+1024|0)+(8|f)|0)>>2],A=s[c+4>>2],c=s[e+264>>2],a=s[e+268>>2])),(v=o)^(o=C),32),a=Cn(v=(B=ut(I,p,u,E=C))^c,a^(c=C),24),p=B,I=Cn((B=ut(A,v=o,a,o=C))^u,(v=C)^E,16),o=Cn(a^(O=ut(p,c,I,Q=C)),(T=C)^o,63),c=C,a=s[e+900>>2],b=s[e+640>>2],R=s[e+644>>2],g=s[e+896>>2],A=s[e+384>>2],u=s[e+388>>2],k=Cn(g^(E=ut(s[e+128>>2],s[e+132>>2],A,u)),(p=a)^(a=C),32),u=Cn(p=(g=ut(b,R,k,S=C))^A,u^(A=C),24),b=g,g=Cn((g=k)^(k=ut(E,p=a,u,a=C)),(p=S)^(S=C),16),a=Cn(u^(p=ut(b,A,g,R=C)),(U=C)^a,63),A=C,u=s[e+908>>2],L=s[e+648>>2],K=s[e+652>>2],P=s[e+904>>2],E=s[e+392>>2],x=s[e+396>>2],D=Cn(P^(H=ut(s[e+136>>2],s[e+140>>2],E,x)),(b=u)^(u=C),32),P=x=Cn(b=(j=ut(L,K,D,M=C))^E,x^(E=C),24),D=Cn((x=ut(H,b=u,x,u=C))^D,(H=C)^M,16),u=Cn(P^(j=ut(j,E,D,M=C)),(Y=C)^u,63),E=C,P=p,b=U,p=Cn(D^(l=ut(l,i,o,c)),M^(i=C),32),o=Cn((D=ut(P,b,p,U=C))^o,(M=C)^c,24),c=ut(c=l,i,o,l=C),i=C,s[e>>2]=c,s[e+4>>2]=i,c=Cn(c^p,U^i,16),i=C,s[e+904>>2]=c,s[e+908>>2]=i,c=ut(D,M,c,i),i=C,s[e+640>>2]=c,s[e+644>>2]=i,oe=e,ie=Cn(o^c,l^i,63),s[oe+264>>2]=ie,s[e+268>>2]=C,p=a,c=ut(B,v,a,A),m=ut(j,Y,l=Cn(m^c,d^(a=C),32),i=C),c=ut(c,d=a,o=Cn(p^m,(o=A)^(A=C),24),a=C),d=C,s[f>>2]=c,s[f+4>>2]=d,f=Cn(c^l,i^d,16),c=C,s[e+768>>2]=f,s[e+772>>2]=c,f=ut(m,A,f,c),s[e+648>>2]=f,c=C,s[e+652>>2]=c,oe=e,ie=Cn(o^f,c^a,63),s[oe+384>>2]=ie,s[e+388>>2]=C,l=u,a=Cn(I^(o=ut(k,S,u,E)),Q^(c=C),32),f=Cn(l^(u=ut(N,_,a,A=C)),(i=E)^(E=C),24),o=ut(o,i=c,f,c=C),i=l=C,s[e+128>>2]=o,s[e+132>>2]=i,o=Cn(o^a,i^A,16),a=C,s[e+776>>2]=o,s[e+780>>2]=a,o=ut(u,E,o,a),s[e+512>>2]=o,a=C,s[e+516>>2]=a,oe=e,ie=Cn(o^f,c^a,63),s[oe+392>>2]=ie,s[e+396>>2]=C,f=ut(x,H,w,h),A=ut(O,T,c=Cn(g^f,R^(o=C),32),a=C),h=ut(i=f,o,w=Cn(A^w,(u=C)^h,24),f=C),o=C,s[e+136>>2]=h,s[e+140>>2]=o,h=Cn(c^h,a^o,16),o=C,s[e+896>>2]=h,s[e+900>>2]=o,h=ut(A,u,h,o),s[e+520>>2]=h,o=C,s[e+524>>2]=o,oe=e,ie=Cn(h^w,o^f,63),s[oe+256>>2]=ie,s[e+260>>2]=C,8!=(0|(t=t+1|0)););Qn(n,r),ot(n,r+1024|0),y=r+2048|0}function R(e){var t=0,n=0,r=0,o=0,i=0,a=0,c=0,u=0,l=0;e:if(e|=0){i=(r=e-8|0)+(e=-8&(t=s[e-4>>2]))|0;t:if(!(1&t)){if(!(3&t))break e;if((r=r-(t=s[r>>2])|0)>>>0>2])))return s[8963]=e,s[i+4>>2]=-2&t,s[r+4>>2]=1|e,void(s[e+r>>2]=e)}else{if(t>>>0<=255){if(o=s[r+8>>2],t=t>>>3|0,(0|(n=s[r+12>>2]))==(0|o)){u=35844,l=s[8961]&Pt(-2,t),s[u>>2]=l;break t}s[o+12>>2]=n,s[n+8>>2]=o;break t}if(c=s[r+24>>2],(0|r)==(0|(t=s[r+12>>2])))if((n=s[(o=r+20|0)>>2])||(n=s[(o=r+16|0)>>2])){for(;a=o,(n=s[(o=(t=n)+20|0)>>2])||(o=t+16|0,n=s[t+16>>2]););s[a>>2]=0}else t=0;else n=s[r+8>>2],s[n+12>>2]=t,s[t+8>>2]=n;if(!c)break t;o=s[r+28>>2];n:{if(s[(n=36148+(o<<2)|0)>>2]==(0|r)){if(s[n>>2]=t,t)break n;u=35848,l=s[8962]&Pt(-2,o),s[u>>2]=l;break t}if(s[c+(s[c+16>>2]==(0|r)?16:20)>>2]=t,!t)break t}if(s[t+24>>2]=c,(n=s[r+16>>2])&&(s[t+16>>2]=n,s[n+24>>2]=t),!(n=s[r+20>>2]))break t;s[t+20>>2]=n,s[n+24>>2]=t}}if(!(r>>>0>=i>>>0)&&1&(t=s[i+4>>2])){t:{if(!(2&t)){if(s[8967]==(0|i)){if(s[8967]=r,e=s[8964]+e|0,s[8964]=e,s[r+4>>2]=1|e,s[8966]!=(0|r))break e;return s[8963]=0,void(s[8966]=0)}if(s[8966]==(0|i))return s[8966]=r,e=s[8963]+e|0,s[8963]=e,s[r+4>>2]=1|e,void(s[e+r>>2]=e);e=(-8&t)+e|0;n:if(t>>>0<=255){if(t=t>>>3|0,(0|(n=s[i+8>>2]))==(0|(o=s[i+12>>2]))){u=35844,l=s[8961]&Pt(-2,t),s[u>>2]=l;break n}s[n+12>>2]=o,s[o+8>>2]=n}else{if(c=s[i+24>>2],(0|i)==(0|(t=s[i+12>>2])))if((n=s[(o=i+20|0)>>2])||(n=s[(o=i+16|0)>>2])){for(;a=o,(n=s[(o=(t=n)+20|0)>>2])||(o=t+16|0,n=s[t+16>>2]););s[a>>2]=0}else t=0;else n=s[i+8>>2],s[n+12>>2]=t,s[t+8>>2]=n;if(c){o=s[i+28>>2];r:{if(s[(n=36148+(o<<2)|0)>>2]==(0|i)){if(s[n>>2]=t,t)break r;u=35848,l=s[8962]&Pt(-2,o),s[u>>2]=l;break n}if(s[c+(s[c+16>>2]==(0|i)?16:20)>>2]=t,!t)break n}s[t+24>>2]=c,(n=s[i+16>>2])&&(s[t+16>>2]=n,s[n+24>>2]=t),(n=s[i+20>>2])&&(s[t+20>>2]=n,s[n+24>>2]=t)}}if(s[r+4>>2]=1|e,s[e+r>>2]=e,s[8966]!=(0|r))break t;return void(s[8963]=e)}s[i+4>>2]=-2&t,s[r+4>>2]=1|e,s[e+r>>2]=e}if(e>>>0<=255)return t=35884+((e=e>>>3|0)<<3)|0,(n=s[8961])&(e=1<>2]:(s[8961]=e|n,e=t),s[t+8>>2]=r,s[e+12>>2]=r,s[r+12>>2]=t,void(s[r+8>>2]=e);o=31,s[r+16>>2]=0,s[r+20>>2]=0,e>>>0<=16777215&&(t=e>>>8|0,t<<=a=t+1048320>>>16&8,o=28+((t=((t<<=o=t+520192>>>16&4)<<(n=t+245760>>>16&2)>>>15|0)-(n|o|a)|0)<<1|e>>>t+21&1)|0),s[r+28>>2]=o,a=36148+(o<<2)|0;t:{n:{if((n=s[8962])&(t=1<>>1|0)|0),t=s[a>>2];;){if(n=t,(-8&s[t+4>>2])==(0|e))break n;if(t=o>>>29|0,o<<=1,!(t=s[16+(a=n+(4&t)|0)>>2]))break}s[a+16>>2]=r,s[r+24>>2]=n}else s[8962]=t|n,s[a>>2]=r,s[r+24>>2]=a;s[r+12>>2]=r,s[r+8>>2]=r;break t}e=s[n+8>>2],s[e+12>>2]=r,s[n+8>>2]=r,s[r+24>>2]=0,s[r+12>>2]=n,s[r+8>>2]=e}e=s[8969]-1|0,s[8969]=e||-1}}}function P(e,t){var n,r=0,o=0,i=0,a=0,c=0,d=0,u=0;n=e+t|0;e:{t:if(!(1&(r=s[e+4>>2]))){if(!(3&r))break e;if(t=(r=s[e>>2])+t|0,(0|(e=e-r|0))==s[8966]){if(3==(3&(r=s[n+4>>2])))return s[8963]=t,s[n+4>>2]=-2&r,s[e+4>>2]=1|t,void(s[n>>2]=t)}else{if(r>>>0<=255){if(i=s[e+8>>2],r=r>>>3|0,(0|(o=s[e+12>>2]))==(0|i)){d=35844,u=s[8961]&Pt(-2,r),s[d>>2]=u;break t}s[i+12>>2]=o,s[o+8>>2]=i;break t}if(c=s[e+24>>2],(0|(r=s[e+12>>2]))==(0|e))if((o=s[(i=e+20|0)>>2])||(o=s[(i=e+16|0)>>2])){for(;a=i,(o=s[(i=(r=o)+20|0)>>2])||(i=r+16|0,o=s[r+16>>2]););s[a>>2]=0}else r=0;else o=s[e+8>>2],s[o+12>>2]=r,s[r+8>>2]=o;if(!c)break t;i=s[e+28>>2];n:{if(s[(o=36148+(i<<2)|0)>>2]==(0|e)){if(s[o>>2]=r,r)break n;d=35848,u=s[8962]&Pt(-2,i),s[d>>2]=u;break t}if(s[c+(s[c+16>>2]==(0|e)?16:20)>>2]=r,!r)break t}if(s[r+24>>2]=c,(o=s[e+16>>2])&&(s[r+16>>2]=o,s[o+24>>2]=r),!(o=s[e+20>>2]))break t;s[r+20>>2]=o,s[o+24>>2]=r}}t:{if(!(2&(r=s[n+4>>2]))){if(s[8967]==(0|n)){if(s[8967]=e,t=s[8964]+t|0,s[8964]=t,s[e+4>>2]=1|t,s[8966]!=(0|e))break e;return s[8963]=0,void(s[8966]=0)}if(s[8966]==(0|n))return s[8966]=e,t=s[8963]+t|0,s[8963]=t,s[e+4>>2]=1|t,void(s[e+t>>2]=t);t=(-8&r)+t|0;n:if(r>>>0<=255){if(i=s[n+8>>2],r=r>>>3|0,(0|(o=s[n+12>>2]))==(0|i)){d=35844,u=s[8961]&Pt(-2,r),s[d>>2]=u;break n}s[i+12>>2]=o,s[o+8>>2]=i}else{if(c=s[n+24>>2],(0|n)==(0|(r=s[n+12>>2])))if((i=s[(o=n+20|0)>>2])||(i=s[(o=n+16|0)>>2])){for(;a=o,(i=s[(o=(r=i)+20|0)>>2])||(o=r+16|0,i=s[r+16>>2]););s[a>>2]=0}else r=0;else o=s[n+8>>2],s[o+12>>2]=r,s[r+8>>2]=o;if(c){i=s[n+28>>2];r:{if(s[(o=36148+(i<<2)|0)>>2]==(0|n)){if(s[o>>2]=r,r)break r;d=35848,u=s[8962]&Pt(-2,i),s[d>>2]=u;break n}if(s[c+(s[c+16>>2]==(0|n)?16:20)>>2]=r,!r)break n}s[r+24>>2]=c,(o=s[n+16>>2])&&(s[r+16>>2]=o,s[o+24>>2]=r),(o=s[n+20>>2])&&(s[r+20>>2]=o,s[o+24>>2]=r)}}if(s[e+4>>2]=1|t,s[e+t>>2]=t,s[8966]!=(0|e))break t;return void(s[8963]=t)}s[n+4>>2]=-2&r,s[e+4>>2]=1|t,s[e+t>>2]=t}if(t>>>0<=255)return r=35884+((t=t>>>3|0)<<3)|0,(o=s[8961])&(t=1<>2]:(s[8961]=t|o,t=r),s[r+8>>2]=e,s[t+12>>2]=e,s[e+12>>2]=r,void(s[e+8>>2]=t);i=31,s[e+16>>2]=0,s[e+20>>2]=0,t>>>0<=16777215&&(r=t>>>8|0,r<<=a=r+1048320>>>16&8,i=28+((r=((r<<=i=r+520192>>>16&4)<<(o=r+245760>>>16&2)>>>15|0)-(o|i|a)|0)<<1|t>>>r+21&1)|0),s[e+28>>2]=i,a=36148+(i<<2)|0;t:{if((o=s[8962])&(r=1<>>1|0)|0),r=s[a>>2];;){if(o=r,(-8&s[r+4>>2])==(0|t))break t;if(r=i>>>29|0,i<<=1,!(r=s[16+(a=o+(4&r)|0)>>2]))break}s[a+16>>2]=e,s[e+24>>2]=o}else s[8962]=r|o,s[a>>2]=e,s[e+24>>2]=a;return s[e+12>>2]=e,void(s[e+8>>2]=e)}t=s[o+8>>2],s[t+12>>2]=e,s[o+8>>2]=e,s[e+24>>2]=0,s[e+12>>2]=o,s[e+8>>2]=t}}function N(e,t,n,r,o){var a,d,u,l,A,f,h,g,p,m,v,b,I,C,E,w=0,B=0,_=0,S=0,k=0,O=0,Q=0,R=0,P=0,N=0,x=0,D=0,M=0,T=0,U=0,H=0,j=0,J=0,F=0,G=0,L=0,q=0,Y=0,V=0,W=0,K=0,Z=0,z=0,X=0,$=0,ee=0,te=0,ne=0,re=0;for(y=a=y+-64|0,d=s[e+60>>2],u=s[e+56>>2],G=s[e+52>>2],J=s[e+48>>2],l=s[e+44>>2],A=s[e+40>>2],f=s[e+36>>2],h=s[e+32>>2],g=s[e+28>>2],p=s[e+24>>2],m=s[e+20>>2],v=s[e+16>>2],b=s[e+12>>2],I=s[e+8>>2],C=s[e+4>>2],E=s[e>>2];;){if(!o&r>>>0>63|o)_=n;else{if(S=0,_=w=ae(a,0,64),r|o)for(;i[w+S|0]=c[t+S|0],!o&(S=S+1|0)>>>0>>0|o;);t=_,Y=n}for(L=20,R=E,P=C,N=I,x=b,S=v,w=m,n=p,D=g,k=h,O=f,M=A,T=d,U=u,B=G,H=J,F=l;Q=S,R=On((S=S+R|0)^H,16),H=On(Q^(k=R+k|0),12),Q=k,k=On((k=R)^(R=S+H|0),8),S=On(H^(j=Q+k|0),7),Q=w,P=On((w=w+P|0)^B,16),B=On(Q^(O=P+O|0),12),Q=O,O=On((O=P)^(P=w+B|0),8),w=On(B^(q=Q+O|0),7),B=n,N=On((n=n+N|0)^U,16),Q=U=On(B^(M=N+M|0),12),U=On((B=N)^(N=n+U|0),8),n=On(Q^(M=U+M|0),7),B=D,x=On((D=D+x|0)^T,16),F=B=On(B^(T=x+F|0),12),Q=T,T=On((T=x)^(x=D+B|0),8),D=On(F^(B=Q+T|0),7),Q=M,M=On((R=w+R|0)^T,16),w=On((H=Q+M|0)^w,12),T=On(M^(R=w+R|0),8),w=On(w^(M=H+T|0),7),k=On((P=n+P|0)^k,16),n=On((B=k+B|0)^n,12),H=On(k^(P=n+P|0),8),n=On(n^(F=B+H|0),7),k=On((N=D+N|0)^O,16),D=On((O=k+j|0)^D,12),B=On(k^(N=D+N|0),8),D=On(D^(k=O+B|0),7),O=On((x=S+x|0)^U,16),S=On((j=O+q|0)^S,12),U=On(O^(x=S+x|0),8),S=On(S^(O=j+U|0),7),L=L-2|0;);if(L=c[t+4|0]|c[t+5|0]<<8|c[t+6|0]<<16|c[t+7|0]<<24,j=c[t+8|0]|c[t+9|0]<<8|c[t+10|0]<<16|c[t+11|0]<<24,q=c[t+12|0]|c[t+13|0]<<8|c[t+14|0]<<16|c[t+15|0]<<24,V=c[t+16|0]|c[t+17|0]<<8|c[t+18|0]<<16|c[t+19|0]<<24,W=c[t+20|0]|c[t+21|0]<<8|c[t+22|0]<<16|c[t+23|0]<<24,K=c[t+24|0]|c[t+25|0]<<8|c[t+26|0]<<16|c[t+27|0]<<24,Z=c[t+28|0]|c[t+29|0]<<8|c[t+30|0]<<16|c[t+31|0]<<24,z=c[t+32|0]|c[t+33|0]<<8|c[t+34|0]<<16|c[t+35|0]<<24,X=c[t+36|0]|c[t+37|0]<<8|c[t+38|0]<<16|c[t+39|0]<<24,$=c[t+40|0]|c[t+41|0]<<8|c[t+42|0]<<16|c[t+43|0]<<24,ee=c[t+44|0]|c[t+45|0]<<8|c[t+46|0]<<16|c[t+47|0]<<24,te=c[t+48|0]|c[t+49|0]<<8|c[t+50|0]<<16|c[t+51|0]<<24,ne=c[t+52|0]|c[t+53|0]<<8|c[t+54|0]<<16|c[t+55|0]<<24,re=c[t+56|0]|c[t+57|0]<<8|c[t+58|0]<<16|c[t+59|0]<<24,Q=c[t+60|0]|c[t+61|0]<<8|c[t+62|0]<<16|c[t+63|0]<<24,Jt(_,R+E^(c[0|t]|c[t+1|0]<<8|c[t+2|0]<<16|c[t+3|0]<<24)),Jt(_+4|0,P+C^L),Jt(_+8|0,N+I^j),Jt(_+12|0,x+b^q),Jt(_+16|0,S+v^V),Jt(_+20|0,w+m^W),Jt(_+24|0,n+p^K),Jt(_+28|0,D+g^Z),Jt(_+32|0,k+h^z),Jt(_+36|0,O+f^X),Jt(_+40|0,$^M+A),Jt(_+44|0,ee^F+l),Jt(_+48|0,te^H+J),Jt(_+52|0,ne^B+G),Jt(_+56|0,re^U+u),Jt(_+60|0,Q^T+d),G=((J=(n=J)+1|0)>>>0>>0)+G|0,!o&r>>>0<=64){if(!(!r|!o&r>>>0>63|0!=(0|o)))for(w=0;i[w+Y|0]=c[_+w|0],(0|r)!=(0|(w=w+1|0)););s[e+52>>2]=G,s[e+48>>2]=J,y=a- -64|0;break}t=t- -64|0,n=_- -64|0,o=o-1|0,o=(r=r+-64|0)>>>0<4294967232?o+1|0:o}}function x(e,t,n,r){var o=0,i=0,a=0,d=0,l=0,A=0,f=0,h=0,g=0,p=0,m=0,v=0,y=0,b=0,I=0,E=0,w=0,B=0,_=0,S=0,k=0,O=0,Q=0,R=0,P=0;if(g=s[e+36>>2],d=s[e+32>>2],a=s[e+28>>2],i=s[e+24>>2],l=s[e+20>>2],!r&n>>>0>=16|r)for(k=!c[e+80|0]<<24,m=s[e+4>>2],O=u(m,5),b=s[e+8>>2],S=u(b,5),B=s[e+12>>2],_=u(B,5),o=s[e+16>>2],I=u(o,5),Q=o,v=s[e>>2];o=fn(A=((c[t+3|0]|c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,0),o=C+o|0,o=(i=h+i|0)>>>0>>0?o+1|0:o,h=fn(p,0,_,0),o=C+o|0,o=(i=h+i|0)>>>0>>0?o+1|0:o,h=fn(y,0,S,0),o=C+o|0,o=(i=h+i|0)>>>0>>0?o+1|0:o,h=i,i=o,o=fn(A,0,I,0),w=C,A=(l=fn(l,0,v,0))+o|0,o=C+w|0,o=A>>>0>>0?o+1|0:o,l=fn(f,0,_,0),o=C+o|0,o=(A=l+A|0)>>>0>>0?o+1|0:o,l=fn(p,0,S,0),o=C+o|0,o=(A=l+A|0)>>>0>>0?o+1|0:o,l=fn(y,0,O,0),o=C+o|0,o=(A=l+A|0)>>>0>>0?o+1|0:o,l=A,f=(67108863&o)<<6|A>>>26,o=i,f=(67108863&(o=(A=f+h|0)>>>0>>0?o+1|0:o))<<6|(i=A)>>>26,o=a,o=(i=f+E|0)>>>0>>0?o+1|0:o,f=i,i=(67108863&o)<<6|i>>>26,o=d,p=a=i+P|0,a=(67108863&(o=i>>>0>a>>>0?o+1|0:o))<<6|a>>>26,o=g,g=d=a+R|0,i=(67108863&A)+((o=u((67108863&(o=a>>>0>d>>>0?o+1|0:o))<<6|d>>>26,5)+(67108863&l)|0)>>>26|0)|0,a=67108863&f,d=67108863&p,g&=67108863,l=67108863&o,t=t+16|0,!(r=r-(n>>>0<16)|0)&(n=n-16|0)>>>0>15|r;);s[e+20>>2]=l,s[e+36>>2]=g,s[e+32>>2]=d,s[e+28>>2]=a,s[e+24>>2]=i}function D(e,t,n){var r,o,a,s,d=0,u=0,l=0,A=0,f=0;return y=a=y-160|0,Rt(t,n,32,0),i[0|t]=248&c[0|t],i[t+31|0]=63&c[t+31|0]|64,ie(a,t),ct(e,a),u=c[(o=n)+8|0]|c[o+9|0]<<8|c[o+10|0]<<16|c[o+11|0]<<24,d=c[o+12|0]|c[o+13|0]<<8|c[o+14|0]<<16|c[o+15|0]<<24,l=c[o+16|0]|c[o+17|0]<<8|c[o+18|0]<<16|c[o+19|0]<<24,A=c[o+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|0]<<8|c[d+26|0]<<16|c[d+27|0]<<24,i[r+56|0]=d,i[r+57|0]=d>>>8,i[r+58|0]=d>>>16,i[r+59|0]=d>>>24,i[r+60|0]=u,i[r+61|0]=u>>>8,i[r+62|0]=u>>>16,i[r+63|0]=u>>>24,i[r+48|0]=f,i[r+49|0]=f>>>8,i[r+50|0]=f>>>16,i[r+51|0]=f>>>24,i[r+52|0]=n,i[r+53|0]=n>>>8,i[r+54|0]=n>>>16,i[r+55|0]=n>>>24,i[r+40|0]=l,i[r+41|0]=l>>>8,i[r+42|0]=l>>>16,i[r+43|0]=l>>>24,i[r+44|0]=A,i[r+45|0]=A>>>8,i[r+46|0]=A>>>16,i[r+47|0]=A>>>24,i[r+32|0]=t,i[r+33|0]=t>>>8,i[r+34|0]=t>>>16,i[r+35|0]=t>>>24,i[r+36|0]=e,i[r+37|0]=e>>>8,i[r+38|0]=e>>>16,i[r+39|0]=e>>>24,y=a+160|0,0}function M(e,t,n){var r,o=0,a=0,s=0;y=r=y+-64|0;e:{if(!(!n|n>>>0>=65)){if(o=-1,!(c[e+80|0]|c[e+81|0]<<8|c[e+82|0]<<16|c[e+83|0]<<24|c[e+84|0]|c[e+85|0]<<8|c[e+86|0]<<16|c[e+87|0]<<24)){if(a=e,(o=c[e+352|0]|c[e+353|0]<<8|c[e+354|0]<<16|c[e+355|0]<<24)>>>0>=129){if(se(e,128),E(e,s=e+96|0),o=(c[e+352|0]|c[e+353|0]<<8|c[e+354|0]<<16|c[e+355|0]<<24)-128|0,i[e+352|0]=o,i[e+353|0]=o>>>8,i[e+354|0]=o>>>16,i[e+355|0]=o>>>24,o>>>0>=129)break e;q(s,e+224|0,o),o=c[e+352|0]|c[e+353|0]<<8|c[e+354|0]<<16|c[e+355|0]<<24}se(a,o),c[e+356|0]&&(i[e+88|0]=255,i[e+89|0]=255,i[e+90|0]=255,i[e+91|0]=255,i[e+92|0]=255,i[e+93|0]=255,i[e+94|0]=255,i[e+95|0]=255),i[e+80|0]=255,i[e+81|0]=255,i[e+82|0]=255,i[e+83|0]=255,i[e+84|0]=255,i[e+85|0]=255,i[e+86|0]=255,i[e+87|0]=255,ae((o=e+96|0)+(a=c[e+352|0]|c[e+353|0]<<8|c[e+354|0]<<16|c[e+355|0]<<24)|0,0,256-a|0),E(e,o),ft(r,c[0|e]|c[e+1|0]<<8|c[e+2|0]<<16|c[e+3|0]<<24,c[e+4|0]|c[e+5|0]<<8|c[e+6|0]<<16|c[e+7|0]<<24),ft(8|r,c[e+8|0]|c[e+9|0]<<8|c[e+10|0]<<16|c[e+11|0]<<24,c[e+12|0]|c[e+13|0]<<8|c[e+14|0]<<16|c[e+15|0]<<24),ft(r+16|0,c[e+16|0]|c[e+17|0]<<8|c[e+18|0]<<16|c[e+19|0]<<24,c[e+20|0]|c[e+21|0]<<8|c[e+22|0]<<16|c[e+23|0]<<24),ft(r+24|0,c[e+24|0]|c[e+25|0]<<8|c[e+26|0]<<16|c[e+27|0]<<24,c[e+28|0]|c[e+29|0]<<8|c[e+30|0]<<16|c[e+31|0]<<24),ft(r+32|0,c[e+32|0]|c[e+33|0]<<8|c[e+34|0]<<16|c[e+35|0]<<24,c[e+36|0]|c[e+37|0]<<8|c[e+38|0]<<16|c[e+39|0]<<24),ft(r+40|0,c[e+40|0]|c[e+41|0]<<8|c[e+42|0]<<16|c[e+43|0]<<24,c[e+44|0]|c[e+45|0]<<8|c[e+46|0]<<16|c[e+47|0]<<24),ft(r+48|0,c[e+48|0]|c[e+49|0]<<8|c[e+50|0]<<16|c[e+51|0]<<24,c[e+52|0]|c[e+53|0]<<8|c[e+54|0]<<16|c[e+55|0]<<24),ft(r+56|0,c[e+56|0]|c[e+57|0]<<8|c[e+58|0]<<16|c[e+59|0]<<24,c[e+60|0]|c[e+61|0]<<8|c[e+62|0]<<16|c[e+63|0]<<24),q(t,r,n),ht(e,64),ht(o,256),o=0}return y=r- -64|0,o}zt(),A()}f(1854,1886,306,1931),A()}function T(e,t){var n,r,o,i,a,d,u,l,A,f=0,h=0,g=0,p=0,m=0,v=0,y=0,b=0,I=0,E=0,w=0;n=c[0|t]|c[t+1|0]<<8|c[t+2|0]<<16|c[t+3|0]<<24,I=kt(t+4|0),f=C,y=kt(t+7|0),g=C,b=kt(t+10|0),h=C,r=kt(t+13|0),m=C,p=c[t+16|0]|c[t+17|0]<<8|c[t+18|0]<<16|c[t+19|0]<<24,o=kt(t+20|0),E=C,i=kt(t+23|0),a=C,d=kt(t+26|0),u=C,l=kt(t+29|0),t=h<<3|b>>>29,w=h=b<<3,b=h=h+16777216|0,h=t=h>>>0<16777216?t+1|0:t,g=t=g<<5|y>>>27,A=v=y<<5,f=t=f<<6|(y=I)>>>26,I=t=16777216+(y<<=6)|0,v=t,t=(t=(f=t>>>0<16777216?f+1|0:f)>>25)+g|0,t=(f=A+(v=(33554431&f)<<7|v>>>25)|0)>>>0>>0?t+1|0:t,(g=f+33554432|0)>>>0<33554432&&(t=t+1|0),t=(w-(-33554432&b)|0)+((67108863&t)<<6|g>>>26)|0,s[e+12>>2]=t,t=-67108864&g,s[e+8>>2]=f-t,t=0,v=p=(g=p)+16777216|0,p=t=p>>>0<16777216?1:t,w=g-(-33554432&v)|0,t=m<<2|(g=r)>>>30,m=g<<2,g=t,t=(t=h>>25)+g|0,f=t=(h=(f=m)+(m=(33554431&h)<<7|b>>>25)|0)>>>0>>0?t+1|0:t,g=t=h+33554432|0,t=((67108863&(f=t>>>0<33554432?f+1|0:f))<<6|t>>>26)+w|0,s[e+20>>2]=t,t=-67108864&g,s[e+16>>2]=h-t,m=(f=o)<<7,t=(t=E<<7|f>>>25)+(f=p>>25)|0,t=(p=m+(g=(33554431&p)<<7|v>>>25)|0)>>>0>>0?t+1|0:t,p=f=p,g=f=f+33554432|0,f=t=f>>>0<33554432?t+1|0:t,t=-67108864&g,s[(h=e)+24>>2]=p-t,p=h,t=a<<5|(h=i)>>>27,E=h<<=5,m=h=h+16777216|0,h=t=h>>>0<16777216?t+1|0:t,t=(E-(-33554432&m)|0)+((67108863&f)<<6|g>>>26)|0,s[p+28>>2]=t,g=(f=d)<<4,f=t=u<<4|f>>>28,t=(t=h>>25)+f|0,t=(h=(v=g)+(g=(33554431&h)<<7|m>>>25)|0)>>>0>>0?t+1|0:t,h=f=h,g=f=f+33554432|0,f=t=f>>>0<33554432?t+1|0:t,t=-67108864&g,s[p+32>>2]=h-t,t=0,h=p=(p=l)<<2&33554428,t=(p=p+16777216|0)>>>0<16777216?t+1|0:t,f=(h-(33554432&p)|0)+((67108863&f)<<6|g>>>26)|0,s[e+36>>2]=f,p=fn((33554431&t)<<7|p>>>25,t>>>25|0,19,0),t=C,t=(f=p+n|0)>>>0

>>0?t+1|0:t,(h=f+33554432|0)>>>0<33554432&&(t=t+1|0),t=(y-(-33554432&I)|0)+((67108863&t)<<6|h>>>26)|0,s[e+4>>2]=t,t=e,e=-67108864&h,s[t>>2]=f-e}function U(e,t){var n,r,o,i,a,c,d,u,l,A=0,f=0,h=0,g=0,p=0,m=0,v=0,y=0,b=0,I=0,E=0,w=0,B=0,_=0;E=f=s[(A=t)+4>>2],b=f>>31,w=f=s[A+8>>2],r=f>>31,v=f=s[A+12>>2],I=f>>31,B=f=s[A+16>>2],o=f>>31,y=f=s[A+20>>2],m=f>>31,_=f=s[A+24>>2],i=f>>31,a=f=s[A>>2],c=f>>31,g=f=fn(A=s[A+36>>2],A>>31,121666,0),A=C,n=f=f+16777216|0,f=A=f>>>0<16777216?A+1|0:A,d=g-(-33554432&n)|0,h=fn(A=s[t+32>>2],A>>31,121666,0),u=C,g=fn(t=s[t+28>>2],t>>31,121666,0),A=C,p=h,l=t=g+16777216|0,h=t,t=(t=(A=t>>>0<16777216?A+1|0:A)>>25)+u|0,t=(A=p+(h=(33554431&A)<<7|h>>>25)|0)>>>0>>0?t+1|0:t,h=A,A=t,p=t=h+33554432|0,t=((67108863&(A=t>>>0<33554432?A+1|0:A))<<6|t>>>26)+d|0,s[e+36>>2]=t,t=-67108864&p,s[e+32>>2]=h-t,p=g-(-33554432&l)|0,A=fn(_,i,121666,0),_=C,g=fn(y,m,121666,0),t=C,h=A,y=A=g+16777216|0,m=A,A=(A=(t=A>>>0<16777216?t+1|0:t)>>25)+_|0,A=(t=h+(m=(33554431&t)<<7|m>>>25)|0)>>>0>>0?A+1|0:A,(h=t+33554432|0)>>>0<33554432&&(A=A+1|0),A=p+((67108863&A)<<6|h>>>26)|0,s[e+28>>2]=A,A=-67108864&h,s[e+24>>2]=t-A,y=g-(-33554432&y)|0,t=fn(B,o,121666,0),B=C,g=fn(v,I,121666,0),A=C,p=t,v=t=g+16777216|0,I=(33554431&(A=t>>>0<16777216?A+1|0:A))<<7|t>>>25,A=(A>>25)+B|0,t=A=(h=p+I|0)>>>0>>0?A+1|0:A,t=((67108863&(t=(A=h+33554432|0)>>>0<33554432?t+1|0:t))<<6|A>>>26)+y|0,s[e+20>>2]=t,t=-67108864&A,s[e+16>>2]=h-t,v=g-(-33554432&v)|0,A=fn(w,r,121666,0),w=C,g=fn(E,b,121666,0),t=C,p=A,E=A=g+16777216|0,b=(33554431&(t=A>>>0<16777216?t+1|0:t))<<7|A>>>25,t=(t>>25)+w|0,A=t=(h=p+b|0)>>>0>>0?t+1|0:t,p=t=h+33554432|0,t=((67108863&(A=t>>>0<33554432?A+1|0:A))<<6|t>>>26)+v|0,s[e+12>>2]=t,t=-67108864&p,s[e+8>>2]=h-t,t=fn((33554431&f)<<7|n>>>25,f>>25,19,0),A=C,p=g-(-33554432&E)|0,f=fn(a,c,121666,0),A=C+A|0,A=(t=f+t|0)>>>0>>0?A+1|0:A,(f=t+33554432|0)>>>0<33554432&&(A=A+1|0),A=p+((67108863&A)<<6|f>>>26)|0,s[e+4>>2]=A,A=e,e=-67108864&f,s[A>>2]=t-e}function H(e,t,n,r){var o,a=0,d=0;y=o=y-16|0,a=-31;e:{t:{n:{r:switch(r-1|0){case 1:if(t>>>0<13)break t;r=c[35660]|c[35661]<<8|c[35662]<<16|c[35663]<<24,a=c[35656]|c[35657]<<8|c[35658]<<16|c[35659]<<24,i[0|e]=a,i[e+1|0]=a>>>8,i[e+2|0]=a>>>16,i[e+3|0]=a>>>24,i[e+4|0]=r,i[e+5|0]=r>>>8,i[e+6|0]=r>>>16,i[e+7|0]=r>>>24,r=c[35665]|c[35666]<<8|c[35667]<<16|c[35668]<<24,a=c[35661]|c[35662]<<8|c[35663]<<16|c[35664]<<24,i[e+5|0]=a,i[e+6|0]=a>>>8,i[e+7|0]=a>>>16,i[e+8|0]=a>>>24,i[e+9|0]=r,i[e+10|0]=r>>>8,i[e+11|0]=r>>>16,i[e+12|0]=r>>>24,d=-12,r=12;break n;case 0:break r;default:break e}if(t>>>0<12)break t;r=c[35673]|c[35674]<<8|c[35675]<<16|c[35676]<<24,a=c[35669]|c[35670]<<8|c[35671]<<16|c[35672]<<24,i[0|e]=a,i[e+1|0]=a>>>8,i[e+2|0]=a>>>16,i[e+3|0]=a>>>24,i[e+4|0]=r,i[e+5|0]=r>>>8,i[e+6|0]=r>>>16,i[e+7|0]=r>>>24,r=c[35677]|c[35678]<<8|c[35679]<<16|c[35680]<<24,i[e+8|0]=r,i[e+9|0]=r>>>8,i[e+10|0]=r>>>16,i[e+11|0]=r>>>24,d=-11,r=11}if(a=le(n))break e;if(Le(o+5|0,19),!((a=t+d|0)>>>0<=(t=Oe(o+5|0))>>>0)&&(e=q(e+r|0,o+5|0,t+1|0),!((r=a-t|0)>>>0<4)&&(i[0|(e=e+t|0)]=36,i[e+1|0]=109,i[e+2|0]=61,i[e+3|0]=0,Le(o+5|0,s[n+44>>2]),!((r=r-3|0)>>>0<=(t=Oe(o+5|0))>>>0)&&(e=q(e+3|0,o+5|0,t+1|0),!((r=r-t|0)>>>0<4)&&(i[0|(e=e+t|0)]=44,i[e+1|0]=116,i[e+2|0]=61,i[e+3|0]=0,Le(o+5|0,s[n+40>>2]),!((r=r-3|0)>>>0<=(t=Oe(o+5|0))>>>0)&&(e=q(e+3|0,o+5|0,t+1|0),!((r=r-t|0)>>>0<4)&&(i[0|(e=e+t|0)]=44,i[e+1|0]=112,i[e+2|0]=61,i[e+3|0]=0,Le(o+5|0,s[n+48>>2]),!((r=r-3|0)>>>0<=(t=Oe(o+5|0))>>>0)&&(e=q(e+3|0,o+5|0,t+1|0),!((r=r-t|0)>>>0<2)&&(i[0|(e=e+t|0)]=36,i[e+1|0]=0,z(e=e+1|0,t=r-1|0,s[n+16>>2],s[n+20>>2],3)))))))))){if(a=-31,(r=(r=t)-(t=Oe(e))|0)>>>0<2)break e;return i[0|(e=e+t|0)]=36,i[e+1|0]=0,e=z(e+1|0,r-1|0,s[n>>2],s[n+4>>2],3),y=o+16|0,e?0:-31}}a=-31}return y=o+16|0,a}function j(e,t,n,r){var o,a=0;o=a=y,y=a=a-576&-64,s[a+188>>2]=0,Jt(a+188|0,t);e:if(t>>>0<=64){if((0|st(a+192|0,0,0,t))<0)break e;if((0|bn(a+192|0,a+188|0,4,0))<0)break e;if((0|bn(a+192|0,n,r,0))<0)break e;Tt(a+192|0,e,t)}else if(!((0|st(a+192|0,0,0,64))<0||(0|bn(a+192|0,a+188|0,4,0))<0||(0|bn(a+192|0,n,r,0))<0||(0|Tt(a+192|0,a+112|0,64))<0)){if(n=s[a+116>>2],r=s[a+112>>2],i[0|e]=r,i[e+1|0]=r>>>8,i[e+2|0]=r>>>16,i[e+3|0]=r>>>24,i[e+4|0]=n,i[e+5|0]=n>>>8,i[e+6|0]=n>>>16,i[e+7|0]=n>>>24,n=s[a+124>>2],r=s[a+120>>2],i[e+8|0]=r,i[e+9|0]=r>>>8,i[e+10|0]=r>>>16,i[e+11|0]=r>>>24,i[e+12|0]=n,i[e+13|0]=n>>>8,i[e+14|0]=n>>>16,i[e+15|0]=n>>>24,n=s[a+140>>2],r=s[a+136>>2],i[e+24|0]=r,i[e+25|0]=r>>>8,i[e+26|0]=r>>>16,i[e+27|0]=r>>>24,i[e+28|0]=n,i[e+29|0]=n>>>8,i[e+30|0]=n>>>16,i[e+31|0]=n>>>24,n=s[a+132>>2],r=s[a+128>>2],i[e+16|0]=r,i[e+17|0]=r>>>8,i[e+18|0]=r>>>16,i[e+19|0]=r>>>24,i[e+20|0]=n,i[e+21|0]=n>>>8,i[e+22|0]=n>>>16,i[e+23|0]=n>>>24,e=e+32|0,(t=t-32|0)>>>0>=65)for(;;){if(q(a+48|0,a+112|0,64),(0|Bt(a+112|0,64,a+48|0,64,0,0,0))<0)break e;if(n=s[a+116>>2],r=s[a+112>>2],i[0|e]=r,i[e+1|0]=r>>>8,i[e+2|0]=r>>>16,i[e+3|0]=r>>>24,i[e+4|0]=n,i[e+5|0]=n>>>8,i[e+6|0]=n>>>16,i[e+7|0]=n>>>24,n=s[a+124>>2],r=s[a+120>>2],i[e+8|0]=r,i[e+9|0]=r>>>8,i[e+10|0]=r>>>16,i[e+11|0]=r>>>24,i[e+12|0]=n,i[e+13|0]=n>>>8,i[e+14|0]=n>>>16,i[e+15|0]=n>>>24,n=s[a+140>>2],r=s[a+136>>2],i[e+24|0]=r,i[e+25|0]=r>>>8,i[e+26|0]=r>>>16,i[e+27|0]=r>>>24,i[e+28|0]=n,i[e+29|0]=n>>>8,i[e+30|0]=n>>>16,i[e+31|0]=n>>>24,n=s[a+132>>2],r=s[a+128>>2],i[e+16|0]=r,i[e+17|0]=r>>>8,i[e+18|0]=r>>>16,i[e+19|0]=r>>>24,i[e+20|0]=n,i[e+21|0]=n>>>8,i[e+22|0]=n>>>16,i[e+23|0]=n>>>24,e=e+32|0,!((t=t-32|0)>>>0>64))break}q(a+48|0,a+112|0,64),(0|Bt(a+112|0,t,a+48|0,64,0,0,0))<0||q(e,a+112|0,t)}ht(a+192|0,384),y=o}function J(e,t,n){var r=0,o=0,i=0,a=0,s=0,d=0,u=0,l=0,A=0,f=0,h=0,g=0,p=0,m=0,v=0,y=0,b=0,I=0,C=0;for(i=2036477234,A=857760878,f=1634760805,a=1797285236,l=c[0|n]|c[n+1|0]<<8|c[n+2|0]<<16|c[n+3|0]<<24,r=c[n+4|0]|c[n+5|0]<<8|c[n+6|0]<<16|c[n+7|0]<<24,o=c[n+8|0]|c[n+9|0]<<8|c[n+10|0]<<16|c[n+11|0]<<24,d=c[n+12|0]|c[n+13|0]<<8|c[n+14|0]<<16|c[n+15|0]<<24,g=c[n+16|0]|c[n+17|0]<<8|c[n+18|0]<<16|c[n+19|0]<<24,p=c[n+20|0]|c[n+21|0]<<8|c[n+22|0]<<16|c[n+23|0]<<24,v=c[n+24|0]|c[n+25|0]<<8|c[n+26|0]<<16|c[n+27|0]<<24,y=c[n+28|0]|c[n+29|0]<<8|c[n+30|0]<<16|c[n+31|0]<<24,n=c[0|t]|c[t+1|0]<<8|c[t+2|0]<<16|c[t+3|0]<<24,h=c[t+4|0]|c[t+5|0]<<8|c[t+6|0]<<16|c[t+7|0]<<24,s=c[t+8|0]|c[t+9|0]<<8|c[t+10|0]<<16|c[t+11|0]<<24,t=c[t+12|0]|c[t+13|0]<<8|c[t+14|0]<<16|c[t+15|0]<<24;u=l,f=On((m=n)^(n=l+f|0),16),u=g=On(u^(l=f+g|0),12),g=On((m=f)^(f=n+g|0),8),l=On(u^(b=g+l|0),7),u=r,A=On((n=r+A|0)^h,16),u=h=On(u^(r=A+p|0),12),h=On((m=A)^(A=n+h|0),8),n=On(u^(p=h+r|0),7),u=o,r=On((i=i+o|0)^s,16),u=s=On(u^(o=r+v|0),12),m=On(r^(s=i+s|0),8),i=On(u^(r=m+o|0),7),a=On((o=t)^(t=a+d|0),16),d=On((o=a+y|0)^d,12),t=On(a^(I=t+d|0),8),a=On(d^(o=t+o|0),7),u=r,r=On((r=t)^(t=n+f|0),16),n=On((d=u+r|0)^n,12),t=On(r^(f=t+n|0),8),r=On(n^(v=d+t|0),7),u=o,o=On((n=i+A|0)^g,16),i=On((d=u+o|0)^i,12),n=On(o^(A=n+i|0),8),o=On(i^(y=d+n|0),7),d=On((i=a+s|0)^h,16),a=On((s=d+b|0)^a,12),h=On(d^(i=i+a|0),8),d=On(a^(g=s+h|0),7),s=On((a=l+I|0)^m,16),l=On((p=s+p|0)^l,12),s=On(s^(a=a+l|0),8),l=On(l^(p=p+s|0),7),10!=(0|(C=C+1|0)););Jt(e,f),Jt(e+4|0,A),Jt(e+8|0,i),Jt(e+12|0,a),Jt(e+16|0,n),Jt(e+20|0,h),Jt(e+24|0,s),Jt(e+28|0,t)}function F(e){var t,n=0,r=0;y=t=y-48|0,n=c[28+(e|=0)|0]|c[e+29|0]<<8|c[e+30|0]<<16|c[e+31|0]<<24,s[t+24>>2]=c[e+24|0]|c[e+25|0]<<8|c[e+26|0]<<16|c[e+27|0]<<24,s[t+28>>2]=n,n=c[e+20|0]|c[e+21|0]<<8|c[e+22|0]<<16|c[e+23|0]<<24,s[t+16>>2]=c[e+16|0]|c[e+17|0]<<8|c[e+18|0]<<16|c[e+19|0]<<24,s[t+20>>2]=n,n=c[e+4|0]|c[e+5|0]<<8|c[e+6|0]<<16|c[e+7|0]<<24,s[t>>2]=c[0|e]|c[e+1|0]<<8|c[e+2|0]<<16|c[e+3|0]<<24,s[t+4>>2]=n,n=c[e+12|0]|c[e+13|0]<<8|c[e+14|0]<<16|c[e+15|0]<<24,s[t+8>>2]=c[e+8|0]|c[e+9|0]<<8|c[e+10|0]<<16|c[e+11|0]<<24,s[t+12>>2]=n,n=c[e+40|0]|c[e+41|0]<<8|c[e+42|0]<<16|c[e+43|0]<<24,s[t+32>>2]=c[e+36|0]|c[e+37|0]<<8|c[e+38|0]<<16|c[e+39|0]<<24,s[t+36>>2]=n,Vn[s[8957]](t,t,40,0,e+32|0,0,e),n=s[t+28>>2],r=s[t+24>>2],i[e+24|0]=r,i[e+25|0]=r>>>8,i[e+26|0]=r>>>16,i[e+27|0]=r>>>24,i[e+28|0]=n,i[e+29|0]=n>>>8,i[e+30|0]=n>>>16,i[e+31|0]=n>>>24,n=s[t+20>>2],r=s[t+16>>2],i[e+16|0]=r,i[e+17|0]=r>>>8,i[e+18|0]=r>>>16,i[e+19|0]=r>>>24,i[e+20|0]=n,i[e+21|0]=n>>>8,i[e+22|0]=n>>>16,i[e+23|0]=n>>>24,n=s[t+12>>2],r=s[t+8>>2],i[e+8|0]=r,i[e+9|0]=r>>>8,i[e+10|0]=r>>>16,i[e+11|0]=r>>>24,i[e+12|0]=n,i[e+13|0]=n>>>8,i[e+14|0]=n>>>16,i[e+15|0]=n>>>24,n=s[t+4>>2],r=s[t>>2],i[0|e]=r,i[e+1|0]=r>>>8,i[e+2|0]=r>>>16,i[e+3|0]=r>>>24,i[e+4|0]=n,i[e+5|0]=n>>>8,i[e+6|0]=n>>>16,i[e+7|0]=n>>>24,n=s[t+36>>2],r=s[t+32>>2],i[e+36|0]=r,i[e+37|0]=r>>>8,i[e+38|0]=r>>>16,i[e+39|0]=r>>>24,i[e+40|0]=n,i[e+41|0]=n>>>8,i[e+42|0]=n>>>16,i[e+43|0]=n>>>24,qt(e),y=t+48|0}function G(e,t,n){var r=0,o=0,i=0,a=0,s=0,d=0,u=0,l=0,A=0,f=0,h=0,g=0,p=0,m=0,v=0,y=0,b=0,I=0,C=0,E=0,w=0;for(o=2036477234,i=857760878,a=1634760805,s=1797285236,v=20,l=c[0|n]|c[n+1|0]<<8|c[n+2|0]<<16|c[n+3|0]<<24,m=c[n+4|0]|c[n+5|0]<<8|c[n+6|0]<<16|c[n+7|0]<<24,y=c[n+8|0]|c[n+9|0]<<8|c[n+10|0]<<16|c[n+11|0]<<24,g=c[n+12|0]|c[n+13|0]<<8|c[n+14|0]<<16|c[n+15|0]<<24,A=c[n+16|0]|c[n+17|0]<<8|c[n+18|0]<<16|c[n+19|0]<<24,d=c[n+20|0]|c[n+21|0]<<8|c[n+22|0]<<16|c[n+23|0]<<24,f=c[n+24|0]|c[n+25|0]<<8|c[n+26|0]<<16|c[n+27|0]<<24,h=c[n+28|0]|c[n+29|0]<<8|c[n+30|0]<<16|c[n+31|0]<<24,n=c[0|t]|c[t+1|0]<<8|c[t+2|0]<<16|c[t+3|0]<<24,u=c[t+4|0]|c[t+5|0]<<8|c[t+6|0]<<16|c[t+7|0]<<24,r=c[t+8|0]|c[t+9|0]<<8|c[t+10|0]<<16|c[t+11|0]<<24,t=c[t+12|0]|c[t+13|0]<<8|c[t+14|0]<<16|c[t+15|0]<<24;b=r,r=On(a+d|0,7)^g,p=b^On(r+a|0,9),I=On(r+p|0,13)^d,g=On(p+I|0,18),t=On(i+l|0,7)^t,f=On(t+i|0,9)^f,l=On(t+f|0,13)^l,E=On(f+l|0,18),h=On(n+o|0,7)^h,d=On(h+o|0,9)^m,C=On(d+h|0,13)^n,w=On(d+C|0,18),n=On(s+A|0,7)^y,u=On(n+s|0,9)^u,A=On(n+u|0,13)^A,b=On(u+A|0,18),l=On((a^=g)+n|0,7)^l,m=On(l+a|0,9)^d,y=On(l+m|0,13)^n,a=On(m+y|0,18)^a,n=On((i^=E)+r|0,7)^C,u=On(n+i|0,9)^u,g=On(n+u|0,13)^r,i=On(u+g|0,18)^i,A=On((o^=w)+t|0,7)^A,r=On(A+o|0,9)^p,t=On(r+A|0,13)^t,o=On(t+r|0,18)^o,d=On((s^=b)+h|0,7)^I,f=On(d+s|0,9)^f,h=On(d+f|0,13)^h,s=On(f+h|0,18)^s,p=v>>>0>2,v=v-2|0,p;);return Jt(e,a),Jt(e+4|0,i),Jt(e+8|0,o),Jt(e+12|0,s),Jt(e+16|0,n),Jt(e+20|0,u),Jt(e+24|0,r),Jt(e+28|0,t),0}function L(e,t,n,r,o,a,d){var u,l,A,f,h,g,p,m=0;return y=u=y-560|0,cn(u+352|0,d),Rt(u+288|0,a,32,0),Y(u+352|0,u+320|0,32,0),Y(u+352|0,n,r,o),Nt(u+352|0,u+224|0),l=c[(m=a)+32|0]|c[m+33|0]<<8|c[m+34|0]<<16|c[m+35|0]<<24,A=c[m+36|0]|c[m+37|0]<<8|c[m+38|0]<<16|c[m+39|0]<<24,f=c[m+40|0]|c[m+41|0]<<8|c[m+42|0]<<16|c[m+43|0]<<24,h=c[m+44|0]|c[m+45|0]<<8|c[m+46|0]<<16|c[m+47|0]<<24,g=c[m+48|0]|c[m+49|0]<<8|c[m+50|0]<<16|c[m+51|0]<<24,a=c[m+52|0]|c[m+53|0]<<8|c[m+54|0]<<16|c[m+55|0]<<24,p=c[m+60|0]|c[m+61|0]<<8|c[m+62|0]<<16|c[m+63|0]<<24,m=c[m+56|0]|c[m+57|0]<<8|c[m+58|0]<<16|c[m+59|0]<<24,i[e+56|0]=m,i[e+57|0]=m>>>8,i[e+58|0]=m>>>16,i[e+59|0]=m>>>24,i[e+60|0]=p,i[e+61|0]=p>>>8,i[e+62|0]=p>>>16,i[e+63|0]=p>>>24,i[e+48|0]=g,i[e+49|0]=g>>>8,i[e+50|0]=g>>>16,i[e+51|0]=g>>>24,i[e+52|0]=a,i[e+53|0]=a>>>8,i[e+54|0]=a>>>16,i[e+55|0]=a>>>24,i[e+40|0]=f,i[e+41|0]=f>>>8,i[e+42|0]=f>>>16,i[e+43|0]=f>>>24,i[e+44|0]=h,i[e+45|0]=h>>>8,i[e+46|0]=h>>>16,i[e+47|0]=h>>>24,i[0|(a=e+32|0)]=l,i[a+1|0]=l>>>8,i[a+2|0]=l>>>16,i[a+3|0]=l>>>24,i[a+4|0]=A,i[a+5|0]=A>>>8,i[a+6|0]=A>>>16,i[a+7|0]=A>>>24,B(u+224|0),ie(u,u+224|0),ct(e,u),cn(u+352|0,d),Y(u+352|0,e,64,0),Y(u+352|0,n,r,o),Nt(u+352|0,u+160|0),B(u+160|0),i[u+288|0]=248&c[u+288|0],i[u+319|0]=63&c[u+319|0]|64,function(e,t,n,r){var o,a,s,d,u,l,A,f,h,g,p,m,v,y,b,I,E,w,B,_,S,k,O,Q,R,P,N,x,D,M,T,U,H,j,J,F,G,L,q,Y,V,W,K,Z,z,X,$,ee,te=0,ne=0,re=0,oe=0,ie=0,ae=0,se=0,ce=0,de=0,ue=0,le=0,Ae=0,fe=0,he=0,ge=0,pe=0,me=0,ve=0,ye=0,be=0,Ie=0,Ce=0,Ee=0,we=0,Be=0,_e=0,Se=0,ke=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]<<16|c[r+13|0]<<24,Fe=kt(r+13|0),xe=C,Pe=c[r+15|0]|c[r+16|0]<<8|c[r+17|0]<<16|c[r+18|0]<<24,We=kt(r+18|0),Se=C,we=kt(r+21|0),t=fn(o=t>>>7|0,0,a=2097151&((3&oe)<<30|de>>>2),0),ae=C,oe=t,t=fn(s=2097151&((3&n)<<30|ce>>>2),0,d=re>>>7|0,0),n=C+ae|0,ae=re=oe+t|0,re=t>>>0>re>>>0?n+1|0:n,t=fn(a,0,s,0),oe=C,te=(n=fn(u=te>>>5&2097151,0,d,0))+t|0,t=C+oe|0,n=t=n>>>0>te>>>0?t+1|0:t,t=fn(o,0,l=se>>>5&2097151,0),n=C+n|0,se=te=t+te|0,Ee=n=t>>>0>te>>>0?n+1|0:n,be=(t=te)- -1048576|0,Ie=n=n-((t>>>0<4293918720)-1|0)|0,t=(te=n>>21)+re|0,de=t=(n=(2097151&n)<<11|be>>>21)>>>0>(re=oe=n+ae|0)>>>0?t+1|0:t,Be=(t=re)- -1048576|0,ce=ae=de-((t>>>0<4293918720)-1|0)|0,oe=fn(o,0,d,0),n=ke=(Ue=C)-(((t=oe)>>>0<4293918720)-1|0)|0,te=ae>>21,ke=(2097151&ae)<<11|Be>>>21,oe=t-(ae=-2097152&(Te=t- -1048576|0))|0,t=(Ue-((t>>>0>>0)+n|0)|0)+te|0,U=t=oe>>>0>(P=ke+oe|0)>>>0?t+1|0:t,ae=fn(P,t,-683901,-1),oe=C,H=t=n>>21,t=fn(x=(2097151&n)<<11|Te>>>21,t,136657,0),te=C+oe|0,ke=n=t+ae|0,ae=t>>>0>n>>>0?te+1|0:te,t=fn(A=2097151&((1&Ae)<<31|Ye>>>1),0,a,0),n=C,te=t,t=fn(f=pe>>>4&2097151,0,d,0),n=C+n|0,n=t>>>0>(te=te+t|0)>>>0?n+1|0:n,t=fn(h=ie>>>6&2097151,0,l,0),n=C+n|0,n=t>>>0>(te=t+te|0)>>>0?n+1|0:n,R=t=0,oe=te,te=fn(g=2097151&je,t,p=2097151&((7&he)<<29|Ge>>>3),0),t=C+n|0,t=te>>>0>(oe=oe+te|0)>>>0?t+1|0:t,te=fn(m=2097151&((7&ne)<<29|Le>>>3),0,v=2097151&Qe,0),n=C+t|0,n=te>>>0>(oe=te+oe|0)>>>0?n+1|0:n,t=fn(u,0,y=fe>>>6&2097151,0),te=C+n|0,te=t>>>0>(oe=t+oe|0)>>>0?te+1|0:te,n=fn(s,0,b=2097151&((1&le)<<31|Re>>>1),0),t=C+te|0,n=n>>>0>(te=oe=n+oe|0)>>>0?t+1|0:t,t=fn(o,0,I=ye>>>4&2097151,0),n=C+n|0,he=te=t+te|0,oe=t>>>0>te>>>0?n+1|0:n,t=fn(a,0,f,0),n=C,ne=(te=t)+(t=fn(E=ge>>>7&2097151,0,d,0))|0,te=C+n|0,te=t>>>0>ne>>>0?te+1|0:te,n=fn(l,0,A,0),t=C+te|0,t=n>>>0>(ne=n+ne|0)>>>0?t+1|0:t,te=fn(h,0,v,0),n=C+t|0,n=te>>>0>(ne=te+ne|0)>>>0?n+1|0:n,t=fn(g,R,y,0),n=C+n|0,n=t>>>0>(te=t+ne|0)>>>0?n+1|0:n,ne=(t=te)+(te=fn(p,0,m,0))|0,t=C+n|0,t=te>>>0>ne>>>0?t+1|0:t,n=fn(u,0,b,0),te=C+t|0,te=n>>>0>(ne=n+ne|0)>>>0?te+1|0:te,n=fn(s,0,I,0),t=C+te|0,n=n>>>0>(te=ne=n+ne|0)>>>0?t+1|0:t,t=fn(o,0,w=ve>>>7&2097151,0),n=C+n|0,pe=te=t+te|0,ie=n=t>>>0>te>>>0?n+1|0:n,Ae=(t=te)- -1048576|0,ne=n=n-((t>>>0<4293918720)-1|0)|0,t=(te=n>>21)+oe|0,n=t=(n=(2097151&n)<<11|Ae>>>21)>>>0>(ge=n+he|0)>>>0?t+1|0:t,t=t+ae|0,t=(te=oe=ge)>>>0>(ge=te+ke|0)>>>0?t+1|0:t,ae=(ae=n)-(((n=oe)>>>0<4293918720)-1|0)|0,le=n- -1048576|0,fe=(n=te=ge)-(te=-2097152&le)|0,he=t-((oe=ae)+(n>>>0>>0)|0)|0,D=re-(t=-2097152&Be)|0,j=n=de-((t>>>0>re>>>0)+ce|0)|0,t=fn(x,H,-997805,-1),te=C+ie|0,te=t>>>0>(re=t+pe|0)>>>0?te+1|0:te,ie=(t=re)+(re=fn(P,U,136657,0))|0,t=C+te|0,n=fn(D,n,-683901,-1),t=C+(re>>>0>ie>>>0?t+1|0:t)|0,t=n>>>0>(te=n+ie|0)>>>0?t+1|0:t,ae=te-(n=-2097152&Ae)|0,ie=t-((n>>>0>te>>>0)+ne|0)|0,t=fn(a,0,E,0),te=C,re=(n=fn(B=2097151&((3&ue)<<30|qe>>>2),0,d,0))+t|0,t=C+te|0,t=n>>>0>re>>>0?t+1|0:t,te=fn(l,0,f,0),n=C+t|0,n=te>>>0>(re=te+re|0)>>>0?n+1|0:n,t=fn(A,0,v,0),te=C+n|0,te=t>>>0>(re=t+re|0)>>>0?te+1|0:te,n=fn(h,0,p,0),t=C+te|0,t=n>>>0>(re=n+re|0)>>>0?t+1|0:t,te=fn(g,R,b,0),n=C+t|0,n=te>>>0>(re=te+re|0)>>>0?n+1|0:n,te=fn(m,0,y,0),t=C+n|0,t=te>>>0>(re=te+re|0)>>>0?t+1|0:t,te=fn(u,0,I,0),n=C+t|0,n=te>>>0>(re=te+re|0)>>>0?n+1|0:n,t=fn(s,0,w,0),te=C+n|0,te=t>>>0>(re=t+re|0)>>>0?te+1|0:te,n=fn(o,0,_=2097151&((3&Oe)<<30|Ve>>>2),0),t=C+te|0,re=n>>>0>(ne=re=n+re|0)>>>0?t+1|0:t,t=fn(a,0,B,0),n=C,te=t,t=fn(S=Ce>>>5&2097151,0,d,0),n=C+n|0,n=t>>>0>(te=te+t|0)>>>0?n+1|0:n,ce=(t=fn(l,0,E,0))+te|0,te=C+n|0,te=t>>>0>ce>>>0?te+1|0:te,n=fn(f,0,v,0),t=C+te|0,t=n>>>0>(ce=n+ce|0)>>>0?t+1|0:t,n=fn(A,0,p,0),t=C+t|0,t=n>>>0>(te=n+ce|0)>>>0?t+1|0:t,ce=(n=te)+(te=fn(h,0,y,0))|0,n=C+t|0,n=te>>>0>ce>>>0?n+1|0:n,t=fn(g,R,I,0),n=C+n|0,n=t>>>0>(te=t+ce|0)>>>0?n+1|0:n,ce=(t=fn(m,0,b,0))+te|0,te=C+n|0,te=t>>>0>ce>>>0?te+1|0:te,n=fn(u,0,w,0),t=C+te|0,t=n>>>0>(ce=n+ce|0)>>>0?t+1|0:t,n=fn(s,0,_,0),t=C+t|0,n=t=n>>>0>(te=n+ce|0)>>>0?t+1|0:t,t=fn(o,0,k=me>>>5&2097151,0),n=C+n|0,ge=te=t+te|0,qe=n=t>>>0>te>>>0?n+1|0:n,ee=(t=te)- -1048576|0,Ye=te=n-((t>>>0<4293918720)-1|0)|0,t=(t=te>>21)+re|0,pe=te=(n=(2097151&te)<<11|ee>>>21)+ne|0,Le=t=n>>>0>te>>>0?t+1|0:t,Ve=(t=te)- -1048576|0,je=te=Le-((t>>>0<4293918720)-1|0)|0,n=(t=te>>21)+ie|0,Ae=re=(te=(2097151&te)<<11|Ve>>>21)+ae|0,Ue=n=te>>>0>re>>>0?n+1|0:n,Re=(t=re)- -1048576|0,ke=te=n-((t>>>0<4293918720)-1|0)|0,t=(t=te>>21)+he|0,ie=te=(n=(2097151&te)<<11|Re>>>21)+fe|0,me=te=(Be=t=n>>>0>te>>>0?t+1|0:t)-(((t=te)>>>0<4293918720)-1|0)|0,de=(2097151&te)<<11|(Qe=t- -1048576|0)>>>21,ne=te>>21,t=fn(a,0,h,0),n=C,te=t,t=fn(d,0,A,0),n=C+n|0,n=t>>>0>(te=te+t|0)>>>0?n+1|0:n,t=fn(g,R,v,0),n=C+n|0,n=t>>>0>(te=t+te|0)>>>0?n+1|0:n,re=(t=te)+(te=fn(l,0,m,0))|0,t=C+n|0,t=te>>>0>re>>>0?t+1|0:t,n=fn(u,0,p,0),te=C+t|0,te=n>>>0>(re=n+re|0)>>>0?te+1|0:te,n=fn(s,0,y,0),t=C+te|0,t=n>>>0>(re=n+re|0)>>>0?t+1|0:t,te=fn(o,0,b,0),n=C+t|0,n=te>>>0>(re=te+re|0)>>>0?n+1|0:n,te=fn(x,H,-683901,-1),n=(t=n)+C|0,n=te>>>0>(ae=re+te|0)>>>0?n+1|0:n,te=ae,ae=(ae=t)-(((t=re)>>>0<4293918720)-1|0)|0,Ce=t- -1048576|0,ce=(t=te)-(te=-2097152&Ce)|0,te=n-((re=ae)+(t>>>0>>0)|0)|0,t=(t=oe>>21)+te|0,t=(n=(2097151&oe)<<11|le>>>21)>>>0>(oe=n+ce|0)>>>0?t+1|0:t,ae=(n=oe)-(te=-2097152&(ue=n- -1048576|0))|0,te=(t-((n>>>0>>0)+(oe=ce=t-((n>>>0<4293918720)-1|0)|0)|0)|0)+ne|0,J=de=ae+de|0,F=te=ae>>>0>de>>>0?te+1|0:te,ce=fn(de,te,-683901,-1),ae=C,n=fn(l,0,g,R),t=C,te=n,n=fn(d,0,h,0),t=C+t|0,t=n>>>0>(te=te+n|0)>>>0?t+1|0:t,ne=(n=te)+(te=fn(a,0,m,0))|0,n=C+t|0,n=te>>>0>ne>>>0?n+1|0:n,te=fn(u,0,v,0),t=C+n|0,t=te>>>0>(ne=te+ne|0)>>>0?t+1|0:t,te=fn(s,0,p,0),n=C+t|0,n=te>>>0>(ne=te+ne|0)>>>0?n+1|0:n,t=fn(o,0,y,0),te=C+n|0,te=t>>>0>(ne=t+ne|0)>>>0?te+1|0:te,t=(t=re>>21)+te|0,ve=ne=(t=(n=(2097151&re)<<11|Ce>>>21)>>>0>(re=n+ne|0)>>>0?t+1|0:t)-(((n=re)>>>0<4293918720)-1|0)|0,re=n-(te=-2097152&(Ne=n- -1048576|0))|0,te=(t-((n>>>0>>0)+ne|0)|0)+(oe>>21)|0,G=re=(t=(2097151&oe)<<11|ue>>>21)+re|0,L=te=t>>>0>re>>>0?te+1|0:te,n=fn(re,te,136657,0),t=C+ae|0,Ge=te=n+ce|0,ye=n>>>0>te>>>0?t+1|0:t,n=fn(v,0,S,0),t=C,te=n,n=fn(O=2097151&De,0,l,0),t=C+t|0,t=n>>>0>(te=te+n|0)>>>0?t+1|0:t,re=(n=te)+(te=fn(p,0,B,0))|0,n=C+t|0,n=te>>>0>re>>>0?n+1|0:n,t=fn(y,0,E,0),te=C+n|0,te=t>>>0>(re=t+re|0)>>>0?te+1|0:te,n=fn(f,0,b,0),t=C+te|0,t=n>>>0>(re=n+re|0)>>>0?t+1|0:t,te=fn(A,0,I,0),n=C+t|0,n=te>>>0>(re=te+re|0)>>>0?n+1|0:n,te=fn(h,0,w,0),t=C+n|0,t=te>>>0>(re=te+re|0)>>>0?t+1|0:t,te=fn(g,R,k,0),n=C+t|0,n=te>>>0>(re=te+re|0)>>>0?n+1|0:n,t=fn(m,0,_,0),te=C+n|0,te=t>>>0>(re=t+re|0)>>>0?te+1|0:te,n=fn(u,0,Q=2097151&He,0),t=C+te|0,t=n>>>0>(re=n+re|0)>>>0?t+1|0:t,oe=re=(te=(c[r+23|0]|c[r+24|0]<<8|c[r+25|0]<<16|c[r+26|0]<<24)>>>5&2097151)+re|0,re=te>>>0>re>>>0?t+1|0:t,t=fn(p,0,S,0),n=C,te=t,t=fn(v,0,O,0),n=C+n|0,n=t>>>0>(te=te+t|0)>>>0?n+1|0:n,ne=(t=fn(y,0,B,0))+te|0,te=C+n|0,te=t>>>0>ne>>>0?te+1|0:te,n=fn(b,0,E,0),t=C+te|0,t=n>>>0>(ne=n+ne|0)>>>0?t+1|0:t,n=fn(f,0,I,0),t=C+t|0,t=n>>>0>(te=n+ne|0)>>>0?t+1|0:t,ne=(n=te)+(te=fn(A,0,w,0))|0,n=C+t|0,n=te>>>0>ne>>>0?n+1|0:n,t=fn(h,0,_,0),n=C+n|0,n=t>>>0>(te=t+ne|0)>>>0?n+1|0:n,ne=(t=fn(g,R,Q,0))+te|0,te=C+n|0,te=t>>>0>ne>>>0?te+1|0:te,n=fn(m,0,k,0),t=C+te|0,t=n>>>0>(ne=n+ne|0)>>>0?t+1|0:t,ne=te=(n=2097151&we)+ne|0,fe=te=(le=t=n>>>0>te>>>0?t+1|0:t)-(((t=te)>>>0<4293918720)-1|0)|0,t=(2097151&te)<<11|(Oe=t- -1048576|0)>>>21,te=(te>>>21|0)+re|0,ue=te=t>>>0>(oe=t+oe|0)>>>0?te+1|0:te,De=se-(t=-2097152&be)|0,we=Ee-((t>>>0>se>>>0)+Ie|0)|0,n=fn(a,0,u,0),t=C,te=n,n=fn(d,0,g,R),t=C+t|0,t=n>>>0>(te=te+n|0)>>>0?t+1|0:t,re=(n=te)+(te=fn(s,0,l,0))|0,n=C+t|0,n=te>>>0>re>>>0?n+1|0:n,t=fn(o,0,v,0),te=C+n|0,te=t>>>0>(re=t+re|0)>>>0?te+1|0:te,ae=re,t=fn(d,0,m,0),n=C,re=t,t=fn(a,0,g,R),n=C+n|0,n=t>>>0>(re=re+t|0)>>>0?n+1|0:n,se=(t=re)+(re=fn(l,0,u,0))|0,t=C+n|0,t=re>>>0>se>>>0?t+1|0:t,n=fn(s,0,v,0),t=C+t|0,t=n>>>0>(re=n+se|0)>>>0?t+1|0:t,se=(n=re)+(re=fn(o,0,p,0))|0,n=C+t|0,de=n=re>>>0>se>>>0?n+1|0:n,Ee=(t=re=se)- -1048576|0,ce=se=n-((t>>>0<4293918720)-1|0)|0,n=(t=se>>21)+te|0,ae=n=(te=ae=(se=(2097151&se)<<11|Ee>>>21)+ae|0)>>>0>>0?n+1|0:n,Ie=(t=te)- -1048576|0,n=(t=(se=be=n-((t>>>0<4293918720)-1|0)|0)>>21)+we|0,q=n=(be=(2097151&se)<<11|Ie>>>21)>>>0>(N=De=be+De|0)>>>0?n+1|0:n,we=fn(N,n,470296,0),be=C,M=te-(n=-2097152&Ie)|0,Te=t=ae-((n>>>0>te>>>0)+se|0)|0,n=fn(D,j,666643,0),te=C+be|0,te=n>>>0>(se=n+we|0)>>>0?te+1|0:te,n=fn(M,t,654183,0),t=C+te|0,n=n>>>0>(ae=se=n+se|0)>>>0?t+1|0:t,t=re-(te=-2097152&Ee)|0,te=(ve>>21)+(se=de-((te>>>0>re>>>0)+ce|0)|0)|0,Y=ce=(re=(2097151&ve)<<11|Ne>>>21)+t|0,He=te=re>>>0>ce>>>0?te+1|0:te,Ke=oe- -1048576|0,re=se=ue-((oe>>>0<4293918720)-1|0)|0,t=fn(ce,te,-997805,-1),n=C+n|0,t=(n=t>>>0>(te=t+ae|0)>>>0?n+1|0:n)+ue|0,t=te>>>0>(oe=te+oe|0)>>>0?t+1|0:t,we=(te=oe)-(n=-2097152&Ke)|0,be=t-((n>>>0>te>>>0)+re|0)|0,t=fn(M,Te,470296,0),n=C,oe=(te=t)+(t=fn(N,q,666643,0))|0,te=C+n|0,te=t>>>0>oe>>>0?te+1|0:te,n=fn(ce,He,654183,0),t=C+te|0,n=le+(n>>>0>(oe=n+oe|0)>>>0?t+1|0:t)|0,ue=(te=ne+oe|0)-(t=-2097152&Oe)|0,se=(n=te>>>0>>0?n+1|0:n)-((t>>>0>te>>>0)+fe|0)|0,n=fn(y,0,S,0),t=C,te=n,n=fn(p,0,O,0),t=C+t|0,t=n>>>0>(te=te+n|0)>>>0?t+1|0:t,n=fn(b,0,B,0),t=C+t|0,t=n>>>0>(te=n+te|0)>>>0?t+1|0:t,oe=(n=te)+(te=fn(I,0,E,0))|0,n=C+t|0,n=te>>>0>oe>>>0?n+1|0:n,t=fn(f,0,w,0),te=C+n|0,te=t>>>0>(oe=t+oe|0)>>>0?te+1|0:te,t=fn(A,0,_,0),n=C+te|0,n=t>>>0>(oe=t+oe|0)>>>0?n+1|0:n,te=fn(h,0,k,0),t=C+n|0,t=te>>>0>(oe=te+oe|0)>>>0?t+1|0:t,n=fn(m,0,Q,0),t=C+t|0,t=n>>>0>(te=n+oe|0)>>>0?t+1|0:t,n=te,oe=(te=2097151&((7&Se)<<29|We>>>3))>>>0>(ne=oe=n+te|0)>>>0?t+1|0:t,t=fn(b,0,S,0),n=C,ae=(te=t)+(t=fn(y,0,O,0))|0,te=C+n|0,te=t>>>0>ae>>>0?te+1|0:te,n=fn(I,0,B,0),t=C+te|0,t=n>>>0>(ae=n+ae|0)>>>0?t+1|0:t,te=fn(w,0,E,0),n=C+t|0,n=te>>>0>(ae=te+ae|0)>>>0?n+1|0:n,te=fn(f,0,_,0),t=C+n|0,t=te>>>0>(ae=te+ae|0)>>>0?t+1|0:t,te=fn(A,0,k,0),n=C+t|0,n=te>>>0>(ae=te+ae|0)>>>0?n+1|0:n,t=fn(h,0,Q,0),te=C+n|0,t=t>>>0>(n=ae=t+ae|0)>>>0?te+1|0:te,Ee=te=ae+(n=Pe>>>6&2097151)|0,he=te=(de=t=n>>>0>te>>>0?t+1|0:t)-(((t=te)>>>0<4293918720)-1|0)|0,t=(2097151&te)<<11|(Ie=t- -1048576|0)>>>21,te=(te>>>21|0)+oe|0,ce=te=t>>>0>(ne=t+ne|0)>>>0?te+1|0:te,ve=(t=ne)- -1048576|0,ae=te=te-((t>>>0<4293918720)-1|0)|0,t=(n=te>>>21|0)+se|0,le=oe=(te=(2097151&te)<<11|ve>>>21)+ue|0,Ce=te=(se=t=te>>>0>oe>>>0?t+1|0:t)-(((t=oe)>>>0<4293918720)-1|0)|0,t=(2097151&te)<<11|(fe=t- -1048576|0)>>>21,te=(te>>21)+be|0,t=(n=te=t>>>0>(oe=t+we|0)>>>0?te+1|0:te)+ye|0,ue=(ue=n)-(((n=oe)>>>0<4293918720)-1|0)|0,Ze=n- -1048576|0,ze=(n=te=Se=oe+Ge|0)-(te=-2097152&Ze)|0,_e=(t=oe>>>0>Se>>>0?t+1|0:t)-((oe=ue)+(n>>>0>>0)|0)|0,t=fn(G,L,-997805,-1),n=C+se|0,Ne=te=t+le|0,ue=t>>>0>te>>>0?n+1|0:n,n=fn(Y,He,470296,0),t=C,te=n,n=fn(M,Te,666643,0),t=C+t|0,t=(t=n>>>0>(te=te+n|0)>>>0?t+1|0:t)+ce|0,t=(n=te+ne|0)>>>0>>0?t+1|0:t,ve=(te=n)-(n=-2097152&ve)|0,ye=t-((n>>>0>te>>>0)+ae|0)|0,t=fn(Y,He,666643,0),n=C+de|0,le=te=t+Ee|0,se=t>>>0>te>>>0?n+1|0:n,n=fn(I,0,S,0),t=C,te=n,n=fn(b,0,O,0),t=C+t|0,t=n>>>0>(te=te+n|0)>>>0?t+1|0:t,n=fn(w,0,B,0),t=C+t|0,t=n>>>0>(te=n+te|0)>>>0?t+1|0:t,ne=(n=te)+(te=fn(_,0,E,0))|0,n=C+t|0,n=te>>>0>ne>>>0?n+1|0:n,t=fn(f,0,k,0),te=C+n|0,te=t>>>0>(ne=t+ne|0)>>>0?te+1|0:te,t=fn(A,0,Q,0),n=C+te|0,t=n=t>>>0>(ne=t+ne|0)>>>0?n+1|0:n,ae=ne=(te=2097151&((1&xe)<<31|Fe>>>1))+ne|0,ne=te>>>0>ne>>>0?t+1|0:t,n=fn(w,0,S,0),t=C,te=n,n=fn(I,0,O,0),t=C+t|0,t=n>>>0>(te=te+n|0)>>>0?t+1|0:t,ce=(n=te)+(te=fn(_,0,B,0))|0,n=C+t|0,n=te>>>0>ce>>>0?n+1|0:n,t=fn(k,0,E,0),n=C+n|0,n=t>>>0>(te=t+ce|0)>>>0?n+1|0:n,ce=(t=fn(f,0,Q,0))+te|0,te=C+n|0,t=t>>>0>(n=ce)>>>0?te+1|0:te,de=te=ce+(n=Je>>>4&2097151)|0,Je=te=(Oe=t=n>>>0>te>>>0?t+1|0:t)-(((t=te)>>>0<4293918720)-1|0)|0,t=(2097151&te)<<11|(We=t- -1048576|0)>>>21,te=(te>>>21|0)+ne|0,ce=ae=t+ae|0,xe=te=t>>>0>ae>>>0?te+1|0:te,Ge=(t=ae)- -1048576|0,Pe=te=te-((t>>>0<4293918720)-1|0)|0,t=(n=te>>>21|0)+se|0,Ee=te=(Se=(te=(te=(2097151&te)<<11|Ge>>>21)>>>0>(n=ne=te+le|0)>>>0?t+1|0:t)-(((t=-2097152&Ie)>>>0>n>>>0)+he|0)|0)-(((t=ae=n-t|0)>>>0<4293918720)-1|0)|0,n=(n=te>>21)+ye|0,we=te=(t=(2097151&te)<<11|(De=t- -1048576|0)>>>21)+ve|0,Ie=n=t>>>0>te>>>0?n+1|0:n,be=(t=te)- -1048576|0,ve=ne=n-((t>>>0<4293918720)-1|0)|0,T=ie-(t=-2097152&Qe)|0,Fe=te=Be-((t>>>0>ie>>>0)+me|0)|0,t=(n=ne>>21)+ue|0,t=(ne=(2097151&ne)<<11|be>>>21)>>>0>(ie=ne+Ne|0)>>>0?t+1|0:t,se=(ne=fn(J,F,136657,0))+(ie-(n=-2097152&fe)|0)|0,n=C+(t-((n>>>0>ie>>>0)+Ce|0)|0)|0,n=ne>>>0>se>>>0?n+1|0:n,te=fn(T,te,-683901,-1),t=C+n|0,se=ne=te+se|0,le=te=(ye=t=te>>>0>ne>>>0?t+1|0:t)-(((t=ne)>>>0<4293918720)-1|0)|0,n=(n=te>>21)+_e|0,ie=te=(t=(2097151&te)<<11|(Qe=t- -1048576|0)>>>21)+ze|0,fe=n=t>>>0>te>>>0?n+1|0:n,he=te=n-(((t=te)>>>0<4293918720)-1|0)|0,Ne=(2097151&te)<<11|(Be=t- -1048576|0)>>>21,Ce=te>>21,n=fn(l,0,S,0),t=C,te=n,n=fn(a,0,O,0),t=C+t|0,t=n>>>0>(te=te+n|0)>>>0?t+1|0:t,ne=(n=fn(v,0,B,0))+te|0,te=C+t|0,te=n>>>0>ne>>>0?te+1|0:te,t=fn(p,0,E,0),n=C+te|0,n=t>>>0>(ne=t+ne|0)>>>0?n+1|0:n,te=fn(f,0,y,0),t=C+n|0,t=te>>>0>(ne=te+ne|0)>>>0?t+1|0:t,te=fn(A,0,b,0),n=C+t|0,n=te>>>0>(ne=te+ne|0)>>>0?n+1|0:n,te=fn(h,0,I,0),t=C+n|0,t=te>>>0>(ne=te+ne|0)>>>0?t+1|0:t,n=fn(g,R,_,0),te=C+t|0,te=n>>>0>(ne=n+ne|0)>>>0?te+1|0:te,t=fn(m,0,w,0),n=C+te|0,n=t>>>0>(ne=t+ne|0)>>>0?n+1|0:n,te=fn(u,0,k,0),t=C+n|0,t=te>>>0>(ne=te+ne|0)>>>0?t+1|0:t,te=fn(s,0,Q,0),n=C+t|0,n=te>>>0>(ne=te+ne|0)>>>0?n+1|0:n,t=kt(r+26|0),te=2097151&((3&(te=C))<<30|t>>>2),t=n,me=ne=te+ne|0,ne=t=te>>>0>ne>>>0?t+1|0:t,t=fn(D,j,470296,0),n=C,_e=(te=t)+(t=fn(P,U,666643,0))|0,te=C+n|0,te=t>>>0>_e>>>0?te+1|0:te,t=fn(N,q,654183,0),n=C+te|0,n=t>>>0>(_e=t+_e|0)>>>0?n+1|0:n,t=fn(M,Te,-997805,-1),n=C+n|0,n=t>>>0>(te=t+_e|0)>>>0?n+1|0:n,_e=(t=te)+(te=fn(Y,He,136657,0))|0,t=C+n|0,t=(t=te>>>0>_e>>>0?t+1|0:t)+ne|0,t=(n=_e)>>>0>(te=n+me|0)>>>0?t+1|0:t,n=te,te=t,V=(t=me)- -1048576|0,ne=ue=ne-((t>>>0<4293918720)-1|0)|0,ue=n,te=(n=re>>21)+te|0,te=(t=(2097151&re)<<11|Ke>>>21)>>>0>(re=ue+t|0)>>>0?te+1|0:te,n=re-(t=-2097152&V)|0,me=fn(G,L,-683901,-1),t=(re=te-((t>>>0>re>>>0)+ne|0)|0)+C|0,te=t=me>>>0>(_e=n+me|0)>>>0?t+1|0:t,ue=re-(((t=n)>>>0<4293918720)-1|0)|0,W=t- -1048576|0,te=(n=oe>>21)+te|0,te=(t=(2097151&oe)<<11|Ze>>>21)>>>0>(oe=t+(me=_e)|0)>>>0?te+1|0:te,me=n=oe-(t=-2097152&W)|0,t=(oe=te-((t>>>0>oe>>>0)+(re=ue)|0)|0)+Ce|0,K=n- -1048576|0,ue=oe-((n>>>0<4293918720)-1|0)|0,Ke=(n=te=Ne=n+Ne|0)-(te=-2097152&K)|0,Ze=(me>>>0>n>>>0?t+1|0:t)-((n>>>0>>0)+(oe=ue)|0)|0,ze=ie-(t=-2097152&Be)|0,_e=fe-((t>>>0>ie>>>0)+he|0)|0,Ne=se-(t=-2097152&Qe)|0,Qe=ye-((t>>>0>se>>>0)+le|0)|0,n=fn(G,L,654183,0),t=C+Ie|0,t=n>>>0>(te=n+we|0)>>>0?t+1|0:t,se=((ie=te)-(n=-2097152&be)|0)+(te=fn(J,F,-997805,-1))|0,n=C+(t-((n>>>0>ie>>>0)+ve|0)|0)|0,n=te>>>0>se>>>0?n+1|0:n,te=fn(T,Fe,136657,0),t=C+n|0,Be=ie=te+se|0,se=te>>>0>ie>>>0?t+1|0:t,me=Ae-(t=-2097152&Re)|0,ye=Ue-((t>>>0>Ae>>>0)+ke|0)|0,t=fn(P,U,-997805,-1),n=C,te=t,t=fn(x,H,654183,0),n=C+n|0,n=t>>>0>(te=te+t|0)>>>0?n+1|0:n,t=fn(D,j,136657,0),n=C+n|0,n=t>>>0>(te=t+te|0)>>>0?n+1|0:n,ie=(t=te)+(te=fn(N,q,-683901,-1))|0,t=C+n|0,te=Le+(te>>>0>ie>>>0?t+1|0:t)|0,le=(n=ie+pe|0)-(t=-2097152&Ve)|0,fe=(te=n>>>0>>0?te+1|0:te)-((t>>>0>n>>>0)+je|0)|0,t=fn(P,U,654183,0),n=C,te=t,t=fn(x,H,470296,0),n=C+n|0,n=t>>>0>(te=te+t|0)>>>0?n+1|0:n,ie=(t=te)+(te=fn(D,j,-997805,-1))|0,t=C+n|0,n=ie+ge|0,te=qe+(te>>>0>ie>>>0?t+1|0:t)|0,ie=(t=fn(N,q,136657,0))+n|0,n=C+(n>>>0>>0?te+1|0:te)|0,n=t>>>0>ie>>>0?n+1|0:n,te=fn(M,Te,-683901,-1),t=C+n|0,t=te>>>0>(ie=te+ie|0)>>>0?t+1|0:t,pe=(te=ie)-(n=-2097152&ee)|0,Ae=t-((n>>>0>te>>>0)+Ye|0)|0,n=f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n=pe-((t>>>0<4293918720)-1|0)|0,t=(te=n>>21)+ye|0,Re=le=(n=(2097151&n)<<11|fe>>>21)+me|0,ke=t=n>>>0>le>>>0?t+1|0:t,t=fn(le,t,-683901,-1),n=C+se|0,le=te=t+Be|0,se=t>>>0>te>>>0?n+1|0:n,we=r-(t=-2097152&fe)|0,Be=Ae=pe-((t>>>0>r>>>0)+Ae|0)|0,n=fn(G,L,470296,0)+ae|0,t=Se+C|0,t=n>>>0>>0?t+1|0:t,ae=((te=n)-(r=-2097152&De)|0)+(n=fn(J,F,654183,0))|0,te=C+(t-((r>>>0>te>>>0)+Ee|0)|0)|0,t=fn(T,Fe,-997805,-1),n=C+(n>>>0>ae>>>0?te+1|0:te)|0,n=t>>>0>(r=t+ae|0)>>>0?n+1|0:n,te=(t=r)+(r=fn(Re,ke,136657,0))|0,t=C+n|0,t=r>>>0>te>>>0?t+1|0:t,r=fn(we,Ae,-683901,-1),n=C+t|0,pe=n=r>>>0>(te=r+te|0)>>>0?n+1|0:n,ye=(t=te)- -1048576|0,Ae=r=n-((t>>>0<4293918720)-1|0)|0,t=(t=r>>21)+se|0,ae=t=(n=(2097151&r)<<11|ye>>>21)>>>0>(r=n+le|0)>>>0?t+1|0:t,fe=(t=r)- -1048576|0,n=(t=(se=le=ae-((t>>>0<4293918720)-1|0)|0)>>21)+Qe|0,Qe=Ee=(le=(2097151&se)<<11|fe>>>21)+Ne|0,le=le>>>0>Ee>>>0?n+1|0:n,qe=r-(t=-2097152&fe)|0,Ye=ae-((t>>>0>r>>>0)+se|0)|0,je=te-(t=-2097152&ye)|0,Ue=pe-((t>>>0>te>>>0)+Ae|0)|0,t=fn(G,L,666643,0),te=C+(xe-(((n=-2097152&Ge)>>>0>ce>>>0)+Pe|0)|0)|0,te=t>>>0>(r=t+(ce-n|0)|0)>>>0?te+1|0:te,t=fn(J,F,470296,0),n=C+te|0,n=t>>>0>(r=t+r|0)>>>0?n+1|0:n,te=(t=r)+(r=fn(T,Fe,654183,0))|0,t=C+n|0,Ae=te,r=r>>>0>te>>>0?t+1|0:t,ce=ne-(t=-2097152&ve)|0,se=ue-((t>>>0>ne>>>0)+ge|0)|0,n=fn(P,U,470296,0),t=C,te=n,n=fn(x,H,666643,0),t=C+t|0,t=n>>>0>(te=te+n|0)>>>0?t+1|0:t,ne=(n=te)+(te=fn(D,j,654183,0))|0,n=C+t|0,n=te>>>0>ne>>>0?n+1|0:n,te=fn(N,q,-997805,-1),t=C+n|0,t=te>>>0>(ne=te+ne|0)>>>0?t+1|0:t,n=fn(M,Te,136657,0),te=C+t|0,te=n>>>0>(ne=n+ne|0)>>>0?te+1|0:te,t=fn(Y,He,-683901,-1),n=C+te|0,t=he+(t>>>0>(ne=t+ne|0)>>>0?n+1|0:n)|0,t=(te=ne+ie|0)>>>0>>0?t+1|0:t,n=(ne=te)-(te=-2097152&Ie)|0,te=t-((te>>>0>ne>>>0)+Ce|0)|0,t=(t=re>>21)+te|0,ae=re=(ne=n)+(n=(2097151&re)<<11|W>>>21)|0,ge=te=(ue=t=n>>>0>re>>>0?t+1|0:t)-(((t=re)>>>0<4293918720)-1|0)|0,n=(2097151&te)<<11|(Se=t- -1048576|0)>>>21,te=(te>>21)+se|0,be=re=n+ce|0,me=te=n>>>0>re>>>0?te+1|0:te,t=fn(re,te,-683901,-1),n=C+r|0,n=t>>>0>(te=t+Ae|0)>>>0?n+1|0:n,r=fn(Re,ke,-997805,-1),t=C+n|0,t=r>>>0>(te=r+te|0)>>>0?t+1|0:t,r=fn(we,Be,136657,0),n=C+t|0,ce=te=r+te|0,ne=r>>>0>te>>>0?n+1|0:n,n=fn(_,0,S,0),t=C,r=n,n=fn(w,0,O,0),t=C+t|0,t=n>>>0>(r=r+n|0)>>>0?t+1|0:t,n=fn(k,0,B,0),te=C+t|0,te=n>>>0>(r=n+r|0)>>>0?te+1|0:te,t=fn(Q,0,E,0),n=C+te|0,t=n=t>>>0>(r=t+r|0)>>>0?n+1|0:n,ie=r=(n=Me>>>7&2097151)+r|0,r=n>>>0>r>>>0?t+1|0:t,t=fn(k,0,S,0),n=C,te=t,t=fn(_,0,O,0),n=C+n|0,n=t>>>0>(te=te+t|0)>>>0?n+1|0:n,t=fn(Q,0,B,0),n=C+n|0,n=t>>>0>(te=t+te|0)>>>0?n+1|0:n,re=(t=te)+(te=2097151&((3&$)<<30|X>>>2))|0,t=n,se=re,fe=te=(re=t=te>>>0>re>>>0?t+1|0:t)-(((t=se)>>>0<4293918720)-1|0)|0,n=(n=te>>>21|0)+r|0,ie=te=(t=(2097151&te)<<11|(Pe=t- -1048576|0)>>>21)+ie|0,he=n=t>>>0>te>>>0?n+1|0:n,Ee=(t=te)- -1048576|0,pe=r=n-((t>>>0<4293918720)-1|0)|0,t=(n=r>>>21|0)+Oe|0,t=(r=de+((2097151&r)<<11|Ee>>>21)|0)>>>0>>0?t+1|0:t,de=((te=r)-(n=-2097152&We)|0)+(r=fn(J,F,666643,0))|0,n=C+(t-((n>>>0>te>>>0)+Je|0)|0)|0,n=r>>>0>de>>>0?n+1|0:n,t=fn(T,Fe,470296,0),n=C+n|0,n=t>>>0>(r=t+de|0)>>>0?n+1|0:n,te=(t=r)+(r=fn(be,me,136657,0))|0,t=C+n|0,t=r>>>0>te>>>0?t+1|0:t,n=fn(Re,ke,654183,0),t=C+t|0,t=n>>>0>(r=n+te|0)>>>0?t+1|0:t,n=fn(we,Be,-997805,-1),te=C+t|0,Ie=r=n+r|0,Ae=te=n>>>0>r>>>0?te+1|0:te,ve=(t=r)- -1048576|0,de=r=te-((t>>>0<4293918720)-1|0)|0,n=(t=r>>21)+ne|0,ne=te=(r=(2097151&r)<<11|ve>>>21)+ce|0,r=n=r>>>0>te>>>0?n+1|0:n,ce=te=n-(((t=te)>>>0<4293918720)-1|0)|0,n=(2097151&te)<<11|(ye=t- -1048576|0)>>>21,te=(te>>21)+Ue|0,Le=Ce=n+je|0,Ce=n>>>0>Ce>>>0?te+1|0:te,te=oe>>21,oe=(t=(2097151&oe)<<11|K>>>21)+(ae-(n=-2097152&Se)|0)|0,n=te+(ue-((n>>>0>ae>>>0)+ge|0)|0)|0,ue=n=t>>>0>oe>>>0?n+1|0:n,ge=n=n-(((t=oe)>>>0<4293918720)-1|0)|0,xe=te=n>>21,n=fn(Me=(2097151&n)<<11|(Se=t- -1048576|0)>>>21,te,-683901,-1),t=C+r|0,t=n>>>0>(te=n+ne|0)>>>0?t+1|0:t,je=te-(n=-2097152&ye)|0,Ue=t-((n>>>0>te>>>0)+ce|0)|0,t=fn(Me,xe,136657,0),n=C+Ae|0,n=t>>>0>(r=t+Ie|0)>>>0?n+1|0:n,Oe=r-(t=-2097152&ve)|0,Je=n-((t>>>0>r>>>0)+de|0)|0,r=(t=fn(T,Fe,666643,0))+(ie-(n=-2097152&Ee)|0)|0,n=C+(he-((n>>>0>ie>>>0)+pe|0)|0)|0,n=t>>>0>r>>>0?n+1|0:n,te=(t=r)+(r=fn(be,me,-997805,-1))|0,t=C+n|0,t=r>>>0>te>>>0?t+1|0:t,r=(n=fn(Re,ke,470296,0))+te|0,te=C+t|0,te=n>>>0>r>>>0?te+1|0:te,t=fn(we,Be,654183,0),n=C+te|0,he=r=t+r|0,ae=t>>>0>r>>>0?n+1|0:n,ne=re,n=fn(Q,0,S,0),t=C,r=n,n=fn(k,0,O,0),t=C+t|0,t=n>>>0>(r=r+n|0)>>>0?t+1|0:t,n=r,n=(r=z>>>5&2097151)>>>0>(te=n+r|0)>>>0?t+1|0:t,r=2097151&Z,re=fn(Q,0,O,0)+r|0,t=C,Ae=r=(pe=t=r>>>0>re>>>0?t+1|0:t)-(((t=re)>>>0<4293918720)-1|0)|0,ie=te,n=n+(te=r>>>21|0)|0,de=n=(t=(2097151&r)<<11|(Ee=t- -1048576|0)>>>21)>>>0>(r=ie+t|0)>>>0?n+1|0:n,Ie=(t=r)- -1048576|0,ce=n=n-((t>>>0<4293918720)-1|0)|0,t=(te=n>>>21|0)+ne|0,t=(n=(2097151&n)<<11|Ie>>>21)>>>0>(ie=n+se|0)>>>0?t+1|0:t,ie=(te=fn(be,me,654183,0))+((ne=ie)-(n=-2097152&Pe)|0)|0,n=C+(t-((16383&fe)+(n>>>0>ne>>>0)|0)|0)|0,t=fn(Re,ke,666643,0),te=C+(te>>>0>ie>>>0?n+1|0:n)|0,te=t>>>0>(ne=t+ie|0)>>>0?te+1|0:te,n=fn(we,Be,470296,0),t=C+te|0,ve=ne=n+ne|0,se=t=n>>>0>ne>>>0?t+1|0:t,ye=(t=ne)- -1048576|0,ie=n=se-((t>>>0<4293918720)-1|0)|0,t=(te=n>>21)+ae|0,fe=ne=(n=(2097151&n)<<11|ye>>>21)+he|0,n=t=n>>>0>ne>>>0?t+1|0:t,he=(t=ne)- -1048576|0,t=(te=(ne=ae=n-((t>>>0<4293918720)-1|0)|0)>>21)+Je|0,ae=(ae=(2097151&ne)<<11|he>>>21)>>>0>(Oe=Pe=ae+Oe|0)>>>0?t+1|0:t,t=fn(Me,xe,-997805,-1);n=C+n|0,n=t>>>0>(te=t+fe|0)>>>0?n+1|0:n,Je=te-(t=-2097152&he)|0,Pe=n-((t>>>0>te>>>0)+ne|0)|0,t=fn(Me,xe,654183,0),n=C+se|0,n=t>>>0>(te=t+ve|0)>>>0?n+1|0:n,fe=te-(t=-2097152&ye)|0,he=n-((t>>>0>te>>>0)+ie|0)|0,te=(n=fn(be,me,470296,0))+(r-(t=-2097152&Ie)|0)|0,t=C+(de-((16383&ce)+(t>>>0>r>>>0)|0)|0)|0,t=n>>>0>te>>>0?t+1|0:t,r=(n=fn(we,Be,666643,0))+te|0,te=C+t|0,te=n>>>0>r>>>0?te+1|0:te,ne=r,r=(t=fn(be,me,666643,0))+(re-(n=-2097152&Ee)|0)|0,n=C+(pe-((4095&Ae)+(n>>>0>re>>>0)|0)|0)|0,se=n=t>>>0>r>>>0?n+1|0:n,Ae=(t=r)- -1048576|0,ie=re=n-((t>>>0<4293918720)-1|0)|0,te=(t=re>>21)+te|0,de=re=(n=(2097151&re)<<11|Ae>>>21)+ne|0,ne=te=n>>>0>re>>>0?te+1|0:te,ce=(t=re)- -1048576|0,re=te=te-((t>>>0<4293918720)-1|0)|0,n=(t=te>>21)+he|0,te=n=(te=(2097151&te)<<11|ce>>>21)>>>0>(pe=te+fe|0)>>>0?n+1|0:n,n=fn(Me,xe,470296,0),t=C+ne|0,t=n>>>0>(de=n+de|0)>>>0?t+1|0:t,n=de-(ne=-2097152&ce)|0,ne=t-((ne>>>0>de>>>0)+re|0)|0,ce=n,re=(t=fn(Me,xe,666643,0))+(r-(n=-2097152&Ae)|0)|0,n=C+(se-((n>>>0>r>>>0)+ie|0)|0)|0,t=(t=(n=t>>>0>re>>>0?n+1|0:n)>>21)+ne|0,ie=r=ce+(n=(2097151&n)<<11|(r=re)>>>21)|0,te=(n=(t=n>>>0>r>>>0?t+1|0:t)>>21)+te|0,ne=r=(t=(2097151&t)<<11|r>>>21)+pe|0,r=(2097151&(te=t>>>0>(n=r)>>>0?te+1|0:te))<<11|n>>>21,n=(t=te>>21)+Pe|0,de=te=r+Je|0,te=(n=r>>>0>(t=te)>>>0?n+1|0:n)>>21,n=(2097151&n)<<11|t>>>21,t=te+ae|0,Ie=r=n+Oe|0,n=(n=(t=n>>>0>r>>>0?t+1|0:t)>>21)+Ue|0,ve=r=(t=(2097151&t)<<11|r>>>21)+je|0,t=(t=(n=t>>>0>r>>>0?n+1|0:n)>>21)+Ce|0,ye=r=(n=(2097151&n)<<11|r>>>21)+Le|0,te=(n=(t=n>>>0>r>>>0?t+1|0:t)>>21)+Ye|0,fe=r=(t=(2097151&t)<<11|r>>>21)+qe|0,r=(2097151&(te=t>>>0>(n=r)>>>0?te+1|0:te))<<11|n>>>21,n=(t=te>>21)+le|0,he=te=r+Qe|0,te=(n=r>>>0>(t=te)>>>0?n+1|0:n)>>21,n=(2097151&n)<<11|t>>>21,t=te+_e|0,Ce=r=n+ze|0,n=(n=(t=n>>>0>r>>>0?t+1|0:t)>>21)+Ze|0,pe=r=(t=(2097151&t)<<11|r>>>21)+Ke|0,t=(n=t>>>0>r>>>0?n+1|0:n)>>21,se=(te=(2097151&n)<<11|r>>>21)+(n=oe-(r=-2097152&Se)|0)|0,te=(ue-((r>>>0>oe>>>0)+ge|0)|0)+t|0,Ae=se,ge=(2097151&(te=n>>>0>(t=se)>>>0?te+1|0:te))<<11|t>>>21,ae=n=te>>21,t=2097151&re,r=fn(ge,n,666643,0)+t|0,n=C,se=r,r=n=t>>>0>r>>>0?n+1|0:n,i[0|e]=se,i[e+1|0]=(255&n)<<24|se>>>8,re=e,n=2097151&ie,te=fn(ge,ae,470296,0)+n|0,t=C,t=n>>>0>te>>>0?t+1|0:t,ie=te,oe=(2097151&(te=r))<<11|se>>>21,te=t+(n=te>>21)|0,te=oe>>>0>(ie=ie+oe|0)>>>0?te+1|0:te,oe=ie,i[re+4|0]=(2047&te)<<21|oe>>>11,t=te,te=oe,i[re+3|0]=(7&t)<<29|te>>>3,te=2097151&ne,ne=fn(ge,ae,654183,0)+te|0,n=C,n=te>>>0>ne>>>0?n+1|0:n,te=ne,ne=(2097151&t)<<11|oe>>>21,t=(t>>21)+n|0,n=t=ne>>>0>(ie=te+ne|0)>>>0?t+1|0:t,i[re+6|0]=(63&t)<<26|ie>>>6,ne=0,t=ce=2097151&oe,i[re+2|0]=31&((65535&r)<<16|se>>>16)|t<<5,r=2097151&de,te=fn(ge,ae,-997805,-1)+r|0,t=C,r=t=r>>>0>te>>>0?t+1|0:t,t=n>>21,oe=(n=(2097151&n)<<11|ie>>>21)+te|0,te=t+r|0,se=oe,te=n>>>0>oe>>>0?te+1|0:te,i[re+9|0]=(511&te)<<23|oe>>>9,t=te,i[re+8|0]=(1&t)<<31|oe>>>1,oe=0,r=de=2097151&ie,i[re+5|0]=(524287&ne)<<13|ce>>>19|r<<2,r=2097151&Ie,te=fn(ge,ae,136657,0)+r|0,n=C,n=r>>>0>te>>>0?n+1|0:n,r=te,n=n+(te=t>>21)|0,ie=r=r+(t=(2097151&t)<<11|se>>>21)|0,n=t>>>0>r>>>0?n+1|0:n,i[re+12|0]=(4095&n)<<20|r>>>12,r=n,t=n,n=ie,i[re+11|0]=(15&t)<<28|n>>>4,re=0,n=ce=2097151&se,i[e+7|0]=(16383&oe)<<18|de>>>14|n<<7,te=e,n=2097151&ve,oe=fn(ge,ae,-683901,-1)+n|0,t=C,t=(t=n>>>0>oe>>>0?t+1|0:t)+(n=r>>21)|0,n=t=(r=(2097151&r)<<11|ie>>>21)>>>0>(ne=oe=r+oe|0)>>>0?t+1|0:t,i[te+14|0]=(127&t)<<25|ne>>>7,oe=0,r=se=2097151&ie,i[te+10|0]=(131071&re)<<15|ce>>>17|r<<4,r=te,t>>=21,te=(n=(2097151&n)<<11|ne>>>21)>>>0>(ie=n+(2097151&ye)|0)>>>0?t+1|0:t,i[r+17|0]=(1023&te)<<22|ie>>>10,t=te,i[r+16|0]=(3&t)<<30|ie>>>2,r=ae=2097151&ne,i[e+13|0]=(1048575&oe)<<12|se>>>20|r<<1,n=t,t>>=21,n=(te=(2097151&n)<<11|ie>>>21)>>>0>(ne=te+(2097151&fe)|0)>>>0?t+1|0:t,i[(r=e)+20|0]=(8191&n)<<19|ne>>>13,t=n,n=ne,i[r+19|0]=(31&t)<<27|n>>>5,n=se=2097151&ie,i[r+15|0]=(32767&re)<<17|ae>>>15|n<<6,n=t,t>>=21,n=(r=(2097151&n)<<11|ne>>>21)>>>0>(ae=r+(2097151&he)|0)>>>0?t+1|0:t,i[e+21|0]=ae,t=ne,i[e+18|0]=(262143&oe)<<14|se>>>18|t<<3,r=n,t=n,n=ae,i[e+22|0]=(255&t)<<24|n>>>8,n=t>>21,te=(t=(2097151&t)<<11|ae>>>21)>>>0>(ne=t+(2097151&Ce)|0)>>>0?n+1|0:n,i[e+25|0]=(2047&te)<<21|ne>>>11,t=te,te=ne,i[e+24|0]=(7&t)<<29|te>>>3,n=t>>21,n=(re=(2097151&t)<<11|ne>>>21)>>>0>(ie=re+(2097151&pe)|0)>>>0?n+1|0:n,re=ie,t=n,i[(te=e)+27|0]=(63&t)<<26|re>>>6,te=0,n=ie=2097151&ne,i[e+23|0]=31&((65535&r)<<16|ae>>>16)|n<<5,n=t,t>>=21,t=(n=(2097151&n)<<11|re>>>21)>>>0>(oe=n+(2097151&Ae)|0)>>>0?t+1|0:t,r=oe,i[e+31|0]=(131071&t)<<15|r>>>17,i[e+30|0]=(511&t)<<23|r>>>9,i[e+29|0]=(1&t)<<31|r>>>1,t=0,ne=re&=2097151,i[e+26|0]=(524287&te)<<13|ie>>>19|ne<<2,i[e+28|0]=(16383&t)<<18|ne>>>14|r<<7}(a,u+160|0,u+288|0,u+224|0),ht(u+288|0,64),ht(u+224|0,64),t&&(s[t>>2]=64,s[t+4>>2]=0),y=u+560|0,0}function q(e,t,n){var r,o=0,a=0;if(n>>>0>=512)return m(0|e,0|t,0|n),e;r=e+n|0;e:if(3&(e^t))if(r>>>0<4)n=e;else if((o=r-4|0)>>>0>>0)n=e;else for(n=e;i[0|n]=c[0|t],i[n+1|0]=c[t+1|0],i[n+2|0]=c[t+2|0],i[n+3|0]=c[t+3|0],t=t+4|0,o>>>0>=(n=n+4|0)>>>0;);else{t:if((0|n)<1)n=e;else if(3&e)for(n=e;;){if(i[0|n]=c[0|t],t=t+1|0,r>>>0<=(n=n+1|0)>>>0)break t;if(!(3&n))break}else n=e;if(!((o=-4&r)>>>0<64||(a=o+-64|0)>>>0>>0))for(;s[n>>2]=s[t>>2],s[n+4>>2]=s[t+4>>2],s[n+8>>2]=s[t+8>>2],s[n+12>>2]=s[t+12>>2],s[n+16>>2]=s[t+16>>2],s[n+20>>2]=s[t+20>>2],s[n+24>>2]=s[t+24>>2],s[n+28>>2]=s[t+28>>2],s[n+32>>2]=s[t+32>>2],s[n+36>>2]=s[t+36>>2],s[n+40>>2]=s[t+40>>2],s[n+44>>2]=s[t+44>>2],s[n+48>>2]=s[t+48>>2],s[n+52>>2]=s[t+52>>2],s[n+56>>2]=s[t+56>>2],s[n+60>>2]=s[t+60>>2],t=t- -64|0,a>>>0>=(n=n- -64|0)>>>0;);if(n>>>0>=o>>>0)break e;for(;s[n>>2]=s[t>>2],t=t+4|0,o>>>0>(n=n+4|0)>>>0;);}if(n>>>0>>0)for(;i[0|n]=c[0|t],t=t+1|0,(0|r)!=(0|(n=n+1|0)););return e}function Y(e,t,n,r){var o,a=0,d=0,u=0,l=0,A=0,f=0,h=0;if(y=o=y-704|0,n|r)if(a=r<<3|n>>>29,u=(h=s[(d=e)+72>>2])+(A=n<<3)|0,a=a+(l=s[d+76>>2])|0,f=u,s[d+72>>2]=u,a=u>>>0>>0?a+1|0:a,s[d+76>>2]=a,f=(A=(0|a)==(0|l)&h>>>0>f>>>0|a>>>0>>0)+s[(d=u=d- -64|0)>>2]|0,a=s[d+4>>2],a=A>>>0>f>>>0?a+1|0:a,u=(A=r>>>29|0)+f|0,s[d>>2]=u,s[d+4>>2]=u>>>0>>0?a+1|0:a,(0|(a=r))==(0|(f=0-((l=127&((7&l)<<29|h>>>3))>>>0>128)|0))&n>>>0>=(u=128-l|0)>>>0|a>>>0>f>>>0){for(d=0,a=0;i[80+(e+(A=d+l|0)|0)|0]=c[t+d|0],(0|u)!=(0|(d=d+1|0))|(0|(a=d>>>0<1?a+1|0:a))!=(0|f););if(w(e,e+80|0,o,a=o+640|0),t=t+u|0,!(r=r-((n>>>0>>0)+f|0)|0)&(n=n-u|0)>>>0>127|r)for(;w(e,t,o,a),t=t+128|0,!(r=r-(n>>>0<128)|0)&(n=n-128|0)>>>0>127|r;);if(n|r)for(d=0,a=0;i[80+(e+d|0)|0]=c[t+d|0],(0|n)!=(0|(d=l=d+1|0))|(0|r)!=(0|(a=l>>>0<1?a+1|0:a)););ht(o,704)}else for(d=n,u=(n=!r&n>>>0>1|0!=(0|r))?d:1,h=n?r:0,d=0,a=0;i[80+(e+(r=d+l|0)|0)|0]=c[t+d|0],(0|u)!=(0|(d=n=d+1|0))|(0|(a=n>>>0<1?a+1|0:a))!=(0|h););return y=o+704|0,0}function V(e,t,n,r,o,a,c,d){e|=0,t|=0,n|=0,r|=0,o|=0,a|=0,c|=0,d|=0;var u,l=0,A=0,f=0,h=0,g=0,p=0,m=0,v=0,b=0;y=u=y-16|0,s[u+12>>2]=0,En(d);e:{if(r){v=4&d;t:{n:{r:{for(;;){l=h;o:{i:{for(;;){if(p=i[n+l|0],255!=(0|(f=v?Fe(p):Ge(p))))break i;if(!o)break o;if(!nn(o,p))break r;if(!((l=l+1|0)>>>0>>0))break}e=h+1|0,s[u+12>>2]=e>>>0>>0?r:e;break n}if(m=(m<<6)+f|0,(f=A+6|0)>>>0<8)A=f;else{if(A=A-2|0,t>>>0<=g>>>0){s[u+12>>2]=l,s[8960]=68,l=1;break t}i[e+g|0]=m>>>A,g=g+1|0}if((h=l+1|0)>>>0>>0)continue}break}s[u+12>>2]=h;break n}s[u+12>>2]=l}l=0}if(!(A>>>0<=4)){e=-1;break e}}if(e=-1,!((-1<>2];;){n:{if(t>>>0<=a>>>0)s[8960]=68;else{if(61==(0|(c=i[e+a|0]))){o=o-1|0;break n}if(r&&nn(r,c))break n;s[8960]=28}d=-1;break t}if(a=a+1|0,s[n>>2]=a,!o)break}return d}(n,r,u+12|0,o,A>>>1|0)))){e=0;t:if(o&&!((l=s[u+12>>2])>>>0>=r>>>0)){n:{for(;;){if(!nn(o,i[n+l|0]))break n;if((0|(l=l+1|0))==(0|r))break}s[u+12>>2]=r;break t}s[u+12>>2]=l}b=g}}return t=s[u+12>>2],c?s[c>>2]=t+n:(0|t)!=(0|r)&&(s[8960]=28,e=-1),a&&(s[a>>2]=b),y=u+16|0,0|e}function W(e,t,n){var r,o,i,a=0;y=r=y-16|0,o=s[e+20>>2],s[e+20>>2]=0,i=s[e+4>>2],s[e+4>>2]=0,a=-26;e:{t:{n:switch(n-1|0){case 1:if(a=-32,qe(t,35621,9))break e;t=t+9|0;break t;case 0:break n;default:break e}if(a=-32,qe(t,35631,8))break e;t=t+8|0}if(!qe(t,35640,3)&&(t=Qe(t+3|0,r+12|0))){if(a=-26,19!=s[r+12>>2])break e;if(!qe(t,35644,3)&&(t=Qe(t+3|0,r+12|0))&&(s[e+44>>2]=s[r+12>>2],!qe(t,35648,3)&&(t=Qe(t+3|0,r+12|0))&&(s[e+40>>2]=s[r+12>>2],!qe(t,35652,3)&&(t=Qe(t+3|0,r+12|0))&&(n=s[r+12>>2],s[e+48>>2]=n,s[e+52>>2]=n,36==(0|(n=c[0|t]))&&(s[r+12>>2]=o,t=36==(0|n)?t+1|0:t,!V(s[e+16>>2],o,t,Oe(t),0,r+12|0,r+8|0,3)&&(s[e+20>>2]=s[r+12>>2],t=s[r+8>>2],36==(0|(n=c[0|t]))&&(s[r+12>>2]=i,t=36==(0|n)?t+1|0:t,!V(s[e>>2],i,t,Oe(t),0,r+12|0,r+8|0,3)))))))){if(s[e+4>>2]=s[r+12>>2],t=s[r+8>>2],a=le(e))break e;return y=r+16|0,c[0|t]?-32:0}}a=-32}return y=r+16|0,a}function K(e,t){var n;for(y=n=y-192|0,k(n+144|0,t),k(n+96|0,n+144|0),k(n+96|0,n+96|0),S(n+96|0,t,n+96|0),S(n+144|0,n+144|0,n+96|0),k(n+48|0,n+144|0),S(n+96|0,n+96|0,n+48|0),k(n+48|0,n+96|0),t=1;k(n+48|0,n+48|0),5!=(0|(t=t+1|0)););for(S(n+96|0,n+48|0,n+96|0),k(n+48|0,n+96|0),t=1;k(n+48|0,n+48|0),10!=(0|(t=t+1|0)););for(S(n+48|0,n+48|0,n+96|0),k(n,n+48|0),t=1;k(n,n),20!=(0|(t=t+1|0)););for(S(n+48|0,n,n+48|0),t=1;k(n+48|0,n+48|0),11!=(0|(t=t+1|0)););for(S(n+96|0,n+48|0,n+96|0),k(n+48|0,n+96|0),t=1;k(n+48|0,n+48|0),50!=(0|(t=t+1|0)););for(S(n+48|0,n+48|0,n+96|0),k(n,n+48|0),t=1;k(n,n),100!=(0|(t=t+1|0)););for(S(n+48|0,n,n+48|0),t=1;k(n+48|0,n+48|0),51!=(0|(t=t+1|0)););for(S(n+96|0,n+48|0,n+96|0),t=1;k(n+96|0,n+96|0),6!=(0|(t=t+1|0)););S(e,n+96|0,n+144|0),y=n+192|0}function Z(e,t){var n,r,o,a,c,d,l,A,f,h,g=0,p=0,m=0,v=0,y=0,b=0,I=0;(p=m=s[e+60>>2])|(g=s[e+56>>2])&&(m=g,i[(v=g+e|0)- -64|0]=1,!(p=(g=g+1|0)>>>0<1?p+1|0:p)&g>>>0<=15&&ae(v+65|0,0,15-m|0),i[e+80|0]=1,x(e,e- -64|0,16,0)),f=s[e+52>>2],h=s[e+48>>2],m=s[e+44>>2],I=s[e+24>>2],y=s[e+28>>2]+(I>>>26|0)|0,g=s[e+32>>2]+(y>>>26|0)|0,A=(n=(a=(-67108864|(o=s[e+36>>2]+(g>>>26|0)|0))+((l=(d=67108863&g)+((y=(b=67108863&y)+((p=(g=(67108863&I)+((p=s[e+20>>2]+u(o>>>26|0,5)|0)>>>26|0)|0)+((c=5+(v=67108863&p)|0)>>>26|0)|0)>>>26|0)|0)>>>26|0)|0)>>>26|0)|0)>>31)&g|(r=67108863&(I=(a>>>31|0)-1|0))&p,p=0,p=(g=v&n|r&c|A<<26)>>>0>(v=g+s[e+40>>2]|0)>>>0?1:p,Jt(t,v),y=(g=(b=b&n|y&r)<<20|A>>>6)+m|0,m=0,m=g>>>0>y>>>0?1:m,g=p,p=m,p=g>>>0>(y=g+y|0)>>>0?p+1|0:p,Jt(t+4|0,y),m=0,m=(g=(v=n&d|r&l)<<14|b>>>12)>>>0>(b=g+h|0)>>>0?1:m,g=p,p=m,p=g>>>0>(b=g+b|0)>>>0?p+1|0:p,Jt(t+8|0,b),Jt(m=t+12|0,p=p+(v=(t=(I&a|n&o)<<8|v>>>18)+f|0)|0),ht(e,88)}function z(e,t,n,r,o){e|=0,t|=0,n|=0,r|=0;var a=0,s=0,d=0,l=0,h=0,g=0,p=0,m=0,v=0;En(o|=0),s=(a=(r>>>0)/3|0)<<2,(a=u(a,-3)+r|0)&&(s=2&o?(2|s)+(a>>>1|0)|0:s+4|0);e:{t:{n:{r:{if(t>>>0>s>>>0){if(!(4&o)){if(d=0,!r)break n;o=0,a=0;break r}if(d=0,!r)break n;for(o=0,a=0;;){for(h=c[n+l|0]|h<<8,o=o+8|0;g=a,p=o,m=e+a|0,v=it(h>>>(o=o-6|0)&63),i[0|m]=v,a=a+1|0,o>>>0>5;);if((0|(l=l+1|0))==(0|r))break}if(d=a,!o)break n;m=e+a|0,v=it(h<<12-p&63),i[0|m]=v,d=g+2|0;break n}zt(),A()}for(;;){for(h=c[n+l|0]|h<<8,o=o+8|0;g=a,p=o,m=e+a|0,v=at(h>>>(o=o-6|0)&63),i[0|m]=v,a=a+1|0,o>>>0>5;);if((0|(l=l+1|0))==(0|r))break}d=a,o&&(m=e+a|0,v=at(h<<12-p&63),i[0|m]=v,d=g+2|0)}if((a=d)>>>0<=s>>>0){if(a>>>0>>0)break t;s=a;break e}f(35568,35587,230,35603),A()}ae(e+a|0,61,s-a|0)}return ae(e+s|0,0,(t>>>0>(n=s+1|0)>>>0?t:n)-s|0),0|e}function X(e,t,n,r){var o=0,a=0,d=0,u=0,l=0,A=0;e:{if((o=s[e+56>>2])|(a=s[e+60>>2])){if(A=e,l=d=16-o|0,l=(d=(0|(u=0-((o>>>0>16)+a|0)|0))==(0|r)&n>>>0>>0|r>>>0>>0)?n:l,(d=u=d?r:u)|l){if(i[(e+o|0)- -64|0]=c[0|t],a=1,o=0,1!=(0|l)|d)for(;u=a+s[e+56>>2]|0,i[(e+u|0)- -64|0]=c[t+a|0],(0|l)!=(0|(a=a+1|0))|(0|(o=a>>>0<1?o+1|0:o))!=(0|d););o=s[e+56>>2],a=s[e+60>>2]}if(u=o+l|0,o=a+d|0,a=u,s[A+56>>2]=a,o=a>>>0>>0?o+1|0:o,s[A+60>>2]=o,!o&a>>>0<16)break e;x(e,e- -64|0,16,0),s[e+56>>2]=0,s[e+60>>2]=0,n=(o=n)-(a=l)|0,r=r-((o>>>0>>0)+d|0)|0,t=t+a|0}if(!r&n>>>0>=16|r&&(x(e,t,o=-16&n,r),n&=15,r=0,t=t+o|0),n|r){for(a=0,o=0;A=a+s[e+56>>2]|0,i[(e+A|0)- -64|0]=c[t+a|0],(0|n)!=(0|(a=a+1|0))|(0|r)!=(0|(o=a>>>0<1?o+1|0:o)););t=e,o=n+s[e+56>>2]|0,e=r+s[e+60>>2]|0,s[t+56>>2]=o,s[t+60>>2]=n>>>0>o>>>0?e+1|0:e}}}function $(e,t){var n=0,r=0,o=0,i=0,a=0,l=0,A=0,f=0,h=0,g=0,p=0,m=0,v=0;e:if(e&&(2!=s[e+36>>2]||(o=s[t>>2],c[t+8|0]<2&&!o)?(function(e,t,n){var r,o=0,i=0,a=0;if(y=r=y-4096|0,Nn(r+3072|0),Nn(r+2048|0),!(!e|!t)&&(s[r+2048>>2]=s[t>>2],s[r+2052>>2]=0,s[r+2056>>2]=s[t+4>>2],s[r+2060>>2]=0,s[r+2064>>2]=c[t+8|0],s[r+2068>>2]=0,s[r+2072>>2]=s[e+16>>2],s[r+2076>>2]=0,s[r+2080>>2]=s[e+8>>2],s[r+2084>>2]=0,s[r+2088>>2]=s[e+36>>2],s[r+2092>>2]=0,s[e+20>>2]))for(t=0;(a=127&t)||(o=s[r+2100>>2],o=(i=s[r+2096>>2]+1|0)>>>0<1?o+1|0:o,s[r+2096>>2]=i,s[r+2100>>2]=o,Nn(r),Nn(r+1024|0),O(r+3072|0,r+2048|0,r),O(r+3072|0,r,r+1024|0)),a=s[4+(i=(r+1024|0)+(a<<3)|0)>>2],s[(o=(t<<3)+n|0)>>2]=s[i>>2],s[o+4>>2]=a,(t=t+1|0)>>>0>2];);y=r+4096|0}(e,t,f=s[e+4>>2]),o=s[t>>2],r=0):(f=s[e+4>>2],r=1),g=r,!((a=!((r=c[t+8|0])|o)<<1)>>>0>=(n=s[e+20>>2])>>>0)))for(i=s[e+24>>2],n=(o=(u(i,s[t+4>>2])+a|0)+u(n,r)|0)+((o>>>0)%(i>>>0)|0?-1:i-1|0)|0;;){if(h=1==((o>>>0)%(i>>>0)|0)?o-1|0:n,g?(l=s[e>>2],n=s[l+4>>2]+(h<<10)|0):(l=s[e>>2],n=(a<<3)+f|0),r=s[n+4>>2],p=s[n>>2],n=s[e+28>>2],s[t+12>>2]=a,r=(r>>>0)%(n>>>0)|0,A=s[t+4>>2],n=c[t+8|0]?r:A,l=s[l+4>>2],m=i,v=r,i=s[t>>2],A=(l+(u(m,n=(r=i)?v:n)<<10)|0)+(we(e,t,p,!0&(0|n)==(0|A))<<10)|0,r=l+(h<<10)|0,n=l+(o<<10)|0,i?O(r,A,n):Q(r,A,n),(a=a+1|0)>>>0>=d[e+20>>2])break e;o=o+1|0,n=h+1|0,i=s[e+24>>2]}}function ee(e,t,n){var r,o,i,a,c,d,u,l,A,f,h,g,p=0,m=0,v=0,y=0,b=0,I=0,C=0,E=0,w=0;r=s[t+4>>2],o=s[e+4>>2],i=s[t+8>>2],m=s[e+8>>2],a=s[t+12>>2],v=s[e+12>>2],c=s[t+16>>2],y=s[e+16>>2],d=s[t+20>>2],b=s[e+20>>2],u=s[t+24>>2],I=s[e+24>>2],l=s[t+28>>2],C=s[e+28>>2],A=s[t+32>>2],E=s[e+32>>2],f=s[t+36>>2],w=s[e+36>>2],g=(n=0-n|0)&((h=s[t>>2])^(p=s[e>>2])),s[e>>2]=g^p,p=w,w=n&(w^f),s[e+36>>2]=p^w,p=E,E=n&(E^A),s[e+32>>2]=p^E,p=C,C=n&(C^l),s[e+28>>2]=p^C,p=I,I=n&(I^u),s[e+24>>2]=p^I,p=b,b=n&(b^d),s[e+20>>2]=p^b,p=y,y=n&(y^c),s[e+16>>2]=p^y,p=v,v=n&(v^a),s[e+12>>2]=p^v,p=m,m=n&(m^i),s[e+8>>2]=p^m,p=e,e=n&(r^o),s[p+4>>2]=e^o,s[t+36>>2]=w^f,s[t+32>>2]=E^A,s[t+28>>2]=C^l,s[t+24>>2]=I^u,s[t+20>>2]=b^d,s[t+16>>2]=y^c,s[t+12>>2]=v^a,s[t+8>>2]=m^i,s[t+4>>2]=e^r,s[t>>2]=h^g}function te(e,t){var n;s[e>>2]=67108863&(c[0|t]|c[t+1|0]<<8|c[t+2|0]<<16|c[t+3|0]<<24),s[e+4>>2]=(c[t+3|0]|c[t+4|0]<<8|c[t+5|0]<<16|c[t+6|0]<<24)>>>2&67108611,s[e+8>>2]=(c[t+6|0]|c[t+7|0]<<8|c[t+8|0]<<16|c[t+9|0]<<24)>>>4&67092735,s[e+12>>2]=(c[t+9|0]|c[t+10|0]<<8|c[t+11|0]<<16|c[t+12|0]<<24)>>>6&66076671,n=c[t+12|0]|c[t+13|0]<<8|c[t+14|0]<<16|c[t+15|0]<<24,s[e+20>>2]=0,s[e+24>>2]=0,s[e+28>>2]=0,s[e+32>>2]=0,s[e+36>>2]=0,s[e+16>>2]=n>>>8&1048575,s[e+40>>2]=c[t+16|0]|c[t+17|0]<<8|c[t+18|0]<<16|c[t+19|0]<<24,s[e+44>>2]=c[t+20|0]|c[t+21|0]<<8|c[t+22|0]<<16|c[t+23|0]<<24,s[e+48>>2]=c[t+24|0]|c[t+25|0]<<8|c[t+26|0]<<16|c[t+27|0]<<24,t=c[t+28|0]|c[t+29|0]<<8|c[t+30|0]<<16|c[t+31|0]<<24,i[e+80|0]=0,s[e+56>>2]=0,s[e+60>>2]=0,s[e+52>>2]=t}function ne(e,t,n){var r=0;e:if((0|e)!=(0|t)){if((t-e|0)-n>>>0<=0-(n<<1)>>>0)return q(e,t,n);if(r=3&(e^t),e>>>0>>0){if(r)r=e;else{if(3&e)for(r=e;;){if(!n)break e;if(i[0|r]=c[0|t],t=t+1|0,n=n-1|0,!(3&(r=r+1|0)))break}else r=e;if(!(n>>>0<=3))for(;s[r>>2]=s[t>>2],t=t+4|0,r=r+4|0,(n=n-4|0)>>>0>3;);}if(n)for(;i[0|r]=c[0|t],r=r+1|0,t=t+1|0,n=n-1|0;);}else{if(!r){if(e+n&3)for(;;){if(!n)break e;if(i[0|(r=(n=n-1|0)+e|0)]=c[t+n|0],!(3&r))break}if(!(n>>>0<=3))for(;s[(n=n-4|0)+e>>2]=s[t+n>>2],n>>>0>3;);}if(!n)break e;for(;i[(n=n-1|0)+e|0]=c[t+n|0],n;);}}return e}function re(e,t){var n,r=0;y=n=y-48|0,function(e,t){var n,r,o,i,a,c,d,l,A=0;r=s[t+28>>2],o=s[t+24>>2],i=s[t+20>>2],a=s[t+16>>2],c=s[t+12>>2],d=s[t+8>>2],l=s[t+4>>2],A=s[t>>2],n=s[t+36>>2],t=s[t+32>>2],A=u(((r+(o+(i+(a+(c+(d+(l+(A+(u(n,19)+16777216>>>25|0)>>26)>>25)>>26)>>25)>>26)>>25)>>26)>>25)+t>>26)+n>>25,19)+A|0,s[e>>2]=67108863&A,A=l+(A>>26)|0,s[e+4>>2]=33554431&A,A=d+(A>>25)|0,s[e+8>>2]=67108863&A,A=c+(A>>26)|0,s[e+12>>2]=33554431&A,A=a+(A>>25)|0,s[e+16>>2]=67108863&A,A=i+(A>>26)|0,s[e+20>>2]=33554431&A,A=o+(A>>25)|0,s[e+24>>2]=67108863&A,A=r+(A>>26)|0,s[e+28>>2]=33554431&A,t=t+(A>>25)|0,s[e+32>>2]=67108863&t,s[e+36>>2]=n+(t>>26)&33554431}(n,t),t=s[n>>2],i[0|e]=t,i[e+2|0]=t>>>16,i[e+1|0]=t>>>8,r=s[n+4>>2],i[e+5|0]=r>>>14,i[e+4|0]=r>>>6,i[e+3|0]=r<<2|t>>>24,t=s[n+8>>2],i[e+8|0]=t>>>13,i[e+7|0]=t>>>5,i[e+6|0]=t<<3|r>>>22,r=s[n+12>>2],i[e+11|0]=r>>>11,i[e+10|0]=r>>>3,i[e+9|0]=r<<5|t>>>21,t=s[n+16>>2],i[e+15|0]=t>>>18,i[e+14|0]=t>>>10,i[e+13|0]=t>>>2,i[e+12|0]=t<<6|r>>>19,t=s[n+20>>2],i[e+16|0]=t,i[e+18|0]=t>>>16,i[e+17|0]=t>>>8,r=s[n+24>>2],i[e+21|0]=r>>>15,i[e+20|0]=r>>>7,i[e+19|0]=r<<1|t>>>24,t=s[n+28>>2],i[e+24|0]=t>>>13,i[e+23|0]=t>>>5,i[e+22|0]=t<<3|r>>>23,r=s[n+32>>2],i[e+27|0]=r>>>12,i[e+26|0]=r>>>4,i[e+25|0]=r<<4|t>>>21,t=s[n+36>>2],i[e+31|0]=t>>>18,i[e+30|0]=t>>>10,i[e+29|0]=t>>>2,i[e+28|0]=t<<6|r>>>20,y=n+48|0}function oe(e,t,n,r){var o=0,a=0,s=0,d=0,u=0,l=0;e:if(n|r)for(l=e+224|0,s=e+96|0,o=c[e+352|0]|c[e+353|0]<<8|c[e+354|0]<<16|c[e+355|0]<<24;;){if(d=96+(e+o|0)|0,u=a=256-o|0,!r&n>>>0<=a>>>0){q(d,t,n),t=n+(c[e+352|0]|c[e+353|0]<<8|c[e+354|0]<<16|c[e+355|0]<<24)|0,i[e+352|0]=t,i[e+353|0]=t>>>8,i[e+354|0]=t>>>16,i[e+355|0]=t>>>24;break e}if(q(d,t,a),o=(c[e+352|0]|c[e+353|0]<<8|c[e+354|0]<<16|c[e+355|0]<<24)+a|0,i[e+352|0]=o,i[e+353|0]=o>>>8,i[e+354|0]=o>>>16,i[e+355|0]=o>>>24,se(e,128),E(e,s),q(s,l,128),o=(c[e+352|0]|c[e+353|0]<<8|c[e+354|0]<<16|c[e+355|0]<<24)-128|0,i[e+352|0]=o,i[e+353|0]=o>>>8,i[e+354|0]=o>>>16,i[e+355|0]=o>>>24,t=t+a|0,!((n=(a=n)-u|0)|(r=r-(a>>>0>>0)|0)))break}return 0}function ie(e,t){var n,r=0,o=0,a=0,s=0;for(y=n=y-464|0;o=r<<1,s=c[t+r|0],i[o+(n+400|0)|0]=15&s,i[(n+400|0)+(1|o)|0]=s>>>4,32!=(0|(r=r+1|0)););for(r=0;t=((o=(t=r)+c[0|(r=(n+400|0)+a|0)]|0)<<24)- -134217728|0,i[0|r]=o-(t>>24&240),r=t>>28,63!=(0|(a=a+1|0)););for(i[n+463|0]=c[n+463|0]+r,Xt(e),r=1;gn(n,r>>>1|0,i[(n+400|0)+r|0]),ze(n+240|0,e,n),bt(e,n+240|0),t=r>>>0<62,r=r+2|0,t;);for(jt(n+240|0,e),St(n+120|0,n+240|0),et(n+240|0,n+120|0),St(n+120|0,n+240|0),et(n+240|0,n+120|0),St(n+120|0,n+240|0),et(n+240|0,n+120|0),bt(e,n+240|0),r=0;gn(n,r>>>1|0,i[(n+400|0)+r|0]),ze(n+240|0,e,n),bt(e,n+240|0),t=r>>>0<62,r=r+2|0,t;);y=n+464|0}function ae(e,t,n){var r=0,o=0,a=0,c=0;if(n&&(i[(r=e+n|0)-1|0]=t,i[0|e]=t,!(n>>>0<3||(i[r-2|0]=t,i[e+1|0]=t,i[r-3|0]=t,i[e+2|0]=t,n>>>0<7||(i[r-4|0]=t,i[e+3|0]=t,n>>>0<9||(o=(r=0-e&3)+e|0,t=u(255&t,16843009),s[o>>2]=t,s[(r=(n=n-r&-4)+o|0)-4>>2]=t,n>>>0<9||(s[o+8>>2]=t,s[o+4>>2]=t,s[r-8>>2]=t,s[r-12>>2]=t,n>>>0<25||(s[o+24>>2]=t,s[o+20>>2]=t,s[o+16>>2]=t,s[o+12>>2]=t,s[r-16>>2]=t,s[r-20>>2]=t,s[r-24>>2]=t,s[r-28>>2]=t,(n=n-(c=4&o|24)|0)>>>0<32))))))))for(r=t,a=t,t=o+c|0;s[t+24>>2]=a,s[t+28>>2]=r,s[t+16>>2]=a,s[t+20>>2]=r,s[t+8>>2]=a,s[t+12>>2]=r,s[t>>2]=a,s[t+4>>2]=r,t=t+32|0,(n=n-32|0)>>>0>31;);return e}function se(e,t){var n,r,o,a=0,s=0;s=a=e- -64|0,r=1+(n=c[a+4|0]|c[a+5|0]<<8|c[a+6|0]<<16|c[a+7|0]<<24)|0,a=(t=t+(a=o=c[0|a]|c[a+1|0]<<8|c[a+2|0]<<16|c[a+3|0]<<24)|0)>>>0>>0?r:n,i[0|s]=t,i[s+1|0]=t>>>8,i[s+2|0]=t>>>16,i[s+3|0]=t>>>24,i[s+4|0]=a,i[s+5|0]=a>>>8,i[s+6|0]=a>>>16,i[s+7|0]=a>>>24,t=(a=(0|a)==(0|n)&t>>>0>>0|a>>>0>>0)+(c[e+72|0]|c[e+73|0]<<8|c[e+74|0]<<16|c[e+75|0]<<24)|0,s=c[e+76|0]|c[e+77|0]<<8|c[e+78|0]<<16|c[e+79|0]<<24,a=t>>>0>>0?s+1|0:s,i[e+72|0]=t,i[e+73|0]=t>>>8,i[e+74|0]=t>>>16,i[e+75|0]=t>>>24,i[e+76|0]=a,i[e+77|0]=a>>>8,i[e+78|0]=a>>>16,i[e+79|0]=a>>>24}function ce(e,t,n,r,o,i,a){var c,d,u,l,A=0;return y=c=y-352|0,G(c,i,a),!o&r>>>0<=n-e>>>0|e>>>0>=n>>>0&&!(!o&r>>>0>e-n>>>0|o&&e>>>0>n>>>0)||(n=ne(e,n,r)),s[c+56>>2]=0,s[c+60>>2]=0,s[c+48>>2]=0,s[c+52>>2]=0,s[c+40>>2]=0,s[c+44>>2]=0,s[c+32>>2]=0,s[c+36>>2]=0,(d=!((a=(A=!o&r>>>0>32|0!=(0|o))?32:r)|(A=A?0:o)))||q(c- -64|0,n,a),l=i+16|0,$t(c+32|0,c+32|0,u=a+32|0,i=u>>>0<32?A+1|0:A,l,c),wn(c+96|0,c+32|0),d||q(e,c- -64|0,a),ht(c+32|0,64),!o&r>>>0>=33|o&&en(e+a|0,i=n+a|0,(n=r)-a|0,o-(A+(n>>>0>>0)|0)|0,l,c),ht(c,32),mn(c+96|0,e,r,o),Bn(c+96|0,t),ht(c+96|0,256),y=c+352|0,0}function de(e,t){s[e>>2]=1634760805,s[e+4>>2]=857760878,s[e+8>>2]=2036477234,s[e+12>>2]=1797285236,s[e+16>>2]=c[0|t]|c[t+1|0]<<8|c[t+2|0]<<16|c[t+3|0]<<24,s[e+20>>2]=c[t+4|0]|c[t+5|0]<<8|c[t+6|0]<<16|c[t+7|0]<<24,s[e+24>>2]=c[t+8|0]|c[t+9|0]<<8|c[t+10|0]<<16|c[t+11|0]<<24,s[e+28>>2]=c[t+12|0]|c[t+13|0]<<8|c[t+14|0]<<16|c[t+15|0]<<24,s[e+32>>2]=c[t+16|0]|c[t+17|0]<<8|c[t+18|0]<<16|c[t+19|0]<<24,s[e+36>>2]=c[t+20|0]|c[t+21|0]<<8|c[t+22|0]<<16|c[t+23|0]<<24,s[e+40>>2]=c[t+24|0]|c[t+25|0]<<8|c[t+26|0]<<16|c[t+27|0]<<24,s[e+44>>2]=c[t+28|0]|c[t+29|0]<<8|c[t+30|0]<<16|c[t+31|0]<<24}function ue(e,t,n,r,o,i,a){var c,d,u=0,l=0;y=c=y-96|0,G(c,i,a),d=i+16|0,Vn[s[8952]](c+32|0,32,0,d,c),i=-1;e:{if(!(0|Vn[s[8946]](n,t,r,o,c+32|0))){if(i=0,!e)break e;!o&r>>>0<=e-t>>>0|e>>>0<=t>>>0&&!(!o&r>>>0>t-e>>>0|o&&e>>>0>>0)||(t=ne(e,t,r)),n=(i=!o&r>>>0>32|0!=(0|o))?32:r,a=i=i?0:o,n|i?(l=q(c- -64|0,t,n),i=a,$t(c+32|0,c+32|0,u=n+32|0,i=u>>>0<32?i+1|0:i,d,c),q(e,l,n)):(i=a,$t(c+32|0,c+32|0,u=n+32|0,i=u>>>0<32?i+1|0:i,d,c)),i=0,!o&r>>>0<33||en((u=e)+(e=n)|0,e+t|0,r-e|0,o-(a+(e>>>0>r>>>0)|0)|0,d,c)}ht(c,32)}return y=c+96|0,i}function le(e){var t=0,n=0,r=0;if(!e)return-25;if(!s[e>>2])return-1;e:{t:{if(t=-2,!(d[e+4>>2]<16)&&(s[e+8>>2]||(t=-18,!s[e+12>>2]))){if(n=s[e+20>>2],!s[e+16>>2])break t;if(t=-6,!(n>>>0<8)&&(s[e+24>>2]||(t=-20,!s[e+28>>2]))&&(s[e+32>>2]||(t=-21,!s[e+36>>2]))){if(!(n=s[e+48>>2]))return-16;if(t=-17,!(n>>>0>16777215||(t=-14,(r=s[e+44>>2])>>>0<8||(t=-15,r>>>0>2097152||(t=-14,n<<3>>>0>r>>>0))))){if(!s[e+40>>2])return-12;if(e=s[e+52>>2])break e;t=-28}}}return t}return n?-19:-6}return e>>>0>16777215?-29:0}function Ae(e,t,n){var r,o,i,a,c,d,u,l,A,f,h,g,p,m,v,y,b,I,C,E;h=s[t+4>>2],r=s[e+4>>2],g=s[t+8>>2],o=s[e+8>>2],p=s[t+12>>2],i=s[e+12>>2],m=s[t+16>>2],a=s[e+16>>2],v=s[t+20>>2],c=s[e+20>>2],y=s[t+24>>2],d=s[e+24>>2],b=s[t+28>>2],u=s[e+28>>2],I=s[t+32>>2],l=s[e+32>>2],C=s[t+36>>2],A=s[e+36>>2],f=s[e>>2],E=s[t>>2]^f,t=0-n|0,s[e>>2]=f^E&t,s[e+36>>2]=t&(A^C)^A,s[e+32>>2]=t&(l^I)^l,s[e+28>>2]=t&(u^b)^u,s[e+24>>2]=t&(d^y)^d,s[e+20>>2]=t&(c^v)^c,s[e+16>>2]=t&(a^m)^a,s[e+12>>2]=t&(i^p)^i,s[e+8>>2]=t&(o^g)^o,s[e+4>>2]=t&(r^h)^r}function fe(e,t){for(var n=0,r=0,o=0,a=0,s=0,d=0,u=0,l=0;i[e+n|0]=c[(n>>>3|0)+t|0]>>>(7&n)&1,256!=(0|(n=n+1|0)););for(;;){d=(t=d)+1|0;e:if(c[0|(s=e+t|0)]&&(n=d,o=1,!(t>>>0>254)))for(;;){t:if(a=i[0|(r=e+n|0)])if((0|(l=(u=i[0|s])+(a<<=o)|0))<=15)i[0|s]=l,i[0|r]=0;else{if((0|(r=u-a|0))<-15)break e;for(i[0|s]=r;;){if(!c[0|(r=e+n|0)]){i[0|r]=1;break t}if(i[0|r]=0,r=n>>>0<255,n=n+1|0,!r)break}}if(o>>>0>5)break e;if(!((n=t+(o=o+1|0)|0)>>>0<256))break}if(256==(0|d))break}}function he(e,t,n,r){var o,i,a,c,d=0;y=o=y+-64|0,ae(o+8|0,0,52),d=Oe(e),s[o+20>>2]=d,s[o+36>>2]=d,s[o+4>>2]=d,i=_(d),s[o+32>>2]=i,a=_(d),s[o+16>>2]=a,c=_(d),s[o>>2]=c;e:if(!c|!i|!a||!(d=_(d)))R(i),R(a),R(c),e=-22;else{if(e=W(o,e,r)){R(s[o+32>>2]),R(s[o+16>>2]),R(s[o>>2]),R(d);break e}e=0,t=Ce(s[o+40>>2],s[o+44>>2],s[o+52>>2],t,n,s[o+16>>2],s[o+20>>2],d,s[o+4>>2],0,0,r),R(s[o+32>>2]),R(s[o+16>>2]),(t||Xe(d,s[o>>2],s[o+4>>2]))&&(e=-35),R(d),R(s[o>>2])}return y=o- -64|0,e}function ge(e,t){var n,r,o=0;y=n=y-288|0,T(r=e+40|0,t),yn(o=e+80|0),k(n+240|0,r),S(n+192|0,n+240|0,2128),pe(n+240|0,n+240|0,o),me(n+192|0,n+192|0,o),k(n+144|0,n+192|0),S(n+144|0,n+144|0,n+192|0),k(e,n+144|0),S(e,e,n+192|0),S(e,e,n+240|0),function(e,t){var n,r=0;for(y=n=y-144|0,k(n+96|0,t),k(n+48|0,n+96|0),k(n+48|0,n+48|0),S(n+48|0,t,n+48|0),S(n+96|0,n+96|0,n+48|0),k(n+96|0,n+96|0),S(n+96|0,n+48|0,n+96|0),k(n+48|0,n+96|0),r=1;k(n+48|0,n+48|0),5!=(0|(r=r+1|0)););for(S(n+96|0,n+48|0,n+96|0),k(n+48|0,n+96|0),r=1;k(n+48|0,n+48|0),10!=(0|(r=r+1|0)););for(S(n+48|0,n+48|0,n+96|0),k(n,n+48|0),r=1;k(n,n),20!=(0|(r=r+1|0)););for(S(n+48|0,n,n+48|0),r=1;k(n+48|0,n+48|0),11!=(0|(r=r+1|0)););for(S(n+96|0,n+48|0,n+96|0),k(n+48|0,n+96|0),r=1;k(n+48|0,n+48|0),50!=(0|(r=r+1|0)););for(S(n+48|0,n+48|0,n+96|0),k(n,n+48|0),r=1;k(n,n),100!=(0|(r=r+1|0)););for(S(n+48|0,n,n+48|0),r=1;k(n+48|0,n+48|0),51!=(0|(r=r+1|0)););S(n+96|0,n+48|0,n+96|0),k(n+96|0,n+96|0),k(n+96|0,n+96|0),S(e,n+96|0,t),y=n+144|0}(e,e),S(e,e,n+144|0),S(e,e,n+240|0),k(n+96|0,e),S(n+96|0,n+96|0,n+192|0),pe(n+48|0,n+96|0,n+240|0);e:{if(!Ht(n+48|0)){if(me(n,n+96|0,n+240|0),o=-1,!Ht(n))break e;S(e,e,2176)}(0|Gt(e))==(c[t+31|0]>>>7|0)&&Re(e,e),S(e+120|0,e,r),o=0}return y=n+288|0,o}function pe(e,t,n){var r,o,i,a,c,d,u,l,A,f,h,g,p,m,v,y,b,I;r=s[n+4>>2],o=s[t+4>>2],i=s[n+8>>2],a=s[t+8>>2],c=s[n+12>>2],d=s[t+12>>2],u=s[n+16>>2],l=s[t+16>>2],A=s[n+20>>2],f=s[t+20>>2],h=s[n+24>>2],g=s[t+24>>2],p=s[n+28>>2],m=s[t+28>>2],v=s[n+32>>2],y=s[t+32>>2],b=s[n+36>>2],I=s[t+36>>2],s[e>>2]=s[t>>2]-s[n>>2],s[e+36>>2]=I-b,s[e+32>>2]=y-v,s[e+28>>2]=m-p,s[e+24>>2]=g-h,s[e+20>>2]=f-A,s[e+16>>2]=l-u,s[e+12>>2]=d-c,s[e+8>>2]=a-i,s[e+4>>2]=o-r}function me(e,t,n){var r,o,i,a,c,d,u,l,A,f,h,g,p,m,v,y,b,I;r=s[n+4>>2],o=s[t+4>>2],i=s[n+8>>2],a=s[t+8>>2],c=s[n+12>>2],d=s[t+12>>2],u=s[n+16>>2],l=s[t+16>>2],A=s[n+20>>2],f=s[t+20>>2],h=s[n+24>>2],g=s[t+24>>2],p=s[n+28>>2],m=s[t+28>>2],v=s[n+32>>2],y=s[t+32>>2],b=s[n+36>>2],I=s[t+36>>2],s[e>>2]=s[n>>2]+s[t>>2],s[e+36>>2]=b+I,s[e+32>>2]=v+y,s[e+28>>2]=p+m,s[e+24>>2]=h+g,s[e+20>>2]=A+f,s[e+16>>2]=u+l,s[e+12>>2]=c+d,s[e+8>>2]=i+a,s[e+4>>2]=r+o}function ve(e){var t,n=0,r=0,o=0,a=0;for(i[11+(t=y-16|0)|0]=0,i[t+12|0]=0,i[t+13|0]=0,i[t+14|0]=0,s[t+8>>2]=0;;){for(o=c[e+r|0],n=0;i[0|(a=(t+8|0)+n|0)]=c[0|a]|o^c[(3232+(n<<5)|0)+r|0],7!=(0|(n=n+1|0)););if(31==(0|(r=r+1|0)))break}for(r=127&c[e+31|0],e=0,n=0;i[0|(o=(t+8|0)+n|0)]=c[0|o]|r^c[3263+(n<<5)|0],7!=(0|(n=n+1|0)););for(n=0;n=c[(t+8|0)+e|0]-1|n,7!=(0|(e=e+1|0)););return n>>>8&1}function ye(e,t){var n=0,r=0,o=0,a=0,s=0;for(ae(q(e,1952,64)- -64|0,0,293);o=r=(n=a<<3)+e|0,n=t+n|0,s=c[0|r]|c[r+1|0]<<8|c[r+2|0]<<16|c[r+3|0]<<24,r=(c[n+4|0]|c[n+5|0]<<8|c[n+6|0]<<16|c[n+7|0]<<24)^(c[r+4|0]|c[r+5|0]<<8|c[r+6|0]<<16|c[r+7|0]<<24),n=(c[0|n]|c[n+1|0]<<8|c[n+2|0]<<16|c[n+3|0]<<24)^s,i[0|o]=n,i[o+1|0]=n>>>8,i[o+2|0]=n>>>16,i[o+3|0]=n>>>24,i[o+4|0]=r,i[o+5|0]=r>>>8,i[o+6|0]=r>>>16,i[o+7|0]=r>>>24,8!=(0|(a=a+1|0)););}function be(e,t,n,r,o){var i,a=0;y=i=y+-64|0;e:{t:{if(a=!n,(n=Oe(e))>>>0<128&&a){if(s[i+56>>2]=0,s[i+48>>2]=0,s[i+52>>2]=0,s[i+40>>2]=0,s[i+44>>2]=0,a=function(e){var t=0,n=0;return t=0,e&&(n=e,t=e,(1|e)>>>0<65536||(t=n)),n=t,!(e=_(t))|!(3&c[e-4|0])||ae(e,0,n),e}(n))break t}else s[8960]=28;e=-1;break e}s[i+32>>2]=0,s[i+36>>2]=0,s[i+8>>2]=a,s[i+16>>2]=a,s[i+20>>2]=n,s[i>>2]=a,s[i+12>>2]=n,s[i+24>>2]=0,s[i+28>>2]=0,s[i+4>>2]=n,W(i,e,o)?(s[8960]=28,e=-1):(e=1,(0|t)==s[i+40>>2]&&(e=s[i+44>>2]!=(r>>>10|0))),R(a)}return y=i- -64|0,e}function Ie(e,t){var n,r=0,o=0,a=0,l=0;if(y=n=y-48|0,!((r=le(e))||(r=-26,t-1>>>0>1||(a=s[e+44>>2],r=s[e+48>>2],s[n>>2]=0,o=s[e+40>>2],s[n+28>>2]=r,s[n+12>>2]=-1,s[n+8>>2]=o,r=((o=a>>>0<(o=r<<3)>>>0?o:a)>>>0)/((a=r<<2)>>>0)|0,s[n+20>>2]=r,s[n+24>>2]=r<<2,s[n+16>>2]=u(r,a),r=s[e+52>>2],s[n+36>>2]=t,s[n+32>>2]=r,r=function(e,t){var n,r=0;return y=n=y-80|0,r=-25,!e|!t||(r=_(s[e+20>>2]<<3),s[e+4>>2]=r,r?(r=function(e,t){var n,r=0,o=0;y=n=y-16|0,o=-22;e:if(!(!e|!t)&&1024==(((r=t<<10)>>>0)/(t>>>0)|0)&&(t=_(12),s[e>>2]=t,t)){s[t>>2]=0,s[t+4>>2]=0,t=function(e,t){if(t>>>0>4294967168)e=48;else{if(!(t=function(e){var t=0,n=0,r=0,o=0,i=0,a=0;return e>>>0>=4294967168?(s[8960]=48,0):(e=_(76+(r=e>>>0<11?16:e+11&-8)|0))?(t=e-8|0,63&e?(o=(-8&(a=s[(i=e-4|0)>>2]))-(n=(e=(e=(e+63&-64)-8|0)-t>>>0>15?e:e- -64|0)-t|0)|0,3&a?(s[e+4>>2]=o|1&s[e+4>>2]|2,s[4+(o=e+o|0)>>2]=1|s[o+4>>2],s[i>>2]=n|1&s[i>>2]|2,s[e+4>>2]=1|s[e+4>>2],P(t,n)):(t=s[t>>2],s[e+4>>2]=o,s[e>>2]=t+n)):e=t,3&(t=s[e+4>>2])&&((n=-8&t)>>>0<=r+16>>>0||(s[e+4>>2]=r|1&t|2,t=e+r|0,r=n-r|0,s[t+4>>2]=3|r,s[4+(n=e+n|0)>>2]=1|s[n+4>>2],P(t,r))),e+8|0):0}(t)))return 48;s[e>>2]=t,e=0}return e}(n+12|0,r),s[8960]=t;t:{if(t)s[n+12>>2]=0;else if(t=s[n+12>>2])break t;R(s[e>>2]),s[e>>2]=0;break e}s[s[e>>2]>>2]=t,s[s[e>>2]+4>>2]=t,s[s[e>>2]+8>>2]=r,o=0}return y=n+16|0,o}(e,s[e+16>>2]))?At(e,s[t+56>>2]):(function(e,t,n){var r,o=0;r=o=y,y=o=o-448&-64,!e|!t||(st(o- -64|0,0,0,64),Jt(o+60|0,s[t+48>>2]),bn(o- -64|0,o+60|0,4,0),Jt(o+60|0,s[t+4>>2]),bn(o- -64|0,o+60|0,4,0),Jt(o+60|0,s[t+44>>2]),bn(o- -64|0,o+60|0,4,0),Jt(o+60|0,s[t+40>>2]),bn(o- -64|0,o+60|0,4,0),Jt(o+60|0,19),bn(o- -64|0,o+60|0,4,0),Jt(o+60|0,n),bn(o- -64|0,o+60|0,4,0),Jt(o+60|0,s[t+12>>2]),bn(o- -64|0,o+60|0,4,0),(n=s[t+8>>2])&&(bn(o- -64|0,n,s[t+12>>2],0),1&i[t+56|0]&&(ht(s[t+8>>2],s[t+12>>2]),s[t+12>>2]=0)),Jt(o+60|0,s[t+20>>2]),bn(o- -64|0,o+60|0,4,0),(n=s[t+16>>2])&&bn(o- -64|0,n,s[t+20>>2],0),Jt(o+60|0,s[t+28>>2]),bn(o- -64|0,o+60|0,4,0),(n=s[t+24>>2])&&(bn(o- -64|0,n,s[t+28>>2],0),2&c[t+56|0]&&(ht(s[t+24>>2],s[t+28>>2]),s[t+28>>2]=0)),Jt(o+60|0,s[t+36>>2]),bn(o- -64|0,o+60|0,4,0),(n=s[t+32>>2])&&bn(o- -64|0,n,s[t+36>>2],0),Tt(o- -64|0,e,64)),y=r}(n,t,s[e+36>>2]),ht(n- -64|0,8),function(e,t){var n,r=0,o=0,i=0;if(y=n=y-1024|0,s[t+28>>2])for(i=e+68|0,o=e- -64|0;Jt(o,0),Jt(i,r),j(n,1024,e,72),We(s[s[t>>2]+4>>2]+(u(s[t+24>>2],r)<<10)|0,n),Jt(o,1),j(n,1024,e,72),We(1024+(s[s[t>>2]+4>>2]+(u(s[t+24>>2],r)<<10)|0)|0,n),(r=r+1|0)>>>0>2];);ht(n,1024),y=n+1024|0}(n,e),ht(n,72),r=0):r=-22),y=n+80|0,r}(n,e))))){if(s[n+8>>2])for(;_e(n,l),(l=l+1|0)>>>0>2];);!function(e,t){var n,r=0,o=0;if(y=n=y-2048|0,!(!e|!t)){if(Qn(n+1024|0,(s[s[t>>2]+4>>2]+(s[t+24>>2]<<10)|0)-1024|0),d[t+28>>2]>=2)for(r=1;o=s[t+24>>2],ot(n+1024|0,(s[s[t>>2]+4>>2]+(o+u(r,o)<<10)|0)-1024|0),(r=r+1|0)>>>0>2];);!function(e,t){for(var n=0,r=0;ft((n=r<<3)+e|0,s[(n=t+n|0)>>2],s[n+4>>2]),128!=(0|(r=r+1|0)););}(n,n+1024|0),j(s[e>>2],s[e+4>>2],n,1024),ht(n+1024|0,1024),ht(n,1024),At(t,s[e+56>>2])}y=n+2048|0}(e,n),r=0}return y=n+48|0,r}function Ce(e,t,n,r,o,i,a,c,d,u,l,A){var f,h;return y=f=y+-64|0,(h=_(d))?(s[f+32>>2]=0,s[f+36>>2]=0,s[f+24>>2]=0,s[f+28>>2]=0,s[f+20>>2]=a,s[f+16>>2]=i,s[f+12>>2]=o,s[f+8>>2]=r,s[f+4>>2]=d,s[f>>2]=h,s[f+56>>2]=0,s[f+52>>2]=n,s[f+48>>2]=n,s[f+44>>2]=t,s[f+40>>2]=e,(n=Ie(f,A))?ht(h,d):!u|!l||!H(u,l,f,A)?(c&&q(c,h,d),ht(h,d),n=0):(ht(h,d),ht(u,l),n=-31),R(h)):n=-22,y=f- -64|0,n}function Ee(e,t,n,r,o,a){var s,d,l=0,A=0,f=0;return y=s=y-592|0,l=-1,function(e){var t=0,n=0,r=0,o=0,i=0;for(t=32,n=1;i=(r=c[(t=t-1|0)+e|0])-(o=c[t+3456|0])>>8&n|255&i,n&=65535+(r^o)>>>8,t;);return 0!=(0|i)}(d=e+32|0)&&(ve(e)||function(e){var t=0,n=0;for(n=127&(-1^c[e+31|0]),t=30;n=-1^c[e+t|0]|n,t=t-1|0;);return 1&(((255&n)-1&236-c[0|e])>>>8^-1)}(o)&&(ve(o)||ge(s+128|0,o)||(cn(s+384|0,a),Y(s+384|0,e,32,0),Y(s+384|0,o,32,0),Y(s+384|0,t,n,r),Nt(s+384|0,s+320|0),B(s+320|0),function(e,t,n,r){var o;y=o=y-2272|0,fe(o+2016|0,t),fe(o+1760|0,r),wt(o+480|0,n),jt(o+320|0,n),bt(o,o+320|0),Ye(o+320|0,o,o+480|0),bt(o+160|0,o+320|0),wt(t=o+640|0,o+160|0),Ye(o+320|0,o,t),bt(o+160|0,o+320|0),wt(t=o+800|0,o+160|0),Ye(o+320|0,o,t),bt(o+160|0,o+320|0),wt(t=o+960|0,o+160|0),Ye(o+320|0,o,t),bt(o+160|0,o+320|0),wt(t=o+1120|0,o+160|0),Ye(o+320|0,o,t),bt(o+160|0,o+320|0),wt(t=o+1280|0,o+160|0),Ye(o+320|0,o,t),bt(o+160|0,o+320|0),wt(t=o+1440|0,o+160|0),Ye(o+320|0,o,t),bt(o+160|0,o+320|0),wt(o+1600|0,o+160|0),xn(e),yn(e+40|0),yn(e+80|0),r=255;e:{for(;;){if(!(c[(n=r)+(o+2016|0)|0]|c[(o+1760|0)+n|0])){if(r=n-1|0,n)continue;break e}break}if(!((0|n)<0))for(;et(o+320|0,e),(0|(n=i[(t=n)+(o+2016|0)|0]))>=1?(bt(o+160|0,o+320|0),Ye(o+320|0,o+160|0,(o+480|0)+u((254&n)>>>1|0,160)|0)):(0|n)>-1||(bt(o+160|0,o+320|0),Ve(o+320|0,o+160|0,(o+480|0)+u((0-n&254)>>>1|0,160)|0)),(0|(n=i[t+(o+1760|0)|0]))>=1?(bt(o+160|0,o+320|0),ze(o+320|0,o+160|0,u((254&n)>>>1|0,120)+2272|0)):(0|n)>-1||(bt(o+160|0,o+320|0),Ze(o+320|0,o+160|0,u((0-n&254)>>>1|0,120)+2272|0)),St(e,o+320|0),n=t-1|0,(0|t)>0;);}y=o+2272|0}(s+8|0,s+320|0,s+128|0,d),ct(s+288|0,s+8|0),A=-1,f=_n(s+288|0,e),l=((s+288|0)==(0|e)?A:f)|Xe(e,s+288|0,32)))),y=s+592|0,l}function we(e,t,n,r){var o=0,i=0;e:if(s[t>>2])i=s[e+24>>2],o=s[e+20>>2],r=r?s[t+12>>2]+(i+(-1^o)|0)|0:(i-o|0)-!s[t+12>>2]|0,i=0,3!=(0|(t=c[t+8|0]))&&(i=u(o,t+1|0));else{if(!(o=c[t+8|0])){r=s[t+12>>2]-1|0,i=0;break e}if(o=u(o,s[e+20>>2]),t=s[t+12>>2],r){r=(t+o|0)-1|0,i=0;break e}r=o-!t|0,i=0}return t=i+(o=r-1|0)|0,fn(n,0,n,0),fn(r,0,C,0),function(e,t,n){var r=0,o=0,i=0,a=0,s=0,c=0,d=0,A=0,f=0;e:{t:{n:{r:{o:{i:{a:{s:{c:{if(o=t){if(!(r=n))break c;break s}return b=e-u((e>>>0)/(n>>>0)|0,n)|0,I=0,void(C=0)}if(!e)break a;break i}if(!((a=r-1|0)&r))break o;s=0-(a=(l(r)+33|0)-l(o)|0)|0;break n}return b=0,I=o,void(C=0)}if((r=32-l(o)|0)>>>0<31)break r;break t}if(b=e&a,I=0,1==(0|r))break e;return n=31&(e=r?31-l(r-1^r)|0:32),void(C=(63&e)>>>0>=32?0:t>>>n|0)}a=r+1|0,s=63-r|0}if(r=t,i=31&(o=63&a),o>>>0>=32?(o=0,i=r>>>i|0):(o=r>>>i|0,i=((1<>>i),r=31&(s&=63),s>>>0>=32?(t=e<>>32-r|t<>>31)-(A=n&(c=s-((o=o<<1|i>>>31)+(r>>>0>>0)|0)>>31))|0,o=o-(d>>>0>>0)|0,t=t<<1|e>>>31,e=f|e<<1,f=1&c,a=a-1|0;);return b=i,I=o,void(C=t<<1|e>>>31)}b=e,I=t,t=0}C=t}(t-(n=C)|0,(t>>>0>>0)-(t>>>0>>0)|0,s[e+24>>2]),C=I,b}function Be(e,t,n,r,o,i,a,s,c,d){var u;return y=u=y-352|0,kn(u+32|0,64,c,d),wn(u+96|0,u+32|0),ht(u+32|0,64),mn(u+96|0,i,a,s),mn(u+96|0,34688,0-a&15,0),mn(u+96|0,t,n,r),mn(u+96|0,34688,0-n&15,0),ft(u+24|0,a,s),mn(u+96|0,u+24|0,8,0),ft(u+24|0,n,r),mn(u+96|0,u+24|0,8,0),Bn(u+96|0,u),ht(u+96|0,256),o=Sn(u,o),ht(u,16),e&&(o?(ae(e,0,n),o=-1):(rt(e,t,n,r,c,1,d),o=0)),y=u+352|0,o}function _e(e,t){var n,r=0,o=0,a=0;if(y=n=y-32|0,!(!e|!s[e+28>>2]))for(s[n+16>>2]=t,r=1;;){if(i[n+24|0]=o,t=0,a=0,r)for(;s[n+28>>2]=0,r=s[n+28>>2],s[n+8>>2]=s[n+24>>2],s[n+12>>2]=r,s[n+20>>2]=t,r=s[n+20>>2],s[n>>2]=s[n+16>>2],s[n+4>>2]=r,$(e,n),(t=t+1|0)>>>0<(a=s[e+28>>2])>>>0;);if(r=a,4==(0|(o=o+1|0)))break}y=n+32|0}function Se(e,t,n,r,o,i,a,c,d,u,l){var A;return y=A=y-336|0,kn(A+16|0,64,u,l),wn(A+80|0,A+16|0),ht(A+16|0,64),mn(A+80|0,a,c,d),mn(A+80|0,34688,0-c&15,0),rt(e,r,o,i,u,1,l),mn(A+80|0,e,o,i),mn(A+80|0,34688,0-o&15,0),ft(A+8|0,c,d),mn(A+80|0,A+8|0,8,0),ft(A+8|0,o,i),mn(A+80|0,A+8|0,8,0),Bn(A+80|0,t),ht(A+80|0,256),n&&(s[n>>2]=16,s[n+4>>2]=0),y=A+336|0,0}function ke(e,t,n,r,o,i,a,s,c,d){var u;return y=u=y-352|0,An(u+32|0,c,d),wn(u+96|0,u+32|0),ht(u+32|0,64),mn(u+96|0,i,a,s),ft(u+24|0,a,s),mn(u+96|0,u+24|0,8,0),mn(u+96|0,t,n,r),ft(u+24|0,n,r),mn(u+96|0,u+24|0,8,0),Bn(u+96|0,u),ht(u+96|0,256),o=Sn(u,o),ht(u,16),e&&(o?(ae(e,0,n),o=-1):(Dt(e,t,n,r,c,d),o=0)),y=u+352|0,o}function Oe(e){var t=0,n=0,r=0;e:{t:if(3&(t=e)){if(!c[0|e])return 0;for(;;){if(!(3&(t=t+1|0)))break t;if(!c[0|t])break}break e}for(;n=t,t=t+4|0,!((-1^(r=s[n>>2]))&r-16843009&-2139062144););if(!(255&r))return n-e|0;for(;r=c[n+1|0],n=t=n+1|0,r;);}return t-e|0}function Qe(e,t){var n,r=0,o=0,i=0,a=0,d=0;e:if(!(((n=c[0|e])-48&255)>>>0>9)){for(o=n,r=e;;){if(a=r,i>>>0>429496729)break e;if((o=(255&o)-48|0)>>>0>(-1^(r=u(i,10)))>>>0)break e;if(i=r+o|0,!(((o=c[0|(r=a+1|0)])-48&255)>>>0<10))break}(0|e)==(0|r)|(48==(0|n)?(0|e)!=(0|a):0)||(s[t>>2]=i,d=r)}return d}function Re(e,t){var n,r,o,i,a,c,d,u,l;n=s[t+4>>2],r=s[t+8>>2],o=s[t+12>>2],i=s[t+16>>2],a=s[t+20>>2],c=s[t+24>>2],d=s[t+28>>2],u=s[t+32>>2],l=s[t+36>>2],s[e>>2]=0-s[t>>2],s[e+36>>2]=0-l,s[e+32>>2]=0-u,s[e+28>>2]=0-d,s[e+24>>2]=0-c,s[e+20>>2]=0-a,s[e+16>>2]=0-i,s[e+12>>2]=0-o,s[e+8>>2]=0-r,s[e+4>>2]=0-n}function Pe(e,t,n){var r=0;r=t<<8&16711680|t<<24,r|=255&(n<<8|t>>>24)|65280&(n<<24|t>>>8),t=-16777216&((255&n)<<24|t>>>8)|16711680&((16777215&n)<<8|t>>>24)|n>>>8&65280|n>>>24|0,i[0|e]=t,i[e+1|0]=t>>>8,i[e+2|0]=t>>>16,i[e+3|0]=t>>>24,t=r,i[e+4|0]=t,i[e+5|0]=t>>>8,i[e+6|0]=t>>>16,i[e+7|0]=t>>>24}function Ne(e,t,n){var r;r=e,n?(s[e+48>>2]=c[0|n]|c[n+1|0]<<8|c[n+2|0]<<16|c[n+3|0]<<24,n=c[n+4|0]|c[n+5|0]<<8|c[n+6|0]<<16|c[n+7|0]<<24):(s[e+48>>2]=0,n=0),s[r+52>>2]=n,s[e+56>>2]=c[0|t]|c[t+1|0]<<8|c[t+2|0]<<16|c[t+3|0]<<24,s[e+60>>2]=c[t+4|0]|c[t+5|0]<<8|c[t+6|0]<<16|c[t+7|0]<<24}function xe(e,t){var n,r,o,i,a,c,d,u,l;n=s[t+8>>2],r=s[t+12>>2],o=s[t+16>>2],i=s[t+20>>2],a=s[t+24>>2],c=s[t+28>>2],d=s[t>>2],u=s[t+4>>2],l=s[t+36>>2],s[e+32>>2]=s[t+32>>2],s[e+36>>2]=l,s[e+24>>2]=a,s[e+28>>2]=c,s[e+16>>2]=o,s[e+20>>2]=i,s[e+8>>2]=n,s[e+12>>2]=r,s[e>>2]=d,s[e+4>>2]=u}function De(e,t,n,r,o,i,a,d,u,l,A){var f;return y=f=y-48|0,s[f+8>>2]=0,s[f>>2]=0,s[f+4>>2]=0,J(f+16|0,l,A),A=c[l+16|0]|c[l+17|0]<<8|c[l+18|0]<<16|c[l+19|0]<<24,l=c[l+20|0]|c[l+21|0]<<8|c[l+22|0]<<16|c[l+23|0]<<24,s[f+4>>2]=A,s[f+8>>2]=l,function(e,t,n,r,o,i,a,c,d,u,l){var A;y=A=y-336|0,ln(A+16|0,64,u,l),wn(A+80|0,A+16|0),ht(A+16|0,64),mn(A+80|0,a,c,d),mn(A+80|0,34704,0-c&15,0),xt(e,r,o,i,u,1,l),mn(A+80|0,e,o,i),mn(A+80|0,34704,0-o&15,0),ft(A+8|0,c,d),mn(A+80|0,A+8|0,8,0),ft(A+8|0,o,i),mn(A+80|0,A+8|0,8,0),Bn(A+80|0,t),ht(A+80|0,256),n&&(s[n>>2]=16,s[n+4>>2]=0),y=A+336|0}(e,t,n,r,o,i,a,d,u,f,f+16|0),ht(f+16|0,32),y=f+48|0,0}function Me(e,t,n,r,o,i,a,d,u,l){var A;return y=A=y-48|0,s[A+8>>2]=0,s[A>>2]=0,s[A+4>>2]=0,J(A+16|0,u,l),l=c[u+16|0]|c[u+17|0]<<8|c[u+18|0]<<16|c[u+19|0]<<24,u=c[u+20|0]|c[u+21|0]<<8|c[u+22|0]<<16|c[u+23|0]<<24,s[A+4>>2]=l,s[A+8>>2]=u,e=function(e,t,n,r,o,i,a,s,c,d){var u;return y=u=y-352|0,ln(u+32|0,64,c,d),wn(u+96|0,u+32|0),ht(u+32|0,64),mn(u+96|0,i,a,s),mn(u+96|0,34704,0-a&15,0),mn(u+96|0,t,n,r),mn(u+96|0,34704,0-n&15,0),ft(u+24|0,a,s),mn(u+96|0,u+24|0,8,0),ft(u+24|0,n,r),mn(u+96|0,u+24|0,8,0),Bn(u+96|0,u),ht(u+96|0,256),o=Sn(u,o),ht(u,16),e&&(o?(ae(e,0,n),o=-1):(xt(e,t,n,r,c,1,d),o=0)),y=u+352|0,o}(e,t,n,r,o,i,a,d,A,A+16|0),ht(A+16|0,32),y=A+48|0,e}function Te(e){var t;return t=c[0|e]|c[e+1|0]<<8|c[e+2|0]<<16|c[e+3|0]<<24,e=c[e+4|0]|c[e+5|0]<<8|c[e+6|0]<<16|c[e+7|0]<<24,C=65280&(e<<24|t>>>8)|255&(e<<8|t>>>24)|t<<8&16711680|t<<24,-16777216&((255&e)<<24|t>>>8)|16711680&((16777215&e)<<8|t>>>24)|e>>>8&65280|e>>>24|0}function Ue(e,t,n,r,o,i,a,c,d,u,l){var A;return y=A=y-336|0,An(A+16|0,u,l),wn(A+80|0,A+16|0),ht(A+16|0,64),mn(A+80|0,a,c,d),ft(A+8|0,c,d),mn(A+80|0,A+8|0,8,0),Dt(e,r,o,i,u,l),mn(A+80|0,e,o,i),ft(A+8|0,o,i),mn(A+80|0,A+8|0,8,0),Bn(A+80|0,t),ht(A+80|0,256),n&&(s[n>>2]=16,s[n+4>>2]=0),y=A+336|0,0}function He(e,t,n,r){var o;if(y=o=y-192|0,!(!n|(t-1&255)>>>0>=64|(r-1&255)>>>0>=64))return a[o+130>>1]=257,i[o+129|0]=r,i[o+128|0]=t,Vt(o+128|4),ft(o+128|8,0,0),ae(o+144|0,0,48),ye(e,o+128|0),ae(r+o|0,0,128-r|0),oe(t=e,e=q(o,n,r),128,0),ht(e,128),y=e+192|0,0;zt(),A()}function je(e,t,n){s[e+48>>2]=n?c[0|n]|c[n+1|0]<<8|c[n+2|0]<<16|c[n+3|0]<<24:0,s[e+52>>2]=c[0|t]|c[t+1|0]<<8|c[t+2|0]<<16|c[t+3|0]<<24,s[e+56>>2]=c[t+4|0]|c[t+5|0]<<8|c[t+6|0]<<16|c[t+7|0]<<24,s[e+60>>2]=c[t+8|0]|c[t+9|0]<<8|c[t+10|0]<<16|c[t+11|0]<<24}function Je(e,t,n,r,o,i,a){var c;return y=c=y-16|0,e=ae(e,0,128),a>>>0<2147483649&&!(r|i)?a>>>0>8191&&o|i?(gt(c,16),e=Ce(o,a>>>10|0,1,t,n,c,16,0,32,e,128,2)?-1:0):(s[8960]=28,e=-1):(s[8960]=22,e=-1),y=c+16|0,e}function Fe(e){var t=0;return(0-(t=e+4&(e+65488>>>8^-1)&(57-e>>>8^-1)&255|((t=e-65|0)>>>8^-1)&t&(90-e>>>8^-1)&255|e+185&(e+65439>>>8^-1)&(122-e>>>8^-1)&255|63&(1+(16288^e)>>>8^-1)|62&(1+(16338^e)>>>8^-1))>>>8^-1)&1+(65470^e)>>>8&255|t}function Ge(e){var t=0;return(0-(t=e+4&(e+65488>>>8^-1)&(57-e>>>8^-1)&255|((t=e-65|0)>>>8^-1)&t&(90-e>>>8^-1)&255|e+185&(e+65439>>>8^-1)&(122-e>>>8^-1)&255|63&(1+(16336^e)>>>8^-1)|62&(1+(16340^e)>>>8^-1))>>>8^-1)&1+(65470^e)>>>8&255|t}function Le(e,t){var n,r,o=0,a=0,s=0,c=0;for(y=n=y-16|0,o=10;c=o,s=(t>>>0)/10|0,i[0|(a=(o=o-1|0)+(n+6|0)|0)]=t-u(s,10)|48,!(t>>>0<10)&&(t=s,o););r=q(t=e,a,e=11-c|0)+e|0,i[0|r]=0,y=n+16|0}function qe(e,t,n){var r=0,o=0,i=0;if(!n)return 0;e:if(r=c[0|e]){for(;;){if((0|(o=c[0|t]))==(0|r)&&!(!(n=n-1|0)|!o)){if(t=t+1|0,r=c[e+1|0],e=e+1|0,r)continue;break e}break}i=r}return(255&i)-c[0|t]|0}function Ye(e,t,n){var r,o,i,a=0;y=o=y-48|0,me(e,a=t+40|0,t),pe(r=e+40|0,a,t),S(a=e+80|0,e,n),S(r,r,n+40|0),S(i=e+120|0,n+120|0,t+120|0),S(e,t+80|0,n+80|0),me(o,e,e),pe(e,a,r),me(r,a,r),me(a,o,i),pe(i,o,i),y=o+48|0}function Ve(e,t,n){var r,o,i,a=0;y=o=y-48|0,me(e,a=t+40|0,t),pe(r=e+40|0,a,t),S(a=e+80|0,e,n+40|0),S(r,r,n),S(i=e+120|0,n+120|0,t+120|0),S(e,t+80|0,n+80|0),me(o,e,e),pe(e,a,r),me(r,a,r),pe(a,o,i),me(i,o,i),y=o+48|0}function We(e,t){for(var n=0,r=0,o=0,i=0;o=(n=r<<3)+e|0,i=c[0|(n=t+n|0)]|c[n+1|0]<<8|c[n+2|0]<<16|c[n+3|0]<<24,n=c[n+4|0]|c[n+5|0]<<8|c[n+6|0]<<16|c[n+7|0]<<24,s[o>>2]=i,s[o+4>>2]=n,128!=(0|(r=r+1|0)););}function Ke(e,t,n){var r;if(s[12+(r=y-16|0)>>2]=e,s[r+8>>2]=t,t=0,s[r+4>>2]=0,(0|n)>=1)for(;s[r+4>>2]=s[r+4>>2]|c[s[r+8>>2]+t|0]^c[s[r+12>>2]+t|0],(0|n)!=(0|(t=t+1|0)););return(s[r+4>>2]-1>>>8&1)-1|0}function Ze(e,t,n){var r,o,i,a=0;y=o=y-48|0,me(e,a=t+40|0,t),pe(r=e+40|0,a,t),S(a=e+80|0,e,n+40|0),S(r,r,n),S(i=e+120|0,n+80|0,t+120|0),me(o,t=t+80|0,t),pe(e,a,r),me(r,a,r),pe(a,o,i),me(i,o,i),y=o+48|0}function ze(e,t,n){var r,o,i,a=0;y=o=y-48|0,me(e,a=t+40|0,t),pe(r=e+40|0,a,t),S(a=e+80|0,e,n),S(r,r,n+40|0),S(i=e+120|0,n+80|0,t+120|0),me(o,t=t+80|0,t),pe(e,a,r),me(r,a,r),me(a,o,i),pe(i,o,i),y=o+48|0}function Xe(e,t,n){var r;if(s[12+(r=y-16|0)>>2]=e,s[r+8>>2]=t,t=0,i[r+7|0]=0,n)for(;i[r+7|0]=c[r+7|0]|c[s[r+8>>2]+t|0]^c[s[r+12>>2]+t|0],(0|n)!=(0|(t=t+1|0)););return(c[r+7|0]-1>>>8&1)-1|0}function $e(e,t,n){var r,o=0,a=0;if(y=r=y-16|0,i[r+15|0]=0,a=-1,!(0|Vn[s[8950]](e,t,n))){for(;i[r+15|0]=c[e+o|0]|c[r+15|0],32!=(0|(o=o+1|0)););a=0-(c[r+15|0]-1>>>8&1)|0}return y=r+16|0,a}function et(e,t){var n,r,o,i,a;y=r=y-48|0,k(e,t),k(n=e+80|0,a=t+40|0),function(e,t){var n,r,o,i,a,c,d,l,A,f,h,g,p,m,v,y,b,I,E,w,B,_,S,k,O,Q,R,P,N,x,D,M,T,U,H,j,J,F,G=0,L=0,q=0,Y=0,V=0,W=0,K=0,Z=0,z=0,X=0,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>0?L+1|0:L,V=fn(A,o,K,W),G=C+L|0,G=(G=(G=(t=V+t|0)>>>0>>0?G+1|0:G)<<1|t>>>31)+(L=q>>26)|0,G=(t=(q=(67108863&q)<<6|te>>>26)+(t<<1)|0)>>>0>>0?G+1|0:G,L=t,q=t,t=G,t=(G=L+16777216|0)>>>0<16777216?t+1|0:t,L=-33554432&G,s[X+36>>2]=q-L,Y=z-(-33554432&ce)|0,t=(G=fn((33554431&t)<<7|G>>>25,t>>25,19,0))+($-(L=-67108864&oe)|0)|0,L=C+(J-((L>>>0>$>>>0)+re|0)|0)|0,L=t>>>0>>0?L+1|0:L,G=t,t=L,t=((67108863&(t=(L=G+33554432|0)>>>0<33554432?t+1|0:t))<<6|L>>>26)+Y|0,s[X+4>>2]=t,e=-67108864&L,s[X>>2]=G-e}(i=e+120|0,t+80|0),me(o=e+40|0,t,a),k(r,o),me(o,n,e),pe(n,n,e),pe(e,r,o),pe(i,i,n),y=r+48|0}function tt(e){var t,n;return(e=(t=s[8943])+(n=e+3&-4)|0)>>>0<=t>>>0&&(0|n)>=1||e>>>0>Wn()<<16>>>0&&!(0|v(0|e))?(s[8960]=48,-1):(s[8943]=e,t)}function nt(e,t){var n;return y=n=y+-64|0,(t-1&255)>>>0>=64&&(zt(),A()),i[n+3|0]=1,i[n+1|0]=0,i[n+2|0]=1,i[0|n]=t,Vt(4|n),ft(8|n,0,0),ae(n+16|0,0,48),ye(e,n),y=n- -64|0,0}function rt(e,t,n,r,o,i,a){var s=0,c=0;s=r,1==(((s=(c=n+63|0)>>>0<63?s+1|0:s)>>>6|0)+(0!=(0|(s=(63&s)<<26|c>>>6)))|0)&(c=0-s|0)>>>0>>0&&(zt(),A()),xt(e,t,n,r,o,i,a)}function ot(e,t){for(var n=0,r=0,o=0,i=0;r=(n=o<<3)+e|0,i=s[(n=t+n|0)>>2],n=s[r+4>>2]^s[n+4>>2],s[r>>2]=s[r>>2]^i,s[r+4>>2]=n,128!=(0|(o=o+1|0)););}function it(e){var t,n;return 95&(1+(32704^e)>>>8^-1)|45&(1+(16321^e)>>>8^-1)|(t=e+65510>>>8&255)&e+65|(n=e+65484>>>8|0)&e+71&(255^t)|e+252&e+65474>>>8&(-1^n)&255}function at(e){var t,n;return 47&(1+(16320^e)>>>8^-1)|43&(1+(16321^e)>>>8^-1)|(t=e+65510>>>8&255)&e+65|(n=e+65484>>>8|0)&e+71&(255^t)|e+252&e+65474>>>8&(-1^n)&255}function st(e,t,n,r){var o=0;o=-1;e:if(!(n>>>0>64|r-1>>>0>63)){t:{if(!n||!t){if(!nt(e,255&r))break t;break e}if(He(e,255&r,t,255&n))break e}o=0}return o}function ct(e,t){var n,r,o;y=n=y-144|0,K(n+96|0,t+80|0),S(n+48|0,t,n+96|0),S(n,t+40|0,n+96|0),re(e,n),r=e,o=Gt(n+48|0)<<7^c[e+31|0],i[r+31|0]=o,y=n+144|0}function dt(e,t){var n,r=0;if(i[15+(n=y-16|0)|0]=0,t)for(;i[n+15|0]=c[e+r|0]|c[n+15|0],(0|(r=r+1|0))!=(0|t););return c[n+15|0]-1>>>8&1}function ut(e,t,n,r){var o;return r=t+r|0,r=(o=e+n|0)>>>0>>0?r+1|0:r,n=fn(e<<1&-2,1&(t=t<<1|e>>>31),n,0),e=C+r|0,C=e=(t=n+o|0)>>>0>>0?e+1|0:e,t}function lt(e,t,n){var r,o=0;if(r=n>>>3|0)for(n=0;Pe((o=n<<3)+e|0,s[(o=t+o|0)>>2],s[o+4>>2]),(0|r)!=(0|(n=n+1|0)););}function At(e,t){var n=0;!function(e,t){t&&((t=s[e>>2])&&ht(s[t+4>>2],s[e+16>>2]<<10),(t=s[e+4>>2])&&ht(t,s[e+20>>2]<<3))}(e,4&t),R(s[e+4>>2]),s[e+4>>2]=0,(t=s[e>>2])&&(n=s[t>>2])&&R(n),R(t),s[e>>2]=0}function ft(e,t,n){i[0|e]=t,i[e+1|0]=t>>>8,i[e+2|0]=t>>>16,i[e+3|0]=t>>>24,i[e+4|0]=n,i[e+5|0]=n>>>8,i[e+6|0]=n>>>16,i[e+7|0]=n>>>24}function ht(e,t){var n;if(s[12+(n=y-16|0)>>2]=e,t)for(e=0;i[s[n+12>>2]+e|0]=0,(0|t)!=(0|(e=e+1|0)););}function gt(e,t){e|=0;var n=0,r=0,o=0;if(t|=0)for(;r=e+n|0,o=Ot(),i[0|r]=o,(0|(n=n+1|0))!=(0|t););}function pt(e,t,n,r,o){var i,a;return e|=0,t|=0,n|=0,r|=0,y=i=(a=y)-128&-64,te(i,o|=0),X(i,t,n,r),Z(i,e),y=a,0}function mt(e){var t=0,n=0,r=0;for(t=1;t=c[0|(r=e+n|0)]+t|0,i[0|r]=t,t=t>>>8|0,4!=(0|(n=n+1|0)););}function vt(e,t,n,r,o,i,a,s){var c,d=0;return y=c=y-32|0,d=-1,Kt(c,a,s)||(d=on(e,t,n,r,o,i,c),ht(c,32)),y=c+32|0,d}function yt(e,t,n,r,o,i,a,s){var c,d=0;return y=c=y-32|0,d=-1,Kt(c,a,s)||(d=an(e,t,n,r,o,i,c),ht(c,32)),y=c+32|0,d}function bt(e,t){var n,r,o;S(e,t,n=t+120|0),S(e+40|0,r=t+40|0,o=t+80|0),S(e+80|0,o,n),S(e+120|0,t,r)}function It(e,t,n,r,o,i,a){return!r&n>>>0>=16|r?yt(e,t+16|0,t,n-16|0,r-(n>>>0<16)|0,o,i,a):-1}function Ct(e,t){for(var n=0,r=0;i[0|(r=e+n|0)]=c[0|r]^c[t+n|0],8!=(0|(n=n+1|0)););}function Et(e,t,n){var r,o;y=r=(o=y)-384&-64,Lt(r,0,0,24),vn(r,t,32,0),vn(r,n,32,0),Wt(r,e,24),y=o}function wt(e,t){var n;me(e,n=t+40|0,t),pe(e+40|0,n,t),xe(e+80|0,t+80|0),S(e+120|0,t+120|0,2224)}function Bt(e,t,n,r,o,i,a){return t-1>>>0>63|a>>>0>64?-1:function(e,t,n,r,o,i,a){var s,c=0;if(s=c=y,y=c=c-384&-64,!(!e|(r-1&255)>>>0>=64|(o|i?!t:0)|a>>>0>=65|(a?!n:0)))return a?He(c,r,n,a):nt(c,r),oe(c,t,o,i),M(c,e,r),y=s,0;zt(),A()}(e,n,i,255&t,r,o,255&a)}function _t(e,t,n,r,o,i,a){return!r&n>>>0>=4294967280|r&&(zt(),A()),vt(e+16|0,e,t,n,r,o,i,a)}function St(e,t){var n;S(e,t,n=t+120|0),S(e+40|0,t+40|0,t=t+80|0),S(e+80|0,t,n)}function kt(e){var t;return t=c[0|e]|c[e+1|0]<<8,e=c[e+2|0],C=e>>>16|0,t|e<<16}function Ot(){var e,t;return y=e=y-16|0,i[e+15|0]=0,t=0|h(1024,e+15|0,0),y=e+16|0,0|t}function Qt(e,t,n,r,o){var a;return y=a=y-416|0,function(e,t){var n,r=0,o=0;for(y=n=y-192|0,Mt(e),ae(n- -64|0,54,128),i[n+64|0]=54^c[0|t],r=1;i[0|(o=(n- -64|0)+r|0)]=c[0|o]^c[t+r|0],32!=(0|(r=r+1|0)););for(Y(e,n- -64|0,128,0),Mt(e=e+208|0),ae(n- -64|0,92,128),i[n+64|0]=92^c[0|t],r=1;i[0|(o=(n- -64|0)+r|0)]=c[0|o]^c[t+r|0],32!=(0|(r=r+1|0)););Y(e,n- -64|0,128,0),ht(n- -64|0,128),ht(n,64),y=n+192|0}(a,o),Y(a,t,n,r),function(e,t){var n,r=0;y=n=y+-64|0,function(e,t){var n;y=n=y+-64|0,Nt(e,n),Y(e=e+208|0,n,64,0),Nt(e,t),ht(n,64),y=n- -64|0}(e,n),r=s[n+28>>2],e=s[n+24>>2],i[t+24|0]=e,i[t+25|0]=e>>>8,i[t+26|0]=e>>>16,i[t+27|0]=e>>>24,i[t+28|0]=r,i[t+29|0]=r>>>8,i[t+30|0]=r>>>16,i[t+31|0]=r>>>24,r=s[n+20>>2],e=s[n+16>>2],i[t+16|0]=e,i[t+17|0]=e>>>8,i[t+18|0]=e>>>16,i[t+19|0]=e>>>24,i[t+20|0]=r,i[t+21|0]=r>>>8,i[t+22|0]=r>>>16,i[t+23|0]=r>>>24,r=s[n+12>>2],e=s[n+8>>2],i[t+8|0]=e,i[t+9|0]=e>>>8,i[t+10|0]=e>>>16,i[t+11|0]=e>>>24,i[t+12|0]=r,i[t+13|0]=r>>>8,i[t+14|0]=r>>>16,i[t+15|0]=r>>>24,r=s[n+4>>2],e=s[n>>2],i[0|t]=e,i[t+1|0]=e>>>8,i[t+2|0]=e>>>16,i[t+3|0]=e>>>24,i[t+4|0]=r,i[t+5|0]=r>>>8,i[t+6|0]=r>>>16,i[t+7|0]=r>>>24,y=n- -64|0}(a,e),y=a+416|0,0}function Rt(e,t,n,r){var o;return y=o=y-208|0,Mt(o),Y(o,t,n,r),Nt(o,e),y=o+208|0,0}function Pt(e,t){var n=0;return(-1>>>(n=31&t)&e)<>>e}function Nt(e,t){var n;y=n=y-704|0,function(e,t){var n,r=0;(n=s[e+72>>2]>>>3&127)>>>0<=111?q(80+(e+n|0)|0,35424,112-n|0):(q((r=e+80|0)+n|0,35424,128-n|0),w(e,r,t,t+640|0),ae(r,0,112)),lt(e+192|0,e- -64|0,16),w(e,e+80|0,t,t+640|0)}(e,n),lt(t,e,64),ht(n,704),ht(e,208),y=n+704|0}function xt(e,t,n,r,o,i,a){1==(0|r)|r>>>0>1&&(zt(),A()),Vn[s[8957]](e,t,n,r,o,i,a)}function Dt(e,t,n,r,o,i){1==(0|r)|r>>>0>1&&(zt(),A()),Vn[s[8956]](e,t,n,r,o,1,0,i)}function Mt(e){s[e+64>>2]=0,s[e+68>>2]=0,s[e+72>>2]=0,s[e+76>>2]=0,q(e,34720,64)}function Tt(e,t,n){return n>>>0>=256&&(f(2016,2036,107,2089),A()),M(e,t,255&n)}function Ut(){var e;y=e=y-16|0,i[e+15|0]=0,h(1062,e+15|0,0),y=e+16|0}function Ht(e){var t;return y=t=y-32|0,re(t,e),e=dt(t,32),y=t+32|0,e}function jt(e,t){var n;y=n=y-128|0,function(e,t){xe(e,t),xe(e+40|0,t+40|0),xe(e+80|0,t+80|0)}(n+8|0,t),et(e,n+8|0),y=n+128|0}function Jt(e,t){i[0|e]=t,i[e+1|0]=t>>>8,i[e+2|0]=t>>>16,i[e+3|0]=t>>>24}function Ft(e,t,n){Ae(e,t,n),Ae(e+40|0,t+40|0,n),Ae(e+80|0,t+80|0,n)}function Gt(e){var t;return y=t=y-32|0,re(t,e),y=t+32|0,1&i[0|t]}function Lt(e,t,n,r){return 0|st(e|=0,t|=0,n|=0,r|=0)}function qt(e){i[e+32|0]=1,i[e+33|0]=0,i[e+34|0]=0,i[e+35|0]=0}function Yt(e){s[e>>2]=0,s[e+4>>2]=0,s[e+8>>2]=0,s[e+12>>2]=0}function Vt(e){i[0|e]=0,i[e+1|0]=0,i[e+2|0]=0,i[e+3|0]=0}function Wt(e,t,n){return 0|Tt(e|=0,t|=0,n|=0)}function Kt(e,t,n){return 0|function(e,t,n){var r,o=0;return y=r=y-32|0,o=-1,$e(r,n,t)||(o=G(e,35552,r)),y=r+32|0,o}(e|=0,t|=0,n|=0)}function Zt(e,t,n){return 0|$e(e|=0,t|=0,n|=0)}function zt(){var e;(e=s[9105])&&Vn[0|e](),g(),A()}function Xt(e){xn(e),yn(e+40|0),yn(e+80|0),xn(e+120|0)}function $t(e,t,n,r,o,i){Vn[s[8953]](e,t,n,r,o,0,0,i)}function en(e,t,n,r,o,i){Vn[s[8953]](e,t,n,r,o,1,0,i)}function tn(e,t){return e|=0,gt(t|=0,32),0|pn(e,t)}function nn(e,t){return e=function(e,t){var n=0,r=0;e:{if(r=255&t){if(3&e)for(;;){if(!(n=c[0|e])|(0|n)==(255&t))break e;if(!(3&(e=e+1|0)))break}t:if(!((-1^(n=s[e>>2]))&n-16843009&-2139062144))for(r=u(r,16843009);;){if((-1^(n^=r))&n-16843009&-2139062144)break t;if(n=s[e+4>>2],e=e+4|0,n-16843009&(-1^n)&-2139062144)break}for(;(r=c[0|(n=e)])&&(e=n+1|0,(0|r)!=(255&t)););return n}return Oe(e)+e|0}return e}(e,t),c[0|e]==(255&t)?e:0}function rn(e,t,n,r,o,i){return L(e,t,n,r,o,i,0),0}function on(e,t,n,r,o,i,a){return ce(e,t,n,r,o,i,a)}function an(e,t,n,r,o,i,a){return ue(e,t,n,r,o,i,a)}function sn(e,t,n,r,o,i,a){return Bt(e,t,n,r,o,i,a)}function cn(e,t){Mt(e),t&&Y(e,35728,34,0)}function dn(e,t,n,r,o){return Ee(e,t,n,r,o,0)}function un(e,t){return 0|pn(e|=0,t|=0)}function ln(e,t,n,r){Vn[s[8955]](e,t,0,n,r)}function An(e,t,n){Vn[s[8954]](e,64,0,t,n)}function fn(e,t,n,r){return function(e,t,n,r){var o,i,a,s,c=0,d=0;return s=u(c=n>>>16|0,d=e>>>16|0),c=(65535&(d=((a=u(o=65535&n,i=65535&e))>>>16|0)+u(d,o)|0))+u(c,i)|0,e=(u(t,n)+s|0)+u(e,r)+(d>>>16)+(c>>>16)|0,C=e,65535&a|c<<16}(e,t,n,r)}function hn(e,t){return(255&(e^t))-1>>>31|0}function gn(e,t,n){!function(e,t,n){var r,o;y=r=y-128|0,yn(e),yn(e+40|0),xn(e+80|0),Ft(e,t,hn(n=n-((0-(o=(128&n)>>>7|0)&n)<<1)<<24>>24,1)),Ft(e,t+120|0,hn(n,2)),Ft(e,t+240|0,hn(n,3)),Ft(e,t+360|0,hn(n,4)),Ft(e,t+480|0,hn(n,5)),Ft(e,t+600|0,hn(n,6)),Ft(e,t+720|0,hn(n,7)),Ft(e,t+840|0,hn(n,8)),xe(r+8|0,e+40|0),xe(r+48|0,e),Re(r+88|0,e+80|0),Ft(e,r+8|0,o),y=r+128|0}(e,u(t,960)+3488|0,n)}function pn(e,t){return 0|Vn[s[8951]](e,t)}function mn(e,t,n,r){Vn[s[8948]](e,t,n,r)}function vn(e,t,n,r){return bn(e,t,n,r)}function yn(e){s[e>>2]=1,ae(e+4|0,0,36)}function bn(e,t,n,r){return oe(e,t,n,r)}function In(e,t,n){return function(e,t,n){var r=0,o=0,i=0,a=0;return r=31&(i=a=63&n),i>>>0>=32?r=-1>>>r|0:(o=-1>>>r|0,r=(1<>>r),i=r&e,r=t&o,o=31&a,a>>>0>=32?(r=i<>>32-o|r<>>0>=32?(r=-1<>>32-n|-1<>>0>=32?(n=0,e=r>>>t|0):(n=r>>>t|0,e=((1<>>t),C=n|i,e|a}(e,t,n)}function Cn(e,t,n){return function(e,t,n){var r=0,o=0,i=0,a=0,s=0;return r=31&(a=63&n),a>>>0>=32?(o=-1<>>32-r|-1<>>0>=32?(o=0,a=r>>>i|0):(o=r>>>i|0,a=((1<>>i),s=o,i=31&(r=0-n&63),r>>>0>=32?(o=0,n=-1>>>i|0):(o=-1>>>i|0,n=(1<>>i),e&=n,t&=o,o=31&r,r>>>0>=32?(n=e<>>32-o|t<>>0<18,N=N+2|0,O;);Jt(e,n+1634760805|0),Jt(e+4|0,y+r|0),Jt(e+8|0,b+o|0),Jt(e+12|0,Q+i|0),Jt(e+16|0,I+a|0),Jt(e+20|0,k+857760878|0),Jt(e+24|0,C+A|0),Jt(e+28|0,E+f|0),Jt(e+32|0,w+h|0),Jt(e+36|0,S+g|0),Jt(e+40|0,t+2036477234|0),Jt(e+44|0,m+s|0),Jt(e+48|0,p+d|0),Jt(e+52|0,v+u|0),Jt(e+56|0,_+l|0),Jt(e+60|0,B+1797285236|0)}(e,t,n)}function Nn(e){ae(e,0,1024)}function xn(e){ae(e,0,40)}function Dn(){return 16}function Mn(){return 32}function Tn(){return 24}function Un(){return-17}function Hn(){return 64}function jn(){return 1}function Jn(){return 2}function Fn(){return 8}function Gn(){return 0}function Ln(){return-1}function qn(){return 3}o(t=c,1024,"InsgcmV0dXJuIE1vZHVsZS5nZXRSYW5kb21WYWx1ZSgpOyB9IgB7IGlmIChNb2R1bGUuZ2V0UmFuZG9tVmFsdWUgPT09IHVuZGVmaW5lZCkgeyB0cnkgeyB2YXIgd2luZG93XyA9ICdvYmplY3QnID09PSB0eXBlb2Ygd2luZG93ID8gd2luZG93IDogc2VsZjsgdmFyIGNyeXB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ms9gA4o16/3pCmf629YYA4+QZAdY56//YrTj/tefSAHeAnf+BX4j/bn4zAAKpt/8HgmL+RbBe/3QE4wHZ8pH/yq0fAWkBJ/8ur0UA5C86/9fgRf7POEX/EP6L/xfP1P/KFH7/X9Vg/wmwIQDIBc//8SqA/iMhwP/45cQBgRF4APtnl/8HNHD/jDhC/yji9f/ZRiX+rNYJ/0hDhgGSwNb/LCZwAES4S//OWvsAleuNALWqOgB09O8AXJ0CAGatYgDpiWABfzHLAAWblAAXlAn/03oMACKGGv/bzIgAhggp/+BTK/5VGfcAbX8A/qmIMADud9v/563VAM4S/v4Iugf/fgkHAW8qSABvNOz+YD+NAJO/f/7NTsD/DmrtAbvbTACv87v+aVmtAFUZWQGi85QAAnbR/iGeCQCLoy7/XUYoAGwqjv5v/I7/m9+QADPlp/9J/Jv/XnQM/5ig2v+c7iX/s+rP/8UAs/+apI0A4cRoAAojGf7R1PL/Yf3e/rhl5QDeEn8BpIiH/x7PjP6SYfMAgcAa/slUIf9vCk7/k1Gy/wQEGACh7tf/Bo0hADXXDv8ptdD/54udALPL3f//uXEAveKs/3FC1v/KPi3/ZkAI/06uEP6FdUT/"),o(t,3264,"AQ=="),o(t,3296,"JuiVj8KyJ7BFw/SJ8u+Y8NXfrAXTxjM5sTgCiG1T/AXHF2pwPU3YT7o8C3YNEGcPKiBT+iw5zMZOx/13kqwDeuz///////////////////////////////////////9/7f///////////////////////////////////////3/u////////////////////////////////////////f+3T9VwaYxJY1pz3ot753hQ="),o(t,3487,"EIU7jAG98ST/+CXDAWDcNwC3TD7/w0I9ADJMpAHhpEz/TD2j/3U+HwBRkUD/dkEOAKJz1v8Gii4AfOb0/wqKjwA0GsIAuPRMAIGPKQG+9BP/e6p6/2KBRAB51ZMAVmUe/6FnmwCMWUP/7+W+AUMLtQDG8In+7kW8/+pxPP8l/zn/RbK2/oDQswB2Gn3+AwfW//EyTf9Vy8X/04f6/xkwZP+71bT+EVhpAFPRngEFc2IABK48/qs3bv/ZtRH/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+wAAAAAAAP0AAAAA8wAAAAAHAAAAAAADAAAAAPMAAAAABQAAAAAAAAAACwAAAAAACwAAAADzAAAAAAAA/QAAAAAA/wAAAAADAAAAAPUAAAAAAAAADwAAAAAA/wAAAAD/AAAAAAcAAAAABQ=="),o(t,34460,"AQ=="),o(t,34496,"AQ=="),o(t,34528,"4Ot6fDtBuK4WVuP68Z/EatoJjeucMrH9hmIFFl9JuABfnJW8o1CMJLHQsVWcg+9bBERcxFgcjobYIk7d0J8RV+z///////////////////////////////////////9/7f///////////////////////////////////////3/u////////////////////////////////////////fw=="),o(t,34720,"CMm882fmCWo7p8qEha5nuyv4lP5y82488TYdXzr1T6XRguatf1IOUR9sPiuMaAWba71B+6vZgx95IX4TGc3gWyKuKNeYL4pCzWXvI5FEN3EvO03sz/vAtbzbiYGl27XpOLVI81vCVjkZ0AW28RHxWZtPGa+kgj+SGIFt2tVeHKtCAgOjmKoH2L5vcEUBW4MSjLLkTr6FMSTitP/Vw30MVW+Je/J0Xb5ysZYWO/6x3oA1Esclpwbcm5Qmac908ZvB0krxnsFpm+TjJU84hke+77XVjIvGncEPZZysd8yhDCR1AitZbyzpLYPkpm6qhHRK1PtBvdypsFy1UxGD2oj5dqvfZu5SUT6YEDK0LW3GMag/IfuYyCcDsOQO777Hf1m/wo+oPfML4MYlpwqTR5Gn1W+CA+BRY8oGcG4OCmcpKRT8L9JGhQq3JybJJlw4IRsu7SrEWvxtLE3fs5WdEw04U95jr4tUcwplqLJ3PLsKanbmru1HLsnCgTs1ghSFLHKSZAPxTKHov6IBMEK8S2YaqJGX+NBwi0vCML5UBqNRbMcYUu/WGeiS0RCpZVUkBpnWKiBxV4U1DvS40bsycKBqEMjQ0rgWwaQZU6tBUQhsNx6Z647fTHdIJ6hIm+G1vLA0Y1rJxbMMHDnLikHjSqrYTnPjY3dPypxbo7iy1vNvLmj8su9d7oKPdGAvF0NvY6V4cqvwoRR4yITsOWQaCALHjCgeYyP6/76Q6b2C3utsUKQVecay96P5vitTcuPyeHHGnGEm6s4+J8oHwsAhx7iG0R7r4M3WfdrqeNFu7n9PffW6bxdyqmfwBqaYyKLFfWMKrg35vgSYPxEbRxwTNQtxG4R9BCP1d9sokyTHQHuryjK8vskVCr6ePEwNEJzEZx1DtkI+y77UxUwqfmX8nCl/Wez61jqrb8tfF1hHSowZRGyA"),o(t,35568,"YjY0X3BvcyA8PSBiNjRfbGVuAHNvZGl1bS9jb2RlY3MuYwBzb2RpdW1fYmluMmJhc2U2NAAkYXJnb24yaWQAJGFyZ29uMmkAJHY9ACRtPQAsdD0ALHA9ACRhcmdvbjJpZCR2PQAkYXJnb24yaSR2PQAkYXJnb24yaWQkACRhcmdvbjJpJA=="),o(t,35728,"U2lnRWQyNTUxOSBubyBFZDI1NTE5IGNvbGxpc2lvbnMBADEuMC4xOA=="),o(t,35772,"UI5QAABAAAABAAAAAgAAAAMAAAAEAAAABQAAAAYAAAAHAAAACAAAAAkAAAAKAAAACwAAAAwAAAAN");var Yn,Vn=((Yn=[null,pt,function(e,t,n,r,o){var i;return e|=0,y=i=y-16|0,pt(i,t|=0,n|=0,r|=0,o|=0),e=Sn(e,i),y=i+16|0,0|e},function(e,t){return te(e|=0,t|=0),0},function(e,t,n,r){return X(e|=0,t|=0,n|=0,r|=0),0},function(e,t){return Z(e|=0,t|=0),0},function(e,t,n){e|=0,t|=0;var r,o=0,a=0;if(y=r=y-336|0,o=-1,!function(e){var t,n=0,r=0,o=0,a=0;for(i[11+(t=y-16|0)|0]=0,i[t+12|0]=0,i[t+13|0]=0,i[t+14|0]=0,s[t+8>>2]=0;;){for(o=c[e+r|0],n=0;i[0|(a=(t+8|0)+n|0)]=c[0|a]|o^c[(34464+(n<<5)|0)+r|0],7!=(0|(n=n+1|0)););if(31==(0|(r=r+1|0)))break}for(r=127&c[e+31|0],e=0,n=0;i[0|(o=(t+8|0)+n|0)]=c[0|o]|r^c[34495+(n<<5)|0],7!=(0|(n=n+1|0)););for(n=0;n=c[(t+8|0)+e|0]-1|n,7!=(0|(e=e+1|0)););return n>>>8&1}(n|=0)){for(o=0;i[e+o|0]=c[t+o|0],32!=(0|(o=o+1|0)););for(i[0|e]=248&c[0|e],i[e+31|0]=63&c[e+31|0]|64,T(r+288|0,n),yn(r+240|0),xn(r+192|0),xe(r+144|0,r+288|0),yn(r+96|0),n=254,t=0;o=t,a=n,ee(r+240|0,r+144|0,o^=t=c[(n>>>3|0)+e|0]>>>(7&n)&1),ee(r+192|0,r+96|0,o),n=n-1|0,pe(r+48|0,r+144|0,r+96|0),pe(r,r+240|0,r+192|0),me(r+240|0,r+240|0,r+192|0),me(r+192|0,r+144|0,r+96|0),S(r+96|0,r+48|0,r+240|0),S(r+192|0,r+192|0,r),k(r+48|0,r),k(r,r+240|0),me(r+144|0,r+96|0,r+192|0),pe(r+192|0,r+96|0,r+192|0),S(r+240|0,r,r+48|0),pe(r,r,r+48|0),k(r+192|0,r+192|0),U(r+96|0,r),k(r+144|0,r+144|0),me(r+48|0,r+48|0,r+96|0),S(r+96|0,r+288|0,r+192|0),S(r+192|0,r,r+48|0),a;);ee(r+240|0,r+144|0,t),ee(r+192|0,r+96|0,t),K(r+192|0,r+192|0),S(r+240|0,r+240|0,r+192|0),re(e,r+240|0),o=0}return y=r+336|0,0|o},function(e,t){e|=0,t|=0;var n,r=0;for(y=n=y-208|0;i[e+r|0]=c[t+r|0],32!=(0|(r=r+1|0)););return i[0|e]=248&c[0|e],i[e+31|0]=63&c[e+31|0]|64,ie(n+48|0,e),function(e,t,n){var r;y=r=y-96|0,me(r+48|0,n,t),pe(r,n,t),K(r,r),S(e,r+48|0,r),y=r+96|0}(n,n+88|0,n+128|0),re(e,n),y=n+208|0,0},function(e,t,n,r,o){e|=0,r|=0,o|=0;var a,d=0;if(y=a=y-112|0,(t|=0)|(n|=0)){d=c[o+28|0]|c[o+29|0]<<8|c[o+30|0]<<16|c[o+31|0]<<24,s[a+24>>2]=c[o+24|0]|c[o+25|0]<<8|c[o+26|0]<<16|c[o+27|0]<<24,s[a+28>>2]=d,d=c[o+20|0]|c[o+21|0]<<8|c[o+22|0]<<16|c[o+23|0]<<24,s[a+16>>2]=c[o+16|0]|c[o+17|0]<<8|c[o+18|0]<<16|c[o+19|0]<<24,s[a+20>>2]=d,d=c[o+4|0]|c[o+5|0]<<8|c[o+6|0]<<16|c[o+7|0]<<24,s[a>>2]=c[0|o]|c[o+1|0]<<8|c[o+2|0]<<16|c[o+3|0]<<24,s[a+4>>2]=d,d=c[o+12|0]|c[o+13|0]<<8|c[o+14|0]<<16|c[o+15|0]<<24,s[a+8>>2]=c[o+8|0]|c[o+9|0]<<8|c[o+10|0]<<16|c[o+11|0]<<24,s[a+12>>2]=d,o=c[0|r]|c[r+1|0]<<8|c[r+2|0]<<16|c[r+3|0]<<24,r=c[r+4|0]|c[r+5|0]<<8|c[r+6|0]<<16|c[r+7|0]<<24,s[a+104>>2]=0,s[a+108>>2]=0,s[a+96>>2]=o,s[a+100>>2]=r;e:{if(!n&t>>>0>=64|n){for(;;){for(Pn(e,a+96|0,a),o=8,r=1;r=c[0|(d=(a+96|0)+o|0)]+r|0,i[0|d]=r,r=r>>>8|0,16!=(0|(o=o+1|0)););if(e=e- -64|0,n=n-1|0,!(!(n=(t=t+-64|0)>>>0<4294967232?n+1|0:n)&t>>>0>63|n))break}if(!(t|n))break e}for(o=0,Pn(a+32|0,a+96|0,a);i[e+o|0]=c[(a+32|0)+o|0],(0|t)!=(0|(o=o+1|0)););}ht(a+32|0,64),ht(a,32)}return y=a+112|0,0},function(e,t,n,r,o,a,d,u){e|=0,t|=0,o|=0,a|=0,d|=0,u|=0;var l,A=0,f=0;if(y=l=y-112|0,(n|=0)|(r|=0)){for(A=c[u+28|0]|c[u+29|0]<<8|c[u+30|0]<<16|c[u+31|0]<<24,s[l+24>>2]=c[u+24|0]|c[u+25|0]<<8|c[u+26|0]<<16|c[u+27|0]<<24,s[l+28>>2]=A,A=c[u+20|0]|c[u+21|0]<<8|c[u+22|0]<<16|c[u+23|0]<<24,s[l+16>>2]=c[u+16|0]|c[u+17|0]<<8|c[u+18|0]<<16|c[u+19|0]<<24,s[l+20>>2]=A,A=c[u+4|0]|c[u+5|0]<<8|c[u+6|0]<<16|c[u+7|0]<<24,s[l>>2]=c[0|u]|c[u+1|0]<<8|c[u+2|0]<<16|c[u+3|0]<<24,s[l+4>>2]=A,A=8,f=c[u+12|0]|c[u+13|0]<<8|c[u+14|0]<<16|c[u+15|0]<<24,s[l+8>>2]=c[u+8|0]|c[u+9|0]<<8|c[u+10|0]<<16|c[u+11|0]<<24,s[l+12>>2]=f,u=c[o+4|0]|c[o+5|0]<<8|c[o+6|0]<<16|c[o+7|0]<<24,s[l+96>>2]=c[0|o]|c[o+1|0]<<8|c[o+2|0]<<16|c[o+3|0]<<24,s[l+100>>2]=u;i[(l+96|0)+A|0]=a,a=(255&d)<<24|a>>>8,d=d>>>8|0,16!=(0|(A=A+1|0)););if(!r&n>>>0>63|r)for(;;){for(A=0,Pn(l+32|0,l+96|0,l);i[e+A|0]=c[(l+32|0)+A|0]^c[t+A|0],u=1,64!=(0|(A=A+1|0)););for(A=8;o=c[0|(a=(l+96|0)+A|0)]+u|0,i[0|a]=o,u=o>>>8|0,16!=(0|(A=A+1|0)););if(t=t- -64|0,e=e- -64|0,r=r-1|0,!(!(r=(n=n+-64|0)>>>0<4294967232?r+1|0:r)&n>>>0>63|r))break}if(n|r)for(A=0,Pn(l+32|0,l+96|0,l);i[e+A|0]=c[(l+32|0)+A|0]^c[t+A|0],(0|n)!=(0|(A=A+1|0)););ht(l+32|0,64),ht(l,32)}return y=l+112|0,0},function(e,t,n,r,o){var i;return e|=0,r|=0,y=i=y+-64|0,(t|=0)|(n|=0)&&(de(i,o|=0),Ne(i,r,0),N(i,e=ae(e,0,t),e,t,n),ht(i,64)),y=i- -64|0,0},function(e,t,n,r,o){var i;return e|=0,r|=0,y=i=y+-64|0,(t|=0)|(n|=0)&&(de(i,o|=0),je(i,r,0),N(i,e=ae(e,0,t),e,t,n),ht(i,64)),y=i- -64|0,0},function(e,t,n,r,o,i,a,s){var c;return e|=0,t|=0,o|=0,a|=0,s|=0,y=c=y-80|0,(n|=0)|(r|=0)&&(Jt(c+8|0,i|=0),Jt(c+12|0,a),de(c+16|0,s),Ne(c+16|0,o,c+8|0),N(c+16|0,t,e,n,r),ht(c+16|0,64)),y=c+80|0,0},function(e,t,n,r,o,i,a){var s;return e|=0,t|=0,o|=0,a|=0,y=s=y-80|0,(n|=0)|(r|=0)&&(Jt(s+12|0,i|=0),de(s+16|0,a),je(s+16|0,o,s+12|0),N(s+16|0,t,e,n,r),ht(s+16|0,64)),y=s+80|0,0}]).grow=function(e){var t=this.length;return this.length=this.length+e,t},Yn.set=function(e,t){this[e]=t},Yn.get=function(e){return this[e]},Yn);function Wn(){return r.byteLength/65536|0}return{h:Vn,i:function(){},j:function(e,t,n,r,o,i,a,s,c,d,u,l){return 0|Ue(e|=0,t|=0,n|=0,r|=0,o|=0,i|=0,a|=0,s|=0,c|=0,u|=0,l|=0)},k:function(e,t,n,r,o,i,a,c,d,u,l){return 0|function(e,t,n,r,o,i,a,c,d,u){if(!o&r>>>0<4294967280)return Ue(e,e+r|0,0,n,r,o,i,a,c,d,u),t&&(o=(e=r+16|0)>>>0<16?o+1|0:o,s[t>>2]=e,s[t+4>>2]=o),0;zt(),A()}(e|=0,t|=0,n|=0,r|=0,o|=0,i|=0,a|=0,c|=0,u|=0,l|=0)},l:function(e,t,n,r,o,i,a,s,c,d,u,l){return 0|Se(e|=0,t|=0,n|=0,r|=0,o|=0,i|=0,a|=0,s|=0,c|=0,u|=0,l|=0)},m:function(e,t,n,r,o,i,a,c,d,u,l){return 0|function(e,t,n,r,o,i,a,c,d,u){if(!o&r>>>0<4294967280)return Se(e,e+r|0,0,n,r,o,i,a,c,d,u),t&&(o=(e=r+16|0)>>>0<16?o+1|0:o,s[t>>2]=e,s[t+4>>2]=o),0;zt(),A()}(e|=0,t|=0,n|=0,r|=0,o|=0,i|=0,a|=0,c|=0,u|=0,l|=0)},n:function(e,t,n,r,o,i,a,s,c,d,u){return 0|ke(e|=0,n|=0,r|=0,o|=0,i|=0,a|=0,s|=0,c|=0,d|=0,u|=0)},o:function(e,t,n,r,o,i,a,c,d,u,l){return 0|function(e,t,n,r,o,i,a,c,d,u){var l=0;return l=-1,!o&r>>>0>=16|o&&(l=ke(e,n,r-16|0,o-(r>>>0<16)|0,(n+r|0)-16|0,i,a,c,d,u)),t&&(s[t>>2]=l?0:r-16|0,s[t+4>>2]=l?0:o-(r>>>0<16)|0),l}(e|=0,t|=0,r|=0,o|=0,i|=0,a|=0,c|=0,d|=0,u|=0,l|=0)},p:function(e,t,n,r,o,i,a,s,c,d,u){return 0|Be(e|=0,n|=0,r|=0,o|=0,i|=0,a|=0,s|=0,c|=0,d|=0,u|=0)},q:function(e,t,n,r,o,i,a,c,d,u,l){return 0|function(e,t,n,r,o,i,a,c,d,u){var l=0;return l=-1,!o&r>>>0>=16|o&&(l=Be(e,n,r-16|0,o-(r>>>0<16)|0,(n+r|0)-16|0,i,a,c,d,u)),t&&(s[t>>2]=l?0:r-16|0,s[t+4>>2]=l?0:o-(r>>>0<16)|0),l}(e|=0,t|=0,r|=0,o|=0,i|=0,a|=0,c|=0,d|=0,u|=0,l|=0)},r:Mn,s:function(){return 12},t:Gn,u:Dn,v:Un,w:Rn,x:Mn,y:Fn,z:Gn,A:Dn,B:Un,C:Rn,D:function(e,t,n,r,o,i,a,s,c,d,u,l){return 0|De(e|=0,t|=0,n|=0,r|=0,o|=0,i|=0,a|=0,s|=0,c|=0,u|=0,l|=0)},E:function(e,t,n,r,o,i,a,c,d,u,l){return 0|function(e,t,n,r,o,i,a,c,d,u){if(!o&r>>>0<4294967280)return De(e,e+r|0,0,n,r,o,i,a,c,d,u),t&&(o=(e=r+16|0)>>>0<16?o+1|0:o,s[t>>2]=e,s[t+4>>2]=o),0;zt(),A()}(e|=0,t|=0,n|=0,r|=0,o|=0,i|=0,a|=0,c|=0,u|=0,l|=0)},F:function(e,t,n,r,o,i,a,s,c,d,u){return 0|Me(e|=0,n|=0,r|=0,o|=0,i|=0,a|=0,s|=0,c|=0,d|=0,u|=0)},G:function(e,t,n,r,o,i,a,c,d,u,l){return 0|function(e,t,n,r,o,i,a,c,d,u){var l=0;return l=-1,!o&r>>>0>=16|o&&(l=Me(e,n,r-16|0,o-(r>>>0<16)|0,(n+r|0)-16|0,i,a,c,d,u)),t&&(s[t>>2]=l?0:r-16|0,s[t+4>>2]=l?0:o-(r>>>0<16)|0),l}(e|=0,t|=0,r|=0,o|=0,i|=0,a|=0,c|=0,d|=0,u|=0,l|=0)},H:Mn,I:Tn,J:Gn,K:Dn,L:Un,M:Rn,N:Mn,O:Mn,P:function(e,t,n,r,o){return 0|Qt(e|=0,t|=0,n|=0,r|=0,o|=0)},Q:function(e,t,n,r,o){return 0|function(e,t,n,r,o){var i;return y=i=y-32|0,Qt(i,t,n,r,o),t=_n(e,i),n=Xe(i,e,32),y=i+32|0,n|((0|e)==(0|i)?-1:t)}(e|=0,t|=0,n|=0,r|=0,o|=0)},R:Rn,S:Mn,T:Mn,U:Mn,V:Mn,W:Tn,X:Dn,Y:Un,Z:function(e,t,n){return 0|function(e,t,n){var r,o=0;return y=r=y+-64|0,Rt(r,n,32,0),n=s[r+28>>2],o=s[r+24>>2],i[t+24|0]=o,i[t+25|0]=o>>>8,i[t+26|0]=o>>>16,i[t+27|0]=o>>>24,i[t+28|0]=n,i[t+29|0]=n>>>8,i[t+30|0]=n>>>16,i[t+31|0]=n>>>24,n=s[r+20>>2],o=s[r+16>>2],i[t+16|0]=o,i[t+17|0]=o>>>8,i[t+18|0]=o>>>16,i[t+19|0]=o>>>24,i[t+20|0]=n,i[t+21|0]=n>>>8,i[t+22|0]=n>>>16,i[t+23|0]=n>>>24,n=s[r+12>>2],o=s[r+8>>2],i[t+8|0]=o,i[t+9|0]=o>>>8,i[t+10|0]=o>>>16,i[t+11|0]=o>>>24,i[t+12|0]=n,i[t+13|0]=n>>>8,i[t+14|0]=n>>>16,i[t+15|0]=n>>>24,n=s[r+4>>2],o=s[r>>2],i[0|t]=o,i[t+1|0]=o>>>8,i[t+2|0]=o>>>16,i[t+3|0]=o>>>24,i[t+4|0]=n,i[t+5|0]=n>>>8,i[t+6|0]=n>>>16,i[t+7|0]=n>>>24,ht(r,64),e=pn(e,t),y=r- -64|0,e}(e|=0,t|=0,n|=0)},_:tn,$:Kt,aa:function(e,t,n,r,o,i,a){return 0|on(e|=0,t|=0,n|=0,r|=0,o|=0,i|=0,a|=0)},ba:function(e,t,n,r,o,i,a,s){return 0|vt(e|=0,t|=0,n|=0,r|=0,o|=0,i|=0,a|=0,s|=0)},ca:function(e,t,n,r,o,i){return 0|function(e,t,n,r,o,i){return!r&n>>>0>=4294967280|r&&(zt(),A()),on(e+16|0,e,t,n,r,o,i)}(e|=0,t|=0,n|=0,r|=0,o|=0,i|=0)},da:function(e,t,n,r,o,i,a){return 0|_t(e|=0,t|=0,n|=0,r|=0,o|=0,i|=0,a|=0)},ea:function(e,t,n,r,o,i,a){return 0|an(e|=0,t|=0,n|=0,r|=0,o|=0,i|=0,a|=0)},fa:function(e,t,n,r,o,i,a,s){return 0|yt(e|=0,t|=0,n|=0,r|=0,o|=0,i|=0,a|=0,s|=0)},ga:function(e,t,n,r,o,i){return 0|function(e,t,n,r,o,i){return!r&n>>>0>=16|r?an(e,t+16|0,t,n-16|0,r-(n>>>0<16)|0,o,i):-1}(e|=0,t|=0,n|=0,r|=0,o|=0,i|=0)},ha:function(e,t,n,r,o,i,a){return 0|It(e|=0,t|=0,n|=0,r|=0,o|=0,i|=0,a|=0)},ia:function(e,t,n,r,o){return 0|function(e,t,n,r,o){var a,c=0;return y=a=y-96|0,c=-1,tn(a+32|0,a)||(Et(a- -64|0,a+32|0,o),c=_t(e+32|0,t,n,r,a- -64|0,o,a),t=s[a+60>>2],n=s[a+56>>2],i[e+24|0]=n,i[e+25|0]=n>>>8,i[e+26|0]=n>>>16,i[e+27|0]=n>>>24,i[e+28|0]=t,i[e+29|0]=t>>>8,i[e+30|0]=t>>>16,i[e+31|0]=t>>>24,t=s[a+52>>2],n=s[a+48>>2],i[e+16|0]=n,i[e+17|0]=n>>>8,i[e+18|0]=n>>>16,i[e+19|0]=n>>>24,i[e+20|0]=t,i[e+21|0]=t>>>8,i[e+22|0]=t>>>16,i[e+23|0]=t>>>24,t=s[a+44>>2],n=s[a+40>>2],i[e+8|0]=n,i[e+9|0]=n>>>8,i[e+10|0]=n>>>16,i[e+11|0]=n>>>24,i[e+12|0]=t,i[e+13|0]=t>>>8,i[e+14|0]=t>>>16,i[e+15|0]=t>>>24,t=s[a+36>>2],n=s[a+32>>2],i[0|e]=n,i[e+1|0]=n>>>8,i[e+2|0]=n>>>16,i[e+3|0]=n>>>24,i[e+4|0]=t,i[e+5|0]=t>>>8,i[e+6|0]=t>>>16,i[e+7|0]=t>>>24,ht(a,32),ht(a+32|0,32),ht(a- -64|0,24)),y=a+96|0,c}(e|=0,t|=0,n|=0,r|=0,o|=0)},ja:function(e,t,n,r,o,i){return 0|function(e,t,n,r,o,i){var a,s=0;return y=a=y-32|0,s=-1,!r&n>>>0>=48|r&&(Et(a,t,o),s=It(e,t+32|0,n-32|0,r-(n>>>0<32)|0,a,t,i)),y=a+32|0,s}(e|=0,t|=0,n|=0,r|=0,o|=0,i|=0)},ka:function(){return 48},la:Dn,ma:Hn,na:Mn,oa:Dn,pa:Hn,qa:Mn,ra:function(){return 384},sa:function(e,t,n,r,o,i,a){return 0|sn(e|=0,t|=0,n|=0,r|=0,o|=0,i|=0,a|=0)},ta:Lt,ua:function(e,t,n,r){return 0|vn(e|=0,t|=0,n|=0,r|=0)},va:Wt,wa:Rn,xa:Hn,ya:function(e,t,n,r){return 0|Rt(e|=0,t|=0,n|=0,r|=0)},za:Dn,Aa:Hn,Ba:Fn,Ca:Mn,Da:function(e,t,n,r,o,d){return 0|function(e,t,n,r,o,d){var u,l;return y=u=y-32|0,l=c[0|o]|c[o+1|0]<<8|c[o+2|0]<<16|c[o+3|0]<<24,o=c[o+4|0]|c[o+5|0]<<8|c[o+6|0]<<16|c[o+7|0]<<24,s[u+24>>2]=0,s[u+28>>2]=0,s[u+16>>2]=l,s[u+20>>2]=o,ft(u,n,r),s[u+8>>2]=0,s[u+12>>2]=0,t-16>>>0>=49?(s[8960]=28,e=-1):(n=u+16|0,e=t-1>>>0>63?-1:function(e,t,n,r,o){var d,u=0;if(d=u=y,y=u=u-384&-64,!(!t|!e|(n-1&255)>>>0>=64))return function(e,t,n,r,o){var d;if(y=d=y-192|0,!(!n|(t-1&255)>>>0>=64))return a[d+130>>1]=257,i[d+129|0]=32,i[d+128|0]=t,Vt(d+128|4),ft(d+128|8,0,0),s[d+152>>2]=0,s[d+156>>2]=0,s[d+144>>2]=0,s[d+148>>2]=0,r?function(e,t){var n,r=0;r=c[t+4|0]|c[t+5|0]<<8|c[t+6|0]<<16|c[t+7|0]<<24,n=c[0|t]|c[t+1|0]<<8|c[t+2|0]<<16|c[t+3|0]<<24,i[e+32|0]=n,i[e+33|0]=n>>>8,i[e+34|0]=n>>>16,i[e+35|0]=n>>>24,i[e+36|0]=r,i[e+37|0]=r>>>8,i[e+38|0]=r>>>16,i[e+39|0]=r>>>24,r=c[t+12|0]|c[t+13|0]<<8|c[t+14|0]<<16|c[t+15|0]<<24,t=c[t+8|0]|c[t+9|0]<<8|c[t+10|0]<<16|c[t+11|0]<<24,i[e+40|0]=t,i[e+41|0]=t>>>8,i[e+42|0]=t>>>16,i[e+43|0]=t>>>24,i[e+44|0]=r,i[e+45|0]=r>>>8,i[e+46|0]=r>>>16,i[e+47|0]=r>>>24}(d+128|0,r):(s[d+168>>2]=0,s[d+172>>2]=0,s[d+160>>2]=0,s[d+164>>2]=0),o?function(e,t){var n,r=0;r=c[t+4|0]|c[t+5|0]<<8|c[t+6|0]<<16|c[t+7|0]<<24,n=c[0|t]|c[t+1|0]<<8|c[t+2|0]<<16|c[t+3|0]<<24,i[e+48|0]=n,i[e+49|0]=n>>>8,i[e+50|0]=n>>>16,i[e+51|0]=n>>>24,i[e+52|0]=r,i[e+53|0]=r>>>8,i[e+54|0]=r>>>16,i[e+55|0]=r>>>24,r=c[t+12|0]|c[t+13|0]<<8|c[t+14|0]<<16|c[t+15|0]<<24,t=c[t+8|0]|c[t+9|0]<<8|c[t+10|0]<<16|c[t+11|0]<<24,i[e+56|0]=t,i[e+57|0]=t>>>8,i[e+58|0]=t>>>16,i[e+59|0]=t>>>24,i[e+60|0]=r,i[e+61|0]=r>>>8,i[e+62|0]=r>>>16,i[e+63|0]=r>>>24}(d+128|0,o):(s[d+184>>2]=0,s[d+188>>2]=0,s[d+176>>2]=0,s[d+180>>2]=0),ye(e,d+128|0),ae(d+32|0,0,96),oe(t=e,e=q(d,n,32),128,0),ht(e,128),void(y=e+192|0);zt(),A()}(u,n,t,r,o),oe(u,0,0,0),M(u,e,n),y=d,0;zt(),A()}(e,d,255&t,u,n)),y=u+32|0,e}(e|=0,t|=0,n|=0,r|=0,o|=0,d|=0)},Ea:Rn,Fa:function(e,t,n){return e|=0,sn(t|=0,32,n|=0,32,0,0,0),0|un(e,t)},Ga:function(e,t){return e|=0,gt(t|=0,32),0|un(e,t)},Ha:function(e,t,n,r,o){t|=0,n|=0,o|=0;var a,s,d=0;if(s=d=y,y=d=d-512&-64,a=(e|=0)||t){if(e=-1,!Zt(d+96|0,r|=0,o)){for(t=t||a,e=0,Lt(d+128|0,0,0,64),vn(d+128|0,d+96|0,32,0),ht(d+96|0,32),vn(d+128|0,n,32,0),vn(d+128|0,o,32,0),Wt(d+128|0,d+32|0,64),ht(d+128|0,384);n=(d+32|0)+e|0,i[e+a|0]=c[0|n],i[e+t|0]=c[n+32|0],32!=(0|(e=e+1|0)););ht(d+32|0,64),e=0}return y=s,0|e}zt(),A()},Ia:function(e,t,n,r,o){t|=0,n|=0,o|=0;var a,s,d=0;if(s=d=y,y=d=d-512&-64,a=(e|=0)||t){if(e=-1,!Zt(d+96|0,r|=0,o)){for(t=t||a,e=0,Lt(d+128|0,0,0,64),vn(d+128|0,d+96|0,32,0),ht(d+96|0,32),vn(d+128|0,o,32,0),vn(d+128|0,n,32,0),Wt(d+128|0,d+32|0,64),ht(d+128|0,384);n=(d+32|0)+e|0,i[e+t|0]=c[0|n],i[e+a|0]=c[n+32|0],32!=(0|(e=e+1|0)););ht(d+32|0,64),e=0}return y=s,0|e}zt(),A()},Ja:Mn,Ka:Mn,La:Mn,Ma:Mn,Na:jn,Oa:Jn,Pa:Jn,Qa:Dn,Ra:Ln,Sa:Gn,Ta:Ln,Ua:Dn,Va:function(){return 128},Wa:function(){return 35681},Xa:jn,Ya:Ln,Za:function(){return 8192},_a:function(){return-2147483648},$a:Jn,ab:function(){return 67108864},bb:qn,cb:function(){return 268435456},db:function(){return 4},eb:function(){return 1073741824},fb:function(e,t,n,r,o,i,a,c,d,u,l){return 0|function(e,t,n,r,o,i,a,c,d,u,l){switch(l-1|0){case 0:return function(e,t,n,r,o,i,a,c,d,u){var l,A;A=t,l=ae(e,0,t),e=22;e:if(!n){if(!(!n&t>>>0<16)){if(i|d|u>>>0>2147483648)break e;if(!(!d&c>>>0<3|u>>>0<8192)){if(e=28,(0|r)==(0|l))break e;return Ce(c,u>>>10|0,1,r,o,a,16,l,A,0,0,1)?-1:0}}e=28}return s[8960]=e,-1}(e,t,n,r,o,i,a,c,d,u);case 1:return function(e,t,n,r,o,i,a,c,d,u){var l,A;A=t,l=ae(e,0,t),e=22;e:if(!n){if(!(!n&t>>>0<16)){if(i|d|u>>>0>2147483648)break e;if(!(!(c|d)|u>>>0<8192)){if(e=28,(0|r)==(0|l))break e;return Ce(c,u>>>10|0,1,r,o,a,16,l,A,0,0,2)?-1:0}}e=28}return s[8960]=e,-1}(e,t,n,r,o,i,a,c,d,u)}return s[8960]=28,-1}(e|=0,t|=0,n|=0,r|=0,o|=0,i|=0,a|=0,c|=0,d|=0,u|=0,l|=0)},gb:function(e,t,n,r,o,i,a){return 0|Je(e|=0,t|=0,n|=0,r|=0,o|=0,i|=0,a|=0)},hb:function(e,t,n,r,o,i,a,c){return 0|function(e,t,n,r,o,i,a,c){switch(c-1|0){case 1:return Je(e,t,n,r,o,i,a);default:zt(),A();case 0:}return function(e,t,n,r,o,i,a){var c;return y=c=y-16|0,e=ae(e,0,128),a>>>0<2147483649&&!(r|i)?a>>>0>8191&&!i&o>>>0>=3|0!=(0|i)?(gt(c,16),e=Ce(o,a>>>10|0,1,t,n,c,16,0,32,e,128,1)?-1:0):(s[8960]=28,e=-1):(s[8960]=22,e=-1),y=c+16|0,e}(e,t,n,r,o,i,a)}(e|=0,t|=0,n|=0,r|=0,o|=0,i|=0,a|=0,c|=0)},ib:function(e,t,n,r){return 0|function(e,t,n,r){return qe(e,35681,10)?qe(e,35692,9)?(s[8960]=28,-1):function(e,t,n,r){e:{if(1==(0|r)|r>>>0>1)s[8960]=22;else{if(!(e=he(e,t,n,1)))break e;-35==(0|e)&&(s[8960]=28)}e=-1}return e}(e,t,n,r):function(e,t,n,r){e:{if(1==(0|r)|r>>>0>1)s[8960]=22;else{if(!(e=he(e,t,n,2)))break e;-35==(0|e)&&(s[8960]=28)}e=-1}return e}(e,t,n,r)}(e|=0,t|=0,n|=0,r|=0)},jb:function(e,t,n,r){return 0|function(e,t,n,r){return qe(e,35681,10)?qe(e,35692,9)?(s[8960]=28,-1):be(e,t,n,r,1):be(e,t,n,r,2)}(e|=0,t|=0,n|=0,r|=0)},kb:un,lb:Zt,mb:Mn,nb:Mn,ob:Mn,pb:Tn,qb:Dn,rb:Un,sb:Rn,tb:on,ub:function(e,t,n,r,o,i){return 0|function(e,t,n,r,o,i){return!r&n>>>0>=4294967280|r&&(zt(),A()),ce(e+16|0,e,t,n,r,o,i),0}(e|=0,t|=0,n|=0,r|=0,o|=0,i|=0)},vb:an,wb:function(e,t,n,r,o,i){return 0|function(e,t,n,r,o,i){return!r&n>>>0>=16|r?ue(e,t+16|0,t,n-16|0,r-(n>>>0<16)|0,o,i):-1}(e|=0,t|=0,n|=0,r|=0,o|=0,i|=0)},xb:Rn,yb:function(e,t,n){return e|=0,n|=0,gt(t|=0,24),J(e,t,n),qt(e),n=c[t+16|0]|c[t+17|0]<<8|c[t+18|0]<<16|c[t+19|0]<<24,t=c[t+20|0]|c[t+21|0]<<8|c[t+22|0]<<16|c[t+23|0]<<24,i[e+44|0]=0,i[e+45|0]=0,i[e+46|0]=0,i[e+47|0]=0,i[e+48|0]=0,i[e+49|0]=0,i[e+50|0]=0,i[e+51|0]=0,i[e+36|0]=n,i[e+37|0]=n>>>8,i[e+38|0]=n>>>16,i[e+39|0]=n>>>24,i[e+40|0]=t,i[e+41|0]=t>>>8,i[e+42|0]=t>>>16,i[e+43|0]=t>>>24,0},zb:function(e,t,n){return J(e|=0,t|=0,n|=0),qt(e),n=c[t+16|0]|c[t+17|0]<<8|c[t+18|0]<<16|c[t+19|0]<<24,t=c[t+20|0]|c[t+21|0]<<8|c[t+22|0]<<16|c[t+23|0]<<24,i[e+44|0]=0,i[e+45|0]=0,i[e+46|0]=0,i[e+47|0]=0,i[e+48|0]=0,i[e+49|0]=0,i[e+50|0]=0,i[e+51|0]=0,i[e+36|0]=n,i[e+37|0]=n>>>8,i[e+38|0]=n>>>16,i[e+39|0]=n>>>24,i[e+40|0]=t,i[e+41|0]=t>>>8,i[e+42|0]=t>>>16,i[e+43|0]=t>>>24,0},Ab:F,Bb:function(e,t,n,r,o,a,d,u,l,f){return 0|function(e,t,n,r,o,a,d,u,l,f){var h,g=0;if(y=h=y-336|0,n&&(s[n>>2]=0,s[n+4>>2]=0),!a&o>>>0<4294967279)return kn(h+16|0,64,g=e+32|0,e),wn(h+80|0,h+16|0),ht(h+16|0,64),mn(h+80|0,d,u,l),mn(h+80|0,35712,0-u&15,0),ae(h+16|0,0,64),i[h+16|0]=f,rt(h+16|0,h+16|0,64,0,g,1,e),mn(h+80|0,h+16|0,64,0),i[0|t]=c[h+16|0],rt(d=t+1|0,r,o,a,g,2,e),mn(h+80|0,d,o,a),mn(h+80|0,35712,15&o,0),ft(h+8|0,u,l),mn(h+80|0,h+8|0,8,0),ft(h+8|0,o- -64|0,a-((o>>>0<4294967232)-1|0)|0),mn(h+80|0,h+8|0,8,0),Bn(h+80|0,t=o+d|0),ht(h+80|0,256),Ct(e+36|0,t),mt(g),(2&f||dt(g,4))&&F(e),n&&(a=(e=o+17|0)>>>0<17?a+1|0:a,s[n>>2]=e,s[n+4>>2]=a),y=h+336|0,0;zt(),A()}(e|=0,t|=0,n|=0,r|=0,o|=0,a|=0,d|=0,u|=0,l|=0,f|=0)},Cb:function(e,t,n,r,o,a,d,u,l,f){return 0|function(e,t,n,r,o,a,d,u,l,f){var h,g=0,p=0,m=0,v=0,b=0;y=h=y-352|0,n&&(s[n>>2]=0,s[n+4>>2]=0),r&&(i[0|r]=255),v=-1;e:{if(!(!d&a>>>0<17)){if(!(g=d-(a>>>0<17)|0)&(p=a-17|0)>>>0>=4294967279|g)break e;kn(h+32|0,64,m=e+32|0,e),wn(h+96|0,h+32|0),ht(h+32|0,64),mn(h+96|0,u,l,f),mn(h+96|0,35712,0-l&15,0),ae(h+32|0,0,64),i[h+32|0]=c[0|o],rt(h+32|0,h+32|0,64,0,m,1,e),b=c[h+32|0],i[h+32|0]=c[0|o],mn(h+96|0,h+32|0,64,0),mn(h+96|0,u=o+1|0,p,g),mn(h+96|0,35712,a-1&15,0),ft(h+24|0,l,f),mn(h+96|0,h+24|0,8,0),ft(h+24|0,o=a+47|0,d=o>>>0<47?d+1|0:d),mn(h+96|0,h+24|0,8,0),Bn(h+96|0,h),ht(h+96|0,256),Xe(h,u+p|0,16)?ht(h,16):(rt(t,u,p,g,m,2,e),Ct(e+36|0,h),mt(m),(2&b||dt(m,4))&&F(e),n&&(s[n>>2]=p,s[n+4>>2]=g),v=0,r&&(i[0|r]=b))}return y=h+352|0,v}zt(),A()}(e|=0,t|=0,n|=0,r|=0,o|=0,a|=0,d|=0,u|=0,l|=0,f|=0)},Db:function(){return 52},Eb:function(){return 17},Fb:Tn,Gb:Mn,Hb:function(){return-18},Ib:Gn,Jb:jn,Kb:Jn,Lb:qn,Mb:Fn,Nb:Dn,Ob:function(e,t,n,r,o){return 0|function(e,t,n,r){var o=0,i=0,a=0,s=0,d=0,u=0,l=0,A=0,f=0,h=0,g=0,p=0,m=0,v=0,y=0,b=0;if(o=1886610805^(a=c[0|r]|c[r+1|0]<<8|c[r+2|0]<<16|c[r+3|0]<<24),s=1936682341^(i=c[r+4|0]|c[r+5|0]<<8|c[r+6|0]<<16|c[r+7|0]<<24),d=1852142177^a,l=1819895653^i,a=1852075885^(f=c[r+8|0]|c[r+9|0]<<8|c[r+10|0]<<16|c[r+11|0]<<24),i=1685025377^(r=c[r+12|0]|c[r+13|0]<<8|c[r+14|0]<<16|c[r+15|0]<<24),f^=2037671283,u=1952801890^r,(0|(r=(t+n|0)-(p=7&n)|0))!=(0|t)){for(;A=c[0|t]|c[t+1|0]<<8|c[t+2|0]<<16|c[t+3|0]<<24,h=c[t+4|0]|c[t+5|0]<<8|c[t+6|0]<<16|c[t+7|0]<<24,g=In(a,i,13),m=C,v=1+(i=i+s|0)|0,s=i,y=In(i=o+a|0,s=i>>>0>>0?v:s,32),v=C,u=o=u^h,a=In(f^=A,o,16),o=d+f|0,d=l+u|0,f=l=(d=o>>>0>>0?d+1|0:d)^C,l=In(a^=o,l,21),u=C,g=In(i^=g,s^=m,17),b=C,s=d+s|0,d=o,s=In(o=o+i|0,i=d>>>0>o>>>0?s+1|0:s,32),d=C,m=In(g^=o,i^=b,13),b=C,v=1+(o=f+v|0)|0,f=o,a=(o=a+y|0)>>>0>>0?v:f,g=f=o+g|0,i=a+i|0,i=In(f,y=o>>>0>f>>>0?i+1|0:i,32),f=C,l=In(o^=l,a^=u,16),a=d+a|0,a=(o=o+s|0)>>>0>>0?a+1|0:a,s=i+(d=o^l)|0,i=(u=f)+(f=a^C)|0,f=In(d,f,21)^s,u=(v=s>>>0>>0?i+1|0:i)^C,d=i=y^b,i=In(l=g^m,i,17),a=a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0,u=t,i=In(t=t+i|0,r=u>>>0>t>>>0?r+1|0:r,32),u=C,h=In(a^=t,A^=r,13),p=C,l=1+(t=d+l|0)|0,r=t,o=(r=(t=n+o|0)>>>0>>0?l:r)+A|0,d=o=t>>>0>(n=t+a|0)>>>0?o+1|0:o,o=In(n,o,32),l=C,s=In(t^=s,r^=f,16),r=r+u|0,u=t,a=(t=t+i|0)^s,s=i=(r=u>>>0>t>>>0?r+1|0:r)^C,i=In(a,i,21),f=C,u=d^=p,d=In(n^=h,d,17),A=C,r=r+u|0,u=t,u=In(t=t+n|0,n=u>>>0>t>>>0?r+1|0:r,32),h=C,p=In(d^=t,A^=n,13),g=C,r=1+(t=s+l|0)|0,n=t,o=(r=(t=o+a|0)>>>0>>0?r:n)+A|0,s=o=t>>>0>(n=t+d|0)>>>0?o+1|0:o,o=In(n,o,32),d=C,i=In(t^=i,r^=f,16),r=r+h|0,l=t,a=(t=t+u|0)^i,l=i=(r=l>>>0>t>>>0?r+1|0:r)^C,i=In(a,i,21),f=C,u=s^=g,s=In(n^=p,s,17),A=C,r=r+u|0,u=t,r=In(t=t+n|0,n=u>>>0>t>>>0?r+1|0:r,32),u=C,A=n^=A,h=In(s^=t,n,13),p=C,l=1+(t=d+l|0)|0,n=t,d=a=f^(o=(t=o+a|0)>>>0>>0?l:n),a=In(n=t^i,a,16),i=d+u|0,u=n,a=In((n=n+r|0)^a,(r=u>>>0>n>>>0?i+1|0:i)^C,21),i=C,o=o+A|0,l=1+(r=r+(o=((u=t)>>>0>(t=t+s|0)>>>0?o+1|0:o)^p)|0)|0,u=r,n=(t=n+(r=t^h)|0)>>>0>>0?l:u,r=In(r,o,17)^t^a,o=C^n^i,ft(e,In(t,n,32)^r,C^o),0}(e|=0,t|=0,n|=0,o|=0)},Pb:function(e){gt(e|=0,16)},Qb:function(){return 208},Rb:Hn,Sb:Mn,Tb:Mn,Ub:Hn,Vb:function(){return-65},Wb:function(e,t,n){return 0|D(e|=0,t|=0,n|=0)},Xb:function(e,t){return 0|function(e,t){var n;return y=n=y-32|0,gt(n,32),D(e,t,n),ht(n,32),y=n+32|0,0}(e|=0,t|=0)},Yb:function(e,t,n,r,o,i){return 0|function(e,t,n,r,o,i){var a,c;return y=a=y-16|0,c=n,n=r,rn(e,a+8|0,ne(e- -64|0,c,r),r,o,i),64!=s[a+8>>2]|s[a+12>>2]?(t&&(s[t>>2]=0,s[t+4>>2]=0),ae(e,0,n- -64|0),e=-1):(e=0,t&&(s[t>>2]=r- -64,s[t+4>>2]=o-((r>>>0<4294967232)-1|0))),y=a+16|0,e}(e|=0,t|=0,n|=0,r|=0,o|=0,i|=0)},Zb:function(e,t,n,r,o,i){return 0|function(e,t,n,r,o,i){var a=0;e:{t:{if(!(!o&r>>>0<64||(o=o-1|0,!(o=(r=r+-64|0)>>>0<4294967232?o+1|0:o)&r>>>0>4294967231|o))){if(!dn(n,a=n- -64|0,r,o,i))break t;e&&ae(e,0,r)}if(n=-1,!t)break e;return s[t>>2]=0,s[t+4>>2]=0,-1}t&&(s[t>>2]=r,s[t+4>>2]=o),n=0,e&&ne(e,a,r)}return n}(e|=0,t|=0,n|=0,r|=0,o|=0,i|=0)},_b:function(e,t,n,r,o,i){return 0|rn(e|=0,t|=0,n|=0,r|=0,o|=0,i|=0)},$b:function(e,t,n,r,o){return 0|dn(e|=0,t|=0,n|=0,r|=0,o|=0)},ac:function(e){return Mt(e|=0),0},bc:function(e,t,n,r){return 0|Y(e|=0,t|=0,n|=0,r|=0)},cc:function(e,t,n,r){return 0|function(e,t,n,r){var o;return y=o=y+-64|0,Nt(e,o),e=L(t,n,o,64,0,r,1),y=o- -64|0,e}(e|=0,t|=0,n|=0,r|=0)},dc:function(e,t,n){return 0|function(e,t,n){var r;return y=r=y+-64|0,Nt(e,r),e=Ee(t,r,64,0,n,1),y=r- -64|0,e}(e|=0,t|=0,n|=0)},ec:function(e,t){e|=0;var n,r=0;return y=n=y-256|0,r=-1,ve(t|=0)||ge(n+96|0,t)||function(e){var t;return y=t=y-160|0,function(e,t){var n,r=0;for(y=n=y-1760|0,wt(n+480|0,t),jt(n+320|0,t),bt(n,n+320|0),Ye(n+320|0,n,n+480|0),bt(n+160|0,n+320|0),wt(t=n+640|0,n+160|0),Ye(n+320|0,n,t),bt(n+160|0,n+320|0),wt(t=n+800|0,n+160|0),Ye(n+320|0,n,t),bt(n+160|0,n+320|0),wt(t=n+960|0,n+160|0),Ye(n+320|0,n,t),bt(n+160|0,n+320|0),wt(t=n+1120|0,n+160|0),Ye(n+320|0,n,t),bt(n+160|0,n+320|0),wt(t=n+1280|0,n+160|0),Ye(n+320|0,n,t),bt(n+160|0,n+320|0),wt(t=n+1440|0,n+160|0),Ye(n+320|0,n,t),bt(n+160|0,n+320|0),wt(n+1600|0,n+160|0),Xt(e),t=252;jt(n+320|0,e),r=t,(0|(t=i[t+34208|0]))>=1?(bt(n+160|0,n+320|0),Ye(n+320|0,n+160|0,(n+480|0)+u((254&t)>>>1|0,160)|0)):(0|t)>-1||(bt(n+160|0,n+320|0),Ve(n+320|0,n+160|0,(n+480|0)+u((0-t&254)>>>1|0,160)|0)),bt(e,n+320|0),t=r-1|0,r;);y=n+1760|0}(t,e),e=Ht(t),y=t+160|0,e}(n+96|0)&&(yn(n),pe(n,n,t=n+136|0),yn(n+48|0),me(n+48|0,n+48|0,t),K(n,n),S(n+48|0,n+48|0,n),re(e,n+48|0),r=0),y=n+256|0,0|r},fc:function(e,t){e|=0;var n,r=0;return y=n=y+-64|0,Rt(n,t|=0,32,0),i[0|n]=248&c[0|n],i[n+31|0]=63&c[n+31|0]|64,t=s[n+20>>2],r=s[n+16>>2],i[e+16|0]=r,i[e+17|0]=r>>>8,i[e+18|0]=r>>>16,i[e+19|0]=r>>>24,i[e+20|0]=t,i[e+21|0]=t>>>8,i[e+22|0]=t>>>16,i[e+23|0]=t>>>24,t=s[n+12>>2],r=s[n+8>>2],i[e+8|0]=r,i[e+9|0]=r>>>8,i[e+10|0]=r>>>16,i[e+11|0]=r>>>24,i[e+12|0]=t,i[e+13|0]=t>>>8,i[e+14|0]=t>>>16,i[e+15|0]=t>>>24,t=s[n+4>>2],r=s[n>>2],i[0|e]=r,i[e+1|0]=r>>>8,i[e+2|0]=r>>>16,i[e+3|0]=r>>>24,i[e+4|0]=t,i[e+5|0]=t>>>8,i[e+6|0]=t>>>16,i[e+7|0]=t>>>24,t=s[n+28>>2],r=s[n+24>>2],i[e+24|0]=r,i[e+25|0]=r>>>8,i[e+26|0]=r>>>16,i[e+27|0]=r>>>24,i[e+28|0]=t,i[e+29|0]=t>>>8,i[e+30|0]=t>>>16,i[e+31|0]=t>>>24,ht(n,64),y=n- -64|0,0},gc:Ot,hc:Ut,ic:function(e){var t=0,n=0;if((e|=0)>>>0>=2){for(n=(0-e>>>0)%(e>>>0)|0;(t=Ot())>>>0>>0;);e=(t>>>0)%(e>>>0)|0}else e=0;return 0|e},jc:gt,kc:function(e,t,n){kn(e|=0,t|=0,1784,n|=0)},lc:Mn,mc:function(){var e=0,t=0;return(e=s[9097])&&(e=s[e+20>>2])&&(t=0|Vn[0|e]()),0|t},nc:function(e,t,n){!function(e,t,n){1==(0|n)|n>>>0>1&&(f(1796,1816,197,1842),A()),gt(e,t)}(e|=0,t|=0,n|=0)},oc:function(e,t,n,r){e|=0,n|=0;var o=0,a=0,s=0;if(!((r|=0)>>>0>2147483646|r<<1>>>0>=(t|=0)>>>0)){if(t=0,r){for(;o=t<<1,a=(s=c[t+n|0])>>>4|0,i[o+e|0]=87+(a+(a+65526>>>8&217)|0),a=(1|o)+e|0,o=15&s,i[0|a]=22272+((o<<8)+(o+65526&55552)|0)>>>8,(0|r)!=(0|(t=t+1|0)););t=r<<1}else t=0;return i[t+e|0]=0,0|e}zt(),A()},pc:function(e,t,n,r,o,a,d){e|=0,t|=0,n|=0,o|=0,a|=0,d|=0;var u=0,l=0,A=0,f=0,h=0,g=0,p=0,m=0,v=0,y=0,b=0;e:if(r|=0){t:{n:{r:for(;;){for(l=u;;){o:{if(!(255&((v=(65526+(p=(223&(g=c[n+l|0]))-55&255)^p+65520)>>>8|0)|(A=65526+(y=48^g)>>>8|0)))){if(A=1,!o|255&h)break n;if(nn(o,g))break o;u=l;break e}if(t>>>0<=f>>>0){s[8960]=68,A=0;break n}if(u=p&v|A&y,255&h?(i[e+f|0]=u|b,f=f+1|0):b=u<<4,h^=-1,A=1,(u=l+1|0)>>>0>>0)continue r;break t}if(h=0,!((l=l+1|0)>>>0>>0))break}break}u=(e=u+1|0)>>>0>>0?r:e;break e}u=l}255&h?(s[8960]=28,m=-1,u=u-1|0,f=0):A||(f=0,m=-1)}return d?s[d>>2]=n+u:(0|r)!=(0|u)&&(s[8960]=28,m=-1),a&&(s[a>>2]=f),0|m},qc:function(e,t){var n;return e|=0,En(t|=0),e=u(n=(e>>>0)/3|0,-3)+e|0,u(4-(3-e&0-(t>>>1&1))|0,1&(e|e>>>1))+(n<<2|1)|0},rc:z,sc:V,tc:function(){var e=0;return s[9104]?e=1:(s[9086]=0,function(){var e;y=e=y-16|0,Yt(e),s[e>>2]&&(Yt(e),ae(36348,0,40)),y=e+16|0}(),s[9085]=1,Ut(),function(){var e=0;(0|(e=0|p(30)))>=1?s[8944]=e:e=s[8944],e>>>0<=15&&(zt(),A()),gt(36400,16)}(),s[9104]=1,e=0),0|e},uc:function(e,t,n,r,o){e|=0,t|=0,n|=0,o|=0;var a,d=0,u=0,l=0;y=a=y-16|0;e:{if(r|=0){if(l=-1,(d=(d=r-1|0)-(u=d&r?(n>>>0)%(r>>>0)|0:n&d)|0)>>>0>=(-1^n)>>>0)break e;if(!((n=n+d|0)>>>0>=o>>>0))for(e&&(s[e>>2]=n+1),e=t+n|0,l=0,i[a+15|0]=0,t=r>>>0>1?r:1,r=0;o=n=e-r|0,u=c[0|n]&c[a+15|0],n=(r^d)-1>>>24|0,i[0|o]=u|128&n,i[a+15|0]=n|c[a+15|0],(0|t)!=(0|(r=r+1|0)););}else l=-1;return y=a+16|0,0|l}zt(),A()},vc:function(e,t,n,r){e|=0,t|=0,n|=0,r|=0;var o,i=0,a=0,d=0,u=0,l=0;if(s[12+(o=y-16|0)>>2]=0,r-1>>>0>>0){for(l=(i=n-1|0)+t|0,n=0,t=0;u=((128^(a=c[l-n|0]))-1&s[o+12>>2]-1&d-1)>>>8&1,s[o+12>>2]=s[o+12>>2]|0-u&n,t|=u,d|=a,(0|r)!=(0|(n=n+1|0)););s[e>>2]=i-s[o+12>>2],e=t-1|0}else e=-1;return 0|e},wc:function(){return 35762},xc:function(){return 10},yc:qn,zc:jn,Ac:function(){return 35840},Bc:_,Cc:R}}(e)}(Me)},instantiate:function(e,t){return{then:function(t){var n=new B.Module(e);t({instance:new B.Instance(n)})}}},RuntimeError:Error};function _(e,t,n,r){switch("*"===(n=n||"i8").charAt(n.length-1)&&(n="i32"),n){case"i1":case"i8":R[e>>0]=t;break;case"i16":N[e>>1]=t;break;case"i32":x[e>>2]=t;break;case"i64":Ae=[t>>>0,(le=t,+Math.abs(le)>=1?le>0?(0|Math.min(+Math.floor(le/4294967296),4294967295))>>>0:~~+Math.ceil((le-+(~~le>>>0))/4294967296)>>>0:0)],x[e>>2]=Ae[0],x[e+4>>2]=Ae[1];break;case"float":D[e>>2]=t;break;case"double":M[e>>3]=t;break;default:ie("invalid type for setValue: "+n)}}function S(e,t,n){switch("*"===(t=t||"i8").charAt(t.length-1)&&(t="i32"),t){case"i1":case"i8":return R[e>>0];case"i16":return N[e>>1];case"i32":case"i64":return x[e>>2];case"float":return D[e>>2];case"double":return M[e>>3];default:ie("invalid type for getValue: "+t)}return null}C=[],"object"!=typeof B&&ie("no native wasm support detected");var k=!1;function O(e,t){e||ie("Assertion failed: "+t)}var Q,R,P,N,x,D,M,T="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function U(e,t,n){for(var r=t+n,o=t;e[o]&&!(o>=r);)++o;if(o-t>16&&e.subarray&&T)return T.decode(e.subarray(t,o));for(var i="";t>10,56320|1023&d)}}else i+=String.fromCharCode((31&a)<<6|s)}else i+=String.fromCharCode(a)}return i}function H(e,t){return e?U(P,e,t):""}function j(e,t){return e%t>0&&(e+=t-e%t),e}function J(e){Q=e,c.HEAP8=R=new Int8Array(e),c.HEAP16=N=new Int16Array(e),c.HEAP32=x=new Int32Array(e),c.HEAPU8=P=new Uint8Array(e),c.HEAPU16=new Uint16Array(e),c.HEAPU32=new Uint32Array(e),c.HEAPF32=D=new Float32Array(e),c.HEAPF64=M=new Float64Array(e)}var F,G=c.INITIAL_MEMORY||16777216;(w=c.wasmMemory?c.wasmMemory:new B.Memory({initial:G/65536,maximum:32768}))&&(Q=w.buffer),G=Q.byteLength,J(Q);var L=[],q=[],Y=[],V=[];function W(){if(c.preRun)for("function"==typeof c.preRun&&(c.preRun=[c.preRun]);c.preRun.length;)X(c.preRun.shift());ve(L)}function K(){ve(q)}function Z(){ve(Y)}function z(){if(c.postRun)for("function"==typeof c.postRun&&(c.postRun=[c.postRun]);c.postRun.length;)$(c.postRun.shift());ve(V)}function X(e){L.unshift(e)}function $(e){V.unshift(e)}q.push({func:function(){Te()}});var ee=0,te=null,ne=null;function re(e){ee++,c.monitorRunDependencies&&c.monitorRunDependencies(ee)}function oe(e){if(ee--,c.monitorRunDependencies&&c.monitorRunDependencies(ee),0==ee&&(null!==te&&(clearInterval(te),te=null),ne)){var t=ne;ne=null,t()}}function ie(e){throw c.onAbort&&c.onAbort(e),E(e+=""),k=!0,e="abort("+e+"). Build with -s ASSERTIONS=1 for more info.",new B.RuntimeError(e)}function ae(e,t){return String.prototype.startsWith?e.startsWith(t):0===e.indexOf(t)}c.preloadedImages={},c.preloadedAudios={};var se="data:application/octet-stream;base64,";function ce(e){return ae(e,se)}var de="file://";function ue(e){return ae(e,de)}var le,Ae,fe="<<< WASM_BINARY_FILE >>>";function he(e){try{if(e==fe&&C)return new Uint8Array(C);var t=xe(e);if(t)return t;if(m)return m(e);throw"both async and sync fetching of the wasm failed"}catch(e){ie(e)}}function ge(){if(!C&&(l||A)){if("function"==typeof fetch&&!ue(fe))return fetch(fe,{credentials:"same-origin"}).then((function(e){if(!e.ok)throw"failed to load wasm binary file at '"+fe+"'";return e.arrayBuffer()})).catch((function(){return he(fe)}));if(p)return new Promise((function(e,t){p(fe,(function(t){e(new Uint8Array(t))}),t)}))}return Promise.resolve().then((function(){return he(fe)}))}function pe(){var e={a:Me};function t(e,t){var n=e.exports;c.asm=n,F=c.asm.h,oe()}function n(e){t(e.instance)}function r(t){return ge().then((function(t){return B.instantiate(t,e)})).then(t,(function(e){E("failed to asynchronously prepare wasm: "+e),ie(e)}))}if(re(),c.instantiateWasm)try{return c.instantiateWasm(e,t)}catch(e){return E("Module.instantiateWasm callback failed with error: "+e),!1}return C||"function"!=typeof B.instantiateStreaming||ce(fe)||ue(fe)||"function"!=typeof fetch?r(n):fetch(fe,{credentials:"same-origin"}).then((function(t){return B.instantiateStreaming(t,e).then(n,(function(e){return E("wasm streaming compile failed: "+e),E("falling back to ArrayBuffer instantiation"),r(n)}))})),{}}ce(fe)||(fe=I(fe));var me={1024:function(){return c.getRandomValue()},1062:function(){if(void 0===c.getRandomValue)try{var e="object"==typeof window?window:self,t=void 0!==e.crypto?e.crypto:e.msCrypto,r=function(){var e=new Uint32Array(1);return t.getRandomValues(e),e[0]>>>0};r(),c.getRandomValue=r}catch(e){try{var o=n(8010),i=function(){var e=o.randomBytes(4);return(e[0]<<24|e[1]<<16|e[2]<<8|e[3])>>>0};i(),c.getRandomValue=i}catch(e){throw"No secure random number generator found"}}}};function ve(e){for(;e.length>0;){var t=e.shift();if("function"!=typeof t){var n=t.func;"number"==typeof n?void 0===t.arg?F.get(n)():F.get(n)(t.arg):n(void 0===t.arg?null:t.arg)}else t(c)}}function ye(e,t,n,r){ie("Assertion failed: "+H(e)+", at: "+[t?H(t):"unknown filename",n,r?H(r):"unknown function"])}function be(){ie()}function Ie(e,t,n){var r=Oe(t,n);return me[e].apply(null,r)}function Ce(e,t,n){P.copyWithin(e,t,t+n)}function Ee(){return P.length}function we(e){try{return w.grow(e-Q.byteLength+65535>>>16),J(w.buffer),1}catch(e){}}function Be(e){e>>>=0;var t=Ee(),n=2147483648;if(e>n)return!1;for(var r=1;r<=4;r*=2){var o=t*(1+.2/r);if(o=Math.min(o,e+100663296),we(Math.min(n,j(Math.max(16777216,e,o),65536))))return!0}return!1}function _e(e){return x[Ue()>>2]=e,e}function Se(e){switch(e){case 30:case 75:return 16384;case 85:return 131072;case 132:case 133:case 12:case 137:case 138:case 15:case 235:case 16:case 17:case 18:case 19:case 20:case 149:case 13:case 10:case 236:case 153:case 9:case 21:case 22:case 159:case 154:case 14:case 77:case 78:case 139:case 82:case 68:case 67:case 164:case 11:case 29:case 47:case 48:case 95:case 52:case 51:case 46:return 200809;case 27:case 246:case 127:case 128:case 23:case 24:case 160:case 161:case 181:case 182:case 242:case 183:case 184:case 243:case 244:case 245:case 165:case 178:case 179:case 49:case 50:case 168:case 169:case 175:case 170:case 171:case 172:case 97:case 76:case 32:case 173:case 35:case 80:case 81:case 79:return-1;case 176:case 177:case 7:case 155:case 8:case 157:case 125:case 126:case 92:case 93:case 129:case 130:case 131:case 94:case 91:return 1;case 74:case 60:case 69:case 70:case 4:return 1024;case 31:case 42:case 72:return 32;case 87:case 26:case 33:return 2147483647;case 34:case 1:return 47839;case 38:case 36:return 99;case 43:case 37:return 2048;case 0:return 2097152;case 3:return 65536;case 28:return 32768;case 44:return 32767;case 39:return 1e3;case 89:return 700;case 71:return 256;case 40:return 255;case 2:return 100;case 180:return 64;case 25:return 20;case 5:return 16;case 6:return 6;case 73:return 4;case 84:return"object"==typeof navigator&&navigator.hardwareConcurrency||1}return _e(28),-1}var ke=[];function Oe(e,t){var n;for(ke.length=0,t>>=2;n=P[e++];){var r=n<105;r&&1&t&&t++,ke.push(r?M[t++>>1]:x[t]),++t}return ke}var Qe=!1;function Re(e){for(var t=[],n=0;n255&&(Qe&&O(!1,"Character code "+r+" ("+String.fromCharCode(r)+") at offset "+n+" not in 0x00-0xFF."),r&=255),t.push(String.fromCharCode(r))}return t.join("")}var Pe="function"==typeof atob?atob:function(e){var t,n,r,o,i,a,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",c="",d=0;e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"");do{t=s.indexOf(e.charAt(d++))<<2|(o=s.indexOf(e.charAt(d++)))>>4,n=(15&o)<<4|(i=s.indexOf(e.charAt(d++)))>>2,r=(3&i)<<6|(a=s.indexOf(e.charAt(d++))),c+=String.fromCharCode(t),64!==i&&(c+=String.fromCharCode(n)),64!==a&&(c+=String.fromCharCode(r))}while(d0||(W(),ee>0||(c.setStatus?(c.setStatus("Running..."),setTimeout((function(){setTimeout((function(){c.setStatus("")}),1),t()}),1)):t()))}if(c._malloc=function(){return(c._malloc=c.asm.Bc).apply(null,arguments)},c._free=function(){return(c._free=c.asm.Cc).apply(null,arguments)},c.setValue=_,c.getValue=S,c.UTF8ToString=H,ne=function e(){De||He(),De||(ne=e)},c.run=He,c.preInit)for("function"==typeof c.preInit&&(c.preInit=[c.preInit]);c.preInit.length>0;)c.preInit.pop()();He()}))};var o,c=void 0!==c?c:{},d={};for(o in c)c.hasOwnProperty(o)&&(d[o]=c[o]);var u=[],l=!1,A=!1,f=!1,h=!1;l="object"==typeof window,A="function"==typeof importScripts,f="object"==typeof i&&"object"==typeof i.versions&&"string"==typeof i.versions.node,h=!l&&!f&&!A;var g,p,m,v,y,b="";function I(e){return c.locateFile?c.locateFile(e,b):b+e}f?(b=A?n(6470).dirname(b)+"/":"//",g=function(e,t){var r=Pe(e);return r?t?r:r.toString():(v||(v=n(5992)),y||(y=n(6470)),e=y.normalize(e),v.readFileSync(e,t?null:"utf8"))},m=function(e){var t=g(e,!0);return t.buffer||(t=new Uint8Array(t)),k(t.buffer),t},i.argv.length>1&&i.argv[1].replace(/\\/g,"/"),u=i.argv.slice(2),e.exports=c,c.inspect=function(){return"[Emscripten Module object]"}):h?("undefined"!=typeof read&&(g=function(e){var t=Pe(e);return t?Oe(t):read(e)}),m=function(e){var t;return(t=Pe(e))?t:"function"==typeof readbuffer?new Uint8Array(readbuffer(e)):(k("object"==typeof(t=read(e,"binary"))),t)},"undefined"!=typeof scriptArgs?u=scriptArgs:void 0!==arguments&&(u=arguments),"undefined"!=typeof print&&("undefined"==typeof console&&(console={}),console.log=print,console.warn=console.error="undefined"!=typeof printErr?printErr:print)):(l||A)&&(A?b=self.location.href:"undefined"!=typeof document&&document.currentScript&&(b=document.currentScript.src),b=0!==b.indexOf("blob:")?b.substr(0,b.lastIndexOf("/")+1):"",g=function(e){try{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText}catch(t){var n=Pe(e);if(n)return Oe(n);throw t}},A&&(m=function(e){try{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}catch(t){var n=Pe(e);if(n)return n;throw t}}),p=function(e,t,n){var r=new XMLHttpRequest;r.open("GET",e,!0),r.responseType="arraybuffer",r.onload=function(){if(200==r.status||0==r.status&&r.response)t(r.response);else{var o=Pe(e);o?t(o.buffer):n()}},r.onerror=n,r.send(null)}),c.print;var C,E,w=c.printErr||void 0;for(o in d)d.hasOwnProperty(o)&&(c[o]=d[o]);function B(e,t,n,r){switch("*"===(n=n||"i8").charAt(n.length-1)&&(n="i32"),n){case"i1":case"i8":Q[e>>0]=t;break;case"i16":P[e>>1]=t;break;case"i32":N[e>>2]=t;break;case"i64":ue=[t>>>0,(de=t,+Math.abs(de)>=1?de>0?(0|Math.min(+Math.floor(de/4294967296),4294967295))>>>0:~~+Math.ceil((de-+(~~de>>>0))/4294967296)>>>0:0)],N[e>>2]=ue[0],N[e+4>>2]=ue[1];break;case"float":x[e>>2]=t;break;case"double":D[e>>3]=t;break;default:re("invalid type for setValue: "+n)}}function _(e,t,n){switch("*"===(t=t||"i8").charAt(t.length-1)&&(t="i32"),t){case"i1":case"i8":return Q[e>>0];case"i16":return P[e>>1];case"i32":case"i64":return N[e>>2];case"float":return x[e>>2];case"double":return D[e>>3];default:re("invalid type for getValue: "+t)}return null}d=null,c.arguments&&(u=c.arguments),c.thisProgram&&c.thisProgram,c.quit&&c.quit,c.wasmBinary&&(C=c.wasmBinary),c.noExitRuntime&&c.noExitRuntime,"object"!=typeof WebAssembly&&re("no native wasm support detected");var S=!1;function k(e,t){e||re("Assertion failed: "+t)}var O,Q,R,P,N,x,D,M="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function T(e,t,n){for(var r=t+n,o=t;e[o]&&!(o>=r);)++o;if(o-t>16&&e.subarray&&M)return M.decode(e.subarray(t,o));for(var i="";t>10,56320|1023&d)}}else i+=String.fromCharCode((31&a)<<6|s)}else i+=String.fromCharCode(a)}return i}function U(e,t){return e?T(R,e,t):""}function H(e,t){return e%t>0&&(e+=t-e%t),e}function j(e){O=e,c.HEAP8=Q=new Int8Array(e),c.HEAP16=P=new Int16Array(e),c.HEAP32=N=new Int32Array(e),c.HEAPU8=R=new Uint8Array(e),c.HEAPU16=new Uint16Array(e),c.HEAPU32=new Uint32Array(e),c.HEAPF32=x=new Float32Array(e),c.HEAPF64=D=new Float64Array(e)}c.INITIAL_MEMORY;var J,F=[],G=[],L=[],q=[];function Y(){if(c.preRun)for("function"==typeof c.preRun&&(c.preRun=[c.preRun]);c.preRun.length;)Z(c.preRun.shift());pe(F)}function V(){pe(G)}function W(){pe(L)}function K(){if(c.postRun)for("function"==typeof c.postRun&&(c.postRun=[c.postRun]);c.postRun.length;)z(c.postRun.shift());pe(q)}function Z(e){F.unshift(e)}function z(e){q.unshift(e)}G.push({func:function(){De()}});var X=0,$=null,ee=null;function te(e){X++,c.monitorRunDependencies&&c.monitorRunDependencies(X)}function ne(e){if(X--,c.monitorRunDependencies&&c.monitorRunDependencies(X),0==X&&(null!==$&&(clearInterval($),$=null),ee)){var t=ee;ee=null,t()}}function re(e){throw c.onAbort&&c.onAbort(e),w(e+=""),S=!0,e="abort("+e+"). Build with -s ASSERTIONS=1 for more info.",new WebAssembly.RuntimeError(e)}function oe(e,t){return String.prototype.startsWith?e.startsWith(t):0===e.indexOf(t)}c.preloadedImages={},c.preloadedAudios={};var ie="data:application/octet-stream;base64,";function ae(e){return oe(e,ie)}var se="file://";function ce(e){return oe(e,se)}var de,ue,le="data:application/octet-stream;base64,AGFzbQEAAAABqAMwYAJ/fwBgAAF/YAJ/fwF/YAN/f38Bf2ADf39/AGABfwF/YAF/AGAEf39/fwF/YAV/f39/fwF/YAt/f39/f39/f39/fwF/YAN/f34Bf2AGf39/f39/AX9gB39/f39/f38Bf2AEf39+fwF/YAAAYAZ/f39+f38Bf2AFf39+f38Bf2AEf35/fwF/YAh/f39+f35/fwF/YAR/f39/AGAGf39+f39/AX9gBn9/fn9+fwF/YAJ/fgBgCH9/f39/f39/AX9gDH9/f39/f39/f39/fwF/YAh/f35/f35/fwF/YAN/f34AYAV/f35/fwBgCX9/f39+f35/fwF/YAV/f39+fwF/YAZ/f35/f38AYAR/fn9/AGAKf39/f39/f39/fwF/YAd/f39+f39/AX9gBX9/fn5/AX9gB39+f35/fn8Bf2ABfwF+YAJ+fwF+YAV/f39/fwBgCX9/f39+f35/fwBgBH9/f34AYAh/f39/f35/fgF/YAZ/f39/fn8Bf2AIf39/f35/fn8Bf2AGf39+fn9/AX9gA39+fwF/YAh/fn9+f35/fwF/YAJ+fgF+AiUGAWEBYQATAWEBYgADAWEBYwAOAWEBZAAFAWEBZQADAWEBZgAFA+kC5wIlLwIAAAQaJQAkAxYDBA4ABAEKBgQACgYBAAUFAwAACgQABgIABQAAAAEeAQoYCgYBHwYAAAIGAwcBAQACAgMDBwMTAQQoAAQEAAAEBRoFBBMPAxYGAAAGAAYBARcIBgIDAg8PDw8DAwEeHxsCAQYFAAQADgAAABoADQIDAAAHAg0QHQ8DACIRBwMFBQYEDxQhFCECDQQZHBkZHBwbBAQEGw4DBAYGAAQCBQAAAgACBQoCDQUABAICAAAAAAQHBAAIKiYEBwgLCwsIICALDAsADAcHFwwJCw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QCAAIQIMAQsgACADQQRrIgRLBEAgACECDAELIAAhAgNAIAIgAS0AADoAACACIAEtAAE6AAEgAiABLQACOgACIAIgAS0AAzoAAyABQQRqIQEgAkEEaiICIARNDQALCyACIANJBEADQCACIAEtAAA6AAAgAUEBaiEBIAJBAWoiAiADRw0ACwsgAAvsAQESfyACKAIEIQMgASgCBCEEIAIoAgghBSABKAIIIQYgAigCDCEHIAEoAgwhCCACKAIQIQkgASgCECEKIAIoAhQhCyABKAIUIQwgAigCGCENIAEoAhghDiACKAIcIQ8gASgCHCEQIAIoAiAhESABKAIgIRIgAigCJCETIAEoAiQhFCAAIAIoAgAgASgCAGo2AgAgACATIBRqNgIkIAAgESASajYCICAAIA8gEGo2AhwgACANIA5qNgIYIAAgCyAMajYCFCAAIAkgCmo2AhAgACAHIAhqNgIMIAAgBSAGajYCCCAAIAMgBGo2AgQLGAEBf0HEnAIoAgAiAARAIAARDgALEAIAC0ABA38gACABIAFB+ABqIgIQCyAAQShqIAFBKGoiAyABQdAAaiIEEAsgAEHQAGogBCACEAsgAEH4AGogASADEAsL7AEBEn8gAigCBCEDIAEoAgQhBCACKAIIIQUgASgCCCEGIAIoAgwhByABKAIMIQggAigCECEJIAEoAhAhCiACKAIUIQsgASgCFCEMIAIoAhghDSABKAIYIQ4gAigCHCEPIAEoAhwhECACKAIgIREgASgCICESIAIoAiQhEyABKAIkIRQgACABKAIAIAIoAgBrNgIAIAAgFCATazYCJCAAIBIgEWs2AiAgACAQIA9rNgIcIAAgDiANazYCGCAAIAwgC2s2AhQgACAKIAlrNgIQIAAgCCAHazYCDCAAIAYgBWs2AgggACAEIANrNgIECwQAQSALCgAgACABIAIQMguCDQEHfwJAIABFDQAgAEEIayIDIABBBGsoAgAiAUF4cSIAaiEFAkAgAUEBcQ0AIAFBA3FFDQEgAyADKAIAIgJrIgNBlJgCKAIAIgRJDQEgACACaiEAIANBmJgCKAIARwRAIAJB/wFNBEAgAygCCCIEIAJBA3YiAkEDdEGsmAJqRxog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MgAmoiASADTSABIARLcg0LC0HAmwItAABBBHENBQJAAkBBnJgCKAIAIgMEQEHEmwIhAANAIAMgACgCACIBTwRAIAEgACgCBGogA0sNAwsgACgCCCIADQALC0EAECsiAUF/Rg0GIAIhBUHgmwIoAgAiA0EBayIAIAFxBEAgAiABayAAIAFqQQAgA2txaiEFCyAFIAhNIAVB/v///wdLcg0GQbybAigCACIEBEBBtJsCKAIAIgMgBWoiACADTSAAIARLcg0HCyAFECsiACABRw0BDAgLIAUgBmsgB3EiBUH+////B0sNBSAFECsiASAAKAIAIAAoAgRqRg0EIAEhAAsgAEF/RiAIQTBqIAVNckUEQEHkmwIoAgAiASAJIAVrakEAIAFrcSIBQf7///8HSwRAIAAhAQwICyABECtBf0cEQCABIAVqIQUgACEBDAgLQQAgBWsQKxoMBQsgACIBQX9HDQYMBAsAC0EAIQMMBwtBACEBDAULIAFBf0cNAgtBwJsCQcCbAigCAEEEcjYCAAsgAkH+////B0sNASACECsiAUEAECsiAE8gAUF/RnIgAEF/RnINASAAIAFrIgUgCEEoak0NAQtBtJsCQbSbAigCACAFaiIANgIAQbibAigCACAASQRAQbibAiAANgIACwJAAkACQEGcmAIoAgAiBwRAQcSbAiEAA0AgASAAKAIAIgMgACgCBCICakYNAiAAKAIIIgANAAsMAgtBlJgCKAIAIgBBACAAIAFNG0UEQEGUmAIgATYCAAtBACEAQcibAiAFNgIAQcSbAiABNgIAQaSYAkF/NgIAQaiYAkHcmwIoAgA2AgBB0JsCQQA2AgADQCAAQQN0IgNBtJgCaiADQayYAmoiAjYCACADQbiYAmogAjYCACAAQQFqIgBBIEcNAAtBkJgCIAVBKGsiA0F4IAFrQQdxQQAgAUEIakEHcRsiAGsiAjYCAEGcmAIgACABaiIANgIAIAAgAkEBcjYCBCABIANqQSg2AgRBoJgCQeybAigCADYCAAwCCyAALQAMQQhxIAEgB01yIAMgB0tyDQAgACACIAVqNgIEQZyYAiAHQXggB2tBB3FBACAHQQhqQQdxGyIAaiICNgIAQZCYA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gAyAEIAVB9JcCKAIAERQAGgskACABQoCAgIAQWgRAEBQACyAAIAEgAiADQeyXAigCABERABoLGQAgACABIAIgA0IAIARB5JcCKAIAERUAGgsQACAAIAFB3JcCKAIAEQIACysBAn8jAEEQayIAJAAgAEEAOgAPQYAIIABBD2pBABABIQEgAEEQaiQAIAELlRIBHn4gABAPIRAgADUAAiERIABBBWoQDyESIAA1AAchGSAANQAKIRogAEENahAPIRsgADUADyELIABBEmoQDyEKIABBFWoQDyEIIAA1ABchBSAAQRpqEA8hASAANQAcIRwgADUAHyETIABBImoQDyEUIAA1ACQhDCAAQSdqEA8hDyAAQSpqEA8hCSAANQAsIQYgACAAQS9qEA9CAohC////AIMiAkLRqwh+IAFCAohC////AIN8IAA1ADFCB4hC////AIMiAULTjEN+fCAANQA0QgSIQv///wCDIgNC5/YnfnwgAEE3ahAPQgGIQv///wCDIgRCmNocfnwgADUAOUIGiEL///8AgyIHQpPYKH58IhUgBkIFiEL///8AgyAANQA8QgOIIgZCg6FWfiAJQv///wCDfCINQoCAQH0iDkIVh3wiCUKDoVZ+fCACQtOMQ34gBUIFiEL///8Ag3wgAULn9id+fCADQpjaHH58IARCk9gofnwgAkLn9id+IAhC////AIN8IAFCmNocfnwgA0KT2Ch+fCIFQoCAQH0iFkIViHwiCEKAgEB9IhdCFYd8IBVCgIBAfSIVQoCAgH+DfSIYIBhCgIBAfSIYQoCAgH+DfSAJQtGrCH4gCHwgF0KAgIB/g30gDSAOQoCAgH+DfSAGQtGrCH4gD0IDiEL///8Ag3wgB0KDoVZ+fCAEQoOhVn4gDEIGiEL///8Ag3wgBkLTjEN+fCAHQtGrCH58IgxCgIBAfSIPQhWHfCINQoCAQH0iDkIVh3wiCEKDoVZ+fCAFIAJCmNocfiAKQgOIQv///wCDfCABQpPYKH58IAJCk9gofiALQgaIQv///wCDfCIXQoCAQH0iHUIViHwiCkKAgEB9Ih5CFYh8IBZCgICA////B4N9IAlC04xDfnwgCELRqwh+fCANIA5CgICAf4N9I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EVABoLFgAgAELAACABIAJB6JcCKAIAEREAGgsyACAAIAIEfyACKAAABUEACzYCMCAAIAEoAAA2AjQgACABKAAENgI4IAAgASgACDYCPAs9ACAAAn8gAgRAIAAgAigAADYCMCACKAAEDAELIABBADYCMEEACzYCNCAAIAEoAAA2AjggACABKAAENgI8CxkAIAAgASACIANCASAEQeSXAigCABEVABoLKAEBfyMAQRBrIgAkACAAQQA6AA9BpgggAEEPakEAEAEaIABBEGokAAtqAQN/IwBBEGsiAyQAIANBADoAD0F/IQUgACABIAJB2JcCKAIAEQMARQRAA0AgAyAAIARqLQAAIAMtAA9yOgAPIARBAWoiBEEgRw0AC0EAIAMtAA9BAWtBCHZBAXFrIQULIANBEGokACAFCxMAIAAgAUHAB2xBoBtqIAIQ5gILEAAgAEIANwIAIABCADcCCAsdACAAEDggAEEoahAdIABB0ABqEB0gAEH4AGoQOAuAAgEIfwNAIAAgAmogASACQQN2ai0AACACQQdxdkEBcToAACACQQFqIgJBgAJHDQALA0AgBCIBQQFqIQQCQCAAIAFqIgYtAABFDQAgBCECQQEhBSABQf4BSw0AA0ACQCAAIAJqIgMsAAAiB0UNACAHIAV0IgcgBiwAACIIaiIJQQ9MBEAgBiAJOgAAIANBADoAAAwBCyAIIAdrIgNBcUgNAiAGIAM6AAADQCAAIAJqIgMtAABFBEAgA0EBOgAADAILIANBADoAACACQf8BSSEDIAJBAWohAiADDQALCyAFQQVLDQEgBUEBaiIFIAFqIgJBgAJJDQALCyAEQYACRw0ACwuVAQEEfyMAQTBrIgUkACAAIAFBKGoiAyABEBMgAEEoaiIEIAMgARAWIABB0ABqIgMgACACQShqEAsgBCAEIAIQCyAAQfgAaiIGIAJB+ABqIAFB+ABqEAsgACABQdAAaiACQdAAahALIAUgACAAEBMgACADIAQQFiAEIAMgBBATIAMgBSAGEBYgBiAFIAYQEyAFQTBqJAAL1AIBA38jAEGgAmsiAiQAIABBKGoiAyABEHsgAEHQAGoiBBAdIAJB8AFqIAMQDiACQcABaiACQfAB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ACABEBAaCyAAC6YBAQR/IwBBgAhrIgIkACABKAIcBEAgAEHEAGohBSAAQUBrIQQDQCAEQQAQCiAFIAMQCiACQYAIIABByAAQViABKAIAKAIEIAEoAhggA2xBCnRqIAIQggEgBEEBEAogAkGACCAAQcgAEFYgASgCACgCBCABKAIYIANsQQp0akGACGogAhCCASADQQFqIgMgASgCHEkNAAsLIAJBgAgQCSACQYAIaiQAC/ADAQJ/IwAiAyEEIANBwANrQUBxIgMkACAARSABRXJFBEAgA0FAa0EAQQBBwAAQPhogA0E8aiABKAIwEAogA0FAayADQTxqQgQQGBogA0E8aiABKAIEEAogA0FAayADQTxqQgQQGBogA0E8aiABKAIsEAogA0FAayADQTxqQgQQGBogA0E8aiABKAIoEAogA0FAayADQTxqQgQQGBogA0E8akETEAogA0FAayADQTxqQgQQGBogA0E8aiACEAogA0FAayADQTxqQgQQGBogA0E8aiABKAIMEAogA0FAayADQTxqQgQQGBoCQCABKAIIIgJFDQAgA0FAayACIAE1AgwQGBogAS0AOEEBcUUNACABKAIIIAEoAgwQCSABQQA2AgwLIANBPGogASgCFBAKIANBQGsgA0E8akIEEBgaIAEoAhAiAgRAIANBQGsgAiABNQIUEBgaCyADQTxqIAEoAhwQCiADQUBrIANBPGpCBBAYGgJAIAEoAhgiAkUNACADQUBrIAIgATUCHBAYGiABLQA4QQJxRQ0AIAEoAhggASgCHBAJIAFBADYCHAsgA0E8aiABKAIkEAogA0FAayADQTxqQgQQGBogASgCICICBEAgA0FAayACIAE1AiQQGBoLIANBQGsgAEHAABA9GgsgBCQAC68BAQN/IwBBEGsiAiQAQWohAwJAIABFIAFFcg0AIAFBCnQiBCABbkGACEcNACAAQQwQICIBNgIAIAFFDQAgAUIANwIAQYCYAiACQQxqIAQQsgEiATYCAAJAAkAgAQRAIAJBADYCDAwBCyACKAIMIgENAQsgACgCABAZIABBADYCAAwBCyAAKAIAIAE2AgAgACgCACABNgIEIAAoAgAgBDYCCEEAIQMLIAJBEGokACADC4cBAQJ/IwBB0ABrIgMkAEFnIQICQCAARSABRXINACAAIAAoAhRBA3QQICICNgIEIAJFBEBBaiECDAELIAAgACgCEBC8ASICBEAgACABKAI4EIMBDAELIAMgASAAKAIkELsBIANBQGtBCBAJIAMgABC6ASADQcgAEAlBACECCyADQdAAaiQAIAILkwEBBH8jAEEgayICJAACQCAARQ0AIAAoAhxFDQAgAiABNgIQQQEhBANAIAIgAzoAGEEAIQFBACEFIAQEQANAIAJBADYCHCACIAIpAxg3AwggAiABNgIUIAIgAikDEDcDACAAIAIQxQEgAUEBaiIBIAAoAhwiBUkNAAsLIAUhBCADQQFqIgNBBEcNAAsLIAJBIGokAAs5AAJAIAFFDQAgACgCACIBBEAgASgCBCAAKAIQQQp0EAkLIAAoAgQiAUUNACABIAAoAhRBA3QQCQsLKAECfwNAIAAgAkEDdCIDaiABIANqKQMAEBEgAkEBaiICQYABRw0ACwu8AQEDfyMAQYAQayICJAAgAEUgAUVyRQRAIAJBgAhqIAEoAgAoAgQgASgCGEEKdGpBgAhrECogASgCHEECTwRAQQEhAwNAIAJBgAhqIAEoAgAoAgQgASgCGCIEIAMgBGxqQQp0akGACGsQLiADQQFqIgMgASgCHEkNAAsLIAIgAkGACGoQwAEgACgCACAAKAIEIAJBgAgQViACQYAIakGACBAJIAJBgAgQCSABIAAoAjgQgwELIAJBgBBqJAALjQ0CEX8QfiMAQYAQayIDJAAgA0GACGogARAqIANBgAhqIAAQLiADIANBgAhqECpBACEBA0AgA0GACGogBEEHdCIAQcAAcmoiBSkDACADQYAIaiAAQeAAcmoiBikDACADQYAIaiAAaiIHKQMAIANBgAhqIABBIHJqIggpAwAiGBAHIhSFQSAQBiIVEAciFiAYhUEYEAYhGCAYIBYgFSAUIBgQByIXhUEQEAYiGhAHIiGFQT8QBiEYIANBgAhqIABByAByaiIJKQMAIANBgAhqIABB6AByaiIKKQMAIANBgAhqIABBCHJqIgspAwAgA0GACGogAEEocmoiDCkDACIUEAciFYVBIBAGIhYQByIbIBSFQRgQBiEU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UAAvqAQEBfyMAQcABayIFJAAgAkUgAUEBa0H/AXFBwABPckUEQCAFQYECOwGCASAFQSA6AIEBIAUgAToAgAEgBUGAAWpBBHIQWiAFQYABakEIckIAEBEgBUIANwOYASAFQgA3A5ABAkAgAwRAIAVBgAFqIAMQ4AEMAQsgBUIANwOoASAFQgA3A6ABCwJAIAQEQCAFQYABaiAEENUBDAELIAVCADcDuAEgBUIANwOwAQsgACAFQYABahBbIAVBIGpBAEHgABAQGiAAIAUgAkEgEBIiAEKAARAyGiAAQYABEAkgAEHAAWokAA8LEBQACxEAIAAgAa0gAq1CIIaEEL0CCxIAIAAgASACrSADrUIghoQQHAsVACAAIAEgAq0gA61CIIaEIAQQhgELFwAgACABIAIgA60gBK1CIIaEIAUQiAELFwAgACABIAIgA60gBK1CIIaEIAUQhAILFwAgACABIAIgA60gBK1CIIaEIAUQhQILFQAgACABIAKtIAOtQiCGhCAEEIoCCyUAIAAgASACIAMgBCAFrSAGrUIghoQgByAIrSAJrUIghoQQjgILJQAgACABIAIgAyAErSAFrUIghoQgBiAHrSAIrUIghoQgCRCPAgsXACAAIAEgAq0gA61CIIaEIAQgBRC6AgsYACAAIAEgAiADrSAErUIghoQgBSAGEGoLFwAgACABIAKtIAOtQiCGhCAEIAUQuwILFgAgACABKQAANwAwIAAgASkACDcAOAsYACAAIAEgAiADrSAErUIghoQgBSAGEGsLEwAgACABrSACrUIghoQgAxCSAgsTACAAIAEgAq0gA61CIIaEEJMCCyEAIAAgASACrSADrUIghoQgBK0gBa1CIIaEIAYgBxCUAgsfACAAIAEgAq0gA61CIIaEIAStIAWtQiCGhCAGEIwBCy0AIAAgAa0gAq1CIIaEIAMgBK0gBa1CIIaEIAYgB60gCK1CIIaEIAkgChCVAgsXACAAIAEgAq0gA61CIIaEIAQgBRCzAgsSACAAIAEgAq0gA61CIIaEEDQLEgAgACABIAKtIAOtQiCGhBAlCxkAIAAgASACIAOtIAStQiCGhCAFIAYQlAELFgAgACABKQAANwAgIAAgASkACDcAKAsXACAAIAEgAq0gA61CIIaEIAQgBRC1AgsVACAAIAEgAq0gA61CIIaEIAQQtgILGQAgACABIAKtIAOtQiCGhCAEIAUgBhCVAQsXACAAIAEgAq0gA61CIIaEIAQgBRC4AgsbACAAIAEgAiADrSAErUIghoQgBSAGIAcQlgELGAAgACABIAIgA60gBK1CIIaEIAUgBhBoCxkAIAAgASACrSADrUIghoQgBCAFIAYQlwELFwAgACABIAKtIAOtQiCGhCAEIAUQuQILGwAgACABIAIgA60gBK1CIIaEIAUgBiAHEJgBCxgAIAAgASACIAOtIAStQiCGhCAFIAYQaQsVACAAIAEgAq0gA61CIIaEIAQQwAILFQAgACABIAKtIAOtQiCGhCAEEJoBCyUAIAAgASADIAStIAWtQiCGhCAGIAetIAitQiCGhCAJIAoQyQILJQAgACACIAOtIAStQiCGhCAFIAYgB60gCK1CIIaEIAkgChCcAQslACAAIAEgAiADrSAErUIghoQgBSAGrSAHrUIghoQgCSAKEMsCCycAIAAgASACIAMgBK0gBa1CIIaEIAYgB60gCK1CIIaEIAogCxCdAQslACAAIAEgAyAErSAFrUIghoQgBiAHrSAIrUIghoQgCSAKEM8CCyUAIAAgAiADrSAErUIghoQgBSAGIAetIAitQiCGhCAJIAoQngELJQAgACABIAMgBK0gBa1CIIaEIAYgB60gCK1CIIaEIAkgChDQAgslACAAIAIgA60gBK1CIIaEIAUgBiAHrSAIrUIghoQgCSAKEJ8BCyUAIAAgASACIAOtIAStQiCGhCAFIAatIAetQiCGhCAJIAoQ0QILJwAgACABIAIgAyAErSAFrUIghoQgBiAHrSAIrUIghoQgCiALEKABCyUAIAAgASACIAOtIAStQiCGhCAFIAatIAetQiCGhCAJIAoQ0gILJwAgACABIAIgAyAErSAFrUIghoQgBiAHrSAIrUIghoQgCiALEKEBCwQAQQoLBgBBspcCCwsAIAAgASACEIICCw0AIAAgASACIAMQgwILCAAgABA1QQALCQAgACABEIgCCwsAIAAgASACEIoBCwUAQb9/CwUAQdABCywBAX8jAEFAaiIDJAAgACADECcgASADQsAAIAJBARCHASEAIANBQGskACAACy4BAX8jAEFAaiIEJAAgACAEECcgASACIARCwAAgA0EBEIkBIQAgBEFAayQAIAALewEBfwJAAkACQCADQsAAVA0AIANCQHwiA0K/////D1YNACACIAJBQGsiBSADIAQQhgFFDQEgAEUNACAAQQAgA6cQEBoLQX8hAiABRQ0BIAFCADcDAEF/DwsgAQRAIAEgAzcDAAtBACECIABFDQAgACAFIAOnEEcaCyACC3MBAX8jAEEQayIFJAAgACAFQQhqIABBQGsgAiADpyICEEcgAyAEEIgBGgJAIAUpAwhCwABSBEAgAQRAIAFCADcDAAsgAEEAIAJBQGsQEBpBfyEADAELQQAhACABRQ0AIAEgA0JAfTcDAAsgBUEQaiQAIAALbQEBfyMAQUBqIgIkACACIAFCIBA0GiACIAItAABB+AFxOgAAIAIgAi0AH0E/cUHAAHI6AB8gACACKQMQNwAQIAAgAikDCDcACCAAIAIpAwA3AAAgACACKQMYNwAYIAJBwAAQCSACQUBrJABBAAuGAQECfyMAQYACayICJABBfyEDAkAgARB1DQAgAkHgAGogARCuAQ0AIAJB4ABqEOUCRQ0AIAIQHSACIAIgAkGIAWoiARAWIAJBMGoQHSACQTBqIAJBMGogARATIAIgAhA6IAJBMGogAkEwaiACEAsgACACQTBqEC1BACEDCyACQYACaiQAIAMLLAEBfyMAQSBrIgIkACACQSAQHyAAIAEgAhCKARogAkEgEAkgAkEgaiQAQQALCAAgAEEQEB8LogcCAX8HfiADKQAAIgVC9crNg9es27fzAIUhBiAFQuHklfPW7Nm87ACFIQcgAykACCIJQu3ekfOWzNy35ACFIQUgCULzytHLp4zZsvQAhSEJIAEgASACpyIDaiADQQdxIgRrIgNHBEADQCABKQAAIQggBUENEA0hCiAFIAZ8IgVBIBANIQYgCCAJhSIJQRAQDSAHIAl8IgeFIglBFRANIQsgBSAKhSIFQREQDSEKIAUgB3wiBUEgEA0hByAFIAqFIgVBDRANIQogBSAGIAl8IgZ8IgVBIBANIAYgC4UiBkEQEA0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IgfSAFIAEgBBCVASEGCyAFQSBqJAAgBguQAQECfyMAQeAAayIEJABBfyEFIARBIGogBBCZAUUEQCAEQUBrIARBIGogAxCTASAAQSBqIAEgAiAEQUBrIAMgBBCXASEFIAAgBCkDODcAGCAAIAQpAzA3ABAgACAEKQMoNwAIIAAgBCkDIDcAACAEQSAQCSAEQSBqQSAQCSAEQUBrQRgQCQsgBEHgAGokACAFCwUAQYADCycBAX9BfyEFIAJCEFoEfyAAIAFBEGogASACQhB9IAMgBBBoBSAFCwsiACACQvD///8PWgRAEBQACyAAQRBqIAAgASACIAMgBBBpCycBAX9BfyEFIAJCEFoEfyAAIAFBEGogASACQhB9IAMgBBBqBSAFCwslACACQvD///8PWgRAEBQACyAAQRBqIAAgASACIAMgBBBrGkEACwsAIAAgASACEL8CCy8AIAFCgICAgBBaBEBBACIAQYQOaiAAQZgOakHFASAAQbIOahAAAAsgACABpxAfCzMBAn8jAEEgayIDJABBfyEEIAMgAiABEKgBRQRAIABB4JUCIAMQbSEECyADQSBqJAAgBAtWAQF/IwBBQGoiAyQAIAMgAkIgEDQaIAEgAykDGDcAGCABIAMpAxA3ABAgASADKQMINwAIIAEgAykDADcAACADQcAAEAkgACABEHIhACADQUBrJAAgAAtAAQF/IwBBIGsiBCQAIAQgASACIAMQmgEaIAAgBBCAASEBIAQgAEEgEEUhAyAEQSBqJAAgA0F/IAEgACAERhtyC0MBAX8jAEFAaiICJAAgACACEMICIAEgAikDGDcAGCABIAIpAxA3ABAgASACKQMINwAIIAEgAikDADcAACACQUBrJAALNwEBfyMAQUBqIgIkACAAIAIQJyAAQdABaiIAIAJCwAAQHBogACABECcgAkHAABAJIAJBQGskAAvhAQEDfyMAQcABayICJAAgABA1IAJBQGtBNkGAARAQGiACIAEtAABBNnM6AEBBASEDA0AgAkFAayADaiIEIAQtAAAgASADai0AAHM6AAAgA0EBaiIDQSBHDQALIAAgAkFAa0KAARAcGiAAQdABaiIAEDUgAkFAa0HcAEGAARAQGiACIAEtAABB3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QALmgYBIX8gAigAACESIAIoAAQhEyACKAAIIRQgAigADCEVIAIoABAhFiACKAAUIRcgAigAGCEYIAIoABwhGUHl8MGLBiECIBIhByATIQggFCERIBUhCUHuyIGZAyEOIAEoAAAiGyEKIAEoAAQiHCELIAEoAAgiHSEMIAEoAAwiHiEPQbLaiMsHIQEgFiEEQfTKgdkGIQUgGSENIBghBiAXIQMDQCACIANqQQcQCCAJcyIJIAJqQQkQCCAMcyIMIAlqQQ0QCCADcyIfIAxqQRIQCCEgIAcgDmpBBxAIIA9zIgMgDmpBCRAIIAZzIhAgA2pBDRAIIAdzIgcgEGpBEhAIIQ8gASAKakEHEAggDXMiDSABakEJEAggCHMiCCANakENEAggCnMiCiAIakESEAghISAEIAVqQQcQCCARcyIGIAVqQQkQCCALcyILIAZqQQ0QCCAEcyIiIAtqQRIQCCEjIAYgAiAgcyICakEHEAggB3MiByACakEJEAggCHMiCCAHakENEAggBnMiESAIakESEAggAnMhAiAOIA9zIgQgCWpBBxAIIApzIgogBGpBCRAIIAtzIgsgCmpBDRAIIAlzIgkgC2pBEhAIIARzIQ4gASAhcyIBIANqQQcQCCAicyIEIAFqQQkQCCAMcyIMIARqQQ0QCCADcyIPIAxqQRIQCCABcyEBIAUgI3MiBSANakEHEAggH3MiAyAFakEJEAggEHMiBiADakENEAggDXMiDSAGakESEAggBXMhBSAaQRJJIRAgGkECaiEaIBANAAsgACACQeXwwYsGahAKIABBBGogByASahAKIABBCGogCCATahAKIABBDGogESAUahAKIABBEGogCSAVahAKIABBFGogDkHuyIGZA2oQCiAAQRhqIAogG2oQCiAAQRxqIAsgHGoQCiAAQSBqIAwgHWoQCiAAQSRqIA8gHmoQCiAAQShqIAFBstqIywdqEAogAEEsaiAEIBZqEAogAEEwaiADIBdqEAogAEE0aiAGIBhqEAogAEE4aiANIBlqEAogAEE8aiAFQfTKgdkGahAKCzoBAX8jAEHgAGsiAyQAIANBMGogAiABEBMgAyACIAEQFiADIAMQOiAAIANBMGogAxALIANB4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ABIARqLQAAOgAAIARBAWoiBEEgRw0ACyAAIAAtAABB+AFxOgAAIAAgAC0AH0E/cUHAAHI6AB8gA0GgAmogAhB7IANB8AFqEB0gA0HAAWoQOCADQZABaiADQaACahAsIANB4ABqEB1B/gEhAkEAIQQDQCADQfABaiADQZABaiAAIAIiBUEDdmotAAAgAkEHcXZBAXEiASAEcyIEEE4gA0HAAWogA0HgAGogBBBOIAJBAWshAiADQTBqIANBkAFqIANB4ABqEBYgAyADQfABaiADQcABahAWIANB8AFqIANB8AFqIANBwAFqEBMgA0HAAWogA0GQAWogA0HgAGoQEyADQeAAaiADQTBqIANB8AFqEAsgA0HAAWogA0HAAWogAxALIANBMGogAxAOIAMgA0HwAWoQDiADQZABaiADQeAAaiADQcABahATIANBwAFqIANB4ABqIANBwAFqEBYgA0HwAWogAyADQTBqEAsgAyADIANBMGoQFiADQcABaiADQcABahAOIANB4ABqIAMQ3gIgA0GQAWogA0GQAWoQDiADQTBqIANBMGogA0HgAGoQEyADQeAAaiADQaACaiADQcABahALIANBwAFqIAMgA0EwahALIAEhBCAFDQALIANB8AFqIANBkAFqIAEQTiADQcABaiADQeAAaiABEE4gA0HAAWogA0HAAWoQOiADQfABaiADQfABaiADQcABahALIAAgA0HwAWoQLUEAIQQLIANB0AJqJAAgBAtUAQV/QSAhAUEBIQIDQCAAIAFBAWsiAWotAAAiBCABQYAbai0AACIFa0EIdSACcSADQf8BcXIhAyAEIAVzQf//A2pBCHYgAnEhAiABDQALIANBAEcL6B4BOn4gARAPIRIgATUAAiETIAFBBWoQDyEUIAE1AAchFSABNQAKIRYgAUENahAPIRcgATUADyERIAFBEmoQDyEOIAFBFWoQDyEQIAE1ABchCCABQRpqEA8hBCABNQAcIQcgAhAPIRggAjUAAiEZIAJBBWoQDyEaIAI1AAchGyACNQAKIQogAkENahAPIQkgAjUADyELIAJBEmoQDyEPIAJBFWoQDyEMIAI1ABchDSACQRpqEA8hBSACNQAcIQYgAxAPITIgAzUAAiEzIANBBWoQDy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iBUIMiDwADCAAIAVCBIg8AAsgACAEQv///wCDIghCB4YgB0IOiIQ8AAcgACAGQoOhVn4gCkL///8Ag3wgBUIVh3wiBEIHiDwADiAAIAVC////AIMiBUIEhiAIQhGIhDwACiAAIAtC////AIMgBEIVh3wiBkIKiDwAESAAIAZCAog8ABAgACAEQv///wCDIgdCAYYgBUIUiIQ8AA0gACAMQv///wCDIAZCFYd8IgRCDYg8ABQgACAEQgWIPAATIAAgBkL///8AgyIFQgaGIAdCD4iEPAAPIAAgDkL///8AgyAEQhWHfCIGPAAVIAAgBEIDhiAFQhKIhDwAEiAAIAZCCIg8ABYgACAPQv///wCDIAZCFYd8IgRCC4g8ABkgACAEQgOIPAAYIAAgEEL///8AgyAEQhWHfCIFQgaIPAAbIAAgBkIQiEIfgyAEQv///wCDIgRCBYaEPAAXIAAgDUL///8AgyAFQhWHfCIGQhGIPAAfIAAgBkIJiDwAHiAAIAZCAYg8AB0gACAFQv///wCDIgVCAoYgBEITiIQ8ABogACAGQgeGIAVCDoiEPAAcC1IBA38gAC0AH0F/c0H/AHEhAUEeIQIDQCABIAAgAmotAABBf3NyIQEgAkEBayIDIQIgAw0ACyABQf8BcUEBa0HsASAALQAAa3FBCHZBf3NBAXELjAQBAn8jAEHgDWsiAiQAIAJB4ANqIAEQGyACQcACaiABEE8gAiACQcACahAVIAJBwAJqIAIgAkHgA2oQGiACQaABaiACQcACahAVIAJBgAVqIgEgAkGgAWoQGyACQcACaiACIAEQGiACQaABaiACQcACahAVIAJBoAZqIgEgAkGgAWoQGyACQcACaiACIAEQGiACQaABaiACQcACahAVIAJBwAdqIgEgAkGgAWoQGyACQcACaiACIAEQGiACQaABaiACQcACahAVIAJB4AhqIgEgAkGgAWoQGyACQcACaiACIAEQGiACQaABaiACQcACahAVIAJBgApqIgEgAkGgAWoQGyACQcACaiACIAEQGiACQaABaiACQcACahAVIAJBoAtqIgEgAkGgAWoQGyACQcACaiACIAEQGiACQaABaiACQcACahAVIAJBwAxqIAJBoA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eAnf+BX4j/bn4zAAKpt/8HgmL+RbBe/3QE4wHZ8pH/yq0fAWkBJ/8ur0UA5C86/9fgRf7POEX/EP6L/xfP1P/KFH7/X9Vg/wmwIQDIBc//8SqA/iMhwP/45cQBgRF4APtnl/8HNHD/jDhC/yji9f/ZRiX+rNYJ/0hDhgGSwNb/LCZwAES4S//OWvsAleuNALWqOgB09O8AXJ0CAGatYgDpiWABfzHLAAWblAAXlAn/03oMACKGGv/bzIgAhggp/+BTK/5VGfcAbX8A/qmIMADud9v/563VAM4S/v4Iugf/fgkHAW8qSABvNOz+YD+NAJO/f/7NTsD/DmrtAbvbTACv87v+aVmtAFUZWQGi85QAAnbR/iGeCQCLoy7/XUYoAGwqjv5v/I7/m9+QADPlp/9J/Jv/XnQM/5ig2v+c7iX/s+rP/8UAs/+apI0A4cRoAAojGf7R1PL/Yf3e/rhl5QDeEn8BpIiH/x7PjP6SYfMAgcAa/slUIf9vCk7/k1Gy/wQEGACh7tf/Bo0hADXXDv8ptdD/54udALPL3f//uXEAveKs/3FC1v/KPi3/ZkAI/06uEP6FdUT/AEHAGQsBAQBB4BkLsAEm6JWPwrInsEXD9Iny75jw1d+sBdPGMzmxOAKIbVP8BccXanA9TdhPujwLdg0QZw8qIFP6LDnMxk7H/XeSrAN67P///////////////////////////////////////3/t////////////////////////////////////////f+7///////////////////////////////////////9/7dP1XBpjEljWnPei3vneFABBnxsL/PABEIU7jAG98ST/+CXDAWDcNwC3TD7/w0I9ADJMpAHhpEz/TD2j/3U+HwBRkUD/dkEOAKJz1v8Gii4AfOb0/wqKjwA0GsIAuPRMAIGPKQG+9BP/e6p6/2KBRAB51ZMAVmUe/6FnmwCMWUP/7+W+AUMLtQDG8In+7kW8/+pxPP8l/zn/RbK2/oDQswB2Gn3+AwfW//EyTf9Vy8X/04f6/xkwZP+71bT+EVhpAFPRngEFc2IABK48/qs3bv/ZtRH/FLyqAJKcZv5X1q7/cnqbAeksqgB/CO8B1uzqAK8F2wAxaj3/BkLQ/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ACwAAAAAACwAAAADzAAAAAAAA/QAAAAAA/wAAAAADAAAAAPUAAAAAAAAADwAAAAAA/wAAAAD/AAAAAAcAAAAABQBBnI0CCwEBAEHAjQILAQEAQeCNAgugAeDrenw7QbiuFlbj+vGfxGraCY3rnDKx/YZiBRZfSbgAX5yVvKNQjCSx0LFVnIPvWwREXMRYHI6G2CJO3dCfEVfs////////////////////////////////////////f+3///////////////////////////////////////9/7v///////////////////////////////////////38AQaCPAgvBBQjJvPNn5glqO6fKhIWuZ7sr+JT+cvNuPPE2HV869U+l0YLmrX9SDlEfbD4rjGgFm2u9Qfur2YMfeSF+ExnN4FsirijXmC+KQs1l7yORRDdxLztN7M/7wLW824mBpdu16Ti1SPNbwlY5GdAFtvER8VmbTxmvpII/khiBbdrVXhyrQgIDo5iqB9i+b3BFAVuDEoyy5E6+hTEk4rT/1cN9DFVviXvydF2+crGWFjv+sd6ANRLHJacG3JuUJmnPdPGbwdJK8Z7BaZvk4yVPOIZHvu+11YyLxp3BD2WcrHfMoQwkdQIrWW8s6S2D5KZuqoR0StT7Qb3cqbBctVMRg9qI+Xar32buUlE+mBAytC1txjGoPyH7mMgnA7DkDu++x39Zv8KPqD3zC+DGJacKk0eRp9VvggPgUWPKBnBuDgpnKSkU/C/SRoUKtycmySZcOCEbLu0qxFr8bSxN37OVnRMNOFPeY6+LVHMKZaiydzy7Cmp25q7tRy7JwoE7NYIUhSxykmQD8Uyh6L+iATBCvEtmGqiRl/jQcItLwjC+VAajUWzHGFLv1hnoktEQqWVVJAaZ1iogcVeFNQ70uNG7MnCgahDI0NK4FsGkGVOrQVEIbDcemeuO30x3SCeoSJvhtbywNGNaycWzDBw5y4pB40qq2E5z42N3T8qcW6O4stbzby5o/LLvXe6Cj3RgLxdDb2OleHKr8KEUeMiE7DlkGggCx4woHmMj+v++kOm9gt7rbFCkFXnGsvej+b4rU3Lj8nhxxpxhJurOPifKB8LAIce4htEe6+DN1n3a6njRbu5/T331um8Xcqpn8AammMiixX1jCq4N+b4EmD8RG0ccEzULcRuEfQQj9XfbKJMkx0B7q8oyvL7JFQq+njxMDRCcxGcdQ7ZCPsu+1MVMKn5l/Jwpf1ns+tY6q2/LXxdYR0qMGURsgABB8JUCC4UBYjY0X3BvcyA8PSBiNjRfbGVuAHNvZGl1bS9jb2RlY3MuYwBzb2RpdW1fYmluMmJhc2U2NAAkYXJnb24yaWQAJGFyZ29uMmkAJHY9ACRtPQAsdD0ALHA9ACRhcmdvbjJpZCR2PQAkYXJnb24yaSR2PQAkYXJnb24yaWQkACRhcmdvbjJpJABBkJcCCyhTaWdFZDI1NTE5IG5vIEVkMjU1MTkgY29sbGlzaW9ucwEAMS4wLjE4AEG8lwILOVCOUAAAQAAAAQAAAAIAAAADAAAABAAAAAUAAAAGAAAABwAAAAgAAAAJAAAACgAAAAsAAAAMAAAADQ==";function Ae(e){try{if(e==le&&C)return new Uint8Array(C);var t=Pe(e);if(t)return t;if(m)return m(e);throw"both async and sync fetching of the wasm failed"}catch(e){re(e)}}function fe(){if(!C&&(l||A)){if("function"==typeof fetch&&!ce(le))return fetch(le,{credentials:"same-origin"}).then((function(e){if(!e.ok)throw"failed to load wasm binary file at '"+le+"'";return e.arrayBuffer()})).catch((function(){return Ae(le)}));if(p)return new Promise((function(e,t){p(le,(function(t){e(new Uint8Array(t))}),t)}))}return Promise.resolve().then((function(){return Ae(le)}))}function he(){var e={a:xe};function t(e,t){var n=e.exports;c.asm=n,j((E=c.asm.g).buffer),J=c.asm.h,ne()}function n(e){t(e.instance)}function r(t){return fe().then((function(t){return WebAssembly.instantiate(t,e)})).then(t,(function(e){w("failed to asynchronously prepare wasm: "+e),re(e)}))}if(te(),c.instantiateWasm)try{return c.instantiateWasm(e,t)}catch(e){return w("Module.instantiateWasm callback failed with error: "+e),!1}return C||"function"!=typeof WebAssembly.instantiateStreaming||ae(le)||ce(le)||"function"!=typeof fetch?r(n):fetch(le,{credentials:"same-origin"}).then((function(t){return WebAssembly.instantiateStreaming(t,e).then(n,(function(e){return w("wasm streaming compile failed: "+e),w("falling back to ArrayBuffer instantiation"),r(n)}))})),{}}ae(le)||(le=I(le));var ge={1024:function(){return c.getRandomValue()},1062:function(){if(void 0===c.getRandomValue)try{var e="object"==typeof window?window:self,t=void 0!==e.crypto?e.crypto:e.msCrypto,r=function(){var e=new Uint32Array(1);return t.getRandomValues(e),e[0]>>>0};r(),c.getRandomValue=r}catch(e){try{var o=n(8010),i=function(){var e=o.randomBytes(4);return(e[0]<<24|e[1]<<16|e[2]<<8|e[3])>>>0};i(),c.getRandomValue=i}catch(e){throw"No secure random number generator found"}}}};function pe(e){for(;e.length>0;){var t=e.shift();if("function"!=typeof t){var n=t.func;"number"==typeof n?void 0===t.arg?J.get(n)():J.get(n)(t.arg):n(void 0===t.arg?null:t.arg)}else t(c)}}function me(e,t,n,r){re("Assertion failed: "+U(e)+", at: "+[t?U(t):"unknown filename",n,r?U(r):"unknown function"])}function ve(){re()}function ye(e,t,n){var r=Se(t,n);return ge[e].apply(null,r)}function be(e,t,n){R.copyWithin(e,t,t+n)}function Ie(){return R.length}function Ce(e){try{return E.grow(e-O.byteLength+65535>>>16),j(E.buffer),1}catch(e){}}function Ee(e){e>>>=0;var t=Ie(),n=2147483648;if(e>n)return!1;for(var r=1;r<=4;r*=2){var o=t*(1+.2/r);if(o=Math.min(o,e+100663296),Ce(Math.min(n,H(Math.max(16777216,e,o),65536))))return!0}return!1}function we(e){return N[Me()>>2]=e,e}function Be(e){switch(e){case 30:case 75:return 16384;case 85:return 131072;case 132:case 133:case 12:case 137:case 138:case 15:case 235:case 16:case 17:case 18:case 19:case 20:case 149:case 13:case 10:case 236:case 153:case 9:case 21:case 22:case 159:case 154:case 14:case 77:case 78:case 139:case 82:case 68:case 67:case 164:case 11:case 29:case 47:case 48:case 95:case 52:case 51:case 46:return 200809;case 27:case 246:case 127:case 128:case 23:case 24:case 160:case 161:case 181:case 182:case 242:case 183:case 184:case 243:case 244:case 245:case 165:case 178:case 179:case 49:case 50:case 168:case 169:case 175:case 170:case 171:case 172:case 97:case 76:case 32:case 173:case 35:case 80:case 81:case 79:return-1;case 176:case 177:case 7:case 155:case 8:case 157:case 125:case 126:case 92:case 93:case 129:case 130:case 131:case 94:case 91:return 1;case 74:case 60:case 69:case 70:case 4:return 1024;case 31:case 42:case 72:return 32;case 87:case 26:case 33:return 2147483647;case 34:case 1:return 47839;case 38:case 36:return 99;case 43:case 37:return 2048;case 0:return 2097152;case 3:return 65536;case 28:return 32768;case 44:return 32767;case 39:return 1e3;case 89:return 700;case 71:return 256;case 40:return 255;case 2:return 100;case 180:return 64;case 25:return 20;case 5:return 16;case 6:return 6;case 73:return 4;case 84:return"object"==typeof navigator&&navigator.hardwareConcurrency||1}return we(28),-1}var _e=[];function Se(e,t){var n;for(_e.length=0,t>>=2;n=R[e++];){var r=n<105;r&&1&t&&t++,_e.push(r?D[t++>>1]:N[t]),++t}return _e}var ke=!1;function Oe(e){for(var t=[],n=0;n255&&(ke&&k(!1,"Character code "+r+" ("+String.fromCharCode(r)+") at offset "+n+" not in 0x00-0xFF."),r&=255),t.push(String.fromCharCode(r))}return t.join("")}var Qe="function"==typeof atob?atob:function(e){var t,n,r,o,i,a,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",c="",d=0;e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"");do{t=s.indexOf(e.charAt(d++))<<2|(o=s.indexOf(e.charAt(d++)))>>4,n=(15&o)<<4|(i=s.indexOf(e.charAt(d++)))>>2,r=(3&i)<<6|(a=s.indexOf(e.charAt(d++))),c+=String.fromCharCode(t),64!==i&&(c+=String.fromCharCode(n)),64!==a&&(c+=String.fromCharCode(r))}while(d0||(Y(),X>0||(c.setStatus?(c.setStatus("Running..."),setTimeout((function(){setTimeout((function(){c.setStatus("")}),1),t()}),1)):t()))}if(c._malloc=function(){return(c._malloc=c.asm.Bc).apply(null,arguments)},c._free=function(){return(c._free=c.asm.Cc).apply(null,arguments)},c.setValue=B,c.getValue=_,c.UTF8ToString=U,ee=function e(){Ne||Te(),Ne||(ee=e)},c.run=Te,c.preInit)for("function"==typeof c.preInit&&(c.preInit=[c.preInit]);c.preInit.length>0;)c.preInit.pop()();Te()})).catch((function(){return s.useBackupModule()})),r},void 0===(o=r.apply(t,[t]))||(e.exports=o)},3720:e=>{e.exports=n;var t=null;try{t=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch(e){}function n(e,t,n){this.low=0|e,this.high=0|t,this.unsigned=!!n}function r(e){return!0===(e&&e.__isLong__)}n.prototype.__isLong__,Object.defineProperty(n.prototype,"__isLong__",{value:!0}),n.isLong=r;var o={},i={};function a(e,t){var n,r,a;return t?(a=0<=(e>>>=0)&&e<256)&&(r=i[e])?r:(n=c(e,(0|e)<0?-1:0,!0),a&&(i[e]=n),n):(a=-128<=(e|=0)&&e<128)&&(r=o[e])?r:(n=c(e,e<0?-1:0,!1),a&&(o[e]=n),n)}function s(e,t){if(isNaN(e))return t?m:p;if(t){if(e<0)return m;if(e>=f)return C}else{if(e<=-h)return E;if(e+1>=h)return I}return e<0?s(-e,t).neg():c(e%A|0,e/A|0,t)}function c(e,t,r){return new n(e,t,r)}n.fromInt=a,n.fromNumber=s,n.fromBits=c;var d=Math.pow;function u(e,t,n){if(0===e.length)throw Error("empty string");if("NaN"===e||"Infinity"===e||"+Infinity"===e||"-Infinity"===e)return p;if("number"==typeof t?(n=t,t=!1):t=!!t,(n=n||10)<2||360)throw Error("interior hyphen");if(0===r)return u(e.substring(1),t,n).neg();for(var o=s(d(n,8)),i=p,a=0;a>>0:this.low},w.toNumber=function(){return this.unsigned?(this.high>>>0)*A+(this.low>>>0):this.high*A+(this.low>>>0)},w.toString=function(e){if((e=e||10)<2||36>>0).toString(e);if((i=c).isZero())return u+a;for(;u.length<6;)u="0"+u;a=""+u+a}},w.getHighBits=function(){return this.high},w.getHighBitsUnsigned=function(){return this.high>>>0},w.getLowBits=function(){return this.low},w.getLowBitsUnsigned=function(){return this.low>>>0},w.getNumBitsAbs=function(){if(this.isNegative())return this.eq(E)?64:this.neg().getNumBitsAbs();for(var e=0!=this.high?this.high:this.low,t=31;t>0&&0==(e&1<=0},w.isOdd=function(){return 1==(1&this.low)},w.isEven=function(){return 0==(1&this.low)},w.equals=function(e){return r(e)||(e=l(e)),(this.unsigned===e.unsigned||this.high>>>31!=1||e.high>>>31!=1)&&this.high===e.high&&this.low===e.low},w.eq=w.equals,w.notEquals=function(e){return!this.eq(e)},w.neq=w.notEquals,w.ne=w.notEquals,w.lessThan=function(e){return this.comp(e)<0},w.lt=w.lessThan,w.lessThanOrEqual=function(e){return this.comp(e)<=0},w.lte=w.lessThanOrEqual,w.le=w.lessThanOrEqual,w.greaterThan=function(e){return this.comp(e)>0},w.gt=w.greaterThan,w.greaterThanOrEqual=function(e){return this.comp(e)>=0},w.gte=w.greaterThanOrEqual,w.ge=w.greaterThanOrEqual,w.compare=function(e){if(r(e)||(e=l(e)),this.eq(e))return 0;var t=this.isNegative(),n=e.isNegative();return t&&!n?-1:!t&&n?1:this.unsigned?e.high>>>0>this.high>>>0||e.high===this.high&&e.low>>>0>this.low>>>0?-1:1:this.sub(e).isNegative()?-1:1},w.comp=w.compare,w.negate=function(){return!this.unsigned&&this.eq(E)?E:this.not().add(v)},w.neg=w.negate,w.add=function(e){r(e)||(e=l(e));var t=this.high>>>16,n=65535&this.high,o=this.low>>>16,i=65535&this.low,a=e.high>>>16,s=65535&e.high,d=e.low>>>16,u=0,A=0,f=0,h=0;return f+=(h+=i+(65535&e.low))>>>16,A+=(f+=o+d)>>>16,u+=(A+=n+s)>>>16,u+=t+a,c((f&=65535)<<16|(h&=65535),(u&=65535)<<16|(A&=65535),this.unsigned)},w.subtract=function(e){return r(e)||(e=l(e)),this.add(e.neg())},w.sub=w.subtract,w.multiply=function(e){if(this.isZero())return p;if(r(e)||(e=l(e)),t)return c(t.mul(this.low,this.high,e.low,e.high),t.get_high(),this.unsigned);if(e.isZero())return p;if(this.eq(E))return e.isOdd()?E:p;if(e.eq(E))return this.isOdd()?E:p;if(this.isNegative())return e.isNegative()?this.neg().mul(e.neg()):this.neg().mul(e).neg();if(e.isNegative())return this.mul(e.neg()).neg();if(this.lt(g)&&e.lt(g))return s(this.toNumber()*e.toNumber(),this.unsigned);var n=this.high>>>16,o=65535&this.high,i=this.low>>>16,a=65535&this.low,d=e.high>>>16,u=65535&e.high,A=e.low>>>16,f=65535&e.low,h=0,m=0,v=0,y=0;return v+=(y+=a*f)>>>16,m+=(v+=i*f)>>>16,v&=65535,m+=(v+=a*A)>>>16,h+=(m+=o*f)>>>16,m&=65535,h+=(m+=i*A)>>>16,m&=65535,h+=(m+=a*u)>>>16,h+=n*f+o*A+i*u+a*d,c((v&=65535)<<16|(y&=65535),(h&=65535)<<16|(m&=65535),this.unsigned)},w.mul=w.multiply,w.divide=function(e){if(r(e)||(e=l(e)),e.isZero())throw Error("division by zero");var n,o,i;if(t)return this.unsigned||-2147483648!==this.high||-1!==e.low||-1!==e.high?c((this.unsigned?t.div_u:t.div_s)(this.low,this.high,e.low,e.high),t.get_high(),this.unsigned):this;if(this.isZero())return this.unsigned?m:p;if(this.unsigned){if(e.unsigned||(e=e.toUnsigned()),e.gt(this))return m;if(e.gt(this.shru(1)))return y;i=m}else{if(this.eq(E))return e.eq(v)||e.eq(b)?E:e.eq(E)?v:(n=this.shr(1).div(e).shl(1)).eq(p)?e.isNegative()?v:b:(o=this.sub(e.mul(n)),i=n.add(o.div(e)));if(e.eq(E))return this.unsigned?m:p;if(this.isNegative())return e.isNegative()?this.neg().div(e.neg()):this.neg().div(e).neg();if(e.isNegative())return this.div(e.neg()).neg();i=p}for(o=this;o.gte(e);){n=Math.max(1,Math.floor(o.toNumber()/e.toNumber()));for(var a=Math.ceil(Math.log(n)/Math.LN2),u=a<=48?1:d(2,a-48),A=s(n),f=A.mul(e);f.isNegative()||f.gt(o);)f=(A=s(n-=u,this.unsigned)).mul(e);A.isZero()&&(A=v),i=i.add(A),o=o.sub(f)}return i},w.div=w.divide,w.modulo=function(e){return r(e)||(e=l(e)),t?c((this.unsigned?t.rem_u:t.rem_s)(this.low,this.high,e.low,e.high),t.get_high(),this.unsigned):this.sub(this.div(e).mul(e))},w.mod=w.modulo,w.rem=w.modulo,w.not=function(){return c(~this.low,~this.high,this.unsigned)},w.and=function(e){return r(e)||(e=l(e)),c(this.low&e.low,this.high&e.high,this.unsigned)},w.or=function(e){return r(e)||(e=l(e)),c(this.low|e.low,this.high|e.high,this.unsigned)},w.xor=function(e){return r(e)||(e=l(e)),c(this.low^e.low,this.high^e.high,this.unsigned)},w.shiftLeft=function(e){return r(e)&&(e=e.toInt()),0==(e&=63)?this:e<32?c(this.low<>>32-e,this.unsigned):c(0,this.low<>>e|this.high<<32-e,this.high>>e,this.unsigned):c(this.high>>e-32,this.high>=0?0:-1,this.unsigned)},w.shr=w.shiftRight,w.shiftRightUnsigned=function(e){if(r(e)&&(e=e.toInt()),0==(e&=63))return this;var t=this.high;return e<32?c(this.low>>>e|t<<32-e,t>>>e,this.unsigned):c(32===e?t:t>>>e-32,0,this.unsigned)},w.shru=w.shiftRightUnsigned,w.shr_u=w.shiftRightUnsigned,w.toSigned=function(){return this.unsigned?c(this.low,this.high,!1):this},w.toUnsigned=function(){return this.unsigned?this:c(this.low,this.high,!0)},w.toBytes=function(e){return e?this.toBytesLE():this.toBytesBE()},w.toBytesLE=function(){var e=this.high,t=this.low;return[255&t,t>>>8&255,t>>>16&255,t>>>24,255&e,e>>>8&255,e>>>16&255,e>>>24]},w.toBytesBE=function(){var e=this.high,t=this.low;return[e>>>24,e>>>16&255,e>>>8&255,255&e,t>>>24,t>>>16&255,t>>>8&255,255&t]},n.fromBytes=function(e,t,r){return r?n.fromBytesLE(e,t):n.fromBytesBE(e,t)},n.fromBytesLE=function(e,t){return new n(e[0]|e[1]<<8|e[2]<<16|e[3]<<24,e[4]|e[5]<<8|e[6]<<16|e[7]<<24,t)},n.fromBytesBE=function(e,t){return new n(e[4]<<24|e[5]<<16|e[6]<<8|e[7],e[0]<<24|e[1]<<16|e[2]<<8|e[3],t)}},9593:(e,t,n)=>{"use strict";const r=n(4411),o=Symbol("max"),i=Symbol("length"),a=Symbol("lengthCalculator"),s=Symbol("allowStale"),c=Symbol("maxAge"),d=Symbol("dispose"),u=Symbol("noDisposeOnSet"),l=Symbol("lruList"),A=Symbol("cache"),f=Symbol("updateAgeOnGet"),h=()=>1,g=(e,t,n)=>{const r=e[A].get(t);if(r){const t=r.value;if(p(e,t)){if(v(e,r),!e[s])return}else n&&(e[f]&&(r.value.now=Date.now()),e[l].unshiftNode(r));return t.value}},p=(e,t)=>{if(!t||!t.maxAge&&!e[c])return!1;const n=Date.now()-t.now;return t.maxAge?n>t.maxAge:e[c]&&n>e[c]},m=e=>{if(e[i]>e[o])for(let t=e[l].tail;e[i]>e[o]&&null!==t;){const n=t.prev;v(e,t),t=n}},v=(e,t)=>{if(t){const n=t.value;e[d]&&e[d](n.key,n.value),e[i]-=n.length,e[A].delete(n.key),e[l].removeNode(t)}};class y{constructor(e,t,n,r,o){this.key=e,this.value=t,this.length=n,this.now=r,this.maxAge=o||0}}const b=(e,t,n,r)=>{let o=n.value;p(e,o)&&(v(e,n),e[s]||(o=void 0)),o&&t.call(r,o.value,o.key,e)};e.exports=class{constructor(e){if("number"==typeof e&&(e={max:e}),e||(e={}),e.max&&("number"!=typeof e.max||e.max<0))throw new TypeError("max must be a non-negative number");this[o]=e.max||1/0;const t=e.length||h;if(this[a]="function"!=typeof t?h:t,this[s]=e.stale||!1,e.maxAge&&"number"!=typeof e.maxAge)throw new TypeError("maxAge must be a number");this[c]=e.maxAge||0,this[d]=e.dispose,this[u]=e.noDisposeOnSet||!1,this[f]=e.updateAgeOnGet||!1,this.reset()}set max(e){if("number"!=typeof e||e<0)throw new TypeError("max must be a non-negative number");this[o]=e||1/0,m(this)}get max(){return this[o]}set allowStale(e){this[s]=!!e}get allowStale(){return this[s]}set maxAge(e){if("number"!=typeof e)throw new TypeError("maxAge must be a non-negative number");this[c]=e,m(this)}get maxAge(){return this[c]}set lengthCalculator(e){"function"!=typeof e&&(e=h),e!==this[a]&&(this[a]=e,this[i]=0,this[l].forEach((e=>{e.length=this[a](e.value,e.key),this[i]+=e.length}))),m(this)}get lengthCalculator(){return this[a]}get length(){return this[i]}get itemCount(){return this[l].length}rforEach(e,t){t=t||this;for(let n=this[l].tail;null!==n;){const r=n.prev;b(this,e,n,t),n=r}}forEach(e,t){t=t||this;for(let n=this[l].head;null!==n;){const r=n.next;b(this,e,n,t),n=r}}keys(){return this[l].toArray().map((e=>e.key))}values(){return this[l].toArray().map((e=>e.value))}reset(){this[d]&&this[l]&&this[l].length&&this[l].forEach((e=>this[d](e.key,e.value))),this[A]=new Map,this[l]=new r,this[i]=0}dump(){return this[l].map((e=>!p(this,e)&&{k:e.key,v:e.value,e:e.now+(e.maxAge||0)})).toArray().filter((e=>e))}dumpLru(){return this[l]}set(e,t,n){if((n=n||this[c])&&"number"!=typeof n)throw new TypeError("maxAge must be a number");const r=n?Date.now():0,s=this[a](t,e);if(this[A].has(e)){if(s>this[o])return v(this,this[A].get(e)),!1;const a=this[A].get(e).value;return this[d]&&(this[u]||this[d](e,a.value)),a.now=r,a.maxAge=n,a.value=t,this[i]+=s-a.length,a.length=s,this.get(e),m(this),!0}const f=new y(e,t,s,r,n);return f.length>this[o]?(this[d]&&this[d](e,t),!1):(this[i]+=f.length,this[l].unshift(f),this[A].set(e,this[l].head),m(this),!0)}has(e){if(!this[A].has(e))return!1;const t=this[A].get(e).value;return!p(this,t)}get(e){return g(this,e,!0)}peek(e){return g(this,e,!1)}pop(){const e=this[l].tail;return e?(v(this,e),e.value):null}del(e){v(this,this[A].get(e))}load(e){this.reset();const t=Date.now();for(let n=e.length-1;n>=0;n--){const r=e[n],o=r.e||0;if(0===o)this.set(r.k,r.v);else{const e=o-t;e>0&&this.set(r.k,r.v,e)}}}prune(){this[A].forEach(((e,t)=>g(this,t,!1)))}}},9746:e=>{function t(e,t){if(!e)throw new Error(t||"Assertion failed")}e.exports=t,t.equal=function(e,t,n){if(e!=t)throw new Error(n||"Assertion failed: "+e+" != "+t)}},4504:(e,t)=>{"use strict";var n=t;function r(e){return 1===e.length?"0"+e:e}function o(e){for(var t="",n=0;n>8,a=255&o;i?n.push(i,a):n.push(a)}return n},n.zero2=r,n.toHex=o,n.encode=function(e,t){return"hex"===t?o(e):e}},8987:(e,t,n)=>{"use strict";var r;if(!Object.keys){var o=Object.prototype.hasOwnProperty,i=Object.prototype.toString,a=n(1414),s=Object.prototype.propertyIsEnumerable,c=!s.call({toString:null},"toString"),d=s.call((function(){}),"prototype"),u=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],l=function(e){var t=e.constructor;return t&&t.prototype===e},A={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},f=function(){if("undefined"==typeof window)return!1;for(var e in window)try{if(!A["$"+e]&&o.call(window,e)&&null!==window[e]&&"object"==typeof window[e])try{l(window[e])}catch(e){return!0}}catch(e){return!0}return!1}();r=function(e){var t=null!==e&&"object"==typeof e,n="[object Function]"===i.call(e),r=a(e),s=t&&"[object String]"===i.call(e),A=[];if(!t&&!n&&!r)throw new TypeError("Object.keys called on a non-object");var h=d&&n;if(s&&e.length>0&&!o.call(e,0))for(var g=0;g0)for(var p=0;p{"use strict";var r=Array.prototype.slice,o=n(1414),i=Object.keys,a=i?function(e){return i(e)}:n(8987),s=Object.keys;a.shim=function(){if(Object.keys){var e=function(){var e=Object.keys(arguments);return e&&e.length===arguments.length}(1,2);e||(Object.keys=function(e){return o(e)?s(r.call(e)):s(e)})}else Object.keys=a;return Object.keys||a},e.exports=a},1414:e=>{"use strict";var t=Object.prototype.toString;e.exports=function(e){var n=t.call(e),r="[object Arguments]"===n;return r||(r="[object Array]"!==n&&null!==e&&"object"==typeof e&&"number"==typeof e.length&&e.length>=0&&"[object Function]"===t.call(e.callee)),r}},9591:(e,t,n)=>{"use strict";const{Deflate:r,deflate:o,deflateRaw:i,gzip:a}=n(4555),{Inflate:s,inflate:c,inflateRaw:d,ungzip:u}=n(8843),l=n(1619);e.exports.Deflate=r,e.exports.deflate=o,e.exports.deflateRaw=i,e.exports.gzip=a,e.exports.Inflate=s,e.exports.inflate=c,e.exports.inflateRaw=d,e.exports.ungzip=u,e.exports.constants=l},4555:(e,t,n)=>{"use strict";const r=n(405),o=n(4236),i=n(9373),a=n(8898),s=n(2292),c=Object.prototype.toString,{Z_NO_FLUSH:d,Z_SYNC_FLUSH:u,Z_FULL_FLUSH:l,Z_FINISH:A,Z_OK:f,Z_STREAM_END:h,Z_DEFAULT_COMPRESSION:g,Z_DEFAULT_STRATEGY:p,Z_DEFLATED:m}=n(1619);function v(e){this.options=o.assign({level:g,method:m,chunkSize:16384,windowBits:15,memLevel:8,strategy:p},e||{});let t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new s,this.strm.avail_out=0;let n=r.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(n!==f)throw new Error(a[n]);if(t.header&&r.deflateSetHeader(this.strm,t.header),t.dictionary){let e;if(e="string"==typeof t.dictionary?i.string2buf(t.dictionary):"[object ArrayBuffer]"===c.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,n=r.deflateSetDictionary(this.strm,e),n!==f)throw new Error(a[n]);this._dict_set=!0}}function y(e,t){const n=new v(t);if(n.push(e,!0),n.err)throw n.msg||a[n.err];return n.result}v.prototype.push=function(e,t){const n=this.strm,o=this.options.chunkSize;let a,s;if(this.ended)return!1;for(s=t===~~t?t:!0===t?A:d,"string"==typeof e?n.input=i.string2buf(e):"[object ArrayBuffer]"===c.call(e)?n.input=new Uint8Array(e):n.input=e,n.next_in=0,n.avail_in=n.input.length;;)if(0===n.avail_out&&(n.output=new Uint8Array(o),n.next_out=0,n.avail_out=o),(s===u||s===l)&&n.avail_out<=6)this.onData(n.output.subarray(0,n.next_out)),n.avail_out=0;else{if(a=r.deflate(n,s),a===h)return n.next_out>0&&this.onData(n.output.subarray(0,n.next_out)),a=r.deflateEnd(this.strm),this.onEnd(a),this.ended=!0,a===f;if(0!==n.avail_out){if(s>0&&n.next_out>0)this.onData(n.output.subarray(0,n.next_out)),n.avail_out=0;else if(0===n.avail_in)break}else this.onData(n.output)}return!0},v.prototype.onData=function(e){this.chunks.push(e)},v.prototype.onEnd=function(e){e===f&&(this.result=o.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},e.exports.Deflate=v,e.exports.deflate=y,e.exports.deflateRaw=function(e,t){return(t=t||{}).raw=!0,y(e,t)},e.exports.gzip=function(e,t){return(t=t||{}).gzip=!0,y(e,t)},e.exports.constants=n(1619)},8843:(e,t,n)=>{"use strict";const r=n(7948),o=n(4236),i=n(9373),a=n(8898),s=n(2292),c=n(2401),d=Object.prototype.toString,{Z_NO_FLUSH:u,Z_FINISH:l,Z_OK:A,Z_STREAM_END:f,Z_NEED_DICT:h,Z_STREAM_ERROR:g,Z_DATA_ERROR:p,Z_MEM_ERROR:m}=n(1619);function v(e){this.options=o.assign({chunkSize:65536,windowBits:15,to:""},e||{});const t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&0==(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new s,this.strm.avail_out=0;let n=r.inflateInit2(this.strm,t.windowBits);if(n!==A)throw new Error(a[n]);if(this.header=new c,r.inflateGetHeader(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=i.string2buf(t.dictionary):"[object ArrayBuffer]"===d.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(n=r.inflateSetDictionary(this.strm,t.dictionary),n!==A)))throw new Error(a[n])}function y(e,t){const n=new v(t);if(n.push(e),n.err)throw n.msg||a[n.err];return n.result}v.prototype.push=function(e,t){const n=this.strm,o=this.options.chunkSize,a=this.options.dictionary;let s,c,v;if(this.ended)return!1;for(c=t===~~t?t:!0===t?l:u,"[object ArrayBuffer]"===d.call(e)?n.input=new Uint8Array(e):n.input=e,n.next_in=0,n.avail_in=n.input.length;;){for(0===n.avail_out&&(n.output=new Uint8Array(o),n.next_out=0,n.avail_out=o),s=r.inflate(n,c),s===h&&a&&(s=r.inflateSetDictionary(n,a),s===A?s=r.inflate(n,c):s===p&&(s=h));n.avail_in>0&&s===f&&n.state.wrap>0&&0!==e[n.next_in];)r.inflateReset(n),s=r.inflate(n,c);switch(s){case g:case p:case h:case m:return this.onEnd(s),this.ended=!0,!1}if(v=n.avail_out,n.next_out&&(0===n.avail_out||s===f))if("string"===this.options.to){let e=i.utf8border(n.output,n.next_out),t=n.next_out-e,r=i.buf2string(n.output,e);n.next_out=t,n.avail_out=o-t,t&&n.output.set(n.output.subarray(e,e+t),0),this.onData(r)}else this.onData(n.output.length===n.next_out?n.output:n.output.subarray(0,n.next_out));if(s!==A||0!==v){if(s===f)return s=r.inflateEnd(this.strm),this.onEnd(s),this.ended=!0,!0;if(0===n.avail_in)break}}return!0},v.prototype.onData=function(e){this.chunks.push(e)},v.prototype.onEnd=function(e){e===A&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=o.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},e.exports.Inflate=v,e.exports.inflate=y,e.exports.inflateRaw=function(e,t){return(t=t||{}).raw=!0,y(e,t)},e.exports.ungzip=y,e.exports.constants=n(1619)},4236:e=>{"use strict";const t=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);e.exports.assign=function(e){const n=Array.prototype.slice.call(arguments,1);for(;n.length;){const r=n.shift();if(r){if("object"!=typeof r)throw new TypeError(r+"must be non-object");for(const n in r)t(r,n)&&(e[n]=r[n])}}return e},e.exports.flattenChunks=e=>{let t=0;for(let n=0,r=e.length;n{"use strict";let t=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){t=!1}const n=new Uint8Array(256);for(let e=0;e<256;e++)n[e]=e>=252?6:e>=248?5:e>=240?4:e>=224?3:e>=192?2:1;n[254]=n[254]=1,e.exports.string2buf=e=>{if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(e);let t,n,r,o,i,a=e.length,s=0;for(o=0;o>>6,t[i++]=128|63&n):n<65536?(t[i++]=224|n>>>12,t[i++]=128|n>>>6&63,t[i++]=128|63&n):(t[i++]=240|n>>>18,t[i++]=128|n>>>12&63,t[i++]=128|n>>>6&63,t[i++]=128|63&n);return t},e.exports.buf2string=(e,r)=>{const o=r||e.length;if("function"==typeof TextDecoder&&TextDecoder.prototype.decode)return(new TextDecoder).decode(e.subarray(0,r));let i,a;const s=new Array(2*o);for(a=0,i=0;i4)s[a++]=65533,i+=r-1;else{for(t&=2===r?31:3===r?15:7;r>1&&i1?s[a++]=65533:t<65536?s[a++]=t:(t-=65536,s[a++]=55296|t>>10&1023,s[a++]=56320|1023&t)}}return((e,n)=>{if(n<65534&&e.subarray&&t)return String.fromCharCode.apply(null,e.length===n?e:e.subarray(0,n));let r="";for(let t=0;t{(t=t||e.length)>e.length&&(t=e.length);let r=t-1;for(;r>=0&&128==(192&e[r]);)r--;return r<0||0===r?t:r+n[e[r]]>t?r:t}},6069:e=>{"use strict";e.exports=(e,t,n,r)=>{let o=65535&e|0,i=e>>>16&65535|0,a=0;for(;0!==n;){a=n>2e3?2e3:n,n-=a;do{o=o+t[r++]|0,i=i+o|0}while(--a);o%=65521,i%=65521}return o|i<<16|0}},1619:e=>{"use strict";e.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},2869:e=>{"use strict";const t=new Uint32Array((()=>{let e,t=[];for(var n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t})());e.exports=(e,n,r,o)=>{const i=t,a=o+r;e^=-1;for(let t=o;t>>8^i[255&(e^n[t])];return-1^e}},405:(e,t,n)=>{"use strict";const{_tr_init:r,_tr_stored_block:o,_tr_flush_block:i,_tr_tally:a,_tr_align:s}=n(342),c=n(6069),d=n(2869),u=n(8898),{Z_NO_FLUSH:l,Z_PARTIAL_FLUSH:A,Z_FULL_FLUSH:f,Z_FINISH:h,Z_BLOCK:g,Z_OK:p,Z_STREAM_END:m,Z_STREAM_ERROR:v,Z_DATA_ERROR:y,Z_BUF_ERROR:b,Z_DEFAULT_COMPRESSION:I,Z_FILTERED:C,Z_HUFFMAN_ONLY:E,Z_RLE:w,Z_FIXED:B,Z_DEFAULT_STRATEGY:_,Z_UNKNOWN:S,Z_DEFLATED:k}=n(1619),O=258,Q=262,R=103,P=113,N=666,x=(e,t)=>(e.msg=u[t],t),D=e=>(e<<1)-(e>4?9:0),M=e=>{let t=e.length;for(;--t>=0;)e[t]=0};let T=(e,t,n)=>(t<{const t=e.state;let n=t.pending;n>e.avail_out&&(n=e.avail_out),0!==n&&(e.output.set(t.pending_buf.subarray(t.pending_out,t.pending_out+n),e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,0===t.pending&&(t.pending_out=0))},H=(e,t)=>{i(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,U(e.strm)},j=(e,t)=>{e.pending_buf[e.pending++]=t},J=(e,t)=>{e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t},F=(e,t,n,r)=>{let o=e.avail_in;return o>r&&(o=r),0===o?0:(e.avail_in-=o,t.set(e.input.subarray(e.next_in,e.next_in+o),n),1===e.state.wrap?e.adler=c(e.adler,t,o,n):2===e.state.wrap&&(e.adler=d(e.adler,t,o,n)),e.next_in+=o,e.total_in+=o,o)},G=(e,t)=>{let n,r,o=e.max_chain_length,i=e.strstart,a=e.prev_length,s=e.nice_match;const c=e.strstart>e.w_size-Q?e.strstart-(e.w_size-Q):0,d=e.window,u=e.w_mask,l=e.prev,A=e.strstart+O;let f=d[i+a-1],h=d[i+a];e.prev_length>=e.good_match&&(o>>=2),s>e.lookahead&&(s=e.lookahead);do{if(n=t,d[n+a]===h&&d[n+a-1]===f&&d[n]===d[i]&&d[++n]===d[i+1]){i+=2,n++;do{}while(d[++i]===d[++n]&&d[++i]===d[++n]&&d[++i]===d[++n]&&d[++i]===d[++n]&&d[++i]===d[++n]&&d[++i]===d[++n]&&d[++i]===d[++n]&&d[++i]===d[++n]&&ia){if(e.match_start=t,a=r,r>=s)break;f=d[i+a-1],h=d[i+a]}}}while((t=l[t&u])>c&&0!=--o);return a<=e.lookahead?a:e.lookahead},L=e=>{const t=e.w_size;let n,r,o,i,a;do{if(i=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-Q)){e.window.set(e.window.subarray(t,t+t),0),e.match_start-=t,e.strstart-=t,e.block_start-=t,r=e.hash_size,n=r;do{o=e.head[--n],e.head[n]=o>=t?o-t:0}while(--r);r=t,n=r;do{o=e.prev[--n],e.prev[n]=o>=t?o-t:0}while(--r);i+=t}if(0===e.strm.avail_in)break;if(r=F(e.strm,e.window,e.strstart+e.lookahead,i),e.lookahead+=r,e.lookahead+e.insert>=3)for(a=e.strstart-e.insert,e.ins_h=e.window[a],e.ins_h=T(e,e.ins_h,e.window[a+1]);e.insert&&(e.ins_h=T(e,e.ins_h,e.window[a+3-1]),e.prev[a&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=a,a++,e.insert--,!(e.lookahead+e.insert<3)););}while(e.lookahead{let n,r;for(;;){if(e.lookahead=3&&(e.ins_h=T(e,e.ins_h,e.window[e.strstart+3-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!==n&&e.strstart-n<=e.w_size-Q&&(e.match_length=G(e,n)),e.match_length>=3)if(r=a(e,e.strstart-e.match_start,e.match_length-3),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=3){e.match_length--;do{e.strstart++,e.ins_h=T(e,e.ins_h,e.window[e.strstart+3-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart}while(0!=--e.match_length);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=T(e,e.ins_h,e.window[e.strstart+1]);else r=a(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(r&&(H(e,!1),0===e.strm.avail_out))return 1}return e.insert=e.strstart<2?e.strstart:2,t===h?(H(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(H(e,!1),0===e.strm.avail_out)?1:2},Y=(e,t)=>{let n,r,o;for(;;){if(e.lookahead=3&&(e.ins_h=T(e,e.ins_h,e.window[e.strstart+3-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=2,0!==n&&e.prev_length4096)&&(e.match_length=2)),e.prev_length>=3&&e.match_length<=e.prev_length){o=e.strstart+e.lookahead-3,r=a(e,e.strstart-1-e.prev_match,e.prev_length-3),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=o&&(e.ins_h=T(e,e.ins_h,e.window[e.strstart+3-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart)}while(0!=--e.prev_length);if(e.match_available=0,e.match_length=2,e.strstart++,r&&(H(e,!1),0===e.strm.avail_out))return 1}else if(e.match_available){if(r=a(e,0,e.window[e.strstart-1]),r&&H(e,!1),e.strstart++,e.lookahead--,0===e.strm.avail_out)return 1}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(r=a(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<2?e.strstart:2,t===h?(H(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(H(e,!1),0===e.strm.avail_out)?1:2};function V(e,t,n,r,o){this.good_length=e,this.max_lazy=t,this.nice_length=n,this.max_chain=r,this.func=o}const W=[new V(0,0,0,0,((e,t)=>{let n=65535;for(n>e.pending_buf_size-5&&(n=e.pending_buf_size-5);;){if(e.lookahead<=1){if(L(e),0===e.lookahead&&t===l)return 1;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;const r=e.block_start+n;if((0===e.strstart||e.strstart>=r)&&(e.lookahead=e.strstart-r,e.strstart=r,H(e,!1),0===e.strm.avail_out))return 1;if(e.strstart-e.block_start>=e.w_size-Q&&(H(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===h?(H(e,!0),0===e.strm.avail_out?3:4):(e.strstart>e.block_start&&(H(e,!1),e.strm.avail_out),1)})),new V(4,4,8,4,q),new V(4,5,16,8,q),new V(4,6,32,32,q),new V(4,4,16,16,Y),new V(8,16,32,32,Y),new V(8,16,128,128,Y),new V(8,32,128,256,Y),new V(32,128,258,1024,Y),new V(32,258,258,4096,Y)];function K(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=k,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),M(this.dyn_ltree),M(this.dyn_dtree),M(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),M(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),M(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const Z=e=>{if(!e||!e.state)return x(e,v);e.total_in=e.total_out=0,e.data_type=S;const t=e.state;return t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?42:P,e.adler=2===t.wrap?0:1,t.last_flush=l,r(t),p},z=e=>{const t=Z(e);var n;return t===p&&((n=e.state).window_size=2*n.w_size,M(n.head),n.max_lazy_match=W[n.level].max_lazy,n.good_match=W[n.level].good_length,n.nice_match=W[n.level].nice_length,n.max_chain_length=W[n.level].max_chain,n.strstart=0,n.block_start=0,n.lookahead=0,n.insert=0,n.match_length=n.prev_length=2,n.match_available=0,n.ins_h=0),t},X=(e,t,n,r,o,i)=>{if(!e)return v;let a=1;if(t===I&&(t=6),r<0?(a=0,r=-r):r>15&&(a=2,r-=16),o<1||o>9||n!==k||r<8||r>15||t<0||t>9||i<0||i>B)return x(e,v);8===r&&(r=9);const s=new K;return e.state=s,s.strm=e,s.wrap=a,s.gzhead=null,s.w_bits=r,s.w_size=1<X(e,t,k,15,8,_),e.exports.deflateInit2=X,e.exports.deflateReset=z,e.exports.deflateResetKeep=Z,e.exports.deflateSetHeader=(e,t)=>e&&e.state?2!==e.state.wrap?v:(e.state.gzhead=t,p):v,e.exports.deflate=(e,t)=>{let n,r;if(!e||!e.state||t>g||t<0)return e?x(e,v):v;const i=e.state;if(!e.output||!e.input&&0!==e.avail_in||i.status===N&&t!==h)return x(e,0===e.avail_out?b:v);i.strm=e;const c=i.last_flush;if(i.last_flush=t,42===i.status)if(2===i.wrap)e.adler=0,j(i,31),j(i,139),j(i,8),i.gzhead?(j(i,(i.gzhead.text?1:0)+(i.gzhead.hcrc?2:0)+(i.gzhead.extra?4:0)+(i.gzhead.name?8:0)+(i.gzhead.comment?16:0)),j(i,255&i.gzhead.time),j(i,i.gzhead.time>>8&255),j(i,i.gzhead.time>>16&255),j(i,i.gzhead.time>>24&255),j(i,9===i.level?2:i.strategy>=E||i.level<2?4:0),j(i,255&i.gzhead.os),i.gzhead.extra&&i.gzhead.extra.length&&(j(i,255&i.gzhead.extra.length),j(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(e.adler=d(e.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=69):(j(i,0),j(i,0),j(i,0),j(i,0),j(i,0),j(i,9===i.level?2:i.strategy>=E||i.level<2?4:0),j(i,3),i.status=P);else{let t=k+(i.w_bits-8<<4)<<8,n=-1;n=i.strategy>=E||i.level<2?0:i.level<6?1:6===i.level?2:3,t|=n<<6,0!==i.strstart&&(t|=32),t+=31-t%31,i.status=P,J(i,t),0!==i.strstart&&(J(i,e.adler>>>16),J(i,65535&e.adler)),e.adler=1}if(69===i.status)if(i.gzhead.extra){for(n=i.pending;i.gzindex<(65535&i.gzhead.extra.length)&&(i.pending!==i.pending_buf_size||(i.gzhead.hcrc&&i.pending>n&&(e.adler=d(e.adler,i.pending_buf,i.pending-n,n)),U(e),n=i.pending,i.pending!==i.pending_buf_size));)j(i,255&i.gzhead.extra[i.gzindex]),i.gzindex++;i.gzhead.hcrc&&i.pending>n&&(e.adler=d(e.adler,i.pending_buf,i.pending-n,n)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=73)}else i.status=73;if(73===i.status)if(i.gzhead.name){n=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>n&&(e.adler=d(e.adler,i.pending_buf,i.pending-n,n)),U(e),n=i.pending,i.pending===i.pending_buf_size)){r=1;break}r=i.gzindexn&&(e.adler=d(e.adler,i.pending_buf,i.pending-n,n)),0===r&&(i.gzindex=0,i.status=91)}else i.status=91;if(91===i.status)if(i.gzhead.comment){n=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>n&&(e.adler=d(e.adler,i.pending_buf,i.pending-n,n)),U(e),n=i.pending,i.pending===i.pending_buf_size)){r=1;break}r=i.gzindexn&&(e.adler=d(e.adler,i.pending_buf,i.pending-n,n)),0===r&&(i.status=R)}else i.status=R;if(i.status===R&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&U(e),i.pending+2<=i.pending_buf_size&&(j(i,255&e.adler),j(i,e.adler>>8&255),e.adler=0,i.status=P)):i.status=P),0!==i.pending){if(U(e),0===e.avail_out)return i.last_flush=-1,p}else if(0===e.avail_in&&D(t)<=D(c)&&t!==h)return x(e,b);if(i.status===N&&0!==e.avail_in)return x(e,b);if(0!==e.avail_in||0!==i.lookahead||t!==l&&i.status!==N){let n=i.strategy===E?((e,t)=>{let n;for(;;){if(0===e.lookahead&&(L(e),0===e.lookahead)){if(t===l)return 1;break}if(e.match_length=0,n=a(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(H(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===h?(H(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(H(e,!1),0===e.strm.avail_out)?1:2})(i,t):i.strategy===w?((e,t)=>{let n,r,o,i;const s=e.window;for(;;){if(e.lookahead<=O){if(L(e),e.lookahead<=O&&t===l)return 1;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=3&&e.strstart>0&&(o=e.strstart-1,r=s[o],r===s[++o]&&r===s[++o]&&r===s[++o])){i=e.strstart+O;do{}while(r===s[++o]&&r===s[++o]&&r===s[++o]&&r===s[++o]&&r===s[++o]&&r===s[++o]&&r===s[++o]&&r===s[++o]&&oe.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=3?(n=a(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=a(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(H(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===h?(H(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(H(e,!1),0===e.strm.avail_out)?1:2})(i,t):W[i.level].func(i,t);if(3!==n&&4!==n||(i.status=N),1===n||3===n)return 0===e.avail_out&&(i.last_flush=-1),p;if(2===n&&(t===A?s(i):t!==g&&(o(i,0,0,!1),t===f&&(M(i.head),0===i.lookahead&&(i.strstart=0,i.block_start=0,i.insert=0))),U(e),0===e.avail_out))return i.last_flush=-1,p}return t!==h?p:i.wrap<=0?m:(2===i.wrap?(j(i,255&e.adler),j(i,e.adler>>8&255),j(i,e.adler>>16&255),j(i,e.adler>>24&255),j(i,255&e.total_in),j(i,e.total_in>>8&255),j(i,e.total_in>>16&255),j(i,e.total_in>>24&255)):(J(i,e.adler>>>16),J(i,65535&e.adler)),U(e),i.wrap>0&&(i.wrap=-i.wrap),0!==i.pending?p:m)},e.exports.deflateEnd=e=>{if(!e||!e.state)return v;const t=e.state.status;return 42!==t&&69!==t&&73!==t&&91!==t&&t!==R&&t!==P&&t!==N?x(e,v):(e.state=null,t===P?x(e,y):p)},e.exports.deflateSetDictionary=(e,t)=>{let n=t.length;if(!e||!e.state)return v;const r=e.state,o=r.wrap;if(2===o||1===o&&42!==r.status||r.lookahead)return v;if(1===o&&(e.adler=c(e.adler,t,n,0)),r.wrap=0,n>=r.w_size){0===o&&(M(r.head),r.strstart=0,r.block_start=0,r.insert=0);let e=new Uint8Array(r.w_size);e.set(t.subarray(n-r.w_size,n),0),t=e,n=r.w_size}const i=e.avail_in,a=e.next_in,s=e.input;for(e.avail_in=n,e.next_in=0,e.input=t,L(r);r.lookahead>=3;){let e=r.strstart,t=r.lookahead-2;do{r.ins_h=T(r,r.ins_h,r.window[e+3-1]),r.prev[e&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=e,e++}while(--t);r.strstart=e,r.lookahead=2,L(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=2,r.match_available=0,e.next_in=a,e.input=s,e.avail_in=i,r.wrap=o,p},e.exports.deflateInfo="pako deflate (from Nodeca project)"},2401:e=>{"use strict";e.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},4264:e=>{"use strict";e.exports=function(e,t){let n,r,o,i,a,s,c,d,u,l,A,f,h,g,p,m,v,y,b,I,C,E,w,B;const _=e.state;n=e.next_in,w=e.input,r=n+(e.avail_in-5),o=e.next_out,B=e.output,i=o-(t-e.avail_out),a=o+(e.avail_out-257),s=_.dmax,c=_.wsize,d=_.whave,u=_.wnext,l=_.window,A=_.hold,f=_.bits,h=_.lencode,g=_.distcode,p=(1<<_.lenbits)-1,m=(1<<_.distbits)-1;e:do{f<15&&(A+=w[n++]<>>24,A>>>=y,f-=y,y=v>>>16&255,0===y)B[o++]=65535&v;else{if(!(16&y)){if(0==(64&y)){v=h[(65535&v)+(A&(1<>>=y,f-=y),f<15&&(A+=w[n++]<>>24,A>>>=y,f-=y,y=v>>>16&255,!(16&y)){if(0==(64&y)){v=g[(65535&v)+(A&(1<s){e.msg="invalid distance too far back",_.mode=30;break e}if(A>>>=y,f-=y,y=o-i,I>y){if(y=I-y,y>d&&_.sane){e.msg="invalid distance too far back",_.mode=30;break e}if(C=0,E=l,0===u){if(C+=c-y,y2;)B[o++]=E[C++],B[o++]=E[C++],B[o++]=E[C++],b-=3;b&&(B[o++]=E[C++],b>1&&(B[o++]=E[C++]))}else{C=o-I;do{B[o++]=B[C++],B[o++]=B[C++],B[o++]=B[C++],b-=3}while(b>2);b&&(B[o++]=B[C++],b>1&&(B[o++]=B[C++]))}break}}break}}while(n>3,n-=b,f-=b<<3,A&=(1<{"use strict";const r=n(6069),o=n(2869),i=n(4264),a=n(9241),{Z_FINISH:s,Z_BLOCK:c,Z_TREES:d,Z_OK:u,Z_STREAM_END:l,Z_NEED_DICT:A,Z_STREAM_ERROR:f,Z_DATA_ERROR:h,Z_MEM_ERROR:g,Z_BUF_ERROR:p,Z_DEFLATED:m}=n(1619),v=12,y=30,b=e=>(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24);function I(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const C=e=>{if(!e||!e.state)return f;const t=e.state;return e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=1,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Int32Array(852),t.distcode=t.distdyn=new Int32Array(592),t.sane=1,t.back=-1,u},E=e=>{if(!e||!e.state)return f;const t=e.state;return t.wsize=0,t.whave=0,t.wnext=0,C(e)},w=(e,t)=>{let n;if(!e||!e.state)return f;const r=e.state;return t<0?(n=0,t=-t):(n=1+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?f:(null!==r.window&&r.wbits!==t&&(r.window=null),r.wrap=n,r.wbits=t,E(e))},B=(e,t)=>{if(!e)return f;const n=new I;e.state=n,n.window=null;const r=w(e,t);return r!==u&&(e.state=null),r};let _,S,k=!0;const O=e=>{if(k){_=new Int32Array(512),S=new Int32Array(32);let t=0;for(;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(a(1,e.lens,0,288,_,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;a(2,e.lens,0,32,S,0,e.work,{bits:5}),k=!1}e.lencode=_,e.lenbits=9,e.distcode=S,e.distbits=5},Q=(e,t,n,r)=>{let o;const i=e.state;return null===i.window&&(i.wsize=1<=i.wsize?(i.window.set(t.subarray(n-i.wsize,n),0),i.wnext=0,i.whave=i.wsize):(o=i.wsize-i.wnext,o>r&&(o=r),i.window.set(t.subarray(n-r,n-r+o),i.wnext),(r-=o)?(i.window.set(t.subarray(n-r,n),0),i.wnext=r,i.whave=i.wsize):(i.wnext+=o,i.wnext===i.wsize&&(i.wnext=0),i.whaveB(e,15),e.exports.inflateInit2=B,e.exports.inflate=(e,t)=>{let n,I,C,E,w,B,_,S,k,R,P,N,x,D,M,T,U,H,j,J,F,G,L=0;const q=new Uint8Array(4);let Y,V;const W=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(!e||!e.state||!e.output||!e.input&&0!==e.avail_in)return f;n=e.state,n.mode===v&&(n.mode=13),w=e.next_out,C=e.output,_=e.avail_out,E=e.next_in,I=e.input,B=e.avail_in,S=n.hold,k=n.bits,R=B,P=_,G=u;e:for(;;)switch(n.mode){case 1:if(0===n.wrap){n.mode=13;break}for(;k<16;){if(0===B)break e;B--,S+=I[E++]<>>8&255,n.check=o(n.check,q,2,0),S=0,k=0,n.mode=2;break}if(n.flags=0,n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&S)<<8)+(S>>8))%31){e.msg="incorrect header check",n.mode=y;break}if((15&S)!==m){e.msg="unknown compression method",n.mode=y;break}if(S>>>=4,k-=4,F=8+(15&S),0===n.wbits)n.wbits=F;else if(F>n.wbits){e.msg="invalid window size",n.mode=y;break}n.dmax=1<>8&1),512&n.flags&&(q[0]=255&S,q[1]=S>>>8&255,n.check=o(n.check,q,2,0)),S=0,k=0,n.mode=3;case 3:for(;k<32;){if(0===B)break e;B--,S+=I[E++]<>>8&255,q[2]=S>>>16&255,q[3]=S>>>24&255,n.check=o(n.check,q,4,0)),S=0,k=0,n.mode=4;case 4:for(;k<16;){if(0===B)break e;B--,S+=I[E++]<>8),512&n.flags&&(q[0]=255&S,q[1]=S>>>8&255,n.check=o(n.check,q,2,0)),S=0,k=0,n.mode=5;case 5:if(1024&n.flags){for(;k<16;){if(0===B)break e;B--,S+=I[E++]<>>8&255,n.check=o(n.check,q,2,0)),S=0,k=0}else n.head&&(n.head.extra=null);n.mode=6;case 6:if(1024&n.flags&&(N=n.length,N>B&&(N=B),N&&(n.head&&(F=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Uint8Array(n.head.extra_len)),n.head.extra.set(I.subarray(E,E+N),F)),512&n.flags&&(n.check=o(n.check,I,N,E)),B-=N,E+=N,n.length-=N),n.length))break e;n.length=0,n.mode=7;case 7:if(2048&n.flags){if(0===B)break e;N=0;do{F=I[E+N++],n.head&&F&&n.length<65536&&(n.head.name+=String.fromCharCode(F))}while(F&&N>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=v;break;case 10:for(;k<32;){if(0===B)break e;B--,S+=I[E++]<>>=7&k,k-=7&k,n.mode=27;break}for(;k<3;){if(0===B)break e;B--,S+=I[E++]<>>=1,k-=1,3&S){case 0:n.mode=14;break;case 1:if(O(n),n.mode=20,t===d){S>>>=2,k-=2;break e}break;case 2:n.mode=17;break;case 3:e.msg="invalid block type",n.mode=y}S>>>=2,k-=2;break;case 14:for(S>>>=7&k,k-=7&k;k<32;){if(0===B)break e;B--,S+=I[E++]<>>16^65535)){e.msg="invalid stored block lengths",n.mode=y;break}if(n.length=65535&S,S=0,k=0,n.mode=15,t===d)break e;case 15:n.mode=16;case 16:if(N=n.length,N){if(N>B&&(N=B),N>_&&(N=_),0===N)break e;C.set(I.subarray(E,E+N),w),B-=N,E+=N,_-=N,w+=N,n.length-=N;break}n.mode=v;break;case 17:for(;k<14;){if(0===B)break e;B--,S+=I[E++]<>>=5,k-=5,n.ndist=1+(31&S),S>>>=5,k-=5,n.ncode=4+(15&S),S>>>=4,k-=4,n.nlen>286||n.ndist>30){e.msg="too many length or distance symbols",n.mode=y;break}n.have=0,n.mode=18;case 18:for(;n.have>>=3,k-=3}for(;n.have<19;)n.lens[W[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,Y={bits:n.lenbits},G=a(0,n.lens,0,19,n.lencode,0,n.work,Y),n.lenbits=Y.bits,G){e.msg="invalid code lengths set",n.mode=y;break}n.have=0,n.mode=19;case 19:for(;n.have>>24,T=L>>>16&255,U=65535&L,!(M<=k);){if(0===B)break e;B--,S+=I[E++]<>>=M,k-=M,n.lens[n.have++]=U;else{if(16===U){for(V=M+2;k>>=M,k-=M,0===n.have){e.msg="invalid bit length repeat",n.mode=y;break}F=n.lens[n.have-1],N=3+(3&S),S>>>=2,k-=2}else if(17===U){for(V=M+3;k>>=M,k-=M,F=0,N=3+(7&S),S>>>=3,k-=3}else{for(V=M+7;k>>=M,k-=M,F=0,N=11+(127&S),S>>>=7,k-=7}if(n.have+N>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=y;break}for(;N--;)n.lens[n.have++]=F}}if(n.mode===y)break;if(0===n.lens[256]){e.msg="invalid code -- missing end-of-block",n.mode=y;break}if(n.lenbits=9,Y={bits:n.lenbits},G=a(1,n.lens,0,n.nlen,n.lencode,0,n.work,Y),n.lenbits=Y.bits,G){e.msg="invalid literal/lengths set",n.mode=y;break}if(n.distbits=6,n.distcode=n.distdyn,Y={bits:n.distbits},G=a(2,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,Y),n.distbits=Y.bits,G){e.msg="invalid distances set",n.mode=y;break}if(n.mode=20,t===d)break e;case 20:n.mode=21;case 21:if(B>=6&&_>=258){e.next_out=w,e.avail_out=_,e.next_in=E,e.avail_in=B,n.hold=S,n.bits=k,i(e,P),w=e.next_out,C=e.output,_=e.avail_out,E=e.next_in,I=e.input,B=e.avail_in,S=n.hold,k=n.bits,n.mode===v&&(n.back=-1);break}for(n.back=0;L=n.lencode[S&(1<>>24,T=L>>>16&255,U=65535&L,!(M<=k);){if(0===B)break e;B--,S+=I[E++]<>H)],M=L>>>24,T=L>>>16&255,U=65535&L,!(H+M<=k);){if(0===B)break e;B--,S+=I[E++]<>>=H,k-=H,n.back+=H}if(S>>>=M,k-=M,n.back+=M,n.length=U,0===T){n.mode=26;break}if(32&T){n.back=-1,n.mode=v;break}if(64&T){e.msg="invalid literal/length code",n.mode=y;break}n.extra=15&T,n.mode=22;case 22:if(n.extra){for(V=n.extra;k>>=n.extra,k-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=23;case 23:for(;L=n.distcode[S&(1<>>24,T=L>>>16&255,U=65535&L,!(M<=k);){if(0===B)break e;B--,S+=I[E++]<>H)],M=L>>>24,T=L>>>16&255,U=65535&L,!(H+M<=k);){if(0===B)break e;B--,S+=I[E++]<>>=H,k-=H,n.back+=H}if(S>>>=M,k-=M,n.back+=M,64&T){e.msg="invalid distance code",n.mode=y;break}n.offset=U,n.extra=15&T,n.mode=24;case 24:if(n.extra){for(V=n.extra;k>>=n.extra,k-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=y;break}n.mode=25;case 25:if(0===_)break e;if(N=P-_,n.offset>N){if(N=n.offset-N,N>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=y;break}N>n.wnext?(N-=n.wnext,x=n.wsize-N):x=n.wnext-N,N>n.length&&(N=n.length),D=n.window}else D=C,x=w-n.offset,N=n.length;N>_&&(N=_),_-=N,n.length-=N;do{C[w++]=D[x++]}while(--N);0===n.length&&(n.mode=21);break;case 26:if(0===_)break e;C[w++]=n.length,_--,n.mode=21;break;case 27:if(n.wrap){for(;k<32;){if(0===B)break e;B--,S|=I[E++]<{if(!e||!e.state)return f;let t=e.state;return t.window&&(t.window=null),e.state=null,u},e.exports.inflateGetHeader=(e,t)=>{if(!e||!e.state)return f;const n=e.state;return 0==(2&n.wrap)?f:(n.head=t,t.done=!1,u)},e.exports.inflateSetDictionary=(e,t)=>{const n=t.length;let o,i,a;return e&&e.state?(o=e.state,0!==o.wrap&&11!==o.mode?f:11===o.mode&&(i=1,i=r(i,t,n,0),i!==o.check)?h:(a=Q(e,t,n,n),a?(o.mode=31,g):(o.havedict=1,u))):f},e.exports.inflateInfo="pako inflate (from Nodeca project)"},9241:e=>{"use strict";const t=new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]),n=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78]),r=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]),o=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]);e.exports=(e,i,a,s,c,d,u,l)=>{const A=l.bits;let f,h,g,p,m,v,y=0,b=0,I=0,C=0,E=0,w=0,B=0,_=0,S=0,k=0,O=null,Q=0;const R=new Uint16Array(16),P=new Uint16Array(16);let N,x,D,M=null,T=0;for(y=0;y<=15;y++)R[y]=0;for(b=0;b=1&&0===R[C];C--);if(E>C&&(E=C),0===C)return c[d++]=20971520,c[d++]=20971520,l.bits=1,0;for(I=1;I0&&(0===e||1!==C))return-1;for(P[1]=0,y=1;y<15;y++)P[y+1]=P[y]+R[y];for(b=0;b852||2===e&&S>592)return 1;for(;;){N=y-B,u[b]v?(x=M[T+u[b]],D=O[Q+u[b]]):(x=96,D=0),f=1<>B)+h]=N<<24|x<<16|D|0}while(0!==h);for(f=1<>=1;if(0!==f?(k&=f-1,k+=f):k=0,b++,0==--R[y]){if(y===C)break;y=i[a+u[b]]}if(y>E&&(k&p)!==g){for(0===B&&(B=E),m+=I,w=y-B,_=1<852||2===e&&S>592)return 1;g=k&p,c[g]=E<<24|w<<16|m-d|0}}return 0!==k&&(c[m+k]=y-B<<24|64<<16|0),l.bits=E,0}},8898:e=>{"use strict";e.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},342:e=>{"use strict";function t(e){let t=e.length;for(;--t>=0;)e[t]=0}const n=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),r=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),o=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),i=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),a=new Array(576);t(a);const s=new Array(60);t(s);const c=new Array(512);t(c);const d=new Array(256);t(d);const u=new Array(29);t(u);const l=new Array(30);function A(e,t,n,r,o){this.static_tree=e,this.extra_bits=t,this.extra_base=n,this.elems=r,this.max_length=o,this.has_stree=e&&e.length}let f,h,g;function p(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}t(l);const m=e=>e<256?c[e]:c[256+(e>>>7)],v=(e,t)=>{e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255},y=(e,t,n)=>{e.bi_valid>16-n?(e.bi_buf|=t<>16-e.bi_valid,e.bi_valid+=n-16):(e.bi_buf|=t<{y(e,n[2*t],n[2*t+1])},I=(e,t)=>{let n=0;do{n|=1&e,e>>>=1,n<<=1}while(--t>0);return n>>>1},C=(e,t,n)=>{const r=new Array(16);let o,i,a=0;for(o=1;o<=15;o++)r[o]=a=a+n[o-1]<<1;for(i=0;i<=t;i++){let t=e[2*i+1];0!==t&&(e[2*i]=I(r[t]++,t))}},E=e=>{let t;for(t=0;t<286;t++)e.dyn_ltree[2*t]=0;for(t=0;t<30;t++)e.dyn_dtree[2*t]=0;for(t=0;t<19;t++)e.bl_tree[2*t]=0;e.dyn_ltree[512]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0},w=e=>{e.bi_valid>8?v(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0},B=(e,t,n,r)=>{const o=2*t,i=2*n;return e[o]{const r=e.heap[n];let o=n<<1;for(;o<=e.heap_len&&(o{let i,a,s,c,A=0;if(0!==e.last_lit)do{i=e.pending_buf[e.d_buf+2*A]<<8|e.pending_buf[e.d_buf+2*A+1],a=e.pending_buf[e.l_buf+A],A++,0===i?b(e,a,t):(s=d[a],b(e,s+256+1,t),c=n[s],0!==c&&(a-=u[s],y(e,a,c)),i--,s=m(i),b(e,s,o),c=r[s],0!==c&&(i-=l[s],y(e,i,c)))}while(A{const n=t.dyn_tree,r=t.stat_desc.static_tree,o=t.stat_desc.has_stree,i=t.stat_desc.elems;let a,s,c,d=-1;for(e.heap_len=0,e.heap_max=573,a=0;a>1;a>=1;a--)_(e,n,a);c=i;do{a=e.heap[1],e.heap[1]=e.heap[e.heap_len--],_(e,n,1),s=e.heap[1],e.heap[--e.heap_max]=a,e.heap[--e.heap_max]=s,n[2*c]=n[2*a]+n[2*s],e.depth[c]=(e.depth[a]>=e.depth[s]?e.depth[a]:e.depth[s])+1,n[2*a+1]=n[2*s+1]=c,e.heap[1]=c++,_(e,n,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],((e,t)=>{const n=t.dyn_tree,r=t.max_code,o=t.stat_desc.static_tree,i=t.stat_desc.has_stree,a=t.stat_desc.extra_bits,s=t.stat_desc.extra_base,c=t.stat_desc.max_length;let d,u,l,A,f,h,g=0;for(A=0;A<=15;A++)e.bl_count[A]=0;for(n[2*e.heap[e.heap_max]+1]=0,d=e.heap_max+1;d<573;d++)u=e.heap[d],A=n[2*n[2*u+1]+1]+1,A>c&&(A=c,g++),n[2*u+1]=A,u>r||(e.bl_count[A]++,f=0,u>=s&&(f=a[u-s]),h=n[2*u],e.opt_len+=h*(A+f),i&&(e.static_len+=h*(o[2*u+1]+f)));if(0!==g){do{for(A=c-1;0===e.bl_count[A];)A--;e.bl_count[A]--,e.bl_count[A+1]+=2,e.bl_count[c]--,g-=2}while(g>0);for(A=c;0!==A;A--)for(u=e.bl_count[A];0!==u;)l=e.heap[--d],l>r||(n[2*l+1]!==A&&(e.opt_len+=(A-n[2*l+1])*n[2*l],n[2*l+1]=A),u--)}})(e,t),C(n,d,e.bl_count)},O=(e,t,n)=>{let r,o,i=-1,a=t[1],s=0,c=7,d=4;for(0===a&&(c=138,d=3),t[2*(n+1)+1]=65535,r=0;r<=n;r++)o=a,a=t[2*(r+1)+1],++s{let r,o,i=-1,a=t[1],s=0,c=7,d=4;for(0===a&&(c=138,d=3),r=0;r<=n;r++)if(o=a,a=t[2*(r+1)+1],!(++s{y(e,0+(r?1:0),3),((e,t,n,r)=>{w(e),v(e,n),v(e,~n),e.pending_buf.set(e.window.subarray(t,t+n),e.pending),e.pending+=n})(e,t,n)};e.exports._tr_init=e=>{R||((()=>{let e,t,i,p,m;const v=new Array(16);for(i=0,p=0;p<28;p++)for(u[p]=i,e=0;e<1<>=7;p<30;p++)for(l[p]=m<<7,e=0;e<1<{let o,c,d=0;e.level>0?(2===e.strm.data_type&&(e.strm.data_type=(e=>{let t,n=4093624447;for(t=0;t<=31;t++,n>>>=1)if(1&n&&0!==e.dyn_ltree[2*t])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(t=32;t<256;t++)if(0!==e.dyn_ltree[2*t])return 1;return 0})(e)),k(e,e.l_desc),k(e,e.d_desc),d=(e=>{let t;for(O(e,e.dyn_ltree,e.l_desc.max_code),O(e,e.dyn_dtree,e.d_desc.max_code),k(e,e.bl_desc),t=18;t>=3&&0===e.bl_tree[2*i[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t})(e),o=e.opt_len+3+7>>>3,c=e.static_len+3+7>>>3,c<=o&&(o=c)):o=c=n+5,n+4<=o&&-1!==t?P(e,t,n,r):4===e.strategy||c===o?(y(e,2+(r?1:0),3),S(e,a,s)):(y(e,4+(r?1:0),3),((e,t,n,r)=>{let o;for(y(e,t-257,5),y(e,n-1,5),y(e,r-4,4),o=0;o(e.pending_buf[e.d_buf+2*e.last_lit]=t>>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&n,e.last_lit++,0===t?e.dyn_ltree[2*n]++:(e.matches++,t--,e.dyn_ltree[2*(d[n]+256+1)]++,e.dyn_dtree[2*m(t)]++),e.last_lit===e.lit_bufsize-1),e.exports._tr_align=e=>{y(e,2,3),b(e,256,a),(e=>{16===e.bi_valid?(v(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)})(e)}},2292:e=>{"use strict";e.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},6470:(e,t,n)=>{"use strict";var r=n(4155);function o(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function i(e,t){for(var n,r="",o=0,i=-1,a=0,s=0;s<=e.length;++s){if(s2){var c=r.lastIndexOf("/");if(c!==r.length-1){-1===c?(r="",o=0):o=(r=r.slice(0,c)).length-1-r.lastIndexOf("/"),i=s,a=0;continue}}else if(2===r.length||1===r.length){r="",o=0,i=s,a=0;continue}t&&(r.length>0?r+="/..":r="..",o=2)}else r.length>0?r+="/"+e.slice(i+1,s):r=e.slice(i+1,s),o=s-i-1;i=s,a=0}else 46===n&&-1!==a?++a:a=-1}return r}var a={resolve:function(){for(var e,t="",n=!1,a=arguments.length-1;a>=-1&&!n;a--){var s;a>=0?s=arguments[a]:(void 0===e&&(e=r.cwd()),s=e),o(s),0!==s.length&&(t=s+"/"+t,n=47===s.charCodeAt(0))}return t=i(t,!n),n?t.length>0?"/"+t:"/":t.length>0?t:"."},normalize:function(e){if(o(e),0===e.length)return".";var t=47===e.charCodeAt(0),n=47===e.charCodeAt(e.length-1);return 0!==(e=i(e,!t)).length||t||(e="."),e.length>0&&n&&(e+="/"),t?"/"+e:e},isAbsolute:function(e){return o(e),e.length>0&&47===e.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var e,t=0;t0&&(void 0===e?e=n:e+="/"+n)}return void 0===e?".":a.normalize(e)},relative:function(e,t){if(o(e),o(t),e===t)return"";if((e=a.resolve(e))===(t=a.resolve(t)))return"";for(var n=1;nd){if(47===t.charCodeAt(s+l))return t.slice(s+l+1);if(0===l)return t.slice(s+l)}else i>d&&(47===e.charCodeAt(n+l)?u=l:0===l&&(u=0));break}var A=e.charCodeAt(n+l);if(A!==t.charCodeAt(s+l))break;47===A&&(u=l)}var f="";for(l=n+u+1;l<=r;++l)l!==r&&47!==e.charCodeAt(l)||(0===f.length?f+="..":f+="/..");return f.length>0?f+t.slice(s+u):(s+=u,47===t.charCodeAt(s)&&++s,t.slice(s))},_makeLong:function(e){return e},dirname:function(e){if(o(e),0===e.length)return".";for(var t=e.charCodeAt(0),n=47===t,r=-1,i=!0,a=e.length-1;a>=1;--a)if(47===(t=e.charCodeAt(a))){if(!i){r=a;break}}else i=!1;return-1===r?n?"/":".":n&&1===r?"//":e.slice(0,r)},basename:function(e,t){if(void 0!==t&&"string"!=typeof t)throw new TypeError('"ext" argument must be a string');o(e);var n,r=0,i=-1,a=!0;if(void 0!==t&&t.length>0&&t.length<=e.length){if(t.length===e.length&&t===e)return"";var s=t.length-1,c=-1;for(n=e.length-1;n>=0;--n){var d=e.charCodeAt(n);if(47===d){if(!a){r=n+1;break}}else-1===c&&(a=!1,c=n+1),s>=0&&(d===t.charCodeAt(s)?-1==--s&&(i=n):(s=-1,i=c))}return r===i?i=c:-1===i&&(i=e.length),e.slice(r,i)}for(n=e.length-1;n>=0;--n)if(47===e.charCodeAt(n)){if(!a){r=n+1;break}}else-1===i&&(a=!1,i=n+1);return-1===i?"":e.slice(r,i)},extname:function(e){o(e);for(var t=-1,n=0,r=-1,i=!0,a=0,s=e.length-1;s>=0;--s){var c=e.charCodeAt(s);if(47!==c)-1===r&&(i=!1,r=s+1),46===c?-1===t?t=s:1!==a&&(a=1):-1!==t&&(a=-1);else if(!i){n=s+1;break}}return-1===t||-1===r||0===a||1===a&&t===r-1&&t===n+1?"":e.slice(t,r)},format:function(e){if(null===e||"object"!=typeof e)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return function(e,t){var n=t.dir||t.root,r=t.base||(t.name||"")+(t.ext||"");return n?n===t.root?n+r:n+"/"+r:r}(0,e)},parse:function(e){o(e);var t={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return t;var n,r=e.charCodeAt(0),i=47===r;i?(t.root="/",n=1):n=0;for(var a=-1,s=0,c=-1,d=!0,u=e.length-1,l=0;u>=n;--u)if(47!==(r=e.charCodeAt(u)))-1===c&&(d=!1,c=u+1),46===r?-1===a?a=u:1!==l&&(l=1):-1!==a&&(l=-1);else if(!d){s=u+1;break}return-1===a||-1===c||0===l||1===l&&a===c-1&&a===s+1?-1!==c&&(t.base=t.name=0===s&&i?e.slice(1,c):e.slice(s,c)):(0===s&&i?(t.name=e.slice(1,a),t.base=e.slice(1,c)):(t.name=e.slice(s,a),t.base=e.slice(s,c)),t.ext=e.slice(a,c)),s>0?t.dir=e.slice(0,s-1):i&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};a.posix=a,e.exports=a},4155:e=>{var t,n,r=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function a(e){if(t===setTimeout)return setTimeout(e,0);if((t===o||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(n){try{return t.call(null,e,0)}catch(n){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:o}catch(e){t=o}try{n="function"==typeof clearTimeout?clearTimeout:i}catch(e){n=i}}();var s,c=[],d=!1,u=-1;function l(){d&&s&&(d=!1,s.length?c=s.concat(c):u=-1,c.length&&A())}function A(){if(!d){var e=a(l);d=!0;for(var t=c.length;t;){for(s=c,c=[];++u1)for(var n=1;n{"use strict";var t={};function n(e,n,r){r||(r=Error);var o=function(e){var t,r;function o(t,r,o){return e.call(this,function(e,t,r){return"string"==typeof n?n:n(e,t,r)}(t,r,o))||this}return r=e,(t=o).prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r,o}(r);o.prototype.name=r.name,o.prototype.code=e,t[e]=o}function r(e,t){if(Array.isArray(e)){var n=e.length;return e=e.map((function(e){return String(e)})),n>2?"one of ".concat(t," ").concat(e.slice(0,n-1).join(", "),", or ")+e[n-1]:2===n?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}n("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),n("ERR_INVALID_ARG_TYPE",(function(e,t,n){var o,i,a,s,c;if("string"==typeof t&&(i="not ",t.substr(0,i.length)===i)?(o="must not be",t=t.replace(/^not /,"")):o="must be",function(e,t,n){return(void 0===n||n>e.length)&&(n=e.length),e.substring(n-t.length,n)===t}(e," argument"))a="The ".concat(e," ").concat(o," ").concat(r(t,"type"));else{var d=("number"!=typeof c&&(c=0),c+".".length>(s=e).length||-1===s.indexOf(".",c)?"argument":"property");a='The "'.concat(e,'" ').concat(d," ").concat(o," ").concat(r(t,"type"))}return a+". Received type ".concat(typeof n)}),TypeError),n("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),n("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),n("ERR_STREAM_PREMATURE_CLOSE","Premature close"),n("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),n("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),n("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),n("ERR_STREAM_WRITE_AFTER_END","write after end"),n("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),n("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),n("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.q=t},6753:(e,t,n)=>{"use strict";var r=n(4155),o=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};e.exports=u;var i=n(9481),a=n(4229);n(5717)(u,i);for(var s=o(a.prototype),c=0;c{"use strict";e.exports=o;var r=n(4605);function o(e){if(!(this instanceof o))return new o(e);r.call(this,e)}n(5717)(o,r),o.prototype._transform=function(e,t,n){n(null,e)}},9481:(e,t,n)=>{"use strict";var r,o=n(4155);e.exports=B,B.ReadableState=w,n(7187).EventEmitter;var i,a=function(e,t){return e.listeners(t).length},s=n(222),c=n(8764).Buffer,d=n.g.Uint8Array||function(){},u=n(9630);i=u&&u.debuglog?u.debuglog("stream"):function(){};var l,A,f,h=n(7327),g=n(1195),p=n(2457).getHighWaterMark,m=n(4281).q,v=m.ERR_INVALID_ARG_TYPE,y=m.ERR_STREAM_PUSH_AFTER_EOF,b=m.ERR_METHOD_NOT_IMPLEMENTED,I=m.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;n(5717)(B,s);var C=g.errorOrDestroy,E=["error","close","destroy","pause","resume"];function w(e,t,o){r=r||n(6753),e=e||{},"boolean"!=typeof o&&(o=t instanceof r),this.objectMode=!!e.objectMode,o&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=p(this,e,"readableHighWaterMark",o),this.buffer=new h,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(l||(l=n(2553).s),this.decoder=new l(e.encoding),this.encoding=e.encoding)}function B(e){if(r=r||n(6753),!(this instanceof B))return new B(e);var t=this instanceof r;this._readableState=new w(e,this,t),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),s.call(this)}function _(e,t,n,r,o){i("readableAddChunk",t);var a,s=e._readableState;if(null===t)s.reading=!1,function(e,t){if(i("onEofChunk"),!t.ended){if(t.decoder){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,t.sync?Q(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,R(e)))}}(e,s);else if(o||(a=function(e,t){var n,r;return r=t,c.isBuffer(r)||r instanceof d||"string"==typeof t||void 0===t||e.objectMode||(n=new v("chunk",["string","Buffer","Uint8Array"],t)),n}(s,t)),a)C(e,a);else if(s.objectMode||t&&t.length>0)if("string"==typeof t||s.objectMode||Object.getPrototypeOf(t)===c.prototype||(t=function(e){return c.from(e)}(t)),r)s.endEmitted?C(e,new I):S(e,s,t,!0);else if(s.ended)C(e,new y);else{if(s.destroyed)return!1;s.reading=!1,s.decoder&&!n?(t=s.decoder.write(t),s.objectMode||0!==t.length?S(e,s,t,!1):P(e,s)):S(e,s,t,!1)}else r||(s.reading=!1,P(e,s));return!s.ended&&(s.lengtht.highWaterMark&&(t.highWaterMark=function(e){return e>=k?e=k:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function Q(e){var t=e._readableState;i("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(i("emitReadable",t.flowing),t.emittedReadable=!0,o.nextTick(R,e))}function R(e){var t=e._readableState;i("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,T(e)}function P(e,t){t.readingMore||(t.readingMore=!0,o.nextTick(N,e,t))}function N(e,t){for(;!t.reading&&!t.ended&&(t.length0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function D(e){i("readable nexttick read 0"),e.read(0)}function M(e,t){i("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),T(e),t.flowing&&!t.reading&&e.read(0)}function T(e){var t=e._readableState;for(i("flow",t.flowing);t.flowing&&null!==e.read(););}function U(e,t){return 0===t.length?null:(t.objectMode?n=t.buffer.shift():!e||e>=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):n=t.buffer.consume(e,t.decoder),n);var n}function H(e){var t=e._readableState;i("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,o.nextTick(j,t,e))}function j(e,t){if(i("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var n=t._writableState;(!n||n.autoDestroy&&n.finished)&&t.destroy()}}function J(e,t){for(var n=0,r=e.length;n=t.highWaterMark:t.length>0)||t.ended))return i("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?H(this):Q(this),null;if(0===(e=O(e,t))&&t.ended)return 0===t.length&&H(this),null;var r,o=t.needReadable;return i("need readable",o),(0===t.length||t.length-e0?U(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&H(this)),null!==r&&this.emit("data",r),r},B.prototype._read=function(e){C(this,new b("_read()"))},B.prototype.pipe=function(e,t){var n=this,r=this._readableState;switch(r.pipesCount){case 0:r.pipes=e;break;case 1:r.pipes=[r.pipes,e];break;default:r.pipes.push(e)}r.pipesCount+=1,i("pipe count=%d opts=%j",r.pipesCount,t);var s=t&&!1===t.end||e===o.stdout||e===o.stderr?g:c;function c(){i("onend"),e.end()}r.endEmitted?o.nextTick(s):n.once("end",s),e.on("unpipe",(function t(o,a){i("onunpipe"),o===n&&a&&!1===a.hasUnpiped&&(a.hasUnpiped=!0,i("cleanup"),e.removeListener("close",f),e.removeListener("finish",h),e.removeListener("drain",d),e.removeListener("error",A),e.removeListener("unpipe",t),n.removeListener("end",c),n.removeListener("end",g),n.removeListener("data",l),u=!0,!r.awaitDrain||e._writableState&&!e._writableState.needDrain||d())}));var d=function(e){return function(){var t=e._readableState;i("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&a(e,"data")&&(t.flowing=!0,T(e))}}(n);e.on("drain",d);var u=!1;function l(t){i("ondata");var o=e.write(t);i("dest.write",o),!1===o&&((1===r.pipesCount&&r.pipes===e||r.pipesCount>1&&-1!==J(r.pipes,e))&&!u&&(i("false write response, pause",r.awaitDrain),r.awaitDrain++),n.pause())}function A(t){i("onerror",t),g(),e.removeListener("error",A),0===a(e,"error")&&C(e,t)}function f(){e.removeListener("finish",h),g()}function h(){i("onfinish"),e.removeListener("close",f),g()}function g(){i("unpipe"),n.unpipe(e)}return n.on("data",l),function(e,t,n){if("function"==typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events.error?Array.isArray(e._events.error)?e._events.error.unshift(n):e._events.error=[n,e._events.error]:e.on(t,n)}(e,"error",A),e.once("close",f),e.once("finish",h),e.emit("pipe",n),r.flowing||(i("pipe resume"),n.resume()),e},B.prototype.unpipe=function(e){var t=this._readableState,n={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,n)),this;if(!e){var r=t.pipes,o=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var i=0;i0,!1!==r.flowing&&this.resume()):"readable"===e&&(r.endEmitted||r.readableListening||(r.readableListening=r.needReadable=!0,r.flowing=!1,r.emittedReadable=!1,i("on readable",r.length,r.reading),r.length?Q(this):r.reading||o.nextTick(D,this))),n},B.prototype.addListener=B.prototype.on,B.prototype.removeListener=function(e,t){var n=s.prototype.removeListener.call(this,e,t);return"readable"===e&&o.nextTick(x,this),n},B.prototype.removeAllListeners=function(e){var t=s.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||o.nextTick(x,this),t},B.prototype.resume=function(){var e=this._readableState;return e.flowing||(i("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,o.nextTick(M,e,t))}(this,e)),e.paused=!1,this},B.prototype.pause=function(){return i("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(i("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},B.prototype.wrap=function(e){var t=this,n=this._readableState,r=!1;for(var o in e.on("end",(function(){if(i("wrapped end"),n.decoder&&!n.ended){var e=n.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(o){i("wrapped data"),n.decoder&&(o=n.decoder.write(o)),n.objectMode&&null==o||(n.objectMode||o&&o.length)&&(t.push(o)||(r=!0,e.pause()))})),e)void 0===this[o]&&"function"==typeof e[o]&&(this[o]=function(t){return function(){return e[t].apply(e,arguments)}}(o));for(var a=0;a{"use strict";e.exports=u;var r=n(4281).q,o=r.ERR_METHOD_NOT_IMPLEMENTED,i=r.ERR_MULTIPLE_CALLBACK,a=r.ERR_TRANSFORM_ALREADY_TRANSFORMING,s=r.ERR_TRANSFORM_WITH_LENGTH_0,c=n(6753);function d(e,t){var n=this._transformState;n.transforming=!1;var r=n.writecb;if(null===r)return this.emit("error",new i);n.writechunk=null,n.writecb=null,null!=t&&this.push(t),r(e);var o=this._readableState;o.reading=!1,(o.needReadable||o.length{"use strict";var r,o=n(4155);function i(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,n){var r=e.entry;for(e.entry=null;r;){var o=r.callback;t.pendingcb--,o(undefined),r=r.next}t.corkedRequestsFree.next=e}(t,e)}}e.exports=B,B.WritableState=w;var a,s={deprecate:n(4927)},c=n(222),d=n(8764).Buffer,u=n.g.Uint8Array||function(){},l=n(1195),A=n(2457).getHighWaterMark,f=n(4281).q,h=f.ERR_INVALID_ARG_TYPE,g=f.ERR_METHOD_NOT_IMPLEMENTED,p=f.ERR_MULTIPLE_CALLBACK,m=f.ERR_STREAM_CANNOT_PIPE,v=f.ERR_STREAM_DESTROYED,y=f.ERR_STREAM_NULL_VALUES,b=f.ERR_STREAM_WRITE_AFTER_END,I=f.ERR_UNKNOWN_ENCODING,C=l.errorOrDestroy;function E(){}function w(e,t,a){r=r||n(6753),e=e||{},"boolean"!=typeof a&&(a=t instanceof r),this.objectMode=!!e.objectMode,a&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=A(this,e,"writableHighWaterMark",a),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var s=!1===e.decodeStrings;this.decodeStrings=!s,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var n=e._writableState,r=n.sync,i=n.writecb;if("function"!=typeof i)throw new p;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(n),t)!function(e,t,n,r,i){--t.pendingcb,n?(o.nextTick(i,r),o.nextTick(R,e,t),e._writableState.errorEmitted=!0,C(e,r)):(i(r),e._writableState.errorEmitted=!0,C(e,r),R(e,t))}(e,n,r,t,i);else{var a=O(n)||e.destroyed;a||n.corked||n.bufferProcessing||!n.bufferedRequest||k(e,n),r?o.nextTick(S,e,n,a,i):S(e,n,a,i)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new i(this)}function B(e){var t=this instanceof(r=r||n(6753));if(!t&&!a.call(B,this))return new B(e);this._writableState=new w(e,this,t),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),c.call(this)}function _(e,t,n,r,o,i,a){t.writelen=r,t.writecb=a,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new v("write")):n?e._writev(o,t.onwrite):e._write(o,i,t.onwrite),t.sync=!1}function S(e,t,n,r){n||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,r(),R(e,t)}function k(e,t){t.bufferProcessing=!0;var n=t.bufferedRequest;if(e._writev&&n&&n.next){var r=t.bufferedRequestCount,o=new Array(r),a=t.corkedRequestsFree;a.entry=n;for(var s=0,c=!0;n;)o[s]=n,n.isBuf||(c=!1),n=n.next,s+=1;o.allBuffers=c,_(e,t,!0,t.length,o,"",a.finish),t.pendingcb++,t.lastBufferedRequest=null,a.next?(t.corkedRequestsFree=a.next,a.next=null):t.corkedRequestsFree=new i(t),t.bufferedRequestCount=0}else{for(;n;){var d=n.chunk,u=n.encoding,l=n.callback;if(_(e,t,!1,t.objectMode?1:d.length,d,u,l),n=n.next,t.bufferedRequestCount--,t.writing)break}null===n&&(t.lastBufferedRequest=null)}t.bufferedRequest=n,t.bufferProcessing=!1}function O(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function Q(e,t){e._final((function(n){t.pendingcb--,n&&C(e,n),t.prefinished=!0,e.emit("prefinish"),R(e,t)}))}function R(e,t){var n=O(t);if(n&&(function(e,t){t.prefinished||t.finalCalled||("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.pendingcb++,t.finalCalled=!0,o.nextTick(Q,e,t)))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var r=e._readableState;(!r||r.autoDestroy&&r.endEmitted)&&e.destroy()}return n}n(5717)(B,c),w.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(w.prototype,"buffer",{get:s.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(a=Function.prototype[Symbol.hasInstance],Object.defineProperty(B,Symbol.hasInstance,{value:function(e){return!!a.call(this,e)||this===B&&e&&e._writableState instanceof w}})):a=function(e){return e instanceof this},B.prototype.pipe=function(){C(this,new m)},B.prototype.write=function(e,t,n){var r,i=this._writableState,a=!1,s=!i.objectMode&&(r=e,d.isBuffer(r)||r instanceof u);return s&&!d.isBuffer(e)&&(e=function(e){return d.from(e)}(e)),"function"==typeof t&&(n=t,t=null),s?t="buffer":t||(t=i.defaultEncoding),"function"!=typeof n&&(n=E),i.ending?function(e,t){var n=new b;C(e,n),o.nextTick(t,n)}(this,n):(s||function(e,t,n,r){var i;return null===n?i=new y:"string"==typeof n||t.objectMode||(i=new h("chunk",["string","Buffer"],n)),!i||(C(e,i),o.nextTick(r,i),!1)}(this,i,e,n))&&(i.pendingcb++,a=function(e,t,n,r,o,i){if(!n){var a=function(e,t,n){return e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=d.from(t,n)),t}(t,r,o);r!==a&&(n=!0,o="buffer",r=a)}var s=t.objectMode?1:r.length;t.length+=s;var c=t.length-1))throw new I(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(B.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(B.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),B.prototype._write=function(e,t,n){n(new g("_write()"))},B.prototype._writev=null,B.prototype.end=function(e,t,n){var r=this._writableState;return"function"==typeof e?(n=e,e=null,t=null):"function"==typeof t&&(n=t,t=null),null!=e&&this.write(e,t),r.corked&&(r.corked=1,this.uncork()),r.ending||function(e,t,n){t.ending=!0,R(e,t),n&&(t.finished?o.nextTick(n):e.once("finish",n)),t.ended=!0,e.writable=!1}(this,r,n),this},Object.defineProperty(B.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(B.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),B.prototype.destroy=l.destroy,B.prototype._undestroy=l.undestroy,B.prototype._destroy=function(e,t){t(e)}},1086:(e,t,n)=>{"use strict";var r,o=n(4155);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var a=n(8610),s=Symbol("lastResolve"),c=Symbol("lastReject"),d=Symbol("error"),u=Symbol("ended"),l=Symbol("lastPromise"),A=Symbol("handlePromise"),f=Symbol("stream");function h(e,t){return{value:e,done:t}}function g(e){var t=e[s];if(null!==t){var n=e[f].read();null!==n&&(e[l]=null,e[s]=null,e[c]=null,t(h(n,!1)))}}function p(e){o.nextTick(g,e)}var m=Object.getPrototypeOf((function(){})),v=Object.setPrototypeOf((i(r={get stream(){return this[f]},next:function(){var e=this,t=this[d];if(null!==t)return Promise.reject(t);if(this[u])return Promise.resolve(h(void 0,!0));if(this[f].destroyed)return new Promise((function(t,n){o.nextTick((function(){e[d]?n(e[d]):t(h(void 0,!0))}))}));var n,r=this[l];if(r)n=new Promise(function(e,t){return function(n,r){e.then((function(){t[u]?n(h(void 0,!0)):t[A](n,r)}),r)}}(r,this));else{var i=this[f].read();if(null!==i)return Promise.resolve(h(i,!1));n=new Promise(this[A])}return this[l]=n,n}},Symbol.asyncIterator,(function(){return this})),i(r,"return",(function(){var e=this;return new Promise((function(t,n){e[f].destroy(null,(function(e){e?n(e):t(h(void 0,!0))}))}))})),r),m);e.exports=function(e){var t,n=Object.create(v,(i(t={},f,{value:e,writable:!0}),i(t,s,{value:null,writable:!0}),i(t,c,{value:null,writable:!0}),i(t,d,{value:null,writable:!0}),i(t,u,{value:e._readableState.endEmitted,writable:!0}),i(t,A,{value:function(e,t){var r=n[f].read();r?(n[l]=null,n[s]=null,n[c]=null,e(h(r,!1))):(n[s]=e,n[c]=t)},writable:!0}),t));return n[l]=null,a(e,(function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=n[c];return null!==t&&(n[l]=null,n[s]=null,n[c]=null,t(e)),void(n[d]=e)}var r=n[s];null!==r&&(n[l]=null,n[s]=null,n[c]=null,r(h(void 0,!0))),n[u]=!0})),e.on("readable",p.bind(null,n)),n}},7327:(e,t,n)=>{"use strict";function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){for(var n=0;n0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,n=""+t.data;t=t.next;)n+=e+t.data;return n}},{key:"concat",value:function(e){if(0===this.length)return a.alloc(0);for(var t,n,r,o=a.allocUnsafe(e>>>0),i=this.head,s=0;i;)t=i.data,n=o,r=s,a.prototype.copy.call(t,n,r),s+=i.data.length,i=i.next;return o}},{key:"consume",value:function(e,t){var n;return eo.length?o.length:e;if(i===o.length?r+=o:r+=o.slice(0,e),0==(e-=i)){i===o.length?(++n,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=o.slice(i));break}++n}return this.length-=n,r}},{key:"_getBuffer",value:function(e){var t=a.allocUnsafe(e),n=this.head,r=1;for(n.data.copy(t),e-=n.data.length;n=n.next;){var o=n.data,i=e>o.length?o.length:e;if(o.copy(t,t.length-e,0,i),0==(e-=i)){i===o.length?(++r,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=o.slice(i));break}++r}return this.length-=r,t}},{key:c,value:function(e,t){return s(this,function(e){for(var t=1;t{"use strict";var r=n(4155);function o(e,t){a(e,t),i(e)}function i(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function a(e,t){e.emit("error",t)}e.exports={destroy:function(e,t){var n=this,s=this._readableState&&this._readableState.destroyed,c=this._writableState&&this._writableState.destroyed;return s||c?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,r.nextTick(a,this,e)):r.nextTick(a,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!t&&e?n._writableState?n._writableState.errorEmitted?r.nextTick(i,n):(n._writableState.errorEmitted=!0,r.nextTick(o,n,e)):r.nextTick(o,n,e):t?(r.nextTick(i,n),t(e)):r.nextTick(i,n)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(e,t){var n=e._readableState,r=e._writableState;n&&n.autoDestroy||r&&r.autoDestroy?e.destroy(t):e.emit("error",t)}}},8610:(e,t,n)=>{"use strict";var r=n(4281).q.ERR_STREAM_PREMATURE_CLOSE;function o(){}e.exports=function e(t,n,i){if("function"==typeof n)return e(t,null,n);n||(n={}),i=function(e){var t=!1;return function(){if(!t){t=!0;for(var n=arguments.length,r=new Array(n),o=0;o{e.exports=function(){throw new Error("Readable.from is not available in the browser")}},9946:(e,t,n)=>{"use strict";var r,o=n(4281).q,i=o.ERR_MISSING_ARGS,a=o.ERR_STREAM_DESTROYED;function s(e){if(e)throw e}function c(e,t,o,i){i=function(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}(i);var s=!1;e.on("close",(function(){s=!0})),void 0===r&&(r=n(8610)),r(e,{readable:t,writable:o},(function(e){if(e)return i(e);s=!0,i()}));var c=!1;return function(t){if(!s&&!c)return c=!0,function(e){return e.setHeader&&"function"==typeof e.abort}(e)?e.abort():"function"==typeof e.destroy?e.destroy():void i(t||new a("pipe"))}}function d(e){e()}function u(e,t){return e.pipe(t)}function l(e){return e.length?"function"!=typeof e[e.length-1]?s:e.pop():s}e.exports=function(){for(var e=arguments.length,t=new Array(e),n=0;n0,(function(e){r||(r=e),e&&a.forEach(d),i||(a.forEach(d),o(r))}))}));return t.reduce(u)}},2457:(e,t,n)=>{"use strict";var r=n(4281).q.ERR_INVALID_OPT_VALUE;e.exports={getHighWaterMark:function(e,t,n,o){var i=function(e,t,n){return null!=e.highWaterMark?e.highWaterMark:t?e[n]:null}(t,o,n);if(null!=i){if(!isFinite(i)||Math.floor(i)!==i||i<0)throw new r(o?n:"highWaterMark",i);return Math.floor(i)}return e.objectMode?16:16384}}},222:(e,t,n)=>{e.exports=n(7187).EventEmitter},8473:(e,t,n)=>{(t=e.exports=n(9481)).Stream=t,t.Readable=t,t.Writable=n(4229),t.Duplex=n(6753),t.Transform=n(4605),t.PassThrough=n(2725),t.finished=n(8610),t.pipeline=n(9946)},5666:e=>{var t=function(e){"use strict";var t,n=Object.prototype,r=n.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function c(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,n){return e[t]=n}}function d(e,t,n,r){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),a=new k(r||[]);return i._invoke=function(e,t,n){var r=l;return function(o,i){if(r===f)throw new Error("Generator is already running");if(r===h){if("throw"===o)throw i;return Q()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var s=B(a,n);if(s){if(s===g)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===l)throw r=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=f;var c=u(e,t,n);if("normal"===c.type){if(r=n.done?h:A,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r=h,n.method="throw",n.arg=c.arg)}}}(e,n,a),i}function u(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=d;var l="suspendedStart",A="suspendedYield",f="executing",h="completed",g={};function p(){}function m(){}function v(){}var y={};c(y,i,(function(){return this}));var b=Object.getPrototypeOf,I=b&&b(b(O([])));I&&I!==n&&r.call(I,i)&&(y=I);var C=v.prototype=p.prototype=Object.create(y);function E(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function w(e,t){function n(o,i,a,s){var c=u(e[o],e,i);if("throw"!==c.type){var d=c.arg,l=d.value;return l&&"object"==typeof l&&r.call(l,"__await")?t.resolve(l.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(l).then((function(e){d.value=e,a(d)}),(function(e){return n("throw",e,a,s)}))}s(c.arg)}var o;this._invoke=function(e,r){function i(){return new t((function(t,o){n(e,r,t,o)}))}return o=o?o.then(i,i):i()}}function B(e,n){var r=e.iterator[n.method];if(r===t){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=t,B(e,n),"throw"===n.method))return g;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return g}var o=u(r,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,g;var i=o.arg;return i?i.done?(n[e.resultName]=i.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,g):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,g)}function _(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function S(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function k(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function O(e){if(e){var n=e[i];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function n(){for(;++o=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),d=r.call(a,"finallyLoc");if(c&&d){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),S(n),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;S(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:O(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),g}},e}(e.exports);try{regeneratorRuntime=t}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=t:Function("r","regeneratorRuntime = r")(t)}},9785:(e,t,n)=>{"use strict";var r=n(8764).Buffer,o=n(5717),i=n(3349),a=new Array(16),s=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],c=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],d=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],u=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],l=[0,1518500249,1859775393,2400959708,2840853838],A=[1352829926,1548603684,1836072691,2053994217,0];function f(){i.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function h(e,t){return e<>>32-t}function g(e,t,n,r,o,i,a,s){return h(e+(t^n^r)+i+a|0,s)+o|0}function p(e,t,n,r,o,i,a,s){return h(e+(t&n|~t&r)+i+a|0,s)+o|0}function m(e,t,n,r,o,i,a,s){return h(e+((t|~n)^r)+i+a|0,s)+o|0}function v(e,t,n,r,o,i,a,s){return h(e+(t&r|n&~r)+i+a|0,s)+o|0}function y(e,t,n,r,o,i,a,s){return h(e+(t^(n|~r))+i+a|0,s)+o|0}o(f,i),f.prototype._update=function(){for(var e=a,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);for(var n=0|this._a,r=0|this._b,o=0|this._c,i=0|this._d,f=0|this._e,b=0|this._a,I=0|this._b,C=0|this._c,E=0|this._d,w=0|this._e,B=0;B<80;B+=1){var _,S;B<16?(_=g(n,r,o,i,f,e[s[B]],l[0],d[B]),S=y(b,I,C,E,w,e[c[B]],A[0],u[B])):B<32?(_=p(n,r,o,i,f,e[s[B]],l[1],d[B]),S=v(b,I,C,E,w,e[c[B]],A[1],u[B])):B<48?(_=m(n,r,o,i,f,e[s[B]],l[2],d[B]),S=m(b,I,C,E,w,e[c[B]],A[2],u[B])):B<64?(_=v(n,r,o,i,f,e[s[B]],l[3],d[B]),S=p(b,I,C,E,w,e[c[B]],A[3],u[B])):(_=y(n,r,o,i,f,e[s[B]],l[4],d[B]),S=g(b,I,C,E,w,e[c[B]],A[4],u[B])),n=f,f=i,i=h(o,10),o=r,r=_,b=w,w=E,E=h(C,10),C=I,I=S}var k=this._b+o+E|0;this._b=this._c+i+w|0,this._c=this._d+f+b|0,this._d=this._e+n+I|0,this._e=this._a+r+C|0,this._a=k},f.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=r.alloc?r.alloc(20):new r(20);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e.writeInt32LE(this._e,16),e},e.exports=f},9509:(e,t,n)=>{var r=n(8764),o=r.Buffer;function i(e,t){for(var n in e)t[n]=e[n]}function a(e,t,n){return o(e,t,n)}o.from&&o.alloc&&o.allocUnsafe&&o.allocUnsafeSlow?e.exports=r:(i(r,t),t.Buffer=a),a.prototype=Object.create(o.prototype),i(o,a),a.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return o(e,t,n)},a.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var r=o(e);return void 0!==t?"string"==typeof n?r.fill(t,n):r.fill(t):r.fill(0),r},a.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return o(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}},2257:(e,t,n)=>{const r=Symbol("SemVer ANY");class o{static get ANY(){return r}constructor(e,t){if(t=i(t),e instanceof o){if(e.loose===!!t.loose)return e;e=e.value}d("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===r?this.value="":this.value=this.operator+this.semver.version,d("comp",this)}parse(e){const t=this.options.loose?a[s.COMPARATORLOOSE]:a[s.COMPARATOR],n=e.match(t);if(!n)throw new TypeError(`Invalid comparator: ${e}`);this.operator=void 0!==n[1]?n[1]:"","="===this.operator&&(this.operator=""),n[2]?this.semver=new u(n[2],this.options.loose):this.semver=r}toString(){return this.value}test(e){if(d("Comparator.test",e,this.options.loose),this.semver===r||e===r)return!0;if("string"==typeof e)try{e=new u(e,this.options)}catch(e){return!1}return c(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof o))throw new TypeError("a Comparator is required");if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),""===this.operator)return""===this.value||new l(e.value,t).test(this.value);if(""===e.operator)return""===e.value||new l(this.value,t).test(e.semver);const n=!(">="!==this.operator&&">"!==this.operator||">="!==e.operator&&">"!==e.operator),r=!("<="!==this.operator&&"<"!==this.operator||"<="!==e.operator&&"<"!==e.operator),i=this.semver.version===e.semver.version,a=!(">="!==this.operator&&"<="!==this.operator||">="!==e.operator&&"<="!==e.operator),s=c(this.semver,"<",e.semver,t)&&(">="===this.operator||">"===this.operator)&&("<="===e.operator||"<"===e.operator),d=c(this.semver,">",e.semver,t)&&("<="===this.operator||"<"===this.operator)&&(">="===e.operator||">"===e.operator);return n||r||i&&a||s||d}}e.exports=o;const i=n(2893),{re:a,t:s}=n(5765),c=n(7539),d=n(4225),u=n(6376),l=n(6902)},6902:(e,t,n)=>{class r{constructor(e,t){if(t=i(t),e instanceof r)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new r(e.raw,t);if(e instanceof a)return this.raw=e.value,this.set=[[e]],this.format(),this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e,this.set=e.split(/\s*\|\|\s*/).map((e=>this.parseRange(e.trim()))).filter((e=>e.length)),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${e}`);if(this.set.length>1){const e=this.set[0];if(this.set=this.set.filter((e=>!h(e[0]))),0===this.set.length)this.set=[e];else if(this.set.length>1)for(const e of this.set)if(1===e.length&&g(e[0])){this.set=[e];break}}this.format()}format(){return this.range=this.set.map((e=>e.join(" ").trim())).join("||").trim(),this.range}toString(){return this.range}parseRange(e){e=e.trim();const t=`parseRange:${Object.keys(this.options).join(",")}:${e}`,n=o.get(t);if(n)return n;const r=this.options.loose,i=r?d[u.HYPHENRANGELOOSE]:d[u.HYPHENRANGE];e=e.replace(i,S(this.options.includePrerelease)),s("hyphen replace",e),e=e.replace(d[u.COMPARATORTRIM],l),s("comparator trim",e,d[u.COMPARATORTRIM]),e=(e=(e=e.replace(d[u.TILDETRIM],A)).replace(d[u.CARETTRIM],f)).split(/\s+/).join(" ");const c=r?d[u.COMPARATORLOOSE]:d[u.COMPARATOR],g=e.split(" ").map((e=>m(e,this.options))).join(" ").split(/\s+/).map((e=>_(e,this.options))).filter(this.options.loose?e=>!!e.match(c):()=>!0).map((e=>new a(e,this.options))),p=(g.length,new Map);for(const e of g){if(h(e))return[e];p.set(e.value,e)}p.size>1&&p.has("")&&p.delete("");const v=[...p.values()];return o.set(t,v),v}intersects(e,t){if(!(e instanceof r))throw new TypeError("a Range is required");return this.set.some((n=>p(n,t)&&e.set.some((e=>p(e,t)&&n.every((n=>e.every((e=>n.intersects(e,t)))))))))}test(e){if(!e)return!1;if("string"==typeof e)try{e=new c(e,this.options)}catch(e){return!1}for(let t=0;t"<0.0.0-0"===e.value,g=e=>""===e.value,p=(e,t)=>{let n=!0;const r=e.slice();let o=r.pop();for(;n&&r.length;)n=r.every((e=>o.intersects(e,t))),o=r.pop();return n},m=(e,t)=>(s("comp",e,t),e=I(e,t),s("caret",e),e=y(e,t),s("tildes",e),e=E(e,t),s("xrange",e),e=B(e,t),s("stars",e),e),v=e=>!e||"x"===e.toLowerCase()||"*"===e,y=(e,t)=>e.trim().split(/\s+/).map((e=>b(e,t))).join(" "),b=(e,t)=>{const n=t.loose?d[u.TILDELOOSE]:d[u.TILDE];return e.replace(n,((t,n,r,o,i)=>{let a;return s("tilde",e,t,n,r,o,i),v(n)?a="":v(r)?a=`>=${n}.0.0 <${+n+1}.0.0-0`:v(o)?a=`>=${n}.${r}.0 <${n}.${+r+1}.0-0`:i?(s("replaceTilde pr",i),a=`>=${n}.${r}.${o}-${i} <${n}.${+r+1}.0-0`):a=`>=${n}.${r}.${o} <${n}.${+r+1}.0-0`,s("tilde return",a),a}))},I=(e,t)=>e.trim().split(/\s+/).map((e=>C(e,t))).join(" "),C=(e,t)=>{s("caret",e,t);const n=t.loose?d[u.CARETLOOSE]:d[u.CARET],r=t.includePrerelease?"-0":"";return e.replace(n,((t,n,o,i,a)=>{let c;return s("caret",e,t,n,o,i,a),v(n)?c="":v(o)?c=`>=${n}.0.0${r} <${+n+1}.0.0-0`:v(i)?c="0"===n?`>=${n}.${o}.0${r} <${n}.${+o+1}.0-0`:`>=${n}.${o}.0${r} <${+n+1}.0.0-0`:a?(s("replaceCaret pr",a),c="0"===n?"0"===o?`>=${n}.${o}.${i}-${a} <${n}.${o}.${+i+1}-0`:`>=${n}.${o}.${i}-${a} <${n}.${+o+1}.0-0`:`>=${n}.${o}.${i}-${a} <${+n+1}.0.0-0`):(s("no pr"),c="0"===n?"0"===o?`>=${n}.${o}.${i}${r} <${n}.${o}.${+i+1}-0`:`>=${n}.${o}.${i}${r} <${n}.${+o+1}.0-0`:`>=${n}.${o}.${i} <${+n+1}.0.0-0`),s("caret return",c),c}))},E=(e,t)=>(s("replaceXRanges",e,t),e.split(/\s+/).map((e=>w(e,t))).join(" ")),w=(e,t)=>{e=e.trim();const n=t.loose?d[u.XRANGELOOSE]:d[u.XRANGE];return e.replace(n,((n,r,o,i,a,c)=>{s("xRange",e,n,r,o,i,a,c);const d=v(o),u=d||v(i),l=u||v(a),A=l;return"="===r&&A&&(r=""),c=t.includePrerelease?"-0":"",d?n=">"===r||"<"===r?"<0.0.0-0":"*":r&&A?(u&&(i=0),a=0,">"===r?(r=">=",u?(o=+o+1,i=0,a=0):(i=+i+1,a=0)):"<="===r&&(r="<",u?o=+o+1:i=+i+1),"<"===r&&(c="-0"),n=`${r+o}.${i}.${a}${c}`):u?n=`>=${o}.0.0${c} <${+o+1}.0.0-0`:l&&(n=`>=${o}.${i}.0${c} <${o}.${+i+1}.0-0`),s("xRange return",n),n}))},B=(e,t)=>(s("replaceStars",e,t),e.trim().replace(d[u.STAR],"")),_=(e,t)=>(s("replaceGTE0",e,t),e.trim().replace(d[t.includePrerelease?u.GTE0PRE:u.GTE0],"")),S=e=>(t,n,r,o,i,a,s,c,d,u,l,A,f)=>`${n=v(r)?"":v(o)?`>=${r}.0.0${e?"-0":""}`:v(i)?`>=${r}.${o}.0${e?"-0":""}`:a?`>=${n}`:`>=${n}${e?"-0":""}`} ${c=v(d)?"":v(u)?`<${+d+1}.0.0-0`:v(l)?`<${d}.${+u+1}.0-0`:A?`<=${d}.${u}.${l}-${A}`:e?`<${d}.${u}.${+l+1}-0`:`<=${c}`}`.trim(),k=(e,t,n)=>{for(let n=0;n0){const r=e[n].semver;if(r.major===t.major&&r.minor===t.minor&&r.patch===t.patch)return!0}return!1}return!0}},6376:(e,t,n)=>{const r=n(4225),{MAX_LENGTH:o,MAX_SAFE_INTEGER:i}=n(3295),{re:a,t:s}=n(5765),c=n(2893),{compareIdentifiers:d}=n(6742);class u{constructor(e,t){if(t=c(t),e instanceof u){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if("string"!=typeof e)throw new TypeError(`Invalid Version: ${e}`);if(e.length>o)throw new TypeError(`version is longer than ${o} characters`);r("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;const n=e.trim().match(t.loose?a[s.LOOSE]:a[s.FULL]);if(!n)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+n[1],this.minor=+n[2],this.patch=+n[3],this.major>i||this.major<0)throw new TypeError("Invalid major version");if(this.minor>i||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>i||this.patch<0)throw new TypeError("Invalid patch version");n[4]?this.prerelease=n[4].split(".").map((e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t=0;)"number"==typeof this.prerelease[e]&&(this.prerelease[e]++,e=-2);-1===e&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error(`invalid increment argument: ${e}`)}return this.format(),this.raw=this.version,this}}e.exports=u},3507:(e,t,n)=>{const r=n(3959);e.exports=(e,t)=>{const n=r(e.trim().replace(/^[=v]+/,""),t);return n?n.version:null}},7539:(e,t,n)=>{const r=n(8718),o=n(1194),i=n(1312),a=n(5903),s=n(1544),c=n(2056);e.exports=(e,t,n,d)=>{switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e===n;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e!==n;case"":case"=":case"==":return r(e,n,d);case"!=":return o(e,n,d);case">":return i(e,n,d);case">=":return a(e,n,d);case"<":return s(e,n,d);case"<=":return c(e,n,d);default:throw new TypeError(`Invalid operator: ${t}`)}}},9038:(e,t,n)=>{const r=n(6376),o=n(3959),{re:i,t:a}=n(5765);e.exports=(e,t)=>{if(e instanceof r)return e;if("number"==typeof e&&(e=String(e)),"string"!=typeof e)return null;let n=null;if((t=t||{}).rtl){let t;for(;(t=i[a.COERCERTL].exec(e))&&(!n||n.index+n[0].length!==e.length);)n&&t.index+t[0].length===n.index+n[0].length||(n=t),i[a.COERCERTL].lastIndex=t.index+t[1].length+t[2].length;i[a.COERCERTL].lastIndex=-1}else n=e.match(i[a.COERCE]);return null===n?null:o(`${n[2]}.${n[3]||"0"}.${n[4]||"0"}`,t)}},8880:(e,t,n)=>{const r=n(6376);e.exports=(e,t,n)=>{const o=new r(e,n),i=new r(t,n);return o.compare(i)||o.compareBuild(i)}},7880:(e,t,n)=>{const r=n(6269);e.exports=(e,t)=>r(e,t,!0)},6269:(e,t,n)=>{const r=n(6376);e.exports=(e,t,n)=>new r(e,n).compare(new r(t,n))},2378:(e,t,n)=>{const r=n(3959),o=n(8718);e.exports=(e,t)=>{if(o(e,t))return null;{const n=r(e),o=r(t),i=n.prerelease.length||o.prerelease.length,a=i?"pre":"",s=i?"prerelease":"";for(const e in n)if(("major"===e||"minor"===e||"patch"===e)&&n[e]!==o[e])return a+e;return s}}},8718:(e,t,n)=>{const r=n(6269);e.exports=(e,t,n)=>0===r(e,t,n)},1312:(e,t,n)=>{const r=n(6269);e.exports=(e,t,n)=>r(e,t,n)>0},5903:(e,t,n)=>{const r=n(6269);e.exports=(e,t,n)=>r(e,t,n)>=0},253:(e,t,n)=>{const r=n(6376);e.exports=(e,t,n,o)=>{"string"==typeof n&&(o=n,n=void 0);try{return new r(e,n).inc(t,o).version}catch(e){return null}}},1544:(e,t,n)=>{const r=n(6269);e.exports=(e,t,n)=>r(e,t,n)<0},2056:(e,t,n)=>{const r=n(6269);e.exports=(e,t,n)=>r(e,t,n)<=0},8679:(e,t,n)=>{const r=n(6376);e.exports=(e,t)=>new r(e,t).major},7789:(e,t,n)=>{const r=n(6376);e.exports=(e,t)=>new r(e,t).minor},1194:(e,t,n)=>{const r=n(6269);e.exports=(e,t,n)=>0!==r(e,t,n)},3959:(e,t,n)=>{const{MAX_LENGTH:r}=n(3295),{re:o,t:i}=n(5765),a=n(6376),s=n(2893);e.exports=(e,t)=>{if(t=s(t),e instanceof a)return e;if("string"!=typeof e)return null;if(e.length>r)return null;if(!(t.loose?o[i.LOOSE]:o[i.FULL]).test(e))return null;try{return new a(e,t)}catch(e){return null}}},2358:(e,t,n)=>{const r=n(6376);e.exports=(e,t)=>new r(e,t).patch},7559:(e,t,n)=>{const r=n(3959);e.exports=(e,t)=>{const n=r(e,t);return n&&n.prerelease.length?n.prerelease:null}},9795:(e,t,n)=>{const r=n(6269);e.exports=(e,t,n)=>r(t,e,n)},3657:(e,t,n)=>{const r=n(8880);e.exports=(e,t)=>e.sort(((e,n)=>r(n,e,t)))},5712:(e,t,n)=>{const r=n(6902);e.exports=(e,t,n)=>{try{t=new r(t,n)}catch(e){return!1}return t.test(e)}},1100:(e,t,n)=>{const r=n(8880);e.exports=(e,t)=>e.sort(((e,n)=>r(e,n,t)))},6397:(e,t,n)=>{const r=n(3959);e.exports=(e,t)=>{const n=r(e,t);return n?n.version:null}},1249:(e,t,n)=>{const r=n(5765);e.exports={re:r.re,src:r.src,tokens:r.t,SEMVER_SPEC_VERSION:n(3295).SEMVER_SPEC_VERSION,SemVer:n(6376),compareIdentifiers:n(6742).compareIdentifiers,rcompareIdentifiers:n(6742).rcompareIdentifiers,parse:n(3959),valid:n(6397),clean:n(3507),inc:n(253),diff:n(2378),major:n(8679),minor:n(7789),patch:n(2358),prerelease:n(7559),compare:n(6269),rcompare:n(9795),compareLoose:n(7880),compareBuild:n(8880),sort:n(1100),rsort:n(3657),gt:n(1312),lt:n(1544),eq:n(8718),neq:n(1194),gte:n(5903),lte:n(2056),cmp:n(7539),coerce:n(9038),Comparator:n(2257),Range:n(6902),satisfies:n(5712),toComparators:n(1042),maxSatisfying:n(5775),minSatisfying:n(1657),minVersion:n(5316),validRange:n(9042),outside:n(6826),gtr:n(9118),ltr:n(32),intersects:n(2937),simplifyRange:n(7908),subset:n(2691)}},3295:e=>{const t=Number.MAX_SAFE_INTEGER||9007199254740991;e.exports={SEMVER_SPEC_VERSION:"2.0.0",MAX_LENGTH:256,MAX_SAFE_INTEGER:t,MAX_SAFE_COMPONENT_LENGTH:16}},4225:(e,t,n)=>{var r=n(4155);const o="object"==typeof r&&r.env&&r.env.NODE_DEBUG&&/\bsemver\b/i.test(r.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};e.exports=o},6742:e=>{const t=/^[0-9]+$/,n=(e,n)=>{const r=t.test(e),o=t.test(n);return r&&o&&(e=+e,n=+n),e===n?0:r&&!o?-1:o&&!r?1:en(t,e)}},2893:e=>{const t=["includePrerelease","loose","rtl"];e.exports=e=>e?"object"!=typeof e?{loose:!0}:t.filter((t=>e[t])).reduce(((e,t)=>(e[t]=!0,e)),{}):{}},5765:(e,t,n)=>{const{MAX_SAFE_COMPONENT_LENGTH:r}=n(3295),o=n(4225),i=(t=e.exports={}).re=[],a=t.src=[],s=t.t={};let c=0;const d=(e,t,n)=>{const r=c++;o(r,t),s[e]=r,a[r]=t,i[r]=new RegExp(t,n?"g":void 0)};d("NUMERICIDENTIFIER","0|[1-9]\\d*"),d("NUMERICIDENTIFIERLOOSE","[0-9]+"),d("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*"),d("MAINVERSION",`(${a[s.NUMERICIDENTIFIER]})\\.(${a[s.NUMERICIDENTIFIER]})\\.(${a[s.NUMERICIDENTIFIER]})`),d("MAINVERSIONLOOSE",`(${a[s.NUMERICIDENTIFIERLOOSE]})\\.(${a[s.NUMERICIDENTIFIERLOOSE]})\\.(${a[s.NUMERICIDENTIFIERLOOSE]})`),d("PRERELEASEIDENTIFIER",`(?:${a[s.NUMERICIDENTIFIER]}|${a[s.NONNUMERICIDENTIFIER]})`),d("PRERELEASEIDENTIFIERLOOSE",`(?:${a[s.NUMERICIDENTIFIERLOOSE]}|${a[s.NONNUMERICIDENTIFIER]})`),d("PRERELEASE",`(?:-(${a[s.PRERELEASEIDENTIFIER]}(?:\\.${a[s.PRERELEASEIDENTIFIER]})*))`),d("PRERELEASELOOSE",`(?:-?(${a[s.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${a[s.PRERELEASEIDENTIFIERLOOSE]})*))`),d("BUILDIDENTIFIER","[0-9A-Za-z-]+"),d("BUILD",`(?:\\+(${a[s.BUILDIDENTIFIER]}(?:\\.${a[s.BUILDIDENTIFIER]})*))`),d("FULLPLAIN",`v?${a[s.MAINVERSION]}${a[s.PRERELEASE]}?${a[s.BUILD]}?`),d("FULL",`^${a[s.FULLPLAIN]}$`),d("LOOSEPLAIN",`[v=\\s]*${a[s.MAINVERSIONLOOSE]}${a[s.PRERELEASELOOSE]}?${a[s.BUILD]}?`),d("LOOSE",`^${a[s.LOOSEPLAIN]}$`),d("GTLT","((?:<|>)?=?)"),d("XRANGEIDENTIFIERLOOSE",`${a[s.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),d("XRANGEIDENTIFIER",`${a[s.NUMERICIDENTIFIER]}|x|X|\\*`),d("XRANGEPLAIN",`[v=\\s]*(${a[s.XRANGEIDENTIFIER]})(?:\\.(${a[s.XRANGEIDENTIFIER]})(?:\\.(${a[s.XRANGEIDENTIFIER]})(?:${a[s.PRERELEASE]})?${a[s.BUILD]}?)?)?`),d("XRANGEPLAINLOOSE",`[v=\\s]*(${a[s.XRANGEIDENTIFIERLOOSE]})(?:\\.(${a[s.XRANGEIDENTIFIERLOOSE]})(?:\\.(${a[s.XRANGEIDENTIFIERLOOSE]})(?:${a[s.PRERELEASELOOSE]})?${a[s.BUILD]}?)?)?`),d("XRANGE",`^${a[s.GTLT]}\\s*${a[s.XRANGEPLAIN]}$`),d("XRANGELOOSE",`^${a[s.GTLT]}\\s*${a[s.XRANGEPLAINLOOSE]}$`),d("COERCE",`(^|[^\\d])(\\d{1,${r}})(?:\\.(\\d{1,${r}}))?(?:\\.(\\d{1,${r}}))?(?:$|[^\\d])`),d("COERCERTL",a[s.COERCE],!0),d("LONETILDE","(?:~>?)"),d("TILDETRIM",`(\\s*)${a[s.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",d("TILDE",`^${a[s.LONETILDE]}${a[s.XRANGEPLAIN]}$`),d("TILDELOOSE",`^${a[s.LONETILDE]}${a[s.XRANGEPLAINLOOSE]}$`),d("LONECARET","(?:\\^)"),d("CARETTRIM",`(\\s*)${a[s.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",d("CARET",`^${a[s.LONECARET]}${a[s.XRANGEPLAIN]}$`),d("CARETLOOSE",`^${a[s.LONECARET]}${a[s.XRANGEPLAINLOOSE]}$`),d("COMPARATORLOOSE",`^${a[s.GTLT]}\\s*(${a[s.LOOSEPLAIN]})$|^$`),d("COMPARATOR",`^${a[s.GTLT]}\\s*(${a[s.FULLPLAIN]})$|^$`),d("COMPARATORTRIM",`(\\s*)${a[s.GTLT]}\\s*(${a[s.LOOSEPLAIN]}|${a[s.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",d("HYPHENRANGE",`^\\s*(${a[s.XRANGEPLAIN]})\\s+-\\s+(${a[s.XRANGEPLAIN]})\\s*$`),d("HYPHENRANGELOOSE",`^\\s*(${a[s.XRANGEPLAINLOOSE]})\\s+-\\s+(${a[s.XRANGEPLAINLOOSE]})\\s*$`),d("STAR","(<|>)?=?\\s*\\*"),d("GTE0","^\\s*>=\\s*0.0.0\\s*$"),d("GTE0PRE","^\\s*>=\\s*0.0.0-0\\s*$")},9118:(e,t,n)=>{const r=n(6826);e.exports=(e,t,n)=>r(e,t,">",n)},2937:(e,t,n)=>{const r=n(6902);e.exports=(e,t,n)=>(e=new r(e,n),t=new r(t,n),e.intersects(t))},32:(e,t,n)=>{const r=n(6826);e.exports=(e,t,n)=>r(e,t,"<",n)},5775:(e,t,n)=>{const r=n(6376),o=n(6902);e.exports=(e,t,n)=>{let i=null,a=null,s=null;try{s=new o(t,n)}catch(e){return null}return e.forEach((e=>{s.test(e)&&(i&&-1!==a.compare(e)||(i=e,a=new r(i,n)))})),i}},1657:(e,t,n)=>{const r=n(6376),o=n(6902);e.exports=(e,t,n)=>{let i=null,a=null,s=null;try{s=new o(t,n)}catch(e){return null}return e.forEach((e=>{s.test(e)&&(i&&1!==a.compare(e)||(i=e,a=new r(i,n)))})),i}},5316:(e,t,n)=>{const r=n(6376),o=n(6902),i=n(1312);e.exports=(e,t)=>{e=new o(e,t);let n=new r("0.0.0");if(e.test(n))return n;if(n=new r("0.0.0-0"),e.test(n))return n;n=null;for(let t=0;t{const t=new r(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":a&&!i(t,a)||(a=t);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${e.operator}`)}})),!a||n&&!i(n,a)||(n=a)}return n&&e.test(n)?n:null}},6826:(e,t,n)=>{const r=n(6376),o=n(2257),{ANY:i}=o,a=n(6902),s=n(5712),c=n(1312),d=n(1544),u=n(2056),l=n(5903);e.exports=(e,t,n,A)=>{let f,h,g,p,m;switch(e=new r(e,A),t=new a(t,A),n){case">":f=c,h=u,g=d,p=">",m=">=";break;case"<":f=d,h=l,g=c,p="<",m="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(s(e,t,A))return!1;for(let n=0;n{e.semver===i&&(e=new o(">=0.0.0")),a=a||e,s=s||e,f(e.semver,a.semver,A)?a=e:g(e.semver,s.semver,A)&&(s=e)})),a.operator===p||a.operator===m)return!1;if((!s.operator||s.operator===p)&&h(e,s.semver))return!1;if(s.operator===m&&g(e,s.semver))return!1}return!0}},7908:(e,t,n)=>{const r=n(5712),o=n(6269);e.exports=(e,t,n)=>{const i=[];let a=null,s=null;const c=e.sort(((e,t)=>o(e,t,n)));for(const e of c)r(e,t,n)?(s=e,a||(a=e)):(s&&i.push([a,s]),s=null,a=null);a&&i.push([a,null]);const d=[];for(const[e,t]of i)e===t?d.push(e):t||e!==c[0]?t?e===c[0]?d.push(`<=${t}`):d.push(`${e} - ${t}`):d.push(`>=${e}`):d.push("*");const u=d.join(" || "),l="string"==typeof t.raw?t.raw:String(t);return u.length{const r=n(6902),o=n(2257),{ANY:i}=o,a=n(5712),s=n(6269),c=(e,t,n)=>{if(e===t)return!0;if(1===e.length&&e[0].semver===i){if(1===t.length&&t[0].semver===i)return!0;e=n.includePrerelease?[new o(">=0.0.0-0")]:[new o(">=0.0.0")]}if(1===t.length&&t[0].semver===i){if(n.includePrerelease)return!0;t=[new o(">=0.0.0")]}const r=new Set;let c,l,A,f,h,g,p;for(const t of e)">"===t.operator||">="===t.operator?c=d(c,t,n):"<"===t.operator||"<="===t.operator?l=u(l,t,n):r.add(t.semver);if(r.size>1)return null;if(c&&l){if(A=s(c.semver,l.semver,n),A>0)return null;if(0===A&&(">="!==c.operator||"<="!==l.operator))return null}for(const e of r){if(c&&!a(e,String(c),n))return null;if(l&&!a(e,String(l),n))return null;for(const r of t)if(!a(e,String(r),n))return!1;return!0}let m=!(!l||n.includePrerelease||!l.semver.prerelease.length)&&l.semver,v=!(!c||n.includePrerelease||!c.semver.prerelease.length)&&c.semver;m&&1===m.prerelease.length&&"<"===l.operator&&0===m.prerelease[0]&&(m=!1);for(const e of t){if(p=p||">"===e.operator||">="===e.operator,g=g||"<"===e.operator||"<="===e.operator,c)if(v&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===v.major&&e.semver.minor===v.minor&&e.semver.patch===v.patch&&(v=!1),">"===e.operator||">="===e.operator){if(f=d(c,e,n),f===e&&f!==c)return!1}else if(">="===c.operator&&!a(c.semver,String(e),n))return!1;if(l)if(m&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===m.major&&e.semver.minor===m.minor&&e.semver.patch===m.patch&&(m=!1),"<"===e.operator||"<="===e.operator){if(h=u(l,e,n),h===e&&h!==l)return!1}else if("<="===l.operator&&!a(l.semver,String(e),n))return!1;if(!e.operator&&(l||c)&&0!==A)return!1}return!(c&&g&&!l&&0!==A||l&&p&&!c&&0!==A||v||m)},d=(e,t,n)=>{if(!e)return t;const r=s(e.semver,t.semver,n);return r>0?e:r<0||">"===t.operator&&">="===e.operator?t:e},u=(e,t,n)=>{if(!e)return t;const r=s(e.semver,t.semver,n);return r<0?e:r>0||"<"===t.operator&&"<="===e.operator?t:e};e.exports=(e,t,n={})=>{if(e===t)return!0;e=new r(e,n),t=new r(t,n);let o=!1;e:for(const r of e.set){for(const e of t.set){const t=c(r,e,n);if(o=o||null!==t,t)continue e}if(o)return!1}return!0}},1042:(e,t,n)=>{const r=n(6902);e.exports=(e,t)=>new r(e,t).set.map((e=>e.map((e=>e.value)).join(" ").trim().split(" ")))},9042:(e,t,n)=>{const r=n(6902);e.exports=(e,t)=>{try{return new r(e,t).range||"*"}catch(e){return null}}},2553:(e,t,n)=>{"use strict";var r=n(9509).Buffer,o=r.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function i(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(r.isEncoding===o||!o(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=c,this.end=d,t=4;break;case"utf8":this.fillLast=s,t=4;break;case"base64":this.text=u,this.end=l,t=3;break;default:return this.write=A,void(this.end=f)}this.lastNeed=0,this.lastTotal=0,this.lastChar=r.allocUnsafe(t)}function a(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function s(e){var t=this.lastTotal-this.lastNeed,n=function(e,t,n){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==n?n:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function c(e,t){if((e.length-t)%2==0){var n=e.toString("utf16le",t);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function d(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,n)}return t}function u(e,t){var n=(e.length-t)%3;return 0===n?e.toString("base64",t):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-n))}function l(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function A(e){return e.toString(this.encoding)}function f(e){return e&&e.length?this.write(e):""}t.s=i,i.prototype.write=function(e){if(0===e.length)return"";var t,n;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n=0?(o>0&&(e.lastNeed=o-1),o):--r=0?(o>0&&(e.lastNeed=o-2),o):--r=0?(o>0&&(2===o?o=0:e.lastNeed=o-3),o):0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=n;var r=e.length-(n-this.lastNeed);return e.copy(this.lastChar,0,r),e.toString("utf8",t,r)},i.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},1839:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n=e.Symbol;if("function"==typeof n)if(n.observable)t=n.observable;else{t=n.for("https://github.com/benlesh/symbol-observable");try{n.observable=t}catch(e){}}else t="@@observable";return t}},868:(e,t,n)=>{e.exports=n(1839)},6910:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeSignDoc=t.Secp256k1Wallet=t.Secp256k1HdWallet=t.rawSecp256k1PubkeyToRawAddress=t.pubkeyType=t.pubkeyToRawAddress=t.pubkeyToAddress=t.parseCoins=t.makeStdTx=t.makeSignDoc=t.makeCosmoshubPath=t.isStdTx=t.isSinglePubkey=t.isSecp256k1Pubkey=t.encodeSecp256k1Signature=t.encodeSecp256k1Pubkey=t.encodeBech32Pubkey=t.encodeAminoPubkey=t.decodeSignature=t.decodeBech32Pubkey=t.decodeAminoPubkey=t.coins=t.coin=void 0;var r=n(3359);Object.defineProperty(t,"coin",{enumerable:!0,get:function(){return r.coin}}),Object.defineProperty(t,"coins",{enumerable:!0,get:function(){return r.coins}}),Object.defineProperty(t,"decodeAminoPubkey",{enumerable:!0,get:function(){return r.decodeAminoPubkey}}),Object.defineProperty(t,"decodeBech32Pubkey",{enumerable:!0,get:function(){return r.decodeBech32Pubkey}}),Object.defineProperty(t,"decodeSignature",{enumerable:!0,get:function(){return r.decodeSignature}}),Object.defineProperty(t,"encodeAminoPubkey",{enumerable:!0,get:function(){return r.encodeAminoPubkey}}),Object.defineProperty(t,"encodeBech32Pubkey",{enumerable:!0,get:function(){return r.encodeBech32Pubkey}}),Object.defineProperty(t,"encodeSecp256k1Pubkey",{enumerable:!0,get:function(){return r.encodeSecp256k1Pubkey}}),Object.defineProperty(t,"encodeSecp256k1Signature",{enumerable:!0,get:function(){return r.encodeSecp256k1Signature}}),Object.defineProperty(t,"isSecp256k1Pubkey",{enumerable:!0,get:function(){return r.isSecp256k1Pubkey}}),Object.defineProperty(t,"isSinglePubkey",{enumerable:!0,get:function(){return r.isSinglePubkey}}),Object.defineProperty(t,"isStdTx",{enumerable:!0,get:function(){return r.isStdTx}}),Object.defineProperty(t,"makeCosmoshubPath",{enumerable:!0,get:function(){return r.makeCosmoshubPath}}),Object.defineProperty(t,"makeSignDoc",{enumerable:!0,get:function(){return r.makeSignDoc}}),Object.defineProperty(t,"makeStdTx",{enumerable:!0,get:function(){return r.makeStdTx}}),Object.defineProperty(t,"parseCoins",{enumerable:!0,get:function(){return r.parseCoins}}),Object.defineProperty(t,"pubkeyToAddress",{enumerable:!0,get:function(){return r.pubkeyToAddress}}),Object.defineProperty(t,"pubkeyToRawAddress",{enumerable:!0,get:function(){return r.pubkeyToRawAddress}}),Object.defineProperty(t,"pubkeyType",{enumerable:!0,get:function(){return r.pubkeyType}}),Object.defineProperty(t,"rawSecp256k1PubkeyToRawAddress",{enumerable:!0,get:function(){return r.rawSecp256k1PubkeyToRawAddress}}),Object.defineProperty(t,"Secp256k1HdWallet",{enumerable:!0,get:function(){return r.Secp256k1HdWallet}}),Object.defineProperty(t,"Secp256k1Wallet",{enumerable:!0,get:function(){return r.Secp256k1Wallet}}),Object.defineProperty(t,"serializeSignDoc",{enumerable:!0,get:function(){return r.serializeSignDoc}})},3685:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toBinary=t.SigningCosmWasmClient=t.fromBinary=t.CosmWasmClient=void 0;var r=n(4926);Object.defineProperty(t,"CosmWasmClient",{enumerable:!0,get:function(){return r.CosmWasmClient}}),Object.defineProperty(t,"fromBinary",{enumerable:!0,get:function(){return r.fromBinary}}),Object.defineProperty(t,"SigningCosmWasmClient",{enumerable:!0,get:function(){return r.SigningCosmWasmClient}}),Object.defineProperty(t,"toBinary",{enumerable:!0,get:function(){return r.toBinary}})},8010:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Random=t.pathToString=t.Bip39=void 0;var r=n(9562);Object.defineProperty(t,"Bip39",{enumerable:!0,get:function(){return r.Bip39}}),Object.defineProperty(t,"pathToString",{enumerable:!0,get:function(){return r.pathToString}}),Object.defineProperty(t,"Random",{enumerable:!0,get:function(){return r.Random}})},1558:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toUtf8=t.toRfc3339=t.toHex=t.toBech32=t.toBase64=t.toAscii=t.fromUtf8=t.fromRfc3339=t.fromHex=t.fromBech32=t.fromBase64=t.fromAscii=t.Bech32=void 0;var r=n(8972);Object.defineProperty(t,"Bech32",{enumerable:!0,get:function(){return r.Bech32}}),Object.defineProperty(t,"fromAscii",{enumerable:!0,get:function(){return r.fromAscii}}),Object.defineProperty(t,"fromBase64",{enumerable:!0,get:function(){return r.fromBase64}}),Object.defineProperty(t,"fromBech32",{enumerable:!0,get:function(){return r.fromBech32}}),Object.defineProperty(t,"fromHex",{enumerable:!0,get:function(){return r.fromHex}}),Object.defineProperty(t,"fromRfc3339",{enumerable:!0,get:function(){return r.fromRfc3339}}),Object.defineProperty(t,"fromUtf8",{enumerable:!0,get:function(){return r.fromUtf8}}),Object.defineProperty(t,"toAscii",{enumerable:!0,get:function(){return r.toAscii}}),Object.defineProperty(t,"toBase64",{enumerable:!0,get:function(){return r.toBase64}}),Object.defineProperty(t,"toBech32",{enumerable:!0,get:function(){return r.toBech32}}),Object.defineProperty(t,"toHex",{enumerable:!0,get:function(){return r.toHex}}),Object.defineProperty(t,"toRfc3339",{enumerable:!0,get:function(){return r.toRfc3339}}),Object.defineProperty(t,"toUtf8",{enumerable:!0,get:function(){return r.toUtf8}})},5237:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FaucetClient=void 0;var r=n(1467);Object.defineProperty(t,"FaucetClient",{enumerable:!0,get:function(){return r.FaucetClient}})},372:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setupNodeLedger=t.setupNodeLocal=t.setupWebLedger=t.setupWebKeplr=void 0;const r=n(6910),o=n(3685),i=n(6780),a=n(2126);t.setupWebKeplr=async function(e){if(!window.keplr)throw new Error("Keplr is not supported or installed on this browser!");await window.keplr.enable(e.chainId).catch((()=>{throw new Error("Keplr can't connect to this chainId!")}));const{prefix:t,gasPrice:n}=e,r=await window.getOfflineSignerAuto(e.chainId);return await o.SigningCosmWasmClient.connectWithSigner(e.rpcEndpoint,r,{prefix:t,gasPrice:n})},t.setupWebLedger=async function(e,t){const{prefix:n,gasPrice:a}=e,s=12e4,c=await t.create(s,s),d=new i.LedgerSigner(c,{hdPaths:[(0,r.makeCosmoshubPath)(0)],prefix:n}),u=await o.SigningCosmWasmClient.connectWithSigner(e.rpcEndpoint,d,{prefix:n,gasPrice:a});if(await u.getChainId()!==e.chainId)throw Error("Given ChainId doesn't match the clients ChainID!");return u},t.setupNodeLocal=async function(e,t){const{prefix:n,gasPrice:r}=e,i=await a.DirectSecp256k1HdWallet.fromMnemonic(t,{prefix:n}),s=await o.SigningCosmWasmClient.connectWithSigner(e.rpcEndpoint,i,{prefix:n,gasPrice:r});if(await s.getChainId()!==e.chainId)throw Error("Given ChainId doesn't match the clients ChainID!");return s},t.setupNodeLedger=async function(e,t){const{prefix:n,gasPrice:a}=e,s=12e4,c=await t.create(s,s),d=new i.LedgerSigner(c,{hdPaths:[(0,r.makeCosmoshubPath)(0)],prefix:n}),u=await o.SigningCosmWasmClient.connectWithSigner(e.rpcEndpoint,d,{prefix:n,gasPrice:a});if(await u.getChainId()!==e.chainId)throw Error("Given ChainId doesn't match the clients ChainID!");return u}},3607:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.setupWebLedger=t.setupWebKeplr=t.setupNodeLocal=t.setupNodeLedger=void 0,o(n(6910),t),o(n(3685),t),o(n(8010),t),o(n(1558),t),o(n(5237),t),o(n(6780),t),o(n(6490),t),o(n(2126),t),o(n(8099),t),o(n(8120),t);var i=n(372);Object.defineProperty(t,"setupNodeLedger",{enumerable:!0,get:function(){return i.setupNodeLedger}}),Object.defineProperty(t,"setupNodeLocal",{enumerable:!0,get:function(){return i.setupNodeLocal}}),Object.defineProperty(t,"setupWebKeplr",{enumerable:!0,get:function(){return i.setupWebKeplr}}),Object.defineProperty(t,"setupWebLedger",{enumerable:!0,get:function(){return i.setupWebLedger}})},6780:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LedgerSigner=void 0;var r=n(8121);Object.defineProperty(t,"LedgerSigner",{enumerable:!0,get:function(){return r.LedgerSigner}})},6490:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Decimal=void 0;var r=n(6961);Object.defineProperty(t,"Decimal",{enumerable:!0,get:function(){return r.Decimal}})},2126:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Registry=t.DirectSecp256k1HdWallet=void 0;var r=n(4087);Object.defineProperty(t,"DirectSecp256k1HdWallet",{enumerable:!0,get:function(){return r.DirectSecp256k1HdWallet}}),Object.defineProperty(t,"Registry",{enumerable:!0,get:function(){return r.Registry}})},8099:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setupTxExtension=t.setupStakingExtension=t.setupMintExtension=t.setupIbcExtension=t.setupGovExtension=t.setupDistributionExtension=t.setupBankExtension=t.setupAuthExtension=t.createPagination=t.calculateFee=t.QueryClient=t.GasPrice=void 0;var r=n(4658);Object.defineProperty(t,"GasPrice",{enumerable:!0,get:function(){return r.GasPrice}}),Object.defineProperty(t,"QueryClient",{enumerable:!0,get:function(){return r.QueryClient}});var o=n(4658);Object.defineProperty(t,"calculateFee",{enumerable:!0,get:function(){return o.calculateFee}}),Object.defineProperty(t,"createPagination",{enumerable:!0,get:function(){return o.createPagination}}),Object.defineProperty(t,"setupAuthExtension",{enumerable:!0,get:function(){return o.setupAuthExtension}}),Object.defineProperty(t,"setupBankExtension",{enumerable:!0,get:function(){return o.setupBankExtension}}),Object.defineProperty(t,"setupDistributionExtension",{enumerable:!0,get:function(){return o.setupDistributionExtension}}),Object.defineProperty(t,"setupGovExtension",{enumerable:!0,get:function(){return o.setupGovExtension}}),Object.defineProperty(t,"setupIbcExtension",{enumerable:!0,get:function(){return o.setupIbcExtension}}),Object.defineProperty(t,"setupMintExtension",{enumerable:!0,get:function(){return o.setupMintExtension}}),Object.defineProperty(t,"setupStakingExtension",{enumerable:!0,get:function(){return o.setupStakingExtension}}),Object.defineProperty(t,"setupTxExtension",{enumerable:!0,get:function(){return o.setupTxExtension}})},8120:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isNonNullObject=void 0;var r=n(5553);Object.defineProperty(t,"isNonNullObject",{enumerable:!0,get:function(){return r.isNonNullObject}})},4927:(e,t,n)=>{function r(e){try{if(!n.g.localStorage)return!1}catch(e){return!1}var t=n.g.localStorage[e];return null!=t&&"true"===String(t).toLowerCase()}e.exports=function(e,t){if(r("noDeprecation"))return e;var n=!1;return function(){if(!n){if(r("throwDeprecation"))throw new Error(t);r("traceDeprecation")?console.trace(t):console.warn(t),n=!0}return e.apply(this,arguments)}}},3813:function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.NO_IL=t.NO=t.MemoryStream=t.Stream=void 0;var i=n(868),a=n(2503),s=i.default(a.getPolyfill()),c={};function d(){}function u(e){for(var t=e.length,n=Array(t),r=0;r=this.max&&t._n(e)},e.prototype._e=function(e){var t=this.out;t!==c&&t._e(e)},e.prototype._c=function(){var e=this.out;e!==c&&e._c()},e}(),B=function(){function e(e,t){this.out=e,this.op=t}return e.prototype._n=function(){this.op.end()},e.prototype._e=function(e){this.out._e(e)},e.prototype._c=function(){this.op.end()},e}(),_=function(){function e(e,t){this.type="endWhen",this.ins=t,this.out=c,this.o=e,this.oil=A}return e.prototype._start=function(e){this.out=e,this.o._add(this.oil=new B(e,this)),this.ins._add(this)},e.prototype._stop=function(){this.ins._remove(this),this.o._remove(this.oil),this.out=c,this.oil=A},e.prototype.end=function(){var e=this.out;e!==c&&e._c()},e.prototype._n=function(e){var t=this.out;t!==c&&t._n(e)},e.prototype._e=function(e){var t=this.out;t!==c&&t._e(e)},e.prototype._c=function(){this.end()},e}(),S=function(){function e(e,t){this.type="filter",this.ins=t,this.out=c,this.f=e}return e.prototype._start=function(e){this.out=e,this.ins._add(this)},e.prototype._stop=function(){this.ins._remove(this),this.out=c},e.prototype._n=function(e){var t=this.out;if(t!==c){var n=l(this,e,t);n!==c&&n&&t._n(e)}},e.prototype._e=function(e){var t=this.out;t!==c&&t._e(e)},e.prototype._c=function(){var e=this.out;e!==c&&e._c()},e}(),k=function(){function e(e,t){this.out=e,this.op=t}return e.prototype._n=function(e){this.out._n(e)},e.prototype._e=function(e){this.out._e(e)},e.prototype._c=function(){this.op.inner=c,this.op.less()},e}(),O=function(){function e(e){this.type="flatten",this.ins=e,this.out=c,this.open=!0,this.inner=c,this.il=A}return e.prototype._start=function(e){this.out=e,this.open=!0,this.inner=c,this.il=A,this.ins._add(this)},e.prototype._stop=function(){this.ins._remove(this),this.inner!==c&&this.inner._remove(this.il),this.out=c,this.open=!0,this.inner=c,this.il=A},e.prototype.less=function(){var e=this.out;e!==c&&(this.open||this.inner!==c||e._c())},e.prototype._n=function(e){var t=this.out;if(t!==c){var n=this.inner,r=this.il;n!==c&&r!==A&&n._remove(r),(this.inner=e)._add(this.il=new k(t,this))}},e.prototype._e=function(e){var t=this.out;t!==c&&t._e(e)},e.prototype._c=function(){this.open=!1,this.less()},e}(),Q=function(){function e(e,t,n){var r=this;this.type="fold",this.ins=n,this.out=c,this.f=function(t){return e(r.acc,t)},this.acc=this.seed=t}return e.prototype._start=function(e){this.out=e,this.acc=this.seed,e._n(this.acc),this.ins._add(this)},e.prototype._stop=function(){this.ins._remove(this),this.out=c,this.acc=this.seed},e.prototype._n=function(e){var t=this.out;if(t!==c){var n=l(this,e,t);n!==c&&t._n(this.acc=n)}},e.prototype._e=function(e){var t=this.out;t!==c&&t._e(e)},e.prototype._c=function(){var e=this.out;e!==c&&e._c()},e}(),R=function(){function e(e){this.type="last",this.ins=e,this.out=c,this.has=!1,this.val=c}return e.prototype._start=function(e){this.out=e,this.has=!1,this.ins._add(this)},e.prototype._stop=function(){this.ins._remove(this),this.out=c,this.val=c},e.prototype._n=function(e){this.has=!0,this.val=e},e.prototype._e=function(e){var t=this.out;t!==c&&t._e(e)},e.prototype._c=function(){var e=this.out;e!==c&&(this.has?(e._n(this.val),e._c()):e._e(new Error("last() failed because input stream completed")))},e}(),P=function(){function e(e,t){this.type="map",this.ins=t,this.out=c,this.f=e}return e.prototype._start=function(e){this.out=e,this.ins._add(this)},e.prototype._stop=function(){this.ins._remove(this),this.out=c},e.prototype._n=function(e){var t=this.out;if(t!==c){var n=l(this,e,t);n!==c&&t._n(n)}},e.prototype._e=function(e){var t=this.out;t!==c&&t._e(e)},e.prototype._c=function(){var e=this.out;e!==c&&e._c()},e}(),N=function(){function e(e){this.type="remember",this.ins=e,this.out=c}return e.prototype._start=function(e){this.out=e,this.ins._add(e)},e.prototype._stop=function(){this.ins._remove(this.out),this.out=c},e}(),x=function(){function e(e,t){this.type="replaceError",this.ins=t,this.out=c,this.f=e}return e.prototype._start=function(e){this.out=e,this.ins._add(this)},e.prototype._stop=function(){this.ins._remove(this),this.out=c},e.prototype._n=function(e){var t=this.out;t!==c&&t._n(e)},e.prototype._e=function(e){var t=this.out;if(t!==c)try{this.ins._remove(this),(this.ins=this.f(e))._add(this)}catch(e){t._e(e)}},e.prototype._c=function(){var e=this.out;e!==c&&e._c()},e}(),D=function(){function e(e,t){this.type="startWith",this.ins=e,this.out=c,this.val=t}return e.prototype._start=function(e){this.out=e,this.out._n(this.val),this.ins._add(e)},e.prototype._stop=function(){this.ins._remove(this.out),this.out=c},e}(),M=function(){function e(e,t){this.type="take",this.ins=t,this.out=c,this.max=e,this.taken=0}return e.prototype._start=function(e){this.out=e,this.taken=0,this.max<=0?e._c():this.ins._add(this)},e.prototype._stop=function(){this.ins._remove(this),this.out=c},e.prototype._n=function(e){var t=this.out;if(t!==c){var n=++this.taken;n1))if(this._stopID!==c)clearTimeout(this._stopID),this._stopID=c;else{var r=this._prod;r!==c&&r._start(this)}},e.prototype._remove=function(e){var t=this,n=this._target;if(n)return n._remove(e);var r=this._ils,o=r.indexOf(e);o>-1&&(r.splice(o,1),this._prod!==c&&r.length<=0?(this._err=c,this._stopID=setTimeout((function(){return t._stopNow()}))):1===r.length&&this._pruneCycles())},e.prototype._pruneCycles=function(){this._hasNoSinks(this,[])&&this._remove(this._ils[0])},e.prototype._hasNoSinks=function(e,t){if(-1!==t.indexOf(e))return!0;if(e.out===this)return!0;if(e.out&&e.out!==c)return this._hasNoSinks(e.out,t.concat(e));if(e._ils){for(var n=0,r=e._ils.length;n1)this._has&&e._n(this._v);else if(this._stopID!==c)this._has&&e._n(this._v),clearTimeout(this._stopID),this._stopID=c;else if(this._has)e._n(this._v);else{var r=this._prod;r!==c&&r._start(this)}},t.prototype._stopNow=function(){this._has=!1,e.prototype._stopNow.call(this)},t.prototype._x=function(){this._has=!1,e.prototype._x.call(this)},t.prototype.map=function(e){return this._map(e)},t.prototype.mapTo=function(t){return e.prototype.mapTo.call(this,t)},t.prototype.take=function(t){return e.prototype.take.call(this,t)},t.prototype.endWhen=function(t){return e.prototype.endWhen.call(this,t)},t.prototype.replaceError=function(t){return e.prototype.replaceError.call(this,t)},t.prototype.remember=function(){return this},t.prototype.debug=function(t){return e.prototype.debug.call(this,t)},t}(T);t.MemoryStream=U;var H=T;t.default=H},9602:e=>{"use strict";e.exports=function(e){e.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}},4411:(e,t,n)=>{"use strict";function r(e){var t=this;if(t instanceof r||(t=new r),t.tail=null,t.head=null,t.length=0,e&&"function"==typeof e.forEach)e.forEach((function(e){t.push(e)}));else if(arguments.length>0)for(var n=0,o=arguments.length;n1)n=t;else{if(!this.head)throw new TypeError("Reduce of empty list with no initial value");r=this.head.next,n=this.head.value}for(var o=0;null!==r;o++)n=e(n,r.value,o),r=r.next;return n},r.prototype.reduceReverse=function(e,t){var n,r=this.tail;if(arguments.length>1)n=t;else{if(!this.tail)throw new TypeError("Reduce of empty list with no initial value");r=this.tail.prev,n=this.tail.value}for(var o=this.length-1;null!==r;o--)n=e(n,r.value,o),r=r.prev;return n},r.prototype.toArray=function(){for(var e=new Array(this.length),t=0,n=this.head;null!==n;t++)e[t]=n.value,n=n.next;return e},r.prototype.toArrayReverse=function(){for(var e=new Array(this.length),t=0,n=this.tail;null!==n;t++)e[t]=n.value,n=n.prev;return e},r.prototype.slice=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var n=new r;if(tthis.length&&(t=this.length);for(var o=0,i=this.head;null!==i&&othis.length&&(t=this.length);for(var o=this.length,i=this.tail;null!==i&&o>t;o--)i=i.prev;for(;null!==i&&o>e;o--,i=i.prev)n.push(i.value);return n},r.prototype.splice=function(e,t,...n){e>this.length&&(e=this.length-1),e<0&&(e=this.length+e);for(var r=0,i=this.head;null!==i&&r{},5568:()=>{},5992:()=>{},2361:()=>{},9630:()=>{},8593:e=>{"use strict";e.exports=JSON.parse('{"name":"axios","version":"0.21.4","description":"Promise based HTTP client for the browser and node.js","main":"index.js","scripts":{"test":"grunt test","start":"node ./sandbox/server.js","build":"NODE_ENV=production grunt build","preversion":"npm test","version":"npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json","postversion":"git push && git push --tags","examples":"node ./examples/server.js","coveralls":"cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js","fix":"eslint --fix lib/**/*.js"},"repository":{"type":"git","url":"https://github.com/axios/axios.git"},"keywords":["xhr","http","ajax","promise","node"],"author":"Matt Zabriskie","license":"MIT","bugs":{"url":"https://github.com/axios/axios/issues"},"homepage":"https://axios-http.com","devDependencies":{"coveralls":"^3.0.0","es6-promise":"^4.2.4","grunt":"^1.3.0","grunt-banner":"^0.6.0","grunt-cli":"^1.2.0","grunt-contrib-clean":"^1.1.0","grunt-contrib-watch":"^1.0.0","grunt-eslint":"^23.0.0","grunt-karma":"^4.0.0","grunt-mocha-test":"^0.13.3","grunt-ts":"^6.0.0-beta.19","grunt-webpack":"^4.0.2","istanbul-instrumenter-loader":"^1.0.0","jasmine-core":"^2.4.1","karma":"^6.3.2","karma-chrome-launcher":"^3.1.0","karma-firefox-launcher":"^2.1.0","karma-jasmine":"^1.1.1","karma-jasmine-ajax":"^0.1.13","karma-safari-launcher":"^1.0.0","karma-sauce-launcher":"^4.3.6","karma-sinon":"^1.0.5","karma-sourcemap-loader":"^0.3.8","karma-webpack":"^4.0.2","load-grunt-tasks":"^3.5.2","minimist":"^1.2.0","mocha":"^8.2.1","sinon":"^4.5.0","terser-webpack-plugin":"^4.2.3","typescript":"^4.0.5","url-search-params":"^0.10.0","webpack":"^4.44.2","webpack-dev-server":"^3.11.0"},"browser":{"./lib/adapters/http.js":"./lib/adapters/xhr.js"},"jsdelivr":"dist/axios.min.js","unpkg":"dist/axios.min.js","typings":"./index.d.ts","dependencies":{"follow-redirects":"^1.14.0"},"bundlesize":[{"path":"./dist/axios.min.js","threshold":"5kB"}]}')},8597:e=>{"use strict";e.exports={i8:"6.5.4"}}},__webpack_module_cache__={};function __webpack_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var n=__webpack_module_cache__[e]={id:e,loaded:!1,exports:{}};return __webpack_modules__[e].call(n.exports,n,n.exports,__webpack_require__),n.loaded=!0,n.exports}__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),__webpack_require__.nmd=e=>(e.paths=[],e.children||(e.children=[]),e);var __webpack_exports__=__webpack_require__(3607);return __webpack_exports__})()})); +//# sourceMappingURL=bundle.js.map diff --git a/app/assets/v2/js/lib/datadog-logs-v4.js b/app/assets/v2/js/lib/datadog-logs-v4.js new file mode 100644 index 00000000000..3c429c61dce --- /dev/null +++ b/app/assets/v2/js/lib/datadog-logs-v4.js @@ -0,0 +1,1279 @@ +!function() { + 'use strict'; var e = {log: 'log', debug: 'debug', info: 'info', warn: 'warn', error: 'error'}; var t = function(n) { + for (var r = [], o = 1; o < arguments.length; o++) + r[o - 1] = arguments[o]; Object.prototype.hasOwnProperty.call(e, n) || (n = e.log), t[n].apply(t, r); + }; + + function n(e, n) { + return function() { + for (var r = [], o = 0; o < arguments.length; o++) + r[o] = arguments[o]; try { + return e.apply(void 0, r); + } catch (e) { + t.error(n, e); + } + }; + }t.debug = console.debug.bind(console), t.log = console.log.bind(console), t.info = console.info.bind(console), t.warn = console.warn.bind(console), t.error = console.error.bind(console); var r; var o = function(e, t, n) { + if (n || 2 === arguments.length) + for (var r, o = 0, i = t.length; o < i; o++) + !r && o in t || (r || (r = Array.prototype.slice.call(t, 0, o)), r[o] = t[o]); return e.concat(r || Array.prototype.slice.call(t)); + }; var i = !1; + + function s(e) { + i = e; + } function a(e, t, n) { + var o = n.value; + + n.value = function() { + for (var e = [], t = 0; t < arguments.length; t++) + e[t] = arguments[t]; var n = r ? c(o) : o; + + return n.apply(this, e); + }; + } function c(e) { + return function() { + return u(e, this, arguments); + }; + } function u(t, n, o) { + try { + return t.apply(n, o); + } catch (t) { + if (f(e.error, t), r) + try { + r(t); + } catch (t) { + f(e.error, t); + } + } + } function f(e) { + for (var n = [], r = 1; r < arguments.length; r++) + n[r - 1] = arguments[r]; i && t.apply(void 0, o([ e, '[MONITOR]' ], n, !1)); + } var l = 1e3; var d = 6e4; + + function v(e, t, n) { + var r; var o; var i = !n || void 0 === n.leading || n.leading; var s = !n || void 0 === n.trailing || n.trailing; var a = !1; + + return {throttled: function() { + for (var n = [], c = 0; c < arguments.length; c++) + n[c] = arguments[c]; a ? r = n : (i ? e.apply(void 0, n) : r = n, a = !0, o = setTimeout((function() { + s && r && e.apply(void 0, r), a = !1, r = void 0; + }), t)); + }, cancel: function() { + clearTimeout(o), a = !1, r = void 0; + }}; + } function p(e) { + for (var t = [], n = 1; n < arguments.length; n++) + t[n - 1] = arguments[n]; return t.forEach((function(t) { + for (var n in t) + Object.prototype.hasOwnProperty.call(t, n) && (e[n] = t[n]); + })), e; + } function h(e) { + return e ? (parseInt(e, 10) ^ 16 * Math.random() >> parseInt(e, 10) / 4).toString(16) : ''.concat(1e7, '-').concat(1e3, '-').concat(4e3, '-').concat(8e3, '-').concat(1e11).replace(/[018]/g, h); + } function g(e) { + return 0 !== e && 100 * Math.random() <= e; + } function b() {} function m(e, t, n) { + if (null == e) + return JSON.stringify(e); var r = [ !1, void 0 ]; + + y(e) && (r = [ !0, e.toJSON ], delete e.toJSON); var o; var i; var s = [ !1, void 0 ]; + + 'object' == typeof e && y(o = Object.getPrototypeOf(e)) && (s = [ !0, o.toJSON ], delete o.toJSON); try { + i = JSON.stringify(e, t, n); + } catch (e) { + i = ''; + } finally { + r[0] && (e.toJSON = r[1]), s[0] && (o.toJSON = s[1]); + } return i; + } function y(e) { + return 'object' == typeof e && null !== e && Object.prototype.hasOwnProperty.call(e, 'toJSON'); + } function w(e, t) { + return -1 !== e.indexOf(t); + } function k(e) { + return function(e) { + return 'number' == typeof e; + }(e) && e >= 0 && e <= 100; + } function x(e) { + return Object.keys(e).map((function(t) { + return e[t]; + })); + } function E() { + if ('object' == typeof globalThis) + return globalThis; Object.defineProperty(Object.prototype, '_dd_temp_', {get: function() { + return this; + }, configurable: !0}); var e = _dd_temp_; + + return delete Object.prototype._dd_temp_, 'object' != typeof e && (e = 'object' == typeof self ? self : 'object' == typeof window ? window : {}), e; + } function S(e, t, n) { + void 0 === n && (n = ''); var r = e.charCodeAt(t - 1); var o = r >= 55296 && r <= 56319 ? t + 1 : t; + + return e.length <= o ? e : ''.concat(e.slice(0, o)).concat(n); + } function L(e, t, n, r) { + return C(e, [t], n, r); + } function C(e, t, n, r) { + var o = void 0 === r ? {} : r; var i = o.once; var s = o.capture; var a = o.passive; var u = c(i ? function(e) { + l(), n(e); + } : n); var f = a ? {capture: s, passive: a} : s; + + t.forEach((function(t) { + return e.addEventListener(t, u, f); + })); var l = function() { + return t.forEach((function(t) { + return e.removeEventListener(t, u, f); + })); + }; + + return {stop: l}; + } function O(e, t, n) { + if (void 0 === n && (n = function() { + if ('undefined' != typeof WeakSet) { + var e = new WeakSet; + + return {hasAlreadyBeenSeen: function(t) { + var n = e.has(t); + + return n || e.add(t), n; + }}; + } var t = []; + + return {hasAlreadyBeenSeen: function(e) { + var n = t.indexOf(e) >= 0; + + return n || t.push(e), n; + }}; + }()), void 0 === t) + return e; if ('object' != typeof t || null === t) + return t; if (t instanceof Date) + return new Date(t.getTime()); if (t instanceof RegExp) { + var r = t.flags || [ t.global ? 'g' : '', t.ignoreCase ? 'i' : '', t.multiline ? 'm' : '', t.sticky ? 'y' : '', t.unicode ? 'u' : '' ].join(''); + + return new RegExp(t.source, r); + } if (!n.hasAlreadyBeenSeen(t)) { + if (Array.isArray(t)) { + for (var o = Array.isArray(e) ? e : [], i = 0; i < t.length; ++i) + o[i] = O(o[i], t[i], n); return o; + } var s; var a = 'object' == (null === (s = e) ? 'null' : Array.isArray(s) ? 'array' : typeof s) ? e : {}; + + for (var c in t) + Object.prototype.hasOwnProperty.call(t, c) && (a[c] = O(a[c], t[c], n)); return a; + } + } function T(e) { + return O(void 0, e); + } function R() { + for (var e, t = [], n = 0; n < arguments.length; n++) + t[n] = arguments[n]; for (var r = 0, o = t; r < o.length; r++) { + var i = o[r]; + + null != i && (e = O(e, i)); + } return e; + } function B() { + var e = {}; + + return {get: function() { + return e; + }, add: function(t, n) { + e[t] = n; + }, remove: function(t) { + delete e[t]; + }, set: function(t) { + e = t; + }}; + } var _; var j = function() { + function e() { + this.buffer = []; + } return e.prototype.add = function(e) { + this.buffer.push(e) > 500 && this.buffer.splice(0, 1); + }, e.prototype.drain = function() { + this.buffer.forEach((function(e) { + return e(); + })), this.buffer.length = 0; + }, e; + }(); + + function M() { + return Date.now(); + } function A() { + return performance.now(); + } function I() { + return {relative: A(), timeStamp: M()}; + } function U(e, t) { + return t - e; + } function D() { + return void 0 === _ && (_ = performance.timing.navigationStart), _; + } function P() { + var e = E().DatadogEventBridge; + + if (e) + return {getAllowedWebViewHosts: function() { + return JSON.parse(e.getAllowedWebViewHosts()); + }, send: function(t, n) { + e.send(JSON.stringify({eventType: t, event: n})); + }}; + } function N(e) { + var t; + + void 0 === e && (e = null === (t = E().location) || void 0 === t ? void 0 : t.hostname); var n = P(); + + return !!n && n.getAllowedWebViewHosts().some((function(t) { + var n = t.replace(/\./g, '\\.'); + + return new RegExp('^(.+\\.)*'.concat(n, '$')).test(e); + })); + } var q; var F; var H; + + function J(e, t, n, r) { + var o = new Date; + + o.setTime(o.getTime() + n); var i = 'expires='.concat(o.toUTCString()); var s = r && r.crossSite ? 'none' : 'strict'; var a = r && r.domain ? ';domain='.concat(r.domain) : ''; var c = r && r.secure ? ';secure' : ''; + + document.cookie = ''.concat(e, '=').concat(t, ';').concat(i, ';path=/;samesite=').concat(s).concat(a).concat(c); + } function z(e) { + return function(e, t) { + var n = new RegExp('(?:^|;)\\s*'.concat(t, '\\s*=\\s*([^;]+)')).exec(e); + + return n ? n[1] : void 0; + }(document.cookie, e); + } function V(e, t) { + J(e, '', 0, t); + } function $(e) { + return !!F && F.has(e); + } function W(e) { + return G(e, function(e) { + if (e.origin) + return e.origin; var t = e.host.replace(/(:80|:443)$/, ''); + + return ''.concat(e.protocol, '//').concat(t); + }(window.location)).href; + } function G(e, t) { + if (function() { + if (void 0 !== H) + return H; try { + var e = new URL('http://test/path'); + + return H = 'http://test/path' === e.href; + } catch (e) { + H = !1; + } return H; + }()) + return void 0 !== t ? new URL(e, t) : new URL(e); if (void 0 === t && !(/:/).test(e)) + throw new Error("Invalid URL: '".concat(e, "'")); var n = document; var r = n.createElement('a'); + + if (void 0 !== t) { + var o = (n = document.implementation.createHTMLDocument('')).createElement('base'); + + o.href = t, n.head.appendChild(o), n.body.appendChild(r); + } return r.href = e, r; + } var X = 'datadoghq.com'; var K = {logs: 'logs', rum: 'rum', sessionReplay: 'session-replay'}; var Q = {logs: 'logs', rum: 'rum', sessionReplay: 'replay'}; + + function Y(e, t, n) { + var r = e.site; var o = void 0 === r ? X : r; var i = e.clientToken; var s = o.split('.'); var a = s.pop(); var c = ''.concat(K[t], '.browser-intake-').concat(s.join('-'), '.').concat(a); var u = 'https://'.concat(c, '/api/v2/').concat(Q[t]); var f = e.proxyUrl && W(e.proxyUrl); + + return {build: function() { + var e = 'ddsource=browser' + '&ddtags='.concat(encodeURIComponent(['sdk_version:'.concat('4.11.5')].concat(n).join(','))) + '&dd-api-key='.concat(i) + '&dd-evp-origin-version='.concat(encodeURIComponent('4.11.5')) + '&dd-evp-origin=browser' + '&dd-request-id='.concat(h()); + + 'rum' === t && (e += '&batch_time='.concat(M())); var r = ''.concat(u, '?').concat(e); + + return f ? ''.concat(f, '?ddforward=').concat(encodeURIComponent(r)) : r; + }, buildIntakeUrl: function() { + return f ? ''.concat(f, '?ddforward') : u; + }, endpointType: t}; + } var Z = /[^a-z0-9_:./-]/; + + function ee(e, n) { + var r = 200 - e.length - 1; + + (n.length > r || Z.test(n)) && t.warn(''.concat(e, " value doesn't meet tag requirements and will be sanitized")); var o = n.replace(/,/g, '_'); + + return ''.concat(e, ':').concat(o); + } function te(e) { + var t = function(e) { + var t = e.env; var n = e.service; var r = e.version; var o = e.datacenter; var i = []; + + return t && i.push(ee('env', t)), n && i.push(ee('service', n)), r && i.push(ee('version', r)), o && i.push(ee('datacenter', o)), i; + }(e); var n = function(e, t) { + return {logsEndpointBuilder: Y(e, 'logs', t), rumEndpointBuilder: Y(e, 'rum', t), sessionReplayEndpointBuilder: Y(e, 'sessionReplay', t)}; + }(e, t); var r = x(n).map((function(e) { + return e.buildIntakeUrl(); + })); var o = function(e, t, n) { + if (!e.replica) + return; var r = p({}, e, {site: X, clientToken: e.replica.clientToken}); var o = {logsEndpointBuilder: Y(r, 'logs', n), rumEndpointBuilder: Y(r, 'rum', n)}; + + return t.push.apply(t, x(o).map((function(e) { + return e.buildIntakeUrl(); + }))), p({applicationId: e.replica.applicationId}, o); + }(e, r, t); + + return p({isIntakeUrl: function(e) { + return r.some((function(t) { + return 0 === e.indexOf(t); + })); + }, replica: o, site: e.site || X}, n); + } function ne(e) { + var r; var o; + + if (e && e.clientToken) + if (void 0 === e.sampleRate || k(e.sampleRate)) { + var i; + + if (void 0 === e.telemetrySampleRate || k(e.telemetrySampleRate)) + return i = e.enableExperimentalFeatures, Array.isArray(i) && (F || (F = new Set(i)), i.filter((function(e) { + return 'string' == typeof e; + })).forEach((function(e) { + F.add(e); + }))), p({beforeSend: e.beforeSend && n(e.beforeSend, 'beforeSend threw an error:'), cookieOptions: re(e), sampleRate: null !== (r = e.sampleRate) && void 0 !== r ? r : 100, telemetrySampleRate: null !== (o = e.telemetrySampleRate) && void 0 !== o ? o : 20, service: e.service, silentMultipleInit: !!e.silentMultipleInit, batchBytesLimit: $('lower-batch-size') ? 10240 : 16384, eventRateLimiterThreshold: 3e3, maxTelemetryEventsPerPage: 15, flushTimeout: 3e4, batchMessagesLimit: 50, messageBytesLimit: 262144}, te(e)); t.error('Telemetry Sample Rate should be a number between 0 and 100'); + } else + t.error('Sample Rate should be a number between 0 and 100'); else + t.error('Client Token is not configured, we will not send any data.'); + } function re(e) { + var t = {}; + + return t.secure = function(e) { + return !!e.useSecureSessionCookie || !!e.useCrossSiteSessionCookie; + }(e), t.crossSite = !!e.useCrossSiteSessionCookie, e.trackSessionAcrossSubdomains && (t.domain = function() { + if (void 0 === q) { + for (var e = 'dd_site_test_'.concat(h()), t = window.location.hostname.split('.'), n = t.pop(); t.length && !z(e);) + n = ''.concat(t.pop(), '.').concat(n), J(e, 'test', l, {domain: n}); V(e, {domain: n}), q = n; + } return q; + }()), t; + } var oe = '?'; + + function ie(e) { + var t = []; var n = le(e, 'stack'); + + return n && n.split('\n').forEach((function(e) { + var n = function(e) { + var t = se.exec(e); + + if (!t) + return; var n = t[2] && 0 === t[2].indexOf('native'); var r = t[2] && 0 === t[2].indexOf('eval'); var o = ae.exec(t[2]); + + r && o && (t[2] = o[1], t[3] = o[2], t[4] = o[3]); return {args: n ? [t[2]] : [], column: t[4] ? +t[4] : void 0, func: t[1] || oe, line: t[3] ? +t[3] : void 0, url: n ? void 0 : t[2]}; + }(e) || function(e) { + var t = ce.exec(e); + + if (!t) + return; return {args: [], column: t[4] ? +t[4] : void 0, func: t[1] || oe, line: +t[3], url: t[2]}; + }(e) || function(e) { + var t = ue.exec(e); + + if (!t) + return; var n = t[3] && t[3].indexOf(' > eval') > -1; var r = fe.exec(t[3]); + + n && r && (t[3] = r[1], t[4] = r[2], t[5] = void 0); return {args: t[2] ? t[2].split(',') : [], column: t[5] ? +t[5] : void 0, func: t[1] || oe, line: t[4] ? +t[4] : void 0, url: t[3]}; + }(e); + + n && (!n.func && n.line && (n.func = oe), t.push(n)); + })), {message: le(e, 'message'), name: le(e, 'name'), stack: t}; + } var se = /^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|eval|webpack||\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i; var ae = /\((\S*)(?::(\d+))(?::(\d+))\)/; var ce = /^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i; var ue = /^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|capacitor|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i; var fe = /(\S+) line (\d+)(?: > eval line \d+)* > eval/i; + + function le(e, t) { + if ('object' == typeof e && e && t in e) { + var n = e[t]; + + return 'string' == typeof n ? n : void 0; + } + } var de = 'agent'; var ve = 'console'; var pe = 'logger'; var he = 'network'; var ge = 'source'; var be = 'report'; + + function me(e) { + var t = ye(e); + + return e.stack.forEach((function(e) { + var n = '?' === e.func ? '' : e.func; var r = e.args && e.args.length > 0 ? '('.concat(e.args.join(', '), ')') : ''; var o = e.line ? ':'.concat(e.line) : ''; var i = e.line && e.column ? ':'.concat(e.column) : ''; + + t += '\n at '.concat(n).concat(r, ' @ ').concat(e.url).concat(o).concat(i); + })), t; + } function ye(e) { + return ''.concat(e.name || 'Error', ': ').concat(e.message); + } function we() { + var e; var t = new Error; + + if (!t.stack) + try { + throw t; + } catch (e) {} return u((function() { + var n = ie(t); + + n.stack = n.stack.slice(2), e = me(n); + })), e; + } var ke = function() { + function e(e) { + this.onFirstSubscribe = e, this.observers = []; + } return e.prototype.subscribe = function(e) { + var t = this; + + return !this.observers.length && this.onFirstSubscribe && (this.onLastUnsubscribe = this.onFirstSubscribe() || void 0), this.observers.push(e), {unsubscribe: function() { + t.observers = t.observers.filter((function(t) { + return e !== t; + })), !t.observers.length && t.onLastUnsubscribe && t.onLastUnsubscribe(); + }}; + }, e.prototype.notify = function(e) { + this.observers.forEach((function(t) { + return t(e); + })); + }, e; + }(); + + function xe() { + for (var e = [], t = 0; t < arguments.length; t++) + e[t] = arguments[t]; var n = new ke((function() { + var t = e.map((function(e) { + return e.subscribe((function(e) { + return n.notify(e); + })); + })); + + return function() { + return t.forEach((function(e) { + return e.unsubscribe(); + })); + }; + })); + + return n; + } var Ee = {intervention: 'intervention', deprecation: 'deprecation', cspViolation: 'csp_violation'}; + + function Se(e) { + var t; var n = []; + + w(e, Ee.cspViolation) && n.push(t = new ke((function() { + var e = c((function(e) { + t.notify(function(e) { + var t = Ee.cspViolation; var n = "'".concat(e.blockedURI, "' blocked by '").concat(e.effectiveDirective, "' directive"); + + return {type: Ee.cspViolation, subtype: e.effectiveDirective, message: ''.concat(t, ': ').concat(n), stack: Le(e.effectiveDirective, ''.concat(n, ' of the policy "').concat(S(e.originalPolicy, 100, '...'), '"'), e.sourceFile, e.lineNumber, e.columnNumber)}; + }(e)); + })); + + return L(document, 'securitypolicyviolation', e).stop; + }))); var r = e.filter((function(e) { + return e !== Ee.cspViolation; + })); + + return r.length && n.push(function(e) { + var t = new ke((function() { + if (window.ReportingObserver) { + var n = c((function(e) { + return e.forEach((function(e) { + t.notify(function(e) { + var t = e.type; var n = e.body; + + return {type: t, subtype: n.id, message: ''.concat(t, ': ').concat(n.message), stack: Le(n.id, n.message, n.sourceFile, n.lineNumber, n.columnNumber)}; + }(e)); + })); + })); var r = new window.ReportingObserver(n, {types: e, buffered: !0}); + + return r.observe(), function() { + r.disconnect(); + }; + } + })); + + return t; + }(r)), xe.apply(void 0, n); + } function Le(e, t, n, r, o) { + return n && me({name: e, message: t, stack: [{func: '?', url: n, line: r, column: o}]}); + } function Ce(e, n, r) { + return void 0 === e ? [] : 'all' === e || Array.isArray(e) && e.every((function(e) { + return w(n, e); + })) ? 'all' === e ? n : (o = e, i = new Set, o.forEach((function(e) { + return i.add(e); + })), function(e) { + var t = []; + + return e.forEach((function(e) { + return t.push(e); + })), t; + }(i)) : void t.error(''.concat(r, ' should be "all" or an array with allowed values "').concat(n.join('", "'), '"')); var o; var i; + } var Oe = function(e, t, n, r) { + var o; var i = arguments.length; var s = i < 3 ? t : null === r ? r = Object.getOwnPropertyDescriptor(t, n) : r; + + if ('object' == typeof Reflect && 'function' == typeof Reflect.decorate) + s = Reflect.decorate(e, t, n, r); else + for (var a = e.length - 1; a >= 0; a--) + (o = e[a]) && (s = (i < 3 ? o(s) : i > 3 ? o(t, n, s) : o(t, n)) || s); return i > 3 && s && Object.defineProperty(t, n, s), s; + }; var Te = {debug: 'debug', error: 'error', info: 'info', warn: 'warn'}; var Re = 'console'; var Be = 'http'; var _e = Object.keys(Te); var je = function() { + function e(e, t, n, r, o) { + void 0 === n && (n = Be), void 0 === r && (r = Te.debug), void 0 === o && (o = {}), this.handleLogStrategy = e, this.handlerType = n, this.level = r, this.contextManager = B(), this.contextManager.set(p({}, o, t ? {logger: {name: t}} : void 0)); + } return e.prototype.log = function(e, t, n) { + void 0 === n && (n = Te.info), this.handleLogStrategy({message: e, context: T(t), status: n}, this); + }, e.prototype.debug = function(e, t) { + this.log(e, t, Te.debug); + }, e.prototype.info = function(e, t) { + this.log(e, t, Te.info); + }, e.prototype.warn = function(e, t) { + this.log(e, t, Te.warn); + }, e.prototype.error = function(e, t) { + var n = {error: {origin: pe}}; + + this.log(e, R(n, t), Te.error); + }, e.prototype.setContext = function(e) { + this.contextManager.set(e); + }, e.prototype.getContext = function() { + return this.contextManager.get(); + }, e.prototype.addContext = function(e, t) { + this.contextManager.add(e, t); + }, e.prototype.removeContext = function(e) { + this.contextManager.remove(e); + }, e.prototype.setHandler = function(e) { + this.handlerType = e; + }, e.prototype.getHandler = function() { + return this.handlerType; + }, e.prototype.setLevel = function(e) { + this.level = e; + }, e.prototype.getLevel = function() { + return this.level; + }, Oe([a], e.prototype, 'log', null), e; + }(); var Me; var Ae = [ 'https://www.datadoghq-browser-agent.com', 'https://www.datad0g-browser-agent.com', 'http://localhost', '' ]; var Ie = ['ddog-gov.com']; var Ue = {maxEventsPerPage: 0, sentEventCount: 0, telemetryEnabled: !1}; + + function De(e) { + var t; var n = new ke; + + return Ue.telemetryEnabled = g(e.telemetrySampleRate), Me = function(r) { + !w(Ie, e.site) && Ue.telemetryEnabled && n.notify(function(e) { + return R({type: 'telemetry', date: M(), service: 'browser-sdk', version: '4.11.5', source: 'browser', _dd: {format_version: 2}, telemetry: e}, void 0 !== t ? t() : {}); + }(r)); + }, r = Pe, p(Ue, {maxEventsPerPage: e.maxTelemetryEventsPerPage, sentEventCount: 0}), {setContextProvider: function(e) { + t = e; + }, observable: n}; + } function Pe(e) { + Ne(p({status: 'error'}, function(e) { + if (e instanceof Error) { + var t = ie(e); + + return {error: {kind: t.name, stack: me(qe(t))}, message: t.message}; + } return {error: {stack: 'Not an instance of error'}, message: 'Uncaught '.concat(m(e))}; + }(e))); + } function Ne(e) { + Me && Ue.sentEventCount < Ue.maxEventsPerPage && (Ue.sentEventCount += 1, Me(e)); + } function qe(e) { + return e.stack = e.stack.filter((function(e) { + return !e.url || Ae.some((function(t) { + return n = e.url, r = t, n.slice(0, r.length) === r; var n; var r; + })); + })), e; + } var Fe = /[^\u0000-\u007F]/; var He = function() { + function e(e, t, n, r, o, i) { + void 0 === i && (i = b), this.request = e, this.batchMessagesLimit = t, this.batchBytesLimit = n, this.messageBytesLimit = r, this.flushTimeout = o, this.beforeUnloadCallback = i, this.pushOnlyBuffer = [], this.upsertBuffer = {}, this.bufferBytesCount = 0, this.bufferMessagesCount = 0, this.flushOnVisibilityHidden(), this.flushPeriodically(); + } return e.prototype.add = function(e) { + this.addOrUpdate(e); + }, e.prototype.upsert = function(e, t) { + this.addOrUpdate(e, t); + }, e.prototype.flush = function(e) { + if (0 !== this.bufferMessagesCount) { + var t = this.pushOnlyBuffer.concat(x(this.upsertBuffer)); + + this.request.send(t.join('\n'), this.bufferBytesCount, e), this.pushOnlyBuffer = [], this.upsertBuffer = {}, this.bufferBytesCount = 0, this.bufferMessagesCount = 0; + } + }, e.prototype.computeBytesCount = function(e) { + return Fe.test(e) ? void 0 !== window.TextEncoder ? (new TextEncoder).encode(e).length : new Blob([e]).size : e.length; + }, e.prototype.addOrUpdate = function(e, n) { + var r = this.process(e); var o = r.processedMessage; var i = r.messageBytesCount; + + i >= this.messageBytesLimit ? t.warn('Discarded a message whose size was bigger than the maximum allowed size '.concat(this.messageBytesLimit, 'KB.')) : (this.hasMessageFor(n) && this.remove(n), this.willReachedBytesLimitWith(i) && this.flush('batch_bytes_limit'), this.push(o, i, n), this.isFull() && this.flush('batch_messages_limit')); + }, e.prototype.process = function(e) { + var t = m(e); + + return {processedMessage: t, messageBytesCount: this.computeBytesCount(t)}; + }, e.prototype.push = function(e, t, n) { + this.bufferMessagesCount > 0 && (this.bufferBytesCount += 1), void 0 !== n ? this.upsertBuffer[n] = e : this.pushOnlyBuffer.push(e), this.bufferBytesCount += t, this.bufferMessagesCount += 1; + }, e.prototype.remove = function(e) { + var t = this.upsertBuffer[e]; + + delete this.upsertBuffer[e]; var n = this.computeBytesCount(t); + + this.bufferBytesCount -= n, this.bufferMessagesCount -= 1, this.bufferMessagesCount > 0 && (this.bufferBytesCount -= 1); + }, e.prototype.hasMessageFor = function(e) { + return void 0 !== e && void 0 !== this.upsertBuffer[e]; + }, e.prototype.willReachedBytesLimitWith = function(e) { + return this.bufferBytesCount + e + 1 >= this.batchBytesLimit; + }, e.prototype.isFull = function() { + return this.bufferMessagesCount === this.batchMessagesLimit || this.bufferBytesCount >= this.batchBytesLimit; + }, e.prototype.flushPeriodically = function() { + var e = this; + + setTimeout(c((function() { + e.flush('batch_flush_timeout'), e.flushPeriodically(); + })), this.flushTimeout); + }, e.prototype.flushOnVisibilityHidden = function() { + var e = this; + + navigator.sendBeacon && (L(window, 'beforeunload', this.beforeUnloadCallback), L(document, 'visibilitychange', (function() { + 'hidden' === document.visibilityState && e.flush('visibility_hidden'); + })), L(window, 'beforeunload', (function() { + return e.flush('before_unload'); + }))); + }, e; + }(); var Je = 'datadog-browser-sdk-failed-send-beacon'; + + function ze(t, n, r) { + if ($('failed-sendbeacon')) { + var o; var i; var s = {reason: r, endpointType: t, version: '4.11.5', connection: navigator.connection ? navigator.connection.effectiveType : void 0, onLine: navigator.onLine, size: n}; + + 'before_unload' === r || 'visibility_hidden' === r ? window.localStorage.setItem(''.concat(Je, '-').concat(h()), JSON.stringify(s)) : (f(e.debug, o = 'failed sendBeacon', i = s), Ne(p({message: o, status: 'debug'}, i))); + } + } var Ve = function() { + function e(e, t) { + this.endpointBuilder = e, this.bytesLimit = t; + } return e.prototype.send = function(e, t, n) { + var r = this.endpointBuilder.build(); + + if (!!navigator.sendBeacon && t < this.bytesLimit) + try { + if (navigator.sendBeacon(r, e)) + return; ze(this.endpointBuilder.endpointType, t, n); + } catch (e) { + !function(e) { + $e || ($e = !0, Pe(e)); + }(e); + } var o = new XMLHttpRequest; + + o.open('POST', r, !0), o.send(e); + }, e; + }(); var $e = !1; + + function We(e, t, n) { + var r; var o = i(t); + + function i(t) { + return new He(new Ve(t, e.batchBytesLimit), e.batchMessagesLimit, e.batchBytesLimit, e.messageBytesLimit, e.flushTimeout); + } return n && (r = i(n)), {add: function(e, t) { + void 0 === t && (t = !0), o.add(e), r && t && r.add(e); + }}; + } var Ge = 1 / 0; var Xe = function() { + function e(e) { + var t = this; + + this.expireDelay = e, this.entries = [], this.clearOldContextsInterval = setInterval((function() { + return t.clearOldContexts(); + }), 6e4); + } return e.prototype.add = function(e, t) { + var n = this; var r = {context: e, startTime: t, endTime: Ge, remove: function() { + var e = n.entries.indexOf(r); + + e >= 0 && n.entries.splice(e, 1); + }, close: function(e) { + r.endTime = e; + }}; + + return this.entries.unshift(r), r; + }, e.prototype.find = function(e) { + void 0 === e && (e = Ge); for (var t = 0, n = this.entries; t < n.length; t++) { + var r = n[t]; + + if (r.startTime <= e) { + if (e <= r.endTime) + return r.context; break; + } + } + }, e.prototype.closeActive = function(e) { + var t = this.entries[0]; + + t && t.endTime === Ge && t.close(e); + }, e.prototype.findAll = function(e) { + return void 0 === e && (e = Ge), this.entries.filter((function(t) { + return t.startTime <= e && e <= t.endTime; + })).map((function(e) { + return e.context; + })); + }, e.prototype.reset = function() { + this.entries = []; + }, e.prototype.stop = function() { + clearInterval(this.clearOldContextsInterval); + }, e.prototype.clearOldContexts = function() { + for (var e = A() - this.expireDelay; this.entries.length > 0 && this.entries[this.entries.length - 1].endTime < e;) + this.entries.pop(); + }, e; + }(); var Ke; var Qe = 144e5; var Ye = 9e5; var Ze = /^([a-z]+)=([a-z0-9-]+)$/; var et = '&'; var tt = '_dd_s'; var nt = []; + + function rt(e, t) { + var n; + + if (void 0 === t && (t = 0), Ke || (Ke = e), e === Ke) + if (t >= 100) + st(); else { + var r; var o = ut(); + + if (ot()) { + if (o.lock) + return void it(e, t); if (r = h(), o.lock = r, ct(o, e.options), (o = ut()).lock !== r) + return void it(e, t); + } var i = e.process(o); + + if (ot() && (o = ut()).lock !== r) + it(e, t); else { + if (i && at(i, e.options), ot() && (!i || !ft(i))) { + if ((o = ut()).lock !== r) + return void it(e, t); delete o.lock, ct(o, e.options), i = o; + }null === (n = e.after) || void 0 === n || n.call(e, i || o), st(); + } + } else + nt.push(e); + } function ot() { + return !!window.chrome || (/HeadlessChrome/).test(window.navigator.userAgent); + } function it(e, t) { + setTimeout(c((function() { + rt(e, t + 1); + })), 10); + } function st() { + Ke = void 0; var e = nt.shift(); + + e && rt(e); + } function at(e, t) { + ft(e) ? function(e) { + J(tt, '', 0, e); + }(t) : (e.expire = String(Date.now() + Ye), ct(e, t)); + } function ct(e, t) { + J(tt, function(e) { + return (t = e, Object.keys(t).map((function(e) { + return [ e, t[e] ]; + }))).map((function(e) { + var t = e[0]; var n = e[1]; + + return ''.concat(t, '=').concat(n); + })).join(et); var t; + }(e), Ye, t); + } function ut() { + var e = z(tt); var t = {}; + + return function(e) { + return void 0 !== e && (-1 !== e.indexOf(et) || Ze.test(e)); + }(e) && e.split(et).forEach((function(e) { + var n = Ze.exec(e); + + if (null !== n) { + var r = n[1]; var o = n[2]; + + t[r] = o; + } + })), t; + } function ft(e) { + return t = e, 0 === Object.keys(t).length; var t; + } function lt(e, t, n) { + var r = new ke; var o = new ke; var i = setInterval(c((function() { + rt({options: e, process: function(e) { + return f(e) ? void 0 : {}; + }, after: a}); + })), 1e3); var s = function() { + var e = ut(); + + if (f(e)) + return e; return {}; + }(); + + function a(e) { + return f(e) || (e = {}), u() && (!function(e) { + return s.id !== e.id || s[t] !== e[t]; + }(e) ? s = e : (s = {}, o.notify())), e; + } function u() { + return void 0 !== s[t]; + } function f(e) { + return (void 0 === e.created || Date.now() - Number(e.created) < Qe) && (void 0 === e.expire || Date.now() < Number(e.expire)); + } return {expandOrRenewSession: v(c((function() { + var o; + + rt({options: e, process: function(e) { + var r = a(e); + + return o = function(e) { + var r = n(e[t]); var o = r.trackingType; var i = r.isTracked; + + e[t] = o, i && !e.id && (e.id = h(), e.created = String(Date.now())); return i; + }(r), r; + }, after: function(e) { + o && !u() && function(e) { + s = e, r.notify(); + }(e), s = e; + }}); + })), 1e3).throttled, expandSession: function() { + rt({options: e, process: function(e) { + return u() ? a(e) : void 0; + }}); + }, getSession: function() { + return s; + }, renewObservable: r, expireObservable: o, stop: function() { + clearInterval(i); + }}; + } var dt = []; + + function vt(e, t, n) { + !function(e) { + var t = z(tt); var n = z('_dd'); var r = z('_dd_r'); var o = z('_dd_l'); + + if (!t) { + var i = {}; + + n && (i.id = n), o && (/^[01]$/).test(o) && (i.logs = o), r && (/^[012]$/).test(r) && (i.rum = r), at(i, e); + } + }(e); var r = lt(e, t, n); + + dt.push((function() { + return r.stop(); + })); var o; var i = new Xe(144e5); + + function s() { + return {id: r.getSession().id, trackingType: r.getSession()[t]}; + } return dt.push((function() { + return i.stop(); + })), r.renewObservable.subscribe((function() { + i.add(s(), A()); + })), r.expireObservable.subscribe((function() { + i.closeActive(A()); + })), r.expandOrRenewSession(), i.add(s(), [ 0, D() ][0]), o = C(window, [ 'click', 'touchstart', 'keydown', 'scroll' ], (function() { + return r.expandOrRenewSession(); + }), {capture: !0, passive: !0}).stop, dt.push(o), function(e) { + var t = c((function() { + 'visible' === document.visibilityState && e(); + })); var n = L(document, 'visibilitychange', t).stop; + + dt.push(n); var r = setInterval(t, 6e4); + + dt.push((function() { + clearInterval(r); + })); + }((function() { + return r.expandSession(); + })), {findActiveSession: function(e) { + return i.find(e); + }, renewObservable: r.renewObservable, expireObservable: r.expireObservable}; + } var pt; + + function ht(e) { + var t = vt(e.cookieOptions, 'logs', (function(t) { + return function(e, t) { + var n = function(e) { + return '0' === e || '1' === e; + }(t) ? t : gt(e); + + return {trackingType: n, isTracked: '1' === n}; + }(e, t); + })); + + return {findTrackedSession: function(e) { + var n = t.findActiveSession(e); + + return n && '1' === n.trackingType ? {id: n.id} : void 0; + }}; + } function gt(e) { + return g(e.sampleRate) ? '1' : '0'; + } var bt = ((pt = {})[Te.debug] = 0, pt[Te.info] = 1, pt[Te.warn] = 2, pt[Te.error] = 3, pt); + + function mt(e, t, n) { + var r = n.getHandler(); var o = Array.isArray(r) ? r : [r]; + + return bt[e] >= bt[n.getLevel()] && w(o, t); + } function yt(e, t, n, r, o) { + var i = _e.concat(['custom']); var s = {}; + + i.forEach((function(e) { + var r; var o; var i; var a; var c; + + s[e] = (r = e, o = t.eventRateLimiterThreshold, i = function(e) { + return function(e, t) { + t.notify(0, {rawLogsEvent: {message: e.message, date: e.startClocks.timeStamp, error: {origin: de}, origin: de, status: Te.error}}); + }(e, n); + }, a = 0, c = !1, {isLimitReached: function() { + if (0 === a && setTimeout((function() { + a = 0; + }), d), (a += 1) <= o || c) + return c = !1, !1; if (a === o + 1) { + c = !0; try { + i({message: 'Reached max number of '.concat(r, 's by minute: ').concat(o), source: de, startClocks: I()}); + } finally { + c = !1; + } + } return !0; + }}); + })), n.subscribe(0, (function(i) { + var a; var c; var u; var f = i.rawLogsEvent; var l = i.messageContext; var d = void 0 === l ? void 0 : l; var v = i.savedCommonContext; var p = void 0 === v ? void 0 : v; var h = i.logger; var g = void 0 === h ? o : h; var b = f.date - D(); var m = e.findTrackedSession(b); + + if (m) { + var y = p || r(); var w = R({service: t.service, session_id: m.id, view: y.view}, y.context, wt(b), f, g.getContext(), d); + + !mt(f.status, Be, g) || !1 === (null === (a = t.beforeSend) || void 0 === a ? void 0 : a.call(t, w)) || (null === (c = w.error) || void 0 === c ? void 0 : c.origin) !== de && (null !== (u = s[w.status]) && void 0 !== u ? u : s.custom).isLimitReached() || n.notify(1, w); + } + })); + } function wt(e) { + var t = window.DD_RUM; + + return t && t.getInternalContext ? t.getInternalContext(e) : void 0; + } var kt; var xt = {}; + + function Et(e) { + var t = e.map((function(e) { + return xt[e] || (xt[e] = function(e) { + var t = new ke((function() { + var n = console[e]; + + return console[e] = function() { + for (var r = [], o = 0; o < arguments.length; o++) + r[o] = arguments[o]; n.apply(console, r); var i = we(); + + u((function() { + t.notify(St(r, e, i)); + })); + }, function() { + console[e] = n; + }; + })); + + return t; + }(e)), xt[e]; + })); + + return xe.apply(void 0, t); + } function St(t, n, r) { + var o; var i = t.map((function(e) { + return function(e) { + if ('string' == typeof e) + return e; if (e instanceof Error) + return ye(ie(e)); return m(e, void 0, 2); + }(e); + })).join(' '); + + if (n === e.error) { + var s = function(e, t) { + for (var n = 0; n < e.length; n += 1) { + var r = e[n]; + + if (t(r, n, e)) + return r; + } + }(t, (function(e) { + return e instanceof Error; + })); + + o = s ? me(ie(s)) : void 0, i = 'console error: '.concat(i); + } return {api: n, message: i, stack: o, handlingStack: r}; + } var Lt; var Ct = ((kt = {})[e.log] = Te.info, kt[e.debug] = Te.debug, kt[e.info] = Te.info, kt[e.warn] = Te.warn, kt[e.error] = Te.error, kt); var Ot; var Tt = ((Lt = {})[Ee.cspViolation] = Te.error, Lt[Ee.intervention] = Te.error, Lt[Ee.deprecation] = Te.warn, Lt); + + function Rt(e, t, n) { + var r = e[t]; var o = n(r); var i = function() { + return o.apply(this, arguments); + }; + + return e[t] = i, {stop: function() { + e[t] === i ? e[t] = r : o = r; + }}; + } function Bt(e, t, n) { + var r = n.before; var o = n.after; + + return Rt(e, t, (function(e) { + return function() { + var t; var n = arguments; + + return r && u(r, this, n), 'function' == typeof e && (t = e.apply(this, n)), o && u(o, this, n), t; + }; + })); + } var _t; var jt = new WeakMap; + + function Mt() { + var e; + + return Ot || (e = new ke((function() { + var t = Bt(XMLHttpRequest.prototype, 'open', {before: At}).stop; var n = Bt(XMLHttpRequest.prototype, 'send', {before: function() { + It.call(this, e); + }}).stop; var r = Bt(XMLHttpRequest.prototype, 'abort', {before: Ut}).stop; + + return function() { + t(), n(), r(); + }; + })), Ot = e), Ot; + } function At(e, t) { + jt.set(this, {state: 'open', method: e, url: W(t.toString())}); + } function It(e) { + var t = this; var n = jt.get(this); + + if (n) { + var r = n; + + r.state = 'start', r.startTime = A(), r.startClocks = I(), r.isAborted = !1, r.xhr = this; var o = !1; var i = Bt(this, 'onreadystatechange', {before: function() { + this.readyState === XMLHttpRequest.DONE && s(); + }}).stop; var s = c((function() { + if (t.removeEventListener('loadend', s), i(), !o) { + o = !0; var a = n; + + a.state = 'complete', a.duration = U(r.startClocks.timeStamp, M()), a.status = t.status, e.notify(p({}, a)); + } + })); + + this.addEventListener('loadend', s), e.notify(r); + } + } function Ut() { + var e = jt.get(this); + + e && (e.isAborted = !0); + } function Dt() { + var e; + + return _t || (e = new ke((function() { + if (window.fetch) + return Rt(window, 'fetch', (function(t) { + return function(n, r) { + var o; var i = u(Pt, null, [ e, n, r ]); + + return i ? (o = t.call(this, i.input, i.init), u(Nt, null, [ e, o, i ])) : o = t.call(this, n, r), o; + }; + })).stop; + })), _t = e), _t; + } function Pt(e, t, n) { + var r = n && n.method || 'object' == typeof t && t.method || 'GET'; var o = W('object' == typeof t && t.url || t); var i = {state: 'start', init: n, input: t, method: r, startClocks: I(), url: o}; + + return e.notify(i), i; + } function Nt(e, t, n) { + var r = function(t) { + var r = n; + + r.state = 'complete', r.duration = U(r.startClocks.timeStamp, M()), 'stack' in t || t instanceof Error ? (r.status = 0, r.isAborted = t instanceof DOMException && t.code === DOMException.ABORT_ERR, r.error = t, e.notify(r)) : 'status' in t && (r.response = t, r.responseType = t.type, r.status = t.status, r.isAborted = !1, e.notify(r)); + }; + + t.then(c(r), c(r)); + } function qt(e, t) { + if (!e.forwardErrorsToLogs) + return {stop: b}; var n = Mt().subscribe((function(e) { + 'complete' === e.state && o('xhr', e); + })); var r = Dt().subscribe((function(e) { + 'complete' === e.state && o('fetch', e); + })); + + function o(n, r) { + function o(e) { + t.notify(0, {rawLogsEvent: {message: ''.concat(Ht(n), ' error ').concat(r.method, ' ').concat(r.url), date: r.startClocks.timeStamp, error: {origin: he, stack: e || 'Failed to load'}, http: {method: r.method, status_code: r.status, url: r.url}, status: Te.error, origin: he}}); + }e.isIntakeUrl(r.url) || !function(e) { + return 0 === e.status && 'opaque' !== e.responseType; + }(r) && !function(e) { + return e.status >= 500; + }(r) || ('xhr' in r ? function(e, t, n) { + 'string' == typeof e.response ? n(Ft(e.response, t)) : n(e.response); + }(r.xhr, e, o) : r.response ? function(e, t, n) { + window.TextDecoder ? e.body ? function(e, t, n) { + !function(e, t, n) { + var r = e.getReader(); var o = []; var i = 0; + + function s() { + r.read().then(c((function(e) { + e.done ? a() : (o.push(e.value), (i += e.value.length) > t ? a() : s()); + })), c((function(e) { + return n(e); + }))); + } function a() { + var e; + + if (r.cancel().catch(b), 1 === o.length) + e = o[0]; else { + e = new Uint8Array(i); var s = 0; + + o.forEach((function(t) { + e.set(t, s), s += t.length; + })); + }n(void 0, e.slice(0, t), e.length > t); + }s(); + }(e, t, (function(e, t, r) { + if (e) + n(e); else { + var o = (new TextDecoder).decode(t); + + r && (o += '...'), n(void 0, o); + } + })); + }(e.clone().body, t.requestErrorResponseLengthLimit, (function(e, t) { + n(e ? 'Unable to retrieve response: '.concat(e) : t); + })) : n() : e.clone().text().then(c((function(e) { + return n(Ft(e, t)); + })), c((function(e) { + return n('Unable to retrieve response: '.concat(e)); + }))); + }(r.response, e, o) : r.error && function(e, t, n) { + n(Ft(me(ie(e)), t)); + }(r.error, e, o)); + } return {stop: function() { + n.unsubscribe(), r.unsubscribe(); + }}; + } function Ft(e, t) { + return e.length > t.requestErrorResponseLengthLimit ? ''.concat(e.substring(0, t.requestErrorResponseLengthLimit), '...') : e; + } function Ht(e) { + return 'xhr' === e ? 'XHR' : 'Fetch'; + } var Jt = /^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/; + + function zt(e) { + var t = function(e) { + return Bt(window, 'onerror', {before: function(t, n, r, o, i) { + var s; + + if (i) + s = ie(i), e(s, i); else { + var a; var c = {url: n, column: o, line: r}; var u = t; + + if ('[object String]' === {}.toString.call(t)) { + var f = Jt.exec(u); + + f && (a = f[1], u = f[2]); + }e(s = {name: a, message: 'string' == typeof u ? u : void 0, stack: [c]}, t); + } + }}); + }(e).stop; var n = function(e) { + return Bt(window, 'onunhandledrejection', {before: function(t) { + var n = t.reason || 'Empty reason'; var r = ie(n); + + e(r, n); + }}); + }(e).stop; + + return {stop: function() { + t(), n(); + }}; + } function Vt(e) { + return zt((function(t, n) { + var r = function(e, t, n, r) { + return e && (void 0 !== e.message || t instanceof Error) ? {message: e.message || 'Empty message', stack: me(e), handlingStack: r, type: e.name} : {message: ''.concat(n, ' ').concat(m(t)), stack: 'No stack, consider using an instance of Error', handlingStack: r, type: e && e.name}; + }(t, n, 'Uncaught'); var o = r.stack; var i = r.message; var s = r.type; + + e.notify({message: i, stack: o, type: s, source: ge, startClocks: I(), originalError: n, handling: 'unhandled'}); + })); + } var $t = function() { + function e() { + this.callbacks = {}; + } return e.prototype.notify = function(e, t) { + var n = this.callbacks[e]; + + n && n.forEach((function(e) { + return e(t); + })); + }, e.prototype.subscribe = function(e, t) { + var n = this; + + return this.callbacks[e] || (this.callbacks[e] = []), this.callbacks[e].push(t), {unsubscribe: function() { + n.callbacks[e] = n.callbacks[e].filter((function(e) { + return t !== e; + })); + }}; + }, e; + }(); var Wt; var Gt; var Xt; var Kt; var Qt = function(n) { + var r; var o; var i = !1; var a = B(); var u = {}; var f = new j; var l = function(e, t, n, r) { + void 0 === n && (n = T(h())), void 0 === r && (r = M()), f.add((function() { + return l(e, t, n, r); + })); + }; var d = function() {}; var v = new je((function() { + for (var e = [], t = 0; t < arguments.length; t++) + e[t] = arguments[t]; return l.apply(void 0, e); + })); + + function h() { + return {view: {referrer: document.referrer, url: window.location.href}, context: a.get()}; + } return r = {logger: v, init: c((function(r) { + if (N() && (r = function(e) { + return p({}, e, {clientToken: 'empty'}); + }(r)), function(e) { + return !i || (e.silentMultipleInit || t.error('DD_LOGS is already initialized.'), !1); + }(r)) { + var o = function(t) { + var n = ne(t); var r = Ce(t.forwardConsoleLogs, x(e), 'Forward Console Logs'); var o = Ce(t.forwardReports, x(Ee), 'Forward Reports'); + + if (n && r && o) + return t.forwardErrorsToLogs && !w(r, e.error) && r.push(e.error), p({forwardErrorsToLogs: !1 !== t.forwardErrorsToLogs, forwardConsoleLogs: r, forwardReports: o, requestErrorResponseLengthLimit: 32768}, n); + }(r); + + o && (l = n(o, h, v).handleLog, d = function() { + return T(r); + }, f.drain(), i = !0); + } + })), getLoggerGlobalContext: c(a.get), setLoggerGlobalContext: c(a.set), addLoggerGlobalContext: c(a.add), removeLoggerGlobalContext: c(a.remove), createLogger: c((function(e, t) { + return void 0 === t && (t = {}), u[e] = new je((function() { + for (var e = [], t = 0; t < arguments.length; t++) + e[t] = arguments[t]; return l.apply(void 0, e); + }), e, t.handler, t.level, t.context), u[e]; + })), getLogger: c((function(e) { + return u[e]; + })), getInitConfiguration: c((function() { + return d(); + }))}, o = p({version: '4.11.5', onReady: function(e) { + e(); + }}, r), Object.defineProperty(o, '_setDebug', {get: function() { + return s; + }, enumerable: !1}), o; + }((function(n, r, o) { + var i = new $t; + + (function(e) { + var t; var n = De(e); + + if (N()) { + var r = P(); + + n.observable.subscribe((function(e) { + return r.send('internal_telemetry', e); + })); + } else { + var o = We(e, e.rumEndpointBuilder, null === (t = e.replica) || void 0 === t ? void 0 : t.rumEndpointBuilder); + + n.observable.subscribe((function(t) { + return o.add(t, function(e) { + return 'datad0g.com' === e.site; + }(e)); + })); + } return n; + })(n).setContextProvider((function() { + var e; var t; var n; var r; var o; var i; + + return {application: {id: null === (e = wt()) || void 0 === e ? void 0 : e.application_id}, session: {id: null === (t = a.findTrackedSession()) || void 0 === t ? void 0 : t.id}, view: {id: null === (r = null === (n = wt()) || void 0 === n ? void 0 : n.view) || void 0 === r ? void 0 : r.id}, action: {id: null === (i = null === (o = wt()) || void 0 === o ? void 0 : o.user_action) || void 0 === i ? void 0 : i.id}}; + })), qt(n, i), function(e, t) { + if (!e.forwardErrorsToLogs) + return {stop: b}; var n = new ke; var r = Vt(n).stop; var o = n.subscribe((function(e) { + t.notify(0, {rawLogsEvent: {message: e.message, date: e.startClocks.timeStamp, error: {kind: e.type, origin: ge, stack: e.stack}, origin: ge, status: Te.error}}); + })); + }(n, i), function(t, n) { + var r = Et(t.forwardConsoleLogs).subscribe((function(t) { + n.notify(0, {rawLogsEvent: {date: M(), message: t.message, origin: ve, error: t.api === e.error ? {origin: ve, stack: t.stack} : void 0, status: Ct[t.api]}}); + })); + }(n, i), function(e, t) { + var n = Se(e.forwardReports).subscribe((function(e) { + var n; var r = e.message; var o = Tt[e.type]; + + o === Te.error ? n = {kind: e.subtype, origin: be, stack: e.stack} : e.stack && (r += ' Found in '.concat(function(e) { + var t; + + return null === (t = (/@ (.+)/).exec(e)) || void 0 === t ? void 0 : t[1]; + }(e.stack))), t.notify(0, {rawLogsEvent: {date: M(), message: r, origin: be, error: n, status: o}}); + })); + }(n, i); var s = function(e) { + return {handleLog: function(n, r, o, i) { + var s = n.context; + + mt(n.status, Re, r) && t(n.status, n.message, R(r.getContext(), s)), e.notify(0, {rawLogsEvent: {date: i || M(), message: n.message, status: n.status, origin: pe}, messageContext: s, savedCommonContext: o, logger: r}); + }}; + }(i).handleLog; var a = function(e) { + if (void 0 === document.cookie || null === document.cookie) + return !1; try { + var n = 'dd_cookie_test_'.concat(h()); var r = 'test'; + + J(n, r, l, e); var o = z(n) === r; + + return V(n, e), o; + } catch (e) { + return t.error(e), !1; + } + }(n.cookieOptions) && !N() ? ht(n) : function(e) { + var t = '1' === gt(e) ? {} : void 0; + + return {findTrackedSession: function() { + return t; + }}; + }(n); + + return yt(a, n, i, r, o), N() ? function(e) { + var t = P(); + + e.subscribe(1, (function(e) { + t.send('log', e); + })); + }(i) : function(e, t) { + var n; var r = We(e, e.logsEndpointBuilder, null === (n = e.replica) || void 0 === n ? void 0 : n.logsEndpointBuilder); + + t.subscribe(1, (function(e) { + r.add(e); + })); + }(n, i), {handleLog: s}; + })); + + Wt = E(), Xt = Qt, Kt = Wt[Gt = 'DD_LOGS'], Wt[Gt] = Xt, Kt && Kt.q && Kt.q.forEach((function(e) { + return n(e, 'onReady callback threw an error:')(); + })); +}(); \ No newline at end of file diff --git a/app/assets/v2/js/lib/web3-1.7.5.min.js b/app/assets/v2/js/lib/web3-1.7.5.min.js new file mode 100644 index 00000000000..1a2a04e6ea1 --- /dev/null +++ b/app/assets/v2/js/lib/web3-1.7.5.min.js @@ -0,0 +1,74 @@ +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.Web3=t():e.Web3=t()}(window,(function(){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=254)}([function(e,t,r){"use strict";e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,r){"use strict";(function(e){ +/*! + * The buffer module from node.js, for the browser. + * + * @author Feross Aboukhadijeh + * @license MIT + */ +var n=r(264),i=r(265),o=r(130);function a(){return f.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(e,t){if(a()=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|e}function p(e,t){if(f.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return D(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return q(e).length;default:if(n)return D(e).length;t=(""+t).toLowerCase(),n=!0}}function b(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return R(this,t,r);case"utf8":case"utf-8":return x(this,t,r);case"ascii":return P(this,t,r);case"latin1":case"binary":return O(this,t,r);case"base64":return E(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function y(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function v(e,t,r,n,i){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof t&&(t=f.from(t,n)),f.isBuffer(t))return 0===t.length?-1:m(e,t,r,n,i);if("number"==typeof t)return t&=255,f.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):m(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function m(e,t,r,n,i){var o,a=1,s=e.length,f=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;a=2,s/=2,f/=2,r/=2}function u(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){var c=-1;for(o=r;os&&(r=s-f),o=r;o>=0;o--){for(var d=!0,l=0;li&&(n=i):n=i;var o=t.length;if(o%2!=0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var a=0;a>8,i=r%256,o.push(i),o.push(n);return o}(t,e.length-r),e,r,n)}function E(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function x(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i239?4:u>223?3:u>191?2:1;if(i+d<=r)switch(d){case 1:u<128&&(c=u);break;case 2:128==(192&(o=e[i+1]))&&(f=(31&u)<<6|63&o)>127&&(c=f);break;case 3:o=e[i+1],a=e[i+2],128==(192&o)&&128==(192&a)&&(f=(15&u)<<12|(63&o)<<6|63&a)>2047&&(f<55296||f>57343)&&(c=f);break;case 4:o=e[i+1],a=e[i+2],s=e[i+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&(f=(15&u)<<18|(63&o)<<12|(63&a)<<6|63&s)>65535&&f<1114112&&(c=f)}null===c?(c=65533,d=1):c>65535&&(c-=65536,n.push(c>>>10&1023|55296),c=56320|1023&c),n.push(c),i+=d}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);var r="",n=0;for(;n0&&(e=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(e+=" ... ")),""},f.prototype.compare=function(e,t,r,n,i){if(!f.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(this===e)return 0;for(var o=(i>>>=0)-(n>>>=0),a=(r>>>=0)-(t>>>=0),s=Math.min(o,a),u=this.slice(n,i),c=e.slice(t,r),d=0;di)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return g(this,e,t,r);case"utf8":case"utf-8":return w(this,e,t,r);case"ascii":return _(this,e,t,r);case"latin1":case"binary":return k(this,e,t,r);case"base64":return S(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},f.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function P(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;in)&&(r=n);for(var i="",o=t;or)throw new RangeError("Trying to access beyond buffer length")}function I(e,t,r,n,i,o){if(!f.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function B(e,t,r,n){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-r,2);i>>8*(n?i:1-i)}function C(e,t,r,n){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-r,4);i>>8*(n?i:3-i)&255}function j(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function U(e,t,r,n,o){return o||j(e,0,r,4),i.write(e,t,r,n,23,4),r+4}function N(e,t,r,n,o){return o||j(e,0,r,8),i.write(e,t,r,n,52,8),r+8}f.prototype.slice=function(e,t){var r,n=this.length;if((e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t0&&(i*=256);)n+=this[e+--t]*i;return n},f.prototype.readUInt8=function(e,t){return t||M(e,1,this.length),this[e]},f.prototype.readUInt16LE=function(e,t){return t||M(e,2,this.length),this[e]|this[e+1]<<8},f.prototype.readUInt16BE=function(e,t){return t||M(e,2,this.length),this[e]<<8|this[e+1]},f.prototype.readUInt32LE=function(e,t){return t||M(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},f.prototype.readUInt32BE=function(e,t){return t||M(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},f.prototype.readIntLE=function(e,t,r){e|=0,t|=0,r||M(e,t,this.length);for(var n=this[e],i=1,o=0;++o=(i*=128)&&(n-=Math.pow(2,8*t)),n},f.prototype.readIntBE=function(e,t,r){e|=0,t|=0,r||M(e,t,this.length);for(var n=t,i=1,o=this[e+--n];n>0&&(i*=256);)o+=this[e+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},f.prototype.readInt8=function(e,t){return t||M(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},f.prototype.readInt16LE=function(e,t){t||M(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},f.prototype.readInt16BE=function(e,t){t||M(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},f.prototype.readInt32LE=function(e,t){return t||M(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},f.prototype.readInt32BE=function(e,t){return t||M(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},f.prototype.readFloatLE=function(e,t){return t||M(e,4,this.length),i.read(this,e,!0,23,4)},f.prototype.readFloatBE=function(e,t){return t||M(e,4,this.length),i.read(this,e,!1,23,4)},f.prototype.readDoubleLE=function(e,t){return t||M(e,8,this.length),i.read(this,e,!0,52,8)},f.prototype.readDoubleBE=function(e,t){return t||M(e,8,this.length),i.read(this,e,!1,52,8)},f.prototype.writeUIntLE=function(e,t,r,n){(e=+e,t|=0,r|=0,n)||I(this,e,t,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[t]=255&e;++o=0&&(o*=256);)this[t+i]=e/o&255;return t+r},f.prototype.writeUInt8=function(e,t,r){return e=+e,t|=0,r||I(this,e,t,1,255,0),f.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},f.prototype.writeUInt16LE=function(e,t,r){return e=+e,t|=0,r||I(this,e,t,2,65535,0),f.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):B(this,e,t,!0),t+2},f.prototype.writeUInt16BE=function(e,t,r){return e=+e,t|=0,r||I(this,e,t,2,65535,0),f.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):B(this,e,t,!1),t+2},f.prototype.writeUInt32LE=function(e,t,r){return e=+e,t|=0,r||I(this,e,t,4,4294967295,0),f.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):C(this,e,t,!0),t+4},f.prototype.writeUInt32BE=function(e,t,r){return e=+e,t|=0,r||I(this,e,t,4,4294967295,0),f.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):C(this,e,t,!1),t+4},f.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*r-1);I(this,e,t,r,i-1,-i)}var o=0,a=1,s=0;for(this[t]=255&e;++o>0)-s&255;return t+r},f.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*r-1);I(this,e,t,r,i-1,-i)}var o=r-1,a=1,s=0;for(this[t+o]=255&e;--o>=0&&(a*=256);)e<0&&0===s&&0!==this[t+o+1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+r},f.prototype.writeInt8=function(e,t,r){return e=+e,t|=0,r||I(this,e,t,1,127,-128),f.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},f.prototype.writeInt16LE=function(e,t,r){return e=+e,t|=0,r||I(this,e,t,2,32767,-32768),f.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):B(this,e,t,!0),t+2},f.prototype.writeInt16BE=function(e,t,r){return e=+e,t|=0,r||I(this,e,t,2,32767,-32768),f.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):B(this,e,t,!1),t+2},f.prototype.writeInt32LE=function(e,t,r){return e=+e,t|=0,r||I(this,e,t,4,2147483647,-2147483648),f.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):C(this,e,t,!0),t+4},f.prototype.writeInt32BE=function(e,t,r){return e=+e,t|=0,r||I(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),f.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):C(this,e,t,!1),t+4},f.prototype.writeFloatLE=function(e,t,r){return U(this,e,t,!0,r)},f.prototype.writeFloatBE=function(e,t,r){return U(this,e,t,!1,r)},f.prototype.writeDoubleLE=function(e,t,r){return N(this,e,t,!0,r)},f.prototype.writeDoubleBE=function(e,t,r){return N(this,e,t,!1,r)},f.prototype.copy=function(e,t,r,n){if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t=0;--i)e[i+t]=this[i+r];else if(o<1e3||!f.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(o=t;o55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function q(e){return n.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(L,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function z(e,t,r,n){for(var i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}}).call(this,r(7))},function(e,t,r){"use strict";function n(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?(e.exports=n=function(e){return typeof e},e.exports.default=e.exports,e.exports.__esModule=!0):(e.exports=n=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.default=e.exports,e.exports.__esModule=!0),n(t)}e.exports=n,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,r){"use strict";(function(e){var t=r(0)(r(2));!function(e,n){function i(e,t){if(!e)throw new Error(t||"Assertion failed")}function o(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function a(e,t,r){if(a.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}var s;"object"===(0,t.default)(e)?e.exports=a:(void 0).BN=a,a.BN=a,a.wordSize=26;try{s="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:r(261).Buffer}catch(e){}function f(e,t){var r=e.charCodeAt(t);return r>=48&&r<=57?r-48:r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:void i(!1,"Invalid character in "+e)}function u(e,t,r){var n=f(e,r);return r-1>=t&&(n|=f(e,r-1)<<4),n}function c(e,t,r,n){for(var o=0,a=0,s=Math.min(e.length,r),f=t;f=49?u-49+10:u>=17?u-17+10:u,i(u>=0&&a0?e:t},a.min=function(e,t){return e.cmp(t)<0?e:t},a.prototype._init=function(e,r,n){if("number"==typeof e)return this._initNumber(e,r,n);if("object"===(0,t.default)(e))return this._initArray(e,r,n);"hex"===r&&(r=16),i(r===(0|r)&&r>=2&&r<=36);var o=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(o++,this.negative=1),o=0;n-=3)a=e[n]|e[n-1]<<8|e[n-2]<<16,this.words[o]|=a<>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===r)for(n=0,o=0;n>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this._strip()},a.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var n=0;n=t;n-=2)i=u(e,t,n)<=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;else for(n=(e.length-t)%2==0?t+1:t;n=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;this._strip()},a.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=t)n++;n--,i=i/t|0;for(var o=e.length-r,a=o%n,s=Math.min(o,o-a)+r,f=0,u=r;u1&&0===this.words[this.length-1];)this.length--;return this._normSign()},a.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{a.prototype[Symbol.for("nodejs.util.inspect.custom")]=l}catch(e){a.prototype.inspect=l}else a.prototype.inspect=l;function l(){return(this.red?""}var h=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],p=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],b=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];a.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var n=0,o=0,a=0;a>>24-n&16777215,(n+=2)>=26&&(n-=26,a--),r=0!==o||a!==this.length-1?h[6-f.length]+f+r:f+r}for(0!==o&&(r=o.toString(16)+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var u=p[e],c=b[e];r="";var d=this.clone();for(d.negative=0;!d.isZero();){var l=d.modrn(c).toString(e);r=(d=d.idivn(c)).isZero()?l+r:h[u-l.length]+l+r}for(this.isZero()&&(r="0"+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}i(!1,"Base should be between 2 and 36")},a.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&i(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},a.prototype.toJSON=function(){return this.toString(16,2)},s&&(a.prototype.toBuffer=function(e,t){return this.toArrayLike(s,e,t)}),a.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)};function y(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var i=0|e.words[0],o=0|t.words[0],a=i*o,s=67108863&a,f=a/67108864|0;r.words[0]=s;for(var u=1;u>>26,d=67108863&f,l=Math.min(u,t.length-1),h=Math.max(0,u-e.length+1);h<=l;h++){var p=u-h|0;c+=(a=(i=0|e.words[p])*(o=0|t.words[h])+d)/67108864|0,d=67108863&a}r.words[u]=0|d,f=0|c}return 0!==f?r.words[u]=0|f:r.length--,r._strip()}a.prototype.toArrayLike=function(e,t,r){this._strip();var n=this.byteLength(),o=r||Math.max(1,n);i(n<=o,"byte array longer than desired length"),i(o>0,"Requested array length <= 0");var a=function(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t)}(e,o);return this["_toArrayLike"+("le"===t?"LE":"BE")](a,n),a},a.prototype._toArrayLikeLE=function(e,t){for(var r=0,n=0,i=0,o=0;i>8&255),r>16&255),6===o?(r>24&255),n=0,o=0):(n=a>>>24,o+=2)}if(r=0&&(e[r--]=a>>8&255),r>=0&&(e[r--]=a>>16&255),6===o?(r>=0&&(e[r--]=a>>24&255),n=0,o=0):(n=a>>>24,o+=2)}if(r>=0)for(e[r--]=n;r>=0;)e[r--]=0},Math.clz32?a.prototype._countBits=function(e){return 32-Math.clz32(e)}:a.prototype._countBits=function(e){var t=e,r=0;return t>=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},a.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 0==(8191&t)&&(r+=13,t>>>=13),0==(127&t)&&(r+=7,t>>>=7),0==(15&t)&&(r+=4,t>>>=4),0==(3&t)&&(r+=2,t>>>=2),0==(1&t)&&r++,r},a.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},a.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},a.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;re.length?this.clone().iand(e):e.clone().iand(this)},a.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},a.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;ne.length?this.clone().ixor(e):e.clone().ixor(this)},a.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},a.prototype.inotn=function(e){i("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var n=0;n0&&(this.words[n]=~this.words[n]&67108863>>26-r),this._strip()},a.prototype.notn=function(e){return this.clone().inotn(e)},a.prototype.setn=function(e,t){i("number"==typeof e&&e>=0);var r=e/26|0,n=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<e.length?(r=this,n=e):(r=e,n=this);for(var i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;oe.length?this.clone().iadd(e):e.clone().iadd(this)},a.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,n,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=e):(r=e,n=this);for(var o=0,a=0;a>26,this.words[a]=67108863&t;for(;0!==o&&a>26,this.words[a]=67108863&t;if(0===o&&a>>13,h=0|a[1],p=8191&h,b=h>>>13,y=0|a[2],v=8191&y,m=y>>>13,g=0|a[3],w=8191&g,_=g>>>13,k=0|a[4],S=8191&k,A=k>>>13,E=0|a[5],x=8191&E,P=E>>>13,O=0|a[6],R=8191&O,T=O>>>13,M=0|a[7],I=8191&M,B=M>>>13,C=0|a[8],j=8191&C,U=C>>>13,N=0|a[9],L=8191&N,F=N>>>13,D=0|s[0],q=8191&D,z=D>>>13,H=0|s[1],K=8191&H,G=H>>>13,V=0|s[2],W=8191&V,J=V>>>13,X=0|s[3],Z=8191&X,Y=X>>>13,$=0|s[4],Q=8191&$,ee=$>>>13,te=0|s[5],re=8191&te,ne=te>>>13,ie=0|s[6],oe=8191&ie,ae=ie>>>13,se=0|s[7],fe=8191&se,ue=se>>>13,ce=0|s[8],de=8191&ce,le=ce>>>13,he=0|s[9],pe=8191&he,be=he>>>13;r.negative=e.negative^t.negative,r.length=19;var ye=(u+(n=Math.imul(d,q))|0)+((8191&(i=(i=Math.imul(d,z))+Math.imul(l,q)|0))<<13)|0;u=((o=Math.imul(l,z))+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(p,q),i=(i=Math.imul(p,z))+Math.imul(b,q)|0,o=Math.imul(b,z);var ve=(u+(n=n+Math.imul(d,K)|0)|0)+((8191&(i=(i=i+Math.imul(d,G)|0)+Math.imul(l,K)|0))<<13)|0;u=((o=o+Math.imul(l,G)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(v,q),i=(i=Math.imul(v,z))+Math.imul(m,q)|0,o=Math.imul(m,z),n=n+Math.imul(p,K)|0,i=(i=i+Math.imul(p,G)|0)+Math.imul(b,K)|0,o=o+Math.imul(b,G)|0;var me=(u+(n=n+Math.imul(d,W)|0)|0)+((8191&(i=(i=i+Math.imul(d,J)|0)+Math.imul(l,W)|0))<<13)|0;u=((o=o+Math.imul(l,J)|0)+(i>>>13)|0)+(me>>>26)|0,me&=67108863,n=Math.imul(w,q),i=(i=Math.imul(w,z))+Math.imul(_,q)|0,o=Math.imul(_,z),n=n+Math.imul(v,K)|0,i=(i=i+Math.imul(v,G)|0)+Math.imul(m,K)|0,o=o+Math.imul(m,G)|0,n=n+Math.imul(p,W)|0,i=(i=i+Math.imul(p,J)|0)+Math.imul(b,W)|0,o=o+Math.imul(b,J)|0;var ge=(u+(n=n+Math.imul(d,Z)|0)|0)+((8191&(i=(i=i+Math.imul(d,Y)|0)+Math.imul(l,Z)|0))<<13)|0;u=((o=o+Math.imul(l,Y)|0)+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(S,q),i=(i=Math.imul(S,z))+Math.imul(A,q)|0,o=Math.imul(A,z),n=n+Math.imul(w,K)|0,i=(i=i+Math.imul(w,G)|0)+Math.imul(_,K)|0,o=o+Math.imul(_,G)|0,n=n+Math.imul(v,W)|0,i=(i=i+Math.imul(v,J)|0)+Math.imul(m,W)|0,o=o+Math.imul(m,J)|0,n=n+Math.imul(p,Z)|0,i=(i=i+Math.imul(p,Y)|0)+Math.imul(b,Z)|0,o=o+Math.imul(b,Y)|0;var we=(u+(n=n+Math.imul(d,Q)|0)|0)+((8191&(i=(i=i+Math.imul(d,ee)|0)+Math.imul(l,Q)|0))<<13)|0;u=((o=o+Math.imul(l,ee)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(x,q),i=(i=Math.imul(x,z))+Math.imul(P,q)|0,o=Math.imul(P,z),n=n+Math.imul(S,K)|0,i=(i=i+Math.imul(S,G)|0)+Math.imul(A,K)|0,o=o+Math.imul(A,G)|0,n=n+Math.imul(w,W)|0,i=(i=i+Math.imul(w,J)|0)+Math.imul(_,W)|0,o=o+Math.imul(_,J)|0,n=n+Math.imul(v,Z)|0,i=(i=i+Math.imul(v,Y)|0)+Math.imul(m,Z)|0,o=o+Math.imul(m,Y)|0,n=n+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(b,Q)|0,o=o+Math.imul(b,ee)|0;var _e=(u+(n=n+Math.imul(d,re)|0)|0)+((8191&(i=(i=i+Math.imul(d,ne)|0)+Math.imul(l,re)|0))<<13)|0;u=((o=o+Math.imul(l,ne)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(R,q),i=(i=Math.imul(R,z))+Math.imul(T,q)|0,o=Math.imul(T,z),n=n+Math.imul(x,K)|0,i=(i=i+Math.imul(x,G)|0)+Math.imul(P,K)|0,o=o+Math.imul(P,G)|0,n=n+Math.imul(S,W)|0,i=(i=i+Math.imul(S,J)|0)+Math.imul(A,W)|0,o=o+Math.imul(A,J)|0,n=n+Math.imul(w,Z)|0,i=(i=i+Math.imul(w,Y)|0)+Math.imul(_,Z)|0,o=o+Math.imul(_,Y)|0,n=n+Math.imul(v,Q)|0,i=(i=i+Math.imul(v,ee)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,ee)|0,n=n+Math.imul(p,re)|0,i=(i=i+Math.imul(p,ne)|0)+Math.imul(b,re)|0,o=o+Math.imul(b,ne)|0;var ke=(u+(n=n+Math.imul(d,oe)|0)|0)+((8191&(i=(i=i+Math.imul(d,ae)|0)+Math.imul(l,oe)|0))<<13)|0;u=((o=o+Math.imul(l,ae)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(I,q),i=(i=Math.imul(I,z))+Math.imul(B,q)|0,o=Math.imul(B,z),n=n+Math.imul(R,K)|0,i=(i=i+Math.imul(R,G)|0)+Math.imul(T,K)|0,o=o+Math.imul(T,G)|0,n=n+Math.imul(x,W)|0,i=(i=i+Math.imul(x,J)|0)+Math.imul(P,W)|0,o=o+Math.imul(P,J)|0,n=n+Math.imul(S,Z)|0,i=(i=i+Math.imul(S,Y)|0)+Math.imul(A,Z)|0,o=o+Math.imul(A,Y)|0,n=n+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(_,Q)|0,o=o+Math.imul(_,ee)|0,n=n+Math.imul(v,re)|0,i=(i=i+Math.imul(v,ne)|0)+Math.imul(m,re)|0,o=o+Math.imul(m,ne)|0,n=n+Math.imul(p,oe)|0,i=(i=i+Math.imul(p,ae)|0)+Math.imul(b,oe)|0,o=o+Math.imul(b,ae)|0;var Se=(u+(n=n+Math.imul(d,fe)|0)|0)+((8191&(i=(i=i+Math.imul(d,ue)|0)+Math.imul(l,fe)|0))<<13)|0;u=((o=o+Math.imul(l,ue)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(j,q),i=(i=Math.imul(j,z))+Math.imul(U,q)|0,o=Math.imul(U,z),n=n+Math.imul(I,K)|0,i=(i=i+Math.imul(I,G)|0)+Math.imul(B,K)|0,o=o+Math.imul(B,G)|0,n=n+Math.imul(R,W)|0,i=(i=i+Math.imul(R,J)|0)+Math.imul(T,W)|0,o=o+Math.imul(T,J)|0,n=n+Math.imul(x,Z)|0,i=(i=i+Math.imul(x,Y)|0)+Math.imul(P,Z)|0,o=o+Math.imul(P,Y)|0,n=n+Math.imul(S,Q)|0,i=(i=i+Math.imul(S,ee)|0)+Math.imul(A,Q)|0,o=o+Math.imul(A,ee)|0,n=n+Math.imul(w,re)|0,i=(i=i+Math.imul(w,ne)|0)+Math.imul(_,re)|0,o=o+Math.imul(_,ne)|0,n=n+Math.imul(v,oe)|0,i=(i=i+Math.imul(v,ae)|0)+Math.imul(m,oe)|0,o=o+Math.imul(m,ae)|0,n=n+Math.imul(p,fe)|0,i=(i=i+Math.imul(p,ue)|0)+Math.imul(b,fe)|0,o=o+Math.imul(b,ue)|0;var Ae=(u+(n=n+Math.imul(d,de)|0)|0)+((8191&(i=(i=i+Math.imul(d,le)|0)+Math.imul(l,de)|0))<<13)|0;u=((o=o+Math.imul(l,le)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(L,q),i=(i=Math.imul(L,z))+Math.imul(F,q)|0,o=Math.imul(F,z),n=n+Math.imul(j,K)|0,i=(i=i+Math.imul(j,G)|0)+Math.imul(U,K)|0,o=o+Math.imul(U,G)|0,n=n+Math.imul(I,W)|0,i=(i=i+Math.imul(I,J)|0)+Math.imul(B,W)|0,o=o+Math.imul(B,J)|0,n=n+Math.imul(R,Z)|0,i=(i=i+Math.imul(R,Y)|0)+Math.imul(T,Z)|0,o=o+Math.imul(T,Y)|0,n=n+Math.imul(x,Q)|0,i=(i=i+Math.imul(x,ee)|0)+Math.imul(P,Q)|0,o=o+Math.imul(P,ee)|0,n=n+Math.imul(S,re)|0,i=(i=i+Math.imul(S,ne)|0)+Math.imul(A,re)|0,o=o+Math.imul(A,ne)|0,n=n+Math.imul(w,oe)|0,i=(i=i+Math.imul(w,ae)|0)+Math.imul(_,oe)|0,o=o+Math.imul(_,ae)|0,n=n+Math.imul(v,fe)|0,i=(i=i+Math.imul(v,ue)|0)+Math.imul(m,fe)|0,o=o+Math.imul(m,ue)|0,n=n+Math.imul(p,de)|0,i=(i=i+Math.imul(p,le)|0)+Math.imul(b,de)|0,o=o+Math.imul(b,le)|0;var Ee=(u+(n=n+Math.imul(d,pe)|0)|0)+((8191&(i=(i=i+Math.imul(d,be)|0)+Math.imul(l,pe)|0))<<13)|0;u=((o=o+Math.imul(l,be)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(L,K),i=(i=Math.imul(L,G))+Math.imul(F,K)|0,o=Math.imul(F,G),n=n+Math.imul(j,W)|0,i=(i=i+Math.imul(j,J)|0)+Math.imul(U,W)|0,o=o+Math.imul(U,J)|0,n=n+Math.imul(I,Z)|0,i=(i=i+Math.imul(I,Y)|0)+Math.imul(B,Z)|0,o=o+Math.imul(B,Y)|0,n=n+Math.imul(R,Q)|0,i=(i=i+Math.imul(R,ee)|0)+Math.imul(T,Q)|0,o=o+Math.imul(T,ee)|0,n=n+Math.imul(x,re)|0,i=(i=i+Math.imul(x,ne)|0)+Math.imul(P,re)|0,o=o+Math.imul(P,ne)|0,n=n+Math.imul(S,oe)|0,i=(i=i+Math.imul(S,ae)|0)+Math.imul(A,oe)|0,o=o+Math.imul(A,ae)|0,n=n+Math.imul(w,fe)|0,i=(i=i+Math.imul(w,ue)|0)+Math.imul(_,fe)|0,o=o+Math.imul(_,ue)|0,n=n+Math.imul(v,de)|0,i=(i=i+Math.imul(v,le)|0)+Math.imul(m,de)|0,o=o+Math.imul(m,le)|0;var xe=(u+(n=n+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,be)|0)+Math.imul(b,pe)|0))<<13)|0;u=((o=o+Math.imul(b,be)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(L,W),i=(i=Math.imul(L,J))+Math.imul(F,W)|0,o=Math.imul(F,J),n=n+Math.imul(j,Z)|0,i=(i=i+Math.imul(j,Y)|0)+Math.imul(U,Z)|0,o=o+Math.imul(U,Y)|0,n=n+Math.imul(I,Q)|0,i=(i=i+Math.imul(I,ee)|0)+Math.imul(B,Q)|0,o=o+Math.imul(B,ee)|0,n=n+Math.imul(R,re)|0,i=(i=i+Math.imul(R,ne)|0)+Math.imul(T,re)|0,o=o+Math.imul(T,ne)|0,n=n+Math.imul(x,oe)|0,i=(i=i+Math.imul(x,ae)|0)+Math.imul(P,oe)|0,o=o+Math.imul(P,ae)|0,n=n+Math.imul(S,fe)|0,i=(i=i+Math.imul(S,ue)|0)+Math.imul(A,fe)|0,o=o+Math.imul(A,ue)|0,n=n+Math.imul(w,de)|0,i=(i=i+Math.imul(w,le)|0)+Math.imul(_,de)|0,o=o+Math.imul(_,le)|0;var Pe=(u+(n=n+Math.imul(v,pe)|0)|0)+((8191&(i=(i=i+Math.imul(v,be)|0)+Math.imul(m,pe)|0))<<13)|0;u=((o=o+Math.imul(m,be)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,n=Math.imul(L,Z),i=(i=Math.imul(L,Y))+Math.imul(F,Z)|0,o=Math.imul(F,Y),n=n+Math.imul(j,Q)|0,i=(i=i+Math.imul(j,ee)|0)+Math.imul(U,Q)|0,o=o+Math.imul(U,ee)|0,n=n+Math.imul(I,re)|0,i=(i=i+Math.imul(I,ne)|0)+Math.imul(B,re)|0,o=o+Math.imul(B,ne)|0,n=n+Math.imul(R,oe)|0,i=(i=i+Math.imul(R,ae)|0)+Math.imul(T,oe)|0,o=o+Math.imul(T,ae)|0,n=n+Math.imul(x,fe)|0,i=(i=i+Math.imul(x,ue)|0)+Math.imul(P,fe)|0,o=o+Math.imul(P,ue)|0,n=n+Math.imul(S,de)|0,i=(i=i+Math.imul(S,le)|0)+Math.imul(A,de)|0,o=o+Math.imul(A,le)|0;var Oe=(u+(n=n+Math.imul(w,pe)|0)|0)+((8191&(i=(i=i+Math.imul(w,be)|0)+Math.imul(_,pe)|0))<<13)|0;u=((o=o+Math.imul(_,be)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(L,Q),i=(i=Math.imul(L,ee))+Math.imul(F,Q)|0,o=Math.imul(F,ee),n=n+Math.imul(j,re)|0,i=(i=i+Math.imul(j,ne)|0)+Math.imul(U,re)|0,o=o+Math.imul(U,ne)|0,n=n+Math.imul(I,oe)|0,i=(i=i+Math.imul(I,ae)|0)+Math.imul(B,oe)|0,o=o+Math.imul(B,ae)|0,n=n+Math.imul(R,fe)|0,i=(i=i+Math.imul(R,ue)|0)+Math.imul(T,fe)|0,o=o+Math.imul(T,ue)|0,n=n+Math.imul(x,de)|0,i=(i=i+Math.imul(x,le)|0)+Math.imul(P,de)|0,o=o+Math.imul(P,le)|0;var Re=(u+(n=n+Math.imul(S,pe)|0)|0)+((8191&(i=(i=i+Math.imul(S,be)|0)+Math.imul(A,pe)|0))<<13)|0;u=((o=o+Math.imul(A,be)|0)+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863,n=Math.imul(L,re),i=(i=Math.imul(L,ne))+Math.imul(F,re)|0,o=Math.imul(F,ne),n=n+Math.imul(j,oe)|0,i=(i=i+Math.imul(j,ae)|0)+Math.imul(U,oe)|0,o=o+Math.imul(U,ae)|0,n=n+Math.imul(I,fe)|0,i=(i=i+Math.imul(I,ue)|0)+Math.imul(B,fe)|0,o=o+Math.imul(B,ue)|0,n=n+Math.imul(R,de)|0,i=(i=i+Math.imul(R,le)|0)+Math.imul(T,de)|0,o=o+Math.imul(T,le)|0;var Te=(u+(n=n+Math.imul(x,pe)|0)|0)+((8191&(i=(i=i+Math.imul(x,be)|0)+Math.imul(P,pe)|0))<<13)|0;u=((o=o+Math.imul(P,be)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(L,oe),i=(i=Math.imul(L,ae))+Math.imul(F,oe)|0,o=Math.imul(F,ae),n=n+Math.imul(j,fe)|0,i=(i=i+Math.imul(j,ue)|0)+Math.imul(U,fe)|0,o=o+Math.imul(U,ue)|0,n=n+Math.imul(I,de)|0,i=(i=i+Math.imul(I,le)|0)+Math.imul(B,de)|0,o=o+Math.imul(B,le)|0;var Me=(u+(n=n+Math.imul(R,pe)|0)|0)+((8191&(i=(i=i+Math.imul(R,be)|0)+Math.imul(T,pe)|0))<<13)|0;u=((o=o+Math.imul(T,be)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(L,fe),i=(i=Math.imul(L,ue))+Math.imul(F,fe)|0,o=Math.imul(F,ue),n=n+Math.imul(j,de)|0,i=(i=i+Math.imul(j,le)|0)+Math.imul(U,de)|0,o=o+Math.imul(U,le)|0;var Ie=(u+(n=n+Math.imul(I,pe)|0)|0)+((8191&(i=(i=i+Math.imul(I,be)|0)+Math.imul(B,pe)|0))<<13)|0;u=((o=o+Math.imul(B,be)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(L,de),i=(i=Math.imul(L,le))+Math.imul(F,de)|0,o=Math.imul(F,le);var Be=(u+(n=n+Math.imul(j,pe)|0)|0)+((8191&(i=(i=i+Math.imul(j,be)|0)+Math.imul(U,pe)|0))<<13)|0;u=((o=o+Math.imul(U,be)|0)+(i>>>13)|0)+(Be>>>26)|0,Be&=67108863;var Ce=(u+(n=Math.imul(L,pe))|0)+((8191&(i=(i=Math.imul(L,be))+Math.imul(F,pe)|0))<<13)|0;return u=((o=Math.imul(F,be))+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,f[0]=ye,f[1]=ve,f[2]=me,f[3]=ge,f[4]=we,f[5]=_e,f[6]=ke,f[7]=Se,f[8]=Ae,f[9]=Ee,f[10]=xe,f[11]=Pe,f[12]=Oe,f[13]=Re,f[14]=Te,f[15]=Me,f[16]=Ie,f[17]=Be,f[18]=Ce,0!==u&&(f[19]=u,r.length++),r};function m(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,i=0,o=0;o>>26)|0)>>>26,a&=67108863}r.words[o]=s,n=a,a=i}return 0!==n?r.words[o]=n:r.length--,r._strip()}function g(e,t,r){return m(e,t,r)}function w(e,t){this.x=e,this.y=t}Math.imul||(v=y),a.prototype.mulTo=function(e,t){var r=this.length+e.length;return 10===this.length&&10===e.length?v(this,e,t):r<63?y(this,e,t):r<1024?m(this,e,t):g(this,e,t)},w.prototype.makeRBT=function(e){for(var t=new Array(e),r=a.prototype._countBits(e)-1,n=0;n>=1;return n},w.prototype.permute=function(e,t,r,n,i,o){for(var a=0;a>>=1)i++;return 1<>>=13,r[2*a+1]=8191&o,o>>>=13;for(a=2*t;a>=26,r+=o/67108864|0,r+=a>>>26,this.words[n]=67108863&a}return 0!==r&&(this.words[n]=r,this.length++),t?this.ineg():this},a.prototype.muln=function(e){return this.clone().imuln(e)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r>>i&1}return t}(e);if(0===t.length)return new a(1);for(var r=this,n=0;n=0);var t,r=e%26,n=(e-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var a=0;for(t=0;t>>26-r}a&&(this.words[t]=a,this.length++)}if(0!==n){for(t=this.length-1;t>=0;t--)this.words[t+n]=this.words[t];for(t=0;t=0),n=t?(t-t%26)/26:0;var o=e%26,a=Math.min((e-o)/26,this.length),s=67108863^67108863>>>o<a)for(this.length-=a,u=0;u=0&&(0!==c||u>=n);u--){var d=0|this.words[u];this.words[u]=c<<26-o|d>>>o,c=d&s}return f&&0!==c&&(f.words[f.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},a.prototype.ishrn=function(e,t,r){return i(0===this.negative),this.iushrn(e,t,r)},a.prototype.shln=function(e){return this.clone().ishln(e)},a.prototype.ushln=function(e){return this.clone().iushln(e)},a.prototype.shrn=function(e){return this.clone().ishrn(e)},a.prototype.ushrn=function(e){return this.clone().iushrn(e)},a.prototype.testn=function(e){i("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,n=1<=0);var t=e%26,r=(e-t)/26;if(i(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var n=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},a.prototype.isubn=function(e){if(i("number"==typeof e),i(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(f/67108864|0),this.words[n+r]=67108863&o}for(;n>26,this.words[n+r]=67108863&o;if(0===s)return this._strip();for(i(-1===s),s=0,n=0;n>26,this.words[n]=67108863&o;return this.negative=1,this._strip()},a.prototype._wordDiv=function(e,t){var r=(this.length,e.length),n=this.clone(),i=e,o=0|i.words[i.length-1];0!==(r=26-this._countBits(o))&&(i=i.ushln(r),n.iushln(r),o=0|i.words[i.length-1]);var s,f=n.length-i.length;if("mod"!==t){(s=new a(null)).length=f+1,s.words=new Array(s.length);for(var u=0;u=0;d--){var l=67108864*(0|n.words[i.length+d])+(0|n.words[i.length+d-1]);for(l=Math.min(l/o|0,67108863),n._ishlnsubmul(i,l,d);0!==n.negative;)l--,n.negative=0,n._ishlnsubmul(i,1,d),n.isZero()||(n.negative^=1);s&&(s.words[d]=l)}return s&&s._strip(),n._strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},a.prototype.divmod=function(e,t,r){return i(!e.isZero()),this.isZero()?{div:new a(0),mod:new a(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(n=s.div.neg()),"div"!==t&&(o=s.mod.neg(),r&&0!==o.negative&&o.iadd(e)),{div:n,mod:o}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(n=s.div.neg()),{div:n,mod:s.mod}):0!=(this.negative&e.negative)?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(o=s.mod.neg(),r&&0!==o.negative&&o.isub(e)),{div:s.div,mod:o}):e.length>this.length||this.cmp(e)<0?{div:new a(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new a(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new a(this.modrn(e.words[0]))}:this._wordDiv(e,t);var n,o,s},a.prototype.div=function(e){return this.divmod(e,"div",!1).div},a.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},a.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},a.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),i=e.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},a.prototype.modrn=function(e){var t=e<0;t&&(e=-e),i(e<=67108863);for(var r=(1<<26)%e,n=0,o=this.length-1;o>=0;o--)n=(r*n+(0|this.words[o]))%e;return t?-n:n},a.prototype.modn=function(e){return this.modrn(e)},a.prototype.idivn=function(e){var t=e<0;t&&(e=-e),i(e<=67108863);for(var r=0,n=this.length-1;n>=0;n--){var o=(0|this.words[n])+67108864*r;this.words[n]=o/e|0,r=o%e}return this._strip(),t?this.ineg():this},a.prototype.divn=function(e){return this.clone().idivn(e)},a.prototype.egcd=function(e){i(0===e.negative),i(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var n=new a(1),o=new a(0),s=new a(0),f=new a(1),u=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++u;for(var c=r.clone(),d=t.clone();!t.isZero();){for(var l=0,h=1;0==(t.words[0]&h)&&l<26;++l,h<<=1);if(l>0)for(t.iushrn(l);l-- >0;)(n.isOdd()||o.isOdd())&&(n.iadd(c),o.isub(d)),n.iushrn(1),o.iushrn(1);for(var p=0,b=1;0==(r.words[0]&b)&&p<26;++p,b<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||f.isOdd())&&(s.iadd(c),f.isub(d)),s.iushrn(1),f.iushrn(1);t.cmp(r)>=0?(t.isub(r),n.isub(s),o.isub(f)):(r.isub(t),s.isub(n),f.isub(o))}return{a:s,b:f,gcd:r.iushln(u)}},a.prototype._invmp=function(e){i(0===e.negative),i(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var n,o=new a(1),s=new a(0),f=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var u=0,c=1;0==(t.words[0]&c)&&u<26;++u,c<<=1);if(u>0)for(t.iushrn(u);u-- >0;)o.isOdd()&&o.iadd(f),o.iushrn(1);for(var d=0,l=1;0==(r.words[0]&l)&&d<26;++d,l<<=1);if(d>0)for(r.iushrn(d);d-- >0;)s.isOdd()&&s.iadd(f),s.iushrn(1);t.cmp(r)>=0?(t.isub(r),o.isub(s)):(r.isub(t),s.isub(o))}return(n=0===t.cmpn(1)?o:s).cmpn(0)<0&&n.iadd(e),n},a.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=t.cmp(r);if(i<0){var o=t;t=r,r=o}else if(0===i||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},a.prototype.invm=function(e){return this.egcd(e).a.umod(e)},a.prototype.isEven=function(){return 0==(1&this.words[0])},a.prototype.isOdd=function(){return 1==(1&this.words[0])},a.prototype.andln=function(e){return this.words[0]&e},a.prototype.bincn=function(e){i("number"==typeof e);var t=e%26,r=(e-t)/26,n=1<>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},a.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},a.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this._strip(),this.length>1)t=1;else{r&&(e=-e),i(e<=67108863,"Number is too big");var n=0|this.words[0];t=n===e?0:ne.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|e.words[r];if(n!==i){ni&&(t=1);break}}return t},a.prototype.gtn=function(e){return 1===this.cmpn(e)},a.prototype.gt=function(e){return 1===this.cmp(e)},a.prototype.gten=function(e){return this.cmpn(e)>=0},a.prototype.gte=function(e){return this.cmp(e)>=0},a.prototype.ltn=function(e){return-1===this.cmpn(e)},a.prototype.lt=function(e){return-1===this.cmp(e)},a.prototype.lten=function(e){return this.cmpn(e)<=0},a.prototype.lte=function(e){return this.cmp(e)<=0},a.prototype.eqn=function(e){return 0===this.cmpn(e)},a.prototype.eq=function(e){return 0===this.cmp(e)},a.red=function(e){return new P(e)},a.prototype.toRed=function(e){return i(!this.red,"Already a number in reduction context"),i(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},a.prototype.fromRed=function(){return i(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(e){return this.red=e,this},a.prototype.forceRed=function(e){return i(!this.red,"Already a number in reduction context"),this._forceRed(e)},a.prototype.redAdd=function(e){return i(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},a.prototype.redIAdd=function(e){return i(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},a.prototype.redSub=function(e){return i(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},a.prototype.redISub=function(e){return i(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},a.prototype.redShl=function(e){return i(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},a.prototype.redMul=function(e){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},a.prototype.redIMul=function(e){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},a.prototype.redSqr=function(){return i(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return i(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return i(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return i(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return i(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(e){return i(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var _={k256:null,p224:null,p192:null,p25519:null};function k(e,t){this.name=e,this.p=new a(t,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function S(){k.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function A(){k.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function E(){k.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function x(){k.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function P(e){if("string"==typeof e){var t=a._prime(e);this.m=t.p,this.prime=t}else i(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function O(e){P.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new a(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}k.prototype._tmp=function(){var e=new a(null);return e.words=new Array(Math.ceil(this.n/13)),e},k.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},k.prototype.split=function(e,t){e.iushrn(this.n,0,t)},k.prototype.imulK=function(e){return e.imul(this.k)},o(S,k),S.prototype.split=function(e,t){for(var r=Math.min(e.length,9),n=0;n>>22,i=o}i>>>=22,e.words[n-10]=i,0===i&&e.length>10?e.length-=10:e.length-=9},S.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},a._prime=function(e){if(_[e])return _[e];var t;if("k256"===e)t=new S;else if("p224"===e)t=new A;else if("p192"===e)t=new E;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new x}return _[e]=t,t},P.prototype._verify1=function(e){i(0===e.negative,"red works only with positives"),i(e.red,"red works only with red numbers")},P.prototype._verify2=function(e,t){i(0==(e.negative|t.negative),"red works only with positives"),i(e.red&&e.red===t.red,"red works only with red numbers")},P.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(d(e,e.umod(this.m)._forceRed(this)),e)},P.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},P.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},P.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},P.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},P.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},P.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},P.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},P.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},P.prototype.isqr=function(e){return this.imul(e,e.clone())},P.prototype.sqr=function(e){return this.mul(e,e)},P.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(i(t%2==1),3===t){var r=this.m.add(new a(1)).iushrn(2);return this.pow(e,r)}for(var n=this.m.subn(1),o=0;!n.isZero()&&0===n.andln(1);)o++,n.iushrn(1);i(!n.isZero());var s=new a(1).toRed(this),f=s.redNeg(),u=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new a(2*c*c).toRed(this);0!==this.pow(c,u).cmp(f);)c.redIAdd(f);for(var d=this.pow(c,n),l=this.pow(e,n.addn(1).iushrn(1)),h=this.pow(e,n),p=o;0!==h.cmp(s);){for(var b=h,y=0;0!==b.cmp(s);y++)b=b.redSqr();i(y=0;n--){for(var u=t.words[n],c=f-1;c>=0;c--){var d=u>>c&1;i!==r[0]&&(i=this.sqr(i)),0!==d||0!==o?(o<<=1,o|=d,(4===++s||0===n&&0===c)&&(i=this.mul(i,r[o]),s=0,o=0)):s=0}f=26}return i},P.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},P.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},a.mont=function(e){return new O(e)},o(O,P),O.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},O.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},O.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},O.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new a(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},O.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e)}).call(this,r(27)(e))},function(e,t,r){"use strict";"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}},function(e,t,r){"use strict"; +/*! safe-buffer. MIT License. Feross Aboukhadijeh */var n=r(1),i=n.Buffer;function o(e,t){for(var r in e)t[r]=e[r]}function a(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=n:(o(n,t),t.Buffer=a),a.prototype=Object.create(i.prototype),o(i,a),a.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,r)},a.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=i(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},a.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}},function(e,t,r){"use strict";var n,i,o=e.exports={};function a(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function f(e){if(n===setTimeout)return setTimeout(e,0);if((n===a||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:a}catch(e){n=a}try{i="function"==typeof clearTimeout?clearTimeout:s}catch(e){i=s}}();var u,c=[],d=!1,l=-1;function h(){d&&u&&(d=!1,u.length?c=u.concat(c):l=-1,c.length&&p())}function p(){if(!d){var e=f(h);d=!0;for(var t=c.length;t;){for(u=c,c=[];++l1)for(var r=1;r=256)return!1}return!0}function d(e,t){if(t||(t={}),"number"==typeof e){o.checkSafeUint53(e,"invalid arrayify value");for(var r=[];e;)r.unshift(255&e),e=parseInt(String(e/256));return 0===r.length&&r.push(0),s(new Uint8Array(r))}if(t.allowMissingPrefix&&"string"==typeof e&&"0x"!==e.substring(0,2)&&(e="0x"+e),a(e)&&(e=e.toHexString()),p(e)){var n=e.substring(2);n.length%2&&("left"===t.hexPad?n="0"+n:"right"===t.hexPad?n+="0":o.throwArgumentError("hex data is odd-length","value",e));for(var i=[],f=0;ft&&o.throwArgumentError("value out of range","value",arguments[0]);var r=new Uint8Array(t);return r.set(e,t-e.length),s(r)}function p(e,t){return!("string"!=typeof e||!e.match(/^0x[0-9A-Fa-f]*$/))&&(!t||e.length===2+2*t)}function b(e,t){if(t||(t={}),"number"==typeof e){o.checkSafeUint53(e,"invalid hexlify value");for(var r="";e;)r="0123456789abcdef"[15&e]+r,e=Math.floor(e/16);return r.length?(r.length%2&&(r="0"+r),"0x"+r):"0x00"}if("bigint"==typeof e)return(e=e.toString(16)).length%2?"0x0"+e:"0x"+e;if(t.allowMissingPrefix&&"string"==typeof e&&"0x"!==e.substring(0,2)&&(e="0x"+e),a(e))return e.toHexString();if(p(e))return e.length%2&&("left"===t.hexPad?e="0x0"+e.substring(2):"right"===t.hexPad?e+="0":o.throwArgumentError("hex data is odd-length","value",e)),e.toLowerCase();if(c(e)){for(var n="0x",i=0;i>4]+"0123456789abcdef"[15&s]}return n}return o.throwArgumentError("invalid hexlify value","value",e)}function y(e){"string"!=typeof e&&(e=b(e)),p(e)||o.throwArgumentError("invalid hex string","value",e),e=e.substring(2);for(var t=0;t2*t+2&&o.throwArgumentError("value out of range","value",arguments[1]);e.length<2*t+2;)e="0x0"+e.substring(2);return e}function m(e){var t={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(f(e)){var r=d(e);64===r.length?(t.v=27+(r[32]>>7),r[32]&=127,t.r=b(r.slice(0,32)),t.s=b(r.slice(32,64))):65===r.length?(t.r=b(r.slice(0,32)),t.s=b(r.slice(32,64)),t.v=r[64]):o.throwArgumentError("invalid signature string","signature",e),t.v<27&&(0===t.v||1===t.v?t.v+=27:o.throwArgumentError("signature invalid v byte","signature",e)),t.recoveryParam=1-t.v%2,t.recoveryParam&&(r[32]|=128),t._vs=b(r.slice(32,64))}else{if(t.r=e.r,t.s=e.s,t.v=e.v,t.recoveryParam=e.recoveryParam,t._vs=e._vs,null!=t._vs){var n=h(d(t._vs),32);t._vs=b(n);var i=n[0]>=128?1:0;null==t.recoveryParam?t.recoveryParam=i:t.recoveryParam!==i&&o.throwArgumentError("signature recoveryParam mismatch _vs","signature",e),n[0]&=127;var a=b(n);null==t.s?t.s=a:t.s!==a&&o.throwArgumentError("signature v mismatch _vs","signature",e)}if(null==t.recoveryParam)null==t.v?o.throwArgumentError("signature missing v and recoveryParam","signature",e):0===t.v||1===t.v?t.recoveryParam=t.v:t.recoveryParam=1-t.v%2;else if(null==t.v)t.v=27+t.recoveryParam;else{var s=0===t.v||1===t.v?t.v:1-t.v%2;t.recoveryParam!==s&&o.throwArgumentError("signature recoveryParam mismatch v","signature",e)}null!=t.r&&p(t.r)?t.r=v(t.r,32):o.throwArgumentError("signature missing or invalid r","signature",e),null!=t.s&&p(t.s)?t.s=v(t.s,32):o.throwArgumentError("signature missing or invalid s","signature",e);var u=d(t.s);u[0]>=128&&o.throwArgumentError("signature s out of range","signature",e),t.recoveryParam&&(u[0]|=128);var c=b(u);t._vs&&(p(t._vs)||o.throwArgumentError("signature invalid _vs","signature",e),t._vs=v(t._vs,32)),null==t._vs?t._vs=c:t._vs!==c&&o.throwArgumentError("signature _vs mismatch v and s","signature",e)}return t.yParityAndS=t._vs,t.compact=t.r+t.yParityAndS.substring(2),t}},function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.Logger=t.LogLevel=t.ErrorCode=void 0;var i=n(r(8)),o=n(r(9)),a=r(383),s=!1,f=!1,u={debug:1,default:2,info:2,warning:3,error:4,off:5},c=u.default,d=null;var l,h,p=function(){try{var e=[];if(["NFD","NFC","NFKD","NFKC"].forEach((function(t){try{if("test"!=="test".normalize(t))throw new Error("bad normalize")}catch(r){e.push(t)}})),e.length)throw new Error("missing "+e.join(", "));if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw new Error("broken implementation")}catch(e){return e.message}return null}();t.LogLevel=l,function(e){e.DEBUG="DEBUG",e.INFO="INFO",e.WARNING="WARNING",e.ERROR="ERROR",e.OFF="OFF"}(l||(t.LogLevel=l={})),t.ErrorCode=h,function(e){e.UNKNOWN_ERROR="UNKNOWN_ERROR",e.NOT_IMPLEMENTED="NOT_IMPLEMENTED",e.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",e.NETWORK_ERROR="NETWORK_ERROR",e.SERVER_ERROR="SERVER_ERROR",e.TIMEOUT="TIMEOUT",e.BUFFER_OVERRUN="BUFFER_OVERRUN",e.NUMERIC_FAULT="NUMERIC_FAULT",e.MISSING_NEW="MISSING_NEW",e.INVALID_ARGUMENT="INVALID_ARGUMENT",e.MISSING_ARGUMENT="MISSING_ARGUMENT",e.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",e.CALL_EXCEPTION="CALL_EXCEPTION",e.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",e.NONCE_EXPIRED="NONCE_EXPIRED",e.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",e.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",e.TRANSACTION_REPLACED="TRANSACTION_REPLACED"}(h||(t.ErrorCode=h={}));var b="0123456789abcdef",y=function(){function e(t){(0,i.default)(this,e),Object.defineProperty(this,"version",{enumerable:!0,value:t,writable:!1})}return(0,o.default)(e,[{key:"_log",value:function(e,t){var r=e.toLowerCase();null==u[r]&&this.throwArgumentError("invalid log level name","logLevel",e),c>u[r]||console.log.apply(console,t)}},{key:"debug",value:function(){for(var t=arguments.length,r=new Array(t),n=0;n>4],r+=b[15&t[o]];i.push(e+"=Uint8Array(0x"+r+")")}else i.push(e+"="+JSON.stringify(t))}catch(t){i.push(e+"="+JSON.stringify(n[e].toString()))}})),i.push("code=".concat(r)),i.push("version=".concat(this.version));var o=t,a="";switch(r){case h.NUMERIC_FAULT:a="NUMERIC_FAULT";var s=t;switch(s){case"overflow":case"underflow":case"division-by-zero":a+="-"+s;break;case"negative-power":case"negative-width":a+="-unsupported";break;case"unbound-bitwise-result":a+="-unbound-result"}break;case h.CALL_EXCEPTION:case h.INSUFFICIENT_FUNDS:case h.MISSING_NEW:case h.NONCE_EXPIRED:case h.REPLACEMENT_UNDERPRICED:case h.TRANSACTION_REPLACED:case h.UNPREDICTABLE_GAS_LIMIT:a=r}a&&(t+=" [ See: https://links.ethers.org/v5-errors-"+a+" ]"),i.length&&(t+=" ("+i.join(", ")+")");var u=new Error(t);return u.reason=o,u.code=r,Object.keys(n).forEach((function(e){u[e]=n[e]})),u}},{key:"throwError",value:function(e,t,r){throw this.makeError(e,t,r)}},{key:"throwArgumentError",value:function(t,r,n){return this.throwError(t,e.errors.INVALID_ARGUMENT,{argument:r,value:n})}},{key:"assert",value:function(e,t,r,n){e||this.throwError(t,r,n)}},{key:"assertArgument",value:function(e,t,r,n){e||this.throwArgumentError(t,r,n)}},{key:"checkNormalize",value:function(t){null==t&&(t="platform missing String.prototype.normalize"),p&&this.throwError("platform missing String.prototype.normalize",e.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:p})}},{key:"checkSafeUint53",value:function(t,r){"number"==typeof t&&(null==r&&(r="value not safe"),(t<0||t>=9007199254740991)&&this.throwError(r,e.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:t}),t%1&&this.throwError(r,e.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:t}))}},{key:"checkArgumentCount",value:function(t,r,n){n=n?": "+n:"",tr&&this.throwError("too many arguments"+n,e.errors.UNEXPECTED_ARGUMENT,{count:t,expectedCount:r})}},{key:"checkNew",value:function(t,r){t!==Object&&null!=t||this.throwError("missing new",e.errors.MISSING_NEW,{name:r.name})}},{key:"checkAbstract",value:function(t,r){t===r?this.throwError("cannot instantiate abstract class "+JSON.stringify(r.name)+" directly; use a sub-class",e.errors.UNSUPPORTED_OPERATION,{name:t.name,operation:"new"}):t!==Object&&null!=t||this.throwError("missing new",e.errors.MISSING_NEW,{name:r.name})}}],[{key:"globalLogger",value:function(){return d||(d=new e(a.version)),d}},{key:"setCensorship",value:function(t,r){if(!t&&r&&this.globalLogger().throwError("cannot permanently disable censorship",e.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),s){if(!t)return;this.globalLogger().throwError("error censorship permanent",e.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}f=!!t,s=!!r}},{key:"setLogLevel",value:function(t){var r=u[t.toLowerCase()];null!=r?c=r:e.globalLogger().warn("invalid log level - "+t)}},{key:"from",value:function(t){return new e(t)}}]),e}();t.Logger=y,y.errors=h,y.levels=l},function(e,t,r){"use strict";var n=r(0)(r(2)),i=r(260),o=r(129),a=r(335),s=r(30),f=r(3),u=function e(t,r){var i=[];return r.forEach((function(r){if("object"===(0,n.default)(r.components)){if("tuple"!==r.type.substring(0,5))throw new Error("components found but type is not tuple; report on GitHub");var o="",a=r.type.indexOf("[");a>=0&&(o=r.type.substring(a));var s=e(t,r.components);Array.isArray(s)&&t?i.push("tuple("+s.join(",")+")"+o):t?i.push("("+s+")"):i.push("("+s.join(",")+")"+o)}else i.push(r.type)})),i},c=function(e){if(!o.isHexStrict(e))throw new Error("The parameter must be a valid HEX string.");var t="",r=0,n=e.length;for("0x"===e.substring(0,2)&&(r=2);r7?r+=e[n].toUpperCase():r+=e[n];return r},toHex:o.toHex,toBN:o.toBN,bytesToHex:o.bytesToHex,hexToBytes:o.hexToBytes,hexToNumberString:o.hexToNumberString,hexToNumber:o.hexToNumber,toDecimal:o.hexToNumber,numberToHex:o.numberToHex,fromDecimal:o.numberToHex,hexToUtf8:o.hexToUtf8,hexToString:o.hexToUtf8,toUtf8:o.hexToUtf8,stripHexPrefix:o.stripHexPrefix,utf8ToHex:o.utf8ToHex,stringToHex:o.utf8ToHex,fromUtf8:o.utf8ToHex,hexToAscii:c,toAscii:c,asciiToHex:d,fromAscii:d,unitMap:i.unitMap,toWei:function(e,t){if(t=l(t),!o.isBN(e)&&"string"!=typeof e)throw new Error("Please pass numbers as strings or BN objects to avoid precision errors.");return o.isBN(e)?i.toWei(e,t):i.toWei(e,t).toString(10)},fromWei:function(e,t){if(t=l(t),!o.isBN(e)&&"string"!=typeof e)throw new Error("Please pass numbers as strings or BN objects to avoid precision errors.");return o.isBN(e)?i.fromWei(e,t):i.fromWei(e,t).toString(10)},padLeft:o.leftPad,leftPad:o.leftPad,padRight:o.rightPad,rightPad:o.rightPad,toTwosComplement:o.toTwosComplement,isBloom:o.isBloom,isUserEthereumAddressInBloom:o.isUserEthereumAddressInBloom,isContractAddressInBloom:o.isContractAddressInBloom,isTopic:o.isTopic,isTopicInBloom:o.isTopicInBloom,isInBloom:o.isInBloom,compareBlockNumbers:function(e,t){if(e==t)return 0;if("genesis"!=e&&"earliest"!=e&&0!=e||"genesis"!=t&&"earliest"!=t&&0!=t){if("genesis"==e||"earliest"==e)return-1;if("genesis"==t||"earliest"==t)return 1;if("latest"==e)return"pending"==t?-1:1;if("latest"===t)return"pending"==e?1:-1;if("pending"==e)return 1;if("pending"==t)return-1;var r=new f(e),n=new f(t);return r.lt(n)?-1:r.eq(n)?0:1}return 0},toNumber:o.toNumber}},function(e,t,r){"use strict";var n=t,i=r(3),o=r(19),a=r(137);n.assert=o,n.toArray=a.toArray,n.zero2=a.zero2,n.toHex=a.toHex,n.encode=a.encode,n.getNAF=function(e,t,r){var n=new Array(Math.max(e.bitLength(),r)+1);n.fill(0);for(var i=1<(i>>1)-1?(i>>1)-f:f,o.isubn(s)):s=0,n[a]=s,o.iushrn(1)}return n},n.getJSF=function(e,t){var r=[[],[]];e=e.clone(),t=t.clone();for(var n,i=0,o=0;e.cmpn(-i)>0||t.cmpn(-o)>0;){var a,s,f=e.andln(3)+i&3,u=t.andln(3)+o&3;3===f&&(f=-1),3===u&&(u=-1),a=0==(1&f)?0:3!==(n=e.andln(7)+i&7)&&5!==n||2!==u?f:-f,r[0].push(a),s=0==(1&u)?0:3!==(n=t.andln(7)+o&7)&&5!==n||2!==f?u:-u,r[1].push(s),2*i===a+1&&(i=1-i),2*o===s+1&&(o=1-o),e.iushrn(1),t.iushrn(1)}return r},n.cachedProperty=function(e,t,r){var n="_"+t;e.prototype[t]=function(){return void 0!==this[n]?this[n]:this[n]=r.call(this)}},n.parseBytes=function(e){return"string"==typeof e?n.toArray(e,"hex"):e},n.intFromLE=function(e){return new i(e,"hex","le")}},function(e,t,r){"use strict";function n(e,t){if(!e)throw new Error(t||"Assertion failed")}e.exports=n,n.equal=function(e,t,r){if(e!=t)throw new Error(r||"Assertion failed: "+e+" != "+t)}},function(e,t,r){"use strict";var n,i=r(0)(r(2)),o="object"===("undefined"==typeof Reflect?"undefined":(0,i.default)(Reflect))?Reflect:null,a=o&&"function"==typeof o.apply?o.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};n=o&&"function"==typeof o.ownKeys?o.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var s=Number.isNaN||function(e){return e!=e};function f(){f.init.call(this)}e.exports=f,e.exports.once=function(e,t){return new Promise((function(r,n){function i(r){e.removeListener(t,o),n(r)}function o(){"function"==typeof e.removeListener&&e.removeListener("error",i),r([].slice.call(arguments))}m(e,t,o,{once:!0}),"error"!==t&&function(e,t,r){"function"==typeof e.on&&m(e,"error",t,r)}(e,i,{once:!0})}))},f.EventEmitter=f,f.prototype._events=void 0,f.prototype._eventsCount=0,f.prototype._maxListeners=void 0;var u=10;function c(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+(0,i.default)(e))}function d(e){return void 0===e._maxListeners?f.defaultMaxListeners:e._maxListeners}function l(e,t,r,n){var i,o,a,s;if(c(r),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),o=e._events),a=o[t]),void 0===a)a=o[t]=r,++e._eventsCount;else if("function"==typeof a?a=o[t]=n?[r,a]:[a,r]:n?a.unshift(r):a.push(r),(i=d(e))>0&&a.length>i&&!a.warned){a.warned=!0;var f=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");f.name="MaxListenersExceededWarning",f.emitter=e,f.type=t,f.count=a.length,s=f,console&&console.warn&&console.warn(s)}return e}function h(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function p(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},i=h.bind(n);return i.listener=r,n.wrapFn=i,i}function b(e,t,r){var n=e._events;if(void 0===n)return[];var i=n[t];return void 0===i?[]:"function"==typeof i?r?[i.listener||i]:[i]:r?function(e){for(var t=new Array(e.length),r=0;r0&&(o=t[0]),o instanceof Error)throw o;var s=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw s.context=o,s}var f=i[e];if(void 0===f)return!1;if("function"==typeof f)a(f,this,t);else{var u=f.length,c=v(f,u);for(r=0;r=0;o--)if(r[o]===t||r[o].listener===t){a=r[o].listener,i=o;break}if(i<0)return this;0===i?r.shift():function(e,t){for(;t+1=0;n--)this.removeListener(e,t[n]);return this},f.prototype.listeners=function(e){return b(this,e,!0)},f.prototype.rawListeners=function(e){return b(this,e,!1)},f.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):y.call(e,t)},f.prototype.listenerCount=y,f.prototype.eventNames=function(){return this._eventsCount>0?n(this._events):[]}},function(e,t,r){"use strict";var n=r(5).Buffer,i=n.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(n.isEncoding===i||!i(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=f,this.end=u,t=4;break;case"utf8":this.fillLast=s,t=4;break;case"base64":this.text=c,this.end=d,t=3;break;default:return this.write=l,void(this.end=h)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function a(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function s(e){var t=this.lastTotal-this.lastNeed,r=function(e,t,r){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function f(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function u(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function c(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function d(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function l(e){return e.toString(this.encoding)}function h(e){return e&&e.length?this.write(e):""}t.StringDecoder=o,o.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r=0)return i>0&&(e.lastNeed=i-1),i;if(--n=0)return i>0&&(e.lastNeed=i-2),i;if(--n=0)return i>0&&(2===i?i=0:e.lastNeed=i-3),i;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)},o.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},function(e,t,r){"use strict";var n=t,i=r(3),o=r(39),a=r(238);n.assert=o,n.toArray=a.toArray,n.zero2=a.zero2,n.toHex=a.toHex,n.encode=a.encode,n.getNAF=function(e,t,r){var n=new Array(Math.max(e.bitLength(),r)+1);n.fill(0);for(var i=1<(i>>1)-1?(i>>1)-f:f,o.isubn(s)):s=0,n[a]=s,o.iushrn(1)}return n},n.getJSF=function(e,t){var r=[[],[]];e=e.clone(),t=t.clone();for(var n,i=0,o=0;e.cmpn(-i)>0||t.cmpn(-o)>0;){var a,s,f=e.andln(3)+i&3,u=t.andln(3)+o&3;3===f&&(f=-1),3===u&&(u=-1),a=0==(1&f)?0:3!==(n=e.andln(7)+i&7)&&5!==n||2!==u?f:-f,r[0].push(a),s=0==(1&u)?0:3!==(n=t.andln(7)+o&7)&&5!==n||2!==f?u:-u,r[1].push(s),2*i===a+1&&(i=1-i),2*o===s+1&&(o=1-o),e.iushrn(1),t.iushrn(1)}return r},n.cachedProperty=function(e,t,r){var n="_"+t;e.prototype[t]=function(){return void 0!==this[n]?this[n]:this[n]=r.call(this)}},n.parseBytes=function(e){return"string"==typeof e?n.toArray(e,"hex"):e},n.intFromLE=function(e){return new i(e,"hex","le")}},function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.Writer=t.Reader=t.Coder=void 0,t.checkResultErrors=function(e){var t=[];return function e(r,n){if(!Array.isArray(n))return;for(var i in n){var o=r.slice();o.push(i);try{e(o,n[i])}catch(e){t.push({path:o,error:e})}}}([],e),t};var i=n(r(8)),o=n(r(9)),a=r(15),s=r(38),f=r(64),u=r(16),c=r(65),d=new u.Logger(c.version);var l=function(){function e(t,r,n,o){(0,i.default)(this,e),this.name=t,this.type=r,this.localName=n,this.dynamic=o}return(0,o.default)(e,[{key:"_throwError",value:function(e,t){d.throwArgumentError(e,this.localName,t)}}]),e}();t.Coder=l;var h=function(){function e(t){(0,i.default)(this,e),(0,f.defineReadOnly)(this,"wordSize",t||32),this._data=[],this._dataLength=0,this._padding=new Uint8Array(t)}return(0,o.default)(e,[{key:"data",get:function(){return(0,a.hexConcat)(this._data)}},{key:"length",get:function(){return this._dataLength}},{key:"_writeData",value:function(e){return this._data.push(e),this._dataLength+=e.length,e.length}},{key:"appendWriter",value:function(e){return this._writeData((0,a.concat)(e._data))}},{key:"writeBytes",value:function(e){var t=(0,a.arrayify)(e),r=t.length%this.wordSize;return r&&(t=(0,a.concat)([t,this._padding.slice(r)])),this._writeData(t)}},{key:"_getValue",value:function(e){var t=(0,a.arrayify)(s.BigNumber.from(e));return t.length>this.wordSize&&d.throwError("value out-of-bounds",u.Logger.errors.BUFFER_OVERRUN,{length:this.wordSize,offset:t.length}),t.length%this.wordSize&&(t=(0,a.concat)([this._padding.slice(t.length%this.wordSize),t])),t}},{key:"writeValue",value:function(e){return this._writeData(this._getValue(e))}},{key:"writeUpdatableValue",value:function(){var e=this,t=this._data.length;return this._data.push(this._padding),this._dataLength+=this.wordSize,function(r){e._data[t]=e._getValue(r)}}}]),e}();t.Writer=h;var p=function(){function e(t,r,n,o){(0,i.default)(this,e),(0,f.defineReadOnly)(this,"_data",(0,a.arrayify)(t)),(0,f.defineReadOnly)(this,"wordSize",r||32),(0,f.defineReadOnly)(this,"_coerceFunc",n),(0,f.defineReadOnly)(this,"allowLoose",o),this._offset=0}return(0,o.default)(e,[{key:"data",get:function(){return(0,a.hexlify)(this._data)}},{key:"consumed",get:function(){return this._offset}},{key:"coerce",value:function(t,r){return this._coerceFunc?this._coerceFunc(t,r):e.coerce(t,r)}},{key:"_peekBytes",value:function(e,t,r){var n=Math.ceil(t/this.wordSize)*this.wordSize;return this._offset+n>this._data.length&&(this.allowLoose&&r&&this._offset+t<=this._data.length?n=t:d.throwError("data out-of-bounds",u.Logger.errors.BUFFER_OVERRUN,{length:this._data.length,offset:this._offset+n})),this._data.slice(this._offset,this._offset+n)}},{key:"subReader",value:function(t){return new e(this._data.slice(this._offset+t),this.wordSize,this._coerceFunc,this.allowLoose)}},{key:"readBytes",value:function(e,t){var r=this._peekBytes(0,e,!!t);return this._offset+=r.length,r.slice(0,e)}},{key:"readValue",value:function(){return s.BigNumber.from(this.readBytes(this.wordSize))}}],[{key:"coerce",value:function(e,t){var r=e.match("^u?int([0-9]+)$");return r&&parseInt(r[1])<=48&&(t=t.toNumber()),t}}]),e}();t.Reader=p},function(e,t,r){"use strict"; +/*! safe-buffer. MIT License. Feross Aboukhadijeh */var n=r(1),i=n.Buffer;function o(e,t){for(var r in e)t[r]=e[r]}function a(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=n:(o(n,t),t.Buffer=a),a.prototype=Object.create(i.prototype),o(i,a),a.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,r)},a.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=i(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},a.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}},function(e,t,r){"use strict";var n=r(19),i=r(4);function o(e,t){return 55296==(64512&e.charCodeAt(t))&&(!(t<0||t+1>=e.length)&&56320==(64512&e.charCodeAt(t+1)))}function a(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function s(e){return 1===e.length?"0"+e:e}function f(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}t.inherits=i,t.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if("string"==typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),i=0;i>6|192,r[n++]=63&a|128):o(e,i)?(a=65536+((1023&a)<<10)+(1023&e.charCodeAt(++i)),r[n++]=a>>18|240,r[n++]=a>>12&63|128,r[n++]=a>>6&63|128,r[n++]=63&a|128):(r[n++]=a>>12|224,r[n++]=a>>6&63|128,r[n++]=63&a|128)}else for(i=0;i>>0}return a},t.split32=function(e,t){for(var r=new Array(4*e.length),n=0,i=0;n>>24,r[i+1]=o>>>16&255,r[i+2]=o>>>8&255,r[i+3]=255&o):(r[i+3]=o>>>24,r[i+2]=o>>>16&255,r[i+1]=o>>>8&255,r[i]=255&o)}return r},t.rotr32=function(e,t){return e>>>t|e<<32-t},t.rotl32=function(e,t){return e<>>32-t},t.sum32=function(e,t){return e+t>>>0},t.sum32_3=function(e,t,r){return e+t+r>>>0},t.sum32_4=function(e,t,r,n){return e+t+r+n>>>0},t.sum32_5=function(e,t,r,n,i){return e+t+r+n+i>>>0},t.sum64=function(e,t,r,n){var i=e[t],o=n+e[t+1]>>>0,a=(o>>0,e[t+1]=o},t.sum64_hi=function(e,t,r,n){return(t+n>>>0>>0},t.sum64_lo=function(e,t,r,n){return t+n>>>0},t.sum64_4_hi=function(e,t,r,n,i,o,a,s){var f=0,u=t;return f+=(u=u+n>>>0)>>0)>>0)>>0},t.sum64_4_lo=function(e,t,r,n,i,o,a,s){return t+n+o+s>>>0},t.sum64_5_hi=function(e,t,r,n,i,o,a,s,f,u){var c=0,d=t;return c+=(d=d+n>>>0)>>0)>>0)>>0)>>0},t.sum64_5_lo=function(e,t,r,n,i,o,a,s,f,u){return t+n+o+s+u>>>0},t.rotr64_hi=function(e,t,r){return(t<<32-r|e>>>r)>>>0},t.rotr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0},t.shr64_hi=function(e,t,r){return e>>>r},t.shr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0}},function(e,t,r){"use strict";var n=r(39),i=r(10);function o(e,t){return 55296==(64512&e.charCodeAt(t))&&(!(t<0||t+1>=e.length)&&56320==(64512&e.charCodeAt(t+1)))}function a(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function s(e){return 1===e.length?"0"+e:e}function f(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}t.inherits=i,t.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if("string"==typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),i=0;i>6|192,r[n++]=63&a|128):o(e,i)?(a=65536+((1023&a)<<10)+(1023&e.charCodeAt(++i)),r[n++]=a>>18|240,r[n++]=a>>12&63|128,r[n++]=a>>6&63|128,r[n++]=63&a|128):(r[n++]=a>>12|224,r[n++]=a>>6&63|128,r[n++]=63&a|128)}else for(i=0;i>>0}return a},t.split32=function(e,t){for(var r=new Array(4*e.length),n=0,i=0;n>>24,r[i+1]=o>>>16&255,r[i+2]=o>>>8&255,r[i+3]=255&o):(r[i+3]=o>>>24,r[i+2]=o>>>16&255,r[i+1]=o>>>8&255,r[i]=255&o)}return r},t.rotr32=function(e,t){return e>>>t|e<<32-t},t.rotl32=function(e,t){return e<>>32-t},t.sum32=function(e,t){return e+t>>>0},t.sum32_3=function(e,t,r){return e+t+r>>>0},t.sum32_4=function(e,t,r,n){return e+t+r+n>>>0},t.sum32_5=function(e,t,r,n,i){return e+t+r+n+i>>>0},t.sum64=function(e,t,r,n){var i=e[t],o=n+e[t+1]>>>0,a=(o>>0,e[t+1]=o},t.sum64_hi=function(e,t,r,n){return(t+n>>>0>>0},t.sum64_lo=function(e,t,r,n){return t+n>>>0},t.sum64_4_hi=function(e,t,r,n,i,o,a,s){var f=0,u=t;return f+=(u=u+n>>>0)>>0)>>0)>>0},t.sum64_4_lo=function(e,t,r,n,i,o,a,s){return t+n+o+s>>>0},t.sum64_5_hi=function(e,t,r,n,i,o,a,s,f,u){var c=0,d=t;return c+=(d=d+n>>>0)>>0)>>0)>>0)>>0},t.sum64_5_lo=function(e,t,r,n,i,o,a,s,f,u){return t+n+o+s+u>>>0},t.rotr64_hi=function(e,t,r){return(t<<32-r|e>>>r)>>>0},t.rotr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0},t.shr64_hi=function(e,t,r){return e>>>r},t.shr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0}},function(e,t,r){"use strict";e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,r){"use strict";var n=Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]},i=function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.isHexString=t.getKeys=t.fromAscii=t.fromUtf8=t.toAscii=t.arrayContainsArray=t.getBinarySize=t.padToEven=t.stripHexPrefix=t.isHexPrefixed=void 0,i(r(133),t),i(r(134),t),i(r(328),t),i(r(94),t),i(r(329),t),i(r(34),t),i(r(330),t),i(r(331),t),i(r(102),t);var o=r(42);Object.defineProperty(t,"isHexPrefixed",{enumerable:!0,get:function(){return o.isHexPrefixed}}),Object.defineProperty(t,"stripHexPrefix",{enumerable:!0,get:function(){return o.stripHexPrefix}}),Object.defineProperty(t,"padToEven",{enumerable:!0,get:function(){return o.padToEven}}),Object.defineProperty(t,"getBinarySize",{enumerable:!0,get:function(){return o.getBinarySize}}),Object.defineProperty(t,"arrayContainsArray",{enumerable:!0,get:function(){return o.arrayContainsArray}}),Object.defineProperty(t,"toAscii",{enumerable:!0,get:function(){return o.toAscii}}),Object.defineProperty(t,"fromUtf8",{enumerable:!0,get:function(){return o.fromUtf8}}),Object.defineProperty(t,"fromAscii",{enumerable:!0,get:function(){return o.fromAscii}}),Object.defineProperty(t,"getKeys",{enumerable:!0,get:function(){return o.getKeys}}),Object.defineProperty(t,"isHexString",{enumerable:!0,get:function(){return o.isHexString}})},function(e,t,r){"use strict";var n=r(266),i=r(267),o=r(131),a=r(268);e.exports=function(e,t){return n(e)||i(e,t)||o(e,t)||a()},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,r){"use strict";(function(t,n){var i=r(5).Buffer,o=t.crypto||t.msCrypto;o&&o.getRandomValues?e.exports=function(e,t){if(e>4294967295)throw new RangeError("requested too many random bytes");var r=i.allocUnsafe(e);if(e>0)if(e>65536)for(var a=0;au[r]||console.log.apply(console,t)}},{key:"debug",value:function(){for(var t=arguments.length,r=new Array(t),n=0;n>4],r+=b[15&t[o]];i.push(e+"=Uint8Array(0x"+r+")")}else i.push(e+"="+JSON.stringify(t))}catch(t){i.push(e+"="+JSON.stringify(n[e].toString()))}})),i.push("code=".concat(r)),i.push("version=".concat(this.version));var o=t,a="";switch(r){case h.NUMERIC_FAULT:a="NUMERIC_FAULT";var s=t;switch(s){case"overflow":case"underflow":case"division-by-zero":a+="-"+s;break;case"negative-power":case"negative-width":a+="-unsupported";break;case"unbound-bitwise-result":a+="-unbound-result"}break;case h.CALL_EXCEPTION:case h.INSUFFICIENT_FUNDS:case h.MISSING_NEW:case h.NONCE_EXPIRED:case h.REPLACEMENT_UNDERPRICED:case h.TRANSACTION_REPLACED:case h.UNPREDICTABLE_GAS_LIMIT:a=r}a&&(t+=" [ See: https://links.ethers.org/v5-errors-"+a+" ]"),i.length&&(t+=" ("+i.join(", ")+")");var u=new Error(t);return u.reason=o,u.code=r,Object.keys(n).forEach((function(e){u[e]=n[e]})),u}},{key:"throwError",value:function(e,t,r){throw this.makeError(e,t,r)}},{key:"throwArgumentError",value:function(t,r,n){return this.throwError(t,e.errors.INVALID_ARGUMENT,{argument:r,value:n})}},{key:"assert",value:function(e,t,r,n){e||this.throwError(t,r,n)}},{key:"assertArgument",value:function(e,t,r,n){e||this.throwArgumentError(t,r,n)}},{key:"checkNormalize",value:function(t){null==t&&(t="platform missing String.prototype.normalize"),p&&this.throwError("platform missing String.prototype.normalize",e.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:p})}},{key:"checkSafeUint53",value:function(t,r){"number"==typeof t&&(null==r&&(r="value not safe"),(t<0||t>=9007199254740991)&&this.throwError(r,e.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:t}),t%1&&this.throwError(r,e.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:t}))}},{key:"checkArgumentCount",value:function(t,r,n){n=n?": "+n:"",tr&&this.throwError("too many arguments"+n,e.errors.UNEXPECTED_ARGUMENT,{count:t,expectedCount:r})}},{key:"checkNew",value:function(t,r){t!==Object&&null!=t||this.throwError("missing new",e.errors.MISSING_NEW,{name:r.name})}},{key:"checkAbstract",value:function(t,r){t===r?this.throwError("cannot instantiate abstract class "+JSON.stringify(r.name)+" directly; use a sub-class",e.errors.UNSUPPORTED_OPERATION,{name:t.name,operation:"new"}):t!==Object&&null!=t||this.throwError("missing new",e.errors.MISSING_NEW,{name:r.name})}}],[{key:"globalLogger",value:function(){return d||(d=new e(a.version)),d}},{key:"setCensorship",value:function(t,r){if(!t&&r&&this.globalLogger().throwError("cannot permanently disable censorship",e.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),s){if(!t)return;this.globalLogger().throwError("error censorship permanent",e.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}f=!!t,s=!!r}},{key:"setLogLevel",value:function(t){var r=u[t.toLowerCase()];null!=r?c=r:e.globalLogger().warn("invalid log level - "+t)}},{key:"from",value:function(t){return new e(t)}}]),e}();t.Logger=y,y.errors=h,y.levels=l},function(e,t,r){"use strict";var n=r(256),i=r(358);e.exports={packageInit:function(e,t){if(t=Array.prototype.slice.call(t),!e)throw new Error('You need to instantiate using the "new" keyword.');Object.defineProperty(e,"currentProvider",{get:function(){return e._provider},set:function(t){return e.setProvider(t)},enumerable:!0,configurable:!0}),t[0]&&t[0]._requestManager?e._requestManager=t[0]._requestManager:e._requestManager=new n.Manager(t[0],t[1]),e.givenProvider=n.Manager.givenProvider,e.providers=n.Manager.providers,e._provider=e._requestManager.provider,e.setProvider||(e.setProvider=function(t,r){return e._requestManager.setProvider(t,r),e._provider=e._requestManager.provider,!0}),e.setRequestManager=function(t){e._requestManager=t,e._provider=t.provider},e.BatchRequest=n.BatchManager.bind(null,e._requestManager),e.extend=i(e)},addProviders:function(e){e.givenProvider=n.Manager.givenProvider,e.providers=n.Manager.providers}}},function(e,t,r){"use strict";(function(e){var n=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.baToJSON=t.toUtf8=t.addHexPrefix=t.toUnsigned=t.fromSigned=t.bufferToHex=t.bufferToInt=t.toBuffer=t.unpadHexString=t.unpadArray=t.unpadBuffer=t.setLengthRight=t.setLengthLeft=t.zeros=t.intToBuffer=t.intToHex=void 0;var i=n(r(3)),o=r(42),a=r(74);t.intToHex=function(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("Received an invalid integer type: "+e);return"0x"+e.toString(16)};t.intToBuffer=function(r){var n=(0,t.intToHex)(r);return e.from((0,o.padToEven)(n.slice(2)),"hex")};t.zeros=function(t){return e.allocUnsafe(t).fill(0)};var s=function(e,r,n){var i=(0,t.zeros)(r);return n?e.length0&&"0"===t.toString();)t=(e=e.slice(1))[0];return e};t.unpadBuffer=function(e){return(0,a.assertIsBuffer)(e),f(e)};t.unpadArray=function(e){return(0,a.assertIsArray)(e),f(e)};t.unpadHexString=function(e){return(0,a.assertIsHexString)(e),e=(0,o.stripHexPrefix)(e),f(e)};t.toBuffer=function(r){if(null==r)return e.allocUnsafe(0);if(e.isBuffer(r))return e.from(r);if(Array.isArray(r)||r instanceof Uint8Array)return e.from(r);if("string"==typeof r){if(!(0,o.isHexString)(r))throw new Error("Cannot convert string to buffer. toBuffer only supports 0x-prefixed hex strings and this string was given: "+r);return e.from((0,o.padToEven)((0,o.stripHexPrefix)(r)),"hex")}if("number"==typeof r)return(0,t.intToBuffer)(r);if(i.default.isBN(r))return r.toArrayLike(e);if(r.toArray)return e.from(r.toArray());if(r.toBuffer)return e.from(r.toBuffer());throw new Error("invalid type")};t.bufferToInt=function(e){return new i.default((0,t.toBuffer)(e)).toNumber()};t.bufferToHex=function(e){return"0x"+(e=(0,t.toBuffer)(e)).toString("hex")};t.fromSigned=function(e){return new i.default(e).fromTwos(256)};t.toUnsigned=function(t){return e.from(t.toTwos(256).toArray())};t.addHexPrefix=function(e){return"string"!=typeof e||(0,o.isHexPrefixed)(e)?e:"0x"+e};t.toUtf8=function(t){if((t=(0,o.stripHexPrefix)(t)).length%2!=0)throw new Error("Invalid non-even hex string input for toUtf8() provided");return e.from(t.replace(/^(00)+|(00)+$/g,""),"hex").toString("utf8")};t.baToJSON=function(r){if(e.isBuffer(r))return"0x"+r.toString("hex");if(r instanceof Array){for(var n=[],i=0;i1?(e[r[0]]=e[r[0]]||{},e[r[0]][r[1]]=t):e[r[0]]=t},v.prototype.getCall=function(e){return"function"==typeof this.call?this.call(e):this.call},v.prototype.extractCallback=function(e){if("function"==typeof e[e.length-1])return e.pop()},v.prototype.validateArgs=function(e){if(e.length!==this.params)throw d.InvalidNumberOfParams(e.length,this.params,this.name)},v.prototype.formatInput=function(e){var t=this;return this.inputFormatter?this.inputFormatter.map((function(r,n){return r?r.call(t,e[n]):e[n]})):e},v.prototype.formatOutput=function(e){var t=this;return Array.isArray(e)?e.map((function(e){return t.outputFormatter&&e?t.outputFormatter(e):e})):this.outputFormatter&&e?this.outputFormatter(e):e},v.prototype.toPayload=function(e){var t=this.getCall(e),r=this.extractCallback(e),n=this.formatInput(e);this.validateArgs(n);var i={method:t,params:n,callback:r};return this.transformPayload&&(i=this.transformPayload(i)),i},v.prototype._confirmTransaction=function(e,t,r){var n=this,o=!1,a=!0,u=0,c=0,m=null,g=null,w=null,_=r.params[0]&&"object"===(0,f.default)(r.params[0])&&r.params[0].gas?r.params[0].gas:null,k=!!r.params[0]&&"object"===(0,f.default)(r.params[0])&&r.params[0].data&&r.params[0].from&&!r.params[0].to,S=k&&r.params[0].data.length>2,A=[new v({name:"getBlockByNumber",call:"eth_getBlockByNumber",params:2,inputFormatter:[l.inputBlockNumberFormatter,function(e){return!!e}],outputFormatter:l.outputBlockFormatter}),new v({name:"getTransactionReceipt",call:"eth_getTransactionReceipt",params:1,inputFormatter:[null],outputFormatter:l.outputTransactionReceiptFormatter}),new v({name:"getCode",call:"eth_getCode",params:2,inputFormatter:[l.inputAddressFormatter,l.inputDefaultBlockNumberFormatter]}),new v({name:"getTransactionByHash",call:"eth_getTransactionByHash",params:1,inputFormatter:[null],outputFormatter:l.outputTransactionFormatter}),new b({name:"subscribe",type:"eth",subscriptions:{newBlockHeaders:{subscriptionName:"newHeads",params:0,outputFormatter:l.outputBlockFormatter}}})],E={};A.forEach((function(e){e.attachToObject(E),e.requestManager=n.requestManager}));var x=function(f,b,v,A,x){if(!v)return x||(x={unsubscribe:function(){clearInterval(m),clearTimeout(g)}}),(f?p.resolve(f):E.getTransactionReceipt(t)).catch((function(t){x.unsubscribe(),o=!0,h._fireError({message:"Failed to check for transaction receipt:",data:t},e.eventEmitter,e.reject)})).then(function(){var t=(0,s.default)(i.default.mark((function t(r){var o,s,u;return i.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r&&r.blockHash){t.next=2;break}throw new Error("Receipt missing or blockHash null");case 2:if(n.extraFormatters&&n.extraFormatters.receiptFormatter&&(r=n.extraFormatters.receiptFormatter(r)),!(e.eventEmitter.listeners("confirmation").length>0)){t.next=28;break}if(void 0!==f&&0===c){t.next=25;break}return t.next=7,E.getBlockByNumber("latest");case 7:if(s=t.sent,u=s?s.hash:null,!b){t.next=24;break}if(!w){t.next=17;break}return t.next=13,E.getBlockByNumber(w.number+1);case 13:(o=t.sent)&&(w=o,e.eventEmitter.emit("confirmation",c,r,u)),t.next=22;break;case 17:return t.next=19,E.getBlockByNumber(r.blockNumber);case 19:o=t.sent,w=o,e.eventEmitter.emit("confirmation",c,r,u);case 22:t.next=25;break;case 24:e.eventEmitter.emit("confirmation",c,r,u);case 25:(b&&o||!b)&&c++,a=!1,c===n.transactionConfirmationBlocks+1&&(x.unsubscribe(),e.eventEmitter.removeAllListeners());case 28:return t.abrupt("return",r);case 29:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()).then(function(){var t=(0,s.default)(i.default.mark((function t(r){var s;return i.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!k||o){t.next=19;break}if(r.contractAddress){t.next=5;break}return a&&(x.unsubscribe(),o=!0),h._fireError(d.NoContractAddressFoundError(r),e.eventEmitter,e.reject,null,r),t.abrupt("return");case 5:return t.prev=5,t.next=8,E.getCode(r.contractAddress);case 8:s=t.sent,t.next=13;break;case 11:t.prev=11,t.t0=t.catch(5);case 13:if(s){t.next=15;break}return t.abrupt("return");case 15:!0===r.status&&S||s.length>2?(e.eventEmitter.emit("receipt",r),n.extraFormatters&&n.extraFormatters.contractDeployFormatter?e.resolve(n.extraFormatters.contractDeployFormatter(r)):e.resolve(r),a&&e.eventEmitter.removeAllListeners()):h._fireError(d.ContractCodeNotStoredError(r),e.eventEmitter,e.reject,null,r),a&&x.unsubscribe(),o=!0;case 19:return t.abrupt("return",r);case 20:case"end":return t.stop()}}),t,null,[[5,11]])})));return function(e){return t.apply(this,arguments)}}()).then(function(){var t=(0,s.default)(i.default.mark((function t(s){var f,u,c,p;return i.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(k||o){t.next=35;break}if(s.outOfGas||_&&_===s.gasUsed||!0!==s.status&&"0x1"!==s.status&&void 0!==s.status){t.next=7;break}e.eventEmitter.emit("receipt",s),e.resolve(s),a&&e.eventEmitter.removeAllListeners(),t.next=33;break;case 7:if(JSON.stringify(s,null,2),!1!==s.status&&"0x0"!==s.status){t.next=32;break}if(t.prev=9,f=null,!n.handleRevert||"eth_sendTransaction"!==n.call&&"eth_sendRawTransaction"!==n.call){t.next=24;break}return u=r.params[0],"eth_sendRawTransaction"===n.call&&(c=r.params[0],p=y.parse(c),u=l.inputTransactionFormatter({data:p.data,to:p.to,from:p.from,gas:p.gasLimit.toHexString(),gasPrice:p.gasPrice?p.gasPrice.toHexString():void 0,value:p.value.toHexString()})),t.next=16,n.getRevertReason(u,s.blockNumber);case 16:if(!(f=t.sent)){t.next=21;break}h._fireError(d.TransactionRevertInstructionError(f.reason,f.signature,s),e.eventEmitter,e.reject,null,s),t.next=22;break;case 21:throw!1;case 22:t.next=25;break;case 24:throw!1;case 25:t.next=30;break;case 27:t.prev=27,t.t0=t.catch(9),h._fireError(d.TransactionRevertedWithoutReasonError(s),e.eventEmitter,e.reject,null,s);case 30:t.next=33;break;case 32:h._fireError(d.TransactionOutOfGasError(s),e.eventEmitter,e.reject,null,s);case 33:a&&x.unsubscribe(),o=!0;case 35:case"end":return t.stop()}}),t,null,[[9,27]])})));return function(e){return t.apply(this,arguments)}}()).catch((function(){u++,b?u-1>=n.transactionPollingTimeout&&(x.unsubscribe(),o=!0,h._fireError(d.TransactionError("Transaction was not mined within "+n.transactionPollingTimeout+" seconds, please make sure your transaction was properly sent. Be aware that it might still be mined!"),e.eventEmitter,e.reject)):u-1>=n.transactionBlockTimeout&&(x.unsubscribe(),o=!0,h._fireError(d.TransactionError("Transaction was not mined within "+n.transactionBlockTimeout+" blocks, please make sure your transaction was properly sent. Be aware that it might still be mined!"),e.eventEmitter,e.reject))}));x.unsubscribe(),o=!0,h._fireError({message:"Failed to subscribe to new newBlockHeaders to confirm the transaction receipts.",data:v},e.eventEmitter,e.reject)},P=function(e){var t=!1,r=function(){m=setInterval(x.bind(null,e,!0),n.transactionPollingInterval)};if(!this.requestManager.provider.on)return r();E.subscribe("newBlockHeaders",(function(n,i,o){if(t=!0,n||!i)return r();x(e,!1,n,0,o)})),g=setTimeout((function(){t||r()}),1e3*this.blockHeaderTimeout)}.bind(this);E.getTransactionReceipt(t).then((function(t){t&&t.blockHash?(e.eventEmitter.listeners("confirmation").length>0&&P(t),x(t,!1)):o||P()})).catch((function(){o||P()}))};var m=function(e,t){return"number"==typeof e?t.wallet[e]:e&&"object"===(0,f.default)(e)&&e.address&&e.privateKey?e:t.wallet[e.toLowerCase()]};function g(e,t){return new Promise((function(r,n){try{var i=new v({name:"getBlockByNumber",call:"eth_getBlockByNumber",params:2,inputFormatter:[function(e){return e?h.toHex(e):"latest"},function(){return!1}]}).createFunction(e.requestManager),a=new v({name:"getGasPrice",call:"eth_gasPrice",params:0}).createFunction(e.requestManager);Promise.all([i(),a()]).then((function(e){var n=(0,o.default)(e,2),i=n[0],a=n[1];if(("0x2"===t.type||void 0===t.type)&&i&&i.baseFeePerGas){var s,f;t.gasPrice?(s=t.gasPrice,f=t.gasPrice,delete t.gasPrice):(s=t.maxPriorityFeePerGas||"0x9502F900",f=t.maxFeePerGas||h.toHex(h.toBN(i.baseFeePerGas).mul(h.toBN(2)).add(h.toBN(s)))),r({maxFeePerGas:f,maxPriorityFeePerGas:s})}else{if(t.maxPriorityFeePerGas||t.maxFeePerGas)throw Error("Network doesn't support eip-1559");r({gasPrice:a})}}))}catch(e){n(e)}}))}v.prototype.buildCall=function(){var e=this,t="eth_sendTransaction"===e.call||"eth_sendRawTransaction"===e.call,r="eth_call"===e.call,n=function(){var n=Array.prototype.slice.call(arguments),i=p(!t),o=e.toPayload(n);e.hexFormat=!1,"eth_getTransactionReceipt"===e.call&&(e.hexFormat=o.params.length=256)return!1}return!0}function d(e,t){if(t||(t={}),"number"==typeof e){o.checkSafeUint53(e,"invalid arrayify value");for(var r=[];e;)r.unshift(255&e),e=parseInt(String(e/256));return 0===r.length&&r.push(0),s(new Uint8Array(r))}if(t.allowMissingPrefix&&"string"==typeof e&&"0x"!==e.substring(0,2)&&(e="0x"+e),a(e)&&(e=e.toHexString()),p(e)){var n=e.substring(2);n.length%2&&("left"===t.hexPad?n="0"+n:"right"===t.hexPad?n+="0":o.throwArgumentError("hex data is odd-length","value",e));for(var i=[],f=0;ft&&o.throwArgumentError("value out of range","value",arguments[0]);var r=new Uint8Array(t);return r.set(e,t-e.length),s(r)}function p(e,t){return!("string"!=typeof e||!e.match(/^0x[0-9A-Fa-f]*$/))&&(!t||e.length===2+2*t)}function b(e,t){if(t||(t={}),"number"==typeof e){o.checkSafeUint53(e,"invalid hexlify value");for(var r="";e;)r="0123456789abcdef"[15&e]+r,e=Math.floor(e/16);return r.length?(r.length%2&&(r="0"+r),"0x"+r):"0x00"}if("bigint"==typeof e)return(e=e.toString(16)).length%2?"0x0"+e:"0x"+e;if(t.allowMissingPrefix&&"string"==typeof e&&"0x"!==e.substring(0,2)&&(e="0x"+e),a(e))return e.toHexString();if(p(e))return e.length%2&&("left"===t.hexPad?e="0x0"+e.substring(2):"right"===t.hexPad?e+="0":o.throwArgumentError("hex data is odd-length","value",e)),e.toLowerCase();if(c(e)){for(var n="0x",i=0;i>4]+"0123456789abcdef"[15&s]}return n}return o.throwArgumentError("invalid hexlify value","value",e)}function y(e){"string"!=typeof e&&(e=b(e)),p(e)||o.throwArgumentError("invalid hex string","value",e),e=e.substring(2);for(var t=0;t2*t+2&&o.throwArgumentError("value out of range","value",arguments[1]);e.length<2*t+2;)e="0x0"+e.substring(2);return e}function m(e){var t={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(f(e)){var r=d(e);64===r.length?(t.v=27+(r[32]>>7),r[32]&=127,t.r=b(r.slice(0,32)),t.s=b(r.slice(32,64))):65===r.length?(t.r=b(r.slice(0,32)),t.s=b(r.slice(32,64)),t.v=r[64]):o.throwArgumentError("invalid signature string","signature",e),t.v<27&&(0===t.v||1===t.v?t.v+=27:o.throwArgumentError("signature invalid v byte","signature",e)),t.recoveryParam=1-t.v%2,t.recoveryParam&&(r[32]|=128),t._vs=b(r.slice(32,64))}else{if(t.r=e.r,t.s=e.s,t.v=e.v,t.recoveryParam=e.recoveryParam,t._vs=e._vs,null!=t._vs){var n=h(d(t._vs),32);t._vs=b(n);var i=n[0]>=128?1:0;null==t.recoveryParam?t.recoveryParam=i:t.recoveryParam!==i&&o.throwArgumentError("signature recoveryParam mismatch _vs","signature",e),n[0]&=127;var a=b(n);null==t.s?t.s=a:t.s!==a&&o.throwArgumentError("signature v mismatch _vs","signature",e)}if(null==t.recoveryParam)null==t.v?o.throwArgumentError("signature missing v and recoveryParam","signature",e):0===t.v||1===t.v?t.recoveryParam=t.v:t.recoveryParam=1-t.v%2;else if(null==t.v)t.v=27+t.recoveryParam;else{var s=0===t.v||1===t.v?t.v:1-t.v%2;t.recoveryParam!==s&&o.throwArgumentError("signature recoveryParam mismatch v","signature",e)}null!=t.r&&p(t.r)?t.r=v(t.r,32):o.throwArgumentError("signature missing or invalid r","signature",e),null!=t.s&&p(t.s)?t.s=v(t.s,32):o.throwArgumentError("signature missing or invalid s","signature",e);var u=d(t.s);u[0]>=128&&o.throwArgumentError("signature s out of range","signature",e),t.recoveryParam&&(u[0]|=128);var c=b(u);t._vs&&(p(t._vs)||o.throwArgumentError("signature invalid _vs","signature",e),t._vs=v(t._vs,32)),null==t._vs?t._vs=c:t._vs!==c&&o.throwArgumentError("signature _vs mismatch v and s","signature",e)}return t.yParityAndS=t._vs,t.compact=t.r+t.yParityAndS.substring(2),t}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"BigNumber",{enumerable:!0,get:function(){return n.BigNumber}}),Object.defineProperty(t,"FixedFormat",{enumerable:!0,get:function(){return i.FixedFormat}}),Object.defineProperty(t,"FixedNumber",{enumerable:!0,get:function(){return i.FixedNumber}}),Object.defineProperty(t,"_base16To36",{enumerable:!0,get:function(){return n._base16To36}}),Object.defineProperty(t,"_base36To16",{enumerable:!0,get:function(){return n._base36To16}}),Object.defineProperty(t,"formatFixed",{enumerable:!0,get:function(){return i.formatFixed}}),Object.defineProperty(t,"parseFixed",{enumerable:!0,get:function(){return i.parseFixed}});var n=r(182),i=r(385)},function(e,t,r){"use strict";function n(e,t){if(!e)throw new Error(t||"Assertion failed")}e.exports=n,n.equal=function(e,t,r){if(e!=t)throw new Error(r||"Assertion failed: "+e+" != "+t)}},function(e,t,r){"use strict";(function(e){var n=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.baToJSON=t.toUtf8=t.addHexPrefix=t.toUnsigned=t.fromSigned=t.bufferToHex=t.bufferToInt=t.toBuffer=t.unpadHexString=t.unpadArray=t.unpadBuffer=t.setLengthRight=t.setLengthLeft=t.zeros=t.intToBuffer=t.intToHex=void 0;var i=n(r(3)),o=r(54),a=r(89);t.intToHex=function(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("Received an invalid integer type: "+e);return"0x"+e.toString(16)};t.intToBuffer=function(r){var n=(0,t.intToHex)(r);return e.from((0,o.padToEven)(n.slice(2)),"hex")};t.zeros=function(t){return e.allocUnsafe(t).fill(0)};var s=function(e,r,n){var i=(0,t.zeros)(r);return n?e.length0&&"0"===t.toString();)t=(e=e.slice(1))[0];return e};t.unpadBuffer=function(e){return(0,a.assertIsBuffer)(e),f(e)};t.unpadArray=function(e){return(0,a.assertIsArray)(e),f(e)};t.unpadHexString=function(e){return(0,a.assertIsHexString)(e),e=(0,o.stripHexPrefix)(e),f(e)};t.toBuffer=function(r){if(null==r)return e.allocUnsafe(0);if(e.isBuffer(r))return e.from(r);if(Array.isArray(r)||r instanceof Uint8Array)return e.from(r);if("string"==typeof r){if(!(0,o.isHexString)(r))throw new Error("Cannot convert string to buffer. toBuffer only supports 0x-prefixed hex strings and this string was given: "+r);return e.from((0,o.padToEven)((0,o.stripHexPrefix)(r)),"hex")}if("number"==typeof r)return(0,t.intToBuffer)(r);if(i.default.isBN(r))return r.toArrayLike(e);if(r.toArray)return e.from(r.toArray());if(r.toBuffer)return e.from(r.toBuffer());throw new Error("invalid type")};t.bufferToInt=function(e){return new i.default((0,t.toBuffer)(e)).toNumber()};t.bufferToHex=function(e){return"0x"+(e=(0,t.toBuffer)(e)).toString("hex")};t.fromSigned=function(e){return new i.default(e).fromTwos(256)};t.toUnsigned=function(t){return e.from(t.toTwos(256).toArray())};t.addHexPrefix=function(e){return"string"!=typeof e||(0,o.isHexPrefixed)(e)?e:"0x"+e};t.toUtf8=function(t){if((t=(0,o.stripHexPrefix)(t)).length%2!=0)throw new Error("Invalid non-even hex string input for toUtf8() provided");return e.from(t.replace(/^(00)+|(00)+$/g,""),"hex").toString("utf8")};t.baToJSON=function(r){if(e.isBuffer(r))return"0x"+r.toString("hex");if(r instanceof Array){for(var n=[],i=0;i + * @license MIT + */ +function o(e,t){if(e===t)return 0;for(var r=e.length,n=t.length,i=0,o=Math.min(r,n);i=0;f--)if(c[f]!==d[f])return!1;for(f=c.length-1;f>=0;f--)if(a=c[f],!w(e[a],t[a],r,n))return!1;return!0}(e,t,r,i))}return r?e===t:e==t}function _(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function k(e,t){if(!e||!t)return!1;if("[object RegExp]"==Object.prototype.toString.call(t))return t.test(e);try{if(e instanceof t)return!0}catch(e){}return!Error.isPrototypeOf(t)&&!0===t.call({},e)}function S(e,t,r,n){var i;if("function"!=typeof t)throw new TypeError('"block" argument must be a function');"string"==typeof r&&(n=r,r=null),i=function(e){var t;try{e()}catch(e){t=e}return t}(t),n=(r&&r.name?" ("+r.name+").":".")+(n?" "+n:"."),e&&!i&&m(i,r,"Missing expected exception"+n);var o="string"==typeof n,a=!e&&i&&!r;if((!e&&s.isError(i)&&o&&k(i,r)||a)&&m(i,r,"Got unwanted exception"+n),e&&i&&r&&!k(i,r)||!e&&i)throw i}h.AssertionError=function(e){this.name="AssertionError",this.actual=e.actual,this.expected=e.expected,this.operator=e.operator,e.message?(this.message=e.message,this.generatedMessage=!1):(this.message=function(e){return y(v(e.actual),128)+" "+e.operator+" "+y(v(e.expected),128)}(this),this.generatedMessage=!0);var t=e.stackStartFunction||m;if(Error.captureStackTrace)Error.captureStackTrace(this,t);else{var r=new Error;if(r.stack){var n=r.stack,i=b(t),o=n.indexOf("\n"+i);if(o>=0){var a=n.indexOf("\n",o+1);n=n.substring(a+1)}this.stack=n}}},s.inherits(h.AssertionError,Error),h.fail=m,h.ok=g,h.equal=function(e,t,r){e!=t&&m(e,t,r,"==",h.equal)},h.notEqual=function(e,t,r){e==t&&m(e,t,r,"!=",h.notEqual)},h.deepEqual=function(e,t,r){w(e,t,!1)||m(e,t,r,"deepEqual",h.deepEqual)},h.deepStrictEqual=function(e,t,r){w(e,t,!0)||m(e,t,r,"deepStrictEqual",h.deepStrictEqual)},h.notDeepEqual=function(e,t,r){w(e,t,!1)&&m(e,t,r,"notDeepEqual",h.notDeepEqual)},h.notDeepStrictEqual=function e(t,r,n){w(t,r,!0)&&m(t,r,n,"notDeepStrictEqual",e)},h.strictEqual=function(e,t,r){e!==t&&m(e,t,r,"===",h.strictEqual)},h.notStrictEqual=function(e,t,r){e===t&&m(e,t,r,"!==",h.notStrictEqual)},h.throws=function(e,t,r){S(!0,e,t,r)},h.doesNotThrow=function(e,t,r){S(!1,e,t,r)},h.ifError=function(e){if(e)throw e},h.strict=i((function e(t,r){t||m(t,!0,r,"==",e)}),h,{equal:h.strictEqual,deepEqual:h.deepStrictEqual,notEqual:h.notStrictEqual,notDeepEqual:h.notDeepStrictEqual}),h.strict.strict=h.strict;var A=Object.keys||function(e){var t=[];for(var r in e)f.call(e,r)&&t.push(r);return t}}).call(this,r(7))},function(e,t,r){"use strict";(function(e){var n=r(0)(r(2));function i(e){if("string"!=typeof e)throw new Error("[isHexPrefixed] input must be type 'string', received type "+(0,n.default)(e));return"0"===e[0]&&"x"===e[1]}Object.defineProperty(t,"__esModule",{value:!0}),t.isHexString=t.getKeys=t.fromAscii=t.fromUtf8=t.toAscii=t.arrayContainsArray=t.getBinarySize=t.padToEven=t.stripHexPrefix=t.isHexPrefixed=void 0,t.isHexPrefixed=i;function o(e){var t=e;if("string"!=typeof t)throw new Error("[padToEven] value must be type 'string', received "+(0,n.default)(t));return t.length%2&&(t="0"+t),t}t.stripHexPrefix=function(e){if("string"!=typeof e)throw new Error("[stripHexPrefix] input must be type 'string', received "+(0,n.default)(e));return i(e)?e.slice(2):e},t.padToEven=o,t.getBinarySize=function(t){if("string"!=typeof t)throw new Error("[getBinarySize] method requires input type 'string', recieved "+(0,n.default)(t));return e.byteLength(t,"utf8")},t.arrayContainsArray=function(e,t,r){if(!0!==Array.isArray(e))throw new Error("[arrayContainsArray] method requires input 'superset' to be an array, got type '"+(0,n.default)(e)+"'");if(!0!==Array.isArray(t))throw new Error("[arrayContainsArray] method requires input 'subset' to be an array, got type '"+(0,n.default)(t)+"'");return t[r?"some":"every"]((function(t){return e.indexOf(t)>=0}))},t.toAscii=function(e){var t="",r=0,n=e.length;for("0x"===e.substring(0,2)&&(r=2);r2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:2===r?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}o("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),o("ERR_INVALID_ARG_TYPE",(function(e,t,r){var i,o,s,f;if("string"==typeof t&&(o="not ",t.substr(!s||s<0?0:+s,o.length)===o)?(i="must not be",t=t.replace(/^not /,"")):i="must be",function(e,t,r){return(void 0===r||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}(e," argument"))f="The ".concat(e," ").concat(i," ").concat(a(t,"type"));else{var u=function(e,t,r){return"number"!=typeof r&&(r=0),!(r+t.length>e.length)&&-1!==e.indexOf(t,r)}(e,".")?"property":"argument";f='The "'.concat(e,'" ').concat(u," ").concat(i," ").concat(a(t,"type"))}return f+=". Received type ".concat((0,n.default)(r))}),TypeError),o("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),o("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),o("ERR_STREAM_PREMATURE_CLOSE","Premature close"),o("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),o("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),o("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),o("ERR_STREAM_WRITE_AFTER_END","write after end"),o("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),o("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),o("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.codes=i},function(e,t,r){"use strict";(function(t){var n=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};e.exports=u;var i=r(145),o=r(149);r(4)(u,i);for(var a=n(o.prototype),s=0;s2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:2===r?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}o("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),o("ERR_INVALID_ARG_TYPE",(function(e,t,r){var i,o,s,f;if("string"==typeof t&&(o="not ",t.substr(!s||s<0?0:+s,o.length)===o)?(i="must not be",t=t.replace(/^not /,"")):i="must be",function(e,t,r){return(void 0===r||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}(e," argument"))f="The ".concat(e," ").concat(i," ").concat(a(t,"type"));else{var u=function(e,t,r){return"number"!=typeof r&&(r=0),!(r+t.length>e.length)&&-1!==e.indexOf(t,r)}(e,".")?"property":"argument";f='The "'.concat(e,'" ').concat(u," ").concat(i," ").concat(a(t,"type"))}return f+=". Received type ".concat((0,n.default)(r))}),TypeError),o("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),o("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),o("ERR_STREAM_PREMATURE_CLOSE","Premature close"),o("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),o("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),o("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),o("ERR_STREAM_WRITE_AFTER_END","write after end"),o("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),o("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),o("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.codes=i},function(e,t,r){"use strict";(function(t){var n=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};e.exports=u;var i=r(152),o=r(156);r(4)(u,i);for(var a=n(o.prototype),s=0;s=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 n=(4294967295&r)>>>0,i=(r-n)/4294967296;this._block.writeUInt32BE(i,this._blockSize-8),this._block.writeUInt32BE(n,this._blockSize-4)}this._update(this._block);var o=this._hash();return e?o.toString(e):o},i.prototype._update=function(){throw new Error("_update must be implemented by subclass")},e.exports=i},function(e,t,r){"use strict";e.exports=r(359)},function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.keccak256=function(e){return"0x"+i.default.keccak_256((0,o.arrayify)(e))};var i=n(r(388)),o=r(15)},function(e,t,r){"use strict";var n=r(0)(r(2));var i={};function o(e,t,r){r||(r=Error);var n=function(e){var r,n;function i(r,n,i){return e.call(this,function(e,r,n){return"string"==typeof t?t:t(e,r,n)}(r,n,i))||this}return n=e,(r=i).prototype=Object.create(n.prototype),r.prototype.constructor=r,r.__proto__=n,i}(r);n.prototype.name=r.name,n.prototype.code=e,i[e]=n}function a(e,t){if(Array.isArray(e)){var r=e.length;return e=e.map((function(e){return String(e)})),r>2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:2===r?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}o("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),o("ERR_INVALID_ARG_TYPE",(function(e,t,r){var i,o,s,f;if("string"==typeof t&&(o="not ",t.substr(!s||s<0?0:+s,o.length)===o)?(i="must not be",t=t.replace(/^not /,"")):i="must be",function(e,t,r){return(void 0===r||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}(e," argument"))f="The ".concat(e," ").concat(i," ").concat(a(t,"type"));else{var u=function(e,t,r){return"number"!=typeof r&&(r=0),!(r+t.length>e.length)&&-1!==e.indexOf(t,r)}(e,".")?"property":"argument";f='The "'.concat(e,'" ').concat(u," ").concat(i," ").concat(a(t,"type"))}return f+=". Received type ".concat((0,n.default)(r))}),TypeError),o("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),o("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),o("ERR_STREAM_PREMATURE_CLOSE","Premature close"),o("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),o("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),o("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),o("ERR_STREAM_WRITE_AFTER_END","write after end"),o("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),o("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),o("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.codes=i},function(e,t,r){"use strict";(function(t){var n=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};e.exports=u;var i=r(215),o=r(219);r(4)(u,i);for(var a=n(o.prototype),s=0;s=0}))},t.toAscii=function(e){var t="",r=0,n=e.length;for("0x"===e.substring(0,2)&&(r=2);r2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:2===r?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}o("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),o("ERR_INVALID_ARG_TYPE",(function(e,t,r){var i,o,s,f;if("string"==typeof t&&(o="not ",t.substr(!s||s<0?0:+s,o.length)===o)?(i="must not be",t=t.replace(/^not /,"")):i="must be",function(e,t,r){return(void 0===r||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}(e," argument"))f="The ".concat(e," ").concat(i," ").concat(a(t,"type"));else{var u=function(e,t,r){return"number"!=typeof r&&(r=0),!(r+t.length>e.length)&&-1!==e.indexOf(t,r)}(e,".")?"property":"argument";f='The "'.concat(e,'" ').concat(u," ").concat(i," ").concat(a(t,"type"))}return f+=". Received type ".concat((0,n.default)(r))}),TypeError),o("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),o("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),o("ERR_STREAM_PREMATURE_CLOSE","Premature close"),o("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),o("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),o("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),o("ERR_STREAM_WRITE_AFTER_END","write after end"),o("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),o("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),o("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.codes=i},function(e,t,r){"use strict";(function(t){var n=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};e.exports=u;var i=r(244),o=r(248);r(10)(u,i);for(var a=n(o.prototype),s=0;s=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 n=(4294967295&r)>>>0,i=(r-n)/4294967296;this._block.writeUInt32BE(i,this._blockSize-8),this._block.writeUInt32BE(n,this._blockSize-4)}this._update(this._block);var o=this._hash();return e?o.toString(e):o},i.prototype._update=function(){throw new Error("_update must be implemented by subclass")},e.exports=i},function(e,t,r){"use strict";e.exports=function(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,r){"use strict";var n=t;n.version=r(272).version,n.utils=r(18),n.rand=r(92),n.curve=r(138),n.curves=r(93),n.ec=r(284),n.eddsa=r(288)},function(e,t,r){"use strict";var n=r(25),i=r(19);function o(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}t.BlockHash=o,o.prototype.update=function(e,t){if(e=n.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){var r=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-r,e.length),0===this.pending.length&&(this.pending=null),e=n.join32(e,0,e.length-r,this.endian);for(var i=0;i>>24&255,n[i++]=e>>>16&255,n[i++]=e>>>8&255,n[i++]=255&e}else for(n[i++]=255&e,n[i++]=e>>>8&255,n[i++]=e>>>16&255,n[i++]=e>>>24&255,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,o=8;o=this._delta8){var r=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-r,e.length),0===this.pending.length&&(this.pending=null),e=n.join32(e,0,e.length-r,this.endian);for(var i=0;i>>24&255,n[i++]=e>>>16&255,n[i++]=e>>>8&255,n[i++]=255&e}else for(n[i++]=255&e,n[i++]=e>>>8&255,n[i++]=e>>>16&255,n[i++]=e>>>24&255,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,o=8;or.length)throw new Error("invalid rlp: total length is larger than the data");if(0===(s=r.slice(i,d)).length)throw new Error("invalid rlp, List has a invalid length");for(;s.length;)f=t(s),u.push(f.data),s=f.remainder;return{data:u,remainder:r.slice(d)}}(u(t));if(r)return n;if(0!==n.remainder.length)throw new Error("invalid remainder");return n.data},t.getLength=function(t){if(!t||0===t.length)return e.from([]);var r=u(t),n=r[0];if(n<=127)return r.length;if(n<=183)return n-127;if(n<=191)return n-182;if(n<=247)return n-191;var i=n-246;return i+o(r.slice(1,i).toString("hex"),16)}}).call(this,r(1).Buffer)},function(e,t,r){"use strict";var n=r(3),i=r(18),o=i.getNAF,a=i.getJSF,s=i.assert;function f(e,t){this.type=e,this.p=new n(t.p,16),this.red=t.prime?n.red(t.prime):n.mont(this.p),this.zero=new n(0).toRed(this.red),this.one=new n(1).toRed(this.red),this.two=new n(2).toRed(this.red),this.n=t.n&&new n(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function u(e,t){this.curve=e,this.type=t,this.precomputed=null}e.exports=f,f.prototype.point=function(){throw new Error("Not implemented")},f.prototype.validate=function(){throw new Error("Not implemented")},f.prototype._fixedNafMul=function(e,t){s(e.precomputed);var r=e._getDoubles(),n=o(t,1,this._bitLength),i=(1<=a;c--)f=(f<<1)+n[c];u.push(f)}for(var d=this.jpoint(null,null,null),l=this.jpoint(null,null,null),h=i;h>0;h--){for(a=0;a=0;u--){for(var c=0;u>=0&&0===a[u];u--)c++;if(u>=0&&c++,f=f.dblp(c),u<0)break;var d=a[u];s(0!==d),f="affine"===e.type?d>0?f.mixedAdd(i[d-1>>1]):f.mixedAdd(i[-d-1>>1].neg()):d>0?f.add(i[d-1>>1]):f.add(i[-d-1>>1].neg())}return"affine"===e.type?f.toP():f},f.prototype._wnafMulAdd=function(e,t,r,n,i){var s,f,u,c=this._wnafT1,d=this._wnafT2,l=this._wnafT3,h=0;for(s=0;s=1;s-=2){var b=s-1,y=s;if(1===c[b]&&1===c[y]){var v=[t[b],null,null,t[y]];0===t[b].y.cmp(t[y].y)?(v[1]=t[b].add(t[y]),v[2]=t[b].toJ().mixedAdd(t[y].neg())):0===t[b].y.cmp(t[y].y.redNeg())?(v[1]=t[b].toJ().mixedAdd(t[y]),v[2]=t[b].add(t[y].neg())):(v[1]=t[b].toJ().mixedAdd(t[y]),v[2]=t[b].toJ().mixedAdd(t[y].neg()));var m=[-3,-1,-5,-7,0,7,5,1,3],g=a(r[b],r[y]);for(h=Math.max(g[0].length,h),l[b]=new Array(h),l[y]=new Array(h),f=0;f=0;s--){for(var A=0;s>=0;){var E=!0;for(f=0;f=0&&A++,k=k.dblp(A),s<0)break;for(f=0;f0?u=d[f][x-1>>1]:x<0&&(u=d[f][-x-1>>1].neg()),k="affine"===u.type?k.mixedAdd(u):k.add(u))}}for(s=0;s=Math.ceil((e.bitLength()+1)/t.step)},u.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],n=this,i=0;i",'"',"`"," ","\r","\n","\t"]),d=["'"].concat(c),l=["%","/","?",";","#"].concat(d),h=["/","?","#"],p=/^[+a-z0-9A-Z_-]{0,63}$/,b=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,y={javascript:!0,"javascript:":!0},v={javascript:!0,"javascript:":!0},m={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},g=r(341);function w(e,t,r){if(e&&o.isObject(e)&&e instanceof a)return e;var n=new a;return n.parse(e,t,r),n}a.prototype.parse=function(e,t,r){if(!o.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+(0,n.default)(e));var a=e.indexOf("?"),f=-1!==a&&a127?C+="x":C+=B[j];if(!C.match(p)){var N=M.slice(0,O),L=M.slice(O+1),F=B.match(b);F&&(N.push(F[1]),L.unshift(F[2])),L.length&&(w="/"+L.join(".")+w),this.hostname=N.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),T||(this.hostname=i.toASCII(this.hostname));var D=this.port?":"+this.port:"",q=this.hostname||"";this.host=q+D,this.href+=this.host,T&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==w[0]&&(w="/"+w))}if(!y[S])for(O=0,I=d.length;O0)&&r.host.split("@"))&&(r.auth=R.shift(),r.host=r.hostname=R.shift());return r.search=e.search,r.query=e.query,o.isNull(r.pathname)&&o.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r}if(!S.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var E=S.slice(-1)[0],x=(r.host||e.host||S.length>1)&&("."===E||".."===E)||""===E,P=0,O=S.length;O>=0;O--)"."===(E=S[O])?S.splice(O,1):".."===E?(S.splice(O,1),P++):P&&(S.splice(O,1),P--);if(!_&&!k)for(;P--;P)S.unshift("..");!_||""===S[0]||S[0]&&"/"===S[0].charAt(0)||S.unshift(""),x&&"/"!==S.join("/").substr(-1)&&S.push("");var R,T=""===S[0]||S[0]&&"/"===S[0].charAt(0);A&&(r.hostname=r.host=T?"":S.length?S.shift():"",(R=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=R.shift(),r.host=r.hostname=R.shift()));return(_=_||r.host&&S.length)&&!T&&S.unshift(""),S.length?r.pathname=S.join("/"):(r.pathname=null,r.path=null),o.isNull(r.pathname)&&o.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=e.auth||r.auth,r.slashes=r.slashes||e.slashes,r.href=r.format(),r},a.prototype.parseHost=function(){var e=this.host,t=f.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},function(e,t,r){"use strict";var n=r(103),i=function(e){var t,r,i=new Promise((function(){t=arguments[0],r=arguments[1]}));if(e)return{resolve:t,reject:r,eventEmitter:i};var o=new n;return i._events=o._events,i.emit=o.emit,i.on=o.on,i.once=o.once,i.off=o.off,i.listeners=o.listeners,i.addListener=o.addListener,i.removeListener=o.removeListener,i.removeAllListeners=o.removeAllListeners,{resolve:t,reject:r,eventEmitter:i}};i.resolve=function(e){var t=i(!0);return t.resolve(e),t.eventEmitter},e.exports=i},function(e,t,r){"use strict";var n=r(360),i=function(e){this.name=e.name,this.type=e.type,this.subscriptions=e.subscriptions||{},this.requestManager=null};i.prototype.setRequestManager=function(e){this.requestManager=e},i.prototype.attachToObject=function(e){var t=this.buildCall(),r=this.name.split(".");r.length>1?(e[r[0]]=e[r[0]]||{},e[r[0]][r[1]]=t):e[r[0]]=t},i.prototype.buildCall=function(){var e=this;return function(){e.subscriptions[arguments[0]]||console.warn("Subscription "+JSON.stringify(arguments[0])+" doesn't exist. Subscribing anyway.");var t=new n({subscription:e.subscriptions[arguments[0]]||{},requestManager:e.requestManager,type:e.type});return t.subscribe.apply(t,arguments)}},e.exports={subscriptions:i,subscription:n}},function(e,t,r){"use strict";var n=r(33),i=r(36),o=r(17),a=function(){var e=this;n.packageInit(this,arguments),[new i({name:"getId",call:"net_version",params:0,outputFormatter:parseInt}),new i({name:"isListening",call:"net_listening",params:0}),new i({name:"getPeerCount",call:"net_peerCount",params:0,outputFormatter:o.hexToNumber})].forEach((function(t){t.attachToObject(e),t.setRequestManager(e._requestManager)}))};n.addProviders(a),e.exports=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"UnicodeNormalizationForm",{enumerable:!0,get:function(){return o.UnicodeNormalizationForm}}),Object.defineProperty(t,"Utf8ErrorFuncs",{enumerable:!0,get:function(){return o.Utf8ErrorFuncs}}),Object.defineProperty(t,"Utf8ErrorReason",{enumerable:!0,get:function(){return o.Utf8ErrorReason}}),Object.defineProperty(t,"_toEscapedUtf8String",{enumerable:!0,get:function(){return o._toEscapedUtf8String}}),Object.defineProperty(t,"formatBytes32String",{enumerable:!0,get:function(){return n.formatBytes32String}}),Object.defineProperty(t,"nameprep",{enumerable:!0,get:function(){return i.nameprep}}),Object.defineProperty(t,"parseBytes32String",{enumerable:!0,get:function(){return n.parseBytes32String}}),Object.defineProperty(t,"toUtf8Bytes",{enumerable:!0,get:function(){return o.toUtf8Bytes}}),Object.defineProperty(t,"toUtf8CodePoints",{enumerable:!0,get:function(){return o.toUtf8CodePoints}}),Object.defineProperty(t,"toUtf8String",{enumerable:!0,get:function(){return o.toUtf8String}});var n=r(403),i=r(405),o=r(108)},function(e){e.exports=JSON.parse('{"identity":0,"ip4":4,"tcp":6,"sha1":17,"sha2-256":18,"sha2-512":19,"sha3-512":20,"sha3-384":21,"sha3-256":22,"sha3-224":23,"shake-128":24,"shake-256":25,"keccak-224":26,"keccak-256":27,"keccak-384":28,"keccak-512":29,"dccp":33,"murmur3-128":34,"murmur3-32":35,"ip6":41,"ip6zone":42,"path":47,"multicodec":48,"multihash":49,"multiaddr":50,"multibase":51,"dns":53,"dns4":54,"dns6":55,"dnsaddr":56,"protobuf":80,"cbor":81,"raw":85,"dbl-sha2-256":86,"rlp":96,"bencode":99,"dag-pb":112,"dag-cbor":113,"libp2p-key":114,"git-raw":120,"torrent-info":123,"torrent-file":124,"leofcoin-block":129,"leofcoin-tx":130,"leofcoin-pr":131,"sctp":132,"eth-block":144,"eth-block-list":145,"eth-tx-trie":146,"eth-tx":147,"eth-tx-receipt-trie":148,"eth-tx-receipt":149,"eth-state-trie":150,"eth-account-snapshot":151,"eth-storage-trie":152,"bitcoin-block":176,"bitcoin-tx":177,"zcash-block":192,"zcash-tx":193,"stellar-block":208,"stellar-tx":209,"md4":212,"md5":213,"bmt":214,"decred-block":224,"decred-tx":225,"ipld-ns":226,"ipfs-ns":227,"swarm-ns":228,"ipns-ns":229,"zeronet":230,"ed25519-pub":237,"dash-block":240,"dash-tx":241,"swarm-manifest":250,"swarm-feed":251,"udp":273,"p2p-webrtc-star":275,"p2p-webrtc-direct":276,"p2p-stardust":277,"p2p-circuit":290,"dag-json":297,"udt":301,"utp":302,"unix":400,"p2p":421,"ipfs":421,"https":443,"onion":444,"onion3":445,"garlic64":446,"garlic32":447,"tls":448,"quic":460,"ws":477,"wss":478,"p2p-websocket-star":479,"http":480,"json":512,"messagepack":513,"x11":4352,"blake2b-8":45569,"blake2b-16":45570,"blake2b-24":45571,"blake2b-32":45572,"blake2b-40":45573,"blake2b-48":45574,"blake2b-56":45575,"blake2b-64":45576,"blake2b-72":45577,"blake2b-80":45578,"blake2b-88":45579,"blake2b-96":45580,"blake2b-104":45581,"blake2b-112":45582,"blake2b-120":45583,"blake2b-128":45584,"blake2b-136":45585,"blake2b-144":45586,"blake2b-152":45587,"blake2b-160":45588,"blake2b-168":45589,"blake2b-176":45590,"blake2b-184":45591,"blake2b-192":45592,"blake2b-200":45593,"blake2b-208":45594,"blake2b-216":45595,"blake2b-224":45596,"blake2b-232":45597,"blake2b-240":45598,"blake2b-248":45599,"blake2b-256":45600,"blake2b-264":45601,"blake2b-272":45602,"blake2b-280":45603,"blake2b-288":45604,"blake2b-296":45605,"blake2b-304":45606,"blake2b-312":45607,"blake2b-320":45608,"blake2b-328":45609,"blake2b-336":45610,"blake2b-344":45611,"blake2b-352":45612,"blake2b-360":45613,"blake2b-368":45614,"blake2b-376":45615,"blake2b-384":45616,"blake2b-392":45617,"blake2b-400":45618,"blake2b-408":45619,"blake2b-416":45620,"blake2b-424":45621,"blake2b-432":45622,"blake2b-440":45623,"blake2b-448":45624,"blake2b-456":45625,"blake2b-464":45626,"blake2b-472":45627,"blake2b-480":45628,"blake2b-488":45629,"blake2b-496":45630,"blake2b-504":45631,"blake2b-512":45632,"blake2s-8":45633,"blake2s-16":45634,"blake2s-24":45635,"blake2s-32":45636,"blake2s-40":45637,"blake2s-48":45638,"blake2s-56":45639,"blake2s-64":45640,"blake2s-72":45641,"blake2s-80":45642,"blake2s-88":45643,"blake2s-96":45644,"blake2s-104":45645,"blake2s-112":45646,"blake2s-120":45647,"blake2s-128":45648,"blake2s-136":45649,"blake2s-144":45650,"blake2s-152":45651,"blake2s-160":45652,"blake2s-168":45653,"blake2s-176":45654,"blake2s-184":45655,"blake2s-192":45656,"blake2s-200":45657,"blake2s-208":45658,"blake2s-216":45659,"blake2s-224":45660,"blake2s-232":45661,"blake2s-240":45662,"blake2s-248":45663,"blake2s-256":45664,"skein256-8":45825,"skein256-16":45826,"skein256-24":45827,"skein256-32":45828,"skein256-40":45829,"skein256-48":45830,"skein256-56":45831,"skein256-64":45832,"skein256-72":45833,"skein256-80":45834,"skein256-88":45835,"skein256-96":45836,"skein256-104":45837,"skein256-112":45838,"skein256-120":45839,"skein256-128":45840,"skein256-136":45841,"skein256-144":45842,"skein256-152":45843,"skein256-160":45844,"skein256-168":45845,"skein256-176":45846,"skein256-184":45847,"skein256-192":45848,"skein256-200":45849,"skein256-208":45850,"skein256-216":45851,"skein256-224":45852,"skein256-232":45853,"skein256-240":45854,"skein256-248":45855,"skein256-256":45856,"skein512-8":45857,"skein512-16":45858,"skein512-24":45859,"skein512-32":45860,"skein512-40":45861,"skein512-48":45862,"skein512-56":45863,"skein512-64":45864,"skein512-72":45865,"skein512-80":45866,"skein512-88":45867,"skein512-96":45868,"skein512-104":45869,"skein512-112":45870,"skein512-120":45871,"skein512-128":45872,"skein512-136":45873,"skein512-144":45874,"skein512-152":45875,"skein512-160":45876,"skein512-168":45877,"skein512-176":45878,"skein512-184":45879,"skein512-192":45880,"skein512-200":45881,"skein512-208":45882,"skein512-216":45883,"skein512-224":45884,"skein512-232":45885,"skein512-240":45886,"skein512-248":45887,"skein512-256":45888,"skein512-264":45889,"skein512-272":45890,"skein512-280":45891,"skein512-288":45892,"skein512-296":45893,"skein512-304":45894,"skein512-312":45895,"skein512-320":45896,"skein512-328":45897,"skein512-336":45898,"skein512-344":45899,"skein512-352":45900,"skein512-360":45901,"skein512-368":45902,"skein512-376":45903,"skein512-384":45904,"skein512-392":45905,"skein512-400":45906,"skein512-408":45907,"skein512-416":45908,"skein512-424":45909,"skein512-432":45910,"skein512-440":45911,"skein512-448":45912,"skein512-456":45913,"skein512-464":45914,"skein512-472":45915,"skein512-480":45916,"skein512-488":45917,"skein512-496":45918,"skein512-504":45919,"skein512-512":45920,"skein1024-8":45921,"skein1024-16":45922,"skein1024-24":45923,"skein1024-32":45924,"skein1024-40":45925,"skein1024-48":45926,"skein1024-56":45927,"skein1024-64":45928,"skein1024-72":45929,"skein1024-80":45930,"skein1024-88":45931,"skein1024-96":45932,"skein1024-104":45933,"skein1024-112":45934,"skein1024-120":45935,"skein1024-128":45936,"skein1024-136":45937,"skein1024-144":45938,"skein1024-152":45939,"skein1024-160":45940,"skein1024-168":45941,"skein1024-176":45942,"skein1024-184":45943,"skein1024-192":45944,"skein1024-200":45945,"skein1024-208":45946,"skein1024-216":45947,"skein1024-224":45948,"skein1024-232":45949,"skein1024-240":45950,"skein1024-248":45951,"skein1024-256":45952,"skein1024-264":45953,"skein1024-272":45954,"skein1024-280":45955,"skein1024-288":45956,"skein1024-296":45957,"skein1024-304":45958,"skein1024-312":45959,"skein1024-320":45960,"skein1024-328":45961,"skein1024-336":45962,"skein1024-344":45963,"skein1024-352":45964,"skein1024-360":45965,"skein1024-368":45966,"skein1024-376":45967,"skein1024-384":45968,"skein1024-392":45969,"skein1024-400":45970,"skein1024-408":45971,"skein1024-416":45972,"skein1024-424":45973,"skein1024-432":45974,"skein1024-440":45975,"skein1024-448":45976,"skein1024-456":45977,"skein1024-464":45978,"skein1024-472":45979,"skein1024-480":45980,"skein1024-488":45981,"skein1024-496":45982,"skein1024-504":45983,"skein1024-512":45984,"skein1024-520":45985,"skein1024-528":45986,"skein1024-536":45987,"skein1024-544":45988,"skein1024-552":45989,"skein1024-560":45990,"skein1024-568":45991,"skein1024-576":45992,"skein1024-584":45993,"skein1024-592":45994,"skein1024-600":45995,"skein1024-608":45996,"skein1024-616":45997,"skein1024-624":45998,"skein1024-632":45999,"skein1024-640":46000,"skein1024-648":46001,"skein1024-656":46002,"skein1024-664":46003,"skein1024-672":46004,"skein1024-680":46005,"skein1024-688":46006,"skein1024-696":46007,"skein1024-704":46008,"skein1024-712":46009,"skein1024-720":46010,"skein1024-728":46011,"skein1024-736":46012,"skein1024-744":46013,"skein1024-752":46014,"skein1024-760":46015,"skein1024-768":46016,"skein1024-776":46017,"skein1024-784":46018,"skein1024-792":46019,"skein1024-800":46020,"skein1024-808":46021,"skein1024-816":46022,"skein1024-824":46023,"skein1024-832":46024,"skein1024-840":46025,"skein1024-848":46026,"skein1024-856":46027,"skein1024-864":46028,"skein1024-872":46029,"skein1024-880":46030,"skein1024-888":46031,"skein1024-896":46032,"skein1024-904":46033,"skein1024-912":46034,"skein1024-920":46035,"skein1024-928":46036,"skein1024-936":46037,"skein1024-944":46038,"skein1024-952":46039,"skein1024-960":46040,"skein1024-968":46041,"skein1024-976":46042,"skein1024-984":46043,"skein1024-992":46044,"skein1024-1000":46045,"skein1024-1008":46046,"skein1024-1016":46047,"skein1024-1024":46048,"holochain-adr-v0":8417572,"holochain-adr-v1":8483108,"holochain-key-v0":9728292,"holochain-key-v1":9793828,"holochain-sig-v0":10645796,"holochain-sig-v1":10711332}')},function(e,t,r){"use strict";t.randomBytes=t.rng=t.pseudoRandomBytes=t.prng=r(30),t.createHash=t.Hash=r(45),t.createHmac=t.Hmac=r(198);var n=r(460),i=Object.keys(n),o=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(i);t.getHashes=function(){return o};var a=r(201);t.pbkdf2=a.pbkdf2,t.pbkdf2Sync=a.pbkdf2Sync;var s=r(462);t.Cipher=s.Cipher,t.createCipher=s.createCipher,t.Cipheriv=s.Cipheriv,t.createCipheriv=s.createCipheriv,t.Decipher=s.Decipher,t.createDecipher=s.createDecipher,t.Decipheriv=s.Decipheriv,t.createDecipheriv=s.createDecipheriv,t.getCiphers=s.getCiphers,t.listCiphers=s.listCiphers;var f=r(477);t.DiffieHellmanGroup=f.DiffieHellmanGroup,t.createDiffieHellmanGroup=f.createDiffieHellmanGroup,t.getDiffieHellman=f.getDiffieHellman,t.createDiffieHellman=f.createDiffieHellman,t.DiffieHellman=f.DiffieHellman;var u=r(480);t.createSign=u.createSign,t.Sign=u.Sign,t.createVerify=u.createVerify,t.Verify=u.Verify,t.createECDH=r(500);var c=r(501);t.publicEncrypt=c.publicEncrypt,t.privateEncrypt=c.privateEncrypt,t.publicDecrypt=c.publicDecrypt,t.privateDecrypt=c.privateDecrypt;var d=r(504);t.randomFill=d.randomFill,t.randomFillSync=d.randomFillSync,t.createCredentials=function(){throw new Error(["sorry, createCredentials is not implemented yet","we accept pull requests","https://github.com/crypto-browserify/crypto-browserify"].join("\n"))},t.constants={DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,ALPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6}},function(e,t,r){"use strict";var n=r(5).Buffer;function i(e){n.isBuffer(e)||(e=n.from(e));for(var t=e.length/4|0,r=new Array(t),i=0;i>>24]^c[p>>>16&255]^d[b>>>8&255]^l[255&y]^t[v++],a=u[p>>>24]^c[b>>>16&255]^d[y>>>8&255]^l[255&h]^t[v++],s=u[b>>>24]^c[y>>>16&255]^d[h>>>8&255]^l[255&p]^t[v++],f=u[y>>>24]^c[h>>>16&255]^d[p>>>8&255]^l[255&b]^t[v++],h=o,p=a,b=s,y=f;return o=(n[h>>>24]<<24|n[p>>>16&255]<<16|n[b>>>8&255]<<8|n[255&y])^t[v++],a=(n[p>>>24]<<24|n[b>>>16&255]<<16|n[y>>>8&255]<<8|n[255&h])^t[v++],s=(n[b>>>24]<<24|n[y>>>16&255]<<16|n[h>>>8&255]<<8|n[255&p])^t[v++],f=(n[y>>>24]<<24|n[h>>>16&255]<<16|n[p>>>8&255]<<8|n[255&b])^t[v++],[o>>>=0,a>>>=0,s>>>=0,f>>>=0]}var s=[0,1,2,4,8,16,32,64,128,27,54],f=function(){for(var e=new Array(256),t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;for(var r=[],n=[],i=[[],[],[],[]],o=[[],[],[],[]],a=0,s=0,f=0;f<256;++f){var u=s^s<<1^s<<2^s<<3^s<<4;u=u>>>8^255&u^99,r[a]=u,n[u]=a;var c=e[a],d=e[c],l=e[d],h=257*e[u]^16843008*u;i[0][a]=h<<24|h>>>8,i[1][a]=h<<16|h>>>16,i[2][a]=h<<8|h>>>24,i[3][a]=h,h=16843009*l^65537*d^257*c^16843008*a,o[0][u]=h<<24|h>>>8,o[1][u]=h<<16|h>>>16,o[2][u]=h<<8|h>>>24,o[3][u]=h,0===a?a=s=1:(a=c^e[e[e[l^c]]],s^=e[e[s]])}return{SBOX:r,INV_SBOX:n,SUB_MIX:i,INV_SUB_MIX:o}}();function u(e){this._key=i(e),this._reset()}u.blockSize=16,u.keySize=32,u.prototype.blockSize=u.blockSize,u.prototype.keySize=u.keySize,u.prototype._reset=function(){for(var e=this._key,t=e.length,r=t+6,n=4*(r+1),i=[],o=0;o>>24,a=f.SBOX[a>>>24]<<24|f.SBOX[a>>>16&255]<<16|f.SBOX[a>>>8&255]<<8|f.SBOX[255&a],a^=s[o/t|0]<<24):t>6&&o%t==4&&(a=f.SBOX[a>>>24]<<24|f.SBOX[a>>>16&255]<<16|f.SBOX[a>>>8&255]<<8|f.SBOX[255&a]),i[o]=i[o-t]^a}for(var u=[],c=0;c>>24]]^f.INV_SUB_MIX[1][f.SBOX[l>>>16&255]]^f.INV_SUB_MIX[2][f.SBOX[l>>>8&255]]^f.INV_SUB_MIX[3][f.SBOX[255&l]]}this._nRounds=r,this._keySchedule=i,this._invKeySchedule=u},u.prototype.encryptBlockRaw=function(e){return a(e=i(e),this._keySchedule,f.SUB_MIX,f.SBOX,this._nRounds)},u.prototype.encryptBlock=function(e){var t=this.encryptBlockRaw(e),r=n.allocUnsafe(16);return r.writeUInt32BE(t[0],0),r.writeUInt32BE(t[1],4),r.writeUInt32BE(t[2],8),r.writeUInt32BE(t[3],12),r},u.prototype.decryptBlock=function(e){var t=(e=i(e))[1];e[1]=e[3],e[3]=t;var r=a(e,this._invKeySchedule,f.INV_SUB_MIX,f.INV_SBOX,this._nRounds),o=n.allocUnsafe(16);return o.writeUInt32BE(r[0],0),o.writeUInt32BE(r[3],4),o.writeUInt32BE(r[2],8),o.writeUInt32BE(r[1],12),o},u.prototype.scrub=function(){o(this._keySchedule),o(this._invKeySchedule),o(this._key)},e.exports.AES=u},function(e,t,r){"use strict";var n=r(5).Buffer,i=r(96);e.exports=function(e,t,r,o){if(n.isBuffer(e)||(e=n.from(e,"binary")),t&&(n.isBuffer(t)||(t=n.from(t,"binary")),8!==t.length))throw new RangeError("salt should be Buffer with 8 byte length");for(var a=r/8,s=n.alloc(a),f=n.alloc(o||0),u=n.alloc(0);a>0||o>0;){var c=new i;c.update(u),c.update(e),t&&c.update(t),u=c.digest();var d=0;if(a>0){var l=s.length-a;d=Math.min(a,u.length),u.copy(s,l,0,d),a-=d}if(d0){var h=f.length-o,p=Math.min(o,u.length-d);u.copy(f,h,d,d+p),o-=p}}return u.fill(0),{key:s,iv:f}}},function(e,t,r){"use strict";var n=r(0)(r(2)),i=r(490),o=r(497),a=r(498),s=r(111),f=r(201),u=r(5).Buffer;function c(e){var t;"object"!==(0,n.default)(e)||u.isBuffer(e)||(t=e.passphrase,e=e.key),"string"==typeof e&&(e=u.from(e));var r,c,d=a(e,t),l=d.tag,h=d.data;switch(l){case"CERTIFICATE":c=i.certificate.decode(h,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(c||(c=i.PublicKey.decode(h,"der")),r=c.algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return i.RSAPublicKey.decode(c.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return c.subjectPrivateKey=c.subjectPublicKey,{type:"ec",data:c};case"1.2.840.10040.4.1":return c.algorithm.params.pub_key=i.DSAparam.decode(c.subjectPublicKey.data,"der"),{type:"dsa",data:c.algorithm.params};default:throw new Error("unknown key id "+r)}case"ENCRYPTED PRIVATE KEY":h=function(e,t){var r=e.algorithm.decrypt.kde.kdeparams.salt,n=parseInt(e.algorithm.decrypt.kde.kdeparams.iters.toString(),10),i=o[e.algorithm.decrypt.cipher.algo.join(".")],a=e.algorithm.decrypt.cipher.iv,c=e.subjectPrivateKey,d=parseInt(i.split("-")[1],10)/8,l=f.pbkdf2Sync(t,r,n,d,"sha1"),h=s.createDecipheriv(i,l,a),p=[];return p.push(h.update(c)),p.push(h.final()),u.concat(p)}(h=i.EncryptedPrivateKey.decode(h,"der"),t);case"PRIVATE KEY":switch(r=(c=i.PrivateKey.decode(h,"der")).algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return i.RSAPrivateKey.decode(c.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:c.algorithm.curve,privateKey:i.ECPrivateKey.decode(c.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return c.algorithm.params.priv_key=i.DSAparam.decode(c.subjectPrivateKey,"der"),{type:"dsa",params:c.algorithm.params};default:throw new Error("unknown key id "+r)}case"RSA PUBLIC KEY":return i.RSAPublicKey.decode(h,"der");case"RSA PRIVATE KEY":return i.RSAPrivateKey.decode(h,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:i.DSAPrivateKey.decode(h,"der")};case"EC PRIVATE KEY":return{curve:(h=i.ECPrivateKey.decode(h,"der")).parameters.value,privateKey:h.privateKey};default:throw new Error("unknown key type "+l)}}e.exports=c,c.signature=i.signature},function(e,t,r){"use strict";(function(e){var n=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getLength=t.decode=t.encode=void 0;var i=n(r(3));function o(e,t){if("0"===e[0]&&"0"===e[1])throw new Error("invalid RLP: extra zeros");return parseInt(e,t)}function a(t,r){if(t<56)return e.from([t+r]);var n=f(t),i=f(r+55+n.length/2);return e.from(i+n,"hex")}function s(e){return"0x"===e.slice(0,2)}function f(e){if(e<0)throw new Error("Invalid integer as argument, must be unsigned!");var t=e.toString(16);return t.length%2?"0"+t:t}function u(t){if(!e.isBuffer(t)){if("string"==typeof t)return s(t)?e.from((n="string"!=typeof(o=t)?o:s(o)?o.slice(2):o).length%2?"0"+n:n,"hex"):e.from(t);if("number"==typeof t||"bigint"==typeof t)return t?(r=f(t),e.from(r,"hex")):e.from([]);if(null==t)return e.from([]);if(t instanceof Uint8Array)return e.from(t);if(i.default.isBN(t))return e.from(t.toArray());throw new Error("invalid type")}var r,n,o;return t}t.encode=function t(r){if(Array.isArray(r)){for(var n=[],i=0;ir.length)throw new Error("invalid rlp: total length is larger than the data");if(0===(s=r.slice(i,d)).length)throw new Error("invalid rlp, List has a invalid length");for(;s.length;)f=t(s),u.push(f.data),s=f.remainder;return{data:u,remainder:r.slice(d)}}(u(t));if(r)return n;if(0!==n.remainder.length)throw new Error("invalid remainder");return n.data},t.getLength=function(t){if(!t||0===t.length)return e.from([]);var r=u(t),n=r[0];if(n<=127)return r.length;if(n<=183)return n-127;if(n<=191)return n-182;if(n<=247)return n-191;var i=n-246;return i+o(r.slice(1,i).toString("hex"),16)}}).call(this,r(1).Buffer)},function(e,t,r){"use strict";var n=r(3),i=r(22),o=i.getNAF,a=i.getJSF,s=i.assert;function f(e,t){this.type=e,this.p=new n(t.p,16),this.red=t.prime?n.red(t.prime):n.mont(this.p),this.zero=new n(0).toRed(this.red),this.one=new n(1).toRed(this.red),this.two=new n(2).toRed(this.red),this.n=t.n&&new n(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function u(e,t){this.curve=e,this.type=t,this.precomputed=null}e.exports=f,f.prototype.point=function(){throw new Error("Not implemented")},f.prototype.validate=function(){throw new Error("Not implemented")},f.prototype._fixedNafMul=function(e,t){s(e.precomputed);var r=e._getDoubles(),n=o(t,1,this._bitLength),i=(1<=a;c--)f=(f<<1)+n[c];u.push(f)}for(var d=this.jpoint(null,null,null),l=this.jpoint(null,null,null),h=i;h>0;h--){for(a=0;a=0;u--){for(var c=0;u>=0&&0===a[u];u--)c++;if(u>=0&&c++,f=f.dblp(c),u<0)break;var d=a[u];s(0!==d),f="affine"===e.type?d>0?f.mixedAdd(i[d-1>>1]):f.mixedAdd(i[-d-1>>1].neg()):d>0?f.add(i[d-1>>1]):f.add(i[-d-1>>1].neg())}return"affine"===e.type?f.toP():f},f.prototype._wnafMulAdd=function(e,t,r,n,i){var s,f,u,c=this._wnafT1,d=this._wnafT2,l=this._wnafT3,h=0;for(s=0;s=1;s-=2){var b=s-1,y=s;if(1===c[b]&&1===c[y]){var v=[t[b],null,null,t[y]];0===t[b].y.cmp(t[y].y)?(v[1]=t[b].add(t[y]),v[2]=t[b].toJ().mixedAdd(t[y].neg())):0===t[b].y.cmp(t[y].y.redNeg())?(v[1]=t[b].toJ().mixedAdd(t[y]),v[2]=t[b].add(t[y].neg())):(v[1]=t[b].toJ().mixedAdd(t[y]),v[2]=t[b].toJ().mixedAdd(t[y].neg()));var m=[-3,-1,-5,-7,0,7,5,1,3],g=a(r[b],r[y]);for(h=Math.max(g[0].length,h),l[b]=new Array(h),l[y]=new Array(h),f=0;f=0;s--){for(var A=0;s>=0;){var E=!0;for(f=0;f=0&&A++,k=k.dblp(A),s<0)break;for(f=0;f0?u=d[f][x-1>>1]:x<0&&(u=d[f][-x-1>>1].neg()),k="affine"===u.type?k.mixedAdd(u):k.add(u))}}for(s=0;s=Math.ceil((e.bitLength()+1)/t.step)},u.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],n=this,i=0;i>>32-t}function u(e,t,r,n,i,o,a){return f(e+(t&r|~t&n)+i+o|0,a)+t|0}function c(e,t,r,n,i,o,a){return f(e+(t&n|r&~n)+i+o|0,a)+t|0}function d(e,t,r,n,i,o,a){return f(e+(t^r^n)+i+o|0,a)+t|0}function l(e,t,r,n,i,o,a){return f(e+(r^(t|~n))+i+o|0,a)+t|0}n(s,i),s.prototype._update=function(){for(var e=a,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);var r=this._a,n=this._b,i=this._c,o=this._d;r=u(r,n,i,o,e[0],3614090360,7),o=u(o,r,n,i,e[1],3905402710,12),i=u(i,o,r,n,e[2],606105819,17),n=u(n,i,o,r,e[3],3250441966,22),r=u(r,n,i,o,e[4],4118548399,7),o=u(o,r,n,i,e[5],1200080426,12),i=u(i,o,r,n,e[6],2821735955,17),n=u(n,i,o,r,e[7],4249261313,22),r=u(r,n,i,o,e[8],1770035416,7),o=u(o,r,n,i,e[9],2336552879,12),i=u(i,o,r,n,e[10],4294925233,17),n=u(n,i,o,r,e[11],2304563134,22),r=u(r,n,i,o,e[12],1804603682,7),o=u(o,r,n,i,e[13],4254626195,12),i=u(i,o,r,n,e[14],2792965006,17),r=c(r,n=u(n,i,o,r,e[15],1236535329,22),i,o,e[1],4129170786,5),o=c(o,r,n,i,e[6],3225465664,9),i=c(i,o,r,n,e[11],643717713,14),n=c(n,i,o,r,e[0],3921069994,20),r=c(r,n,i,o,e[5],3593408605,5),o=c(o,r,n,i,e[10],38016083,9),i=c(i,o,r,n,e[15],3634488961,14),n=c(n,i,o,r,e[4],3889429448,20),r=c(r,n,i,o,e[9],568446438,5),o=c(o,r,n,i,e[14],3275163606,9),i=c(i,o,r,n,e[3],4107603335,14),n=c(n,i,o,r,e[8],1163531501,20),r=c(r,n,i,o,e[13],2850285829,5),o=c(o,r,n,i,e[2],4243563512,9),i=c(i,o,r,n,e[7],1735328473,14),r=d(r,n=c(n,i,o,r,e[12],2368359562,20),i,o,e[5],4294588738,4),o=d(o,r,n,i,e[8],2272392833,11),i=d(i,o,r,n,e[11],1839030562,16),n=d(n,i,o,r,e[14],4259657740,23),r=d(r,n,i,o,e[1],2763975236,4),o=d(o,r,n,i,e[4],1272893353,11),i=d(i,o,r,n,e[7],4139469664,16),n=d(n,i,o,r,e[10],3200236656,23),r=d(r,n,i,o,e[13],681279174,4),o=d(o,r,n,i,e[0],3936430074,11),i=d(i,o,r,n,e[3],3572445317,16),n=d(n,i,o,r,e[6],76029189,23),r=d(r,n,i,o,e[9],3654602809,4),o=d(o,r,n,i,e[12],3873151461,11),i=d(i,o,r,n,e[15],530742520,16),r=l(r,n=d(n,i,o,r,e[2],3299628645,23),i,o,e[0],4096336452,6),o=l(o,r,n,i,e[7],1126891415,10),i=l(i,o,r,n,e[14],2878612391,15),n=l(n,i,o,r,e[5],4237533241,21),r=l(r,n,i,o,e[12],1700485571,6),o=l(o,r,n,i,e[3],2399980690,10),i=l(i,o,r,n,e[10],4293915773,15),n=l(n,i,o,r,e[1],2240044497,21),r=l(r,n,i,o,e[8],1873313359,6),o=l(o,r,n,i,e[15],4264355552,10),i=l(i,o,r,n,e[6],2734768916,15),n=l(n,i,o,r,e[13],1309151649,21),r=l(r,n,i,o,e[4],4149444226,6),o=l(o,r,n,i,e[11],3174756917,10),i=l(i,o,r,n,e[2],718787259,15),n=l(n,i,o,r,e[9],3951481745,21),this._a=this._a+r|0,this._b=this._b+n|0,this._c=this._c+i|0,this._d=this._d+o|0},s.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=o.allocUnsafe(16);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e},e.exports=s},function(e,t,r){"use strict";var n=r(46).codes.ERR_STREAM_PREMATURE_CLOSE;function i(){}e.exports=function e(t,r,o){if("function"==typeof r)return e(t,null,r);r||(r={}),o=function(e){var t=!1;return function(){if(!t){t=!0;for(var r=arguments.length,n=new Array(r),i=0;i>>32-t}function b(e,t,r,n,i,o,a,s){return p(e+(t^r^n)+o+a|0,s)+i|0}function y(e,t,r,n,i,o,a,s){return p(e+(t&r|~t&n)+o+a|0,s)+i|0}function v(e,t,r,n,i,o,a,s){return p(e+((t|~r)^n)+o+a|0,s)+i|0}function m(e,t,r,n,i,o,a,s){return p(e+(t&n|r&~n)+o+a|0,s)+i|0}function g(e,t,r,n,i,o,a,s){return p(e+(t^(r|~n))+o+a|0,s)+i|0}i(h,o),h.prototype._update=function(){for(var e=a,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);for(var r=0|this._a,n=0|this._b,i=0|this._c,o=0|this._d,h=0|this._e,w=0|this._a,_=0|this._b,k=0|this._c,S=0|this._d,A=0|this._e,E=0;E<80;E+=1){var x,P;E<16?(x=b(r,n,i,o,h,e[s[E]],d[0],u[E]),P=g(w,_,k,S,A,e[f[E]],l[0],c[E])):E<32?(x=y(r,n,i,o,h,e[s[E]],d[1],u[E]),P=m(w,_,k,S,A,e[f[E]],l[1],c[E])):E<48?(x=v(r,n,i,o,h,e[s[E]],d[2],u[E]),P=v(w,_,k,S,A,e[f[E]],l[2],c[E])):E<64?(x=m(r,n,i,o,h,e[s[E]],d[3],u[E]),P=y(w,_,k,S,A,e[f[E]],l[3],c[E])):(x=g(r,n,i,o,h,e[s[E]],d[4],u[E]),P=b(w,_,k,S,A,e[f[E]],l[4],c[E])),r=h,h=o,o=p(i,10),i=n,n=x,w=A,A=S,S=p(k,10),k=_,_=P}var O=this._b+i+S|0;this._b=this._c+o+A|0,this._c=this._d+h+w|0,this._d=this._e+r+_|0,this._e=this._a+n+k|0,this._a=O},h.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=n.alloc?n.alloc(20):new n(20);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e.writeInt32LE(this._e,16),e},e.exports=h},function(e,t,r){"use strict";var n=e.exports=function(e){e=e.toLowerCase();var t=n[e];if(!t)throw new Error(e+" is not supported (we accept pull requests)");return new t};n.sha=r(315),n.sha1=r(316),n.sha224=r(317),n.sha256=r(158),n.sha384=r(318),n.sha512=r(159)},function(e,t,r){"use strict";var n=r(1),i=n.Buffer;function o(e,t){for(var r in e)t[r]=e[r]}function a(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=n:(o(n,t),t.Buffer=a),o(i,a),a.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,r)},a.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=i(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},a.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}},function(e,t,r){"use strict";(function(t,n,i){var o=r(76);function a(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,r){var n=e.entry;e.entry=null;for(;n;){var i=n.callback;t.pendingcb--,i(r),n=n.next}t.corkedRequestsFree?t.corkedRequestsFree.next=e:t.corkedRequestsFree=e}(t,e)}}e.exports=m;var s,f=!t.browser&&["v0.10","v0.9."].indexOf(t.version.slice(0,5))>-1?n:o.nextTick;m.WritableState=v;var u=Object.create(r(62));u.inherits=r(4);var c={deprecate:r(75)},d=r(162),l=r(100).Buffer,h=i.Uint8Array||function(){};var p,b=r(163);function y(){}function v(e,t){s=s||r(35),e=e||{};var n=t instanceof s;this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var i=e.highWaterMark,u=e.writableHighWaterMark,c=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:n&&(u||0===u)?u:c,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var d=!1===e.decodeStrings;this.decodeStrings=!d,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var r=e._writableState,n=r.sync,i=r.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(r),t)!function(e,t,r,n,i){--t.pendingcb,r?(o.nextTick(i,n),o.nextTick(A,e,t),e._writableState.errorEmitted=!0,e.emit("error",n)):(i(n),e._writableState.errorEmitted=!0,e.emit("error",n),A(e,t))}(e,r,n,t,i);else{var a=k(r);a||r.corked||r.bufferProcessing||!r.bufferedRequest||_(e,r),n?f(w,e,r,a,i):w(e,r,a,i)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new a(this)}function m(e){if(s=s||r(35),!(p.call(m,this)||this instanceof s))return new m(e);this._writableState=new v(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),d.call(this)}function g(e,t,r,n,i,o,a){t.writelen=n,t.writecb=a,t.writing=!0,t.sync=!0,r?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function w(e,t,r,n){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,n(),A(e,t)}function _(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var n=t.bufferedRequestCount,i=new Array(n),o=t.corkedRequestsFree;o.entry=r;for(var s=0,f=!0;r;)i[s]=r,r.isBuf||(f=!1),r=r.next,s+=1;i.allBuffers=f,g(e,t,!0,t.length,i,"",o.finish),t.pendingcb++,t.lastBufferedRequest=null,o.next?(t.corkedRequestsFree=o.next,o.next=null):t.corkedRequestsFree=new a(t),t.bufferedRequestCount=0}else{for(;r;){var u=r.chunk,c=r.encoding,d=r.callback;if(g(e,t,!1,t.objectMode?1:u.length,u,c,d),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function k(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function S(e,t){e._final((function(r){t.pendingcb--,r&&e.emit("error",r),t.prefinished=!0,e.emit("prefinish"),A(e,t)}))}function A(e,t){var r=k(t);return r&&(!function(e,t){t.prefinished||t.finalCalled||("function"==typeof e._final?(t.pendingcb++,t.finalCalled=!0,o.nextTick(S,e,t)):(t.prefinished=!0,e.emit("prefinish")))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),r}u.inherits(m,d),v.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(v.prototype,"buffer",{get:c.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(p=Function.prototype[Symbol.hasInstance],Object.defineProperty(m,Symbol.hasInstance,{value:function(e){return!!p.call(this,e)||this===m&&(e&&e._writableState instanceof v)}})):p=function(e){return e instanceof this},m.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},m.prototype.write=function(e,t,r){var n,i=this._writableState,a=!1,s=!i.objectMode&&(n=e,l.isBuffer(n)||n instanceof h);return s&&!l.isBuffer(e)&&(e=function(e){return l.from(e)}(e)),"function"==typeof t&&(r=t,t=null),s?t="buffer":t||(t=i.defaultEncoding),"function"!=typeof r&&(r=y),i.ended?function(e,t){var r=new Error("write after end");e.emit("error",r),o.nextTick(t,r)}(this,r):(s||function(e,t,r,n){var i=!0,a=!1;return null===r?a=new TypeError("May not write null values to stream"):"string"==typeof r||void 0===r||t.objectMode||(a=new TypeError("Invalid non-string/buffer chunk")),a&&(e.emit("error",a),o.nextTick(n,a),i=!1),i}(this,i,e,r))&&(i.pendingcb++,a=function(e,t,r,n,i,o){if(!r){var a=function(e,t,r){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=l.from(t,r));return t}(t,n,i);n!==a&&(r=!0,i="buffer",n=a)}var s=t.objectMode?1:n.length;t.length+=s;var f=t.length-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(m.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),m.prototype._write=function(e,t,r){r(new Error("_write() is not implemented"))},m.prototype._writev=null,m.prototype.end=function(e,t,r){var n=this._writableState;"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||n.finished||function(e,t,r){t.ending=!0,A(e,t),r&&(t.finished?o.nextTick(r):e.once("finish",r));t.ended=!0,e.writable=!1}(this,n,r)},Object.defineProperty(m.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),m.prototype.destroy=b.destroy,m.prototype._undestroy=b.undestroy,m.prototype._destroy=function(e,t){this.end(),t(e)}}).call(this,r(6),r(164).setImmediate,r(7))},function(e,t,r){"use strict";(function(e){var n=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.toType=t.TypeOutput=t.bnToRlp=t.bnToUnpaddedBuffer=t.bnToHex=void 0;var i,o=n(r(3)),a=r(42),s=r(34);function f(t){return(0,s.unpadBuffer)(t.toArrayLike(e))}t.bnToHex=function(e){return"0x"+e.toString(16)},t.bnToUnpaddedBuffer=f,t.bnToRlp=function(e){return f(e)},function(e){e[e.Number=0]="Number",e[e.BN=1]="BN",e[e.Buffer=2]="Buffer",e[e.PrefixedHexString=3]="PrefixedHexString"}(i=t.TypeOutput||(t.TypeOutput={})),t.toType=function(e,t){if(null===e)return null;if(void 0!==e){if("string"==typeof e&&!(0,a.isHexString)(e))throw new Error("A string must be provided with a 0x-prefix, given: "+e);if("number"==typeof e&&!Number.isSafeInteger(e))throw new Error("The provided number is greater than MAX_SAFE_INTEGER (please use an alternative input type)");var r=(0,s.toBuffer)(e);if(t===i.Buffer)return r;if(t===i.BN)return new o.default(r);if(t===i.Number){var n=new o.default(r),f=new o.default(Number.MAX_SAFE_INTEGER.toString());if(n.gt(f))throw new Error("The provided number is greater than MAX_SAFE_INTEGER (please use an alternative output type)");return n.toNumber()}return"0x"+r.toString("hex")}}}).call(this,r(1).Buffer)},function(e,t,r){"use strict";var n=Object.prototype.hasOwnProperty,i="~";function o(){}function a(e,t,r){this.fn=e,this.context=t,this.once=r||!1}function s(e,t,r,n,o){if("function"!=typeof r)throw new TypeError("The listener must be a function");var s=new a(r,n||e,o),f=i?i+t:t;return e._events[f]?e._events[f].fn?e._events[f]=[e._events[f],s]:e._events[f].push(s):(e._events[f]=s,e._eventsCount++),e}function f(e,t){0==--e._eventsCount?e._events=new o:delete e._events[t]}function u(){this._events=new o,this._eventsCount=0}Object.create&&(o.prototype=Object.create(null),(new o).__proto__||(i=!1)),u.prototype.eventNames=function(){var e,t,r=[];if(0===this._eventsCount)return r;for(t in e=this._events)n.call(e,t)&&r.push(i?t.slice(1):t);return Object.getOwnPropertySymbols?r.concat(Object.getOwnPropertySymbols(e)):r},u.prototype.listeners=function(e){var t=i?i+e:e,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var n=0,o=r.length,a=new Array(o);n=0||"tuple"===e)&&v[t])return!0;return(y[t]||"payable"===t)&&p.throwArgumentError("invalid modifier","name",t),!1}function g(e,t){for(var r in t)(0,c.defineReadOnly)(e,r,t[r])}var w=Object.freeze({sighash:"sighash",minimal:"minimal",full:"full",json:"json"});t.FormatTypes=w;var _=new RegExp(/^(.*)\[([0-9]*)\]$/),k=function(){function e(t,r){(0,s.default)(this,e),t!==b&&p.throwError("use fromString",d.Logger.errors.UNSUPPORTED_OPERATION,{operation:"new ParamType()"}),g(this,r);var n=this.type.match(_);g(this,n?{arrayLength:parseInt(n[2]||"-1"),arrayChildren:e.fromObject({type:n[1],components:this.components}),baseType:"array"}:{arrayLength:null,arrayChildren:null,baseType:null!=this.components?"tuple":this.type}),this._isParamType=!0,Object.freeze(this)}return(0,f.default)(e,[{key:"format",value:function(e){if(e||(e=w.sighash),w[e]||p.throwArgumentError("invalid format type","format",e),e===w.json){var t={type:"tuple"===this.baseType?"tuple":this.type,name:this.name||void 0};return"boolean"==typeof this.indexed&&(t.indexed=this.indexed),this.components&&(t.components=this.components.map((function(t){return JSON.parse(t.format(e))}))),JSON.stringify(t)}var r="";return"array"===this.baseType?(r+=this.arrayChildren.format(e),r+="["+(this.arrayLength<0?"":String(this.arrayLength))+"]"):"tuple"===this.baseType?(e!==w.sighash&&(r+=this.type),r+="("+this.components.map((function(t){return t.format(e)})).join(e===w.full?", ":",")+")"):r+=this.type,e!==w.sighash&&(!0===this.indexed&&(r+=" indexed"),e===w.full&&this.name&&(r+=" "+this.name)),r}}],[{key:"from",value:function(t,r){return"string"==typeof t?e.fromString(t,r):e.fromObject(t)}},{key:"fromObject",value:function(t){return e.isParamType(t)?t:new e(b,{name:t.name||null,type:B(t.type),indexed:null==t.indexed?null:!!t.indexed,components:t.components?t.components.map(e.fromObject):null})}},{key:"fromString",value:function(t,r){return function(t){return e.fromObject({name:t.name,type:t.type,indexed:t.indexed,components:t.components})}(function(e,t){var r=e;function n(t){p.throwArgumentError("unexpected character at position ".concat(t),"param",e)}function i(e){var r={type:"",name:"",parent:e,state:{allowType:!0}};return t&&(r.indexed=!1),r}e=e.replace(/\s/g," ");for(var o={type:"",name:"",state:{allowType:!0}},a=o,s=0;s2&&p.throwArgumentError("invalid human-readable ABI signature","value",e),r[1].match(/^[0-9]+$/)||p.throwArgumentError("invalid human-readable ABI signature gas","value",e),t.gas=u.BigNumber.from(r[1]),r[0]):e}function P(e,t){t.constant=!1,t.payable=!1,t.stateMutability="nonpayable",e.split(" ").forEach((function(e){switch(e.trim()){case"constant":t.constant=!0;break;case"payable":t.payable=!0,t.stateMutability="payable";break;case"nonpayable":t.payable=!1,t.stateMutability="nonpayable";break;case"pure":t.constant=!0,t.stateMutability="pure";break;case"view":t.constant=!0,t.stateMutability="view";break;case"external":case"public":case"":break;default:console.log("unknown modifier: "+e)}}))}function O(e){var t={constant:!1,payable:!0,stateMutability:"payable"};return null!=e.stateMutability?(t.stateMutability=e.stateMutability,t.constant="view"===t.stateMutability||"pure"===t.stateMutability,null!=e.constant&&!!e.constant!==t.constant&&p.throwArgumentError("cannot have constant function with mutability "+t.stateMutability,"value",e),t.payable="payable"===t.stateMutability,null!=e.payable&&!!e.payable!==t.payable&&p.throwArgumentError("cannot have payable function with mutability "+t.stateMutability,"value",e)):null!=e.payable?(t.payable=!!e.payable,null!=e.constant||t.payable||"constructor"===e.type||p.throwArgumentError("unable to determine stateMutability","value",e),t.constant=!!e.constant,t.constant?t.stateMutability="view":t.stateMutability=t.payable?"payable":"nonpayable",t.payable&&t.constant&&p.throwArgumentError("cannot have constant payable function","value",e)):null!=e.constant?(t.constant=!!e.constant,t.payable=!t.constant,t.stateMutability=t.constant?"view":"payable"):"constructor"!==e.type&&p.throwArgumentError("unable to determine stateMutability","value",e),t}t.EventFragment=E;var R=function(e){(0,i.default)(r,e);var t=h(r);function r(){return(0,s.default)(this,r),t.apply(this,arguments)}return(0,f.default)(r,[{key:"format",value:function(e){if(e||(e=w.sighash),w[e]||p.throwArgumentError("invalid format type","format",e),e===w.json)return JSON.stringify({type:"constructor",stateMutability:"nonpayable"!==this.stateMutability?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map((function(t){return JSON.parse(t.format(e))}))});e===w.sighash&&p.throwError("cannot format a constructor for sighash",d.Logger.errors.UNSUPPORTED_OPERATION,{operation:"format(sighash)"});var t="constructor("+this.inputs.map((function(t){return t.format(e)})).join(e===w.full?", ":",")+") ";return this.stateMutability&&"nonpayable"!==this.stateMutability&&(t+=this.stateMutability+" "),t.trim()}}],[{key:"from",value:function(e){return"string"==typeof e?r.fromString(e):r.fromObject(e)}},{key:"fromObject",value:function(e){if(r.isConstructorFragment(e))return e;"constructor"!==e.type&&p.throwArgumentError("invalid constructor object","value",e);var t=O(e);t.constant&&p.throwArgumentError("constructor cannot be constant","value",e);var n={name:null,type:e.type,inputs:e.inputs?e.inputs.map(k.fromObject):[],payable:t.payable,stateMutability:t.stateMutability,gas:e.gas?u.BigNumber.from(e.gas):null};return new r(b,n)}},{key:"fromString",value:function(e){var t={type:"constructor"},n=(e=x(e,t)).match(U);return n&&"constructor"===n[1].trim()||p.throwArgumentError("invalid constructor string","value",e),t.inputs=S(n[2].trim(),!1),P(n[3].trim(),t),r.fromObject(t)}},{key:"isConstructorFragment",value:function(e){return e&&e._isFragment&&"constructor"===e.type}}]),r}(A);t.ConstructorFragment=R;var T=function(e){(0,i.default)(r,e);var t=h(r);function r(){return(0,s.default)(this,r),t.apply(this,arguments)}return(0,f.default)(r,[{key:"format",value:function(e){if(e||(e=w.sighash),w[e]||p.throwArgumentError("invalid format type","format",e),e===w.json)return JSON.stringify({type:"function",name:this.name,constant:this.constant,stateMutability:"nonpayable"!==this.stateMutability?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map((function(t){return JSON.parse(t.format(e))})),outputs:this.outputs.map((function(t){return JSON.parse(t.format(e))}))});var t="";return e!==w.sighash&&(t+="function "),t+=this.name+"("+this.inputs.map((function(t){return t.format(e)})).join(e===w.full?", ":",")+") ",e!==w.sighash&&(this.stateMutability?"nonpayable"!==this.stateMutability&&(t+=this.stateMutability+" "):this.constant&&(t+="view "),this.outputs&&this.outputs.length&&(t+="returns ("+this.outputs.map((function(t){return t.format(e)})).join(", ")+") "),null!=this.gas&&(t+="@"+this.gas.toString()+" ")),t.trim()}}],[{key:"from",value:function(e){return"string"==typeof e?r.fromString(e):r.fromObject(e)}},{key:"fromObject",value:function(e){if(r.isFunctionFragment(e))return e;"function"!==e.type&&p.throwArgumentError("invalid function object","value",e);var t=O(e),n={type:e.type,name:j(e.name),constant:t.constant,inputs:e.inputs?e.inputs.map(k.fromObject):[],outputs:e.outputs?e.outputs.map(k.fromObject):[],payable:t.payable,stateMutability:t.stateMutability,gas:e.gas?u.BigNumber.from(e.gas):null};return new r(b,n)}},{key:"fromString",value:function(e){var t={type:"function"},n=(e=x(e,t)).split(" returns ");n.length>2&&p.throwArgumentError("invalid function string","value",e);var i=n[0].match(U);if(i||p.throwArgumentError("invalid function signature","value",e),t.name=i[1].trim(),t.name&&j(t.name),t.inputs=S(i[2],!1),P(i[3].trim(),t),n.length>1){var o=n[1].match(U);""==o[1].trim()&&""==o[3].trim()||p.throwArgumentError("unexpected tokens","value",e),t.outputs=S(o[2],!1)}else t.outputs=[];return r.fromObject(t)}},{key:"isFunctionFragment",value:function(e){return e&&e._isFragment&&"function"===e.type}}]),r}(R);function M(e){var t=e.format();return"Error(string)"!==t&&"Panic(uint256)"!==t||p.throwArgumentError("cannot specify user defined ".concat(t," error"),"fragment",e),e}t.FunctionFragment=T;var I=function(e){(0,i.default)(r,e);var t=h(r);function r(){return(0,s.default)(this,r),t.apply(this,arguments)}return(0,f.default)(r,[{key:"format",value:function(e){if(e||(e=w.sighash),w[e]||p.throwArgumentError("invalid format type","format",e),e===w.json)return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map((function(t){return JSON.parse(t.format(e))}))});var t="";return e!==w.sighash&&(t+="error "),(t+=this.name+"("+this.inputs.map((function(t){return t.format(e)})).join(e===w.full?", ":",")+") ").trim()}}],[{key:"from",value:function(e){return"string"==typeof e?r.fromString(e):r.fromObject(e)}},{key:"fromObject",value:function(e){if(r.isErrorFragment(e))return e;"error"!==e.type&&p.throwArgumentError("invalid error object","value",e);var t={type:e.type,name:j(e.name),inputs:e.inputs?e.inputs.map(k.fromObject):[]};return M(new r(b,t))}},{key:"fromString",value:function(e){var t={type:"error"},n=e.match(U);return n||p.throwArgumentError("invalid error signature","value",e),t.name=n[1].trim(),t.name&&j(t.name),t.inputs=S(n[2],!1),M(r.fromObject(t))}},{key:"isErrorFragment",value:function(e){return e&&e._isFragment&&"error"===e.type}}]),r}(A);function B(e){return e.match(/^uint($|[^1-9])/)?e="uint256"+e.substring(4):e.match(/^int($|[^1-9])/)&&(e="int256"+e.substring(3)),e}t.ErrorFragment=I;var C=new RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$");function j(e){return e&&e.match(C)||p.throwArgumentError('invalid identifier "'.concat(e,'"'),"value",e),e}var U=new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$")},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getAddress=v,t.getContractAddress=function(e){var t=null;try{t=v(e.from)}catch(t){u.throwArgumentError("missing from address","transaction",e)}var r=(0,n.stripZeros)((0,n.arrayify)(i.BigNumber.from(e.nonce).toHexString()));return v((0,n.hexDataSlice)((0,o.keccak256)((0,a.encode)([t,r])),12))},t.getCreate2Address=function(e,t,r){32!==(0,n.hexDataLength)(t)&&u.throwArgumentError("salt must be 32 bytes","salt",t);32!==(0,n.hexDataLength)(r)&&u.throwArgumentError("initCodeHash must be 32 bytes","initCodeHash",r);return v((0,n.hexDataSlice)((0,o.keccak256)((0,n.concat)(["0xff",v(e),t,r])),12))},t.getIcapAddress=function(e){var t=(0,i._base16To36)(v(e).substring(2)).toUpperCase();for(;t.length<30;)t="0"+t;return"XE"+y("XE00"+t)+t},t.isAddress=function(e){try{return v(e),!0}catch(e){}return!1};var n=r(15),i=r(38),o=r(50),a=r(389),s=r(16),f=r(391),u=new s.Logger(f.version);function c(e){(0,n.isHexString)(e,20)||u.throwArgumentError("invalid address","address",e);for(var t=(e=e.toLowerCase()).substring(2).split(""),r=new Uint8Array(40),i=0;i<40;i++)r[i]=t[i].charCodeAt(0);for(var a=(0,n.arrayify)((0,o.keccak256)(r)),s=0;s<40;s+=2)a[s>>1]>>4>=8&&(t[s]=t[s].toUpperCase()),(15&a[s>>1])>=8&&(t[s+1]=t[s+1].toUpperCase());return"0x"+t.join("")}for(var d={},l=0;l<10;l++)d[String(l)]=String(l);for(var h=0;h<26;h++)d[String.fromCharCode(65+h)]=String(10+h);var p,b=Math.floor((p=9007199254740991,Math.log10?Math.log10(p):Math.log(p)/Math.LN10));function y(e){for(var t=(e=(e=e.toUpperCase()).substring(4)+e.substring(0,2)+"00").split("").map((function(e){return d[e]})).join("");t.length>=b;){var r=t.substring(0,b);t=parseInt(r,10)%97+t.substring(r.length)}for(var n=String(98-parseInt(t,10)%97);n.length<2;)n="0"+n;return n}function v(e){var t=null;if("string"!=typeof e&&u.throwArgumentError("invalid address","address",e),e.match(/^(0x)?[0-9a-fA-F]{40}$/))"0x"!==e.substring(0,2)&&(e="0x"+e),t=c(e),e.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&t!==e&&u.throwArgumentError("bad address checksum","address",e);else if(e.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(e.substring(2,4)!==y(e)&&u.throwArgumentError("bad icap checksum","address",e),t=(0,i._base36To16)(e.substring(4));t.length<40;)t="0"+t;t=c("0x"+t)}else u.throwArgumentError("invalid address","address",e);return t}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Utf8ErrorReason=t.Utf8ErrorFuncs=t.UnicodeNormalizationForm=void 0,t._toEscapedUtf8String=function(e,t){return'"'+d(e,t).map((function(e){if(e<256){switch(e){case 8:return"\\b";case 9:return"\\t";case 10:return"\\n";case 13:return"\\r";case 34:return'\\"';case 92:return"\\\\"}if(e>=32&&e<127)return String.fromCharCode(e)}return e<=65535?h(e):h(55296+((e-=65536)>>10&1023))+h(56320+(1023&e))})).join("")+'"'},t._toUtf8String=p,t.toUtf8Bytes=l,t.toUtf8CodePoints=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.current;return d(l(e,t))},t.toUtf8String=function(e,t){return p(d(e,t))};var n,i,o=r(15),a=r(16),s=r(404),f=new a.Logger(s.version);function u(e,t,r,n,o){if(e===i.BAD_PREFIX||e===i.UNEXPECTED_CONTINUE){for(var a=0,s=t+1;s>6==2;s++)a++;return a}return e===i.OVERRUN?r.length-t-1:0}t.UnicodeNormalizationForm=n,function(e){e.current="",e.NFC="NFC",e.NFD="NFD",e.NFKC="NFKC",e.NFKD="NFKD"}(n||(t.UnicodeNormalizationForm=n={})),t.Utf8ErrorReason=i,function(e){e.UNEXPECTED_CONTINUE="unexpected continuation byte",e.BAD_PREFIX="bad codepoint prefix",e.OVERRUN="string overrun",e.MISSING_CONTINUE="missing continuation byte",e.OUT_OF_RANGE="out of UTF-8 range",e.UTF16_SURROGATE="UTF-16 surrogate",e.OVERLONG="overlong representation"}(i||(t.Utf8ErrorReason=i={}));var c=Object.freeze({error:function(e,t,r,n,i){return f.throwArgumentError("invalid codepoint at offset ".concat(t,"; ").concat(e),"bytes",r)},ignore:u,replace:function(e,t,r,n,o){return e===i.OVERLONG?(n.push(o),0):(n.push(65533),u(e,t,r))}});function d(e,t){null==t&&(t=c.error),e=(0,o.arrayify)(e);for(var r=[],n=0;n>7!=0){var s=null,f=null;if(192==(224&a))s=1,f=127;else if(224==(240&a))s=2,f=2047;else{if(240!=(248&a)){n+=t(128==(192&a)?i.UNEXPECTED_CONTINUE:i.BAD_PREFIX,n-1,e,r);continue}s=3,f=65535}if(n-1+s>=e.length)n+=t(i.OVERRUN,n-1,e,r);else{for(var u=a&(1<<8-s-1)-1,d=0;d1114111?n+=t(i.OUT_OF_RANGE,n-1-s,e,r,u):u>=55296&&u<=57343?n+=t(i.UTF16_SURROGATE,n-1-s,e,r,u):u<=f?n+=t(i.OVERLONG,n-1-s,e,r,u):r.push(u))}}else r.push(a)}return r}function l(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.current;t!=n.current&&(f.checkNormalize(),e=e.normalize(t));for(var r=[],i=0;i>6|192),r.push(63&a|128);else if(55296==(64512&a)){i++;var s=e.charCodeAt(i);if(i>=e.length||56320!=(64512&s))throw new Error("invalid utf-8 string");var u=65536+((1023&a)<<10)+(1023&s);r.push(u>>18|240),r.push(u>>12&63|128),r.push(u>>6&63|128),r.push(63&u|128)}else r.push(a>>12|224),r.push(a>>6&63|128),r.push(63&a|128)}return(0,o.arrayify)(r)}function h(e){var t="0000"+e.toString(16);return"\\u"+t.substring(t.length-4)}function p(e){return e.map((function(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10&1023),56320+(1023&e)))})).join("")}t.Utf8ErrorFuncs=c},function(e,t,r){"use strict";var n=r(1).Buffer,i=r(429),o=r(66),a=r(435);function s(e){t.decode(e)}t.names=a.names,t.codes=a.codes,t.defaultLengths=a.defaultLengths,t.toHexString=function(e){if(!n.isBuffer(e))throw new Error("must be passed a buffer");return e.toString("hex")},t.fromHexString=function(e){return n.from(e,"hex")},t.toB58String=function(e){if(!n.isBuffer(e))throw new Error("must be passed a buffer");return i.encode("base58btc",e).toString().slice(1)},t.fromB58String=function(e){var t=e;return n.isBuffer(e)&&(t=e.toString()),i.decode("z"+t)},t.decode=function(e){if(!n.isBuffer(e))throw new Error("multihash must be a Buffer");if(e.length<2)throw new Error("multihash too short. must be > 2 bytes.");var r=o.decode(e);if(!t.isValidCode(r))throw new Error("multihash unknown function code: 0x".concat(r.toString(16)));e=e.slice(o.decode.bytes);var i=o.decode(e);if(i<0)throw new Error("multihash invalid length: ".concat(i));if((e=e.slice(o.decode.bytes)).length!==i)throw new Error("multihash length inconsistent: 0x".concat(e.toString("hex")));return{code:r,name:a.codes[r],length:i,digest:e}},t.encode=function(e,r,i){if(!e||void 0===r)throw new Error("multihash encode requires at least two args: digest, code");var a=t.coerceCode(r);if(!n.isBuffer(e))throw new Error("digest should be a Buffer");if(null==i&&(i=e.length),i&&e.length!==i)throw new Error("digest length should be equal to specified length.");return n.concat([n.from(o.encode(a)),n.from(o.encode(i)),e])},t.coerceCode=function(e){var r=e;if("string"==typeof e){if(void 0===a.names[e])throw new Error("Unrecognized hash function named: ".concat(e));r=a.names[e]}if("number"!=typeof r)throw new Error("Hash function code should be a number. Got: ".concat(r));if(void 0===a.codes[r]&&!t.isAppCode(r))throw new Error("Unrecognized function code: ".concat(r));return r},t.isAppCode=function(e){return e>0&&e<16},t.isValidCode=function(e){return!!t.isAppCode(e)||!!a.codes[e]},t.validate=s,t.prefix=function(e){return s(e),e.slice(0,2)}},function(e,t,r){"use strict";var n=r(19);function i(e){this.options=e,this.type=this.options.type,this.blockSize=8,this._init(),this.buffer=new Array(this.blockSize),this.bufferOff=0}e.exports=i,i.prototype._init=function(){},i.prototype.update=function(e){return 0===e.length?[]:"decrypt"===this.type?this._updateDecrypt(e):this._updateEncrypt(e)},i.prototype._buffer=function(e,t){for(var r=Math.min(this.buffer.length-this.bufferOff,e.length-t),n=0;n0;n--)t+=this._buffer(e,t),r+=this._flushBuffer(i,r);return t+=this._buffer(e,t),i},i.prototype.final=function(e){var t,r;return e&&(t=this.update(e)),r="encrypt"===this.type?this._finalEncrypt():this._finalDecrypt(),t?t.concat(r):r},i.prototype._pad=function(e,t){if(0===t)return!1;for(;t=0||!t.umod(e.prime1)||!t.umod(e.prime2));return t}function a(e,r){var i=function(e){var t=o(e);return{blinder:t.toRed(n.mont(e.modulus)).redPow(new n(e.publicExponent)).fromRed(),unblinder:t.invm(e.modulus)}}(r),a=r.modulus.byteLength(),s=new n(e).mul(i.blinder).umod(r.modulus),f=s.toRed(n.mont(r.prime1)),u=s.toRed(n.mont(r.prime2)),c=r.coefficient,d=r.prime1,l=r.prime2,h=f.redPow(r.exponent1).fromRed(),p=u.redPow(r.exponent2).fromRed(),b=h.isub(p).imul(c).umod(d).imul(l);return p.iadd(b).imul(i.unblinder).umod(r.modulus).toArrayLike(t,"be",a)}a.getr=o,e.exports=a}).call(this,r(1).Buffer)},function(e,t,r){"use strict";(function(t){var n,i=r(0)(r(2)),o=r(1),a=o.Buffer,s={};for(n in o)o.hasOwnProperty(n)&&"SlowBuffer"!==n&&"Buffer"!==n&&(s[n]=o[n]);var f=s.Buffer={};for(n in a)a.hasOwnProperty(n)&&"allocUnsafe"!==n&&"allocUnsafeSlow"!==n&&(f[n]=a[n]);if(s.Buffer.prototype=a.prototype,f.from&&f.from!==Uint8Array.from||(f.from=function(e,t,r){if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type '+(0,i.default)(e));if(e&&void 0===e.length)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+(0,i.default)(e));return a(e,t,r)}),f.alloc||(f.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError('The "size" argument must be of type number. Received type '+(0,i.default)(e));if(e<0||e>=2*(1<<30))throw new RangeError('The value "'+e+'" is invalid for option "size"');var n=a(e);return t&&0!==t.length?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n}),!s.kStringMaxLength)try{s.kStringMaxLength=t.binding("buffer").kStringMaxLength}catch(e){}s.constants||(s.constants={MAX_LENGTH:s.kMaxLength},s.kStringMaxLength&&(s.constants.MAX_STRING_LENGTH=s.kStringMaxLength)),e.exports=s}).call(this,r(6))},function(e,t,r){"use strict";var n=r(0)(r(2)),i=r(117).Reporter,o=r(69).EncoderBuffer,a=r(69).DecoderBuffer,s=r(19),f=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],u=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(f);function c(e,t,r){var n={};this._baseState=n,n.name=r,n.enc=e,n.parent=t||null,n.children=null,n.tag=null,n.args=null,n.reverseArgs=null,n.choice=null,n.optional=!1,n.any=!1,n.obj=!1,n.use=null,n.useDecoder=null,n.key=null,n.default=null,n.explicit=null,n.implicit=null,n.contains=null,n.parent||(n.children=[],this._wrap())}e.exports=c;var d=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];c.prototype.clone=function(){var e=this._baseState,t={};d.forEach((function(r){t[r]=e[r]}));var r=new this.constructor(t.parent);return r._baseState=t,r},c.prototype._wrap=function(){var e=this._baseState;u.forEach((function(t){this[t]=function(){var r=new this.constructor(this);return e.children.push(r),r[t].apply(r,arguments)}}),this)},c.prototype._init=function(e){var t=this._baseState;s(null===t.parent),e.call(this),t.children=t.children.filter((function(e){return e._baseState.parent===this}),this),s.equal(t.children.length,1,"Root node can have only one child")},c.prototype._useArgs=function(e){var t=this._baseState,r=e.filter((function(e){return e instanceof this.constructor}),this);e=e.filter((function(e){return!(e instanceof this.constructor)}),this),0!==r.length&&(s(null===t.children),t.children=r,r.forEach((function(e){e._baseState.parent=this}),this)),0!==e.length&&(s(null===t.args),t.args=e,t.reverseArgs=e.map((function(e){if("object"!==(0,n.default)(e)||e.constructor!==Object)return e;var t={};return Object.keys(e).forEach((function(r){r==(0|r)&&(r|=0);var n=e[r];t[n]=r})),t})))},["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"].forEach((function(e){c.prototype[e]=function(){var t=this._baseState;throw new Error(e+" not implemented for encoding: "+t.enc)}})),f.forEach((function(e){c.prototype[e]=function(){var t=this._baseState,r=Array.prototype.slice.call(arguments);return s(null===t.tag),t.tag=e,this._useArgs(r),this}})),c.prototype.use=function(e){s(e);var t=this._baseState;return s(null===t.use),t.use=e,this},c.prototype.optional=function(){return this._baseState.optional=!0,this},c.prototype.def=function(e){var t=this._baseState;return s(null===t.default),t.default=e,t.optional=!0,this},c.prototype.explicit=function(e){var t=this._baseState;return s(null===t.explicit&&null===t.implicit),t.explicit=e,this},c.prototype.implicit=function(e){var t=this._baseState;return s(null===t.explicit&&null===t.implicit),t.implicit=e,this},c.prototype.obj=function(){var e=this._baseState,t=Array.prototype.slice.call(arguments);return e.obj=!0,0!==t.length&&this._useArgs(t),this},c.prototype.key=function(e){var t=this._baseState;return s(null===t.key),t.key=e,this},c.prototype.any=function(){return this._baseState.any=!0,this},c.prototype.choice=function(e){var t=this._baseState;return s(null===t.choice),t.choice=e,this._useArgs(Object.keys(e).map((function(t){return e[t]}))),this},c.prototype.contains=function(e){var t=this._baseState;return s(null===t.use),t.contains=e,this},c.prototype._decode=function(e,t){var r=this._baseState;if(null===r.parent)return e.wrapResult(r.children[0]._decode(e,t));var n,i=r.default,o=!0,s=null;if(null!==r.key&&(s=e.enterKey(r.key)),r.optional){var f=null;if(null!==r.explicit?f=r.explicit:null!==r.implicit?f=r.implicit:null!==r.tag&&(f=r.tag),null!==f||r.any){if(o=this._peekTag(e,f,r.any),e.isError(o))return o}else{var u=e.save();try{null===r.choice?this._decodeGeneric(r.tag,e,t):this._decodeChoice(e,t),o=!0}catch(e){o=!1}e.restore(u)}}if(r.obj&&o&&(n=e.enterObject()),o){if(null!==r.explicit){var c=this._decodeTag(e,r.explicit);if(e.isError(c))return c;e=c}var d=e.offset;if(null===r.use&&null===r.choice){var l;r.any&&(l=e.save());var h=this._decodeTag(e,null!==r.implicit?r.implicit:r.tag,r.any);if(e.isError(h))return h;r.any?i=e.raw(l):e=h}if(t&&t.track&&null!==r.tag&&t.track(e.path(),d,e.length,"tagged"),t&&t.track&&null!==r.tag&&t.track(e.path(),e.offset,e.length,"content"),r.any||(i=null===r.choice?this._decodeGeneric(r.tag,e,t):this._decodeChoice(e,t)),e.isError(i))return i;if(r.any||null!==r.choice||null===r.children||r.children.forEach((function(r){r._decode(e,t)})),r.contains&&("octstr"===r.tag||"bitstr"===r.tag)){var p=new a(i);i=this._getUse(r.contains,e._reporterState.obj)._decode(p,t)}}return r.obj&&o&&(i=e.leaveObject(n)),null===r.key||null===i&&!0!==o?null!==s&&e.exitKey(s):e.leaveKey(s,r.key,i),i},c.prototype._decodeGeneric=function(e,t,r){var n=this._baseState;return"seq"===e||"set"===e?null:"seqof"===e||"setof"===e?this._decodeList(t,e,n.args[0],r):/str$/.test(e)?this._decodeStr(t,e,r):"objid"===e&&n.args?this._decodeObjid(t,n.args[0],n.args[1],r):"objid"===e?this._decodeObjid(t,null,null,r):"gentime"===e||"utctime"===e?this._decodeTime(t,e,r):"null_"===e?this._decodeNull(t,r):"bool"===e?this._decodeBool(t,r):"objDesc"===e?this._decodeStr(t,e,r):"int"===e||"enum"===e?this._decodeInt(t,n.args&&n.args[0],r):null!==n.use?this._getUse(n.use,t._reporterState.obj)._decode(t,r):t.error("unknown tag: "+e)},c.prototype._getUse=function(e,t){var r=this._baseState;return r.useDecoder=this._use(e,t),s(null===r.useDecoder._baseState.parent),r.useDecoder=r.useDecoder._baseState.children[0],r.implicit!==r.useDecoder._baseState.implicit&&(r.useDecoder=r.useDecoder.clone(),r.useDecoder._baseState.implicit=r.implicit),r.useDecoder},c.prototype._decodeChoice=function(e,t){var r=this._baseState,n=null,i=!1;return Object.keys(r.choice).some((function(o){var a=e.save(),s=r.choice[o];try{var f=s._decode(e,t);if(e.isError(f))return!1;n={type:o,value:f},i=!0}catch(t){return e.restore(a),!1}return!0}),this),i?n:e.error("Choice not matched")},c.prototype._createEncoderBuffer=function(e){return new o(e,this.reporter)},c.prototype._encode=function(e,t,r){var n=this._baseState;if(null===n.default||n.default!==e){var i=this._encodeValue(e,t,r);if(void 0!==i&&!this._skipDefault(i,t,r))return i}},c.prototype._encodeValue=function(e,t,r){var o=this._baseState;if(null===o.parent)return o.children[0]._encode(e,t||new i);var a=null;if(this.reporter=t,o.optional&&void 0===e){if(null===o.default)return;e=o.default}var s=null,f=!1;if(o.any)a=this._createEncoderBuffer(e);else if(o.choice)a=this._encodeChoice(e,t);else if(o.contains)s=this._getUse(o.contains,r)._encode(e,t),f=!0;else if(o.children)s=o.children.map((function(r){if("null_"===r._baseState.tag)return r._encode(null,t,e);if(null===r._baseState.key)return t.error("Child should have a key");var i=t.enterKey(r._baseState.key);if("object"!==(0,n.default)(e))return t.error("Child expected, but input is not object");var o=r._encode(e[r._baseState.key],t,e);return t.leaveKey(i),o}),this).filter((function(e){return e})),s=this._createEncoderBuffer(s);else if("seqof"===o.tag||"setof"===o.tag){if(!o.args||1!==o.args.length)return t.error("Too many args for : "+o.tag);if(!Array.isArray(e))return t.error("seqof/setof, but data is not Array");var u=this.clone();u._baseState.implicit=null,s=this._createEncoderBuffer(e.map((function(r){var n=this._baseState;return this._getUse(n.args[0],e)._encode(r,t)}),u))}else null!==o.use?a=this._getUse(o.use,r)._encode(e,t):(s=this._encodePrimitive(o.tag,e),f=!0);if(!o.any&&null===o.choice){var c=null!==o.implicit?o.implicit:o.tag,d=null===o.implicit?"universal":"context";null===c?null===o.use&&t.error("Tag could be omitted only for .use()"):null===o.use&&(a=this._encodeComposite(c,f,d,s))}return null!==o.explicit&&(a=this._encodeComposite(o.explicit,!1,"context",a)),a},c.prototype._encodeChoice=function(e,t){var r=this._baseState,n=r.choice[e.type];return n||s(!1,e.type+" not found in "+JSON.stringify(Object.keys(r.choice))),n._encode(e.value,t)},c.prototype._encodePrimitive=function(e,t){var r=this._baseState;if(/str$/.test(e))return this._encodeStr(t,e);if("objid"===e&&r.args)return this._encodeObjid(t,r.reverseArgs[0],r.args[1]);if("objid"===e)return this._encodeObjid(t,null,null);if("gentime"===e||"utctime"===e)return this._encodeTime(t,e);if("null_"===e)return this._encodeNull();if("int"===e||"enum"===e)return this._encodeInt(t,r.args&&r.reverseArgs[0]);if("bool"===e)return this._encodeBool(t);if("objDesc"===e)return this._encodeStr(t,e);throw new Error("Unsupported tag: "+e)},c.prototype._isNumstr=function(e){return/^[0-9 ]*$/.test(e)},c.prototype._isPrintstr=function(e){return/^[A-Za-z0-9 '()+,-./:=?]*$/.test(e)}},function(e,t,r){"use strict";var n=r(4);function i(e){this._reporterState={obj:null,path:[],options:e||{},errors:[]}}function o(e,t){this.path=e,this.rethrow(t)}t.Reporter=i,i.prototype.isError=function(e){return e instanceof o},i.prototype.save=function(){var e=this._reporterState;return{obj:e.obj,pathLen:e.path.length}},i.prototype.restore=function(e){var t=this._reporterState;t.obj=e.obj,t.path=t.path.slice(0,e.pathLen)},i.prototype.enterKey=function(e){return this._reporterState.path.push(e)},i.prototype.exitKey=function(e){var t=this._reporterState;t.path=t.path.slice(0,e-1)},i.prototype.leaveKey=function(e,t,r){var n=this._reporterState;this.exitKey(e),null!==n.obj&&(n.obj[t]=r)},i.prototype.path=function(){return this._reporterState.path.join("/")},i.prototype.enterObject=function(){var e=this._reporterState,t=e.obj;return e.obj={},t},i.prototype.leaveObject=function(e){var t=this._reporterState,r=t.obj;return t.obj=e,r},i.prototype.error=function(e){var t,r=this._reporterState,n=e instanceof o;if(t=n?e:new o(r.path.map((function(e){return"["+JSON.stringify(e)+"]"})).join(""),e.message||e,e.stack),!r.options.partial)throw t;return n||r.errors.push(t),t},i.prototype.wrapResult=function(e){var t=this._reporterState;return t.options.partial?{result:this.isError(e)?null:e,errors:t.errors}:e},n(o,Error),o.prototype.rethrow=function(e){if(this.message=e+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,o),!this.stack)try{throw new Error(this.message)}catch(e){this.stack=e.stack}return this}},function(e,t,r){"use strict";function n(e){var t={};return Object.keys(e).forEach((function(r){(0|r)==r&&(r|=0);var n=e[r];t[n]=r})),t}t.tagClass={0:"universal",1:"application",2:"context",3:"private"},t.tagClassByName=n(t.tagClass),t.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"},t.tagByName=n(t.tag)},function(e,t,r){"use strict";var n=Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]},i=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t},a=function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},s=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a};Object.defineProperty(t,"__esModule",{value:!0}),t.BaseTransaction=void 0;var f=o(r(120)),u=r(28),c=r(53),d=function(){function e(e){this.cache={hash:void 0},this.activeCapabilities=[],this.DEFAULT_CHAIN=f.Chain.Mainnet,this.DEFAULT_HARDFORK=f.Hardfork.Istanbul;var t=e.nonce,r=e.gasLimit,n=e.to,i=e.value,o=e.data,a=e.v,s=e.r,c=e.s,d=e.type;this._type=new u.BN((0,u.toBuffer)(d)).toNumber();var l=(0,u.toBuffer)(""===n?"0x":n),h=(0,u.toBuffer)(""===a?"0x":a),p=(0,u.toBuffer)(""===s?"0x":s),b=(0,u.toBuffer)(""===c?"0x":c);this.nonce=new u.BN((0,u.toBuffer)(""===t?"0x":t)),this.gasLimit=new u.BN((0,u.toBuffer)(""===r?"0x":r)),this.to=l.length>0?new u.Address(l):void 0,this.value=new u.BN((0,u.toBuffer)(""===i?"0x":i)),this.data=(0,u.toBuffer)(""===o?"0x":o),this.v=h.length>0?new u.BN(h):void 0,this.r=p.length>0?new u.BN(p):void 0,this.s=b.length>0?new u.BN(b):void 0,this._validateCannotExceedMaxInteger({nonce:this.nonce,gasLimit:this.gasLimit,value:this.value,r:this.r,s:this.s})}return Object.defineProperty(e.prototype,"transactionType",{get:function(){return this.type},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"type",{get:function(){return this._type},enumerable:!1,configurable:!0}),e.prototype.supports=function(e){return this.activeCapabilities.includes(e)},e.prototype.validate=function(e){void 0===e&&(e=!1);var t=[];return this.getBaseFee().gt(this.gasLimit)&&t.push("gasLimit is too low. given "+this.gasLimit+", need at least "+this.getBaseFee()),this.isSigned()&&!this.verifySignature()&&t.push("Invalid Signature"),e?t:0===t.length},e.prototype.getBaseFee=function(){var e=this.getDataFee().addn(this.common.param("gasPrices","tx"));return this.common.gteHardfork("homestead")&&this.toCreationAddress()&&e.iaddn(this.common.param("gasPrices","txCreation")),e},e.prototype.getDataFee=function(){for(var e=this.common.param("gasPrices","txDataZero"),t=this.common.param("gasPrices","txDataNonZero"),r=0,n=0;n-1&&this.activeCapabilities.splice(f,1)}return s},e.prototype._getCommon=function(e,t){var r;if(t){var n=new u.BN((0,u.toBuffer)(t));if(e){if(!e.chainIdBN().eq(n))throw new Error("The chain ID does not match the chain ID of Common");return e.copy()}return f.default.isSupportedChainId(n)?new f.default({chain:n,hardfork:this.DEFAULT_HARDFORK}):f.default.forCustomChain(this.DEFAULT_CHAIN,{name:"custom-chain",networkId:n,chainId:n},this.DEFAULT_HARDFORK)}return null!==(r=null==e?void 0:e.copy())&&void 0!==r?r:new f.default({chain:this.DEFAULT_CHAIN,hardfork:this.DEFAULT_HARDFORK})},e.prototype._validateCannotExceedMaxInteger=function(e,t){var r,n;void 0===t&&(t=53);try{for(var i=a(Object.entries(e)),o=i.next();!o.done;o=i.next()){var f=s(o.value,2),c=f[0],d=f[1];if(53===t){if(null==d?void 0:d.gt(u.MAX_INTEGER))throw new Error(c+" cannot exceed MAX_INTEGER, given "+d)}else{if(256!==t)throw new Error("unimplemented bits value");if(null==d?void 0:d.gte(u.TWO_POW256))throw new Error(c+" must be less than 2^256, given "+d)}}}catch(e){r={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}},e}();t.BaseTransaction=d},function(e,t,r){"use strict";(function(e){var n,i=r(0)(r(2)),o=(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),a=function(){return(a=Object.assign||function(e){for(var t,r=1,n=arguments.length;r=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.ConsensusAlgorithm=t.ConsensusType=t.Hardfork=t.Chain=t.CustomChain=void 0;var f,u,c=r(20),d=r(513),l=r(28),h=r(514),p=r(520),b=r(535);!function(e){e.PolygonMainnet="polygon-mainnet",e.PolygonMumbai="polygon-mumbai",e.ArbitrumRinkebyTestnet="arbitrum-rinkeby-testnet",e.xDaiChain="x-dai-chain"}(f=t.CustomChain||(t.CustomChain={})),function(e){e[e.Mainnet=1]="Mainnet",e[e.Ropsten=3]="Ropsten",e[e.Rinkeby=4]="Rinkeby",e[e.Kovan=42]="Kovan",e[e.Goerli=5]="Goerli"}(t.Chain||(t.Chain={})),function(e){e.Chainstart="chainstart",e.Homestead="homestead",e.Dao="dao",e.TangerineWhistle="tangerineWhistle",e.SpuriousDragon="spuriousDragon",e.Byzantium="byzantium",e.Constantinople="constantinople",e.Petersburg="petersburg",e.Istanbul="istanbul",e.MuirGlacier="muirGlacier",e.Berlin="berlin",e.London="london",e.Shanghai="shanghai",e.Merge="merge"}(u=t.Hardfork||(t.Hardfork={})),function(e){e.ProofOfStake="pos",e.ProofOfWork="pow",e.ProofOfAuthority="poa"}(t.ConsensusType||(t.ConsensusType={})),function(e){e.Ethash="ethash",e.Clique="clique",e.Casper="casper"}(t.ConsensusAlgorithm||(t.ConsensusAlgorithm={}));var y=function(t){function n(e){var r,n,i,o,a=t.call(this)||this;a._supportedHardforks=[],a._eips=[],a._customChains=null!==(i=e.customChains)&&void 0!==i?i:[],a._chainParams=a.setChain(e.chain),a.DEFAULT_HARDFORK=null!==(o=a._chainParams.defaultHardfork)&&void 0!==o?o:u.Istanbul;try{for(var f=s(a._chainParams.hardforks),c=f.next();!c.done;c=f.next()){var d=c.value;d.forkHash||(d.forkHash=a._calcForkHash(d.name))}}catch(e){r={error:e}}finally{try{c&&!c.done&&(n=f.return)&&n.call(f)}finally{if(r)throw r.error}}return a._hardfork=a.DEFAULT_HARDFORK,e.supportedHardforks&&(a._supportedHardforks=e.supportedHardforks),e.hardfork&&a.setHardfork(e.hardfork),e.eips&&a.setEIPs(e.eips),a}return o(n,t),n.custom=function(e,t){var r;void 0===t&&(t={});var i=null!==(r=t.baseChain)&&void 0!==r?r:"mainnet",o=a({},n._getChainParams(i));if(o.name="custom-chain","string"!=typeof e)return new n(a({chain:a(a({},o),e)},t));if(e===f.PolygonMainnet)return n.custom({name:f.PolygonMainnet,chainId:137,networkId:137});if(e===f.PolygonMumbai)return n.custom({name:f.PolygonMumbai,chainId:80001,networkId:80001});if(e===f.ArbitrumRinkebyTestnet)return n.custom({name:f.ArbitrumRinkebyTestnet,chainId:421611,networkId:421611});if(e===f.xDaiChain)return n.custom({name:f.xDaiChain,chainId:100,networkId:100});throw new Error("Custom chain "+e+" not supported")},n.forCustomChain=function(e,t,r,i){var o=n._getChainParams(e);return new n({chain:a(a({},o),t),hardfork:r,supportedHardforks:i})},n.isSupportedChainId=function(e){var t=(0,h._getInitializedChains)();return Boolean(t.names[e.toString()])},n._getChainParams=function(e,t){var r=(0,h._getInitializedChains)(t);if("number"==typeof e||l.BN.isBN(e)){if(e=e.toString(),r.names[e])return r[r.names[e]];throw new Error("Chain with ID "+e+" not supported")}if(r[e])return r[e];throw new Error("Chain with name "+e+" not supported")},n.prototype.setChain=function(e){var t,r;if("number"==typeof e||"string"==typeof e||l.BN.isBN(e)){var o=void 0;o=this._customChains&&this._customChains.length>0&&Array.isArray(this._customChains[0])?this._customChains.map((function(e){return e[0]})):this._customChains,this._chainParams=n._getChainParams(e,o)}else{if("object"!==(0,i.default)(e))throw new Error("Wrong input format");if(this._customChains.length>0)throw new Error("Chain must be a string, number, or BN when initialized with customChains passed in");try{for(var a=s(["networkId","genesis","hardforks","bootstrapNodes"]),f=a.next();!f.done;f=a.next()){var u=f.value;if(void 0===e[u])throw new Error("Missing required chain parameter: "+u)}}catch(e){t={error:e}}finally{try{f&&!f.done&&(r=a.return)&&r.call(a)}finally{if(t)throw t.error}}this._chainParams=e}return this._chainParams},n.prototype.setHardfork=function(e){var t,r;if(!this._isSupportedHardfork(e))throw new Error("Hardfork "+e+" not set as supported in supportedHardforks");var n=!1;try{for(var i=s(p.hardforks),o=i.next();!o.done;o=i.next()){o.value[0]===e&&(this._hardfork!==e&&(this._hardfork=e,this.emit("hardforkChanged",e)),n=!0)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}if(!n)throw new Error("Hardfork with name "+e+" not supported")},n.prototype.getHardforkByBlockNumber=function(e,t){var r,n;e=(0,l.toType)(e,l.TypeOutput.BN),t=t?(0,l.toType)(t,l.TypeOutput.BN):void 0;var i,o,a,f=u.Chainstart;try{for(var c=s(this.hardforks()),d=c.next();!d.done;d=c.next()){var h=d.value;if(null!==h.block)e.gte(new l.BN(h.block))&&(f=h.name),t&&h.td&&(t.gten(h.td)?i=h.name:o=a),a=h.name;else if(t&&h.td&&t.gten(h.td))return h.name}}catch(e){r={error:e}}finally{try{d&&!d.done&&(n=c.return)&&n.call(c)}finally{if(r)throw r.error}}if(t){var p="block number: "+e+" (-> "+f+"), ";if(i&&!this.hardforkGteHardfork(f,i)){var b="HF determined by block number is lower than the minimum total difficulty HF";throw p+="total difficulty: "+t+" (-> "+i+")",new Error(b+": "+p)}if(o&&!this.hardforkGteHardfork(o,f)){b="Maximum HF determined by total difficulty is lower than the block number HF";throw p+="total difficulty: "+t+" (-> "+o+")",new Error(b+": "+p)}}return f},n.prototype.setHardforkByBlockNumber=function(e,t){var r=this.getHardforkByBlockNumber(e,t);return this.setHardfork(r),r},n.prototype._chooseHardfork=function(e,t){if(void 0===t&&(t=!0),e){if(t&&!this._isSupportedHardfork(e))throw new Error("Hardfork "+e+" not set as supported in supportedHardforks")}else e=this._hardfork;return e},n.prototype._getHardfork=function(e){var t,r,n=this.hardforks();try{for(var i=s(n),o=i.next();!o.done;o=i.next()){var a=o.value;if(a.name===e)return a}}catch(e){t={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}throw new Error("Hardfork "+e+" not defined for chain "+this.chainName())},n.prototype._isSupportedHardfork=function(e){var t,r;if(!(this._supportedHardforks.length>0))return!0;try{for(var n=s(this._supportedHardforks),i=n.next();!i.done;i=n.next()){if(e===i.value)return!0}}catch(e){t={error:e}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}return!1},n.prototype.setEIPs=function(e){var t,r,n=this;void 0===e&&(e=[]);var i=function(t){if(!(t in b.EIPs))throw new Error(t+" not supported");var r=o.gteHardfork(b.EIPs[t].minimumHardfork);if(!r)throw new Error(t+" cannot be activated on hardfork "+o.hardfork()+", minimumHardfork: "+r);b.EIPs[t].requiredEIPs&&b.EIPs[t].requiredEIPs.forEach((function(r){if(!e.includes(r)&&!n.isActivatedEIP(r))throw new Error(t+" requires EIP "+r+", but is not included in the EIP list")}))},o=this;try{for(var a=s(e),f=a.next();!f.done;f=a.next()){i(f.value)}}catch(e){t={error:e}}finally{try{f&&!f.done&&(r=a.return)&&r.call(a)}finally{if(t)throw t.error}}this._eips=e},n.prototype.param=function(e,t){var r,n,i=null;try{for(var o=s(this._eips),a=o.next();!a.done;a=o.next()){var f=a.value;if(null!==(i=this.paramByEIP(e,t,f)))return i}}catch(e){r={error:e}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return this.paramByHardfork(e,t,this._hardfork)},n.prototype.paramByHardfork=function(e,t,r){var n,i,o,a;r=this._chooseHardfork(r);var f=null;try{for(var u=s(p.hardforks),c=u.next();!c.done;c=u.next()){var d=c.value;if("eips"in d[1]){var l=d[1].eips;try{for(var h=(o=void 0,s(l)),b=h.next();!b.done;b=h.next()){var y=b.value,v=this.paramByEIP(e,t,y);f=null!==v?v:f}}catch(e){o={error:e}}finally{try{b&&!b.done&&(a=h.return)&&a.call(h)}finally{if(o)throw o.error}}}else{if(!d[1][e])throw new Error("Topic "+e+" not defined");void 0!==d[1][e][t]&&(f=d[1][e][t].v)}if(d[0]===r)break}}catch(e){n={error:e}}finally{try{c&&!c.done&&(i=u.return)&&i.call(u)}finally{if(n)throw n.error}}return f},n.prototype.paramByEIP=function(e,t,r){if(!(r in b.EIPs))throw new Error(r+" not supported");var n=b.EIPs[r];if(!(e in n))throw new Error("Topic "+e+" not defined");return void 0===n[e][t]?null:n[e][t].v},n.prototype.paramByBlock=function(e,t,r){var n=this.activeHardforks(r),i=n[n.length-1].name;return this.paramByHardfork(e,t,i)},n.prototype.isActivatedEIP=function(e){var t,r;if(this.eips().includes(e))return!0;try{for(var n=s(p.hardforks),i=n.next();!i.done;i=n.next()){var o=i.value[1];if(this.gteHardfork(o.name)&&"eips"in o&&o.eips.includes(e))return!0}}catch(e){t={error:e}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}return!1},n.prototype.hardforkIsActiveOnBlock=function(e,t,r){var n;void 0===r&&(r={}),t=(0,l.toType)(t,l.TypeOutput.BN);var i=null!==(n=r.onlySupported)&&void 0!==n&&n;e=this._chooseHardfork(e,i);var o=this.hardforkBlockBN(e);return!(!o||!t.gte(o))},n.prototype.activeOnBlock=function(e,t){return this.hardforkIsActiveOnBlock(null,e,t)},n.prototype.hardforkGteHardfork=function(e,t,r){var n,i;void 0===r&&(r={});var o,a=void 0!==r.onlyActive&&r.onlyActive;e=this._chooseHardfork(e,r.onlySupported),o=a?this.activeHardforks(null,r):this.hardforks();var f=-1,u=-1,c=0;try{for(var d=s(o),l=d.next();!l.done;l=d.next()){var h=l.value;h.name===e&&(f=c),h.name===t&&(u=c),c+=1}}catch(e){n={error:e}}finally{try{l&&!l.done&&(i=d.return)&&i.call(d)}finally{if(n)throw n.error}}return f>=u&&-1!==u},n.prototype.gteHardfork=function(e,t){return this.hardforkGteHardfork(null,e,t)},n.prototype.hardforkIsActiveOnChain=function(e,t){var r,n,i;void 0===t&&(t={});var o=null!==(i=t.onlySupported)&&void 0!==i&&i;e=this._chooseHardfork(e,o);try{for(var a=s(this.hardforks()),f=a.next();!f.done;f=a.next()){var u=f.value;if(u.name===e&&null!==u.block)return!0}}catch(e){r={error:e}}finally{try{f&&!f.done&&(n=a.return)&&n.call(a)}finally{if(r)throw r.error}}return!1},n.prototype.activeHardforks=function(e,t){var r,n;void 0===t&&(t={});var i=[],o=this.hardforks();try{for(var a=s(o),f=a.next();!f.done;f=a.next()){var u=f.value;if(null!==u.block){if(null!=e&&e0)return r[r.length-1].name;throw new Error("No (supported) active hardfork found")},n.prototype.hardforkBlock=function(e){var t=this.hardforkBlockBN(e);return t?(0,l.toType)(t,l.TypeOutput.Number):null},n.prototype.hardforkBlockBN=function(e){e=this._chooseHardfork(e,!1);var t=this._getHardfork(e).block;return null==t?null:new l.BN(t)},n.prototype.hardforkTD=function(e){e=this._chooseHardfork(e,!1);var t=this._getHardfork(e).td;return null==t?null:new l.BN(t)},n.prototype.isHardforkBlock=function(e,t){e=(0,l.toType)(e,l.TypeOutput.BN),t=this._chooseHardfork(t,!1);var r=this.hardforkBlockBN(t);return!!r&&r.eq(e)},n.prototype.nextHardforkBlock=function(e){var t=this.nextHardforkBlockBN(e);return null===t?null:(0,l.toType)(t,l.TypeOutput.Number)},n.prototype.nextHardforkBlockBN=function(e){e=this._chooseHardfork(e,!1);var t=this.hardforkBlockBN(e);return null===t?null:this.hardforks().reduce((function(e,r){var n=new l.BN(r.block);return n.gt(t)&&null===e?n:e}),null)},n.prototype.isNextHardforkBlock=function(e,t){e=(0,l.toType)(e,l.TypeOutput.BN),t=this._chooseHardfork(t,!1);var r=this.nextHardforkBlockBN(t);return null!==r&&r.eq(e)},n.prototype._calcForkHash=function(t){var r,n,i=e.from(this.genesis().hash.substr(2),"hex"),o=e.alloc(0),a=0;try{for(var f=s(this.hardforks()),u=f.next();!u.done;u=f.next()){var c=u.value,h=c.block;if(0!==h&&null!==h&&h!==a){var p=e.from(h.toString(16).padStart(16,"0"),"hex");o=e.concat([o,p])}if(c.name===t)break;null!==h&&(a=h)}}catch(e){r={error:e}}finally{try{u&&!u.done&&(n=f.return)&&n.call(f)}finally{if(r)throw r.error}}var b=e.concat([i,o]);return"0x"+(0,l.intToBuffer)((0,d.buf)(b)>>>0).toString("hex")},n.prototype.forkHash=function(e){e=this._chooseHardfork(e,!1);var t=this._getHardfork(e);if(null===t.block){throw new Error("No fork hash calculation possible for non-applied or future hardfork")}return void 0!==t.forkHash?t.forkHash:this._calcForkHash(e)},n.prototype.hardforkForForkHash=function(e){var t=this.hardforks().filter((function(t){return t.forkHash===e}));return t.length>=1?t[t.length-1]:null},n.prototype.genesis=function(){return this._chainParams.genesis},n.prototype.genesisState=function(){var e,t;switch(this.chainName()){case"mainnet":return r(!function(){var e=new Error("Cannot find module './genesisStates/mainnet.json'");throw e.code="MODULE_NOT_FOUND",e}());case"ropsten":return r(!function(){var e=new Error("Cannot find module './genesisStates/ropsten.json'");throw e.code="MODULE_NOT_FOUND",e}());case"rinkeby":return r(!function(){var e=new Error("Cannot find module './genesisStates/rinkeby.json'");throw e.code="MODULE_NOT_FOUND",e}());case"kovan":return r(!function(){var e=new Error("Cannot find module './genesisStates/kovan.json'");throw e.code="MODULE_NOT_FOUND",e}());case"goerli":return r(!function(){var e=new Error("Cannot find module './genesisStates/goerli.json'");throw e.code="MODULE_NOT_FOUND",e}())}if(this._customChains&&this._customChains.length>0&&Array.isArray(this._customChains[0]))try{for(var n=s(this._customChains),i=n.next();!i.done;i=n.next()){var o=i.value;if(o[0].name===this.chainName())return o[1]}}catch(t){e={error:t}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}return{}},n.prototype.hardforks=function(){return this._chainParams.hardforks},n.prototype.bootstrapNodes=function(){return this._chainParams.bootstrapNodes},n.prototype.dnsNetworks=function(){return this._chainParams.dnsNetworks},n.prototype.hardfork=function(){return this._hardfork},n.prototype.chainId=function(){return(0,l.toType)(this.chainIdBN(),l.TypeOutput.Number)},n.prototype.chainIdBN=function(){return new l.BN(this._chainParams.chainId)},n.prototype.chainName=function(){return this._chainParams.name},n.prototype.networkId=function(){return(0,l.toType)(this.networkIdBN(),l.TypeOutput.Number)},n.prototype.networkIdBN=function(){return new l.BN(this._chainParams.networkId)},n.prototype.eips=function(){return this._eips},n.prototype.consensusType=function(){var e,t,r,n=this.hardfork();try{for(var i=s(p.hardforks),o=i.next();!o.done;o=i.next()){var a=o.value;if("consensus"in a[1]&&(r=a[1].consensus.type),a[0]===n)break}}catch(t){e={error:t}}finally{try{o&&!o.done&&(t=i.return)&&t.call(i)}finally{if(e)throw e.error}}return r||this._chainParams.consensus.type},n.prototype.consensusAlgorithm=function(){var e,t,r,n=this.hardfork();try{for(var i=s(p.hardforks),o=i.next();!o.done;o=i.next()){var a=o.value;if("consensus"in a[1]&&(r=a[1].consensus.algorithm),a[0]===n)break}}catch(t){e={error:t}}finally{try{o&&!o.done&&(t=i.return)&&t.call(i)}finally{if(e)throw e.error}}return r||this._chainParams.consensus.algorithm},n.prototype.consensusConfig=function(){var e,t,r,n=this.hardfork();try{for(var i=s(p.hardforks),o=i.next();!o.done;o=i.next()){var a=o.value;if("consensus"in a[1]&&(r=a[1].consensus[a[1].consensus.algorithm]),a[0]===n)break}}catch(t){e={error:t}}finally{try{o&&!o.done&&(t=i.return)&&t.call(i)}finally{if(e)throw e.error}}if(r)return r;var f=this.consensusAlgorithm();return this._chainParams.consensus[f]},n.prototype.copy=function(){return Object.assign(Object.create(Object.getPrototypeOf(this)),this)},n}(c.EventEmitter);t.default=y}).call(this,r(1).Buffer)},function(e,t,r){"use strict";var n,i=t,o=r(122),a=r(240),s=r(22).assert;function f(e){"short"===e.type?this.curve=new a.short(e):"edwards"===e.type?this.curve=new a.edwards(e):this.curve=new a.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,s(this.g.validate(),"Invalid curve"),s(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function u(e,t){Object.defineProperty(i,e,{configurable:!0,enumerable:!0,get:function(){var r=new f(t);return Object.defineProperty(i,e,{configurable:!0,enumerable:!0,value:r}),r}})}i.PresetCurve=f,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:o.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:o.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:o.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:o.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:o.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:o.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:o.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{n=r(566)}catch(e){n=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:o.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",n]})},function(e,t,r){"use strict";var n=t;n.utils=r(26),n.common=r(70),n.sha=r(560),n.ripemd=r(564),n.hmac=r(565),n.sha1=n.sha.sha1,n.sha256=n.sha.sha256,n.sha224=n.sha.sha224,n.sha384=n.sha.sha384,n.sha512=n.sha.sha512,n.ripemd160=n.ripemd.ripemd160},function(e,t,r){"use strict";(function(e){var n=Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]},i=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.rlphash=t.ripemd160FromArray=t.ripemd160FromString=t.ripemd160=t.sha256FromArray=t.sha256FromString=t.sha256=t.keccakFromArray=t.keccakFromHexString=t.keccakFromString=t.keccak256=t.keccak=void 0;var a=r(576),s=r(592),f=o(r(87)),u=r(40),c=r(89);t.keccak=function(e,t){switch(void 0===t&&(t=256),(0,c.assertIsBuffer)(e),t){case 224:return(0,a.keccak224)(e);case 256:return(0,a.keccak256)(e);case 384:return(0,a.keccak384)(e);case 512:return(0,a.keccak512)(e);default:throw new Error("Invald algorithm: keccak"+t)}};t.keccak256=function(e){return(0,t.keccak)(e)};t.keccakFromString=function(r,n){void 0===n&&(n=256),(0,c.assertIsString)(r);var i=e.from(r,"utf8");return(0,t.keccak)(i,n)};t.keccakFromHexString=function(e,r){return void 0===r&&(r=256),(0,c.assertIsHexString)(e),(0,t.keccak)((0,u.toBuffer)(e),r)};t.keccakFromArray=function(e,r){return void 0===r&&(r=256),(0,c.assertIsArray)(e),(0,t.keccak)((0,u.toBuffer)(e),r)};var d=function(e){return e=(0,u.toBuffer)(e),s("sha256").update(e).digest()};t.sha256=function(e){return(0,c.assertIsBuffer)(e),d(e)};t.sha256FromString=function(e){return(0,c.assertIsString)(e),d(e)};t.sha256FromArray=function(e){return(0,c.assertIsArray)(e),d(e)};var l=function(e,t){e=(0,u.toBuffer)(e);var r=s("rmd160").update(e).digest();return!0===t?(0,u.setLengthLeft)(r,32):r};t.ripemd160=function(e,t){return(0,c.assertIsBuffer)(e),l(e,t)};t.ripemd160FromString=function(e,t){return(0,c.assertIsString)(e),l(e,t)};t.ripemd160FromArray=function(e,t){return(0,c.assertIsArray)(e),l(e,t)};t.rlphash=function(e){return(0,t.keccak)(f.encode(e))}}).call(this,r(1).Buffer)},function(e,t,r){"use strict";(t=e.exports=r(244)).Stream=t,t.Readable=t,t.Writable=r(248),t.Duplex=r(56),t.Transform=r(249),t.PassThrough=r(587),t.finished=r(125),t.pipeline=r(588)},function(e,t,r){"use strict";var n=r(55).codes.ERR_STREAM_PREMATURE_CLOSE;function i(){}e.exports=function e(t,r,o){if("function"==typeof r)return e(t,null,r);r||(r={}),o=function(e){var t=!1;return function(){if(!t){t=!0;for(var r=arguments.length,n=new Array(r),i=0;i=i)return e;switch(e){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(e){return"[Circular]"}default:return e}})),s=n[r];r=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),b(r)?n.showHidden=r:r&&t._extend(n,r),g(n.showHidden)&&(n.showHidden=!1),g(n.depth)&&(n.depth=2),g(n.colors)&&(n.colors=!1),g(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=u),d(n,e,n.depth)}function u(e,t){var r=f.styles[t];return r?"["+f.colors[r][0]+"m"+e+"["+f.colors[r][1]+"m":e}function c(e,t){return e}function d(e,r,n){if(e.customInspect&&r&&A(r.inspect)&&r.inspect!==t.inspect&&(!r.constructor||r.constructor.prototype!==r)){var i=r.inspect(n,e);return m(i)||(i=d(e,i,n)),i}var o=function(e,t){if(g(t))return e.stylize("undefined","undefined");if(m(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}if(v(t))return e.stylize(""+t,"number");if(b(t))return e.stylize(""+t,"boolean");if(y(t))return e.stylize("null","null")}(e,r);if(o)return o;var a=Object.keys(r),s=function(e){var t={};return e.forEach((function(e,r){t[e]=!0})),t}(a);if(e.showHidden&&(a=Object.getOwnPropertyNames(r)),S(r)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return l(r);if(0===a.length){if(A(r)){var f=r.name?": "+r.name:"";return e.stylize("[Function"+f+"]","special")}if(w(r))return e.stylize(RegExp.prototype.toString.call(r),"regexp");if(k(r))return e.stylize(Date.prototype.toString.call(r),"date");if(S(r))return l(r)}var u,c="",_=!1,E=["{","}"];(p(r)&&(_=!0,E=["[","]"]),A(r))&&(c=" [Function"+(r.name?": "+r.name:"")+"]");return w(r)&&(c=" "+RegExp.prototype.toString.call(r)),k(r)&&(c=" "+Date.prototype.toUTCString.call(r)),S(r)&&(c=" "+l(r)),0!==a.length||_&&0!=r.length?n<0?w(r)?e.stylize(RegExp.prototype.toString.call(r),"regexp"):e.stylize("[Object]","special"):(e.seen.push(r),u=_?function(e,t,r,n,i){for(var o=[],a=0,s=t.length;a=0&&0,e+t.replace(/\u001b\[\d\d?m/g,"").length+1}),0)>60)return r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+r[1];return r[0]+t+" "+e.join(", ")+" "+r[1]}(u,c,E)):E[0]+c+E[1]}function l(e){return"["+Error.prototype.toString.call(e)+"]"}function h(e,t,r,n,i,o){var a,s,f;if((f=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]}).get?s=f.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):f.set&&(s=e.stylize("[Setter]","special")),R(n,i)||(a="["+i+"]"),s||(e.seen.indexOf(f.value)<0?(s=y(r)?d(e,f.value,null):d(e,f.value,r-1)).indexOf("\n")>-1&&(s=o?s.split("\n").map((function(e){return" "+e})).join("\n").substr(2):"\n"+s.split("\n").map((function(e){return" "+e})).join("\n")):s=e.stylize("[Circular]","special")),g(a)){if(o&&i.match(/^\d+$/))return s;(a=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=e.stylize(a,"string"))}return a+": "+s}function p(e){return Array.isArray(e)}function b(e){return"boolean"==typeof e}function y(e){return null===e}function v(e){return"number"==typeof e}function m(e){return"string"==typeof e}function g(e){return void 0===e}function w(e){return _(e)&&"[object RegExp]"===E(e)}function _(e){return"object"===(0,n.default)(e)&&null!==e}function k(e){return _(e)&&"[object Date]"===E(e)}function S(e){return _(e)&&("[object Error]"===E(e)||e instanceof Error)}function A(e){return"function"==typeof e}function E(e){return Object.prototype.toString.call(e)}function x(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(r){if(g(a)&&(a=e.env.NODE_DEBUG||""),r=r.toUpperCase(),!s[r])if(new RegExp("\\b"+r+"\\b","i").test(a)){var n=e.pid;s[r]=function(){var e=t.format.apply(t,arguments);console.error("%s %d: %s",r,n,e)}}else s[r]=function(){};return s[r]},t.inspect=f,f.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]},f.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.isArray=p,t.isBoolean=b,t.isNull=y,t.isNullOrUndefined=function(e){return null==e},t.isNumber=v,t.isString=m,t.isSymbol=function(e){return"symbol"===(0,n.default)(e)},t.isUndefined=g,t.isRegExp=w,t.isObject=_,t.isDate=k,t.isError=S,t.isFunction=A,t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"===(0,n.default)(e)||void 0===e},t.isBuffer=r(257);var P=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function O(){var e=new Date,t=[x(e.getHours()),x(e.getMinutes()),x(e.getSeconds())].join(":");return[e.getDate(),P[e.getMonth()],t].join(" ")}function R(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){console.log("%s - %s",O(),t.format.apply(t,arguments))},t.inherits=r(90),t._extend=function(e,t){if(!t||!_(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e};var T="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function M(e,t){if(!e){var r=new Error("Promise was rejected with a falsy value");r.reason=e,e=r}return t(e)}t.promisify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');if(T&&e[T]){var t;if("function"!=typeof(t=e[T]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(t,T,{value:t,enumerable:!1,writable:!1,configurable:!0}),t}function t(){for(var t,r,n=new Promise((function(e,n){t=e,r=n})),i=[],o=0;o7&&e[r].toUpperCase()!==e[r]||parseInt(t[r],16)<=7&&e[r].toLowerCase()!==e[r])return!1;return!0},y=function(e){var t="";e=(e=(e=(e=(e=f.encode(e)).replace(/^(?:\u0000)*/,"")).split("").reverse().join("")).replace(/^(?:\u0000)*/,"")).split("").reverse().join("");for(var r=0;r>>4).toString(16)),t.push((15&e[r]).toString(16));return"0x"+t.join("")},isHex:_,isHexStrict:w,stripHexPrefix:function(e){return 0!==e&&_(e)?e.replace(/^(-)?0x/i,"$1"):e},leftPad:function(e,t,r){var n=/^0x/i.test(e)||"number"==typeof e,i=t-(e=e.toString(16).replace(/^0x/i,"")).length+1>=0?t-e.length+1:0;return(n?"0x":"")+new Array(i).join(r||"0")+e},rightPad:function(e,t,r){var n=/^0x/i.test(e)||"number"==typeof e,i=t-(e=e.toString(16).replace(/^0x/i,"")).length+1>=0?t-e.length+1:0;return(n?"0x":"")+e+new Array(i).join(r||"0")},toTwosComplement:function(e){return"0x"+h(e).toTwos(256).toString(16,64)},sha3:S,sha3Raw:function(e){return null===(e=S(e))?k:e},toNumber:function(e){return"number"==typeof e?e:v(g(e))}}}).call(this,r(1).Buffer)},function(e,t,r){"use strict";var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t,r){"use strict";var n=r(132);e.exports=function(e,t){if(e){if("string"==typeof e)return n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,r){"use strict";e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a},s=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.isZeroAddress=t.zeroAddress=t.importPublic=t.privateToAddress=t.privateToPublic=t.publicToAddress=t.pubToAddress=t.isValidPublic=t.isValidPrivate=t.generateAddress2=t.generateAddress=t.isValidChecksumAddress=t.toChecksumAddress=t.isValidAddress=t.Account=void 0;var f=s(r(41)),u=s(r(3)),c=o(r(71)),d=r(135),l=r(42),h=r(133),p=r(34),b=r(94),y=r(74),v=r(102),m=function(){function e(e,t,r,n){void 0===e&&(e=new u.default(0)),void 0===t&&(t=new u.default(0)),void 0===r&&(r=h.KECCAK256_RLP),void 0===n&&(n=h.KECCAK256_NULL),this.nonce=e,this.balance=t,this.stateRoot=r,this.codeHash=n,this._validate()}return e.fromAccountData=function(t){var r=t.nonce,n=t.balance,i=t.stateRoot,o=t.codeHash;return new e(r?new u.default((0,p.toBuffer)(r)):void 0,n?new u.default((0,p.toBuffer)(n)):void 0,i?(0,p.toBuffer)(i):void 0,o?(0,p.toBuffer)(o):void 0)},e.fromRlpSerializedAccount=function(e){var t=c.decode(e);if(!Array.isArray(t))throw new Error("Invalid serialized account input. Must be array");return this.fromValuesArray(t)},e.fromValuesArray=function(t){var r=a(t,4),n=r[0],i=r[1],o=r[2],s=r[3];return new e(new u.default(n),new u.default(i),o,s)},e.prototype._validate=function(){if(this.nonce.lt(new u.default(0)))throw new Error("nonce must be greater than zero");if(this.balance.lt(new u.default(0)))throw new Error("balance must be greater than zero");if(32!==this.stateRoot.length)throw new Error("stateRoot must have a length of 32");if(32!==this.codeHash.length)throw new Error("codeHash must have a length of 32")},e.prototype.raw=function(){return[(0,v.bnToUnpaddedBuffer)(this.nonce),(0,v.bnToUnpaddedBuffer)(this.balance),this.stateRoot,this.codeHash]},e.prototype.serialize=function(){return c.encode(this.raw())},e.prototype.isContract=function(){return!this.codeHash.equals(h.KECCAK256_NULL)},e.prototype.isEmpty=function(){return this.balance.isZero()&&this.nonce.isZero()&&this.codeHash.equals(h.KECCAK256_NULL)},e}();t.Account=m;t.isValidAddress=function(e){try{(0,y.assertIsString)(e)}catch(e){return!1}return/^0x[0-9a-fA-F]{40}$/.test(e)};t.toChecksumAddress=function(e,t){(0,y.assertIsHexString)(e);var r=(0,l.stripHexPrefix)(e).toLowerCase(),n="";t&&(n=(0,v.toType)(t,v.TypeOutput.BN).toString()+"0x");for(var i=(0,b.keccakFromString)(n+r).toString("hex"),o="0x",a=0;a=8?o+=r[a].toUpperCase():o+=r[a];return o};t.isValidChecksumAddress=function(e,r){return(0,t.isValidAddress)(e)&&(0,t.toChecksumAddress)(e,r)===e};t.generateAddress=function(t,r){(0,y.assertIsBuffer)(t),(0,y.assertIsBuffer)(r);var n=new u.default(r);return n.isZero()?(0,b.rlphash)([t,null]).slice(-20):(0,b.rlphash)([t,e.from(n.toArray())]).slice(-20)};t.generateAddress2=function(t,r,n){return(0,y.assertIsBuffer)(t),(0,y.assertIsBuffer)(r),(0,y.assertIsBuffer)(n),(0,f.default)(20===t.length),(0,f.default)(32===r.length),(0,b.keccak256)(e.concat([e.from("ff","hex"),t,r,(0,b.keccak256)(n)])).slice(-20)};t.isValidPrivate=function(e){return(0,d.privateKeyVerify)(e)};t.isValidPublic=function(t,r){return void 0===r&&(r=!1),(0,y.assertIsBuffer)(t),64===t.length?(0,d.publicKeyVerify)(e.concat([e.from([4]),t])):!!r&&(0,d.publicKeyVerify)(t)};t.pubToAddress=function(t,r){return void 0===r&&(r=!1),(0,y.assertIsBuffer)(t),r&&64!==t.length&&(t=e.from((0,d.publicKeyConvert)(t,!1).slice(1))),(0,f.default)(64===t.length),(0,b.keccak)(t).slice(-20)},t.publicToAddress=t.pubToAddress;t.privateToPublic=function(t){return(0,y.assertIsBuffer)(t),e.from((0,d.publicKeyCreate)(t,!1)).slice(1)};t.privateToAddress=function(e){return(0,t.publicToAddress)((0,t.privateToPublic)(e))};t.importPublic=function(t){return(0,y.assertIsBuffer)(t),64!==t.length&&(t=e.from((0,d.publicKeyConvert)(t,!1).slice(1))),t};t.zeroAddress=function(){var e=(0,p.zeros)(20);return(0,p.bufferToHex)(e)};t.isZeroAddress=function(e){try{(0,y.assertIsString)(e)}catch(e){return!1}return(0,t.zeroAddress)()===e}}).call(this,r(1).Buffer)},function(e,t,r){"use strict";var n=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{f(n.next(e))}catch(e){o(e)}}function s(e){try{f(n.throw(e))}catch(e){o(e)}}function f(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}f((n=n.apply(e,t||[])).next())}))},i=function(e,t){var r,n,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,n=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]>8,a=255&i;o?r.push(o,a):r.push(a)}return r},n.zero2=i,n.toHex=o,n.encode=function(e,t){return"hex"===t?o(e):e}},function(e,t,r){"use strict";var n=t;n.base=r(72),n.short=r(274),n.mont=r(275),n.edwards=r(276)},function(e,t,r){"use strict";var n=r(25).rotr32;function i(e,t,r){return e&t^~e&r}function o(e,t,r){return e&t^e&r^t&r}function a(e,t,r){return e^t^r}t.ft_1=function(e,t,r,n){return 0===e?i(t,r,n):1===e||3===e?a(t,r,n):2===e?o(t,r,n):void 0},t.ch32=i,t.maj32=o,t.p32=a,t.s0_256=function(e){return n(e,2)^n(e,13)^n(e,22)},t.s1_256=function(e){return n(e,6)^n(e,11)^n(e,25)},t.g0_256=function(e){return n(e,7)^n(e,18)^e>>>3},t.g1_256=function(e){return n(e,17)^n(e,19)^e>>>10}},function(e,t,r){"use strict";var n=r(25),i=r(60),o=r(139),a=r(19),s=n.sum32,f=n.sum32_4,u=n.sum32_5,c=o.ch32,d=o.maj32,l=o.s0_256,h=o.s1_256,p=o.g0_256,b=o.g1_256,y=i.BlockHash,v=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function m(){if(!(this instanceof m))return new m;y.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=v,this.W=new Array(64)}n.inherits(m,y),e.exports=m,m.blockSize=512,m.outSize=256,m.hmacStrength=192,m.padLength=64,m.prototype._update=function(e,t){for(var r=this.W,n=0;n<16;n++)r[n]=e[t+n];for(;n0)if("string"==typeof t||a.objectMode||Object.getPrototypeOf(t)===s.prototype||(t=function(e){return s.from(e)}(t)),n)a.endEmitted?k(e,new _):P(e,a,t,!0);else if(a.ended)k(e,new g);else{if(a.destroyed)return!1;a.reading=!1,a.decoder&&!r?(t=a.decoder.write(t),a.objectMode||0!==t.length?P(e,a,t,!1):M(e,a)):P(e,a,t,!1)}else n||(a.reading=!1,M(e,a));return!a.ended&&(a.lengtht.highWaterMark&&(t.highWaterMark=function(e){return e>=1073741824?e=1073741824:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function R(e){var t=e._readableState;u("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(u("emitReadable",t.flowing),t.emittedReadable=!0,n.nextTick(T,e))}function T(e){var t=e._readableState;u("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,U(e)}function M(e,t){t.readingMore||(t.readingMore=!0,n.nextTick(I,e,t))}function I(e,t){for(;!t.reading&&!t.ended&&(t.length0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function C(e){u("readable nexttick read 0"),e.read(0)}function j(e,t){u("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),U(e),t.flowing&&!t.reading&&e.read(0)}function U(e){var t=e._readableState;for(u("flow",t.flowing);t.flowing&&null!==e.read(););}function N(e,t){return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r);var r}function L(e){var t=e._readableState;u("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,n.nextTick(F,t,e))}function F(e,t){if(u("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}function D(e,t){for(var r=0,n=e.length;r=t.highWaterMark:t.length>0)||t.ended))return u("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?L(this):R(this),null;if(0===(e=O(e,t))&&t.ended)return 0===t.length&&L(this),null;var n,i=t.needReadable;return u("need readable",i),(0===t.length||t.length-e0?N(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&L(this)),null!==n&&this.emit("data",n),n},E.prototype._read=function(e){k(this,new w("_read()"))},E.prototype.pipe=function(e,t){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=e;break;case 1:i.pipes=[i.pipes,e];break;default:i.pipes.push(e)}i.pipesCount+=1,u("pipe count=%d opts=%j",i.pipesCount,t);var a=(!t||!1!==t.end)&&e!==n.stdout&&e!==n.stderr?f:y;function s(t,n){u("onunpipe"),t===r&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,u("cleanup"),e.removeListener("close",p),e.removeListener("finish",b),e.removeListener("drain",c),e.removeListener("error",h),e.removeListener("unpipe",s),r.removeListener("end",f),r.removeListener("end",y),r.removeListener("data",l),d=!0,!i.awaitDrain||e._writableState&&!e._writableState.needDrain||c())}function f(){u("onend"),e.end()}i.endEmitted?n.nextTick(a):r.once("end",a),e.on("unpipe",s);var c=function(e){return function(){var t=e._readableState;u("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&o(e,"data")&&(t.flowing=!0,U(e))}}(r);e.on("drain",c);var d=!1;function l(t){u("ondata");var n=e.write(t);u("dest.write",n),!1===n&&((1===i.pipesCount&&i.pipes===e||i.pipesCount>1&&-1!==D(i.pipes,e))&&!d&&(u("false write response, pause",i.awaitDrain),i.awaitDrain++),r.pause())}function h(t){u("onerror",t),y(),e.removeListener("error",h),0===o(e,"error")&&k(e,t)}function p(){e.removeListener("finish",b),y()}function b(){u("onfinish"),e.removeListener("close",p),y()}function y(){u("unpipe"),r.unpipe(e)}return r.on("data",l),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",h),e.once("close",p),e.once("finish",b),e.emit("pipe",r),i.flowing||(u("pipe resume"),r.resume()),e},E.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o0,!1!==i.flowing&&this.resume()):"readable"===e&&(i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,u("on readable",i.length,i.reading),i.length?R(this):i.reading||n.nextTick(C,this))),r},E.prototype.addListener=E.prototype.on,E.prototype.removeListener=function(e,t){var r=a.prototype.removeListener.call(this,e,t);return"readable"===e&&n.nextTick(B,this),r},E.prototype.removeAllListeners=function(e){var t=a.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||n.nextTick(B,this),t},E.prototype.resume=function(){var e=this._readableState;return e.flowing||(u("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,n.nextTick(j,e,t))}(this,e)),e.paused=!1,this},E.prototype.pause=function(){return u("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(u("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},E.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;for(var i in e.on("end",(function(){if(u("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(i){(u("wrapped data"),r.decoder&&(i=r.decoder.write(i)),r.objectMode&&null==i)||(r.objectMode||i&&i.length)&&(t.push(i)||(n=!0,e.pause()))})),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var o=0;o-1))throw new _(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(E.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(E.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),E.prototype._write=function(e,t,r){r(new b("_write()"))},E.prototype._writev=null,E.prototype.end=function(e,t,r){var i=this._writableState;return"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),i.corked&&(i.corked=1,this.uncork()),i.ending||function(e,t,r){t.ending=!0,M(e,t),r&&(t.finished?n.nextTick(r):e.once("finish",r));t.ended=!0,e.writable=!1}(this,i,r),this},Object.defineProperty(E.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(E.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),E.prototype.destroy=d.destroy,E.prototype._undestroy=d.undestroy,E.prototype._destroy=function(e,t){t(e)}}).call(this,r(7),r(6))},function(e,t,r){"use strict";e.exports=c;var n=r(43).codes,i=n.ERR_METHOD_NOT_IMPLEMENTED,o=n.ERR_MULTIPLE_CALLBACK,a=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,s=n.ERR_TRANSFORM_WITH_LENGTH_0,f=r(44);function u(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(null===n)return this.emit("error",new o);r.writechunk=null,r.writecb=null,null!=t&&this.push(t),n(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length=this._blockSize;){for(var o=this._blockOffset;o0;++a)this._length[a]+=s,(s=this._length[a]/4294967296|0)>0&&(this._length[a]-=4294967296*s);return this},o.prototype._update=function(){throw new Error("_update is not implemented")},o.prototype.digest=function(e){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var t=this._digest();void 0!==e&&(t=t.toString(e)),this._block.fill(0),this._blockOffset=0;for(var r=0;r<4;++r)this._length[r]=0;return t},o.prototype._digest=function(){throw new Error("_digest is not implemented")},e.exports=o},function(e,t,r){"use strict";(function(t,n){var i;e.exports=E,E.ReadableState=A;r(20).EventEmitter;var o=function(e,t){return e.listeners(t).length},a=r(153),s=r(1).Buffer,f=t.Uint8Array||function(){};var u,c=r(308);u=c&&c.debuglog?c.debuglog("stream"):function(){};var d,l,h,p=r(309),b=r(154),y=r(155).getHighWaterMark,v=r(46).codes,m=v.ERR_INVALID_ARG_TYPE,g=v.ERR_STREAM_PUSH_AFTER_EOF,w=v.ERR_METHOD_NOT_IMPLEMENTED,_=v.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;r(4)(E,a);var k=b.errorOrDestroy,S=["error","close","destroy","pause","resume"];function A(e,t,n){i=i||r(47),e=e||{},"boolean"!=typeof n&&(n=t instanceof i),this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=y(this,e,"readableHighWaterMark",n),this.buffer=new p,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(d||(d=r(21).StringDecoder),this.decoder=new d(e.encoding),this.encoding=e.encoding)}function E(e){if(i=i||r(47),!(this instanceof E))return new E(e);var t=this instanceof i;this._readableState=new A(e,this,t),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),a.call(this)}function x(e,t,r,n,i){u("readableAddChunk",t);var o,a=e._readableState;if(null===t)a.reading=!1,function(e,t){if(u("onEofChunk"),t.ended)return;if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,t.sync?R(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,T(e)))}(e,a);else if(i||(o=function(e,t){var r;n=t,s.isBuffer(n)||n instanceof f||"string"==typeof t||void 0===t||e.objectMode||(r=new m("chunk",["string","Buffer","Uint8Array"],t));var n;return r}(a,t)),o)k(e,o);else if(a.objectMode||t&&t.length>0)if("string"==typeof t||a.objectMode||Object.getPrototypeOf(t)===s.prototype||(t=function(e){return s.from(e)}(t)),n)a.endEmitted?k(e,new _):P(e,a,t,!0);else if(a.ended)k(e,new g);else{if(a.destroyed)return!1;a.reading=!1,a.decoder&&!r?(t=a.decoder.write(t),a.objectMode||0!==t.length?P(e,a,t,!1):M(e,a)):P(e,a,t,!1)}else n||(a.reading=!1,M(e,a));return!a.ended&&(a.lengtht.highWaterMark&&(t.highWaterMark=function(e){return e>=1073741824?e=1073741824:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function R(e){var t=e._readableState;u("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(u("emitReadable",t.flowing),t.emittedReadable=!0,n.nextTick(T,e))}function T(e){var t=e._readableState;u("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,U(e)}function M(e,t){t.readingMore||(t.readingMore=!0,n.nextTick(I,e,t))}function I(e,t){for(;!t.reading&&!t.ended&&(t.length0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function C(e){u("readable nexttick read 0"),e.read(0)}function j(e,t){u("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),U(e),t.flowing&&!t.reading&&e.read(0)}function U(e){var t=e._readableState;for(u("flow",t.flowing);t.flowing&&null!==e.read(););}function N(e,t){return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r);var r}function L(e){var t=e._readableState;u("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,n.nextTick(F,t,e))}function F(e,t){if(u("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}function D(e,t){for(var r=0,n=e.length;r=t.highWaterMark:t.length>0)||t.ended))return u("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?L(this):R(this),null;if(0===(e=O(e,t))&&t.ended)return 0===t.length&&L(this),null;var n,i=t.needReadable;return u("need readable",i),(0===t.length||t.length-e0?N(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&L(this)),null!==n&&this.emit("data",n),n},E.prototype._read=function(e){k(this,new w("_read()"))},E.prototype.pipe=function(e,t){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=e;break;case 1:i.pipes=[i.pipes,e];break;default:i.pipes.push(e)}i.pipesCount+=1,u("pipe count=%d opts=%j",i.pipesCount,t);var a=(!t||!1!==t.end)&&e!==n.stdout&&e!==n.stderr?f:y;function s(t,n){u("onunpipe"),t===r&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,u("cleanup"),e.removeListener("close",p),e.removeListener("finish",b),e.removeListener("drain",c),e.removeListener("error",h),e.removeListener("unpipe",s),r.removeListener("end",f),r.removeListener("end",y),r.removeListener("data",l),d=!0,!i.awaitDrain||e._writableState&&!e._writableState.needDrain||c())}function f(){u("onend"),e.end()}i.endEmitted?n.nextTick(a):r.once("end",a),e.on("unpipe",s);var c=function(e){return function(){var t=e._readableState;u("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&o(e,"data")&&(t.flowing=!0,U(e))}}(r);e.on("drain",c);var d=!1;function l(t){u("ondata");var n=e.write(t);u("dest.write",n),!1===n&&((1===i.pipesCount&&i.pipes===e||i.pipesCount>1&&-1!==D(i.pipes,e))&&!d&&(u("false write response, pause",i.awaitDrain),i.awaitDrain++),r.pause())}function h(t){u("onerror",t),y(),e.removeListener("error",h),0===o(e,"error")&&k(e,t)}function p(){e.removeListener("finish",b),y()}function b(){u("onfinish"),e.removeListener("close",p),y()}function y(){u("unpipe"),r.unpipe(e)}return r.on("data",l),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",h),e.once("close",p),e.once("finish",b),e.emit("pipe",r),i.flowing||(u("pipe resume"),r.resume()),e},E.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o0,!1!==i.flowing&&this.resume()):"readable"===e&&(i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,u("on readable",i.length,i.reading),i.length?R(this):i.reading||n.nextTick(C,this))),r},E.prototype.addListener=E.prototype.on,E.prototype.removeListener=function(e,t){var r=a.prototype.removeListener.call(this,e,t);return"readable"===e&&n.nextTick(B,this),r},E.prototype.removeAllListeners=function(e){var t=a.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||n.nextTick(B,this),t},E.prototype.resume=function(){var e=this._readableState;return e.flowing||(u("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,n.nextTick(j,e,t))}(this,e)),e.paused=!1,this},E.prototype.pause=function(){return u("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(u("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},E.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;for(var i in e.on("end",(function(){if(u("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(i){(u("wrapped data"),r.decoder&&(i=r.decoder.write(i)),r.objectMode&&null==i)||(r.objectMode||i&&i.length)&&(t.push(i)||(n=!0,e.pause()))})),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var o=0;o-1))throw new _(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(E.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(E.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),E.prototype._write=function(e,t,r){r(new b("_write()"))},E.prototype._writev=null,E.prototype.end=function(e,t,r){var i=this._writableState;return"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),i.corked&&(i.corked=1,this.uncork()),i.ending||function(e,t,r){t.ending=!0,M(e,t),r&&(t.finished?n.nextTick(r):e.once("finish",r));t.ended=!0,e.writable=!1}(this,i,r),this},Object.defineProperty(E.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(E.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),E.prototype.destroy=d.destroy,E.prototype._undestroy=d.undestroy,E.prototype._destroy=function(e,t){t(e)}}).call(this,r(7),r(6))},function(e,t,r){"use strict";e.exports=c;var n=r(46).codes,i=n.ERR_METHOD_NOT_IMPLEMENTED,o=n.ERR_MULTIPLE_CALLBACK,a=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,s=n.ERR_TRANSFORM_WITH_LENGTH_0,f=r(47);function u(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(null===n)return this.emit("error",new o);r.writechunk=null,r.writecb=null,null!=t&&this.push(t),n(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)}function l(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7)}function h(e){return(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3}n(f,i),f.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},f.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,s=0|this._d,f=0|this._e,p=0|this._f,b=0|this._g,y=0|this._h,v=0;v<16;++v)r[v]=e.readInt32BE(4*v);for(;v<64;++v)r[v]=0|(((t=r[v-2])>>>17|t<<15)^(t>>>19|t<<13)^t>>>10)+r[v-7]+h(r[v-15])+r[v-16];for(var m=0;m<64;++m){var g=y+l(f)+u(f,p,b)+a[m]+r[m]|0,w=d(n)+c(n,i,o)|0;y=b,b=p,p=f,f=s+g|0,s=o,o=i,i=n,n=g+w|0}this._a=n+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=s+this._d|0,this._e=f+this._e|0,this._f=p+this._f|0,this._g=b+this._g|0,this._h=y+this._h|0},f.prototype._hash=function(){var e=o.allocUnsafe(32);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e.writeInt32BE(this._h,28),e},e.exports=f},function(e,t,r){"use strict";var n=r(4),i=r(48),o=r(5).Buffer,a=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],s=new Array(160);function f(){this.init(),this._w=s,i.call(this,128,112)}function u(e,t,r){return r^e&(t^r)}function c(e,t,r){return e&t|r&(e|t)}function d(e,t){return(e>>>28|t<<4)^(t>>>2|e<<30)^(t>>>7|e<<25)}function l(e,t){return(e>>>14|t<<18)^(e>>>18|t<<14)^(t>>>9|e<<23)}function h(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^e>>>7}function p(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^(e>>>7|t<<25)}function b(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^e>>>6}function y(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^(e>>>6|t<<26)}function v(e,t){return e>>>0>>0?1:0}n(f,i),f.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},f.prototype._update=function(e){for(var t=this._w,r=0|this._ah,n=0|this._bh,i=0|this._ch,o=0|this._dh,s=0|this._eh,f=0|this._fh,m=0|this._gh,g=0|this._hh,w=0|this._al,_=0|this._bl,k=0|this._cl,S=0|this._dl,A=0|this._el,E=0|this._fl,x=0|this._gl,P=0|this._hl,O=0;O<32;O+=2)t[O]=e.readInt32BE(4*O),t[O+1]=e.readInt32BE(4*O+4);for(;O<160;O+=2){var R=t[O-30],T=t[O-30+1],M=h(R,T),I=p(T,R),B=b(R=t[O-4],T=t[O-4+1]),C=y(T,R),j=t[O-14],U=t[O-14+1],N=t[O-32],L=t[O-32+1],F=I+U|0,D=M+j+v(F,I)|0;D=(D=D+B+v(F=F+C|0,C)|0)+N+v(F=F+L|0,L)|0,t[O]=D,t[O+1]=F}for(var q=0;q<160;q+=2){D=t[q],F=t[q+1];var z=c(r,n,i),H=c(w,_,k),K=d(r,w),G=d(w,r),V=l(s,A),W=l(A,s),J=a[q],X=a[q+1],Z=u(s,f,m),Y=u(A,E,x),$=P+W|0,Q=g+V+v($,P)|0;Q=(Q=(Q=Q+Z+v($=$+Y|0,Y)|0)+J+v($=$+X|0,X)|0)+D+v($=$+F|0,F)|0;var ee=G+H|0,te=K+z+v(ee,G)|0;g=m,P=x,m=f,x=E,f=s,E=A,s=o+Q+v(A=S+$|0,S)|0,o=i,S=k,i=n,k=_,n=r,_=w,r=Q+te+v(w=$+ee|0,$)|0}this._al=this._al+w|0,this._bl=this._bl+_|0,this._cl=this._cl+k|0,this._dl=this._dl+S|0,this._el=this._el+A|0,this._fl=this._fl+E|0,this._gl=this._gl+x|0,this._hl=this._hl+P|0,this._ah=this._ah+r+v(this._al,w)|0,this._bh=this._bh+n+v(this._bl,_)|0,this._ch=this._ch+i+v(this._cl,k)|0,this._dh=this._dh+o+v(this._dl,S)|0,this._eh=this._eh+s+v(this._el,A)|0,this._fh=this._fh+f+v(this._fl,E)|0,this._gh=this._gh+m+v(this._gl,x)|0,this._hh=this._hh+g+v(this._hl,P)|0},f.prototype._hash=function(){var e=o.allocUnsafe(64);function t(t,r,n){e.writeInt32BE(t,n),e.writeInt32BE(r,n+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),t(this._gh,this._gl,48),t(this._hh,this._hl,56),e},e.exports=f},function(e,t,r){"use strict";e.exports=i;var n=r(20).EventEmitter;function i(){n.call(this)}r(4)(i,n),i.Readable=r(61),i.Writable=r(324),i.Duplex=r(325),i.Transform=r(326),i.PassThrough=r(327),i.Stream=i,i.prototype.pipe=function(e,t){var r=this;function i(t){e.writable&&!1===e.write(t)&&r.pause&&r.pause()}function o(){r.readable&&r.resume&&r.resume()}r.on("data",i),e.on("drain",o),e._isStdio||t&&!1===t.end||(r.on("end",s),r.on("close",f));var a=!1;function s(){a||(a=!0,e.end())}function f(){a||(a=!0,"function"==typeof e.destroy&&e.destroy())}function u(e){if(c(),0===n.listenerCount(this,"error"))throw e}function c(){r.removeListener("data",i),e.removeListener("drain",o),r.removeListener("end",s),r.removeListener("close",f),r.removeListener("error",u),e.removeListener("error",u),r.removeListener("end",c),r.removeListener("close",c),e.removeListener("close",c)}return r.on("error",u),e.on("error",u),r.on("end",c),r.on("close",c),e.on("close",c),e.emit("pipe",r),e}},function(e,t,r){"use strict";(function(t,n){var i=r(76);e.exports=g;var o,a=r(130);g.ReadableState=m;r(20).EventEmitter;var s=function(e,t){return e.listeners(t).length},f=r(162),u=r(100).Buffer,c=t.Uint8Array||function(){};var d=Object.create(r(62));d.inherits=r(4);var l=r(319),h=void 0;h=l&&l.debuglog?l.debuglog("stream"):function(){};var p,b=r(320),y=r(163);d.inherits(g,f);var v=["error","close","destroy","pause","resume"];function m(e,t){e=e||{};var n=t instanceof(o=o||r(35));this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var i=e.highWaterMark,a=e.readableHighWaterMark,s=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:n&&(a||0===a)?a:s,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new b,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=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(p||(p=r(21).StringDecoder),this.decoder=new p(e.encoding),this.encoding=e.encoding)}function g(e){if(o=o||r(35),!(this instanceof g))return new g(e);this._readableState=new m(e,this),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),f.call(this)}function w(e,t,r,n,i){var o,a=e._readableState;null===t?(a.reading=!1,function(e,t){if(t.ended)return;if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,S(e)}(e,a)):(i||(o=function(e,t){var r;n=t,u.isBuffer(n)||n instanceof c||"string"==typeof t||void 0===t||e.objectMode||(r=new TypeError("Invalid non-string/buffer chunk"));var n;return r}(a,t)),o?e.emit("error",o):a.objectMode||t&&t.length>0?("string"==typeof t||a.objectMode||Object.getPrototypeOf(t)===u.prototype||(t=function(e){return u.from(e)}(t)),n?a.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):_(e,a,t,!0):a.ended?e.emit("error",new Error("stream.push() after EOF")):(a.reading=!1,a.decoder&&!r?(t=a.decoder.write(t),a.objectMode||0!==t.length?_(e,a,t,!1):E(e,a)):_(e,a,t,!1))):n||(a.reading=!1));return function(e){return!e.ended&&(e.needReadable||e.lengtht.highWaterMark&&(t.highWaterMark=function(e){return e>=8388608?e=8388608:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function S(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(h("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?i.nextTick(A,e):A(e))}function A(e){h("emit readable"),e.emit("readable"),R(e)}function E(e,t){t.readingMore||(t.readingMore=!0,i.nextTick(x,e,t))}function x(e,t){for(var r=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):r=function(e,t,r){var n;eo.length?o.length:e;if(a===o.length?i+=o:i+=o.slice(0,e),0===(e-=a)){a===o.length?(++n,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=o.slice(a));break}++n}return t.length-=n,i}(e,t):function(e,t){var r=u.allocUnsafe(e),n=t.head,i=1;n.data.copy(r),e-=n.data.length;for(;n=n.next;){var o=n.data,a=e>o.length?o.length:e;if(o.copy(r,r.length-e,0,a),0===(e-=a)){a===o.length?(++i,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=o.slice(a));break}++i}return t.length-=i,r}(e,t);return n}(e,t.buffer,t.decoder),r);var r}function M(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,i.nextTick(I,t,e))}function I(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function B(e,t){for(var r=0,n=e.length;r=t.highWaterMark||t.ended))return h("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?M(this):S(this),null;if(0===(e=k(e,t))&&t.ended)return 0===t.length&&M(this),null;var n,i=t.needReadable;return h("need readable",i),(0===t.length||t.length-e0?T(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&M(this)),null!==n&&this.emit("data",n),n},g.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},g.prototype.pipe=function(e,t){var r=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=e;break;case 1:o.pipes=[o.pipes,e];break;default:o.pipes.push(e)}o.pipesCount+=1,h("pipe count=%d opts=%j",o.pipesCount,t);var f=(!t||!1!==t.end)&&e!==n.stdout&&e!==n.stderr?c:g;function u(t,n){h("onunpipe"),t===r&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,h("cleanup"),e.removeListener("close",v),e.removeListener("finish",m),e.removeListener("drain",d),e.removeListener("error",y),e.removeListener("unpipe",u),r.removeListener("end",c),r.removeListener("end",g),r.removeListener("data",b),l=!0,!o.awaitDrain||e._writableState&&!e._writableState.needDrain||d())}function c(){h("onend"),e.end()}o.endEmitted?i.nextTick(f):r.once("end",f),e.on("unpipe",u);var d=function(e){return function(){var t=e._readableState;h("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&s(e,"data")&&(t.flowing=!0,R(e))}}(r);e.on("drain",d);var l=!1;var p=!1;function b(t){h("ondata"),p=!1,!1!==e.write(t)||p||((1===o.pipesCount&&o.pipes===e||o.pipesCount>1&&-1!==B(o.pipes,e))&&!l&&(h("false write response, pause",r._readableState.awaitDrain),r._readableState.awaitDrain++,p=!0),r.pause())}function y(t){h("onerror",t),g(),e.removeListener("error",y),0===s(e,"error")&&e.emit("error",t)}function v(){e.removeListener("finish",m),g()}function m(){h("onfinish"),e.removeListener("close",v),g()}function g(){h("unpipe"),r.unpipe(e)}return r.on("data",b),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?a(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",y),e.once("close",v),e.once("finish",m),e.emit("pipe",r),o.flowing||(h("pipe resume"),r.resume()),e},g.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},r(322),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||void 0,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||void 0}).call(this,r(7))},function(e,t,r){"use strict";e.exports=a;var n=r(35),i=Object.create(r(62));function o(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(!n)return this.emit("error",new Error("write callback called multiple times"));r.writechunk=null,r.writecb=null,null!=t&&this.push(t),n(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length=t&&n<=r?n-t+10:e})).join("")},u=function(e){for(var t,r=e;r.length>2;)t=r.slice(0,9),r=parseInt(t,10)%97+r.slice(t.length);return parseInt(r,10)%97},c=function(){function e(t){(0,i.default)(this,e),this._iban=t}return(0,o.default)(e,[{key:"isValid",value:function(){return/^XE[0-9]{2}(ETH[0-9A-Z]{13}|[0-9A-Z]{30,31})$/.test(this._iban)&&1===u(f(this._iban))}},{key:"isDirect",value:function(){return 34===this._iban.length||35===this._iban.length}},{key:"isIndirect",value:function(){return 20===this._iban.length}},{key:"checksum",value:function(){return this._iban.slice(2,4)}},{key:"institution",value:function(){return this.isIndirect()?this._iban.slice(7,11):""}},{key:"client",value:function(){return this.isIndirect()?this._iban.slice(11):""}},{key:"toAddress",value:function(){if(this.isDirect()){var e=this._iban.slice(4),t=new s(e,36);return a.toChecksumAddress(t.toString(16,20))}return""}},{key:"toString",value:function(){return this._iban}}],[{key:"toAddress",value:function(t){if(!(t=new e(t)).isDirect())throw new Error("IBAN is indirect and can't be converted");return t.toAddress()}},{key:"toIban",value:function(t){return e.fromAddress(t).toString()}},{key:"fromAddress",value:function(t){if(!a.isAddress(t))throw new Error("Provided address is not a valid address: "+t);t=t.replace("0x","").replace("0X","");var r=function(e,t){for(var r=e;r.length<2*t;)r="0"+r;return r}(new s(t,16).toString(36),15);return e.fromBban(r.toUpperCase())}},{key:"fromBban",value:function(t){return new e("XE"+("0"+(98-u(f("XE00"+t)))).slice(-2)+t)}},{key:"createIndirect",value:function(t){return e.fromBban("ETH"+t.institution+t.identifier)}},{key:"isValid",value:function(t){return new e(t).isValid()}}]),e}();e.exports=c},function(e,t,r){"use strict";var n={messageId:0,toPayload:function(e,t){if(!e)throw new Error('JSONRPC method should be specified for params: "'+JSON.stringify(t)+'"!');return n.messageId++,{jsonrpc:"2.0",id:n.messageId,method:e,params:t||[]}},isValidResponse:function(e){return Array.isArray(e)?e.every(t):t(e);function t(e){return!(!e||e.error||"2.0"!==e.jsonrpc||"number"!=typeof e.id&&"string"!=typeof e.id||void 0===e.result)}},toBatchPayload:function(e){return e.map((function(e){return n.toPayload(e.method,e.params)}))}};e.exports=n},function(e,t,r){"use strict";(function(e,n){var i,o=r(0)(r(2));!function(a){var s="object"==(0,o.default)(t)&&t&&!t.nodeType&&t,f="object"==(0,o.default)(e)&&e&&!e.nodeType&&e,u="object"==(void 0===n?"undefined":(0,o.default)(n))&&n;u.global!==u&&u.window!==u&&u.self!==u||(a=u);var c,d,l=2147483647,h=/^xn--/,p=/[^\x20-\x7E]/,b=/[\x2E\u3002\uFF0E\uFF61]/g,y={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},v=Math.floor,m=String.fromCharCode;function g(e){throw new RangeError(y[e])}function w(e,t){for(var r=e.length,n=[];r--;)n[r]=t(e[r]);return n}function _(e,t){var r=e.split("@"),n="";return r.length>1&&(n=r[0]+"@",e=r[1]),n+w((e=e.replace(b,".")).split("."),t).join(".")}function k(e){for(var t,r,n=[],i=0,o=e.length;i=55296&&t<=56319&&i65535&&(t+=m((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+=m(e)})).join("")}function A(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function E(e,t,r){var n=0;for(e=r?v(e/700):e>>1,e+=v(e/t);e>455;n+=36)e=v(e/35);return v(n+36*e/(e+38))}function x(e){var t,r,n,i,o,a,s,f,u,c,d,h=[],p=e.length,b=0,y=128,m=72;for((r=e.lastIndexOf("-"))<0&&(r=0),n=0;n=128&&g("not-basic"),h.push(e.charCodeAt(n));for(i=r>0?r+1:0;i=p&&g("invalid-input"),((f=(d=e.charCodeAt(i++))-48<10?d-22:d-65<26?d-65:d-97<26?d-97:36)>=36||f>v((l-b)/a))&&g("overflow"),b+=f*a,!(f<(u=s<=m?1:s>=m+26?26:s-m));s+=36)a>v(l/(c=36-u))&&g("overflow"),a*=c;m=E(b-o,t=h.length+1,0==o),v(b/t)>l-y&&g("overflow"),y+=v(b/t),b%=t,h.splice(b++,0,y)}return S(h)}function P(e){var t,r,n,i,o,a,s,f,u,c,d,h,p,b,y,w=[];for(h=(e=k(e)).length,t=128,r=0,o=72,a=0;a=t&&dv((l-r)/(p=n+1))&&g("overflow"),r+=(s-t)*p,t=s,a=0;al&&g("overflow"),d==t){for(f=r,u=36;!(f<(c=u<=o?1:u>=o+26?26:u-o));u+=36)y=f-c,b=36-c,w.push(m(A(c+y%b,0))),f=v(y/b);w.push(m(A(f,0))),o=E(r,p,n==i),r=0,++n}++r,++t}return w.join("")}if(c={version:"1.4.1",ucs2:{decode:k,encode:S},decode:x,encode:P,toASCII:function(e){return _(e,(function(e){return p.test(e)?"xn--"+P(e):e}))},toUnicode:function(e){return _(e,(function(e){return h.test(e)?x(e.slice(4).toLowerCase()):e}))}},"object"==(0,o.default)(r(63))&&r(63))void 0===(i=function(){return c}.call(t,r,t,e))||(e.exports=i);else if(s&&f)if(e.exports==s)f.exports=c;else for(d in c)c.hasOwnProperty(d)&&(s[d]=c[d]);else a.punycode=c}(void 0)}).call(this,r(27)(e),r(7))},function(e,t,r){"use strict";(function(e){var n=r(349),i=r(171),o=r(172),a=r(351),s=r(77),f=t;f.request=function(t,r){t="string"==typeof t?s.parse(t):o(t);var i=-1===e.location.protocol.search(/^https?:$/)?"http:":"",a=t.protocol||i,f=t.hostname||t.host,u=t.port,c=t.path||"/";f&&-1!==f.indexOf(":")&&(f="["+f+"]"),t.url=(f?a+"//"+f:"")+(u?":"+u:"")+c,t.method=(t.method||"GET").toUpperCase(),t.headers=t.headers||{};var d=new n(t);return r&&d.on("response",r),d},f.get=function(e,t){var r=f.request(e,t);return r.end(),r},f.ClientRequest=n,f.IncomingMessage=i.IncomingMessage,f.Agent=function(){},f.Agent.defaultMaxSockets=4,f.globalAgent=new f.Agent,f.STATUS_CODES=a,f.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]}).call(this,r(7))},function(e,t,r){"use strict";(function(e){t.fetch=s(e.fetch)&&s(e.ReadableStream),t.writableStream=s(e.WritableStream),t.abortController=s(e.AbortController),t.blobConstructor=!1;try{new Blob([new ArrayBuffer(1)]),t.blobConstructor=!0}catch(e){}var r;function n(){if(void 0!==r)return r;if(e.XMLHttpRequest){r=new e.XMLHttpRequest;try{r.open("GET",e.XDomainRequest?"/":"https://example.com")}catch(e){r=null}}else r=null;return r}function i(e){var t=n();if(!t)return!1;try{return t.responseType=e,t.responseType===e}catch(e){}return!1}var o=void 0!==e.ArrayBuffer,a=o&&s(e.ArrayBuffer.prototype.slice);function s(e){return"function"==typeof e}t.arraybuffer=t.fetch||o&&i("arraybuffer"),t.msstream=!t.fetch&&a&&i("ms-stream"),t.mozchunkedarraybuffer=!t.fetch&&o&&i("moz-chunked-arraybuffer"),t.overrideMimeType=t.fetch||!!n()&&s(n().overrideMimeType),t.vbArray=s(e.VBArray),r=null}).call(this,r(7))},function(e,t,r){"use strict";(function(e,n,i){var o=r(170),a=r(90),s=r(61),f=t.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},u=t.IncomingMessage=function(t,r,a,f){var u=this;if(s.Readable.call(u),u._mode=a,u.headers={},u.rawHeaders=[],u.trailers={},u.rawTrailers=[],u.on("end",(function(){e.nextTick((function(){u.emit("close")}))})),"fetch"===a){if(u._fetchResponse=r,u.url=r.url,u.statusCode=r.status,u.statusMessage=r.statusText,r.headers.forEach((function(e,t){u.headers[t.toLowerCase()]=e,u.rawHeaders.push(t,e)})),o.writableStream){var c=new WritableStream({write:function(e){return new Promise((function(t,r){u._destroyed?r():u.push(new i(e))?t():u._resumeFetch=t}))},close:function(){n.clearTimeout(f),u._destroyed||u.push(null)},abort:function(e){u._destroyed||u.emit("error",e)}});try{return void r.body.pipeTo(c).catch((function(e){n.clearTimeout(f),u._destroyed||u.emit("error",e)}))}catch(e){}}var d=r.body.getReader();!function e(){d.read().then((function(t){if(!u._destroyed){if(t.done)return n.clearTimeout(f),void u.push(null);u.push(new i(t.value)),e()}})).catch((function(e){n.clearTimeout(f),u._destroyed||u.emit("error",e)}))}()}else{if(u._xhr=t,u._pos=0,u.url=t.responseURL,u.statusCode=t.status,u.statusMessage=t.statusText,t.getAllResponseHeaders().split(/\r?\n/).forEach((function(e){var t=e.match(/^([^:]+):\s*(.*)/);if(t){var r=t[1].toLowerCase();"set-cookie"===r?(void 0===u.headers[r]&&(u.headers[r]=[]),u.headers[r].push(t[2])):void 0!==u.headers[r]?u.headers[r]+=", "+t[2]:u.headers[r]=t[2],u.rawHeaders.push(t[1],t[2])}})),u._charset="x-user-defined",!o.overrideMimeType){var l=u.rawHeaders["mime-type"];if(l){var h=l.match(/;\s*charset=([^;])(;|$)/);h&&(u._charset=h[1].toLowerCase())}u._charset||(u._charset="utf-8")}}};a(u,s.Readable),u.prototype._read=function(){var e=this._resumeFetch;e&&(this._resumeFetch=null,e())},u.prototype._onXHRProgress=function(){var e=this,t=e._xhr,r=null;switch(e._mode){case"text:vbarray":if(t.readyState!==f.DONE)break;try{r=new n.VBArray(t.responseBody).toArray()}catch(e){}if(null!==r){e.push(new i(r));break}case"text":try{r=t.responseText}catch(t){e._mode="text:vbarray";break}if(r.length>e._pos){var o=r.substr(e._pos);if("x-user-defined"===e._charset){for(var a=new i(o.length),s=0;se._pos&&(e.push(new i(new Uint8Array(u.result.slice(e._pos)))),e._pos=u.result.byteLength)},u.onload=function(){e.push(null)},u.readAsArrayBuffer(r)}e._xhr.readyState===f.DONE&&"ms-stream"!==e._mode&&e.push(null)}}).call(this,r(6),r(7),r(1).Buffer)},function(e,t,r){"use strict";e.exports=function(){for(var e={},t=0;t0&&(10===arguments[0]?h||(h=!0,d.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):16===arguments[0]?d.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",f.Logger.errors.UNEXPECTED_ARGUMENT,{}):d.throwError("BigNumber.toString does not accept parameters",f.Logger.errors.UNEXPECTED_ARGUMENT,{})),v(this).toString(10)}},{key:"toHexString",value:function(){return this._hex}},{key:"toJSON",value:function(e){return{type:"BigNumber",hex:this.toHexString()}}}],[{key:"from",value:function(t){if(t instanceof e)return t;if("string"==typeof t)return t.match(/^-?0x[0-9a-f]+$/i)?new e(l,b(t)):t.match(/^-?[0-9]+$/)?new e(l,b(new c(t))):d.throwArgumentError("invalid BigNumber string","value",t);if("number"==typeof t)return t%1&&m("underflow","BigNumber.from",t),(t>=9007199254740991||t<=-9007199254740991)&&m("overflow","BigNumber.from",t),e.from(String(t));var r=t;if("bigint"==typeof r)return e.from(r.toString());if((0,s.isBytes)(r))return e.from((0,s.hexlify)(r));if(r)if(r.toHexString){var n=r.toHexString();if("string"==typeof n)return e.from(n)}else{var i=r._hex;if(null==i&&"BigNumber"===r.type&&(i=r.hex),"string"==typeof i&&((0,s.isHexString)(i)||"-"===i[0]&&(0,s.isHexString)(i.substring(1))))return e.from(i)}return d.throwArgumentError("invalid BigNumber value","value",t)}},{key:"isBigNumber",value:function(e){return!(!e||!e._isBigNumber)}}]),e}();function b(e){if("string"!=typeof e)return b(e.toString(16));if("-"===e[0])return"-"===(e=e.substring(1))[0]&&d.throwArgumentError("invalid hex","value",e),"0x00"===(e=b(e))?e:"-"+e;if("0x"!==e.substring(0,2)&&(e="0x"+e),"0x"===e)return"0x00";for(e.length%2&&(e="0x0"+e.substring(2));e.length>4&&"0x00"===e.substring(0,4);)e="0x"+e.substring(4);return e}function y(e){return p.from(b(e))}function v(e){var t=p.from(e).toHexString();return"-"===t[0]?new c("-"+t.substring(3),16):new c(t.substring(2),16)}function m(e,t,r){var n={fault:e,operation:t};return null!=r&&(n.value=r),d.throwError(e,f.Logger.errors.NUMERIC_FAULT,n)}t.BigNumber=p},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.version=void 0;t.version="bignumber/5.6.2"},function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.keccak256=function(e){return"0x"+i.default.keccak_256((0,o.arrayify)(e))};var i=n(r(366)),o=r(37)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decode=function(e){var t=(0,n.arrayify)(e),r=c(t,0);r.consumed!==t.length&&a.throwArgumentError("invalid rlp data","data",e);return r.result},t.encode=function(e){return(0,n.hexlify)(function e(t){if(Array.isArray(t)){var r=[];if(t.forEach((function(t){r=r.concat(e(t))})),r.length<=55)return r.unshift(192+r.length),r;var i=s(r.length);return i.unshift(247+i.length),i.concat(r)}(0,n.isBytesLike)(t)||a.throwArgumentError("RLP object must be BytesLike","object",t);var o=Array.prototype.slice.call((0,n.arrayify)(t));if(1===o.length&&o[0]<=127)return o;if(o.length<=55)return o.unshift(128+o.length),o;var f=s(o.length);return f.unshift(183+f.length),f.concat(o)}(e))};var n=r(37),i=r(32),o=r(367),a=new i.Logger(o.version);function s(e){for(var t=[];e;)t.unshift(255&e),e>>=8;return t}function f(e,t,r){for(var n=0,i=0;it+1+n&&a.throwError("child data too short",i.Logger.errors.BUFFER_OVERRUN,{})}return{consumed:1+n,result:o}}function c(e,t){if(0===e.length&&a.throwError("data too short",i.Logger.errors.BUFFER_OVERRUN,{}),e[t]>=248){var r=e[t]-247;t+1+r>e.length&&a.throwError("data short segment too short",i.Logger.errors.BUFFER_OVERRUN,{});var o=f(e,t+1,r);return t+1+r+o>e.length&&a.throwError("data long segment too short",i.Logger.errors.BUFFER_OVERRUN,{}),u(e,t,t+1+r,r+o)}if(e[t]>=192){var s=e[t]-192;return t+1+s>e.length&&a.throwError("data array too short",i.Logger.errors.BUFFER_OVERRUN,{}),u(e,t,t+1,s)}if(e[t]>=184){var c=e[t]-183;t+1+c>e.length&&a.throwError("data array too short",i.Logger.errors.BUFFER_OVERRUN,{});var d=f(e,t+1,c);return t+1+c+d>e.length&&a.throwError("data array too short",i.Logger.errors.BUFFER_OVERRUN,{}),{consumed:1+c+d,result:(0,n.hexlify)(e.slice(t+1+c,t+1+c+d))}}if(e[t]>=128){var l=e[t]-128;return t+1+l>e.length&&a.throwError("data too short",i.Logger.errors.BUFFER_OVERRUN,{}),{consumed:1+l,result:(0,n.hexlify)(e.slice(t+1,t+1+l))}}return{consumed:1,result:(0,n.hexlify)(e[t])}}},function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.Description=void 0,t.checkProperties=function(e,t){e&&"object"===(0,a.default)(e)||c.throwArgumentError("invalid object","object",e);Object.keys(e).forEach((function(r){t[r]||c.throwArgumentError("invalid object key - "+r,"transaction:"+r,e)}))},t.deepCopy=p,t.defineReadOnly=d,t.getStatic=function(e,t){for(var r=0;r<32;r++){if(e[t])return e[t];if(!e.prototype||"object"!==(0,a.default)(e.prototype))break;e=Object.getPrototypeOf(e.prototype).constructor}return null},t.resolveProperties=function(e){return u(this,void 0,void 0,i.default.mark((function t(){var r,n;return i.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=Object.keys(e).map((function(t){var r=e[t];return Promise.resolve(r).then((function(e){return{key:t,value:e}}))})),t.next=3,Promise.all(r);case 3:return n=t.sent,t.abrupt("return",n.reduce((function(e,t){return e[t.key]=t.value,e}),{}));case 5:case"end":return t.stop()}}),t)})))},t.shallowCopy=function(e){var t={};for(var r in e)t[r]=e[r];return t};var i=n(r(49)),o=n(r(8)),a=n(r(2)),s=r(32),f=r(374),u=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{f(n.next(e))}catch(e){o(e)}}function s(e){try{f(n.throw(e))}catch(e){o(e)}}function f(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}f((n=n.apply(e,t||[])).next())}))},c=new s.Logger(f.version);function d(e,t,r){Object.defineProperty(e,t,{enumerable:!0,value:r,writable:!1})}var l={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function h(e){if(function e(t){if(null==t||l[(0,a.default)(t)])return!0;if(Array.isArray(t)||"object"===(0,a.default)(t)){if(!Object.isFrozen(t))return!1;for(var r=Object.keys(t),n=0;n0&&e.topics.length!==n+1&&(t={anonymous:!0,inputs:[]})}var i=t.anonymous?e.topics:e.topics.slice(1);return r.returnValues=b.decodeLog(t.inputs,e.data,i),delete r.returnValues.__length__,r.event=t.name,r.signature=t.anonymous||!e.topics[0]?null:e.topics[0],r.raw={data:r.data,topics:r.topics},delete r.data,delete r.topics,r},y.prototype._encodeMethodABI=function(){var e=this._method.signature,t=this.arguments||[],r=!1,n=this._parent.options.jsonInterface.filter((function(t){return"constructor"===e&&t.type===e||(t.signature===e||t.signature===e.replace("0x","")||t.name===e)&&"function"===t.type})).map((function(e){var n=Array.isArray(e.inputs)?e.inputs.length:0;if(n!==t.length)throw new Error("The number of arguments is not matching the methods required number. You need to pass "+n+" arguments.");return"function"===e.type&&(r=e.signature),Array.isArray(e.inputs)?e.inputs:[]})).map((function(e){return b.encodeParameters(e,t).replace("0x","")}))[0]||"";if("constructor"===e){if(!this._deployData)throw new Error("The contract has no contract data option set. This is necessary to append the constructor parameters.");return this._deployData.startsWith("0x")||(this._deployData="0x"+this._deployData),this._deployData+n}var i=r?r+n:n;if(!i)throw new Error("Couldn't find a matching contract method named \""+this._method.name+'".');return i},y.prototype._decodeMethodReturn=function(e,t){if(!t)return null;t=t.length>=2?t.slice(2):t;var r=b.decodeParameters(e,t);return 1===r.__length__?r[0]:(delete r.__length__,r)},y.prototype.deploy=function(e,t){if((e=e||{}).arguments=e.arguments||[],!(e=this._getOrSetDefaultOptions(e)).data){if("function"==typeof t)return t(h.ContractMissingDeployDataError());throw h.ContractMissingDeployDataError()}var r=this.options.jsonInterface.find((function(e){return"constructor"===e.type}))||{};return r.signature="constructor",this._createTxObject.apply({method:r,parent:this,deployData:e.data,_ethAccounts:this.constructor._ethAccounts},e.arguments)},y.prototype._generateEventOptions=function(){var e=Array.prototype.slice.call(arguments),t=this._getCallback(e),r="object"===(!!e[e.length-1]&&(0,o.default)(e[e.length-1]))?e.pop():{},n="string"==typeof e[0]?e[0]:"allevents",i="allevents"===n.toLowerCase()?{name:"ALLEVENTS",jsonInterface:this.options.jsonInterface}:this.options.jsonInterface.find((function(e){return"event"===e.type&&(e.name===n||e.signature==="0x"+n.replace("0x",""))}));if(!i)throw h.ContractEventDoesNotExistError(n);if(!c.isAddress(this.options.address))throw h.ContractNoAddressDefinedError();return{params:this._encodeEventABI(i,r),event:i,callback:t}},y.prototype.clone=function(){return new this.constructor(this.options.jsonInterface,this.options.address,this.options)},y.prototype.once=function(e,t,r){var n=Array.prototype.slice.call(arguments);if(!(r=this._getCallback(n)))throw h.ContractOnceRequiresCallbackError();t&&delete t.fromBlock,this._on(e,t,(function(e,t,n){n.unsubscribe(),"function"==typeof r&&r(e,t,n)}))},y.prototype._on=function(){var e=this._generateEventOptions.apply(this,arguments);e.params&&e.params.toBlock&&(delete e.params.toBlock,console.warn("Invalid option: toBlock. Use getPastEvents for specific range.")),this._checkListener("newListener",e.event.name),this._checkListener("removeListener",e.event.name);var t=new d({subscription:{params:1,inputFormatter:[l.inputLogFormatter],outputFormatter:this._decodeEventABI.bind(e.event),subscriptionHandler:function(e){e.removed?this.emit("changed",e):this.emit("data",e),"function"==typeof this.callback&&this.callback(null,e,this)}},type:"eth",requestManager:this._requestManager});return t.subscribe("logs",e.params,e.callback||function(){}),t},y.prototype.getPastEvents=function(){var e=this._generateEventOptions.apply(this,arguments),t=new u({name:"getPastLogs",call:"eth_getLogs",params:1,inputFormatter:[l.inputLogFormatter],outputFormatter:this._decodeEventABI.bind(e.event)});t.setRequestManager(this._requestManager);var r=t.buildCall();return t=null,r(e.params,e.callback)},y.prototype._createTxObject=function(){var e=Array.prototype.slice.call(arguments),t={};if("function"===this.method.type&&(t.call=this.parent._executeMethod.bind(t,"call"),t.call.request=this.parent._executeMethod.bind(t,"call",!0)),t.send=this.parent._executeMethod.bind(t,"send"),t.send.request=this.parent._executeMethod.bind(t,"send",!0),t.encodeABI=this.parent._encodeMethodABI.bind(t),t.estimateGas=this.parent._executeMethod.bind(t,"estimate"),t.createAccessList=this.parent._executeMethod.bind(t,"createAccessList"),e&&this.method.inputs&&e.length!==this.method.inputs.length){if(this.nextMethod)return this.nextMethod.apply(null,e);throw h.InvalidNumberOfParams(e.length,this.method.inputs.length,this.method.name)}return t.arguments=e||[],t._method=this.method,t._parent=this.parent,t._ethAccounts=this.parent.constructor._ethAccounts||this._ethAccounts,this.deployData&&(t._deployData=this.deployData),t},y.prototype._processExecuteArguments=function(e,t){var r={};if(r.type=e.shift(),r.callback=this._parent._getCallback(e),"call"!==r.type||!0===e[e.length-1]||"string"!=typeof e[e.length-1]&&!isFinite(e[e.length-1])||(r.defaultBlock=e.pop()),r.options="object"===(!!e[e.length-1]&&(0,o.default)(e[e.length-1]))?e.pop():{},r.generateRequest=!0===e[e.length-1]&&e.pop(),r.options=this._parent._getOrSetDefaultOptions(r.options),r.options.data=this.encodeABI(),!this._deployData&&!c.isAddress(this._parent.options.address))throw h.ContractNoAddressDefinedError();return this._deployData||(r.options.to=this._parent.options.address),r.options.data?r:c._fireError(new Error("Couldn't find a matching contract method, or the number of parameters is wrong."),t.eventEmitter,t.reject,r.callback)},y.prototype._executeMethod=function(){var e=this,t=this._parent._processExecuteArguments.call(this,Array.prototype.slice.call(arguments),r),r=p("send"!==t.type),n=e.constructor._ethAccounts||e._ethAccounts;if(t.generateRequest){var i={params:[l.inputCallFormatter.call(this._parent,t.options)],callback:t.callback};return"call"===t.type?(i.params.push(l.inputDefaultBlockNumberFormatter.call(this._parent,t.defaultBlock)),i.method="eth_call",i.format=this._parent._decodeMethodReturn.bind(null,this._method.outputs)):i.method="eth_sendTransaction",i}switch(t.type){case"createAccessList":if(!c.isAddress(t.options.from))return c._fireError(h.ContractNoFromAddressDefinedError(),r.eventEmitter,r.reject,t.callback);var o=new u({name:"createAccessList",call:"eth_createAccessList",params:2,inputFormatter:[l.inputTransactionFormatter,l.inputDefaultBlockNumberFormatter],requestManager:e._parent._requestManager,accounts:n,defaultAccount:e._parent.defaultAccount,defaultBlock:e._parent.defaultBlock}).createFunction();return o(t.options,t.callback);case"estimate":var a=new u({name:"estimateGas",call:"eth_estimateGas",params:1,inputFormatter:[l.inputCallFormatter],outputFormatter:c.hexToNumber,requestManager:e._parent._requestManager,accounts:n,defaultAccount:e._parent.defaultAccount,defaultBlock:e._parent.defaultBlock}).createFunction();return a(t.options,t.callback);case"call":var s=new u({name:"call",call:"eth_call",params:2,inputFormatter:[l.inputCallFormatter,l.inputDefaultBlockNumberFormatter],outputFormatter:function(t){return e._parent._decodeMethodReturn(e._method.outputs,t)},requestManager:e._parent._requestManager,accounts:n,defaultAccount:e._parent.defaultAccount,defaultBlock:e._parent.defaultBlock,handleRevert:e._parent.handleRevert,abiCoder:b}).createFunction();return s(t.options,t.defaultBlock,t.callback);case"send":if(!c.isAddress(t.options.from))return c._fireError(h.ContractNoFromAddressDefinedError(),r.eventEmitter,r.reject,t.callback);if("boolean"==typeof this._method.payable&&!this._method.payable&&t.options.value&&t.options.value>0)return c._fireError(new Error("Can not send value to non-payable contract method or constructor"),r.eventEmitter,r.reject,t.callback);var f={receiptFormatter:function(t){if(Array.isArray(t.logs)){var r=t.logs.map((function(t){return e._parent._decodeEventABI.call({name:"ALLEVENTS",jsonInterface:e._parent.options.jsonInterface},t)}));t.events={};var n=0;r.forEach((function(e){e.event?t.events[e.event]?Array.isArray(t.events[e.event])?t.events[e.event].push(e):t.events[e.event]=[t.events[e.event],e]:t.events[e.event]=e:(t.events[n]=e,n++)})),delete t.logs}return t},contractDeployFormatter:function(t){var r=e._parent.clone();return r.options.address=t.contractAddress,r}},d=new u({name:"sendTransaction",call:"eth_sendTransaction",params:1,inputFormatter:[l.inputTransactionFormatter],requestManager:e._parent._requestManager,accounts:e.constructor._ethAccounts||e._ethAccounts,defaultAccount:e._parent.defaultAccount,defaultBlock:e._parent.defaultBlock,transactionBlockTimeout:e._parent.transactionBlockTimeout,transactionConfirmationBlocks:e._parent.transactionConfirmationBlocks,transactionPollingTimeout:e._parent.transactionPollingTimeout,transactionPollingInterval:e._parent.transactionPollingInterval,defaultCommon:e._parent.defaultCommon,defaultChain:e._parent.defaultChain,defaultHardfork:e._parent.defaultHardfork,handleRevert:e._parent.handleRevert,extraFormatters:f,abiCoder:b}).createFunction();return d(t.options,t.callback);default:throw new Error('Method "'+t.type+'" not implemented.')}},e.exports=y},function(e,t,r){"use strict";var n=r(0)(r(2)),i=r(1).Buffer,o=r(17),a=r(181).AbiCoder,s=r(181).ParamType,f=new a((function(e,t){return!e.match(/^u?int/)||Array.isArray(t)||t&&"object"===(0,n.default)(t)&&"BN"===t.constructor.name?t:t.toString()}));function u(){}var c=function(){};c.prototype.encodeFunctionSignature=function(e){return("function"==typeof e||"object"===(0,n.default)(e)&&e)&&(e=o._jsonInterfaceMethodToString(e)),o.sha3(e).slice(0,10)},c.prototype.encodeEventSignature=function(e){return("function"==typeof e||"object"===(0,n.default)(e)&&e)&&(e=o._jsonInterfaceMethodToString(e)),o.sha3(e)},c.prototype.encodeParameter=function(e,t){return this.encodeParameters([e],[t])},c.prototype.encodeParameters=function(e,t){var r=this;return e=r.mapTypes(e),t=t.map((function(t,i){var o=e[i];if("object"===(0,n.default)(o)&&o.type&&(o=o.type),t=r.formatParam(o,t),"string"==typeof o&&o.includes("tuple")){!function e(t,n){if("array"===t.name){if(!t.type.match(/\[(\d+)\]/))return n.map((function(r){return e(f._getCoder(s.from(t.type.replace("[]",""))),r)}));var i=parseInt(t.type.match(/\[(\d+)\]/)[1]);if(n.length!==i)throw new Error("Array length does not matches with the given input");return n.map((function(r){return e(f._getCoder(s.from(t.type.replace(/\[\d+\]/,""))),r)}))}t.coders.forEach((function(t,i){"tuple"===t.name?e(t,n[i]):n[i]=r.formatParam(t.name,n[i])}))}(f._getCoder(s.from(o)),t)}return t})),f.encode(e,t)},c.prototype.mapTypes=function(e){var t=this,r=[];return e.forEach((function(e){if("object"===(0,n.default)(e)&&"function"===e.type&&(e=Object.assign({},e,{type:"bytes24"})),t.isSimplifiedStructFormat(e)){var i=Object.keys(e)[0];r.push(Object.assign(t.mapStructNameAndType(i),{components:t.mapStructToCoderFormat(e[i])}))}else r.push(e)})),r},c.prototype.isSimplifiedStructFormat=function(e){return"object"===(0,n.default)(e)&&void 0===e.components&&void 0===e.name},c.prototype.mapStructNameAndType=function(e){var t="tuple";return e.indexOf("[]")>-1&&(t="tuple[]",e=e.slice(0,-2)),{type:t,name:e}},c.prototype.mapStructToCoderFormat=function(e){var t=this,r=[];return Object.keys(e).forEach((function(i){"object"!==(0,n.default)(e[i])?r.push({name:i,type:e[i]}):r.push(Object.assign(t.mapStructNameAndType(i),{components:t.mapStructToCoderFormat(e[i])}))})),r},c.prototype.formatParam=function(e,t){var r=this,n=new RegExp(/^bytes([0-9]*)$/),a=new RegExp(/^bytes([0-9]*)\[\]$/),s=new RegExp(/^(u?int)([0-9]*)$/),f=new RegExp(/^(u?int)([0-9]*)\[\]$/);if(o.isBN(t)||o.isBigNumber(t))return t.toString(10);if(e.match(a)||e.match(f))return t.map((function(t){return r.formatParam(e.replace("[]",""),t)}));var u=e.match(s);if(u){var c=parseInt(u[2]||"256");c/80&&(!t||"0x"===t||"0X"===t))throw new Error("Returned values aren't valid, did it run Out of Gas? You might also see this error if you are not using the correct ABI for the contract you are retrieving data from, requesting data from a block number that does not exist, or querying a node which is not fully synced.");var i=f.decode(this.mapTypes(e),"0x"+t.replace(/0x/i,""),r),o=new u;return o.__length__=0,e.forEach((function(e,t){var r=i[o.__length__],a="object"===(0,n.default)(e)&&e.type&&"string"===e.type;r="0x"!==r||a||"string"==typeof e&&"string"===e?r:null,o[t]=r,("function"==typeof e||e&&"object"===(0,n.default)(e))&&e.name&&(o[e.name]=r),o.__length__++})),o},c.prototype.decodeLog=function(e,t,r){var n=this;r=Array.isArray(r)?r:[r],t=t||"";var i=[],o=[],a=0;e.forEach((function(e,t){e.indexed?(o[t]=["bool","int","uint","address","fixed","ufixed"].find((function(t){return-1!==e.type.indexOf(t)}))?n.decodeParameter(e.type,r[a]):r[a],a++):i[t]=e}));var s=t,f=s?this.decodeParametersWith(i,s,!0):[],c=new u;return c.__length__=0,e.forEach((function(e,t){c[t]="string"===e.type?"":null,void 0!==f[t]&&(c[t]=f[t]),void 0!==o[t]&&(c[t]=o[t]),e.name&&(c[e.name]=c[t]),c.__length__++})),c};var d=new c;e.exports=d},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"AbiCoder",{enumerable:!0,get:function(){return i.AbiCoder}}),Object.defineProperty(t,"ConstructorFragment",{enumerable:!0,get:function(){return n.ConstructorFragment}}),Object.defineProperty(t,"ErrorFragment",{enumerable:!0,get:function(){return n.ErrorFragment}}),Object.defineProperty(t,"EventFragment",{enumerable:!0,get:function(){return n.EventFragment}}),Object.defineProperty(t,"FormatTypes",{enumerable:!0,get:function(){return n.FormatTypes}}),Object.defineProperty(t,"Fragment",{enumerable:!0,get:function(){return n.Fragment}}),Object.defineProperty(t,"FunctionFragment",{enumerable:!0,get:function(){return n.FunctionFragment}}),Object.defineProperty(t,"Indexed",{enumerable:!0,get:function(){return o.Indexed}}),Object.defineProperty(t,"Interface",{enumerable:!0,get:function(){return o.Interface}}),Object.defineProperty(t,"LogDescription",{enumerable:!0,get:function(){return o.LogDescription}}),Object.defineProperty(t,"ParamType",{enumerable:!0,get:function(){return n.ParamType}}),Object.defineProperty(t,"TransactionDescription",{enumerable:!0,get:function(){return o.TransactionDescription}}),Object.defineProperty(t,"checkResultErrors",{enumerable:!0,get:function(){return o.checkResultErrors}}),Object.defineProperty(t,"defaultAbiCoder",{enumerable:!0,get:function(){return i.defaultAbiCoder}});var n=r(106),i=r(184),o=r(407)},function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.BigNumber=void 0,t._base16To36=function(e){return new c(e,16).toString(36)},t._base36To16=function(e){return new c(e,36).toString(16)},t.isBigNumberish=function(e){return null!=e&&(p.isBigNumber(e)||"number"==typeof e&&e%1==0||"string"==typeof e&&!!e.match(/^-?[0-9]+$/)||(0,s.isHexString)(e)||"bigint"==typeof e||(0,s.isBytes)(e))};var i=n(r(8)),o=n(r(9)),a=n(r(3)),s=r(15),f=r(16),u=r(183),c=a.default.BN,d=new f.Logger(u.version),l={};var h=!1,p=function(){function e(t,r){(0,i.default)(this,e),t!==l&&d.throwError("cannot call constructor directly; use BigNumber.from",f.Logger.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=r,this._isBigNumber=!0,Object.freeze(this)}return(0,o.default)(e,[{key:"fromTwos",value:function(e){return y(v(this).fromTwos(e))}},{key:"toTwos",value:function(e){return y(v(this).toTwos(e))}},{key:"abs",value:function(){return"-"===this._hex[0]?e.from(this._hex.substring(1)):this}},{key:"add",value:function(e){return y(v(this).add(v(e)))}},{key:"sub",value:function(e){return y(v(this).sub(v(e)))}},{key:"div",value:function(t){return e.from(t).isZero()&&m("division-by-zero","div"),y(v(this).div(v(t)))}},{key:"mul",value:function(e){return y(v(this).mul(v(e)))}},{key:"mod",value:function(e){var t=v(e);return t.isNeg()&&m("division-by-zero","mod"),y(v(this).umod(t))}},{key:"pow",value:function(e){var t=v(e);return t.isNeg()&&m("negative-power","pow"),y(v(this).pow(t))}},{key:"and",value:function(e){var t=v(e);return(this.isNegative()||t.isNeg())&&m("unbound-bitwise-result","and"),y(v(this).and(t))}},{key:"or",value:function(e){var t=v(e);return(this.isNegative()||t.isNeg())&&m("unbound-bitwise-result","or"),y(v(this).or(t))}},{key:"xor",value:function(e){var t=v(e);return(this.isNegative()||t.isNeg())&&m("unbound-bitwise-result","xor"),y(v(this).xor(t))}},{key:"mask",value:function(e){return(this.isNegative()||e<0)&&m("negative-width","mask"),y(v(this).maskn(e))}},{key:"shl",value:function(e){return(this.isNegative()||e<0)&&m("negative-width","shl"),y(v(this).shln(e))}},{key:"shr",value:function(e){return(this.isNegative()||e<0)&&m("negative-width","shr"),y(v(this).shrn(e))}},{key:"eq",value:function(e){return v(this).eq(v(e))}},{key:"lt",value:function(e){return v(this).lt(v(e))}},{key:"lte",value:function(e){return v(this).lte(v(e))}},{key:"gt",value:function(e){return v(this).gt(v(e))}},{key:"gte",value:function(e){return v(this).gte(v(e))}},{key:"isNegative",value:function(){return"-"===this._hex[0]}},{key:"isZero",value:function(){return v(this).isZero()}},{key:"toNumber",value:function(){try{return v(this).toNumber()}catch(e){m("overflow","toNumber",this.toString())}return null}},{key:"toBigInt",value:function(){try{return BigInt(this.toString())}catch(e){}return d.throwError("this platform does not support BigInt",f.Logger.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}},{key:"toString",value:function(){return arguments.length>0&&(10===arguments[0]?h||(h=!0,d.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):16===arguments[0]?d.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",f.Logger.errors.UNEXPECTED_ARGUMENT,{}):d.throwError("BigNumber.toString does not accept parameters",f.Logger.errors.UNEXPECTED_ARGUMENT,{})),v(this).toString(10)}},{key:"toHexString",value:function(){return this._hex}},{key:"toJSON",value:function(e){return{type:"BigNumber",hex:this.toHexString()}}}],[{key:"from",value:function(t){if(t instanceof e)return t;if("string"==typeof t)return t.match(/^-?0x[0-9a-f]+$/i)?new e(l,b(t)):t.match(/^-?[0-9]+$/)?new e(l,b(new c(t))):d.throwArgumentError("invalid BigNumber string","value",t);if("number"==typeof t)return t%1&&m("underflow","BigNumber.from",t),(t>=9007199254740991||t<=-9007199254740991)&&m("overflow","BigNumber.from",t),e.from(String(t));var r=t;if("bigint"==typeof r)return e.from(r.toString());if((0,s.isBytes)(r))return e.from((0,s.hexlify)(r));if(r)if(r.toHexString){var n=r.toHexString();if("string"==typeof n)return e.from(n)}else{var i=r._hex;if(null==i&&"BigNumber"===r.type&&(i=r.hex),"string"==typeof i&&((0,s.isHexString)(i)||"-"===i[0]&&(0,s.isHexString)(i.substring(1))))return e.from(i)}return d.throwArgumentError("invalid BigNumber value","value",t)}},{key:"isBigNumber",value:function(e){return!(!e||!e._isBigNumber)}}]),e}();function b(e){if("string"!=typeof e)return b(e.toString(16));if("-"===e[0])return"-"===(e=e.substring(1))[0]&&d.throwArgumentError("invalid hex","value",e),"0x00"===(e=b(e))?e:"-"+e;if("0x"!==e.substring(0,2)&&(e="0x"+e),"0x"===e)return"0x00";for(e.length%2&&(e="0x0"+e.substring(2));e.length>4&&"0x00"===e.substring(0,4);)e="0x"+e.substring(4);return e}function y(e){return p.from(b(e))}function v(e){var t=p.from(e).toHexString();return"-"===t[0]?new c("-"+t.substring(3),16):new c(t.substring(2),16)}function m(e,t,r){var n={fault:e,operation:t};return null!=r&&(n.value=r),d.throwError(e,f.Logger.errors.NUMERIC_FAULT,n)}t.BigNumber=p},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.version=void 0;t.version="bignumber/5.6.2"},function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.defaultAbiCoder=t.AbiCoder=void 0;var i=n(r(8)),o=n(r(9)),a=r(15),s=r(64),f=r(16),u=r(65),c=r(23),d=r(387),l=r(185),h=r(393),p=r(186),b=r(395),y=r(396),v=r(397),m=r(402),g=r(406),w=r(106),_=new f.Logger(u.version),k=new RegExp(/^bytes([0-9]*)$/),S=new RegExp(/^(u?int)([0-9]*)$/),A=function(){function e(t){(0,i.default)(this,e),(0,s.defineReadOnly)(this,"coerceFunc",t||null)}return(0,o.default)(e,[{key:"_getCoder",value:function(e){var t=this;switch(e.baseType){case"address":return new d.AddressCoder(e.name);case"bool":return new h.BooleanCoder(e.name);case"string":return new m.StringCoder(e.name);case"bytes":return new p.BytesCoder(e.name);case"array":return new l.ArrayCoder(this._getCoder(e.arrayChildren),e.arrayLength,e.name);case"tuple":return new g.TupleCoder((e.components||[]).map((function(e){return t._getCoder(e)})),e.name);case"":return new y.NullCoder(e.name)}var r=e.type.match(S);if(r){var n=parseInt(r[2]||"256");return(0===n||n>256||n%8!=0)&&_.throwArgumentError("invalid "+r[1]+" bit length","param",e),new v.NumberCoder(n/8,"int"===r[1],e.name)}if(r=e.type.match(k)){var i=parseInt(r[1]);return(0===i||i>32)&&_.throwArgumentError("invalid bytes length","param",e),new b.FixedBytesCoder(i,e.name)}return _.throwArgumentError("invalid type","type",e.type)}},{key:"_getWordSize",value:function(){return 32}},{key:"_getReader",value:function(e,t){return new c.Reader(e,this._getWordSize(),this.coerceFunc,t)}},{key:"_getWriter",value:function(){return new c.Writer(this._getWordSize())}},{key:"getDefaultValue",value:function(e){var t=this,r=e.map((function(e){return t._getCoder(w.ParamType.from(e))}));return new g.TupleCoder(r,"_").defaultValue()}},{key:"encode",value:function(e,t){var r=this;e.length!==t.length&&_.throwError("types/values length mismatch",f.Logger.errors.INVALID_ARGUMENT,{count:{types:e.length,values:t.length},value:{types:e,values:t}});var n=e.map((function(e){return r._getCoder(w.ParamType.from(e))})),i=new g.TupleCoder(n,"_"),o=this._getWriter();return i.encode(o,t),o.data}},{key:"decode",value:function(e,t,r){var n=this,i=e.map((function(e){return n._getCoder(w.ParamType.from(e))}));return new g.TupleCoder(i,"_").decode(this._getReader((0,a.arrayify)(t),r))}}]),e}();t.AbiCoder=A;var E=new A;t.defaultAbiCoder=E},function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.ArrayCoder=void 0,t.pack=y,t.unpack=v;var i=n(r(8)),o=n(r(9)),a=n(r(13)),s=n(r(14)),f=n(r(12)),u=n(r(2)),c=r(16),d=r(65),l=r(23),h=r(392);function p(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=(0,f.default)(e);if(t){var i=(0,f.default)(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return(0,s.default)(this,r)}}var b=new c.Logger(d.version);function y(e,t,r){var n=null;if(Array.isArray(r))n=r;else if(r&&"object"===(0,u.default)(r)){var i={};n=t.map((function(e){var t=e.localName;return t||b.throwError("cannot encode object for signature with missing names",c.Logger.errors.INVALID_ARGUMENT,{argument:"values",coder:e,value:r}),i[t]&&b.throwError("cannot encode object for signature with duplicate names",c.Logger.errors.INVALID_ARGUMENT,{argument:"values",coder:e,value:r}),i[t]=!0,r[t]}))}else b.throwArgumentError("invalid tuple value","tuple",r);t.length!==n.length&&b.throwArgumentError("types/value length mismatch","tuple",r);var o=new l.Writer(e.wordSize),a=new l.Writer(e.wordSize),s=[];t.forEach((function(e,t){var r=n[t];if(e.dynamic){var i=a.length;e.encode(a,r);var f=o.writeUpdatableValue();s.push((function(e){f(e+i)}))}else e.encode(o,r)})),s.forEach((function(e){e(o.length)}));var f=e.appendWriter(o);return f+=e.appendWriter(a)}function v(e,t){var r=[],n=e.subReader(0);t.forEach((function(t){var i=null;if(t.dynamic){var o=e.readValue(),a=n.subReader(o.toNumber());try{i=t.decode(a)}catch(e){if(e.code===c.Logger.errors.BUFFER_OVERRUN)throw e;(i=e).baseType=t.name,i.name=t.localName,i.type=t.type}}else try{i=t.decode(e)}catch(e){if(e.code===c.Logger.errors.BUFFER_OVERRUN)throw e;(i=e).baseType=t.name,i.name=t.localName,i.type=t.type}null!=i&&r.push(i)}));var i=t.reduce((function(e,t){var r=t.localName;return r&&(e[r]||(e[r]=0),e[r]++),e}),{});t.forEach((function(e,t){var n=e.localName;if(n&&1===i[n]&&("length"===n&&(n="_length"),null==r[n])){var o=r[t];o instanceof Error?Object.defineProperty(r,n,{enumerable:!0,get:function(){throw o}}):r[n]=o}}));for(var o=function(e){var t=r[e];t instanceof Error&&Object.defineProperty(r,e,{enumerable:!0,get:function(){throw t}})},a=0;a=0?n:"")+"]",f=-1===n||e.dynamic;return(a=t.call(this,"array",s,o,f)).coder=e,a.length=n,a}return(0,o.default)(r,[{key:"defaultValue",value:function(){for(var e=this.coder.defaultValue(),t=[],r=0;re._data.length&&b.throwError("insufficient data length",c.Logger.errors.BUFFER_OVERRUN,{length:e._data.length,count:t});for(var r=[],n=0;n=0;i--){var s=n(a[i]);r=n(new e(r+s,"hex"))}}return"0x"+r},t.normalize=o}).call(this,r(1).Buffer)},function(e,t,r){"use strict";(function(t){var n=r(66);function i(e){return parseInt(e.toString("hex"),16)}function o(e){var r=e.toString(16);return r.length%2==1&&(r="0"+r),t.from(r,"hex")}e.exports={numberToBuffer:o,bufferToNumber:i,varintBufferEncode:function(e){return t.from(n.encode(i(e)))},varintBufferDecode:function(e){return o(n.decode(e))},varintEncode:function(e){return t.from(n.encode(e))}}}).call(this,r(1).Buffer)},function(e,t,r){"use strict";var n=r(0),i=n(r(8)),o=n(r(9)),a=r(1).Buffer,s=r(109),f=r(436),u=r(442),c=r(67),d=r(447),l=r(448)(function(e){function t(e,r,n,o){if((0,i.default)(this,t),l.isCID(e)){var c=e;return this.version=c.version,this.codec=c.codec,this.multihash=a.from(c.multihash),void(this.multibaseName=c.multibaseName||(0===c.version?"base58btc":"base32"))}if("string"==typeof e){var d=f.isEncoded(e);if(d){var h=f.decode(e);this.version=parseInt(h.slice(0,1).toString("hex"),16),this.codec=u.getCodec(h.slice(1)),this.multihash=u.rmPrefix(h.slice(1)),this.multibaseName=d}else this.version=0,this.codec="dag-pb",this.multihash=s.fromB58String(e),this.multibaseName="base58btc";return t.validateCID(this),void Object.defineProperty(this,"string",{value:e})}if(a.isBuffer(e)){var p=e.slice(0,1),b=parseInt(p.toString("hex"),16);if(1===b){var y=e;this.version=b,this.codec=u.getCodec(y.slice(1)),this.multihash=u.rmPrefix(y.slice(1)),this.multibaseName="base32"}else this.version=0,this.codec="dag-pb",this.multihash=e,this.multibaseName="base58btc";t.validateCID(this)}else this.version=e,this.codec=r,this.multihash=n,this.multibaseName=o||(0===e?"base58btc":"base32"),t.validateCID(this)}return(0,o.default)(t,[{key:"buffer",get:function(){var e=this._buffer;if(!e){if(0===this.version)e=this.multihash;else{if(1!==this.version)throw new Error("unsupported version");e=a.concat([a.from("01","hex"),u.getCodeVarint(this.codec),this.multihash])}Object.defineProperty(this,"_buffer",{value:e})}return e}},{key:"prefix",get:function(){return a.concat([a.from("0".concat(this.version),"hex"),u.getCodeVarint(this.codec),s.prefix(this.multihash)])}},{key:"toV0",value:function(){if("dag-pb"!==this.codec)throw new Error("Cannot convert a non dag-pb CID to CIDv0");var e=s.decode(this.multihash),t=e.name,r=e.length;if("sha2-256"!==t)throw new Error("Cannot convert non sha2-256 multihash CID to CIDv0");if(32!==r)throw new Error("Cannot convert non 32 byte multihash CID to CIDv0");return new l(0,this.codec,this.multihash)}},{key:"toV1",value:function(){return new l(1,this.codec,this.multihash)}},{key:"toBaseEncodedString",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.multibaseName;if(this.string&&e===this.multibaseName)return this.string;var t=null;if(0===this.version){if("base58btc"!==e)throw new Error("not supported with CIDv0, to support different bases, please migrate the instance do CIDv1, you can do that through cid.toV1()");t=s.toB58String(this.multihash)}else{if(1!==this.version)throw new Error("unsupported version");t=f.encode(e,this.buffer).toString()}return e===this.multibaseName&&Object.defineProperty(this,"string",{value:t}),t}},{key:e,value:function(){return"CID("+this.toString()+")"}},{key:"toString",value:function(e){return this.toBaseEncodedString(e)}},{key:"toJSON",value:function(){return{codec:this.codec,version:this.version,hash:this.multihash}}},{key:"equals",value:function(e){return this.codec===e.codec&&this.version===e.version&&this.multihash.equals(e.multihash)}}],[{key:"validateCID",value:function(e){var t=d.checkCIDComponents(e);if(t)throw new Error(t)}}]),t}(Symbol.for("nodejs.util.inspect.custom")),{className:"CID",symbolName:"@ipld/js-cid/CID"});l.codecs=c,e.exports=l},function(e,t,r){"use strict";var n=r(5).Buffer;e.exports=function(e){if(e.length>=255)throw new TypeError("Alphabet too long");for(var t=new Uint8Array(256),r=0;r>>0,c=new Uint8Array(a);e[r];){var d=t[e.charCodeAt(r)];if(255===d)return;for(var l=0,h=a-1;(0!==d||l>>0,c[h]=d%256>>>0,d=d/256>>>0;if(0!==d)throw new Error("Non-zero carry");o=l,r++}if(" "!==e[r]){for(var p=a-o;p!==a&&0===c[p];)p++;var b=n.allocUnsafe(i+(a-p));b.fill(0,0,i);for(var y=i;p!==a;)b[y++]=c[p++];return b}}}return{encode:function(t){if((Array.isArray(t)||t instanceof Uint8Array)&&(t=n.from(t)),!n.isBuffer(t))throw new TypeError("Expected Buffer");if(0===t.length)return"";for(var r=0,i=0,o=0,a=t.length;o!==a&&0===t[o];)o++,r++;for(var u=(a-o)*c+1>>>0,d=new Uint8Array(u);o!==a;){for(var l=t[o],h=0,p=u-1;(0!==l||h>>0,d[p]=l%s>>>0,l=l/s>>>0;if(0!==l)throw new Error("Non-zero carry");i=h,o++}for(var b=u-i;b!==u&&0===d[b];)b++;for(var y=f.repeat(r);b>6|192);else{if(i>55295&&i<56320){if(++n==e.length)return null;var o=e.charCodeAt(n);if(o<56320||o>57343)return null;r+=t((i=65536+((1023&i)<<10)+(1023&o))>>18|240),r+=t(i>>12&63|128)}else r+=t(i>>12|224);r+=t(i>>6&63|128)}r+=t(63&i|128)}}return r},toString:function(e){for(var t="",r=0,o=i(e);r127){if(a>191&&a<224){if(r>=o)return null;a=(31&a)<<6|63&n(e,r)}else if(a>223&&a<240){if(r+1>=o)return null;a=(15&a)<<12|(63&n(e,r))<<6|63&n(e,++r)}else{if(!(a>239&&a<248))return null;if(r+2>=o)return null;a=(7&a)<<18|(63&n(e,r))<<12|(63&n(e,++r))<<6|63&n(e,++r)}++r}if(a<=65535)t+=String.fromCharCode(a);else{if(!(a<=1114111))return null;a-=65536,t+=String.fromCharCode(a>>10|55296),t+=String.fromCharCode(1023&a|56320)}}return t},fromNumber:function(e){var t=e.toString(16);return t.length%2==0?"0x"+t:"0x0"+t},toNumber:function(e){return parseInt(e.slice(2),16)},fromNat:function(e){return"0x0"===e?"0x":e.length%2==0?e:"0x0"+e.slice(2)},toNat:function(e){return"0"===e[2]?"0x"+e.slice(3):e},fromArray:a,toArray:o,fromUint8Array:function(e){return a([].slice.call(e,0))},toUint8Array:function(e){return new Uint8Array(o(e))}}},function(e,t,r){"use strict";var n=r(4),i=r(459),o=r(31),a=r(5).Buffer,s=r(199),f=r(98),u=r(99),c=a.alloc(128);function d(e,t){o.call(this,"digest"),"string"==typeof t&&(t=a.from(t));var r="sha512"===e||"sha384"===e?128:64;(this._alg=e,this._key=t,t.length>r)?t=("rmd160"===e?new f:u(e)).update(t).digest():t.lengthn||t!=t)throw new TypeError("Bad key length")}},function(e,t,r){"use strict";(function(t,r){var n;if(t.process&&t.process.browser)n="utf-8";else if(t.process&&t.process.version){n=parseInt(r.version.split(".")[0].slice(1),10)>=6?"utf-8":"binary"}else n="utf-8";e.exports=n}).call(this,r(7),r(6))},function(e,t,r){"use strict";var n=r(199),i=r(98),o=r(99),a=r(5).Buffer,s=r(202),f=r(203),u=r(205),c=a.alloc(128),d={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function l(e,t,r){var s=function(e){function t(t){return o(e).update(t).digest()}return"rmd160"===e||"ripemd160"===e?function(e){return(new i).update(e).digest()}:"md5"===e?n:t}(e),f="sha512"===e||"sha384"===e?128:64;t.length>f?t=s(t):t.length>>0},t.writeUInt32BE=function(e,t,r){e[0+r]=t>>>24,e[1+r]=t>>>16&255,e[2+r]=t>>>8&255,e[3+r]=255&t},t.ip=function(e,t,r,n){for(var i=0,o=0,a=6;a>=0;a-=2){for(var s=0;s<=24;s+=8)i<<=1,i|=t>>>s+a&1;for(s=0;s<=24;s+=8)i<<=1,i|=e>>>s+a&1}for(a=6;a>=0;a-=2){for(s=1;s<=25;s+=8)o<<=1,o|=t>>>s+a&1;for(s=1;s<=25;s+=8)o<<=1,o|=e>>>s+a&1}r[n+0]=i>>>0,r[n+1]=o>>>0},t.rip=function(e,t,r,n){for(var i=0,o=0,a=0;a<4;a++)for(var s=24;s>=0;s-=8)i<<=1,i|=t>>>s+a&1,i<<=1,i|=e>>>s+a&1;for(a=4;a<8;a++)for(s=24;s>=0;s-=8)o<<=1,o|=t>>>s+a&1,o<<=1,o|=e>>>s+a&1;r[n+0]=i>>>0,r[n+1]=o>>>0},t.pc1=function(e,t,r,n){for(var i=0,o=0,a=7;a>=5;a--){for(var s=0;s<=24;s+=8)i<<=1,i|=t>>s+a&1;for(s=0;s<=24;s+=8)i<<=1,i|=e>>s+a&1}for(s=0;s<=24;s+=8)i<<=1,i|=t>>s+a&1;for(a=1;a<=3;a++){for(s=0;s<=24;s+=8)o<<=1,o|=t>>s+a&1;for(s=0;s<=24;s+=8)o<<=1,o|=e>>s+a&1}for(s=0;s<=24;s+=8)o<<=1,o|=e>>s+a&1;r[n+0]=i>>>0,r[n+1]=o>>>0},t.r28shl=function(e,t){return e<>>28-t};var n=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];t.pc2=function(e,t,r,i){for(var o=0,a=0,s=n.length>>>1,f=0;f>>n[f]&1;for(f=s;f>>n[f]&1;r[i+0]=o>>>0,r[i+1]=a>>>0},t.expand=function(e,t,r){var n=0,i=0;n=(1&e)<<5|e>>>27;for(var o=23;o>=15;o-=4)n<<=6,n|=e>>>o&63;for(o=11;o>=3;o-=4)i|=e>>>o&63,i<<=6;i|=(31&e)<<1|e>>>31,t[r+0]=n>>>0,t[r+1]=i>>>0};var i=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];t.substitute=function(e,t){for(var r=0,n=0;n<4;n++){r<<=4,r|=i[64*n+(e>>>18-6*n&63)]}for(n=0;n<4;n++){r<<=4,r|=i[256+64*n+(t>>>18-6*n&63)]}return r>>>0};var o=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];t.permute=function(e){for(var t=0,r=0;r>>o[r]&1;return t>>>0},t.padSplit=function(e,t,r){for(var n=e.toString(2);n.length>>1];r=o.r28shl(r,s),i=o.r28shl(i,s),o.pc2(r,i,e.keys,a)}},f.prototype._update=function(e,t,r,n){var i=this._desState,a=o.readUInt32BE(e,t),s=o.readUInt32BE(e,t+4);o.ip(a,s,i.tmp,0),a=i.tmp[0],s=i.tmp[1],"encrypt"===this.type?this._encrypt(i,a,s,i.tmp,0):this._decrypt(i,a,s,i.tmp,0),a=i.tmp[0],s=i.tmp[1],o.writeUInt32BE(r,a,n),o.writeUInt32BE(r,s,n+4)},f.prototype._pad=function(e,t){for(var r=e.length-t,n=t;n>>0,a=l}o.rip(s,a,n,i)},f.prototype._decrypt=function(e,t,r,n,i){for(var a=r,s=t,f=e.keys.length-2;f>=0;f-=2){var u=e.keys[f],c=e.keys[f+1];o.expand(a,e.tmp,0),u^=e.tmp[0],c^=e.tmp[1];var d=o.substitute(u,c),l=a;a=(s^o.permute(d))>>>0,s=l}o.rip(a,s,n,i)}},function(e,t,r){"use strict";var n=r(68),i=r(5).Buffer,o=r(209);function a(e){var t=e._cipher.encryptBlockRaw(e._prev);return o(e._prev),t}t.encrypt=function(e,t){var r=Math.ceil(t.length/16),o=e._cache.length;e._cache=i.concat([e._cache,i.allocUnsafe(16*r)]);for(var s=0;se;)r.ishrn(1);if(r.isEven()&&r.iadd(s),r.testn(1)||r.iadd(f),t.cmp(f)){if(!t.cmp(u))for(;r.mod(c).cmp(d);)r.iadd(h)}else for(;r.mod(o).cmp(l);)r.iadd(h);if(y(p=r.shrn(1))&&y(r)&&v(p)&&v(r)&&a.test(p)&&a.test(r))return r}}},function(e,t,r){"use strict";var n=r(3),i=r(92);function o(e){this.rand=e||new i.Rand}e.exports=o,o.create=function(e){return new o(e)},o.prototype._randbelow=function(e){var t=e.bitLength(),r=Math.ceil(t/8);do{var i=new n(this.rand.generate(r))}while(i.cmp(e)>=0);return i},o.prototype._randrange=function(e,t){var r=t.sub(e);return e.add(this._randbelow(r))},o.prototype.test=function(e,t,r){var i=e.bitLength(),o=n.mont(e),a=new n(1).toRed(o);t||(t=Math.max(1,i/48|0));for(var s=e.subn(1),f=0;!s.testn(f);f++);for(var u=e.shrn(f),c=s.toRed(o);t>0;t--){var d=this._randrange(new n(2),s);r&&r(d);var l=d.toRed(o).redPow(u);if(0!==l.cmp(a)&&0!==l.cmp(c)){for(var h=1;h0;t--){var c=this._randrange(new n(2),a),d=e.gcd(c);if(0!==d.cmpn(1))return d;var l=c.toRed(i).redPow(f);if(0!==l.cmp(o)&&0!==l.cmp(u)){for(var h=1;h0)if("string"==typeof t||a.objectMode||Object.getPrototypeOf(t)===s.prototype||(t=function(e){return s.from(e)}(t)),n)a.endEmitted?k(e,new _):P(e,a,t,!0);else if(a.ended)k(e,new g);else{if(a.destroyed)return!1;a.reading=!1,a.decoder&&!r?(t=a.decoder.write(t),a.objectMode||0!==t.length?P(e,a,t,!1):M(e,a)):P(e,a,t,!1)}else n||(a.reading=!1,M(e,a));return!a.ended&&(a.lengtht.highWaterMark&&(t.highWaterMark=function(e){return e>=1073741824?e=1073741824:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function R(e){var t=e._readableState;u("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(u("emitReadable",t.flowing),t.emittedReadable=!0,n.nextTick(T,e))}function T(e){var t=e._readableState;u("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,U(e)}function M(e,t){t.readingMore||(t.readingMore=!0,n.nextTick(I,e,t))}function I(e,t){for(;!t.reading&&!t.ended&&(t.length0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function C(e){u("readable nexttick read 0"),e.read(0)}function j(e,t){u("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),U(e),t.flowing&&!t.reading&&e.read(0)}function U(e){var t=e._readableState;for(u("flow",t.flowing);t.flowing&&null!==e.read(););}function N(e,t){return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r);var r}function L(e){var t=e._readableState;u("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,n.nextTick(F,t,e))}function F(e,t){if(u("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}function D(e,t){for(var r=0,n=e.length;r=t.highWaterMark:t.length>0)||t.ended))return u("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?L(this):R(this),null;if(0===(e=O(e,t))&&t.ended)return 0===t.length&&L(this),null;var n,i=t.needReadable;return u("need readable",i),(0===t.length||t.length-e0?N(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&L(this)),null!==n&&this.emit("data",n),n},E.prototype._read=function(e){k(this,new w("_read()"))},E.prototype.pipe=function(e,t){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=e;break;case 1:i.pipes=[i.pipes,e];break;default:i.pipes.push(e)}i.pipesCount+=1,u("pipe count=%d opts=%j",i.pipesCount,t);var a=(!t||!1!==t.end)&&e!==n.stdout&&e!==n.stderr?f:y;function s(t,n){u("onunpipe"),t===r&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,u("cleanup"),e.removeListener("close",p),e.removeListener("finish",b),e.removeListener("drain",c),e.removeListener("error",h),e.removeListener("unpipe",s),r.removeListener("end",f),r.removeListener("end",y),r.removeListener("data",l),d=!0,!i.awaitDrain||e._writableState&&!e._writableState.needDrain||c())}function f(){u("onend"),e.end()}i.endEmitted?n.nextTick(a):r.once("end",a),e.on("unpipe",s);var c=function(e){return function(){var t=e._readableState;u("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&o(e,"data")&&(t.flowing=!0,U(e))}}(r);e.on("drain",c);var d=!1;function l(t){u("ondata");var n=e.write(t);u("dest.write",n),!1===n&&((1===i.pipesCount&&i.pipes===e||i.pipesCount>1&&-1!==D(i.pipes,e))&&!d&&(u("false write response, pause",i.awaitDrain),i.awaitDrain++),r.pause())}function h(t){u("onerror",t),y(),e.removeListener("error",h),0===o(e,"error")&&k(e,t)}function p(){e.removeListener("finish",b),y()}function b(){u("onfinish"),e.removeListener("close",p),y()}function y(){u("unpipe"),r.unpipe(e)}return r.on("data",l),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",h),e.once("close",p),e.once("finish",b),e.emit("pipe",r),i.flowing||(u("pipe resume"),r.resume()),e},E.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o0,!1!==i.flowing&&this.resume()):"readable"===e&&(i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,u("on readable",i.length,i.reading),i.length?R(this):i.reading||n.nextTick(C,this))),r},E.prototype.addListener=E.prototype.on,E.prototype.removeListener=function(e,t){var r=a.prototype.removeListener.call(this,e,t);return"readable"===e&&n.nextTick(B,this),r},E.prototype.removeAllListeners=function(e){var t=a.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||n.nextTick(B,this),t},E.prototype.resume=function(){var e=this._readableState;return e.flowing||(u("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,n.nextTick(j,e,t))}(this,e)),e.paused=!1,this},E.prototype.pause=function(){return u("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(u("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},E.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;for(var i in e.on("end",(function(){if(u("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(i){(u("wrapped data"),r.decoder&&(i=r.decoder.write(i)),r.objectMode&&null==i)||(r.objectMode||i&&i.length)&&(t.push(i)||(n=!0,e.pause()))})),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var o=0;o-1))throw new _(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(E.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(E.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),E.prototype._write=function(e,t,r){r(new b("_write()"))},E.prototype._writev=null,E.prototype.end=function(e,t,r){var i=this._writableState;return"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),i.corked&&(i.corked=1,this.uncork()),i.ending||function(e,t,r){t.ending=!0,M(e,t),r&&(t.finished?n.nextTick(r):e.once("finish",r));t.ended=!0,e.writable=!1}(this,i,r),this},Object.defineProperty(E.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(E.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),E.prototype.destroy=d.destroy,E.prototype._undestroy=d.undestroy,E.prototype._destroy=function(e,t){t(e)}}).call(this,r(7),r(6))},function(e,t,r){"use strict";e.exports=c;var n=r(51).codes,i=n.ERR_METHOD_NOT_IMPLEMENTED,o=n.ERR_MULTIPLE_CALLBACK,a=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,s=n.ERR_TRANSFORM_WITH_LENGTH_0,f=r(52);function u(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(null===n)return this.emit("error",new o);r.writechunk=null,r.writecb=null,null!=t&&this.push(t),n(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length=31)return n.error("Multi-octet tag encoding unsupported");t||(i|=32);return i|=a.tagClassByName[r||"universal"]<<6}(e,t,r,this.reporter);if(n.length<128){var s=i.alloc(2);return s[0]=o,s[1]=n.length,this._createEncoderBuffer([s,n])}for(var f=1,u=n.length;u>=256;u>>=8)f++;var c=i.alloc(2+f);c[0]=o,c[1]=128|f;for(var d=1+f,l=n.length;l>0;d--,l>>=8)c[d]=255&l;return this._createEncoderBuffer([c,n])},f.prototype._encodeStr=function(e,t){if("bitstr"===t)return this._createEncoderBuffer([0|e.unused,e.data]);if("bmpstr"===t){for(var r=i.alloc(2*e.length),n=0;n=40)return this.reporter.error("Second objid identifier OOB");e.splice(0,2,40*e[0]+e[1])}for(var a=0,s=0;s=128;f>>=7)a++}for(var u=i.alloc(a),c=u.length-1,d=e.length-1;d>=0;d--){var l=e[d];for(u[c--]=127&l;(l>>=7)>0;)u[c--]=128|127&l}return this._createEncoderBuffer(u)},f.prototype._encodeTime=function(e,t){var r,n=new Date(e);return"gentime"===t?r=[u(n.getUTCFullYear()),u(n.getUTCMonth()+1),u(n.getUTCDate()),u(n.getUTCHours()),u(n.getUTCMinutes()),u(n.getUTCSeconds()),"Z"].join(""):"utctime"===t?r=[u(n.getUTCFullYear()%100),u(n.getUTCMonth()+1),u(n.getUTCDate()),u(n.getUTCHours()),u(n.getUTCMinutes()),u(n.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+t+" time is not supported yet"),this._encodeStr(r,"octstr")},f.prototype._encodeNull=function(){return this._createEncoderBuffer("")},f.prototype._encodeInt=function(e,t){if("string"==typeof e){if(!t)return this.reporter.error("String int or enum given, but no values map");if(!t.hasOwnProperty(e))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(e));e=t[e]}if("number"!=typeof e&&!i.isBuffer(e)){var r=e.toArray();!e.sign&&128&r[0]&&r.unshift(0),e=i.from(r)}if(i.isBuffer(e)){var n=e.length;0===e.length&&n++;var o=i.alloc(n);return e.copy(o),0===e.length&&(o[0]=0),this._createEncoderBuffer(o)}if(e<128)return this._createEncoderBuffer(e);if(e<256)return this._createEncoderBuffer([0,e]);for(var a=1,s=e;s>=256;s>>=8)a++;for(var f=new Array(a),u=f.length-1;u>=0;u--)f[u]=255&e,e>>=8;return 128&f[0]&&f.unshift(0),this._createEncoderBuffer(i.from(f))},f.prototype._encodeBool=function(e){return this._createEncoderBuffer(e?255:0)},f.prototype._use=function(e,t){return"function"==typeof e&&(e=e(t)),e._getEncoder("der").tree},f.prototype._skipDefault=function(e,t,r){var n,i=this._baseState;if(null===i.default)return!1;var o=e.join();if(void 0===i.defaultBuffer&&(i.defaultBuffer=this._encodeValue(i.default,t,r).join()),o.length!==i.defaultBuffer.length)return!1;for(n=0;n>6],i=0==(32&r);if(31==(31&r)){var o=r;for(r=0;128==(128&o);){if(o=e.readUInt8(t),e.isError(o))return o;r<<=7,r|=127&o}}else r&=31;return{cls:n,primitive:i,tag:r,tagStr:s.tag[r]}}function d(e,t,r){var n=e.readUInt8(r);if(e.isError(n))return n;if(!t&&128===n)return null;if(0==(128&n))return n;var i=127&n;if(i>4)return e.error("length octect is too long");n=0;for(var o=0;o>>((3&t)<<3)&255;return o}}},function(e,t,r){"use strict";for(var n=[],i=0;i<256;++i)n[i]=(i+256).toString(16).substr(1);e.exports=function(e,t){var r=t||0,i=n;return[i[e[r++]],i[e[r++]],i[e[r++]],i[e[r++]],"-",i[e[r++]],i[e[r++]],"-",i[e[r++]],i[e[r++]],"-",i[e[r++]],i[e[r++]],"-",i[e[r++]],i[e[r++]],i[e[r++]],i[e[r++]],i[e[r++]],i[e[r++]]].join("")}},function(e,t,r){"use strict";var n=Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]},i=function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)},o=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.FeeMarketEIP1559Transaction=t.TransactionFactory=t.AccessListEIP2930Transaction=t.Transaction=void 0;var a=r(512);Object.defineProperty(t,"Transaction",{enumerable:!0,get:function(){return o(a).default}});var s=r(548);Object.defineProperty(t,"AccessListEIP2930Transaction",{enumerable:!0,get:function(){return o(s).default}});var f=r(549);Object.defineProperty(t,"TransactionFactory",{enumerable:!0,get:function(){return o(f).default}});var u=r(550);Object.defineProperty(t,"FeeMarketEIP1559Transaction",{enumerable:!0,get:function(){return o(u).default}}),i(r(53),t)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AccessLists=void 0;var n=r(28),i=r(53),o=function(){function e(){}return e.getAccessListData=function(e){var t,r;if(e&&(0,i.isAccessList)(e)){t=e;for(var o=[],a=0;a0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a},s=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.isZeroAddress=t.zeroAddress=t.importPublic=t.privateToAddress=t.privateToPublic=t.publicToAddress=t.pubToAddress=t.isValidPublic=t.isValidPrivate=t.generateAddress2=t.generateAddress=t.isValidChecksumAddress=t.toChecksumAddress=t.isValidAddress=t.Account=void 0;var f=s(r(41)),u=s(r(3)),c=o(r(87)),d=r(236),l=r(54),h=r(234),p=r(40),b=r(123),y=r(89),v=r(126),m=function(){function e(e,t,r,n){void 0===e&&(e=new u.default(0)),void 0===t&&(t=new u.default(0)),void 0===r&&(r=h.KECCAK256_RLP),void 0===n&&(n=h.KECCAK256_NULL),this.nonce=e,this.balance=t,this.stateRoot=r,this.codeHash=n,this._validate()}return e.fromAccountData=function(t){var r=t.nonce,n=t.balance,i=t.stateRoot,o=t.codeHash;return new e(r?new u.default((0,p.toBuffer)(r)):void 0,n?new u.default((0,p.toBuffer)(n)):void 0,i?(0,p.toBuffer)(i):void 0,o?(0,p.toBuffer)(o):void 0)},e.fromRlpSerializedAccount=function(e){var t=c.decode(e);if(!Array.isArray(t))throw new Error("Invalid serialized account input. Must be array");return this.fromValuesArray(t)},e.fromValuesArray=function(t){var r=a(t,4),n=r[0],i=r[1],o=r[2],s=r[3];return new e(new u.default(n),new u.default(i),o,s)},e.prototype._validate=function(){if(this.nonce.lt(new u.default(0)))throw new Error("nonce must be greater than zero");if(this.balance.lt(new u.default(0)))throw new Error("balance must be greater than zero");if(32!==this.stateRoot.length)throw new Error("stateRoot must have a length of 32");if(32!==this.codeHash.length)throw new Error("codeHash must have a length of 32")},e.prototype.raw=function(){return[(0,v.bnToUnpaddedBuffer)(this.nonce),(0,v.bnToUnpaddedBuffer)(this.balance),this.stateRoot,this.codeHash]},e.prototype.serialize=function(){return c.encode(this.raw())},e.prototype.isContract=function(){return!this.codeHash.equals(h.KECCAK256_NULL)},e.prototype.isEmpty=function(){return this.balance.isZero()&&this.nonce.isZero()&&this.codeHash.equals(h.KECCAK256_NULL)},e}();t.Account=m;t.isValidAddress=function(e){try{(0,y.assertIsString)(e)}catch(e){return!1}return/^0x[0-9a-fA-F]{40}$/.test(e)};t.toChecksumAddress=function(e,t){(0,y.assertIsHexString)(e);var r=(0,l.stripHexPrefix)(e).toLowerCase(),n="";t&&(n=(0,v.toType)(t,v.TypeOutput.BN).toString()+"0x");for(var i=(0,b.keccakFromString)(n+r).toString("hex"),o="0x",a=0;a=8?o+=r[a].toUpperCase():o+=r[a];return o};t.isValidChecksumAddress=function(e,r){return(0,t.isValidAddress)(e)&&(0,t.toChecksumAddress)(e,r)===e};t.generateAddress=function(t,r){(0,y.assertIsBuffer)(t),(0,y.assertIsBuffer)(r);var n=new u.default(r);return n.isZero()?(0,b.rlphash)([t,null]).slice(-20):(0,b.rlphash)([t,e.from(n.toArray())]).slice(-20)};t.generateAddress2=function(t,r,n){return(0,y.assertIsBuffer)(t),(0,y.assertIsBuffer)(r),(0,y.assertIsBuffer)(n),(0,f.default)(20===t.length),(0,f.default)(32===r.length),(0,b.keccak256)(e.concat([e.from("ff","hex"),t,r,(0,b.keccak256)(n)])).slice(-20)};t.isValidPrivate=function(e){return(0,d.privateKeyVerify)(e)};t.isValidPublic=function(t,r){return void 0===r&&(r=!1),(0,y.assertIsBuffer)(t),64===t.length?(0,d.publicKeyVerify)(e.concat([e.from([4]),t])):!!r&&(0,d.publicKeyVerify)(t)};t.pubToAddress=function(t,r){return void 0===r&&(r=!1),(0,y.assertIsBuffer)(t),r&&64!==t.length&&(t=e.from((0,d.publicKeyConvert)(t,!1).slice(1))),(0,f.default)(64===t.length),(0,b.keccak)(t).slice(-20)},t.publicToAddress=t.pubToAddress;t.privateToPublic=function(t){return(0,y.assertIsBuffer)(t),e.from((0,d.publicKeyCreate)(t,!1)).slice(1)};t.privateToAddress=function(e){return(0,t.publicToAddress)((0,t.privateToPublic)(e))};t.importPublic=function(t){return(0,y.assertIsBuffer)(t),64!==t.length&&(t=e.from((0,d.publicKeyConvert)(t,!1).slice(1))),t};t.zeroAddress=function(){var e=(0,p.zeros)(20);return(0,p.bufferToHex)(e)};t.isZeroAddress=function(e){try{(0,y.assertIsString)(e)}catch(e){return!1}return(0,t.zeroAddress)()===e}}).call(this,r(1).Buffer)},function(e,t,r){"use strict";var n=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{f(n.next(e))}catch(e){o(e)}}function s(e){try{f(n.throw(e))}catch(e){o(e)}}function f(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}f((n=n.apply(e,t||[])).next())}))},i=function(e,t){var r,n,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,n=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]>8,a=255&i;o?r.push(o,a):r.push(a)}return r},n.zero2=i,n.toHex=o,n.encode=function(e,t){return"hex"===t?o(e):e}},function(e,t,r){"use strict";var n,i=r(0)(r(2));function o(e){this.rand=e}if(e.exports=function(e){return n||(n=new o(null)),n.generate(e)},e.exports.Rand=o,o.prototype.generate=function(e){return this._rand(e)},o.prototype._rand=function(e){if(this.rand.getBytes)return this.rand.getBytes(e);for(var t=new Uint8Array(e),r=0;r>>3},t.g1_256=function(e){return n(e,17)^n(e,19)^e>>>10}},function(e,t,r){"use strict";var n=r(26),i=r(70),o=r(241),a=r(39),s=n.sum32,f=n.sum32_4,u=n.sum32_5,c=o.ch32,d=o.maj32,l=o.s0_256,h=o.s1_256,p=o.g0_256,b=o.g1_256,y=i.BlockHash,v=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function m(){if(!(this instanceof m))return new m;y.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=v,this.W=new Array(64)}n.inherits(m,y),e.exports=m,m.blockSize=512,m.outSize=256,m.hmacStrength=192,m.padLength=64,m.prototype._update=function(e,t){for(var r=this.W,n=0;n<16;n++)r[n]=e[t+n];for(;n0)if("string"==typeof t||a.objectMode||Object.getPrototypeOf(t)===s.prototype||(t=function(e){return s.from(e)}(t)),n)a.endEmitted?k(e,new _):P(e,a,t,!0);else if(a.ended)k(e,new g);else{if(a.destroyed)return!1;a.reading=!1,a.decoder&&!r?(t=a.decoder.write(t),a.objectMode||0!==t.length?P(e,a,t,!1):M(e,a)):P(e,a,t,!1)}else n||(a.reading=!1,M(e,a));return!a.ended&&(a.lengtht.highWaterMark&&(t.highWaterMark=function(e){return e>=1073741824?e=1073741824:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function R(e){var t=e._readableState;u("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(u("emitReadable",t.flowing),t.emittedReadable=!0,n.nextTick(T,e))}function T(e){var t=e._readableState;u("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,U(e)}function M(e,t){t.readingMore||(t.readingMore=!0,n.nextTick(I,e,t))}function I(e,t){for(;!t.reading&&!t.ended&&(t.length0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function C(e){u("readable nexttick read 0"),e.read(0)}function j(e,t){u("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),U(e),t.flowing&&!t.reading&&e.read(0)}function U(e){var t=e._readableState;for(u("flow",t.flowing);t.flowing&&null!==e.read(););}function N(e,t){return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r);var r}function L(e){var t=e._readableState;u("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,n.nextTick(F,t,e))}function F(e,t){if(u("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}function D(e,t){for(var r=0,n=e.length;r=t.highWaterMark:t.length>0)||t.ended))return u("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?L(this):R(this),null;if(0===(e=O(e,t))&&t.ended)return 0===t.length&&L(this),null;var n,i=t.needReadable;return u("need readable",i),(0===t.length||t.length-e0?N(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&L(this)),null!==n&&this.emit("data",n),n},E.prototype._read=function(e){k(this,new w("_read()"))},E.prototype.pipe=function(e,t){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=e;break;case 1:i.pipes=[i.pipes,e];break;default:i.pipes.push(e)}i.pipesCount+=1,u("pipe count=%d opts=%j",i.pipesCount,t);var a=(!t||!1!==t.end)&&e!==n.stdout&&e!==n.stderr?f:y;function s(t,n){u("onunpipe"),t===r&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,u("cleanup"),e.removeListener("close",p),e.removeListener("finish",b),e.removeListener("drain",c),e.removeListener("error",h),e.removeListener("unpipe",s),r.removeListener("end",f),r.removeListener("end",y),r.removeListener("data",l),d=!0,!i.awaitDrain||e._writableState&&!e._writableState.needDrain||c())}function f(){u("onend"),e.end()}i.endEmitted?n.nextTick(a):r.once("end",a),e.on("unpipe",s);var c=function(e){return function(){var t=e._readableState;u("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&o(e,"data")&&(t.flowing=!0,U(e))}}(r);e.on("drain",c);var d=!1;function l(t){u("ondata");var n=e.write(t);u("dest.write",n),!1===n&&((1===i.pipesCount&&i.pipes===e||i.pipesCount>1&&-1!==D(i.pipes,e))&&!d&&(u("false write response, pause",i.awaitDrain),i.awaitDrain++),r.pause())}function h(t){u("onerror",t),y(),e.removeListener("error",h),0===o(e,"error")&&k(e,t)}function p(){e.removeListener("finish",b),y()}function b(){u("onfinish"),e.removeListener("close",p),y()}function y(){u("unpipe"),r.unpipe(e)}return r.on("data",l),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",h),e.once("close",p),e.once("finish",b),e.emit("pipe",r),i.flowing||(u("pipe resume"),r.resume()),e},E.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o0,!1!==i.flowing&&this.resume()):"readable"===e&&(i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,u("on readable",i.length,i.reading),i.length?R(this):i.reading||n.nextTick(C,this))),r},E.prototype.addListener=E.prototype.on,E.prototype.removeListener=function(e,t){var r=a.prototype.removeListener.call(this,e,t);return"readable"===e&&n.nextTick(B,this),r},E.prototype.removeAllListeners=function(e){var t=a.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||n.nextTick(B,this),t},E.prototype.resume=function(){var e=this._readableState;return e.flowing||(u("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,n.nextTick(j,e,t))}(this,e)),e.paused=!1,this},E.prototype.pause=function(){return u("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(u("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},E.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;for(var i in e.on("end",(function(){if(u("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(i){(u("wrapped data"),r.decoder&&(i=r.decoder.write(i)),r.objectMode&&null==i)||(r.objectMode||i&&i.length)&&(t.push(i)||(n=!0,e.pause()))})),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var o=0;o-1))throw new _(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(E.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(E.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),E.prototype._write=function(e,t,r){r(new b("_write()"))},E.prototype._writev=null,E.prototype.end=function(e,t,r){var i=this._writableState;return"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),i.corked&&(i.corked=1,this.uncork()),i.ending||function(e,t,r){t.ending=!0,M(e,t),r&&(t.finished?n.nextTick(r):e.once("finish",r));t.ended=!0,e.writable=!1}(this,i,r),this},Object.defineProperty(E.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(E.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),E.prototype.destroy=d.destroy,E.prototype._undestroy=d.undestroy,E.prototype._destroy=function(e,t){t(e)}}).call(this,r(7),r(6))},function(e,t,r){"use strict";e.exports=c;var n=r(55).codes,i=n.ERR_METHOD_NOT_IMPLEMENTED,o=n.ERR_MULTIPLE_CALLBACK,a=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,s=n.ERR_TRANSFORM_WITH_LENGTH_0,f=r(56);function u(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(null===n)return this.emit("error",new o);r.writechunk=null,r.writecb=null,null!=t&&this.push(t),n(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length=this._blockSize;){for(var o=this._blockOffset;o0;++a)this._length[a]+=s,(s=this._length[a]/4294967296|0)>0&&(this._length[a]-=4294967296*s);return this},o.prototype._update=function(){throw new Error("_update is not implemented")},o.prototype.digest=function(e){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var t=this._digest();void 0!==e&&(t=t.toString(e)),this._block.fill(0),this._blockOffset=0;for(var r=0;r<4;++r)this._length[r]=0;return t},o.prototype._digest=function(){throw new Error("_digest is not implemented")},e.exports=o},function(e,t,r){"use strict";var n=r(10),i=r(57),o=r(24).Buffer,a=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],s=new Array(64);function f(){this.init(),this._w=s,i.call(this,64,56)}function u(e,t,r){return r^e&(t^r)}function c(e,t,r){return e&t|r&(e|t)}function d(e){return(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)}function l(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7)}function h(e){return(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3}n(f,i),f.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},f.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,s=0|this._d,f=0|this._e,p=0|this._f,b=0|this._g,y=0|this._h,v=0;v<16;++v)r[v]=e.readInt32BE(4*v);for(;v<64;++v)r[v]=0|(((t=r[v-2])>>>17|t<<15)^(t>>>19|t<<13)^t>>>10)+r[v-7]+h(r[v-15])+r[v-16];for(var m=0;m<64;++m){var g=y+l(f)+u(f,p,b)+a[m]+r[m]|0,w=d(n)+c(n,i,o)|0;y=b,b=p,p=f,f=s+g|0,s=o,o=i,i=n,n=g+w|0}this._a=n+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=s+this._d|0,this._e=f+this._e|0,this._f=p+this._f|0,this._g=b+this._g|0,this._h=y+this._h|0},f.prototype._hash=function(){var e=o.allocUnsafe(32);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e.writeInt32BE(this._h,28),e},e.exports=f},function(e,t,r){"use strict";var n=r(10),i=r(57),o=r(24).Buffer,a=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],s=new Array(160);function f(){this.init(),this._w=s,i.call(this,128,112)}function u(e,t,r){return r^e&(t^r)}function c(e,t,r){return e&t|r&(e|t)}function d(e,t){return(e>>>28|t<<4)^(t>>>2|e<<30)^(t>>>7|e<<25)}function l(e,t){return(e>>>14|t<<18)^(e>>>18|t<<14)^(t>>>9|e<<23)}function h(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^e>>>7}function p(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^(e>>>7|t<<25)}function b(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^e>>>6}function y(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^(e>>>6|t<<26)}function v(e,t){return e>>>0>>0?1:0}n(f,i),f.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},f.prototype._update=function(e){for(var t=this._w,r=0|this._ah,n=0|this._bh,i=0|this._ch,o=0|this._dh,s=0|this._eh,f=0|this._fh,m=0|this._gh,g=0|this._hh,w=0|this._al,_=0|this._bl,k=0|this._cl,S=0|this._dl,A=0|this._el,E=0|this._fl,x=0|this._gl,P=0|this._hl,O=0;O<32;O+=2)t[O]=e.readInt32BE(4*O),t[O+1]=e.readInt32BE(4*O+4);for(;O<160;O+=2){var R=t[O-30],T=t[O-30+1],M=h(R,T),I=p(T,R),B=b(R=t[O-4],T=t[O-4+1]),C=y(T,R),j=t[O-14],U=t[O-14+1],N=t[O-32],L=t[O-32+1],F=I+U|0,D=M+j+v(F,I)|0;D=(D=D+B+v(F=F+C|0,C)|0)+N+v(F=F+L|0,L)|0,t[O]=D,t[O+1]=F}for(var q=0;q<160;q+=2){D=t[q],F=t[q+1];var z=c(r,n,i),H=c(w,_,k),K=d(r,w),G=d(w,r),V=l(s,A),W=l(A,s),J=a[q],X=a[q+1],Z=u(s,f,m),Y=u(A,E,x),$=P+W|0,Q=g+V+v($,P)|0;Q=(Q=(Q=Q+Z+v($=$+Y|0,Y)|0)+J+v($=$+X|0,X)|0)+D+v($=$+F|0,F)|0;var ee=G+H|0,te=K+z+v(ee,G)|0;g=m,P=x,m=f,x=E,f=s,E=A,s=o+Q+v(A=S+$|0,S)|0,o=i,S=k,i=n,k=_,n=r,_=w,r=Q+te+v(w=$+ee|0,$)|0}this._al=this._al+w|0,this._bl=this._bl+_|0,this._cl=this._cl+k|0,this._dl=this._dl+S|0,this._el=this._el+A|0,this._fl=this._fl+E|0,this._gl=this._gl+x|0,this._hl=this._hl+P|0,this._ah=this._ah+r+v(this._al,w)|0,this._bh=this._bh+n+v(this._bl,_)|0,this._ch=this._ch+i+v(this._cl,k)|0,this._dh=this._dh+o+v(this._dl,S)|0,this._eh=this._eh+s+v(this._el,A)|0,this._fh=this._fh+f+v(this._fl,E)|0,this._gh=this._gh+m+v(this._gl,x)|0,this._hh=this._hh+g+v(this._hl,P)|0},f.prototype._hash=function(){var e=o.allocUnsafe(64);function t(t,r,n){e.writeInt32BE(t,n),e.writeInt32BE(r,n+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),t(this._gh,this._gl,48),t(this._hh,this._hl,56),e},e.exports=f},function(e,t,r){"use strict";r(621);var n=function(e,t){return parseInt(e.slice(2*t+2,2*t+4),16)},i=function(e){return(e.length-2)/2},o=function(e){for(var t=[],r=2,n=e.length;r>6|192);else{if(i>55295&&i<56320){if(++n==e.length)return null;var o=e.charCodeAt(n);if(o<56320||o>57343)return null;r+=t((i=65536+((1023&i)<<10)+(1023&o))>>18|240),r+=t(i>>12&63|128)}else r+=t(i>>12|224);r+=t(i>>6&63|128)}r+=t(63&i|128)}}return r},toString:function(e){for(var t="",r=0,o=i(e);r127){if(a>191&&a<224){if(r>=o)return null;a=(31&a)<<6|63&n(e,r)}else if(a>223&&a<240){if(r+1>=o)return null;a=(15&a)<<12|(63&n(e,r))<<6|63&n(e,++r)}else{if(!(a>239&&a<248))return null;if(r+2>=o)return null;a=(7&a)<<18|(63&n(e,r))<<12|(63&n(e,++r))<<6|63&n(e,++r)}++r}if(a<=65535)t+=String.fromCharCode(a);else{if(!(a<=1114111))return null;a-=65536,t+=String.fromCharCode(a>>10|55296),t+=String.fromCharCode(1023&a|56320)}}return t},fromNumber:function(e){var t=e.toString(16);return t.length%2==0?"0x"+t:"0x0"+t},toNumber:function(e){return parseInt(e.slice(2),16)},fromNat:function(e){return"0x0"===e?"0x":e.length%2==0?e:"0x0"+e.slice(2)},toNat:function(e){return"0"===e[2]?"0x"+e.slice(3):e},fromArray:a,toArray:o,fromUint8Array:function(e){return a([].slice.call(e,0))},toUint8Array:function(e){return new Uint8Array(o(e))}}},function(e,t,r){"use strict";var n=r(255).version,i=r(33),o=r(379),a=r(80),s=r(196),f=r(606),u=r(607),c=r(17),d=function(){var e=this;i.packageInit(this,arguments),this.version=n,this.utils=c,this.eth=new o(this),this.shh=new f(this),this.bzz=new u(this);var t=this.setProvider;this.setProvider=function(r,n){return t.apply(e,arguments),e.eth.setRequestManager(e._requestManager),e.shh.setRequestManager(e._requestManager),e.bzz.setProvider(r),!0}};d.version=n,d.utils=c,d.modules={Eth:o,Net:a,Personal:s,Shh:f,Bzz:u},i.addProviders(d),e.exports=d},function(e){e.exports=JSON.parse('{"name":"web3","version":"1.7.5","description":"Ethereum JavaScript API","repository":"https://github.com/ethereum/web3.js","license":"LGPL-3.0","engines":{"node":">=8.0.0"},"main":"lib/index.js","bugs":{"url":"https://github.com/ethereum/web3.js/issues"},"keywords":["Ethereum","JavaScript","API"],"author":"ethereum.org","types":"types/index.d.ts","scripts":{"compile":"tsc -b tsconfig.json","dtslint":"dtslint --localTs ../../node_modules/typescript/lib types","postinstall":"echo \\"WARNING: the web3-shh and web3-bzz api will be deprecated in the next version\\""},"authors":[{"name":"Fabian Vogelsteller","email":"fabian@ethereum.org","homepage":"http://frozeman.de"},{"name":"Marek Kotewicz","email":"marek@parity.io","url":"https://github.com/debris"},{"name":"Marian Oancea","url":"https://github.com/cubedro"},{"name":"Gav Wood","email":"g@parity.io","homepage":"http://gavwood.com"},{"name":"Jeffery Wilcke","email":"jeffrey.wilcke@ethereum.org","url":"https://github.com/obscuren"}],"dependencies":{"web3-bzz":"1.7.5","web3-core":"1.7.5","web3-eth":"1.7.5","web3-eth-personal":"1.7.5","web3-net":"1.7.5","web3-shh":"1.7.5","web3-utils":"1.7.5"},"devDependencies":{"@types/node":"^12.12.6","dtslint":"^3.4.1","typescript":"^3.9.5","web3-core-helpers":"1.7.5"}}')},function(e,t,r){"use strict";var n=r(0)(r(2)),i=r(127).callbackify,o=r(11).errors,a=r(167),s=r(336),f=r(337),u=function e(t,r){this.provider=null,this.providers=e.providers,this.setProvider(t,r),this.subscriptions=new Map};u.givenProvider=f,u.providers={WebsocketProvider:r(338),HttpProvider:r(348),IpcProvider:r(356)},u.prototype.setProvider=function(e,t){var r=this;if(e&&"string"==typeof e&&this.providers)if(/^http(s)?:\/\//i.test(e))e=new this.providers.HttpProvider(e);else if(/^ws(s)?:\/\//i.test(e))e=new this.providers.WebsocketProvider(e);else if(e&&"object"===(0,n.default)(t)&&"function"==typeof t.connect)e=new this.providers.IpcProvider(e,t);else if(e)throw new Error("Can't autodetect provider for \""+e+'"');if(this.provider&&this.provider.connected&&this.clearSubscriptions(),this.provider=e||null,this.provider&&this.provider.on){"function"==typeof e.request?this.provider.on("message",(function(e){if(e&&"eth_subscription"===e.type&&e.data){var t=e.data;t.subscription&&r.subscriptions.has(t.subscription)&&r.subscriptions.get(t.subscription).callback(null,t.result)}})):this.provider.on("data",(function(e,t){(e=e||t).method&&e.params&&e.params.subscription&&r.subscriptions.has(e.params.subscription)&&r.subscriptions.get(e.params.subscription).callback(null,e.params.result)})),this.provider.on("connect",(function(){r.subscriptions.forEach((function(e){e.subscription.resubscribe()}))})),this.provider.on("error",(function(e){r.subscriptions.forEach((function(t){t.callback(e)}))}));this.provider.on("disconnect",(function(e){r._isCleanCloseEvent(e)&&!r._isIpcCloseError(e)||(r.subscriptions.forEach((function(t){t.callback(o.ConnectionCloseError(e)),r.subscriptions.delete(t.subscription.id)})),r.provider&&r.provider.emit&&r.provider.emit("error",o.ConnectionCloseError(e))),r.provider&&r.provider.emit&&r.provider.emit("end",e)}))}},u.prototype.send=function(e,t){if(t=t||function(){},!this.provider)return t(o.InvalidProvider());var r=e.method,n=e.params,s=a.toPayload(r,n),f=this._jsonrpcResultCallback(t,s);if(this.provider.request)i(this.provider.request.bind(this.provider))({method:r,params:n},t);else if(this.provider.sendAsync)this.provider.sendAsync(s,f);else{if(!this.provider.send)throw new Error("Provider does not have a request or send method to use.");this.provider.send(s,f)}},u.prototype.sendBatch=function(e,t){if(!this.provider)return t(o.InvalidProvider());var r=a.toBatchPayload(e);this.provider[this.provider.sendAsync?"sendAsync":"send"](r,(function(e,r){return e?t(e):Array.isArray(r)?void t(null,r):t(o.InvalidResponse(r))}))},u.prototype.addSubscription=function(e,t){if(!this.provider.on)throw new Error("The provider doesn't support subscriptions: "+this.provider.constructor.name);this.subscriptions.set(e.id,{callback:t,subscription:e})},u.prototype.removeSubscription=function(e,t){if(this.subscriptions.has(e)){var r=this.subscriptions.get(e).subscription.options.type;return this.subscriptions.delete(e),void this.send({method:r+"_unsubscribe",params:[e]},t)}"function"==typeof t&&t(null)},u.prototype.clearSubscriptions=function(e){try{var t=this;return this.subscriptions.size>0&&this.subscriptions.forEach((function(r,n){e&&"syncing"===r.name||t.removeSubscription(n)})),this.provider.reset&&this.provider.reset(),!0}catch(e){throw new Error("Error while clearing subscriptions: ".concat(e))}},u.prototype._isCleanCloseEvent=function(e){return"object"===(0,n.default)(e)&&([1e3].includes(e.code)||!0===e.wasClean)},u.prototype._isIpcCloseError=function(e){return"boolean"==typeof e&&e},u.prototype._jsonrpcResultCallback=function(e,t){return function(r,n){return n&&n.id&&t.id!==n.id?e(new Error("Wrong response id ".concat(n.id," (expected: ").concat(t.id,") in ").concat(JSON.stringify(t)))):r?e(r):n&&n.error?e(o.ErrorResponse(n)):a.isValidResponse(n)?void e(null,n.result):e(o.InvalidResponse(n))}},e.exports={Manager:u,BatchManager:s}},function(e,t,r){"use strict";var n=r(0)(r(2));e.exports=function(e){return e&&"object"===(0,n.default)(e)&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},function(e,t,r){"use strict";var n=r(0)(r(2));e.exports={ErrorResponse:function(e){var t=e&&e.error&&e.error.message?e.error.message:JSON.stringify(e),r=e.error&&e.error.data?e.error.data:null,n=new Error("Returned error: "+t);return n.data=r,n},InvalidNumberOfParams:function(e,t,r){return new Error('Invalid number of parameters for "'+r+'". Got '+e+" expected "+t+"!")},InvalidConnection:function(e,t){return this.ConnectionError("CONNECTION ERROR: Couldn't connect to node "+e+".",t)},InvalidProvider:function(){return new Error("Provider not set or invalid")},InvalidResponse:function(e){var t=e&&e.error&&e.error.message?e.error.message:"Invalid JSON RPC response: "+JSON.stringify(e);return new Error(t)},ConnectionTimeout:function(e){return new Error("CONNECTION TIMEOUT: timeout of "+e+" ms achived")},ConnectionNotOpenError:function(e){return this.ConnectionError("connection not open on send()",e)},ConnectionCloseError:function(e){return"object"===(0,n.default)(e)&&e.code&&e.reason?this.ConnectionError("CONNECTION ERROR: The connection got closed with the close code `"+e.code+"` and the following reason string `"+e.reason+"`",e):new Error("CONNECTION ERROR: The connection closed unexpectedly")},MaxAttemptsReachedOnReconnectingError:function(){return new Error("Maximum number of reconnect attempts reached!")},PendingRequestsOnReconnectingError:function(){return new Error("CONNECTION ERROR: Provider started to reconnect before the response got received!")},ConnectionError:function(e,t){var r=new Error(e);return t&&(r.code=t.code,r.reason=t.reason),r},RevertInstructionError:function(e,t){var r=new Error("Your request got reverted with the following reason string: "+e);return r.reason=e,r.signature=t,r},TransactionRevertInstructionError:function(e,t,r){var n=new Error("Transaction has been reverted by the EVM:\n"+JSON.stringify(r,null,2));return n.reason=e,n.signature=t,n.receipt=r,n},TransactionError:function(e,t){var r=new Error(e);return r.receipt=t,r},NoContractAddressFoundError:function(e){return this.TransactionError("The transaction receipt didn't contain a contract address.",e)},ContractCodeNotStoredError:function(e){return this.TransactionError("The contract code couldn't be stored, please check your gas limit.",e)},TransactionRevertedWithoutReasonError:function(e){return this.TransactionError("Transaction has been reverted by the EVM:\n"+JSON.stringify(e,null,2),e)},TransactionOutOfGasError:function(e){return this.TransactionError("Transaction ran out of gas. Please provide more gas:\n"+JSON.stringify(e,null,2),e)},ResolverMethodMissingError:function(e,t){return new Error("The resolver at "+e+'does not implement requested method: "'+t+'".')},ContractMissingABIError:function(){return new Error("You must provide the json interface of the contract when instantiating a contract object.")},ContractOnceRequiresCallbackError:function(){return new Error("Once requires a callback as the second parameter.")},ContractEventDoesNotExistError:function(e){return new Error('Event "'+e+"\" doesn't exist in this contract.")},ContractReservedEventError:function(e){return new Error('The event "'+e+"\" is a reserved event name, you can't use it.")},ContractMissingDeployDataError:function(){return new Error('No "data" specified in neither the given options, nor the default options.')},ContractNoAddressDefinedError:function(){return new Error("This contract object doesn't have address set yet, please set an address first.")},ContractNoFromAddressDefinedError:function(){return new Error('No "from" address specified in neither the given options, nor the default options.')}}},function(e,t,r){"use strict";var n=r(0),i=n(r(58)),o=n(r(2));function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function s(e){for(var t=1;t2)throw new Error("[ethjs-unit] while converting number "+e+" to wei, too many decimal points");var l=d[0],h=d[1];if(l||(l="0"),h||(h="0"),h.length>o)throw new Error("[ethjs-unit] while converting number "+e+" to wei, too many decimal places");for(;h.length0?a-4:a;for(r=0;r>16&255,f[c++]=t>>8&255,f[c++]=255&t;2===s&&(t=i[e.charCodeAt(r)]<<2|i[e.charCodeAt(r+1)]>>4,f[c++]=255&t);1===s&&(t=i[e.charCodeAt(r)]<<10|i[e.charCodeAt(r+1)]<<4|i[e.charCodeAt(r+2)]>>2,f[c++]=t>>8&255,f[c++]=255&t);return f},t.fromByteArray=function(e){for(var t,r=e.length,i=r%3,o=[],a=0,s=r-i;as?s:a+16383));1===i?(t=e[r-1],o.push(n[t>>2]+n[t<<4&63]+"==")):2===i&&(t=(e[r-2]<<8)+e[r-1],o.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"="));return o.join("")};for(var n=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,f=a.length;s0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function c(e,t,r){for(var i,o,a=[],s=t;s>18&63]+n[o>>12&63]+n[o>>6&63]+n[63&o]);return a.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},function(e,t,r){"use strict"; +/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */t.read=function(e,t,r,n,i){var o,a,s=8*i-n-1,f=(1<>1,c=-7,d=r?i-1:0,l=r?-1:1,h=e[t+d];for(d+=l,o=h&(1<<-c)-1,h>>=-c,c+=s;c>0;o=256*o+e[t+d],d+=l,c-=8);for(a=o&(1<<-c)-1,o>>=-c,c+=n;c>0;a=256*a+e[t+d],d+=l,c-=8);if(0===o)o=1-u;else{if(o===f)return a?NaN:1/0*(h?-1:1);a+=Math.pow(2,n),o-=u}return(h?-1:1)*a*Math.pow(2,o-n)},t.write=function(e,t,r,n,i,o){var a,s,f,u=8*o-i-1,c=(1<>1,l=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,h=n?0:o-1,p=n?1:-1,b=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=c):(a=Math.floor(Math.log(t)/Math.LN2),t*(f=Math.pow(2,-a))<1&&(a--,f*=2),(t+=a+d>=1?l/f:l*Math.pow(2,1-d))*f>=2&&(a++,f/=2),a+d>=c?(s=0,a=c):a+d>=1?(s=(t*f-1)*Math.pow(2,i),a+=d):(s=t*Math.pow(2,d-1)*Math.pow(2,i),a=0));i>=8;e[r+h]=255&s,h+=p,s/=256,i-=8);for(a=a<0;e[r+h]=255&a,h+=p,a/=256,u-=8);e[r+h-p]|=128*b}},function(e,t,r){"use strict";e.exports=function(e){if(Array.isArray(e))return e},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,r){"use strict";e.exports=function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o=[],a=!0,s=!1;try{for(r=r.call(e);!(a=(n=r.next()).done)&&(o.push(n.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==r.return||r.return()}finally{if(s)throw i}}return o}},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,r){"use strict";e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,r){"use strict"; +/*! https://mths.be/utf8js v3.0.0 by @mathias */!function(e){var t,r,n,i=String.fromCharCode;function o(e){for(var t,r,n=[],i=0,o=e.length;i=55296&&t<=56319&&i=55296&&e<=57343)throw Error("Lone surrogate U+"+e.toString(16).toUpperCase()+" is not a scalar value")}function s(e,t){return i(e>>t&63|128)}function f(e){if(0==(4294967168&e))return i(e);var t="";return 0==(4294965248&e)?t=i(e>>6&31|192):0==(4294901760&e)?(a(e),t=i(e>>12&15|224),t+=s(e,6)):0==(4292870144&e)&&(t=i(e>>18&7|240),t+=s(e,12),t+=s(e,6)),t+=i(63&e|128)}function u(){if(n>=r)throw Error("Invalid byte index");var e=255&t[n];if(n++,128==(192&e))return 63&e;throw Error("Invalid continuation byte")}function c(){var e,i;if(n>r)throw Error("Invalid byte index");if(n==r)return!1;if(e=255&t[n],n++,0==(128&e))return e;if(192==(224&e)){if((i=(31&e)<<6|u())>=128)return i;throw Error("Invalid continuation byte")}if(224==(240&e)){if((i=(15&e)<<12|u()<<6|u())>=2048)return a(i),i;throw Error("Invalid continuation byte")}if(240==(248&e)&&(i=(7&e)<<18|u()<<12|u()<<6|u())>=65536&&i<=1114111)return i;throw Error("Invalid UTF-8 detected")}e.version="3.0.0",e.encode=function(e){for(var t=o(e),r=t.length,n=-1,i="";++n65535&&(o+=i((t-=65536)>>>10&1023|55296),t=56320|1023&t),o+=i(t);return o}(s)}}(t)},function(e,t,r){"use strict";function n(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return i(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return i(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,f=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return s=e.done,e},e:function(e){f=!0,a=e},f:function(){try{s||null==r.return||r.return()}finally{if(f)throw a}}}}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&void 0!==arguments[0]?arguments[0]:function(e){return new Uint8Array(e)},t=arguments.length>1?arguments[1]:void 0;return"function"==typeof e&&(e=e(t)),m("output",e,t),e}function _(e){return Object.prototype.toString.call(e).slice(8,-1)}e.exports=function(e){return{contextRandomize:function(t){switch(v(null===t||t instanceof Uint8Array,"Expected seed to be an Uint8Array or null"),null!==t&&m("seed",t,32),e.contextRandomize(t)){case 1:throw new Error(f)}},privateKeyVerify:function(t){return m("private key",t,32),0===e.privateKeyVerify(t)},privateKeyNegate:function(t){switch(m("private key",t,32),e.privateKeyNegate(t)){case 0:return t;case 1:throw new Error(o)}},privateKeyTweakAdd:function(t,r){switch(m("private key",t,32),m("tweak",r,32),e.privateKeyTweakAdd(t,r)){case 0:return t;case 1:throw new Error(a)}},privateKeyTweakMul:function(t,r){switch(m("private key",t,32),m("tweak",r,32),e.privateKeyTweakMul(t,r)){case 0:return t;case 1:throw new Error(s)}},publicKeyVerify:function(t){return m("public key",t,[33,65]),0===e.publicKeyVerify(t)},publicKeyCreate:function(t){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2?arguments[2]:void 0;switch(m("private key",t,32),g(r),n=w(n,r?33:65),e.publicKeyCreate(n,t)){case 0:return n;case 1:throw new Error(u);case 2:throw new Error(d)}},publicKeyConvert:function(t){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2?arguments[2]:void 0;switch(m("public key",t,[33,65]),g(r),n=w(n,r?33:65),e.publicKeyConvert(n,t)){case 0:return n;case 1:throw new Error(c);case 2:throw new Error(d)}},publicKeyNegate:function(t){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2?arguments[2]:void 0;switch(m("public key",t,[33,65]),g(r),n=w(n,r?33:65),e.publicKeyNegate(n,t)){case 0:return n;case 1:throw new Error(c);case 2:throw new Error(o);case 3:throw new Error(d)}},publicKeyCombine:function(t){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2?arguments[2]:void 0;v(Array.isArray(t),"Expected public keys to be an Array"),v(t.length>0,"Expected public keys array will have more than zero items");var o,a=n(t);try{for(a.s();!(o=a.n()).done;){var s=o.value;m("public key",s,[33,65])}}catch(e){a.e(e)}finally{a.f()}switch(g(r),i=w(i,r?33:65),e.publicKeyCombine(i,t)){case 0:return i;case 1:throw new Error(c);case 2:throw new Error(l);case 3:throw new Error(d)}},publicKeyTweakAdd:function(t,r){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=arguments.length>3?arguments[3]:void 0;switch(m("public key",t,[33,65]),m("tweak",r,32),g(n),i=w(i,n?33:65),e.publicKeyTweakAdd(i,t,r)){case 0:return i;case 1:throw new Error(c);case 2:throw new Error(a)}},publicKeyTweakMul:function(t,r){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=arguments.length>3?arguments[3]:void 0;switch(m("public key",t,[33,65]),m("tweak",r,32),g(n),i=w(i,n?33:65),e.publicKeyTweakMul(i,t,r)){case 0:return i;case 1:throw new Error(c);case 2:throw new Error(s)}},signatureNormalize:function(t){switch(m("signature",t,64),e.signatureNormalize(t)){case 0:return t;case 1:throw new Error(h)}},signatureExport:function(t,r){m("signature",t,64);var n={output:r=w(r,72),outputlen:72};switch(e.signatureExport(n,t)){case 0:return r.slice(0,n.outputlen);case 1:throw new Error(h);case 2:throw new Error(o)}},signatureImport:function(t,r){switch(m("signature",t),r=w(r,64),e.signatureImport(r,t)){case 0:return r;case 1:throw new Error(h);case 2:throw new Error(o)}},ecdsaSign:function(t,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;m("message",t,32),m("private key",r,32),v("Object"===_(n),"Expected options to be an Object"),void 0!==n.data&&m("options.data",n.data),void 0!==n.noncefn&&v("Function"===_(n.noncefn),"Expected options.noncefn to be a Function");var a={signature:i=w(i,64),recid:null};switch(e.ecdsaSign(a,t,r,n.data,n.noncefn)){case 0:return a;case 1:throw new Error(p);case 2:throw new Error(o)}},ecdsaVerify:function(t,r,n){switch(m("signature",t,64),m("message",r,32),m("public key",n,[33,65]),e.ecdsaVerify(t,r,n)){case 0:return!0;case 3:return!1;case 1:throw new Error(h);case 2:throw new Error(c)}},ecdsaRecover:function(t,r,n){var i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],a=arguments.length>4?arguments[4]:void 0;switch(m("signature",t,64),v("Number"===_(r)&&r>=0&&r<=3,"Expected recovery id to be a Number within interval [0, 3]"),m("message",n,32),g(i),a=w(a,i?33:65),e.ecdsaRecover(a,t,r,n)){case 0:return a;case 1:throw new Error(h);case 2:throw new Error(b);case 3:throw new Error(o)}},ecdh:function(t,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;switch(m("public key",t,[33,65]),m("private key",r,32),v("Object"===_(n),"Expected options to be an Object"),void 0!==n.data&&m("options.data",n.data),void 0!==n.hashfn?(v("Function"===_(n.hashfn),"Expected options.hashfn to be a Function"),void 0!==n.xbuf&&m("options.xbuf",n.xbuf,32),void 0!==n.ybuf&&m("options.ybuf",n.ybuf,32),m("output",i)):i=w(i,32),e.ecdh(i,t,r,n.data,n.hashfn,n.xbuf,n.ybuf)){case 0:return i;case 1:throw new Error(c);case 2:throw new Error(y)}}}}},function(e,t,r){"use strict";var n=new(0,r(59).ec)("secp256k1"),i=n.curve,o=i.n.constructor;function a(e){var t=e[0];switch(t){case 2:case 3:return 33!==e.length?null:function(e,t){var r=new o(t);if(r.cmp(i.p)>=0)return null;var a=(r=r.toRed(i.red)).redSqr().redIMul(r).redIAdd(i.b).redSqrt();return 3===e!==a.isOdd()&&(a=a.redNeg()),n.keyPair({pub:{x:r,y:a}})}(t,e.subarray(1,33));case 4:case 6:case 7:return 65!==e.length?null:function(e,t,r){var a=new o(t),s=new o(r);if(a.cmp(i.p)>=0||s.cmp(i.p)>=0)return null;if(a=a.toRed(i.red),s=s.toRed(i.red),(6===e||7===e)&&s.isOdd()!==(7===e))return null;var f=a.redSqr().redIMul(a);return s.redSqr().redISub(f.redIAdd(i.b)).isZero()?n.keyPair({pub:{x:a,y:s}}):null}(t,e.subarray(1,33),e.subarray(33,65));default:return null}}function s(e,t){for(var r=t.encode(null,33===e.length),n=0;n=0)return 1;if(r.iadd(new o(e)),r.cmp(i.n)>=0&&r.isub(i.n),r.isZero())return 1;var n=r.toArrayLike(Uint8Array,"be",32);return e.set(n),0},privateKeyTweakMul:function(e,t){var r=new o(t);if(r.cmp(i.n)>=0||r.isZero())return 1;r.imul(new o(e)),r.cmp(i.n)>=0&&(r=r.umod(i.n));var n=r.toArrayLike(Uint8Array,"be",32);return e.set(n),0},publicKeyVerify:function(e){return null===a(e)?1:0},publicKeyCreate:function(e,t){var r=new o(t);return r.cmp(i.n)>=0||r.isZero()?1:(s(e,n.keyFromPrivate(t).getPublic()),0)},publicKeyConvert:function(e,t){var r=a(t);return null===r?1:(s(e,r.getPublic()),0)},publicKeyNegate:function(e,t){var r=a(t);if(null===r)return 1;var n=r.getPublic();return n.y=n.y.redNeg(),s(e,n),0},publicKeyCombine:function(e,t){for(var r=new Array(t.length),n=0;n=0)return 2;var f=n.getPublic().add(i.g.mul(r));return f.isInfinity()?2:(s(e,f),0)},publicKeyTweakMul:function(e,t,r){var n=a(t);return null===n?1:(r=new o(r)).cmp(i.n)>=0||r.isZero()?2:(s(e,n.getPublic().mul(r)),0)},signatureNormalize:function(e){var t=new o(e.subarray(0,32)),r=new o(e.subarray(32,64));return t.cmp(i.n)>=0||r.cmp(i.n)>=0?1:(1===r.cmp(n.nh)&&e.set(i.n.sub(r).toArrayLike(Uint8Array,"be",32),32),0)},signatureExport:function(e,t){var r=t.subarray(0,32),n=t.subarray(32,64);if(new o(r).cmp(i.n)>=0)return 1;if(new o(n).cmp(i.n)>=0)return 1;var a=e.output,s=a.subarray(4,37);s[0]=0,s.set(r,1);for(var f=33,u=0;f>1&&0===s[u]&&!(128&s[u+1]);--f,++u);if(128&(s=s.subarray(u))[0])return 1;if(f>1&&0===s[0]&&!(128&s[1]))return 1;var c=a.subarray(39,72);c[0]=0,c.set(n,1);for(var d=33,l=0;d>1&&0===c[l]&&!(128&c[l+1]);--d,++l);return 128&(c=c.subarray(l))[0]||d>1&&0===c[0]&&!(128&c[1])?1:(e.outputlen=6+f+d,a[0]=48,a[1]=e.outputlen-2,a[2]=2,a[3]=s.length,a.set(s,4),a[4+f]=2,a[5+f]=c.length,a.set(c,6+f),0)},signatureImport:function(e,t){if(t.length<8)return 1;if(t.length>72)return 1;if(48!==t[0])return 1;if(t[1]!==t.length-2)return 1;if(2!==t[2])return 1;var r=t[3];if(0===r)return 1;if(5+r>=t.length)return 1;if(2!==t[4+r])return 1;var n=t[5+r];if(0===n)return 1;if(6+r+n!==t.length)return 1;if(128&t[4])return 1;if(r>1&&0===t[4]&&!(128&t[5]))return 1;if(128&t[r+6])return 1;if(n>1&&0===t[r+6]&&!(128&t[r+7]))return 1;var a=t.subarray(4,4+r);if(33===a.length&&0===a[0]&&(a=a.subarray(1)),a.length>32)return 1;var s=t.subarray(6+r);if(33===s.length&&0===s[0]&&(s=s.slice(1)),s.length>32)throw new Error("S length is too long");var f=new o(a);f.cmp(i.n)>=0&&(f=new o(0));var u=new o(t.subarray(6+r));return u.cmp(i.n)>=0&&(u=new o(0)),e.set(f.toArrayLike(Uint8Array,"be",32),0),e.set(u.toArrayLike(Uint8Array,"be",32),32),0},ecdsaSign:function(e,t,r,a,s){if(s){var f=s;s=function(e){var n=f(t,r,null,a,e);if(!(n instanceof Uint8Array&&32===n.length))throw new Error("This is the way");return new o(n)}}var u,c=new o(r);if(c.cmp(i.n)>=0||c.isZero())return 1;try{u=n.sign(t,r,{canonical:!0,k:s,pers:a})}catch(e){return 1}return e.signature.set(u.r.toArrayLike(Uint8Array,"be",32),0),e.signature.set(u.s.toArrayLike(Uint8Array,"be",32),32),e.recid=u.recoveryParam,0},ecdsaVerify:function(e,t,r){var s={r:e.subarray(0,32),s:e.subarray(32,64)},f=new o(s.r),u=new o(s.s);if(f.cmp(i.n)>=0||u.cmp(i.n)>=0)return 1;if(1===u.cmp(n.nh)||f.isZero()||u.isZero())return 3;var c=a(r);if(null===c)return 2;var d=c.getPublic();return n.verify(t,s,d)?0:3},ecdsaRecover:function(e,t,r,a){var f,u={r:t.slice(0,32),s:t.slice(32,64)},c=new o(u.r),d=new o(u.s);if(c.cmp(i.n)>=0||d.cmp(i.n)>=0)return 1;if(c.isZero()||d.isZero())return 2;try{f=n.recoverPubKey(a,u,r)}catch(e){return 2}return s(e,f),0},ecdh:function(e,t,r,s,f,u,c){var d=a(t);if(null===d)return 1;var l=new o(r);if(l.cmp(i.n)>=0||l.isZero())return 2;var h=d.getPublic().mul(l);if(void 0===f)for(var p=h.encode(null,!0),b=n.hash().update(p).digest(),y=0;y<32;++y)e[y]=b[y];else{u||(u=new Uint8Array(32));for(var v=h.getX().toArray("be",32),m=0;m<32;++m)u[m]=v[m];c||(c=new Uint8Array(32));for(var g=h.getY().toArray("be",32),w=0;w<32;++w)c[w]=g[w];var _=f(u,c,s);if(!(_ instanceof Uint8Array&&_.length===e.length))return 2;e.set(_)}return 0}}},function(e){e.exports=JSON.parse('{"_args":[["elliptic@6.5.4","/home/user1/Desktop/work/web3_releases/1.7.5/1.7.5-rc.0/web3.js"]],"_development":true,"_from":"elliptic@6.5.4","_id":"elliptic@6.5.4","_inBundle":false,"_integrity":"sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==","_location":"/elliptic","_phantomChildren":{},"_requested":{"type":"version","registry":true,"raw":"elliptic@6.5.4","name":"elliptic","escapedName":"elliptic","rawSpec":"6.5.4","saveSpec":null,"fetchSpec":"6.5.4"},"_requiredBy":["/@ethersproject/signing-key","/@ethersproject/transactions/@ethersproject/signing-key","/browserify-sign","/create-ecdh","/eth-lib","/secp256k1","/swarm-js/eth-lib"],"_resolved":"https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz","_spec":"6.5.4","_where":"/home/user1/Desktop/work/web3_releases/1.7.5/1.7.5-rc.0/web3.js","author":{"name":"Fedor Indutny","email":"fedor@indutny.com"},"bugs":{"url":"https://github.com/indutny/elliptic/issues"},"dependencies":{"bn.js":"^4.11.9","brorand":"^1.1.0","hash.js":"^1.0.0","hmac-drbg":"^1.0.1","inherits":"^2.0.4","minimalistic-assert":"^1.0.1","minimalistic-crypto-utils":"^1.0.1"},"description":"EC cryptography","devDependencies":{"brfs":"^2.0.2","coveralls":"^3.1.0","eslint":"^7.6.0","grunt":"^1.2.1","grunt-browserify":"^5.3.0","grunt-cli":"^1.3.2","grunt-contrib-connect":"^3.0.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-uglify":"^5.0.0","grunt-mocha-istanbul":"^5.0.2","grunt-saucelabs":"^9.0.1","istanbul":"^0.4.5","mocha":"^8.0.1"},"files":["lib"],"homepage":"https://github.com/indutny/elliptic","keywords":["EC","Elliptic","curve","Cryptography"],"license":"MIT","main":"lib/elliptic.js","name":"elliptic","repository":{"type":"git","url":"git+ssh://git@github.com/indutny/elliptic.git"},"scripts":{"lint":"eslint lib test","lint:fix":"npm run lint -- --fix","test":"npm run lint && npm run unit","unit":"istanbul test _mocha --reporter=spec test/index.js","version":"grunt dist && git add dist/"},"version":"6.5.4"}')},function(e,t){},function(e,t,r){"use strict";var n=r(18),i=r(3),o=r(4),a=r(72),s=n.assert;function f(e){a.call(this,"short",e),this.a=new i(e.a,16).toRed(this.red),this.b=new i(e.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(e),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function u(e,t,r,n){a.BasePoint.call(this,e,"affine"),null===t&&null===r?(this.x=null,this.y=null,this.inf=!0):(this.x=new i(t,16),this.y=new i(r,16),n&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function c(e,t,r,n){a.BasePoint.call(this,e,"jacobian"),null===t&&null===r&&null===n?(this.x=this.curve.one,this.y=this.curve.one,this.z=new i(0)):(this.x=new i(t,16),this.y=new i(r,16),this.z=new i(n,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}o(f,a),e.exports=f,f.prototype._getEndomorphism=function(e){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var t,r;if(e.beta)t=new i(e.beta,16).toRed(this.red);else{var n=this._getEndoRoots(this.p);t=(t=n[0].cmp(n[1])<0?n[0]:n[1]).toRed(this.red)}if(e.lambda)r=new i(e.lambda,16);else{var o=this._getEndoRoots(this.n);0===this.g.mul(o[0]).x.cmp(this.g.x.redMul(t))?r=o[0]:(r=o[1],s(0===this.g.mul(r).x.cmp(this.g.x.redMul(t))))}return{beta:t,lambda:r,basis:e.basis?e.basis.map((function(e){return{a:new i(e.a,16),b:new i(e.b,16)}})):this._getEndoBasis(r)}}},f.prototype._getEndoRoots=function(e){var t=e===this.p?this.red:i.mont(e),r=new i(2).toRed(t).redInvm(),n=r.redNeg(),o=new i(3).toRed(t).redNeg().redSqrt().redMul(r);return[n.redAdd(o).fromRed(),n.redSub(o).fromRed()]},f.prototype._getEndoBasis=function(e){for(var t,r,n,o,a,s,f,u,c,d=this.n.ushrn(Math.floor(this.n.bitLength()/2)),l=e,h=this.n.clone(),p=new i(1),b=new i(0),y=new i(0),v=new i(1),m=0;0!==l.cmpn(0);){var g=h.div(l);u=h.sub(g.mul(l)),c=y.sub(g.mul(p));var w=v.sub(g.mul(b));if(!n&&u.cmp(d)<0)t=f.neg(),r=p,n=u.neg(),o=c;else if(n&&2==++m)break;f=u,h=l,l=u,y=p,p=c,v=b,b=w}a=u.neg(),s=c;var _=n.sqr().add(o.sqr());return a.sqr().add(s.sqr()).cmp(_)>=0&&(a=t,s=r),n.negative&&(n=n.neg(),o=o.neg()),a.negative&&(a=a.neg(),s=s.neg()),[{a:n,b:o},{a:a,b:s}]},f.prototype._endoSplit=function(e){var t=this.endo.basis,r=t[0],n=t[1],i=n.b.mul(e).divRound(this.n),o=r.b.neg().mul(e).divRound(this.n),a=i.mul(r.a),s=o.mul(n.a),f=i.mul(r.b),u=o.mul(n.b);return{k1:e.sub(a).sub(s),k2:f.add(u).neg()}},f.prototype.pointFromX=function(e,t){(e=new i(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),n=r.redSqrt();if(0!==n.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");var o=n.fromRed().isOdd();return(t&&!o||!t&&o)&&(n=n.redNeg()),this.point(e,n)},f.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,r=e.y,n=this.a.redMul(t),i=t.redSqr().redMul(t).redIAdd(n).redIAdd(this.b);return 0===r.redSqr().redISub(i).cmpn(0)},f.prototype._endoWnafMulAdd=function(e,t,r){for(var n=this._endoWnafT1,i=this._endoWnafT2,o=0;o":""},u.prototype.isInfinity=function(){return this.inf},u.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(0===this.x.cmp(e.x))return this.curve.point(null,null);var t=this.y.redSub(e.y);0!==t.cmpn(0)&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var r=t.redSqr().redISub(this.x).redISub(e.x),n=t.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,n)},u.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(0===e.cmpn(0))return this.curve.point(null,null);var t=this.curve.a,r=this.x.redSqr(),n=e.redInvm(),i=r.redAdd(r).redIAdd(r).redIAdd(t).redMul(n),o=i.redSqr().redISub(this.x.redAdd(this.x)),a=i.redMul(this.x.redSub(o)).redISub(this.y);return this.curve.point(o,a)},u.prototype.getX=function(){return this.x.fromRed()},u.prototype.getY=function(){return this.y.fromRed()},u.prototype.mul=function(e){return e=new i(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},u.prototype.mulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i):this.curve._wnafMulAdd(1,n,i,2)},u.prototype.jmulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i,!0):this.curve._wnafMulAdd(1,n,i,2,!0)},u.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||0===this.x.cmp(e.x)&&0===this.y.cmp(e.y))},u.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var r=this.precomputed,n=function(e){return e.neg()};t.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(n)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(n)}}}return t},u.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},o(c,a.BasePoint),f.prototype.jpoint=function(e,t,r){return new c(this,e,t,r)},c.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),r=this.x.redMul(t),n=this.y.redMul(t).redMul(e);return this.curve.point(r,n)},c.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},c.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),r=this.z.redSqr(),n=this.x.redMul(t),i=e.x.redMul(r),o=this.y.redMul(t.redMul(e.z)),a=e.y.redMul(r.redMul(this.z)),s=n.redSub(i),f=o.redSub(a);if(0===s.cmpn(0))return 0!==f.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var u=s.redSqr(),c=u.redMul(s),d=n.redMul(u),l=f.redSqr().redIAdd(c).redISub(d).redISub(d),h=f.redMul(d.redISub(l)).redISub(o.redMul(c)),p=this.z.redMul(e.z).redMul(s);return this.curve.jpoint(l,h,p)},c.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),r=this.x,n=e.x.redMul(t),i=this.y,o=e.y.redMul(t).redMul(this.z),a=r.redSub(n),s=i.redSub(o);if(0===a.cmpn(0))return 0!==s.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var f=a.redSqr(),u=f.redMul(a),c=r.redMul(f),d=s.redSqr().redIAdd(u).redISub(c).redISub(c),l=s.redMul(c.redISub(d)).redISub(i.redMul(u)),h=this.z.redMul(a);return this.curve.jpoint(d,l,h)},c.prototype.dblp=function(e){if(0===e)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var t;if(this.curve.zeroA||this.curve.threeA){var r=this;for(t=0;t=0)return!1;if(r.redIAdd(i),0===this.x.cmp(r))return!0}},c.prototype.inspect=function(){return this.isInfinity()?"":""},c.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},function(e,t,r){"use strict";var n=r(3),i=r(4),o=r(72),a=r(18);function s(e){o.call(this,"mont",e),this.a=new n(e.a,16).toRed(this.red),this.b=new n(e.b,16).toRed(this.red),this.i4=new n(4).toRed(this.red).redInvm(),this.two=new n(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function f(e,t,r){o.BasePoint.call(this,e,"projective"),null===t&&null===r?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new n(t,16),this.z=new n(r,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}i(s,o),e.exports=s,s.prototype.validate=function(e){var t=e.normalize().x,r=t.redSqr(),n=r.redMul(t).redAdd(r.redMul(this.a)).redAdd(t);return 0===n.redSqrt().redSqr().cmp(n)},i(f,o.BasePoint),s.prototype.decodePoint=function(e,t){return this.point(a.toArray(e,t),1)},s.prototype.point=function(e,t){return new f(this,e,t)},s.prototype.pointFromJSON=function(e){return f.fromJSON(this,e)},f.prototype.precompute=function(){},f.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},f.fromJSON=function(e,t){return new f(e,t[0],t[1]||e.one)},f.prototype.inspect=function(){return this.isInfinity()?"":""},f.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},f.prototype.dbl=function(){var e=this.x.redAdd(this.z).redSqr(),t=this.x.redSub(this.z).redSqr(),r=e.redSub(t),n=e.redMul(t),i=r.redMul(t.redAdd(this.curve.a24.redMul(r)));return this.curve.point(n,i)},f.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},f.prototype.diffAdd=function(e,t){var r=this.x.redAdd(this.z),n=this.x.redSub(this.z),i=e.x.redAdd(e.z),o=e.x.redSub(e.z).redMul(r),a=i.redMul(n),s=t.z.redMul(o.redAdd(a).redSqr()),f=t.x.redMul(o.redISub(a).redSqr());return this.curve.point(s,f)},f.prototype.mul=function(e){for(var t=e.clone(),r=this,n=this.curve.point(null,null),i=[];0!==t.cmpn(0);t.iushrn(1))i.push(t.andln(1));for(var o=i.length-1;o>=0;o--)0===i[o]?(r=r.diffAdd(n,this),n=n.dbl()):(n=r.diffAdd(n,this),r=r.dbl());return n},f.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},f.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},f.prototype.eq=function(e){return 0===this.getX().cmp(e.getX())},f.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},f.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},function(e,t,r){"use strict";var n=r(18),i=r(3),o=r(4),a=r(72),s=n.assert;function f(e){this.twisted=1!=(0|e.a),this.mOneA=this.twisted&&-1==(0|e.a),this.extended=this.mOneA,a.call(this,"edwards",e),this.a=new i(e.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new i(e.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new i(e.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),s(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1==(0|e.c)}function u(e,t,r,n,o){a.BasePoint.call(this,e,"projective"),null===t&&null===r&&null===n?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new i(t,16),this.y=new i(r,16),this.z=n?new i(n,16):this.curve.one,this.t=o&&new i(o,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}o(f,a),e.exports=f,f.prototype._mulA=function(e){return this.mOneA?e.redNeg():this.a.redMul(e)},f.prototype._mulC=function(e){return this.oneC?e:this.c.redMul(e)},f.prototype.jpoint=function(e,t,r,n){return this.point(e,t,r,n)},f.prototype.pointFromX=function(e,t){(e=new i(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr(),n=this.c2.redSub(this.a.redMul(r)),o=this.one.redSub(this.c2.redMul(this.d).redMul(r)),a=n.redMul(o.redInvm()),s=a.redSqrt();if(0!==s.redSqr().redSub(a).cmp(this.zero))throw new Error("invalid point");var f=s.fromRed().isOdd();return(t&&!f||!t&&f)&&(s=s.redNeg()),this.point(e,s)},f.prototype.pointFromY=function(e,t){(e=new i(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr(),n=r.redSub(this.c2),o=r.redMul(this.d).redMul(this.c2).redSub(this.a),a=n.redMul(o.redInvm());if(0===a.cmp(this.zero)){if(t)throw new Error("invalid point");return this.point(this.zero,e)}var s=a.redSqrt();if(0!==s.redSqr().redSub(a).cmp(this.zero))throw new Error("invalid point");return s.fromRed().isOdd()!==t&&(s=s.redNeg()),this.point(s,e)},f.prototype.validate=function(e){if(e.isInfinity())return!0;e.normalize();var t=e.x.redSqr(),r=e.y.redSqr(),n=t.redMul(this.a).redAdd(r),i=this.c2.redMul(this.one.redAdd(this.d.redMul(t).redMul(r)));return 0===n.cmp(i)},o(u,a.BasePoint),f.prototype.pointFromJSON=function(e){return u.fromJSON(this,e)},f.prototype.point=function(e,t,r,n){return new u(this,e,t,r,n)},u.fromJSON=function(e,t){return new u(e,t[0],t[1],t[2])},u.prototype.inspect=function(){return this.isInfinity()?"":""},u.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},u.prototype._extDbl=function(){var e=this.x.redSqr(),t=this.y.redSqr(),r=this.z.redSqr();r=r.redIAdd(r);var n=this.curve._mulA(e),i=this.x.redAdd(this.y).redSqr().redISub(e).redISub(t),o=n.redAdd(t),a=o.redSub(r),s=n.redSub(t),f=i.redMul(a),u=o.redMul(s),c=i.redMul(s),d=a.redMul(o);return this.curve.point(f,u,d,c)},u.prototype._projDbl=function(){var e,t,r,n,i,o,a=this.x.redAdd(this.y).redSqr(),s=this.x.redSqr(),f=this.y.redSqr();if(this.curve.twisted){var u=(n=this.curve._mulA(s)).redAdd(f);this.zOne?(e=a.redSub(s).redSub(f).redMul(u.redSub(this.curve.two)),t=u.redMul(n.redSub(f)),r=u.redSqr().redSub(u).redSub(u)):(i=this.z.redSqr(),o=u.redSub(i).redISub(i),e=a.redSub(s).redISub(f).redMul(o),t=u.redMul(n.redSub(f)),r=u.redMul(o))}else n=s.redAdd(f),i=this.curve._mulC(this.z).redSqr(),o=n.redSub(i).redSub(i),e=this.curve._mulC(a.redISub(n)).redMul(o),t=this.curve._mulC(n).redMul(s.redISub(f)),r=n.redMul(o);return this.curve.point(e,t,r)},u.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},u.prototype._extAdd=function(e){var t=this.y.redSub(this.x).redMul(e.y.redSub(e.x)),r=this.y.redAdd(this.x).redMul(e.y.redAdd(e.x)),n=this.t.redMul(this.curve.dd).redMul(e.t),i=this.z.redMul(e.z.redAdd(e.z)),o=r.redSub(t),a=i.redSub(n),s=i.redAdd(n),f=r.redAdd(t),u=o.redMul(a),c=s.redMul(f),d=o.redMul(f),l=a.redMul(s);return this.curve.point(u,c,l,d)},u.prototype._projAdd=function(e){var t,r,n=this.z.redMul(e.z),i=n.redSqr(),o=this.x.redMul(e.x),a=this.y.redMul(e.y),s=this.curve.d.redMul(o).redMul(a),f=i.redSub(s),u=i.redAdd(s),c=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(o).redISub(a),d=n.redMul(f).redMul(c);return this.curve.twisted?(t=n.redMul(u).redMul(a.redSub(this.curve._mulA(o))),r=f.redMul(u)):(t=n.redMul(u).redMul(a.redSub(o)),r=this.curve._mulC(f).redMul(u)),this.curve.point(d,t,r)},u.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)},u.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)},u.prototype.mulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!1)},u.prototype.jmulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!0)},u.prototype.normalize=function(){if(this.zOne)return this;var e=this.z.redInvm();return this.x=this.x.redMul(e),this.y=this.y.redMul(e),this.t&&(this.t=this.t.redMul(e)),this.z=this.curve.one,this.zOne=!0,this},u.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},u.prototype.getX=function(){return this.normalize(),this.x.fromRed()},u.prototype.getY=function(){return this.normalize(),this.y.fromRed()},u.prototype.eq=function(e){return this===e||0===this.getX().cmp(e.getX())&&0===this.getY().cmp(e.getY())},u.prototype.eqXToP=function(e){var t=e.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(t))return!0;for(var r=e.clone(),n=this.curve.redN.redMul(this.z);;){if(r.iadd(this.curve.n),r.cmp(this.curve.p)>=0)return!1;if(t.redIAdd(n),0===this.x.cmp(t))return!0}},u.prototype.toP=u.prototype.normalize,u.prototype.mixedAdd=u.prototype.add},function(e,t,r){"use strict";t.sha1=r(278),t.sha224=r(279),t.sha256=r(140),t.sha384=r(280),t.sha512=r(141)},function(e,t,r){"use strict";var n=r(25),i=r(60),o=r(139),a=n.rotl32,s=n.sum32,f=n.sum32_5,u=o.ft_1,c=i.BlockHash,d=[1518500249,1859775393,2400959708,3395469782];function l(){if(!(this instanceof l))return new l;c.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}n.inherits(l,c),e.exports=l,l.blockSize=512,l.outSize=160,l.hmacStrength=80,l.padLength=64,l.prototype._update=function(e,t){for(var r=this.W,n=0;n<16;n++)r[n]=e[t+n];for(;nthis.blockSize&&(e=(new this.Hash).update(e).digest()),i(e.length<=this.blockSize);for(var t=e.length;t0))return a.iaddn(1),this.keyFromPrivate(a)}},l.prototype._truncateToN=function(e,t){var r=8*e.byteLength()-this.n.bitLength();return r>0&&(e=e.ushrn(r)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e},l.prototype.sign=function(e,t,r,a){"object"===(0,n.default)(r)&&(a=r,r=null),a||(a={}),t=this.keyFromPrivate(t,r),e=this._truncateToN(new i(e,16));for(var s=this.n.byteLength(),f=t.getPrivate().toArray("be",s),u=e.toArray("be",s),c=new o({hash:this.hash,entropy:f,nonce:u,pers:a.pers,persEnc:a.persEnc||"utf8"}),l=this.n.sub(new i(1)),h=0;;h++){var p=a.k?a.k(h):new i(c.generate(this.n.byteLength()));if(!((p=this._truncateToN(p,!0)).cmpn(1)<=0||p.cmp(l)>=0)){var b=this.g.mul(p);if(!b.isInfinity()){var y=b.getX(),v=y.umod(this.n);if(0!==v.cmpn(0)){var m=p.invm(this.n).mul(v.mul(t.getPrivate()).iadd(e));if(0!==(m=m.umod(this.n)).cmpn(0)){var g=(b.getY().isOdd()?1:0)|(0!==y.cmp(v)?2:0);return a.canonical&&m.cmp(this.nh)>0&&(m=this.n.sub(m),g^=1),new d({r:v,s:m,recoveryParam:g})}}}}}},l.prototype.verify=function(e,t,r,n){e=this._truncateToN(new i(e,16)),r=this.keyFromPublic(r,n);var o=(t=new d(t,"hex")).r,a=t.s;if(o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;if(a.cmpn(1)<0||a.cmp(this.n)>=0)return!1;var s,f=a.invm(this.n),u=f.mul(e).umod(this.n),c=f.mul(o).umod(this.n);return this.curve._maxwellTrick?!(s=this.g.jmulAdd(u,r.getPublic(),c)).isInfinity()&&s.eqXToP(o):!(s=this.g.mulAdd(u,r.getPublic(),c)).isInfinity()&&0===s.getX().umod(this.n).cmp(o)},l.prototype.recoverPubKey=function(e,t,r,n){u((3&r)===r,"The recovery param is more than two bits"),t=new d(t,n);var o=this.n,a=new i(e),s=t.r,f=t.s,c=1&r,l=r>>1;if(s.cmp(this.curve.p.umod(this.curve.n))>=0&&l)throw new Error("Unable to find sencond key candinate");s=l?this.curve.pointFromX(s.add(this.curve.n),c):this.curve.pointFromX(s,c);var h=t.r.invm(o),p=o.sub(a).mul(h).umod(o),b=f.mul(h).umod(o);return this.g.mulAdd(p,s,b)},l.prototype.getKeyRecoveryParam=function(e,t,r,n){if(null!==(t=new d(t,n)).recoveryParam)return t.recoveryParam;for(var i=0;i<4;i++){var o;try{o=this.recoverPubKey(e,t,i)}catch(e){continue}if(o.eq(r))return i}throw new Error("Unable to find valid recovery factor")}},function(e,t,r){"use strict";var n=r(73),i=r(137),o=r(19);function a(e){if(!(this instanceof a))return new a(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var t=i.toArray(e.entropy,e.entropyEnc||"hex"),r=i.toArray(e.nonce,e.nonceEnc||"hex"),n=i.toArray(e.pers,e.persEnc||"hex");o(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,r,n)}e.exports=a,a.prototype._init=function(e,t,r){var n=e.concat(t).concat(r);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(r||[])),this._reseed=1},a.prototype.generate=function(e,t,r,n){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof t&&(n=r,r=t,t=null),r&&(r=i.toArray(r,n||"hex"),this._update(r));for(var o=[];o.length"}},function(e,t,r){"use strict";var n=r(3),i=r(18),o=i.assert;function a(e,t){if(e instanceof a)return e;this._importDER(e,t)||(o(e.r&&e.s,"Signature without r or s"),this.r=new n(e.r,16),this.s=new n(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}function s(){this.place=0}function f(e,t){var r=e[t.place++];if(!(128&r))return r;var n=15&r;if(0===n||n>4)return!1;for(var i=0,o=0,a=t.place;o>>=0;return!(i<=127)&&(t.place=a,i)}function u(e){for(var t=0,r=e.length-1;!e[t]&&!(128&e[t+1])&&t>>3);for(e.push(128|r);--r;)e.push(t>>>(r<<3)&255);e.push(t)}}e.exports=a,a.prototype._importDER=function(e,t){e=i.toArray(e,t);var r=new s;if(48!==e[r.place++])return!1;var o=f(e,r);if(!1===o)return!1;if(o+r.place!==e.length)return!1;if(2!==e[r.place++])return!1;var a=f(e,r);if(!1===a)return!1;var u=e.slice(r.place,a+r.place);if(r.place+=a,2!==e[r.place++])return!1;var c=f(e,r);if(!1===c)return!1;if(e.length!==c+r.place)return!1;var d=e.slice(r.place,c+r.place);if(0===u[0]){if(!(128&u[1]))return!1;u=u.slice(1)}if(0===d[0]){if(!(128&d[1]))return!1;d=d.slice(1)}return this.r=new n(u),this.s=new n(d),this.recoveryParam=null,!0},a.prototype.toDER=function(e){var t=this.r.toArray(),r=this.s.toArray();for(128&t[0]&&(t=[0].concat(t)),128&r[0]&&(r=[0].concat(r)),t=u(t),r=u(r);!(r[0]||128&r[1]);)r=r.slice(1);var n=[2];c(n,t.length),(n=n.concat(t)).push(2),c(n,r.length);var o=n.concat(r),a=[48];return c(a,o.length),a=a.concat(o),i.encode(a,e)}},function(e,t,r){"use strict";var n=r(73),i=r(93),o=r(18),a=o.assert,s=o.parseBytes,f=r(289),u=r(290);function c(e){if(a("ed25519"===e,"only tested with ed25519 so far"),!(this instanceof c))return new c(e);e=i[e].curve,this.curve=e,this.g=e.g,this.g.precompute(e.n.bitLength()+1),this.pointClass=e.point().constructor,this.encodingLength=Math.ceil(e.n.bitLength()/8),this.hash=n.sha512}e.exports=c,c.prototype.sign=function(e,t){e=s(e);var r=this.keyFromSecret(t),n=this.hashInt(r.messagePrefix(),e),i=this.g.mul(n),o=this.encodePoint(i),a=this.hashInt(o,r.pubBytes(),e).mul(r.priv()),f=n.add(a).umod(this.curve.n);return this.makeSignature({R:i,S:f,Rencoded:o})},c.prototype.verify=function(e,t,r){e=s(e),t=this.makeSignature(t);var n=this.keyFromPublic(r),i=this.hashInt(t.Rencoded(),n.pubBytes(),e),o=this.g.mul(t.S());return t.R().add(n.pub().mul(i)).eq(o)},c.prototype.hashInt=function(){for(var e=this.hash(),t=0;t0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r}},{key:"concat",value:function(e){if(0===this.length)return a.alloc(0);for(var t,r,n,i=a.allocUnsafe(e>>>0),o=this.head,s=0;o;)t=o.data,r=i,n=s,a.prototype.copy.call(t,r,n),s+=o.data.length,o=o.next;return i}},{key:"consume",value:function(e,t){var r;return ei.length?i.length:e;if(o===i.length?n+=i:n+=i.slice(0,e),0==(e-=o)){o===i.length?(++r,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=i.slice(o));break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(e){var t=a.allocUnsafe(e),r=this.head,n=1;for(r.data.copy(t),e-=r.data.length;r=r.next;){var i=r.data,o=e>i.length?i.length:e;if(i.copy(t,t.length-e,0,o),0==(e-=o)){o===i.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=i.slice(o));break}++n}return this.length-=n,t}},{key:f,value:function(e,t){return s(this,function(e){for(var t=1;t0,(function(e){n||(n=e),e&&a.forEach(u),o||(a.forEach(u),i(n))}))}));return t.reduce(c)}},function(e,t,r){"use strict";(function(t){var n=r(0),i=n(r(8)),o=n(r(9)),a=n(r(13)),s=n(r(14)),f=n(r(12));function u(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=(0,f.default)(e);if(t){var i=(0,f.default)(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return(0,s.default)(this,r)}}var c=r(144).Transform;e.exports=function(e){return function(r){(0,a.default)(s,r);var n=u(s);function s(t,r,o,a){var f;return(0,i.default)(this,s),(f=n.call(this,a))._rate=t,f._capacity=r,f._delimitedSuffix=o,f._options=a,f._state=new e,f._state.initialize(t,r),f._finalized=!1,f}return(0,o.default)(s,[{key:"_transform",value:function(e,t,r){var n=null;try{this.update(e,t)}catch(e){n=e}r(n)}},{key:"_flush",value:function(){}},{key:"_read",value:function(e){this.push(this.squeeze(e))}},{key:"update",value:function(e,r){if(!t.isBuffer(e)&&"string"!=typeof e)throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Squeeze already called");return t.isBuffer(e)||(e=t.from(e,r)),this._state.absorb(e),this}},{key:"squeeze",value:function(e,t){this._finalized||(this._finalized=!0,this._state.absorbLastFewBits(this._delimitedSuffix));var r=this._state.squeeze(e);return void 0!==t&&(r=r.toString(t)),r}},{key:"_resetState",value:function(){return this._state.initialize(this._rate,this._capacity),this}},{key:"_clone",value:function(){var e=new s(this._rate,this._capacity,this._delimitedSuffix,this._options);return this._state.copy(e._state),e._finalized=this._finalized,e}}]),s}(c)}}).call(this,r(1).Buffer)},function(e,t,r){"use strict";(function(t){var n=r(306);function i(){this.state=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this.blockSize=null,this.count=0,this.squeezing=!1}i.prototype.initialize=function(e,t){for(var r=0;r<50;++r)this.state[r]=0;this.blockSize=e/8,this.count=0,this.squeezing=!1},i.prototype.absorb=function(e){for(var t=0;t>>this.count%4*8&255,this.count+=1,this.count===this.blockSize&&(n.p1600(this.state),this.count=0);return r},i.prototype.copy=function(e){for(var t=0;t<50;++t)e.state[t]=this.state[t];e.blockSize=this.blockSize,e.count=this.count,e.squeezing=this.squeezing},e.exports=i}).call(this,r(1).Buffer)},function(e,t,r){"use strict";var n=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648];t.p1600=function(e){for(var t=0;t<24;++t){var r=e[0]^e[10]^e[20]^e[30]^e[40],i=e[1]^e[11]^e[21]^e[31]^e[41],o=e[2]^e[12]^e[22]^e[32]^e[42],a=e[3]^e[13]^e[23]^e[33]^e[43],s=e[4]^e[14]^e[24]^e[34]^e[44],f=e[5]^e[15]^e[25]^e[35]^e[45],u=e[6]^e[16]^e[26]^e[36]^e[46],c=e[7]^e[17]^e[27]^e[37]^e[47],d=e[8]^e[18]^e[28]^e[38]^e[48],l=e[9]^e[19]^e[29]^e[39]^e[49],h=d^(o<<1|a>>>31),p=l^(a<<1|o>>>31),b=e[0]^h,y=e[1]^p,v=e[10]^h,m=e[11]^p,g=e[20]^h,w=e[21]^p,_=e[30]^h,k=e[31]^p,S=e[40]^h,A=e[41]^p;h=r^(s<<1|f>>>31),p=i^(f<<1|s>>>31);var E=e[2]^h,x=e[3]^p,P=e[12]^h,O=e[13]^p,R=e[22]^h,T=e[23]^p,M=e[32]^h,I=e[33]^p,B=e[42]^h,C=e[43]^p;h=o^(u<<1|c>>>31),p=a^(c<<1|u>>>31);var j=e[4]^h,U=e[5]^p,N=e[14]^h,L=e[15]^p,F=e[24]^h,D=e[25]^p,q=e[34]^h,z=e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^~Qe&be,e[11]=ze^~et&ye,e[20]=_e^~Be&Ge,e[21]=ke^~Ce&Ve,e[30]=Ye^~he&Ee,e[31]=$e^~pe&xe,e[40]=Me^~He&tt,e[41]=Ie^~Ke&rt,e[2]=Se^~je&We,e[3]=Ae^~Ue&Je,e[12]=Qe^~be&Pe,e[13]=et^~ye&Oe,e[22]=Be^~Ge&nt,e[23]=Ce^~Ve&it,e[32]=he^~Ee&Ne,e[33]=pe^~xe&Le,e[42]=He^~tt&ve,e[43]=Ke^~rt&me,e[4]=je^~We&ot,e[5]=Ue^~Je&at,e[14]=be^~Pe&Fe,e[15]=ye^~Oe&De,e[24]=Ge^~nt&ge,e[25]=Ve^~it&we,e[34]=Ee^~Ne&Xe,e[35]=xe^~Le&Ze,e[44]=tt^~ve&Re,e[45]=rt^~me&Te,e[6]=We^~ot&de,e[7]=Je^~at&le,e[16]=Pe^~Fe&qe,e[17]=Oe^~De&ze,e[26]=nt^~ge&_e,e[27]=it^~we&ke,e[36]=Ne^~Xe&Ye,e[37]=Le^~Ze&$e,e[46]=ve^~Re&Me,e[47]=me^~Te&Ie,e[8]=ot^~de&Se,e[9]=at^~le&Ae,e[18]=Fe^~qe&Qe,e[19]=De^~ze&et,e[28]=ge^~_e&Be,e[29]=we^~ke&Ce,e[38]=Xe^~Ye&he,e[39]=Ze^~$e&pe,e[48]=Re^~Me&He,e[49]=Te^~Ie&Ke,e[0]^=n[2*t],e[1]^=n[2*t+1]}}},function(e,t,r){"use strict";(t=e.exports=r(152)).Stream=t,t.Readable=t,t.Writable=r(156),t.Duplex=r(47),t.Transform=r(157),t.PassThrough=r(313),t.finished=r(97),t.pipeline=r(314)},function(e,t){},function(e,t,r){"use strict";function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){for(var r=0;r0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r}},{key:"concat",value:function(e){if(0===this.length)return a.alloc(0);for(var t,r,n,i=a.allocUnsafe(e>>>0),o=this.head,s=0;o;)t=o.data,r=i,n=s,a.prototype.copy.call(t,r,n),s+=o.data.length,o=o.next;return i}},{key:"consume",value:function(e,t){var r;return ei.length?i.length:e;if(o===i.length?n+=i:n+=i.slice(0,e),0==(e-=o)){o===i.length?(++r,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=i.slice(o));break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(e){var t=a.allocUnsafe(e),r=this.head,n=1;for(r.data.copy(t),e-=r.data.length;r=r.next;){var i=r.data,o=e>i.length?i.length:e;if(i.copy(t,t.length-e,0,o),0==(e-=o)){o===i.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=i.slice(o));break}++n}return this.length-=n,t}},{key:f,value:function(e,t){return s(this,function(e){for(var t=1;t0,(function(e){n||(n=e),e&&a.forEach(u),o||(a.forEach(u),i(n))}))}));return t.reduce(c)}},function(e,t,r){"use strict";var n=r(4),i=r(48),o=r(5).Buffer,a=[1518500249,1859775393,-1894007588,-899497514],s=new Array(80);function f(){this.init(),this._w=s,i.call(this,64,56)}function u(e){return e<<30|e>>>2}function c(e,t,r,n){return 0===e?t&r|~t&n:2===e?t&r|t&n|r&n:t^r^n}n(f,i),f.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},f.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,s=0|this._d,f=0|this._e,d=0;d<16;++d)r[d]=e.readInt32BE(4*d);for(;d<80;++d)r[d]=r[d-3]^r[d-8]^r[d-14]^r[d-16];for(var l=0;l<80;++l){var h=~~(l/20),p=0|((t=n)<<5|t>>>27)+c(h,i,o,s)+f+r[l]+a[h];f=s,s=o,o=u(i),i=n,n=p}this._a=n+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=s+this._d|0,this._e=f+this._e|0},f.prototype._hash=function(){var e=o.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},e.exports=f},function(e,t,r){"use strict";var n=r(4),i=r(48),o=r(5).Buffer,a=[1518500249,1859775393,-1894007588,-899497514],s=new Array(80);function f(){this.init(),this._w=s,i.call(this,64,56)}function u(e){return e<<5|e>>>27}function c(e){return e<<30|e>>>2}function d(e,t,r,n){return 0===e?t&r|~t&n:2===e?t&r|t&n|r&n:t^r^n}n(f,i),f.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},f.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,s=0|this._d,f=0|this._e,l=0;l<16;++l)r[l]=e.readInt32BE(4*l);for(;l<80;++l)r[l]=(t=r[l-3]^r[l-8]^r[l-14]^r[l-16])<<1|t>>>31;for(var h=0;h<80;++h){var p=~~(h/20),b=u(n)+d(p,i,o,s)+f+r[h]+a[p]|0;f=s,s=o,o=c(i),i=n,n=b}this._a=n+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=s+this._d|0,this._e=f+this._e|0},f.prototype._hash=function(){var e=o.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},e.exports=f},function(e,t,r){"use strict";var n=r(4),i=r(158),o=r(48),a=r(5).Buffer,s=new Array(64);function f(){this.init(),this._w=s,o.call(this,64,56)}n(f,i),f.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},f.prototype._hash=function(){var e=a.allocUnsafe(28);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e},e.exports=f},function(e,t,r){"use strict";var n=r(4),i=r(159),o=r(48),a=r(5).Buffer,s=new Array(160);function f(){this.init(),this._w=s,o.call(this,128,112)}n(f,i),f.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},f.prototype._hash=function(){var e=a.allocUnsafe(48);function t(t,r,n){e.writeInt32BE(t,n),e.writeInt32BE(r,n+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),e},e.exports=f},function(e,t){},function(e,t,r){"use strict";var n=r(100).Buffer,i=r(321);e.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},e.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},e.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r},e.prototype.concat=function(e){if(0===this.length)return n.alloc(0);if(1===this.length)return this.head.data;for(var t,r,i,o=n.allocUnsafe(e>>>0),a=this.head,s=0;a;)t=a.data,r=o,i=s,t.copy(r,i),s+=a.data.length,a=a.next;return o},e}(),i&&i.inspect&&i.inspect.custom&&(e.exports.prototype[i.inspect.custom]=function(){var e=i.inspect({length:this.length});return this.constructor.name+" "+e})},function(e,t){},function(e,t,r){"use strict";(function(e,t){!function(e,r){if(!e.setImmediate){var n,i,o,a,s,f=1,u={},c=!1,d=e.document,l=Object.getPrototypeOf&&Object.getPrototypeOf(e);l=l&&l.setTimeout?l:e,"[object process]"==={}.toString.call(e.process)?n=function(e){t.nextTick((function(){p(e)}))}:!function(){if(e.postMessage&&!e.importScripts){var t=!0,r=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=r,t}}()?e.MessageChannel?((o=new MessageChannel).port1.onmessage=function(e){p(e.data)},n=function(e){o.port2.postMessage(e)}):d&&"onreadystatechange"in d.createElement("script")?(i=d.documentElement,n=function(e){var t=d.createElement("script");t.onreadystatechange=function(){p(e),t.onreadystatechange=null,i.removeChild(t),t=null},i.appendChild(t)}):n=function(e){setTimeout(p,0,e)}:(a="setImmediate$"+Math.random()+"$",s=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(a)&&p(+t.data.slice(a.length))},e.addEventListener?e.addEventListener("message",s,!1):e.attachEvent("onmessage",s),n=function(t){e.postMessage(a+t,"*")}),l.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),r=0;r28&&o%2==1||1===o||28===o)&&((s=e.from(n))[0]|=128),(0,a.bufferToHex)(e.concat([(0,a.setLengthLeft)(r,32),(0,a.setLengthLeft)(s,32)]))};t.fromRpcSig=function(e){var t,r,n,i=(0,a.toBuffer)(e);if(i.length>=65)t=i.slice(0,32),r=i.slice(32,64),n=(0,a.bufferToInt)(i.slice(64));else{if(64!==i.length)throw new Error("Invalid signature length");t=i.slice(0,32),r=i.slice(32,64),n=(0,a.bufferToInt)(i.slice(32,33))>>7,r[0]&=127}return n<27&&(n+=27),{v:n,r:t,s:r}};t.isValidSignature=function(e,t,r,n,i){void 0===n&&(n=!0);var a=new o.default("7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0",16),s=new o.default("fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141",16);if(32!==t.length||32!==r.length)return!1;if(!d(c(e,i)))return!1;var f=new o.default(t),u=new o.default(r);return!(f.isZero()||f.gt(s)||u.isZero()||u.gt(s))&&(!n||1!==u.cmp(a))};t.hashPersonalMessage=function(t){(0,f.assertIsBuffer)(t);var r=e.from("Ethereum Signed Message:\n"+t.length,"utf-8");return(0,s.keccak)(e.concat([r,t]))}}).call(this,r(1).Buffer)},function(e,t,r){"use strict";(function(e){var n=r(0)(r(2)),i=Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]},o=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&i(t,e,r);return o(t,e),t},s=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.defineProperties=void 0;var f=s(r(41)),u=r(42),c=a(r(71)),d=r(34);t.defineProperties=function(t,r,i){if(t.raw=[],t._fields=[],t.toJSON=function(e){if(void 0===e&&(e=!1),e){var r={};return t._fields.forEach((function(e){r[e]="0x"+t[e].toString("hex")})),r}return(0,d.baToJSON)(t.raw)},t.serialize=function(){return c.encode(t.raw)},r.forEach((function(r,n){function i(){return t.raw[n]}function o(i){"00"!==(i=(0,d.toBuffer)(i)).toString("hex")||r.allowZero||(i=e.allocUnsafe(0)),r.allowLess&&r.length?(i=(0,d.unpadBuffer)(i),(0,f.default)(r.length>=i.length,"The field "+r.name+" must not have more "+r.length+" bytes")):r.allowZero&&0===i.length||!r.length||(0,f.default)(r.length===i.length,"The field "+r.name+" must have byte length of "+r.length),t.raw[n]=i}t._fields.push(r.name),Object.defineProperty(t,r.name,{enumerable:!0,configurable:!0,get:i,set:o}),r.default&&(t[r.name]=r.default),r.alias&&Object.defineProperty(t,r.alias,{enumerable:!1,configurable:!0,set:o,get:i})})),i)if("string"==typeof i&&(i=e.from((0,u.stripHexPrefix)(i),"hex")),e.isBuffer(i)&&(i=c.decode(i)),Array.isArray(i)){if(i.length>t._fields.length)throw new Error("wrong number of fields in data");i.forEach((function(e,r){t[t._fields[r]]=(0,d.toBuffer)(e)}))}else{if("object"!==(0,n.default)(i))throw new Error("invalid data");var o=Object.keys(i);r.forEach((function(e){-1!==o.indexOf(e.name)&&(t[e.name]=i[e.name]),-1!==o.indexOf(e.alias)&&(t[e.alias]=i[e.alias])}))}}}).call(this,r(1).Buffer)},function(e,t,r){"use strict";var n=Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]},i=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t},a=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.rlp=t.BN=void 0;var s=a(r(3));t.BN=s.default;var f=o(r(71));t.rlp=f},function(e,t,r){"use strict";var n=r(0)(r(2));Object.defineProperty(t,"__esModule",{value:!0});var i=r(333);function o(e){return"string"==typeof e&&(!!/^(0x)?[0-9a-f]{512}$/i.test(e)&&!(!/^(0x)?[0-9a-f]{512}$/.test(e)&&!/^(0x)?[0-9A-F]{512}$/.test(e)))}function a(e,t){"object"===(0,n.default)(t)&&t.constructor===Uint8Array&&(t=i.bytesToHex(t));for(var r=i.keccak256(t).replace("0x",""),o=0;o<12;o+=4){var a=(parseInt(r.substr(o,2),16)<<8)+parseInt(r.substr(o+2,2),16)&2047,f=1<=48&&e<=57)return e-48;if(e>=65&&e<=70)return e-55;if(e>=97&&e<=102)return e-87;throw new Error("invalid bloom")}function f(e){return"string"==typeof e&&(!!/^(0x)?[0-9a-f]{64}$/i.test(e)&&!(!/^(0x)?[0-9a-f]{64}$/.test(e)&&!/^(0x)?[0-9A-F]{64}$/.test(e)))}function u(e){return"string"==typeof e&&(!!e.match(/^(0x)?[0-9a-fA-F]{40}$/)||!!e.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/))}t.isBloom=o,t.isInBloom=a,t.isUserEthereumAddressInBloom=function(e,t){if(!o(e))throw new Error("Invalid bloom given");if(!u(t))throw new Error('Invalid ethereum address given: "'.concat(t,'"'));return a(e,i.padLeft(t,64))},t.isContractAddressInBloom=function(e,t){if(!o(e))throw new Error("Invalid bloom given");if(!u(t))throw new Error('Invalid contract address given: "'.concat(t,'"'));return a(e,t)},t.isTopicInBloom=function(e,t){if(!o(e))throw new Error("Invalid bloom given");if(!f(t))throw new Error("Invalid topic");return a(e,t)},t.isTopic=f,t.isAddress=u},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(334);function i(e){if(null==e)throw new Error("cannot convert null value to array");if("string"==typeof e){var t=e.match(/^(0x)?[0-9a-fA-F]*$/);if(!t)throw new Error("invalid hexidecimal string");if("0x"!==t[1])throw new Error("hex string must have 0x prefix");(e=e.substring(2)).length%2&&(e="0"+e);for(var r=[],n=0;n=256||parseInt(String(r))!=r)return!1}return!0}(e))return o(new Uint8Array(e));throw new Error("invalid arrayify value")}function o(e){var t=arguments;return void 0!==e.slice||(e.slice=function(){var r=Array.prototype.slice.call(t);return o(new Uint8Array(Array.prototype.slice.apply(e,r)))}),e}t.keccak256=function(e){return"0x"+n.keccak_256(i(e))},t.padLeft=function(e,t){var r=/^0x/i.test(e)||"number"==typeof e,n=t-(e=e.toString().replace(/^0x/i,"")).length+1>=0?t-e.length+1:0;return(r?"0x":"")+new Array(n).join("0")+e},t.bytesToHex=function(e){for(var t=[],r=0;r>>4).toString(16)),t.push((15&e[r]).toString(16));return"0x".concat(t.join("").replace(/^0+/,""))},t.toByteArray=i},function(e,t,r){"use strict";(function(e,n,i){var o,a=r(0)(r(2)); +/** + * [js-sha3]{@link https://github.com/emn178/js-sha3} + * + * @version 0.8.0 + * @author Chen, Yi-Cyuan [emn178@gmail.com] + * @copyright Chen, Yi-Cyuan 2015-2018 + * @license MIT + */ +!function(){var s="input is invalid type",f="object"===("undefined"==typeof window?"undefined":(0,a.default)(window)),u=f?window:{};u.JS_SHA3_NO_WINDOW&&(f=!1);var c=!f&&"object"===("undefined"==typeof self?"undefined":(0,a.default)(self));!u.JS_SHA3_NO_NODE_JS&&"object"===(void 0===e?"undefined":(0,a.default)(e))&&e.versions&&e.versions.node?u=n:c&&(u=self);var d=!u.JS_SHA3_NO_COMMON_JS&&"object"===(0,a.default)(i)&&i.exports,l=r(63),h=!u.JS_SHA3_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,p="0123456789abcdef".split(""),b=[4,1024,262144,67108864],y=[0,8,16,24],v=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],m=[224,256,384,512],g=[128,256],w=["hex","buffer","arrayBuffer","array","digest"],_={128:168,256:136};!u.JS_SHA3_NO_NODE_JS&&Array.isArray||(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),!h||!u.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(e){return"object"===(0,a.default)(e)&&e.buffer&&e.buffer.constructor===ArrayBuffer});for(var k=function(e,t,r){return function(n){return new N(e,t,e).update(n)[r]()}},S=function(e,t,r){return function(n,i){return new N(e,t,i).update(n)[r]()}},A=function(e,t,r){return function(t,n,i,o){return R["cshake"+e].update(t,n,i,o)[r]()}},E=function(e,t,r){return function(t,n,i,o){return R["kmac"+e].update(t,n,i,o)[r]()}},x=function(e,t,r,n){for(var i=0;i>5,this.byteCount=this.blockCount<<2,this.outputBlocks=r>>5,this.extraBytes=(31&r)>>3;for(var n=0;n<50;++n)this.s[n]=0}function L(e,t,r){N.call(this,e,t,r)}N.prototype.update=function(e){if(this.finalized)throw new Error("finalize already called");var t,r=(0,a.default)(e);if("string"!==r){if("object"!==r)throw new Error(s);if(null===e)throw new Error(s);if(h&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||h&&ArrayBuffer.isView(e)))throw new Error(s);t=!0}for(var n,i,o=this.blocks,f=this.byteCount,u=e.length,c=this.blockCount,d=0,l=this.s;d>2]|=e[d]<>2]|=i<>2]|=(192|i>>6)<>2]|=(128|63&i)<=57344?(o[n>>2]|=(224|i>>12)<>2]|=(128|i>>6&63)<>2]|=(128|63&i)<>2]|=(240|i>>18)<>2]|=(128|i>>12&63)<>2]|=(128|i>>6&63)<>2]|=(128|63&i)<=f){for(this.start=n-f,this.block=o[c],n=0;n>=8);r>0;)i.unshift(r),r=255&(e>>=8),++n;return t?i.push(n):i.unshift(n),this.update(i),i.length},N.prototype.encodeString=function(e){var t,r=(0,a.default)(e);if("string"!==r){if("object"!==r)throw new Error(s);if(null===e)throw new Error(s);if(h&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||h&&ArrayBuffer.isView(e)))throw new Error(s);t=!0}var n=0,i=e.length;if(t)n=i;else for(var o=0;o=57344?n+=3:(f=65536+((1023&f)<<10|1023&e.charCodeAt(++o)),n+=4)}return n+=this.encode(8*n),this.update(e),n},N.prototype.bytepad=function(e,t){for(var r=this.encode(t),n=0;n>2]|=this.padding[3&t],this.lastByteIndex===this.byteCount)for(e[0]=e[r],t=1;t>4&15]+p[15&e]+p[e>>12&15]+p[e>>8&15]+p[e>>20&15]+p[e>>16&15]+p[e>>28&15]+p[e>>24&15];a%t==0&&(F(r),o=0)}return i&&(e=r[o],s+=p[e>>4&15]+p[15&e],i>1&&(s+=p[e>>12&15]+p[e>>8&15]),i>2&&(s+=p[e>>20&15]+p[e>>16&15])),s},N.prototype.arrayBuffer=function(){this.finalize();var e,t=this.blockCount,r=this.s,n=this.outputBlocks,i=this.extraBytes,o=0,a=0,s=this.outputBits>>3;e=i?new ArrayBuffer(n+1<<2):new ArrayBuffer(s);for(var f=new Uint32Array(e);a>8&255,f[e+2]=t>>16&255,f[e+3]=t>>24&255;s%r==0&&F(n)}return o&&(e=s<<2,t=n[a],f[e]=255&t,o>1&&(f[e+1]=t>>8&255),o>2&&(f[e+2]=t>>16&255)),f},L.prototype=new N,L.prototype.finalize=function(){return this.encode(this.outputBits,!0),N.prototype.finalize.call(this)};var F=function(e){var t,r,n,i,o,a,s,f,u,c,d,l,h,p,b,y,m,g,w,_,k,S,A,E,x,P,O,R,T,M,I,B,C,j,U,N,L,F,D,q,z,H,K,G,V,W,J,X,Z,Y,$,Q,ee,te,re,ne,ie,oe,ae,se,fe,ue,ce;for(n=0;n<48;n+=2)i=e[0]^e[10]^e[20]^e[30]^e[40],o=e[1]^e[11]^e[21]^e[31]^e[41],a=e[2]^e[12]^e[22]^e[32]^e[42],s=e[3]^e[13]^e[23]^e[33]^e[43],f=e[4]^e[14]^e[24]^e[34]^e[44],u=e[5]^e[15]^e[25]^e[35]^e[45],c=e[6]^e[16]^e[26]^e[36]^e[46],d=e[7]^e[17]^e[27]^e[37]^e[47],t=(l=e[8]^e[18]^e[28]^e[38]^e[48])^(a<<1|s>>>31),r=(h=e[9]^e[19]^e[29]^e[39]^e[49])^(s<<1|a>>>31),e[0]^=t,e[1]^=r,e[10]^=t,e[11]^=r,e[20]^=t,e[21]^=r,e[30]^=t,e[31]^=r,e[40]^=t,e[41]^=r,t=i^(f<<1|u>>>31),r=o^(u<<1|f>>>31),e[2]^=t,e[3]^=r,e[12]^=t,e[13]^=r,e[22]^=t,e[23]^=r,e[32]^=t,e[33]^=r,e[42]^=t,e[43]^=r,t=a^(c<<1|d>>>31),r=s^(d<<1|c>>>31),e[4]^=t,e[5]^=r,e[14]^=t,e[15]^=r,e[24]^=t,e[25]^=r,e[34]^=t,e[35]^=r,e[44]^=t,e[45]^=r,t=f^(l<<1|h>>>31),r=u^(h<<1|l>>>31),e[6]^=t,e[7]^=r,e[16]^=t,e[17]^=r,e[26]^=t,e[27]^=r,e[36]^=t,e[37]^=r,e[46]^=t,e[47]^=r,t=c^(i<<1|o>>>31),r=d^(o<<1|i>>>31),e[8]^=t,e[9]^=r,e[18]^=t,e[19]^=r,e[28]^=t,e[29]^=r,e[38]^=t,e[39]^=r,e[48]^=t,e[49]^=r,p=e[0],b=e[1],W=e[11]<<4|e[10]>>>28,J=e[10]<<4|e[11]>>>28,R=e[20]<<3|e[21]>>>29,T=e[21]<<3|e[20]>>>29,se=e[31]<<9|e[30]>>>23,fe=e[30]<<9|e[31]>>>23,H=e[40]<<18|e[41]>>>14,K=e[41]<<18|e[40]>>>14,j=e[2]<<1|e[3]>>>31,U=e[3]<<1|e[2]>>>31,y=e[13]<<12|e[12]>>>20,m=e[12]<<12|e[13]>>>20,X=e[22]<<10|e[23]>>>22,Z=e[23]<<10|e[22]>>>22,M=e[33]<<13|e[32]>>>19,I=e[32]<<13|e[33]>>>19,ue=e[42]<<2|e[43]>>>30,ce=e[43]<<2|e[42]>>>30,te=e[5]<<30|e[4]>>>2,re=e[4]<<30|e[5]>>>2,N=e[14]<<6|e[15]>>>26,L=e[15]<<6|e[14]>>>26,g=e[25]<<11|e[24]>>>21,w=e[24]<<11|e[25]>>>21,Y=e[34]<<15|e[35]>>>17,$=e[35]<<15|e[34]>>>17,B=e[45]<<29|e[44]>>>3,C=e[44]<<29|e[45]>>>3,E=e[6]<<28|e[7]>>>4,x=e[7]<<28|e[6]>>>4,ne=e[17]<<23|e[16]>>>9,ie=e[16]<<23|e[17]>>>9,F=e[26]<<25|e[27]>>>7,D=e[27]<<25|e[26]>>>7,_=e[36]<<21|e[37]>>>11,k=e[37]<<21|e[36]>>>11,Q=e[47]<<24|e[46]>>>8,ee=e[46]<<24|e[47]>>>8,G=e[8]<<27|e[9]>>>5,V=e[9]<<27|e[8]>>>5,P=e[18]<<20|e[19]>>>12,O=e[19]<<20|e[18]>>>12,oe=e[29]<<7|e[28]>>>25,ae=e[28]<<7|e[29]>>>25,q=e[38]<<8|e[39]>>>24,z=e[39]<<8|e[38]>>>24,S=e[48]<<14|e[49]>>>18,A=e[49]<<14|e[48]>>>18,e[0]=p^~y&g,e[1]=b^~m&w,e[10]=E^~P&R,e[11]=x^~O&T,e[20]=j^~N&F,e[21]=U^~L&D,e[30]=G^~W&X,e[31]=V^~J&Z,e[40]=te^~ne&oe,e[41]=re^~ie&ae,e[2]=y^~g&_,e[3]=m^~w&k,e[12]=P^~R&M,e[13]=O^~T&I,e[22]=N^~F&q,e[23]=L^~D&z,e[32]=W^~X&Y,e[33]=J^~Z&$,e[42]=ne^~oe&se,e[43]=ie^~ae&fe,e[4]=g^~_&S,e[5]=w^~k&A,e[14]=R^~M&B,e[15]=T^~I&C,e[24]=F^~q&H,e[25]=D^~z&K,e[34]=X^~Y&Q,e[35]=Z^~$&ee,e[44]=oe^~se&ue,e[45]=ae^~fe&ce,e[6]=_^~S&p,e[7]=k^~A&b,e[16]=M^~B&E,e[17]=I^~C&x,e[26]=q^~H&j,e[27]=z^~K&U,e[36]=Y^~Q&G,e[37]=$^~ee&V,e[46]=se^~ue&te,e[47]=fe^~ce&re,e[8]=S^~p&y,e[9]=A^~b&m,e[18]=B^~E&P,e[19]=C^~x&O,e[28]=H^~j&N,e[29]=K^~U&L,e[38]=Q^~G&W,e[39]=ee^~V&J,e[48]=ue^~te&ne,e[49]=ce^~re&ie,e[0]^=v[n],e[1]^=v[n+1]};if(d)i.exports=R;else{for(M=0;M32||n256)throw new Error("Invalid uint"+n+" size");if((s=a(t)).bitLength()>n)throw new Error("Supplied uint exceeds width: "+n+" vs "+s.bitLength());if(s.lt(new i(0)))throw new Error("Supplied uint "+s.toString()+" is negative");return n?o.leftPad(s.toString("hex"),n/8*2):s}if(e.startsWith("int")){if(n%8||n<8||n>256)throw new Error("Invalid int"+n+" size");if((s=a(t)).bitLength()>n)throw new Error("Supplied int exceeds width: "+n+" vs "+s.bitLength());return s.lt(new i(0))?s.toTwos(n).toString("hex"):n?o.leftPad(s.toString("hex"),n/8*2):s}throw new Error("Unsupported or invalid type: "+e)},f=function(e){if(Array.isArray(e))throw new Error("Autodetection of array types is not supported.");var t,r,a="";if(e&&"object"===(0,n.default)(e)&&(e.hasOwnProperty("v")||e.hasOwnProperty("t")||e.hasOwnProperty("value")||e.hasOwnProperty("type"))?(t=e.hasOwnProperty("t")?e.t:e.type,a=e.hasOwnProperty("v")?e.v:e.value):(t=o.toHex(e,!0),a=o.toHex(e),t.startsWith("int")||t.startsWith("uint")||(t="bytes")),!t.startsWith("int")&&!t.startsWith("uint")||"string"!=typeof a||/^(-)?0x/i.test(a)||(a=new i(a)),Array.isArray(a)){if((r=function(e){var t=/^\D+\d*\[(\d+)\]$/.exec(e);return t?parseInt(t[1],10):null}(t))&&a.length!==r)throw new Error(t+" is not matching the given array "+JSON.stringify(a));r=a.length}return Array.isArray(a)?a.map((function(e){return s(t,e,r).toString("hex").replace("0x","")})).join(""):s(t,a,r).toString("hex").replace("0x","")};e.exports={soliditySha3:function(){var e=Array.prototype.slice.call(arguments),t=e.map(f);return o.sha3("0x"+t.join(""))},soliditySha3Raw:function(){return o.sha3Raw("0x"+Array.prototype.slice.call(arguments).map(f).join(""))},encodePacked:function(){var e=Array.prototype.slice.call(arguments),t=e.map(f);return"0x"+t.join("").toLowerCase()}}},function(e,t,r){"use strict";var n=r(167),i=r(11).errors,o=function(e){this.requestManager=e,this.requests=[]};o.prototype.add=function(e){this.requests.push(e)},o.prototype.execute=function(){var e=this.requests,t=this._sortResponses.bind(this);this.requestManager.sendBatch(e,(function(r,o){o=t(o),e.map((function(e,t){return o[t]||{}})).forEach((function(t,r){if(e[r].callback){if(t&&t.error)return e[r].callback(i.ErrorResponse(t));if(!n.isValidResponse(t))return e[r].callback(i.InvalidResponse(t));try{e[r].callback(null,e[r].format?e[r].format(t.result):t.result)}catch(t){e[r].callback(t)}}}))}))},o.prototype._sortResponses=function(e){return(e||[]).sort((function(e,t){return e.id-t.id}))},e.exports=o},function(e,t,r){"use strict";var n=r(0)(r(2)),i=null,o="object"===("undefined"==typeof globalThis?"undefined":(0,n.default)(globalThis))?globalThis:void 0;if(!o)try{o=Function("return this")()}catch(e){o=self}void 0!==o.ethereum?i=o.ethereum:void 0!==o.web3&&o.web3.currentProvider&&(o.web3.currentProvider.sendAsync&&(o.web3.currentProvider.send=o.web3.currentProvider.sendAsync,delete o.web3.currentProvider.sendAsync),!o.web3.currentProvider.on&&o.web3.currentProvider.connection&&"ipcProviderWrapper"===o.web3.currentProvider.connection.constructor.name&&(o.web3.currentProvider.on=function(e,t){if("function"!=typeof t)throw new Error("The second parameter callback must be a function.");switch(e){case"data":this.connection.on("data",(function(e){var r="";e=e.toString();try{r=JSON.parse(e)}catch(r){return t(new Error("Couldn't parse response data"+e))}r.id||-1===r.method.indexOf("_subscription")||t(null,r)}));break;default:this.connection.on(e,t)}}),i=o.web3.currentProvider),e.exports=i},function(e,t,r){"use strict";var n=r(103),i=r(339),o=r(11).errors,a=r(344).w3cwebsocket,s=function(e,t){n.call(this),t=t||{},this.url=e,this._customTimeout=t.timeout||15e3,this.headers=t.headers||{},this.protocol=t.protocol||void 0,this.reconnectOptions=Object.assign({auto:!1,delay:5e3,maxAttempts:!1,onTimeout:!1},t.reconnect),this.clientConfig=t.clientConfig||void 0,this.requestOptions=t.requestOptions||void 0,this.DATA="data",this.CLOSE="close",this.ERROR="error",this.CONNECT="connect",this.RECONNECT="reconnect",this.connection=null,this.requestQueue=new Map,this.responseQueue=new Map,this.reconnectAttempts=0,this.reconnecting=!1;var r=i.parseURL(e);r.username&&r.password&&(this.headers.authorization="Basic "+i.btoa(r.username+":"+r.password)),r.auth&&(this.headers.authorization="Basic "+i.btoa(r.auth)),Object.defineProperty(this,"connected",{get:function(){return this.connection&&this.connection.readyState===this.connection.OPEN},enumerable:!0}),this.connect()};(s.prototype=Object.create(n.prototype)).constructor=s,s.prototype.connect=function(){this.connection=new a(this.url,this.protocol,void 0,this.headers,this.requestOptions,this.clientConfig),this._addSocketListeners()},s.prototype._onMessage=function(e){var t=this;this._parseResponse("string"==typeof e.data?e.data:"").forEach((function(e){if(e.method&&-1!==e.method.indexOf("_subscription"))t.emit(t.DATA,e);else{var r=e.id;Array.isArray(e)&&(r=e[0].id),t.responseQueue.has(r)&&(void 0!==t.responseQueue.get(r).callback&&t.responseQueue.get(r).callback(!1,e),t.responseQueue.delete(r))}}))},s.prototype._onConnect=function(){if(this.emit(this.CONNECT),this.reconnectAttempts=0,this.reconnecting=!1,this.requestQueue.size>0){var e=this;this.requestQueue.forEach((function(t,r){e.send(t.payload,t.callback),e.requestQueue.delete(r)}))}},s.prototype._onClose=function(e){var t=this;!this.reconnectOptions.auto||[1e3,1001].includes(e.code)&&!1!==e.wasClean?(this.emit(this.CLOSE,e),this.requestQueue.size>0&&this.requestQueue.forEach((function(r,n){r.callback(o.ConnectionNotOpenError(e)),t.requestQueue.delete(n)})),this.responseQueue.size>0&&this.responseQueue.forEach((function(r,n){r.callback(o.InvalidConnection("on WS",e)),t.responseQueue.delete(n)})),this._removeSocketListeners(),this.removeAllListeners()):this.reconnect()},s.prototype._addSocketListeners=function(){this.connection.addEventListener("message",this._onMessage.bind(this)),this.connection.addEventListener("open",this._onConnect.bind(this)),this.connection.addEventListener("close",this._onClose.bind(this))},s.prototype._removeSocketListeners=function(){this.connection.removeEventListener("message",this._onMessage),this.connection.removeEventListener("open",this._onConnect),this.connection.removeEventListener("close",this._onClose)},s.prototype._parseResponse=function(e){var t=this,r=[];return e.replace(/\}[\n\r]?\{/g,"}|--|{").replace(/\}\][\n\r]?\[\{/g,"}]|--|[{").replace(/\}[\n\r]?\[\{/g,"}|--|[{").replace(/\}\][\n\r]?\{/g,"}]|--|{").split("|--|").forEach((function(e){t.lastChunk&&(e=t.lastChunk+e);var n=null;try{n=JSON.parse(e)}catch(r){return t.lastChunk=e,clearTimeout(t.lastChunkTimeout),void(t.lastChunkTimeout=setTimeout((function(){t.reconnectOptions.auto&&t.reconnectOptions.onTimeout?t.reconnect():(t.emit(t.ERROR,o.ConnectionTimeout(t._customTimeout)),t.requestQueue.size>0&&t.requestQueue.forEach((function(e,r){e.callback(o.ConnectionTimeout(t._customTimeout)),t.requestQueue.delete(r)})))}),t._customTimeout))}clearTimeout(t.lastChunkTimeout),t.lastChunk=null,n&&r.push(n)})),r},s.prototype.send=function(e,t){var r=e.id,n={payload:e,callback:t};if(Array.isArray(e)&&(r=e[0].id),this.connection.readyState===this.connection.CONNECTING||this.reconnecting)this.requestQueue.set(r,n);else{if(this.connection.readyState!==this.connection.OPEN)return this.requestQueue.delete(r),this.emit(this.ERROR,o.ConnectionNotOpenError()),void n.callback(o.ConnectionNotOpenError());this.responseQueue.set(r,n),this.requestQueue.delete(r);try{this.connection.send(JSON.stringify(n.payload))}catch(e){n.callback(e),this.responseQueue.delete(r)}}},s.prototype.reset=function(){this.responseQueue.clear(),this.requestQueue.clear(),this.removeAllListeners(),this._removeSocketListeners(),this._addSocketListeners()},s.prototype.disconnect=function(e,t){this._removeSocketListeners(),this.connection.close(e||1e3,t)},s.prototype.supportsSubscriptions=function(){return!0},s.prototype.reconnect=function(){var e=this;this.reconnecting=!0,this.responseQueue.size>0&&this.responseQueue.forEach((function(t,r){t.callback(o.PendingRequestsOnReconnectingError()),e.responseQueue.delete(r)})),!this.reconnectOptions.maxAttempts||this.reconnectAttempts0&&this.requestQueue.forEach((function(t,r){t.callback(o.MaxAttemptsReachedOnReconnectingError()),e.requestQueue.delete(r)})))},e.exports=s},function(e,t,r){"use strict";(function(t,n){var i=r(0)(r(2)),o="[object process]"===Object.prototype.toString.call(void 0!==t?t:0),a="undefined"!=typeof navigator&&"ReactNative"===navigator.product,s=null,f=null;if(o||a){s=function(e){return n.from(e).toString("base64")};var u=r(77);if(u.URL){var c=u.URL;f=function(e){return new c(e)}}else f=r(77).parse}else s=btoa.bind("object"===("undefined"==typeof globalThis?"undefined":(0,i.default)(globalThis))?globalThis:self),f=function(e){return new URL(e)};e.exports={parseURL:f,btoa:s}}).call(this,r(6),r(1).Buffer)},function(e,t,r){"use strict";var n=r(0)(r(2));e.exports={isString:function(e){return"string"==typeof e},isObject:function(e){return"object"===(0,n.default)(e)&&null!==e},isNull:function(e){return null===e},isNullOrUndefined:function(e){return null==e}}},function(e,t,r){"use strict";t.decode=t.parse=r(342),t.encode=t.stringify=r(343)},function(e,t,r){"use strict";function n(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.exports=function(e,t,r,o){t=t||"&",r=r||"=";var a={};if("string"!=typeof e||0===e.length)return a;var s=/\+/g;e=e.split(t);var f=1e3;o&&"number"==typeof o.maxKeys&&(f=o.maxKeys);var u=e.length;f>0&&u>f&&(u=f);for(var c=0;c=0?(d=b.substr(0,y),l=b.substr(y+1)):(d=b,l=""),h=decodeURIComponent(d),p=decodeURIComponent(l),n(a,h)?i(a[h])?a[h].push(p):a[h]=[a[h],p]:a[h]=p}return a};var i=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},function(e,t,r){"use strict";var n=r(0)(r(2)),i=function(e){switch((0,n.default)(e)){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,t,r,f){return t=t||"&",r=r||"=",null===e&&(e=void 0),"object"===(0,n.default)(e)?a(s(e),(function(n){var s=encodeURIComponent(i(n))+r;return o(e[n])?a(e[n],(function(e){return s+encodeURIComponent(i(e))})).join(t):s+encodeURIComponent(i(e[n]))})).join(t):f?encodeURIComponent(i(f))+r+encodeURIComponent(i(e)):""};var o=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function a(e,t){if(e.map)return e.map(t);for(var r=[],n=0;n=4.0.0"},"homepage":"https://github.com/theturtle32/WebSocket-Node","keywords":["websocket","websockets","socket","networking","comet","push","RFC-6455","realtime","server","client"],"license":"Apache-2.0","main":"index","name":"websocket","repository":{"type":"git","url":"git+https://github.com/theturtle32/WebSocket-Node.git"},"scripts":{"gulp":"gulp","test":"tape test/unit/*.js"},"version":"1.0.34"}')},function(e,t,r){"use strict";var n=r(11).errors,i=r(169),o=r(352);r(353),r(354).polyfill(),r(355);var a=function(e,t){t=t||{},this.withCredentials=t.withCredentials,this.timeout=t.timeout||0,this.headers=t.headers,this.agent=t.agent,this.connected=!1;var r=!1!==t.keepAlive;this.host=e||"http://localhost:8545",this.agent||("https"===this.host.substring(0,5)?this.httpsAgent=new o.Agent({keepAlive:r}):this.httpAgent=new i.Agent({keepAlive:r}))};a.prototype.send=function(e,t){var r,i={method:"POST",body:JSON.stringify(e)},o={};if("undefined"!=typeof AbortController?r=new AbortController:"undefined"!=typeof window&&void 0!==window.AbortController&&(r=new window.AbortController),void 0!==r&&(i.signal=r.signal),"undefined"==typeof XMLHttpRequest){var a={httpsAgent:this.httpsAgent,httpAgent:this.httpAgent};this.agent&&(a.httpsAgent=this.agent.https,a.httpAgent=this.agent.http),"https"===this.host.substring(0,5)?i.agent=a.httpsAgent:i.agent=a.httpAgent}this.headers&&this.headers.forEach((function(e){o[e.name]=e.value})),o["Content-Type"]||(o["Content-Type"]="application/json"),this.withCredentials?i.credentials="include":i.credentials="omit",i.headers=o,this.timeout>0&&void 0!==r&&(this.timeoutId=setTimeout((function(){r.abort()}),this.timeout));fetch(this.host,i).then(function(e){void 0!==this.timeoutId&&clearTimeout(this.timeoutId),e.json().then((function(e){t(null,e)})).catch((function(r){t(n.InvalidResponse(e))}))}.bind(this)).catch(function(e){void 0!==this.timeoutId&&clearTimeout(this.timeoutId),"AbortError"===e.name&&t(n.ConnectionTimeout(this.timeout)),t(n.InvalidConnection(this.host))}.bind(this))},a.prototype.disconnect=function(){},a.prototype.supportsSubscriptions=function(){return!1},e.exports=a},function(e,t,r){"use strict";(function(t,n,i){var o=r(170),a=r(90),s=r(171),f=r(61),u=r(350),c=s.IncomingMessage,d=s.readyStates;var l=e.exports=function(e){var r,n=this;f.Writable.call(n),n._opts=e,n._body=[],n._headers={},e.auth&&n.setHeader("Authorization","Basic "+new t(e.auth).toString("base64")),Object.keys(e.headers).forEach((function(t){n.setHeader(t,e.headers[t])}));var i=!0;if("disable-fetch"===e.mode||"requestTimeout"in e&&!o.abortController)i=!1,r=!0;else if("prefer-streaming"===e.mode)r=!1;else if("allow-wrong-content-type"===e.mode)r=!o.overrideMimeType;else{if(e.mode&&"default"!==e.mode&&"prefer-fast"!==e.mode)throw new Error("Invalid value for opts.mode");r=!0}n._mode=function(e,t){return o.fetch&&t?"fetch":o.mozchunkedarraybuffer?"moz-chunked-arraybuffer":o.msstream?"ms-stream":o.arraybuffer&&e?"arraybuffer":o.vbArray&&e?"text:vbarray":"text"}(r,i),n._fetchTimer=null,n.on("finish",(function(){n._onFinish()}))};a(l,f.Writable),l.prototype.setHeader=function(e,t){var r=e.toLowerCase();-1===h.indexOf(r)&&(this._headers[r]={name:e,value:t})},l.prototype.getHeader=function(e){var t=this._headers[e.toLowerCase()];return t?t.value:null},l.prototype.removeHeader=function(e){delete this._headers[e.toLowerCase()]},l.prototype._onFinish=function(){var e=this;if(!e._destroyed){var r=e._opts,a=e._headers,s=null;"GET"!==r.method&&"HEAD"!==r.method&&(s=o.arraybuffer?u(t.concat(e._body)):o.blobConstructor?new n.Blob(e._body.map((function(e){return u(e)})),{type:(a["content-type"]||{}).value||""}):t.concat(e._body).toString());var f=[];if(Object.keys(a).forEach((function(e){var t=a[e].name,r=a[e].value;Array.isArray(r)?r.forEach((function(e){f.push([t,e])})):f.push([t,r])})),"fetch"===e._mode){var c=null;if(o.abortController){var l=new AbortController;c=l.signal,e._fetchAbortController=l,"requestTimeout"in r&&0!==r.requestTimeout&&(e._fetchTimer=n.setTimeout((function(){e.emit("requestTimeout"),e._fetchAbortController&&e._fetchAbortController.abort()}),r.requestTimeout))}n.fetch(e._opts.url,{method:e._opts.method,headers:f,body:s||void 0,mode:"cors",credentials:r.withCredentials?"include":"same-origin",signal:c}).then((function(t){e._fetchResponse=t,e._connect()}),(function(t){n.clearTimeout(e._fetchTimer),e._destroyed||e.emit("error",t)}))}else{var h=e._xhr=new n.XMLHttpRequest;try{h.open(e._opts.method,e._opts.url,!0)}catch(t){return void i.nextTick((function(){e.emit("error",t)}))}"responseType"in h&&(h.responseType=e._mode.split(":")[0]),"withCredentials"in h&&(h.withCredentials=!!r.withCredentials),"text"===e._mode&&"overrideMimeType"in h&&h.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in r&&(h.timeout=r.requestTimeout,h.ontimeout=function(){e.emit("requestTimeout")}),f.forEach((function(e){h.setRequestHeader(e[0],e[1])})),e._response=null,h.onreadystatechange=function(){switch(h.readyState){case d.LOADING:case d.DONE:e._onXHRProgress()}},"moz-chunked-arraybuffer"===e._mode&&(h.onprogress=function(){e._onXHRProgress()}),h.onerror=function(){e._destroyed||e.emit("error",new Error("XHR error"))};try{h.send(s)}catch(t){return void i.nextTick((function(){e.emit("error",t)}))}}}},l.prototype._onXHRProgress=function(){(function(e){try{var t=e.status;return null!==t&&0!==t}catch(e){return!1}})(this._xhr)&&!this._destroyed&&(this._response||this._connect(),this._response._onXHRProgress())},l.prototype._connect=function(){var e=this;e._destroyed||(e._response=new c(e._xhr,e._fetchResponse,e._mode,e._fetchTimer),e._response.on("error",(function(t){e.emit("error",t)})),e.emit("response",e._response))},l.prototype._write=function(e,t,r){this._body.push(e),r()},l.prototype.abort=l.prototype.destroy=function(){this._destroyed=!0,n.clearTimeout(this._fetchTimer),this._response&&(this._response._destroyed=!0),this._xhr?this._xhr.abort():this._fetchAbortController&&this._fetchAbortController.abort()},l.prototype.end=function(e,t,r){"function"==typeof e&&(r=e,e=void 0),f.Writable.prototype.end.call(this,e,t,r)},l.prototype.flushHeaders=function(){},l.prototype.setTimeout=function(){},l.prototype.setNoDelay=function(){},l.prototype.setSocketKeepAlive=function(){};var h=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","via"]}).call(this,r(1).Buffer,r(7),r(6))},function(e,t,r){"use strict";var n=r(1).Buffer;e.exports=function(e){if(e instanceof Uint8Array){if(0===e.byteOffset&&e.byteLength===e.buffer.byteLength)return e.buffer;if("function"==typeof e.buffer.slice)return e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength)}if(n.isBuffer(e)){for(var t=new Uint8Array(e.length),r=e.length,i=0;i-1};function u(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function c(e){return"string"!=typeof e&&(e=String(e)),e}function d(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return n&&(t[Symbol.iterator]=function(){return t}),t}function l(e){this.map={},e instanceof l?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function h(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function p(e){return new Promise((function(t,r){e.onload=function(){t(e.result)},e.onerror=function(){r(e.error)}}))}function b(e){var t=new FileReader,r=p(t);return t.readAsArrayBuffer(e),r}function y(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function v(){return this.bodyUsed=!1,this._initBody=function(e){var t;this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:i&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:o&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:r&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():a&&i&&((t=e)&&DataView.prototype.isPrototypeOf(t))?(this._bodyArrayBuffer=y(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):a&&(ArrayBuffer.prototype.isPrototypeOf(e)||f(e))?this._bodyArrayBuffer=y(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):r&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},i&&(this.blob=function(){var e=h(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?h(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(b)}),this.text=function(){var e,t,r,n=h(this);if(n)return n;if(this._bodyBlob)return e=this._bodyBlob,t=new FileReader,r=p(t),t.readAsText(e),r;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),r=new Array(t.length),n=0;n-1?n:r),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&i)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(i)}function w(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var r=e.split("="),n=r.shift().replace(/\+/g," "),i=r.join("=").replace(/\+/g," ");t.append(decodeURIComponent(n),decodeURIComponent(i))}})),t}function _(e,t){t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new l(t.headers),this.url=t.url||"",this._initBody(e)}g.prototype.clone=function(){return new g(this,{body:this._bodyInit})},v.call(g.prototype),v.call(_.prototype),_.prototype.clone=function(){return new _(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new l(this.headers),url:this.url})},_.error=function(){var e=new _(null,{status:0,statusText:""});return e.type="error",e};var k=[301,302,303,307,308];_.redirect=function(e,t){if(-1===k.indexOf(t))throw new RangeError("Invalid status code");return new _(null,{status:t,headers:{location:e}})},t.DOMException=e.DOMException;try{new t.DOMException}catch(e){t.DOMException=function(e,t){this.message=e,this.name=t;var r=Error(e);this.stack=r.stack},t.DOMException.prototype=Object.create(Error.prototype),t.DOMException.prototype.constructor=t.DOMException}function S(e,r){return new Promise((function(n,o){var a=new g(e,r);if(a.signal&&a.signal.aborted)return o(new t.DOMException("Aborted","AbortError"));var s=new XMLHttpRequest;function f(){s.abort()}s.onload=function(){var e,t,r={status:s.status,statusText:s.statusText,headers:(e=s.getAllResponseHeaders()||"",t=new l,e.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(e){var r=e.split(":"),n=r.shift().trim();if(n){var i=r.join(":").trim();t.append(n,i)}})),t)};r.url="responseURL"in s?s.responseURL:r.headers.get("X-Request-URL");var i="response"in s?s.response:s.responseText;n(new _(i,r))},s.onerror=function(){o(new TypeError("Network request failed"))},s.ontimeout=function(){o(new TypeError("Network request failed"))},s.onabort=function(){o(new t.DOMException("Aborted","AbortError"))},s.open(a.method,a.url,!0),"include"===a.credentials?s.withCredentials=!0:"omit"===a.credentials&&(s.withCredentials=!1),"responseType"in s&&i&&(s.responseType="blob"),a.headers.forEach((function(e,t){s.setRequestHeader(t,e)})),a.signal&&(a.signal.addEventListener("abort",f),s.onreadystatechange=function(){4===s.readyState&&a.signal.removeEventListener("abort",f)}),s.send(void 0===a._bodyInit?null:a._bodyInit)}))}S.polyfill=!0,e.fetch||(e.fetch=S,e.Headers=l,e.Request=g,e.Response=_),t.Headers=l,t.Request=g,t.Response=_,t.fetch=S,Object.defineProperty(t,"__esModule",{value:!0})}({})}("undefined"!=typeof self?self:void 0)},function(e,t,r){"use strict";(function(n,i){var o,a,s,f=r(0)(r(2)); +/*! + * @overview es6-promise - a tiny implementation of Promises/A+. + * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald) + * @license Licensed under MIT license + * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE + * @version v4.2.8+1e68dce6 + */ +s=function(){function e(e){return"function"==typeof e}var t=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)},r=0,o=void 0,a=void 0,s=function(e,t){b[r]=e,b[r+1]=t,2===(r+=2)&&(a?a(y):_())},u="undefined"!=typeof window?window:void 0,c=u||{},d=c.MutationObserver||c.WebKitMutationObserver,l="undefined"==typeof self&&void 0!==n&&"[object process]"==={}.toString.call(n),h="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel;function p(){var e=setTimeout;return function(){return e(y,1)}}var b=new Array(1e3);function y(){for(var e=0;e0&&(i=r),r=e[u++]);)switch(q++,"\n"===r?(H++,z=0):z++,U){case l:if("{"===r)U=p;else if("["===r)U=y;else if(!G(r))return K("Non-whitespace before {[.");continue;case g:case p:if(G(r))continue;if(U===g)N.push(w);else{if("}"===r){s({}),f(),U=N.pop()||h;continue}N.push(b)}if('"'!==r)return K('Malformed object key should start with " ');U=m;continue;case w:case b:if(G(r))continue;if(":"===r)U===b?(N.push(b),void 0!==o&&(s({}),a(o),o=void 0),D++):void 0!==o&&(a(o),o=void 0),U=h;else if("}"===r)void 0!==o&&(s(o),f(),o=void 0),f(),D--,U=N.pop()||h;else{if(","!==r)return K("Bad object");U===b&&N.push(b),void 0!==o&&(s(o),f(),o=void 0),U=g}continue;case y:case h:if(G(r))continue;if(U===y){if(s([]),D++,U=h,"]"===r){f(),D--,U=N.pop()||h;continue}N.push(v)}if('"'===r)U=m;else if("{"===r)U=p;else if("["===r)U=y;else if("t"===r)U=_;else if("f"===r)U=A;else if("n"===r)U=O;else if("-"===r)B+=r;else if("0"===r)B+=r,U=20;else{if(-1==="123456789".indexOf(r))return K("Bad value");B+=r,U=20}continue;case v:if(","===r)N.push(v),void 0!==o&&(s(o),f(),o=void 0),U=h;else{if("]"!==r){if(G(r))continue;return K("Bad array")}void 0!==o&&(s(o),f(),o=void 0),f(),D--,U=N.pop()||h}continue;case m:void 0===o&&(o="");var d=u-1;e:for(;;){for(;F>0;)if(L+=r,r=e.charAt(u++),4===F?(o+=String.fromCharCode(parseInt(L,16)),F=0,d=u-1):F++,!r)break e;if('"'===r&&!C){U=N.pop()||h,o+=e.substring(d,u-1);break}if(!("\\"!==r||C||(C=!0,o+=e.substring(d,u-1),r=e.charAt(u++))))break;if(C){if(C=!1,"n"===r?o+="\n":"r"===r?o+="\r":"t"===r?o+="\t":"f"===r?o+="\f":"b"===r?o+="\b":"u"===r?(F=1,L=""):o+=r,r=e.charAt(u++),d=u-1,r)continue;break}c.lastIndex=u;var V=c.exec(e);if(!V){u=e.length+1,o+=e.substring(d,u-1);break}if(u=V.index+1,!(r=e.charAt(V.index))){o+=e.substring(d,u-1);break}}continue;case _:if(!r)continue;if("r"!==r)return K("Invalid true started with t"+r);U=k;continue;case k:if(!r)continue;if("u"!==r)return K("Invalid true started with tr"+r);U=S;continue;case S:if(!r)continue;if("e"!==r)return K("Invalid true started with tru"+r);s(!0),f(),U=N.pop()||h;continue;case A:if(!r)continue;if("a"!==r)return K("Invalid false started with f"+r);U=E;continue;case E:if(!r)continue;if("l"!==r)return K("Invalid false started with fa"+r);U=x;continue;case x:if(!r)continue;if("s"!==r)return K("Invalid false started with fal"+r);U=P;continue;case P:if(!r)continue;if("e"!==r)return K("Invalid false started with fals"+r);s(!1),f(),U=N.pop()||h;continue;case O:if(!r)continue;if("u"!==r)return K("Invalid null started with n"+r);U=R;continue;case R:if(!r)continue;if("l"!==r)return K("Invalid null started with nu"+r);U=T;continue;case T:if(!r)continue;if("l"!==r)return K("Invalid null started with nul"+r);s(null),f(),U=N.pop()||h;continue;case M:if("."!==r)return K("Leading zero not followed by .");B+=r,U=20;continue;case 20:if(-1!=="0123456789".indexOf(r))B+=r;else if("."===r){if(-1!==B.indexOf("."))return K("Invalid number has two dots");B+=r}else if("e"===r||"E"===r){if(-1!==B.indexOf("e")||-1!==B.indexOf("E"))return K("Invalid number has two exponential");B+=r}else if("+"===r||"-"===r){if("e"!==i&&"E"!==i)return K("Invalid symbol in number");B+=r}else B&&(s(parseFloat(B)),f(),B=""),u--,U=N.pop()||h;continue;default:return K("Unknown state: "+U)}q>=I&&(n=0,void 0!==o&&o.length>65536&&(K("Max buffer length exceeded: textNode"),n=Math.max(n,o.length)),B.length>65536&&(K("Max buffer length exceeded: numberNode"),n=Math.max(n,B.length)),I=65536-n+q)}})),e(n.n).on((function(){if(U===l)return s({}),f(),void(j=!0);U===h&&0===D||K("Unexpected end"),void 0!==o&&(s(o),f(),o=void 0),j=!0}))}},function(e,t,r){r.d(t,"a",(function(){return f})),r.d(t,"b",(function(){return u}));var n=r(19),i=r(3),o=r(2),a=r(20),s=r(0);function f(){return new XMLHttpRequest}function u(e,t,r,f,u,c,d){var l=e(i.m).emit,h=e(i.b).emit,p=0,b=!0;function y(){if("2"===String(t.status)[0]){var e=t.responseText,r=(" "+e.substr(p)).substr(1);r&&l(r),p=Object(o.e)(e)}}function v(t){try{b&&e(i.c).emit(t.status,Object(a.a)(t.getAllResponseHeaders())),b=!1}catch(e){}}e(i.a).on((function(){t.onreadystatechange=null,t.abort()})),"onprogress"in t&&(t.onprogress=y),t.onreadystatechange=function(){switch(t.readyState){case 2:case 3:return v(t);case 4:v(t),"2"===String(t.status)[0]?(y(),e(i.n).emit()):h(Object(i.o)(t.status,t.responseText))}};try{for(var m in t.open(r,f,!0),c)t.setRequestHeader(m,c[m]);Object(n.a)(window.location,Object(n.b)(f))||t.setRequestHeader("X-Requested-With","XMLHttpRequest"),t.withCredentials=d,t.send(u)}catch(e){window.setTimeout(Object(s.j)(h,Object(i.o)(void 0,void 0,e)),0)}}},function(e,t,r){function n(e,t){function r(t){return String(t.port||{"http:":80,"https:":443}[t.protocol||e.protocol])}return!!(t.protocol&&t.protocol!==e.protocol||t.host&&t.host!==e.host||t.host&&r(t)!==r(e))}function i(e){var t=/(\w+:)?(?:\/\/)([\w.-]+)?(?::(\d+))?\/?/.exec(e)||[];return{protocol:t[1]||"",host:t[2]||"",port:t[3]||""}}r.d(t,"a",(function(){return n})),r.d(t,"b",(function(){return i}))},function(e,t,r){function n(e){var t={};return e&&e.split("\r\n").forEach((function(e){var r=e.indexOf(": ");t[e.substring(0,r)]=e.substring(r+2)})),t}r.d(t,"a",(function(){return n}))}]).default},"object"===(0,s.default)(t)&&"object"===(0,s.default)(e)?e.exports=a():(i=[],void 0===(o="function"==typeof(n=a)?n.apply(t,i):n)||(e.exports=o))}).call(this,r(27)(e))},function(e,t,r){"use strict";var n=r(11).formatters,i=r(36),o=r(17);e.exports=function(e){var t=function(t){var r;return t.property?(e[t.property]||(e[t.property]={}),r=e[t.property]):r=e,t.methods&&t.methods.forEach((function(t){t instanceof i||(t=new i(t)),t.attachToObject(r),t.setRequestManager(e._requestManager)})),e};return t.formatters=n,t.utils=o,t.Method=i,t}},function(e,t,r){"use strict";(function(e){var t=r(0)(r(2)),n=function(e){var r=Object.prototype,n=r.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var i=t&&t.prototype instanceof l?t:l,o=Object.create(i.prototype),a=new A(n||[]);return o._invoke=function(e,t,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return x()}for(r.method=i,r.arg=o;;){var a=r.delegate;if(a){var s=_(a,r);if(s){if(s===d)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var f=c(e,t,r);if("normal"===f.type){if(n=r.done?"completed":"suspendedYield",f.arg===d)continue;return{value:f.arg,done:r.done}}"throw"===f.type&&(n="completed",r.method="throw",r.arg=f.arg)}}}(e,r,a),o}function c(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=u;var d={};function l(){}function h(){}function p(){}var b={};f(b,o,(function(){return this}));var y=Object.getPrototypeOf,v=y&&y(y(E([])));v&&v!==r&&n.call(v,o)&&(b=v);var m=p.prototype=l.prototype=Object.create(b);function g(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function w(e,r){var i;this._invoke=function(o,a){function s(){return new r((function(i,s){!function i(o,a,s,f){var u=c(e[o],e,a);if("throw"!==u.type){var d=u.arg,l=d.value;return l&&"object"===(0,t.default)(l)&&n.call(l,"__await")?r.resolve(l.__await).then((function(e){i("next",e,s,f)}),(function(e){i("throw",e,s,f)})):r.resolve(l).then((function(e){d.value=e,s(d)}),(function(e){return i("throw",e,s,f)}))}f(u.arg)}(o,a,i,s)}))}return i=i?i.then(s,s):s()}}function _(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,_(e,t),"throw"===t.method))return d;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return d}var n=c(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,d;var i=n.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function k(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function S(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(k,this),this.reset(!0)}function E(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,i=function t(){for(;++r=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),f=n.call(o,"finallyLoc");if(s&&f){if(this.prev=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),S(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;S(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:E(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}("object"===(0,t.default)(e)?e.exports:{});try{regeneratorRuntime=n}catch(e){"object"===("undefined"==typeof globalThis?"undefined":(0,t.default)(globalThis))?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}}).call(this,r(27)(e))},function(e,t,r){"use strict";var n=r(0)(r(2)),i=r(11).errors,o=r(103),a=r(11).formatters;function s(e){return e}function f(e){o.call(this),this.id=null,this.callback=s,this.arguments=null,this.lastBlock=null,this.options={subscription:e.subscription,type:e.type,requestManager:e.requestManager}}f.prototype=Object.create(o.prototype),f.prototype.constructor=f,f.prototype._extractCallback=function(e){if("function"==typeof e[e.length-1])return e.pop()},f.prototype._validateArgs=function(e){var t=this.options.subscription;if(t||(t={}),t.params||(t.params=0),e.length!==t.params)throw i.InvalidNumberOfParams(e.length,t.params,t.subscriptionName)},f.prototype._formatInput=function(e){var t=this.options.subscription;return t&&t.inputFormatter?t.inputFormatter.map((function(t,r){return t?t(e[r]):e[r]})):e},f.prototype._formatOutput=function(e){var t=this.options.subscription;return t&&t.outputFormatter&&e?t.outputFormatter(e):e},f.prototype._toPayload=function(e){var t=[];if(this.callback=this._extractCallback(e)||s,this.subscriptionMethod||(this.subscriptionMethod=e.shift(),this.options.subscription.subscriptionName&&(this.subscriptionMethod=this.options.subscription.subscriptionName)),this.arguments||(this.arguments=this._formatInput(e),this._validateArgs(this.arguments),e=[]),t.push(this.subscriptionMethod),t=t.concat(this.arguments),e.length)throw new Error("Only a callback is allowed as parameter on an already instantiated subscription.");return{method:this.options.type+"_subscribe",params:t}},f.prototype.unsubscribe=function(e){this.options.requestManager.removeSubscription(this.id,e),this.id=null,this.lastBlock=null,this.removeAllListeners()},f.prototype.subscribe=function(){var e=this,t=Array.prototype.slice.call(arguments),r=this._toPayload(t);if(!r)return this;if(!this.options.requestManager.provider)return setTimeout((function(){var t=new Error("No provider set.");e.callback(t,null,e),e.emit("error",t)}),0),this;if(!this.options.requestManager.provider.on)return setTimeout((function(){var t=new Error("The current provider doesn't support subscriptions: "+e.options.requestManager.provider.constructor.name);e.callback(t,null,e),e.emit("error",t)}),0),this;if(this.lastBlock&&this.options.params&&"object"===(0,n.default)(this.options.params)&&(r.params[1]=this.options.params,r.params[1].fromBlock=a.inputBlockNumberFormatter(this.lastBlock+1)),this.id&&this.unsubscribe(),this.options.params=r.params[1],"logs"===r.params[0]&&r.params[1]&&"object"===(0,n.default)(r.params[1])&&r.params[1].hasOwnProperty("fromBlock")&&isFinite(r.params[1].fromBlock)){var i=Object.assign({},r.params[1]);this.options.requestManager.send({method:"eth_getLogs",params:[i]},(function(t,r){t?setTimeout((function(){e.callback(t,null,e),e.emit("error",t)}),0):r.forEach((function(t){var r=e._formatOutput(t);e.callback(null,r,e),e.emit("data",r)}))}))}return"object"===(0,n.default)(r.params[1])&&delete r.params[1].fromBlock,this.options.requestManager.send(r,(function(t,i){!t&&i?(e.id=i,e.method=r.params[0],e.options.requestManager.addSubscription(e,(function(t,r){t?(e.callback(t,!1,e),e.emit("error",t)):(Array.isArray(r)||(r=[r]),r.forEach((function(t){var r=e._formatOutput(t);if(e.lastBlock=r&&"object"===(0,n.default)(r)?r.blockNumber:null,"function"==typeof e.options.subscription.subscriptionHandler)return e.options.subscription.subscriptionHandler.call(e,r);e.emit("data",r),e.callback(null,r,e)})))})),e.emit("connected",i)):setTimeout((function(){e.callback(t,!1,e),e.emit("error",t)}),0)})),this},f.prototype.resubscribe=function(){this.options.requestManager.removeSubscription(this.id),this.id=null,this.subscribe(this.callback)},e.exports=f},function(e,t,r){"use strict";var n=r(2);Object.defineProperty(t,"__esModule",{value:!0}),t.TransactionTypes=void 0,t.accessListify=E,t.computeAddress=_,t.parse=function(e){var t=(0,a.arrayify)(e);if(t[0]>127)return function(e){var t=c.decode(e);9!==t.length&&6!==t.length&&y.throwArgumentError("invalid raw transaction","rawTransaction",e);var r={nonce:m(t[0]).toNumber(),gasPrice:m(t[1]),gasLimit:m(t[2]),to:v(t[3]),value:m(t[4]),data:t[5],chainId:0};if(6===t.length)return r;try{r.v=o.BigNumber.from(t[6]).toNumber()}catch(e){return r}if(r.r=(0,a.hexZeroPad)(t[7],32),r.s=(0,a.hexZeroPad)(t[8],32),o.BigNumber.from(r.r).isZero()&&o.BigNumber.from(r.s).isZero())r.chainId=r.v,r.v=0;else{r.chainId=Math.floor((r.v-35)/2),r.chainId<0&&(r.chainId=0);var n=r.v-27,i=t.slice(0,6);0!==r.chainId&&(i.push((0,a.hexlify)(r.chainId)),i.push("0x"),i.push("0x"),n-=2*r.chainId+8);var s=(0,f.keccak256)(c.encode(i));try{r.from=k(s,{r:(0,a.hexlify)(r.r),s:(0,a.hexlify)(r.s),recoveryParam:n})}catch(e){}r.hash=(0,f.keccak256)(e)}return r.type=null,r}(t);switch(t[0]){case 1:return function(e){var t=c.decode(e.slice(1));8!==t.length&&11!==t.length&&y.throwArgumentError("invalid component count for transaction type: 1","payload",(0,a.hexlify)(e));var r={type:1,chainId:m(t[0]).toNumber(),nonce:m(t[1]).toNumber(),gasPrice:m(t[2]),gasLimit:m(t[3]),to:v(t[4]),value:m(t[5]),data:t[6],accessList:E(t[7])};if(8===t.length)return r;return r.hash=(0,f.keccak256)(e),R(r,t.slice(8),O),r}(t);case 2:return function(e){var t=c.decode(e.slice(1));9!==t.length&&12!==t.length&&y.throwArgumentError("invalid component count for transaction type: 2","payload",(0,a.hexlify)(e));var r=m(t[2]),n=m(t[3]),i={type:2,chainId:m(t[0]).toNumber(),nonce:m(t[1]).toNumber(),maxPriorityFeePerGas:r,maxFeePerGas:n,gasPrice:null,gasLimit:m(t[4]),to:v(t[5]),value:m(t[6]),data:t[7],accessList:E(t[8])};if(9===t.length)return i;return i.hash=(0,f.keccak256)(e),R(i,t.slice(9),P),i}(t)}return y.throwError("unsupported transaction type: ".concat(t[0]),l.Logger.errors.UNSUPPORTED_OPERATION,{operation:"parseTransaction",transactionType:t[0]})},t.recoverAddress=k,t.serialize=function(e,t){if(null==e.type||0===e.type)return null!=e.accessList&&y.throwArgumentError("untyped transactions do not support accessList; include type: 1","transaction",e),function(e,t){(0,u.checkProperties)(e,w);var r=[];g.forEach((function(t){var n=e[t.name]||[],i={};t.numeric&&(i.hexPad="left"),n=(0,a.arrayify)((0,a.hexlify)(n,i)),t.length&&n.length!==t.length&&n.length>0&&y.throwArgumentError("invalid length for "+t.name,"transaction:"+t.name,n),t.maxLength&&(n=(0,a.stripZeros)(n)).length>t.maxLength&&y.throwArgumentError("invalid length for "+t.name,"transaction:"+t.name,n),r.push((0,a.hexlify)(n))}));var n=0;null!=e.chainId?"number"!=typeof(n=e.chainId)&&y.throwArgumentError("invalid transaction.chainId","transaction",e):t&&!(0,a.isBytesLike)(t)&&t.v>28&&(n=Math.floor((t.v-35)/2));0!==n&&(r.push((0,a.hexlify)(n)),r.push("0x"),r.push("0x"));if(!t)return c.encode(r);var i=(0,a.splitSignature)(t),o=27+i.recoveryParam;0!==n?(r.pop(),r.pop(),r.pop(),o+=2*n+8,i.v>28&&i.v!==o&&y.throwArgumentError("transaction.chainId/signature.v mismatch","signature",t)):i.v!==o&&y.throwArgumentError("transaction.chainId/signature.v mismatch","signature",t);return r.push((0,a.hexlify)(o)),r.push((0,a.stripZeros)((0,a.arrayify)(i.r))),r.push((0,a.stripZeros)((0,a.arrayify)(i.s))),c.encode(r)}(e,t);switch(e.type){case 1:return O(e,t);case 2:return P(e,t)}return y.throwError("unsupported transaction type: ".concat(e.type),l.Logger.errors.UNSUPPORTED_OPERATION,{operation:"serializeTransaction",transactionType:e.type})};var i=r(362),o=r(105),a=r(37),s=r(369),f=r(175),u=r(177),c=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==n(e)&&"function"!=typeof e)return{default:e};var r=p(t);if(r&&r.has(e))return r.get(e);var i={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&Object.prototype.hasOwnProperty.call(e,a)){var s=o?Object.getOwnPropertyDescriptor(e,a):null;s&&(s.get||s.set)?Object.defineProperty(i,a,s):i[a]=e[a]}i.default=e,r&&r.set(e,i);return i}(r(176)),d=r(375),l=r(32),h=r(378);function p(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(p=function(e){return e?r:t})(e)}var b,y=new l.Logger(h.version);function v(e){return"0x"===e?null:(0,i.getAddress)(e)}function m(e){return"0x"===e?s.Zero:o.BigNumber.from(e)}t.TransactionTypes=b,function(e){e[e.legacy=0]="legacy",e[e.eip2930=1]="eip2930",e[e.eip1559=2]="eip1559"}(b||(t.TransactionTypes=b={}));var g=[{name:"nonce",maxLength:32,numeric:!0},{name:"gasPrice",maxLength:32,numeric:!0},{name:"gasLimit",maxLength:32,numeric:!0},{name:"to",length:20},{name:"value",maxLength:32,numeric:!0},{name:"data"}],w={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,type:!0,value:!0};function _(e){var t=(0,d.computePublicKey)(e);return(0,i.getAddress)((0,a.hexDataSlice)((0,f.keccak256)((0,a.hexDataSlice)(t,1)),12))}function k(e,t){return _((0,d.recoverPublicKey)((0,a.arrayify)(e),t))}function S(e,t){var r=(0,a.stripZeros)(o.BigNumber.from(e).toHexString());return r.length>32&&y.throwArgumentError("invalid length for "+t,"transaction:"+t,e),r}function A(e,t){return{address:(0,i.getAddress)(e),storageKeys:(t||[]).map((function(t,r){return 32!==(0,a.hexDataLength)(t)&&y.throwArgumentError("invalid access list storageKey","accessList[".concat(e,":").concat(r,"]"),t),t.toLowerCase()}))}}function E(e){if(Array.isArray(e))return e.map((function(e,t){return Array.isArray(e)?(e.length>2&&y.throwArgumentError("access list expected to be [ address, storageKeys[] ]","value[".concat(t,"]"),e),A(e[0],e[1])):A(e.address,e.storageKeys)}));var t=Object.keys(e).map((function(t){var r=e[t].reduce((function(e,t){return e[t]=!0,e}),{});return A(t,Object.keys(r).sort())}));return t.sort((function(e,t){return e.address.localeCompare(t.address)})),t}function x(e){return E(e).map((function(e){return[e.address,e.storageKeys]}))}function P(e,t){if(null!=e.gasPrice){var r=o.BigNumber.from(e.gasPrice),n=o.BigNumber.from(e.maxFeePerGas||0);r.eq(n)||y.throwArgumentError("mismatch EIP-1559 gasPrice != maxFeePerGas","tx",{gasPrice:r,maxFeePerGas:n})}var s=[S(e.chainId||0,"chainId"),S(e.nonce||0,"nonce"),S(e.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),S(e.maxFeePerGas||0,"maxFeePerGas"),S(e.gasLimit||0,"gasLimit"),null!=e.to?(0,i.getAddress)(e.to):"0x",S(e.value||0,"value"),e.data||"0x",x(e.accessList||[])];if(t){var f=(0,a.splitSignature)(t);s.push(S(f.recoveryParam,"recoveryParam")),s.push((0,a.stripZeros)(f.r)),s.push((0,a.stripZeros)(f.s))}return(0,a.hexConcat)(["0x02",c.encode(s)])}function O(e,t){var r=[S(e.chainId||0,"chainId"),S(e.nonce||0,"nonce"),S(e.gasPrice||0,"gasPrice"),S(e.gasLimit||0,"gasLimit"),null!=e.to?(0,i.getAddress)(e.to):"0x",S(e.value||0,"value"),e.data||"0x",x(e.accessList||[])];if(t){var n=(0,a.splitSignature)(t);r.push(S(n.recoveryParam,"recoveryParam")),r.push((0,a.stripZeros)(n.r)),r.push((0,a.stripZeros)(n.s))}return(0,a.hexConcat)(["0x01",c.encode(r)])}function R(e,t,r){try{var n=m(t[0]).toNumber();if(0!==n&&1!==n)throw new Error("bad recid");e.v=n}catch(e){y.throwArgumentError("invalid v for transaction type: 1","v",t[0])}e.r=(0,a.hexZeroPad)(t[1],32),e.s=(0,a.hexZeroPad)(t[2],32);try{var i=(0,f.keccak256)(r(e));e.from=k(i,{r:e.r,s:e.s,recoveryParam:e.v})}catch(e){}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getAddress=v,t.getContractAddress=function(e){var t=null;try{t=v(e.from)}catch(t){u.throwArgumentError("missing from address","transaction",e)}var r=(0,n.stripZeros)((0,n.arrayify)(i.BigNumber.from(e.nonce).toHexString()));return v((0,n.hexDataSlice)((0,o.keccak256)((0,a.encode)([t,r])),12))},t.getCreate2Address=function(e,t,r){32!==(0,n.hexDataLength)(t)&&u.throwArgumentError("salt must be 32 bytes","salt",t);32!==(0,n.hexDataLength)(r)&&u.throwArgumentError("initCodeHash must be 32 bytes","initCodeHash",r);return v((0,n.hexDataSlice)((0,o.keccak256)((0,n.concat)(["0xff",v(e),t,r])),12))},t.getIcapAddress=function(e){var t=(0,i._base16To36)(v(e).substring(2)).toUpperCase();for(;t.length<30;)t="0"+t;return"XE"+y("XE00"+t)+t},t.isAddress=function(e){try{return v(e),!0}catch(e){}return!1};var n=r(37),i=r(105),o=r(175),a=r(176),s=r(32),f=r(368),u=new s.Logger(f.version);function c(e){(0,n.isHexString)(e,20)||u.throwArgumentError("invalid address","address",e);for(var t=(e=e.toLowerCase()).substring(2).split(""),r=new Uint8Array(40),i=0;i<40;i++)r[i]=t[i].charCodeAt(0);for(var a=(0,n.arrayify)((0,o.keccak256)(r)),s=0;s<40;s+=2)a[s>>1]>>4>=8&&(t[s]=t[s].toUpperCase()),(15&a[s>>1])>=8&&(t[s+1]=t[s+1].toUpperCase());return"0x"+t.join("")}for(var d={},l=0;l<10;l++)d[String(l)]=String(l);for(var h=0;h<26;h++)d[String.fromCharCode(65+h)]=String(10+h);var p,b=Math.floor((p=9007199254740991,Math.log10?Math.log10(p):Math.log(p)/Math.LN10));function y(e){for(var t=(e=(e=e.toUpperCase()).substring(4)+e.substring(0,2)+"00").split("").map((function(e){return d[e]})).join("");t.length>=b;){var r=t.substring(0,b);t=parseInt(r,10)%97+t.substring(r.length)}for(var n=String(98-parseInt(t,10)%97);n.length<2;)n="0"+n;return n}function v(e){var t=null;if("string"!=typeof e&&u.throwArgumentError("invalid address","address",e),e.match(/^(0x)?[0-9a-fA-F]{40}$/))"0x"!==e.substring(0,2)&&(e="0x"+e),t=c(e),e.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&t!==e&&u.throwArgumentError("bad address checksum","address",e);else if(e.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(e.substring(2,4)!==y(e)&&u.throwArgumentError("bad icap checksum","address",e),t=(0,i._base36To16)(e.substring(4));t.length<40;)t="0"+t;t=c("0x"+t)}else u.throwArgumentError("invalid address","address",e);return t}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.version=void 0;t.version="logger/5.6.0"},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.version=void 0;t.version="bytes/5.6.1"},function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.FixedNumber=t.FixedFormat=void 0,t.formatFixed=m,t.parseFixed=g;var i=n(r(2)),o=n(r(8)),a=n(r(9)),s=r(37),f=r(32),u=r(174),c=r(173),d=new f.Logger(u.version),l={},h=c.BigNumber.from(0),p=c.BigNumber.from(-1);function b(e,t,r,n){var i={fault:t,operation:r};return void 0!==n&&(i.value=n),d.throwError(e,f.Logger.errors.NUMERIC_FAULT,i)}for(var y="0";y.length<256;)y+=y;function v(e){if("number"!=typeof e)try{e=c.BigNumber.from(e).toNumber()}catch(e){}return"number"==typeof e&&e>=0&&e<=256&&!(e%1)?"1"+y.substring(0,e):d.throwArgumentError("invalid decimal size","decimals",e)}function m(e,t){null==t&&(t=0);var r=v(t),n=(e=c.BigNumber.from(e)).lt(h);n&&(e=e.mul(p));for(var i=e.mod(r).toString();i.length2&&d.throwArgumentError("too many decimal points","value",e);var o=i[0],a=i[1];for(o||(o="0"),a||(a="0");"0"===a[a.length-1];)a=a.substring(0,a.length-1);for(a.length>r.length-1&&b("fractional component exceeds decimals","underflow","parseFixed"),""===a&&(a="0");a.length80&&d.throwArgumentError("invalid fixed format (decimals too large)","format.decimals",o),new e(l,r,n,o)}}]),e}();t.FixedFormat=w;var _=function(){function e(t,r,n,i){(0,o.default)(this,e),t!==l&&d.throwError("cannot use FixedNumber constructor; use FixedNumber.from",f.Logger.errors.UNSUPPORTED_OPERATION,{operation:"new FixedFormat"}),this.format=i,this._hex=r,this._value=n,this._isFixedNumber=!0,Object.freeze(this)}return(0,a.default)(e,[{key:"_checkFormat",value:function(e){this.format.name!==e.format.name&&d.throwArgumentError("incompatible format; use fixedNumber.toFormat","other",e)}},{key:"addUnsafe",value:function(t){this._checkFormat(t);var r=g(this._value,this.format.decimals),n=g(t._value,t.format.decimals);return e.fromValue(r.add(n),this.format.decimals,this.format)}},{key:"subUnsafe",value:function(t){this._checkFormat(t);var r=g(this._value,this.format.decimals),n=g(t._value,t.format.decimals);return e.fromValue(r.sub(n),this.format.decimals,this.format)}},{key:"mulUnsafe",value:function(t){this._checkFormat(t);var r=g(this._value,this.format.decimals),n=g(t._value,t.format.decimals);return e.fromValue(r.mul(n).div(this.format._multiplier),this.format.decimals,this.format)}},{key:"divUnsafe",value:function(t){this._checkFormat(t);var r=g(this._value,this.format.decimals),n=g(t._value,t.format.decimals);return e.fromValue(r.mul(this.format._multiplier).div(n),this.format.decimals,this.format)}},{key:"floor",value:function(){var t=this.toString().split(".");1===t.length&&t.push("0");var r=e.from(t[0],this.format),n=!t[1].match(/^(0*)$/);return this.isNegative()&&n&&(r=r.subUnsafe(k.toFormat(r.format))),r}},{key:"ceiling",value:function(){var t=this.toString().split(".");1===t.length&&t.push("0");var r=e.from(t[0],this.format),n=!t[1].match(/^(0*)$/);return!this.isNegative()&&n&&(r=r.addUnsafe(k.toFormat(r.format))),r}},{key:"round",value:function(t){null==t&&(t=0);var r=this.toString().split(".");if(1===r.length&&r.push("0"),(t<0||t>80||t%1)&&d.throwArgumentError("invalid decimal count","decimals",t),r[1].length<=t)return this;var n=e.from("1"+y.substring(0,t),this.format),i=S.toFormat(this.format);return this.mulUnsafe(n).addUnsafe(i).floor().divUnsafe(n)}},{key:"isZero",value:function(){return"0.0"===this._value||"0"===this._value}},{key:"isNegative",value:function(){return"-"===this._value[0]}},{key:"toString",value:function(){return this._value}},{key:"toHexString",value:function(e){if(null==e)return this._hex;e%8&&d.throwArgumentError("invalid byte width","width",e);var t=c.BigNumber.from(this._hex).fromTwos(this.format.width).toTwos(e).toHexString();return(0,s.hexZeroPad)(t,e/8)}},{key:"toUnsafeFloat",value:function(){return parseFloat(this.toString())}},{key:"toFormat",value:function(t){return e.fromString(this._value,t)}}],[{key:"fromValue",value:function(t,r,n){return null!=n||null==r||(0,c.isBigNumberish)(r)||(n=r,r=null),null==r&&(r=0),null==n&&(n="fixed"),e.fromString(m(t,r),w.from(n))}},{key:"fromString",value:function(t,r){null==r&&(r="fixed");var n=w.from(r),i=g(t,n.decimals);!n.signed&&i.lt(h)&&b("unsigned value cannot be negative","overflow","value",t);var o=null;n.signed?o=i.toTwos(n.width).toHexString():(o=i.toHexString(),o=(0,s.hexZeroPad)(o,n.width/8));var a=m(i,n.decimals);return new e(l,o,a,n)}},{key:"fromBytes",value:function(t,r){null==r&&(r="fixed");var n=w.from(r);if((0,s.arrayify)(t).length>n.width/8)throw new Error("overflow");var i=c.BigNumber.from(t);n.signed&&(i=i.fromTwos(n.width));var o=i.toTwos((n.signed?0:1)+n.width).toHexString(),a=m(i,n.decimals);return new e(l,o,a,n)}},{key:"from",value:function(t,r){if("string"==typeof t)return e.fromString(t,r);if((0,s.isBytes)(t))return e.fromBytes(t,r);try{return e.fromValue(t,0,r)}catch(e){if(e.code!==f.Logger.errors.INVALID_ARGUMENT)throw e}return d.throwArgumentError("invalid FixedNumber value","value",t)}},{key:"isFixedNumber",value:function(e){return!(!e||!e._isFixedNumber)}}]),e}();t.FixedNumber=_;var k=_.from(1),S=_.from("0.5")},function(e,t,r){"use strict";(function(e,n,i){var o,a=r(0)(r(2)); +/** + * [js-sha3]{@link https://github.com/emn178/js-sha3} + * + * @version 0.8.0 + * @author Chen, Yi-Cyuan [emn178@gmail.com] + * @copyright Chen, Yi-Cyuan 2015-2018 + * @license MIT + */ +!function(){var s="input is invalid type",f="object"===("undefined"==typeof window?"undefined":(0,a.default)(window)),u=f?window:{};u.JS_SHA3_NO_WINDOW&&(f=!1);var c=!f&&"object"===("undefined"==typeof self?"undefined":(0,a.default)(self));!u.JS_SHA3_NO_NODE_JS&&"object"===(void 0===e?"undefined":(0,a.default)(e))&&e.versions&&e.versions.node?u=n:c&&(u=self);var d=!u.JS_SHA3_NO_COMMON_JS&&"object"===(0,a.default)(i)&&i.exports,l=r(63),h=!u.JS_SHA3_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,p="0123456789abcdef".split(""),b=[4,1024,262144,67108864],y=[0,8,16,24],v=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],m=[224,256,384,512],g=[128,256],w=["hex","buffer","arrayBuffer","array","digest"],_={128:168,256:136};!u.JS_SHA3_NO_NODE_JS&&Array.isArray||(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),!h||!u.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(e){return"object"===(0,a.default)(e)&&e.buffer&&e.buffer.constructor===ArrayBuffer});for(var k=function(e,t,r){return function(n){return new N(e,t,e).update(n)[r]()}},S=function(e,t,r){return function(n,i){return new N(e,t,i).update(n)[r]()}},A=function(e,t,r){return function(t,n,i,o){return R["cshake"+e].update(t,n,i,o)[r]()}},E=function(e,t,r){return function(t,n,i,o){return R["kmac"+e].update(t,n,i,o)[r]()}},x=function(e,t,r,n){for(var i=0;i>5,this.byteCount=this.blockCount<<2,this.outputBlocks=r>>5,this.extraBytes=(31&r)>>3;for(var n=0;n<50;++n)this.s[n]=0}function L(e,t,r){N.call(this,e,t,r)}N.prototype.update=function(e){if(this.finalized)throw new Error("finalize already called");var t,r=(0,a.default)(e);if("string"!==r){if("object"!==r)throw new Error(s);if(null===e)throw new Error(s);if(h&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||h&&ArrayBuffer.isView(e)))throw new Error(s);t=!0}for(var n,i,o=this.blocks,f=this.byteCount,u=e.length,c=this.blockCount,d=0,l=this.s;d>2]|=e[d]<>2]|=i<>2]|=(192|i>>6)<>2]|=(128|63&i)<=57344?(o[n>>2]|=(224|i>>12)<>2]|=(128|i>>6&63)<>2]|=(128|63&i)<>2]|=(240|i>>18)<>2]|=(128|i>>12&63)<>2]|=(128|i>>6&63)<>2]|=(128|63&i)<=f){for(this.start=n-f,this.block=o[c],n=0;n>=8);r>0;)i.unshift(r),r=255&(e>>=8),++n;return t?i.push(n):i.unshift(n),this.update(i),i.length},N.prototype.encodeString=function(e){var t,r=(0,a.default)(e);if("string"!==r){if("object"!==r)throw new Error(s);if(null===e)throw new Error(s);if(h&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||h&&ArrayBuffer.isView(e)))throw new Error(s);t=!0}var n=0,i=e.length;if(t)n=i;else for(var o=0;o=57344?n+=3:(f=65536+((1023&f)<<10|1023&e.charCodeAt(++o)),n+=4)}return n+=this.encode(8*n),this.update(e),n},N.prototype.bytepad=function(e,t){for(var r=this.encode(t),n=0;n>2]|=this.padding[3&t],this.lastByteIndex===this.byteCount)for(e[0]=e[r],t=1;t>4&15]+p[15&e]+p[e>>12&15]+p[e>>8&15]+p[e>>20&15]+p[e>>16&15]+p[e>>28&15]+p[e>>24&15];a%t==0&&(F(r),o=0)}return i&&(e=r[o],s+=p[e>>4&15]+p[15&e],i>1&&(s+=p[e>>12&15]+p[e>>8&15]),i>2&&(s+=p[e>>20&15]+p[e>>16&15])),s},N.prototype.arrayBuffer=function(){this.finalize();var e,t=this.blockCount,r=this.s,n=this.outputBlocks,i=this.extraBytes,o=0,a=0,s=this.outputBits>>3;e=i?new ArrayBuffer(n+1<<2):new ArrayBuffer(s);for(var f=new Uint32Array(e);a>8&255,f[e+2]=t>>16&255,f[e+3]=t>>24&255;s%r==0&&F(n)}return o&&(e=s<<2,t=n[a],f[e]=255&t,o>1&&(f[e+1]=t>>8&255),o>2&&(f[e+2]=t>>16&255)),f},L.prototype=new N,L.prototype.finalize=function(){return this.encode(this.outputBits,!0),N.prototype.finalize.call(this)};var F=function(e){var t,r,n,i,o,a,s,f,u,c,d,l,h,p,b,y,m,g,w,_,k,S,A,E,x,P,O,R,T,M,I,B,C,j,U,N,L,F,D,q,z,H,K,G,V,W,J,X,Z,Y,$,Q,ee,te,re,ne,ie,oe,ae,se,fe,ue,ce;for(n=0;n<48;n+=2)i=e[0]^e[10]^e[20]^e[30]^e[40],o=e[1]^e[11]^e[21]^e[31]^e[41],a=e[2]^e[12]^e[22]^e[32]^e[42],s=e[3]^e[13]^e[23]^e[33]^e[43],f=e[4]^e[14]^e[24]^e[34]^e[44],u=e[5]^e[15]^e[25]^e[35]^e[45],c=e[6]^e[16]^e[26]^e[36]^e[46],d=e[7]^e[17]^e[27]^e[37]^e[47],t=(l=e[8]^e[18]^e[28]^e[38]^e[48])^(a<<1|s>>>31),r=(h=e[9]^e[19]^e[29]^e[39]^e[49])^(s<<1|a>>>31),e[0]^=t,e[1]^=r,e[10]^=t,e[11]^=r,e[20]^=t,e[21]^=r,e[30]^=t,e[31]^=r,e[40]^=t,e[41]^=r,t=i^(f<<1|u>>>31),r=o^(u<<1|f>>>31),e[2]^=t,e[3]^=r,e[12]^=t,e[13]^=r,e[22]^=t,e[23]^=r,e[32]^=t,e[33]^=r,e[42]^=t,e[43]^=r,t=a^(c<<1|d>>>31),r=s^(d<<1|c>>>31),e[4]^=t,e[5]^=r,e[14]^=t,e[15]^=r,e[24]^=t,e[25]^=r,e[34]^=t,e[35]^=r,e[44]^=t,e[45]^=r,t=f^(l<<1|h>>>31),r=u^(h<<1|l>>>31),e[6]^=t,e[7]^=r,e[16]^=t,e[17]^=r,e[26]^=t,e[27]^=r,e[36]^=t,e[37]^=r,e[46]^=t,e[47]^=r,t=c^(i<<1|o>>>31),r=d^(o<<1|i>>>31),e[8]^=t,e[9]^=r,e[18]^=t,e[19]^=r,e[28]^=t,e[29]^=r,e[38]^=t,e[39]^=r,e[48]^=t,e[49]^=r,p=e[0],b=e[1],W=e[11]<<4|e[10]>>>28,J=e[10]<<4|e[11]>>>28,R=e[20]<<3|e[21]>>>29,T=e[21]<<3|e[20]>>>29,se=e[31]<<9|e[30]>>>23,fe=e[30]<<9|e[31]>>>23,H=e[40]<<18|e[41]>>>14,K=e[41]<<18|e[40]>>>14,j=e[2]<<1|e[3]>>>31,U=e[3]<<1|e[2]>>>31,y=e[13]<<12|e[12]>>>20,m=e[12]<<12|e[13]>>>20,X=e[22]<<10|e[23]>>>22,Z=e[23]<<10|e[22]>>>22,M=e[33]<<13|e[32]>>>19,I=e[32]<<13|e[33]>>>19,ue=e[42]<<2|e[43]>>>30,ce=e[43]<<2|e[42]>>>30,te=e[5]<<30|e[4]>>>2,re=e[4]<<30|e[5]>>>2,N=e[14]<<6|e[15]>>>26,L=e[15]<<6|e[14]>>>26,g=e[25]<<11|e[24]>>>21,w=e[24]<<11|e[25]>>>21,Y=e[34]<<15|e[35]>>>17,$=e[35]<<15|e[34]>>>17,B=e[45]<<29|e[44]>>>3,C=e[44]<<29|e[45]>>>3,E=e[6]<<28|e[7]>>>4,x=e[7]<<28|e[6]>>>4,ne=e[17]<<23|e[16]>>>9,ie=e[16]<<23|e[17]>>>9,F=e[26]<<25|e[27]>>>7,D=e[27]<<25|e[26]>>>7,_=e[36]<<21|e[37]>>>11,k=e[37]<<21|e[36]>>>11,Q=e[47]<<24|e[46]>>>8,ee=e[46]<<24|e[47]>>>8,G=e[8]<<27|e[9]>>>5,V=e[9]<<27|e[8]>>>5,P=e[18]<<20|e[19]>>>12,O=e[19]<<20|e[18]>>>12,oe=e[29]<<7|e[28]>>>25,ae=e[28]<<7|e[29]>>>25,q=e[38]<<8|e[39]>>>24,z=e[39]<<8|e[38]>>>24,S=e[48]<<14|e[49]>>>18,A=e[49]<<14|e[48]>>>18,e[0]=p^~y&g,e[1]=b^~m&w,e[10]=E^~P&R,e[11]=x^~O&T,e[20]=j^~N&F,e[21]=U^~L&D,e[30]=G^~W&X,e[31]=V^~J&Z,e[40]=te^~ne&oe,e[41]=re^~ie&ae,e[2]=y^~g&_,e[3]=m^~w&k,e[12]=P^~R&M,e[13]=O^~T&I,e[22]=N^~F&q,e[23]=L^~D&z,e[32]=W^~X&Y,e[33]=J^~Z&$,e[42]=ne^~oe&se,e[43]=ie^~ae&fe,e[4]=g^~_&S,e[5]=w^~k&A,e[14]=R^~M&B,e[15]=T^~I&C,e[24]=F^~q&H,e[25]=D^~z&K,e[34]=X^~Y&Q,e[35]=Z^~$&ee,e[44]=oe^~se&ue,e[45]=ae^~fe&ce,e[6]=_^~S&p,e[7]=k^~A&b,e[16]=M^~B&E,e[17]=I^~C&x,e[26]=q^~H&j,e[27]=z^~K&U,e[36]=Y^~Q&G,e[37]=$^~ee&V,e[46]=se^~ue&te,e[47]=fe^~ce&re,e[8]=S^~p&y,e[9]=A^~b&m,e[18]=B^~E&P,e[19]=C^~x&O,e[28]=H^~j&N,e[29]=K^~U&L,e[38]=Q^~G&W,e[39]=ee^~V&J,e[48]=ue^~te&ne,e[49]=ce^~re&ie,e[0]^=v[n],e[1]^=v[n+1]};if(d)i.exports=R;else{for(M=0;M>8,a=255&i;o?r.push(o,a):r.push(a)}return r},r.zero2=n,r.toHex=i,r.encode=function(e,t){return"hex"===t?i(e):e}})),d=s((function(e,t){var r=t;r.assert=f,r.toArray=c.toArray,r.zero2=c.zero2,r.toHex=c.toHex,r.encode=c.encode,r.getNAF=function(e,t,r){var n=new Array(Math.max(e.bitLength(),r)+1);n.fill(0);for(var i=1<(i>>1)-1?(i>>1)-f:f,o.isubn(s)):s=0,n[a]=s,o.iushrn(1)}return n},r.getJSF=function(e,t){var r=[[],[]];e=e.clone(),t=t.clone();for(var n,i=0,o=0;e.cmpn(-i)>0||t.cmpn(-o)>0;){var a,s,f=e.andln(3)+i&3,u=t.andln(3)+o&3;3===f&&(f=-1),3===u&&(u=-1),a=0==(1&f)?0:3!==(n=e.andln(7)+i&7)&&5!==n||2!==u?f:-f,r[0].push(a),s=0==(1&u)?0:3!==(n=t.andln(7)+o&7)&&5!==n||2!==f?u:-u,r[1].push(s),2*i===a+1&&(i=1-i),2*o===s+1&&(o=1-o),e.iushrn(1),t.iushrn(1)}return r},r.cachedProperty=function(e,t,r){var n="_"+t;e.prototype[t]=function(){return void 0!==this[n]?this[n]:this[n]=r.call(this)}},r.parseBytes=function(e){return"string"==typeof e?r.toArray(e,"hex"):e},r.intFromLE=function(e){return new o.default(e,"hex","le")}})),l=d.getNAF,h=d.getJSF,p=d.assert;function b(e,t){this.type=e,this.p=new o.default(t.p,16),this.red=t.prime?o.default.red(t.prime):o.default.mont(this.p),this.zero=new o.default(0).toRed(this.red),this.one=new o.default(1).toRed(this.red),this.two=new o.default(2).toRed(this.red),this.n=t.n&&new o.default(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}var y=b;function v(e,t){this.curve=e,this.type=t,this.precomputed=null}b.prototype.point=function(){throw new Error("Not implemented")},b.prototype.validate=function(){throw new Error("Not implemented")},b.prototype._fixedNafMul=function(e,t){p(e.precomputed);var r=e._getDoubles(),n=l(t,1,this._bitLength),i=(1<=o;f--)a=(a<<1)+n[f];s.push(a)}for(var u=this.jpoint(null,null,null),c=this.jpoint(null,null,null),d=i;d>0;d--){for(o=0;o=0;s--){for(var f=0;s>=0&&0===o[s];s--)f++;if(s>=0&&f++,a=a.dblp(f),s<0)break;var u=o[s];p(0!==u),a="affine"===e.type?u>0?a.mixedAdd(i[u-1>>1]):a.mixedAdd(i[-u-1>>1].neg()):u>0?a.add(i[u-1>>1]):a.add(i[-u-1>>1].neg())}return"affine"===e.type?a.toP():a},b.prototype._wnafMulAdd=function(e,t,r,n,i){var o,a,s,f=this._wnafT1,u=this._wnafT2,c=this._wnafT3,d=0;for(o=0;o=1;o-=2){var b=o-1,y=o;if(1===f[b]&&1===f[y]){var v=[t[b],null,null,t[y]];0===t[b].y.cmp(t[y].y)?(v[1]=t[b].add(t[y]),v[2]=t[b].toJ().mixedAdd(t[y].neg())):0===t[b].y.cmp(t[y].y.redNeg())?(v[1]=t[b].toJ().mixedAdd(t[y]),v[2]=t[b].add(t[y].neg())):(v[1]=t[b].toJ().mixedAdd(t[y]),v[2]=t[b].toJ().mixedAdd(t[y].neg()));var m=[-3,-1,-5,-7,0,7,5,1,3],g=h(r[b],r[y]);for(d=Math.max(g[0].length,d),c[b]=new Array(d),c[y]=new Array(d),a=0;a=0;o--){for(var A=0;o>=0;){var E=!0;for(a=0;a=0&&A++,k=k.dblp(A),o<0)break;for(a=0;a0?s=u[a][x-1>>1]:x<0&&(s=u[a][-x-1>>1].neg()),k="affine"===s.type?k.mixedAdd(s):k.add(s))}}for(o=0;o=Math.ceil((e.bitLength()+1)/t.step)},v.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],n=this,i=0;i=0&&(a=t,s=r),n.negative&&(n=n.neg(),i=i.neg()),a.negative&&(a=a.neg(),s=s.neg()),[{a:n,b:i},{a:a,b:s}]},w.prototype._endoSplit=function(e){var t=this.endo.basis,r=t[0],n=t[1],i=n.b.mul(e).divRound(this.n),o=r.b.neg().mul(e).divRound(this.n),a=i.mul(r.a),s=o.mul(n.a),f=i.mul(r.b),u=o.mul(n.b);return{k1:e.sub(a).sub(s),k2:f.add(u).neg()}},w.prototype.pointFromX=function(e,t){(e=new o.default(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),n=r.redSqrt();if(0!==n.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");var i=n.fromRed().isOdd();return(t&&!i||!t&&i)&&(n=n.redNeg()),this.point(e,n)},w.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,r=e.y,n=this.a.redMul(t),i=t.redSqr().redMul(t).redIAdd(n).redIAdd(this.b);return 0===r.redSqr().redISub(i).cmpn(0)},w.prototype._endoWnafMulAdd=function(e,t,r){for(var n=this._endoWnafT1,i=this._endoWnafT2,o=0;o":""},k.prototype.isInfinity=function(){return this.inf},k.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(0===this.x.cmp(e.x))return this.curve.point(null,null);var t=this.y.redSub(e.y);0!==t.cmpn(0)&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var r=t.redSqr().redISub(this.x).redISub(e.x),n=t.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,n)},k.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(0===e.cmpn(0))return this.curve.point(null,null);var t=this.curve.a,r=this.x.redSqr(),n=e.redInvm(),i=r.redAdd(r).redIAdd(r).redIAdd(t).redMul(n),o=i.redSqr().redISub(this.x.redAdd(this.x)),a=i.redMul(this.x.redSub(o)).redISub(this.y);return this.curve.point(o,a)},k.prototype.getX=function(){return this.x.fromRed()},k.prototype.getY=function(){return this.y.fromRed()},k.prototype.mul=function(e){return e=new o.default(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},k.prototype.mulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i):this.curve._wnafMulAdd(1,n,i,2)},k.prototype.jmulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i,!0):this.curve._wnafMulAdd(1,n,i,2,!0)},k.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||0===this.x.cmp(e.x)&&0===this.y.cmp(e.y))},k.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var r=this.precomputed,n=function(e){return e.neg()};t.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(n)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(n)}}}return t},k.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},m(S,y.BasePoint),w.prototype.jpoint=function(e,t,r){return new S(this,e,t,r)},S.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),r=this.x.redMul(t),n=this.y.redMul(t).redMul(e);return this.curve.point(r,n)},S.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},S.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),r=this.z.redSqr(),n=this.x.redMul(t),i=e.x.redMul(r),o=this.y.redMul(t.redMul(e.z)),a=e.y.redMul(r.redMul(this.z)),s=n.redSub(i),f=o.redSub(a);if(0===s.cmpn(0))return 0!==f.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var u=s.redSqr(),c=u.redMul(s),d=n.redMul(u),l=f.redSqr().redIAdd(c).redISub(d).redISub(d),h=f.redMul(d.redISub(l)).redISub(o.redMul(c)),p=this.z.redMul(e.z).redMul(s);return this.curve.jpoint(l,h,p)},S.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),r=this.x,n=e.x.redMul(t),i=this.y,o=e.y.redMul(t).redMul(this.z),a=r.redSub(n),s=i.redSub(o);if(0===a.cmpn(0))return 0!==s.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var f=a.redSqr(),u=f.redMul(a),c=r.redMul(f),d=s.redSqr().redIAdd(u).redISub(c).redISub(c),l=s.redMul(c.redISub(d)).redISub(i.redMul(u)),h=this.z.redMul(a);return this.curve.jpoint(d,l,h)},S.prototype.dblp=function(e){if(0===e)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var t;if(this.curve.zeroA||this.curve.threeA){var r=this;for(t=0;t=0)return!1;if(r.redIAdd(i),0===this.x.cmp(r))return!0}},S.prototype.inspect=function(){return this.isInfinity()?"":""},S.prototype.isInfinity=function(){return 0===this.z.cmpn(0)};var A=s((function(e,t){var r=t;r.base=y,r.short=_,r.mont=null,r.edwards=null})),E=s((function(e,t){var r,n=t,i=d.assert;function o(e){"short"===e.type?this.curve=new A.short(e):"edwards"===e.type?this.curve=new A.edwards(e):this.curve=new A.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,i(this.g.validate(),"Invalid curve"),i(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function s(e,t){Object.defineProperty(n,e,{configurable:!0,enumerable:!0,get:function(){var r=new o(t);return Object.defineProperty(n,e,{configurable:!0,enumerable:!0,value:r}),r}})}n.PresetCurve=o,s("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:a.default.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),s("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:a.default.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),s("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:a.default.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),s("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:a.default.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"]}),s("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:a.default.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"]}),s("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:a.default.sha256,gRed:!1,g:["9"]}),s("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:a.default.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{r=null.crash()}catch(e){r=void 0}s("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:a.default.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",r]})}));function x(e){if(!(this instanceof x))return new x(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var t=c.toArray(e.entropy,e.entropyEnc||"hex"),r=c.toArray(e.nonce,e.nonceEnc||"hex"),n=c.toArray(e.pers,e.persEnc||"hex");f(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,r,n)}var P=x;x.prototype._init=function(e,t,r){var n=e.concat(t).concat(r);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(r||[])),this._reseed=1},x.prototype.generate=function(e,t,r,n){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof t&&(n=r,r=t,t=null),r&&(r=c.toArray(r,n||"hex"),this._update(r));for(var i=[];i.length"};var M=d.assert;function I(e,t){if(e instanceof I)return e;this._importDER(e,t)||(M(e.r&&e.s,"Signature without r or s"),this.r=new o.default(e.r,16),this.s=new o.default(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}var B=I;function C(){this.place=0}function j(e,t){var r=e[t.place++];if(!(128&r))return r;var n=15&r;if(0===n||n>4)return!1;for(var i=0,o=0,a=t.place;o>>=0;return!(i<=127)&&(t.place=a,i)}function U(e){for(var t=0,r=e.length-1;!e[t]&&!(128&e[t+1])&&t>>3);for(e.push(128|r);--r;)e.push(t>>>(r<<3)&255);e.push(t)}}I.prototype._importDER=function(e,t){e=d.toArray(e,t);var r=new C;if(48!==e[r.place++])return!1;var n=j(e,r);if(!1===n)return!1;if(n+r.place!==e.length)return!1;if(2!==e[r.place++])return!1;var i=j(e,r);if(!1===i)return!1;var a=e.slice(r.place,i+r.place);if(r.place+=i,2!==e[r.place++])return!1;var s=j(e,r);if(!1===s)return!1;if(e.length!==s+r.place)return!1;var f=e.slice(r.place,s+r.place);if(0===a[0]){if(!(128&a[1]))return!1;a=a.slice(1)}if(0===f[0]){if(!(128&f[1]))return!1;f=f.slice(1)}return this.r=new o.default(a),this.s=new o.default(f),this.recoveryParam=null,!0},I.prototype.toDER=function(e){var t=this.r.toArray(),r=this.s.toArray();for(128&t[0]&&(t=[0].concat(t)),128&r[0]&&(r=[0].concat(r)),t=U(t),r=U(r);!(r[0]||128&r[1]);)r=r.slice(1);var n=[2];N(n,t.length),(n=n.concat(t)).push(2),N(n,r.length);var i=n.concat(r),o=[48];return N(o,i.length),o=o.concat(i),d.encode(o,e)};var L=function(){throw new Error("unsupported")},F=d.assert;function D(e){if(!(this instanceof D))return new D(e);"string"==typeof e&&(F(Object.prototype.hasOwnProperty.call(E,e),"Unknown curve "+e),e=E[e]),e instanceof E.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),this.hash=e.hash||e.curve.hash}var q=D;D.prototype.keyPair=function(e){return new T(this,e)},D.prototype.keyFromPrivate=function(e,t){return T.fromPrivate(this,e,t)},D.prototype.keyFromPublic=function(e,t){return T.fromPublic(this,e,t)},D.prototype.genKeyPair=function(e){e||(e={});for(var t=new P({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||L(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),r=this.n.byteLength(),n=this.n.sub(new o.default(2));;){var i=new o.default(t.generate(r));if(!(i.cmp(n)>0))return i.iaddn(1),this.keyFromPrivate(i)}},D.prototype._truncateToN=function(e,t){var r=8*e.byteLength()-this.n.bitLength();return r>0&&(e=e.ushrn(r)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e},D.prototype.sign=function(e,t,r,n){"object"===(0,i.default)(r)&&(n=r,r=null),n||(n={}),t=this.keyFromPrivate(t,r),e=this._truncateToN(new o.default(e,16));for(var a=this.n.byteLength(),s=t.getPrivate().toArray("be",a),f=e.toArray("be",a),u=new P({hash:this.hash,entropy:s,nonce:f,pers:n.pers,persEnc:n.persEnc||"utf8"}),c=this.n.sub(new o.default(1)),d=0;;d++){var l=n.k?n.k(d):new o.default(u.generate(this.n.byteLength()));if(!((l=this._truncateToN(l,!0)).cmpn(1)<=0||l.cmp(c)>=0)){var h=this.g.mul(l);if(!h.isInfinity()){var p=h.getX(),b=p.umod(this.n);if(0!==b.cmpn(0)){var y=l.invm(this.n).mul(b.mul(t.getPrivate()).iadd(e));if(0!==(y=y.umod(this.n)).cmpn(0)){var v=(h.getY().isOdd()?1:0)|(0!==p.cmp(b)?2:0);return n.canonical&&y.cmp(this.nh)>0&&(y=this.n.sub(y),v^=1),new B({r:b,s:y,recoveryParam:v})}}}}}},D.prototype.verify=function(e,t,r,n){e=this._truncateToN(new o.default(e,16)),r=this.keyFromPublic(r,n);var i=(t=new B(t,"hex")).r,a=t.s;if(i.cmpn(1)<0||i.cmp(this.n)>=0)return!1;if(a.cmpn(1)<0||a.cmp(this.n)>=0)return!1;var s,f=a.invm(this.n),u=f.mul(e).umod(this.n),c=f.mul(i).umod(this.n);return this.curve._maxwellTrick?!(s=this.g.jmulAdd(u,r.getPublic(),c)).isInfinity()&&s.eqXToP(i):!(s=this.g.mulAdd(u,r.getPublic(),c)).isInfinity()&&0===s.getX().umod(this.n).cmp(i)},D.prototype.recoverPubKey=function(e,t,r,n){F((3&r)===r,"The recovery param is more than two bits"),t=new B(t,n);var i=this.n,a=new o.default(e),s=t.r,f=t.s,u=1&r,c=r>>1;if(s.cmp(this.curve.p.umod(this.curve.n))>=0&&c)throw new Error("Unable to find sencond key candinate");s=c?this.curve.pointFromX(s.add(this.curve.n),u):this.curve.pointFromX(s,u);var d=t.r.invm(i),l=i.sub(a).mul(d).umod(i),h=f.mul(d).umod(i);return this.g.mulAdd(l,s,h)},D.prototype.getKeyRecoveryParam=function(e,t,r,n){if(null!==(t=new B(t,n)).recoveryParam)return t.recoveryParam;for(var i=0;i<4;i++){var o;try{o=this.recoverPubKey(e,t,i)}catch(e){continue}if(o.eq(r))return i}throw new Error("Unable to find valid recovery factor")};var z=s((function(e,t){var r=t;r.version="6.5.4",r.utils=d,r.rand=function(){throw new Error("unsupported")},r.curve=A,r.curves=E,r.ec=q,r.eddsa=null})).ec;t.EC=z}).call(this,r(7))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.version=void 0;t.version="signing-key/5.6.2"},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.version=void 0;t.version="transactions/5.6.2"},function(e,t,r){"use strict";var n=r(33),i=r(11),o=r(79).subscriptions,a=r(36),s=r(17),f=r(80),u=r(380),c=r(196),d=r(179),l=r(166),h=r(452),p=r(180),b=r(605),y=i.formatters,v=function(e){return"string"==typeof e[0]&&0===e[0].indexOf("0x")?"eth_getBlockByHash":"eth_getBlockByNumber"},m=function(e){return"string"==typeof e[0]&&0===e[0].indexOf("0x")?"eth_getTransactionByBlockHashAndIndex":"eth_getTransactionByBlockNumberAndIndex"},g=function(e){return"string"==typeof e[0]&&0===e[0].indexOf("0x")?"eth_getUncleByBlockHashAndIndex":"eth_getUncleByBlockNumberAndIndex"},w=function(e){return"string"==typeof e[0]&&0===e[0].indexOf("0x")?"eth_getBlockTransactionCountByHash":"eth_getBlockTransactionCountByNumber"},_=function(e){return"string"==typeof e[0]&&0===e[0].indexOf("0x")?"eth_getUncleCountByBlockHash":"eth_getUncleCountByBlockNumber"},k=function(){var e=this;n.packageInit(this,arguments);var t=this.setRequestManager;this.setRequestManager=function(r){return t(r),e.net.setRequestManager(r),e.personal.setRequestManager(r),e.accounts.setRequestManager(r),e.Contract._requestManager=e._requestManager,e.Contract.currentProvider=e._provider,!0};var r=this.setProvider;this.setProvider=function(){r.apply(e,arguments),e.setRequestManager(e._requestManager),e.ens._detectedAddress=null,e.ens._lastSyncCheck=null};var i,k,S,A=!1,E=null,x="latest",P=50,O=24,R=750,T=1e3,M=10,I=100;Object.defineProperty(this,"handleRevert",{get:function(){return A},set:function(t){A=t,e.Contract.handleRevert=A,j.forEach((function(e){e.handleRevert=A}))},enumerable:!0}),Object.defineProperty(this,"defaultCommon",{get:function(){return S},set:function(t){S=t,e.Contract.defaultCommon=S,j.forEach((function(e){e.defaultCommon=S}))},enumerable:!0}),Object.defineProperty(this,"defaultHardfork",{get:function(){return k},set:function(t){k=t,e.Contract.defaultHardfork=k,j.forEach((function(e){e.defaultHardfork=k}))},enumerable:!0}),Object.defineProperty(this,"defaultChain",{get:function(){return i},set:function(t){i=t,e.Contract.defaultChain=i,j.forEach((function(e){e.defaultChain=i}))},enumerable:!0}),Object.defineProperty(this,"transactionPollingTimeout",{get:function(){return R},set:function(t){R=t,e.Contract.transactionPollingTimeout=R,j.forEach((function(e){e.transactionPollingTimeout=R}))},enumerable:!0}),Object.defineProperty(this,"transactionPollingInterval",{get:function(){return T},set:function(t){T=t,e.Contract.transactionPollingInterval=T,j.forEach((function(e){e.transactionPollingInterval=T}))},enumerable:!0}),Object.defineProperty(this,"transactionConfirmationBlocks",{get:function(){return O},set:function(t){O=t,e.Contract.transactionConfirmationBlocks=O,j.forEach((function(e){e.transactionConfirmationBlocks=O}))},enumerable:!0}),Object.defineProperty(this,"transactionBlockTimeout",{get:function(){return P},set:function(t){P=t,e.Contract.transactionBlockTimeout=P,j.forEach((function(e){e.transactionBlockTimeout=P}))},enumerable:!0}),Object.defineProperty(this,"blockHeaderTimeout",{get:function(){return M},set:function(t){M=t,e.Contract.blockHeaderTimeout=M,j.forEach((function(e){e.blockHeaderTimeout=M}))},enumerable:!0}),Object.defineProperty(this,"defaultAccount",{get:function(){return E},set:function(t){return t&&(E=s.toChecksumAddress(y.inputAddressFormatter(t))),e.Contract.defaultAccount=E,e.personal.defaultAccount=E,j.forEach((function(e){e.defaultAccount=E})),t},enumerable:!0}),Object.defineProperty(this,"defaultBlock",{get:function(){return x},set:function(t){return x=t,e.Contract.defaultBlock=x,e.personal.defaultBlock=x,j.forEach((function(e){e.defaultBlock=x})),t},enumerable:!0}),Object.defineProperty(this,"maxListenersWarningThreshold",{get:function(){return I},set:function(t){e.currentProvider&&e.currentProvider.setMaxListeners&&(I=t,e.currentProvider.setMaxListeners(t))},enumerable:!0}),this.clearSubscriptions=e._requestManager.clearSubscriptions.bind(e._requestManager),this.removeSubscriptionById=e._requestManager.removeSubscription.bind(e._requestManager),this.net=new f(this),this.net.getNetworkType=b.bind(this),this.accounts=new h(this),this.personal=new c(this),this.personal.defaultAccount=this.defaultAccount,this.maxListenersWarningThreshold=I;var B=this,C=function(){d.apply(this,arguments);var e=this,t=B.setProvider;B.setProvider=function(){t.apply(B,arguments),n.packageInit(e,[B])}};C.setProvider=function(){d.setProvider.apply(this,arguments)},C.prototype=Object.create(d.prototype),C.prototype.constructor=C,this.Contract=C,this.Contract.defaultAccount=this.defaultAccount,this.Contract.defaultBlock=this.defaultBlock,this.Contract.transactionBlockTimeout=this.transactionBlockTimeout,this.Contract.transactionConfirmationBlocks=this.transactionConfirmationBlocks,this.Contract.transactionPollingTimeout=this.transactionPollingTimeout,this.Contract.transactionPollingInterval=this.transactionPollingInterval,this.Contract.blockHeaderTimeout=this.blockHeaderTimeout,this.Contract.handleRevert=this.handleRevert,this.Contract._requestManager=this._requestManager,this.Contract._ethAccounts=this.accounts,this.Contract.currentProvider=this._requestManager.provider,this.Iban=l,this.abi=p,this.ens=new u(this);var j=[new a({name:"getNodeInfo",call:"web3_clientVersion"}),new a({name:"getProtocolVersion",call:"eth_protocolVersion",params:0}),new a({name:"getCoinbase",call:"eth_coinbase",params:0}),new a({name:"isMining",call:"eth_mining",params:0}),new a({name:"getHashrate",call:"eth_hashrate",params:0,outputFormatter:s.hexToNumber}),new a({name:"isSyncing",call:"eth_syncing",params:0,outputFormatter:y.outputSyncingFormatter}),new a({name:"getGasPrice",call:"eth_gasPrice",params:0,outputFormatter:y.outputBigNumberFormatter}),new a({name:"getFeeHistory",call:"eth_feeHistory",params:3,inputFormatter:[s.numberToHex,y.inputBlockNumberFormatter,null]}),new a({name:"getAccounts",call:"eth_accounts",params:0,outputFormatter:s.toChecksumAddress}),new a({name:"getBlockNumber",call:"eth_blockNumber",params:0,outputFormatter:s.hexToNumber}),new a({name:"getBalance",call:"eth_getBalance",params:2,inputFormatter:[y.inputAddressFormatter,y.inputDefaultBlockNumberFormatter],outputFormatter:y.outputBigNumberFormatter}),new a({name:"getStorageAt",call:"eth_getStorageAt",params:3,inputFormatter:[y.inputAddressFormatter,s.numberToHex,y.inputDefaultBlockNumberFormatter]}),new a({name:"getCode",call:"eth_getCode",params:2,inputFormatter:[y.inputAddressFormatter,y.inputDefaultBlockNumberFormatter]}),new a({name:"getBlock",call:v,params:2,inputFormatter:[y.inputBlockNumberFormatter,function(e){return!!e}],outputFormatter:y.outputBlockFormatter}),new a({name:"getUncle",call:g,params:2,inputFormatter:[y.inputBlockNumberFormatter,s.numberToHex],outputFormatter:y.outputBlockFormatter}),new a({name:"getBlockTransactionCount",call:w,params:1,inputFormatter:[y.inputBlockNumberFormatter],outputFormatter:s.hexToNumber}),new a({name:"getBlockUncleCount",call:_,params:1,inputFormatter:[y.inputBlockNumberFormatter],outputFormatter:s.hexToNumber}),new a({name:"getTransaction",call:"eth_getTransactionByHash",params:1,inputFormatter:[null],outputFormatter:y.outputTransactionFormatter}),new a({name:"getTransactionFromBlock",call:m,params:2,inputFormatter:[y.inputBlockNumberFormatter,s.numberToHex],outputFormatter:y.outputTransactionFormatter}),new a({name:"getTransactionReceipt",call:"eth_getTransactionReceipt",params:1,inputFormatter:[null],outputFormatter:y.outputTransactionReceiptFormatter}),new a({name:"getTransactionCount",call:"eth_getTransactionCount",params:2,inputFormatter:[y.inputAddressFormatter,y.inputDefaultBlockNumberFormatter],outputFormatter:s.hexToNumber}),new a({name:"sendSignedTransaction",call:"eth_sendRawTransaction",params:1,inputFormatter:[null],abiCoder:p}),new a({name:"signTransaction",call:"eth_signTransaction",params:1,inputFormatter:[y.inputTransactionFormatter]}),new a({name:"sendTransaction",call:"eth_sendTransaction",params:1,inputFormatter:[y.inputTransactionFormatter],abiCoder:p}),new a({name:"sign",call:"eth_sign",params:2,inputFormatter:[y.inputSignFormatter,y.inputAddressFormatter],transformPayload:function(e){return e.params.reverse(),e}}),new a({name:"call",call:"eth_call",params:2,inputFormatter:[y.inputCallFormatter,y.inputDefaultBlockNumberFormatter],abiCoder:p}),new a({name:"estimateGas",call:"eth_estimateGas",params:1,inputFormatter:[y.inputCallFormatter],outputFormatter:s.hexToNumber}),new a({name:"submitWork",call:"eth_submitWork",params:3}),new a({name:"getWork",call:"eth_getWork",params:0}),new a({name:"getPastLogs",call:"eth_getLogs",params:1,inputFormatter:[y.inputLogFormatter],outputFormatter:y.outputLogFormatter}),new a({name:"getChainId",call:"eth_chainId",params:0,outputFormatter:s.hexToNumber}),new a({name:"requestAccounts",call:"eth_requestAccounts",params:0,outputFormatter:s.toChecksumAddress}),new a({name:"getProof",call:"eth_getProof",params:3,inputFormatter:[y.inputAddressFormatter,y.inputStorageKeysFormatter,y.inputDefaultBlockNumberFormatter],outputFormatter:y.outputProofFormatter}),new a({name:"getPendingTransactions",call:"eth_pendingTransactions",params:0,outputFormatter:y.outputTransactionFormatter}),new a({name:"createAccessList",call:"eth_createAccessList",params:2,inputFormatter:[y.inputTransactionFormatter,y.inputDefaultBlockNumberFormatter]}),new o({name:"subscribe",type:"eth",subscriptions:{newBlockHeaders:{subscriptionName:"newHeads",params:0,outputFormatter:y.outputBlockFormatter},pendingTransactions:{subscriptionName:"newPendingTransactions",params:0},logs:{params:1,inputFormatter:[y.inputLogFormatter],outputFormatter:y.outputLogFormatter,subscriptionHandler:function(e){e.removed?this.emit("changed",e):this.emit("data",e),"function"==typeof this.callback&&this.callback(null,e,this)}},syncing:{params:0,outputFormatter:y.outputSyncingFormatter,subscriptionHandler:function(e){var t=this;!0!==this._isSyncing?(this._isSyncing=!0,this.emit("changed",t._isSyncing),"function"==typeof this.callback&&this.callback(null,t._isSyncing,this),setTimeout((function(){t.emit("data",e),"function"==typeof t.callback&&t.callback(null,e,t)}),0)):(this.emit("data",e),"function"==typeof t.callback&&this.callback(null,e,this),clearTimeout(this._isSyncingTimeout),this._isSyncingTimeout=setTimeout((function(){e.currentBlock>e.highestBlock-200&&(t._isSyncing=!1,t.emit("changed",t._isSyncing),"function"==typeof t.callback&&t.callback(null,t._isSyncing,t))}),500))}}}})];j.forEach((function(t){t.attachToObject(e),t.setRequestManager(e._requestManager,e.accounts),t.defaultBlock=e.defaultBlock,t.defaultAccount=e.defaultAccount,t.transactionBlockTimeout=e.transactionBlockTimeout,t.transactionConfirmationBlocks=e.transactionConfirmationBlocks,t.transactionPollingTimeout=e.transactionPollingTimeout,t.transactionPollingInterval=e.transactionPollingInterval,t.handleRevert=e.handleRevert}))};n.addProviders(k),e.exports=k},function(e,t,r){"use strict";var n=r(381);e.exports=n},function(e,t,r){"use strict";var n=r(0),i=n(r(49)),o=n(r(104)),a=r(178),s=r(11).formatters,f=r(17),u=r(382),c=r(417),d=r(418);function l(e){this.eth=e;var t=null;this._detectedAddress=null,this._lastSyncCheck=null,Object.defineProperty(this,"registry",{get:function(){return new u(this)},enumerable:!0}),Object.defineProperty(this,"resolverMethodHandler",{get:function(){return new c(this.registry)},enumerable:!0}),Object.defineProperty(this,"registryAddress",{get:function(){return t},set:function(e){t=null!==e?s.inputAddressFormatter(e):e},enumerable:!0})}l.prototype.supportsInterface=function(e,t,r){return this.getResolver(e).then((function(e){return f.isHexStrict(t)||(t=f.sha3(t).slice(0,10)),e.methods.supportsInterface(t).call(r)})).catch((function(e){if("function"!=typeof r)throw e;r(e,null)}))},l.prototype.resolver=function(e,t){return this.registry.resolver(e,t)},l.prototype.getResolver=function(e,t){return this.registry.getResolver(e,t)},l.prototype.setResolver=function(e,t,r,n){return this.registry.setResolver(e,t,r,n)},l.prototype.setRecord=function(e,t,r,n,i,o){return this.registry.setRecord(e,t,r,n,i,o)},l.prototype.setSubnodeRecord=function(e,t,r,n,i,o,a){return this.registry.setSubnodeRecord(e,t,r,n,i,o,a)},l.prototype.setApprovalForAll=function(e,t,r,n){return this.registry.setApprovalForAll(e,t,r,n)},l.prototype.isApprovedForAll=function(e,t,r){return this.registry.isApprovedForAll(e,t,r)},l.prototype.recordExists=function(e,t){return this.registry.recordExists(e,t)},l.prototype.setSubnodeOwner=function(e,t,r,n,i){return this.registry.setSubnodeOwner(e,t,r,n,i)},l.prototype.getTTL=function(e,t){return this.registry.getTTL(e,t)},l.prototype.setTTL=function(e,t,r,n){return this.registry.setTTL(e,t,r,n)},l.prototype.getOwner=function(e,t){return this.registry.getOwner(e,t)},l.prototype.setOwner=function(e,t,r,n){return this.registry.setOwner(e,t,r,n)},l.prototype.getAddress=function(e,t){return this.resolverMethodHandler.method(e,"addr",[]).call(t)},l.prototype.setAddress=function(e,t,r,n){return this.resolverMethodHandler.method(e,"setAddr",[t]).send(r,n)},l.prototype.getPubkey=function(e,t){return this.resolverMethodHandler.method(e,"pubkey",[],null,t).call(t)},l.prototype.setPubkey=function(e,t,r,n,i){return this.resolverMethodHandler.method(e,"setPubkey",[t,r]).send(n,i)},l.prototype.getContent=function(e,t){return this.resolverMethodHandler.method(e,"content",[]).call(t)},l.prototype.setContent=function(e,t,r,n){return this.resolverMethodHandler.method(e,"setContent",[t]).send(r,n)},l.prototype.getContenthash=function(e,t){return this.resolverMethodHandler.method(e,"contenthash",[],d.decode).call(t)},l.prototype.setContenthash=function(e,t,r,n){var i;try{i=d.encode(t)}catch(e){var o=new Error("Could not encode "+t+". See docs for supported hash protocols.");if("function"==typeof n)return void n(o,null);throw o}return this.resolverMethodHandler.method(e,"setContenthash",[i]).send(r,n)},l.prototype.getMultihash=function(e,t){return this.resolverMethodHandler.method(e,"multihash",[]).call(t)},l.prototype.setMultihash=function(e,t,r,n){return this.resolverMethodHandler.method(e,"multihash",[t]).send(r,n)},l.prototype.checkNetwork=(0,o.default)(i.default.mark((function e(){var t,r,n,o,s;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=new Date/1e3,this._lastSyncCheck&&!(t-this._lastSyncCheck>3600)){e.next=9;break}return e.next=4,this.eth.getBlock("latest");case 4:if(r=e.sent,!((n=t-r.timestamp)>3600)){e.next=8;break}throw new Error("Network not synced; last block was "+n+" seconds ago");case 8:this._lastSyncCheck=t;case 9:if(!this.registryAddress){e.next=11;break}return e.abrupt("return",this.registryAddress);case 11:if(this._detectedAddress){e.next=20;break}return e.next=14,this.eth.net.getNetworkType();case 14:if(o=e.sent,void 0!==(s=a.addresses[o])){e.next=18;break}throw new Error("ENS is not supported on network "+o);case 18:return this._detectedAddress=s,e.abrupt("return",this._detectedAddress);case 20:return e.abrupt("return",this._detectedAddress);case 21:case"end":return e.stop()}}),e,this)}))),e.exports=l},function(e,t,r){"use strict";var n=r(179),i=r(191),o=r(78),a=r(11).formatters,s=r(17),f=r(415),u=r(416);function c(e){var t=this;this.ens=e,this.contract=e.checkNetwork().then((function(e){var r=new n(f,e);return r.setProvider(t.ens.eth.currentProvider),r}))}c.prototype.owner=function(e,t){return console.warn('Deprecated: Please use the "getOwner" method instead of "owner".'),this.getOwner(e,t)},c.prototype.getOwner=function(e,t){var r=new o(!0);return this.contract.then((function(t){return t.methods.owner(i.hash(e)).call()})).then((function(e){"function"!=typeof t?r.resolve(e):t(e,e)})).catch((function(e){"function"!=typeof t?r.reject(e):t(e,null)})),r.eventEmitter},c.prototype.setOwner=function(e,t,r,n){var s=new o(!0);return this.contract.then((function(n){return n.methods.setOwner(i.hash(e),a.inputAddressFormatter(t)).send(r)})).then((function(e){"function"!=typeof n?s.resolve(e):n(e,e)})).catch((function(e){"function"!=typeof n?s.reject(e):n(e,null)})),s.eventEmitter},c.prototype.getTTL=function(e,t){var r=new o(!0);return this.contract.then((function(t){return t.methods.ttl(i.hash(e)).call()})).then((function(e){"function"!=typeof t?r.resolve(e):t(e,e)})).catch((function(e){"function"!=typeof t?r.reject(e):t(e,null)})),r.eventEmitter},c.prototype.setTTL=function(e,t,r,n){var a=new o(!0);return this.contract.then((function(n){return n.methods.setTTL(i.hash(e),t).send(r)})).then((function(e){"function"!=typeof n?a.resolve(e):n(e,e)})).catch((function(e){"function"!=typeof n?a.reject(e):n(e,null)})),a.eventEmitter},c.prototype.setSubnodeOwner=function(e,t,r,n,f){var u=new o(!0);return s.isHexStrict(t)||(t=s.sha3(t)),this.contract.then((function(o){return o.methods.setSubnodeOwner(i.hash(e),t,a.inputAddressFormatter(r)).send(n)})).then((function(e){"function"!=typeof f?u.resolve(e):f(e,e)})).catch((function(e){"function"!=typeof f?u.reject(e):f(e,null)})),u.eventEmitter},c.prototype.setRecord=function(e,t,r,n,s,f){var u=new o(!0);return this.contract.then((function(o){return o.methods.setRecord(i.hash(e),a.inputAddressFormatter(t),a.inputAddressFormatter(r),n).send(s)})).then((function(e){"function"!=typeof f?u.resolve(e):f(e,e)})).catch((function(e){"function"!=typeof f?u.reject(e):f(e,null)})),u.eventEmitter},c.prototype.setSubnodeRecord=function(e,t,r,n,f,u,c){var d=new o(!0);return s.isHexStrict(t)||(t=s.sha3(t)),this.contract.then((function(o){return o.methods.setSubnodeRecord(i.hash(e),t,a.inputAddressFormatter(r),a.inputAddressFormatter(n),f).send(u)})).then((function(e){"function"!=typeof c?d.resolve(e):c(e,e)})).catch((function(e){"function"!=typeof c?d.reject(e):c(e,null)})),d.eventEmitter},c.prototype.setApprovalForAll=function(e,t,r,n){var i=new o(!0);return this.contract.then((function(n){return n.methods.setApprovalForAll(a.inputAddressFormatter(e),t).send(r)})).then((function(e){"function"!=typeof n?i.resolve(e):n(e,e)})).catch((function(e){"function"!=typeof n?i.reject(e):n(e,null)})),i.eventEmitter},c.prototype.isApprovedForAll=function(e,t,r){var n=new o(!0);return this.contract.then((function(r){return r.methods.isApprovedForAll(a.inputAddressFormatter(e),a.inputAddressFormatter(t)).call()})).then((function(e){"function"!=typeof r?n.resolve(e):r(e,e)})).catch((function(e){"function"!=typeof r?n.reject(e):r(e,null)})),n.eventEmitter},c.prototype.recordExists=function(e,t){var r=new o(!0);return this.contract.then((function(t){return t.methods.recordExists(i.hash(e)).call()})).then((function(e){"function"!=typeof t?r.resolve(e):t(e,e)})).catch((function(e){"function"!=typeof t?r.reject(e):t(e,null)})),r.eventEmitter},c.prototype.resolver=function(e,t){return console.warn('Deprecated: Please use the "getResolver" method instead of "resolver".'),this.getResolver(e,t)},c.prototype.getResolver=function(e,t){var r=this;return this.contract.then((function(t){return t.methods.resolver(i.hash(e)).call()})).then((function(e){var i=new n(u,e);if(i.setProvider(r.ens.eth.currentProvider),"function"!=typeof t)return i;t(i,i)})).catch((function(e){if("function"!=typeof t)throw e;t(e,null)}))},c.prototype.setResolver=function(e,t,r,n){var s=new o(!0);return this.contract.then((function(n){return n.methods.setResolver(i.hash(e),a.inputAddressFormatter(t)).send(r)})).then((function(e){"function"!=typeof n?s.resolve(e):n(e,e)})).catch((function(e){"function"!=typeof n?s.reject(e):n(e,null)})),s.eventEmitter},e.exports=c},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.version=void 0;t.version="logger/5.6.0"},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.version=void 0;t.version="bytes/5.6.1"},function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.FixedNumber=t.FixedFormat=void 0,t.formatFixed=m,t.parseFixed=g;var i=n(r(2)),o=n(r(8)),a=n(r(9)),s=r(15),f=r(16),u=r(183),c=r(182),d=new f.Logger(u.version),l={},h=c.BigNumber.from(0),p=c.BigNumber.from(-1);function b(e,t,r,n){var i={fault:t,operation:r};return void 0!==n&&(i.value=n),d.throwError(e,f.Logger.errors.NUMERIC_FAULT,i)}for(var y="0";y.length<256;)y+=y;function v(e){if("number"!=typeof e)try{e=c.BigNumber.from(e).toNumber()}catch(e){}return"number"==typeof e&&e>=0&&e<=256&&!(e%1)?"1"+y.substring(0,e):d.throwArgumentError("invalid decimal size","decimals",e)}function m(e,t){null==t&&(t=0);var r=v(t),n=(e=c.BigNumber.from(e)).lt(h);n&&(e=e.mul(p));for(var i=e.mod(r).toString();i.length2&&d.throwArgumentError("too many decimal points","value",e);var o=i[0],a=i[1];for(o||(o="0"),a||(a="0");"0"===a[a.length-1];)a=a.substring(0,a.length-1);for(a.length>r.length-1&&b("fractional component exceeds decimals","underflow","parseFixed"),""===a&&(a="0");a.length80&&d.throwArgumentError("invalid fixed format (decimals too large)","format.decimals",o),new e(l,r,n,o)}}]),e}();t.FixedFormat=w;var _=function(){function e(t,r,n,i){(0,o.default)(this,e),t!==l&&d.throwError("cannot use FixedNumber constructor; use FixedNumber.from",f.Logger.errors.UNSUPPORTED_OPERATION,{operation:"new FixedFormat"}),this.format=i,this._hex=r,this._value=n,this._isFixedNumber=!0,Object.freeze(this)}return(0,a.default)(e,[{key:"_checkFormat",value:function(e){this.format.name!==e.format.name&&d.throwArgumentError("incompatible format; use fixedNumber.toFormat","other",e)}},{key:"addUnsafe",value:function(t){this._checkFormat(t);var r=g(this._value,this.format.decimals),n=g(t._value,t.format.decimals);return e.fromValue(r.add(n),this.format.decimals,this.format)}},{key:"subUnsafe",value:function(t){this._checkFormat(t);var r=g(this._value,this.format.decimals),n=g(t._value,t.format.decimals);return e.fromValue(r.sub(n),this.format.decimals,this.format)}},{key:"mulUnsafe",value:function(t){this._checkFormat(t);var r=g(this._value,this.format.decimals),n=g(t._value,t.format.decimals);return e.fromValue(r.mul(n).div(this.format._multiplier),this.format.decimals,this.format)}},{key:"divUnsafe",value:function(t){this._checkFormat(t);var r=g(this._value,this.format.decimals),n=g(t._value,t.format.decimals);return e.fromValue(r.mul(this.format._multiplier).div(n),this.format.decimals,this.format)}},{key:"floor",value:function(){var t=this.toString().split(".");1===t.length&&t.push("0");var r=e.from(t[0],this.format),n=!t[1].match(/^(0*)$/);return this.isNegative()&&n&&(r=r.subUnsafe(k.toFormat(r.format))),r}},{key:"ceiling",value:function(){var t=this.toString().split(".");1===t.length&&t.push("0");var r=e.from(t[0],this.format),n=!t[1].match(/^(0*)$/);return!this.isNegative()&&n&&(r=r.addUnsafe(k.toFormat(r.format))),r}},{key:"round",value:function(t){null==t&&(t=0);var r=this.toString().split(".");if(1===r.length&&r.push("0"),(t<0||t>80||t%1)&&d.throwArgumentError("invalid decimal count","decimals",t),r[1].length<=t)return this;var n=e.from("1"+y.substring(0,t),this.format),i=S.toFormat(this.format);return this.mulUnsafe(n).addUnsafe(i).floor().divUnsafe(n)}},{key:"isZero",value:function(){return"0.0"===this._value||"0"===this._value}},{key:"isNegative",value:function(){return"-"===this._value[0]}},{key:"toString",value:function(){return this._value}},{key:"toHexString",value:function(e){if(null==e)return this._hex;e%8&&d.throwArgumentError("invalid byte width","width",e);var t=c.BigNumber.from(this._hex).fromTwos(this.format.width).toTwos(e).toHexString();return(0,s.hexZeroPad)(t,e/8)}},{key:"toUnsafeFloat",value:function(){return parseFloat(this.toString())}},{key:"toFormat",value:function(t){return e.fromString(this._value,t)}}],[{key:"fromValue",value:function(t,r,n){return null!=n||null==r||(0,c.isBigNumberish)(r)||(n=r,r=null),null==r&&(r=0),null==n&&(n="fixed"),e.fromString(m(t,r),w.from(n))}},{key:"fromString",value:function(t,r){null==r&&(r="fixed");var n=w.from(r),i=g(t,n.decimals);!n.signed&&i.lt(h)&&b("unsigned value cannot be negative","overflow","value",t);var o=null;n.signed?o=i.toTwos(n.width).toHexString():(o=i.toHexString(),o=(0,s.hexZeroPad)(o,n.width/8));var a=m(i,n.decimals);return new e(l,o,a,n)}},{key:"fromBytes",value:function(t,r){null==r&&(r="fixed");var n=w.from(r);if((0,s.arrayify)(t).length>n.width/8)throw new Error("overflow");var i=c.BigNumber.from(t);n.signed&&(i=i.fromTwos(n.width));var o=i.toTwos((n.signed?0:1)+n.width).toHexString(),a=m(i,n.decimals);return new e(l,o,a,n)}},{key:"from",value:function(t,r){if("string"==typeof t)return e.fromString(t,r);if((0,s.isBytes)(t))return e.fromBytes(t,r);try{return e.fromValue(t,0,r)}catch(e){if(e.code!==f.Logger.errors.INVALID_ARGUMENT)throw e}return d.throwArgumentError("invalid FixedNumber value","value",t)}},{key:"isFixedNumber",value:function(e){return!(!e||!e._isFixedNumber)}}]),e}();t.FixedNumber=_;var k=_.from(1),S=_.from("0.5")},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.version=void 0;t.version="properties/5.6.0"},function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.AddressCoder=void 0;var i=n(r(8)),o=n(r(9)),a=n(r(13)),s=n(r(14)),f=n(r(12)),u=r(107),c=r(15);function d(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=(0,f.default)(e);if(t){var i=(0,f.default)(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return(0,s.default)(this,r)}}var l=function(e){(0,a.default)(r,e);var t=d(r);function r(e){return(0,i.default)(this,r),t.call(this,"address","address",e,!1)}return(0,o.default)(r,[{key:"defaultValue",value:function(){return"0x0000000000000000000000000000000000000000"}},{key:"encode",value:function(e,t){try{t=(0,u.getAddress)(t)}catch(e){this._throwError(e.message,t)}return e.writeValue(t)}},{key:"decode",value:function(e){return(0,u.getAddress)((0,c.hexZeroPad)(e.readValue().toHexString(),20))}}]),r}(r(23).Coder);t.AddressCoder=l},function(e,t,r){"use strict";(function(e,n,i){var o,a=r(0)(r(2)); +/** + * [js-sha3]{@link https://github.com/emn178/js-sha3} + * + * @version 0.8.0 + * @author Chen, Yi-Cyuan [emn178@gmail.com] + * @copyright Chen, Yi-Cyuan 2015-2018 + * @license MIT + */ +!function(){var s="input is invalid type",f="object"===("undefined"==typeof window?"undefined":(0,a.default)(window)),u=f?window:{};u.JS_SHA3_NO_WINDOW&&(f=!1);var c=!f&&"object"===("undefined"==typeof self?"undefined":(0,a.default)(self));!u.JS_SHA3_NO_NODE_JS&&"object"===(void 0===e?"undefined":(0,a.default)(e))&&e.versions&&e.versions.node?u=n:c&&(u=self);var d=!u.JS_SHA3_NO_COMMON_JS&&"object"===(0,a.default)(i)&&i.exports,l=r(63),h=!u.JS_SHA3_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,p="0123456789abcdef".split(""),b=[4,1024,262144,67108864],y=[0,8,16,24],v=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],m=[224,256,384,512],g=[128,256],w=["hex","buffer","arrayBuffer","array","digest"],_={128:168,256:136};!u.JS_SHA3_NO_NODE_JS&&Array.isArray||(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),!h||!u.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(e){return"object"===(0,a.default)(e)&&e.buffer&&e.buffer.constructor===ArrayBuffer});for(var k=function(e,t,r){return function(n){return new N(e,t,e).update(n)[r]()}},S=function(e,t,r){return function(n,i){return new N(e,t,i).update(n)[r]()}},A=function(e,t,r){return function(t,n,i,o){return R["cshake"+e].update(t,n,i,o)[r]()}},E=function(e,t,r){return function(t,n,i,o){return R["kmac"+e].update(t,n,i,o)[r]()}},x=function(e,t,r,n){for(var i=0;i>5,this.byteCount=this.blockCount<<2,this.outputBlocks=r>>5,this.extraBytes=(31&r)>>3;for(var n=0;n<50;++n)this.s[n]=0}function L(e,t,r){N.call(this,e,t,r)}N.prototype.update=function(e){if(this.finalized)throw new Error("finalize already called");var t,r=(0,a.default)(e);if("string"!==r){if("object"!==r)throw new Error(s);if(null===e)throw new Error(s);if(h&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||h&&ArrayBuffer.isView(e)))throw new Error(s);t=!0}for(var n,i,o=this.blocks,f=this.byteCount,u=e.length,c=this.blockCount,d=0,l=this.s;d>2]|=e[d]<>2]|=i<>2]|=(192|i>>6)<>2]|=(128|63&i)<=57344?(o[n>>2]|=(224|i>>12)<>2]|=(128|i>>6&63)<>2]|=(128|63&i)<>2]|=(240|i>>18)<>2]|=(128|i>>12&63)<>2]|=(128|i>>6&63)<>2]|=(128|63&i)<=f){for(this.start=n-f,this.block=o[c],n=0;n>=8);r>0;)i.unshift(r),r=255&(e>>=8),++n;return t?i.push(n):i.unshift(n),this.update(i),i.length},N.prototype.encodeString=function(e){var t,r=(0,a.default)(e);if("string"!==r){if("object"!==r)throw new Error(s);if(null===e)throw new Error(s);if(h&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||h&&ArrayBuffer.isView(e)))throw new Error(s);t=!0}var n=0,i=e.length;if(t)n=i;else for(var o=0;o=57344?n+=3:(f=65536+((1023&f)<<10|1023&e.charCodeAt(++o)),n+=4)}return n+=this.encode(8*n),this.update(e),n},N.prototype.bytepad=function(e,t){for(var r=this.encode(t),n=0;n>2]|=this.padding[3&t],this.lastByteIndex===this.byteCount)for(e[0]=e[r],t=1;t>4&15]+p[15&e]+p[e>>12&15]+p[e>>8&15]+p[e>>20&15]+p[e>>16&15]+p[e>>28&15]+p[e>>24&15];a%t==0&&(F(r),o=0)}return i&&(e=r[o],s+=p[e>>4&15]+p[15&e],i>1&&(s+=p[e>>12&15]+p[e>>8&15]),i>2&&(s+=p[e>>20&15]+p[e>>16&15])),s},N.prototype.arrayBuffer=function(){this.finalize();var e,t=this.blockCount,r=this.s,n=this.outputBlocks,i=this.extraBytes,o=0,a=0,s=this.outputBits>>3;e=i?new ArrayBuffer(n+1<<2):new ArrayBuffer(s);for(var f=new Uint32Array(e);a>8&255,f[e+2]=t>>16&255,f[e+3]=t>>24&255;s%r==0&&F(n)}return o&&(e=s<<2,t=n[a],f[e]=255&t,o>1&&(f[e+1]=t>>8&255),o>2&&(f[e+2]=t>>16&255)),f},L.prototype=new N,L.prototype.finalize=function(){return this.encode(this.outputBits,!0),N.prototype.finalize.call(this)};var F=function(e){var t,r,n,i,o,a,s,f,u,c,d,l,h,p,b,y,m,g,w,_,k,S,A,E,x,P,O,R,T,M,I,B,C,j,U,N,L,F,D,q,z,H,K,G,V,W,J,X,Z,Y,$,Q,ee,te,re,ne,ie,oe,ae,se,fe,ue,ce;for(n=0;n<48;n+=2)i=e[0]^e[10]^e[20]^e[30]^e[40],o=e[1]^e[11]^e[21]^e[31]^e[41],a=e[2]^e[12]^e[22]^e[32]^e[42],s=e[3]^e[13]^e[23]^e[33]^e[43],f=e[4]^e[14]^e[24]^e[34]^e[44],u=e[5]^e[15]^e[25]^e[35]^e[45],c=e[6]^e[16]^e[26]^e[36]^e[46],d=e[7]^e[17]^e[27]^e[37]^e[47],t=(l=e[8]^e[18]^e[28]^e[38]^e[48])^(a<<1|s>>>31),r=(h=e[9]^e[19]^e[29]^e[39]^e[49])^(s<<1|a>>>31),e[0]^=t,e[1]^=r,e[10]^=t,e[11]^=r,e[20]^=t,e[21]^=r,e[30]^=t,e[31]^=r,e[40]^=t,e[41]^=r,t=i^(f<<1|u>>>31),r=o^(u<<1|f>>>31),e[2]^=t,e[3]^=r,e[12]^=t,e[13]^=r,e[22]^=t,e[23]^=r,e[32]^=t,e[33]^=r,e[42]^=t,e[43]^=r,t=a^(c<<1|d>>>31),r=s^(d<<1|c>>>31),e[4]^=t,e[5]^=r,e[14]^=t,e[15]^=r,e[24]^=t,e[25]^=r,e[34]^=t,e[35]^=r,e[44]^=t,e[45]^=r,t=f^(l<<1|h>>>31),r=u^(h<<1|l>>>31),e[6]^=t,e[7]^=r,e[16]^=t,e[17]^=r,e[26]^=t,e[27]^=r,e[36]^=t,e[37]^=r,e[46]^=t,e[47]^=r,t=c^(i<<1|o>>>31),r=d^(o<<1|i>>>31),e[8]^=t,e[9]^=r,e[18]^=t,e[19]^=r,e[28]^=t,e[29]^=r,e[38]^=t,e[39]^=r,e[48]^=t,e[49]^=r,p=e[0],b=e[1],W=e[11]<<4|e[10]>>>28,J=e[10]<<4|e[11]>>>28,R=e[20]<<3|e[21]>>>29,T=e[21]<<3|e[20]>>>29,se=e[31]<<9|e[30]>>>23,fe=e[30]<<9|e[31]>>>23,H=e[40]<<18|e[41]>>>14,K=e[41]<<18|e[40]>>>14,j=e[2]<<1|e[3]>>>31,U=e[3]<<1|e[2]>>>31,y=e[13]<<12|e[12]>>>20,m=e[12]<<12|e[13]>>>20,X=e[22]<<10|e[23]>>>22,Z=e[23]<<10|e[22]>>>22,M=e[33]<<13|e[32]>>>19,I=e[32]<<13|e[33]>>>19,ue=e[42]<<2|e[43]>>>30,ce=e[43]<<2|e[42]>>>30,te=e[5]<<30|e[4]>>>2,re=e[4]<<30|e[5]>>>2,N=e[14]<<6|e[15]>>>26,L=e[15]<<6|e[14]>>>26,g=e[25]<<11|e[24]>>>21,w=e[24]<<11|e[25]>>>21,Y=e[34]<<15|e[35]>>>17,$=e[35]<<15|e[34]>>>17,B=e[45]<<29|e[44]>>>3,C=e[44]<<29|e[45]>>>3,E=e[6]<<28|e[7]>>>4,x=e[7]<<28|e[6]>>>4,ne=e[17]<<23|e[16]>>>9,ie=e[16]<<23|e[17]>>>9,F=e[26]<<25|e[27]>>>7,D=e[27]<<25|e[26]>>>7,_=e[36]<<21|e[37]>>>11,k=e[37]<<21|e[36]>>>11,Q=e[47]<<24|e[46]>>>8,ee=e[46]<<24|e[47]>>>8,G=e[8]<<27|e[9]>>>5,V=e[9]<<27|e[8]>>>5,P=e[18]<<20|e[19]>>>12,O=e[19]<<20|e[18]>>>12,oe=e[29]<<7|e[28]>>>25,ae=e[28]<<7|e[29]>>>25,q=e[38]<<8|e[39]>>>24,z=e[39]<<8|e[38]>>>24,S=e[48]<<14|e[49]>>>18,A=e[49]<<14|e[48]>>>18,e[0]=p^~y&g,e[1]=b^~m&w,e[10]=E^~P&R,e[11]=x^~O&T,e[20]=j^~N&F,e[21]=U^~L&D,e[30]=G^~W&X,e[31]=V^~J&Z,e[40]=te^~ne&oe,e[41]=re^~ie&ae,e[2]=y^~g&_,e[3]=m^~w&k,e[12]=P^~R&M,e[13]=O^~T&I,e[22]=N^~F&q,e[23]=L^~D&z,e[32]=W^~X&Y,e[33]=J^~Z&$,e[42]=ne^~oe&se,e[43]=ie^~ae&fe,e[4]=g^~_&S,e[5]=w^~k&A,e[14]=R^~M&B,e[15]=T^~I&C,e[24]=F^~q&H,e[25]=D^~z&K,e[34]=X^~Y&Q,e[35]=Z^~$&ee,e[44]=oe^~se&ue,e[45]=ae^~fe&ce,e[6]=_^~S&p,e[7]=k^~A&b,e[16]=M^~B&E,e[17]=I^~C&x,e[26]=q^~H&j,e[27]=z^~K&U,e[36]=Y^~Q&G,e[37]=$^~ee&V,e[46]=se^~ue&te,e[47]=fe^~ce&re,e[8]=S^~p&y,e[9]=A^~b&m,e[18]=B^~E&P,e[19]=C^~x&O,e[28]=H^~j&N,e[29]=K^~U&L,e[38]=Q^~G&W,e[39]=ee^~V&J,e[48]=ue^~te&ne,e[49]=ce^~re&ie,e[0]^=v[n],e[1]^=v[n+1]};if(d)i.exports=R;else{for(M=0;M>=8;return t}function f(e,t,r){for(var n=0,i=0;it+1+n&&a.throwError("child data too short",i.Logger.errors.BUFFER_OVERRUN,{})}return{consumed:1+n,result:o}}function c(e,t){if(0===e.length&&a.throwError("data too short",i.Logger.errors.BUFFER_OVERRUN,{}),e[t]>=248){var r=e[t]-247;t+1+r>e.length&&a.throwError("data short segment too short",i.Logger.errors.BUFFER_OVERRUN,{});var o=f(e,t+1,r);return t+1+r+o>e.length&&a.throwError("data long segment too short",i.Logger.errors.BUFFER_OVERRUN,{}),u(e,t,t+1+r,r+o)}if(e[t]>=192){var s=e[t]-192;return t+1+s>e.length&&a.throwError("data array too short",i.Logger.errors.BUFFER_OVERRUN,{}),u(e,t,t+1,s)}if(e[t]>=184){var c=e[t]-183;t+1+c>e.length&&a.throwError("data array too short",i.Logger.errors.BUFFER_OVERRUN,{});var d=f(e,t+1,c);return t+1+c+d>e.length&&a.throwError("data array too short",i.Logger.errors.BUFFER_OVERRUN,{}),{consumed:1+c+d,result:(0,n.hexlify)(e.slice(t+1+c,t+1+c+d))}}if(e[t]>=128){var l=e[t]-128;return t+1+l>e.length&&a.throwError("data too short",i.Logger.errors.BUFFER_OVERRUN,{}),{consumed:1+l,result:(0,n.hexlify)(e.slice(t+1,t+1+l))}}return{consumed:1,result:(0,n.hexlify)(e[t])}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.version=void 0;t.version="rlp/5.6.1"},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.version=void 0;t.version="address/5.6.1"},function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.AnonymousCoder=void 0;var i=n(r(8)),o=n(r(9)),a=n(r(13)),s=n(r(14)),f=n(r(12));function u(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=(0,f.default)(e);if(t){var i=(0,f.default)(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return(0,s.default)(this,r)}}var c=function(e){(0,a.default)(r,e);var t=u(r);function r(e){var n;return(0,i.default)(this,r),(n=t.call(this,e.name,e.type,void 0,e.dynamic)).coder=e,n}return(0,o.default)(r,[{key:"defaultValue",value:function(){return this.coder.defaultValue()}},{key:"encode",value:function(e,t){return this.coder.encode(e,t)}},{key:"decode",value:function(e){return this.coder.decode(e)}}]),r}(r(23).Coder);t.AnonymousCoder=c},function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.BooleanCoder=void 0;var i=n(r(8)),o=n(r(9)),a=n(r(13)),s=n(r(14)),f=n(r(12));function u(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=(0,f.default)(e);if(t){var i=(0,f.default)(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return(0,s.default)(this,r)}}var c=function(e){(0,a.default)(r,e);var t=u(r);function r(e){return(0,i.default)(this,r),t.call(this,"bool","bool",e,!1)}return(0,o.default)(r,[{key:"defaultValue",value:function(){return!1}},{key:"encode",value:function(e,t){return e.writeValue(t?1:0)}},{key:"decode",value:function(e){return e.coerce(this.type,!e.readValue().isZero())}}]),r}(r(23).Coder);t.BooleanCoder=c},function(e,t,r){"use strict";var n=r(12);e.exports=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=n(e)););return e},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.FixedBytesCoder=void 0;var i=n(r(8)),o=n(r(9)),a=n(r(13)),s=n(r(14)),f=n(r(12)),u=r(15);function c(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=(0,f.default)(e);if(t){var i=(0,f.default)(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return(0,s.default)(this,r)}}var d=function(e){(0,a.default)(r,e);var t=c(r);function r(e,n){var o;(0,i.default)(this,r);var a="bytes"+String(e);return(o=t.call(this,a,a,n,!1)).size=e,o}return(0,o.default)(r,[{key:"defaultValue",value:function(){return"0x0000000000000000000000000000000000000000000000000000000000000000".substring(0,2+2*this.size)}},{key:"encode",value:function(e,t){var r=(0,u.arrayify)(t);return r.length!==this.size&&this._throwError("incorrect data length",t),e.writeBytes(r)}},{key:"decode",value:function(e){return e.coerce(this.name,(0,u.hexlify)(e.readBytes(this.size)))}}]),r}(r(23).Coder);t.FixedBytesCoder=d},function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.NullCoder=void 0;var i=n(r(8)),o=n(r(9)),a=n(r(13)),s=n(r(14)),f=n(r(12));function u(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=(0,f.default)(e);if(t){var i=(0,f.default)(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return(0,s.default)(this,r)}}var c=function(e){(0,a.default)(r,e);var t=u(r);function r(e){return(0,i.default)(this,r),t.call(this,"null","",e,!1)}return(0,o.default)(r,[{key:"defaultValue",value:function(){return null}},{key:"encode",value:function(e,t){return null!=t&&this._throwError("not null",t),e.writeBytes([])}},{key:"decode",value:function(e){return e.readBytes(0),e.coerce(this.name,null)}}]),r}(r(23).Coder);t.NullCoder=c},function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.NumberCoder=void 0;var i=n(r(8)),o=n(r(9)),a=n(r(13)),s=n(r(14)),f=n(r(12)),u=r(38),c=r(188);function d(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=(0,f.default)(e);if(t){var i=(0,f.default)(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return(0,s.default)(this,r)}}var l=function(e){(0,a.default)(r,e);var t=d(r);function r(e,n,o){var a;(0,i.default)(this,r);var s=(n?"int":"uint")+8*e;return(a=t.call(this,s,s,o,!1)).size=e,a.signed=n,a}return(0,o.default)(r,[{key:"defaultValue",value:function(){return 0}},{key:"encode",value:function(e,t){var r=u.BigNumber.from(t),n=c.MaxUint256.mask(8*e.wordSize);if(this.signed){var i=n.mask(8*this.size-1);(r.gt(i)||r.lt(i.add(c.One).mul(c.NegativeOne)))&&this._throwError("value out-of-bounds",t)}else(r.lt(c.Zero)||r.gt(n.mask(8*this.size)))&&this._throwError("value out-of-bounds",t);return r=r.toTwos(8*this.size).mask(8*this.size),this.signed&&(r=r.fromTwos(8*this.size).toTwos(8*e.wordSize)),e.writeValue(r)}},{key:"decode",value:function(e){var t=e.readValue().mask(8*this.size);return this.signed&&(t=t.fromTwos(8*this.size)),e.coerce(this.name,t)}}]),r}(r(23).Coder);t.NumberCoder=l},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AddressZero=void 0;t.AddressZero="0x0000000000000000000000000000000000000000"},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Zero=t.WeiPerEther=t.Two=t.One=t.NegativeOne=t.MinInt256=t.MaxUint256=t.MaxInt256=void 0;var n=r(38),i=n.BigNumber.from(-1);t.NegativeOne=i;var o=n.BigNumber.from(0);t.Zero=o;var a=n.BigNumber.from(1);t.One=a;var s=n.BigNumber.from(2);t.Two=s;var f=n.BigNumber.from("1000000000000000000");t.WeiPerEther=f;var u=n.BigNumber.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");t.MaxUint256=u;var c=n.BigNumber.from("-0x8000000000000000000000000000000000000000000000000000000000000000");t.MinInt256=c;var d=n.BigNumber.from("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");t.MaxInt256=d},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HashZero=void 0;t.HashZero="0x0000000000000000000000000000000000000000000000000000000000000000"},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EtherSymbol=void 0;t.EtherSymbol="Ξ"},function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.StringCoder=void 0;var i=n(r(8)),o=n(r(9)),a=n(r(187)),s=n(r(13)),f=n(r(14)),u=n(r(12)),c=r(81);function d(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=(0,u.default)(e);if(t){var i=(0,u.default)(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return(0,f.default)(this,r)}}var l=function(e){(0,s.default)(r,e);var t=d(r);function r(e){return(0,i.default)(this,r),t.call(this,"string",e)}return(0,o.default)(r,[{key:"defaultValue",value:function(){return""}},{key:"encode",value:function(e,t){return(0,a.default)((0,u.default)(r.prototype),"encode",this).call(this,e,(0,c.toUtf8Bytes)(t))}},{key:"decode",value:function(e){return(0,c.toUtf8String)((0,a.default)((0,u.default)(r.prototype),"decode",this).call(this,e))}}]),r}(r(186).DynamicBytesCoder);t.StringCoder=l},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatBytes32String=function(e){var t=(0,o.toUtf8Bytes)(e);if(t.length>31)throw new Error("bytes32 string must be less than 32 bytes");return(0,i.hexlify)((0,i.concat)([t,n.HashZero]).slice(0,32))},t.parseBytes32String=function(e){var t=(0,i.arrayify)(e);if(32!==t.length)throw new Error("invalid bytes32 - not 32 bytes long");if(0!==t[31])throw new Error("invalid bytes32 string - no null terminator");var r=31;for(;0===t[r-1];)r--;return(0,o.toUtf8String)(t.slice(0,r))};var n=r(188),i=r(15),o=r(108)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.version=void 0;t.version="strings/5.6.1"},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._nameprepTableA1=p,t._nameprepTableB2=b,t._nameprepTableC=y,t.nameprep=function(e){if(e.match(/^[a-z0-9-]*$/i)&&e.length<=59)return e.toLowerCase();var t=(0,n.toUtf8CodePoints)(e);r=t.map((function(e){if(f.indexOf(e)>=0)return[];if(e>=65024&&e<=65039)return[];var t=b(e);return t||[e]})),t=r.reduce((function(e,t){return t.forEach((function(t){e.push(t)})),e}),[]),(t=(0,n.toUtf8CodePoints)((0,n._toUtf8String)(t),n.UnicodeNormalizationForm.NFKC)).forEach((function(e){if(y(e))throw new Error("STRINGPREP_CONTAINS_PROHIBITED")})),t.forEach((function(e){if(p(e))throw new Error("STRINGPREP_CONTAINS_UNASSIGNED")}));var r;var i=(0,n._toUtf8String)(t);if("-"===i.substring(0,1)||"--"===i.substring(2,4)||"-"===i.substring(i.length-1))throw new Error("invalid hyphen");if(i.length>63)throw new Error("too long");return i};var n=r(108);function i(e,t){t||(t=function(e){return[parseInt(e,16)]});var r=0,n={};return e.split(",").forEach((function(e){var i=e.split(":");r+=parseInt(i[0],16),n[r]=t(i[1])})),n}function o(e){var t=0;return e.split(",").map((function(e){var r=e.split("-");return 1===r.length?r[1]="0":""===r[1]&&(r[1]="1"),{l:t+parseInt(r[0],16),h:t=parseInt(r[1],16)}}))}function a(e,t){for(var r=0,n=0;n=(r+=i.l)&&e<=r+i.h&&(e-r)%(i.d||1)==0){if(i.e&&-1!==i.e.indexOf(e-r))continue;return i}}return null}var s=o("221,13-1b,5f-,40-10,51-f,11-3,3-3,2-2,2-4,8,2,15,2d,28-8,88,48,27-,3-5,11-20,27-,8,28,3-5,12,18,b-a,1c-4,6-16,2-d,2-2,2,1b-4,17-9,8f-,10,f,1f-2,1c-34,33-14e,4,36-,13-,6-2,1a-f,4,9-,3-,17,8,2-2,5-,2,8-,3-,4-8,2-3,3,6-,16-6,2-,7-3,3-,17,8,3,3,3-,2,6-3,3-,4-a,5,2-6,10-b,4,8,2,4,17,8,3,6-,b,4,4-,2-e,2-4,b-10,4,9-,3-,17,8,3-,5-,9-2,3-,4-7,3-3,3,4-3,c-10,3,7-2,4,5-2,3,2,3-2,3-2,4-2,9,4-3,6-2,4,5-8,2-e,d-d,4,9,4,18,b,6-3,8,4,5-6,3-8,3-3,b-11,3,9,4,18,b,6-3,8,4,5-6,3-6,2,3-3,b-11,3,9,4,18,11-3,7-,4,5-8,2-7,3-3,b-11,3,13-2,19,a,2-,8-2,2-3,7,2,9-11,4-b,3b-3,1e-24,3,2-,3,2-,2-5,5,8,4,2,2-,3,e,4-,6,2,7-,b-,3-21,49,23-5,1c-3,9,25,10-,2-2f,23,6,3,8-2,5-5,1b-45,27-9,2a-,2-3,5b-4,45-4,53-5,8,40,2,5-,8,2,5-,28,2,5-,20,2,5-,8,2,5-,8,8,18,20,2,5-,8,28,14-5,1d-22,56-b,277-8,1e-2,52-e,e,8-a,18-8,15-b,e,4,3-b,5e-2,b-15,10,b-5,59-7,2b-555,9d-3,5b-5,17-,7-,27-,7-,9,2,2,2,20-,36,10,f-,7,14-,4,a,54-3,2-6,6-5,9-,1c-10,13-1d,1c-14,3c-,10-6,32-b,240-30,28-18,c-14,a0,115-,3,66-,b-76,5,5-,1d,24,2,5-2,2,8-,35-2,19,f-10,1d-3,311-37f,1b,5a-b,d7-19,d-3,41,57-,68-4,29-3,5f,29-37,2e-2,25-c,2c-2,4e-3,30,78-3,64-,20,19b7-49,51a7-59,48e-2,38-738,2ba5-5b,222f-,3c-94,8-b,6-4,1b,6,2,3,3,6d-20,16e-f,41-,37-7,2e-2,11-f,5-b,18-,b,14,5-3,6,88-,2,bf-2,7-,7-,7-,4-2,8,8-9,8-2ff,20,5-b,1c-b4,27-,27-cbb1,f7-9,28-2,b5-221,56,48,3-,2-,3-,5,d,2,5,3,42,5-,9,8,1d,5,6,2-2,8,153-3,123-3,33-27fd,a6da-5128,21f-5df,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3,2-1d,61-ff7d"),f="ad,34f,1806,180b,180c,180d,200b,200c,200d,2060,feff".split(",").map((function(e){return parseInt(e,16)})),u=[{h:25,s:32,l:65},{h:30,s:32,e:[23],l:127},{h:54,s:1,e:[48],l:64,d:2},{h:14,s:1,l:57,d:2},{h:44,s:1,l:17,d:2},{h:10,s:1,e:[2,6,8],l:61,d:2},{h:16,s:1,l:68,d:2},{h:84,s:1,e:[18,24,66],l:19,d:2},{h:26,s:32,e:[17],l:435},{h:22,s:1,l:71,d:2},{h:15,s:80,l:40},{h:31,s:32,l:16},{h:32,s:1,l:80,d:2},{h:52,s:1,l:42,d:2},{h:12,s:1,l:55,d:2},{h:40,s:1,e:[38],l:15,d:2},{h:14,s:1,l:48,d:2},{h:37,s:48,l:49},{h:148,s:1,l:6351,d:2},{h:88,s:1,l:160,d:2},{h:15,s:16,l:704},{h:25,s:26,l:854},{h:25,s:32,l:55915},{h:37,s:40,l:1247},{h:25,s:-119711,l:53248},{h:25,s:-119763,l:52},{h:25,s:-119815,l:52},{h:25,s:-119867,e:[1,4,5,7,8,11,12,17],l:52},{h:25,s:-119919,l:52},{h:24,s:-119971,e:[2,7,8,17],l:52},{h:24,s:-120023,e:[2,7,13,15,16,17],l:52},{h:25,s:-120075,l:52},{h:25,s:-120127,l:52},{h:25,s:-120179,l:52},{h:25,s:-120231,l:52},{h:25,s:-120283,l:52},{h:25,s:-120335,l:52},{h:24,s:-119543,e:[17],l:56},{h:24,s:-119601,e:[17],l:58},{h:24,s:-119659,e:[17],l:58},{h:24,s:-119717,e:[17],l:58},{h:24,s:-119775,e:[17],l:58}],c=i("b5:3bc,c3:ff,7:73,2:253,5:254,3:256,1:257,5:259,1:25b,3:260,1:263,2:269,1:268,5:26f,1:272,2:275,7:280,3:283,5:288,3:28a,1:28b,5:292,3f:195,1:1bf,29:19e,125:3b9,8b:3b2,1:3b8,1:3c5,3:3c6,1:3c0,1a:3ba,1:3c1,1:3c3,2:3b8,1:3b5,1bc9:3b9,1c:1f76,1:1f77,f:1f7a,1:1f7b,d:1f78,1:1f79,1:1f7c,1:1f7d,107:63,5:25b,4:68,1:68,1:68,3:69,1:69,1:6c,3:6e,4:70,1:71,1:72,1:72,1:72,7:7a,2:3c9,2:7a,2:6b,1:e5,1:62,1:63,3:65,1:66,2:6d,b:3b3,1:3c0,6:64,1b574:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3"),d=i("179:1,2:1,2:1,5:1,2:1,a:4f,a:1,8:1,2:1,2:1,3:1,5:1,3:1,4:1,2:1,3:1,4:1,8:2,1:1,2:2,1:1,2:2,27:2,195:26,2:25,1:25,1:25,2:40,2:3f,1:3f,33:1,11:-6,1:-9,1ac7:-3a,6d:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,b:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,c:-8,2:-8,2:-8,2:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,49:-8,1:-8,1:-4a,1:-4a,d:-56,1:-56,1:-56,1:-56,d:-8,1:-8,f:-8,1:-8,3:-7"),l=i("df:00730073,51:00690307,19:02BC006E,a7:006A030C,18a:002003B9,16:03B903080301,20:03C503080301,1d7:05650582,190f:00680331,1:00740308,1:0077030A,1:0079030A,1:006102BE,b6:03C50313,2:03C503130300,2:03C503130301,2:03C503130342,2a:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,3:1F7003B9,1:03B103B9,1:03AC03B9,2:03B10342,1:03B1034203B9,5:03B103B9,6:1F7403B9,1:03B703B9,1:03AE03B9,2:03B70342,1:03B7034203B9,5:03B703B9,6:03B903080300,1:03B903080301,3:03B90342,1:03B903080342,b:03C503080300,1:03C503080301,1:03C10313,2:03C50342,1:03C503080342,b:1F7C03B9,1:03C903B9,1:03CE03B9,2:03C90342,1:03C9034203B9,5:03C903B9,ac:00720073,5b:00B00063,6:00B00066,d:006E006F,a:0073006D,1:00740065006C,1:0074006D,124f:006800700061,2:00610075,2:006F0076,b:00700061,1:006E0061,1:03BC0061,1:006D0061,1:006B0061,1:006B0062,1:006D0062,1:00670062,3:00700066,1:006E0066,1:03BC0066,4:0068007A,1:006B0068007A,1:006D0068007A,1:00670068007A,1:00740068007A,15:00700061,1:006B00700061,1:006D00700061,1:006700700061,8:00700076,1:006E0076,1:03BC0076,1:006D0076,1:006B0076,1:006D0076,1:00700077,1:006E0077,1:03BC0077,1:006D0077,1:006B0077,1:006D0077,1:006B03C9,1:006D03C9,2:00620071,3:00632215006B0067,1:0063006F002E,1:00640062,1:00670079,2:00680070,2:006B006B,1:006B006D,9:00700068,2:00700070006D,1:00700072,2:00730076,1:00770062,c723:00660066,1:00660069,1:0066006C,1:006600660069,1:00660066006C,1:00730074,1:00730074,d:05740576,1:05740565,1:0574056B,1:057E0576,1:0574056D",(function(e){if(e.length%4!=0)throw new Error("bad data");for(var t=[],r=0;r1&&_.throwArgumentError("multiple matching functions","name",r),this.functions[n[0]]}var i=this.functions[v.FunctionFragment.fromString(e).format()];return i||_.throwArgumentError("no matching function","signature",e),i}},{key:"getEvent",value:function(e){if((0,d.isHexString)(e)){var t=e.toLowerCase();for(var r in this.events)if(t===this.getEventTopic(r))return this.events[r];_.throwArgumentError("no matching event","topichash",t)}if(-1===e.indexOf("(")){var n=e.trim(),i=Object.keys(this.events).filter((function(e){return e.split("(")[0]===n}));return 0===i.length?_.throwArgumentError("no matching event","name",n):i.length>1&&_.throwArgumentError("multiple matching events","name",n),this.events[i[0]]}var o=this.events[v.EventFragment.fromString(e).format()];return o||_.throwArgumentError("no matching event","signature",e),o}},{key:"getError",value:function(e){if((0,d.isHexString)(e)){var t=(0,p.getStatic)(this.constructor,"getSighash");for(var r in this.errors){if(e===t(this.errors[r]))return this.errors[r]}_.throwArgumentError("no matching error","sighash",e)}if(-1===e.indexOf("(")){var n=e.trim(),i=Object.keys(this.errors).filter((function(e){return e.split("(")[0]===n}));return 0===i.length?_.throwArgumentError("no matching error","name",n):i.length>1&&_.throwArgumentError("multiple matching errors","name",n),this.errors[i[0]]}var o=this.errors[v.FunctionFragment.fromString(e).format()];return o||_.throwArgumentError("no matching error","signature",e),o}},{key:"getSighash",value:function(e){if("string"==typeof e)try{e=this.getFunction(e)}catch(t){try{e=this.getError(e)}catch(e){throw t}}return(0,p.getStatic)(this.constructor,"getSighash")(e)}},{key:"getEventTopic",value:function(e){return"string"==typeof e&&(e=this.getEvent(e)),(0,p.getStatic)(this.constructor,"getEventTopic")(e)}},{key:"_decodeParams",value:function(e,t){return this._abiCoder.decode(e,t)}},{key:"_encodeParams",value:function(e,t){return this._abiCoder.encode(e,t)}},{key:"encodeDeploy",value:function(e){return this._encodeParams(this.deploy.inputs,e||[])}},{key:"decodeErrorResult",value:function(e,t){"string"==typeof e&&(e=this.getError(e));var r=(0,d.arrayify)(t);return(0,d.hexlify)(r.slice(0,4))!==this.getSighash(e)&&_.throwArgumentError("data signature does not match error ".concat(e.name,"."),"data",(0,d.hexlify)(r)),this._decodeParams(e.inputs,r.slice(4))}},{key:"encodeErrorResult",value:function(e,t){return"string"==typeof e&&(e=this.getError(e)),(0,d.hexlify)((0,d.concat)([this.getSighash(e),this._encodeParams(e.inputs,t||[])]))}},{key:"decodeFunctionData",value:function(e,t){"string"==typeof e&&(e=this.getFunction(e));var r=(0,d.arrayify)(t);return(0,d.hexlify)(r.slice(0,4))!==this.getSighash(e)&&_.throwArgumentError("data signature does not match function ".concat(e.name,"."),"data",(0,d.hexlify)(r)),this._decodeParams(e.inputs,r.slice(4))}},{key:"encodeFunctionData",value:function(e,t){return"string"==typeof e&&(e=this.getFunction(e)),(0,d.hexlify)((0,d.concat)([this.getSighash(e),this._encodeParams(e.inputs,t||[])]))}},{key:"decodeFunctionResult",value:function(e,t){"string"==typeof e&&(e=this.getFunction(e));var r=(0,d.arrayify)(t),n=null,i="",o=null,a=null,s=null;switch(r.length%this._abiCoder._getWordSize()){case 0:try{return this._abiCoder.decode(e.outputs,r)}catch(c){}break;case 4:var f=(0,d.hexlify)(r.slice(0,4)),u=x[f];if(u)o=this._abiCoder.decode(u.inputs,r.slice(4)),a=u.name,s=u.signature,u.reason&&(n=o[0]),"Error"===a?i="; VM Exception while processing transaction: reverted with reason string ".concat(JSON.stringify(o[0])):"Panic"===a&&(i="; VM Exception while processing transaction: reverted with panic code ".concat(o[0]));else try{var c=this.getError(f);o=this._abiCoder.decode(c.inputs,r.slice(4)),a=c.name,s=c.format()}catch(c){}}return _.throwError("call revert exception"+i,m.Logger.errors.CALL_EXCEPTION,{method:e.format(),data:(0,d.hexlify)(t),errorArgs:o,errorName:a,errorSignature:s,reason:n})}},{key:"encodeFunctionResult",value:function(e,t){return"string"==typeof e&&(e=this.getFunction(e)),(0,d.hexlify)(this._abiCoder.encode(e.outputs,t||[]))}},{key:"encodeFilterTopics",value:function(e,t){var r=this;"string"==typeof e&&(e=this.getEvent(e)),t.length>e.inputs.length&&_.throwError("too many arguments for "+e.format(),m.Logger.errors.UNEXPECTED_ARGUMENT,{argument:"values",value:t});var n=[];e.anonymous||n.push(this.getEventTopic(e));var i=function(e,t){return"string"===e.type?(0,l.id)(t):"bytes"===e.type?(0,h.keccak256)((0,d.hexlify)(t)):("address"===e.type&&r._abiCoder.encode(["address"],[t]),(0,d.hexZeroPad)((0,d.hexlify)(t),32))};for(t.forEach((function(t,r){var o=e.inputs[r];o.indexed?null==t?n.push(null):"array"===o.baseType||"tuple"===o.baseType?_.throwArgumentError("filtering with tuples or arrays not supported","contract."+o.name,t):Array.isArray(t)?n.push(t.map((function(e){return i(o,e)}))):n.push(i(o,t)):null!=t&&_.throwArgumentError("cannot filter non-indexed parameters; must be null","contract."+o.name,t)}));n.length&&null===n[n.length-1];)n.pop();return n}},{key:"encodeEventLog",value:function(e,t){var r=this;"string"==typeof e&&(e=this.getEvent(e));var n=[],i=[],o=[];return e.anonymous||n.push(this.getEventTopic(e)),t.length!==e.inputs.length&&_.throwArgumentError("event arguments/values mismatch","values",t),e.inputs.forEach((function(e,a){var s=t[a];if(e.indexed)if("string"===e.type)n.push((0,l.id)(s));else if("bytes"===e.type)n.push((0,h.keccak256)(s));else{if("tuple"===e.baseType||"array"===e.baseType)throw new Error("not implemented");n.push(r._abiCoder.encode([e.type],[s]))}else i.push(e),o.push(s)})),{data:this._abiCoder.encode(i,o),topics:n}}},{key:"decodeEventLog",value:function(e,t,r){if("string"==typeof e&&(e=this.getEvent(e)),null!=r&&!e.anonymous){var n=this.getEventTopic(e);(0,d.isHexString)(r[0],32)&&r[0].toLowerCase()===n||_.throwError("fragment/topic mismatch",m.Logger.errors.INVALID_ARGUMENT,{argument:"topics[0]",expected:n,value:r[0]}),r=r.slice(1)}var i=[],o=[],a=[];e.inputs.forEach((function(e,t){e.indexed?"string"===e.type||"bytes"===e.type||"tuple"===e.baseType||"array"===e.baseType?(i.push(v.ParamType.fromObject({type:"bytes32",name:e.name})),a.push(!0)):(i.push(e),a.push(!1)):(o.push(e),a.push(!1))}));var s=null!=r?this._abiCoder.decode(i,(0,d.concat)(r)):null,f=this._abiCoder.decode(o,t,!0),u=[],c=0,l=0;e.inputs.forEach((function(e,t){if(e.indexed)if(null==s)u[t]=new E({_isIndexed:!0,hash:null});else if(a[t])u[t]=new E({_isIndexed:!0,hash:s[l++]});else try{u[t]=s[l++]}catch(e){u[t]=e}else try{u[t]=f[c++]}catch(e){u[t]=e}if(e.name&&null==u[e.name]){var r=u[t];r instanceof Error?Object.defineProperty(u,e.name,{enumerable:!0,get:function(){throw P("property ".concat(JSON.stringify(e.name)),r)}}):u[e.name]=r}}));for(var h=function(e){var t=u[e];t instanceof Error&&Object.defineProperty(u,e,{enumerable:!0,get:function(){throw P("index ".concat(e),t)}})},p=0;p256||t[2]&&t[2]!==String(n))&&y.throwArgumentError("invalid numeric width","type",e);var i=_.mask(r?n-1:n),o=r?i.add(w).mul(m):g;return function(t){var r=f.BigNumber.from(t);return(r.lt(o)||r.gt(i))&&y.throwArgumentError("value out-of-bounds for ".concat(e),"value",t),(0,u.hexZeroPad)(r.toTwos(256).toHexString(),32)}}var a=e.match(/^bytes(\d+)$/);if(a){var d=parseInt(a[1]);return(0===d||d>32||a[1]!==String(d))&&y.throwArgumentError("invalid bytes width","type",e),function(t){return(0,u.arrayify)(t).length!==d&&y.throwArgumentError("invalid length for ".concat(e),"value",t),function(e){var t=(0,u.arrayify)(e),r=t.length%32;return r?(0,u.hexConcat)([t,v.slice(r)]):(0,u.hexlify)(t)}(t)}}switch(e){case"address":return function(e){return(0,u.hexZeroPad)((0,s.getAddress)(e),32)};case"bool":return function(e){return e?k:S};case"bytes":return function(e){return(0,c.keccak256)(e)};case"string":return function(e){return(0,p.id)(e)}}return null}function R(e,t){return"".concat(e,"(").concat(t.map((function(e){var t=e.name;return e.type+" "+t})).join(","),")")}var T=function(){function e(t){(0,o.default)(this,e),(0,d.defineReadOnly)(this,"types",Object.freeze((0,d.deepCopy)(t))),(0,d.defineReadOnly)(this,"_encoderCache",{}),(0,d.defineReadOnly)(this,"_types",{});var r={},n={},i={};Object.keys(t).forEach((function(e){r[e]={},n[e]=[],i[e]={}}));var a=function(e){var i={};t[e].forEach((function(o){i[o.name]&&y.throwArgumentError("duplicate variable name ".concat(JSON.stringify(o.name)," in ").concat(JSON.stringify(e)),"types",t),i[o.name]=!0;var a=o.type.match(/^([^\x5b]*)(\x5b|$)/)[1];a===e&&y.throwArgumentError("circular type reference to ".concat(JSON.stringify(a)),"types",t),O(a)||(n[a]||y.throwArgumentError("unknown type ".concat(JSON.stringify(a)),"types",t),n[a].push(e),r[e][a]=!0)}))};for(var s in t)a(s);var f=Object.keys(n).filter((function(e){return 0===n[e].length}));for(var u in 0===f.length?y.throwArgumentError("missing primary type","types",t):f.length>1&&y.throwArgumentError("ambiguous primary types or unused types: ".concat(f.map((function(e){return JSON.stringify(e)})).join(", ")),"types",t),(0,d.defineReadOnly)(this,"primaryType",f[0]),function e(o,a){a[o]&&y.throwArgumentError("circular type reference to ".concat(JSON.stringify(o)),"types",t),a[o]=!0,Object.keys(r[o]).forEach((function(t){n[t]&&(e(t,a),Object.keys(a).forEach((function(e){i[e][t]=!0})))})),delete a[o]}(this.primaryType,{}),i){var c=Object.keys(i[u]);c.sort(),this._types[u]=R(u,t[u])+c.map((function(e){return R(e,t[e])})).join("")}}return(0,a.default)(e,[{key:"getEncoder",value:function(e){var t=this._encoderCache[e];return t||(t=this._encoderCache[e]=this._getEncoder(e)),t}},{key:"_getEncoder",value:function(e){var t=this,r=O(e);if(r)return r;var n=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(n){var i=n[1],o=this.getEncoder(i),a=parseInt(n[3]);return function(e){a>=0&&e.length!==a&&y.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",e);var r=e.map(o);return t._types[i]&&(r=r.map(c.keccak256)),(0,c.keccak256)((0,u.hexConcat)(r))}}var s=this.types[e];if(s){var f=(0,p.id)(this._types[e]);return function(e){var r=s.map((function(r){var n=r.name,i=r.type,o=t.getEncoder(i)(e[n]);return t._types[i]?(0,c.keccak256)(o):o}));return r.unshift(f),(0,u.hexConcat)(r)}}return y.throwArgumentError("unknown type: ".concat(e),"type",e)}},{key:"encodeType",value:function(e){var t=this._types[e];return t||y.throwArgumentError("unknown type: ".concat(JSON.stringify(e)),"name",e),t}},{key:"encodeData",value:function(e,t){return this.getEncoder(e)(t)}},{key:"hashStruct",value:function(e,t){return(0,c.keccak256)(this.encodeData(e,t))}},{key:"encode",value:function(e){return this.encodeData(this.primaryType,e)}},{key:"hash",value:function(e){return this.hashStruct(this.primaryType,e)}},{key:"_visit",value:function(e,t,r){var n=this;if(O(e))return r(e,t);var i=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(i){var o=i[1],a=parseInt(i[3]);return a>=0&&t.length!==a&&y.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",t),t.map((function(e){return n._visit(o,e,r)}))}var s=this.types[e];return s?s.reduce((function(e,i){var o=i.name,a=i.type;return e[o]=n._visit(a,t[o],r),e}),{}):y.throwArgumentError("unknown type: ".concat(e),"type",e)}},{key:"visit",value:function(e,t){return this._visit(this.primaryType,e,t)}}],[{key:"from",value:function(t){return new e(t)}},{key:"getPrimaryType",value:function(t){return e.from(t).primaryType}},{key:"hashStruct",value:function(t,r,n){return e.from(r).hashStruct(t,n)}},{key:"hashDomain",value:function(t){var r=[];for(var n in t){var i=A[n];i||y.throwArgumentError("invalid typed-data domain key: ".concat(JSON.stringify(n)),"domain",t),r.push({name:n,type:i})}return r.sort((function(e,t){return E.indexOf(e.name)-E.indexOf(t.name)})),e.hashStruct("EIP712Domain",{EIP712Domain:r},t)}},{key:"encode",value:function(t,r,n){return(0,u.hexConcat)(["0x1901",e.hashDomain(t),e.from(r).hash(n)])}},{key:"hash",value:function(t,r,n){return(0,c.keccak256)(e.encode(t,r,n))}},{key:"resolveNames",value:function(t,r,n,o){return b(this,void 0,void 0,i.default.mark((function a(){var s,f,c;return i.default.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:t=(0,d.shallowCopy)(t),s={},t.verifyingContract&&!(0,u.isHexString)(t.verifyingContract,20)&&(s[t.verifyingContract]="0x"),(f=e.from(r)).visit(n,(function(e,t){return"address"!==e||(0,u.isHexString)(t,20)||(s[t]="0x"),t})),a.t0=i.default.keys(s);case 6:if((a.t1=a.t0()).done){a.next=13;break}return c=a.t1.value,a.next=10,o(c);case 10:s[c]=a.sent,a.next=6;break;case 13:return t.verifyingContract&&s[t.verifyingContract]&&(t.verifyingContract=s[t.verifyingContract]),n=f.visit(n,(function(e,t){return"address"===e&&s[t]?s[t]:t})),a.abrupt("return",{domain:t,value:n});case 16:case"end":return a.stop()}}),a)})))}},{key:"getPayload",value:function(t,r,n){e.hashDomain(t);var i={},o=[];E.forEach((function(e){var r=t[e];null!=r&&(i[e]=P[e](r),o.push({name:e,type:A[e]}))}));var a=e.from(r),s=(0,d.shallowCopy)(r);return s.EIP712Domain?y.throwArgumentError("types must not contain EIP712Domain type","types.EIP712Domain",r):s.EIP712Domain=o,a.encode(n),{types:s,domain:i,primaryType:a.primaryType,message:a.visit(n,(function(e,t){if(e.match(/^bytes(\d*)/))return(0,u.hexlify)((0,u.arrayify)(t));if(e.match(/^u?int/))return f.BigNumber.from(t).toString();switch(e){case"address":return t.toLowerCase();case"bool":return!!t;case"string":return"string"!=typeof t&&y.throwArgumentError("invalid string","value",t),t}return y.throwArgumentError("unsupported type","type",e)}))}}}]),e}();t.TypedDataEncoder=T},function(e,t,r){"use strict";(function(e,t,n){var i=r(0)(r(2)); +/** + * [js-sha3]{@link https://github.com/emn178/js-sha3} + * + * @version 0.5.7 + * @author Chen, Yi-Cyuan [emn178@gmail.com] + * @copyright Chen, Yi-Cyuan 2015-2016 + * @license MIT + */ +!function(){var r="object"===("undefined"==typeof window?"undefined":(0,i.default)(window))?window:{};!r.JS_SHA3_NO_NODE_JS&&"object"===(void 0===e?"undefined":(0,i.default)(e))&&e.versions&&e.versions.node&&(r=t);for(var o=!r.JS_SHA3_NO_COMMON_JS&&"object"===(0,i.default)(n)&&n.exports,a="0123456789abcdef".split(""),s=[0,8,16,24],f=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],u=[224,256,384,512],c=["hex","buffer","arrayBuffer","array"],d=function(e,t,r){return function(n){return new k(e,t,e).update(n)[r]()}},l=function(e,t,r){return function(n,i){return new k(e,t,i).update(n)[r]()}},h=function(e,t){var r=d(e,t,"hex");r.create=function(){return new k(e,t,e)},r.update=function(e){return r.create().update(e)};for(var n=0;n>5,this.byteCount=this.blockCount<<2,this.outputBlocks=r>>5,this.extraBytes=(31&r)>>3;for(var n=0;n<50;++n)this.s[n]=0}k.prototype.update=function(e){var t="string"!=typeof e;t&&e.constructor===ArrayBuffer&&(e=new Uint8Array(e));for(var r,n,i=e.length,o=this.blocks,a=this.byteCount,f=this.blockCount,u=0,c=this.s;u>2]|=e[u]<>2]|=n<>2]|=(192|n>>6)<>2]|=(128|63&n)<=57344?(o[r>>2]|=(224|n>>12)<>2]|=(128|n>>6&63)<>2]|=(128|63&n)<>2]|=(240|n>>18)<>2]|=(128|n>>12&63)<>2]|=(128|n>>6&63)<>2]|=(128|63&n)<=a){for(this.start=r-a,this.block=o[f],r=0;r>2]|=this.padding[3&t],this.lastByteIndex===this.byteCount)for(e[0]=e[r],t=1;t>4&15]+a[15&e]+a[e>>12&15]+a[e>>8&15]+a[e>>20&15]+a[e>>16&15]+a[e>>28&15]+a[e>>24&15];s%t==0&&(S(r),o=0)}return i&&(e=r[o],i>0&&(f+=a[e>>4&15]+a[15&e]),i>1&&(f+=a[e>>12&15]+a[e>>8&15]),i>2&&(f+=a[e>>20&15]+a[e>>16&15])),f},k.prototype.arrayBuffer=function(){this.finalize();var e,t=this.blockCount,r=this.s,n=this.outputBlocks,i=this.extraBytes,o=0,a=0,s=this.outputBits>>3;e=i?new ArrayBuffer(n+1<<2):new ArrayBuffer(s);for(var f=new Uint32Array(e);a>8&255,f[e+2]=t>>16&255,f[e+3]=t>>24&255;s%r==0&&S(n)}return o&&(e=s<<2,t=n[a],o>0&&(f[e]=255&t),o>1&&(f[e+1]=t>>8&255),o>2&&(f[e+2]=t>>16&255)),f};var S=function(e){var t,r,n,i,o,a,s,u,c,d,l,h,p,b,y,v,m,g,w,_,k,S,A,E,x,P,O,R,T,M,I,B,C,j,U,N,L,F,D,q,z,H,K,G,V,W,J,X,Z,Y,$,Q,ee,te,re,ne,ie,oe,ae,se,fe,ue,ce;for(n=0;n<48;n+=2)i=e[0]^e[10]^e[20]^e[30]^e[40],o=e[1]^e[11]^e[21]^e[31]^e[41],a=e[2]^e[12]^e[22]^e[32]^e[42],s=e[3]^e[13]^e[23]^e[33]^e[43],u=e[4]^e[14]^e[24]^e[34]^e[44],c=e[5]^e[15]^e[25]^e[35]^e[45],d=e[6]^e[16]^e[26]^e[36]^e[46],l=e[7]^e[17]^e[27]^e[37]^e[47],t=(h=e[8]^e[18]^e[28]^e[38]^e[48])^(a<<1|s>>>31),r=(p=e[9]^e[19]^e[29]^e[39]^e[49])^(s<<1|a>>>31),e[0]^=t,e[1]^=r,e[10]^=t,e[11]^=r,e[20]^=t,e[21]^=r,e[30]^=t,e[31]^=r,e[40]^=t,e[41]^=r,t=i^(u<<1|c>>>31),r=o^(c<<1|u>>>31),e[2]^=t,e[3]^=r,e[12]^=t,e[13]^=r,e[22]^=t,e[23]^=r,e[32]^=t,e[33]^=r,e[42]^=t,e[43]^=r,t=a^(d<<1|l>>>31),r=s^(l<<1|d>>>31),e[4]^=t,e[5]^=r,e[14]^=t,e[15]^=r,e[24]^=t,e[25]^=r,e[34]^=t,e[35]^=r,e[44]^=t,e[45]^=r,t=u^(h<<1|p>>>31),r=c^(p<<1|h>>>31),e[6]^=t,e[7]^=r,e[16]^=t,e[17]^=r,e[26]^=t,e[27]^=r,e[36]^=t,e[37]^=r,e[46]^=t,e[47]^=r,t=d^(i<<1|o>>>31),r=l^(o<<1|i>>>31),e[8]^=t,e[9]^=r,e[18]^=t,e[19]^=r,e[28]^=t,e[29]^=r,e[38]^=t,e[39]^=r,e[48]^=t,e[49]^=r,b=e[0],y=e[1],W=e[11]<<4|e[10]>>>28,J=e[10]<<4|e[11]>>>28,R=e[20]<<3|e[21]>>>29,T=e[21]<<3|e[20]>>>29,se=e[31]<<9|e[30]>>>23,fe=e[30]<<9|e[31]>>>23,H=e[40]<<18|e[41]>>>14,K=e[41]<<18|e[40]>>>14,j=e[2]<<1|e[3]>>>31,U=e[3]<<1|e[2]>>>31,v=e[13]<<12|e[12]>>>20,m=e[12]<<12|e[13]>>>20,X=e[22]<<10|e[23]>>>22,Z=e[23]<<10|e[22]>>>22,M=e[33]<<13|e[32]>>>19,I=e[32]<<13|e[33]>>>19,ue=e[42]<<2|e[43]>>>30,ce=e[43]<<2|e[42]>>>30,te=e[5]<<30|e[4]>>>2,re=e[4]<<30|e[5]>>>2,N=e[14]<<6|e[15]>>>26,L=e[15]<<6|e[14]>>>26,g=e[25]<<11|e[24]>>>21,w=e[24]<<11|e[25]>>>21,Y=e[34]<<15|e[35]>>>17,$=e[35]<<15|e[34]>>>17,B=e[45]<<29|e[44]>>>3,C=e[44]<<29|e[45]>>>3,E=e[6]<<28|e[7]>>>4,x=e[7]<<28|e[6]>>>4,ne=e[17]<<23|e[16]>>>9,ie=e[16]<<23|e[17]>>>9,F=e[26]<<25|e[27]>>>7,D=e[27]<<25|e[26]>>>7,_=e[36]<<21|e[37]>>>11,k=e[37]<<21|e[36]>>>11,Q=e[47]<<24|e[46]>>>8,ee=e[46]<<24|e[47]>>>8,G=e[8]<<27|e[9]>>>5,V=e[9]<<27|e[8]>>>5,P=e[18]<<20|e[19]>>>12,O=e[19]<<20|e[18]>>>12,oe=e[29]<<7|e[28]>>>25,ae=e[28]<<7|e[29]>>>25,q=e[38]<<8|e[39]>>>24,z=e[39]<<8|e[38]>>>24,S=e[48]<<14|e[49]>>>18,A=e[49]<<14|e[48]>>>18,e[0]=b^~v&g,e[1]=y^~m&w,e[10]=E^~P&R,e[11]=x^~O&T,e[20]=j^~N&F,e[21]=U^~L&D,e[30]=G^~W&X,e[31]=V^~J&Z,e[40]=te^~ne&oe,e[41]=re^~ie&ae,e[2]=v^~g&_,e[3]=m^~w&k,e[12]=P^~R&M,e[13]=O^~T&I,e[22]=N^~F&q,e[23]=L^~D&z,e[32]=W^~X&Y,e[33]=J^~Z&$,e[42]=ne^~oe&se,e[43]=ie^~ae&fe,e[4]=g^~_&S,e[5]=w^~k&A,e[14]=R^~M&B,e[15]=T^~I&C,e[24]=F^~q&H,e[25]=D^~z&K,e[34]=X^~Y&Q,e[35]=Z^~$&ee,e[44]=oe^~se&ue,e[45]=ae^~fe&ce,e[6]=_^~S&b,e[7]=k^~A&y,e[16]=M^~B&E,e[17]=I^~C&x,e[26]=q^~H&j,e[27]=z^~K&U,e[36]=Y^~Q&G,e[37]=$^~ee&V,e[46]=se^~ue&te,e[47]=fe^~ce&re,e[8]=S^~b&v,e[9]=A^~y&m,e[18]=B^~E&P,e[19]=C^~x&O,e[28]=H^~j&N,e[29]=K^~U&L,e[38]=Q^~G&W,e[39]=ee^~V&J,e[48]=ue^~te&ne,e[49]=ce^~re&ie,e[0]^=f[n],e[1]^=f[n+1]};if(o)n.exports=b;else for(v=0;v>23,l=c>>21&3,h=c>>5&65535,p=31&c,b=t.mapStr.substr(h,p);if(0===l||n&&1&d)throw new Error("Illegal char "+u);1===l?o.push(b):2===l?o.push(i?b:u):3===l&&o.push(u)}return o.join("").normalize("NFC")}function n(t,n,o){void 0===o&&(o=!1);var a=r(t,o,n).split(".");return(a=a.map((function(t){return t.startsWith("xn--")?i(t=e.decode(t.substring(4)),o,!1):i(t,o,n),t}))).join(".")}function i(e,n,i){if("-"===e[2]&&"-"===e[3])throw new Error("Failed to validate "+e);if(e.startsWith("-")||e.endsWith("-"))throw new Error("Failed to validate "+e);if(e.includes("."))throw new Error("Failed to validate "+e);if(r(e,n,i)!==e)throw new Error("Failed to validate "+e);var o=e.codePointAt(0);if(t.mapChar(o)&2<<23)throw new Error("Label contains illegal character: "+o)}return{toUnicode:function(e,t){return void 0===t&&(t={}),n(e,!1,"useStd3ASCII"in t&&t.useStd3ASCII)},toAscii:function(t,r){void 0===r&&(r={});var i,o=!("transitional"in r)||r.transitional,a="useStd3ASCII"in r&&r.useStd3ASCII,s="verifyDnsLength"in r&&r.verifyDnsLength,f=n(t,o,a).split(".").map(e.toASCII),u=f.join(".");if(s){if(u.length<1||u.length>253)throw new Error("DNS name has wrong length: "+u);for(i=0;i63)throw new Error("DNS label has wrong length: "+c)}}return u}}}(e,t)}.apply(t,n))||(e.exports=i)},function(e,t,r){"use strict";var n;r(0)(r(2));void 0===(n=function(){return e=[new Uint32Array([2157250,2157314,2157378,2157442,2157506,2157570,2157634,0,2157698,2157762,2157826,2157890,2157954,0,2158018,0]),new Uint32Array([2179041,6291456,2179073,6291456,2179105,6291456,2179137,6291456,2179169,6291456,2179201,6291456,2179233,6291456,2179265,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,14680064,14680064,14680064,14680064,14680064]),new Uint32Array([0,2113729,2197345,2197377,2113825,2197409,2197441,2113921,2197473,2114017,2197505,2197537,2197569,2197601,2197633,2197665]),new Uint32Array([6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,23068672,23068672,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,0,0,0,0,23068672,23068672,23068672,0,0,0,0,23068672]),new Uint32Array([14680064,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,14680064,14680064]),new Uint32Array([2196001,2196033,2196065,2196097,2196129,2196161,2196193,2196225,2196257,2196289,2196321,2196353,2196385,2196417,2196449,2196481]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,6291456,0,0,0,0,0]),new Uint32Array([2097281,2105921,2097729,2106081,0,2097601,2162337,2106017,2133281,2097505,2105889,2097185,2097697,2135777,2097633,2097441]),new Uint32Array([2177025,6291456,2177057,6291456,2177089,6291456,2177121,6291456,2177153,6291456,2177185,6291456,2177217,6291456,2177249,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,0,6291456,6291456,0,0,0,0,0,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,6291456]),new Uint32Array([0,23068672,23068672,23068672,0,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,6291456]),new Uint32Array([2134435,2134531,2134627,2134723,2134723,2134819,2134819,2134915,2134915,2135011,2105987,2135107,2135203,2135299,2131587,2135395]),new Uint32Array([0,0,0,0,0,0,0,6291456,2168673,2169249,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2147906,2147970,2148034,2148098,2148162,2148226,2148290,2148354,2147906,2147970,2148034,2148098,2148162,2148226,2148290,2148354]),new Uint32Array([2125219,2125315,2152834,2152898,2125411,2152962,2153026,2125506,2125507,2125603,2153090,2153154,2153218,2153282,2153346,2105348]),new Uint32Array([2203393,6291456,2203425,6291456,2203457,6291456,2203489,6291456,6291456,6291456,6291456,2203521,6291456,2181281,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,23068672,6291456,2145538,23068672,23068672,23068672,23068672,23068672,23068672,23068672,0,0,0,0,6291456]),new Uint32Array([2139426,2160834,2160898,2160962,2134242,2161026,2161090,2161154,2161218,2161282,2161346,2161410,2138658,2161474,2161538,2134722]),new Uint32Array([2119939,2124930,2125026,2106658,2125218,2128962,2129058,2129154,2129250,2129346,2129442,2108866,2108770,2150466,2150530,2150594]),new Uint32Array([2201601,6291456,2201633,6291456,2201665,6291456,2201697,6291456,2201729,6291456,2201761,6291456,2201793,6291456,2201825,6291456]),new Uint32Array([2193537,2193569,2193601,2193633,2193665,2193697,2193729,2193761,2193793,2193825,2193857,2193889,2193921,2193953,2193985,2194017]),new Uint32Array([6291456,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([0,6291456,6291456,0,0,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([2190561,6291456,2190593,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2190625,6291456,2190657,6291456,23068672]),new Uint32Array([2215905,2215937,2215969,2216001,2216033,2216065,2216097,2216129,2216161,2216193,2216225,2216257,2105441,2216289,2216321,2216353]),new Uint32Array([23068672,18884130,23068672,23068672,23068672,6291456,23068672,23068672,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672]),new Uint32Array([23068672,23068672,0,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([6291456,6291456,23068672,23068672,0,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([2191233,2191265,2191297,2191329,2191361,2191393,2191425,2117377,2191457,2191489,2191521,2191553,2191585,2191617,2191649,2117953]),new Uint32Array([2132227,2132323,2132419,2132419,2132515,2132515,2132611,2132707,2132707,2132803,2132899,2132899,2132995,2132995,2133091,2133187]),new Uint32Array([0,0,0,0,0,0,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,6291456,0,0]),new Uint32Array([2112481,2112577,2098177,2098305,2108321,2108289,2100865,2113153,2108481,2113345,2113441,10609889,10610785,10609921,10610817,2222241]),new Uint32Array([6291456,6291456,6291456,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,0,0]),new Uint32Array([2219969,2157121,2157441,2157505,2157889,2157953,2220001,2158465,2158529,10575617,2156994,2157058,2129923,2130019,2157122,2157186]),new Uint32Array([6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,0,0,0,0,0]),new Uint32Array([2185249,6291456,2185281,6291456,2185313,6291456,2185345,6291456,2185377,6291456,2185409,6291456,2185441,6291456,2185473,6291456]),new Uint32Array([0,0,0,0,6291456,6291456,6291456,6291456,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,0,0,23068672,23068672,0,0,23068672,23068672,23068672,6291456,0]),new Uint32Array([2183361,6291456,2183393,6291456,2183425,6291456,2183457,6291456,2183489,6291456,2183521,6291456,2183553,6291456,2183585,6291456]),new Uint32Array([2192161,2192193,2192225,2192257,2192289,2192321,2192353,2192385,2192417,2192449,2192481,2192513,2192545,2192577,2192609,2192641]),new Uint32Array([2212001,2212033,2212065,2212097,2212129,2212161,2212193,2212225,2212257,2212289,2212321,2212353,2212385,2212417,2212449,2207265]),new Uint32Array([2249825,2249857,2249889,2249921,2249954,2250018,2250082,2250145,2250177,2250209,2250241,2250274,2250337,2250370,2250433,2250465]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2147905,2147969,2148033,2148097,2148161,2148225,2148289,2148353]),new Uint32Array([10485857,6291456,2197217,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,23068672,23068672]),new Uint32Array([0,23068672,23068672,23068672,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456]),new Uint32Array([2180353,2180385,2144033,2180417,2180449,2180481,2180513,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2112481,2112577,2098177,2098305,2108321,2108289,2100865,2113153,2108481,2113345,2113441,10610209,10610465,10610241,10610753,10609857]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,0,0]),new Uint32Array([2223842,2223906,2223970,2224034,2224098,2224162,2224226,2224290,2224354,2224418,2224482,2224546,2224610,2224674,2224738,2224802]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,6291456,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456]),new Uint32Array([23068672,23068672,23068672,18923650,23068672,23068672,23068672,23068672,0,23068672,23068672,23068672,23068672,18923714,23068672,23068672]),new Uint32Array([2126179,2125538,2126275,2126371,2126467,2125634,2126563,2105603,2105604,2125346,2126659,2126755,2126851,2098179,2098181,2098182]),new Uint32Array([2227426,2227490,2227554,2227618,0,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2192353,2240642,2240642,2240705,2240737,2240737,2240769,2240802,2240866,2240929,2240961,2240993,2241025,2241057,2241089,2241121]),new Uint32Array([6291456,2170881,2170913,2170945,6291456,2170977,6291456,2171009,2171041,6291456,6291456,6291456,2171073,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([2132226,2132514,2163586,2132610,2160386,2133090,2133186,2160450,2160514,2160578,2133570,2106178,2160642,2133858,2160706,2160770]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,10532162,10532226,10532290,10532354,10532418,10532482,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,23068672]),new Uint32Array([2098209,2108353,2108193,2108481,2170241,2111713,2105473,2105569,2105601,2112289,2112481,2098305,2108321,0,0,0]),new Uint32Array([2209121,2209153,2209185,2209217,2209249,2209281,2209313,2209345,2209377,2209409,2209441,2209473,2207265,2209505,2209537,2209569]),new Uint32Array([2189025,6291456,2189057,6291456,2189089,6291456,2189121,6291456,2189153,6291456,2189185,6291456,2189217,6291456,2189249,6291456]),new Uint32Array([2173825,2153473,2173857,2173889,2173921,2173953,2173985,2173761,2174017,2174049,2174081,2174113,2174145,2174177,2149057,2233057]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2165764,2140004]),new Uint32Array([2215105,6291456,2215137,6291456,6291456,2215169,2215201,6291456,6291456,6291456,2215233,2215265,2215297,2215329,2215361,2215393]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,0,0,6291456,0,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([23068672,23068672,6291456,6291456,6291456,23068672,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([10505091,10505187,10505283,10505379,10505475,10505571,10505667,10505763,10505859,10505955,10506051,10506147,10506243,10506339,10506435,10506531]),new Uint32Array([2229730,2229794,2229858,2229922,2229986,2230050,2230114,2230178,2230242,2230306,2230370,2230434,2230498,2230562,2230626,2230690]),new Uint32Array([2105505,2098241,2108353,2108417,2105825,0,2100897,2111905,2105473,2105569,2105601,2112289,2108193,2112481,2112577,2098177]),new Uint32Array([6291456,6291456,6291456,6291456,10502115,10502178,10502211,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([0,23068672,23068672,23068672,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,6291456]),new Uint32Array([2190305,6291456,2190337,6291456,2190369,6291456,2190401,6291456,2190433,6291456,2190465,6291456,2190497,6291456,2190529,6291456]),new Uint32Array([2173793,2173985,2174017,6291456,2173761,2173697,6291456,2174689,6291456,2174017,2174721,6291456,6291456,2174753,2174785,2174817]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2099521,2099105,2120705,2098369,2120801,2103361,2097985,2098433,2121377,2121473,2099169,2099873,2098401,2099393,2152609,2100033]),new Uint32Array([2132898,2163842,2163906,2133282,2132034,2131938,2137410,2132802,2132706,2164866,2133282,2160578,2165186,2165186,6291456,6291456]),new Uint32Array([10500003,10500099,10500195,10500291,10500387,10500483,10500579,10500675,10500771,10500867,10500963,10501059,10501155,10501251,10501347,10501443]),new Uint32Array([2163458,2130978,2131074,2131266,2131362,2163522,2160130,2132066,2131010,2131106,2106018,2131618,2131298,2132034,2131938,2137410]),new Uint32Array([2212961,2116993,2212993,2213025,2213057,2213089,2213121,2213153,2213185,2213217,2213249,2209633,2213281,2213313,2213345,2213377]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,23068672,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456]),new Uint32Array([2113729,2113825,2113921,2114017,2114113,2114209,2114305,2114401,2114497,2114593,2114689,2114785,2114881,2114977,2115073,2115169]),new Uint32Array([2238177,2238209,2238241,2238273,2238305,2238337,2238337,2217537,2238369,2238401,2238433,2238465,2215649,2238497,2238529,2238561]),new Uint32Array([2108289,2100865,2113153,2108481,2113345,2113441,2098209,2111137,2105505,2098241,2108353,2108417,2105825,2111713,2100897,2111905]),new Uint32Array([6291456,6291456,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,0,0]),new Uint32Array([6291456,0,6291456,2145026,0,6291456,2145090,0,6291456,6291456,0,0,23068672,0,23068672,23068672]),new Uint32Array([2099233,2122017,2200673,2098113,2121537,2103201,2200705,2104033,2121857,2121953,2122401,2099649,2099969,2123009,2100129,2100289]),new Uint32Array([6291456,23068672,6291456,0,0,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([6291456,6291456,23068672,23068672,0,0,23068672,23068672,23068672,23068672,23068672,23068672,23068672,0,0,0]),new Uint32Array([2187681,2187713,2187745,2187777,2187809,2187841,2187873,2187905,2187937,2187969,2188001,2188033,2188065,2188097,2188129,2188161]),new Uint32Array([0,10554498,10554562,10554626,10554690,10554754,10554818,10554882,10554946,10555010,10555074,6291456,6291456,0,0,0]),new Uint32Array([2235170,2235234,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,0,0,0]),new Uint32Array([2181153,6291456,2188897,6291456,6291456,2188929,6291456,6291456,6291456,6291456,6291456,6291456,2111905,2100865,2188961,2188993]),new Uint32Array([2100833,2100897,0,0,2101569,2101697,2101825,2101953,2102081,2102209,10575617,2187041,10502177,10489601,10489697,2112289]),new Uint32Array([6291456,2172833,6291456,2172865,2172897,2172929,2172961,6291456,2172993,6291456,2173025,6291456,2173057,6291456,2173089,6291456]),new Uint32Array([6291456,0,6291456,6291456,0,6291456,6291456,6291456,6291456,6291456,0,0,23068672,6291456,23068672,23068672]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,0,0,0,2190721]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,23068672,6291456,6291456]),new Uint32Array([2184993,6291456,2185025,6291456,2185057,6291456,2185089,6291456,2185121,6291456,2185153,6291456,2185185,6291456,2185217,6291456]),new Uint32Array([2115265,2115361,2115457,2115553,2115649,2115745,2115841,2115937,2116033,2116129,2116225,2116321,2150658,2150722,2200225,6291456]),new Uint32Array([2168321,6291456,2168353,6291456,2168385,6291456,2168417,6291456,2168449,6291456,2168481,6291456,2168513,6291456,2168545,6291456]),new Uint32Array([23068672,23068672,23068672,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([6291456,0,6291456,6291456,6291456,6291456,0,0,0,6291456,6291456,0,6291456,0,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,2186625,0,0,6291456,6291456,2186657,2186689,2186721,2173505,0,10496067,10496163,10496259]),new Uint32Array([2178785,6291456,2178817,6291456,2178849,6291456,2178881,6291456,2178913,6291456,2178945,6291456,2178977,6291456,2179009,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,0]),new Uint32Array([2097152,0,0,0,2097152,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,6291456]),new Uint32Array([6291456,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([0,0,2197857,2197889,2197921,2197953,2197985,2198017,0,0,2198049,2198081,2198113,2198145,2198177,2198209]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2098209,2167297,2111137,6291456]),new Uint32Array([2171393,6291456,2171425,6291456,2171457,6291456,2171489,6291456,2171521,6291456,2171553,6291456,2171585,6291456,2171617,6291456]),new Uint32Array([2206753,2206785,2195457,2206817,2206849,2206881,2206913,2197153,2197153,2206945,2117857,2206977,2207009,2207041,2207073,2207105]),new Uint32Array([0,0,0,0,0,0,0,23068672,0,0,0,0,2144834,2144898,0,2144962]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,0,0,23068672]),new Uint32Array([2108193,2112481,2112577,2098177,2098305,2108321,2108289,2100865,2113153,2108481,2113345,2113441,2098209,0,2105505,2098241]),new Uint32Array([6291456,6291456,6291456,6291456,0,6291456,6291456,6291456,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([6291456,6291456,2202049,6291456,2202081,6291456,2202113,6291456,2202145,6291456,2202177,6291456,2202209,6291456,2202241,6291456]),new Uint32Array([10501155,10501251,10501347,10501443,10501539,10501635,10501731,10501827,10501923,10502019,2141731,2105505,2098177,2155586,2166530,0]),new Uint32Array([2102081,2102209,2100833,2100737,2098337,2101441,2101569,2101697,2101825,2101953,2102081,2102209,2100833,2100737,2098337,2101441]),new Uint32Array([2146882,2146946,2147010,2147074,2147138,2147202,2147266,2147330,2146882,2146946,2147010,2147074,2147138,2147202,2147266,2147330]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0]),new Uint32Array([10502307,10502403,10502499,10502595,10502691,10502787,10502883,10502979,10503075,10503171,10503267,10503363,10503459,10503555,10503651,10503747]),new Uint32Array([2179937,2179969,2180001,2180033,2156545,2180065,2156577,2180097,2180129,2180161,2180193,2180225,2180257,2180289,2156737,2180321]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456,0,0,0,6291456,0,0,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,0]),new Uint32Array([2227682,2227746,2227810,2227874,2227938,2228002,2228066,2228130,2228194,2228258,2228322,2228386,2228450,2228514,2228578,2228642]),new Uint32Array([2105601,2169121,2108193,2170049,2181025,2181057,2112481,2108321,2108289,2181089,2170497,2100865,2181121,2173601,2173633,2173665]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2180641,6291456,6291456,6291456]),new Uint32Array([0,6291456,6291456,6291456,0,6291456,0,6291456,0,0,6291456,6291456,0,6291456,6291456,6291456]),new Uint32Array([2178273,6291456,2178305,6291456,2178337,6291456,2178369,6291456,2178401,6291456,2178433,6291456,2178465,6291456,2178497,6291456]),new Uint32Array([6291456,6291456,23068672,23068672,23068672,6291456,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,14680064,14680064,14680064,14680064,14680064,14680064]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456]),new Uint32Array([2237377,2237409,2236225,2237441,2237473,2217441,2215521,2215553,2217473,2237505,2237537,2209697,2237569,2215585,2237601,2237633]),new Uint32Array([2221985,2165601,2165601,2165665,2165665,2222017,2222017,2165729,2165729,2158913,2158913,2158913,2158913,2097281,2097281,2105921]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,0,23068672,23068672,23068672,0,23068672,23068672,23068672,23068672,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2149634,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2176897,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,2176929,6291456,2176961,6291456,2176993,6291456]),new Uint32Array([2172641,6291456,2172673,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2172705,2172737,6291456,2172769,2172801,6291456]),new Uint32Array([2099173,2104196,2121667,2099395,2121763,2152258,2152322,2098946,2152386,2121859,2121955,2099333,2122051,2104324,2099493,2122147]),new Uint32Array([6291456,6291456,6291456,2145794,6291456,6291456,6291456,6291456,0,6291456,6291456,6291456,6291456,2145858,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,0,0,6291456,0]),new Uint32Array([0,2105921,2097729,0,2097377,0,0,2106017,0,2097505,2105889,2097185,2097697,2135777,2097633,2097441]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([2239074,2239138,2239201,2239233,2239265,2239297,2239329,2239361,0,2239393,2239425,2239425,2239458,2239521,2239553,2209569]),new Uint32Array([14680064,2098209,2111137,2105505,2098241,2108353,2108417,2105825,2111713,2100897,2111905,2105473,2105569,2105601,2112289,2108193]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,0,6291456,23068672]),new Uint32Array([2108321,2108289,2113153,2098209,2180897,2180929,2180961,2111137,2098241,2108353,2170241,2170273,2180993,2105825,6291456,2105473]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2146114,6291456,6291456,6291456,0,0,0]),new Uint32Array([2105921,2105921,2105921,2222049,2222049,2130977,2130977,2130977,2130977,2160065,2160065,2160065,2160065,2097729,2097729,2097729]),new Uint32Array([2218145,2214785,2207937,2218177,2218209,2192993,2210113,2212769,2218241,2218273,2216129,2218305,2216161,2218337,2218369,2218401]),new Uint32Array([0,0,0,2156546,2156610,2156674,2156738,2156802,0,0,0,0,0,2156866,23068672,2156930]),new Uint32Array([23068672,23068672,23068672,0,0,0,0,23068672,23068672,0,0,23068672,23068672,23068672,0,0]),new Uint32Array([2213409,2213441,2213473,2213505,2213537,2213569,2213601,2213633,2213665,2195681,2213697,2213729,2213761,2213793,2213825,2213857]),new Uint32Array([2100033,2099233,2122017,2200673,2098113,2121537,2103201,2200705,2104033,2121857,2121953,2122401,2099649,2099969,2123009,2100129]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,0,0,0,0,0]),new Uint32Array([2201857,6291456,2201889,6291456,2201921,6291456,2201953,6291456,2201985,6291456,2202017,6291456,2176193,2176257,23068672,23068672]),new Uint32Array([6291456,6291456,23068672,23068672,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2188193,2188225,2188257,2188289,2188321,2188353,2188385,2188417,2188449,2188481,2188513,2188545,2188577,2188609,2188641,0]),new Uint32Array([10554529,2221089,0,10502113,10562017,10537921,10538049,2221121,2221153,0,0,0,0,0,0,0]),new Uint32Array([2213889,2213921,2213953,2213985,2214017,2214049,2214081,2194177,2214113,2214145,2214177,2214209,2214241,2214273,2214305,2214337]),new Uint32Array([2166978,2167042,2099169,0,0,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2180545,6291456,6291456,6291456]),new Uint32Array([10518915,10519011,10519107,10519203,2162242,2162306,2159554,2162370,2159362,2159618,2105922,2162434,2159746,2162498,2159810,2159874]),new Uint32Array([2161730,2161794,2135586,2161858,2161922,2137186,2131810,2160290,2135170,2161986,2137954,2162050,2162114,2162178,10518723,10518819]),new Uint32Array([10506627,10506723,10506819,10506915,10507011,10507107,10507203,10507299,10507395,10507491,10507587,10507683,10507779,10507875,10507971,10508067]),new Uint32Array([6291456,23068672,23068672,23068672,0,23068672,23068672,0,0,0,0,0,23068672,23068672,23068672,23068672]),new Uint32Array([23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,0]),new Uint32Array([2175873,2175905,2175937,2175969,2176001,2176033,2176065,2176097,2176129,2176161,2176193,2176225,2176257,2176289,2176321,2176353]),new Uint32Array([2140006,2140198,2140390,2140582,2140774,23068672,23068672,23068672,23068672,23068672,6291456,6291456,6291456,23068672,23068672,23068672]),new Uint32Array([2108193,2112481,2112577,2098177,2098305,2108321,2108289,2100865,2113153,2108481,2113345,2113441,2098209,2111137,2105505,2098241]),new Uint32Array([0,23068672,0,0,0,0,0,0,0,2145154,2145218,2145282,6291456,0,2145346,0]),new Uint32Array([0,0,0,0,10531458,10495395,2148545,2143201,2173473,2148865,2173505,0,2173537,0,2173569,2149121]),new Uint32Array([10537282,10495683,2148738,2148802,2148866,0,6291456,2148930,2186593,2173473,2148737,2148865,2148802,10495779,10495875,10495971]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([2215425,2215457,2215489,2215521,2215553,2215585,2215617,2215649,2215681,2215713,2215745,2215777,2192033,2215809,2215841,2215873]),new Uint32Array([2242049,2242081,2242113,2242145,2242177,2242209,2242241,2242273,2215937,2242305,2242338,2242401,2242433,2242465,2242497,2216001]),new Uint32Array([10554529,2221089,0,0,10562017,10502113,10538049,10537921,2221185,10489601,10489697,10609889,10609921,2141729,2141793,10610273]),new Uint32Array([2141923,2142019,2142115,2142211,2142307,2142403,2142499,2142595,2142691,0,0,0,0,0,0,0]),new Uint32Array([0,2221185,2221217,10609857,10609857,10489601,10489697,10609889,10609921,2141729,2141793,2221345,2221377,2221409,2221441,2187105]),new Uint32Array([6291456,23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,0]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,18923970,23068672,23068672,23068672,0,6291456,6291456]),new Uint32Array([2183105,6291456,2183137,6291456,2183169,6291456,2183201,6291456,2183233,6291456,2183265,6291456,2183297,6291456,2183329,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0]),new Uint32Array([23068672,23068672,23068672,23068672,0,0,0,0,0,0,0,0,6291456,6291456,6291456,6291456]),new Uint32Array([2134434,2134818,2097666,2097186,2097474,2097698,2105986,2131586,2132450,2131874,2131778,2135970,2135778,2161602,2136162,2161666]),new Uint32Array([2236865,2236897,2236930,2236993,2237025,2235681,2237058,2237121,2237153,2237185,2237217,2217281,2237250,2191233,2237313,2237345]),new Uint32Array([2190049,6291456,2190081,6291456,2190113,6291456,2190145,6291456,2190177,6291456,2190209,6291456,2190241,6291456,2190273,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2101922,2102050,2102178,2102306,10498755,10498851,10498947,10499043,10499139,10499235,10499331,10499427,10499523,10489604,10489732,10489860]),new Uint32Array([2166914,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,0,0,0,0,0]),new Uint32Array([2181601,2170561,2181633,2181665,2170753,2181697,2172897,2170881,2181729,2170913,2172929,2113441,2181761,2181793,2171009,2173761]),new Uint32Array([0,2105921,2097729,2106081,0,2097601,2162337,2106017,2133281,2097505,0,2097185,2097697,2135777,2097633,2097441]),new Uint32Array([6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,0,0,0,0]),new Uint32Array([2248001,2248033,2248066,2248130,2248193,2248226,2248289,2248322,2248385,2248417,2216673,2248450,2248514,2248577,2248610,2248673]),new Uint32Array([6291456,6291456,0,0,0,0,0,0,0,6291456,6291456,6291456,6291456,0,0,0]),new Uint32Array([2169729,6291456,2169761,6291456,2169793,6291456,2169825,6291456,2169857,2169889,6291456,2169921,6291456,2143329,6291456,2098305]),new Uint32Array([2162178,2163202,2163266,2135170,2136226,2161986,2137954,2159426,2159490,2163330,2159554,2163394,2159682,2139522,2136450,2159746]),new Uint32Array([2173953,2173985,0,2174017,2174049,2174081,2174113,2174145,2174177,2149057,2174209,2174241,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,4271169,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2174273]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([6291456,6291456,0,0,0,0,0,0,0,6291456,0,0,0,0,0,0]),new Uint32Array([6291456,6291456,6291456,2190785,0,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([2189793,6291456,2189825,6291456,2189857,6291456,2189889,6291456,2189921,6291456,2189953,6291456,2189985,6291456,2190017,6291456]),new Uint32Array([2105601,2112289,2108193,2112481,2112577,0,2098305,2108321,2108289,2100865,2113153,2108481,2113345,0,2098209,2111137]),new Uint32Array([2172129,6291456,2172161,6291456,2172193,6291456,2172225,6291456,2172257,6291456,2172289,6291456,2172321,6291456,2172353,6291456]),new Uint32Array([2214753,6291456,2214785,6291456,6291456,2214817,2214849,2214881,2214913,2214945,2214977,2215009,2215041,2215073,2194401,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,6291456,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([0,0,0,0,6291456,6291456,6291456,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([10610305,10610337,10575617,2221761,10610401,10610433,10502177,0,10610465,10610497,10610529,10610561,0,0,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,23068672,0,0,0,0,23068672]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2187105,2187137,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2199393,2199425,2199457,2199489,2199521,2199553,2199585,2199617,2199649,2199681,2199713,2199745,2199777,2199809,2199841,0]),new Uint32Array([2217249,2217281,2217313,2217345,2217377,2217409,2217441,2217473,2215617,2217505,2217537,2217569,2214753,2217601,2217633,2217665]),new Uint32Array([2170273,2170305,6291456,2170337,2170369,6291456,2170401,2170433,2170465,6291456,6291456,6291456,2170497,2170529,6291456,2170561]),new Uint32Array([2188673,6291456,2188705,2188737,2188769,6291456,6291456,2188801,6291456,2188833,6291456,2188865,6291456,2180929,2181505,2180897]),new Uint32Array([10489988,10490116,10490244,10490372,10490500,10490628,10490756,10490884,0,0,0,0,0,0,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2147393,2147457,2147521,2147585,2147649,2147713,2147777,2147841]),new Uint32Array([23068672,23068672,0,23068672,23068672,0,23068672,23068672,23068672,23068672,23068672,0,0,0,0,0]),new Uint32Array([2241153,2241185,2241217,2215809,2241250,2241313,2241345,2241377,2217921,2241377,2241409,2215873,2241441,2241473,2241505,2241537]),new Uint32Array([23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2220417,2220417,2220449,2220449,2220481,2220481,2220513,2220513,2220545,2220545,2220577,2220577,2220609,2220609,2220641,2220641]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,2144002,0,6291456,6291456,0,0,6291456,6291456,6291456]),new Uint32Array([2167105,2167137,2167169,2167201,2167233,2167265,2167297,2167329,2167361,2167393,2167425,2167457,2167489,2167521,2167553,2167585]),new Uint32Array([10575521,2098209,2111137,2105505,2098241,2108353,2108417,2105825,2111713,2100897,2111905,2105473,2105569,2105601,2112289,2108193]),new Uint32Array([2234146,2234210,2234274,2234338,2234402,2234466,2234530,2234594,2234658,2234722,2234786,2234850,2234914,2234978,2235042,2235106]),new Uint32Array([0,0,0,0,0,0,0,2180577,0,0,0,0,0,2180609,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,0,0,6291456,6291456]),new Uint32Array([2098209,2111137,2105505,2098241,2108353,2108417,2105825,2111713,2100897,2111905,2105473,2105569,2105601,2112289,2108193,2112481]),new Uint32Array([23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2242529,2242561,2242593,2242625,2242657,2242689,2242721,2242753,2207937,2218177,2242785,2242817,2242849,2242882,2242945,2242977]),new Uint32Array([2118049,2105345,2118241,2105441,2118433,2118529,2118625,2118721,2118817,2200257,2200289,2191809,2200321,2200353,2200385,2200417]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,6291456,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0]),new Uint32Array([2185505,6291456,2185537,6291456,2185569,6291456,2185601,6291456,2185633,6291456,2185665,6291456,2185697,6291456,2185729,6291456]),new Uint32Array([2231970,2232034,2232098,2232162,2232226,2232290,2232354,2232418,2232482,2232546,2232610,2232674,2232738,2232802,2232866,2232930]),new Uint32Array([2218625,2246402,2246466,2246530,2246594,2246657,2246689,2246689,2218657,2219681,2246721,2246753,2246785,2246818,2246881,2208481]),new Uint32Array([2197025,2197057,2197089,2197121,2197153,2197185,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([2219137,2216961,2219169,2219201,2219233,2219265,2219297,2217025,2215041,2219329,2217057,2219361,2217089,2219393,2197153,2219426]),new Uint32Array([23068672,23068672,23068672,0,0,0,23068672,23068672,23068672,0,23068672,23068672,23068672,23068672,0,0]),new Uint32Array([2098305,2108321,2108289,2100865,2113153,2108481,2113345,2113441,2098209,2111137,2105505,2098241,2108353,2108417,2105825,2111713]),new Uint32Array([2243522,2243585,2243617,2243649,2243681,2210113,2243713,2243746,2243810,2243874,2243937,2243970,2244033,2244065,2244097,2244129]),new Uint32Array([2178017,6291456,2178049,6291456,2178081,6291456,2178113,6291456,2178145,6291456,2178177,6291456,2178209,6291456,2178241,6291456]),new Uint32Array([10553858,2165314,10518722,6291456,10518818,0,10518914,2130690,10519010,2130786,10519106,2130882,10519202,2165378,10554050,2165506]),new Uint32Array([0,0,2135491,2135587,2135683,2135779,2135875,2135971,2135971,2136067,2136163,2136259,2136355,2136355,2136451,2136547]),new Uint32Array([23068672,23068672,23068672,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,6291456]),new Uint32Array([0,0,0,0,0,0,0,0,0,0,0,0,6291456,6291456,6291456,6291456]),new Uint32Array([23068672,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([2220033,2220033,2220065,2220065,2220065,2220065,2220097,2220097,2220097,2220097,2220129,2220129,2220129,2220129,2220161,2220161]),new Uint32Array([6291456,6291456,6291456,0,0,0,0,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,0,23068672,0,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([2100897,2100898,2100899,2150018,2100865,2100866,2100867,2100868,2150082,2108481,2109858,2109859,2105569,2105505,2098241,2105601]),new Uint32Array([2097217,2097505,2097505,2097505,2097505,2165570,2165570,2165634,2165634,2165698,2165698,2097858,2097858,0,0,2097152]),new Uint32Array([23068672,6291456,23068672,23068672,23068672,6291456,6291456,23068672,23068672,6291456,6291456,6291456,6291456,6291456,23068672,23068672]),new Uint32Array([23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0]),new Uint32Array([10503843,10503939,10504035,10504131,10504227,10504323,10504419,10504515,10504611,10504707,10504803,10504899,10504995,10491140,10491268,0]),new Uint32Array([2173697,2173729,2148801,2173761,2143969,2173793,2173825,2153473,2173857,2173889,2173921,2173953,2173985,2173761,2174017,2174049]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,0,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([2134145,2097153,2134241,2105953,2132705,2130977,2160065,2131297,2162049,2133089,2160577,2133857,2235297,2220769,2235329,2235361]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([2222401,2222433,2222465,10531394,2222497,2222529,2222561,0,2222593,2222625,2222657,2222689,2222721,2222753,2222785,0]),new Uint32Array([2184481,6291456,2184513,6291456,2184545,6291456,2184577,6291456,2184609,6291456,2184641,6291456,2184673,6291456,2184705,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,23068672,23068672]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,23068672,23068672,0,0,0,0,0,0,0,0,0]),new Uint32Array([2105570,2156034,2126947,2156098,2153666,2127043,2127139,2156162,0,2127235,2156226,2156290,2156354,2156418,2127331,2127427]),new Uint32Array([2215905,2207041,2153185,2241569,2241601,2241633,2241665,2241697,2241730,2241793,2241825,2241857,2241889,2241921,2241954,2242017]),new Uint32Array([2203777,6291456,2203809,6291456,2203841,6291456,2203873,6291456,2203905,6291456,2173121,2180993,2181249,2203937,2181313,0]),new Uint32Array([2168577,6291456,2168609,6291456,2168641,6291456,2168673,6291456,2168705,6291456,2168737,6291456,2168769,6291456,2168801,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,6291456,23068672,23068672,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,0,23068672,23068672,23068672,0,23068672,23068672,23068672,0,0]),new Uint32Array([2210113,2195521,2210145,2210177,2210209,2210241,2210273,2210305,2210337,2210369,2210401,2210433,2210465,2210497,2210529,2210561]),new Uint32Array([6291456,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0]),new Uint32Array([2228706,2228770,2228834,2228898,2228962,2229026,2229090,2229154,2229218,2229282,2229346,2229410,2229474,2229538,2229602,2229666]),new Uint32Array([23068672,6291456,6291456,6291456,6291456,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([6291456,6291456,6291456,0,0,0,0,0,0,0,0,0,0,0,0,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456,6291456,6291456,18874368,18874368,18874368,0,0]),new Uint32Array([2133089,2133281,2133281,2133281,2133281,2160577,2160577,2160577,2160577,2097441,2097441,2097441,2097441,2133857,2133857,2133857]),new Uint32Array([6291456,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2173825,2153473,2173857,2173889,2173921,2173953,2173985,2174017,2174017,2174049,2174081,2174113,2174145,2174177,2149057,2233089]),new Uint32Array([2178529,6291456,2178561,6291456,2178593,6291456,2178625,6291456,2178657,6291456,2178689,6291456,2178721,6291456,2178753,6291456]),new Uint32Array([2221025,2221025,2221057,2221057,2159329,2159329,2159329,2159329,2097217,2097217,2158914,2158914,2158978,2158978,2159042,2159042]),new Uint32Array([2208161,2208193,2208225,2208257,2194433,2208289,2208321,2208353,2208385,2208417,2208449,2208481,2208513,2208545,2208577,2208609]),new Uint32Array([2169217,6291456,2169249,6291456,2169281,6291456,2169313,6291456,2169345,6291456,2169377,6291456,2169409,6291456,2169441,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,6291456,6291456,6291456,6291456]),new Uint32Array([2133187,2133283,2133283,2133379,2133475,2133571,2133667,2133667,2133763,2133859,2133955,2134051,2134147,2134147,2134243,2134339]),new Uint32Array([2197697,2114113,2114209,2197729,2197761,2114305,2197793,2114401,2114497,2197825,2114593,2114689,2114785,2114881,2114977,0]),new Uint32Array([2193089,2193121,2193153,2193185,2117665,2117569,2193217,2193249,2193281,2193313,2193345,2193377,2193409,2193441,2193473,2193505]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0]),new Uint32Array([6291456,6291456,6291456,0,0,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([6291456,6291456,6291456,0,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2184225,6291456,2184257,6291456,2184289,6291456,2184321,6291456,2184353,6291456,2184385,6291456,2184417,6291456,2184449,6291456]),new Uint32Array([2112577,2098177,2098305,2108321,2108289,2100865,2113153,2108481,2113345,2113441,2100833,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([2098657,2098049,2200737,2123489,2123681,2200769,2098625,2100321,2098145,2100449,2098017,2098753,2200801,2200833,2200865,0]),new Uint32Array([23068672,23068672,23068672,0,0,0,0,0,0,0,0,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,0,0,0,0,0]),new Uint32Array([2098305,2108321,2108289,2100865,2113153,2108481,2113345,2113441,2098209,2111137,0,2098241,2108353,2108417,2105825,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2181153,2105505,2181185,2167617,2180993]),new Uint32Array([2160002,2160066,2160130,2160194,2160258,2132066,2131010,2131106,2106018,2131618,2160322,2131298,2132034,2131938,2137410,2132226]),new Uint32Array([6291456,6291456,6291456,6291456,0,0,0,0,0,0,0,0,0,0,0,6291456]),new Uint32Array([2183617,6291456,2183649,6291456,2183681,6291456,2183713,6291456,2183745,6291456,2183777,6291456,2183809,6291456,2183841,6291456]),new Uint32Array([0,6291456,6291456,0,6291456,0,0,6291456,6291456,0,6291456,0,0,6291456,0,0]),new Uint32Array([2250977,2251009,2251041,2251073,2195009,2251106,2251169,2251201,2251233,2251265,2251297,2251330,2251394,2251457,2251489,2251521]),new Uint32Array([2205729,2205761,2205793,2205825,2205857,2205889,2205921,2205953,2205985,2206017,2206049,2206081,2206113,2206145,2206177,2206209]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2143170,2168993,6291456,2169025,6291456,2169057,6291456,2169089,6291456,2143234,2169121,6291456,2169153,6291456,2169185,6291456]),new Uint32Array([23068672,23068672,2190689,6291456,0,0,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2248706,2248769,2248801,2248833,2248865,2248897,2248929,2248962,2249026,2249090,2249154,2240705,2249217,2249249,2249281,2249313]),new Uint32Array([10485857,6291456,6291456,6291456,6291456,6291456,6291456,6291456,10495394,6291456,2098209,6291456,6291456,2097152,6291456,10531394]),new Uint32Array([0,6291456,6291456,6291456,6291456,6291456,6291456,0,0,6291456,6291456,6291456,6291456,6291456,6291456,0]),new Uint32Array([14680064,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2173985,2173953,2148481,2173601,2173633,2173665,2173697,2173729,2148801,2173761,2143969,2173793,2173825,2153473,2173857,2173889]),new Uint32Array([6291456,2186977,6291456,6291456,6291456,6291456,6291456,10537858,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2209601,2209633,2209665,2209697,2209729,2209761,2209793,2209825,2209857,2209889,2209921,2209953,2209985,2210017,2210049,2210081]),new Uint32Array([10501539,10501635,10501731,10501827,10501923,10502019,2098209,2111137,2105505,2098241,2108353,2108417,2105825,2111713,2100897,2111905]),new Uint32Array([2173697,2173729,2148801,2173761,2143969,2173793,2173825,2153473,2173857,2173889,2173921,2173953,2173985,2174017,2174017,2174049]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456,6291456,6291456,0,0]),new Uint32Array([6291456,6291456,23068672,23068672,23068672,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([2194561,2194593,2194625,2119777,2119873,2194657,2194689,2194721,2194753,2194785,2194817,2194849,2194881,2194913,2194945,2194977]),new Uint32Array([2113153,2108481,2113345,2113441,2098209,2111137,2105505,2098241,2108353,2108417,2105825,2111713,2100897,2111905,2105473,2105569]),new Uint32Array([2222818,2222882,2222946,2223010,2223074,2223138,2223202,2223266,2223330,2223394,2223458,2223522,2223586,2223650,2223714,2223778]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672]),new Uint32Array([0,2179553,2179585,2179617,2179649,2144001,2179681,2179713,2179745,2179777,2179809,2156705,2179841,2156833,2179873,2179905]),new Uint32Array([6291456,23068672,6291456,2145602,23068672,23068672,23068672,23068672,23068672,23068672,0,23068672,23068672,6291456,0,0]),new Uint32Array([2196513,2196545,2196577,2196609,2196641,2196673,2196705,2196737,2196769,2196801,2196833,2196865,2196897,2196929,2196961,2196993]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2177281,6291456,2177313,6291456,2177345,6291456,2177377,6291456,2177409,6291456,2177441,6291456,2177473,6291456,2177505,6291456]),new Uint32Array([2187137,2221473,2221505,2221537,2221569,6291456,6291456,10610209,10610241,10537986,10537986,10537986,10537986,10609857,10609857,10609857]),new Uint32Array([2243009,2243041,2216033,2243074,2243137,2243169,2243201,2219617,2243233,2243265,2243297,2243329,2243362,2243425,2243457,2243489]),new Uint32Array([10485857,10485857,10485857,10485857,10485857,10485857,10485857,10485857,10485857,10485857,10485857,2097152,4194304,4194304,0,0]),new Uint32Array([2143042,6291456,2143106,2143106,2168833,6291456,2168865,6291456,6291456,2168897,6291456,2168929,6291456,2168961,6291456,2143170]),new Uint32Array([6291456,6291456,23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2204193,2204225,2204257,2204289,2204321,2204353,2204385,2204417,2204449,2204481,2204513,2204545,2204577,2204609,2204641,2204673]),new Uint32Array([2202753,6291456,2202785,6291456,2202817,6291456,2202849,6291456,2202881,6291456,2202913,6291456,2202945,6291456,2202977,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,0,0,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([2108353,2108417,2105825,2111713,2100897,2111905,2105473,2105569,2105601,2112289,2108193,2112481,2112577,2098177,2098305,2108321]),new Uint32Array([2147394,2147458,2147522,2147586,2147650,2147714,2147778,2147842,2147394,2147458,2147522,2147586,2147650,2147714,2147778,2147842]),new Uint32Array([2253313,2253346,2253409,2253441,2253473,2253505,2253537,2253569,2253601,2253634,2219393,2253697,2253729,2253761,2253793,2253825]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,6291456,6291456]),new Uint32Array([2162562,2162626,2131362,2162690,2159938,2160002,2162754,2162818,2160130,2162882,2160194,2160258,2160834,2160898,2161026,2161090]),new Uint32Array([2175361,2175393,2175425,2175457,2175489,2175521,2175553,2175585,2175617,2175649,2175681,2175713,2175745,2175777,2175809,2175841]),new Uint32Array([2253858,2253921,2253954,2254018,2254082,2196737,2254145,2196865,2254177,2254209,2254241,2254273,2197025,2254306,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2202113,2204129,2188705,2204161]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,0,6291456,6291456,6291456,6291456,0,0]),new Uint32Array([2173985,2174017,2174017,2174049,2174081,2174113,2174145,2174177,2149057,2233089,2173697,2173761,2173793,2174113,2173985,2173953]),new Uint32Array([2101569,2101697,2101825,2101953,2102081,2102209,2100833,2100737,2098337,2101441,2101569,2101697,2101825,2101953,2102081,2102209]),new Uint32Array([2108289,2100865,2113153,2108481,2113345,2113441,2098209,2111137,2105505,2098241,0,2108417,0,2111713,2100897,2111905]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,0,0,0,0,0,0,0,0]),new Uint32Array([2175425,2175489,2175809,2175905,2175937,2175937,2176193,2176417,2180865,0,0,0,0,0,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,2143298,2143298,2143298,2143362,2143362,2143362,2143426,2143426,2143426,2171105,6291456,2171137]),new Uint32Array([2120162,2120258,2151618,2151682,2151746,2151810,2151874,2151938,2152002,2120035,2120131,2120227,2152066,2120323,2152130,2120419]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,0,0,0,0,0,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2195361,2142433,2236065,2236097,2236129,2236161,2118241,2117473,2236193,2236225,2236257,2236289,0,0,0,0]),new Uint32Array([2189281,6291456,2189313,6291456,2189345,6291456,2189377,6291456,2189409,6291456,2189441,6291456,2189473,6291456,2189505,6291456]),new Uint32Array([6291456,6291456,2145922,6291456,6291456,6291456,6291456,2145986,6291456,6291456,6291456,6291456,2146050,6291456,6291456,6291456]),new Uint32Array([2100833,2100737,2098337,2101441,2101569,2101697,2101825,2101953,2102081,2102209,10502113,10562017,10610401,10502177,10610433,10538049]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,2186401,0,2186433,0,2186465,0,2186497]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,23068672,23068672,23068672]),new Uint32Array([0,0,2198241,2198273,2198305,2198337,2198369,2198401,0,0,2198433,2198465,2198497,0,0,0]),new Uint32Array([6291456,0,6291456,6291456,6291456,6291456,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,0,6291456,0,23068672,23068672,23068672,23068672,23068672,23068672,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,0,6291456,6291456,6291456,6291456,6291456,0,0,23068672,6291456,23068672,23068672]),new Uint32Array([0,2105921,2097729,0,2097377,0,0,2106017,2133281,2097505,2105889,0,2097697,2135777,2097633,2097441]),new Uint32Array([2197889,2197921,2197953,2197985,2198017,2198049,2198081,2198113,2198145,2198177,2198209,2198241,2198273,2198305,2198337,2198369]),new Uint32Array([2132514,2132610,2160386,2133090,2133186,2160450,2160514,2133282,2160578,2133570,2106178,2160642,2133858,2160706,2160770,2134146]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,23068672,23068672,0,0,0,0,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,23068672,23068672,6291456,23068672,23068672,6291456,23068672,0,0,0,0,0,0,0,0]),new Uint32Array([2184737,6291456,2184769,6291456,2184801,6291456,2184833,6291456,2184865,6291456,2184897,6291456,2184929,6291456,2184961,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,0,6291456,6291456,6291456,6291456,0,6291456]),new Uint32Array([6291456,6291456,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,6291456,23068672,23068672,23068672,6291456,23068672,23068672,23068672,23068672,23068672,0,0]),new Uint32Array([6291456,6291456,6291456,2186753,6291456,6291456,6291456,6291456,2186785,2186817,2186849,2173569,2186881,10496355,10495395,10575521]),new Uint32Array([0,0,2097729,0,0,0,0,2106017,0,2097505,0,2097185,0,2135777,2097633,2097441]),new Uint32Array([2189537,6291456,2189569,6291456,2189601,6291456,2189633,6291456,2189665,6291456,2189697,6291456,2189729,6291456,2189761,6291456]),new Uint32Array([2202497,6291456,2202529,6291456,2202561,6291456,2202593,6291456,2202625,6291456,2202657,6291456,2202689,6291456,2202721,6291456]),new Uint32Array([2245217,2218369,2245249,2245282,2245345,2245377,2245410,2245474,2245537,2245569,2245601,2245633,2245665,2245665,2245697,2245729]),new Uint32Array([6291456,0,23068672,23068672,0,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([6291456,0,0,0,0,0,0,23068672,0,0,0,0,0,0,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,23068672,6291456,23068672,6291456,23068672,6291456,6291456,6291456,6291456,23068672,23068672]),new Uint32Array([0,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,0,0,0,0,0]),new Uint32Array([2097281,2105921,2097729,2106081,2097377,2097601,2162337,2106017,2133281,2097505,0,2097185,2097697,2135777,2097633,2097441]),new Uint32Array([2176641,6291456,2176673,6291456,2176705,6291456,2176737,6291456,2176769,6291456,2176801,6291456,2176833,6291456,2176865,6291456]),new Uint32Array([2174145,2174177,2149057,2233089,2173697,2173761,2173793,2174113,2173985,2173953,2174369,2174369,0,0,2100833,2100737]),new Uint32Array([2116513,2190817,2190849,2190881,2190913,2190945,2116609,2190977,2191009,2191041,2191073,2117185,2191105,2191137,2191169,2191201]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,0,6291456,6291456,6291456]),new Uint32Array([0,0,0,0,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456]),new Uint32Array([2167617,2167649,2167681,2167713,2167745,2167777,2167809,6291456,2167841,2167873,2167905,2167937,2167969,2168001,2168033,4240130]),new Uint32Array([2165122,2163970,2164034,2164098,2164162,2164226,2164290,2164354,2164418,2164482,2164546,2133122,2134562,2132162,2132834,2136866]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,0,0,2186209,2186241,2186273,2186305,2186337,2186369,0,0]),new Uint32Array([2112481,2112577,2098177,2098305,2108321,2108289,2100865,2113153,2108481,2113345,2113441,14680064,14680064,14680064,14680064,14680064]),new Uint32Array([0,0,23068672,6291456,0,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,6291456,6291456]),new Uint32Array([0,10537921,10610689,10610273,10610497,10610529,10610305,10610721,10489601,10489697,10610337,10575617,10554529,2221761,2197217,10496577]),new Uint32Array([2105473,2105569,2105601,2112289,0,2112481,2112577,2098177,2098305,2108321,2108289,2100865,2113153,2108481,2113345,2113441]),new Uint32Array([2100897,2111905,2105473,2105569,2105601,2112289,2108193,2112481,2112577,2098177,2098305,2108321,2108289,2100865,2113153,2108481]),new Uint32Array([2125346,2153410,2153474,2127394,2153538,2153602,2153666,2153730,2105507,2105476,2153794,2153858,2153922,2153986,2154050,2105794]),new Uint32Array([2200449,2119681,2200481,2153313,2199873,2199905,2199937,2200513,2200545,2200577,2200609,2119105,2119201,2119297,2119393,2119489]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2175777,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2222273,2197217,2221473,2221505,2221089,2222305,2200865,2099681,2104481,2222337,2099905,2120737,2222369,2103713,2100225,2098785]),new Uint32Array([2201377,6291456,2201409,6291456,2201441,6291456,2201473,6291456,2201505,6291456,2201537,6291456,2201569,6291456,6291456,23068672]),new Uint32Array([2174081,2174113,2174145,2174177,2149057,2233057,2148481,2173601,2173633,2173665,2173697,2173729,2148801,2173761,2143969,2173793]),new Uint32Array([2200897,6291456,2200929,6291456,2200961,6291456,2200993,6291456,2201025,6291456,2180865,6291456,2201057,6291456,2201089,6291456]),new Uint32Array([0,0,0,0,0,23068672,23068672,0,6291456,6291456,6291456,0,0,0,0,0]),new Uint32Array([2161154,2161410,2138658,2161474,2161538,2097666,2097186,2097474,2162946,2132450,2163010,2163074,2136162,2163138,2161666,2161730]),new Uint32Array([2148481,2173601,2173633,2173665,2173697,2173729,2148801,2173761,2143969,2173793,2173825,2153473,2173857,2173889,2173921,2173953]),new Uint32Array([0,0,0,0,0,0,23068672,23068672,0,0,0,0,2145410,2145474,0,6291456]),new Uint32Array([2244161,2216065,2212769,2244193,2244225,2244257,2244290,2244353,2244385,2244417,2244449,2218273,2244481,2244514,2244577,2244609]),new Uint32Array([2125730,2125699,2125795,2125891,2125987,2154114,2154178,2154242,2154306,2154370,2154434,2154498,2126082,2126178,2126274,2126083]),new Uint32Array([2237665,2237697,2237697,2237697,2237730,2237793,2237825,2237857,2237890,2237953,2237985,2238017,2238049,2238081,2238113,2238145]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2150146,6291456,6291456,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,0,0,23068672,23068672,0,0,23068672,23068672,23068672,0,0]),new Uint32Array([2214369,2238593,2238625,2238657,2238689,2238721,2238753,2238785,2238817,2238850,2238913,2238945,2238977,2235457,2239009,2239041]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0]),new Uint32Array([2252066,2252130,2252193,2252225,2252257,2252290,2252353,2252385,2252417,2252449,2252481,2252513,2252545,2252578,2252641,2252673]),new Uint32Array([2197697,2114113,2114209,2197729,2197761,2114305,2197793,2114401,2114497,2197825,2114593,2114689,2114785,2114881,2114977,2197857]),new Uint32Array([2224866,2224930,2224994,2225058,2225122,2225186,2225250,2225314,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2219490,2219554,2219617,2219649,2219681,2219714,2219778,2219842,2219905,2219937,0,0,0,0,0,0]),new Uint32Array([6291456,23068672,23068672,23068672,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,6291456]),new Uint32Array([2113345,2113441,2098209,2111137,2105505,2098241,2108353,2108417,2105825,2111713,2100897,2111905,2105473,2105569,2105601,2112289]),new Uint32Array([2174081,2174113,2174145,2174177,2149057,2233089,2173697,2173761,2173793,2174113,2173985,2173953,2148481,2173601,2173633,2173665]),new Uint32Array([2220161,2220161,2220193,2220193,2220193,2220193,2220225,2220225,2220225,2220225,2220257,2220257,2220257,2220257,2220289,2220289]),new Uint32Array([2192673,2192705,2192737,2192769,2192801,2192833,2192865,2118049,2192897,2117473,2117761,2192929,2192961,2192993,2193025,2193057]),new Uint32Array([2179297,6291456,2179329,6291456,2179361,6291456,2179393,6291456,2179425,6291456,2179457,6291456,2179489,6291456,2179521,6291456]),new Uint32Array([6291456,6291456,6291456,23068672,6291456,6291456,6291456,0,0,0,0,0,0,0,0,0]),new Uint32Array([2235745,2235777,2193633,2235809,2235841,2235873,2235905,2235937,2235969,2116513,2116705,2236001,2200513,2199905,2200545,2236033]),new Uint32Array([2113153,2108481,2113345,2113441,2232993,2233025,0,0,2148481,2173601,2173633,2173665,2173697,2173729,2148801,2173761]),new Uint32Array([2170593,6291456,2170625,6291456,2170657,6291456,2170689,2170721,6291456,2170753,6291456,6291456,2170785,6291456,2170817,2170849]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2166786,2166850,0,0,0,0]),new Uint32Array([23068672,6291456,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456]),new Uint32Array([2100833,2100737,2098337,2101441,2101569,2101697,2101825,2101953,2102081,2102209,10575617,2187041,10502177,10489601,10489697,0]),new Uint32Array([0,0,0,0,0,0,0,0,0,0,0,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2134562,2132162,2132834,2136866,2136482,2164610,2164674,2164738,2164802,2132802,2132706,2164866,2132898,2164930,2164994,2165058]),new Uint32Array([6291456,6291456,2098337,2101441,10531458,2153473,6291456,6291456,10531522,2100737,2108193,6291456,2106499,2106595,2106691,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,0,0,0,0,0,0,0,0,0]),new Uint32Array([2233122,2233186,2233250,2233314,2233378,2233442,2233506,2233570,2233634,2233698,2233762,2233826,2233890,2233954,2234018,2234082]),new Uint32Array([23068672,6291456,23068672,23068672,23068672,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([2205217,2205249,2205281,2205313,2205345,2205377,2205409,2205441,2205473,2205505,2205537,2205569,2205601,2205633,2205665,2205697]),new Uint32Array([6291456,0,6291456,0,0,0,6291456,6291456,6291456,6291456,0,0,23068672,6291456,23068672,23068672]),new Uint32Array([2173601,2173761,2174081,2173569,2174241,2174113,2173953,6291456,2174305,6291456,2174337,6291456,2174369,6291456,2174401,6291456]),new Uint32Array([6291456,23068672,23068672,23068672,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456]),new Uint32Array([2152450,2152514,2099653,2104452,2099813,2122243,2099973,2152578,2122339,2122435,2122531,2122627,2122723,2104580,2122819,2152642]),new Uint32Array([2236385,2236417,2236449,2236482,2236545,2215425,2236577,2236609,2236641,2236673,2215457,2236705,2236737,2236770,2215489,2236833]),new Uint32Array([2163394,2159746,2163458,2131362,2163522,2160130,2163778,2132226,2163842,2132898,2163906,2161410,2138658,2097666,2136162,2163650]),new Uint32Array([2218721,2246913,2246946,2216385,2247010,2247074,2215009,2247137,2247169,2216481,2247201,2247233,2247266,2247330,2247330,0]),new Uint32Array([2129730,2129762,2129858,2129731,2129827,2156482,2156482,0,0,0,0,0,0,0,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,0,0,0,0,0,6291456,0,0]),new Uint32Array([2203969,2204001,2181377,2204033,2204065,6291456,2204097,6291456,0,0,0,0,0,0,0,0]),new Uint32Array([2169473,6291456,2169505,6291456,2169537,6291456,2169569,6291456,2169601,6291456,2169633,6291456,2169665,6291456,2169697,6291456]),new Uint32Array([2141542,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2220801,2220801,2220801,2220801,2220833,2220833,2220865,2220865,2220865,2220865,2220897,2220897,2220897,2220897,2139873,2139873]),new Uint32Array([0,0,0,0,0,23068672,23068672,0,0,0,0,0,0,0,6291456,0]),new Uint32Array([2214849,2218433,2218465,2218497,2218529,2218561,2214881,2218593,2218625,2218657,2218689,2218721,2218753,2216545,2218785,2218817]),new Uint32Array([23068672,23068672,23068672,23068672,0,0,0,0,0,0,0,0,0,0,0,6291456]),new Uint32Array([2136482,2164610,2164674,2164738,2164802,2132802,2132706,2164866,2132898,2164930,2164994,2165058,2165122,2132802,2132706,2164866]),new Uint32Array([2207649,2207681,2207713,2207745,2207777,2207809,2207841,2207873,2207905,2207937,2207969,2208001,2208033,2208065,2208097,2208129]),new Uint32Array([2123683,2105092,2152706,2123779,2105220,2152770,2100453,2098755,2123906,2124002,2124098,2124194,2124290,2124386,2124482,2124578]),new Uint32Array([6291456,6291456,6291456,6291456,0,0,0,6291456,0,0,0,0,0,0,0,10485857]),new Uint32Array([6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([10508163,10508259,10508355,10508451,2200129,2200161,2192737,2200193,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2203553,6291456,2203585,6291456,6291456,6291456,2203617,6291456,2203649,6291456,2203681,6291456,2203713,6291456,2203745,6291456]),new Uint32Array([18884449,18884065,23068672,18884417,18884034,18921185,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,18874368]),new Uint32Array([2247393,2247426,2247489,2247521,2247553,2247586,2247649,2247681,2247713,2247745,2247777,2247810,2247873,2247905,2247937,2247969]),new Uint32Array([6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,23068672]),new Uint32Array([2134145,2097153,2134241,0,2132705,2130977,2160065,2131297,0,2133089,2160577,2133857,2235297,0,2235329,0]),new Uint32Array([2182593,6291456,2182625,6291456,2182657,6291456,2182689,6291456,2182721,6291456,2182753,6291456,2182785,6291456,2182817,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2102402,2102403,6291456,2110050]),new Uint32Array([2149890,2108323,2149954,6291456,2113441,6291456,2149057,6291456,2113441,6291456,2105473,2167265,2111137,2105505,6291456,2108353]),new Uint32Array([2219105,2219137,2195233,2251554,2251617,2251649,2251681,2251713,2251746,2251810,2251873,2251905,2251937,2251970,2252033,2219169]),new Uint32Array([2203009,6291456,2203041,6291456,2203073,6291456,2203105,6291456,2203137,6291456,2203169,6291456,2203201,6291456,2203233,6291456]),new Uint32Array([2128195,2128291,2128387,2128483,2128579,2128675,2128771,2128867,2128963,2129059,2129155,2129251,2129347,2129443,2129539,2129635]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2140964,2141156,2140966,2141158,2141350]),new Uint32Array([0,0,0,0,0,0,0,0,0,0,0,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([2225378,2225442,2225506,2225570,2225634,2225698,2225762,2225826,2225890,2225954,2226018,2226082,2226146,2226210,2226274,2226338]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2112577,2098177,2098305,2108321,2108289,2100865,2113153,2108481,2113345,2113441,2098209,2111137,2105505,2098241,2108353,2108417]),new Uint32Array([2108353,2108417,0,2105601,2108193,2157121,2157313,2157377,2157441,2100897,6291456,2108419,2173953,2173633,2173633,2173953]),new Uint32Array([2111713,2173121,2111905,2098177,2173153,2173185,2173217,2113153,2113345,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456,6291456,6291456,2190753]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,2197249,6291456,2117377,2197281,2197313,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,0,0,0,0,0,0,23068672,0,0,0,0,0,6291456,6291456,6291456]),new Uint32Array([2098337,2101441,2101569,2101697,2101825,2101953,2102081,2102209,2100833,2100737,2098337,2101441,2101569,2101697,2101825,2101953]),new Uint32Array([23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0]),new Uint32Array([0,0,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,23068672,23068672,23068672]),new Uint32Array([2173281,6291456,2173313,6291456,2173345,6291456,2173377,6291456,0,0,10532546,6291456,6291456,6291456,10562017,2173441]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,0,0]),new Uint32Array([23068672,23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2159426,2159490,2159554,2159362,2159618,2159682,2139522,2136450,2159746,2159810,2159874,2130978,2131074,2131266,2131362,2159938]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2203233,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2203265,6291456,2203297,6291456,2203329,2203361,6291456]),new Uint32Array([6291456,6291456,2148418,2148482,2148546,0,6291456,2148610,2186529,2186561,2148417,2148545,2148482,10495778,2143969,10495778]),new Uint32Array([2134146,2139426,2160962,2134242,2161218,2161282,2161346,2161410,2138658,2134722,2134434,2134818,2097666,2097346,2097698,2105986]),new Uint32Array([2198881,2198913,2198945,2198977,2199009,2199041,2199073,2199105,2199137,2199169,2199201,2199233,2199265,2199297,2199329,2199361]),new Uint32Array([0,23068672,23068672,23068672,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456]),new Uint32Array([10610561,2098209,2111137,2105505,2098241,2108353,2108417,2105825,2111713,2100897,2111905,2105473,2105569,2105601,2112289,2108193]),new Uint32Array([2183873,6291456,2183905,6291456,2183937,6291456,2183969,6291456,2184001,6291456,2184033,6291456,2184065,6291456,2184097,6291456]),new Uint32Array([2244642,2244706,2244769,2244801,2218305,2244833,2244865,2244897,2244929,2244961,2244993,2245026,2245089,2245122,2245185,0]),new Uint32Array([6291456,6291456,2116513,2116609,2116705,2116801,2199873,2199905,2199937,2199969,2190913,2200001,2200033,2200065,2200097,2191009]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,0,0,2180673,2180705,2180737,2180769,2180801,2180833,0,0]),new Uint32Array([2098081,2099521,2099105,2120705,2098369,2120801,2103361,2097985,2098433,2121377,2121473,2099169,2099873,2098401,2099393,2152609]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2150402]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,2145666,2145730,6291456,6291456]),new Uint32Array([2173921,2173953,2173985,2173761,2174017,2174049,2174081,2174113,2174145,2174177,2149057,2233057,2148481,2173601,2173633,2173665]),new Uint32Array([2187073,6291456,6291456,6291456,6291456,2098241,2098241,2108353,2100897,2111905,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2102404,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,2100612,6291456,6291456,6291456,6291456,6291456,6291456,6291456,10485857]),new Uint32Array([2149057,2233057,2148481,2173601,2173633,2173665,2173697,2173729,2148801,2173761,2143969,2173793,2173825,2153473,2173857,2173889]),new Uint32Array([2217697,2217729,2217761,2217793,2217825,2217857,2217889,2217921,2217953,2215873,2217985,2215905,2218017,2218049,2218081,2218113]),new Uint32Array([2211233,2218849,2216673,2218881,2218913,2218945,2218977,2219009,2216833,2219041,2215137,2219073,2216865,2209505,2219105,2216897]),new Uint32Array([2240097,2240129,2240161,2240193,2240225,2240257,2240289,2240321,2240353,2240386,2240449,2240481,2240513,2240545,2207905,2240578]),new Uint32Array([6291456,6291456,2202273,6291456,2202305,6291456,2202337,6291456,2202369,6291456,2202401,6291456,2202433,6291456,2202465,6291456]),new Uint32Array([0,23068672,23068672,18923394,23068672,18923458,18923522,18884099,18923586,18884195,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([2201121,6291456,2201153,6291456,2201185,6291456,2201217,6291456,2201249,6291456,2201281,6291456,2201313,6291456,2201345,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,6291456,6291456]),new Uint32Array([2211041,2211073,2211105,2211137,2211169,2211201,2211233,2211265,2211297,2211329,2211361,2211393,2211425,2211457,2211489,2211521]),new Uint32Array([2181825,6291456,2181857,6291456,2181889,6291456,2181921,6291456,2181953,6291456,2181985,6291456,2182017,6291456,2182049,6291456]),new Uint32Array([2162337,2097633,2097633,2097633,2097633,2132705,2132705,2132705,2132705,2097153,2097153,2097153,2097153,2133089,2133089,2133089]),new Uint32Array([6291456,6291456,6291456,6291456,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,2148545,6291456,2173473,6291456,2148865,6291456,2173505,6291456,2173537,6291456,2173569,6291456,2149121,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,6291456,0,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0]),new Uint32Array([2148801,2173761,2143969,2173793,2173825,2153473,2173857,2173889,2173921,2173953,2173985,2174017,2174017,2174049,2174081,2174113]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,0,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([2207137,2207169,2207201,2207233,2207265,2207297,2207329,2207361,2207393,2207425,2207457,2207489,2207521,2207553,2207585,2207617]),new Uint32Array([6291456,6291456,23068672,23068672,23068672,6291456,6291456,0,23068672,23068672,0,0,0,0,0,0]),new Uint32Array([2198401,2198433,2198465,2198497,0,2198529,2198561,2198593,2198625,2198657,2198689,2198721,2198753,2198785,2198817,2198849]),new Uint32Array([2105505,2098241,2108353,2108417,2105825,2111713,2100897,2111905,2105473,2105569,2105601,2112289,2108193,2112481,2112577,2098177]),new Uint32Array([23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,0,0]),new Uint32Array([2216385,2118721,2216417,2216449,2216481,2216513,2216545,2211233,2216577,2216609,2216641,2216673,2216705,2216737,2216737,2216769]),new Uint32Array([2216801,2216833,2216865,2216897,2216929,2216961,2216993,2215169,2217025,2217057,2217089,2217121,2217154,2217217,0,0]),new Uint32Array([2210593,2191809,2210625,2210657,2210689,2210721,2210753,2210785,2210817,2210849,2191297,2210881,2210913,2210945,2210977,2211009]),new Uint32Array([0,0,2105825,0,0,2111905,2105473,0,0,2112289,2108193,2112481,2112577,0,2098305,2108321]),new Uint32Array([0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([0,2097153,2134241,0,2132705,0,0,2131297,0,2133089,0,2133857,0,2220769,0,2235361]),new Uint32Array([14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064,6291456,6291456,14680064]),new Uint32Array([23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,0,0,0,0]),new Uint32Array([2171873,6291456,2171905,6291456,2171937,6291456,2171969,6291456,2172001,6291456,2172033,6291456,2172065,6291456,2172097,6291456]),new Uint32Array([2220929,2220929,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2133857,2134145,2134145,2134145,2134145,2134241,2134241,2134241,2134241,2105889,2105889,2105889,2105889,2097185,2097185,2097185]),new Uint32Array([2173697,2173761,2173793,2174113,2173985,2173953,2148481,2173601,2173633,2173665,2173697,2173729,2148801,2173761,2143969,2173793]),new Uint32Array([0,0,0,0,0,0,0,0,0,0,0,0,10499619,10499715,10499811,10499907]),new Uint32Array([0,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([6291456,0,0,0,0,0,0,0,0,0,0,0,0,0,0,23068672]),new Uint32Array([6291456,6291456,6291456,6291456,0,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,0,0,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456,0,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,6291456,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,0,23068672,23068672,23068672,0,23068672,23068672,23068672,23068672,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,6291456,23068672,23068672]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,0,0,0,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,2144322,2144386,2144450,2144514,2144578,2144642,2144706,2144770]),new Uint32Array([23068672,23068672,23068672,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456]),new Uint32Array([2113153,2108481,2113345,2113441,2098209,2111137,0,2098241,2108353,2108417,2105825,0,0,2111905,2105473,2105569]),new Uint32Array([2236321,2236353,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([2152194,2121283,2103684,2103812,2097986,2098533,2097990,2098693,2098595,2098853,2099013,2103940,2121379,2121475,2121571,2104068]),new Uint32Array([2206241,2206273,2206305,2206337,2206369,2206401,2206433,2206465,2206497,2206529,2206561,2206593,2206625,2206657,2206689,2206721]),new Uint32Array([6291456,6291456,6291456,6291456,16777216,16777216,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,23068672,23068672,10538818,10538882,6291456,6291456,2150338]),new Uint32Array([6291456,6291456,6291456,0,0,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2214369,2214401,2214433,2214465,2214497,2214529,2214561,2214593,2194977,2214625,2195073,2214657,2214689,2214721,6291456,6291456]),new Uint32Array([2097152,2097152,2097152,2097152,0,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([2182081,6291456,2182113,6291456,2182145,6291456,2182177,6291456,2182209,6291456,2182241,6291456,2182273,6291456,2182305,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2146881,2146945,2147009,2147073,2147137,2147201,2147265,2147329]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,6291456,23068672,23068672]),new Uint32Array([0,0,0,0,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2122915,2123011,2123107,2104708,2123203,2123299,2123395,2100133,2104836,2100290,2100293,2104962,2104964,2098052,2123491,2123587]),new Uint32Array([23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456]),new Uint32Array([6291456,2171169,6291456,2171201,6291456,2171233,6291456,2171265,6291456,2171297,6291456,2171329,6291456,6291456,2171361,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([0,0,2148994,2149058,2149122,0,6291456,2149186,2186945,2173537,2148993,2149121,2149058,10531458,10496066,0]),new Uint32Array([2195009,2195041,2195073,2195105,2195137,2195169,2195201,2195233,2195265,2195297,2195329,2195361,2195393,2195425,2195457,2195489]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,0,0,6291456,6291456]),new Uint32Array([2182849,6291456,2182881,6291456,2182913,6291456,2182945,6291456,2182977,6291456,2183009,6291456,2183041,6291456,2183073,6291456]),new Uint32Array([2211553,2210081,2211585,2211617,2211649,2211681,2211713,2211745,2211777,2211809,2209569,2211841,2211873,2211905,2211937,2211969]),new Uint32Array([2112577,2098177,2098305,2108321,2108289,2100865,2113153,2108481,2113345,2113441,2166594,2127298,2166658,2142978,2141827,2166722]),new Uint32Array([2173985,2173761,2174017,2174049,2174081,2174113,2174145,2174177,2149057,2233057,2148481,2173601,2173633,2173665,2173697,2173729]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,0,0,2185761,2185793,2185825,2185857,2185889,2185921,0,0]),new Uint32Array([6291456,2148481,2173601,2173633,2173665,2173697,2173729,2148801,2173761,2143969,2173793,2173825,2153473,2173857,2173889,2173921]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,0,6291456]),new Uint32Array([0,0,0,2220961,2220961,2220961,2220961,2144193,2144193,2159201,2159201,2159265,2159265,2144194,2220993,2220993]),new Uint32Array([2192641,2235393,2235425,2152257,2116609,2235457,2235489,2200065,2235521,2235553,2235585,2212449,2235617,2235649,2235681,2235713]),new Uint32Array([2194049,2194081,2194113,2194145,2194177,2194209,2194241,2194273,2194305,2194337,2194369,2194401,2194433,2194465,2194497,2194529]),new Uint32Array([2196673,2208641,2208673,2208705,2208737,2208769,2208801,2208833,2208865,2208897,2208929,2208961,2208993,2209025,2209057,2209089]),new Uint32Array([2191681,2191713,2191745,2191777,2153281,2191809,2191841,2191873,2191905,2191937,2191969,2192001,2192033,2192065,2192097,2192129]),new Uint32Array([2230946,2231010,2231074,2231138,2231202,2231266,2231330,2231394,2231458,2231522,2231586,2231650,2231714,2231778,2231842,2231906]),new Uint32Array([14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2185953,2185985,2186017,2186049,2186081,2186113,2186145,2186177]),new Uint32Array([2139811,2139907,2097284,2105860,2105988,2106116,2106244,2097444,2097604,2097155,10485778,10486344,2106372,6291456,0,0]),new Uint32Array([2110051,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([0,0,0,0,0,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2172385,6291456,2172417,6291456,2172449,6291456,2172481,6291456,2172513,6291456,2172545,6291456,2172577,6291456,2172609,6291456]),new Uint32Array([0,0,23068672,23068672,6291456,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([2249345,2249377,2249409,2249441,2249473,2249505,2249537,2249570,2210209,2249633,2249665,2249697,2249729,2249761,2249793,2216769]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,6291456,6291456,6291456,6291456]),new Uint32Array([2187169,2187201,2187233,2187265,2187297,2187329,2187361,2187393,2187425,2187457,2187489,2187521,2187553,2187585,2187617,2187649]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([0,0,0,6291456,6291456,0,0,0,6291456,6291456,6291456,0,0,0,6291456,6291456]),new Uint32Array([2182337,6291456,2182369,6291456,2182401,6291456,2182433,6291456,2182465,6291456,2182497,6291456,2182529,6291456,2182561,6291456]),new Uint32Array([2138179,2138275,2138371,2138467,2134243,2134435,2138563,2138659,2138755,2138851,2138947,2139043,2138947,2138755,2139139,2139235]),new Uint32Array([23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,0,0,0,0,0,0,0,0]),new Uint32Array([0,0,23068672,23068672,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2250498,2250562,2250625,2250657,2208321,2250689,2250721,2250753,2250785,2250817,2250849,2218945,2250881,2250913,2250945,0]),new Uint32Array([2170369,2105569,2098305,2108481,2173249,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,6291456]),new Uint32Array([2100897,2111905,2105473,2105569,2105601,0,2108193,0,0,0,2098305,2108321,2108289,2100865,2113153,2108481]),new Uint32Array([2100897,2100897,2105569,2105569,6291456,2112289,2149826,6291456,6291456,2112481,2112577,2098177,2098177,2098177,6291456,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,0,0,6291456,6291456,6291456]),new Uint32Array([6291456,2169953,2169985,6291456,2170017,6291456,2170049,2170081,6291456,2170113,2170145,2170177,6291456,6291456,2170209,2170241]),new Uint32Array([6291456,6291456,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([0,0,0,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2220641,2220641,2220673,2220673,2220673,2220673,2220705,2220705,2220705,2220705,2220737,2220737,2220737,2220737,2220769,2220769]),new Uint32Array([2127650,2127746,2127842,2127938,2128034,2128130,2128226,2128322,2128418,2127523,2127619,2127715,2127811,2127907,2128003,2128099]),new Uint32Array([2143969,2173793,2173825,2153473,2173857,2173889,2173921,2173953,2173985,2173761,2174017,2174049,2174081,2174113,2174145,2174177]),new Uint32Array([0,0,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([2204705,2204737,2204769,2204801,2204833,2204865,2204897,2204929,2204961,2204993,2205025,2205057,2205089,2205121,2205153,2205185]),new Uint32Array([2176385,6291456,2176417,6291456,2176449,6291456,2176481,6291456,2176513,6291456,2176545,6291456,2176577,6291456,2176609,6291456]),new Uint32Array([2195521,2195553,2195585,2195617,2195649,2195681,2117857,2195713,2195745,2195777,2195809,2195841,2195873,2195905,2195937,2195969]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456,6291456]),new Uint32Array([2173921,2173953,2173985,2174017,2174017,2174049,2174081,2174113,2174145,2174177,2149057,2233089,2173697,2173761,2173793,2174113]),new Uint32Array([2131586,2132450,2135970,2135778,2161602,2136162,2163650,2161794,2135586,2163714,2137186,2131810,2160290,2135170,2097506,2159554]),new Uint32Array([2134145,2097153,2134241,2105953,2132705,2130977,2160065,2131297,2162049,2133089,2160577,2133857,0,0,0,0]),new Uint32Array([2116513,2116609,2116705,2116801,2116897,2116993,2117089,2117185,2117281,2117377,2117473,2117569,2117665,2117761,2117857,2117953]),new Uint32Array([2100737,2098337,2101441,2101569,2101697,2101825,2101953,2102081,2102209,2100802,2101154,2101282,2101410,2101538,2101666,2101794]),new Uint32Array([2100289,2098657,2098049,2200737,2123489,2123681,2200769,2098625,2100321,2098145,2100449,2098017,2098753,2098977,2150241,2150305]),new Uint32Array([6291456,6291456,6291456,0,6291456,6291456,6291456,6291456,6291456,2109955,6291456,6291456,0,0,0,0]),new Uint32Array([18874368,18874368,18874368,18874368,18874368,18874368,18874368,18874368,18874368,18874368,18874368,18874368,18874368,18874368,18874368,18874368]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,0,6291456,0,0]),new Uint32Array([2130979,2131075,2131075,2131171,2131267,2131363,2131459,2131555,2131651,2131651,2131747,2131843,2131939,2132035,2132131,2132227]),new Uint32Array([0,2177793,6291456,2177825,6291456,2177857,6291456,2177889,6291456,2177921,6291456,2177953,6291456,2177985,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([6291456,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([2113345,0,2098209,2111137,2105505,2098241,2108353,2108417,2105825,2111713,2100897,2111905,2105473,2105569,2105601,2112289]),new Uint32Array([2136643,2136739,2136835,2136931,2137027,2137123,2137219,2137315,2137411,2137507,2137603,2137699,2137795,2137891,2137987,2138083]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0]),new Uint32Array([2174433,6291456,2174465,6291456,2174497,6291456,2174529,6291456,2174561,6291456,2174593,6291456,2174625,6291456,2174657,6291456]),new Uint32Array([0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2105473,2105569,2105601,2112289,2108193,2112481,2112577,2098177,2098305,2108321,2108289,2100865,2113153,2108481,2113345,2113441]),new Uint32Array([10496547,10496643,2105505,2149698,6291456,10496739,10496835,2170273,6291456,2149762,2105825,2111713,2111713,2111713,2111713,2168673]),new Uint32Array([6291456,2143490,2143490,2143490,2171649,6291456,2171681,2171713,2171745,6291456,2171777,6291456,2171809,6291456,2171841,6291456]),new Uint32Array([2159106,2159106,2159170,2159170,2159234,2159234,2159298,2159298,2159298,2159362,2159362,2159362,2106401,2106401,2106401,2106401]),new Uint32Array([2105601,2112289,2108193,2112481,2112577,2098177,2098305,2108321,2108289,2100865,2113153,2108481,2113345,2113441,2098209,2111137]),new Uint32Array([2108417,2181217,2181249,2181281,2170433,2170401,2181313,2181345,2181377,2181409,2181441,2181473,2181505,2181537,2170529,2181569]),new Uint32Array([2218433,2245761,2245793,2245825,2245857,2245890,2245953,2245986,2209665,2246050,2246113,2246146,2246210,2246274,2246337,2246369]),new Uint32Array([2230754,2230818,2230882,0,0,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([6291456,0,6291456,6291456,6291456,6291456,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2184129,6291456,2184161,6291456,2184193,6291456,6291456,6291456,6291456,6291456,2146818,2183361,6291456,6291456,2142978,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2135170,2097506,2130691,2130787,2130883,2163970,2164034,2164098,2164162,2164226,2164290,2164354,2164418,2164482,2164546,2133122]),new Uint32Array([2108515,2108611,2100740,2108707,2108803,2108899,2108995,2109091,2109187,2109283,2109379,2109475,2109571,2109667,2109763,2100738]),new Uint32Array([2102788,2102916,2103044,2120515,2103172,2120611,2120707,2098373,2103300,2120803,2120899,2120995,2103428,2103556,2121091,2121187]),new Uint32Array([2158082,2158146,0,2158210,2158274,0,2158338,2158402,2158466,2129922,2158530,2158594,2158658,2158722,2158786,2158850]),new Uint32Array([10499619,10499715,10499811,10499907,10500003,10500099,10500195,10500291,10500387,10500483,10500579,10500675,10500771,10500867,10500963,10501059]),new Uint32Array([2239585,2239618,2239681,2239713,0,2191969,2239745,2239777,2192033,2239809,2239841,2239874,2239937,2239970,2240033,2240065]),new Uint32Array([2252705,2252738,2252801,2252833,2252865,2252897,2252930,2252994,2253057,2253089,2253121,2253154,2253217,2253250,2219361,2219361]),new Uint32Array([2105825,2111713,2100897,2111905,2105473,2105569,2105601,2112289,2108193,2112481,2112577,2098177,2098305,2108321,2108289,2100865]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,10538050,10538114,10538178,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2226402,2226466,2226530,2226594,2226658,2226722,2226786,2226850,2226914,2226978,2227042,2227106,2227170,2227234,2227298,2227362]),new Uint32Array([23068672,6291456,6291456,6291456,6291456,2144066,2144130,2144194,2144258,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,6291456,23068672,23068672]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,0,0,0,0]),new Uint32Array([2124674,2124770,2123875,2123971,2124067,2124163,2124259,2124355,2124451,2124547,2124643,2124739,2124835,2124931,2125027,2125123]),new Uint32Array([2168065,6291456,2168097,6291456,2168129,6291456,2168161,6291456,2168193,6291456,2168225,6291456,2168257,6291456,2168289,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,0,0,0,0]),new Uint32Array([23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,2100610,2100611,6291456,2107842,2107843,6291456,6291456,6291456,6291456,10537922,6291456,10537986,6291456]),new Uint32Array([2174849,2174881,2174913,2174945,2174977,2175009,2175041,2175073,2175105,2175137,2175169,2175201,2175233,2175265,2175297,2175329]),new Uint32Array([2154562,2154626,2154690,2154754,2141858,2154818,2154882,2127298,2154946,2127298,2155010,2155074,2155138,2155202,2155266,2155202]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,23068672,0]),new Uint32Array([2200641,2150786,2150850,2150914,2150978,2151042,2106562,2151106,2150562,2151170,2151234,2151298,2151362,2151426,2151490,2151554]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,0,0,0,0,0,0,0,0,6291456,6291456]),new Uint32Array([2220289,2220289,2220321,2220321,2220321,2220321,2220353,2220353,2220353,2220353,2220385,2220385,2220385,2220385,2220417,2220417]),new Uint32Array([2155330,2155394,0,2155458,2155522,2155586,2105732,0,2155650,2155714,2155778,2125314,2155842,2155906,2126274,2155970]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,6291456,6291456,23068672,23068672,6291456,23068672,23068672,23068672,23068672,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,0,0]),new Uint32Array([2097729,2106017,2106017,2106017,2106017,2131297,2131297,2131297,2131297,2106081,2106081,2162049,2162049,2105953,2105953,2162337]),new Uint32Array([2097185,2097697,2097697,2097697,2097697,2135777,2135777,2135777,2135777,2097377,2097377,2097377,2097377,2097601,2097601,2097217]),new Uint32Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,23068672]),new Uint32Array([2139331,2139427,2139523,2139043,2133571,2132611,2139619,2139715,0,0,0,0,0,0,0,0]),new Uint32Array([2174113,2174145,2100897,2098177,2108289,2100865,2173601,2173633,2173985,2174113,2174145,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,23068672,6291456,6291456,6291456,23068672,6291456,6291456,6291456,6291456,23068672,6291456,6291456,6291456,6291456]),new Uint32Array([23068672,23068672,18923778,23068672,23068672,23068672,23068672,18923842,23068672,23068672,23068672,23068672,18923906,23068672,23068672,23068672]),new Uint32Array([2134145,2097153,2134241,0,2132705,2130977,2160065,2131297,0,2133089,0,2133857,0,0,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,0,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([2177537,6291456,2177569,6291456,2177601,6291456,2177633,6291456,2177665,6291456,2177697,6291456,2177729,6291456,2177761,6291456]),new Uint32Array([2212481,2212513,2212545,2212577,2197121,2212609,2212641,2212673,2212705,2212737,2212769,2212801,2212833,2212865,2212897,2212929]),new Uint32Array([6291456,6291456,23068672,23068672,23068672,6291456,6291456,0,0,0,0,0,0,0,0,0]),new Uint32Array([2098241,2108353,2170209,2105825,2111713,2100897,2111905,2105473,2105569,2105601,2112289,6291456,2108193,2172417,2112481,2098177]),new Uint32Array([6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,6291456])],t=new Uint16Array([616,616,565,147,161,411,330,2,131,131,328,454,241,408,86,86,696,113,285,350,325,301,473,214,639,232,447,64,369,598,124,672,567,223,621,154,107,86,86,86,86,86,86,505,86,68,634,86,218,218,218,218,486,218,218,513,188,608,216,86,217,463,668,85,700,360,184,86,86,86,647,402,153,10,346,718,662,260,145,298,117,1,443,342,138,54,563,86,240,572,218,70,387,86,118,460,641,602,86,86,306,218,86,692,86,86,86,86,86,162,707,86,458,26,86,218,638,86,86,86,86,86,65,449,86,86,306,183,86,58,391,667,86,157,131,131,131,131,86,433,131,406,31,218,247,86,86,693,218,581,351,86,438,295,69,462,45,126,173,650,14,295,69,97,168,187,641,78,523,390,69,108,287,664,173,219,83,295,69,108,431,426,173,694,412,115,628,52,257,398,641,118,501,121,69,579,151,423,173,620,464,121,69,382,151,476,173,27,53,121,86,594,578,226,173,86,632,130,86,96,228,268,641,622,563,86,86,21,148,650,131,131,321,43,144,343,381,531,131,131,178,20,86,399,156,375,164,541,30,60,715,198,92,118,131,131,86,86,306,407,86,280,457,196,488,358,131,131,244,86,86,143,86,86,86,86,86,667,563,86,86,86,86,86,86,86,86,86,86,86,86,86,336,363,86,86,336,86,86,380,678,67,86,86,86,678,86,86,86,512,86,307,86,708,86,86,86,86,86,528,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,563,307,86,86,86,86,86,104,450,337,86,720,86,32,450,397,86,86,86,587,218,558,708,708,293,708,86,86,86,86,86,694,205,86,8,86,86,86,86,549,86,667,697,697,679,86,458,460,86,86,650,86,708,543,86,86,86,245,86,86,86,140,218,127,708,708,458,197,131,131,131,131,500,86,86,483,251,86,306,510,515,86,722,86,86,86,65,201,86,86,483,580,470,86,86,86,368,131,131,131,694,114,110,555,86,86,123,721,163,142,713,418,86,317,675,209,218,218,218,371,545,592,629,490,603,199,46,320,525,680,310,279,388,111,42,252,593,607,235,617,410,377,50,548,135,356,17,520,189,116,392,600,349,332,482,699,690,535,119,106,451,71,152,667,131,218,218,265,671,637,492,504,533,683,269,269,658,86,86,86,86,86,86,86,86,86,491,619,86,86,6,86,86,86,86,86,86,86,86,86,86,86,229,86,86,86,86,86,86,86,86,86,86,86,86,667,86,86,171,131,118,131,656,206,234,571,89,334,670,246,311,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,534,86,86,86,86,86,86,82,86,86,86,86,86,430,86,86,86,86,86,86,86,86,86,599,86,324,86,470,69,640,264,131,626,101,174,86,86,667,233,105,73,374,394,221,204,84,28,326,86,86,471,86,86,86,109,573,86,171,200,200,200,200,218,218,86,86,86,86,460,131,131,131,86,506,86,86,86,86,86,220,404,34,614,47,442,305,25,612,338,601,648,7,344,255,131,131,51,86,312,507,563,86,86,86,86,588,86,86,86,86,86,530,511,86,458,3,435,384,556,522,230,527,86,118,86,86,717,86,137,273,79,181,484,23,93,112,655,249,417,703,370,87,98,313,684,585,155,465,596,481,695,18,416,428,61,701,706,282,643,495,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,549,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,549,131,131,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,307,86,86,86,171,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,650,131,422,542,420,263,24,172,86,86,86,86,86,566,86,86,132,540,395,353,494,519,19,485,284,472,131,131,131,16,714,86,211,708,86,86,86,694,698,86,86,483,704,708,218,272,86,86,120,86,159,478,86,307,247,86,86,663,597,459,627,667,86,86,277,455,39,302,86,250,86,86,86,271,99,452,306,281,329,400,200,86,86,362,549,352,646,461,323,586,86,86,4,708,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,717,86,518,86,86,650,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,125,554,480,300,613,72,333,288,561,544,604,48,719,91,169,176,590,224,76,191,29,559,560,231,537,166,477,538,256,437,131,131,469,167,40,0,685,266,441,705,239,642,475,568,640,610,299,673,517,318,385,22,202,180,179,359,424,215,90,66,521,653,467,682,453,409,479,88,131,661,35,303,15,262,666,630,712,131,131,618,659,175,218,195,347,193,227,261,150,165,709,546,294,569,710,270,413,376,524,55,242,38,419,529,170,657,3,304,122,379,278,131,651,86,67,576,458,458,131,131,86,86,86,86,86,86,86,118,309,86,86,547,86,86,86,86,667,650,664,131,131,86,86,56,131,131,131,131,131,131,131,131,86,307,86,86,86,664,238,650,86,86,717,86,118,86,86,315,86,59,86,86,574,549,131,131,340,57,436,86,86,86,86,86,86,458,708,499,691,62,86,650,86,86,694,86,86,86,319,131,131,131,131,131,131,131,131,131,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,171,86,549,694,131,131,131,131,131,131,131,131,131,77,86,86,139,86,502,86,86,86,667,595,131,131,131,86,12,86,13,86,609,131,131,131,131,86,86,86,625,86,669,86,86,182,129,86,5,694,104,86,86,86,86,131,131,86,86,386,171,86,86,86,345,86,324,86,589,86,213,36,131,131,131,131,131,86,86,86,86,104,131,131,131,141,290,80,677,86,86,86,267,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,86,667,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,515,86,86,33,136,669,86,711,515,86,86,550,640,86,104,708,515,86,159,372,717,86,86,444,515,86,86,663,37,86,563,460,86,390,624,702,131,131,131,131,389,59,708,86,86,341,208,708,635,295,69,108,431,508,100,190,131,131,131,131,131,131,131,131,86,86,86,649,516,660,131,131,86,86,86,218,631,708,131,131,131,131,131,131,131,131,131,131,86,86,341,575,238,514,131,131,86,86,86,218,291,708,307,131,86,86,306,367,708,131,131,131,86,378,697,86,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,615,253,86,86,86,292,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,86,86,86,104,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,69,86,341,553,549,86,307,86,86,645,275,455,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,708,131,131,131,131,131,131,86,86,86,86,86,86,667,460,86,86,86,86,86,86,86,86,86,86,86,86,717,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,667,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,171,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,104,86,667,459,131,131,131,131,131,131,86,458,225,86,86,86,516,549,11,390,405,86,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,86,86,86,86,460,44,218,197,711,515,131,131,131,131,664,131,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,307,131,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,308,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,640,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,86,86,86,86,86,86,118,307,104,286,591,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,549,86,86,681,86,86,75,185,314,582,86,358,496,474,86,104,131,86,86,86,86,146,131,131,131,131,131,131,131,131,131,131,131,86,86,86,86,86,171,86,640,131,131,131,131,131,131,131,131,246,503,689,339,674,81,258,415,439,128,562,366,414,246,503,689,583,222,557,316,636,665,186,355,95,670,246,503,689,339,674,557,258,415,439,186,355,95,670,246,503,689,446,644,536,652,331,532,335,440,274,421,297,570,74,425,364,425,606,552,403,509,134,365,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,218,218,218,498,218,218,577,627,551,497,572,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,553,354,236,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,86,86,86,86,86,86,86,86,86,86,86,86,296,455,131,131,456,243,103,86,41,459,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,9,276,158,716,393,564,383,489,401,654,210,654,131,131,131,640,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,86,86,650,86,86,86,86,86,86,717,667,563,563,563,86,549,102,686,133,246,605,86,448,86,86,207,307,131,131,131,641,86,177,611,445,373,194,584,131,131,131,131,131,131,131,131,131,131,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,308,307,171,86,86,86,86,86,86,86,717,86,86,86,86,86,460,131,131,650,86,86,86,694,708,86,86,694,86,458,131,131,131,131,131,131,667,694,289,650,667,131,131,86,640,131,131,664,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,171,131,131,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,460,86,86,86,86,86,86,86,86,86,86,86,86,86,458,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,640,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,466,203,149,429,94,432,160,687,539,63,237,283,192,248,348,259,427,526,396,676,254,468,487,212,327,623,49,633,322,493,434,688,357,361,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131]),{mapStr:"صلى الله عليه وسلمجل جلالهキロメートルrad∕s2エスクードキログラムキロワットグラムトンクルゼイロサンチームパーセントピアストルファラッドブッシェルヘクタールマンションミリバールレントゲン′′′′1⁄10viii(10)(11)(12)(13)(14)(15)(16)(17)(18)(19)(20)∫∫∫∫(오전)(오후)アパートアルファアンペアイニングエーカーカラットカロリーキュリーギルダークローネサイクルシリングバーレルフィートポイントマイクロミクロンメガトンリットルルーブル株式会社kcalm∕s2c∕kgاكبرمحمدصلعمرسولریال1⁄41⁄23⁄4 ̈́ྲཱྀླཱྀ ̈͂ ̓̀ ̓́ ̓͂ ̔̀ ̔́ ̔͂ ̈̀‵‵‵a/ca/sc/oc/utelfax1⁄71⁄91⁄32⁄31⁄52⁄53⁄54⁄51⁄65⁄61⁄83⁄85⁄87⁄8xii0⁄3∮∮∮(1)(2)(3)(4)(5)(6)(7)(8)(9)(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)(l)(m)(n)(o)(p)(q)(r)(s)(t)(u)(v)(w)(x)(y)(z)::====(ᄀ)(ᄂ)(ᄃ)(ᄅ)(ᄆ)(ᄇ)(ᄉ)(ᄋ)(ᄌ)(ᄎ)(ᄏ)(ᄐ)(ᄑ)(ᄒ)(가)(나)(다)(라)(마)(바)(사)(아)(자)(차)(카)(타)(파)(하)(주)(一)(二)(三)(四)(五)(六)(七)(八)(九)(十)(月)(火)(水)(木)(金)(土)(日)(株)(有)(社)(名)(特)(財)(祝)(労)(代)(呼)(学)(監)(企)(資)(協)(祭)(休)(自)(至)pte10月11月12月ergltdアールインチウォンオンスオームカイリガロンガンマギニーケースコルナコーポセンチダースノットハイツパーツピクルフランペニヒヘルツペンスページベータボルトポンドホールホーンマイルマッハマルクヤードヤールユアンルピー10点11点12点13点14点15点16点17点18点19点20点21点22点23点24点hpabardm2dm3khzmhzghzthzmm2cm2km2mm3cm3km3kpampagpalogmilmolppmv∕ma∕m10日11日12日13日14日15日16日17日18日19日20日21日22日23日24日25日26日27日28日29日30日31日galffifflשּׁשּׂ ٌّ ٍّ َّ ُّ ِّ ّٰـَّـُّـِّتجمتحجتحمتخمتمجتمحتمخجمححميحمىسحجسجحسجىسمحسمجسممصححصممشحمشجيشمخشممضحىضخمطمحطممطميعجمعممعمىغممغميغمىفخمقمحقمملحملحيلحىلججلخملمحمحجمحيمجحمجممخممجخهمجهممنحمنحىنجمنجىنمينمىيممبخيتجيتجىتخيتخىتميتمىجميجحىجمىسخىصحيشحيضحيلجيلمييحييجييميمميقمينحيعميكمينجحمخيلجمكممجحيحجيمجيفميبحيسخينجيصلےقلے𝅘𝅥𝅮𝅘𝅥𝅯𝅘𝅥𝅰𝅘𝅥𝅱𝅘𝅥𝅲𝆹𝅥𝅮𝆺𝅥𝅮𝆹𝅥𝅯𝆺𝅥𝅯〔s〕ppv〔本〕〔三〕〔二〕〔安〕〔点〕〔打〕〔盗〕〔勝〕〔敗〕 ̄ ́ ̧ssi̇ijl·ʼndžljnjdz ̆ ̇ ̊ ̨ ̃ ̋ ιեւاٴوٴۇٴيٴक़ख़ग़ज़ड़ढ़फ़य़ড়ঢ়য়ਲ਼ਸ਼ਖ਼ਗ਼ਜ਼ਫ਼ଡ଼ଢ଼ําໍາຫນຫມགྷཌྷདྷབྷཛྷཀྵཱཱིུྲྀླྀྒྷྜྷྡྷྦྷྫྷྐྵaʾἀιἁιἂιἃιἄιἅιἆιἇιἠιἡιἢιἣιἤιἥιἦιἧιὠιὡιὢιὣιὤιὥιὦιὧιὰιαιάιᾶι ͂ὴιηιήιῆιὼιωιώιῶι ̳!! ̅???!!?rs°c°fnosmtmivix⫝̸ ゙ ゚よりコト333435참고주의363738394042444546474849503月4月5月6月7月8月9月hgevギガデシドルナノピコビルペソホンリラレムdaauovpciu平成昭和大正明治naμakakbmbgbpfnfμfμgmgμlmldlklfmnmμmpsnsμsmsnvμvkvpwnwμwmwkwkωmωbqcccddbgyhainkkktlnlxphprsrsvwbstմնմեմիվնմխיִײַשׁשׂאַאָאּבּגּדּהּוּזּטּיּךּכּלּמּנּסּףּפּצּקּרּתּוֹבֿכֿפֿאלئائەئوئۇئۆئۈئېئىئجئحئمئيبجبمبىبيتىتيثجثمثىثيخحضجضمطحظمغجفجفحفىفيقحقىقيكاكجكحكخكلكىكينخنىنيهجهىهييىذٰرٰىٰئرئزئنبزبنترتزتنثرثزثنمانرنزننيريزئخئهبهتهصخنههٰثهسهشهطىطيعىعيغىغيسىسيشىشيصىصيضىضيشخشرسرصرضراً ًـًـّ ْـْلآلألإ𝅗𝅥0,1,2,3,4,5,6,7,8,9,wzhvsdwcmcmddjほかココàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþāăąćĉċčďđēĕėęěĝğġģĥħĩīĭįĵķĺļľłńņňŋōŏőœŕŗřśŝşšţťŧũūŭůűųŵŷÿźżɓƃƅɔƈɖɗƌǝəɛƒɠɣɩɨƙɯɲɵơƣƥʀƨʃƭʈưʊʋƴƶʒƹƽǎǐǒǔǖǘǚǜǟǡǣǥǧǩǫǭǯǵƕƿǹǻǽǿȁȃȅȇȉȋȍȏȑȓȕȗșțȝȟƞȣȥȧȩȫȭȯȱȳⱥȼƚⱦɂƀʉʌɇɉɋɍɏɦɹɻʁʕͱͳʹͷ;ϳέίόύβγδεζθκλνξοπρστυφχψϊϋϗϙϛϝϟϡϣϥϧϩϫϭϯϸϻͻͼͽѐёђѓєѕіїјљњћќѝўџабвгдежзийклмнопрстуфхцчшщъыьэюяѡѣѥѧѩѫѭѯѱѳѵѷѹѻѽѿҁҋҍҏґғҕҗҙқҝҟҡңҥҧҩҫҭүұҳҵҷҹһҽҿӂӄӆӈӊӌӎӑӓӕӗәӛӝӟӡӣӥӧөӫӭӯӱӳӵӷӹӻӽӿԁԃԅԇԉԋԍԏԑԓԕԗԙԛԝԟԡԣԥԧԩԫԭԯաբգդզէըթժլծկհձղճյշոչպջռստրցփքօֆ་ⴧⴭნᏰᏱᏲᏳᏴᏵꙋɐɑᴂɜᴖᴗᴝᴥɒɕɟɡɥɪᵻʝɭᶅʟɱɰɳɴɸʂƫᴜʐʑḁḃḅḇḉḋḍḏḑḓḕḗḙḛḝḟḡḣḥḧḩḫḭḯḱḳḵḷḹḻḽḿṁṃṅṇṉṋṍṏṑṓṕṗṙṛṝṟṡṣṥṧṩṫṭṯṱṳṵṷṹṻṽṿẁẃẅẇẉẋẍẏẑẓẕạảấầẩẫậắằẳẵặẹẻẽếềểễệỉịọỏốồổỗộớờởỡợụủứừửữựỳỵỷỹỻỽỿἐἑἒἓἔἕἰἱἲἳἴἵἶἷὀὁὂὃὄὅὑὓὕὗᾰᾱὲΐῐῑὶΰῠῡὺῥ`ὸ‐+−∑〈〉ⰰⰱⰲⰳⰴⰵⰶⰷⰸⰹⰺⰻⰼⰽⰾⰿⱀⱁⱂⱃⱄⱅⱆⱇⱈⱉⱊⱋⱌⱍⱎⱏⱐⱑⱒⱓⱔⱕⱖⱗⱘⱙⱚⱛⱜⱝⱞⱡɫᵽɽⱨⱪⱬⱳⱶȿɀⲁⲃⲅⲇⲉⲋⲍⲏⲑⲓⲕⲗⲙⲛⲝⲟⲡⲣⲥⲧⲩⲫⲭⲯⲱⲳⲵⲷⲹⲻⲽⲿⳁⳃⳅⳇⳉⳋⳍⳏⳑⳓⳕⳗⳙⳛⳝⳟⳡⳣⳬⳮⳳⵡ母龟丨丶丿乙亅亠人儿入冂冖冫几凵刀力勹匕匚匸卜卩厂厶又口囗士夂夊夕女子宀寸小尢尸屮山巛工己巾干幺广廴廾弋弓彐彡彳心戈戶手支攴文斗斤方无曰欠止歹殳毋比毛氏气爪父爻爿片牙牛犬玄玉瓜瓦甘生用田疋疒癶白皮皿目矛矢石示禸禾穴立竹米糸缶网羊羽老而耒耳聿肉臣臼舌舛舟艮色艸虍虫血行衣襾見角言谷豆豕豸貝赤走足身車辛辰辵邑酉釆里長門阜隶隹雨靑非面革韋韭音頁風飛食首香馬骨高髟鬥鬯鬲鬼魚鳥鹵鹿麥麻黃黍黑黹黽鼎鼓鼠鼻齊齒龍龜龠.〒卄卅ᄁᆪᆬᆭᄄᆰᆱᆲᆳᆴᆵᄚᄈᄡᄊ짜ᅢᅣᅤᅥᅦᅧᅨᅩᅪᅫᅬᅭᅮᅯᅰᅱᅲᅳᅴᅵᄔᄕᇇᇈᇌᇎᇓᇗᇙᄜᇝᇟᄝᄞᄠᄢᄣᄧᄩᄫᄬᄭᄮᄯᄲᄶᅀᅇᅌᇱᇲᅗᅘᅙᆄᆅᆈᆑᆒᆔᆞᆡ上中下甲丙丁天地問幼箏우秘男適優印注項写左右医宗夜テヌモヨヰヱヲꙁꙃꙅꙇꙉꙍꙏꙑꙓꙕꙗꙙꙛꙝꙟꙡꙣꙥꙧꙩꙫꙭꚁꚃꚅꚇꚉꚋꚍꚏꚑꚓꚕꚗꚙꚛꜣꜥꜧꜩꜫꜭꜯꜳꜵꜷꜹꜻꜽꜿꝁꝃꝅꝇꝉꝋꝍꝏꝑꝓꝕꝗꝙꝛꝝꝟꝡꝣꝥꝧꝩꝫꝭꝯꝺꝼᵹꝿꞁꞃꞅꞇꞌꞑꞓꞗꞙꞛꞝꞟꞡꞣꞥꞧꞩɬʞʇꭓꞵꞷꬷꭒᎠᎡᎢᎣᎤᎥᎦᎧᎨᎩᎪᎫᎬᎭᎮᎯᎰᎱᎲᎳᎴᎵᎶᎷᎸᎹᎺᎻᎼᎽᎾᎿᏀᏁᏂᏃᏄᏅᏆᏇᏈᏉᏊᏋᏌᏍᏎᏏᏐᏑᏒᏓᏔᏕᏖᏗᏘᏙᏚᏛᏜᏝᏞᏟᏠᏡᏢᏣᏤᏥᏦᏧᏨᏩᏪᏫᏬᏭᏮᏯ豈更賈滑串句契喇奈懶癩羅蘿螺裸邏樂洛烙珞落酪駱亂卵欄爛蘭鸞嵐濫藍襤拉臘蠟廊朗浪狼郎來冷勞擄櫓爐盧蘆虜路露魯鷺碌祿綠菉錄論壟弄籠聾牢磊賂雷壘屢樓淚漏累縷陋勒肋凜凌稜綾菱陵讀拏諾丹寧怒率異北磻便復不泌數索參塞省葉說殺沈拾若掠略亮兩凉梁糧良諒量勵呂廬旅濾礪閭驪麗黎曆歷轢年憐戀撚漣煉璉秊練聯輦蓮連鍊列劣咽烈裂廉念捻殮簾獵令囹嶺怜玲瑩羚聆鈴零靈領例禮醴隸惡了僚寮尿料燎療蓼遼暈阮劉杻柳流溜琉留硫紐類戮陸倫崙淪輪律慄栗隆利吏履易李梨泥理痢罹裏裡離匿溺吝燐璘藺隣鱗麟林淋臨笠粒狀炙識什茶刺切度拓糖宅洞暴輻降廓兀嗀塚晴凞猪益礼神祥福靖精蘒諸逸都飯飼館鶴郞隷侮僧免勉勤卑喝嘆器塀墨層悔慨憎懲敏既暑梅海渚漢煮爫琢碑祉祈祐祖禍禎穀突節縉繁署者臭艹著褐視謁謹賓贈辶難響頻恵𤋮舘並况全侀充冀勇勺啕喙嗢墳奄奔婢嬨廒廙彩徭惘慎愈慠戴揄搜摒敖望杖滛滋瀞瞧爵犯瑱甆画瘝瘟盛直睊着磌窱类絛缾荒華蝹襁覆調請諭變輸遲醙鉶陼韛頋鬒𢡊𢡄𣏕㮝䀘䀹𥉉𥳐𧻓齃龎עםٱٻپڀٺٿٹڤڦڄڃچڇڍڌڎڈژڑکگڳڱںڻۀہھۓڭۋۅۉ、〖〗—–_{}【】《》「」『』[]#&*-<>\\$%@ءؤة\"'^|~⦅⦆・ゥャ¢£¬¦¥₩│←↑→↓■○𐐨𐐩𐐪𐐫𐐬𐐭𐐮𐐯𐐰𐐱𐐲𐐳𐐴𐐵𐐶𐐷𐐸𐐹𐐺𐐻𐐼𐐽𐐾𐐿𐑀𐑁𐑂𐑃𐑄𐑅𐑆𐑇𐑈𐑉𐑊𐑋𐑌𐑍𐑎𐑏𐓘𐓙𐓚𐓛𐓜𐓝𐓞𐓟𐓠𐓡𐓢𐓣𐓤𐓥𐓦𐓧𐓨𐓩𐓪𐓫𐓬𐓭𐓮𐓯𐓰𐓱𐓲𐓳𐓴𐓵𐓶𐓷𐓸𐓹𐓺𐓻𐳀𐳁𐳂𐳃𐳄𐳅𐳆𐳇𐳈𐳉𐳊𐳋𐳌𐳍𐳎𐳏𐳐𐳑𐳒𐳓𐳔𐳕𐳖𐳗𐳘𐳙𐳚𐳛𐳜𐳝𐳞𐳟𐳠𐳡𐳢𐳣𐳤𐳥𐳦𐳧𐳨𐳩𐳪𐳫𐳬𐳭𐳮𐳯𐳰𐳱𐳲𑣀𑣁𑣂𑣃𑣄𑣅𑣆𑣇𑣈𑣉𑣊𑣋𑣌𑣍𑣎𑣏𑣐𑣑𑣒𑣓𑣔𑣕𑣖𑣗𑣘𑣙𑣚𑣛𑣜𑣝𑣞𑣟ıȷ∇∂𞤢𞤣𞤤𞤥𞤦𞤧𞤨𞤩𞤪𞤫𞤬𞤭𞤮𞤯𞤰𞤱𞤲𞤳𞤴𞤵𞤶𞤷𞤸𞤹𞤺𞤻𞤼𞤽𞤾𞤿𞥀𞥁𞥂𞥃ٮڡٯ字双多解交映無前後再新初終販声吹演投捕遊指禁空合満申割営配得可丽丸乁𠄢你侻倂偺備像㒞𠘺兔兤具𠔜㒹內𠕋冗冤仌冬𩇟刃㓟刻剆剷㔕包匆卉博即卽卿𠨬灰及叟𠭣叫叱吆咞吸呈周咢哶唐啓啣善喫喳嗂圖圗噑噴壮城埴堍型堲報墬𡓤売壷夆夢奢𡚨𡛪姬娛娧姘婦㛮嬈嬾𡧈寃寘寳𡬘寿将㞁屠峀岍𡷤嵃𡷦嵮嵫嵼巡巢㠯巽帨帽幩㡢𢆃㡼庰庳庶𪎒𢌱舁弢㣇𣊸𦇚形彫㣣徚忍志忹悁㤺㤜𢛔惇慈慌慺憲憤憯懞戛扝抱拔捐𢬌挽拼捨掃揤𢯱搢揅掩㨮摩摾撝摷㩬敬𣀊旣書晉㬙㬈㫤冒冕最暜肭䏙朡杞杓𣏃㭉柺枅桒𣑭梎栟椔楂榣槪檨𣚣櫛㰘次𣢧歔㱎歲殟殻𣪍𡴋𣫺汎𣲼沿泍汧洖派浩浸涅𣴞洴港湮㴳滇𣻑淹潮𣽞𣾎濆瀹瀛㶖灊災灷炭𠔥煅𤉣熜爨牐𤘈犀犕𤜵𤠔獺王㺬玥㺸瑇瑜璅瓊㼛甤𤰶甾𤲒𢆟瘐𤾡𤾸𥁄㿼䀈𥃳𥃲𥄙𥄳眞真瞋䁆䂖𥐝硎䃣𥘦𥚚𥛅秫䄯穊穏𥥼𥪧䈂𥮫篆築䈧𥲀糒䊠糨糣紀𥾆絣䌁緇縂繅䌴𦈨𦉇䍙𦋙罺𦌾羕翺𦓚𦔣聠𦖨聰𣍟䏕育脃䐋脾媵𦞧𦞵𣎓𣎜舄辞䑫芑芋芝劳花芳芽苦𦬼茝荣莭茣莽菧荓菊菌菜𦰶𦵫𦳕䔫蓱蓳蔖𧏊蕤𦼬䕝䕡𦾱𧃒䕫虐虧虩蚩蚈蜎蛢蜨蝫螆蟡蠁䗹衠𧙧裗裞䘵裺㒻𧢮𧥦䚾䛇誠𧲨貫賁贛起𧼯𠠄跋趼跰𠣞軔𨗒𨗭邔郱鄑𨜮鄛鈸鋗鋘鉼鏹鐕𨯺開䦕閷𨵷䧦雃嶲霣𩅅𩈚䩮䩶韠𩐊䪲𩒖頩𩖶飢䬳餩馧駂駾䯎𩬰鱀鳽䳎䳭鵧𪃎䳸𪄅𪈎𪊑䵖黾鼅鼏鼖𪘀",mapChar:function(r){return r>=196608?r>=917760&&r<=917999?18874368:0:e[t[r>>4]][15&r]}};var e,t}.apply(t,[]))||(e.exports=n)},function(e,t,r){"use strict";e.exports=[{constant:!0,inputs:[{name:"node",type:"bytes32"}],name:"resolver",outputs:[{name:"",type:"address"}],payable:!1,type:"function"},{constant:!0,inputs:[{name:"node",type:"bytes32"}],name:"owner",outputs:[{name:"",type:"address"}],payable:!1,type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"label",type:"bytes32"},{name:"owner",type:"address"}],name:"setSubnodeOwner",outputs:[],payable:!1,type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"ttl",type:"uint64"}],name:"setTTL",outputs:[],payable:!1,type:"function"},{constant:!0,inputs:[{name:"node",type:"bytes32"}],name:"ttl",outputs:[{name:"",type:"uint64"}],payable:!1,type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"resolver",type:"address"}],name:"setResolver",outputs:[],payable:!1,type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"owner",type:"address"}],name:"setOwner",outputs:[],payable:!1,type:"function"},{anonymous:!1,inputs:[{indexed:!0,name:"node",type:"bytes32"},{indexed:!1,name:"owner",type:"address"}],name:"Transfer",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"node",type:"bytes32"},{indexed:!0,name:"label",type:"bytes32"},{indexed:!1,name:"owner",type:"address"}],name:"NewOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"node",type:"bytes32"},{indexed:!1,name:"resolver",type:"address"}],name:"NewResolver",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"node",type:"bytes32"},{indexed:!1,name:"ttl",type:"uint64"}],name:"NewTTL",type:"event"},{constant:!1,inputs:[{internalType:"bytes32",name:"node",type:"bytes32"},{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"resolver",type:"address"},{internalType:"uint64",name:"ttl",type:"uint64"}],name:"setRecord",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"operator",type:"address"},{internalType:"bool",name:"approved",type:"bool"}],name:"setApprovalForAll",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!1,internalType:"bool",name:"approved",type:"bool"}],name:"ApprovalForAll",type:"event"},{constant:!0,inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"operator",type:"address"}],name:"isApprovedForAll",outputs:[{internalType:"bool",name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{internalType:"bytes32",name:"node",type:"bytes32"}],name:"recordExists",outputs:[{internalType:"bool",name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"bytes32",name:"node",type:"bytes32"},{internalType:"bytes32",name:"label",type:"bytes32"},{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"resolver",type:"address"},{internalType:"uint64",name:"ttl",type:"uint64"}],name:"setSubnodeRecord",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"}]},function(e,t,r){"use strict";e.exports=[{constant:!0,inputs:[{name:"interfaceID",type:"bytes4"}],name:"supportsInterface",outputs:[{name:"",type:"bool"}],payable:!1,type:"function"},{constant:!0,inputs:[{name:"node",type:"bytes32"},{name:"contentTypes",type:"uint256"}],name:"ABI",outputs:[{name:"contentType",type:"uint256"},{name:"data",type:"bytes"}],payable:!1,type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"hash",type:"bytes"}],name:"setMultihash",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"node",type:"bytes32"}],name:"multihash",outputs:[{name:"",type:"bytes"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"x",type:"bytes32"},{name:"y",type:"bytes32"}],name:"setPubkey",outputs:[],payable:!1,type:"function"},{constant:!0,inputs:[{name:"node",type:"bytes32"}],name:"content",outputs:[{name:"ret",type:"bytes32"}],payable:!1,type:"function"},{constant:!0,inputs:[{name:"node",type:"bytes32"}],name:"addr",outputs:[{name:"ret",type:"address"}],payable:!1,type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"contentType",type:"uint256"},{name:"data",type:"bytes"}],name:"setABI",outputs:[],payable:!1,type:"function"},{constant:!0,inputs:[{name:"node",type:"bytes32"}],name:"name",outputs:[{name:"ret",type:"string"}],payable:!1,type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"name",type:"string"}],name:"setName",outputs:[],payable:!1,type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"hash",type:"bytes32"}],name:"setContent",outputs:[],payable:!1,type:"function"},{constant:!0,inputs:[{name:"node",type:"bytes32"}],name:"pubkey",outputs:[{name:"x",type:"bytes32"},{name:"y",type:"bytes32"}],payable:!1,type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"addr",type:"address"}],name:"setAddr",outputs:[],payable:!1,type:"function"},{inputs:[{name:"ensAddr",type:"address"}],payable:!1,type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,name:"node",type:"bytes32"},{indexed:!1,name:"a",type:"address"}],name:"AddrChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"node",type:"bytes32"},{indexed:!1,name:"hash",type:"bytes32"}],name:"ContentChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"node",type:"bytes32"},{indexed:!1,name:"name",type:"string"}],name:"NameChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"node",type:"bytes32"},{indexed:!0,name:"contentType",type:"uint256"}],name:"ABIChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"node",type:"bytes32"},{indexed:!1,name:"x",type:"bytes32"},{indexed:!1,name:"y",type:"bytes32"}],name:"PubkeyChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"node",type:"bytes32"},{indexed:!1,name:"hash",type:"bytes"}],name:"ContenthashChanged",type:"event"},{constant:!0,inputs:[{name:"node",type:"bytes32"}],name:"contenthash",outputs:[{name:"",type:"bytes"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"hash",type:"bytes"}],name:"setContenthash",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"}]},function(e,t,r){"use strict";var n=r(0),i=n(r(49)),o=n(r(104)),a=r(78),s=r(191),f=r(11).errors,u=r(178).interfaceIds;function c(e){this.registry=e}c.prototype.method=function(e,t,r,n,i){return{call:this.call.bind({ensName:e,methodName:t,methodArguments:r,callback:i,parent:this,outputFormatter:n}),send:this.send.bind({ensName:e,methodName:t,methodArguments:r,callback:i,parent:this})}},c.prototype.call=function(e){var t=this,r=new a,n=this.parent.prepareArguments(this.ensName,this.methodArguments),s=this.outputFormatter||null;return this.parent.registry.getResolver(this.ensName).then(function(){var a=(0,o.default)(i.default.mark((function o(a){return i.default.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,t.parent.checkInterfaceSupport(a,t.methodName);case 2:t.parent.handleCall(r,a.methods[t.methodName],n,s,e);case 3:case"end":return i.stop()}}),o)})));return function(e){return a.apply(this,arguments)}}()).catch((function(t){"function"!=typeof e?r.reject(t):e(t,null)})),r.eventEmitter},c.prototype.send=function(e,t){var r=this,n=new a,s=this.parent.prepareArguments(this.ensName,this.methodArguments);return this.parent.registry.getResolver(this.ensName).then(function(){var a=(0,o.default)(i.default.mark((function o(a){return i.default.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,r.parent.checkInterfaceSupport(a,r.methodName);case 2:r.parent.handleSend(n,a.methods[r.methodName],s,e,t);case 3:case"end":return i.stop()}}),o)})));return function(e){return a.apply(this,arguments)}}()).catch((function(e){"function"!=typeof t?n.reject(e):t(e,null)})),n.eventEmitter},c.prototype.handleCall=function(e,t,r,n,i){return t.apply(this,r).call().then((function(t){n&&(t=n(t)),"function"!=typeof i?e.resolve(t):i(t,t)})).catch((function(t){"function"!=typeof i?e.reject(t):i(t,null)})),e},c.prototype.handleSend=function(e,t,r,n,i){return t.apply(this,r).send(n).on("sending",(function(){e.eventEmitter.emit("sending")})).on("sent",(function(){e.eventEmitter.emit("sent")})).on("transactionHash",(function(t){e.eventEmitter.emit("transactionHash",t)})).on("confirmation",(function(t,r){e.eventEmitter.emit("confirmation",t,r)})).on("receipt",(function(t){e.eventEmitter.emit("receipt",t),e.resolve(t),"function"==typeof i&&i(t,t)})).on("error",(function(t){e.eventEmitter.emit("error",t),"function"!=typeof i?e.reject(t):i(t,null)})),e},c.prototype.prepareArguments=function(e,t){var r=s.hash(e);return t.length>0?(t.unshift(r),t):[r]},c.prototype.checkInterfaceSupport=function(){var e=(0,o.default)(i.default.mark((function e(t,r){var n;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(u[r]){e.next=2;break}return e.abrupt("return");case 2:return n=!1,e.prev=3,e.next=6,t.methods.supportsInterface(u[r]).call();case 6:n=e.sent,e.next=12;break;case 9:e.prev=9,e.t0=e.catch(3),console.warn('Could not verify interface of resolver contract at "'+t.options.address+'". ');case 12:if(n){e.next=14;break}throw f.ResolverMethodMissingError(t.options.address,r);case 14:case"end":return e.stop()}}),e,null,[[3,9]])})));return function(t,r){return e.apply(this,arguments)}}(),e.exports=c},function(e,t,r){"use strict";var n=r(419);e.exports={decode:function(e){var t=null,r=null,i=null;if(e&&e.error)return{protocolType:null,decoded:e.error};if(e)try{t=n.decode(e);var o=n.getCodec(e);"ipfs-ns"===o?r="ipfs":"swarm-ns"===o?r="bzz":"onion"===o?r="onion":"onion3"===o?r="onion3":t=e}catch(e){i=e.message}return{protocolType:r,decoded:t,error:i}},encode:function(e){var t,r,i=!1;if(e){var o=e.match(/^(ipfs|bzz|onion|onion3):\/\/(.*)/)||e.match(/\/(ipfs)\/(.*)/);o&&(r=o[1],t=o[2]);try{if("ipfs"===r)t.length>=4&&(i="0x"+n.fromIpfs(t));else if("bzz"===r)t.length>=4&&(i="0x"+n.fromSwarm(t));else if("onion"===r)16===t.length&&(i="0x"+n.encode("onion",t));else{if("onion3"!==r)throw new Error("Could not encode content hash: unsupported content type");56===t.length&&(i="0x"+n.encode("onion3",t))}}catch(e){throw e}}return i}}},function(e,t,r){"use strict";var n=r(420),i=r(428),o=i.hexStringToBuffer,a=i.profiles,s=r(451).cidV0ToV1Base32;e.exports={helpers:{cidV0ToV1Base32:s},decode:function(e){var t=o(e),r=n.getCodec(t),i=n.rmPrefix(t),s=a[r];return s||(s=a.default),s.decode(i)},fromIpfs:function(e){return this.encode("ipfs-ns",e)},fromSwarm:function(e){return this.encode("swarm-ns",e)},encode:function(e,t){var r=a[e];r||(r=a.default);var i=r.encode(t);return n.addPrefix(e,i).toString("hex")},getCodec:function(e){var t=o(e);return n.getCodec(t)}}},function(e,t,r){"use strict";(function(n){var i=r(66),o=r(424),a=r(425),s=r(192);(t=e.exports).addPrefix=function(e,t){var r;if(n.isBuffer(e))r=s.varintBufferEncode(e);else{if(!a[e])throw new Error("multicodec not recognized");r=a[e]}return n.concat([r,t])},t.rmPrefix=function(e){return i.decode(e),e.slice(i.decode.bytes)},t.getCodec=function(e){var t=i.decode(e),r=o.get(t);if(void 0===r)throw new Error("Code ".concat(t," not found"));return r},t.getName=function(e){return o.get(e)},t.getNumber=function(e){var t=a[e];if(void 0===t)throw new Error("Codec `"+e+"` not found");return s.varintBufferDecode(t)[0]},t.getCode=function(e){return i.decode(e)},t.getCodeVarint=function(e){var t=a[e];if(void 0===t)throw new Error("Codec `"+e+"` not found");return t},t.getVarint=function(e){return i.encode(e)};var f=r(426);Object.assign(t,f),t.print=r(427)}).call(this,r(1).Buffer)},function(e,t,r){"use strict";e.exports=function e(t,r,i){r=r||[];var o=i=i||0;for(;t>=n;)r[i++]=255&t|128,t/=128;for(;-128&t;)r[i++]=255&t|128,t>>>=7;return r[i]=0|t,e.bytes=i-o+1,r};var n=Math.pow(2,31)},function(e,t,r){"use strict";e.exports=function e(t,r){var n,i=0,o=0,a=r=r||0,s=t.length;do{if(a>=s)throw e.bytes=0,new RangeError("Could not decode varint");n=t[a++],i+=o<28?(127&n)<=128);return e.bytes=a-r,i}},function(e,t,r){"use strict";var n=Math.pow(2,7),i=Math.pow(2,14),o=Math.pow(2,21),a=Math.pow(2,28),s=Math.pow(2,35),f=Math.pow(2,42),u=Math.pow(2,49),c=Math.pow(2,56),d=Math.pow(2,63);e.exports=function(e){return e=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,f=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return s=e.done,e},e:function(e){f=!0,a=e},f:function(){try{s||null==r.return||r.return()}finally{if(f)throw a}}}}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,f=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return s=e.done,e},e:function(e){f=!0,a=e},f:function(){try{s||null==r.return||r.return()}finally{if(f)throw a}}}}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=5;)s+=t[a>>>o-5&31],o-=5;if(o>0&&(s+=t[a<<5-o&31]),i)for(;s.length%8!=0;)s+="=";return s}e.exports=function(e){return{encode:function(t){return o("string"==typeof t?Uint8Array.from(t):t,e)},decode:function(t){var r,i=n(t);try{for(i.s();!(r=i.n()).done;){var o=r.value;if(e.indexOf(o)<0)throw new Error("invalid base32 character")}}catch(e){i.e(e)}finally{i.f()}return function(e,t){for(var r=(e=e.replace(new RegExp("=","g"),"")).length,n=0,i=0,o=0,a=new Uint8Array(5*r/8|0),s=0;s=8&&(a[o++]=i>>>n-8&255,n-=8);return a.buffer}(t,e)}}}},function(e,t,r){"use strict";function n(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return i(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return i(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,f=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return s=e.done,e},e:function(e){f=!0,a=e},f:function(){try{s||null==r.return||r.return()}finally{if(f)throw a}}}}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r-1,r=e.indexOf("-")>-1&&e.indexOf("_")>-1;return{encode:function(e){var n="";n="string"==typeof e?o.from(e).toString("base64"):e.toString("base64"),r&&(n=n.replace(/\+/g,"-").replace(/\//g,"_"));var i=n.indexOf("=");return i>0&&!t&&(n=n.substring(0,i)),n},decode:function(t){var r,i=n(t);try{for(i.s();!(r=i.n()).done;){var a=r.value;if(e.indexOf(a)<0)throw new Error("invalid base64 character")}}catch(e){i.e(e)}finally{i.f()}return o.from(t,"base64")}}}},function(e,t,r){"use strict";t.names=Object.freeze({identity:0,sha1:17,"sha2-256":18,"sha2-512":19,"dbl-sha2-256":86,"sha3-224":23,"sha3-256":22,"sha3-384":21,"sha3-512":20,"shake-128":24,"shake-256":25,"keccak-224":26,"keccak-256":27,"keccak-384":28,"keccak-512":29,"murmur3-128":34,"murmur3-32":35,md4:212,md5:213,"blake2b-8":45569,"blake2b-16":45570,"blake2b-24":45571,"blake2b-32":45572,"blake2b-40":45573,"blake2b-48":45574,"blake2b-56":45575,"blake2b-64":45576,"blake2b-72":45577,"blake2b-80":45578,"blake2b-88":45579,"blake2b-96":45580,"blake2b-104":45581,"blake2b-112":45582,"blake2b-120":45583,"blake2b-128":45584,"blake2b-136":45585,"blake2b-144":45586,"blake2b-152":45587,"blake2b-160":45588,"blake2b-168":45589,"blake2b-176":45590,"blake2b-184":45591,"blake2b-192":45592,"blake2b-200":45593,"blake2b-208":45594,"blake2b-216":45595,"blake2b-224":45596,"blake2b-232":45597,"blake2b-240":45598,"blake2b-248":45599,"blake2b-256":45600,"blake2b-264":45601,"blake2b-272":45602,"blake2b-280":45603,"blake2b-288":45604,"blake2b-296":45605,"blake2b-304":45606,"blake2b-312":45607,"blake2b-320":45608,"blake2b-328":45609,"blake2b-336":45610,"blake2b-344":45611,"blake2b-352":45612,"blake2b-360":45613,"blake2b-368":45614,"blake2b-376":45615,"blake2b-384":45616,"blake2b-392":45617,"blake2b-400":45618,"blake2b-408":45619,"blake2b-416":45620,"blake2b-424":45621,"blake2b-432":45622,"blake2b-440":45623,"blake2b-448":45624,"blake2b-456":45625,"blake2b-464":45626,"blake2b-472":45627,"blake2b-480":45628,"blake2b-488":45629,"blake2b-496":45630,"blake2b-504":45631,"blake2b-512":45632,"blake2s-8":45633,"blake2s-16":45634,"blake2s-24":45635,"blake2s-32":45636,"blake2s-40":45637,"blake2s-48":45638,"blake2s-56":45639,"blake2s-64":45640,"blake2s-72":45641,"blake2s-80":45642,"blake2s-88":45643,"blake2s-96":45644,"blake2s-104":45645,"blake2s-112":45646,"blake2s-120":45647,"blake2s-128":45648,"blake2s-136":45649,"blake2s-144":45650,"blake2s-152":45651,"blake2s-160":45652,"blake2s-168":45653,"blake2s-176":45654,"blake2s-184":45655,"blake2s-192":45656,"blake2s-200":45657,"blake2s-208":45658,"blake2s-216":45659,"blake2s-224":45660,"blake2s-232":45661,"blake2s-240":45662,"blake2s-248":45663,"blake2s-256":45664,"Skein256-8":45825,"Skein256-16":45826,"Skein256-24":45827,"Skein256-32":45828,"Skein256-40":45829,"Skein256-48":45830,"Skein256-56":45831,"Skein256-64":45832,"Skein256-72":45833,"Skein256-80":45834,"Skein256-88":45835,"Skein256-96":45836,"Skein256-104":45837,"Skein256-112":45838,"Skein256-120":45839,"Skein256-128":45840,"Skein256-136":45841,"Skein256-144":45842,"Skein256-152":45843,"Skein256-160":45844,"Skein256-168":45845,"Skein256-176":45846,"Skein256-184":45847,"Skein256-192":45848,"Skein256-200":45849,"Skein256-208":45850,"Skein256-216":45851,"Skein256-224":45852,"Skein256-232":45853,"Skein256-240":45854,"Skein256-248":45855,"Skein256-256":45856,"Skein512-8":45857,"Skein512-16":45858,"Skein512-24":45859,"Skein512-32":45860,"Skein512-40":45861,"Skein512-48":45862,"Skein512-56":45863,"Skein512-64":45864,"Skein512-72":45865,"Skein512-80":45866,"Skein512-88":45867,"Skein512-96":45868,"Skein512-104":45869,"Skein512-112":45870,"Skein512-120":45871,"Skein512-128":45872,"Skein512-136":45873,"Skein512-144":45874,"Skein512-152":45875,"Skein512-160":45876,"Skein512-168":45877,"Skein512-176":45878,"Skein512-184":45879,"Skein512-192":45880,"Skein512-200":45881,"Skein512-208":45882,"Skein512-216":45883,"Skein512-224":45884,"Skein512-232":45885,"Skein512-240":45886,"Skein512-248":45887,"Skein512-256":45888,"Skein512-264":45889,"Skein512-272":45890,"Skein512-280":45891,"Skein512-288":45892,"Skein512-296":45893,"Skein512-304":45894,"Skein512-312":45895,"Skein512-320":45896,"Skein512-328":45897,"Skein512-336":45898,"Skein512-344":45899,"Skein512-352":45900,"Skein512-360":45901,"Skein512-368":45902,"Skein512-376":45903,"Skein512-384":45904,"Skein512-392":45905,"Skein512-400":45906,"Skein512-408":45907,"Skein512-416":45908,"Skein512-424":45909,"Skein512-432":45910,"Skein512-440":45911,"Skein512-448":45912,"Skein512-456":45913,"Skein512-464":45914,"Skein512-472":45915,"Skein512-480":45916,"Skein512-488":45917,"Skein512-496":45918,"Skein512-504":45919,"Skein512-512":45920,"Skein1024-8":45921,"Skein1024-16":45922,"Skein1024-24":45923,"Skein1024-32":45924,"Skein1024-40":45925,"Skein1024-48":45926,"Skein1024-56":45927,"Skein1024-64":45928,"Skein1024-72":45929,"Skein1024-80":45930,"Skein1024-88":45931,"Skein1024-96":45932,"Skein1024-104":45933,"Skein1024-112":45934,"Skein1024-120":45935,"Skein1024-128":45936,"Skein1024-136":45937,"Skein1024-144":45938,"Skein1024-152":45939,"Skein1024-160":45940,"Skein1024-168":45941,"Skein1024-176":45942,"Skein1024-184":45943,"Skein1024-192":45944,"Skein1024-200":45945,"Skein1024-208":45946,"Skein1024-216":45947,"Skein1024-224":45948,"Skein1024-232":45949,"Skein1024-240":45950,"Skein1024-248":45951,"Skein1024-256":45952,"Skein1024-264":45953,"Skein1024-272":45954,"Skein1024-280":45955,"Skein1024-288":45956,"Skein1024-296":45957,"Skein1024-304":45958,"Skein1024-312":45959,"Skein1024-320":45960,"Skein1024-328":45961,"Skein1024-336":45962,"Skein1024-344":45963,"Skein1024-352":45964,"Skein1024-360":45965,"Skein1024-368":45966,"Skein1024-376":45967,"Skein1024-384":45968,"Skein1024-392":45969,"Skein1024-400":45970,"Skein1024-408":45971,"Skein1024-416":45972,"Skein1024-424":45973,"Skein1024-432":45974,"Skein1024-440":45975,"Skein1024-448":45976,"Skein1024-456":45977,"Skein1024-464":45978,"Skein1024-472":45979,"Skein1024-480":45980,"Skein1024-488":45981,"Skein1024-496":45982,"Skein1024-504":45983,"Skein1024-512":45984,"Skein1024-520":45985,"Skein1024-528":45986,"Skein1024-536":45987,"Skein1024-544":45988,"Skein1024-552":45989,"Skein1024-560":45990,"Skein1024-568":45991,"Skein1024-576":45992,"Skein1024-584":45993,"Skein1024-592":45994,"Skein1024-600":45995,"Skein1024-608":45996,"Skein1024-616":45997,"Skein1024-624":45998,"Skein1024-632":45999,"Skein1024-640":46e3,"Skein1024-648":46001,"Skein1024-656":46002,"Skein1024-664":46003,"Skein1024-672":46004,"Skein1024-680":46005,"Skein1024-688":46006,"Skein1024-696":46007,"Skein1024-704":46008,"Skein1024-712":46009,"Skein1024-720":46010,"Skein1024-728":46011,"Skein1024-736":46012,"Skein1024-744":46013,"Skein1024-752":46014,"Skein1024-760":46015,"Skein1024-768":46016,"Skein1024-776":46017,"Skein1024-784":46018,"Skein1024-792":46019,"Skein1024-800":46020,"Skein1024-808":46021,"Skein1024-816":46022,"Skein1024-824":46023,"Skein1024-832":46024,"Skein1024-840":46025,"Skein1024-848":46026,"Skein1024-856":46027,"Skein1024-864":46028,"Skein1024-872":46029,"Skein1024-880":46030,"Skein1024-888":46031,"Skein1024-896":46032,"Skein1024-904":46033,"Skein1024-912":46034,"Skein1024-920":46035,"Skein1024-928":46036,"Skein1024-936":46037,"Skein1024-944":46038,"Skein1024-952":46039,"Skein1024-960":46040,"Skein1024-968":46041,"Skein1024-976":46042,"Skein1024-984":46043,"Skein1024-992":46044,"Skein1024-1000":46045,"Skein1024-1008":46046,"Skein1024-1016":46047,"Skein1024-1024":46048}),t.codes=Object.freeze({0:"identity",17:"sha1",18:"sha2-256",19:"sha2-512",86:"dbl-sha2-256",23:"sha3-224",22:"sha3-256",21:"sha3-384",20:"sha3-512",24:"shake-128",25:"shake-256",26:"keccak-224",27:"keccak-256",28:"keccak-384",29:"keccak-512",34:"murmur3-128",35:"murmur3-32",212:"md4",213:"md5",45569:"blake2b-8",45570:"blake2b-16",45571:"blake2b-24",45572:"blake2b-32",45573:"blake2b-40",45574:"blake2b-48",45575:"blake2b-56",45576:"blake2b-64",45577:"blake2b-72",45578:"blake2b-80",45579:"blake2b-88",45580:"blake2b-96",45581:"blake2b-104",45582:"blake2b-112",45583:"blake2b-120",45584:"blake2b-128",45585:"blake2b-136",45586:"blake2b-144",45587:"blake2b-152",45588:"blake2b-160",45589:"blake2b-168",45590:"blake2b-176",45591:"blake2b-184",45592:"blake2b-192",45593:"blake2b-200",45594:"blake2b-208",45595:"blake2b-216",45596:"blake2b-224",45597:"blake2b-232",45598:"blake2b-240",45599:"blake2b-248",45600:"blake2b-256",45601:"blake2b-264",45602:"blake2b-272",45603:"blake2b-280",45604:"blake2b-288",45605:"blake2b-296",45606:"blake2b-304",45607:"blake2b-312",45608:"blake2b-320",45609:"blake2b-328",45610:"blake2b-336",45611:"blake2b-344",45612:"blake2b-352",45613:"blake2b-360",45614:"blake2b-368",45615:"blake2b-376",45616:"blake2b-384",45617:"blake2b-392",45618:"blake2b-400",45619:"blake2b-408",45620:"blake2b-416",45621:"blake2b-424",45622:"blake2b-432",45623:"blake2b-440",45624:"blake2b-448",45625:"blake2b-456",45626:"blake2b-464",45627:"blake2b-472",45628:"blake2b-480",45629:"blake2b-488",45630:"blake2b-496",45631:"blake2b-504",45632:"blake2b-512",45633:"blake2s-8",45634:"blake2s-16",45635:"blake2s-24",45636:"blake2s-32",45637:"blake2s-40",45638:"blake2s-48",45639:"blake2s-56",45640:"blake2s-64",45641:"blake2s-72",45642:"blake2s-80",45643:"blake2s-88",45644:"blake2s-96",45645:"blake2s-104",45646:"blake2s-112",45647:"blake2s-120",45648:"blake2s-128",45649:"blake2s-136",45650:"blake2s-144",45651:"blake2s-152",45652:"blake2s-160",45653:"blake2s-168",45654:"blake2s-176",45655:"blake2s-184",45656:"blake2s-192",45657:"blake2s-200",45658:"blake2s-208",45659:"blake2s-216",45660:"blake2s-224",45661:"blake2s-232",45662:"blake2s-240",45663:"blake2s-248",45664:"blake2s-256",45825:"Skein256-8",45826:"Skein256-16",45827:"Skein256-24",45828:"Skein256-32",45829:"Skein256-40",45830:"Skein256-48",45831:"Skein256-56",45832:"Skein256-64",45833:"Skein256-72",45834:"Skein256-80",45835:"Skein256-88",45836:"Skein256-96",45837:"Skein256-104",45838:"Skein256-112",45839:"Skein256-120",45840:"Skein256-128",45841:"Skein256-136",45842:"Skein256-144",45843:"Skein256-152",45844:"Skein256-160",45845:"Skein256-168",45846:"Skein256-176",45847:"Skein256-184",45848:"Skein256-192",45849:"Skein256-200",45850:"Skein256-208",45851:"Skein256-216",45852:"Skein256-224",45853:"Skein256-232",45854:"Skein256-240",45855:"Skein256-248",45856:"Skein256-256",45857:"Skein512-8",45858:"Skein512-16",45859:"Skein512-24",45860:"Skein512-32",45861:"Skein512-40",45862:"Skein512-48",45863:"Skein512-56",45864:"Skein512-64",45865:"Skein512-72",45866:"Skein512-80",45867:"Skein512-88",45868:"Skein512-96",45869:"Skein512-104",45870:"Skein512-112",45871:"Skein512-120",45872:"Skein512-128",45873:"Skein512-136",45874:"Skein512-144",45875:"Skein512-152",45876:"Skein512-160",45877:"Skein512-168",45878:"Skein512-176",45879:"Skein512-184",45880:"Skein512-192",45881:"Skein512-200",45882:"Skein512-208",45883:"Skein512-216",45884:"Skein512-224",45885:"Skein512-232",45886:"Skein512-240",45887:"Skein512-248",45888:"Skein512-256",45889:"Skein512-264",45890:"Skein512-272",45891:"Skein512-280",45892:"Skein512-288",45893:"Skein512-296",45894:"Skein512-304",45895:"Skein512-312",45896:"Skein512-320",45897:"Skein512-328",45898:"Skein512-336",45899:"Skein512-344",45900:"Skein512-352",45901:"Skein512-360",45902:"Skein512-368",45903:"Skein512-376",45904:"Skein512-384",45905:"Skein512-392",45906:"Skein512-400",45907:"Skein512-408",45908:"Skein512-416",45909:"Skein512-424",45910:"Skein512-432",45911:"Skein512-440",45912:"Skein512-448",45913:"Skein512-456",45914:"Skein512-464",45915:"Skein512-472",45916:"Skein512-480",45917:"Skein512-488",45918:"Skein512-496",45919:"Skein512-504",45920:"Skein512-512",45921:"Skein1024-8",45922:"Skein1024-16",45923:"Skein1024-24",45924:"Skein1024-32",45925:"Skein1024-40",45926:"Skein1024-48",45927:"Skein1024-56",45928:"Skein1024-64",45929:"Skein1024-72",45930:"Skein1024-80",45931:"Skein1024-88",45932:"Skein1024-96",45933:"Skein1024-104",45934:"Skein1024-112",45935:"Skein1024-120",45936:"Skein1024-128",45937:"Skein1024-136",45938:"Skein1024-144",45939:"Skein1024-152",45940:"Skein1024-160",45941:"Skein1024-168",45942:"Skein1024-176",45943:"Skein1024-184",45944:"Skein1024-192",45945:"Skein1024-200",45946:"Skein1024-208",45947:"Skein1024-216",45948:"Skein1024-224",45949:"Skein1024-232",45950:"Skein1024-240",45951:"Skein1024-248",45952:"Skein1024-256",45953:"Skein1024-264",45954:"Skein1024-272",45955:"Skein1024-280",45956:"Skein1024-288",45957:"Skein1024-296",45958:"Skein1024-304",45959:"Skein1024-312",45960:"Skein1024-320",45961:"Skein1024-328",45962:"Skein1024-336",45963:"Skein1024-344",45964:"Skein1024-352",45965:"Skein1024-360",45966:"Skein1024-368",45967:"Skein1024-376",45968:"Skein1024-384",45969:"Skein1024-392",45970:"Skein1024-400",45971:"Skein1024-408",45972:"Skein1024-416",45973:"Skein1024-424",45974:"Skein1024-432",45975:"Skein1024-440",45976:"Skein1024-448",45977:"Skein1024-456",45978:"Skein1024-464",45979:"Skein1024-472",45980:"Skein1024-480",45981:"Skein1024-488",45982:"Skein1024-496",45983:"Skein1024-504",45984:"Skein1024-512",45985:"Skein1024-520",45986:"Skein1024-528",45987:"Skein1024-536",45988:"Skein1024-544",45989:"Skein1024-552",45990:"Skein1024-560",45991:"Skein1024-568",45992:"Skein1024-576",45993:"Skein1024-584",45994:"Skein1024-592",45995:"Skein1024-600",45996:"Skein1024-608",45997:"Skein1024-616",45998:"Skein1024-624",45999:"Skein1024-632",46e3:"Skein1024-640",46001:"Skein1024-648",46002:"Skein1024-656",46003:"Skein1024-664",46004:"Skein1024-672",46005:"Skein1024-680",46006:"Skein1024-688",46007:"Skein1024-696",46008:"Skein1024-704",46009:"Skein1024-712",46010:"Skein1024-720",46011:"Skein1024-728",46012:"Skein1024-736",46013:"Skein1024-744",46014:"Skein1024-752",46015:"Skein1024-760",46016:"Skein1024-768",46017:"Skein1024-776",46018:"Skein1024-784",46019:"Skein1024-792",46020:"Skein1024-800",46021:"Skein1024-808",46022:"Skein1024-816",46023:"Skein1024-824",46024:"Skein1024-832",46025:"Skein1024-840",46026:"Skein1024-848",46027:"Skein1024-856",46028:"Skein1024-864",46029:"Skein1024-872",46030:"Skein1024-880",46031:"Skein1024-888",46032:"Skein1024-896",46033:"Skein1024-904",46034:"Skein1024-912",46035:"Skein1024-920",46036:"Skein1024-928",46037:"Skein1024-936",46038:"Skein1024-944",46039:"Skein1024-952",46040:"Skein1024-960",46041:"Skein1024-968",46042:"Skein1024-976",46043:"Skein1024-984",46044:"Skein1024-992",46045:"Skein1024-1000",46046:"Skein1024-1008",46047:"Skein1024-1016",46048:"Skein1024-1024"}),t.defaultLengths=Object.freeze({17:20,18:32,19:64,86:32,23:28,22:32,21:48,20:64,24:32,25:64,26:28,27:32,28:48,29:64,34:32,45569:1,45570:2,45571:3,45572:4,45573:5,45574:6,45575:7,45576:8,45577:9,45578:10,45579:11,45580:12,45581:13,45582:14,45583:15,45584:16,45585:17,45586:18,45587:19,45588:20,45589:21,45590:22,45591:23,45592:24,45593:25,45594:26,45595:27,45596:28,45597:29,45598:30,45599:31,45600:32,45601:33,45602:34,45603:35,45604:36,45605:37,45606:38,45607:39,45608:40,45609:41,45610:42,45611:43,45612:44,45613:45,45614:46,45615:47,45616:48,45617:49,45618:50,45619:51,45620:52,45621:53,45622:54,45623:55,45624:56,45625:57,45626:58,45627:59,45628:60,45629:61,45630:62,45631:63,45632:64,45633:1,45634:2,45635:3,45636:4,45637:5,45638:6,45639:7,45640:8,45641:9,45642:10,45643:11,45644:12,45645:13,45646:14,45647:15,45648:16,45649:17,45650:18,45651:19,45652:20,45653:21,45654:22,45655:23,45656:24,45657:25,45658:26,45659:27,45660:28,45661:29,45662:30,45663:31,45664:32,45825:1,45826:2,45827:3,45828:4,45829:5,45830:6,45831:7,45832:8,45833:9,45834:10,45835:11,45836:12,45837:13,45838:14,45839:15,45840:16,45841:17,45842:18,45843:19,45844:20,45845:21,45846:22,45847:23,45848:24,45849:25,45850:26,45851:27,45852:28,45853:29,45854:30,45855:31,45856:32,45857:1,45858:2,45859:3,45860:4,45861:5,45862:6,45863:7,45864:8,45865:9,45866:10,45867:11,45868:12,45869:13,45870:14,45871:15,45872:16,45873:17,45874:18,45875:19,45876:20,45877:21,45878:22,45879:23,45880:24,45881:25,45882:26,45883:27,45884:28,45885:29,45886:30,45887:31,45888:32,45889:33,45890:34,45891:35,45892:36,45893:37,45894:38,45895:39,45896:40,45897:41,45898:42,45899:43,45900:44,45901:45,45902:46,45903:47,45904:48,45905:49,45906:50,45907:51,45908:52,45909:53,45910:54,45911:55,45912:56,45913:57,45914:58,45915:59,45916:60,45917:61,45918:62,45919:63,45920:64,45921:1,45922:2,45923:3,45924:4,45925:5,45926:6,45927:7,45928:8,45929:9,45930:10,45931:11,45932:12,45933:13,45934:14,45935:15,45936:16,45937:17,45938:18,45939:19,45940:20,45941:21,45942:22,45943:23,45944:24,45945:25,45946:26,45947:27,45948:28,45949:29,45950:30,45951:31,45952:32,45953:33,45954:34,45955:35,45956:36,45957:37,45958:38,45959:39,45960:40,45961:41,45962:42,45963:43,45964:44,45965:45,45966:46,45967:47,45968:48,45969:49,45970:50,45971:51,45972:52,45973:53,45974:54,45975:55,45976:56,45977:57,45978:58,45979:59,45980:60,45981:61,45982:62,45983:63,45984:64,45985:65,45986:66,45987:67,45988:68,45989:69,45990:70,45991:71,45992:72,45993:73,45994:74,45995:75,45996:76,45997:77,45998:78,45999:79,46e3:80,46001:81,46002:82,46003:83,46004:84,46005:85,46006:86,46007:87,46008:88,46009:89,46010:90,46011:91,46012:92,46013:93,46014:94,46015:95,46016:96,46017:97,46018:98,46019:99,46020:100,46021:101,46022:102,46023:103,46024:104,46025:105,46026:106,46027:107,46028:108,46029:109,46030:110,46031:111,46032:112,46033:113,46034:114,46035:115,46036:116,46037:117,46038:118,46039:119,46040:120,46041:121,46042:122,46043:123,46044:124,46045:125,46046:126,46047:127,46048:128})},function(e,t,r){"use strict";var n=r(1).Buffer,i=r(437);(t=e.exports=a).encode=function(e,t){var r=s(e);return a(r.name,n.from(r.encode(t)))},t.decode=function(e){n.isBuffer(e)&&(e=e.toString());var t=e.substring(0,1);"string"==typeof(e=e.substring(1,e.length))&&(e=n.from(e));var r=s(t);return n.from(r.decode(e.toString()))},t.isEncoded=function(e){n.isBuffer(e)&&(e=e.toString());if("[object String]"!==Object.prototype.toString.call(e))return!1;var t=e.substring(0,1);try{return s(t).name}catch(e){return!1}},t.names=Object.freeze(Object.keys(i.names)),t.codes=Object.freeze(Object.keys(i.codes));var o=new Error("Unsupported encoding");function a(e,t){if(!t)throw new Error("requires an encoded buffer");var r=s(e),i=n.from(r.code);return function(e,t){s(e).decode(t.toString())}(r.name,t),n.concat([i,t])}function s(e){var t;if(i.names[e])t=i.names[e];else{if(!i.codes[e])throw o;t=i.codes[e]}if(!t.isImplemented())throw new Error("Base "+e+" is not implemented yet");return t}},function(e,t,r){"use strict";var n=r(438),i=r(194),o=r(439),a=r(440),s=r(441),f=[["base1","1","","1"],["base2","0",i,"01"],["base8","7",i,"01234567"],["base10","9",i,"0123456789"],["base16","f",o,"0123456789abcdef"],["base32","b",a,"abcdefghijklmnopqrstuvwxyz234567"],["base32pad","c",a,"abcdefghijklmnopqrstuvwxyz234567="],["base32hex","v",a,"0123456789abcdefghijklmnopqrstuv"],["base32hexpad","t",a,"0123456789abcdefghijklmnopqrstuv="],["base32z","h",a,"ybndrfg8ejkmcpqxot1uwisza345h769"],["base58flickr","Z",i,"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"],["base58btc","z",i,"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"],["base64","m",s,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"],["base64pad","M",s,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="],["base64url","u",s,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"],["base64urlpad","U",s,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_="]],u=f.reduce((function(e,t){return e[t[0]]=new n(t[0],t[1],t[2],t[3]),e}),{}),c=f.reduce((function(e,t){return e[t[1]]=u[t[0]],e}),{});e.exports={names:u,codes:c}},function(e,t,r){"use strict";var n=r(0),i=n(r(8)),o=n(r(9)),a=function(){function e(t,r,n,o){(0,i.default)(this,e),this.name=t,this.code=r,this.alphabet=o,n&&o&&(this.engine=n(o))}return(0,o.default)(e,[{key:"encode",value:function(e){return this.engine.encode(e)}},{key:"decode",value:function(e){return this.engine.decode(e)}},{key:"isImplemented",value:function(){return this.engine}}]),e}();e.exports=a},function(e,t,r){"use strict";function n(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return i(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return i(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,f=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return s=e.done,e},e:function(e){f=!0,a=e},f:function(){try{s||null==r.return||r.return()}finally{if(f)throw a}}}}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,f=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return s=e.done,e},e:function(e){f=!0,a=e},f:function(){try{s||null==r.return||r.return()}finally{if(f)throw a}}}}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=5;)s+=t[a>>>o-5&31],o-=5;if(o>0&&(s+=t[a<<5-o&31]),i)for(;s.length%8!=0;)s+="=";return s}e.exports=function(e){return{encode:function(t){return o("string"==typeof t?Uint8Array.from(t):t,e)},decode:function(t){var r,i=n(t);try{for(i.s();!(r=i.n()).done;){var o=r.value;if(e.indexOf(o)<0)throw new Error("invalid base32 character")}}catch(e){i.e(e)}finally{i.f()}return function(e,t){for(var r=(e=e.replace(new RegExp("=","g"),"")).length,n=0,i=0,o=0,a=new Uint8Array(5*r/8|0),s=0;s=8&&(a[o++]=i>>>n-8&255,n-=8);return a.buffer}(t,e)}}}},function(e,t,r){"use strict";function n(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return i(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return i(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,f=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return s=e.done,e},e:function(e){f=!0,a=e},f:function(){try{s||null==r.return||r.return()}finally{if(f)throw a}}}}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r-1,r=e.indexOf("-")>-1&&e.indexOf("_")>-1;return{encode:function(e){var n="";n="string"==typeof e?o.from(e).toString("base64"):e.toString("base64"),r&&(n=n.replace(/\+/g,"-").replace(/\//g,"_"));var i=n.indexOf("=");return i>0&&!t&&(n=n.substring(0,i)),n},decode:function(t){var r,i=n(t);try{for(i.s();!(r=i.n()).done;){var a=r.value;if(e.indexOf(a)<0)throw new Error("invalid base64 character")}}catch(e){i.e(e)}finally{i.f()}return o.from(t,"base64")}}}},function(e,t,r){"use strict";var n=r(1).Buffer,i=r(66),o=r(443),a=r(444),s=r(195);(t=e.exports).addPrefix=function(e,t){var r;if(n.isBuffer(e))r=s.varintBufferEncode(e);else{if(!a[e])throw new Error("multicodec not recognized");r=a[e]}return n.concat([r,t])},t.rmPrefix=function(e){return i.decode(e),e.slice(i.decode.bytes)},t.getCodec=function(e){var t=i.decode(e),r=o.get(t);if(void 0===r)throw new Error("Code ".concat(t," not found"));return r},t.getName=function(e){return o.get(e)},t.getNumber=function(e){var t=a[e];if(void 0===t)throw new Error("Codec `"+e+"` not found");return s.varintBufferDecode(t)[0]},t.getCode=function(e){return i.decode(e)},t.getCodeVarint=function(e){var t=a[e];if(void 0===t)throw new Error("Codec `"+e+"` not found");return t},t.getVarint=function(e){return i.encode(e)};var f=r(445);Object.assign(t,f),t.print=r(446)},function(e,t,r){"use strict";var n=r(67),i=new Map;for(var o in n){var a=n[o];i.set(a,o)}e.exports=Object.freeze(i)},function(e,t,r){"use strict";var n=r(67),i=r(195).varintEncode,o={};for(var a in n){var s=n[a];o[a]=i(s)}e.exports=Object.freeze(o)},function(e,t,r){"use strict";for(var n=r(0)(r(29)),i=r(67),o={},a=0,s=Object.entries(i);a=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0){var c,l="Signer Error: ",h=d(u);try{for(h.s();!(c=h.n()).done;){var p=c.value;l+="".concat(l," ").concat(p,".")}}catch(e){h.e(e)}finally{h.f()}throw new Error(l)}var b="0x"+f.serialize().toString("hex"),y=g.keccak256(b),v={messageHash:"0x"+n.from(f.getMessageToSign(!0)).toString("hex"),v:"0x"+f.v.toString("hex"),r:"0x"+f.r.toString("hex"),s:"0x"+f.s.toString("hex"),rawTransaction:b,transactionHash:y};return r(null,v),v}catch(e){return r(e),Promise.reject(e)}}return e.type=function(e){var t,r=void 0!==e.maxFeePerGas||void 0!==e.maxPriorityFeePerGas;void 0!==e.type?t=g.toHex(e.type):void 0===e.type&&r&&(t="0x2");if(void 0!==e.gasPrice&&("0x2"===t||r))throw Error("eip-1559 transactions don't support gasPrice");if(("0x1"===t||"0x0"===t)&&r)throw Error("pre-eip-1559 transaction don't support maxFeePerGas/maxPriorityFeePerGas");r||e.common&&e.common.hardfork&&e.common.hardfork.toLowerCase()===S.London||e.hardfork&&e.hardfork.toLowerCase()===S.London?t="0x2":(e.accessList||e.common&&e.common.hardfork&&e.common.hardfork.toLowerCase()===S.Berlin||e.hardfork&&e.hardfork.toLowerCase()===S.Berlin)&&(t="0x1");return t}(e),void 0!==e.nonce&&void 0!==e.chainId&&(void 0!==e.gasPrice||void 0!==e.maxFeePerGas&&void 0!==e.maxPriorityFeePerGas)&&a?Promise.resolve(s(e)):Promise.all([E(e.common)||E(e.common.customChain.chainId)?E(e.chainId)?this._ethereumCall.getChainId():e.chainId:void 0,E(e.nonce)?this._ethereumCall.getTransactionCount(this.privateKeyToAccount(t).address):e.nonce,E(a)?this._ethereumCall.getNetworkId():1,O(this,e)]).then((function(t){var r=(0,f.default)(t,4),n=r[0],i=r[1],o=r[2],a=r[3];if(E(n)&&E(e.common)&&E(e.common.customChain.chainId)||E(i)||E(o)||E(a))throw new Error('One of the values "chainId", "networkId", "gasPrice", or "nonce" couldn\'t be fetched: '+JSON.stringify(t));return s(c(c(c({},e),E(e.common)||E(e.common.customChain.chainId)?{chainId:n}:{}),{},{nonce:i,networkId:o},a))}))},P.prototype.recoverTransaction=function(e){var t=n.from(e.slice(2),"hex"),r=_.fromSerializedData(t);return g.toChecksumAddress(r.getSenderAddress().toString("hex"))},P.prototype.hashMessage=function(e){var t=g.isHexStrict(e)?e:g.utf8ToHex(e),r=g.hexToBytes(t),i=n.from(r),o="Ethereum Signed Message:\n"+r.length,a=n.from(o),s=n.concat([a,i]);return A.bufferToHex(A.keccak256(s))},P.prototype.sign=function(e,t){if(t.startsWith("0x")||(t="0x"+t),66!==t.length)throw new Error("Private key must be 32 bytes long");var r=this.hashMessage(e),n=b.sign(r,t),i=b.decodeSignature(n);return{message:e,messageHash:r,v:i[0],r:i[1],s:i[2],signature:n}},P.prototype.recover=function(e,t,r){var n=[].slice.apply(arguments);return e&&"object"===(0,a.default)(e)?this.recover(e.messageHash,b.encodeSignature([e.v,e.r,e.s]),!0):(r||(e=this.hashMessage(e)),n.length>=4?(r="boolean"==typeof(r=n.slice(-1)[0])&&!!r,this.recover(e,b.encodeSignature(n.slice(1,4)),r)):b.recover(e,t))},P.prototype.decrypt=function(e,t,r){if("string"!=typeof t)throw new Error("No password given.");var i,s,f=e&&"object"===(0,a.default)(e)?e:JSON.parse(r?e.toLowerCase():e);if(3!==f.version)throw new Error("Not a valid V3 wallet");if("scrypt"===f.crypto.kdf)s=f.crypto.kdfparams,i=v.syncScrypt(n.from(t),n.from(s.salt,"hex"),s.n,s.r,s.p,s.dklen);else{if("pbkdf2"!==f.crypto.kdf)throw new Error("Unsupported key derivation scheme");if("hmac-sha256"!==(s=f.crypto.kdfparams).prf)throw new Error("Unsupported parameters to PBKDF2");i=y.pbkdf2Sync(n.from(t),n.from(s.salt,"hex"),s.c,s.dklen,"sha256")}var u=n.from(f.crypto.ciphertext,"hex");if(g.sha3(n.from([].concat((0,o.default)(i.slice(16,32)),(0,o.default)(u)))).replace("0x","")!==f.crypto.mac)throw new Error("Key derivation failed - possibly wrong password");var c=y.createDecipheriv(f.crypto.cipher,i.slice(0,16),n.from(f.crypto.cipherparams.iv,"hex")),d="0x"+n.from([].concat((0,o.default)(c.update(u)),(0,o.default)(c.final()))).toString("hex");return this.privateKeyToAccount(d,!0)},P.prototype.encrypt=function(e,t,r){var i,a=this.privateKeyToAccount(e,!0),s=(r=r||{}).salt||y.randomBytes(32),f=r.iv||y.randomBytes(16),u=r.kdf||"scrypt",c={dklen:r.dklen||32,salt:s.toString("hex")};if("pbkdf2"===u)c.c=r.c||262144,c.prf="hmac-sha256",i=y.pbkdf2Sync(n.from(t),n.from(c.salt,"hex"),c.c,c.dklen,"sha256");else{if("scrypt"!==u)throw new Error("Unsupported kdf");c.n=r.n||8192,c.r=r.r||8,c.p=r.p||1,i=v.syncScrypt(n.from(t),n.from(c.salt,"hex"),c.n,c.r,c.p,c.dklen)}var d=y.createCipheriv(r.cipher||"aes-128-ctr",i.slice(0,16),f);if(!d)throw new Error("Unsupported cipher");var l=n.from([].concat((0,o.default)(d.update(n.from(a.privateKey.replace("0x",""),"hex"))),(0,o.default)(d.final()))),h=g.sha3(n.from([].concat((0,o.default)(i.slice(16,32)),(0,o.default)(l)))).replace("0x","");return{version:3,id:m.v4({random:r.uuid||y.randomBytes(16)}),address:a.address.toLowerCase().replace("0x",""),crypto:{ciphertext:l.toString("hex"),cipherparams:{iv:f.toString("hex")},cipher:r.cipher||"aes-128-ctr",kdf:u,kdfparams:c,mac:h.toString("hex")}}},R.prototype._findSafeIndex=function(e){return e=e||0,this.hasOwnProperty(e)?this._findSafeIndex(e+1):e},R.prototype._currentIndexes=function(){return Object.keys(this).map((function(e){return parseInt(e)})).filter((function(e){return e<9e20}))},R.prototype.create=function(e,t){for(var r=0;r7?e[n+2].toUpperCase():e[n+2];return r},l=function(e){var r=new t(e.slice(2),"hex"),n="0x"+s.keyFromPrivate(r).getPublic(!1,"hex").slice(2),i=u(n);return{address:d("0x"+i.slice(-40)),privateKey:e}},h=function(e){var t=(0,n.default)(e,3),r=t[0],o=t[1],a=t[2];return i.flatten([o,a,r])},p=function(e){return[i.slice(64,i.length(e),e),i.slice(0,32,e),i.slice(32,64,e)]},b=function(e){return function(r,n){var a=s.keyFromPrivate(new t(n.slice(2),"hex")).sign(new t(r.slice(2),"hex"),{canonical:!0});return h([o.fromString(i.fromNumber(e+a.recoveryParam)),i.pad(32,i.fromNat("0x"+a.r.toString(16))),i.pad(32,i.fromNat("0x"+a.s.toString(16)))])}},y=b(27);e.exports={create:function(e){var t=u(i.concat(i.random(32),e||i.random(32))),r=i.concat(i.concat(i.random(32),t),i.random(32)),n=u(r);return l(n)},toChecksum:d,fromPrivate:l,sign:y,makeSigner:b,recover:function(e,r){var n=p(r),o={v:i.toNumber(n[0]),r:n[1].slice(2),s:n[2].slice(2)},a="0x"+s.recoverPubKey(new t(e.slice(2),"hex"),o,o.v<2?o.v:1-o.v%2).encode("hex",!1).slice(2),f=u(a);return d("0x"+f.slice(-40))},encodeSignature:h,decodeSignature:p}}).call(this,r(1).Buffer)},function(e,t,r){"use strict";var n=function(e,t){for(var r=[],n=0;n64?t=e(t):t.length<64&&(t=i.concat([t,a],64));for(var r=this._ipad=i.allocUnsafe(64),n=this._opad=i.allocUnsafe(64),s=0;s<64;s++)r[s]=54^t[s],n[s]=92^t[s];this._hash=[r]}n(s,o),s.prototype._update=function(e){this._hash.push(e)},s.prototype._final=function(){var e=this._alg(i.concat(this._hash));return this._alg(i.concat([this._opad,e]))},e.exports=s},function(e,t,r){"use strict";e.exports=r(200)},function(e,t,r){"use strict";(function(t){var n,i,o=r(5).Buffer,a=r(202),s=r(203),f=r(204),u=r(205),c=t.crypto&&t.crypto.subtle,d={sha:"SHA-1","sha-1":"SHA-1",sha1:"SHA-1",sha256:"SHA-256","sha-256":"SHA-256",sha384:"SHA-384","sha-384":"SHA-384","sha-512":"SHA-512",sha512:"SHA-512"},l=[];function h(){return i||(i=t.process&&t.process.nextTick?t.process.nextTick:t.queueMicrotask?t.queueMicrotask:t.setImmediate?t.setImmediate:t.setTimeout)}function p(e,t,r,n,i){return c.importKey("raw",e,{name:"PBKDF2"},!1,["deriveBits"]).then((function(e){return c.deriveBits({name:"PBKDF2",salt:t,iterations:r,hash:{name:i}},e,n<<3)})).then((function(e){return o.from(e)}))}e.exports=function(e,r,i,b,y,v){"function"==typeof y&&(v=y,y=void 0);var m=d[(y=y||"sha1").toLowerCase()];if(m&&"function"==typeof t.Promise){if(a(i,b),e=u(e,s,"Password"),r=u(r,s,"Salt"),"function"!=typeof v)throw new Error("No callback provided to pbkdf2");!function(e,t){e.then((function(e){h()((function(){t(null,e)}))}),(function(e){h()((function(){t(e)}))}))}(function(e){if(t.process&&!t.process.browser)return Promise.resolve(!1);if(!c||!c.importKey||!c.deriveBits)return Promise.resolve(!1);if(void 0!==l[e])return l[e];var r=p(n=n||o.alloc(8),n,10,128,e).then((function(){return!0})).catch((function(){return!1}));return l[e]=r,r}(m).then((function(t){return t?p(e,r,i,b,m):f(e,r,i,b,y)})),v)}else h()((function(){var t;try{t=f(e,r,i,b,y)}catch(e){return v(e)}v(null,t)}))}}).call(this,r(7))},function(e,t,r){"use strict";var n=r(463),i=r(111),o=r(112),a=r(476),s=r(85);function f(e,t,r){if(e=e.toLowerCase(),o[e])return i.createCipheriv(e,t,r);if(a[e])return new n({key:t,iv:r,mode:e});throw new TypeError("invalid suite type")}function u(e,t,r){if(e=e.toLowerCase(),o[e])return i.createDecipheriv(e,t,r);if(a[e])return new n({key:t,iv:r,mode:e,decrypt:!0});throw new TypeError("invalid suite type")}t.createCipher=t.Cipher=function(e,t){var r,n;if(e=e.toLowerCase(),o[e])r=o[e].key,n=o[e].iv;else{if(!a[e])throw new TypeError("invalid suite type");r=8*a[e].key,n=a[e].iv}var i=s(t,!1,r,n);return f(e,i.key,i.iv)},t.createCipheriv=t.Cipheriv=f,t.createDecipher=t.Decipher=function(e,t){var r,n;if(e=e.toLowerCase(),o[e])r=o[e].key,n=o[e].iv;else{if(!a[e])throw new TypeError("invalid suite type");r=8*a[e].key,n=a[e].iv}var i=s(t,!1,r,n);return u(e,i.key,i.iv)},t.createDecipheriv=t.Decipheriv=u,t.listCiphers=t.getCiphers=function(){return Object.keys(a).concat(i.getCiphers())}},function(e,t,r){"use strict";var n=r(31),i=r(464),o=r(4),a=r(5).Buffer,s={"des-ede3-cbc":i.CBC.instantiate(i.EDE),"des-ede3":i.EDE,"des-ede-cbc":i.CBC.instantiate(i.EDE),"des-ede":i.EDE,"des-cbc":i.CBC.instantiate(i.DES),"des-ecb":i.DES};function f(e){n.call(this);var t,r=e.mode.toLowerCase(),i=s[r];t=e.decrypt?"decrypt":"encrypt";var o=e.key;a.isBuffer(o)||(o=a.from(o)),"des-ede"!==r&&"des-ede-cbc"!==r||(o=a.concat([o,o.slice(0,8)]));var f=e.iv;a.isBuffer(f)||(f=a.from(f)),this._des=i.create({key:o,iv:f,type:t})}s.des=s["des-cbc"],s.des3=s["des-ede3-cbc"],e.exports=f,o(f,n),f.prototype._update=function(e){return a.from(this._des.update(e))},f.prototype._final=function(){return a.from(this._des.final())}},function(e,t,r){"use strict";t.utils=r(206),t.Cipher=r(110),t.DES=r(207),t.CBC=r(465),t.EDE=r(466)},function(e,t,r){"use strict";var n=r(19),i=r(4),o={};function a(e){n.equal(e.length,8,"Invalid IV length"),this.iv=new Array(8);for(var t=0;t15){var e=this.cache.slice(0,16);return this.cache=this.cache.slice(16),e}return null},l.prototype.flush=function(){for(var e=16-this.cache.length,t=o.allocUnsafe(e),r=-1;++r>a%8,e._prev=o(e._prev,r?n:i);return s}function o(e,t){var r=e.length,i=-1,o=n.allocUnsafe(e.length);for(e=n.concat([e,n.from([t])]);++i>7;return o}t.encrypt=function(e,t,r){for(var o=t.length,a=n.allocUnsafe(o),s=-1;++s>>0,0),t.writeUInt32BE(e[1]>>>0,4),t.writeUInt32BE(e[2]>>>0,8),t.writeUInt32BE(e[3]>>>0,12),t}function a(e){this.h=e,this.state=n.alloc(16,0),this.cache=n.allocUnsafe(0)}a.prototype.ghash=function(e){for(var t=-1;++t0;t--)n[t]=n[t]>>>1|(1&n[t-1])<<31;n[0]=n[0]>>>1,r&&(n[0]=n[0]^225<<24)}this.state=o(i)},a.prototype.update=function(e){var t;for(this.cache=n.concat([this.cache,e]);this.cache.length>=16;)t=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(t)},a.prototype.final=function(e,t){return this.cache.length&&this.ghash(n.concat([this.cache,i],16)),this.ghash(o([0,e,0,t])),this.state},e.exports=a},function(e,t,r){"use strict";var n=r(211),i=r(5).Buffer,o=r(112),a=r(212),s=r(31),f=r(84),u=r(85);function c(e,t,r){s.call(this),this._cache=new d,this._last=void 0,this._cipher=new f.AES(t),this._prev=i.from(r),this._mode=e,this._autopadding=!0}function d(){this.cache=i.allocUnsafe(0)}function l(e,t,r){var s=o[e.toLowerCase()];if(!s)throw new TypeError("invalid suite type");if("string"==typeof r&&(r=i.from(r)),"GCM"!==s.mode&&r.length!==s.iv)throw new TypeError("invalid iv length "+r.length);if("string"==typeof t&&(t=i.from(t)),t.length!==s.key/8)throw new TypeError("invalid key length "+t.length);return"stream"===s.type?new a(s.module,t,r,!0):"auth"===s.type?new n(s.module,t,r,!0):new c(s.module,t,r)}r(4)(c,s),c.prototype._update=function(e){var t,r;this._cache.add(e);for(var n=[];t=this._cache.get(this._autopadding);)r=this._mode.decrypt(this,t),n.push(r);return i.concat(n)},c.prototype._final=function(){var e=this._cache.flush();if(this._autopadding)return function(e){var t=e[15];if(t<1||t>16)throw new Error("unable to decrypt data");var r=-1;for(;++r16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t}else if(this.cache.length>=16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t;return null},d.prototype.flush=function(){if(this.cache.length)return this.cache},t.createDecipher=function(e,t){var r=o[e.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var n=u(t,!1,r.key,r.iv);return l(e,n.key,n.iv)},t.createDecipheriv=l},function(e,t,r){"use strict";t["des-ecb"]={key:8,iv:0},t["des-cbc"]=t.des={key:8,iv:8},t["des-ede3-cbc"]=t.des3={key:24,iv:8},t["des-ede3"]={key:24,iv:0},t["des-ede-cbc"]={key:16,iv:8},t["des-ede"]={key:16,iv:0}},function(e,t,r){"use strict";(function(e){var n=r(213),i=r(478),o=r(479);var a={binary:!0,hex:!0,base64:!0};t.DiffieHellmanGroup=t.createDiffieHellmanGroup=t.getDiffieHellman=function(t){var r=new e(i[t].prime,"hex"),n=new e(i[t].gen,"hex");return new o(r,n)},t.createDiffieHellman=t.DiffieHellman=function t(r,i,s,f){return e.isBuffer(i)||void 0===a[i]?t(r,"binary",i,s):(i=i||"binary",f=f||"binary",s=s||new e([2]),e.isBuffer(s)||(s=new e(s,f)),"number"==typeof r?new o(n(r,s),s,!0):(e.isBuffer(r)||(r=new e(r,i)),new o(r,s,!0)))}}).call(this,r(1).Buffer)},function(e){e.exports=JSON.parse('{"modp1":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},"modp2":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},"modp5":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"},"modp14":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},"modp15":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},"modp16":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},"modp17":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},"modp18":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"}}')},function(e,t,r){"use strict";(function(t){var n=r(3),i=new(r(214)),o=new n(24),a=new n(11),s=new n(10),f=new n(3),u=new n(7),c=r(213),d=r(30);function l(e,r){return r=r||"utf8",t.isBuffer(e)||(e=new t(e,r)),this._pub=new n(e),this}function h(e,r){return r=r||"utf8",t.isBuffer(e)||(e=new t(e,r)),this._priv=new n(e),this}e.exports=b;var p={};function b(e,t,r){this.setGenerator(t),this.__prime=new n(e),this._prime=n.mont(this.__prime),this._primeLen=e.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,r?(this.setPublicKey=l,this.setPrivateKey=h):this._primeCode=8}function y(e,r){var n=new t(e.toArray());return r?n.toString(r):n}Object.defineProperty(b.prototype,"verifyError",{enumerable:!0,get:function(){return"number"!=typeof this._primeCode&&(this._primeCode=function(e,t){var r=t.toString("hex"),n=[r,e.toString(16)].join("_");if(n in p)return p[n];var d,l=0;if(e.isEven()||!c.simpleSieve||!c.fermatTest(e)||!i.test(e))return l+=1,l+="02"===r||"05"===r?8:4,p[n]=l,l;switch(i.test(e.shrn(1))||(l+=2),r){case"02":e.mod(o).cmp(a)&&(l+=8);break;case"05":(d=e.mod(s)).cmp(f)&&d.cmp(u)&&(l+=8);break;default:l+=4}return p[n]=l,l}(this.__prime,this.__gen)),this._primeCode}}),b.prototype.generateKeys=function(){return this._priv||(this._priv=new n(d(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},b.prototype.computeSecret=function(e){var r=(e=(e=new n(e)).toRed(this._prime)).redPow(this._priv).fromRed(),i=new t(r.toArray()),o=this.getPrime();if(i.length0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r}},{key:"concat",value:function(e){if(0===this.length)return a.alloc(0);for(var t,r,n,i=a.allocUnsafe(e>>>0),o=this.head,s=0;o;)t=o.data,r=i,n=s,a.prototype.copy.call(t,r,n),s+=o.data.length,o=o.next;return i}},{key:"consume",value:function(e,t){var r;return ei.length?i.length:e;if(o===i.length?n+=i:n+=i.slice(0,e),0==(e-=o)){o===i.length?(++r,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=i.slice(o));break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(e){var t=a.allocUnsafe(e),r=this.head,n=1;for(r.data.copy(t),e-=r.data.length;r=r.next;){var i=r.data,o=e>i.length?i.length:e;if(i.copy(t,t.length-e,0,o),0==(e-=o)){o===i.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=i.slice(o));break}++n}return this.length-=n,t}},{key:f,value:function(e,t){return s(this,function(e){for(var t=1;t0,(function(e){n||(n=e),e&&a.forEach(u),o||(a.forEach(u),i(n))}))}));return t.reduce(c)}},function(e,t,r){"use strict";var n=r(5).Buffer,i=r(198),o=r(114),a=r(59).ec,s=r(3),f=r(86),u=r(226);function c(e,t,r,o){if((e=n.from(e.toArray())).length0&&r.ishrn(n),r}function l(e,t,r){var o,a;do{for(o=n.alloc(0);8*o.length=t)throw new Error("invalid sig")}e.exports=function(e,t,r,u,c){var d=a(r);if("ec"===d.type){if("ecdsa"!==u&&"ecdsa/rsa"!==u)throw new Error("wrong public key type");return function(e,t,r){var n=s[r.data.algorithm.curve.join(".")];if(!n)throw new Error("unknown curve "+r.data.algorithm.curve.join("."));var i=new o(n),a=r.data.subjectPrivateKey.data;return i.verify(t,e,a)}(e,t,d)}if("dsa"===d.type){if("dsa"!==u)throw new Error("wrong public key type");return function(e,t,r){var n=r.data.p,o=r.data.q,s=r.data.g,u=r.data.pub_key,c=a.signature.decode(e,"der"),d=c.s,l=c.r;f(d,o),f(l,o);var h=i.mont(n),p=d.invm(o);return 0===s.toRed(h).redPow(new i(t).mul(p).mod(o)).fromRed().mul(u.toRed(h).redPow(l.mul(p).mod(o)).fromRed()).mod(n).mod(o).cmp(l)}(e,t,d)}if("rsa"!==u&&"ecdsa/rsa"!==u)throw new Error("wrong public key type");t=n.concat([c,t]);for(var l=d.modulus.byteLength(),h=[1],p=0;t.length+h.length+2r-l-2)throw new Error("message too long");var h=d.alloc(r-n-l-2),p=r-c-1,b=i(c),y=s(d.concat([u,h,d.alloc(1,1),t],p),a(b,p)),v=s(b,a(y,c));return new f(d.concat([d.alloc(1),v,y],r))}(p,t);else if(1===l)h=function(e,t,r){var n,o=t.length,a=e.modulus.byteLength();if(o>a-11)throw new Error("message too long");n=r?d.alloc(a-o-3,255):function(e){var t,r=d.allocUnsafe(e),n=0,o=i(2*e),a=0;for(;n=0)throw new Error("data too long for modulus")}return r?c(h,p):u(h,p)}},function(e,t,r){"use strict";var n=r(86),i=r(227),o=r(228),a=r(3),s=r(114),f=r(45),u=r(229),c=r(5).Buffer;e.exports=function(e,t,r){var d;d=e.padding?e.padding:r?1:4;var l,h=n(e),p=h.modulus.byteLength();if(t.length>p||new a(t).cmp(h.modulus)>=0)throw new Error("decryption error");l=r?u(new a(t),h):s(t,h);var b=c.alloc(p-l.length);if(l=c.concat([b,l],p),4===d)return function(e,t){var r=e.modulus.byteLength(),n=f("sha1").update(c.alloc(0)).digest(),a=n.length;if(0!==t[0])throw new Error("decryption error");var s=t.slice(1,a+1),u=t.slice(a+1),d=o(s,i(u,a)),l=o(u,i(d,r-a-1));if(function(e,t){e=c.from(e),t=c.from(t);var r=0,n=e.length;e.length!==t.length&&(r++,n=Math.min(e.length,t.length));var i=-1;for(;++i=t.length){o++;break}var a=t.slice(2,i-1);("0002"!==n.toString("hex")&&!r||"0001"!==n.toString("hex")&&r)&&o++;a.length<8&&o++;if(o)throw new Error("decryption error");return t.slice(i)}(0,l,r);if(3===d)return l;throw new Error("unknown padding")}},function(e,t,r){"use strict";(function(e,n){function i(){throw new Error("secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11")}var o=r(5),a=r(30),s=o.Buffer,f=o.kMaxLength,u=e.crypto||e.msCrypto,c=Math.pow(2,32)-1;function d(e,t){if("number"!=typeof e||e!=e)throw new TypeError("offset must be a number");if(e>c||e<0)throw new TypeError("offset must be a uint32");if(e>f||e>t)throw new RangeError("offset out of range")}function l(e,t,r){if("number"!=typeof e||e!=e)throw new TypeError("size must be a number");if(e>c||e<0)throw new TypeError("size must be a uint32");if(e+t>r||e>f)throw new RangeError("buffer too small")}function h(e,t,r,i){if(n.browser){var o=e.buffer,s=new Uint8Array(o,t,r);return u.getRandomValues(s),i?void n.nextTick((function(){i(null,e)})):e}if(!i)return a(r).copy(e,t),e;a(r,(function(r,n){if(r)return i(r);n.copy(e,t),i(null,e)}))}u&&u.getRandomValues||!n.browser?(t.randomFill=function(t,r,n,i){if(!(s.isBuffer(t)||t instanceof e.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if("function"==typeof r)i=r,r=0,n=t.length;else if("function"==typeof n)i=n,n=t.length-r;else if("function"!=typeof i)throw new TypeError('"cb" argument must be a function');return d(r,t.length),l(n,r,t.length),h(t,r,n,i)},t.randomFillSync=function(t,r,n){void 0===r&&(r=0);if(!(s.isBuffer(t)||t instanceof e.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');d(r,t.length),void 0===n&&(n=t.length-r);return l(n,r,t.length),h(t,r,n)}):(t.randomFill=i,t.randomFillSync=i)}).call(this,r(7),r(6))},function(e,t,r){"use strict";var n=r(3),i=r(197),o=function(e){return new n(e.slice(2),16)},a=function(e){var t="0x"+("0x"===e.slice(0,2)?new n(e.slice(2),16):new n(e,10)).toString("hex");return"0x0"===t?"0x":t},s=function(e){return"string"==typeof e?/^0x/.test(e)?e:"0x"+e:"0x"+new n(e).toString("hex")},f=function(e){return o(e).toNumber()},u=function(e){return function(t,r){return"0x"+o(t)[e](o(r)).toString("hex")}},c=u("add"),d=u("mul"),l=u("div"),h=u("sub");e.exports={toString:function(e){return o(e).toString(10)},fromString:a,toNumber:f,fromNumber:s,toEther:function(e){return f(l(e,a("10000000000")))/1e8},fromEther:function(e){return d(s(Math.floor(1e8*e)),a("10000000000"))},toUint256:function(e){return i.pad(32,e)},add:c,mul:d,div:l,sub:h}},function(e,t,r){"use strict";e.exports={encode:function(e){var t=function(e){return(t=e.toString(16)).length%2==0?t:"0"+t;var t},r=function(e,r){return e<56?t(r+e):t(r+t(e).length/2+55)+t(e)};return"0x"+function e(t){if("string"==typeof t){var n=t.slice(2);return(2!=n.length||n>="80"?r(n.length/2,128):"")+n}var i=t.map(e).join("");return r(i.length/2,192)+i}(e)},decode:function(e){var t=2,r=function(){if(t>=e.length)throw"";var r=e.slice(t,t+2);return r<"80"?(t+=2,"0x"+r):r<"c0"?i():o()},n=function(){var r=parseInt(e.slice(t,t+=2),16)%64;return r<56?r:parseInt(e.slice(t,t+=2*(r-55)),16)},i=function(){var r=n();return"0x"+e.slice(t,t+=2*r)},o=function(){for(var e=2*n()+t,i=[];t>>31),r=(p=e[9]^e[19]^e[29]^e[39]^e[49])^(f<<1|s>>>31),e[0]^=t,e[1]^=r,e[10]^=t,e[11]^=r,e[20]^=t,e[21]^=r,e[30]^=t,e[31]^=r,e[40]^=t,e[41]^=r,t=i^(u<<1|c>>>31),r=o^(c<<1|u>>>31),e[2]^=t,e[3]^=r,e[12]^=t,e[13]^=r,e[22]^=t,e[23]^=r,e[32]^=t,e[33]^=r,e[42]^=t,e[43]^=r,t=s^(d<<1|l>>>31),r=f^(l<<1|d>>>31),e[4]^=t,e[5]^=r,e[14]^=t,e[15]^=r,e[24]^=t,e[25]^=r,e[34]^=t,e[35]^=r,e[44]^=t,e[45]^=r,t=u^(h<<1|p>>>31),r=c^(p<<1|h>>>31),e[6]^=t,e[7]^=r,e[16]^=t,e[17]^=r,e[26]^=t,e[27]^=r,e[36]^=t,e[37]^=r,e[46]^=t,e[47]^=r,t=d^(i<<1|o>>>31),r=l^(o<<1|i>>>31),e[8]^=t,e[9]^=r,e[18]^=t,e[19]^=r,e[28]^=t,e[29]^=r,e[38]^=t,e[39]^=r,e[48]^=t,e[49]^=r,b=e[0],y=e[1],W=e[11]<<4|e[10]>>>28,J=e[10]<<4|e[11]>>>28,R=e[20]<<3|e[21]>>>29,T=e[21]<<3|e[20]>>>29,se=e[31]<<9|e[30]>>>23,fe=e[30]<<9|e[31]>>>23,H=e[40]<<18|e[41]>>>14,K=e[41]<<18|e[40]>>>14,j=e[2]<<1|e[3]>>>31,U=e[3]<<1|e[2]>>>31,v=e[13]<<12|e[12]>>>20,m=e[12]<<12|e[13]>>>20,X=e[22]<<10|e[23]>>>22,Z=e[23]<<10|e[22]>>>22,M=e[33]<<13|e[32]>>>19,I=e[32]<<13|e[33]>>>19,ue=e[42]<<2|e[43]>>>30,ce=e[43]<<2|e[42]>>>30,te=e[5]<<30|e[4]>>>2,re=e[4]<<30|e[5]>>>2,N=e[14]<<6|e[15]>>>26,L=e[15]<<6|e[14]>>>26,g=e[25]<<11|e[24]>>>21,w=e[24]<<11|e[25]>>>21,Y=e[34]<<15|e[35]>>>17,$=e[35]<<15|e[34]>>>17,B=e[45]<<29|e[44]>>>3,C=e[44]<<29|e[45]>>>3,E=e[6]<<28|e[7]>>>4,x=e[7]<<28|e[6]>>>4,ne=e[17]<<23|e[16]>>>9,ie=e[16]<<23|e[17]>>>9,F=e[26]<<25|e[27]>>>7,D=e[27]<<25|e[26]>>>7,_=e[36]<<21|e[37]>>>11,k=e[37]<<21|e[36]>>>11,Q=e[47]<<24|e[46]>>>8,ee=e[46]<<24|e[47]>>>8,G=e[8]<<27|e[9]>>>5,V=e[9]<<27|e[8]>>>5,P=e[18]<<20|e[19]>>>12,O=e[19]<<20|e[18]>>>12,oe=e[29]<<7|e[28]>>>25,ae=e[28]<<7|e[29]>>>25,q=e[38]<<8|e[39]>>>24,z=e[39]<<8|e[38]>>>24,S=e[48]<<14|e[49]>>>18,A=e[49]<<14|e[48]>>>18,e[0]=b^~v&g,e[1]=y^~m&w,e[10]=E^~P&R,e[11]=x^~O&T,e[20]=j^~N&F,e[21]=U^~L&D,e[30]=G^~W&X,e[31]=V^~J&Z,e[40]=te^~ne&oe,e[41]=re^~ie&ae,e[2]=v^~g&_,e[3]=m^~w&k,e[12]=P^~R&M,e[13]=O^~T&I,e[22]=N^~F&q,e[23]=L^~D&z,e[32]=W^~X&Y,e[33]=J^~Z&$,e[42]=ne^~oe&se,e[43]=ie^~ae&fe,e[4]=g^~_&S,e[5]=w^~k&A,e[14]=R^~M&B,e[15]=T^~I&C,e[24]=F^~q&H,e[25]=D^~z&K,e[34]=X^~Y&Q,e[35]=Z^~$&ee,e[44]=oe^~se&ue,e[45]=ae^~fe&ce,e[6]=_^~S&b,e[7]=k^~A&y,e[16]=M^~B&E,e[17]=I^~C&x,e[26]=q^~H&j,e[27]=z^~K&U,e[36]=Y^~Q&G,e[37]=$^~ee&V,e[46]=se^~ue&te,e[47]=fe^~ce&re,e[8]=S^~b&v,e[9]=A^~y&m,e[18]=B^~E&P,e[19]=C^~x&O,e[28]=H^~j&N,e[29]=K^~U&L,e[38]=Q^~G&W,e[39]=ee^~V&J,e[48]=ue^~te&ne,e[49]=ce^~re&ie,e[0]^=a[n],e[1]^=a[n+1]},f=function(e){return function(t){var r;if("0x"===t.slice(0,2)){r=[];for(var a=2,f=t.length;a>2]|=t[h]<>2]|=r<>2]|=(192|r>>6)<>2]|=(128|63&r)<=57344?(f[y>>2]|=(224|r>>12)<>2]|=(128|r>>6&63)<>2]|=(128|63&r)<>2]|=(240|r>>18)<>2]|=(128|r>>12&63)<>2]|=(128|r>>6&63)<>2]|=(128|63&r)<=u){for(e.start=y-u,e.block=f[c],y=0;y>2]|=i[3&y],e.lastByteIndex===u)for(f[0]=f[c],y=1;y>4&15]+n[15&p]+n[p>>12&15]+n[p>>8&15]+n[p>>20&15]+n[p>>16&15]+n[p>>28&15]+n[p>>24&15];v%c==0&&(s(l),y=0)}return"0x"+b}(function(e){return{blocks:[],reset:!0,block:0,start:0,blockCount:1600-(e<<1)>>5,outputBlocks:e>>5,s:(t=[0,0,0,0,0,0,0,0,0,0],[].concat(t,t,t,t,t))};var t}(e),r)}};e.exports={keccak256:f(256),keccak512:f(512),keccak256s:f(256),keccak512s:f(512)}},function(e,t,r){"use strict";(function(t){!function(r){function n(e){var t=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),r=1779033703,n=3144134277,i=1013904242,o=2773480762,a=1359893119,s=2600822924,f=528734635,u=1541459225,c=new Uint32Array(64);function d(e){for(var d=0,l=e.length;l>=64;){var h=r,p=n,b=i,y=o,v=a,m=s,g=f,w=u,_=void 0,k=void 0,S=void 0,A=void 0,E=void 0;for(k=0;k<16;k++)S=d+4*k,c[k]=(255&e[S])<<24|(255&e[S+1])<<16|(255&e[S+2])<<8|255&e[S+3];for(k=16;k<64;k++)A=((_=c[k-2])>>>17|_<<15)^(_>>>19|_<<13)^_>>>10,E=((_=c[k-15])>>>7|_<<25)^(_>>>18|_<<14)^_>>>3,c[k]=(A+c[k-7]|0)+(E+c[k-16]|0)|0;for(k=0;k<64;k++)A=(((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+(v&m^~v&g)|0)+(w+(t[k]+c[k]|0)|0)|0,E=((h>>>2|h<<30)^(h>>>13|h<<19)^(h>>>22|h<<10))+(h&p^h&b^p&b)|0,w=g,g=m,m=v,v=y+A|0,y=b,b=p,p=h,h=A+E|0;r=r+h|0,n=n+p|0,i=i+b|0,o=o+y|0,a=a+v|0,s=s+m|0,f=f+g|0,u=u+w|0,d+=64,l-=64}}d(e);var l,h=e.length%64,p=e.length/536870912|0,b=e.length<<3,y=h<56?56:120,v=e.slice(e.length-h,e.length);for(v.push(128),l=h+1;l>>24&255),v.push(p>>>16&255),v.push(p>>>8&255),v.push(p>>>0&255),v.push(b>>>24&255),v.push(b>>>16&255),v.push(b>>>8&255),v.push(b>>>0&255),d(v),[r>>>24&255,r>>>16&255,r>>>8&255,r>>>0&255,n>>>24&255,n>>>16&255,n>>>8&255,n>>>0&255,i>>>24&255,i>>>16&255,i>>>8&255,i>>>0&255,o>>>24&255,o>>>16&255,o>>>8&255,o>>>0&255,a>>>24&255,a>>>16&255,a>>>8&255,a>>>0&255,s>>>24&255,s>>>16&255,s>>>8&255,s>>>0&255,f>>>24&255,f>>>16&255,f>>>8&255,f>>>0&255,u>>>24&255,u>>>16&255,u>>>8&255,u>>>0&255]}function i(e,t,r){e=e.length<=64?e:n(e);var i,o=64+t.length+4,a=new Array(o),s=new Array(64),f=[];for(i=0;i<64;i++)a[i]=54;for(i=0;i=o-4;e--){if(a[e]++,a[e]<=255)return;a[e]=0}}for(;r>=32;)u(),f=f.concat(n(s.concat(n(a)))),r-=32;return r>0&&(u(),f=f.concat(n(s.concat(n(a))).slice(0,r))),f}function o(e,t,r,n,i){var o;for(u(e,16*(2*r-1),i,0,16),o=0;o<2*r;o++)f(e,16*o,i,16),s(i,n),u(i,0,e,t+16*o,16);for(o=0;o>>32-t}function s(e,t){u(e,0,t,0,16);for(var r=8;r>0;r-=2)t[4]^=a(t[0]+t[12],7),t[8]^=a(t[4]+t[0],9),t[12]^=a(t[8]+t[4],13),t[0]^=a(t[12]+t[8],18),t[9]^=a(t[5]+t[1],7),t[13]^=a(t[9]+t[5],9),t[1]^=a(t[13]+t[9],13),t[5]^=a(t[1]+t[13],18),t[14]^=a(t[10]+t[6],7),t[2]^=a(t[14]+t[10],9),t[6]^=a(t[2]+t[14],13),t[10]^=a(t[6]+t[2],18),t[3]^=a(t[15]+t[11],7),t[7]^=a(t[3]+t[15],9),t[11]^=a(t[7]+t[3],13),t[15]^=a(t[11]+t[7],18),t[1]^=a(t[0]+t[3],7),t[2]^=a(t[1]+t[0],9),t[3]^=a(t[2]+t[1],13),t[0]^=a(t[3]+t[2],18),t[6]^=a(t[5]+t[4],7),t[7]^=a(t[6]+t[5],9),t[4]^=a(t[7]+t[6],13),t[5]^=a(t[4]+t[7],18),t[11]^=a(t[10]+t[9],7),t[8]^=a(t[11]+t[10],9),t[9]^=a(t[8]+t[11],13),t[10]^=a(t[9]+t[8],18),t[12]^=a(t[15]+t[14],7),t[13]^=a(t[12]+t[15],9),t[14]^=a(t[13]+t[12],13),t[15]^=a(t[14]+t[13],18);for(var n=0;n<16;++n)e[n]+=t[n]}function f(e,t,r,n){for(var i=0;i=256)return!1}return!0}function d(e,t){if("number"!=typeof e||e%1)throw new Error("invalid "+t);return e}function l(e,r,n,a,s,l,h){if(n=d(n,"N"),a=d(a,"r"),s=d(s,"p"),l=d(l,"dkLen"),0===n||0!=(n&n-1))throw new Error("N must be power of 2");if(n>2147483647/128/a)throw new Error("N too large");if(a>2147483647/128/s)throw new Error("r too large");if(!c(e))throw new Error("password must be an array or buffer");if(e=Array.prototype.slice.call(e),!c(r))throw new Error("salt must be an array or buffer");r=Array.prototype.slice.call(r);for(var p=i(e,r,128*s*a),b=new Uint32Array(32*s*a),y=0;yM&&(r=M);for(var c=0;cM&&(r=M);for(var y=0;y>0&255),p.push(b[C]>>8&255),p.push(b[C]>>16&255),p.push(b[C]>>24&255);var j=i(e,p,l);return h&&h(null,1,j),j}h&&I(t)};if(!h)for(;;){var C=B();if(null!=C)return C}B()}var h={scrypt:function(e,t,r,n,i,o,a){return new Promise((function(s,f){var u=0;a&&a(0),l(e,t,r,n,i,o,(function(e,t,r){if(e)f(e);else if(r)a&&1!==u&&a(1),s(new Uint8Array(r));else if(a&&t!==u)return u=t,a(t)}))}))},syncScrypt:function(e,t,r,n,i,o){return new Uint8Array(l(e,t,r,n,i,o))}};e.exports=h}()}).call(this,r(164).setImmediate)},function(e,t,r){"use strict";var n=r(510),i=r(511),o=i;o.v1=n,o.v4=i,e.exports=o},function(e,t,r){"use strict";var n,i,o=r(230),a=r(231),s=0,f=0;e.exports=function(e,t,r){var u=t&&r||0,c=t||[],d=(e=e||{}).node||n,l=void 0!==e.clockseq?e.clockseq:i;if(null==d||null==l){var h=o();null==d&&(d=n=[1|h[0],h[1],h[2],h[3],h[4],h[5]]),null==l&&(l=i=16383&(h[6]<<8|h[7]))}var p=void 0!==e.msecs?e.msecs:(new Date).getTime(),b=void 0!==e.nsecs?e.nsecs:f+1,y=p-s+(b-f)/1e4;if(y<0&&void 0===e.clockseq&&(l=l+1&16383),(y<0||p>s)&&void 0===e.nsecs&&(b=0),b>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");s=p,f=b,i=l;var v=(1e4*(268435455&(p+=122192928e5))+b)%4294967296;c[u++]=v>>>24&255,c[u++]=v>>>16&255,c[u++]=v>>>8&255,c[u++]=255&v;var m=p/4294967296*1e4&268435455;c[u++]=m>>>8&255,c[u++]=255&m,c[u++]=m>>>24&15|16,c[u++]=m>>>16&255,c[u++]=l>>>8|128,c[u++]=255&l;for(var g=0;g<6;++g)c[u+g]=d[g];return t||a(c)}},function(e,t,r){"use strict";var n=r(230),i=r(231);e.exports=function(e,t,r){var o=t&&r||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var a=(e=e||{}).random||(e.rng||n)();if(a[6]=15&a[6]|64,a[8]=63&a[8]|128,t)for(var s=0;s<16;++s)t[o+s]=a[s];return t||i(a)}},function(e,t,r){"use strict";(function(e){var n,i=(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),o=function(){return(o=Object.assign||function(e){for(var t,r=1,n=arguments.length;r0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a};Object.defineProperty(t,"__esModule",{value:!0});var s=r(28),f=r(53),u=r(119),c=function(t){function r(e,r){var n;void 0===r&&(r={});var i=t.call(this,o(o({},e),{type:0}))||this;if(i.common=i._validateTxV(i.v,r.common),i.gasPrice=new s.BN((0,s.toBuffer)(""===e.gasPrice?"0x":e.gasPrice)),i._validateCannotExceedMaxInteger({gasPrice:i.gasPrice}),i.common.gteHardfork("spuriousDragon"))if(i.isSigned()){var a=i.v,u=i.common.chainIdBN().muln(2);(a.eq(u.addn(35))||a.eq(u.addn(36)))&&i.activeCapabilities.push(f.Capability.EIP155ReplayProtection)}else i.activeCapabilities.push(f.Capability.EIP155ReplayProtection);return(null===(n=null==r?void 0:r.freeze)||void 0===n||n)&&Object.freeze(i),i}return i(r,t),r.fromTxData=function(e,t){return void 0===t&&(t={}),new r(e,t)},r.fromSerializedTx=function(e,t){void 0===t&&(t={});var r=s.rlp.decode(e);if(!Array.isArray(r))throw new Error("Invalid serialized tx input. Must be array");return this.fromValuesArray(r,t)},r.fromRlpSerializedTx=function(e,t){return void 0===t&&(t={}),r.fromSerializedTx(e,t)},r.fromValuesArray=function(e,t){if(void 0===t&&(t={}),6!==e.length&&9!==e.length)throw new Error("Invalid transaction. Only expecting 6 values (for unsigned tx) or 9 values (for signed tx).");var n=a(e,9);return new r({nonce:n[0],gasPrice:n[1],gasLimit:n[2],to:n[3],value:n[4],data:n[5],v:n[6],r:n[7],s:n[8]},t)},r.prototype.raw=function(){return[(0,s.bnToUnpaddedBuffer)(this.nonce),(0,s.bnToUnpaddedBuffer)(this.gasPrice),(0,s.bnToUnpaddedBuffer)(this.gasLimit),void 0!==this.to?this.to.buf:e.from([]),(0,s.bnToUnpaddedBuffer)(this.value),this.data,void 0!==this.v?(0,s.bnToUnpaddedBuffer)(this.v):e.from([]),void 0!==this.r?(0,s.bnToUnpaddedBuffer)(this.r):e.from([]),void 0!==this.s?(0,s.bnToUnpaddedBuffer)(this.s):e.from([])]},r.prototype.serialize=function(){return s.rlp.encode(this.raw())},r.prototype._getMessageToSign=function(){var t=[(0,s.bnToUnpaddedBuffer)(this.nonce),(0,s.bnToUnpaddedBuffer)(this.gasPrice),(0,s.bnToUnpaddedBuffer)(this.gasLimit),void 0!==this.to?this.to.buf:e.from([]),(0,s.bnToUnpaddedBuffer)(this.value),this.data];return this.supports(f.Capability.EIP155ReplayProtection)&&(t.push((0,s.toBuffer)(this.common.chainIdBN())),t.push((0,s.unpadBuffer)((0,s.toBuffer)(0))),t.push((0,s.unpadBuffer)((0,s.toBuffer)(0)))),t},r.prototype.getMessageToSign=function(e){void 0===e&&(e=!0);var t=this._getMessageToSign();return e?(0,s.rlphash)(t):t},r.prototype.getUpfrontCost=function(){return this.gasLimit.mul(this.gasPrice).add(this.value)},r.prototype.hash=function(){return Object.isFrozen(this)?(this.cache.hash||(this.cache.hash=(0,s.rlphash)(this.raw())),this.cache.hash):(0,s.rlphash)(this.raw())},r.prototype.getMessageToVerifySignature=function(){if(!this.isSigned())throw Error("This transaction is not signed");var e=this._getMessageToSign();return(0,s.rlphash)(e)},r.prototype.getSenderPublicKey=function(){var e,t=this.getMessageToVerifySignature();if(this.common.gteHardfork("homestead")&&(null===(e=this.s)||void 0===e?void 0:e.gt(f.N_DIV_2)))throw new Error("Invalid Signature: s-values greater than secp256k1n/2 are considered invalid");var r=this.v,n=this.r,i=this.s;try{return(0,s.ecrecover)(t,r,(0,s.bnToUnpaddedBuffer)(n),(0,s.bnToUnpaddedBuffer)(i),this.supports(f.Capability.EIP155ReplayProtection)?this.common.chainIdBN():void 0)}catch(e){throw new Error("Invalid Signature")}},r.prototype._processSignature=function(e,t,n){var i=new s.BN(e);this.supports(f.Capability.EIP155ReplayProtection)&&i.iadd(this.common.chainIdBN().muln(2).addn(8));var o={common:this.common};return r.fromTxData({nonce:this.nonce,gasPrice:this.gasPrice,gasLimit:this.gasLimit,to:this.to,value:this.value,data:this.data,v:i,r:new s.BN(t),s:new s.BN(n)},o)},r.prototype.toJSON=function(){return{nonce:(0,s.bnToHex)(this.nonce),gasPrice:(0,s.bnToHex)(this.gasPrice),gasLimit:(0,s.bnToHex)(this.gasLimit),to:void 0!==this.to?this.to.toString():void 0,value:(0,s.bnToHex)(this.value),data:"0x"+this.data.toString("hex"),v:void 0!==this.v?(0,s.bnToHex)(this.v):void 0,r:void 0!==this.r?(0,s.bnToHex)(this.r):void 0,s:void 0!==this.s?(0,s.bnToHex)(this.s):void 0}},r.prototype._validateTxV=function(e,t){var r;if(void 0!==e&&!e.eqn(0)&&(!t||t.gteHardfork("spuriousDragon"))&&!e.eqn(27)&&!e.eqn(28))if(t){var n=t.chainIdBN().muln(2);if(!(e.eq(n.addn(35))||e.eq(n.addn(36))))throw new Error("Incompatible EIP155-based V "+e.toString()+" and chain id "+t.chainIdBN().toString()+". See the Common parameter of the Transaction constructor to set the chain id.")}else{var i=void 0;i=e.subn(35).isEven()?35:36,r=e.subn(i).divn(2)}return this._getCommon(t,r)},r.prototype._unsignedTxImplementsEIP155=function(){return this.common.gteHardfork("spuriousDragon")},r.prototype._signedTxImplementsEIP155=function(){if(!this.isSigned())throw Error("This transaction is not signed");var e=this.common.gteHardfork("spuriousDragon"),t=this.v,r=this.common.chainIdBN().muln(2);return(t.eq(r.addn(35))||t.eq(r.addn(36)))&&e},r}(u.BaseTransaction);t.default=c}).call(this,r(1).Buffer)},function(e,t,r){"use strict";(function(e){var n,i,o=r(0)(r(2));i=function(e){e.version="1.2.0";var t=function(){for(var e=0,t=new Array(256),r=0;256!=r;++r)e=1&(e=1&(e=1&(e=1&(e=1&(e=1&(e=1&(e=1&(e=r)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1,t[r]=e;return"undefined"!=typeof Int32Array?new Int32Array(t):t}();e.table=t,e.bstr=function(e,r){for(var n=-1^r,i=e.length-1,o=0;o>>8^t[255&(n^e.charCodeAt(o++))])>>>8^t[255&(n^e.charCodeAt(o++))];return o===i&&(n=n>>>8^t[255&(n^e.charCodeAt(o))]),-1^n},e.buf=function(e,r){if(e.length>1e4)return function(e,r){for(var n=-1^r,i=e.length-7,o=0;o>>8^t[255&(n^e[o++])])>>>8^t[255&(n^e[o++])])>>>8^t[255&(n^e[o++])])>>>8^t[255&(n^e[o++])])>>>8^t[255&(n^e[o++])])>>>8^t[255&(n^e[o++])])>>>8^t[255&(n^e[o++])])>>>8^t[255&(n^e[o++])];for(;o>>8^t[255&(n^e[o++])];return-1^n}(e,r);for(var n=-1^r,i=e.length-3,o=0;o>>8^t[255&(n^e[o++])])>>>8^t[255&(n^e[o++])])>>>8^t[255&(n^e[o++])])>>>8^t[255&(n^e[o++])];for(;o>>8^t[255&(n^e[o++])];return-1^n},e.str=function(e,r){for(var n,i,o=-1^r,a=0,s=e.length;a>>8^t[255&(o^n)]:n<2048?o=(o=o>>>8^t[255&(o^(192|n>>6&31))])>>>8^t[255&(o^(128|63&n))]:n>=55296&&n<57344?(n=64+(1023&n),i=1023&e.charCodeAt(a++),o=(o=(o=(o=o>>>8^t[255&(o^(240|n>>8&7))])>>>8^t[255&(o^(128|n>>2&63))])>>>8^t[255&(o^(128|i>>6&15|(3&n)<<4))])>>>8^t[255&(o^(128|63&i))]):o=(o=(o=o>>>8^t[255&(o^(224|n>>12&15))])>>>8^t[255&(o^(128|n>>6&63))])>>>8^t[255&(o^(128|63&n))];return-1^o}},"undefined"==typeof DO_NOT_EXPORT_CRC?"object"===(0,o.default)(t)?i(t):void 0===(n=function(){var e={};return i(e),e}.call(t,r,t,e))||(e.exports=n):i({})}).call(this,r(27)(e))},function(e,t,r){"use strict";var n=function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},i=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.chains=t._getInitializedChains=void 0;var o=i(r(515)),a=i(r(516)),s=i(r(517)),f=i(r(518)),u=i(r(519));function c(e){var t,r,i={1:"mainnet",3:"ropsten",4:"rinkeby",42:"kovan",5:"goerli"},c={mainnet:o.default,ropsten:a.default,rinkeby:s.default,kovan:f.default,goerli:u.default};if(e)try{for(var d=n(e),l=d.next();!l.done;l=d.next()){var h=l.value,p=h.name;i[h.chainId.toString()]=p,c[p]=h}}catch(e){t={error:e}}finally{try{l&&!l.done&&(r=d.return)&&r.call(d)}finally{if(t)throw t.error}}return c.names=i,c}t._getInitializedChains=c,t.chains=c()},function(e){e.exports=JSON.parse('{"name":"mainnet","chainId":1,"networkId":1,"defaultHardfork":"istanbul","consensus":{"type":"pow","algorithm":"ethash","ethash":{}},"comment":"The Ethereum main chain","url":"https://ethstats.net/","genesis":{"hash":"0xd4e56740f876aef8c010b86a40d5f56745a118d0906a34e69aec8c0db1cb8fa3","timestamp":null,"gasLimit":5000,"difficulty":17179869184,"nonce":"0x0000000000000042","extraData":"0x11bbe8db4e347b4e8c937c1c8370e4b5ed33adb3db69cbdb7a38e1e50b1b82fa","stateRoot":"0xd7f8974fb5ac78d9ac099b9ad5018bedc2ce0a72dad1827a1709da30580f0544"},"hardforks":[{"name":"chainstart","block":0,"forkHash":"0xfc64ec04"},{"name":"homestead","block":1150000,"forkHash":"0x97c2c34c"},{"name":"dao","block":1920000,"forkHash":"0x91d1f948"},{"name":"tangerineWhistle","block":2463000,"forkHash":"0x7a64da13"},{"name":"spuriousDragon","block":2675000,"forkHash":"0x3edd5b10"},{"name":"byzantium","block":4370000,"forkHash":"0xa00bc324"},{"name":"constantinople","block":7280000,"forkHash":"0x668db0af"},{"name":"petersburg","block":7280000,"forkHash":"0x668db0af"},{"name":"istanbul","block":9069000,"forkHash":"0x879d6e30"},{"name":"muirGlacier","block":9200000,"forkHash":"0xe029e991"},{"name":"berlin","block":12244000,"forkHash":"0x0eb440f6"},{"name":"london","block":12965000,"forkHash":"0xb715077d"},{"name":"merge","block":null,"forkash":null},{"name":"shanghai","block":null,"forkash":null}],"bootstrapNodes":[{"ip":"18.138.108.67","port":30303,"id":"d860a01f9722d78051619d1e2351aba3f43f943f6f00718d1b9baa4101932a1f5011f16bb2b1bb35db20d6fe28fa0bf09636d26a87d31de9ec6203eeedb1f666","location":"ap-southeast-1-001","comment":"bootnode-aws-ap-southeast-1-001"},{"ip":"3.209.45.79","port":30303,"id":"22a8232c3abc76a16ae9d6c3b164f98775fe226f0917b0ca871128a74a8e9630b458460865bab457221f1d448dd9791d24c4e5d88786180ac185df813a68d4de","location":"us-east-1-001","comment":"bootnode-aws-us-east-1-001"},{"ip":"34.255.23.113","port":30303,"id":"ca6de62fce278f96aea6ec5a2daadb877e51651247cb96ee310a318def462913b653963c155a0ef6c7d50048bba6e6cea881130857413d9f50a621546b590758","location":"eu-west-1-001","comment":"bootnode-aws-eu-west-1-001"},{"ip":"35.158.244.151","port":30303,"id":"279944d8dcd428dffaa7436f25ca0ca43ae19e7bcf94a8fb7d1641651f92d121e972ac2e8f381414b80cc8e5555811c2ec6e1a99bb009b3f53c4c69923e11bd8","location":"eu-central-1-001","comment":"bootnode-aws-eu-central-1-001"},{"ip":"52.187.207.27","port":30303,"id":"8499da03c47d637b20eee24eec3c356c9a2e6148d6fe25ca195c7949ab8ec2c03e3556126b0d7ed644675e78c4318b08691b7b57de10e5f0d40d05b09238fa0a","location":"australiaeast-001","comment":"bootnode-azure-australiaeast-001"},{"ip":"191.234.162.198","port":30303,"id":"103858bdb88756c71f15e9b5e09b56dc1be52f0a5021d46301dbbfb7e130029cc9d0d6f73f693bc29b665770fff7da4d34f3c6379fe12721b5d7a0bcb5ca1fc1","location":"brazilsouth-001","comment":"bootnode-azure-brazilsouth-001"},{"ip":"52.231.165.108","port":30303,"id":"715171f50508aba88aecd1250af392a45a330af91d7b90701c436b618c86aaa1589c9184561907bebbb56439b8f8787bc01f49a7c77276c58c1b09822d75e8e8","location":"koreasouth-001","comment":"bootnode-azure-koreasouth-001"},{"ip":"104.42.217.25","port":30303,"id":"5d6d7cd20d6da4bb83a1d28cadb5d409b64edf314c0335df658c1a54e32c7c4a7ab7823d57c39b6a757556e68ff1df17c748b698544a55cb488b52479a92b60f","location":"westus-001","comment":"bootnode-azure-westus-001"}],"dnsNetworks":["enrtree://AKA3AM6LPBYEUDMVNU3BSVQJ5AD45Y7YPOHJLEF6W26QOE4VTUDPE@all.mainnet.ethdisco.net"]}')},function(e){e.exports=JSON.parse('{"name":"ropsten","chainId":3,"networkId":3,"defaultHardfork":"istanbul","consensus":{"type":"pow","algorithm":"ethash","ethash":{}},"comment":"PoW test network","url":"https://github.com/ethereum/ropsten","genesis":{"hash":"0x41941023680923e0fe4d74a34bdac8141f2540e3ae90623718e47d66d1ca4a2d","timestamp":null,"gasLimit":16777216,"difficulty":1048576,"nonce":"0x0000000000000042","extraData":"0x3535353535353535353535353535353535353535353535353535353535353535","stateRoot":"0x217b0bbcfb72e2d57e28f33cb361b9983513177755dc3f33ce3e7022ed62b77b"},"hardforks":[{"name":"chainstart","block":0,"forkHash":"0x30c7ddbc"},{"name":"homestead","block":0,"forkHash":"0x30c7ddbc"},{"name":"tangerineWhistle","block":0,"forkHash":"0x30c7ddbc"},{"name":"spuriousDragon","block":10,"forkHash":"0x63760190"},{"name":"byzantium","block":1700000,"forkHash":"0x3ea159c7"},{"name":"constantinople","block":4230000,"forkHash":"0x97b544f3"},{"name":"petersburg","block":4939394,"forkHash":"0xd6e2149b"},{"name":"istanbul","block":6485846,"forkHash":"0x4bc66396"},{"name":"muirGlacier","block":7117117,"forkHash":"0x6727ef90"},{"name":"berlin","block":9812189,"forkHash":"0xa157d377"},{"name":"london","block":10499401,"forkHash":"0x7119b6b3"},{"name":"merge","block":null,"forkash":null},{"name":"shanghai","block":null,"forkash":null}],"bootstrapNodes":[{"ip":"52.176.7.10","port":30303,"id":"30b7ab30a01c124a6cceca36863ece12c4f5fa68e3ba9b0b51407ccc002eeed3b3102d20a88f1c1d3c3154e2449317b8ef95090e77b312d5cc39354f86d5d606","location":"","comment":"US-Azure geth"},{"ip":"52.176.100.77","port":30303,"id":"865a63255b3bb68023b6bffd5095118fcc13e79dcf014fe4e47e065c350c7cc72af2e53eff895f11ba1bbb6a2b33271c1116ee870f266618eadfc2e78aa7349c","location":"","comment":"US-Azure parity"},{"ip":"52.232.243.152","port":30303,"id":"6332792c4a00e3e4ee0926ed89e0d27ef985424d97b6a45bf0f23e51f0dcb5e66b875777506458aea7af6f9e4ffb69f43f3778ee73c81ed9d34c51c4b16b0b0f","location":"","comment":"Parity"},{"ip":"192.81.208.223","port":30303,"id":"94c15d1b9e2fe7ce56e458b9a3b672ef11894ddedd0c6f247e0f1d3487f52b66208fb4aeb8179fce6e3a749ea93ed147c37976d67af557508d199d9594c35f09","location":"","comment":"@gpip"}],"dnsNetworks":["enrtree://AKA3AM6LPBYEUDMVNU3BSVQJ5AD45Y7YPOHJLEF6W26QOE4VTUDPE@all.ropsten.ethdisco.net"]}')},function(e){e.exports=JSON.parse('{"name":"rinkeby","chainId":4,"networkId":4,"defaultHardfork":"istanbul","consensus":{"type":"poa","algorithm":"clique","clique":{"period":15,"epoch":30000}},"comment":"PoA test network","url":"https://www.rinkeby.io","genesis":{"hash":"0x6341fd3daf94b748c72ced5a5b26028f2474f5f00d824504e4fa37a75767e177","timestamp":"0x58ee40ba","gasLimit":4700000,"difficulty":1,"nonce":"0x0000000000000000","extraData":"0x52657370656374206d7920617574686f7269746168207e452e436172746d616e42eb768f2244c8811c63729a21a3569731535f067ffc57839b00206d1ad20c69a1981b489f772031b279182d99e65703f0076e4812653aab85fca0f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","stateRoot":"0x53580584816f617295ea26c0e17641e0120cab2f0a8ffb53a866fd53aa8e8c2d"},"hardforks":[{"name":"chainstart","block":0,"forkHash":"0x3b8e0691"},{"name":"homestead","block":1,"forkHash":"0x60949295"},{"name":"tangerineWhistle","block":2,"forkHash":"0x8bde40dd"},{"name":"spuriousDragon","block":3,"forkHash":"0xcb3a64bb"},{"name":"byzantium","block":1035301,"forkHash":"0x8d748b57"},{"name":"constantinople","block":3660663,"forkHash":"0xe49cab14"},{"name":"petersburg","block":4321234,"forkHash":"0xafec6b27"},{"name":"istanbul","block":5435345,"forkHash":"0xcbdb8838"},{"name":"berlin","block":8290928,"forkHash":"0x6910c8bd"},{"name":"london","block":8897988,"forkHash":"0x8e29f2f3"},{"name":"merge","block":null,"forkash":null},{"name":"shanghai","block":null,"forkash":null}],"bootstrapNodes":[{"ip":"52.169.42.101","port":30303,"id":"a24ac7c5484ef4ed0c5eb2d36620ba4e4aa13b8c84684e1b4aab0cebea2ae45cb4d375b77eab56516d34bfbd3c1a833fc51296ff084b770b94fb9028c4d25ccf","location":"","comment":"IE"},{"ip":"52.3.158.184","port":30303,"id":"343149e4feefa15d882d9fe4ac7d88f885bd05ebb735e547f12e12080a9fa07c8014ca6fd7f373123488102fe5e34111f8509cf0b7de3f5b44339c9f25e87cb8","location":"","comment":"INFURA"},{"ip":"159.89.28.211","port":30303,"id":"b6b28890b006743680c52e64e0d16db57f28124885595fa03a562be1d2bf0f3a1da297d56b13da25fb992888fd556d4c1a27b1f39d531bde7de1921c90061cc6","location":"","comment":"AKASHA"}],"dnsNetworks":["enrtree://AKA3AM6LPBYEUDMVNU3BSVQJ5AD45Y7YPOHJLEF6W26QOE4VTUDPE@all.rinkeby.ethdisco.net"]}')},function(e){e.exports=JSON.parse('{"name":"kovan","chainId":42,"networkId":42,"defaultHardfork":"istanbul","consensus":{"type":"poa","algorithm":"aura","aura":{}},"comment":"Parity PoA test network","url":"https://kovan-testnet.github.io/website/","genesis":{"hash":"0xa3c565fc15c7478862d50ccd6561e3c06b24cc509bf388941c25ea985ce32cb9","timestamp":null,"gasLimit":6000000,"difficulty":131072,"nonce":"0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","extraData":"0x","stateRoot":"0x2480155b48a1cea17d67dbfdfaafe821c1d19cdd478c5358e8ec56dec24502b2"},"hardforks":[{"name":"chainstart","block":0,"forkHash":"0x010ffe56"},{"name":"homestead","block":0,"forkHash":"0x010ffe56"},{"name":"tangerineWhistle","block":0,"forkHash":"0x010ffe56"},{"name":"spuriousDragon","block":0,"forkHash":"0x010ffe56"},{"name":"byzantium","block":5067000,"forkHash":"0x7f83c620"},{"name":"constantinople","block":9200000,"forkHash":"0xa94e3dc4"},{"name":"petersburg","block":10255201,"forkHash":"0x186874aa"},{"name":"istanbul","block":14111141,"forkHash":"0x7f6599a6"},{"name":"berlin","block":null,"forkHash":null},{"name":"london","block":null,"forkHash":null},{"name":"merge","block":null,"forkash":null},{"name":"shanghai","block":null,"forkash":null}],"bootstrapNodes":[{"ip":"116.203.116.241","port":30303,"id":"16898006ba2cd4fa8bf9a3dfe32684c178fa861df144bfc21fe800dc4838a03e342056951fa9fd533dcb0be1219e306106442ff2cf1f7e9f8faa5f2fc1a3aa45","location":"","comment":"1"},{"ip":"3.217.96.11","port":30303,"id":"2909846f78c37510cc0e306f185323b83bb2209e5ff4fdd279d93c60e3f365e3c6e62ad1d2133ff11f9fd6d23ad9c3dad73bb974d53a22f7d1ac5b7dea79d0b0","location":"","comment":"2"},{"ip":"108.61.170.124","port":30303,"id":"740e1c8ea64e71762c71a463a04e2046070a0c9394fcab5891d41301dc473c0cff00ebab5a9bc87fbcb610ab98ac18225ff897bc8b7b38def5975d5ceb0a7d7c","location":"","comment":"3"},{"ip":"157.230.31.163","port":30303,"id":"2909846f78c37510cc0e306f185323b83bb2209e5ff4fdd279d93c60e3f365e3c6e62ad1d2133ff11f9fd6d23ad9c3dad73bb974d53a22f7d1ac5b7dea79d0b0","location":"","comment":"4"}]}')},function(e){e.exports=JSON.parse('{"name":"goerli","chainId":5,"networkId":5,"defaultHardfork":"istanbul","consensus":{"type":"poa","algorithm":"clique","clique":{"period":15,"epoch":30000}},"comment":"Cross-client PoA test network","url":"https://github.com/goerli/testnet","genesis":{"hash":"0xbf7e331f7f7c1dd2e05159666b3bf8bc7a8a3a9eb1d518969eab529dd9b88c1a","timestamp":"0x5c51a607","gasLimit":10485760,"difficulty":1,"nonce":"0x0000000000000000","extraData":"0x22466c6578692069732061207468696e6722202d204166726900000000000000e0a2bd4258d2768837baa26a28fe71dc079f84c70000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","stateRoot":"0x5d6cded585e73c4e322c30c2f782a336316f17dd85a4863b9d838d2d4b8b3008"},"hardforks":[{"name":"chainstart","block":0,"forkHash":"0xa3f5ab08"},{"name":"homestead","block":0,"forkHash":"0xa3f5ab08"},{"name":"tangerineWhistle","block":0,"forkHash":"0xa3f5ab08"},{"name":"spuriousDragon","block":0,"forkHash":"0xa3f5ab08"},{"name":"byzantium","block":0,"forkHash":"0xa3f5ab08"},{"name":"constantinople","block":0,"forkHash":"0xa3f5ab08"},{"name":"petersburg","block":0,"forkHash":"0xa3f5ab08"},{"name":"istanbul","block":1561651,"forkHash":"0xc25efa5c"},{"name":"berlin","block":4460644,"forkHash":"0x757a1c47"},{"name":"london","block":5062605,"forkHash":"0xb8c6299d"},{"name":"merge","block":null,"forkash":null},{"name":"shanghai","block":null,"forkash":null}],"bootstrapNodes":[{"ip":"51.141.78.53","port":30303,"id":"011f758e6552d105183b1761c5e2dea0111bc20fd5f6422bc7f91e0fabbec9a6595caf6239b37feb773dddd3f87240d99d859431891e4a642cf2a0a9e6cbb98a","location":"","comment":"Upstream bootnode 1"},{"ip":"13.93.54.137","port":30303,"id":"176b9417f511d05b6b2cf3e34b756cf0a7096b3094572a8f6ef4cdcb9d1f9d00683bf0f83347eebdf3b81c3521c2332086d9592802230bf528eaf606a1d9677b","location":"","comment":"Upstream bootnode 2"},{"ip":"94.237.54.114","port":30313,"id":"46add44b9f13965f7b9875ac6b85f016f341012d84f975377573800a863526f4da19ae2c620ec73d11591fa9510e992ecc03ad0751f53cc02f7c7ed6d55c7291","location":"","comment":"Upstream bootnode 3"},{"ip":"18.218.250.66","port":30313,"id":"b5948a2d3e9d486c4d75bf32713221c2bd6cf86463302339299bd227dc2e276cd5a1c7ca4f43a0e9122fe9af884efed563bd2a1fd28661f3b5f5ad7bf1de5949","location":"","comment":"Upstream bootnode 4"},{"ip":"3.11.147.67","port":30303,"id":"a61215641fb8714a373c80edbfa0ea8878243193f57c96eeb44d0bc019ef295abd4e044fd619bfc4c59731a73fb79afe84e9ab6da0c743ceb479cbb6d263fa91","location":"","comment":"Ethereum Foundation bootnode"},{"ip":"51.15.116.226","port":30303,"id":"a869b02cec167211fb4815a82941db2e7ed2936fd90e78619c53eb17753fcf0207463e3419c264e2a1dd8786de0df7e68cf99571ab8aeb7c4e51367ef186b1dd","location":"","comment":"Goerli Initiative bootnode"},{"ip":"51.15.119.157","port":30303,"id":"807b37ee4816ecf407e9112224494b74dd5933625f655962d892f2f0f02d7fbbb3e2a94cf87a96609526f30c998fd71e93e2f53015c558ffc8b03eceaf30ee33","location":"","comment":"Goerli Initiative bootnode"},{"ip":"51.15.119.157","port":40303,"id":"a59e33ccd2b3e52d578f1fbd70c6f9babda2650f0760d6ff3b37742fdcdfdb3defba5d56d315b40c46b70198c7621e63ffa3f987389c7118634b0fefbbdfa7fd","location":"","comment":"Goerli Initiative bootnode"}],"dnsNetworks":["enrtree://AKA3AM6LPBYEUDMVNU3BSVQJ5AD45Y7YPOHJLEF6W26QOE4VTUDPE@all.goerli.ethdisco.net"]}')},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hardforks=void 0,t.hardforks=[["chainstart",r(521)],["homestead",r(522)],["dao",r(523)],["tangerineWhistle",r(524)],["spuriousDragon",r(525)],["byzantium",r(526)],["constantinople",r(527)],["petersburg",r(528)],["istanbul",r(529)],["muirGlacier",r(530)],["berlin",r(531)],["london",r(532)],["shanghai",r(533)],["merge",r(534)]]},function(e){e.exports=JSON.parse('{"name":"chainstart","comment":"Start of the Ethereum main chain","url":"","status":"","gasConfig":{"minGasLimit":{"v":5000,"d":"Minimum the gas limit may ever be"},"gasLimitBoundDivisor":{"v":1024,"d":"The bound divisor of the gas limit, used in update calculations"},"maxRefundQuotient":{"v":2,"d":"Maximum refund quotient; max tx refund is min(tx.gasUsed/maxRefundQuotient, tx.gasRefund)"}},"gasPrices":{"base":{"v":2,"d":"Gas base cost, used e.g. for ChainID opcode (Istanbul)"},"tierStep":{"v":[0,2,3,5,8,10,20],"d":"Once per operation, for a selection of them"},"exp":{"v":10,"d":"Base fee of the EXP opcode"},"expByte":{"v":10,"d":"Times ceil(log256(exponent)) for the EXP instruction"},"sha3":{"v":30,"d":"Base fee of the SHA3 opcode"},"sha3Word":{"v":6,"d":"Once per word of the SHA3 operation\'s data"},"sload":{"v":50,"d":"Base fee of the SLOAD opcode"},"sstoreSet":{"v":20000,"d":"Once per SSTORE operation if the zeroness changes from zero"},"sstoreReset":{"v":5000,"d":"Once per SSTORE operation if the zeroness does not change from zero"},"sstoreRefund":{"v":15000,"d":"Once per SSTORE operation if the zeroness changes to zero"},"jumpdest":{"v":1,"d":"Base fee of the JUMPDEST opcode"},"log":{"v":375,"d":"Base fee of the LOG opcode"},"logData":{"v":8,"d":"Per byte in a LOG* operation\'s data"},"logTopic":{"v":375,"d":"Multiplied by the * of the LOG*, per LOG transaction. e.g. LOG0 incurs 0 * c_txLogTopicGas, LOG4 incurs 4 * c_txLogTopicGas"},"create":{"v":32000,"d":"Base fee of the CREATE opcode"},"call":{"v":40,"d":"Base fee of the CALL opcode"},"callStipend":{"v":2300,"d":"Free gas given at beginning of call"},"callValueTransfer":{"v":9000,"d":"Paid for CALL when the value transfor is non-zero"},"callNewAccount":{"v":25000,"d":"Paid for CALL when the destination address didn\'t exist prior"},"selfdestructRefund":{"v":24000,"d":"Refunded following a selfdestruct operation"},"memory":{"v":3,"d":"Times the address of the (highest referenced byte in memory + 1). NOTE: referencing happens on read, write and in instructions such as RETURN and CALL"},"quadCoeffDiv":{"v":512,"d":"Divisor for the quadratic particle of the memory cost equation"},"createData":{"v":200,"d":""},"tx":{"v":21000,"d":"Per transaction. NOTE: Not payable on data of calls between transactions"},"txCreation":{"v":32000,"d":"The cost of creating a contract via tx"},"txDataZero":{"v":4,"d":"Per byte of data attached to a transaction that equals zero. NOTE: Not payable on data of calls between transactions"},"txDataNonZero":{"v":68,"d":"Per byte of data attached to a transaction that is not equal to zero. NOTE: Not payable on data of calls between transactions"},"copy":{"v":3,"d":"Multiplied by the number of 32-byte words that are copied (round up) for any *COPY operation and added"},"ecRecover":{"v":3000,"d":""},"sha256":{"v":60,"d":""},"sha256Word":{"v":12,"d":""},"ripemd160":{"v":600,"d":""},"ripemd160Word":{"v":120,"d":""},"identity":{"v":15,"d":""},"identityWord":{"v":3,"d":""},"stop":{"v":0,"d":"Base fee of the STOP opcode"},"add":{"v":3,"d":"Base fee of the ADD opcode"},"mul":{"v":5,"d":"Base fee of the MUL opcode"},"sub":{"v":3,"d":"Base fee of the SUB opcode"},"div":{"v":5,"d":"Base fee of the DIV opcode"},"sdiv":{"v":5,"d":"Base fee of the SDIV opcode"},"mod":{"v":5,"d":"Base fee of the MOD opcode"},"smod":{"v":5,"d":"Base fee of the SMOD opcode"},"addmod":{"v":8,"d":"Base fee of the ADDMOD opcode"},"mulmod":{"v":8,"d":"Base fee of the MULMOD opcode"},"signextend":{"v":5,"d":"Base fee of the SIGNEXTEND opcode"},"lt":{"v":3,"d":"Base fee of the LT opcode"},"gt":{"v":3,"d":"Base fee of the GT opcode"},"slt":{"v":3,"d":"Base fee of the SLT opcode"},"sgt":{"v":3,"d":"Base fee of the SGT opcode"},"eq":{"v":3,"d":"Base fee of the EQ opcode"},"iszero":{"v":3,"d":"Base fee of the ISZERO opcode"},"and":{"v":3,"d":"Base fee of the AND opcode"},"or":{"v":3,"d":"Base fee of the OR opcode"},"xor":{"v":3,"d":"Base fee of the XOR opcode"},"not":{"v":3,"d":"Base fee of the NOT opcode"},"byte":{"v":3,"d":"Base fee of the BYTE opcode"},"address":{"v":2,"d":"Base fee of the ADDRESS opcode"},"balance":{"v":20,"d":"Base fee of the BALANCE opcode"},"origin":{"v":2,"d":"Base fee of the ORIGIN opcode"},"caller":{"v":2,"d":"Base fee of the CALLER opcode"},"callvalue":{"v":2,"d":"Base fee of the CALLVALUE opcode"},"calldataload":{"v":3,"d":"Base fee of the CALLDATALOAD opcode"},"calldatasize":{"v":2,"d":"Base fee of the CALLDATASIZE opcode"},"calldatacopy":{"v":3,"d":"Base fee of the CALLDATACOPY opcode"},"codesize":{"v":2,"d":"Base fee of the CODESIZE opcode"},"codecopy":{"v":3,"d":"Base fee of the CODECOPY opcode"},"gasprice":{"v":2,"d":"Base fee of the GASPRICE opcode"},"extcodesize":{"v":20,"d":"Base fee of the EXTCODESIZE opcode"},"extcodecopy":{"v":20,"d":"Base fee of the EXTCODECOPY opcode"},"blockhash":{"v":20,"d":"Base fee of the BLOCKHASH opcode"},"coinbase":{"v":2,"d":"Base fee of the COINBASE opcode"},"timestamp":{"v":2,"d":"Base fee of the TIMESTAMP opcode"},"number":{"v":2,"d":"Base fee of the NUMBER opcode"},"difficulty":{"v":2,"d":"Base fee of the DIFFICULTY opcode"},"gaslimit":{"v":2,"d":"Base fee of the GASLIMIT opcode"},"pop":{"v":2,"d":"Base fee of the POP opcode"},"mload":{"v":3,"d":"Base fee of the MLOAD opcode"},"mstore":{"v":3,"d":"Base fee of the MSTORE opcode"},"mstore8":{"v":3,"d":"Base fee of the MSTORE8 opcode"},"sstore":{"v":0,"d":"Base fee of the SSTORE opcode"},"jump":{"v":8,"d":"Base fee of the JUMP opcode"},"jumpi":{"v":10,"d":"Base fee of the JUMPI opcode"},"pc":{"v":2,"d":"Base fee of the PC opcode"},"msize":{"v":2,"d":"Base fee of the MSIZE opcode"},"gas":{"v":2,"d":"Base fee of the GAS opcode"},"push":{"v":3,"d":"Base fee of the PUSH opcode"},"dup":{"v":3,"d":"Base fee of the DUP opcode"},"swap":{"v":3,"d":"Base fee of the SWAP opcode"},"callcode":{"v":40,"d":"Base fee of the CALLCODE opcode"},"return":{"v":0,"d":"Base fee of the RETURN opcode"},"invalid":{"v":0,"d":"Base fee of the INVALID opcode"},"selfdestruct":{"v":0,"d":"Base fee of the SELFDESTRUCT opcode"}},"vm":{"stackLimit":{"v":1024,"d":"Maximum size of VM stack allowed"},"callCreateDepth":{"v":1024,"d":"Maximum depth of call/create stack"},"maxExtraDataSize":{"v":32,"d":"Maximum size extra data may be after Genesis"}},"pow":{"minimumDifficulty":{"v":131072,"d":"The minimum that the difficulty may ever be"},"difficultyBoundDivisor":{"v":2048,"d":"The bound divisor of the difficulty, used in the update calculations"},"durationLimit":{"v":13,"d":"The decision boundary on the blocktime duration used to determine whether difficulty should go up or not"},"epochDuration":{"v":30000,"d":"Duration between proof-of-work epochs"},"timebombPeriod":{"v":100000,"d":"Exponential difficulty timebomb period"},"minerReward":{"v":"5000000000000000000","d":"the amount a miner get rewarded for mining a block"},"difficultyBombDelay":{"v":0,"d":"the amount of blocks to delay the difficulty bomb with"}}}')},function(e){e.exports=JSON.parse('{"name":"homestead","comment":"Homestead hardfork with protocol and network changes","url":"https://eips.ethereum.org/EIPS/eip-606","status":"Final","gasConfig":{},"gasPrices":{"delegatecall":{"v":40,"d":"Base fee of the DELEGATECALL opcode"}},"vm":{},"pow":{}}')},function(e){e.exports=JSON.parse('{"name":"dao","comment":"DAO rescue hardfork","url":"https://eips.ethereum.org/EIPS/eip-779","status":"Final","gasConfig":{},"gasPrices":{},"vm":{},"pow":{}}')},function(e){e.exports=JSON.parse('{"name":"tangerineWhistle","comment":"Hardfork with gas cost changes for IO-heavy operations","url":"https://eips.ethereum.org/EIPS/eip-608","status":"Final","gasConfig":{},"gasPrices":{"sload":{"v":200,"d":"Once per SLOAD operation"},"call":{"v":700,"d":"Once per CALL operation & message call transaction"},"extcodesize":{"v":700,"d":"Base fee of the EXTCODESIZE opcode"},"extcodecopy":{"v":700,"d":"Base fee of the EXTCODECOPY opcode"},"balance":{"v":400,"d":"Base fee of the BALANCE opcode"},"delegatecall":{"v":700,"d":"Base fee of the DELEGATECALL opcode"},"callcode":{"v":700,"d":"Base fee of the CALLCODE opcode"},"selfdestruct":{"v":5000,"d":"Base fee of the SELFDESTRUCT opcode"}},"vm":{},"pow":{}}')},function(e){e.exports=JSON.parse('{"name":"spuriousDragon","comment":"HF with EIPs for simple replay attack protection, EXP cost increase, state trie clearing, contract code size limit","url":"https://eips.ethereum.org/EIPS/eip-607","status":"Final","gasConfig":{},"gasPrices":{"expByte":{"v":50,"d":"Times ceil(log256(exponent)) for the EXP instruction"}},"vm":{"maxCodeSize":{"v":24576,"d":"Maximum length of contract code"}},"pow":{}}')},function(e){e.exports=JSON.parse('{"name":"byzantium","comment":"Hardfork with new precompiles, instructions and other protocol changes","url":"https://eips.ethereum.org/EIPS/eip-609","status":"Final","gasConfig":{},"gasPrices":{"modexpGquaddivisor":{"v":20,"d":"Gquaddivisor from modexp precompile for gas calculation"},"ecAdd":{"v":500,"d":"Gas costs for curve addition precompile"},"ecMul":{"v":40000,"d":"Gas costs for curve multiplication precompile"},"ecPairing":{"v":100000,"d":"Base gas costs for curve pairing precompile"},"ecPairingWord":{"v":80000,"d":"Gas costs regarding curve pairing precompile input length"},"revert":{"v":0,"d":"Base fee of the REVERT opcode"},"staticcall":{"v":700,"d":"Base fee of the STATICCALL opcode"},"returndatasize":{"v":2,"d":"Base fee of the RETURNDATASIZE opcode"},"returndatacopy":{"v":3,"d":"Base fee of the RETURNDATACOPY opcode"}},"vm":{},"pow":{"minerReward":{"v":"3000000000000000000","d":"the amount a miner get rewarded for mining a block"},"difficultyBombDelay":{"v":3000000,"d":"the amount of blocks to delay the difficulty bomb with"}}}')},function(e){e.exports=JSON.parse('{"name":"constantinople","comment":"Postponed hardfork including EIP-1283 (SSTORE gas metering changes)","url":"https://eips.ethereum.org/EIPS/eip-1013","status":"Final","gasConfig":{},"gasPrices":{"netSstoreNoopGas":{"v":200,"d":"Once per SSTORE operation if the value doesn\'t change"},"netSstoreInitGas":{"v":20000,"d":"Once per SSTORE operation from clean zero"},"netSstoreCleanGas":{"v":5000,"d":"Once per SSTORE operation from clean non-zero"},"netSstoreDirtyGas":{"v":200,"d":"Once per SSTORE operation from dirty"},"netSstoreClearRefund":{"v":15000,"d":"Once per SSTORE operation for clearing an originally existing storage slot"},"netSstoreResetRefund":{"v":4800,"d":"Once per SSTORE operation for resetting to the original non-zero value"},"netSstoreResetClearRefund":{"v":19800,"d":"Once per SSTORE operation for resetting to the original zero value"},"shl":{"v":3,"d":"Base fee of the SHL opcode"},"shr":{"v":3,"d":"Base fee of the SHR opcode"},"sar":{"v":3,"d":"Base fee of the SAR opcode"},"extcodehash":{"v":400,"d":"Base fee of the EXTCODEHASH opcode"},"create2":{"v":32000,"d":"Base fee of the CREATE2 opcode"}},"vm":{},"pow":{"minerReward":{"v":"2000000000000000000","d":"The amount a miner gets rewarded for mining a block"},"difficultyBombDelay":{"v":5000000,"d":"the amount of blocks to delay the difficulty bomb with"}}}')},function(e){e.exports=JSON.parse('{"name":"petersburg","comment":"Aka constantinopleFix, removes EIP-1283, activate together with or after constantinople","url":"https://eips.ethereum.org/EIPS/eip-1716","status":"Draft","gasConfig":{},"gasPrices":{"netSstoreNoopGas":{"v":null,"d":"Removed along EIP-1283"},"netSstoreInitGas":{"v":null,"d":"Removed along EIP-1283"},"netSstoreCleanGas":{"v":null,"d":"Removed along EIP-1283"},"netSstoreDirtyGas":{"v":null,"d":"Removed along EIP-1283"},"netSstoreClearRefund":{"v":null,"d":"Removed along EIP-1283"},"netSstoreResetRefund":{"v":null,"d":"Removed along EIP-1283"},"netSstoreResetClearRefund":{"v":null,"d":"Removed along EIP-1283"}},"vm":{},"pow":{}}')},function(e){e.exports=JSON.parse('{"name":"istanbul","comment":"HF targeted for December 2019 following the Constantinople/Petersburg HF","url":"https://eips.ethereum.org/EIPS/eip-1679","status":"Draft","gasConfig":{},"gasPrices":{"blake2Round":{"v":1,"d":"Gas cost per round for the Blake2 F precompile"},"ecAdd":{"v":150,"d":"Gas costs for curve addition precompile"},"ecMul":{"v":6000,"d":"Gas costs for curve multiplication precompile"},"ecPairing":{"v":45000,"d":"Base gas costs for curve pairing precompile"},"ecPairingWord":{"v":34000,"d":"Gas costs regarding curve pairing precompile input length"},"txDataNonZero":{"v":16,"d":"Per byte of data attached to a transaction that is not equal to zero. NOTE: Not payable on data of calls between transactions"},"sstoreSentryGasEIP2200":{"v":2300,"d":"Minimum gas required to be present for an SSTORE call, not consumed"},"sstoreNoopGasEIP2200":{"v":800,"d":"Once per SSTORE operation if the value doesn\'t change"},"sstoreDirtyGasEIP2200":{"v":800,"d":"Once per SSTORE operation if a dirty value is changed"},"sstoreInitGasEIP2200":{"v":20000,"d":"Once per SSTORE operation from clean zero to non-zero"},"sstoreInitRefundEIP2200":{"v":19200,"d":"Once per SSTORE operation for resetting to the original zero value"},"sstoreCleanGasEIP2200":{"v":5000,"d":"Once per SSTORE operation from clean non-zero to something else"},"sstoreCleanRefundEIP2200":{"v":4200,"d":"Once per SSTORE operation for resetting to the original non-zero value"},"sstoreClearRefundEIP2200":{"v":15000,"d":"Once per SSTORE operation for clearing an originally existing storage slot"},"balance":{"v":700,"d":"Base fee of the BALANCE opcode"},"extcodehash":{"v":700,"d":"Base fee of the EXTCODEHASH opcode"},"chainid":{"v":2,"d":"Base fee of the CHAINID opcode"},"selfbalance":{"v":5,"d":"Base fee of the SELFBALANCE opcode"},"sload":{"v":800,"d":"Base fee of the SLOAD opcode"}},"vm":{},"pow":{}}')},function(e){e.exports=JSON.parse('{"name":"muirGlacier","comment":"HF to delay the difficulty bomb","url":"https://eips.ethereum.org/EIPS/eip-2384","status":"Final","gasConfig":{},"gasPrices":{},"vm":{},"pow":{"difficultyBombDelay":{"v":9000000,"d":"the amount of blocks to delay the difficulty bomb with"}}}')},function(e){e.exports=JSON.parse('{"name":"berlin","comment":"HF targeted for July 2020 following the Muir Glacier HF","url":"https://eips.ethereum.org/EIPS/eip-2070","status":"Draft","eips":[2565,2929,2718,2930]}')},function(e){e.exports=JSON.parse('{"name":"london","comment":"HF targeted for July 2021 following the Berlin fork","url":"https://github.com/ethereum/eth1.0-specs/blob/master/network-upgrades/mainnet-upgrades/london.md","status":"Draft","eips":[1559,3198,3529,3541]}')},function(e){e.exports=JSON.parse('{"name":"shanghai","comment":"Next feature hardfork after the London HF","url":"https://github.com/ethereum/pm/issues/356","status":"Pre-Draft","eips":[]}')},function(e){e.exports=JSON.parse('{"name":"merge","comment":"Hardfork to upgrade the consensus mechanism to Proof-of-Stake","url":"https://github.com/ethereum/pm/issues/361","status":"pre-Draft","consensus":{"type":"pos","algorithm":"casper","casper":{}},"eips":[3675]}')},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EIPs=void 0,t.EIPs={1559:r(536),2315:r(537),2537:r(538),2565:r(539),2718:r(540),2929:r(541),2930:r(542),3198:r(543),3529:r(544),3541:r(545),3554:r(546),3675:r(547)}},function(e){e.exports=JSON.parse('{"name":"EIP-1559","number":1559,"comment":"Fee market change for ETH 1.0 chain","url":"https://eips.ethereum.org/EIPS/eip-1559","status":"Review","minimumHardfork":"berlin","requiredEIPs":[2930],"gasConfig":{"baseFeeMaxChangeDenominator":{"v":8,"d":"Maximum base fee change denominator"},"elasticityMultiplier":{"v":2,"d":"Maximum block gas target elasticity"},"initialBaseFee":{"v":1000000000,"d":"Initial base fee on first EIP1559 block"}},"gasPrices":{},"vm":{},"pow":{}}')},function(e){e.exports=JSON.parse('{"name":"EIP-2315","number":2315,"comment":"Simple subroutines for the EVM","url":"https://eips.ethereum.org/EIPS/eip-2315","status":"Draft","minimumHardfork":"istanbul","gasConfig":{},"gasPrices":{"beginsub":{"v":2,"d":"Base fee of the BEGINSUB opcode"},"returnsub":{"v":5,"d":"Base fee of the RETURNSUB opcode"},"jumpsub":{"v":10,"d":"Base fee of the JUMPSUB opcode"}},"vm":{},"pow":{}}')},function(e){e.exports=JSON.parse('{"name":"EIP-2537","number":2537,"comment":"BLS12-381 precompiles","url":"https://eips.ethereum.org/EIPS/eip-2537","status":"Draft","minimumHardfork":"chainstart","gasConfig":{},"gasPrices":{"Bls12381G1AddGas":{"v":600,"d":"Gas cost of a single BLS12-381 G1 addition precompile-call"},"Bls12381G1MulGas":{"v":12000,"d":"Gas cost of a single BLS12-381 G1 multiplication precompile-call"},"Bls12381G2AddGas":{"v":4500,"d":"Gas cost of a single BLS12-381 G2 addition precompile-call"},"Bls12381G2MulGas":{"v":55000,"d":"Gas cost of a single BLS12-381 G2 multiplication precompile-call"},"Bls12381PairingBaseGas":{"v":115000,"d":"Base gas cost of BLS12-381 pairing check"},"Bls12381PairingPerPairGas":{"v":23000,"d":"Per-pair gas cost of BLS12-381 pairing check"},"Bls12381MapG1Gas":{"v":5500,"d":"Gas cost of BLS12-381 map field element to G1"},"Bls12381MapG2Gas":{"v":110000,"d":"Gas cost of BLS12-381 map field element to G2"},"Bls12381MultiExpGasDiscount":{"v":[[1,1200],[2,888],[3,764],[4,641],[5,594],[6,547],[7,500],[8,453],[9,438],[10,423],[11,408],[12,394],[13,379],[14,364],[15,349],[16,334],[17,330],[18,326],[19,322],[20,318],[21,314],[22,310],[23,306],[24,302],[25,298],[26,294],[27,289],[28,285],[29,281],[30,277],[31,273],[32,269],[33,268],[34,266],[35,265],[36,263],[37,262],[38,260],[39,259],[40,257],[41,256],[42,254],[43,253],[44,251],[45,250],[46,248],[47,247],[48,245],[49,244],[50,242],[51,241],[52,239],[53,238],[54,236],[55,235],[56,233],[57,232],[58,231],[59,229],[60,228],[61,226],[62,225],[63,223],[64,222],[65,221],[66,220],[67,219],[68,219],[69,218],[70,217],[71,216],[72,216],[73,215],[74,214],[75,213],[76,213],[77,212],[78,211],[79,211],[80,210],[81,209],[82,208],[83,208],[84,207],[85,206],[86,205],[87,205],[88,204],[89,203],[90,202],[91,202],[92,201],[93,200],[94,199],[95,199],[96,198],[97,197],[98,196],[99,196],[100,195],[101,194],[102,193],[103,193],[104,192],[105,191],[106,191],[107,190],[108,189],[109,188],[110,188],[111,187],[112,186],[113,185],[114,185],[115,184],[116,183],[117,182],[118,182],[119,181],[120,180],[121,179],[122,179],[123,178],[124,177],[125,176],[126,176],[127,175],[128,174]],"d":"Discount gas costs of calls to the MultiExp precompiles with `k` (point, scalar) pair"}},"vm":{},"pow":{}}')},function(e){e.exports=JSON.parse('{"name":"EIP-2565","number":2565,"comment":"ModExp gas cost","url":"https://eips.ethereum.org/EIPS/eip-2565","status":"Last call","minimumHardfork":"byzantium","gasConfig":{},"gasPrices":{"modexpGquaddivisor":{"v":3,"d":"Gquaddivisor from modexp precompile for gas calculation"}},"vm":{},"pow":{}}')},function(e){e.exports=JSON.parse('{"name":"EIP-2718","comment":"Typed Transaction Envelope","url":"https://eips.ethereum.org/EIPS/eip-2718","status":"Draft","minimumHardfork":"chainstart","gasConfig":{},"gasPrices":{},"vm":{},"pow":{}}')},function(e){e.exports=JSON.parse('{"name":"EIP-2929","comment":"Gas cost increases for state access opcodes","url":"https://eips.ethereum.org/EIPS/eip-2929","status":"Draft","minimumHardfork":"chainstart","gasConfig":{},"gasPrices":{"coldsload":{"v":2100,"d":"Gas cost of the first read of storage from a given location (per transaction)"},"coldaccountaccess":{"v":2600,"d":"Gas cost of the first read of a given address (per transaction)"},"warmstorageread":{"v":100,"d":"Gas cost of reading storage locations which have already loaded \'cold\'"},"sstoreCleanGasEIP2200":{"v":2900,"d":"Once per SSTORE operation from clean non-zero to something else"},"sstoreNoopGasEIP2200":{"v":100,"d":"Once per SSTORE operation if the value doesn\'t change"},"sstoreDirtyGasEIP2200":{"v":100,"d":"Once per SSTORE operation if a dirty value is changed"},"sstoreInitRefundEIP2200":{"v":19900,"d":"Once per SSTORE operation for resetting to the original zero value"},"sstoreCleanRefundEIP2200":{"v":4900,"d":"Once per SSTORE operation for resetting to the original non-zero value"},"call":{"v":0,"d":"Base fee of the CALL opcode"},"callcode":{"v":0,"d":"Base fee of the CALLCODE opcode"},"delegatecall":{"v":0,"d":"Base fee of the DELEGATECALL opcode"},"staticcall":{"v":0,"d":"Base fee of the STATICCALL opcode"},"balance":{"v":0,"d":"Base fee of the BALANCE opcode"},"extcodesize":{"v":0,"d":"Base fee of the EXTCODESIZE opcode"},"extcodecopy":{"v":0,"d":"Base fee of the EXTCODECOPY opcode"},"extcodehash":{"v":0,"d":"Base fee of the EXTCODEHASH opcode"},"sload":{"v":0,"d":"Base fee of the SLOAD opcode"},"sstore":{"v":0,"d":"Base fee of the SSTORE opcode"}},"vm":{},"pow":{}}')},function(e){e.exports=JSON.parse('{"name":"EIP-2930","comment":"Optional access lists","url":"https://eips.ethereum.org/EIPS/eip-2930","status":"Draft","minimumHardfork":"istanbul","requiredEIPs":[2718,2929],"gasConfig":{},"gasPrices":{"accessListStorageKeyCost":{"v":1900,"d":"Gas cost per storage key in an Access List transaction"},"accessListAddressCost":{"v":2400,"d":"Gas cost per storage key in an Access List transaction"}},"vm":{},"pow":{}}')},function(e){e.exports=JSON.parse('{"name":"EIP-3198","number":3198,"comment":"BASEFEE opcode","url":"https://eips.ethereum.org/EIPS/eip-3198","status":"Review","minimumHardfork":"london","gasConfig":{},"gasPrices":{"basefee":{"v":2,"d":"Gas cost of the BASEFEE opcode"}},"vm":{},"pow":{}}')},function(e){e.exports=JSON.parse('{"name":"EIP-3529","comment":"Reduction in refunds","url":"https://eips.ethereum.org/EIPS/eip-3529","status":"Draft","minimumHardfork":"berlin","requiredEIPs":[2929],"gasConfig":{"maxRefundQuotient":{"v":5,"d":"Maximum refund quotient; max tx refund is min(tx.gasUsed/maxRefundQuotient, tx.gasRefund)"}},"gasPrices":{"selfdestructRefund":{"v":0,"d":"Refunded following a selfdestruct operation"},"sstoreClearRefundEIP2200":{"v":4800,"d":"Once per SSTORE operation for clearing an originally existing storage slot"}},"vm":{},"pow":{}}')},function(e){e.exports=JSON.parse('{"name":"EIP-3541","comment":"Reject new contracts starting with the 0xEF byte","url":"https://eips.ethereum.org/EIPS/eip-3541","status":"Draft","minimumHardfork":"berlin","requiredEIPs":[],"gasConfig":{},"gasPrices":{},"vm":{},"pow":{}}')},function(e){e.exports=JSON.parse('{"name":"EIP-3554","comment":"Reduction in refunds","url":"Difficulty Bomb Delay to December 1st 2021","status":"Draft","minimumHardfork":"muirGlacier","requiredEIPs":[],"gasConfig":{},"gasPrices":{},"vm":{},"pow":{"difficultyBombDelay":{"v":9500000,"d":"the amount of blocks to delay the difficulty bomb with"}}}')},function(e){e.exports=JSON.parse('{"name":"EIP-3675","number":3675,"comment":"Upgrade consensus to Proof-of-Stake","url":"https://eips.ethereum.org/EIPS/eip-3675","status":"Draft","minimumHardfork":"london","requiredEIPs":[],"gasConfig":{},"gasPrices":{},"vm":{},"pow":{}}')},function(e,t,r){"use strict";(function(e){var n,i=(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),o=function(){return(o=Object.assign||function(e){for(var t,r=1,n=arguments.length;r0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a};Object.defineProperty(t,"__esModule",{value:!0});var s=r(28),f=r(119),u=r(53),c=r(233),d=e.from(1..toString(16).padStart(2,"0"),"hex"),l=function(t){function r(e,r){var n,i;void 0===r&&(r={});var a=t.call(this,o(o({},e),{type:1}))||this;a.DEFAULT_HARDFORK="berlin";var f=e.chainId,d=e.accessList,l=e.gasPrice;if(a.common=a._getCommon(r.common,f),a.chainId=a.common.chainIdBN(),!a.common.isActivatedEIP(2930))throw new Error("EIP-2930 not enabled on Common");a.activeCapabilities=a.activeCapabilities.concat([2718,2930]);var h=c.AccessLists.getAccessListData(null!=d?d:[]);if(a.accessList=h.accessList,a.AccessListJSON=h.AccessListJSON,c.AccessLists.verifyAccessList(a.accessList),a.gasPrice=new s.BN((0,s.toBuffer)(""===l?"0x":l)),a._validateCannotExceedMaxInteger({gasPrice:a.gasPrice}),a.v&&!a.v.eqn(0)&&!a.v.eqn(1))throw new Error("The y-parity of the transaction should either be 0 or 1");if(a.common.gteHardfork("homestead")&&(null===(n=a.s)||void 0===n?void 0:n.gt(u.N_DIV_2)))throw new Error("Invalid Signature: s-values greater than secp256k1n/2 are considered invalid");return(null===(i=null==r?void 0:r.freeze)||void 0===i||i)&&Object.freeze(a),a}return i(r,t),Object.defineProperty(r.prototype,"senderR",{get:function(){return this.r},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"senderS",{get:function(){return this.s},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"yParity",{get:function(){return this.v},enumerable:!1,configurable:!0}),r.fromTxData=function(e,t){return void 0===t&&(t={}),new r(e,t)},r.fromSerializedTx=function(e,t){if(void 0===t&&(t={}),!e.slice(0,1).equals(d))throw new Error("Invalid serialized tx input: not an EIP-2930 transaction (wrong tx type, expected: 1, received: "+e.slice(0,1).toString("hex"));var n=s.rlp.decode(e.slice(1));if(!Array.isArray(n))throw new Error("Invalid serialized tx input: must be array");return r.fromValuesArray(n,t)},r.fromRlpSerializedTx=function(e,t){return void 0===t&&(t={}),r.fromSerializedTx(e,t)},r.fromValuesArray=function(e,t){if(void 0===t&&(t={}),8!==e.length&&11!==e.length)throw new Error("Invalid EIP-2930 transaction. Only expecting 8 values (for unsigned tx) or 11 values (for signed tx).");var n=a(e,11),i=n[0],o=n[1],f=n[2],u=n[3],c=n[4],d=n[5],l=n[6],h=n[7],p=n[8],b=n[9],y=n[10];return new r({chainId:new s.BN(i),nonce:o,gasPrice:f,gasLimit:u,to:c,value:d,data:l,accessList:null!=h?h:[],v:void 0!==p?new s.BN(p):void 0,r:b,s:y},t)},r.prototype.getDataFee=function(){var e=t.prototype.getDataFee.call(this);return e.iaddn(c.AccessLists.getDataFeeEIP2930(this.accessList,this.common)),e},r.prototype.getUpfrontCost=function(){return this.gasLimit.mul(this.gasPrice).add(this.value)},r.prototype.raw=function(){return[(0,s.bnToUnpaddedBuffer)(this.chainId),(0,s.bnToUnpaddedBuffer)(this.nonce),(0,s.bnToUnpaddedBuffer)(this.gasPrice),(0,s.bnToUnpaddedBuffer)(this.gasLimit),void 0!==this.to?this.to.buf:e.from([]),(0,s.bnToUnpaddedBuffer)(this.value),this.data,this.accessList,void 0!==this.v?(0,s.bnToUnpaddedBuffer)(this.v):e.from([]),void 0!==this.r?(0,s.bnToUnpaddedBuffer)(this.r):e.from([]),void 0!==this.s?(0,s.bnToUnpaddedBuffer)(this.s):e.from([])]},r.prototype.serialize=function(){var t=this.raw();return e.concat([d,s.rlp.encode(t)])},r.prototype.getMessageToSign=function(t){void 0===t&&(t=!0);var r=this.raw().slice(0,8),n=e.concat([d,s.rlp.encode(r)]);return t?(0,s.keccak256)(n):n},r.prototype.hash=function(){if(!this.isSigned())throw new Error("Cannot call hash method if transaction is not signed");return Object.isFrozen(this)?(this.cache.hash||(this.cache.hash=(0,s.keccak256)(this.serialize())),this.cache.hash):(0,s.keccak256)(this.serialize())},r.prototype.getMessageToVerifySignature=function(){return this.getMessageToSign()},r.prototype.getSenderPublicKey=function(){var e;if(!this.isSigned())throw new Error("Cannot call this method if transaction is not signed");var t=this.getMessageToVerifySignature();if(this.common.gteHardfork("homestead")&&(null===(e=this.s)||void 0===e?void 0:e.gt(u.N_DIV_2)))throw new Error("Invalid Signature: s-values greater than secp256k1n/2 are considered invalid");var r=this.yParity,n=this.r,i=this.s;try{return(0,s.ecrecover)(t,r.addn(27),(0,s.bnToUnpaddedBuffer)(n),(0,s.bnToUnpaddedBuffer)(i))}catch(e){throw new Error("Invalid Signature")}},r.prototype._processSignature=function(e,t,n){var i={common:this.common};return r.fromTxData({chainId:this.chainId,nonce:this.nonce,gasPrice:this.gasPrice,gasLimit:this.gasLimit,to:this.to,value:this.value,data:this.data,accessList:this.accessList,v:new s.BN(e-27),r:new s.BN(t),s:new s.BN(n)},i)},r.prototype.toJSON=function(){var e=c.AccessLists.getAccessListJSON(this.accessList);return{chainId:(0,s.bnToHex)(this.chainId),nonce:(0,s.bnToHex)(this.nonce),gasPrice:(0,s.bnToHex)(this.gasPrice),gasLimit:(0,s.bnToHex)(this.gasLimit),to:void 0!==this.to?this.to.toString():void 0,value:(0,s.bnToHex)(this.value),data:"0x"+this.data.toString("hex"),accessList:e,v:void 0!==this.v?(0,s.bnToHex)(this.v):void 0,r:void 0!==this.r?(0,s.bnToHex)(this.r):void 0,s:void 0!==this.s?(0,s.bnToHex)(this.s):void 0}},r}(f.BaseTransaction);t.default=l}).call(this,r(1).Buffer)},function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var n=r(28),i=r(232),o=function(){function t(){}return t.fromTxData=function(e,t){if(void 0===t&&(t={}),"type"in e&&void 0!==e.type){var r=new n.BN((0,n.toBuffer)(e.type)).toNumber();if(0===r)return i.Transaction.fromTxData(e,t);if(1===r)return i.AccessListEIP2930Transaction.fromTxData(e,t);if(2===r)return i.FeeMarketEIP1559Transaction.fromTxData(e,t);throw new Error("Tx instantiation with type "+r+" not supported")}return i.Transaction.fromTxData(e,t)},t.fromSerializedData=function(e,t){if(void 0===t&&(t={}),e[0]<=127){var r=void 0;switch(e[0]){case 1:r=2930;break;case 2:r=1559;break;default:throw new Error("TypedTransaction with ID "+e[0]+" unknown")}return 1559===r?i.FeeMarketEIP1559Transaction.fromSerializedTx(e,t):i.AccessListEIP2930Transaction.fromSerializedTx(e,t)}return i.Transaction.fromSerializedTx(e,t)},t.fromBlockBodyData=function(t,r){if(void 0===r&&(r={}),e.isBuffer(t))return this.fromSerializedData(t,r);if(Array.isArray(t))return i.Transaction.fromValuesArray(t,r);throw new Error("Cannot decode transaction: unknown type input")},t.getTransactionClass=function(e,t){if(void 0===e&&(e=0),0==e||e>=128&&e<=255)return i.Transaction;switch(e){case 1:return i.AccessListEIP2930Transaction;case 2:return i.FeeMarketEIP1559Transaction;default:throw new Error("TypedTransaction with ID "+e+" unknown")}},t}();t.default=o}).call(this,r(1).Buffer)},function(e,t,r){"use strict";(function(e){var n,i=(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),o=function(){return(o=Object.assign||function(e){for(var t,r=1,n=arguments.length;r0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a};Object.defineProperty(t,"__esModule",{value:!0});var s=r(28),f=r(119),u=r(53),c=r(233),d=e.from(2..toString(16).padStart(2,"0"),"hex"),l=function(t){function r(e,r){var n,i;void 0===r&&(r={});var a=t.call(this,o(o({},e),{type:2}))||this;a.DEFAULT_HARDFORK="london";var f=e.chainId,d=e.accessList,l=e.maxFeePerGas,h=e.maxPriorityFeePerGas;if(a.common=a._getCommon(r.common,f),a.chainId=a.common.chainIdBN(),!a.common.isActivatedEIP(1559))throw new Error("EIP-1559 not enabled on Common");a.activeCapabilities=a.activeCapabilities.concat([1559,2718,2930]);var p=c.AccessLists.getAccessListData(null!=d?d:[]);if(a.accessList=p.accessList,a.AccessListJSON=p.AccessListJSON,c.AccessLists.verifyAccessList(a.accessList),a.maxFeePerGas=new s.BN((0,s.toBuffer)(""===l?"0x":l)),a.maxPriorityFeePerGas=new s.BN((0,s.toBuffer)(""===h?"0x":h)),a._validateCannotExceedMaxInteger({maxFeePerGas:a.maxFeePerGas,maxPriorityFeePerGas:a.maxPriorityFeePerGas},256),a.maxFeePerGas.lt(a.maxPriorityFeePerGas))throw new Error("maxFeePerGas cannot be less than maxPriorityFeePerGas (The total must be the larger of the two)");if(a.v&&!a.v.eqn(0)&&!a.v.eqn(1))throw new Error("The y-parity of the transaction should either be 0 or 1");if(a.common.gteHardfork("homestead")&&(null===(n=a.s)||void 0===n?void 0:n.gt(u.N_DIV_2)))throw new Error("Invalid Signature: s-values greater than secp256k1n/2 are considered invalid");return(null===(i=null==r?void 0:r.freeze)||void 0===i||i)&&Object.freeze(a),a}return i(r,t),Object.defineProperty(r.prototype,"senderR",{get:function(){return this.r},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"senderS",{get:function(){return this.s},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"yParity",{get:function(){return this.v},enumerable:!1,configurable:!0}),r.fromTxData=function(e,t){return void 0===t&&(t={}),new r(e,t)},r.fromSerializedTx=function(e,t){if(void 0===t&&(t={}),!e.slice(0,1).equals(d))throw new Error("Invalid serialized tx input: not an EIP-1559 transaction (wrong tx type, expected: 2, received: "+e.slice(0,1).toString("hex"));var n=s.rlp.decode(e.slice(1));if(!Array.isArray(n))throw new Error("Invalid serialized tx input: must be array");return r.fromValuesArray(n,t)},r.fromRlpSerializedTx=function(e,t){return void 0===t&&(t={}),r.fromSerializedTx(e,t)},r.fromValuesArray=function(e,t){if(void 0===t&&(t={}),9!==e.length&&12!==e.length)throw new Error("Invalid EIP-1559 transaction. Only expecting 9 values (for unsigned tx) or 12 values (for signed tx).");var n=a(e,12),i=n[0],o=n[1],f=n[2],u=n[3],c=n[4],d=n[5],l=n[6],h=n[7],p=n[8],b=n[9],y=n[10],v=n[11];return new r({chainId:new s.BN(i),nonce:o,maxPriorityFeePerGas:f,maxFeePerGas:u,gasLimit:c,to:d,value:l,data:h,accessList:null!=p?p:[],v:void 0!==b?new s.BN(b):void 0,r:y,s:v},t)},r.prototype.getDataFee=function(){var e=t.prototype.getDataFee.call(this);return e.iaddn(c.AccessLists.getDataFeeEIP2930(this.accessList,this.common)),e},r.prototype.getUpfrontCost=function(e){void 0===e&&(e=new s.BN(0));var t=s.BN.min(this.maxPriorityFeePerGas,this.maxFeePerGas.sub(e)).add(e);return this.gasLimit.mul(t).add(this.value)},r.prototype.raw=function(){return[(0,s.bnToUnpaddedBuffer)(this.chainId),(0,s.bnToUnpaddedBuffer)(this.nonce),(0,s.bnToUnpaddedBuffer)(this.maxPriorityFeePerGas),(0,s.bnToUnpaddedBuffer)(this.maxFeePerGas),(0,s.bnToUnpaddedBuffer)(this.gasLimit),void 0!==this.to?this.to.buf:e.from([]),(0,s.bnToUnpaddedBuffer)(this.value),this.data,this.accessList,void 0!==this.v?(0,s.bnToUnpaddedBuffer)(this.v):e.from([]),void 0!==this.r?(0,s.bnToUnpaddedBuffer)(this.r):e.from([]),void 0!==this.s?(0,s.bnToUnpaddedBuffer)(this.s):e.from([])]},r.prototype.serialize=function(){var t=this.raw();return e.concat([d,s.rlp.encode(t)])},r.prototype.getMessageToSign=function(t){void 0===t&&(t=!0);var r=this.raw().slice(0,9),n=e.concat([d,s.rlp.encode(r)]);return t?(0,s.keccak256)(n):n},r.prototype.hash=function(){if(!this.isSigned())throw new Error("Cannot call hash method if transaction is not signed");return Object.isFrozen(this)?(this.cache.hash||(this.cache.hash=(0,s.keccak256)(this.serialize())),this.cache.hash):(0,s.keccak256)(this.serialize())},r.prototype.getMessageToVerifySignature=function(){return this.getMessageToSign()},r.prototype.getSenderPublicKey=function(){var e;if(!this.isSigned())throw new Error("Cannot call this method if transaction is not signed");var t=this.getMessageToVerifySignature();if(this.common.gteHardfork("homestead")&&(null===(e=this.s)||void 0===e?void 0:e.gt(u.N_DIV_2)))throw new Error("Invalid Signature: s-values greater than secp256k1n/2 are considered invalid");var r=this.v,n=this.r,i=this.s;try{return(0,s.ecrecover)(t,r.addn(27),(0,s.bnToUnpaddedBuffer)(n),(0,s.bnToUnpaddedBuffer)(i))}catch(e){throw new Error("Invalid Signature")}},r.prototype._processSignature=function(e,t,n){var i={common:this.common};return r.fromTxData({chainId:this.chainId,nonce:this.nonce,maxPriorityFeePerGas:this.maxPriorityFeePerGas,maxFeePerGas:this.maxFeePerGas,gasLimit:this.gasLimit,to:this.to,value:this.value,data:this.data,accessList:this.accessList,v:new s.BN(e-27),r:new s.BN(t),s:new s.BN(n)},i)},r.prototype.toJSON=function(){var e=c.AccessLists.getAccessListJSON(this.accessList);return{chainId:(0,s.bnToHex)(this.chainId),nonce:(0,s.bnToHex)(this.nonce),maxPriorityFeePerGas:(0,s.bnToHex)(this.maxPriorityFeePerGas),maxFeePerGas:(0,s.bnToHex)(this.maxFeePerGas),gasLimit:(0,s.bnToHex)(this.gasLimit),to:void 0!==this.to?this.to.toString():void 0,value:(0,s.bnToHex)(this.value),data:"0x"+this.data.toString("hex"),accessList:e,v:void 0!==this.v?(0,s.bnToHex)(this.v):void 0,r:void 0!==this.r?(0,s.bnToHex)(this.r):void 0,s:void 0!==this.s?(0,s.bnToHex)(this.s):void 0}},r}(f.BaseTransaction);t.default=l}).call(this,r(1).Buffer)},function(e,t,r){"use strict";var n=Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]},i=function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.isHexString=t.getKeys=t.fromAscii=t.fromUtf8=t.toAscii=t.arrayContainsArray=t.getBinarySize=t.padToEven=t.stripHexPrefix=t.isHexPrefixed=void 0,i(r(234),t),i(r(235),t),i(r(601),t),i(r(123),t),i(r(602),t),i(r(40),t),i(r(603),t),i(r(604),t),i(r(126),t);var o=r(54);Object.defineProperty(t,"isHexPrefixed",{enumerable:!0,get:function(){return o.isHexPrefixed}}),Object.defineProperty(t,"stripHexPrefix",{enumerable:!0,get:function(){return o.stripHexPrefix}}),Object.defineProperty(t,"padToEven",{enumerable:!0,get:function(){return o.padToEven}}),Object.defineProperty(t,"getBinarySize",{enumerable:!0,get:function(){return o.getBinarySize}}),Object.defineProperty(t,"arrayContainsArray",{enumerable:!0,get:function(){return o.arrayContainsArray}}),Object.defineProperty(t,"toAscii",{enumerable:!0,get:function(){return o.toAscii}}),Object.defineProperty(t,"fromUtf8",{enumerable:!0,get:function(){return o.fromUtf8}}),Object.defineProperty(t,"fromAscii",{enumerable:!0,get:function(){return o.fromAscii}}),Object.defineProperty(t,"getKeys",{enumerable:!0,get:function(){return o.getKeys}}),Object.defineProperty(t,"isHexString",{enumerable:!0,get:function(){return o.isHexString}})},function(e,t,r){"use strict";function n(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return i(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return i(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,f=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return s=e.done,e},e:function(e){f=!0,a=e},f:function(){try{s||null==r.return||r.return()}finally{if(f)throw a}}}}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&void 0!==arguments[0]?arguments[0]:function(e){return new Uint8Array(e)},t=arguments.length>1?arguments[1]:void 0;return"function"==typeof e&&(e=e(t)),m("output",e,t),e}function _(e){return Object.prototype.toString.call(e).slice(8,-1)}e.exports=function(e){return{contextRandomize:function(t){switch(v(null===t||t instanceof Uint8Array,"Expected seed to be an Uint8Array or null"),null!==t&&m("seed",t,32),e.contextRandomize(t)){case 1:throw new Error(f)}},privateKeyVerify:function(t){return m("private key",t,32),0===e.privateKeyVerify(t)},privateKeyNegate:function(t){switch(m("private key",t,32),e.privateKeyNegate(t)){case 0:return t;case 1:throw new Error(o)}},privateKeyTweakAdd:function(t,r){switch(m("private key",t,32),m("tweak",r,32),e.privateKeyTweakAdd(t,r)){case 0:return t;case 1:throw new Error(a)}},privateKeyTweakMul:function(t,r){switch(m("private key",t,32),m("tweak",r,32),e.privateKeyTweakMul(t,r)){case 0:return t;case 1:throw new Error(s)}},publicKeyVerify:function(t){return m("public key",t,[33,65]),0===e.publicKeyVerify(t)},publicKeyCreate:function(t){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2?arguments[2]:void 0;switch(m("private key",t,32),g(r),n=w(n,r?33:65),e.publicKeyCreate(n,t)){case 0:return n;case 1:throw new Error(u);case 2:throw new Error(d)}},publicKeyConvert:function(t){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2?arguments[2]:void 0;switch(m("public key",t,[33,65]),g(r),n=w(n,r?33:65),e.publicKeyConvert(n,t)){case 0:return n;case 1:throw new Error(c);case 2:throw new Error(d)}},publicKeyNegate:function(t){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2?arguments[2]:void 0;switch(m("public key",t,[33,65]),g(r),n=w(n,r?33:65),e.publicKeyNegate(n,t)){case 0:return n;case 1:throw new Error(c);case 2:throw new Error(o);case 3:throw new Error(d)}},publicKeyCombine:function(t){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2?arguments[2]:void 0;v(Array.isArray(t),"Expected public keys to be an Array"),v(t.length>0,"Expected public keys array will have more than zero items");var o,a=n(t);try{for(a.s();!(o=a.n()).done;){var s=o.value;m("public key",s,[33,65])}}catch(e){a.e(e)}finally{a.f()}switch(g(r),i=w(i,r?33:65),e.publicKeyCombine(i,t)){case 0:return i;case 1:throw new Error(c);case 2:throw new Error(l);case 3:throw new Error(d)}},publicKeyTweakAdd:function(t,r){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=arguments.length>3?arguments[3]:void 0;switch(m("public key",t,[33,65]),m("tweak",r,32),g(n),i=w(i,n?33:65),e.publicKeyTweakAdd(i,t,r)){case 0:return i;case 1:throw new Error(c);case 2:throw new Error(a)}},publicKeyTweakMul:function(t,r){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=arguments.length>3?arguments[3]:void 0;switch(m("public key",t,[33,65]),m("tweak",r,32),g(n),i=w(i,n?33:65),e.publicKeyTweakMul(i,t,r)){case 0:return i;case 1:throw new Error(c);case 2:throw new Error(s)}},signatureNormalize:function(t){switch(m("signature",t,64),e.signatureNormalize(t)){case 0:return t;case 1:throw new Error(h)}},signatureExport:function(t,r){m("signature",t,64);var n={output:r=w(r,72),outputlen:72};switch(e.signatureExport(n,t)){case 0:return r.slice(0,n.outputlen);case 1:throw new Error(h);case 2:throw new Error(o)}},signatureImport:function(t,r){switch(m("signature",t),r=w(r,64),e.signatureImport(r,t)){case 0:return r;case 1:throw new Error(h);case 2:throw new Error(o)}},ecdsaSign:function(t,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;m("message",t,32),m("private key",r,32),v("Object"===_(n),"Expected options to be an Object"),void 0!==n.data&&m("options.data",n.data),void 0!==n.noncefn&&v("Function"===_(n.noncefn),"Expected options.noncefn to be a Function");var a={signature:i=w(i,64),recid:null};switch(e.ecdsaSign(a,t,r,n.data,n.noncefn)){case 0:return a;case 1:throw new Error(p);case 2:throw new Error(o)}},ecdsaVerify:function(t,r,n){switch(m("signature",t,64),m("message",r,32),m("public key",n,[33,65]),e.ecdsaVerify(t,r,n)){case 0:return!0;case 3:return!1;case 1:throw new Error(h);case 2:throw new Error(c)}},ecdsaRecover:function(t,r,n){var i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],a=arguments.length>4?arguments[4]:void 0;switch(m("signature",t,64),v("Number"===_(r)&&r>=0&&r<=3,"Expected recovery id to be a Number within interval [0, 3]"),m("message",n,32),g(i),a=w(a,i?33:65),e.ecdsaRecover(a,t,r,n)){case 0:return a;case 1:throw new Error(h);case 2:throw new Error(b);case 3:throw new Error(o)}},ecdh:function(t,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;switch(m("public key",t,[33,65]),m("private key",r,32),v("Object"===_(n),"Expected options to be an Object"),void 0!==n.data&&m("options.data",n.data),void 0!==n.hashfn?(v("Function"===_(n.hashfn),"Expected options.hashfn to be a Function"),void 0!==n.xbuf&&m("options.xbuf",n.xbuf,32),void 0!==n.ybuf&&m("options.ybuf",n.ybuf,32),m("output",i)):i=w(i,32),e.ecdh(i,t,r,n.data,n.hashfn,n.xbuf,n.ybuf)){case 0:return i;case 1:throw new Error(c);case 2:throw new Error(y)}}}}},function(e,t,r){"use strict";var n=new(0,r(554).ec)("secp256k1"),i=n.curve,o=i.n.constructor;function a(e){var t=e[0];switch(t){case 2:case 3:return 33!==e.length?null:function(e,t){var r=new o(t);if(r.cmp(i.p)>=0)return null;var a=(r=r.toRed(i.red)).redSqr().redIMul(r).redIAdd(i.b).redSqrt();return 3===e!==a.isOdd()&&(a=a.redNeg()),n.keyPair({pub:{x:r,y:a}})}(t,e.subarray(1,33));case 4:case 6:case 7:return 65!==e.length?null:function(e,t,r){var a=new o(t),s=new o(r);if(a.cmp(i.p)>=0||s.cmp(i.p)>=0)return null;if(a=a.toRed(i.red),s=s.toRed(i.red),(6===e||7===e)&&s.isOdd()!==(7===e))return null;var f=a.redSqr().redIMul(a);return s.redSqr().redISub(f.redIAdd(i.b)).isZero()?n.keyPair({pub:{x:a,y:s}}):null}(t,e.subarray(1,33),e.subarray(33,65));default:return null}}function s(e,t){for(var r=t.encode(null,33===e.length),n=0;n=0)return 1;if(r.iadd(new o(e)),r.cmp(i.n)>=0&&r.isub(i.n),r.isZero())return 1;var n=r.toArrayLike(Uint8Array,"be",32);return e.set(n),0},privateKeyTweakMul:function(e,t){var r=new o(t);if(r.cmp(i.n)>=0||r.isZero())return 1;r.imul(new o(e)),r.cmp(i.n)>=0&&(r=r.umod(i.n));var n=r.toArrayLike(Uint8Array,"be",32);return e.set(n),0},publicKeyVerify:function(e){return null===a(e)?1:0},publicKeyCreate:function(e,t){var r=new o(t);return r.cmp(i.n)>=0||r.isZero()?1:(s(e,n.keyFromPrivate(t).getPublic()),0)},publicKeyConvert:function(e,t){var r=a(t);return null===r?1:(s(e,r.getPublic()),0)},publicKeyNegate:function(e,t){var r=a(t);if(null===r)return 1;var n=r.getPublic();return n.y=n.y.redNeg(),s(e,n),0},publicKeyCombine:function(e,t){for(var r=new Array(t.length),n=0;n=0)return 2;var f=n.getPublic().add(i.g.mul(r));return f.isInfinity()?2:(s(e,f),0)},publicKeyTweakMul:function(e,t,r){var n=a(t);return null===n?1:(r=new o(r)).cmp(i.n)>=0||r.isZero()?2:(s(e,n.getPublic().mul(r)),0)},signatureNormalize:function(e){var t=new o(e.subarray(0,32)),r=new o(e.subarray(32,64));return t.cmp(i.n)>=0||r.cmp(i.n)>=0?1:(1===r.cmp(n.nh)&&e.set(i.n.sub(r).toArrayLike(Uint8Array,"be",32),32),0)},signatureExport:function(e,t){var r=t.subarray(0,32),n=t.subarray(32,64);if(new o(r).cmp(i.n)>=0)return 1;if(new o(n).cmp(i.n)>=0)return 1;var a=e.output,s=a.subarray(4,37);s[0]=0,s.set(r,1);for(var f=33,u=0;f>1&&0===s[u]&&!(128&s[u+1]);--f,++u);if(128&(s=s.subarray(u))[0])return 1;if(f>1&&0===s[0]&&!(128&s[1]))return 1;var c=a.subarray(39,72);c[0]=0,c.set(n,1);for(var d=33,l=0;d>1&&0===c[l]&&!(128&c[l+1]);--d,++l);return 128&(c=c.subarray(l))[0]||d>1&&0===c[0]&&!(128&c[1])?1:(e.outputlen=6+f+d,a[0]=48,a[1]=e.outputlen-2,a[2]=2,a[3]=s.length,a.set(s,4),a[4+f]=2,a[5+f]=c.length,a.set(c,6+f),0)},signatureImport:function(e,t){if(t.length<8)return 1;if(t.length>72)return 1;if(48!==t[0])return 1;if(t[1]!==t.length-2)return 1;if(2!==t[2])return 1;var r=t[3];if(0===r)return 1;if(5+r>=t.length)return 1;if(2!==t[4+r])return 1;var n=t[5+r];if(0===n)return 1;if(6+r+n!==t.length)return 1;if(128&t[4])return 1;if(r>1&&0===t[4]&&!(128&t[5]))return 1;if(128&t[r+6])return 1;if(n>1&&0===t[r+6]&&!(128&t[r+7]))return 1;var a=t.subarray(4,4+r);if(33===a.length&&0===a[0]&&(a=a.subarray(1)),a.length>32)return 1;var s=t.subarray(6+r);if(33===s.length&&0===s[0]&&(s=s.slice(1)),s.length>32)throw new Error("S length is too long");var f=new o(a);f.cmp(i.n)>=0&&(f=new o(0));var u=new o(t.subarray(6+r));return u.cmp(i.n)>=0&&(u=new o(0)),e.set(f.toArrayLike(Uint8Array,"be",32),0),e.set(u.toArrayLike(Uint8Array,"be",32),32),0},ecdsaSign:function(e,t,r,a,s){if(s){var f=s;s=function(e){var n=f(t,r,null,a,e);if(!(n instanceof Uint8Array&&32===n.length))throw new Error("This is the way");return new o(n)}}var u,c=new o(r);if(c.cmp(i.n)>=0||c.isZero())return 1;try{u=n.sign(t,r,{canonical:!0,k:s,pers:a})}catch(e){return 1}return e.signature.set(u.r.toArrayLike(Uint8Array,"be",32),0),e.signature.set(u.s.toArrayLike(Uint8Array,"be",32),32),e.recid=u.recoveryParam,0},ecdsaVerify:function(e,t,r){var s={r:e.subarray(0,32),s:e.subarray(32,64)},f=new o(s.r),u=new o(s.s);if(f.cmp(i.n)>=0||u.cmp(i.n)>=0)return 1;if(1===u.cmp(n.nh)||f.isZero()||u.isZero())return 3;var c=a(r);if(null===c)return 2;var d=c.getPublic();return n.verify(t,s,d)?0:3},ecdsaRecover:function(e,t,r,a){var f,u={r:t.slice(0,32),s:t.slice(32,64)},c=new o(u.r),d=new o(u.s);if(c.cmp(i.n)>=0||d.cmp(i.n)>=0)return 1;if(c.isZero()||d.isZero())return 2;try{f=n.recoverPubKey(a,u,r)}catch(e){return 2}return s(e,f),0},ecdh:function(e,t,r,s,f,u,c){var d=a(t);if(null===d)return 1;var l=new o(r);if(l.cmp(i.n)>=0||l.isZero())return 2;var h=d.getPublic().mul(l);if(void 0===f)for(var p=h.encode(null,!0),b=n.hash().update(p).digest(),y=0;y<32;++y)e[y]=b[y];else{u||(u=new Uint8Array(32));for(var v=h.getX().toArray("be",32),m=0;m<32;++m)u[m]=v[m];c||(c=new Uint8Array(32));for(var g=h.getY().toArray("be",32),w=0;w<32;++w)c[w]=g[w];var _=f(u,c,s);if(!(_ instanceof Uint8Array&&_.length===e.length))return 2;e.set(_)}return 0}}},function(e,t,r){"use strict";var n=t;n.version=r(555).version,n.utils=r(22),n.rand=r(239),n.curve=r(240),n.curves=r(121),n.ec=r(567),n.eddsa=r(571)},function(e){e.exports=JSON.parse('{"_args":[["elliptic@6.5.4","/home/user1/Desktop/work/web3_releases/1.7.5/1.7.5-rc.0/web3.js/packages/web3-eth-accounts"]],"_from":"elliptic@6.5.4","_id":"elliptic@6.5.4","_inBundle":false,"_integrity":"sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==","_location":"/elliptic","_phantomChildren":{},"_requested":{"type":"version","registry":true,"raw":"elliptic@6.5.4","name":"elliptic","escapedName":"elliptic","rawSpec":"6.5.4","saveSpec":null,"fetchSpec":"6.5.4"},"_requiredBy":["/ethereumjs-util/secp256k1"],"_resolved":"https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz","_spec":"6.5.4","_where":"/home/user1/Desktop/work/web3_releases/1.7.5/1.7.5-rc.0/web3.js/packages/web3-eth-accounts","author":{"name":"Fedor Indutny","email":"fedor@indutny.com"},"bugs":{"url":"https://github.com/indutny/elliptic/issues"},"dependencies":{"bn.js":"^4.11.9","brorand":"^1.1.0","hash.js":"^1.0.0","hmac-drbg":"^1.0.1","inherits":"^2.0.4","minimalistic-assert":"^1.0.1","minimalistic-crypto-utils":"^1.0.1"},"description":"EC cryptography","devDependencies":{"brfs":"^2.0.2","coveralls":"^3.1.0","eslint":"^7.6.0","grunt":"^1.2.1","grunt-browserify":"^5.3.0","grunt-cli":"^1.3.2","grunt-contrib-connect":"^3.0.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-uglify":"^5.0.0","grunt-mocha-istanbul":"^5.0.2","grunt-saucelabs":"^9.0.1","istanbul":"^0.4.5","mocha":"^8.0.1"},"files":["lib"],"homepage":"https://github.com/indutny/elliptic","keywords":["EC","Elliptic","curve","Cryptography"],"license":"MIT","main":"lib/elliptic.js","name":"elliptic","repository":{"type":"git","url":"git+ssh://git@github.com/indutny/elliptic.git"},"scripts":{"lint":"eslint lib test","lint:fix":"npm run lint -- --fix","test":"npm run lint && npm run unit","unit":"istanbul test _mocha --reporter=spec test/index.js","version":"grunt dist && git add dist/"},"version":"6.5.4"}')},function(e,t){},function(e,t,r){"use strict";var n=r(22),i=r(3),o=r(10),a=r(88),s=n.assert;function f(e){a.call(this,"short",e),this.a=new i(e.a,16).toRed(this.red),this.b=new i(e.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(e),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function u(e,t,r,n){a.BasePoint.call(this,e,"affine"),null===t&&null===r?(this.x=null,this.y=null,this.inf=!0):(this.x=new i(t,16),this.y=new i(r,16),n&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function c(e,t,r,n){a.BasePoint.call(this,e,"jacobian"),null===t&&null===r&&null===n?(this.x=this.curve.one,this.y=this.curve.one,this.z=new i(0)):(this.x=new i(t,16),this.y=new i(r,16),this.z=new i(n,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}o(f,a),e.exports=f,f.prototype._getEndomorphism=function(e){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var t,r;if(e.beta)t=new i(e.beta,16).toRed(this.red);else{var n=this._getEndoRoots(this.p);t=(t=n[0].cmp(n[1])<0?n[0]:n[1]).toRed(this.red)}if(e.lambda)r=new i(e.lambda,16);else{var o=this._getEndoRoots(this.n);0===this.g.mul(o[0]).x.cmp(this.g.x.redMul(t))?r=o[0]:(r=o[1],s(0===this.g.mul(r).x.cmp(this.g.x.redMul(t))))}return{beta:t,lambda:r,basis:e.basis?e.basis.map((function(e){return{a:new i(e.a,16),b:new i(e.b,16)}})):this._getEndoBasis(r)}}},f.prototype._getEndoRoots=function(e){var t=e===this.p?this.red:i.mont(e),r=new i(2).toRed(t).redInvm(),n=r.redNeg(),o=new i(3).toRed(t).redNeg().redSqrt().redMul(r);return[n.redAdd(o).fromRed(),n.redSub(o).fromRed()]},f.prototype._getEndoBasis=function(e){for(var t,r,n,o,a,s,f,u,c,d=this.n.ushrn(Math.floor(this.n.bitLength()/2)),l=e,h=this.n.clone(),p=new i(1),b=new i(0),y=new i(0),v=new i(1),m=0;0!==l.cmpn(0);){var g=h.div(l);u=h.sub(g.mul(l)),c=y.sub(g.mul(p));var w=v.sub(g.mul(b));if(!n&&u.cmp(d)<0)t=f.neg(),r=p,n=u.neg(),o=c;else if(n&&2==++m)break;f=u,h=l,l=u,y=p,p=c,v=b,b=w}a=u.neg(),s=c;var _=n.sqr().add(o.sqr());return a.sqr().add(s.sqr()).cmp(_)>=0&&(a=t,s=r),n.negative&&(n=n.neg(),o=o.neg()),a.negative&&(a=a.neg(),s=s.neg()),[{a:n,b:o},{a:a,b:s}]},f.prototype._endoSplit=function(e){var t=this.endo.basis,r=t[0],n=t[1],i=n.b.mul(e).divRound(this.n),o=r.b.neg().mul(e).divRound(this.n),a=i.mul(r.a),s=o.mul(n.a),f=i.mul(r.b),u=o.mul(n.b);return{k1:e.sub(a).sub(s),k2:f.add(u).neg()}},f.prototype.pointFromX=function(e,t){(e=new i(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),n=r.redSqrt();if(0!==n.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");var o=n.fromRed().isOdd();return(t&&!o||!t&&o)&&(n=n.redNeg()),this.point(e,n)},f.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,r=e.y,n=this.a.redMul(t),i=t.redSqr().redMul(t).redIAdd(n).redIAdd(this.b);return 0===r.redSqr().redISub(i).cmpn(0)},f.prototype._endoWnafMulAdd=function(e,t,r){for(var n=this._endoWnafT1,i=this._endoWnafT2,o=0;o":""},u.prototype.isInfinity=function(){return this.inf},u.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(0===this.x.cmp(e.x))return this.curve.point(null,null);var t=this.y.redSub(e.y);0!==t.cmpn(0)&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var r=t.redSqr().redISub(this.x).redISub(e.x),n=t.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,n)},u.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(0===e.cmpn(0))return this.curve.point(null,null);var t=this.curve.a,r=this.x.redSqr(),n=e.redInvm(),i=r.redAdd(r).redIAdd(r).redIAdd(t).redMul(n),o=i.redSqr().redISub(this.x.redAdd(this.x)),a=i.redMul(this.x.redSub(o)).redISub(this.y);return this.curve.point(o,a)},u.prototype.getX=function(){return this.x.fromRed()},u.prototype.getY=function(){return this.y.fromRed()},u.prototype.mul=function(e){return e=new i(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},u.prototype.mulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i):this.curve._wnafMulAdd(1,n,i,2)},u.prototype.jmulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i,!0):this.curve._wnafMulAdd(1,n,i,2,!0)},u.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||0===this.x.cmp(e.x)&&0===this.y.cmp(e.y))},u.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var r=this.precomputed,n=function(e){return e.neg()};t.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(n)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(n)}}}return t},u.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},o(c,a.BasePoint),f.prototype.jpoint=function(e,t,r){return new c(this,e,t,r)},c.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),r=this.x.redMul(t),n=this.y.redMul(t).redMul(e);return this.curve.point(r,n)},c.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},c.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),r=this.z.redSqr(),n=this.x.redMul(t),i=e.x.redMul(r),o=this.y.redMul(t.redMul(e.z)),a=e.y.redMul(r.redMul(this.z)),s=n.redSub(i),f=o.redSub(a);if(0===s.cmpn(0))return 0!==f.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var u=s.redSqr(),c=u.redMul(s),d=n.redMul(u),l=f.redSqr().redIAdd(c).redISub(d).redISub(d),h=f.redMul(d.redISub(l)).redISub(o.redMul(c)),p=this.z.redMul(e.z).redMul(s);return this.curve.jpoint(l,h,p)},c.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),r=this.x,n=e.x.redMul(t),i=this.y,o=e.y.redMul(t).redMul(this.z),a=r.redSub(n),s=i.redSub(o);if(0===a.cmpn(0))return 0!==s.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var f=a.redSqr(),u=f.redMul(a),c=r.redMul(f),d=s.redSqr().redIAdd(u).redISub(c).redISub(c),l=s.redMul(c.redISub(d)).redISub(i.redMul(u)),h=this.z.redMul(a);return this.curve.jpoint(d,l,h)},c.prototype.dblp=function(e){if(0===e)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var t;if(this.curve.zeroA||this.curve.threeA){var r=this;for(t=0;t=0)return!1;if(r.redIAdd(i),0===this.x.cmp(r))return!0}},c.prototype.inspect=function(){return this.isInfinity()?"":""},c.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},function(e,t,r){"use strict";var n=r(3),i=r(10),o=r(88),a=r(22);function s(e){o.call(this,"mont",e),this.a=new n(e.a,16).toRed(this.red),this.b=new n(e.b,16).toRed(this.red),this.i4=new n(4).toRed(this.red).redInvm(),this.two=new n(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function f(e,t,r){o.BasePoint.call(this,e,"projective"),null===t&&null===r?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new n(t,16),this.z=new n(r,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}i(s,o),e.exports=s,s.prototype.validate=function(e){var t=e.normalize().x,r=t.redSqr(),n=r.redMul(t).redAdd(r.redMul(this.a)).redAdd(t);return 0===n.redSqrt().redSqr().cmp(n)},i(f,o.BasePoint),s.prototype.decodePoint=function(e,t){return this.point(a.toArray(e,t),1)},s.prototype.point=function(e,t){return new f(this,e,t)},s.prototype.pointFromJSON=function(e){return f.fromJSON(this,e)},f.prototype.precompute=function(){},f.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},f.fromJSON=function(e,t){return new f(e,t[0],t[1]||e.one)},f.prototype.inspect=function(){return this.isInfinity()?"":""},f.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},f.prototype.dbl=function(){var e=this.x.redAdd(this.z).redSqr(),t=this.x.redSub(this.z).redSqr(),r=e.redSub(t),n=e.redMul(t),i=r.redMul(t.redAdd(this.curve.a24.redMul(r)));return this.curve.point(n,i)},f.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},f.prototype.diffAdd=function(e,t){var r=this.x.redAdd(this.z),n=this.x.redSub(this.z),i=e.x.redAdd(e.z),o=e.x.redSub(e.z).redMul(r),a=i.redMul(n),s=t.z.redMul(o.redAdd(a).redSqr()),f=t.x.redMul(o.redISub(a).redSqr());return this.curve.point(s,f)},f.prototype.mul=function(e){for(var t=e.clone(),r=this,n=this.curve.point(null,null),i=[];0!==t.cmpn(0);t.iushrn(1))i.push(t.andln(1));for(var o=i.length-1;o>=0;o--)0===i[o]?(r=r.diffAdd(n,this),n=n.dbl()):(n=r.diffAdd(n,this),r=r.dbl());return n},f.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},f.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},f.prototype.eq=function(e){return 0===this.getX().cmp(e.getX())},f.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},f.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},function(e,t,r){"use strict";var n=r(22),i=r(3),o=r(10),a=r(88),s=n.assert;function f(e){this.twisted=1!=(0|e.a),this.mOneA=this.twisted&&-1==(0|e.a),this.extended=this.mOneA,a.call(this,"edwards",e),this.a=new i(e.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new i(e.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new i(e.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),s(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1==(0|e.c)}function u(e,t,r,n,o){a.BasePoint.call(this,e,"projective"),null===t&&null===r&&null===n?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new i(t,16),this.y=new i(r,16),this.z=n?new i(n,16):this.curve.one,this.t=o&&new i(o,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}o(f,a),e.exports=f,f.prototype._mulA=function(e){return this.mOneA?e.redNeg():this.a.redMul(e)},f.prototype._mulC=function(e){return this.oneC?e:this.c.redMul(e)},f.prototype.jpoint=function(e,t,r,n){return this.point(e,t,r,n)},f.prototype.pointFromX=function(e,t){(e=new i(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr(),n=this.c2.redSub(this.a.redMul(r)),o=this.one.redSub(this.c2.redMul(this.d).redMul(r)),a=n.redMul(o.redInvm()),s=a.redSqrt();if(0!==s.redSqr().redSub(a).cmp(this.zero))throw new Error("invalid point");var f=s.fromRed().isOdd();return(t&&!f||!t&&f)&&(s=s.redNeg()),this.point(e,s)},f.prototype.pointFromY=function(e,t){(e=new i(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr(),n=r.redSub(this.c2),o=r.redMul(this.d).redMul(this.c2).redSub(this.a),a=n.redMul(o.redInvm());if(0===a.cmp(this.zero)){if(t)throw new Error("invalid point");return this.point(this.zero,e)}var s=a.redSqrt();if(0!==s.redSqr().redSub(a).cmp(this.zero))throw new Error("invalid point");return s.fromRed().isOdd()!==t&&(s=s.redNeg()),this.point(s,e)},f.prototype.validate=function(e){if(e.isInfinity())return!0;e.normalize();var t=e.x.redSqr(),r=e.y.redSqr(),n=t.redMul(this.a).redAdd(r),i=this.c2.redMul(this.one.redAdd(this.d.redMul(t).redMul(r)));return 0===n.cmp(i)},o(u,a.BasePoint),f.prototype.pointFromJSON=function(e){return u.fromJSON(this,e)},f.prototype.point=function(e,t,r,n){return new u(this,e,t,r,n)},u.fromJSON=function(e,t){return new u(e,t[0],t[1],t[2])},u.prototype.inspect=function(){return this.isInfinity()?"":""},u.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},u.prototype._extDbl=function(){var e=this.x.redSqr(),t=this.y.redSqr(),r=this.z.redSqr();r=r.redIAdd(r);var n=this.curve._mulA(e),i=this.x.redAdd(this.y).redSqr().redISub(e).redISub(t),o=n.redAdd(t),a=o.redSub(r),s=n.redSub(t),f=i.redMul(a),u=o.redMul(s),c=i.redMul(s),d=a.redMul(o);return this.curve.point(f,u,d,c)},u.prototype._projDbl=function(){var e,t,r,n,i,o,a=this.x.redAdd(this.y).redSqr(),s=this.x.redSqr(),f=this.y.redSqr();if(this.curve.twisted){var u=(n=this.curve._mulA(s)).redAdd(f);this.zOne?(e=a.redSub(s).redSub(f).redMul(u.redSub(this.curve.two)),t=u.redMul(n.redSub(f)),r=u.redSqr().redSub(u).redSub(u)):(i=this.z.redSqr(),o=u.redSub(i).redISub(i),e=a.redSub(s).redISub(f).redMul(o),t=u.redMul(n.redSub(f)),r=u.redMul(o))}else n=s.redAdd(f),i=this.curve._mulC(this.z).redSqr(),o=n.redSub(i).redSub(i),e=this.curve._mulC(a.redISub(n)).redMul(o),t=this.curve._mulC(n).redMul(s.redISub(f)),r=n.redMul(o);return this.curve.point(e,t,r)},u.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},u.prototype._extAdd=function(e){var t=this.y.redSub(this.x).redMul(e.y.redSub(e.x)),r=this.y.redAdd(this.x).redMul(e.y.redAdd(e.x)),n=this.t.redMul(this.curve.dd).redMul(e.t),i=this.z.redMul(e.z.redAdd(e.z)),o=r.redSub(t),a=i.redSub(n),s=i.redAdd(n),f=r.redAdd(t),u=o.redMul(a),c=s.redMul(f),d=o.redMul(f),l=a.redMul(s);return this.curve.point(u,c,l,d)},u.prototype._projAdd=function(e){var t,r,n=this.z.redMul(e.z),i=n.redSqr(),o=this.x.redMul(e.x),a=this.y.redMul(e.y),s=this.curve.d.redMul(o).redMul(a),f=i.redSub(s),u=i.redAdd(s),c=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(o).redISub(a),d=n.redMul(f).redMul(c);return this.curve.twisted?(t=n.redMul(u).redMul(a.redSub(this.curve._mulA(o))),r=f.redMul(u)):(t=n.redMul(u).redMul(a.redSub(o)),r=this.curve._mulC(f).redMul(u)),this.curve.point(d,t,r)},u.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)},u.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)},u.prototype.mulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!1)},u.prototype.jmulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!0)},u.prototype.normalize=function(){if(this.zOne)return this;var e=this.z.redInvm();return this.x=this.x.redMul(e),this.y=this.y.redMul(e),this.t&&(this.t=this.t.redMul(e)),this.z=this.curve.one,this.zOne=!0,this},u.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},u.prototype.getX=function(){return this.normalize(),this.x.fromRed()},u.prototype.getY=function(){return this.normalize(),this.y.fromRed()},u.prototype.eq=function(e){return this===e||0===this.getX().cmp(e.getX())&&0===this.getY().cmp(e.getY())},u.prototype.eqXToP=function(e){var t=e.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(t))return!0;for(var r=e.clone(),n=this.curve.redN.redMul(this.z);;){if(r.iadd(this.curve.n),r.cmp(this.curve.p)>=0)return!1;if(t.redIAdd(n),0===this.x.cmp(t))return!0}},u.prototype.toP=u.prototype.normalize,u.prototype.mixedAdd=u.prototype.add},function(e,t,r){"use strict";t.sha1=r(561),t.sha224=r(562),t.sha256=r(242),t.sha384=r(563),t.sha512=r(243)},function(e,t,r){"use strict";var n=r(26),i=r(70),o=r(241),a=n.rotl32,s=n.sum32,f=n.sum32_5,u=o.ft_1,c=i.BlockHash,d=[1518500249,1859775393,2400959708,3395469782];function l(){if(!(this instanceof l))return new l;c.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}n.inherits(l,c),e.exports=l,l.blockSize=512,l.outSize=160,l.hmacStrength=80,l.padLength=64,l.prototype._update=function(e,t){for(var r=this.W,n=0;n<16;n++)r[n]=e[t+n];for(;nthis.blockSize&&(e=(new this.Hash).update(e).digest()),i(e.length<=this.blockSize);for(var t=e.length;t0))return a.iaddn(1),this.keyFromPrivate(a)}},l.prototype._truncateToN=function(e,t){var r=8*e.byteLength()-this.n.bitLength();return r>0&&(e=e.ushrn(r)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e},l.prototype.sign=function(e,t,r,a){"object"===(0,n.default)(r)&&(a=r,r=null),a||(a={}),t=this.keyFromPrivate(t,r),e=this._truncateToN(new i(e,16));for(var s=this.n.byteLength(),f=t.getPrivate().toArray("be",s),u=e.toArray("be",s),c=new o({hash:this.hash,entropy:f,nonce:u,pers:a.pers,persEnc:a.persEnc||"utf8"}),l=this.n.sub(new i(1)),h=0;;h++){var p=a.k?a.k(h):new i(c.generate(this.n.byteLength()));if(!((p=this._truncateToN(p,!0)).cmpn(1)<=0||p.cmp(l)>=0)){var b=this.g.mul(p);if(!b.isInfinity()){var y=b.getX(),v=y.umod(this.n);if(0!==v.cmpn(0)){var m=p.invm(this.n).mul(v.mul(t.getPrivate()).iadd(e));if(0!==(m=m.umod(this.n)).cmpn(0)){var g=(b.getY().isOdd()?1:0)|(0!==y.cmp(v)?2:0);return a.canonical&&m.cmp(this.nh)>0&&(m=this.n.sub(m),g^=1),new d({r:v,s:m,recoveryParam:g})}}}}}},l.prototype.verify=function(e,t,r,n){e=this._truncateToN(new i(e,16)),r=this.keyFromPublic(r,n);var o=(t=new d(t,"hex")).r,a=t.s;if(o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;if(a.cmpn(1)<0||a.cmp(this.n)>=0)return!1;var s,f=a.invm(this.n),u=f.mul(e).umod(this.n),c=f.mul(o).umod(this.n);return this.curve._maxwellTrick?!(s=this.g.jmulAdd(u,r.getPublic(),c)).isInfinity()&&s.eqXToP(o):!(s=this.g.mulAdd(u,r.getPublic(),c)).isInfinity()&&0===s.getX().umod(this.n).cmp(o)},l.prototype.recoverPubKey=function(e,t,r,n){u((3&r)===r,"The recovery param is more than two bits"),t=new d(t,n);var o=this.n,a=new i(e),s=t.r,f=t.s,c=1&r,l=r>>1;if(s.cmp(this.curve.p.umod(this.curve.n))>=0&&l)throw new Error("Unable to find sencond key candinate");s=l?this.curve.pointFromX(s.add(this.curve.n),c):this.curve.pointFromX(s,c);var h=t.r.invm(o),p=o.sub(a).mul(h).umod(o),b=f.mul(h).umod(o);return this.g.mulAdd(p,s,b)},l.prototype.getKeyRecoveryParam=function(e,t,r,n){if(null!==(t=new d(t,n)).recoveryParam)return t.recoveryParam;for(var i=0;i<4;i++){var o;try{o=this.recoverPubKey(e,t,i)}catch(e){continue}if(o.eq(r))return i}throw new Error("Unable to find valid recovery factor")}},function(e,t,r){"use strict";var n=r(122),i=r(238),o=r(39);function a(e){if(!(this instanceof a))return new a(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var t=i.toArray(e.entropy,e.entropyEnc||"hex"),r=i.toArray(e.nonce,e.nonceEnc||"hex"),n=i.toArray(e.pers,e.persEnc||"hex");o(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,r,n)}e.exports=a,a.prototype._init=function(e,t,r){var n=e.concat(t).concat(r);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(r||[])),this._reseed=1},a.prototype.generate=function(e,t,r,n){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof t&&(n=r,r=t,t=null),r&&(r=i.toArray(r,n||"hex"),this._update(r));for(var o=[];o.length"}},function(e,t,r){"use strict";var n=r(3),i=r(22),o=i.assert;function a(e,t){if(e instanceof a)return e;this._importDER(e,t)||(o(e.r&&e.s,"Signature without r or s"),this.r=new n(e.r,16),this.s=new n(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}function s(){this.place=0}function f(e,t){var r=e[t.place++];if(!(128&r))return r;var n=15&r;if(0===n||n>4)return!1;for(var i=0,o=0,a=t.place;o>>=0;return!(i<=127)&&(t.place=a,i)}function u(e){for(var t=0,r=e.length-1;!e[t]&&!(128&e[t+1])&&t>>3);for(e.push(128|r);--r;)e.push(t>>>(r<<3)&255);e.push(t)}}e.exports=a,a.prototype._importDER=function(e,t){e=i.toArray(e,t);var r=new s;if(48!==e[r.place++])return!1;var o=f(e,r);if(!1===o)return!1;if(o+r.place!==e.length)return!1;if(2!==e[r.place++])return!1;var a=f(e,r);if(!1===a)return!1;var u=e.slice(r.place,a+r.place);if(r.place+=a,2!==e[r.place++])return!1;var c=f(e,r);if(!1===c)return!1;if(e.length!==c+r.place)return!1;var d=e.slice(r.place,c+r.place);if(0===u[0]){if(!(128&u[1]))return!1;u=u.slice(1)}if(0===d[0]){if(!(128&d[1]))return!1;d=d.slice(1)}return this.r=new n(u),this.s=new n(d),this.recoveryParam=null,!0},a.prototype.toDER=function(e){var t=this.r.toArray(),r=this.s.toArray();for(128&t[0]&&(t=[0].concat(t)),128&r[0]&&(r=[0].concat(r)),t=u(t),r=u(r);!(r[0]||128&r[1]);)r=r.slice(1);var n=[2];c(n,t.length),(n=n.concat(t)).push(2),c(n,r.length);var o=n.concat(r),a=[48];return c(a,o.length),a=a.concat(o),i.encode(a,e)}},function(e,t,r){"use strict";var n=r(122),i=r(121),o=r(22),a=o.assert,s=o.parseBytes,f=r(572),u=r(573);function c(e){if(a("ed25519"===e,"only tested with ed25519 so far"),!(this instanceof c))return new c(e);e=i[e].curve,this.curve=e,this.g=e.g,this.g.precompute(e.n.bitLength()+1),this.pointClass=e.point().constructor,this.encodingLength=Math.ceil(e.n.bitLength()/8),this.hash=n.sha512}e.exports=c,c.prototype.sign=function(e,t){e=s(e);var r=this.keyFromSecret(t),n=this.hashInt(r.messagePrefix(),e),i=this.g.mul(n),o=this.encodePoint(i),a=this.hashInt(o,r.pubBytes(),e).mul(r.priv()),f=n.add(a).umod(this.curve.n);return this.makeSignature({R:i,S:f,Rencoded:o})},c.prototype.verify=function(e,t,r){e=s(e),t=this.makeSignature(t);var n=this.keyFromPublic(r),i=this.hashInt(t.Rencoded(),n.pubBytes(),e),o=this.g.mul(t.S());return t.R().add(n.pub().mul(i)).eq(o)},c.prototype.hashInt=function(){for(var e=this.hash(),t=0;t4294967295)throw new RangeError("requested too many random bytes");var r=i.allocUnsafe(e);if(e>0)if(e>65536)for(var a=0;a0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r}},{key:"concat",value:function(e){if(0===this.length)return a.alloc(0);for(var t,r,n,i=a.allocUnsafe(e>>>0),o=this.head,s=0;o;)t=o.data,r=i,n=s,a.prototype.copy.call(t,r,n),s+=o.data.length,o=o.next;return i}},{key:"consume",value:function(e,t){var r;return ei.length?i.length:e;if(o===i.length?n+=i:n+=i.slice(0,e),0==(e-=o)){o===i.length?(++r,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=i.slice(o));break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(e){var t=a.allocUnsafe(e),r=this.head,n=1;for(r.data.copy(t),e-=r.data.length;r=r.next;){var i=r.data,o=e>i.length?i.length:e;if(i.copy(t,t.length-e,0,o),0==(e-=o)){o===i.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=i.slice(o));break}++n}return this.length-=n,t}},{key:f,value:function(e,t){return s(this,function(e){for(var t=1;t0,(function(e){n||(n=e),e&&a.forEach(u),o||(a.forEach(u),i(n))}))}));return t.reduce(c)}},function(e,t,r){"use strict";(function(t){var n=r(0),i=n(r(8)),o=n(r(9)),a=n(r(13)),s=n(r(14)),f=n(r(12));function u(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=(0,f.default)(e);if(t){var i=(0,f.default)(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return(0,s.default)(this,r)}}var c=r(124).Transform;e.exports=function(e){return function(r){(0,a.default)(s,r);var n=u(s);function s(t,r,o,a){var f;return(0,i.default)(this,s),(f=n.call(this,a))._rate=t,f._capacity=r,f._delimitedSuffix=o,f._options=a,f._state=new e,f._state.initialize(t,r),f._finalized=!1,f}return(0,o.default)(s,[{key:"_transform",value:function(e,t,r){var n=null;try{this.update(e,t)}catch(e){n=e}r(n)}},{key:"_flush",value:function(){}},{key:"_read",value:function(e){this.push(this.squeeze(e))}},{key:"update",value:function(e,r){if(!t.isBuffer(e)&&"string"!=typeof e)throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Squeeze already called");return t.isBuffer(e)||(e=t.from(e,r)),this._state.absorb(e),this}},{key:"squeeze",value:function(e,t){this._finalized||(this._finalized=!0,this._state.absorbLastFewBits(this._delimitedSuffix));var r=this._state.squeeze(e);return void 0!==t&&(r=r.toString(t)),r}},{key:"_resetState",value:function(){return this._state.initialize(this._rate,this._capacity),this}},{key:"_clone",value:function(){var e=new s(this._rate,this._capacity,this._delimitedSuffix,this._options);return this._state.copy(e._state),e._finalized=this._finalized,e}}]),s}(c)}}).call(this,r(1).Buffer)},function(e,t,r){"use strict";(function(t){var n=r(591);function i(){this.state=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this.blockSize=null,this.count=0,this.squeezing=!1}i.prototype.initialize=function(e,t){for(var r=0;r<50;++r)this.state[r]=0;this.blockSize=e/8,this.count=0,this.squeezing=!1},i.prototype.absorb=function(e){for(var t=0;t>>this.count%4*8&255,this.count+=1,this.count===this.blockSize&&(n.p1600(this.state),this.count=0);return r},i.prototype.copy=function(e){for(var t=0;t<50;++t)e.state[t]=this.state[t];e.blockSize=this.blockSize,e.count=this.count,e.squeezing=this.squeezing},e.exports=i}).call(this,r(1).Buffer)},function(e,t,r){"use strict";var n=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648];t.p1600=function(e){for(var t=0;t<24;++t){var r=e[0]^e[10]^e[20]^e[30]^e[40],i=e[1]^e[11]^e[21]^e[31]^e[41],o=e[2]^e[12]^e[22]^e[32]^e[42],a=e[3]^e[13]^e[23]^e[33]^e[43],s=e[4]^e[14]^e[24]^e[34]^e[44],f=e[5]^e[15]^e[25]^e[35]^e[45],u=e[6]^e[16]^e[26]^e[36]^e[46],c=e[7]^e[17]^e[27]^e[37]^e[47],d=e[8]^e[18]^e[28]^e[38]^e[48],l=e[9]^e[19]^e[29]^e[39]^e[49],h=d^(o<<1|a>>>31),p=l^(a<<1|o>>>31),b=e[0]^h,y=e[1]^p,v=e[10]^h,m=e[11]^p,g=e[20]^h,w=e[21]^p,_=e[30]^h,k=e[31]^p,S=e[40]^h,A=e[41]^p;h=r^(s<<1|f>>>31),p=i^(f<<1|s>>>31);var E=e[2]^h,x=e[3]^p,P=e[12]^h,O=e[13]^p,R=e[22]^h,T=e[23]^p,M=e[32]^h,I=e[33]^p,B=e[42]^h,C=e[43]^p;h=o^(u<<1|c>>>31),p=a^(c<<1|u>>>31);var j=e[4]^h,U=e[5]^p,N=e[14]^h,L=e[15]^p,F=e[24]^h,D=e[25]^p,q=e[34]^h,z=e[35]^p,H=e[44]^h,K=e[45]^p;h=s^(d<<1|l>>>31),p=f^(l<<1|d>>>31);var G=e[6]^h,V=e[7]^p,W=e[16]^h,J=e[17]^p,X=e[26]^h,Z=e[27]^p,Y=e[36]^h,$=e[37]^p,Q=e[46]^h,ee=e[47]^p;h=u^(r<<1|i>>>31),p=c^(i<<1|r>>>31);var te=e[8]^h,re=e[9]^p,ne=e[18]^h,ie=e[19]^p,oe=e[28]^h,ae=e[29]^p,se=e[38]^h,fe=e[39]^p,ue=e[48]^h,ce=e[49]^p,de=b,le=y,he=m<<4|v>>>28,pe=v<<4|m>>>28,be=g<<3|w>>>29,ye=w<<3|g>>>29,ve=k<<9|_>>>23,me=_<<9|k>>>23,ge=S<<18|A>>>14,we=A<<18|S>>>14,_e=E<<1|x>>>31,ke=x<<1|E>>>31,Se=O<<12|P>>>20,Ae=P<<12|O>>>20,Ee=R<<10|T>>>22,xe=T<<10|R>>>22,Pe=I<<13|M>>>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[27]=it^~we&ke,e[36]=Ne^~Xe&Ye,e[37]=Le^~Ze&$e,e[46]=ve^~Re&Me,e[47]=me^~Te&Ie,e[8]=ot^~de&Se,e[9]=at^~le&Ae,e[18]=Fe^~qe&Qe,e[19]=De^~ze&et,e[28]=ge^~_e&Be,e[29]=we^~ke&Ce,e[38]=Xe^~Ye&he,e[39]=Ze^~$e&pe,e[48]=Re^~Me&He,e[49]=Te^~Ie&Ke,e[0]^=n[2*t],e[1]^=n[2*t+1]}}},function(e,t,r){"use strict";var n=r(10),i=r(593),o=r(594),a=r(595),s=r(600);function f(e){s.call(this,"digest"),this._hash=e}n(f,s),f.prototype._update=function(e){this._hash.update(e)},f.prototype._final=function(){return this._hash.digest()},e.exports=function(e){return"md5"===(e=e.toLowerCase())?new i:"rmd160"===e||"ripemd160"===e?new o:new f(a(e))}},function(e,t,r){"use strict";var n=r(10),i=r(250),o=r(24).Buffer,a=new Array(16);function s(){i.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function f(e,t){return e<>>32-t}function u(e,t,r,n,i,o,a){return f(e+(t&r|~t&n)+i+o|0,a)+t|0}function c(e,t,r,n,i,o,a){return f(e+(t&n|r&~n)+i+o|0,a)+t|0}function d(e,t,r,n,i,o,a){return f(e+(t^r^n)+i+o|0,a)+t|0}function l(e,t,r,n,i,o,a){return f(e+(r^(t|~n))+i+o|0,a)+t|0}n(s,i),s.prototype._update=function(){for(var e=a,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);var r=this._a,n=this._b,i=this._c,o=this._d;r=u(r,n,i,o,e[0],3614090360,7),o=u(o,r,n,i,e[1],3905402710,12),i=u(i,o,r,n,e[2],606105819,17),n=u(n,i,o,r,e[3],3250441966,22),r=u(r,n,i,o,e[4],4118548399,7),o=u(o,r,n,i,e[5],1200080426,12),i=u(i,o,r,n,e[6],2821735955,17),n=u(n,i,o,r,e[7],4249261313,22),r=u(r,n,i,o,e[8],1770035416,7),o=u(o,r,n,i,e[9],2336552879,12),i=u(i,o,r,n,e[10],4294925233,17),n=u(n,i,o,r,e[11],2304563134,22),r=u(r,n,i,o,e[12],1804603682,7),o=u(o,r,n,i,e[13],4254626195,12),i=u(i,o,r,n,e[14],2792965006,17),r=c(r,n=u(n,i,o,r,e[15],1236535329,22),i,o,e[1],4129170786,5),o=c(o,r,n,i,e[6],3225465664,9),i=c(i,o,r,n,e[11],643717713,14),n=c(n,i,o,r,e[0],3921069994,20),r=c(r,n,i,o,e[5],3593408605,5),o=c(o,r,n,i,e[10],38016083,9),i=c(i,o,r,n,e[15],3634488961,14),n=c(n,i,o,r,e[4],3889429448,20),r=c(r,n,i,o,e[9],568446438,5),o=c(o,r,n,i,e[14],3275163606,9),i=c(i,o,r,n,e[3],4107603335,14),n=c(n,i,o,r,e[8],1163531501,20),r=c(r,n,i,o,e[13],2850285829,5),o=c(o,r,n,i,e[2],4243563512,9),i=c(i,o,r,n,e[7],1735328473,14),r=d(r,n=c(n,i,o,r,e[12],2368359562,20),i,o,e[5],4294588738,4),o=d(o,r,n,i,e[8],2272392833,11),i=d(i,o,r,n,e[11],1839030562,16),n=d(n,i,o,r,e[14],4259657740,23),r=d(r,n,i,o,e[1],2763975236,4),o=d(o,r,n,i,e[4],1272893353,11),i=d(i,o,r,n,e[7],4139469664,16),n=d(n,i,o,r,e[10],3200236656,23),r=d(r,n,i,o,e[13],681279174,4),o=d(o,r,n,i,e[0],3936430074,11),i=d(i,o,r,n,e[3],3572445317,16),n=d(n,i,o,r,e[6],76029189,23),r=d(r,n,i,o,e[9],3654602809,4),o=d(o,r,n,i,e[12],3873151461,11),i=d(i,o,r,n,e[15],530742520,16),r=l(r,n=d(n,i,o,r,e[2],3299628645,23),i,o,e[0],4096336452,6),o=l(o,r,n,i,e[7],1126891415,10),i=l(i,o,r,n,e[14],2878612391,15),n=l(n,i,o,r,e[5],4237533241,21),r=l(r,n,i,o,e[12],1700485571,6),o=l(o,r,n,i,e[3],2399980690,10),i=l(i,o,r,n,e[10],4293915773,15),n=l(n,i,o,r,e[1],2240044497,21),r=l(r,n,i,o,e[8],1873313359,6),o=l(o,r,n,i,e[15],4264355552,10),i=l(i,o,r,n,e[6],2734768916,15),n=l(n,i,o,r,e[13],1309151649,21),r=l(r,n,i,o,e[4],4149444226,6),o=l(o,r,n,i,e[11],3174756917,10),i=l(i,o,r,n,e[2],718787259,15),n=l(n,i,o,r,e[9],3951481745,21),this._a=this._a+r|0,this._b=this._b+n|0,this._c=this._c+i|0,this._d=this._d+o|0},s.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=o.allocUnsafe(16);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e},e.exports=s},function(e,t,r){"use strict";var n=r(1).Buffer,i=r(10),o=r(250),a=new Array(16),s=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],f=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],u=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],c=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],d=[0,1518500249,1859775393,2400959708,2840853838],l=[1352829926,1548603684,1836072691,2053994217,0];function h(){o.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function p(e,t){return e<>>32-t}function b(e,t,r,n,i,o,a,s){return p(e+(t^r^n)+o+a|0,s)+i|0}function y(e,t,r,n,i,o,a,s){return p(e+(t&r|~t&n)+o+a|0,s)+i|0}function v(e,t,r,n,i,o,a,s){return p(e+((t|~r)^n)+o+a|0,s)+i|0}function m(e,t,r,n,i,o,a,s){return p(e+(t&n|r&~n)+o+a|0,s)+i|0}function g(e,t,r,n,i,o,a,s){return p(e+(t^(r|~n))+o+a|0,s)+i|0}i(h,o),h.prototype._update=function(){for(var e=a,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);for(var r=0|this._a,n=0|this._b,i=0|this._c,o=0|this._d,h=0|this._e,w=0|this._a,_=0|this._b,k=0|this._c,S=0|this._d,A=0|this._e,E=0;E<80;E+=1){var x,P;E<16?(x=b(r,n,i,o,h,e[s[E]],d[0],u[E]),P=g(w,_,k,S,A,e[f[E]],l[0],c[E])):E<32?(x=y(r,n,i,o,h,e[s[E]],d[1],u[E]),P=m(w,_,k,S,A,e[f[E]],l[1],c[E])):E<48?(x=v(r,n,i,o,h,e[s[E]],d[2],u[E]),P=v(w,_,k,S,A,e[f[E]],l[2],c[E])):E<64?(x=m(r,n,i,o,h,e[s[E]],d[3],u[E]),P=y(w,_,k,S,A,e[f[E]],l[3],c[E])):(x=g(r,n,i,o,h,e[s[E]],d[4],u[E]),P=b(w,_,k,S,A,e[f[E]],l[4],c[E])),r=h,h=o,o=p(i,10),i=n,n=x,w=A,A=S,S=p(k,10),k=_,_=P}var O=this._b+i+S|0;this._b=this._c+o+A|0,this._c=this._d+h+w|0,this._d=this._e+r+_|0,this._e=this._a+n+k|0,this._a=O},h.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=n.alloc?n.alloc(20):new n(20);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e.writeInt32LE(this._e,16),e},e.exports=h},function(e,t,r){"use strict";var n=e.exports=function(e){e=e.toLowerCase();var t=n[e];if(!t)throw new Error(e+" is not supported (we accept pull requests)");return new t};n.sha=r(596),n.sha1=r(597),n.sha224=r(598),n.sha256=r(251),n.sha384=r(599),n.sha512=r(252)},function(e,t,r){"use strict";var n=r(10),i=r(57),o=r(24).Buffer,a=[1518500249,1859775393,-1894007588,-899497514],s=new Array(80);function f(){this.init(),this._w=s,i.call(this,64,56)}function u(e){return e<<30|e>>>2}function c(e,t,r,n){return 0===e?t&r|~t&n:2===e?t&r|t&n|r&n:t^r^n}n(f,i),f.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},f.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,s=0|this._d,f=0|this._e,d=0;d<16;++d)r[d]=e.readInt32BE(4*d);for(;d<80;++d)r[d]=r[d-3]^r[d-8]^r[d-14]^r[d-16];for(var l=0;l<80;++l){var h=~~(l/20),p=0|((t=n)<<5|t>>>27)+c(h,i,o,s)+f+r[l]+a[h];f=s,s=o,o=u(i),i=n,n=p}this._a=n+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=s+this._d|0,this._e=f+this._e|0},f.prototype._hash=function(){var e=o.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},e.exports=f},function(e,t,r){"use strict";var n=r(10),i=r(57),o=r(24).Buffer,a=[1518500249,1859775393,-1894007588,-899497514],s=new Array(80);function f(){this.init(),this._w=s,i.call(this,64,56)}function u(e){return e<<5|e>>>27}function c(e){return e<<30|e>>>2}function d(e,t,r,n){return 0===e?t&r|~t&n:2===e?t&r|t&n|r&n:t^r^n}n(f,i),f.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},f.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,s=0|this._d,f=0|this._e,l=0;l<16;++l)r[l]=e.readInt32BE(4*l);for(;l<80;++l)r[l]=(t=r[l-3]^r[l-8]^r[l-14]^r[l-16])<<1|t>>>31;for(var h=0;h<80;++h){var p=~~(h/20),b=u(n)+d(p,i,o,s)+f+r[h]+a[p]|0;f=s,s=o,o=c(i),i=n,n=b}this._a=n+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=s+this._d|0,this._e=f+this._e|0},f.prototype._hash=function(){var e=o.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},e.exports=f},function(e,t,r){"use strict";var n=r(10),i=r(251),o=r(57),a=r(24).Buffer,s=new Array(64);function f(){this.init(),this._w=s,o.call(this,64,56)}n(f,i),f.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},f.prototype._hash=function(){var e=a.allocUnsafe(28);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e},e.exports=f},function(e,t,r){"use strict";var n=r(10),i=r(252),o=r(57),a=r(24).Buffer,s=new Array(160);function f(){this.init(),this._w=s,o.call(this,128,112)}n(f,i),f.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},f.prototype._hash=function(){var e=a.allocUnsafe(48);function t(t,r,n){e.writeInt32BE(t,n),e.writeInt32BE(r,n+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),e},e.exports=f},function(e,t,r){"use strict";var n=r(24).Buffer,i=r(160).Transform,o=r(21).StringDecoder;function a(e){i.call(this),this.hashMode="string"==typeof e,this.hashMode?this[e]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}r(10)(a,i),a.prototype.update=function(e,t,r){"string"==typeof e&&(e=n.from(e,t));var i=this._update(e);return this.hashMode?this:(r&&(i=this._toString(i,r)),i)},a.prototype.setAutoPadding=function(){},a.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},a.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},a.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},a.prototype._transform=function(e,t,r){var n;try{this.hashMode?this._update(e):this.push(this._update(e))}catch(e){n=e}finally{r(n)}},a.prototype._flush=function(e){var t;try{this.push(this.__final())}catch(e){t=e}e(t)},a.prototype._finalOrDigest=function(e){var t=this.__final()||n.alloc(0);return e&&(t=this._toString(t,e,!0)),t},a.prototype._toString=function(e,t,r){if(this._decoder||(this._decoder=new o(t),this._encoding=t),this._encoding!==t)throw new Error("can't switch encodings");var n=this._decoder.write(e);return r&&(n+=this._decoder.end()),n},e.exports=a},function(e,t,r){"use strict";(function(e){var n=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Address=void 0;var i=n(r(41)),o=n(r(3)),a=r(40),s=r(235),f=function(){function t(e){(0,i.default)(20===e.length,"Invalid address length"),this.buf=e}return t.zero=function(){return new t((0,a.zeros)(20))},t.fromString=function(e){return(0,i.default)((0,s.isValidAddress)(e),"Invalid address"),new t((0,a.toBuffer)(e))},t.fromPublicKey=function(r){return(0,i.default)(e.isBuffer(r),"Public key should be Buffer"),new t((0,s.pubToAddress)(r))},t.fromPrivateKey=function(r){return(0,i.default)(e.isBuffer(r),"Private key should be Buffer"),new t((0,s.privateToAddress)(r))},t.generate=function(r,n){return(0,i.default)(o.default.isBN(n)),new t((0,s.generateAddress)(r.buf,n.toArrayLike(e)))},t.generate2=function(r,n,o){return(0,i.default)(e.isBuffer(n)),(0,i.default)(e.isBuffer(o)),new t((0,s.generateAddress2)(r.buf,n,o))},t.prototype.equals=function(e){return this.buf.equals(e.buf)},t.prototype.isZero=function(){return this.equals(t.zero())},t.prototype.isPrecompileOrSystemAddress=function(){var e=new o.default(this.buf),t=new o.default(0),r=new o.default("ffff","hex");return e.gte(t)&&e.lte(r)},t.prototype.toString=function(){return"0x"+this.buf.toString("hex")},t.prototype.toBuffer=function(){return e.from(this.buf)},t}();t.Address=f}).call(this,r(1).Buffer)},function(e,t,r){"use strict";(function(e){var n=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.hashPersonalMessage=t.isValidSignature=t.fromRpcSig=t.toCompactSig=t.toRpcSig=t.ecrecover=t.ecsign=void 0;var i=r(236),o=n(r(3)),a=r(40),s=r(123),f=r(89),u=r(126);function c(e,t){var r=(0,u.toType)(e,u.TypeOutput.BN);if(!t)return r.subn(27);var n=(0,u.toType)(t,u.TypeOutput.BN);return r.sub(n.muln(2).addn(35))}function d(e){var t=new o.default(e);return t.eqn(0)||t.eqn(1)}t.ecsign=function(t,r,n){var o=(0,i.ecdsaSign)(t,r),a=o.signature,s=o.recid,f=e.from(a.slice(0,32)),c=e.from(a.slice(32,64));if(!n||"number"==typeof n){if(n&&!Number.isSafeInteger(n))throw new Error("The provided number is greater than MAX_SAFE_INTEGER (please use an alternative input type)");return{r:f,s:c,v:n?s+(2*n+35):s+27}}return{r:f,s:c,v:(0,u.toType)(n,u.TypeOutput.BN).muln(2).addn(35).addn(s).toArrayLike(e)}};t.ecrecover=function(t,r,n,o,s){var f=e.concat([(0,a.setLengthLeft)(n,32),(0,a.setLengthLeft)(o,32)],64),u=c(r,s);if(!d(u))throw new Error("Invalid signature v value");var l=(0,i.ecdsaRecover)(f,u.toNumber(),t);return e.from((0,i.publicKeyConvert)(l,!1).slice(1))};t.toRpcSig=function(t,r,n,i){if(!d(c(t,i)))throw new Error("Invalid signature v value");return(0,a.bufferToHex)(e.concat([(0,a.setLengthLeft)(r,32),(0,a.setLengthLeft)(n,32),(0,a.toBuffer)(t)]))};t.toCompactSig=function(t,r,n,i){if(!d(c(t,i)))throw new Error("Invalid signature v value");var o=(0,u.toType)(t,u.TypeOutput.Number),s=n;return(o>28&&o%2==1||1===o||28===o)&&((s=e.from(n))[0]|=128),(0,a.bufferToHex)(e.concat([(0,a.setLengthLeft)(r,32),(0,a.setLengthLeft)(s,32)]))};t.fromRpcSig=function(e){var t,r,n,i=(0,a.toBuffer)(e);if(i.length>=65)t=i.slice(0,32),r=i.slice(32,64),n=(0,a.bufferToInt)(i.slice(64));else{if(64!==i.length)throw new Error("Invalid signature length");t=i.slice(0,32),r=i.slice(32,64),n=(0,a.bufferToInt)(i.slice(32,33))>>7,r[0]&=127}return n<27&&(n+=27),{v:n,r:t,s:r}};t.isValidSignature=function(e,t,r,n,i){void 0===n&&(n=!0);var a=new o.default("7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0",16),s=new o.default("fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141",16);if(32!==t.length||32!==r.length)return!1;if(!d(c(e,i)))return!1;var f=new o.default(t),u=new o.default(r);return!(f.isZero()||f.gt(s)||u.isZero()||u.gt(s))&&(!n||1!==u.cmp(a))};t.hashPersonalMessage=function(t){(0,f.assertIsBuffer)(t);var r=e.from("Ethereum Signed Message:\n"+t.length,"utf-8");return(0,s.keccak)(e.concat([r,t]))}}).call(this,r(1).Buffer)},function(e,t,r){"use strict";(function(e){var n=r(0)(r(2)),i=Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]},o=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&i(t,e,r);return o(t,e),t},s=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.defineProperties=void 0;var f=s(r(41)),u=r(54),c=a(r(87)),d=r(40);t.defineProperties=function(t,r,i){if(t.raw=[],t._fields=[],t.toJSON=function(e){if(void 0===e&&(e=!1),e){var r={};return t._fields.forEach((function(e){r[e]="0x"+t[e].toString("hex")})),r}return(0,d.baToJSON)(t.raw)},t.serialize=function(){return c.encode(t.raw)},r.forEach((function(r,n){function i(){return t.raw[n]}function o(i){"00"!==(i=(0,d.toBuffer)(i)).toString("hex")||r.allowZero||(i=e.allocUnsafe(0)),r.allowLess&&r.length?(i=(0,d.unpadBuffer)(i),(0,f.default)(r.length>=i.length,"The field "+r.name+" must not have more "+r.length+" bytes")):r.allowZero&&0===i.length||!r.length||(0,f.default)(r.length===i.length,"The field "+r.name+" must have byte length of "+r.length),t.raw[n]=i}t._fields.push(r.name),Object.defineProperty(t,r.name,{enumerable:!0,configurable:!0,get:i,set:o}),r.default&&(t[r.name]=r.default),r.alias&&Object.defineProperty(t,r.alias,{enumerable:!1,configurable:!0,set:o,get:i})})),i)if("string"==typeof i&&(i=e.from((0,u.stripHexPrefix)(i),"hex")),e.isBuffer(i)&&(i=c.decode(i)),Array.isArray(i)){if(i.length>t._fields.length)throw new Error("wrong number of fields in data");i.forEach((function(e,r){t[t._fields[r]]=(0,d.toBuffer)(e)}))}else{if("object"!==(0,n.default)(i))throw new Error("invalid data");var o=Object.keys(i);r.forEach((function(e){-1!==o.indexOf(e.name)&&(t[e.name]=i[e.name]),-1!==o.indexOf(e.alias)&&(t[e.alias]=i[e.alias])}))}}}).call(this,r(1).Buffer)},function(e,t,r){"use strict";var n=Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]},i=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t},a=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.rlp=t.BN=void 0;var s=a(r(3));t.BN=s.default;var f=o(r(87));t.rlp=f},function(e,t,r){"use strict";e.exports=function(e){var t,r=this;return this.net.getId().then((function(e){return t=e,r.getBlock(0)})).then((function(r){var n="private";return"0xd4e56740f876aef8c010b86a40d5f56745a118d0906a34e69aec8c0db1cb8fa3"===r.hash&&1===t&&(n="main"),"0x41941023680923e0fe4d74a34bdac8141f2540e3ae90623718e47d66d1ca4a2d"===r.hash&&3===t&&(n="ropsten"),"0x6341fd3daf94b748c72ced5a5b26028f2474f5f00d824504e4fa37a75767e177"===r.hash&&4===t&&(n="rinkeby"),"0xbf7e331f7f7c1dd2e05159666b3bf8bc7a8a3a9eb1d518969eab529dd9b88c1a"===r.hash&&5===t&&(n="goerli"),"0xa3c565fc15c7478862d50ccd6561e3c06b24cc509bf388941c25ea985ce32cb9"===r.hash&&42===t&&(n="kovan"),"function"==typeof e&&e(null,n),n})).catch((function(t){if("function"!=typeof e)throw t;e(t)}))}},function(e,t,r){"use strict";var n=r(33),i=r(79).subscriptions,o=r(36),a=r(80),s=function(){var e=this;n.packageInit(this,arguments);var t=this.setRequestManager;this.setRequestManager=function(r){return t(r),e.net.setRequestManager(r),!0};var r=this.setProvider;this.setProvider=function(){r.apply(e,arguments),e.setRequestManager(e._requestManager)},this.net=new a(this),[new i({name:"subscribe",type:"shh",subscriptions:{messages:{params:1}}}),new o({name:"getVersion",call:"shh_version",params:0}),new o({name:"getInfo",call:"shh_info",params:0}),new o({name:"setMaxMessageSize",call:"shh_setMaxMessageSize",params:1}),new o({name:"setMinPoW",call:"shh_setMinPoW",params:1}),new o({name:"markTrustedPeer",call:"shh_markTrustedPeer",params:1}),new o({name:"newKeyPair",call:"shh_newKeyPair",params:0}),new o({name:"addPrivateKey",call:"shh_addPrivateKey",params:1}),new o({name:"deleteKeyPair",call:"shh_deleteKeyPair",params:1}),new o({name:"hasKeyPair",call:"shh_hasKeyPair",params:1}),new o({name:"getPublicKey",call:"shh_getPublicKey",params:1}),new o({name:"getPrivateKey",call:"shh_getPrivateKey",params:1}),new o({name:"newSymKey",call:"shh_newSymKey",params:0}),new o({name:"addSymKey",call:"shh_addSymKey",params:1}),new o({name:"generateSymKeyFromPassword",call:"shh_generateSymKeyFromPassword",params:1}),new o({name:"hasSymKey",call:"shh_hasSymKey",params:1}),new o({name:"getSymKey",call:"shh_getSymKey",params:1}),new o({name:"deleteSymKey",call:"shh_deleteSymKey",params:1}),new o({name:"newMessageFilter",call:"shh_newMessageFilter",params:1}),new o({name:"getFilterMessages",call:"shh_getFilterMessages",params:1}),new o({name:"deleteMessageFilter",call:"shh_deleteMessageFilter",params:1}),new o({name:"post",call:"shh_post",params:1,inputFormatter:[null]}),new o({name:"unsubscribe",call:"shh_unsubscribe",params:1})].forEach((function(t){t.attachToObject(e),t.setRequestManager(e._requestManager)}))};s.prototype.clearSubscriptions=function(){this._requestManager.clearSubscriptions()},n.addProviders(s),e.exports=s},function(e,t,r){"use strict";var n=r(0)(r(2)),i=r(608),o=function e(t){this.givenProvider=e.givenProvider,t&&t._requestManager&&(t=t.currentProvider),"undefined"!=typeof document&&(this.pick=i.pick),this.setProvider(t)};o.givenProvider=null,"undefined"!=typeof ethereum&ðereum.bzz&&(o.givenProvider=ethereum.bzz),o.prototype.setProvider=function(e){if(e&&"object"===(0,n.default)(e)&&"string"==typeof e.bzz&&(e=e.bzz),"string"!=typeof e){this.currentProvider=null;var t=new Error("No provider set, please set one using bzz.setProvider().");return this.download=this.upload=this.isAvailable=function(){throw t},!1}return this.currentProvider=e,this.download=i.at(e).download,this.upload=i.at(e).upload,this.isAvailable=i.at(e).isAvailable,!0},e.exports=o},function(e,t,r){"use strict";var n=function(){throw"This swarm.js function isn't available on the browser."},i={readFile:n},o={download:n,safeDownloadArchived:n,directoryTree:n},a={platform:n,arch:n},s={join:n,slice:n},f={spawn:n},u={lookup:n},c=r(609),d=r(253),l=r(622),h=r(624),p=r(625);e.exports=p({fs:i,files:o,os:a,path:s,child_process:f,defaultArchives:{},mimetype:u,request:c,downloadUrl:null,bytes:d,hash:l,pick:h})},function(e,t,r){"use strict";var n=r(610),i=r(613),o=r(91),a=r(614),s=r(615),f=function(){};e.exports=function(e,t,r){if(!e||"string"!=typeof e)throw new TypeError("must specify a URL");"function"==typeof t&&(r=t,t={});if(r&&"function"!=typeof r)throw new TypeError("expected cb to be undefined or a function");r=r||f;var u=(t=t||{}).json?"json":"text",c=(t=o({responseType:u},t)).headers||{},d=(t.method||"GET").toUpperCase(),l=t.query;l&&("string"!=typeof l&&(l=n.stringify(l)),e=i(e,l));"json"===t.responseType&&a(c,"Accept","application/json");t.json&&"GET"!==d&&"HEAD"!==d&&(a(c,"Content-Type","application/json"),t.body=JSON.stringify(t.body));return t.method=d,t.url=e,t.headers=c,delete t.query,delete t.json,s(t,r)}},function(e,t,r){"use strict";var n=r(0)(r(2)),i=r(611),o=r(91),a=r(612);function s(e,t){return t.encode?t.strict?i(e):encodeURIComponent(e):e}function f(e){var t=e.indexOf("?");return-1===t?"":e.slice(t+1)}function u(e,t){var r=function(e){var t;switch(e.arrayFormat){case"index":return function(e,r,n){t=/\[(\d*)\]$/.exec(e),e=e.replace(/\[\d*\]$/,""),t?(void 0===n[e]&&(n[e]={}),n[e][t[1]]=r):n[e]=r};case"bracket":return function(e,r,n){t=/(\[\])$/.exec(e),e=e.replace(/\[\]$/,""),t?void 0!==n[e]?n[e]=[].concat(n[e],r):n[e]=[r]:n[e]=r};default:return function(e,t,r){void 0!==r[e]?r[e]=[].concat(r[e],t):r[e]=t}}}(t=o({arrayFormat:"none"},t)),i=Object.create(null);return"string"!=typeof e?i:(e=e.trim().replace(/^[?#&]/,""))?(e.split("&").forEach((function(e){var t=e.replace(/\+/g," ").split("="),n=t.shift(),o=t.length>0?t.join("="):void 0;o=void 0===o?null:a(o),r(a(n),o,i)})),Object.keys(i).sort().reduce((function(e,t){var r=i[t];return Boolean(r)&&"object"===(0,n.default)(r)&&!Array.isArray(r)?e[t]=function e(t){return Array.isArray(t)?t.sort():"object"===(0,n.default)(t)?e(Object.keys(t)).sort((function(e,t){return Number(e)-Number(t)})).map((function(e){return t[e]})):t}(r):e[t]=r,e}),Object.create(null))):i}t.extract=f,t.parse=u,t.stringify=function(e,t){!1===(t=o({encode:!0,strict:!0,arrayFormat:"none"},t)).sort&&(t.sort=function(){});var r=function(e){switch(e.arrayFormat){case"index":return function(t,r,n){return null===r?[s(t,e),"[",n,"]"].join(""):[s(t,e),"[",s(n,e),"]=",s(r,e)].join("")};case"bracket":return function(t,r){return null===r?s(t,e):[s(t,e),"[]=",s(r,e)].join("")};default:return function(t,r){return null===r?s(t,e):[s(t,e),"=",s(r,e)].join("")}}}(t);return e?Object.keys(e).sort(t.sort).map((function(n){var i=e[n];if(void 0===i)return"";if(null===i)return s(n,t);if(Array.isArray(i)){var o=[];return i.slice().forEach((function(e){void 0!==e&&o.push(r(n,e,o.length))})),o.join("&")}return s(n,t)+"="+s(i,t)})).filter((function(e){return e.length>0})).join("&"):""},t.parseUrl=function(e,t){return{url:e.split("?")[0]||"",query:u(f(e),t)}}},function(e,t,r){"use strict";e.exports=function(e){return encodeURIComponent(e).replace(/[!'()*]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()}))}},function(e,t,r){"use strict";var n=r(0)(r(2)),i=new RegExp("%[a-f0-9]{2}","gi"),o=new RegExp("(%[a-f0-9]{2})+","gi");function a(e,t){try{return decodeURIComponent(e.join(""))}catch(e){}if(1===e.length)return e;t=t||1;var r=e.slice(0,t),n=e.slice(t);return Array.prototype.concat.call([],a(r),a(n))}function s(e){try{return decodeURIComponent(e)}catch(n){for(var t=e.match(i),r=1;r0&&(d=setTimeout((function(){if(!u){u=!0,c.abort("timeout");var e=new Error("XMLHttpRequest timeout");e.code="ETIMEDOUT",i(e)}}),e.timeout)),c.setRequestHeader)for(s in b)b.hasOwnProperty(s)&&c.setRequestHeader(s,b[s]);else if(e.headers&&!function(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}(e.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in e&&(c.responseType=e.responseType),"beforeSend"in e&&"function"==typeof e.beforeSend&&e.beforeSend(c),c.send(p||null),c}e.exports=f,e.exports.default=f,f.XMLHttpRequest=n.XMLHttpRequest||function(){},f.XDomainRequest="withCredentials"in new f.XMLHttpRequest?f.XMLHttpRequest:n.XDomainRequest,function(e,t){for(var r=0;r>>31),r=(p=e[9]^e[19]^e[29]^e[39]^e[49])^(f<<1|s>>>31),e[0]^=t,e[1]^=r,e[10]^=t,e[11]^=r,e[20]^=t,e[21]^=r,e[30]^=t,e[31]^=r,e[40]^=t,e[41]^=r,t=i^(u<<1|c>>>31),r=o^(c<<1|u>>>31),e[2]^=t,e[3]^=r,e[12]^=t,e[13]^=r,e[22]^=t,e[23]^=r,e[32]^=t,e[33]^=r,e[42]^=t,e[43]^=r,t=s^(d<<1|l>>>31),r=f^(l<<1|d>>>31),e[4]^=t,e[5]^=r,e[14]^=t,e[15]^=r,e[24]^=t,e[25]^=r,e[34]^=t,e[35]^=r,e[44]^=t,e[45]^=r,t=u^(h<<1|p>>>31),r=c^(p<<1|h>>>31),e[6]^=t,e[7]^=r,e[16]^=t,e[17]^=r,e[26]^=t,e[27]^=r,e[36]^=t,e[37]^=r,e[46]^=t,e[47]^=r,t=d^(i<<1|o>>>31),r=l^(o<<1|i>>>31),e[8]^=t,e[9]^=r,e[18]^=t,e[19]^=r,e[28]^=t,e[29]^=r,e[38]^=t,e[39]^=r,e[48]^=t,e[49]^=r,b=e[0],y=e[1],W=e[11]<<4|e[10]>>>28,J=e[10]<<4|e[11]>>>28,R=e[20]<<3|e[21]>>>29,T=e[21]<<3|e[20]>>>29,se=e[31]<<9|e[30]>>>23,fe=e[30]<<9|e[31]>>>23,H=e[40]<<18|e[41]>>>14,K=e[41]<<18|e[40]>>>14,j=e[2]<<1|e[3]>>>31,U=e[3]<<1|e[2]>>>31,v=e[13]<<12|e[12]>>>20,m=e[12]<<12|e[13]>>>20,X=e[22]<<10|e[23]>>>22,Z=e[23]<<10|e[22]>>>22,M=e[33]<<13|e[32]>>>19,I=e[32]<<13|e[33]>>>19,ue=e[42]<<2|e[43]>>>30,ce=e[43]<<2|e[42]>>>30,te=e[5]<<30|e[4]>>>2,re=e[4]<<30|e[5]>>>2,N=e[14]<<6|e[15]>>>26,L=e[15]<<6|e[14]>>>26,g=e[25]<<11|e[24]>>>21,w=e[24]<<11|e[25]>>>21,Y=e[34]<<15|e[35]>>>17,$=e[35]<<15|e[34]>>>17,B=e[45]<<29|e[44]>>>3,C=e[44]<<29|e[45]>>>3,E=e[6]<<28|e[7]>>>4,x=e[7]<<28|e[6]>>>4,ne=e[17]<<23|e[16]>>>9,ie=e[16]<<23|e[17]>>>9,F=e[26]<<25|e[27]>>>7,D=e[27]<<25|e[26]>>>7,_=e[36]<<21|e[37]>>>11,k=e[37]<<21|e[36]>>>11,Q=e[47]<<24|e[46]>>>8,ee=e[46]<<24|e[47]>>>8,G=e[8]<<27|e[9]>>>5,V=e[9]<<27|e[8]>>>5,P=e[18]<<20|e[19]>>>12,O=e[19]<<20|e[18]>>>12,oe=e[29]<<7|e[28]>>>25,ae=e[28]<<7|e[29]>>>25,q=e[38]<<8|e[39]>>>24,z=e[39]<<8|e[38]>>>24,S=e[48]<<14|e[49]>>>18,A=e[49]<<14|e[48]>>>18,e[0]=b^~v&g,e[1]=y^~m&w,e[10]=E^~P&R,e[11]=x^~O&T,e[20]=j^~N&F,e[21]=U^~L&D,e[30]=G^~W&X,e[31]=V^~J&Z,e[40]=te^~ne&oe,e[41]=re^~ie&ae,e[2]=v^~g&_,e[3]=m^~w&k,e[12]=P^~R&M,e[13]=O^~T&I,e[22]=N^~F&q,e[23]=L^~D&z,e[32]=W^~X&Y,e[33]=J^~Z&$,e[42]=ne^~oe&se,e[43]=ie^~ae&fe,e[4]=g^~_&S,e[5]=w^~k&A,e[14]=R^~M&B,e[15]=T^~I&C,e[24]=F^~q&H,e[25]=D^~z&K,e[34]=X^~Y&Q,e[35]=Z^~$&ee,e[44]=oe^~se&ue,e[45]=ae^~fe&ce,e[6]=_^~S&b,e[7]=k^~A&y,e[16]=M^~B&E,e[17]=I^~C&x,e[26]=q^~H&j,e[27]=z^~K&U,e[36]=Y^~Q&G,e[37]=$^~ee&V,e[46]=se^~ue&te,e[47]=fe^~ce&re,e[8]=S^~b&v,e[9]=A^~y&m,e[18]=B^~E&P,e[19]=C^~x&O,e[28]=H^~j&N,e[29]=K^~U&L,e[38]=Q^~G&W,e[39]=ee^~V&J,e[48]=ue^~te&ne,e[49]=ce^~re&ie,e[0]^=a[n],e[1]^=a[n+1]},f=function(e){return function(t){var r;if("0x"===t.slice(0,2)){r=[];for(var a=2,f=t.length;a>2]|=t[h]<>2]|=r<>2]|=(192|r>>6)<>2]|=(128|63&r)<=57344?(f[y>>2]|=(224|r>>12)<>2]|=(128|r>>6&63)<>2]|=(128|63&r)<>2]|=(240|r>>18)<>2]|=(128|r>>12&63)<>2]|=(128|r>>6&63)<>2]|=(128|63&r)<=u){for(e.start=y-u,e.block=f[c],y=0;y>2]|=i[3&y],e.lastByteIndex===u)for(f[0]=f[c],y=1;y>4&15]+n[15&p]+n[p>>12&15]+n[p>>8&15]+n[p>>20&15]+n[p>>16&15]+n[p>>28&15]+n[p>>24&15];v%c==0&&(s(l),y=0)}return"0x"+b}(function(e){return{blocks:[],reset:!0,block:0,start:0,blockCount:1600-(e<<1)>>5,outputBlocks:e>>5,s:(t=[0,0,0,0,0,0,0,0,0,0],[].concat(t,t,t,t,t))};var t}(e),r)}};e.exports={keccak256:f(256),keccak512:f(512),keccak256s:f(256),keccak512s:f(512)}},function(e,t,r){"use strict";var n=function(e){return function(){return new Promise((function(t,r){var n,i=function(r){var n={},i=r.target.files.length,o=0;[].map.call(r.target.files,(function(r){var a=new FileReader;a.onload=function(a){var s=new Uint8Array(a.target.result);if("directory"===e){var f=r.webkitRelativePath;n[f.slice(f.indexOf("/")+1)]={type:"text/plain",data:s},++o===i&&t(n)}else if("file"===e){var u=r.webkitRelativePath;t({type:mimetype.lookup(u),data:s})}else t(s)},a.readAsArrayBuffer(r)}))};"directory"===e?((n=document.createElement("input")).addEventListener("change",i),n.type="file",n.webkitdirectory=!0,n.mozdirectory=!0,n.msdirectory=!0,n.odirectory=!0,n.directory=!0):((n=document.createElement("input")).addEventListener("change",i),n.type="file");var o=document.createEvent("MouseEvents");o.initEvent("click",!0,!1),n.dispatchEvent(o)}))}};e.exports={data:n("data"),file:n("file"),directory:n("directory")}},function(e,t,r){"use strict";e.exports=function(e){var t=e.fs,r=e.files,n=e.os,i=e.path,o=e.child_process,a=e.mimetype,s=e.defaultArchives,f=e.request,u=e.downloadUrl,c=e.bytes,d=e.hash,l=e.pick,h=function(e){return function(t){for(var r={},n=0,i=e.length;n=400?n(new Error("Error ".concat(i.statusCode,"."))):r(new Uint8Array(t))}))}))}},y=function(e){return function(t){return function t(r){return function(n){return function(i){var o=function(e){return void 0===e.path?Promise.resolve():"application/bzz-manifest+json"===e.contentType?t(e.hash)(n+e.path)(i):Promise.resolve((r=n+e.path,function(e){return function(t){return t[r]=e,t}})(function(e){return{type:e.contentType,hash:e.hash}}(e))(i));var r};return b(e)(r).then((function(e){return JSON.parse(U(e)).entries})).then((function(e){return Promise.all(e.map(o))})).then((function(){return i}))}}}(t)("")({})}},v=function(e){return function(t){return y(e)(t).then((function(e){return h(Object.keys(e))(Object.keys(e).map((function(t){return e[t].hash})))}))}},m=function(e){return function(t){return y(e)(t).then((function(t){var r=Object.keys(t),n=r.map((function(e){return t[e].hash})),i=r.map((function(e){return t[e].type})),o=n.map(b(e));return Promise.all(o).then((function(e){return h(r)(function(e){return e.map((function(e,t){return{type:i[t],data:e}}))}(e))}))}))}},g=function(e){return function(t){return function(n){return r.download(p(e)(t))(n)}}},w=function(e){return function(t){return function(r){return v(e)(t).then((function(t){var n=[];for(var o in t)if(o.length>0){var a=i.join(r,o);n.push(g(e)(t[o])(a))}return Promise.all(n).then((function(){return r}))}))}}},_=function(e){return function(t){return new Promise((function(r,n){var i={body:"string"==typeof t?N(t):t,method:"POST"};f("".concat(e,"/bzz-raw:/"),i,(function(e,t){return e?n(e):r(t)}))}))}},k=function(e){return function(t){return function(r){return function(n){return function i(o){var a="/"===r[0]?r:"/"+r,s="".concat(e,"/bzz:/").concat(t).concat(a),u={method:"PUT",headers:{"Content-Type":n.type},body:n.data};return new Promise((function(e,t){f(s,u,(function(r,n){return r?t(r):-1!==n.indexOf("error")?t(n):e(n)}))})).catch((function(e){return o>0&&i(o-1)}))}(3)}}}},S=function(e){return function(t){return E(e)({"":t})}},A=function(e){return function(r){return t.readFile(r).then((function(t){return S(e)({type:a.lookup(r),data:t})}))}},E=function(e){return function(t){return _(e)("{}").then((function(r){return Object.keys(t).reduce((function(r,n){return r.then(function(r){return function(n){return k(e)(n)(r)(t[r])}}(n))}),Promise.resolve(r))}))}},x=function(e){return function(r){return t.readFile(r).then(_(e))}},P=function(e){return function(n){return function(i){return r.directoryTree(i).then((function(e){return Promise.all(e.map((function(e){return t.readFile(e)}))).then((function(t){var r=e.map((function(e){return e.slice(i.length)})),n=e.map((function(e){return a.lookup(e)||"text/plain"}));return h(r)(t.map((function(e,t){return{type:n[t],data:e}})))}))})).then((function(e){return(t=n?{"":e[n]}:{},function(e){var r={};for(var n in t)r[n]=t[n];for(var i in e)r[i]=e[i];return r})(e);var t})).then(E(e))}}},O=function(e){return function(t){if("data"===t.pick)return l.data().then(_(e));if("file"===t.pick)return l.file().then(S(e));if("directory"===t.pick)return l.directory().then(E(e));if(t.path)switch(t.kind){case"data":return x(e)(t.path);case"file":return A(e)(t.path);case"directory":return P(e)(t.defaultFile)(t.path)}else{if(t.length||"string"==typeof t)return _(e)(t);if(t instanceof Object)return E(e)(t)}return Promise.reject(new Error("Bad arguments"))}},R=function(e){return function(t){return function(r){return C(e)(t).then((function(n){return n?r?w(e)(t)(r):m(e)(t):r?g(e)(t)(r):b(e)(t)}))}}},T=function(e,t){var i=n.platform().replace("win32","windows")+"-"+("x64"===n.arch()?"amd64":"386"),o=(t||s)[i],a=u+o.archive+".tar.gz",f=o.archiveMD5,c=o.binaryMD5;return r.safeDownloadArchived(a)(f)(c)(e)},M=function(e){return new Promise((function(t,r){var n=o.spawn,i=function(e){return function(t){return-1!==(""+t).indexOf(e)}},a=e.account,s=e.password,f=e.dataDir,u=e.ensApi,c=e.privateKey,d=0,l=n(e.binPath,["--bzzaccount",a||c,"--datadir",f,"--ens-api",u]),h=function(e){0===d&&i("Passphrase")(e)?setTimeout((function(){d=1,l.stdin.write(s+"\n")}),500):i("Swarm http proxy started")(e)&&(d=2,clearTimeout(p),t(l))};l.stdout.on("data",h),l.stderr.on("data",h);var p=setTimeout((function(){return r(new Error("Couldn't start swarm process."))}),2e4)}))},I=function(e){return new Promise((function(t,r){e.stderr.removeAllListeners("data"),e.stdout.removeAllListeners("data"),e.stdin.removeAllListeners("error"),e.removeAllListeners("error"),e.removeAllListeners("exit"),e.kill("SIGINT");var n=setTimeout((function(){return e.kill("SIGKILL")}),8e3);e.once("close",(function(){clearTimeout(n),t()}))}))},B=function(e){return _(e)("test").then((function(e){return"c9a99c7d326dcc6316f32fe2625b311f6dc49a175e6877681ded93137d3569e7"===e})).catch((function(){return!1}))},C=function(e){return function(t){return b(e)(t).then((function(e){try{return!!JSON.parse(U(e)).entries}catch(e){return!1}}))}},j=function(e){return function(t,r,n,i,o){var a;return void 0!==t&&(a=e(t)),void 0!==r&&(a=e(r)),void 0!==n&&(a=e(n)),void 0!==i&&(a=e(i)),void 0!==o&&(a=e(o)),a}},U=function(e){return c.toString(c.fromUint8Array(e))},N=function(e){return c.toUint8Array(c.fromString(e))},L=function(e){return{download:function(t,r){return R(e)(t)(r)},downloadData:j(b(e)),downloadDataToDisk:j(g(e)),downloadDirectory:j(m(e)),downloadDirectoryToDisk:j(w(e)),downloadEntries:j(y(e)),downloadRoutes:j(v(e)),isAvailable:function(){return B(e)},upload:function(t){return O(e)(t)},uploadData:j(_(e)),uploadFile:j(S(e)),uploadFileFromDisk:j(S(e)),uploadDataFromDisk:j(x(e)),uploadDirectory:j(E(e)),uploadDirectoryFromDisk:j(P(e)),uploadToManifest:j(k(e)),pick:l,hash:d,fromString:N,toString:U}};return{at:L,local:function(e){return function(t){return B("http://localhost:8500").then((function(r){return r?t(L("http://localhost:8500")).then((function(){})):T(e.binPath,e.archives).onData((function(t){return(e.onProgress||function(){})(t.length)})).then((function(){return M(e)})).then((function(e){return t(L("http://localhost:8500")).then((function(){return e}))})).then(I)}))}},download:R,downloadBinary:T,downloadData:b,downloadDataToDisk:g,downloadDirectory:m,downloadDirectoryToDisk:w,downloadEntries:y,downloadRoutes:v,isAvailable:B,startProcess:M,stopProcess:I,upload:O,uploadData:_,uploadDataFromDisk:x,uploadFile:S,uploadFileFromDisk:A,uploadDirectory:E,uploadDirectoryFromDisk:P,uploadToManifest:k,pick:l,hash:d,fromString:N,toString:U}}}])})); +//# sourceMappingURL=web3.min.js.map diff --git a/app/assets/v2/js/pages/bounty_detail/cosmos_extension.js b/app/assets/v2/js/pages/bounty_detail/cosmos_extension.js new file mode 100644 index 00000000000..9ad35dc8840 --- /dev/null +++ b/app/assets/v2/js/pages/bounty_detail/cosmos_extension.js @@ -0,0 +1,85 @@ +const payWithCosmosExtension = async(fulfillment_id, to_address, vm, modal) => { + const amount = vm.fulfillment_context.amount * 10 ** vm.decimals; + const token_name = vm.bounty.token_name; + const tenant = vm.getTenant(token_name, vm.bounty.web3_type); + const chainId = 'cosmoshub-4'; + + if (!window.keplr) { + _alert({ message: gettext('Please download or enable Keplr browser wallet extension.') }, 'danger'); + } + + try { + await window.keplr.enable(chainId); + } catch (e) { + _alert({ message: gettext('Please unlock Keplr browser wallet extension.') }, 'danger'); + return; + } + + let client = await window.CosmWasmJS.setupWebKeplr({ + chainId, + rpcEndpoint: `${window.location.origin}/api/v1/reverse-proxy/${tenant}`, + gasPrice: '0.0008uatom' + }); + + const from_address = (await client.signer.getAccounts())[0].address; + + let atomBalance = (await client.getBalance(from_address, 'uatom')).amount; + + if (Number(atomBalance) < amount) { + _alert({ message: gettext(`Insufficient balance in address ${from_address}`) }, 'danger'); + return; + } + + try { + const result = await client.sendTokens( + from_address, + to_address, + [{ amount: amount.toString(), denom: 'uatom' }], + 'auto' + ); + + if (result.code !== undefined && result.code !== 0) { + throw new Error(result.log || result.rawLog); + } + + callback(null, from_address, result.transactionHash); + } catch (e) { + modal.closeModal(); + callback(e); + } + + function callback(error, from_address, txn) { + if (error) { + _alert({ message: gettext('Unable to payout bounty due to: ' + error) }, 'danger'); + console.log(error); + } else { + + const payload = { + payout_type: 'cosmos_ext', + tenant: 'COSMOS', + amount: amount, + token_name: token_name, + funder_address: from_address, + payout_tx_id: txn + }; + + modal.closeModal(); + const apiUrlBounty = `/api/v1/bounty/payout/${fulfillment_id}`; + + fetchData(apiUrlBounty, 'POST', payload).then(response => { + if (200 <= response.status && response.status <= 204) { + vm.fetchBounty(); + _alert('Payment Successful', 'success'); + + } else { + _alert('Unable to make payout bounty. Please try again later', 'danger'); + console.error(`error: bounty payment failed with status: ${response.status} and message: ${response.message}`); + } + }).catch(function(error) { + _alert('Unable to make payout bounty. Please try again later', 'danger'); + console.log(error); + }); + } + } +}; + \ No newline at end of file diff --git a/app/assets/v2/js/pages/bounty_detail/web3_modal.js b/app/assets/v2/js/pages/bounty_detail/web3_modal.js index d02641f5936..90db3fd8630 100644 --- a/app/assets/v2/js/pages/bounty_detail/web3_modal.js +++ b/app/assets/v2/js/pages/bounty_detail/web3_modal.js @@ -22,6 +22,19 @@ const payWithWeb3 = (fulfillment_id, fulfiller_address, vm, modal) => { }, (error, result) => callback(error, result) ); + } else if (token_name == 'ONE') { + // Gas limit as indicated here: https://docs.harmony.one/home/general/wallets/browser-extensions-wallets/metamask-wallet/sending-and-receiving#sending-a-regular-transaction + web3.eth.sendTransaction( + { + to: fulfiller_address, + from: selectedAccount, + value: web3.utils.toWei(String(amount)), + gasPrice: web3.utils.toHex(30 * Math.pow(10, 9)), + gas: web3.utils.toHex(25000), + gasLimit: web3.utils.toHex(25000) + }, + (error, result) => callback(error, result) + ); } else { const amountInWei = amount * 1.0 * Math.pow(10, vm.decimals); diff --git a/app/assets/v2/js/pages/bounty_details.js b/app/assets/v2/js/pages/bounty_details.js index ded8756c8f4..3424d3ddf87 100644 --- a/app/assets/v2/js/pages/bounty_details.js +++ b/app/assets/v2/js/pages/bounty_details.js @@ -274,7 +274,7 @@ var callbacks = { return [ 'fulfillment_accepted_on', timePeg ]; }, 'network': function(key, val, result) { - if (val == 'mainnet') { + if (val.toLowerCase().indexOf('mainnet') >= 0) { $('#network').addClass('hidden'); return [ null, null ]; } @@ -333,19 +333,6 @@ var callbacks = { ); } - - $('#value_in_usdt').html(Math.round(totalUSDValue)); - - $('#value_in_usdt_wrapper').attr('title', - '

' - ); - return [ key, val ]; }, 'token_value_time_peg': function(key, val, result) { diff --git a/app/assets/v2/js/pages/bounty_details2.js b/app/assets/v2/js/pages/bounty_details2.js index 28627519d5d..48073a04306 100644 --- a/app/assets/v2/js/pages/bounty_details2.js +++ b/app/assets/v2/js/pages/bounty_details2.js @@ -10,29 +10,32 @@ const loadingState = { document.result = bounty; +Vue.use(VueQuillEditor); +Vue.component('v-select', VueSelect.VueSelect); + Vue.mixin({ methods: { fetchBounty: function(newData) { let vm = this; - let apiUrlBounty = `/actions/api/v0.1/bounty?github_url=${document.issueURL}`; + let apiUrlBounty = document.bountyID ? `/actions/api/v0.1/bounty/${document.bountyID}` : `/actions/api/v0.1/bounty?github_url=${document.issueURL}`; const getBounty = fetchData(apiUrlBounty, 'GET'); $.when(getBounty).then(function(response) { - if (!response.length) { + if (!document.bountyID && !response.length) { vm.loadingState = 'empty'; return vm.syncBounty(); } - vm.bounty = response[0]; + vm.bounty = document.bountyID ? response : response[0]; vm.loadingState = 'resolved'; - vm.isOwner = vm.checkOwner(response[0].bounty_owner_github_username); - vm.isOwnerAddress = vm.checkOwnerAddress(response[0].bounty_owner_address); - document.result = response[0]; + vm.isOwner = vm.checkOwner(); + vm.isOwnerAddress = vm.checkOwnerAddress(vm.bounty.bounty_owner_address); + document.result = vm.bounty; if (newData) { delete sessionStorage['fulfillers']; delete sessionStorage['bountyId']; localStorage[document.issueURL] = ''; - document.title = `${response[0].title} | Gitcoin`; - window.history.replaceState({}, `${response[0].title} | Gitcoin`, response[0].url); + document.title = `${vm.bounty.title} | Gitcoin`; + window.history.replaceState({}, `${vm.bounty.title} | Gitcoin`, vm.bounty.url); } if (vm.bounty.event && localStorage['pendingProject'] && (vm.bounty.standard_bounties_id == localStorage['pendingProject'])) { projectModal(vm.bounty.pk); @@ -43,7 +46,7 @@ Vue.mixin({ vm.eventParams(); }).catch(function(error) { vm.loadingState = 'error'; - _alert('Error fetching bounties. Please contact founders@gitcoin.co', 'danger'); + _alert('Error fetching bounties. Please contact support@gitcoin.co', 'danger'); }); }, eventParams: function() { @@ -170,6 +173,10 @@ Vue.mixin({ url = `https://casperstats.io/tx/${txn}`; break; + case 'ATOM': + url = `https://www.mintscan.io/cosmos/txs/${txn}`; + break; + default: url = `https://etherscan.io/tx/${txn}`; @@ -252,6 +259,10 @@ Vue.mixin({ url = `https://casperstats.io/address/${address}`; break; + case 'ATOM': + url = `https://mintscan.io/cosmos/account/${address}`; + break; + default: url = `https://etherscan.io/address/${address}`; } @@ -335,14 +346,27 @@ Vue.mixin({ waitBlock(bountyMetadata.txid); }, - checkOwner: function(handle) { + checkOwner: function() { let vm = this; + let ret = false; + let owner_handle = vm.bounty.bounty_owner_github_username; if (vm.contxt.github_handle) { - return caseInsensitiveCompare(document.contxt['github_handle'], handle); + ret = caseInsensitiveCompare(document.contxt['github_handle'], owner_handle); } - return false; + // Check also for additional bounty owners + if (!ret) { + for (let i = 0; i < vm.bounty.owners.length; i++) { + let additionalOwner = vm.bounty.owners[i]; + + ret = caseInsensitiveCompare(document.contxt['github_handle'], additionalOwner.handle); + if (ret) { + break; + } + } + } + return ret; }, checkOwnerAddress: function(bountyOwnerAddress) { let vm = this; @@ -422,6 +446,14 @@ Vue.mixin({ }); } }, + parseJSONNoFail(jsonString) { + try { + return JSON.parse(jsonString); + } catch (error) { + // Nothing to do + } + return ''; + }, getTenant: function(token_name, web3_type) { let tenant; let vm = this; @@ -504,6 +536,10 @@ Vue.mixin({ tenant = 'CASPER'; break; + case 'ATOM': + tenant = 'COSMOS'; + break; + default: tenant = 'ETH'; } @@ -571,6 +607,7 @@ Vue.mixin({ switch (payout_type) { case 'web3_modal': + case 'harmony_ext': payWithWeb3(fulfillment_id, fulfiller_address, vm, modal); break; @@ -582,10 +619,6 @@ Vue.mixin({ payWithBinanceExtension(fulfillment_id, fulfiller_address, vm, modal); break; - case 'harmony_ext': - payWithHarmonyExtension(fulfillment_id, fulfiller_address, vm, modal); - break; - case 'rsk_ext': payWithRSKExtension(fulfillment_id, fulfiller_address, vm, modal); break; @@ -605,6 +638,10 @@ Vue.mixin({ case 'casper_ext': payWithCasperExtension(fulfillment_id, fulfiller_address, vm, modal); break; + + case 'cosmos_ext': + payWithCosmosExtension(fulfillment_id, fulfiller_address, vm, modal); + break; } }, closeBounty: function() { @@ -826,6 +863,7 @@ Vue.mixin({ case 'algorand_ext': case 'tezos_ext': case 'casper_ext': + case 'cosmos_ext': vm.fulfillment_context.active_step = 'payout_amount'; break; } @@ -920,6 +958,12 @@ Vue.mixin({ }, expiresAfterAYear: function() { return moment().diff(document.result['expires_date'], 'years') < -1; + }, + isPayoutDateExpired: function() { + return moment(document.result['payout_date']).isBefore(); + }, + payoutDateExpiresAfterAYear: function() { + return moment().diff(document.result['payout_date'], 'years') < -1; } } }); diff --git a/app/assets/v2/js/pages/bounty_progress_bar.js b/app/assets/v2/js/pages/bounty_progress_bar.js new file mode 100644 index 00000000000..c0613df66e3 --- /dev/null +++ b/app/assets/v2/js/pages/bounty_progress_bar.js @@ -0,0 +1,14 @@ +Vue.component('bounty-progress-bar', { + props: { + steps: { type: Array, 'default': () => [] } + }, + delimiters: [ '[[', ']]' ], + computed: { + lineWidth() { + return (100 / this.steps.length) * (this.steps.length - 1); + }, + margin() { + return (100 / this.steps.length) / 2; + } + } +}); diff --git a/app/assets/v2/js/pages/change_bounty.js b/app/assets/v2/js/pages/change_bounty.js index 381c6135ea8..0f3141f33e0 100644 --- a/app/assets/v2/js/pages/change_bounty.js +++ b/app/assets/v2/js/pages/change_bounty.js @@ -1,380 +1,1292 @@ -// Overwrite from shared.js -// eslint-disable-next-line no-empty-function -function trigger_form_hooks() { -} +let appFormBounty; + +window.addEventListener('dataWalletReady', function(e) { + appFormBounty.network = networkName; + appFormBounty.form.funderAddress = selectedAccount; +}, false); -let usersBySkills; -let processedData; +const helpText = { + '#new-bounty-acceptace-criteria': 'Check out great examples of acceptance criteria from some of our past successful bounties!' +}; -const populateFromAPI = bounty => { - if (bounty && bounty.is_featured) { - $('#featuredBounty').prop('checked', true); - $('#featuredBounty').prop('disabled', true); +const bountyTypes = [ + 'Bug', + 'Project', + 'Feature', + 'Security', + 'Improvement', + 'Design', + 'Docs', + 'Code review', + 'Other' +]; + +Vue.use(VueQuillEditor); +Vue.component('v-select', VueSelect.VueSelect); +Vue.component('quill-editor-ext', { + props: [ 'initial', 'options' ], + template: '#quill-editor-ext', + data() { + return { + }; + }, + methods: { + onUpdate: function(event) { + this.$emit('change', { + text: event.text, + delta: event.quill.getContents() + }); + } + }, + mounted() { + this.$refs.quillEditor.quill.setContents(this.initial); } +}); - $.each(bounty, function(key, value) { - let ctrl = $('[name=' + key + ']', $('#submitBounty')); +Vue.mixin({ + data() { + return { + step: 1, + bountyTypes: bountyTypes, + tagOptions: [ + 'JavaScript', + 'TypeScript', + 'HTML', + 'Solidity', + 'CSS', + 'Python', + 'React', + 'Ethereum', + 'Blockchain', + 'DeFi', + 'Shell', + 'web3', + 'Design', + 'NFT', + 'Rust', + 'Dockerfile', + 'Go', + 'Community', + 'dApp', + 'API', + 'Documentation', + 'DAO', + 'Smart contract', + 'UI/UX', + 'POAP' + ], + contactDetailsType: [ + 'Discord', + 'Telegram', + 'Email' + ], + contactDetailsPlaceholderMap: { + '': 'mydiscord#1234', + 'Discord': 'mydiscord#1234', + 'Telegram': 'mytelegramusername', + 'Email': 'my@email.com' + }, + networkOptions: [ + { + 'id': '1', + 'logo': 'https://s.gitcoin.co/static/v2/images/chains/ethereum.512bdfc90974.svg', + 'label': 'ETH' + }, + { + 'id': '0', + 'logo': 'https://s.gitcoin.co/static/v2/images/chains/bitcoin.a606afe92dc0.svg', + 'label': 'BTC' + }, + { + 'id': '666', + 'logo': 'https://s.gitcoin.co/static/v2/images/chains/paypal.94a717ec583d.svg', + 'label': 'PayPal' + }, + { + 'id': '56', + 'logo': 'https://s.gitcoin.co/static/v2/images/chains/binance.f29b8c5b883c.svg', + 'label': 'Binance' + }, + { + 'id': '1000', + 'logo': 'https://s.gitcoin.co/static/v2/images/chains/harmony.94e314f87cb6.svg', + 'label': 'Harmony' + }, + { + 'id': '58', + 'logo': 'https://s.gitcoin.co/static/v2/images/chains/polkadot.ab164a0162c0.svg', + 'label': 'Polkadot' + }, + { + 'id': '59', + 'logo': 'https://s.gitcoin.co/static/v2/images/chains/kusama.79f72c4ef309.svg', + 'label': 'Kusama' + }, + { + 'id': '61', + 'logo': 'https://s.gitcoin.co/static/v2/images/chains/ethereum-classic.5da22d66e88a.svg', + 'label': 'ETC' + }, + { + 'id': '102', + 'logo': 'https://s.gitcoin.co/static/v2/images/chains/zilliqa.53f121329fe2.svg', + 'label': 'Zilliqa' + }, + { + 'id': '600', + 'logo': 'https://s.gitcoin.co/static/v2/images/chains/filecoin.5b66dcda075a.svg', + 'label': 'Filecoin' + }, + { + 'id': '42220', + 'logo': 'https://s.gitcoin.co/static/v2/images/chains/celo.92f6ddaad4cd.svg', + 'label': 'Celo' + }, + { + 'id': '30', + 'logo': 'https://s.gitcoin.co/static/v2/images/chains/rsk.ad4762fa3b4b.svg', + 'label': 'RSK' + }, + { + 'id': '50', + 'logo': 'https://s.gitcoin.co/static/v2/images/chains/xinfin.dfca06ac5f24.svg', + 'label': 'Xinfin' + }, + { + 'id': '1001', + 'logo': 'https://s.gitcoin.co/static/v2/images/chains/algorand.25e6b9cd9ae9.svg', + 'label': 'Algorand' + }, + { + 'id': '1935', + 'logo': 'https://s.gitcoin.co/static/v2/images/chains/sia.1aeab380df24.svg', + 'label': 'Sia' + }, + { + 'id': '1995', + 'logo': 'https://s.gitcoin.co/static/v2/images/chains/nervos.e3e776d77e06.svg', + 'label': 'Nervos' + }, + { + 'id': '50797', + 'logo': 'https://s.gitcoin.co/static/v2/images/chains/tezos.66a5e2b53980.svg', + 'label': 'Tezos' + }, + { + 'id': '270895', + 'logo': 'https://s.gitcoin.co/static/v2/images/chains/casper.4718c7855050.svg', + 'label': 'Casper' + }, + { + 'id': '717171', + 'logo': null, + 'label': 'Other' + } + ] + }; + }, + methods: { + getContactDetailsPlaceholder: function(val) { + return this.contactDetailsPlaceholderMap[val] || this.contactDetailsPlaceholderMap['']; + }, + estHoursValidator: function() { + this.form.hours = parseFloat(this.form.hours || 0); + this.form.hours = Math.ceil(this.form.hours); + this.calcValues('token'); + }, + getIssueDetails: function(url) { + let vm = this; - switch (ctrl.prop('type')) { - case 'radio': - $(`.${value}`).button('toggle'); - break; + if (!url) { + vm.$set(vm.errors, 'issueDetails', undefined); + vm.form.issueDetails = null; + return vm.form.issueDetails; + } - case 'checkbox': - ctrl.each(function() { - if (value.length) { - $.each(value, function(key, val) { - $(`.${val}`).button('toggle'); - }); - } else { - $(this).prop('checked', value); - } - }); - break; + let ghIssueUrl; - case 'select-one': - $('#' + key).val(value).trigger('change'); - break; + try { + ghIssueUrl = new URL(url); + } catch (e) { + vm.form.issueDetails = undefined; + vm.$set(vm.errors, 'issueDetails', 'Please paste a github issue url'); + return; + } - default: - if (value > 0) { - ctrl.val(value); - } - } - }); + if (ghIssueUrl.host != 'github.com') { + vm.form.issueDetails = undefined; + vm.$set(vm.errors, 'issueDetails', 'Please paste a github issue url'); + return; + } - if (bounty && bounty.keywords) { + if (ghIssueUrl.pathname.includes('/pull/')) { + vm.$set(vm.errors, 'issueDetails', 'Please paste a github issue url and not a PR'); + return; + } - let keywords = bounty['keywords'].split(','); - $('#keywords').select2({ - placeholder: 'Select tags', - data: keywords, - tags: true, - allowClear: true, - tokenSeparators: [ ',', ' ' ] - }).trigger('change'); + vm.orgSelected = ghIssueUrl.pathname.split('/')[1].toLowerCase(); - $('#keywords').val(keywords).trigger('change'); - $('#keyword-suggestion-container').hide(); - } -}; + if (vm.checkBlocked(vm.orgSelected)) { + vm.$set(vm.errors, 'issueDetails', 'This repo is not bountyable at the request of the maintainer.'); + vm.form.issueDetails = undefined; + return; + } + vm.$delete(vm.errors, 'issueDetails'); -const formatUser = user => { - if (!user.text || user.children) { - return user.text; - } + let apiUrldetails = `/sync/get_issue_details?url=${encodeURIComponent(url.trim())}&duplicates=true&network=${vm.network}`; - const markup = ` -
-
- -
-
${user.text}
-
`; + if (vm.hackathon_slug) { + apiUrldetails += `&hackathon_slug=${encodeURIComponent(vm.hackathon_slug)}`; + } - return markup; -}; + vm.form.issueDetails = undefined; + const getIssue = fetchData(apiUrldetails, 'GET'); -const formatUserSelection = user => { - let selected; + $.when(getIssue).then((response) => { + if (!Object.keys(response).length) { + return vm.$set(vm.errors, 'issueDetails', 'Nothing found. Please check the issue URL.'); + } - if (user.id) { - selected = ` - - ${user.text}`; - } else { - selected = user.text; - } + vm.form.issueDetails = response; - return selected; -}; + let md = window.markdownit(); -const getSuggestions = () => { + vm.form.richDescription = md.render(vm.form.issueDetails.description); + vm.form.title = vm.form.issueDetails.title; - let keywords = $('#keywords').val(); + vm.$set(vm.errors, 'issueDetails', undefined); + }).catch((err) => { + console.log(err); + vm.form.issueDetails = undefined; + vm.$set(vm.errors, 'issueDetails', err.responseJSON.message); + }); - const settings = { - url: `/api/v0.1/get_suggested_contributors?keywords=${keywords}`, - method: 'GET', - processData: false, - dataType: 'json', - contentType: false - }; + }, + validateOrgUrl: function(url) { + let vm = this; - $.ajax(settings).done(function(response) { - let groups = { - 'contributors': 'Recently worked with you', - 'recommended_developers': 'Recommended based on skills', - 'verified_developers': 'Verified contributors' - }; + if (!url) { + vm.$set(vm.errors, 'orgDetails', undefined); + return; + } - let options = Object.entries(response).map(([ text, children ]) => ( - { text: groups[text], children } - )); + let ghIssueUrl; - usersBySkills = [].map.call(response['recommended_developers'], function(obj) { - return obj; - }); + try { + ghIssueUrl = new URL(url); + } catch (e) { + vm.$set(vm.errors, 'orgDetails', 'Please paste a github org url'); + return; + } - if (keywords.length && usersBySkills.length) { - $('#invite-all-container').show(); - $('.select2-add_byskill span').text(keywords.join(', ')); - } else { - $('#invite-all-container').hide(); - } + if (ghIssueUrl.host != 'github.com') { + vm.$set(vm.errors, 'orgDetails', 'Please paste a github org url'); + return; + } - let generalIndex = 0; + let apiUrldetails = `/sync/validate_org_url?url=${encodeURIComponent(url.trim())}`; - processedData = $.map(options, function(obj) { - if (obj.children.length < 1) { - return; + if (vm.hackathon_slug) { + apiUrldetails += `&hackathon_slug=${encodeURIComponent(vm.hackathon_slug)}`; } - obj.children.forEach(children => { - children.text = children.profile__handle || children.user__profile__handle; - children.id = generalIndex; - generalIndex++; + vm.form.orgDetails = undefined; + const getIssue = fetchData(apiUrldetails, 'GET'); + + $.when(getIssue).then((response) => { + vm.$set(vm.errors, 'orgDetails', undefined); + }).catch((err) => { + console.log(err); + vm.form.issueDetails = undefined; + vm.$set(vm.errors, 'orgDetails', err.responseJSON.message); + }); + }, + getTokens: function() { + let vm = this; + const apiUrlTokens = '/api/v1/tokens/'; + const getTokensData = fetchData(apiUrlTokens, 'GET'); + + return $.when(getTokensData).then((response) => { + vm.tokens = response; + // vm.form.token = vm.filterByChainId[0]; + vm.getAmount(vm.form.token.symbol); + + }).catch((err) => { + console.log(err); }); - return obj; - }); - - $('#invite-contributors').select2().empty(); - $('#invite-contributors.js-select2').select2({ - data: processedData, - placeholder: 'Select contributors', - escapeMarkup: function(markup) { - return markup; - }, - templateResult: formatUser, - templateSelection: formatUserSelection - }); - }).fail(function(error) { - console.log('Could not fetch contributors', error); - }); -}; + }, + getBinanceSelectedAccount: async function() { + let vm = this; -$(document).ready(function() { + try { + vm.form.funderAddress = await binance_utils.getSelectedAccount(); + } catch (error) { + vm.funderAddressFallback = true; + } + }, + onChainInput: function() { + this.form.token = null; + this.form.amount = 0; + this.form.amountusd = 0; + }, + getAmount: function(token) { + let vm = this; - const bounty = document.result; - const form = $('#submitBounty'); + if (!token) { + return; + } + const apiUrlAmount = `/sync/get_amount?amount=1&denomination=${token}`; + const getAmountData = fetchData(apiUrlAmount, 'GET'); + + $.when(getAmountData).then(tokens => { + vm.coinValue = tokens[0].usdt; + // vm.calcValues('usd'); + }).catch((err) => { + console.log(err); + }); + }, + calcValues: function(direction) { + let vm = this; - populateFromAPI(bounty); + if (direction == 'usd') { + let usdValue = vm.form.amount * vm.coinValue; - $('.js-select2').each(function() { - $(this).select2({ - minimumResultsForSearch: Infinity - }); - }); + vm.form.amountusd = Number(usdValue.toFixed(2)); + } else { + vm.form.amount = Number(vm.form.amountusd * 1 / vm.coinValue).toFixed(4); + } - $('[name=project_type]').on('change', function() { - const val = $('input[name=project_type]:checked').val(); + }, + addKeyword: function(item) { + let vm = this; - if (val !== 'traditional') { - $('#reservedFor').attr('disabled', true); - $('#reservedFor').select2().trigger('change'); - } else { - $('#reservedFor').attr('disabled', false); - userSearch('#reservedFor', false); - } - }).triggerHandler('change'); + vm.form.keywords.push(item); + }, + validateFunderAddress: function() { + let vm = this; - $('[name=permission_type]').on('change', function() { - const val = $('input[name=permission_type]:checked').val(); + return validateWalletAddress(vm.chainId, vm.form.funderAddress); + }, + checkFormStep1: function() { + let vm = this; - if (val === 'approval') { - $('#admin_override_suspend_auto_approval').attr('disabled', false); - } else { - $('#admin_override_suspend_auto_approval').prop('checked', false); - $('#admin_override_suspend_auto_approval').attr('disabled', true); - } - }).triggerHandler('change'); + ret = {}; - let usdFeaturedPrice = $('.featured-price-usd').text(); - let ethFeaturedPrice; + if (vm.step1Submitted) { + if (!vm.form.experience_level) { + ret['experience_level'] = 'Please select the experience level'; + } + if (!vm.form.project_length) { + ret['project_length'] = 'Please select the project length'; + } - getAmountEstimate(usdFeaturedPrice, 'ETH', function(amountEstimate) { - ethFeaturedPrice = amountEstimate['value']; - $('.featured-price-eth').text(`+${amountEstimate['value']} ETH`); - }); + if (!vm.form.bounty_type) { + ret['bounty_type'] = 'Please select the bounty type'; + } else if (vm.form.bounty_type === 'Other') { + if (!vm.form.bounty_type_other) { + ret['bounty_type_other'] = 'Please describe your bounty type'; + } + } + + if (vm.form.keywords.length < 1) { + ret['keywords'] = 'Select at least one category'; + } + } - getSuggestions(); - $('#keywords').on('change', getSuggestions); + return ret; + }, - $('.select2-tag__choice').on('click', function() { - $('#invite-contributors.js-select2').data('select2').dataAdapter.select(processedData[0].children[$(this).data('id')]); - }); + checkFormStep2: function() { + let vm = this; - $('.select2-add_byskill').on('click', function(e) { - e.preventDefault(); - $('#invite-contributors.js-select2').val(usersBySkills.map((item) => { - return item.id; - })).trigger('change'); - }); + ret = {}; - $('.select2-clear_invites').on('click', function(e) { - e.preventDefault(); - $('#invite-contributors.js-select2').val(null).trigger('change'); - }); + if (vm.step2Submitted) { + if (!vm.form.bountyInformationSource) { + ret['bountyInformationSource'] = 'Select the bounty information source'; + } else if (vm.form.bountyInformationSource === 'github') { - const reservedForHandle = bounty && bounty.reserved_for_user_handle ? bounty.reserved_for_user_handle : []; + if (!vm.form.issueUrl) { + ret['issueDetails'] = 'Please input a GitHub issue'; + } else if (vm.errors.issueDetails) { + if (vm.errors.issueDetails) { + ret['issueDetails'] = vm.errors.issueDetails; + } + } - userSearch('#reservedFor', false, '', reservedForHandle, true); + } else { + if (!vm.form.title) { + ret['title'] = 'Please input bounty title'; + } - if ($('input[name=amount]').length) { + if (!vm.form.richDescriptionText.trim()) { + ret['description'] = 'Please input bounty description'; + } - const denomination = $('input[name=denomination]').val(); + if (vm.isHackathonBounty) { + if (!vm.form.organisationUrl) { + ret['organisationUrl'] = 'Please input a GitHub organization URL'; + } else if (vm.errors.orgDetails) { + if (vm.errors.orgDetails) { + ret['organisationUrl'] = vm.errors.orgDetails; + } + } + } - setTimeout(() => setUsdAmount(denomination, false), 1000); + } + } - $('input[name=hours]').keyup(() => setUsdAmount(denomination, false)); - $('input[name=hours]').blur(() => setUsdAmount(denomination, false)); - $('input[name=amount]').keyup(() => setUsdAmount(denomination, false)); + return ret; + }, - $('input[name=usd_amount]').on('focusin', function() { - $('input[name=usd_amount]').attr('prev_usd_amount', $(this).val()); - $('input[name=amount]').trigger('change'); - }); + checkFormStep3: function() { + let vm = this; - $('input[name=usd_amount]').on('focusout', function() { - $('input[name=usd_amount]').attr('prev_usd_amount', $(this).val()); - $('input[name=amount]').trigger('change'); - }); + ret = {}; - $('input[name=usd_amount]').keyup(() => { - const prev_usd_amount = $('input[name=usd_amount]').attr('prev_usd_amount'); - const usd_amount = $('input[name=usd_amount').val(); + if (vm.step3Submitted) { + if (!vm.chainId) { + ret['chainId'] = 'Please select a chain'; + } + + if (!vm.form.token) { + ret['token'] = 'Please select a token'; + } - $('input[name=amount]').trigger('change'); + if (vm.form.peg_to_usd) { + let amountusd = Number.parseFloat(vm.form.amountusd); - if (prev_usd_amount != usd_amount) { - usdToAmount(usd_amount, denomination); + if (!amountusd > 0) { + ret['amountusd'] = 'Please enter a valid anount'; + } + } else { + let amount = Number.parseFloat(vm.form.amount); + + if (!amount > 0) { + ret['amount'] = 'Please enter a valid anount'; + } + } } - }); - } - form.validate({ - errorPlacement: function(error, element) { - if (element.attr('name') == 'bounty_categories') { - error.appendTo($(element).parents('.btn-group-toggle').next('.cat-error')); + return ret; + }, + + checkFormStep4: function() { + let vm = this; + + ret = {}; + + if (vm.step4Submitted) { + if (!vm.form.project_type) { + ret['project_type'] = 'Select the project type'; + } + if (!vm.form.permission_type) { + ret['permission_type'] = 'Select the permission type'; + } + } + + return ret; + }, + + checkForm: async function() { + return true; + }, + web3Type() { + let vm = this; + let type; + + switch (vm.chainId) { + case '1': + // ethereum + type = 'web3_modal'; + break; + case '30': + // rsk + type = 'rsk_ext'; + break; + case '50': + // xinfin + type = 'xinfin_ext'; + break; + case '59': + case '58': + // 58 - polkadot, 59 - kusama + type = 'polkadot_ext'; + break; + case '56': + // binance + type = 'binance_ext'; + break; + case '1000': + // harmony + type = 'harmony_ext'; + break; + case '1995': + // nervos + type = 'nervos_ext'; + break; + case '1001': + // algorand + type = 'algorand_ext'; + break; + case '1935': + // sia + type = 'sia_ext'; + break; + case '50797': + // tezos + type = 'tezos_ext'; + break; + case '270895': + // casper + type = 'casper_ext'; + break; + case '1155': + // cosmos + type = 'cosmos_ext'; + break; + case '666': + // paypal + type = 'fiat'; + break; + case '0': // bitcoin + case '61': // ethereum classic + case '102': // zilliqa + case '600': // filecoin + case '42220': // celo mainnet + case '44786': // celo alfajores tesnet + case '717171': // other + type = 'qr'; + break; + default: + type = 'web3_modal'; + } + + vm.form.web3_type = type; + return type; + }, + getParams: async function() { + let vm = this; + + let params = new URLSearchParams(window.location.search); + + if (params.has('invite')) { + vm.expandedGroup.reserve = [1]; + } + + if (params.has('reserved')) { + vm.expandedGroup.reserve = [1]; + await vm.getUser(null, params.get('reserved'), true); + } + + let url; + + if (params.has('url')) { + url = params.get('url'); + vm.form.issueUrl = url; + vm.getIssueDetails(url); + } + + if (params.has('source')) { + url = params.get('source'); + vm.form.issueUrl = url; + vm.getIssueDetails(url); + } + }, + showQuickStart: function(force) { + let quickstartDontshow = localStorage['quickstart_dontshow'] ? JSON.parse(localStorage['quickstart_dontshow']) : false; + + if (quickstartDontshow !== true || force) { + fetch('/bounty/quickstart') + .then(function(response) { + return response.text(); + }).then(function(html) { + const parser = new DOMParser(); + const doc = parser.parseFromString(html, 'text/html'); + const guide = doc.querySelector('.btn-closeguide'); + + doc.querySelector('.show_video').href = 'https://www.youtube.com/watch?v=m1X0bDpVcf4'; + doc.querySelector('.show_video').target = '_blank'; + + guide.dataset.dismiss = 'modal'; + + const docArticle = doc.querySelector('.content').innerHTML; + const content = $.parseHTML( + ``); + + $(content).appendTo('body'); + document.getElementById('dontshow').checked = quickstartDontshow; + $('#gitcoin_updates').bootstrapModal('show'); + + $(document).on('change', '#dontshow', function(e) { + if ($(this)[0].checked) { + localStorage['quickstart_dontshow'] = true; + } else { + localStorage['quickstart_dontshow'] = false; + } + }); + }); + + $(document, '#gitcoin_updates').on('hidden.bs.modal', function(e) { + $('#gitcoin_updates').remove(); + $('#gitcoin_updates').bootstrapModal('dispose'); + }); + } + }, + isExpanded(key, type) { + return this.expandedGroup[type].indexOf(key) !== -1; + }, + toggleCollapse(key, type) { + if (this.isExpanded(key, type)) { + this.expandedGroup[type].splice(this.expandedGroup[type].indexOf(key), 1); } else { - error.insertAfter(element); + this.expandedGroup[type].push(key); + } + }, + updateDate(date) { + // date is expected to be a momentjs object + let vm = this; + + vm.form.expirationTimeDelta = date; + }, + updatePayoutDate(date) { + // date is expected to be a momentjs object + let vm = this; + + vm.form.payoutDate = date; + }, + userSearch(search, loading) { + let vm = this; + + if (search.length < 3) { + return; + } + loading(true); + vm.getUser(loading, search); + }, + getUser: async function(loading, search, selected) { + let vm = this; + let myHeaders = new Headers(); + let url = `/api/v0.1/users_search/?token=${currentProfile.githubToken}&term=${escape(search)}`; + + myHeaders.append('X-Requested-With', 'XMLHttpRequest'); + return new Promise(resolve => { + + fetch(url, { + credentials: 'include', + headers: myHeaders + }).then(res => { + res.json().then(json => { + vm.usersOptions = json; + if (selected) { + vm.$set(vm.form, 'reservedFor', vm.usersOptions[0].text); + } + resolve(); + }); + if (loading) { + loading(false); + } + }); + }); + }, + checkBlocked(org) { + let vm = this; + let blocked = vm.blockedUrls.toLocaleString().toLowerCase().split(','); + + return blocked.indexOf(org.toLowerCase()) > -1; + }, + featuredValue() { + let vm = this; + const apiUrlAmount = `/sync/get_amount?amount=${vm.usdFeaturedPrice}&denomination=USDT`; + const getAmountData = fetchData(apiUrlAmount, 'GET'); + + $.when(getAmountData).then(value => { + vm.ethFeaturedPrice = value[0].eth.toFixed(4); + + }).catch((err) => { + console.log(err); + }); + }, + /** + * Filters tokens by vm.networkId + * @param {*} tokens + * @returns {*} tokens + */ + filterByNetworkId: function(tokens) { + let vm = this; + + if (vm.networkId) { + tokens = tokens.filter((token) => { + return String(token.networkId) === vm.networkId; + }); } + return tokens; }, - ignore: '', - messages: { - select2Start: { - required: 'Please select the keyword tags for this bounty.' + submitForm: async function() { + let vm = this; + + + if (vm.form.organisationUrl) { + try { + let url = new URL(vm.form.organisationUrl); + let pathSegments = url.pathname.split('/'); + let orgName = pathSegments[pathSegments.length - 1] || pathSegments[pathSegments.length - 2]; + + vm.form.fundingOrganisation = orgName; + } catch (error) { + vm.form.fundingOrganisation = vm.form.organisationUrl; + } } + + const metadata = { + issueTitle: vm.form.title, + issueDescription: vm.form.bountyInformationSource == 'github' ? vm.form.issueDetails.description : vm.form.description, + issueKeywords: vm.form.keywords.join(), + githubUsername: vm.form.githubUsername, + notificationEmail: vm.form.notificationEmail, + fullName: vm.form.fullName, + experienceLevel: vm.form.experience_level, + projectLength: vm.form.project_length, + bountyType: vm.form.bounty_type, + estimatedHours: vm.form.hours, + fundingOrganisation: vm.form.fundingOrganisation, + eventTag: vm.form.eventTag, + is_featured: vm.form.featuredBounty ? '1' : undefined, + repo_type: 'public', + featuring_date: vm.form.featuredBounty && ((new Date().getTime() / 1000) | 0) || 0, + reservedFor: vm.form.reserved_for_user ? vm.form.reserved_for_user.text : '', + releaseAfter: '', + tokenName: vm.form.token.symbol, + invite: [], + bounty_categories: vm.form.bounty_categories.join(), + activity: '', + chain_id: vm.chainId + }; + + + const params = { + 'title': metadata.issueTitle, + 'amount': vm.form.amount, + 'value_in_token': vm.form.amount * 10 ** vm.form.token.decimals, + 'token_name': metadata.tokenName, + 'token_address': vm.form.token.address, + 'bounty_type': metadata.bountyType !== 'Other' ? metadata.bountyType : vm.form.bounty_type_other, + 'project_length': metadata.projectLength, + 'estimated_hours': metadata.estimatedHours, + 'experience_level': metadata.experienceLevel, + 'github_url': vm.form.issueUrl, + 'bounty_owner_email': metadata.notificationEmail, + 'bounty_owner_github_username': metadata.githubUsername, + 'bounty_owner_name': metadata.fullName, // ETC-TODO REMOVE ? + 'reserved_for_user_handle': metadata.reservedFor, + 'release_to_public': metadata.releaseAfter, + 'never_expires': vm.form.never_expires, + 'expires_date': vm.form.never_expires ? 9999999999 : moment(vm.form.expirationTimeDelta).utc().unix(), + 'payout_date': vm.form.never_expires ? 9999999999 : moment(vm.form.payoutDate).utc().unix(), + 'metadata': metadata, + 'raw_data': {}, // ETC-TODO REMOVE ? + 'network': vm.network, + 'issue_description': metadata.issueDescription, + 'funding_organisation': metadata.fundingOrganisation, + 'balance': vm.form.amount * 10 ** vm.form.token.decimals, // ETC-TODO REMOVE ? + 'project_type': vm.form.project_type, + 'permission_type': vm.form.permission_type, + 'bounty_categories': metadata.bounty_categories, + 'repo_type': metadata.repo_type, + 'is_featured': metadata.is_featured, + 'featuring_date': metadata.featuring_date, + 'fee_amount': vm.totalAmount.totalFee, + 'fee_tx_id': vm.form.feeTxId, + 'coupon_code': vm.form.couponCode, + 'privacy_preferences': { + show_email_publicly: vm.form.showEmailPublicly + }, + 'attached_job_description': vm.form.jobDescription, + 'eventTag': metadata.eventTag, + 'auto_approve_workers': vm.form.auto_approve_workers, + 'web3_type': vm.web3Type(), + 'activity': metadata.activity, + 'bounty_owner_address': vm.form.funderAddress, + 'acceptance_criteria': JSON.stringify(vm.form.richAcceptanceCriteria), + 'resources': JSON.stringify(vm.form.richResources), + 'contact_details': vm.nonEmptyContactDetails, + 'bounty_source': vm.form.bountyInformationSource, + 'peg_to_usd': vm.form.peg_to_usd, + 'amount_usd': vm.form.amountusd, + 'owners': vm.form.bounty_owners.map(owner => owner.id), + 'custom_issue_description': JSON.stringify(vm.form.richDescriptionContent) + }; + + vm.sendBounty(JSON.stringify(params)); + }, - submitHandler: function(form) { - const inputElements = $(form).find(':input'); - const formData = {}; + sendBounty(data) { + let vm = this; + + if (typeof ga !== 'undefined') { + ga('send', 'event', 'Create Bounty', 'click', 'Bounty Funder'); + } - inputElements.removeAttr('disabled'); - $.each($(form).serializeArray(), function() { - if (formData[this.name]) { - formData[this.name] += ',' + this.value; + const bountyId = document.pk; + const apiUrlBounty = '/bounty/change/' + bountyId; + const postBountyData = fetchData(apiUrlBounty, 'POST', data); + + $.when(postBountyData).then((responseMsg, responseStatus, response, a, b, c, d, e) => { + if (200 <= response.status && response.status <= 204) { + console.log('success', response); + removeEventListener('beforeunload', beforeUnloadListener, {capture: true}); + window.location.href = responseMsg.url; + } else if (response.status == 304) { + _alert('Bounty already exists for this github issue.', 'danger'); + console.error(`error: bounty creation failed with status: ${response.status} and message: ${response.message}`); } else { - formData[this.name] = this.value; + _alert(`Unable to create a bounty. ${response.message}`, 'danger'); + console.error(`error: bounty creation failed with status: ${response.status} and message: ${response.message}`); } + + }).catch((err) => { + console.log(err); + _alert('Unable to create a bounty. Please try again later', 'danger'); }); - inputElements.attr('disabled', 'disabled'); - loading_button($('.js-submit')); + }, + updateNav: function(direction) { + if (direction === 1) { + // Forward navigation + let errors = {}; + + switch (this.step) { + case 1: + this.step1Submitted = true; + errors = this.checkFormStep1(); + break; + case 2: + this.step2Submitted = true; + errors = this.checkFormStep2(); + break; + case 3: + this.step3Submitted = true; + errors = this.checkFormStep3(); + break; + case 4: + this.step4Submitted = true; + errors = this.checkFormStep4(); + break; + default: + this.submitForm(); + return; + } + if (Object.keys(errors).length == 0) { + this.step += 1; + } + } else if (this.step > 1) { + // Backward navigation + this.step -= 1; + } + }, + + removeContactDetails(idx) { + this.form.contactDetails.splice(idx, 1); + }, - const reservedFor = $('.username-search').select2('data')[0]; - let inviteContributors = $('#invite-contributors.js-select2').select2('data').map((user) => { - return user.user__profile__id; + addContactDetails() { + this.form.contactDetails.push({ + type: '', + value: '' }); + }, - if (reservedFor) { - formData['reserved_for_user_handle'] = reservedFor.text; - } + updateCustomDescription({text, delta}) { + this.form.richDescriptionText = text; + this.form.richDescriptionContent = delta; + }, + + updateAcceptanceCriteria({ text, delta }) { + this.form.richAcceptanceCriteria = delta; + this.form.richAcceptanceCriteriaText = text; + }, + + updateResources({ text, delta }) { + this.form.richResources = delta; + this.form.richResourcesText = text; + }, + + popover(elementId) { + $(elementId).popover({ + placement: 'right', + content: helpText[elementId] + }).popover('show'); + } + }, + computed: { + bountyFee: function() { + let vm = this; - if (inviteContributors.length) { - formData['invite'] = inviteContributors; + if (vm.chainId === '1' && !vm.subscriptionActive) { + return Number(document.FEE_PERCENTAGE); } + return 0; + + }, + totalAmount: function() { + let vm = this; + let fee = vm.bountyFee / 100.0; + + let totalFee = Number(vm.form.amount) * fee; + let total = Number(vm.form.amount) + totalFee; - if (document.result && document.result.is_featured) { - formData['is_featured'] = true; - } else if (formData['featuredBounty'] === '1') { - formData['is_featured'] = true; - formData['featuring_date'] = new Date().getTime() / 1000; + return { 'totalFee': totalFee, 'total': total }; + }, + totalTx: function() { + let vm = this; + let numberTx = 0; + + if (vm.chainId === '1' && !vm.subscriptionActive) { + numberTx += vm.bountyFee > 0 ? 1 : 0; } else { - formData['is_featured'] = false; + numberTx = 0; } - const token = tokenAddressToDetailsByNetwork(token_address, bounty_network); + if (!vm.subscriptionActive) { + numberTx += vm.form.featuredBounty ? 1 : 0; + } - formData['value_in_token'] = formData['amount'] * 10 ** token.decimals; + return numberTx; - const bountyId = document.pk; - const payload = JSON.stringify(formData); - - const payFeaturedBounty = function() { - indicateMetamaskPopup(); - web3.eth.sendTransaction({ - to: '0x88c62f1695DD073B43dB16Df1559Fda841de38c6', - from: selectedAccount, - value: web3.utils.toWei(String(ethFeaturedPrice)), - gasPrice: web3.utils.toHex(5 * Math.pow(10, 9)), - gas: web3.utils.toHex(318730), - gasLimit: web3.utils.toHex(318730) + }, + filterOrgSelected: function() { + if (!this.orgSelected) { + return; + } + return `/dynamic/avatar/${this.orgSelected}`; + }, + successRate: function() { + let rate; + + if (!this.form.amountusd) { + return; + } + + rate = ((this.form.amountusd / this.form.hours) * 100 / 120).toFixed(0); + if (rate > 100) { + rate = 100; + } + return rate; + + }, + sortByPriority: function() { + return this.tokens.sort(function(a, b) { + return b.priority - a.priority; + }); + }, + filterByNetwork: function() { + const vm = this; + + if (vm.network == '') { + return vm.sortByPriority; + } + return vm.sortByPriority.filter((item) => { + + return item.network.toLowerCase().indexOf(vm.network.toLowerCase()) >= 0; + }); + }, + filterByChainId: function() { + const vm = this; + let result; + + if (vm.chainId == '') { + result = vm.filterByNetwork; + } else { + result = vm.filterByNetwork.filter((item) => { + return String(item.chainId) === vm.chainId; + }); + + if (vm.chainId == '1') { + // allow only mainnet tokens in ETH chain + vm.networkId = '1'; + result = vm.filterByNetworkId(result); + } + } + return result; + }, + currentSteps: function() { + const steps = [ + { + text_long: 'Bounty Type', + text_short: 'Bounty Type', + active: false }, - function(error, result) { - indicateMetamaskPopup(true); - if (error) { - _alert({ message: gettext('Unable to upgrade to featured bounty. Please try again.') }, 'danger'); - console.log(error); - } else { - saveAttestationData( - result, - ethFeaturedPrice, - '0x88c62f1695DD073B43dB16Df1559Fda841de38c6', - 'featuredbounty' - ); - saveBountyChanges(); - } + { + text_long: 'Bounty Details', + text_short: 'Bounty Details', + active: false + }, + { + text_long: 'Payment Information', + text_short: 'Payment Info', + active: false + }, + { + text_long: 'Additional Information', + text_short: 'Additional Info', + active: false + }, + { + text_long: 'Review Bounty', + text_short: 'Review Bounty', + active: false + } + ]; + + steps[this.step - 1].active = true; + return steps; + }, + chainId: function() { + if (this.chain) { + return this.chain.id; + } + return ''; + }, + isExpired: function() { + return moment(this.form.expirationTimeDelta).isBefore(); + }, + expiresAfterAYear: function() { + if (this.form.never_expires) { + return true; + } + return moment().diff(this.form.expirationTimeDelta, 'years') < -1; + }, + isPayoutDateExpired: function() { + return moment(this.form.payoutDate).isBefore(); + }, + payoutDateExpiresAfterAYear: function() { + if (this.form.never_expires) { + return true; + } + return moment().diff(this.form.payoutDate, 'years') < -1; + }, + step1Errors: function() { + return this.checkFormStep1(); + }, + isStep1Valid: function() { + let ret = Object.keys(this.step1Errors).length == 0; + + return ret; + }, + step2Errors: function() { + return this.checkFormStep2(); + }, + isStep2Valid: function() { + let ret = Object.keys(this.step2Errors).length == 0; + + return ret; + }, + step3Errors: function() { + return this.checkFormStep3(); + }, + isStep3Valid: function() { + let ret = Object.keys(this.step3Errors).length == 0; + + return ret; + }, + step4Errors: function() { + return this.checkFormStep4(); + }, + isStep4Valid: function() { + let ret = Object.keys(this.step4Errors).length == 0; + + return ret; + }, + nonEmptyContactDetails: function() { + if (this.form.contactDetails) { + return this.form.contactDetails.filter(function(c) { + return !!c.value; }); - }; + } + return []; + + } + }, + watch: { + form: { + deep: true, + handler(newVal, oldVal) { + this.dirty = true; + } - const saveBountyChanges = function() { - $.post('/bounty/change/' + bountyId, payload).then( - function(result) { - inputElements.removeAttr('disabled'); - unloading_button($('.js-submit')); + }, + chain: async function(val) { - result = sanitizeAPIResults(result); - _alert({ message: result.msg }, 'success'); + if (val) { + // if (!provider && val.id === '1') { + // await onConnect(); + // } - if (result.url) { - setTimeout(function() { - document.location.href = result.url; - }, 1000); - } + // if (val.id === '56') { + // this.getBinanceSelectedAccount(); + // } + + this.getTokens(); + } + } + } +}); + +if (document.getElementById('gc-hackathon-new-bounty')) { + let bounty = document.result; + + appFormBounty = new Vue({ + delimiters: [ '[[', ']]' ], + el: '#gc-hackathon-new-bounty', + components: { + 'vue-select': 'vue-select' + }, + data() { + let isCommonBountyType = bountyTypes.find(function(bt) { + return bounty.bounty_type === bt; + }); + let ret = { + status: 'OPEN', + tokens: [], + network: bounty.network, + chain: null, + funderAddressFallback: false, + checkboxes: { 'terms': false, 'termsPrivacy': false, 'hiringRightNow': false }, + expandedGroup: { 'reserve': [], 'featuredBounty': [] }, + errors: {}, + usersOptions: [], + orgSelected: '', + subscriptions: document.subscriptions, + subscriptionActive: (document.subscriptions ? document.subscriptions.length : false) || document.contxt.is_pro, + coinValue: null, + usdFeaturedPrice: 12, + ethFeaturedPrice: null, + blockedUrls: document.blocked_urls, + dirty: false, + submitted: true, + step1Submitted: false, + step2Submitted: false, + step3Submitted: false, + step4Submitted: false, + reserveBounty: !!bounty.reserved_for_user_handle, + sponsors: document.sponsors, // Used only for hackathon + isHackathonBounty: document.isHackathonBounty, + hackathon_slug: document.hackathon ? document.hackathon.slug : null, + isNew: false, + form: { + eventTag: document.hackathon ? document.hackathon.name : '', + expirationTimeDelta: moment.unix(bounty.expires_date), + payoutDate: moment.unix(bounty.payout_date), + featuredBounty: false, + fundingOrganisation: bounty.funding_organisation, + issueDetails: {description: bounty.issue_description}, + issueUrl: bounty.github_url, + githubUsername: document.contxt.github_handle, + notificationEmail: document.contxt.email, + showEmailPublicly: '1', + auto_approve_workers: false, + fullName: document.contxt.name, + hours: '1', + bounty_categories: [], + project_type: bounty.project_type, + permission_type: bounty.permission_type, + keywords: bounty.keywords ? bounty.keywords.split(',') : [], + amount: bounty.value_true, + amountusd: bounty.value_true_usd, + peg_to_usd: bounty.peg_to_usd, + token: null, + terms: false, + termsPrivacy: false, + feeTxId: null, + couponCode: document.coupon_code, + tags: [], + bounty_type: isCommonBountyType ? bounty.bounty_type : 'Other', + bounty_type_other: !isCommonBountyType ? bounty.bounty_type : null, + bountyInformationSource: bounty.bounty_source, + contactDetails: (bounty.contact_details && bounty.contact_details.length > 0) ? bounty.contact_details : [{ + type: 'Discord', + value: '' + }], + richResources: bounty.resources ? JSON.parse(bounty.resources) : null, + richResourcesText: bounty.resources ? bounty.resources : null, + richAcceptanceCriteria: bounty.acceptance_criteria ? JSON.parse(bounty.acceptance_criteria) : null, + richAcceptanceCriteriaText: bounty.acceptance_criteria ? bounty.acceptance_criteria : null, + organisationUrl: bounty.funding_organisation ? 'https://github.com/' + bounty.funding_organisation : '', + title: bounty.title, + description: bounty.issue_description, + richDescription: bounty.issue_description, + bounty_owners: bounty.owners, + project_length: bounty.project_length, + experience_level: bounty.experience_level, + never_expires: bounty.never_expires, + reserved_for_user: bounty.bounty_reserved_for_user ? { + text: bounty.bounty_reserved_for_user.handle, + avatar_url: bounty.bounty_reserved_for_user.avatar_url + } : { text: '', avatar_url: ''}, + richDescriptionContent: bounty.custom_issue_description ? JSON.parse(bounty.custom_issue_description) : null, + richDescriptionText: bounty.custom_issue_description ? bounty.custom_issue_description : '' + }, + editorOptionPrio: { + modules: { + toolbar: [ + [ 'bold', 'italic', 'underline' ], + [{ 'align': [] }], + [{ 'list': 'ordered' }, { 'list': 'bullet' }], + [ 'link', 'code-block' ], + ['clean'] + ] + }, + theme: 'snow', + placeholder: 'Describe what your bounty is about', + readOnly: true + } + }; + + + return ret; + }, + mounted() { + let vm = this; + + this.getParams(); + this.showQuickStart(); + this.getTokens().then(function() { + + for (let i = 0; i < vm.networkOptions.length; i++) { + let chain = vm.networkOptions[i]; + + if (chain.id == bounty.metadata.chain_id) { + vm.chain = chain; } - ).fail( - function(result) { - inputElements.removeAttr('disabled'); - unloading_button($('.js-submit')); + } - const alertMsg = result && result.responseJSON ? - result.responseJSON.error : - 'Something went wrong. Please reload the page and try again.'; + for (let i = 0; i < vm.filterByChainId.length; i++) { + let token = vm.filterByChainId[i]; - _alert({ message: alertMsg }, 'danger'); + if (token.network == bounty.network && token.chainId == bounty.metadata.chain_id) { + vm.form.token = token; + break; } - ); - }; + } - if (formData['is_featured'] && !bounty.is_featured) { - payFeaturedBounty(); - } else { - saveBountyChanges(); - } + }); + this.featuredValue(); } }); - -}); +} diff --git a/app/assets/v2/js/pages/fulfill_bounty/index.js b/app/assets/v2/js/pages/fulfill_bounty/index.js index e9545d18854..b944d16f6a9 100644 --- a/app/assets/v2/js/pages/fulfill_bounty/index.js +++ b/app/assets/v2/js/pages/fulfill_bounty/index.js @@ -17,7 +17,51 @@ if (web3_type === 'web3_modal') { }, false); } +var getWalletAddressPlaceholder = function(chainId) { + + switch (chainId) { + case '1': // ETH + case '56': // Binance + case '61': // ETC + return '0x...'; + case '1995': // NERVOS ... + return 'ckb...'; + case '50797': // Tezos + return 'tz1...'; + case '0': // Bitcoin + return 'bc1...'; + case '270895': // Casper + return '01...'; + case '1155': // Cosmos + return 'cosmos...'; + case '1000':// Harmony + return 'one...'; + case '58':// Polkadot + return '1...'; + case '59':// Kusama + return 'C...'; + case '102':// Zilliqa + return 'zil...'; + case '600': // Filecoin + return 'f...'; + case '42220': // Celo + return '0x...'; + case '30': // RSK + return '0x...'; + case '50': // Xinfin + return 'xdc...'; + case '1001': // Algorand + return 'GRUNDTKRXHX...'; + case '1935': // Sia + return ''; + } + + return ''; +}; + + window.onload = function() { + $('#payoutAddress').attr('placeholder', getWalletAddressPlaceholder(bountyChainId)); $('.rating input:radio').attr('checked', false); @@ -35,7 +79,21 @@ window.onload = function() { $('input[name=issueURL]').val(getParam('source')); } + jQuery.validator.addMethod('cryptoAddress', function(value, element, params) { + let chainId = params[0]; + let ret = validateWalletAddress(chainId, value); + + return ret; + }, jQuery.validator.format('Please enter a valid {1} wallet address.')); + + $('#submitBounty').validate({ + rules: { + payoutAddress: { + required: true, + cryptoAddress: [ bountyChainId, tokenName ] + } + }, submitHandler: function(form) { loading_button($('.js-submit')); let data = {}; diff --git a/app/assets/v2/js/pages/fulfill_bounty/token.js b/app/assets/v2/js/pages/fulfill_bounty/token.js index b7d5f4d97db..97d474b7abc 100644 --- a/app/assets/v2/js/pages/fulfill_bounty/token.js +++ b/app/assets/v2/js/pages/fulfill_bounty/token.js @@ -81,68 +81,6 @@ fulfillBounty = data => { }); }; - const is_valid_address = (address) => { - switch (web3_type) { - - // etc - // celo - // rsk - // binance - - case 'harmony_ext': - if (!address.toLowerCase().startsWith('one')) { - return false; - } - return true; - - case 'sia_ext': - case 'polkadot_ext': - if (address.toLowerCase().startsWith('0x')) { - return false; - } - return true; - - case 'xinfin_ext': - if (!address.toLowerCase().startsWith('xdc')) { - return false; - } - return true; - - case 'nervos_ext': { - const ADDRESS_REGEX = new RegExp('^(ckb){1}[0-9a-zA-Z]{43,92}$'); - const isNervosValid = ADDRESS_REGEX.test(address); - - if (isNervosValid || address.toLowerCase().startsWith('0x')) { - return true; - } - - return false; - } - - case 'qr': - - if (token_name == 'BTC') { - if (address.toLowerCase().startsWith('0x')) { - return false; - } - return true; - } else if (token_name == 'FIL') { - if (!address.toLowerCase().startsWith('fil')) { - return false; - } - return true; - } else if (token_name == 'ZIL') { - if (!address.toLowerCase().startsWith('zil')) { - return false; - } - return true; - } - - return true; - - default: - return true; - } - + return validateWalletAddress(chainId, address); }; diff --git a/app/assets/v2/js/pages/hackathon_new_bounty.js b/app/assets/v2/js/pages/hackathon_new_bounty.js index 33cafba107c..3d7a7502764 100644 --- a/app/assets/v2/js/pages/hackathon_new_bounty.js +++ b/app/assets/v2/js/pages/hackathon_new_bounty.js @@ -198,6 +198,10 @@ Vue.mixin({ // casper type = 'casper_ext'; break; + case '1155': + // cosmos + type = 'cosmos_ext'; + break; case '666': // paypal type = 'fiat'; diff --git a/app/assets/v2/js/pages/new_bounty.js b/app/assets/v2/js/pages/new_bounty.js index bec2811f7ed..05e98a11ec1 100644 --- a/app/assets/v2/js/pages/new_bounty.js +++ b/app/assets/v2/js/pages/new_bounty.js @@ -5,9 +5,191 @@ window.addEventListener('dataWalletReady', function(e) { appFormBounty.form.funderAddress = selectedAccount; }, false); +const helpText = { + '#new-bounty-acceptace-criteria': 'Check out great examples of acceptance criteria from some of our past successful bounties!' +}; + +const bountyTypes = [ + 'Bug', + 'Project', + 'Feature', + 'Security', + 'Improvement', + 'Design', + 'Docs', + 'Code review', + 'Other' +]; + +Vue.use(VueQuillEditor); Vue.component('v-select', VueSelect.VueSelect); + +Vue.component('quill-editor-ext', { + props: [ 'initial', 'options' ], + template: '#quill-editor-ext', + data() { + return { + }; + }, + methods: { + onUpdate: function(event) { + this.$emit('change', { + text: event.text, + delta: event.quill.getContents() + }); + } + }, + mounted() { + this.$refs.quillEditor.quill.setContents(this.initial); + } +}); + Vue.mixin({ + data() { + return { + step: 1, + bountyTypes: bountyTypes, + tagOptions: [ + 'JavaScript', + 'TypeScript', + 'HTML', + 'Solidity', + 'CSS', + 'Python', + 'React', + 'Ethereum', + 'Blockchain', + 'DeFi', + 'Shell', + 'web3', + 'Design', + 'NFT', + 'Rust', + 'Dockerfile', + 'Go', + 'Community', + 'dApp', + 'API', + 'Documentation', + 'DAO', + 'Smart contract', + 'UI/UX', + 'POAP' + ], + contactDetailsType: [ + 'Discord', + 'Telegram', + 'Email' + ], + contactDetailsPlaceholderMap: { + '': 'mydiscord#1234', + 'Discord': 'mydiscord#1234', + 'Telegram': 'mytelegramusername', + 'Email': 'my@email.com' + }, + networkOptions: [ + { + 'id': '1', + 'logo': static_url + 'v2/images/chains/ethereum.svg', + 'label': 'ETH' + }, + { + 'id': '0', + 'logo': static_url + 'v2/images/chains/bitcoin.svg', + 'label': 'BTC' + }, + { + 'id': '666', + 'logo': static_url + 'v2/images/chains/paypal.svg', + 'label': 'PayPal' + }, + { + 'id': '56', + 'logo': static_url + 'v2/images/chains/binance.svg', + 'label': 'Binance' + }, + { + 'id': '1000', + 'logo': static_url + 'v2/images/chains/harmony.svg', + 'label': 'Harmony' + }, + { + 'id': '58', + 'logo': static_url + 'v2/images/chains/polkadot.svg', + 'label': 'Polkadot' + }, + { + 'id': '59', + 'logo': static_url + 'v2/images/chains/kusama.svg', + 'label': 'Kusama' + }, + { + 'id': '61', + 'logo': static_url + 'v2/images/chains/ethereum-classic.svg', + 'label': 'ETC' + }, + { + 'id': '102', + 'logo': static_url + 'v2/images/chains/zilliqa.svg', + 'label': 'Zilliqa' + }, + { + 'id': '600', + 'logo': static_url + 'v2/images/chains/filecoin.svg', + 'label': 'Filecoin' + }, + { + 'id': '42220', + 'logo': static_url + 'v2/images/chains/celo.svg', + 'label': 'Celo' + }, + { + 'id': '30', + 'logo': static_url + 'v2/images/chains/rsk.svg', + 'label': 'RSK' + }, + { + 'id': '50', + 'logo': static_url + 'v2/images/chains/xinfin.svg', + 'label': 'Xinfin' + }, + { + 'id': '1001', + 'logo': static_url + 'v2/images/chains/algorand.svg', + 'label': 'Algorand' + }, + { + 'id': '1935', + 'logo': static_url + 'v2/images/chains/sia.svg', + 'label': 'Sia' + }, + { + 'id': '1995', + 'logo': static_url + 'v2/images/chains/nervos.svg', + 'label': 'Nervos' + }, + { + 'id': '50797', + 'logo': static_url + 'v2/images/chains/tezos.svg', + 'label': 'Tezos' + }, + { + 'id': '270895', + 'logo': static_url + 'v2/images/chains/casper.svg', + 'label': 'Casper' + }, + { + 'id': '717171', + 'logo': null, + 'label': 'Other' + } + ] + }; + }, methods: { + getContactDetailsPlaceholder: function(val) { + return this.contactDetailsPlaceholderMap[val] || this.contactDetailsPlaceholderMap['']; + }, estHoursValidator: function() { this.form.hours = parseFloat(this.form.hours || 0); this.form.hours = Math.ceil(this.form.hours); @@ -53,7 +235,11 @@ Vue.mixin({ } vm.$delete(vm.errors, 'issueDetails'); - const apiUrldetails = `/sync/get_issue_details?url=${encodeURIComponent(url.trim())}&duplicates=true&network=${vm.network}`; + let apiUrldetails = `/sync/get_issue_details?url=${encodeURIComponent(url.trim())}&duplicates=true&network=${vm.network}`; + + if (vm.hackathon_slug) { + apiUrldetails += `&hackathon_slug=${encodeURIComponent(vm.hackathon_slug)}`; + } vm.form.issueDetails = undefined; const getIssue = fetchData(apiUrldetails, 'GET'); @@ -64,7 +250,13 @@ Vue.mixin({ } vm.form.issueDetails = response; - // vm.$set(vm.errors, 'issueDetails', undefined); + + let md = window.markdownit(); + + vm.form.richDescription = md.render(vm.form.issueDetails.description); + vm.form.title = vm.form.issueDetails.title; + + vm.$set(vm.errors, 'issueDetails', undefined); }).catch((err) => { console.log(err); vm.form.issueDetails = undefined; @@ -72,6 +264,45 @@ Vue.mixin({ }); }, + validateOrgUrl: function(url) { + let vm = this; + + if (!url) { + vm.$set(vm.errors, 'orgDetails', undefined); + return; + } + + let ghIssueUrl; + + try { + ghIssueUrl = new URL(url); + } catch (e) { + vm.$set(vm.errors, 'orgDetails', 'Please paste a github org url'); + return; + } + + if (ghIssueUrl.host != 'github.com') { + vm.$set(vm.errors, 'orgDetails', 'Please paste a github org url'); + return; + } + + let apiUrldetails = `/sync/validate_org_url?url=${encodeURIComponent(url.trim())}`; + + if (vm.hackathon_slug) { + apiUrldetails += `&hackathon_slug=${encodeURIComponent(vm.hackathon_slug)}`; + } + + vm.form.orgDetails = undefined; + const getIssue = fetchData(apiUrldetails, 'GET'); + + $.when(getIssue).then((response) => { + vm.$set(vm.errors, 'orgDetails', undefined); + }).catch((err) => { + console.log(err); + vm.form.issueDetails = undefined; + vm.$set(vm.errors, 'orgDetails', err.responseJSON.message); + }); + }, getTokens: function() { let vm = this; const apiUrlTokens = '/api/v1/tokens/'; @@ -79,7 +310,7 @@ Vue.mixin({ $.when(getTokensData).then((response) => { vm.tokens = response; - vm.form.token = vm.filterByChainId[0]; + // vm.form.token = vm.filterByChainId[0]; vm.getAmount(vm.form.token.symbol); }).catch((err) => { @@ -96,6 +327,11 @@ Vue.mixin({ vm.funderAddressFallback = true; } }, + onChainInput: function() { + this.form.token = null; + this.form.amount = 0; + this.form.amountusd = 0; + }, getAmount: function(token) { let vm = this; @@ -107,8 +343,7 @@ Vue.mixin({ $.when(getAmountData).then(tokens => { vm.coinValue = tokens[0].usdt; - vm.calcValues('usd'); - + // vm.calcValues('usd'); }).catch((err) => { console.log(err); }); @@ -132,101 +367,132 @@ Vue.mixin({ }, validateFunderAddress: function() { let vm = this; - let isValid = true; - switch (vm.chainId) { - case '1995': { - // nervos - const ADDRESS_REGEX = new RegExp('^(ckb){1}[0-9a-zA-Z]{43,92}$'); - const isNervosValid = ADDRESS_REGEX.test(vm.form.funderAddress); + return validateWalletAddress(vm.chainId, vm.form.funderAddress); + }, + checkFormStep1: function() { + let vm = this; + + ret = {}; + + if (vm.step1Submitted) { + if (!vm.form.experience_level) { + ret['experience_level'] = 'Please select the experience level'; + } + if (!vm.form.project_length) { + ret['project_length'] = 'Please select the project length'; + } - if (!isNervosValid && !vm.form.funderAddress.toLowerCase().startsWith('0x')) { - isValid = false; + if (!vm.form.bounty_type) { + ret['bounty_type'] = 'Please select the bounty type'; + } else if (vm.form.bounty_type === 'Other') { + if (!vm.form.bounty_type_other) { + ret['bounty_type_other'] = 'Please describe your bounty type'; } - break; } + + if (vm.form.keywords.length < 1) { + ret['keywords'] = 'Select at least one category'; + } + } - case '50797': { - // tezos - const ADDRESS_REGEX = new RegExp('^(tz1|tz2|tz3)[0-9a-zA-Z]{33}$'); - const isTezosValid = ADDRESS_REGEX.test(vm.form.funderAddress); + return ret; + }, + + checkFormStep2: function() { + let vm = this; - if (!isTezosValid) { - isValid = false; + ret = {}; + + if (vm.step2Submitted) { + if (!vm.form.bountyInformationSource) { + ret['bountyInformationSource'] = 'Select the bounty information source'; + } else if (vm.form.bountyInformationSource === 'github') { + + if (!vm.form.issueUrl) { + ret['issueDetails'] = 'Please input a GitHub issue'; + } else if (vm.errors.issueDetails) { + if (vm.errors.issueDetails) { + ret['issueDetails'] = vm.errors.issueDetails; + } + } + + } else { + if (!vm.form.title) { + ret['title'] = 'Please input bounty title'; } - break; - } - case '0': { - // btc - const ADDRESS_REGEX = new RegExp('^[13][a-km-zA-HJ-NP-Z1-9]{25,34}$'); - const BECH32_REGEX = new RegExp('^bc1[ac-hj-np-zAC-HJ-NP-Z02-9]{11,71}$'); - const valid_legacy = ADDRESS_REGEX.test(vm.form.funderAddress); - const valid_segwit = BECH32_REGEX.test(vm.form.funderAddress); + if (!vm.form.richDescriptionText.trim()) { + ret['description'] = 'Please input bounty description'; + } - if (!valid_legacy && !valid_segwit) { - isValid = false; + if (vm.isHackathonBounty) { + if (!vm.form.organisationUrl) { + ret['organisationUrl'] = 'Please input a GitHub organization URL'; + } else if (vm.errors.orgDetails) { + if (vm.errors.orgDetails) { + ret['organisationUrl'] = vm.errors.orgDetails; + } + } } - break; + } + } - case '270895': { - // casper - let addr = vm.form.funderAddress; + return ret; + }, - if (!addr.toLowerCase().startsWith('01') && !addr.toLowerCase().startsWith('02')) { - isValid = false; - } - break; + checkFormStep3: function() { + let vm = this; + + ret = {}; + + if (vm.step3Submitted) { + if (!vm.chainId) { + ret['chainId'] = 'Please select a chain'; + } + + if (!vm.form.token) { + ret['token'] = 'Please select a token'; } - // include validation for other chains here + if (vm.form.peg_to_usd) { + let amountusd = Number.parseFloat(vm.form.amountusd); + + if (!amountusd > 0) { + ret['amountusd'] = 'Please enter a valid anount'; + } + } else { + let amount = Number.parseFloat(vm.form.amount); + + if (!amount > 0) { + ret['amount'] = 'Please enter a valid anount'; + } + } } - return isValid; + return ret; }, - checkForm: async function(e) { + + checkFormStep4: function() { let vm = this; - vm.submitted = true; - vm.errors = {}; + ret = {}; - if (!vm.form.keywords.length) { - vm.$set(vm.errors, 'keywords', 'Please select the prize keywords'); - } - if (!vm.form.experience_level || !vm.form.project_length || !vm.form.bounty_type) { - vm.$set(vm.errors, 'experience_level', 'Please select the details options'); - } - if (!vm.chainId) { - vm.$set(vm.errors, 'chainId', 'Please select an option'); - } - if (!vm.form.issueDetails || vm.form.issueDetails < 1) { - vm.$set(vm.errors, 'issueDetails', 'Please input a GitHub issue'); - } - if (vm.form.bounty_categories.length < 1) { - vm.$set(vm.errors, 'bounty_categories', 'Select at least one category'); - } - if (!vm.form.funderAddress) { - vm.$set(vm.errors, 'funderAddress', 'Fill the owner wallet address'); - } - if (!vm.validateFunderAddress()) { - vm.$set(vm.errors, 'funderAddress', `Please enter a valid ${vm.form.token.symbol} address`); - } - if (!vm.form.project_type) { - vm.$set(vm.errors, 'project_type', 'Select the project type'); - } - if (!vm.form.permission_type) { - vm.$set(vm.errors, 'permission_type', 'Select the permission type'); - } - if (!vm.form.terms) { - vm.$set(vm.errors, 'terms', 'You need to accept the terms'); - } - if (!vm.form.termsPrivacy) { - vm.$set(vm.errors, 'termsPrivacy', 'You need to accept the terms'); - } - if (Object.keys(vm.errors).length) { - return false; + if (vm.step4Submitted) { + if (!vm.form.project_type) { + ret['project_type'] = 'Select the project type'; + } + if (!vm.form.permission_type) { + ret['permission_type'] = 'Select the permission type'; + } } + + return ret; + }, + + checkForm: async function() { + return true; }, web3Type() { let vm = this; @@ -278,6 +544,10 @@ Vue.mixin({ // casper type = 'casper_ext'; break; + case '1155': + // cosmos + type = 'cosmos_ext'; + break; case '666': // paypal type = 'fiat'; @@ -391,10 +661,16 @@ Vue.mixin({ } }, updateDate(date) { + // date is expected to be a momentjs object let vm = this; - vm.form.expirationTimeDelta = date.format('MM/DD/YYYY'); + vm.form.expirationTimeDelta = date; + }, + updatePayoutDate(date) { + // date is expected to be a momentjs object + let vm = this; + vm.form.payoutDate = date; }, userSearch(search, loading) { let vm = this; @@ -404,7 +680,6 @@ Vue.mixin({ } loading(true); vm.getUser(loading, search); - }, getUser: async function(loading, search, selected) { let vm = this; @@ -493,7 +768,9 @@ Vue.mixin({ web3.eth.sendTransaction({ to: toAddress, from: selectedAccount, - value: BigInt(vm.totalAmount.totalFee.toFixed(18) * Math.pow(10, 18)).toString() + // the toFixed(0) at the end is for the rare cases where due to limitations in the number representation + // the result still contains decimal places + value: BigInt((vm.totalAmount.totalFee.toFixed(18) * Math.pow(10, 18)).toFixed(0)).toString() }).once('transactionHash', (txnHash, errors) => { console.log(txnHash, errors); @@ -516,7 +793,7 @@ Vue.mixin({ const amountAsString = new web3.utils.BN(BigInt(amountInWei)).toString(); const token_contract = new web3.eth.Contract(token_abi, vm.form.token.address); - token_contract.methods.transfer(toAddress, web3.utils.toHex(amountAsString)).send({from: selectedAccount}, + token_contract.methods.transfer(toAddress, web3.utils.toHex(amountAsString)).send({ from: selectedAccount }, function(error, txnId) { if (error) { _alert({ message: gettext('Unable to pay bounty fee. Please try again.') }, 'danger'); @@ -544,29 +821,39 @@ Vue.mixin({ } return tokens; }, - submitForm: async function(event) { - event.preventDefault(); + submitForm: async function() { let vm = this; - vm.checkForm(event); + if (!document.isHackathonBounty) { + if (!provider && vm.chainId === '1') { + onConnect(); + return false; + } - if (!provider && vm.chainId === '1') { - onConnect(); - return false; - } + if (vm.bountyFee > 0 && !vm.subscriptionActive) { + await vm.payFees(); + } - if (Object.keys(vm.errors).length) { - return false; - } - if (vm.bountyFee > 0 && !vm.subscriptionActive) { - await vm.payFees(); + if (vm.form.featuredBounty && !vm.subscriptionActive) { + await vm.payFeaturedBounty(); + } } - if (vm.form.featuredBounty && !vm.subscriptionActive) { - await vm.payFeaturedBounty(); + + if (vm.form.organisationUrl) { + try { + let url = new URL(vm.form.organisationUrl); + let pathSegments = url.pathname.split('/'); + let orgName = pathSegments[pathSegments.length - 1] || pathSegments[pathSegments.length - 2]; + + vm.form.fundingOrganisation = orgName; + } catch (error) { + vm.form.fundingOrganisation = vm.form.organisationUrl; + } } + const metadata = { - issueTitle: vm.form.issueDetails.title, - issueDescription: vm.form.issueDetails.description, + issueTitle: vm.form.title, + issueDescription: vm.form.bountyInformationSource == 'github' ? vm.form.issueDetails.description : vm.form.description, issueKeywords: vm.form.keywords.join(), githubUsername: vm.form.githubUsername, notificationEmail: vm.form.notificationEmail, @@ -595,7 +882,7 @@ Vue.mixin({ 'value_in_token': vm.form.amount * 10 ** vm.form.token.decimals, 'token_name': metadata.tokenName, 'token_address': vm.form.token.address, - 'bounty_type': metadata.bountyType, + 'bounty_type': metadata.bountyType !== 'Other' ? metadata.bountyType : vm.form.bounty_type_other, 'project_length': metadata.projectLength, 'estimated_hours': metadata.estimatedHours, 'experience_level': metadata.experienceLevel, @@ -605,11 +892,14 @@ Vue.mixin({ 'bounty_owner_name': metadata.fullName, // ETC-TODO REMOVE ? 'bounty_reserved_for': metadata.reservedFor, 'release_to_public': metadata.releaseAfter, - 'expires_date': vm.checkboxes.neverExpires ? 9999999999 : moment(vm.form.expirationTimeDelta).utc().unix(), + 'never_expires': vm.form.never_expires, + 'expires_date': vm.form.never_expires ? 9999999999 : moment(vm.form.expirationTimeDelta).utc().unix(), + 'payout_date': vm.form.never_expires ? 9999999999 : moment(vm.form.payoutDate).utc().unix(), 'metadata': JSON.stringify(metadata), 'raw_data': {}, // ETC-TODO REMOVE ? 'network': vm.network, 'issue_description': metadata.issueDescription, + 'custom_issue_description': JSON.stringify(vm.form.richDescriptionContent), 'funding_organisation': metadata.fundingOrganisation, 'balance': vm.form.amount * 10 ** vm.form.token.decimals, // ETC-TODO REMOVE ? 'project_type': vm.form.project_type, @@ -629,7 +919,14 @@ Vue.mixin({ 'auto_approve_workers': vm.form.auto_approve_workers, 'web3_type': vm.web3Type(), 'activity': metadata.activity, - 'bounty_owner_address': vm.form.funderAddress + 'bounty_owner_address': vm.form.funderAddress, + 'acceptance_criteria': JSON.stringify(vm.form.richAcceptanceCriteria), + 'resources': JSON.stringify(vm.form.richResources), + 'contact_details': JSON.stringify(vm.nonEmptyContactDetails), + 'bounty_source': vm.form.bountyInformationSource, + 'peg_to_usd': vm.form.peg_to_usd, + 'amount_usd': vm.form.amountusd, + 'owners': JSON.stringify(vm.form.bounty_owners.map(owner => owner.id)) }; vm.sendBounty(params); @@ -644,10 +941,11 @@ Vue.mixin({ const apiUrlBounty = '/api/v1/bounty/create'; const postBountyData = fetchData(apiUrlBounty, 'POST', data); - + $.when(postBountyData).then((response) => { if (200 <= response.status && response.status <= 204) { console.log('success', response); + removeEventListener('beforeunload', beforeUnloadListener, {capture: true}); window.location.href = response.bounty_url; } else if (response.status == 304) { _alert('Bounty already exists for this github issue.', 'danger'); @@ -662,24 +960,93 @@ Vue.mixin({ _alert('Unable to create a bounty. Please try again later', 'danger'); }); + }, + updateNav: function(direction) { + if (direction === 1) { + // Forward navigation + let errors = {}; + + switch (this.step) { + case 1: + this.step1Submitted = true; + errors = this.checkFormStep1(); + break; + case 2: + this.step2Submitted = true; + errors = this.checkFormStep2(); + break; + case 3: + this.step3Submitted = true; + errors = this.checkFormStep3(); + break; + case 4: + this.step4Submitted = true; + errors = this.checkFormStep4(); + break; + default: + this.submitForm(); + return; + } + if (Object.keys(errors).length == 0) { + this.step += 1; + } + } else if (this.step > 1) { + // Backward navigation + this.step -= 1; + } + }, + + removeContactDetails(idx) { + this.form.contactDetails.splice(idx, 1); + }, + + addContactDetails() { + this.form.contactDetails.push({ + type: '', + value: '' + }); + }, + + updateCustomDescription({text, delta}) { + this.form.richDescriptionText = text; + this.form.richDescriptionContent = delta; + }, + + updateAcceptanceCriteria({ text, delta }) { + this.form.richAcceptanceCriteria = delta; + this.form.richAcceptanceCriteriaText = text; + }, + + updateResources({ text, delta }) { + this.form.richResources = delta; + this.form.richResourcesText = text; + }, + + popover(elementId) { + $(elementId).popover({ + placement: 'right', + content: helpText[elementId] + }).popover('show'); } }, computed: { - totalAmount: function() { + bountyFee: function() { let vm = this; - let fee; if (vm.chainId === '1' && !vm.subscriptionActive) { - vm.bountyFee = document.FEE_PERCENTAGE; - fee = Number(vm.bountyFee) / 100.0; - } else { - vm.bountyFee = 0; - fee = 0; + return Number(document.FEE_PERCENTAGE); } + return 0; + + }, + totalAmount: function() { + let vm = this; + let fee = vm.bountyFee / 100.0; + let totalFee = Number(vm.form.amount) * fee; let total = Number(vm.form.amount) + totalFee; - return {'totalFee': totalFee, 'total': total }; + return { 'totalFee': totalFee, 'total': total }; }, totalTx: function() { let vm = this; @@ -729,7 +1096,7 @@ Vue.mixin({ if (vm.network == '') { return vm.sortByPriority; } - return vm.sortByPriority.filter((item)=>{ + return vm.sortByPriority.filter((item) => { return item.network.toLowerCase().indexOf(vm.network.toLowerCase()) >= 0; }); @@ -752,34 +1119,133 @@ Vue.mixin({ } } return result; + }, + currentSteps: function() { + const steps = [ + { + text_long: 'Bounty Type', + text_short: 'Bounty Type', + active: false + }, + { + text_long: 'Bounty Details', + text_short: 'Bounty Details', + active: false + }, + { + text_long: 'Payment Information', + text_short: 'Payment Info', + active: false + }, + { + text_long: 'Additional Information', + text_short: 'Additional Info', + active: false + }, + { + text_long: 'Review Bounty', + text_short: 'Review Bounty', + active: false + } + ]; + + steps[this.step - 1].active = true; + return steps; + }, + chainId: function() { + if (this.chain) { + return this.chain.id; + } + return ''; + }, + isExpired: function() { + return moment(this.form.expirationTimeDelta).isBefore(); + }, + expiresAfterAYear: function() { + if (this.form.never_expires) { + return true; + } + return moment().diff(this.form.expirationTimeDelta, 'years') < -1; + }, + isPayoutDateExpired: function() { + return moment(this.form.payoutDate).isBefore(); + }, + payoutDateExpiresAfterAYear: function() { + if (this.form.never_expires) { + return true; + } + return moment().diff(this.form.payoutDate, 'years') < -1; + }, + step1Errors: function() { + return this.checkFormStep1(); + }, + isStep1Valid: function() { + let ret = Object.keys(this.step1Errors).length == 0; + + return ret; + }, + step2Errors: function() { + return this.checkFormStep2(); + }, + isStep2Valid: function() { + let ret = Object.keys(this.step2Errors).length == 0; + + return ret; + }, + step3Errors: function() { + return this.checkFormStep3(); + }, + isStep3Valid: function() { + let ret = Object.keys(this.step3Errors).length == 0; + + return ret; + }, + step4Errors: function() { + return this.checkFormStep4(); + }, + isStep4Valid: function() { + let ret = Object.keys(this.step4Errors).length == 0; + + return ret; + }, + nonEmptyContactDetails: function() { + if (this.form.contactDetails) { + return this.form.contactDetails.filter(function(c) { + return !!c.value; + }); + } + return []; + } }, watch: { form: { deep: true, handler(newVal, oldVal) { - if (this.dirty && this.submitted) { - this.checkForm(); - } this.dirty = true; } - }, - chainId: async function(val) { - if (!provider && val === '1') { - await onConnect(); - } + chain: async function(val) { - if (val === '56') { - this.getBinanceSelectedAccount(); - } + if (val) { + // if (!provider && val.id === '1') { + // await onConnect(); + // } - this.getTokens(); + // if (val.id === '56') { + // this.getBinanceSelectedAccount(); + // } + + this.getTokens(); + } } } }); if (document.getElementById('gc-hackathon-new-bounty')) { + let expirationTimeDelta = moment().add(1, 'month'); + let payoutDate = expirationTimeDelta; + appFormBounty = new Vue({ delimiters: [ '[[', ']]' ], el: '#gc-hackathon-new-bounty', @@ -788,27 +1254,37 @@ if (document.getElementById('gc-hackathon-new-bounty')) { }, data() { return { - + status: 'OPEN', tokens: [], network: 'mainnet', - chainId: '', + chain: null, funderAddressFallback: false, - checkboxes: {'terms': false, 'termsPrivacy': false, 'neverExpires': true, 'hiringRightNow': false }, - expandedGroup: {'reserve': [], 'featuredBounty': []}, + checkboxes: { 'terms': false, 'termsPrivacy': false, 'hiringRightNow': false }, + expandedGroup: { 'reserve': [], 'featuredBounty': [] }, errors: {}, usersOptions: [], - bountyFee: document.FEE_PERCENTAGE, orgSelected: '', subscriptions: document.subscriptions, - subscriptionActive: document.subscriptions.length || document.contxt.is_pro, + subscriptionActive: (document.subscriptions ? document.subscriptions.length : false) || document.contxt.is_pro, coinValue: null, usdFeaturedPrice: 12, ethFeaturedPrice: null, blockedUrls: document.blocked_urls, dirty: false, - submitted: false, + submitted: true, + step1Submitted: false, + step2Submitted: false, + step3Submitted: false, + step4Submitted: false, + reserveBounty: null, + sponsors: document.sponsors, // USed only for hackathon + isHackathonBounty: document.isHackathonBounty, + hackathon_slug: document.hackathon ? document.hackathon.slug : null, + isNew: true, form: { - expirationTimeDelta: moment().add(1, 'month').format('MM/DD/YYYY'), + eventTag: document.hackathon ? document.hackathon.name : '', + expirationTimeDelta: expirationTimeDelta, + payoutDate: payoutDate, featuredBounty: false, fundingOrganisation: '', issueDetails: undefined, @@ -820,22 +1296,58 @@ if (document.getElementById('gc-hackathon-new-bounty')) { fullName: document.contxt.name, hours: '1', bounty_categories: [], - project_type: '', + project_type: document.isHackathonBounty ? 'multiple' : null, permission_type: '', keywords: [], - amount: 0.001, + amount: 0.0, amountusd: null, - token: {}, + peg_to_usd: true, + token: null, terms: false, termsPrivacy: false, feeTxId: null, - couponCode: document.coupon_code + couponCode: document.coupon_code, + tags: [], + bounty_type: null, + bountyInformationSource: null, + contactDetails: [{ + type: 'Discord', + value: '' + }], + richResources: '', + richResourcesText: '', + richAcceptanceCriteria: '', + richAcceptanceCriteriaText: '', + organisationUrl: '', + title: '', + description: '', + richDescription: '', + bounty_owners: [], + never_expires: false, + richDescriptionContent: null, + richDescriptionText: '' + }, + editorOptionPrio: { + modules: { + toolbar: [ + [ 'bold', 'italic', 'underline' ], + [{ 'align': [] }], + [{ 'list': 'ordered' }, { 'list': 'bullet' }], + [ 'link', 'code-block' ], + ['clean'] + ] + }, + theme: 'snow', + placeholder: 'Describe what your bounty is about', + readOnly: true } }; }, mounted() { this.getParams(); - this.showQuickStart(); + if (!document.isHackathonBounty) { + this.showQuickStart(); + } this.getTokens(); this.featuredValue(); } diff --git a/app/assets/v2/js/pages/profile-c-trust.js b/app/assets/v2/js/pages/profile-c-trust.js new file mode 100644 index 00000000000..865dd281b01 --- /dev/null +++ b/app/assets/v2/js/pages/profile-c-trust.js @@ -0,0 +1,2168 @@ +// handle from contxt +const trustHandle = document.contxt.github_handle; + +const apiCall = (url, givenPayload) => { + + return new Promise((resolve, reject) => { + const csrfmiddlewaretoken = document.querySelector('[name=csrfmiddlewaretoken]').value; + const headers = {'X-CSRFToken': csrfmiddlewaretoken}; + const payload = JSON.stringify(Object.assign({ + 'gitcoin_handle': this.githubHandle + }, givenPayload || {})); + const verificationRequest = fetchData(url, 'POST', payload, headers); + + $.when(verificationRequest).then(response => { + resolve(response); + }).catch((err) => { + reject(err); + }); + }); +}; + +Vue.component('sms-verify-modal', { + delimiters: [ '[[', ']]' ], + data: function() { + return { + csrf: $("input[name='csrfmiddlewaretoken']").val(), + phone: '', + validNumber: false, + errorMessage: '', + verified: document.verified, + code: '', + timePassed: 0, + timeInterval: 0, + display_email_option: false, + countDownActive: false, + forceStep: false, + awaitingResponse: false + }; + }, + props: { + showValidation: { + type: Boolean, + required: false, + 'default': false + }, + validationStep: { + required: true + }, + service: { + type: Object, + required: true + } + }, + computed: { + step() { + return this.forceStep || this.validationStep; + } + }, + template: ` + + + `, + methods: { + dismissVerification() { + // localStorage.setItem('dismiss-sms-validation', true); + this.$emit('modal-dismissed'); + setTimeout(() => { + this.forceStep = false; + }, 1000); + }, + // VALIDATE + validateCode() { + const vm = this; + + if (vm.code) { + const verificationRequest = fetchData(`/api/v0.1/profile/${trustHandle}/verify_user_sms/`, 'POST', { + code: vm.code, + phone: vm.phone + }, {'X-CSRFToken': vm.csrf}); + + $.when(verificationRequest).then(response => { + vm.verificationEnabled = false; + vm.verified = true; + vm.service.is_verified = true; + vm.forceStep = 'validation-complete'; + }).catch((e) => { + if (e.status == 403) { + vm.errorMessage = e.responseText; + } else { + vm.errorMessage = e.responseJSON.msg; + } + }); + } + }, + startVerification() { + this.phone = ''; + this.forceStep = 'requestVerification'; + this.validNumber = false; + this.errorMessage = ''; + this.code = ''; + this.timePassed = 0; + this.timeInterval = 0; + this.display_email_option = false; + }, + countdown() { + const vm = this; + + if (!vm.countDownActive) { + vm.countDownActive = true; + + setInterval(() => { + vm.timePassed += 1; + }, 1000); + } + }, + resendCode(delivery_method) { + const e164 = this.phone.replace(/\s/g, ''); + const vm = this; + + vm.errorMessage = ''; + + if (vm.validNumber) { + const verificationRequest = fetchData(`/api/v0.1/profile/${trustHandle}/request_user_sms`, 'POST', { + phone: e164, + delivery_method: delivery_method || 'sms' + }, {'X-CSRFToken': vm.csrf}); + + vm.errorMessage = ''; + + $.when(verificationRequest).then(response => { + // set the cooldown time to one minute + this.timePassed = 0; + this.timeInterval = 60; + this.countdown(); + this.display_email_option = response.allow_email; + }).catch((e) => { + if (e.status == 403) { + vm.errorMessage = e.responseText; + } else { + vm.errorMessage = e.responseJSON.msg; + } + }); + } + }, + // REQUEST VERIFICATION + requestVerification(event) { + const e164 = this.phone.replace(/\s/g, ''); + const vm = this; + + if (vm.validNumber) { + const verificationRequest = fetchData(`/api/v0.1/profile/${trustHandle}/request_user_sms`, 'POST', { + phone: e164 + }, {'X-CSRFToken': vm.csrf}); + + vm.errorMessage = ''; + + $.when(verificationRequest).then(response => { + this.forceStep = 'verifyNumber'; + this.timePassed = 0; + this.timeInterval = 60; + this.countdown(); + this.display_email_option = response.allow_email; + }).catch((e) => { + if (e.status == 403) { + vm.errorMessage = e.responseText; + } else { + vm.errorMessage = e.responseJSON.msg; + } + }); + } + }, + async disconnectSMS() { + this.awaitingResponse = true; + this.forceStep = 'disconnect'; + try { + const response = await apiCall(`/api/v0.1/profile/${trustHandle}/disconnect_user_sms`); + + if (response.ok) { + this.service = Object.assign(this.service, response); + } + } catch (err) { + console.log(err); + } finally { + this.awaitingResponse = false; + this.dismissVerification(); + _alert('You have successfully disconnected your SMS verification.', 'success', 3000); + } + }, + isValidNumber(validation) { + console.log(validation); + this.validNumber = validation.isValid; + } + } +}); + +Vue.component('twitter-verify-modal', { + delimiters: [ '[[', ']]' ], + data: function() { + return { + tweetText: '', + twitterHandle: '', + validationError: '', + forceStep: false, + awaitingResponse: false + }; + }, + props: { + showValidation: { + type: Boolean, + required: false, + 'default': false + }, + validationStep: { + required: true + }, + service: { + type: Object, + required: true + } + }, + computed: { + encodedTweetText: function() { + return encodeURIComponent(this.service.verify_tweet_text); + }, + tweetIntentURL: function() { + return `https://twitter.com/intent/tweet?text=${this.encodedTweetText}`; + }, + step() { + return this.forceStep || this.validationStep; + } + }, + template: ` + + + `, + methods: { + dismissVerification() { + this.$emit('modal-dismissed'); + setTimeout(() => { + this.forceStep = false; + }, 1000); + }, + clickedSendTweet(event) { + this.forceStep = 'validate-tweet'; + }, + clickedAlreadySent(event) { + event.preventDefault(); + this.forceStep = 'validate-tweet'; + }, + clickedGoBack(event) { + event.preventDefault(); + this.forceStep = 'send-tweet'; + this.validationError = ''; + }, + clickedValidate(event) { + event.preventDefault(); + + this.twitterHandle = this.twitterHandle.trim(); + + // Strip leading @ if user includes it + if (this.twitterHandle.startsWith('@')) { + this.twitterHandle = this.twitterHandle.split('@')[1]; + } + + // Validate handle is 15 word characters + const isValidHandle = null !== this.twitterHandle.match(/^(\w){1,15}$/); + + if (!isValidHandle) { + this.validationError = 'Please enter a valid Twitter handle'; + return; + } + + // Reset after a prior error + this.validationError = ''; + + this.forceStep = 'perform-validation'; + + this.verifyTwitter(); + }, + verifyTwitter() { + const csrfmiddlewaretoken = document.querySelector('[name=csrfmiddlewaretoken]').value; + const payload = JSON.stringify({ + 'twitter_handle': this.twitterHandle + }); + const headers = {'X-CSRFToken': csrfmiddlewaretoken}; + + const verificationRequest = fetchData(`/api/v0.1/profile/${trustHandle}/verify_user_twitter`, 'POST', payload, headers); + + $.when(verificationRequest).then(response => { + if (response.ok) { + this.forceStep = 'validation-complete'; + this.service.is_verified = true; + } else { + this.validationError = response.msg; + this.forceStep = 'validate-tweet'; + } + + }).catch((_error) => { + this.validationError = 'There was an error; please try again later'; + this.forceStep = 'validate-tweet'; + }); + }, + async disconnectTwitter() { + this.awaitingResponse = true; + this.forceStep = 'disconnect'; + try { + const response = await apiCall(`/api/v0.1/profile/${trustHandle}/disconnect_user_twitter`); + + if (response.ok) { + this.service = Object.assign(this.service, response); + } + } catch (err) { + console.log(err); + } finally { + this.awaitingResponse = false; + this.dismissVerification(); + _alert('You have successfully disconnected from Twitter.', 'success', 3000); + } + } + } +}); + +Vue.component('poap-verify-modal', { + delimiters: [ '[[', ']]' ], + data: function() { + return { + hideTemporarily: false, + ethAddress: '', + signature: '', + validationError: '', + forceStep: false, + awaitingResponse: false + }; + }, + props: { + showValidation: { + type: Boolean, + required: false, + 'default': false + }, + service: { + type: Object, + required: true + }, + validationStep: { + type: String, + required: true + } + }, + computed: { + step() { + return this.forceStep || this.validationStep; + } + }, + template: ` + + + `, + methods: { + dismissVerification() { + // If we're only hiding the modal to allow wallet selection, don't emit this event, which + // would prevent it from popping up again after the user completes their selection. + if (!this.hideTemporarily) { + this.$emit('modal-dismissed'); + setTimeout(() => { + this.forceStep = false; + }, 1000); + } + }, + clickedGoBack(event) { + event.preventDefault(); + this.forceStep = 'validate-address'; + this.ethAddress = ''; + this.validationError = ''; + }, + getEthAddress() { + const accounts = web3.eth.getAccounts(); + + $.when(accounts).then((result) => { + const ethAddress = result[0]; + + this.ethAddress = ethAddress; + this.forceStep = 'validate-poap'; + // this.showValidation = true; + this.hideTemporarily = false; + }).catch((_error) => { + this.validationError = 'Error getting ethereum accounts'; + this.forceStep = 'validate-address'; + // this.showValidation = true; + this.hideTemporarily = false; + }); + + }, + generateSignature() { + // Create a signature using the provided web3 account + web3.eth.personal.sign('verify_poap_badges', this.ethAddress) + .then(signature => { + this.signature = signature; + this.verifyPOAP(); + }).catch((_error) => { + this.validationError = 'Error sign message declined'; + this.forceStep = 'validate-poap'; + this.hideTemporarily = false; + }); + }, + connectWeb3Wallet() { + // this.showValidation = false; + this.hideTemporarily = true; + onConnect().then((result) => { + this.getEthAddress(); + }).catch((_error) => { + this.validationError = 'Error connecting ethereum accounts'; + this.forceStep = 'validate-address'; + // this.showValidation = true; + this.hideTemporarily = false; + }); + }, + clickedPullEthAddress(event) { + // Prompt web3 login if not connected + event.preventDefault(); + if (!provider) { + this.connectWeb3Wallet(); + } else { + this.getEthAddress(); + } + }, + clickedChangeWallet(event) { + event.preventDefault(); + this.validationError = ''; + this.connectWeb3Wallet(); + }, + clickedValidate(event) { + event.preventDefault(); + this.validationError = ''; + this.forceStep = 'perform-validation'; + this.generateSignature(); + }, + async verifyPOAP() { + this.awaitingResponse = true; + try { + const response = await apiCall(`/api/v0.1/profile/${trustHandle}/verify_user_poap`, { + 'eth_address': this.ethAddress, + 'signature': this.signature + }); + + if (response.ok) { + this.forceStep = 'validation-complete'; + this.service.is_verified = true; + } else { + this.validationError = response.msg; + this.forceStep = 'validate-poap'; + } + } catch (err) { + console.log(_error); + this.validationError = 'There was an error; please try again later'; + this.forceStep = 'validate-poap'; + } finally { + this.awaitingResponse = false; + } + }, + async disconnectPOAP() { + this.awaitingResponse = true; + this.forceStep = 'disconnect'; + try { + const response = await apiCall(`/api/v0.1/profile/${trustHandle}/disconnect_user_poap`); + + if (response.ok) { + this.service = Object.assign(this.service, response); + } + } catch (err) { + console.log(err); + } finally { + this.awaitingResponse = false; + this.dismissVerification(); + _alert('You have successfully disconnected from POAP.', 'success', 3000); + } + }, + clickedClose() { + this.$emit('modal-dismissed'); + } + } +}); + +Vue.component('poh-verify-modal', { + delimiters: [ '[[', ']]' ], + data: function() { + return { + hideTemporarily: false, + ethAddress: '', + signature: '', + validationError: '', + forceStep: false, + awaitingResponse: false + }; + }, + props: { + showValidation: { + type: Boolean, + required: false, + 'default': false + }, + validationStep: { + type: String, + required: true + }, + service: { + type: Object, + required: true + } + }, + computed: { + step() { + + return this.forceStep || this.validationStep; + } + }, + template: ` + + + `, + methods: { + dismissVerification() { + // If we're only hiding the modal to allow wallet selection, don't emit this event, which + // would prevent it from popping up again after the user completes their selection. + if (!this.hideTemporarily) { + this.$emit('modal-dismissed'); + setTimeout(() => { + this.forceStep = false; + }, 1000); + } + }, + clickedGoBack(event) { + event.preventDefault(); + this.forceStep = 'validate-address'; + this.ethAddress = ''; + this.validationError = ''; + }, + getEthAddress() { + const accounts = web3.eth.getAccounts(); + + $.when(accounts) + .then((result) => { + const ethAddress = result[0]; + + this.ethAddress = ethAddress; + this.forceStep = 'validate-poh'; + this.hideTemporarily = false; + }) + .catch((_error) => { + this.validationError = 'Error getting ethereum accounts'; + this.forceStep = 'validate-address'; + this.hideTemporarily = false; + }); + }, + generateSignature() { + web3.eth.personal.sign('verify_poh_registration', this.ethAddress).then((signature) => { + this.signature = signature; + this.verifyPOH(); + }) + .catch((_error) => { + this.validationError = 'Error sign message declined'; + this.forceStep = 'validate-poh'; + this.hideTemporarily = false; + }); + }, + connectWeb3Wallet() { + this.hideTemporarily = true; + onConnect() + .then((result) => { + this.getEthAddress(); + }) + .catch((_error) => { + this.validationError = 'Error connecting ethereum accounts'; + this.forceStep = 'validate-address'; + this.hideTemporarily = false; + }); + }, + clickedPullEthAddress(event) { + event.preventDefault(); + if (!provider) { + this.connectWeb3Wallet(); + } else { + this.getEthAddress(); + } + }, + clickedChangeWallet(event) { + event.preventDefault(); + this.validationError = ''; + this.connectWeb3Wallet(); + }, + clickedValidate(event) { + event.preventDefault(); + this.validationError = ''; + this.forceStep = 'perform-validation'; + this.generateSignature(); + }, + async verifyPOH() { + try { + const response = await apiCall(`/api/v0.1/profile/${trustHandle}/verify_user_poh`, { + eth_address: this.ethAddress, + signature: this.signature + }); + + if (response.ok) { + this.forceStep = 'validation-complete'; + this.service.is_verified = true; + } else { + this.validationError = response.msg; + this.forceStep = 'validate-poh'; + } + } catch (err) { + this.validationError = 'There was an error; please try again later'; + this.forceStep = 'validate-poh '; + } + }, + async disconnectPOH() { + this.awaitingResponse = true; + this.forceStep = 'disconnect'; + try { + const response = await apiCall(`/api/v0.1/profile/${trustHandle}/disconnect_user_poh`); + + if (response.ok) { + this.service = Object.assign(this.service, response); + } + } catch (err) { + console.log(err); + } finally { + this.awaitingResponse = false; + this.dismissVerification(); + _alert('You have successfully disconnected from POH.', 'success', 3000); + } + } + } +}); + +Vue.component('brightid-verify-modal', { + delimiters: [ '[[', ']]' ], + data: function() { + return { + calls: [], + verifying: false, + forceStep: false, + awaitingResponse: false + }; + }, + props: { + showValidation: { + type: Boolean, + required: false, + 'default': false + }, + validationStep: { + type: String, + required: true + }, + brightidUuid: { + type: String, + required: true + }, + service: { + type: Object, + required: true + } + }, + computed: { + brightIdLink() { + return `https://app.brightid.org/link-verification/http:%2f%2fnode.brightid.org/Gitcoin/${this.brightidUuid}`; + }, + brightIdAppLink() { + return `brightid://link-verification/http:%2f%2fnode.brightid.org/Gitcoin/${this.brightidUuid}`; + }, + step() { + return this.forceStep || this.validationStep; + } + }, + template: ` + + + `, + + methods: { + dismissVerification() { + this.$emit('modal-dismissed'); + setTimeout(() => { + this.forceStep = false; + }, 1000); + }, + formatDate(date) { + let options = {hour: 'numeric', minute: 'numeric', dayPeriod: 'short'}; + + return new Intl.DateTimeFormat('en-US', options).format(new Date(date)); + }, + moveToVerifyBrightid() { + this.forceStep = 'verify-brightid'; + }, + async verifyBrightid() { + this.verifying = true; + try { + const response = await apiCall(`/api/v0.1/profile/${trustHandle}/verify_user_brightid`); + + if (response.ok) { + this.service._status = response.msg; + if (this.service._status == 'verified') { + this.service.is_verified = true; + this.service.status = false; + this.forceStep = 'verification-complete'; + } else { + this.service._state = 'verify-brightid'; + this.service.status = 'Awaiting Verification'; + // alert pending + _alert('Pending Validation...', 'danger', 2000); + } + } + } catch (err) { + console.log(err); + } finally { + this.verifying = false; + } + }, + async disconnectBrightid() { + this.awaitingResponse = true; + this.forceStep = 'disconnect'; + try { + const response = await apiCall(`/api/v0.1/profile/${trustHandle}/disconnect_user_brightid`); + + if (response.ok) { + this.service = Object.assign(this.service, response); + } + } catch (err) { + console.log(err); + } finally { + this.awaitingResponse = false; + this.dismissVerification(); + _alert('You have successfully disconnected from BrightID.', 'success', 3000); + } + } + } +}); + +Vue.component('idena-verify-modal-content', { + template: ` +
+

Idena is the first proof-of-person blockchain based on democratic principles. Every node is linked to a cryptoidentity – one single person with equal voting power and mining income.

+

To start mining Idena, you need to prove you are a unique human. It does not require the disclosure of any personal data (no KYC). Simply appear online when the validation ceremony starts and solve a series of flip-tests (CAPTCHAs).

+ +
+ ` +}); + +Vue.component('idena-verify-modal', { + delimiters: [ '[[', ']]' ], + data: function() { + return { + calls: [], + verifying: false, + forceStep: false, + initiated: false, + awaitingResponse: false + }; + }, + props: { + showValidation: { + type: Boolean, + required: false, + 'default': false + }, + validationStep: { + type: String, + required: true + }, + service: { + type: Object, + required: true + } + }, + computed: { + step() { + return this.forceStep || this.validationStep; + } + }, + template: ` + + + `, + + methods: { + dismissVerification() { + this.$emit('modal-dismissed'); + }, + connectIdena() { + // open idena for the rest of the process to take place + window.open(this.service.login_url, '_blank'); + // assume connected - check properly on close + this.initiated = true; + }, + async checkApi(url, checkingStatus) { + if (checkingStatus) { + this.awaitingResponse = true; + } + try { + const response = await apiCall(url); + + if (response.ok) { + this.forceStep = false; + this.service = Object.assign(this.service, response); + } + } catch (err) { + console.log(err); + } finally { + if (!checkingStatus) { + this.dismissVerification(); + } else if (!this.service.is_verified) { + _alert('Pending Validation...', 'danger', 2000); + } + this.awaitingResponse = false; + if (url === this.service.logout_url) { + _alert('You have successfully disconnected from Idena.', 'success', 3000); + } + } + } + } +}); + +Vue.component('duniter-verify-modal', { + delimiters: [ '[[', ']]' ], + data: function() { + return { + validationStep: 'validate-duniter', + validationError: '', + publicKey: '' + }; + }, + computed: { + }, + props: { + showValidation: { + type: Boolean, + required: false, + 'default': false + } + }, + template: ` + + + `, + methods: { + dismissVerification() { + this.showValidation = false; + }, + clickedGoBack(event) { + event.preventDefault(); + this.validationStep = 'validate-duniter'; + this.validationError = ''; + }, + clickedValidate(event) { + event.preventDefault(); + + this.validationError = ''; + + this.validationStep = 'perform-validation'; + this.getUserHandle(); + this.verifyDuniter(); + }, + getUserHandle() { + this.githubHandle = trustHandle; + }, + verifyDuniter() { + const csrfmiddlewaretoken = document.querySelector('[name=csrfmiddlewaretoken]').value; + const headers = {'X-CSRFToken': csrfmiddlewaretoken}; + const payload = JSON.stringify({ + 'gitcoin_handle': this.githubHandle + }); + const verificationRequest = fetchData('/api/v0.1/profile/verify_user_duniter', 'POST', payload, headers); + + $.when(verificationRequest).then(response => { + if (response.ok) { + this.validationStep = 'validation-complete'; + } else { + this.validationError = response.msg; + this.validationStep = 'validate-duniter'; + } + + }).catch((_error) => { + this.validationError = 'There was an error; please try again later'; + this.validationStep = 'validate-duniter'; + }); + } + } +}); + +Vue.component('active-trust-manager', { + delimiters: [ '[[', ']]' ], + data() { + return { + visibleModal: 'none', + console: console, + round_start_date: parseMonthDay(document.round_start_date), + round_end_date: parseMonthDay(document.round_end_date), + roadmap: document.roadmap || [], + services: document.services || [], + coming_soon: document.coming_soon || [] + }; + }, + computed: { + trust_bonus: function() { + + return Math.min(150, this.services.reduce((total, service) => { + return (service.is_verified ? service.match_percent : 0) + total; + }, 50)); + }, + serviceDict: function() { + + return this.services.reduce((services, service) => { + // service by ref + services[service.ref] = service; + + return services; + }, {}); + } + }, + methods: { + showModal(modalName) { + this.visibleModal = modalName; + console.log(this.visibleModal); + }, + hideModal() { + this.visibleModal = 'none'; + } + } +}); + +Vue.component('active-trust-row-template', { + delimiters: [ '[[', ']]' ], + data() { + return {}; + }, + props: { + iconType: { + type: String, // 'image' or 'markup' + required: false, + 'default': 'markup' + }, + iconPath: { + // path to image file if iconType is 'image' + type: String, + required: false + }, + title: { + type: String, + required: true + }, + matchPercent: { + type: Number, + required: true + }, + isVerified: { + type: Boolean, + required: true + }, + buttonText: { + type: String, + required: false, + 'default': 'Verify' + } + }, + methods: { + didClick(event) { + event.preventDefault(); + this.$emit('verify-button-pressed'); + }, + hasVerifySlot() { + return !!this.$slots.verify; + } + }, + template: ` +
+
+
+ +
+
+ logo +
+
+
+
+ [[title]] +
+
+ +
+
+
+
+ +[[matchPercent]]% +
+
+ Grants Match Bonus +
+
+
+ + +
+
` +}); + +Vue.component('inactive-trust-row-template', { + delimiters: [ '[[', ']]' ], + props: { + service: { + type: String, + required: true + }, + when: { + type: String, + required: true + } + }, + template: ` + +
+
+ + + +
+
+
+ [[ service ]] +
+
+ Tentatively [[when]] +
+
+
+
+ +?% +
+
+ Grants Match Bonus +
+
+
+
+ 🚧 +
+
+ [[when]] +
+
+
` +}); + +Vue.component('ens-verify-modal', { + delimiters: [ '[[', ']]' ], + data: function() { + return { + ethAddress: '', + static_url: document.contxt.STATIC_URL, + ensDomain: '', + validationError: '', + validationErrorMsg: '', + url: '', + forceStep: false, + verificationEthAddress: '', + awaitingResponse: false + }; + }, + props: { + showValidation: { + type: Boolean, + required: false, + 'default': false + }, + validationStep: { + required: true + }, + service: { + type: Object, + required: true + } + }, + computed: { + step() { + return this.forceStep || this.validationStep; + } + }, + watch: { + showValidation: function() { + if (this.showValidation === true && typeof web3 !== 'undefined' && !this.service.is_verified) { + this.pullEthAddress(); + } + } + }, + template: ` + + + `, + methods: { + dismissVerification() { + this.$emit('modal-dismissed'); + setTimeout(() => { + this.forceStep = false; + }, 1000); + }, + verifyENS() { + const csrfmiddlewaretoken = document.querySelector('[name=csrfmiddlewaretoken]').value; + const headers = {'X-CSRFToken': csrfmiddlewaretoken}; + const data = {}; + + if (typeof web3 !== 'undefined' && web3.utils.isAddress(this.verificationEthAddress)) { + data['verification_address'] = this.verificationEthAddress; + } + + const verificationRequest = fetchData(`/api/v0.1/profile/${trustHandle}/verify_user_ens`, 'POST', data, headers); + + this.onResponse(verificationRequest); + }, + onchange() { + if (!this.service.is_verified && typeof web3 !== 'undefined' && web3.utils.isAddress(this.verificationEthAddress)) { + this.checkENSValidation(); + } + }, + onResponse(verificationRequest) { + let vm = this; + + $.when(verificationRequest).then(response => { + vm.validationError = response.error; + vm.validationErrorMsg = response.msg; + vm.service.is_verified = response.data.verified; + vm.forceStep = response.data.step; + vm.url = response.data.url; + vm.verificationEthAddress = response.data.address; + vm.ensDomain = response.data.ens_domain; + }); + }, + checkENSValidation() { + let vm = this; + const csrfmiddlewaretoken = document.querySelector('[name=csrfmiddlewaretoken]').value; + const headers = {'X-CSRFToken': csrfmiddlewaretoken}; + const data = {}; + + if (typeof web3 !== 'undefined' && web3.utils.isAddress(this.verificationEthAddress)) { + data['verification_address'] = this.verificationEthAddress; + } + + const verificationRequest = fetchData(`/api/v0.1/profile/${trustHandle}/verify_user_ens`, 'GET', data, headers); + + this.onResponse(verificationRequest); + }, + getEthAddress() { + const accounts = web3.eth.getAccounts(); + + $.when(accounts).then((result) => { + this.verificationEthAddress = result[0]; + this.onchange(); + this.showValidation = true; + }).catch((_error) => { + this.validationError = 'Error getting ethereum accounts'; + this.showValidation = true; + }); + }, + connectWeb3Wallet() { + this.showValidation = false; + onConnect().then((result) => { + this.getEthAddress(); + }).catch((_error) => { + this.validationError = 'Error connecting ethereum accounts'; + this.showValidation = true; + }); + }, + pullEthAddress() { + // Prompt web3 login if not connected + if (!provider) { + this.connectWeb3Wallet(); + } else { + this.getEthAddress(); + } + }, + async disconnectENS() { + this.awaitingResponse = true; + this.forceStep = 'disconnect'; + try { + const response = await apiCall(`/api/v0.1/profile/${trustHandle}/disconnect_user_ens`); + + if (response.ok) { + this.service = Object.assign(this.service, response); + } + } catch (err) { + console.log(err); + } finally { + this.awaitingResponse = false; + this.dismissVerification(); + _alert('You have successfully disconnected from ENS.', 'success', 3000); + } + } + } +}); + +Vue.component('google-verify-modal', { + delimiters: [ '[[', ']]' ], + data: function() { + return { + forceStep: false, + awaitingResponse: false + }; + }, + props: { + showValidation: { + type: Boolean, + required: false, + 'default': false + }, + validationStep: { + type: String, + required: true + }, + service: { + type: Object, + required: true + } + }, + computed: { + step() { + return this.forceStep || this.validationStep; + } + }, + template: ` + + + `, + methods: { + dismissVerification() { + this.$emit('modal-dismissed'); + setTimeout(() => { + this.forceStep = false; + }, 1000); + }, + verifyGoogle() { + const form = document.createElement('form'); + const csrf = document.createElement('input'); + + form.method = 'POST'; + form.action = `/api/v0.1/profile/${trustHandle}/request_verify_google`; + + csrf.value = document.querySelector('[name=csrfmiddlewaretoken]').value; + csrf.name = 'csrfmiddlewaretoken'; + + form.appendChild(csrf); + + document.body.appendChild(form); + + form.submit(); + }, + async disconnectGoogle() { + this.awaitingResponse = true; + this.forceStep = 'disconnect'; + try { + const response = await apiCall(`/api/v0.1/profile/${trustHandle}/disconnect_user_google`); + + if (response.ok) { + this.service = Object.assign(this.service, response); + } + } catch (err) { + console.log(err); + } finally { + this.awaitingResponse = false; + this.dismissVerification(); + _alert('You have successfully disconnected from Google.', 'success', 3000); + } + } + } +}); + +Vue.component('facebook-verify-modal', { + delimiters: [ '[[', ']]' ], + data: function() { + return { + forceStep: false, + awaitingResponse: false + }; + }, + props: { + showValidation: { + type: Boolean, + required: false, + 'default': false + }, + validationStep: { + type: String, + required: true + }, + service: { + type: Object, + required: true + } + }, + computed: { + step() { + return this.forceStep || this.validationStep; + } + }, + template: ` + + + `, + + methods: { + dismissVerification() { + this.$emit('modal-dismissed'); + setTimeout(() => { + this.forceStep = false; + }, 1000); + }, + verifyFacebook() { + const form = document.createElement('form'); + const csrf = document.createElement('input'); + + form.method = 'POST'; + form.action = `/api/v0.1/profile/${trustHandle}/request_verify_facebook`; + + csrf.value = document.querySelector('[name=csrfmiddlewaretoken]').value; + csrf.name = 'csrfmiddlewaretoken'; + + form.appendChild(csrf); + + document.body.appendChild(form); + + form.submit(); + }, + async disconnectFacebook() { + this.awaitingResponse = true; + this.forceStep = 'disconnect'; + try { + const response = await apiCall(`/api/v0.1/profile/${trustHandle}/disconnect_user_facebook`); + + if (response.ok) { + this.service = Object.assign(this.service, response); + } + } catch (err) { + console.log(err); + } finally { + this.awaitingResponse = false; + this.dismissVerification(); + _alert('You have successfully disconnected from Facebook.', 'success', 3000); + } + } + } +}); + + +if (document.getElementById('gc-trust-manager-app')) { + + const trustManagerApp = new Vue({ + delimiters: [ '[[', ']]' ], + el: '#gc-trust-manager-app', + data: { } + }); +} + +$(document).ready(function() { + + // scroll to the start of the trust requirements + document.getElementById('gc-trust-manager-app').scrollIntoView({ + behavior: 'smooth' + }); + + $(document).on('keyup', 'input[name=telephone]', function(e) { + var number = $(this).val(); + + if (number[0] != '+') { + number = '+' + number; + $(this).val(number); + } + }); + + $(document).on('click', '#verify_offline', function(e) { + $(this).remove(); + $('#verify_offline_or').remove(); + $('#verify_offline_target').css('display', 'block'); + }); + + jQuery.fn.shake = function(interval, distance, times) { + interval = typeof interval == 'undefined' ? 100 : interval; + distance = typeof distance == 'undefined' ? 10 : distance; + times = typeof times == 'undefined' ? 3 : times; + var jTarget = $(this); + + jTarget.css('position', 'relative'); + for (var iter = 0; iter < (times + 1); iter++) { + jTarget.animate({ top: ((iter % 2 == 0 ? distance : distance * -1))}, interval); + } + return jTarget.animate({ top: 0}, interval); + }; + + $(document).on('click', '#gen_passport', function(e) { + e.preventDefault(); + if (document.web3network != 'rinkeby' && document.web3network != 'mainnet') { + _alert('Please connect your web3 wallet to mainnet + unlock it', 'danger', 1000); + return; + } + const accounts = web3.eth.getAccounts(); + + $.when(accounts).then((result) => { + const ethAddress = result[0]; + let params = { + 'network': document.web3network, + 'coinbase': ethAddress + }; + + $.get('/passport/', params, function(response) { + let status = response['status']; + + if (status == 'error') { + _alert(response['msg'], 'danger', 5000); + return; + } + + let contract_address = response.contract_address; + let contract_abi = response.contract_abi; + let nonce = response.nonce; + let hash = response.hash; + let tokenURI = response.tokenURI; + var passport = new web3.eth.Contract(contract_abi, contract_address); + + var callback = function(err, txid) { + if (err) { + _alert(err, 'danger', 5000); + return; + } + let url = 'https://etherscan.io/tx/' + txid; + var html = ` + Woo hoo! - Your passport is being generated. View the transaction
here. +

+ Whats next? +
+ 1. Please add the token contract address (` + contract_address + `) as a token to your wallet provider. +
+ 2. Use the Trust you've built up on Gitcoin across the dWeb! Learn more at proofofpersonhood.com + `; + + $('.modal-body .subbody').html(html); + $('.modal-dialog').shake(); + }; + + passport.methods.createPassport(tokenURI, hash, nonce).send({from: ethAddress}, callback); + }); + + }); + }); +}); diff --git a/app/assets/v2/js/pages/profile-trust.js b/app/assets/v2/js/pages/profile-trust.js index 8fa857a0121..c109c8b35e6 100644 --- a/app/assets/v2/js/pages/profile-trust.js +++ b/app/assets/v2/js/pages/profile-trust.js @@ -1,14 +1,12 @@ -// handle from contxt -const trustHandle = document.contxt.github_handle; - +// Helper to formulate csrfmiddlewaretoken authenticated POST requests const apiCall = (url, givenPayload) => { return new Promise((resolve, reject) => { const csrfmiddlewaretoken = document.querySelector('[name=csrfmiddlewaretoken]').value; - const headers = {'X-CSRFToken': csrfmiddlewaretoken}; - const payload = JSON.stringify(Object.assign({ - 'gitcoin_handle': this.githubHandle - }, givenPayload || {})); + const headers = { 'X-CSRFToken': csrfmiddlewaretoken, 'content_type': 'application/json' }; + const payload = Object.assign({ + 'gitcoin_handle': document.contxt.github_handle + }, givenPayload || {}); const verificationRequest = fetchData(url, 'POST', payload, headers); $.when(verificationRequest).then(response => { @@ -19,1446 +17,229 @@ const apiCall = (url, givenPayload) => { }); }; -Vue.component('sms-verify-modal', { +Vue.component('trust-bonus-passport', { delimiters: [ '[[', ']]' ], - data: function() { - return { - csrf: $("input[name='csrfmiddlewaretoken']").val(), - phone: '', - validNumber: false, - errorMessage: '', - verified: document.verified, - code: '', - timePassed: 0, - timeInterval: 0, - display_email_option: false, - countDownActive: false, - forceStep: false, - awaitingResponse: false - }; - }, props: { - showValidation: { + visible: { type: Boolean, required: false, 'default': false }, - validationStep: { - required: true - }, - service: { - type: Object, - required: true - } - }, - computed: { - step() { - return this.forceStep || this.validationStep; - } - }, - template: ` - - - `, - methods: { - dismissVerification() { - // localStorage.setItem('dismiss-sms-validation', true); - this.$emit('modal-dismissed'); - setTimeout(() => { - this.forceStep = false; - }, 1000); - }, - // VALIDATE - validateCode() { - const vm = this; - - if (vm.code) { - const verificationRequest = fetchData(`/api/v0.1/profile/${trustHandle}/verify_user_sms/`, 'POST', { - code: vm.code, - phone: vm.phone - }, {'X-CSRFToken': vm.csrf}); - - $.when(verificationRequest).then(response => { - vm.verificationEnabled = false; - vm.verified = true; - vm.service.is_verified = true; - vm.forceStep = 'validation-complete'; - }).catch((e) => { - if (e.status == 403) { - vm.errorMessage = e.responseText; - } else { - vm.errorMessage = e.responseJSON.msg; - } - }); - } - }, - startVerification() { - this.phone = ''; - this.forceStep = 'requestVerification'; - this.validNumber = false; - this.errorMessage = ''; - this.code = ''; - this.timePassed = 0; - this.timeInterval = 0; - this.display_email_option = false; - }, - countdown() { - const vm = this; - - if (!vm.countDownActive) { - vm.countDownActive = true; - - setInterval(() => { - vm.timePassed += 1; - }, 1000); - } - }, - resendCode(delivery_method) { - const e164 = this.phone.replace(/\s/g, ''); - const vm = this; - - vm.errorMessage = ''; - - if (vm.validNumber) { - const verificationRequest = fetchData(`/api/v0.1/profile/${trustHandle}/request_user_sms`, 'POST', { - phone: e164, - delivery_method: delivery_method || 'sms' - }, {'X-CSRFToken': vm.csrf}); - - vm.errorMessage = ''; - - $.when(verificationRequest).then(response => { - // set the cooldown time to one minute - this.timePassed = 0; - this.timeInterval = 60; - this.countdown(); - this.display_email_option = response.allow_email; - }).catch((e) => { - if (e.status == 403) { - vm.errorMessage = e.responseText; - } else { - vm.errorMessage = e.responseJSON.msg; - } - }); - } - }, - // REQUEST VERIFICATION - requestVerification(event) { - const e164 = this.phone.replace(/\s/g, ''); - const vm = this; - - if (vm.validNumber) { - const verificationRequest = fetchData(`/api/v0.1/profile/${trustHandle}/request_user_sms`, 'POST', { - phone: e164 - }, {'X-CSRFToken': vm.csrf}); - - vm.errorMessage = ''; - - $.when(verificationRequest).then(response => { - this.forceStep = 'verifyNumber'; - this.timePassed = 0; - this.timeInterval = 60; - this.countdown(); - this.display_email_option = response.allow_email; - }).catch((e) => { - if (e.status == 403) { - vm.errorMessage = e.responseText; - } else { - vm.errorMessage = e.responseJSON.msg; - } - }); - } - }, - async disconnectSMS() { - this.awaitingResponse = true; - this.forceStep = 'disconnect'; - try { - const response = await apiCall(`/api/v0.1/profile/${trustHandle}/disconnect_user_sms`); - - if (response.ok) { - this.service = Object.assign(this.service, response); - } - } catch (err) { - console.log(err); - } finally { - this.awaitingResponse = false; - this.dismissVerification(); - _alert('You have successfully disconnected your SMS verification.', 'success', 3000); - } - }, - isValidNumber(validation) { - console.log(validation); - this.validNumber = validation.isValid; - } - } -}); - -Vue.component('twitter-verify-modal', { - delimiters: [ '[[', ']]' ], - data: function() { - return { - tweetText: '', - twitterHandle: '', - validationError: '', - forceStep: false, - awaitingResponse: false - }; - }, - props: { - showValidation: { + isUnlinkPending: { type: Boolean, required: false, 'default': false }, - validationStep: { - required: true - }, - service: { - type: Object, - required: true - } - }, - computed: { - encodedTweetText: function() { - return encodeURIComponent(this.service.verify_tweet_text); - }, - tweetIntentURL: function() { - return `https://twitter.com/intent/tweet?text=${this.encodedTweetText}`; - }, - step() { - return this.forceStep || this.validationStep; - } - }, - template: ` - - - `, - methods: { - dismissVerification() { - this.$emit('modal-dismissed'); - setTimeout(() => { - this.forceStep = false; - }, 1000); - }, - clickedSendTweet(event) { - this.forceStep = 'validate-tweet'; - }, - clickedAlreadySent(event) { - event.preventDefault(); - this.forceStep = 'validate-tweet'; - }, - clickedGoBack(event) { - event.preventDefault(); - this.forceStep = 'send-tweet'; - this.validationError = ''; - }, - clickedValidate(event) { - event.preventDefault(); - - this.twitterHandle = this.twitterHandle.trim(); - - // Strip leading @ if user includes it - if (this.twitterHandle.startsWith('@')) { - this.twitterHandle = this.twitterHandle.split('@')[1]; - } - - // Validate handle is 15 word characters - const isValidHandle = null !== this.twitterHandle.match(/^(\w){1,15}$/); - - if (!isValidHandle) { - this.validationError = 'Please enter a valid Twitter handle'; - return; - } - - // Reset after a prior error - this.validationError = ''; - - this.forceStep = 'perform-validation'; - - this.verifyTwitter(); - }, - verifyTwitter() { - const csrfmiddlewaretoken = document.querySelector('[name=csrfmiddlewaretoken]').value; - const payload = JSON.stringify({ - 'twitter_handle': this.twitterHandle - }); - const headers = {'X-CSRFToken': csrfmiddlewaretoken}; - - const verificationRequest = fetchData(`/api/v0.1/profile/${trustHandle}/verify_user_twitter`, 'POST', payload, headers); - - $.when(verificationRequest).then(response => { - if (response.ok) { - this.forceStep = 'validation-complete'; - this.service.is_verified = true; - } else { - this.validationError = response.msg; - this.forceStep = 'validate-tweet'; - } - - }).catch((_error) => { - this.validationError = 'There was an error; please try again later'; - this.forceStep = 'validate-tweet'; - }); - }, - async disconnectTwitter() { - this.awaitingResponse = true; - this.forceStep = 'disconnect'; - try { - const response = await apiCall(`/api/v0.1/profile/${trustHandle}/disconnect_user_twitter`); - - if (response.ok) { - this.service = Object.assign(this.service, response); - } - } catch (err) { - console.log(err); - } finally { - this.awaitingResponse = false; - this.dismissVerification(); - _alert('You have successfully disconnected from Twitter.', 'success', 3000); - } - } - } -}); - -Vue.component('poap-verify-modal', { - delimiters: [ '[[', ']]' ], - data: function() { - return { - hideTemporarily: false, - ethAddress: '', - signature: '', - validationError: '', - forceStep: false, - awaitingResponse: false - }; - }, - props: { - showValidation: { - type: Boolean, + stampVerifications: { + type: Array, required: false, - 'default': false - }, - service: { - type: Object, - required: true + 'default': () => [] }, - validationStep: { + did: { type: String, - required: true - } - }, - computed: { - step() { - return this.forceStep || this.validationStep; - } - }, - template: ` - - + + +
+ +
+
+
+
+
+ +
+
+
+
+ +
+
+ Unlinking Passport ... +
+ + +
+`, -Vue.component('poh-verify-modal', { - delimiters: [ '[[', ']]' ], - data: function() { + data() { return { - hideTemporarily: false, - ethAddress: '', - signature: '', - validationError: '', - forceStep: false, - awaitingResponse: false + // modalShow: this.visible }; }, - props: { - showValidation: { - type: Boolean, - required: false, - 'default': false - }, - validationStep: { - type: String, - required: true - }, - service: { - type: Object, - required: true - } - }, - computed: { - step() { - - return this.forceStep || this.validationStep; - } - }, - template: ` - - - `, - methods: { - dismissVerification() { - // If we're only hiding the modal to allow wallet selection, don't emit this event, which - // would prevent it from popping up again after the user completes their selection. - if (!this.hideTemporarily) { - this.$emit('modal-dismissed'); - setTimeout(() => { - this.forceStep = false; - }, 1000); - } - }, - clickedGoBack(event) { - event.preventDefault(); - this.forceStep = 'validate-address'; - this.ethAddress = ''; - this.validationError = ''; - }, - getEthAddress() { - const accounts = web3.eth.getAccounts(); - $.when(accounts) - .then((result) => { - const ethAddress = result[0]; - - this.ethAddress = ethAddress; - this.forceStep = 'validate-poh'; - this.hideTemporarily = false; - }) - .catch((_error) => { - this.validationError = 'Error getting ethereum accounts'; - this.forceStep = 'validate-address'; - this.hideTemporarily = false; - }); - }, - generateSignature() { - web3.eth.personal.sign('verify_poh_registration', this.ethAddress).then((signature) => { - this.signature = signature; - this.verifyPOH(); - }) - .catch((_error) => { - this.validationError = 'Error sign message declined'; - this.forceStep = 'validate-poh'; - this.hideTemporarily = false; - }); - }, - connectWeb3Wallet() { - this.hideTemporarily = true; - onConnect() - .then((result) => { - this.getEthAddress(); - }) - .catch((_error) => { - this.validationError = 'Error connecting ethereum accounts'; - this.forceStep = 'validate-address'; - this.hideTemporarily = false; - }); - }, - clickedPullEthAddress(event) { - event.preventDefault(); - if (!provider) { - this.connectWeb3Wallet(); - } else { - this.getEthAddress(); - } - }, - clickedChangeWallet(event) { - event.preventDefault(); - this.validationError = ''; - this.connectWeb3Wallet(); - }, - clickedValidate(event) { - event.preventDefault(); - this.validationError = ''; - this.forceStep = 'perform-validation'; - this.generateSignature(); - }, - async verifyPOH() { - try { - const response = await apiCall(`/api/v0.1/profile/${trustHandle}/verify_user_poh`, { - eth_address: this.ethAddress, - signature: this.signature - }); - - if (response.ok) { - this.forceStep = 'validation-complete'; - this.service.is_verified = true; - } else { - this.validationError = response.msg; - this.forceStep = 'validate-poh'; - } - } catch (err) { - this.validationError = 'There was an error; please try again later'; - this.forceStep = 'validate-poh '; + computed: { + modalShow: { + set(newValue) { + console.log('geri change:', newValue); + this.$emit('change', newValue); + }, + get() { + return this.visible; } }, - async disconnectPOH() { - this.awaitingResponse = true; - this.forceStep = 'disconnect'; - try { - const response = await apiCall(`/api/v0.1/profile/${trustHandle}/disconnect_user_poh`); + address: function() { + if (this.did) { + let parts = this.did.split(':'); - if (response.ok) { - this.service = Object.assign(this.service, response); - } - } catch (err) { - console.log(err); - } finally { - this.awaitingResponse = false; - this.dismissVerification(); - _alert('You have successfully disconnected from POH.', 'success', 3000); + return parts[parts.length - 1]; } - } - } -}); - -Vue.component('brightid-verify-modal', { - delimiters: [ '[[', ']]' ], - data: function() { - return { - calls: [], - verifying: false, - forceStep: false, - awaitingResponse: false - }; - }, - props: { - showValidation: { - type: Boolean, - required: false, - 'default': false - }, - validationStep: { - type: String, - required: true - }, - brightidUuid: { - type: String, - required: true - }, - service: { - type: Object, - required: true - } - }, - computed: { - brightIdLink() { - return `https://app.brightid.org/link-verification/http:%2f%2fnode.brightid.org/Gitcoin/${this.brightidUuid}`; - }, - brightIdAppLink() { - return `brightid://link-verification/http:%2f%2fnode.brightid.org/Gitcoin/${this.brightidUuid}`; - }, - step() { - return this.forceStep || this.validationStep; + return null; } }, - template: ` - - - `, methods: { - dismissVerification() { - this.$emit('modal-dismissed'); - setTimeout(() => { - this.forceStep = false; - }, 1000); - }, - formatDate(date) { - let options = {hour: 'numeric', minute: 'numeric', dayPeriod: 'short'}; - - return new Intl.DateTimeFormat('en-US', options).format(new Date(date)); - }, - moveToVerifyBrightid() { - this.forceStep = 'verify-brightid'; - }, - async verifyBrightid() { - this.verifying = true; - try { - const response = await apiCall(`/api/v0.1/profile/${trustHandle}/verify_user_brightid`); - - if (response.ok) { - this.service._status = response.msg; - if (this.service._status == 'verified') { - this.service.is_verified = true; - this.service.status = false; - this.forceStep = 'verification-complete'; - } else { - this.service._state = 'verify-brightid'; - this.service.status = 'Awaiting Verification'; - // alert pending - _alert('Pending Validation...', 'danger', 2000); - } - } - } catch (err) { - console.log(err); - } finally { - this.verifying = false; - } + close() { + this.$bvModal.hide('trust-bonus-passport'); }, - async disconnectBrightid() { - this.awaitingResponse = true; - this.forceStep = 'disconnect'; - try { - const response = await apiCall(`/api/v0.1/profile/${trustHandle}/disconnect_user_brightid`); - if (response.ok) { - this.service = Object.assign(this.service, response); - } - } catch (err) { - console.log(err); - } finally { - this.awaitingResponse = false; - this.dismissVerification(); - _alert('You have successfully disconnected from BrightID.', 'success', 3000); - } + unlink() { + this.$emit('unlink'); } } }); -Vue.component('idena-verify-modal-content', { - template: ` -
-

Idena is the first proof-of-person blockchain based on democratic principles. Every node is linked to a cryptoidentity – one single person with equal voting power and mining income.

-

To start mining Idena, you need to prove you are a unique human. It does not require the disclosure of any personal data (no KYC). Simply appear online when the validation ceremony starts and solve a series of flip-tests (CAPTCHAs).

- -
- ` -}); +let currentTime = new Date(); +let gr15Start = Date.parse('2022-09-07T15:00:00.000Z'); +let distance = gr15Start - currentTime; -Vue.component('idena-verify-modal', { - delimiters: [ '[[', ']]' ], - data: function() { - return { - calls: [], - verifying: false, - forceStep: false, - initiated: false, - awaitingResponse: false - }; - }, - props: { - showValidation: { - type: Boolean, - required: false, - 'default': false - }, - validationStep: { - type: String, - required: true - }, - service: { - type: Object, - required: true - } - }, - computed: { - step() { - return this.forceStep || this.validationStep; - } - }, - template: ` - - - `, - - methods: { - dismissVerification() { - this.$emit('modal-dismissed'); - }, - connectIdena() { - // open idena for the rest of the process to take place - window.open(this.service.login_url, '_blank'); - // assume connected - check properly on close - this.initiated = true; - }, - async checkApi(url, checkingStatus) { - if (checkingStatus) { - this.awaitingResponse = true; - } - try { - const response = await apiCall(url); - - if (response.ok) { - this.forceStep = false; - this.service = Object.assign(this.service, response); - } - } catch (err) { - console.log(err); - } finally { - if (!checkingStatus) { - this.dismissVerification(); - } else if (!this.service.is_verified) { - _alert('Pending Validation...', 'danger', 2000); - } - this.awaitingResponse = false; - if (url === this.service.logout_url) { - _alert('You have successfully disconnected from Idena.', 'success', 3000); - } - } - } - } -}); +var days = Math.floor((distance % (24 * 1000 * 60 * 60 * 24)) / (24 * 1000 * 60 * 60)); +var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)); +var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60)); +var seconds = Math.floor((distance % (1000 * 60)) / 1000); +let countDown = `${days} day, ${hours} ${hours > 1 ? 'hours' : 'hour'}, ${minutes} min, ${seconds} sec`; -Vue.component('duniter-verify-modal', { +// Create the trust-bonus view +Vue.component('active-trust-manager', { delimiters: [ '[[', ']]' ], - data: function() { + data() { return { - validationStep: 'validate-duniter', - validationError: '', - publicKey: '' + IAMIssuer: document.iam_issuer, + DIDKit: undefined, + reader: new PassportReader(document.ceramic_url, 1), + did: undefined, + step: 1, + passport: document.is_passport_connected ? {} : undefined, + passportVerified: document.is_passport_connected && (document.trust_bonus_status ? document.trust_bonus_status.indexOf('Error:') === -1 : false), + passportUrl: 'https://passport.gitcoin.co/', + rawPassport: undefined, + trustBonus: ((document.trust_bonus * 100) || 50).toFixed(1), + trustBonusStatus: document.trust_bonus_status, + isTrustBonusRefreshInProgress: false, + isCeramicConnected: true, + healthCheckTimeout: 2000, + loading: false, + verificationError: false, + saveSuccessMsg: document.trust_bonus_status === 'pending_celery' ? 'Your Passport has been submitted.' : false, + roundStartDate: parseMonthDay(document.round_start_date), + roundEndDate: parseMonthDay(document.round_end_date), + services: document.services || [], + clrRound: document.clr_round, + modalShow: false, + modalName: false, + pyVerificationError: false, + passportDetailsShow: false, + confirmUnlinkPassportShow: false, + noPassportShow: false, + passportScoringShow: false, + myStampsShow: false, + passportStamps: [], + apuScoreStatus: null, // null, saving, submitting, scoring, complete + isSubmissionEnabled: currentTime > gr15Start, + isStaff: document.contxt.is_staff, + countDown: countDown, + stampVerifications: document.passport_trust_bonus_stamp_validation, + passportDid: document.passport_did, + unlinkSuccessMsg: false, + unlinkErrorMsg: false, + isUnlinkPending: false }; }, - computed: { - }, - props: { - showValidation: { - type: Boolean, - required: false, - 'default': false - } - }, - template: ` - - - `, - methods: { - dismissVerification() { - this.showValidation = false; - }, - clickedGoBack(event) { - event.preventDefault(); - this.validationStep = 'validate-duniter'; - this.validationError = ''; - }, - clickedValidate(event) { - event.preventDefault(); + async mounted() { + // await DIDKits bindings + this.DIDKit = (await DIDKit); - this.validationError = ''; + // check for initial error state + this.pyVerificationError = this.trustBonusStatus != null ? this.trustBonusStatus.indexOf('Error:') !== -1 : false; + window.DD_LOGS && DD_LOGS.logger.info(`Initial trustBonusStatus for '${document.contxt.github_handle}': '${this.trustBonusStatus}'`); - this.validationStep = 'perform-validation'; - this.getUserHandle(); - this.verifyDuniter(); - }, - getUserHandle() { - this.githubHandle = trustHandle; - }, - verifyDuniter() { - const csrfmiddlewaretoken = document.querySelector('[name=csrfmiddlewaretoken]').value; - const headers = {'X-CSRFToken': csrfmiddlewaretoken}; - const payload = JSON.stringify({ - 'gitcoin_handle': this.githubHandle - }); - const verificationRequest = fetchData('/api/v0.1/profile/verify_user_duniter', 'POST', payload, headers); + // error message attachment + this.visitGitcoinPassport = `
Visit Gitcoin Passport to create your Passport and get started.`; - $.when(verificationRequest).then(response => { - if (response.ok) { - this.validationStep = 'validation-complete'; - } else { - this.validationError = response.msg; - this.validationStep = 'validate-duniter'; - } + // on account change/connect etc... (get Passport state for wallet -- if verified, ensure that the passport connect button has been clicked first) + document.addEventListener('dataWalletReady', () => (!this.pyVerificationError && this.loading) && this.checkForPassport()); - }).catch((_error) => { - this.validationError = 'There was an error; please try again later'; - this.validationStep = 'validate-duniter'; - }); - } - } -}); + // on wallet disconnect (clear Passport state) + document.addEventListener('walletDisconnect', () => (!this.passportVerified ? this.reset(true) : false)); -Vue.component('active-trust-manager', { - delimiters: [ '[[', ']]' ], - data() { - return { - visibleModal: 'none', - console: console, - round_start_date: parseMonthDay(document.round_start_date), - round_end_date: parseMonthDay(document.round_end_date), - roadmap: document.roadmap || [], - services: document.services || [], - coming_soon: document.coming_soon || [] - }; + this.refreshTrustBonus(); + // start watching for trust bonus status updates, in case the calculation is still pending + if (this.pyVerificationError) { + // clear all state + this.reset(true); + this.verificationError = this.trustBonusStatus; + } + // start running the health-check + this.checkCeramicConnection(); }, computed: { - trust_bonus: function() { - - return Math.min(150, this.services.reduce((total, service) => { - return (service.is_verified ? service.match_percent : 0) + total; - }, 50)); - }, serviceDict: function() { return this.services.reduce((services, service) => { @@ -1467,702 +248,396 @@ Vue.component('active-trust-manager', { return services; }, {}); + }, + loadingStates: function() { + return { + submitting: { + loading: this.apuScoreStatus === 'submitting', + complete: this.apuScoreStatus === 'scoring' | this.apuScoreStatus === 'saving' | this.apuScoreStatus === 'complete' + }, + scoring: { + loading: this.apuScoreStatus === 'scoring', + complete: this.apuScoreStatus === 'saving' | this.apuScoreStatus === 'complete' + }, + saving: { + loading: this.apuScoreStatus === 'saving', + complete: this.apuScoreStatus === 'complete' + } + }; } }, methods: { showModal(modalName) { - this.visibleModal = modalName; - console.log(this.visibleModal); + this.modalShow = true; + this.modalName = modalName; }, hideModal() { - this.visibleModal = 'none'; - } - } -}); - -Vue.component('active-trust-row-template', { - delimiters: [ '[[', ']]' ], - data() { - return {}; - }, - props: { - iconType: { - type: String, // 'image' or 'markup' - required: false, - 'default': 'markup' - }, - iconPath: { - // path to image file if iconType is 'image' - type: String, - required: false - }, - title: { - type: String, - required: true - }, - matchPercent: { - type: Number, - required: true - }, - isVerified: { - type: Boolean, - required: true - }, - buttonText: { - type: String, - required: false, - 'default': 'Verify' - } - }, - methods: { - didClick(event) { - event.preventDefault(); - this.$emit('verify-button-pressed'); - }, - hasVerifySlot() { - return !!this.$slots.verify; - } - }, - template: ` -
-
-
- -
-
- logo -
-
-
-
- [[title]] -
-
- -
-
-
-
- +[[matchPercent]]% -
-
- Grants Match Bonus -
-
-
- - -
-
` -}); - -Vue.component('inactive-trust-row-template', { - delimiters: [ '[[', ']]' ], - props: { - service: { - type: String, - required: true - }, - when: { - type: String, - required: true - } - }, - template: ` - -
-
- - - -
-
-
- [[ service ]] -
-
- Tentatively [[when]] -
-
-
-
- +?% -
-
- Grants Match Bonus -
-
-
-
- 🚧 -
-
- [[when]] -
-
-
` -}); - -Vue.component('ens-verify-modal', { - delimiters: [ '[[', ']]' ], - data: function() { - return { - ethAddress: '', - static_url: document.contxt.STATIC_URL, - ensDomain: '', - validationError: '', - validationErrorMsg: '', - url: '', - forceStep: false, - verificationEthAddress: '', - awaitingResponse: false - }; - }, - props: { - showValidation: { - type: Boolean, - required: false, - 'default': false - }, - validationStep: { - required: true - }, - service: { - type: Object, - required: true - } - }, - computed: { - step() { - return this.forceStep || this.validationStep; - } - }, - watch: { - showValidation: function() { - if (this.showValidation === true && typeof web3 !== 'undefined' && !this.service.is_verified) { - this.pullEthAddress(); - } - } - }, - template: ` - - - `, - methods: { - dismissVerification() { - this.$emit('modal-dismissed'); - setTimeout(() => { - this.forceStep = false; - }, 1000); - }, - verifyENS() { - const csrfmiddlewaretoken = document.querySelector('[name=csrfmiddlewaretoken]').value; - const headers = {'X-CSRFToken': csrfmiddlewaretoken}; - const data = {}; - - if (typeof web3 !== 'undefined' && web3.utils.isAddress(this.verificationEthAddress)) { - data['verification_address'] = this.verificationEthAddress; + this.$bvModal.show('trust-bonus-passport'); + }, + showPassportDetails(e) { + this.unlinkSuccessMsg = false; + this.unlinkErrorMsg = false; + this.passportDetailsShow = true; + e.preventDefault(); + }, + reset(fullReset) { + // reset the step + this.step = 1; + // this is set after we savePassport() if no verifications failed + this.passportVerified = false; + + if (fullReset) { + // clear current user state + this.did = false; + this.passport = false; + this.rawPassport = false; + + // clear the stamps + this.services.forEach((service) => { + this.serviceDict[service.ref].is_verified = false; + }); } - - const verificationRequest = fetchData(`/api/v0.1/profile/${trustHandle}/verify_user_ens`, 'POST', data, headers); - - this.onResponse(verificationRequest); }, - onchange() { - if (!this.service.is_verified && typeof web3 !== 'undefined' && web3.utils.isAddress(this.verificationEthAddress)) { - this.checkENSValidation(); + async checkCeramicConnection() { + try { + // attempt to pull the passports schema + await fetch(`${document.ceramic_url}/api/v0/streams/kjzl6cwe1jw148h1e14jb5fkf55xmqhmyorp29r9cq356c7ou74ulowf8czjlzs`); + // if we get a response then the connection is good + this.isCeramicConnected = true; + // increase the timeout by 50% on each successful check (2s, 3s, 4.5s etc...) + this.healthCheckTimeout = Math.min(60000, Math.max(0, this.healthCheckTimeout * 1.5)); // max ping of 60s + } catch (e) { + // no connection + this.isCeramicConnected = false; + this.healthCheckTimeout = 2000; } + // check again in x number of seconds + setTimeout(this.checkCeramicConnection, this.healthCheckTimeout); }, - onResponse(verificationRequest) { - let vm = this; - - $.when(verificationRequest).then(response => { - vm.validationError = response.error; - vm.validationErrorMsg = response.msg; - vm.service.is_verified = response.data.verified; - vm.forceStep = response.data.step; - vm.url = response.data.url; - vm.verificationEthAddress = response.data.address; - vm.ensDomain = response.data.ens_domain; - }); + async passportActionHandlerSave() { + window.DD_LOGS && DD_LOGS.logger.info(`handle '${document.contxt.github_handle}' - action save`); + await this.savePassport(); }, - checkENSValidation() { - let vm = this; - const csrfmiddlewaretoken = document.querySelector('[name=csrfmiddlewaretoken]').value; - const headers = {'X-CSRFToken': csrfmiddlewaretoken}; - const data = {}; + async handleErrorClick(e) { + window.DD_LOGS && DD_LOGS.logger.info(`handle '${document.contxt.github_handle}' - action error click`); + const clickedElId = e.target.id; - if (typeof web3 !== 'undefined' && web3.utils.isAddress(this.verificationEthAddress)) { - data['verification_address'] = this.verificationEthAddress; + if (clickedElId === 'save-passport') { + await this.savePassport(); } + }, + async refreshTrustBonus() { + // if we have sig, attempt to save the passports details into the backend + const url = `/api/v2/profile/${document.contxt.github_handle}/passport/trust_bonus`; + + const _getTrustBonus = () => { + const getTrustBonusRequest = fetchData(url, 'GET'); + + $.when(getTrustBonusRequest).then(response => { + this.trustBonusStatus = response.passport_trust_bonus_status; + this.pyVerificationError = this.trustBonusStatus.indexOf('Error:') !== -1; + + if (response.passport_trust_bonus_status === 'pending_celery') { + this.apuScoreStatus = 'scoring'; + _refreshTrustBonus(); + } else if (response.passport_trust_bonus_status === 'saved') { + this.trustBonus = ((parseFloat(response.passport_trust_bonus) * 100) || 50).toFixed(1); + this.passportStamps = response.passport_stamps; + this.isTrustBonusRefreshInProgress = false; + this.saveSuccessMsg = false; + this.stampVerifications = response.passport_trust_bonus_stamp_validation; + this.passportDid = response.passport_did; + + this.apuScoreSaved(); + } else { + this.isTrustBonusRefreshInProggress = false; + this.saveSuccessMsg = false; - const verificationRequest = fetchData(`/api/v0.1/profile/${trustHandle}/verify_user_ens`, 'GET', data, headers); + if (this.pyVerificationError) { + this.verificationError = this.trustBonusStatus; + } + } + // check for error state + if (this.pyVerificationError) { + this.step = 1; + // clear all state + this.reset(true); + } + }).catch((error) => { + window.DD_LOGS && DD_LOGS.logger.error(`Error when refreshing trust bonus, handle: '${document.contxt.github_handle}' did: ${this.did}. Error: ${error}`); + _refreshTrustBonus(); + }); + }; - this.onResponse(verificationRequest); - }, - getEthAddress() { - const accounts = web3.eth.getAccounts(); + const _refreshTrustBonus = () => { + setTimeout(_getTrustBonus, 5000); + }; - $.when(accounts).then((result) => { - this.verificationEthAddress = result[0]; - this.onchange(); - this.showValidation = true; - }).catch((_error) => { - this.validationError = 'Error getting ethereum accounts'; - this.showValidation = true; - }); - }, - connectWeb3Wallet() { - this.showValidation = false; - onConnect().then((result) => { - this.getEthAddress(); - }).catch((_error) => { - this.validationError = 'Error connecting ethereum accounts'; - this.showValidation = true; - }); + if (!this.isTrustBonusRefreshInProgress) { + this.isTrustBonusRefreshInProgress = true; + _refreshTrustBonus(); + } }, - pullEthAddress() { - // Prompt web3 login if not connected - if (!provider) { - this.connectWeb3Wallet(); + apuScoreSaved() { + this.apuScoreStatus = 'saving'; + setTimeout(() => { + this.apuScoreStatus = 'complete', + this.passportScoringShow = false; + }, 800); + }, + lintToPassport() { + this.noPassportShow = false; + window.open('https://passport.gitcoin.co/#/', '_blank'); + }, + async verifyPassport() { + // pull the raw passport... + const passport = this.rawPassport; + + // enter loading + this.loading = true; + + // reset errors + this.verificationError = undefined; + + // Filter the stamps, include only those with valid (not undefined) credentialSubject (credentialSubject has been undefined on rare occasions) + const stamps = (passport && passport.stamps) ? passport.stamps.filter((stamp) => stamp.credential && stamp.credential.credentialSubject) : undefined; + + // check for a passport and then its validity + if (passport && stamps) { + try { + // check if the stamps are unique to this user... + const stampHashes = await apiCall(`/api/v2/profile/${document.contxt.github_handle}/passport/stamp/check`, { + 'did': this.did, + 'stamp_hashes': stamps.map((stamp) => { + return stamp.credential.credentialSubject.hash; + }) + }); + + // perform checks on issuer, expiry, owner, VC validity and stamp_hash validity + await Promise.all(stamps.map(async(stamp) => { + if (stamp && Object.keys(stamp).length > 0) { + // set the service against provider and issuer + const serviceDictId = `${this.IAMIssuer}#${stamp.provider}`; + // validate the contents of the stamp collection + const expiryCheck = new Date(stamp.credential.expirationDate) > new Date(); + const issuerCheck = stamp.credential.issuer === this.IAMIssuer; + const hashCheck = stampHashes.checks[stamp.credential.credentialSubject.hash] === true; + const providerCheck = stamp.provider === stamp.credential.credentialSubject.provider; + const ownerCheck = selectedAccount.toLowerCase() == stamp.credential.credentialSubject.id.replace('did:pkh:eip155:1:', '').toLowerCase(); + + // check exists and has valid expiry / issuer / hash / owner... + if (this.serviceDict[serviceDictId] && stamp.credential && expiryCheck && issuerCheck && hashCheck && providerCheck && ownerCheck) { + // verify with DIDKits verifyCredential() + const verified = JSON.parse(await this.DIDKit.verifyCredential( + JSON.stringify(stamp.credential), + `{"proofPurpose":"${stamp.credential.proof.proofPurpose}"}` + )); + + // if no errors then this is a valid VerifiableCredential issued by the known issuer and is unique to our store + this.serviceDict[serviceDictId].is_verified = verified.errors.length === 0; + } + // collect array of true/false to check validity of every issued stamp (if stamp isn't recognised then it should be ignored (always true)) + return !this.serviceDict[serviceDictId] ? true : this.serviceDict[serviceDictId].is_verified; + } + })); + + // set the new trustBonus score + // TODO: this is not needed in GR15 ... + // this.trustBonus = Math.min(150, this.services.reduce((total, service) => { + // return (service.is_verified ? service.match_percent : 0) + total; + // }, 50)); + + } catch (error) { + console.error('Error checking passport: ', error); + window.DD_LOGS && DD_LOGS.logger.error(`Error checking passport, handle: '${document.contxt.github_handle}' did: ${this.did}. Error: ${error}`); + this.verificationError = 'Oh, we had a technical error while scoring. Please give it another try.'; + throw error; + } finally { + this.loading = false; + } } else { - this.getEthAddress(); + window.DD_LOGS && DD_LOGS.logger.info(`Error checking passport, handle: '${document.contxt.github_handle}' did: ${this.did}. Passport is empty or has no stamps.`); + this.verificationError = `The Passport associated with this wallet is empty. ${this.visitGitcoinPassport}`; + this.loading = false; + throw 'Passport is empty!'; } }, - async disconnectENS() { - this.awaitingResponse = true; - this.forceStep = 'disconnect'; + async savePassport() { + // enter loading + this.loading = true; + this.saveSuccessMsg = false; + + // attempt to verify the passport try { - const response = await apiCall(`/api/v0.1/profile/${trustHandle}/disconnect_user_ens`); + if (document.challenge) { + // request signature + let signature = false; + + // clear error state + this.verificationError = undefined; + + // attempt the signature + try { + // Construct a challenge string to sign (this must match the challenge_string in dashboard/views.py::verify_passport) + challengeString = `${document.challenge.statement} ${document.challenge.nonce}`; + // get the signature for the document-wide provided challenge (set in dashboard/views.py::get_profile_tab::trust) + signature = await web3.eth.personal.sign(challengeString, selectedAccount); + } catch { + // set error - * note that #save-passport does not have an event handler - it is caught by `this.handleErrorClick(e)` as the event bubbles + this.verificationError = 'In order to verify your Passport, the wallet message requires a signature.
Click here to verify ownership of your wallet and submit to Gitcoin.'; + // stop loading + this.loading = false; + + // if there was an error in the sig - don't post to verify + return false; + } - if (response.ok) { - this.service = Object.assign(this.service, response); + // if we have sig, attempt to save the passports details into the backend + const response = await apiCall(`/api/v2/profile/${document.contxt.github_handle}/passport/verify`, { + 'eth_address': selectedAccount, + 'signature': signature, + 'did': this.did + }); + + // display error state if sig was bad + if (response.error) { + // Bad signature error + this.verificationError = response.error; + } else { + // mark as verified + this.passportVerified = true; + // notify success (temp) + // _alert('Your Passport\'s Trust Bonus has been saved!', 'success', 6000); + this.saveSuccessMsg = 'Your Passport has been submitted.'; + this.trustBonusStatus = 'pending_celery'; + this.apuScoreStatus = 'submitted'; + this.refreshTrustBonus(); + } } - } catch (err) { - console.log(err); - } finally { - this.awaitingResponse = false; - this.dismissVerification(); - _alert('You have successfully disconnected from ENS.', 'success', 3000); + } catch (error) { + window.DD_LOGS && DD_LOGS.logger.error(`Error submitting passport for trust bonus calculation, handle: '${document.contxt.github_handle}' did: ${this.did}. Error: ${error}`); + // clear state but not the stamps (if the problem was in passing the state to gitcoin then we want to know that here) + this.reset(); + // set error state + this.verificationError = 'There was an error; please try again later'; } - } - } -}); -Vue.component('google-verify-modal', { - delimiters: [ '[[', ']]' ], - data: function() { - return { - forceStep: false, - awaitingResponse: false - }; - }, - props: { - showValidation: { - type: Boolean, - required: false, - 'default': false - }, - validationStep: { - type: String, - required: true + // stop loading + this.loading = false; }, - service: { - type: Object, - required: true - } - }, - computed: { - step() { - return this.forceStep || this.validationStep; - } - }, - template: ` - - - `, - methods: { - dismissVerification() { - this.$emit('modal-dismissed'); - setTimeout(() => { - this.forceStep = false; - }, 1000); - }, - verifyGoogle() { - const form = document.createElement('form'); - const csrf = document.createElement('input'); - - form.method = 'POST'; - form.action = `/api/v0.1/profile/${trustHandle}/request_verify_google`; - - csrf.value = document.querySelector('[name=csrfmiddlewaretoken]').value; - csrf.name = 'csrfmiddlewaretoken'; - - form.appendChild(csrf); + window.DD_LOGS && DD_LOGS.logger.info(`Connecting passport for ${document.contxt.github_handle} - skip, no web3`); + this.loading = false; + return; + } - document.body.appendChild(form); + // call onConnect directly after first load to force web3Modal to display every time its called + const ret = await onConnect(); - form.submit(); - }, - async disconnectGoogle() { - this.awaitingResponse = true; - this.forceStep = 'disconnect'; + window.DD_LOGS && DD_LOGS.logger.info(`Connecting passport for ${document.contxt.github_handle} - skip, no selected account`); + this.loading = false; + return; + } try { - const response = await apiCall(`/api/v0.1/profile/${trustHandle}/disconnect_user_google`); - - if (response.ok) { - this.service = Object.assign(this.service, response); + const genesis = await this.reader.getGenesis(selectedAccount); + const streams = genesis && genesis.streams; + + // if streams account has pa + if (streams && Object.keys(streams).length > 0) { + // Show passport indication modal + this.passportScoringShow = true; + this.apuScoreStatus = 'submitting'; + this.did = genesis.did; + await this.savePassport(); + this.apuScoreStatus = 'scoring'; + } else { + this.noPassportShow = true; } - } catch (err) { - console.log(err); - } finally { - this.awaitingResponse = false; - this.dismissVerification(); - _alert('You have successfully disconnected from Google.', 'success', 3000); + } catch (e) { + // Error state in design?? + this.passportScoringShow = false; } - } - } -}); - -Vue.component('facebook-verify-modal', { - delimiters: [ '[[', ']]' ], - data: function() { - return { - forceStep: false, - awaitingResponse: false - }; - }, - props: { - showValidation: { - type: Boolean, - required: false, - 'default': false }, - validationStep: { - type: String, - required: true + async showConfirmUnlinkPassport() { + this.confirmUnlinkPassportShow = true; }, - service: { - type: Object, - required: true - } - }, - computed: { - step() { - return this.forceStep || this.validationStep; - } - }, - template: ` - - - `, - - methods: { - dismissVerification() { - this.$emit('modal-dismissed'); - setTimeout(() => { - this.forceStep = false; - }, 1000); + async confirmUnlinkPassport() { + this.confirmUnlinkPassportShow = false; + this.unlinkPassport(); }, - verifyFacebook() { - const form = document.createElement('form'); - const csrf = document.createElement('input'); + async unlinkPassport() { + // enter loading + this.loading = true; + this.saveSuccessMsg = false; + this.unlinkSuccessMsg = false; + this.unlinkErrorMsg = false; + this.isUnlinkPending = true; - form.method = 'POST'; - form.action = `/api/v0.1/profile/${trustHandle}/request_verify_facebook`; - - csrf.value = document.querySelector('[name=csrfmiddlewaretoken]').value; - csrf.name = 'csrfmiddlewaretoken'; - - form.appendChild(csrf); + // attempt to verify the passport + try { + if (document.challenge) { + // clear error state + this.verificationError = undefined; - document.body.appendChild(form); + // if we have sig, attempt to save the passports details into the backend + const response = await apiCall(`/api/v2/profile/${document.contxt.github_handle}/passport/unlink`, {}); - form.submit(); - }, - async disconnectFacebook() { - this.awaitingResponse = true; - this.forceStep = 'disconnect'; - try { - const response = await apiCall(`/api/v0.1/profile/${trustHandle}/disconnect_user_facebook`); + this.isUnlinkPending = false; - if (response.ok) { - this.service = Object.assign(this.service, response); + // display error state if sig was bad + if (response.error) { + // Bad signature error + this.unlinkErrorMsg = response.error; + } else { + // mark as verified + this.passportVerified = true; + // notify success (temp) + this.unlinkSuccessMsg = 'Your Passport has been unlinked.'; + this.trustBonusStatus = 'saved'; + this.stampVerifications = []; + this.passportDid = null; + this.trustBonus = 50; + } } - } catch (err) { - console.log(err); - } finally { - this.awaitingResponse = false; - this.dismissVerification(); - _alert('You have successfully disconnected from Facebook.', 'success', 3000); + } catch (error) { + window.DD_LOGS && DD_LOGS.logger.error(`Error submitting passport for trust bonus calculation, handle: '${document.contxt.github_handle}' did: ${this.did}. Error: ${error}`); + // clear state but not the stamps (if the problem was in passing the state to gitcoin then we want to know that here) + this.reset(); + // set error state + this.unlinkErrorMsg = 'There was an error; please try again later'; + this.isUnlinkPending = false; } + + // stop loading + this.loading = false; } } }); - if (document.getElementById('gc-trust-manager-app')) { - - const trustManagerApp = new Vue({ + const TrustManager = new Vue({ delimiters: [ '[[', ']]' ], el: '#gc-trust-manager-app', - data: { } + data: {} }); } $(document).ready(function() { - - // scroll to the start of the trust requirements - document.getElementById('gc-trust-manager-app').scrollIntoView({ - behavior: 'smooth' - }); - - $(document).on('keyup', 'input[name=telephone]', function(e) { - var number = $(this).val(); - - if (number[0] != '+') { - number = '+' + number; - $(this).val(number); - } - }); - - $(document).on('click', '#verify_offline', function(e) { - $(this).remove(); - $('#verify_offline_or').remove(); - $('#verify_offline_target').css('display', 'block'); - }); - - jQuery.fn.shake = function(interval, distance, times) { - interval = typeof interval == 'undefined' ? 100 : interval; - distance = typeof distance == 'undefined' ? 10 : distance; - times = typeof times == 'undefined' ? 3 : times; - var jTarget = $(this); - - jTarget.css('position', 'relative'); - for (var iter = 0; iter < (times + 1); iter++) { - jTarget.animate({ top: ((iter % 2 == 0 ? distance : distance * -1))}, interval); - } - return jTarget.animate({ top: 0}, interval); - }; - - $(document).on('click', '#gen_passport', function(e) { - e.preventDefault(); - if (document.web3network != 'rinkeby' && document.web3network != 'mainnet') { - _alert('Please connect your web3 wallet to mainnet + unlock it', 'danger', 1000); - return; - } - const accounts = web3.eth.getAccounts(); - - $.when(accounts).then((result) => { - const ethAddress = result[0]; - let params = { - 'network': document.web3network, - 'coinbase': ethAddress - }; - - $.get('/passport/', params, function(response) { - let status = response['status']; - - if (status == 'error') { - _alert(response['msg'], 'danger', 5000); - return; - } - - let contract_address = response.contract_address; - let contract_abi = response.contract_abi; - let nonce = response.nonce; - let hash = response.hash; - let tokenURI = response.tokenURI; - var passport = new web3.eth.Contract(contract_abi, contract_address); - - var callback = function(err, txid) { - if (err) { - _alert(err, 'danger', 5000); - return; - } - let url = 'https://etherscan.io/tx/' + txid; - var html = ` - Woo hoo! - Your passport is being generated. View the transaction here. -

- Whats next? -
- 1. Please add the token contract address (` + contract_address + `) as a token to your wallet provider. -
- 2. Use the Trust you've built up on Gitcoin across the dWeb! Learn more at proofofpersonhood.com - `; - - $('.modal-body .subbody').html(html); - $('.modal-dialog').shake(); - }; - - passport.methods.createPassport(tokenURI, hash, nonce).send({from: ethAddress}, callback); - }); - + if (!window.scrollY) { + // scroll to the start of the trust requirements + document.getElementById('gc-trust-manager-app').scrollIntoView({ + behavior: 'smooth' }); - }); + } }); diff --git a/app/assets/v2/js/pages/wallet_address_validation.js b/app/assets/v2/js/pages/wallet_address_validation.js new file mode 100644 index 00000000000..908a359675e --- /dev/null +++ b/app/assets/v2/js/pages/wallet_address_validation.js @@ -0,0 +1,90 @@ + +var validateWalletAddress = function(chainId, address) { + let isValid = true; + + switch (chainId) { + case '1935': // Sia + case '58': // Polkadot + if (address.toLowerCase().startsWith('0x')) { + isValid = false; + } + break; + + case '50': // Xinfin + if (!address.toLowerCase().startsWith('xdc')) { + isValid = false; + } + break; + + case '1995': { + // nervos + const ADDRESS_REGEX = new RegExp('^(ckb){1}[0-9a-zA-Z]{43,92}$'); + const isNervosValid = ADDRESS_REGEX.test(address); + + if (!isNervosValid && !address.toLowerCase().startsWith('0x')) { + isValid = false; + } + break; + } + + case '50797': { + // tezos + const ADDRESS_REGEX = new RegExp('^(tz1|tz2|tz3)[0-9a-zA-Z]{33}$'); + const isTezosValid = ADDRESS_REGEX.test(address); + + if (!isTezosValid) { + isValid = false; + } + break; + } + + case '0': { + // btc + const ADDRESS_REGEX = new RegExp('^[13][a-km-zA-HJ-NP-Z1-9]{25,34}$'); + const BECH32_REGEX = new RegExp('^bc1[ac-hj-np-zAC-HJ-NP-Z02-9]{11,71}$'); + const valid_legacy = ADDRESS_REGEX.test(address); + const valid_segwit = BECH32_REGEX.test(address); + + if (!valid_legacy && !valid_segwit) { + isValid = false; + } + break; + } + + case '600': // Filecoin + if (!address.toLowerCase().startsWith('fil')) { + isValid = false; + } + break; + + case '102':// Zilliqa + if (!address.toLowerCase().startsWith('zil')) { + isValid = false; + } + break; + + case '270895': { + // casper + let addr = address; + + if (!addr.toLowerCase().startsWith('01') && !addr.toLowerCase().startsWith('02')) { + isValid = false; + } + break; + } + + case '1155': { + // cosmos + let addr = address; + + if (!addr.toLowerCase().startsWith('cosmos')) { + isValid = false; + } + break; + } + + // include validation for other chains here + } + + return isValid; +}; diff --git a/app/assets/v2/js/passport/c3ecbcb013ebfa378e82.module.wasm b/app/assets/v2/js/passport/c3ecbcb013ebfa378e82.module.wasm new file mode 100644 index 00000000000..1004e3147b9 Binary files /dev/null and b/app/assets/v2/js/passport/c3ecbcb013ebfa378e82.module.wasm differ diff --git a/app/assets/v2/js/passport/didkit.bundle.js b/app/assets/v2/js/passport/didkit.bundle.js new file mode 100644 index 00000000000..e761e4268d3 --- /dev/null +++ b/app/assets/v2/js/passport/didkit.bundle.js @@ -0,0 +1 @@ +var DIDKit;(()=>{"use strict";var e,n,_,t,r,a,o={192:(e,n,_)=>{_.a(e,(async(e,t)=>{try{_.r(n),_.d(n,{DIDAuth:()=>r.qK,JWKFromTezos:()=>r.MQ,__wbg_append_4d85f35672cbffa7:()=>r.uX,__wbg_arrayBuffer_0e2a43f68a8b3e49:()=>r.PR,__wbg_buffer_5e74a88a1424a2e0:()=>r.rf,__wbg_call_89558c3e96703ca1:()=>r.Z4,__wbg_call_94697a95cb7e239c:()=>r.nD,__wbg_crypto_b8c92eaac23d0d80:()=>r.iY,__wbg_done_982b1c7ac0cbc69d:()=>r.vF,__wbg_fetch_fb26f738d9707b16:()=>r.Xc,__wbg_fetch_fe54824ee845f6b4:()=>r.UT,__wbg_getRandomValues_dd27e6b0652b3236:()=>r.yX,__wbg_getRandomValues_e57c9b75ddead065:()=>r.ae,__wbg_getTime_f8ce0ff902444efb:()=>r.OL,__wbg_get_8bbb82393651dd9c:()=>r.gM,__wbg_globalThis_d61b1f48a57191ae:()=>r.EB,__wbg_global_e7669da72fd7f239:()=>r.Yc,__wbg_has_3850edde6df9191b:()=>r.v6,__wbg_headers_e4204c6775f7b3b4:()=>r.uC,__wbg_instanceof_Response_ea36d565358a42f7:()=>r.cj,__wbg_iterator_4b9cedbeda0c0e30:()=>r.wI,__wbg_length_30803400a8f15c59:()=>r.Zu,__wbg_msCrypto_9ad6677321a08dd8:()=>r.mS,__wbg_new0_57a6a2c2aaed3fc5:()=>r.Of,__wbg_new_226d109446575877:()=>r.FA,__wbg_new_4beacc9c71572250:()=>r.WJ,__wbg_new_d3138911a89329b0:()=>r.LP,__wbg_new_e3b800e570795b3c:()=>r.Ts,__wbg_newnoargs_f579424187aa1717:()=>r.bf,__wbg_newwithbyteoffsetandlength_278ec7532799393a:()=>r.S7,__wbg_newwithlength_5f4ce114a24dfe1e:()=>r._G,__wbg_newwithstrandinit_c07f0662ece15bc6:()=>r.bK,__wbg_next_c7a2a6b012059a5e:()=>r.Q2,__wbg_next_dd1a890d37e38d73:()=>r.re,__wbg_randomFillSync_d2ba53160aec6aba:()=>r.Os,__wbg_require_f5521a5b85ad2542:()=>r.r2,__wbg_resolve_4f8f547f26b30b27:()=>r.Yp,__wbg_self_86b4b13392c7af56:()=>r.U5,__wbg_self_e23d74ae45fb17d1:()=>r.tL,__wbg_set_5b8081e9d002f0df:()=>r.Mz,__wbg_set_c42875065132a932:()=>r.P0,__wbg_static_accessor_MODULE_452b4680e8614c81:()=>r.DA,__wbg_status_3a55bb50e744b834:()=>r.X1,__wbg_stringify_f8bfc9e2d1e8b6a0:()=>r.fp,__wbg_subarray_a68f835ca2af506f:()=>r.kC,__wbg_then_58a04e42527f52c6:()=>r.YI,__wbg_then_a6860c82b90816ca:()=>r.wW,__wbg_url_6e564c9e212456f8:()=>r.U6,__wbg_value_2def2d1fb38b02cd:()=>r.pH,__wbg_window_b4be7f48b24ac56e:()=>r.Qu,__wbindgen_cb_drop:()=>r.G6,__wbindgen_closure_wrapper10701:()=>r.cB,__wbindgen_debug_string:()=>r.fY,__wbindgen_is_function:()=>r.o$,__wbindgen_is_object:()=>r.Wl,__wbindgen_is_undefined:()=>r.XP,__wbindgen_memory:()=>r.oH,__wbindgen_object_clone_ref:()=>r.m_,__wbindgen_object_drop_ref:()=>r.ug,__wbindgen_string_get:()=>r.qt,__wbindgen_string_new:()=>r.h4,__wbindgen_throw:()=>r.Or,completeDelegateCapability:()=>r.T6,completeInvokeCapability:()=>r.Do,completeIssueCredential:()=>r.oN,completeIssuePresentation:()=>r.oV,delegateCapability:()=>r.fc,generateEd25519Key:()=>r.xz,getVersion:()=>r.bo,invokeCapability:()=>r.Ru,issueCredential:()=>r.HR,issuePresentation:()=>r.wk,keyToDID:()=>r.bH,keyToVerificationMethod:()=>r.JO,prepareDelegateCapability:()=>r.m$,prepareInvokeCapability:()=>r.PV,prepareIssueCredential:()=>r.cr,prepareIssuePresentation:()=>r.pY,resolveDID:()=>r.j2,verifyCredential:()=>r.Dv,verifyDelegation:()=>r.Ik,verifyInvocation:()=>r.Tf,verifyInvocationSignature:()=>r.uQ,verifyPresentation:()=>r.hb});var r=_(154),a=e([r]);r=(a.then?(await a)():a)[0],t()}catch(e){t(e)}}))},154:(e,n,_)=>{_.a(e,(async(t,r)=>{try{_.d(n,{DA:()=>ye,Do:()=>L,Dv:()=>M,EB:()=>Ke,FA:()=>re,G6:()=>ee,HR:()=>j,Ik:()=>q,JO:()=>C,LP:()=>Ae,MQ:()=>X,Mz:()=>Le,OL:()=>Me,Of:()=>Ee,Or:()=>nn,Os:()=>De,P0:()=>Ze,PR:()=>ue,PV:()=>H,Q2:()=>Oe,Qu:()=>Ve,Ru:()=>B,S7:()=>Be,T6:()=>$,Tf:()=>J,Ts:()=>He,U5:()=>ge,U6:()=>ce,UT:()=>te,WJ:()=>Ye,Wl:()=>fe,X1:()=>be,XP:()=>me,Xc:()=>_e,YI:()=>We,Yc:()=>$e,Yp:()=>Fe,Z4:()=>je,Zu:()=>Qe,_G:()=>Je,ae:()=>ve,bH:()=>P,bK:()=>de,bf:()=>ke,bo:()=>S,cB:()=>tn,cj:()=>ie,cr:()=>A,fY:()=>en,fc:()=>V,fp:()=>Ne,gM:()=>Ce,h4:()=>N,hb:()=>U,iY:()=>we,j2:()=>T,kC:()=>ze,m$:()=>K,mS:()=>se,m_:()=>ne,nD:()=>Re,o$:()=>Ie,oH:()=>_n,oN:()=>R,oV:()=>F,pH:()=>xe,pY:()=>Y,qK:()=>W,qt:()=>oe,r2:()=>pe,re:()=>Se,rf:()=>qe,tL:()=>Xe,uC:()=>le,uQ:()=>Q,uX:()=>ae,ug:()=>Z,v6:()=>Ge,vF:()=>Te,wI:()=>Pe,wW:()=>Ue,wk:()=>E,xz:()=>x,yX:()=>he});var a=_(356);e=_.hmd(e);var o=t([a]);a=(o.then?(await o)():o)[0];const i=new Array(32).fill(void 0);function c(e){return i[e]}i.push(void 0,null,!0,!1);let b=i.length;function l(e){e<36||(i[e]=b,b=e)}function u(e){const n=c(e);return l(e),n}let d=new("undefined"==typeof TextDecoder?(0,e.require)("util").TextDecoder:TextDecoder)("utf-8",{ignoreBOM:!0,fatal:!0});d.decode();let f=null;function g(){return null!==f&&f.buffer===a.memory.buffer||(f=new Uint8Array(a.memory.buffer)),f}function w(e,n){return d.decode(g().subarray(e,e+n))}function s(e){b===i.length&&i.push(i.length+1);const n=b;return b=i[n],i[n]=e,n}let m=0,y=new("undefined"==typeof TextEncoder?(0,e.require)("util").TextEncoder:TextEncoder)("utf-8");const p="function"==typeof y.encodeInto?function(e,n){return y.encodeInto(e,n)}:function(e,n){const _=y.encode(e);return n.set(_),{read:e.length,written:_.length}};function h(e,n,_){if(void 0===_){const _=y.encode(e),t=n(_.length);return g().subarray(t,t+_.length).set(_),m=_.length,t}let t=e.length,r=n(t);const a=g();let o=0;for(;o127)break;a[r+o]=n}if(o!==t){0!==o&&(e=e.slice(o)),r=_(r,t,t=o+3*e.length);const n=g().subarray(r+o,r+t);o+=p(e,n).written}return m=o,r}let v=null;function D(){return null!==v&&v.buffer===a.memory.buffer||(v=new Int32Array(a.memory.buffer)),v}function I(e){const n=typeof e;if("number"==n||"boolean"==n||null==e)return`${e}`;if("string"==n)return`"${e}"`;if("symbol"==n){const n=e.description;return null==n?"Symbol":`Symbol(${n})`}if("function"==n){const n=e.name;return"string"==typeof n&&n.length>0?`Function(${n})`:"Function"}if(Array.isArray(e)){const n=e.length;let _="[";n>0&&(_+=I(e[0]));for(let t=1;t1))return toString.call(e);if(t=_[1],"Object"==t)try{return"Object("+JSON.stringify(e)+")"}catch(e){return"Object"}return e instanceof Error?`${e.name}: ${e.message}\n${e.stack}`:t}function k(e,n,_,t){const r={a:e,b:n,cnt:1,dtor:_},o=(...e)=>{r.cnt++;const n=r.a;r.a=0;try{return t(n,r.b,...e)}finally{0==--r.cnt?a.__wbindgen_export_2.get(r.dtor)(n,r.b):r.a=n}};return o.original=r,o}function O(e,n,_){a._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h62a2987a816bb9fa(e,n,s(_))}function S(){try{const _=a.__wbindgen_add_to_stack_pointer(-16);a.getVersion(_);var e=D()[_/4+0],n=D()[_/4+1];return w(e,n)}finally{a.__wbindgen_add_to_stack_pointer(16),a.__wbindgen_free(e,n)}}function T(e,n){var _=h(e,a.__wbindgen_malloc,a.__wbindgen_realloc),t=m,r=h(n,a.__wbindgen_malloc,a.__wbindgen_realloc),o=m;return u(a.resolveDID(_,t,r,o))}function x(){try{const i=a.__wbindgen_add_to_stack_pointer(-16);a.generateEd25519Key(i);var e=D()[i/4+0],n=D()[i/4+1],_=D()[i/4+2],t=D()[i/4+3],r=e,o=n;if(t)throw r=0,o=0,u(_);return w(r,o)}finally{a.__wbindgen_add_to_stack_pointer(16),a.__wbindgen_free(r,o)}}function P(e,n){try{const g=a.__wbindgen_add_to_stack_pointer(-16);var _=h(e,a.__wbindgen_malloc,a.__wbindgen_realloc),t=m,r=h(n,a.__wbindgen_malloc,a.__wbindgen_realloc),o=m;a.keyToDID(g,_,t,r,o);var i=D()[g/4+0],c=D()[g/4+1],b=D()[g/4+2],l=D()[g/4+3],d=i,f=c;if(l)throw d=0,f=0,u(b);return w(d,f)}finally{a.__wbindgen_add_to_stack_pointer(16),a.__wbindgen_free(d,f)}}function C(e,n){var _=h(e,a.__wbindgen_malloc,a.__wbindgen_realloc),t=m,r=h(n,a.__wbindgen_malloc,a.__wbindgen_realloc),o=m;return u(a.keyToVerificationMethod(_,t,r,o))}function j(e,n,_){var t=h(e,a.__wbindgen_malloc,a.__wbindgen_realloc),r=m,o=h(n,a.__wbindgen_malloc,a.__wbindgen_realloc),i=m,c=h(_,a.__wbindgen_malloc,a.__wbindgen_realloc),b=m;return u(a.issueCredential(t,r,o,i,c,b))}function A(e,n,_){var t=h(e,a.__wbindgen_malloc,a.__wbindgen_realloc),r=m,o=h(n,a.__wbindgen_malloc,a.__wbindgen_realloc),i=m,c=h(_,a.__wbindgen_malloc,a.__wbindgen_realloc),b=m;return u(a.prepareIssueCredential(t,r,o,i,c,b))}function R(e,n,_){var t=h(e,a.__wbindgen_malloc,a.__wbindgen_realloc),r=m,o=h(n,a.__wbindgen_malloc,a.__wbindgen_realloc),i=m,c=h(_,a.__wbindgen_malloc,a.__wbindgen_realloc),b=m;return u(a.completeIssueCredential(t,r,o,i,c,b))}function M(e,n){var _=h(e,a.__wbindgen_malloc,a.__wbindgen_realloc),t=m,r=h(n,a.__wbindgen_malloc,a.__wbindgen_realloc),o=m;return u(a.verifyCredential(_,t,r,o))}function E(e,n,_){var t=h(e,a.__wbindgen_malloc,a.__wbindgen_realloc),r=m,o=h(n,a.__wbindgen_malloc,a.__wbindgen_realloc),i=m,c=h(_,a.__wbindgen_malloc,a.__wbindgen_realloc),b=m;return u(a.issuePresentation(t,r,o,i,c,b))}function Y(e,n,_){var t=h(e,a.__wbindgen_malloc,a.__wbindgen_realloc),r=m,o=h(n,a.__wbindgen_malloc,a.__wbindgen_realloc),i=m,c=h(_,a.__wbindgen_malloc,a.__wbindgen_realloc),b=m;return u(a.prepareIssuePresentation(t,r,o,i,c,b))}function F(e,n,_){var t=h(e,a.__wbindgen_malloc,a.__wbindgen_realloc),r=m,o=h(n,a.__wbindgen_malloc,a.__wbindgen_realloc),i=m,c=h(_,a.__wbindgen_malloc,a.__wbindgen_realloc),b=m;return u(a.completeIssuePresentation(t,r,o,i,c,b))}function U(e,n){var _=h(e,a.__wbindgen_malloc,a.__wbindgen_realloc),t=m,r=h(n,a.__wbindgen_malloc,a.__wbindgen_realloc),o=m;return u(a.verifyPresentation(_,t,r,o))}function W(e,n,_){var t=h(e,a.__wbindgen_malloc,a.__wbindgen_realloc),r=m,o=h(n,a.__wbindgen_malloc,a.__wbindgen_realloc),i=m,c=h(_,a.__wbindgen_malloc,a.__wbindgen_realloc),b=m;return u(a.DIDAuth(t,r,o,i,c,b))}function X(e){var n=h(e,a.__wbindgen_malloc,a.__wbindgen_realloc),_=m;return u(a.JWKFromTezos(n,_))}function V(e,n,_,t){var r=h(e,a.__wbindgen_malloc,a.__wbindgen_realloc),o=m,i=h(n,a.__wbindgen_malloc,a.__wbindgen_realloc),c=m,b=h(_,a.__wbindgen_malloc,a.__wbindgen_realloc),l=m,d=h(t,a.__wbindgen_malloc,a.__wbindgen_realloc),f=m;return u(a.delegateCapability(r,o,i,c,b,l,d,f))}function K(e,n,_,t){var r=h(e,a.__wbindgen_malloc,a.__wbindgen_realloc),o=m,i=h(n,a.__wbindgen_malloc,a.__wbindgen_realloc),c=m,b=h(_,a.__wbindgen_malloc,a.__wbindgen_realloc),l=m,d=h(t,a.__wbindgen_malloc,a.__wbindgen_realloc),f=m;return u(a.prepareDelegateCapability(r,o,i,c,b,l,d,f))}function $(e,n,_){var t=h(e,a.__wbindgen_malloc,a.__wbindgen_realloc),r=m,o=h(n,a.__wbindgen_malloc,a.__wbindgen_realloc),i=m,c=h(_,a.__wbindgen_malloc,a.__wbindgen_realloc),b=m;return u(a.completeDelegateCapability(t,r,o,i,c,b))}function q(e){var n=h(e,a.__wbindgen_malloc,a.__wbindgen_realloc),_=m;return u(a.verifyDelegation(n,_))}function B(e,n,_,t){var r=h(e,a.__wbindgen_malloc,a.__wbindgen_realloc),o=m,i=h(n,a.__wbindgen_malloc,a.__wbindgen_realloc),c=m,b=h(_,a.__wbindgen_malloc,a.__wbindgen_realloc),l=m,d=h(t,a.__wbindgen_malloc,a.__wbindgen_realloc),f=m;return u(a.invokeCapability(r,o,i,c,b,l,d,f))}function H(e,n,_,t){var r=h(e,a.__wbindgen_malloc,a.__wbindgen_realloc),o=m,i=h(n,a.__wbindgen_malloc,a.__wbindgen_realloc),c=m,b=h(_,a.__wbindgen_malloc,a.__wbindgen_realloc),l=m,d=h(t,a.__wbindgen_malloc,a.__wbindgen_realloc),f=m;return u(a.prepareInvokeCapability(r,o,i,c,b,l,d,f))}function L(e,n,_){var t=h(e,a.__wbindgen_malloc,a.__wbindgen_realloc),r=m,o=h(n,a.__wbindgen_malloc,a.__wbindgen_realloc),i=m,c=h(_,a.__wbindgen_malloc,a.__wbindgen_realloc),b=m;return u(a.completeInvokeCapability(t,r,o,i,c,b))}function Q(e){var n=h(e,a.__wbindgen_malloc,a.__wbindgen_realloc),_=m;return u(a.verifyInvocationSignature(n,_))}function J(e,n){var _=h(e,a.__wbindgen_malloc,a.__wbindgen_realloc),t=m,r=h(n,a.__wbindgen_malloc,a.__wbindgen_realloc),o=m;return u(a.verifyInvocation(_,t,r,o))}function z(e,n){try{return e.apply(this,n)}catch(e){a.__wbindgen_exn_store(s(e))}}function G(e,n,_,t){a.wasm_bindgen__convert__closures__invoke2_mut__h043137bbc47dd3a0(e,n,s(_),s(t))}function Z(e){u(e)}function N(e,n){return s(w(e,n))}function ee(e){const n=u(e).original;return 1==n.cnt--&&(n.a=0,!0)}function ne(e){return s(c(e))}function _e(e){return s(fetch(c(e)))}function te(e,n){return s(c(e).fetch(c(n)))}function re(){return z((function(){return s(new Headers)}),arguments)}function ae(){return z((function(e,n,_,t,r){c(e).append(w(n,_),w(t,r))}),arguments)}function oe(e,n){const _=c(n);var t="string"==typeof _?_:void 0,r=null==t?0:h(t,a.__wbindgen_malloc,a.__wbindgen_realloc),o=m;D()[e/4+1]=o,D()[e/4+0]=r}function ie(e){return c(e)instanceof Response}function ce(e,n){var _=h(c(n).url,a.__wbindgen_malloc,a.__wbindgen_realloc),t=m;D()[e/4+1]=t,D()[e/4+0]=_}function be(e){return c(e).status}function le(e){return s(c(e).headers)}function ue(){return z((function(e){return s(c(e).arrayBuffer())}),arguments)}function de(){return z((function(e,n,_){return s(new Request(w(e,n),c(_)))}),arguments)}function fe(e){const n=c(e);return"object"==typeof n&&null!==n}function ge(){return z((function(){return s(self.self)}),arguments)}function we(e){return s(c(e).crypto)}function se(e){return s(c(e).msCrypto)}function me(e){return void 0===c(e)}function ye(){return s(e)}function pe(e,n,_){return s(c(e).require(w(n,_)))}function he(e){return s(c(e).getRandomValues)}function ve(e,n){c(e).getRandomValues(c(n))}function De(e,n,_){var t,r;c(e).randomFillSync((t=n,r=_,g().subarray(t/1,t/1+r)))}function Ie(e){return"function"==typeof c(e)}function ke(e,n){return s(new Function(w(e,n)))}function Oe(e){return s(c(e).next)}function Se(){return z((function(e){return s(c(e).next())}),arguments)}function Te(e){return c(e).done}function xe(e){return s(c(e).value)}function Pe(){return s(Symbol.iterator)}function Ce(){return z((function(e,n){return s(Reflect.get(c(e),c(n)))}),arguments)}function je(){return z((function(e,n){return s(c(e).call(c(n)))}),arguments)}function Ae(){return s(new Object)}function Re(){return z((function(e,n,_){return s(c(e).call(c(n),c(_)))}),arguments)}function Me(e){return c(e).getTime()}function Ee(){return s(new Date)}function Ye(e,n){try{var _={a:e,b:n},t=new Promise(((e,n)=>{const t=_.a;_.a=0;try{return G(t,_.b,e,n)}finally{_.a=t}}));return s(t)}finally{_.a=_.b=0}}function Fe(e){return s(Promise.resolve(c(e)))}function Ue(e,n){return s(c(e).then(c(n)))}function We(e,n,_){return s(c(e).then(c(n),c(_)))}function Xe(){return z((function(){return s(self.self)}),arguments)}function Ve(){return z((function(){return s(window.window)}),arguments)}function Ke(){return z((function(){return s(globalThis.globalThis)}),arguments)}function $e(){return z((function(){return s(_.g.global)}),arguments)}function qe(e){return s(c(e).buffer)}function Be(e,n,_){return s(new Uint8Array(c(e),n>>>0,_>>>0))}function He(e){return s(new Uint8Array(c(e)))}function Le(e,n,_){c(e).set(c(n),_>>>0)}function Qe(e){return c(e).length}function Je(e){return s(new Uint8Array(e>>>0))}function ze(e,n,_){return s(c(e).subarray(n>>>0,_>>>0))}function Ge(){return z((function(e,n){return Reflect.has(c(e),c(n))}),arguments)}function Ze(){return z((function(e,n,_){return Reflect.set(c(e),c(n),c(_))}),arguments)}function Ne(){return z((function(e){return s(JSON.stringify(c(e)))}),arguments)}function en(e,n){var _=h(I(c(n)),a.__wbindgen_malloc,a.__wbindgen_realloc),t=m;D()[e/4+1]=t,D()[e/4+0]=_}function nn(e,n){throw new Error(w(e,n))}function _n(){return s(a.memory)}function tn(e,n,_){return s(k(e,n,3712,O))}r()}catch(rn){r(rn)}}))},703:(e,n,_)=>{_.a(e,(async(e,t)=>{try{_.d(n,{DIDKit:()=>r});var r=_(192),a=e([r]);r=(a.then?(await a)():a)[0],t()}catch(e){t(e)}}))},356:(e,n,_)=>{_.a(e,(async(t,r)=>{try{var a,o=t([a=_(154)]),[a]=o.then?(await o)():o;await _.v(n,e.id,"c3ecbcb013ebfa378e82",{"./didkit_wasm_bg.js":{__wbindgen_object_drop_ref:a.ug,__wbindgen_string_new:a.h4,__wbindgen_cb_drop:a.G6,__wbindgen_object_clone_ref:a.m_,__wbg_fetch_fb26f738d9707b16:a.Xc,__wbg_fetch_fe54824ee845f6b4:a.UT,__wbg_new_226d109446575877:a.FA,__wbg_append_4d85f35672cbffa7:a.uX,__wbindgen_string_get:a.qt,__wbg_instanceof_Response_ea36d565358a42f7:a.cj,__wbg_url_6e564c9e212456f8:a.U6,__wbg_status_3a55bb50e744b834:a.X1,__wbg_headers_e4204c6775f7b3b4:a.uC,__wbg_arrayBuffer_0e2a43f68a8b3e49:a.PR,__wbg_newwithstrandinit_c07f0662ece15bc6:a.bK,__wbindgen_is_object:a.Wl,__wbg_self_86b4b13392c7af56:a.U5,__wbg_crypto_b8c92eaac23d0d80:a.iY,__wbg_msCrypto_9ad6677321a08dd8:a.mS,__wbindgen_is_undefined:a.XP,__wbg_static_accessor_MODULE_452b4680e8614c81:a.DA,__wbg_require_f5521a5b85ad2542:a.r2,__wbg_getRandomValues_dd27e6b0652b3236:a.yX,__wbg_getRandomValues_e57c9b75ddead065:a.ae,__wbg_randomFillSync_d2ba53160aec6aba:a.Os,__wbindgen_is_function:a.o$,__wbg_newnoargs_f579424187aa1717:a.bf,__wbg_next_c7a2a6b012059a5e:a.Q2,__wbg_next_dd1a890d37e38d73:a.re,__wbg_done_982b1c7ac0cbc69d:a.vF,__wbg_value_2def2d1fb38b02cd:a.pH,__wbg_iterator_4b9cedbeda0c0e30:a.wI,__wbg_get_8bbb82393651dd9c:a.gM,__wbg_call_89558c3e96703ca1:a.Z4,__wbg_new_d3138911a89329b0:a.LP,__wbg_call_94697a95cb7e239c:a.nD,__wbg_getTime_f8ce0ff902444efb:a.OL,__wbg_new0_57a6a2c2aaed3fc5:a.Of,__wbg_new_4beacc9c71572250:a.WJ,__wbg_resolve_4f8f547f26b30b27:a.Yp,__wbg_then_a6860c82b90816ca:a.wW,__wbg_then_58a04e42527f52c6:a.YI,__wbg_self_e23d74ae45fb17d1:a.tL,__wbg_window_b4be7f48b24ac56e:a.Qu,__wbg_globalThis_d61b1f48a57191ae:a.EB,__wbg_global_e7669da72fd7f239:a.Yc,__wbg_buffer_5e74a88a1424a2e0:a.rf,__wbg_newwithbyteoffsetandlength_278ec7532799393a:a.S7,__wbg_new_e3b800e570795b3c:a.Ts,__wbg_set_5b8081e9d002f0df:a.Mz,__wbg_length_30803400a8f15c59:a.Zu,__wbg_newwithlength_5f4ce114a24dfe1e:a._G,__wbg_subarray_a68f835ca2af506f:a.kC,__wbg_has_3850edde6df9191b:a.v6,__wbg_set_c42875065132a932:a.P0,__wbg_stringify_f8bfc9e2d1e8b6a0:a.fp,__wbindgen_debug_string:a.fY,__wbindgen_throw:a.Or,__wbindgen_memory:a.oH,__wbindgen_closure_wrapper10701:a.cB}}),r()}catch(e){r(e)}}),1)}},i={};function c(e){var n=i[e];if(void 0!==n)return n.exports;var _=i[e]={id:e,loaded:!1,exports:{}};return o[e](_,_.exports,c),_.loaded=!0,_.exports}e="function"==typeof Symbol?Symbol("webpack then"):"__webpack_then__",n="function"==typeof Symbol?Symbol("webpack exports"):"__webpack_exports__",_="function"==typeof Symbol?Symbol("webpack error"):"__webpack_error__",t=e=>{e&&(e.forEach((e=>e.r--)),e.forEach((e=>e.r--?e.r++:e())))},r=e=>!--e.r&&e(),a=(e,n)=>e?e.push(n):r(n),c.a=(o,i,c)=>{var b,l,u,d=c&&[],f=o.exports,g=!0,w=!1,s=(n,_,t)=>{w||(w=!0,_.r+=n.length,n.map(((n,r)=>n[e](_,t))),w=!1)},m=new Promise(((e,n)=>{u=n,l=()=>(e(f),t(d),d=0)}));m[n]=f,m[e]=(e,n)=>{if(g)return r(e);b&&s(b,e,n),a(d,e),m.catch(n)},o.exports=m,i((o=>{var i;b=(o=>o.map((o=>{if(null!==o&&"object"==typeof o){if(o[e])return o;if(o.then){var i=[];o.then((e=>{c[n]=e,t(i),i=0}),(e=>{c[_]=e,t(i),i=0}));var c={};return c[e]=(e,n)=>(a(i,e),o.catch(n)),c}}var b={};return b[e]=e=>r(e),b[n]=o,b})))(o);var c=()=>b.map((e=>{if(e[_])throw e[_];return e[n]})),l=new Promise(((e,n)=>{(i=()=>e(c)).r=0,s(b,i,n)}));return i.r?l:c()}),(e=>(e&&u(m[_]=e),l()))),g=!1},c.d=(e,n)=>{for(var _ in n)c.o(n,_)&&!c.o(e,_)&&Object.defineProperty(e,_,{enumerable:!0,get:n[_]})},c.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),c.hmd=e=>((e=Object.create(e)).children||(e.children=[]),Object.defineProperty(e,"exports",{enumerable:!0,set:()=>{throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+e.id)}}),e),c.o=(e,n)=>Object.prototype.hasOwnProperty.call(e,n),c.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},c.v=(e,n,_,t)=>{var r=fetch(c.p+""+_+".module.wasm");return"function"==typeof WebAssembly.instantiateStreaming?WebAssembly.instantiateStreaming(r,t).then((n=>Object.assign(e,n.instance.exports))):r.then((e=>e.arrayBuffer())).then((e=>WebAssembly.instantiate(e,t))).then((n=>Object.assign(e,n.instance.exports)))},c.p=static_url+"v2/js/passport/";var b=c(703);DIDKit=new Promise((e=>b.then((n=>e(n.DIDKit)))))})(); diff --git a/app/assets/v2/js/passport/reader.bundle.js b/app/assets/v2/js/passport/reader.bundle.js new file mode 100644 index 00000000000..b84e11e3678 --- /dev/null +++ b/app/assets/v2/js/passport/reader.bundle.js @@ -0,0 +1 @@ +var PassportReader;(()=>{var e={644:(e,t,r)=>{e.exports=r(308)},353:(e,t,r)=>{"use strict";var n=r(44),o=r(955),i=r(233),s=r(30),a=r(948),u=r(875),c=r(842),f=r(560),l=r(218),p=r(47),h=r(738);e.exports=function(e){return new Promise((function(t,r){var d,m=e.data,v=e.headers,y=e.responseType;function g(){e.cancelToken&&e.cancelToken.unsubscribe(d),e.signal&&e.signal.removeEventListener("abort",d)}n.isFormData(m)&&n.isStandardBrowserEnv()&&delete v["Content-Type"];var b=new XMLHttpRequest;if(e.auth){var w=e.auth.username||"",E=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";v.Authorization="Basic "+btoa(w+":"+E)}var x=a(e.baseURL,e.url);function _(){if(b){var n="getAllResponseHeaders"in b?u(b.getAllResponseHeaders()):null,i={data:y&&"text"!==y&&"json"!==y?b.response:b.responseText,status:b.status,statusText:b.statusText,headers:n,config:e,request:b};o((function(e){t(e),g()}),(function(e){r(e),g()}),i),b=null}}if(b.open(e.method.toUpperCase(),s(x,e.params,e.paramsSerializer),!0),b.timeout=e.timeout,"onloadend"in b?b.onloadend=_:b.onreadystatechange=function(){b&&4===b.readyState&&(0!==b.status||b.responseURL&&0===b.responseURL.indexOf("file:"))&&setTimeout(_)},b.onabort=function(){b&&(r(new l("Request aborted",l.ECONNABORTED,e,b)),b=null)},b.onerror=function(){r(new l("Network Error",l.ERR_NETWORK,e,b,b)),b=null},b.ontimeout=function(){var t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",n=e.transitional||f;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),r(new l(t,n.clarifyTimeoutError?l.ETIMEDOUT:l.ECONNABORTED,e,b)),b=null},n.isStandardBrowserEnv()){var O=(e.withCredentials||c(x))&&e.xsrfCookieName?i.read(e.xsrfCookieName):void 0;O&&(v[e.xsrfHeaderName]=O)}"setRequestHeader"in b&&n.forEach(v,(function(e,t){void 0===m&&"content-type"===t.toLowerCase()?delete v[t]:b.setRequestHeader(t,e)})),n.isUndefined(e.withCredentials)||(b.withCredentials=!!e.withCredentials),y&&"json"!==y&&(b.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&b.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&b.upload&&b.upload.addEventListener("progress",e.onUploadProgress),(e.cancelToken||e.signal)&&(d=function(e){b&&(r(!e||e&&e.type?new p:e),b.abort(),b=null)},e.cancelToken&&e.cancelToken.subscribe(d),e.signal&&(e.signal.aborted?d():e.signal.addEventListener("abort",d))),m||(m=null);var R=h(x);R&&-1===["http","https","file"].indexOf(R)?r(new l("Unsupported protocol "+R+":",l.ERR_BAD_REQUEST,e)):b.send(m)}))}},308:(e,t,r)=>{"use strict";var n=r(44),o=r(95),i=r(215),s=r(937),a=function e(t){var r=new i(t),a=o(i.prototype.request,r);return n.extend(a,i.prototype,r),n.extend(a,r),a.create=function(r){return e(s(t,r))},a}(r(663));a.Axios=i,a.CanceledError=r(47),a.CancelToken=r(89),a.isCancel=r(41),a.VERSION=r(241).version,a.toFormData=r(27),a.AxiosError=r(218),a.Cancel=a.CanceledError,a.all=function(e){return Promise.all(e)},a.spread=r(783),a.isAxiosError=r(587),e.exports=a,e.exports.default=a},89:(e,t,r)=>{"use strict";var n=r(47);function o(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var r=this;this.promise.then((function(e){if(r._listeners){var t,n=r._listeners.length;for(t=0;t{"use strict";var n=r(218);function o(e){n.call(this,null==e?"canceled":e,n.ERR_CANCELED),this.name="CanceledError"}r(44).inherits(o,n,{__CANCEL__:!0}),e.exports=o},41:e=>{"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},215:(e,t,r)=>{"use strict";var n=r(44),o=r(30),i=r(946),s=r(895),a=r(937),u=r(948),c=r(525),f=c.validators;function l(e){this.defaults=e,this.interceptors={request:new i,response:new i}}l.prototype.request=function(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},(t=a(this.defaults,t)).method?t.method=t.method.toLowerCase():this.defaults.method?t.method=this.defaults.method.toLowerCase():t.method="get";var r=t.transitional;void 0!==r&&c.assertOptions(r,{silentJSONParsing:f.transitional(f.boolean),forcedJSONParsing:f.transitional(f.boolean),clarifyTimeoutError:f.transitional(f.boolean)},!1);var n=[],o=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(o=o&&e.synchronous,n.unshift(e.fulfilled,e.rejected))}));var i,u=[];if(this.interceptors.response.forEach((function(e){u.push(e.fulfilled,e.rejected)})),!o){var l=[s,void 0];for(Array.prototype.unshift.apply(l,n),l=l.concat(u),i=Promise.resolve(t);l.length;)i=i.then(l.shift(),l.shift());return i}for(var p=t;n.length;){var h=n.shift(),d=n.shift();try{p=h(p)}catch(e){d(e);break}}try{i=s(p)}catch(e){return Promise.reject(e)}for(;u.length;)i=i.then(u.shift(),u.shift());return i},l.prototype.getUri=function(e){e=a(this.defaults,e);var t=u(e.baseURL,e.url);return o(t,e.params,e.paramsSerializer)},n.forEach(["delete","get","head","options"],(function(e){l.prototype[e]=function(t,r){return this.request(a(r||{},{method:e,url:t,data:(r||{}).data}))}})),n.forEach(["post","put","patch"],(function(e){function t(t){return function(r,n,o){return this.request(a(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:r,data:n}))}}l.prototype[e]=t(),l.prototype[e+"Form"]=t(!0)})),e.exports=l},218:(e,t,r)=>{"use strict";var n=r(44);function o(e,t,r,n,o){Error.call(this),this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),o&&(this.response=o)}n.inherits(o,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var i=o.prototype,s={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED"].forEach((function(e){s[e]={value:e}})),Object.defineProperties(o,s),Object.defineProperty(i,"isAxiosError",{value:!0}),o.from=function(e,t,r,s,a,u){var c=Object.create(i);return n.toFlatObject(e,c,(function(e){return e!==Error.prototype})),o.call(c,e.message,t,r,s,a),c.name=e.name,u&&Object.assign(c,u),c},e.exports=o},946:(e,t,r)=>{"use strict";var n=r(44);function o(){this.handlers=[]}o.prototype.use=function(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1},o.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},o.prototype.forEach=function(e){n.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=o},948:(e,t,r)=>{"use strict";var n=r(192),o=r(762);e.exports=function(e,t){return e&&!n(t)?o(e,t):t}},895:(e,t,r)=>{"use strict";var n=r(44),o=r(556),i=r(41),s=r(663),a=r(47);function u(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new a}e.exports=function(e){return u(e),e.headers=e.headers||{},e.data=o.call(e,e.data,e.headers,e.transformRequest),e.headers=n.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),n.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||s.adapter)(e).then((function(t){return u(e),t.data=o.call(e,t.data,t.headers,e.transformResponse),t}),(function(t){return i(t)||(u(e),t&&t.response&&(t.response.data=o.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},937:(e,t,r)=>{"use strict";var n=r(44);e.exports=function(e,t){t=t||{};var r={};function o(e,t){return n.isPlainObject(e)&&n.isPlainObject(t)?n.merge(e,t):n.isPlainObject(t)?n.merge({},t):n.isArray(t)?t.slice():t}function i(r){return n.isUndefined(t[r])?n.isUndefined(e[r])?void 0:o(void 0,e[r]):o(e[r],t[r])}function s(e){if(!n.isUndefined(t[e]))return o(void 0,t[e])}function a(r){return n.isUndefined(t[r])?n.isUndefined(e[r])?void 0:o(void 0,e[r]):o(void 0,t[r])}function u(r){return r in t?o(e[r],t[r]):r in e?o(void 0,e[r]):void 0}var c={url:s,method:s,data:s,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:u};return n.forEach(Object.keys(e).concat(Object.keys(t)),(function(e){var t=c[e]||i,o=t(e);n.isUndefined(o)&&t!==u||(r[e]=o)})),r}},955:(e,t,r)=>{"use strict";var n=r(218);e.exports=function(e,t,r){var o=r.config.validateStatus;r.status&&o&&!o(r.status)?t(new n("Request failed with status code "+r.status,[n.ERR_BAD_REQUEST,n.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r)):e(r)}},556:(e,t,r)=>{"use strict";var n=r(44),o=r(663);e.exports=function(e,t,r){var i=this||o;return n.forEach(r,(function(r){e=r.call(i,e,t)})),e}},663:(e,t,r)=>{"use strict";var n=r(44),o=r(868),i=r(218),s=r(560),a=r(27),u={"Content-Type":"application/x-www-form-urlencoded"};function c(e,t){!n.isUndefined(e)&&n.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var f,l={transitional:s,adapter:(("undefined"!=typeof XMLHttpRequest||"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(f=r(353)),f),transformRequest:[function(e,t){if(o(t,"Accept"),o(t,"Content-Type"),n.isFormData(e)||n.isArrayBuffer(e)||n.isBuffer(e)||n.isStream(e)||n.isFile(e)||n.isBlob(e))return e;if(n.isArrayBufferView(e))return e.buffer;if(n.isURLSearchParams(e))return c(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString();var r,i=n.isObject(e),s=t&&t["Content-Type"];if((r=n.isFileList(e))||i&&"multipart/form-data"===s){var u=this.env&&this.env.FormData;return a(r?{"files[]":e}:e,u&&new u)}return i||"application/json"===s?(c(t,"application/json"),function(e,t,r){if(n.isString(e))try{return(0,JSON.parse)(e),n.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional||l.transitional,r=t&&t.silentJSONParsing,o=t&&t.forcedJSONParsing,s=!r&&"json"===this.responseType;if(s||o&&n.isString(e)&&e.length)try{return JSON.parse(e)}catch(e){if(s){if("SyntaxError"===e.name)throw i.from(e,i.ERR_BAD_RESPONSE,this,null,this.response);throw e}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:r(684)},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};n.forEach(["delete","get","head"],(function(e){l.headers[e]={}})),n.forEach(["post","put","patch"],(function(e){l.headers[e]=n.merge(u)})),e.exports=l},560:e=>{"use strict";e.exports={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1}},241:e=>{e.exports={version:"0.27.2"}},95:e=>{"use strict";e.exports=function(e,t){return function(){for(var r=new Array(arguments.length),n=0;n{"use strict";var n=r(44);function o(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,r){if(!t)return e;var i;if(r)i=r(t);else if(n.isURLSearchParams(t))i=t.toString();else{var s=[];n.forEach(t,(function(e,t){null!=e&&(n.isArray(e)?t+="[]":e=[e],n.forEach(e,(function(e){n.isDate(e)?e=e.toISOString():n.isObject(e)&&(e=JSON.stringify(e)),s.push(o(t)+"="+o(e))})))})),i=s.join("&")}if(i){var a=e.indexOf("#");-1!==a&&(e=e.slice(0,a)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}},762:e=>{"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},233:(e,t,r)=>{"use strict";var n=r(44);e.exports=n.isStandardBrowserEnv()?{write:function(e,t,r,o,i,s){var a=[];a.push(e+"="+encodeURIComponent(t)),n.isNumber(r)&&a.push("expires="+new Date(r).toGMTString()),n.isString(o)&&a.push("path="+o),n.isString(i)&&a.push("domain="+i),!0===s&&a.push("secure"),document.cookie=a.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},192:e=>{"use strict";e.exports=function(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}},587:(e,t,r)=>{"use strict";var n=r(44);e.exports=function(e){return n.isObject(e)&&!0===e.isAxiosError}},842:(e,t,r)=>{"use strict";var n=r(44);e.exports=n.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");function o(e){var n=e;return t&&(r.setAttribute("href",n),n=r.href),r.setAttribute("href",n),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:"/"===r.pathname.charAt(0)?r.pathname:"/"+r.pathname}}return e=o(window.location.href),function(t){var r=n.isString(t)?o(t):t;return r.protocol===e.protocol&&r.host===e.host}}():function(){return!0}},868:(e,t,r)=>{"use strict";var n=r(44);e.exports=function(e,t){n.forEach(e,(function(r,n){n!==t&&n.toUpperCase()===t.toUpperCase()&&(e[t]=r,delete e[n])}))}},684:e=>{e.exports=null},875:(e,t,r)=>{"use strict";var n=r(44),o=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,r,i,s={};return e?(n.forEach(e.split("\n"),(function(e){if(i=e.indexOf(":"),t=n.trim(e.substr(0,i)).toLowerCase(),r=n.trim(e.substr(i+1)),t){if(s[t]&&o.indexOf(t)>=0)return;s[t]="set-cookie"===t?(s[t]?s[t]:[]).concat([r]):s[t]?s[t]+", "+r:r}})),s):s}},738:e=>{"use strict";e.exports=function(e){var t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}},783:e=>{"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},27:(e,t,r)=>{"use strict";var n=r(44);e.exports=function(e,t){t=t||new FormData;var r=[];function o(e){return null===e?"":n.isDate(e)?e.toISOString():n.isArrayBuffer(e)||n.isTypedArray(e)?"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}return function e(i,s){if(n.isPlainObject(i)||n.isArray(i)){if(-1!==r.indexOf(i))throw Error("Circular reference detected in "+s);r.push(i),n.forEach(i,(function(r,i){if(!n.isUndefined(r)){var a,u=s?s+"."+i:i;if(r&&!s&&"object"==typeof r)if(n.endsWith(i,"{}"))r=JSON.stringify(r);else if(n.endsWith(i,"[]")&&(a=n.toArray(r)))return void a.forEach((function(e){!n.isUndefined(e)&&t.append(u,o(e))}));e(r,u)}})),r.pop()}else t.append(s,o(i))}(e),t}},525:(e,t,r)=>{"use strict";var n=r(241).version,o=r(218),i={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){i[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}}));var s={};i.transitional=function(e,t,r){function i(e,t){return"[Axios v"+n+"] Transitional option '"+e+"'"+t+(r?". "+r:"")}return function(r,n,a){if(!1===e)throw new o(i(n," has been removed"+(t?" in "+t:"")),o.ERR_DEPRECATED);return t&&!s[n]&&(s[n]=!0,console.warn(i(n," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,n,a)}},e.exports={assertOptions:function(e,t,r){if("object"!=typeof e)throw new o("options must be an object",o.ERR_BAD_OPTION_VALUE);for(var n=Object.keys(e),i=n.length;i-- >0;){var s=n[i],a=t[s];if(a){var u=e[s],c=void 0===u||a(u,s,e);if(!0!==c)throw new o("option "+s+" must be "+c,o.ERR_BAD_OPTION_VALUE)}else if(!0!==r)throw new o("Unknown option "+s,o.ERR_BAD_OPTION)}},validators:i}},44:(e,t,r)=>{"use strict";var n,o=r(95),i=Object.prototype.toString,s=(n=Object.create(null),function(e){var t=i.call(e);return n[t]||(n[t]=t.slice(8,-1).toLowerCase())});function a(e){return e=e.toLowerCase(),function(t){return s(t)===e}}function u(e){return Array.isArray(e)}function c(e){return void 0===e}var f=a("ArrayBuffer");function l(e){return null!==e&&"object"==typeof e}function p(e){if("object"!==s(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}var h=a("Date"),d=a("File"),m=a("Blob"),v=a("FileList");function y(e){return"[object Function]"===i.call(e)}var g=a("URLSearchParams");function b(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),u(e))for(var r=0,n=e.length;r0;)s[i=n[o]]||(t[i]=e[i],s[i]=!0);e=Object.getPrototypeOf(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},kindOf:s,kindOfTest:a,endsWith:function(e,t,r){e=String(e),(void 0===r||r>e.length)&&(r=e.length),r-=t.length;var n=e.indexOf(t,r);return-1!==n&&n===r},toArray:function(e){if(!e)return null;var t=e.length;if(c(t))return null;for(var r=new Array(t);t-- >0;)r[t]=e[t];return r},isTypedArray:E,isFileList:v}},245:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{u(n.next(e))}catch(e){i(e)}}function a(e){try{u(n.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}u((n=n.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var r,n,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,n=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0?[4,this.getStreams(i)]:[3,4];case 2:return a=l.sent(),[4,c.call(this,e,a,r)];case 3:e=l.sent(),l.label=4;case 4:return[2,e]}}))}))}t.Tulons=a}},t={},r=function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={exports:{}};return e[n].call(i.exports,i,i.exports,r),i.exports}(245);PassportReader=r.PassportReader})(); \ No newline at end of file diff --git a/app/assets/v2/js/search.js b/app/assets/v2/js/search.js index dd5834c46dc..bbbd7ebfbbb 100644 --- a/app/assets/v2/js/search.js +++ b/app/assets/v2/js/search.js @@ -5,7 +5,20 @@ if (document.getElementById('gc-search')) { data: { term: '', results: [], + page: 0, + total: 0, + perPage: 100, + searchTerm: '', isLoading: false, + isTypeSearchLoading: false, + tabPageCount: { + Profile: 0, + Bounty: 0, + Grant: 0, + Kudos: 0, + Quest: 0, + Page: 0 + }, isDirty: false, currentTab: 0, source_types: [ @@ -25,7 +38,8 @@ if (document.getElementById('gc-search')) { 'Kudos': 'Kudos', 'Quest': 'Quests', 'Page': 'Pages' - } + }, + fetchController: new AbortController() }, mounted() { this.search(); @@ -33,41 +47,163 @@ if (document.getElementById('gc-search')) { created() { this.search(); }, + computed: { + sourceType() { + return this.source_types[this.currentTab]; + }, + currentTotal() { + return this.totals[this.sourceType]; + }, + currentPage() { + const page = this.currentTab > 0 ? this.tabPageCount[this.sourceType] : this.page; + + return page; + }, + hasMoreResults() { + return this.currentPage !== false && this.totals[this.sourceType] && this.page * this.perPage < this.totals[this.sourceType]; + } + }, methods: { init: function() { setTimeout(() => { $('.has-search input[type=text]').focus(); }, 100); }, + loadMoreResults: function() { + if (this.sourceType === 'All') { + this.search(); + return; + } + this.search_type(this.sourceType); + }, + clear: function() { + this.results = []; + this.page = 0; + this.total = 0; + }, dirty: async function(e) { - this.isDirty = true; + // only abort if we're not dirty + if (!this.isDirty) { + // mark as dirty + this.isDirty = true; + // clear state + this.clear(); + // abort previous fetch request + this.fetchController.abort(); + // setup a new AbortController + this.fetchController = new AbortController(); + } + }, + change_tab: function(index, source_type) { + const vm = this; + + vm.currentTab = index; + + if (index > 0) { + vm.tabPageCount[source_type] = 0; + vm.search_type(source_type); + } else { + vm.page = 0; + vm.search(); + } + }, + search_type: async function(type) { + const vm = this; + // use signal to kill fetch req + const { signal } = vm.fetchController; + + + if (vm.isTypeSearchLoading) { + return; + } + + if (vm.term.length >= 3) { + vm.isTypeSearchLoading = true; + fetch( + `/api/v0.1/search/?term=${vm.term}&page=${vm.tabPageCount[type]}&type=${type}`, + { + method: 'GET', + signal: signal + } + ).then((res) => { + res.json().then((response) => { + if (vm.tabPageCount[type] === 0) { + vm.results = response.results; + } else { + vm.results.push(...response.results); + } + vm.isTypeSearchLoading = false; + vm.tabPageCount[type] = response.page; + }); + }).catch(() => { + if (document.current_search == thisDate) { + // clear the results + vm.clear(); + // clear loading states + vm.isTypeSearchLoading = false; + } + }); + } + }, search: async function(e) { - let vm = this; - let thisDate = new Date(); + const vm = this; + vm.currentTab = 0; + // use Date to enforce + const thisDate = new Date(); + // use signal to kill fetch req + const { signal } = vm.fetchController; + + // clear fetch state vm.isDirty = false; - // prevent 2x search at once + + // prevent 2x search at once (ignores second request with same intel) if (vm.isLoading) { return; } - if (vm.term.length >= 4) { + // get results from the api and group + if (vm.term.length >= 3) { + // mark as reloading vm.isLoading = true; + // mark thisDate against component to check for race conditions document.current_search = thisDate; - - const response = await fetchData( - `/api/v0.1/search/?term=${vm.term}`, - 'GET' - ); - // let response = [{"title": "bounty event test cooperative", "description": "https://github.com/danlipert/gitcoin-test/issues/38https://github.com/danlipert/gitcoin-test/issues/38https://github.com/danlipert/gitcoin-test/issues/38https://github.com/danlipert/gitcoin-test/issues/38https://github.com/danlipert/gitcoin-test/issues/38", "full_search": "bounty event test cooperativehttps://github.com/danlipert/gitcoin-test/issues/38https://github.com/danlipert/gitcoin-test/issues/38https://github.com/danlipert/gitcoin-test/issues/38https://github.com/danlipert/gitcoin-test/issues/38https://github.com/danlipert/gitcoin-test/issues/38Bounty", "url": "https://gitcoin.co/issue/danlipert/gitcoin-test/39/2533", "pk": 15138, "img_url": "https://gitcoin.co/dynamic/avatar/danlipert/1", "timestamp": "2020-04-11T10:26:33.327518+00:00", "source_type": "Bounty"}, {"title": "Gitcoin Ambassador", "description": "This Kudos can be awarded only by Gitcoin team, and signifies that one was a Gitcoin ambassador during Fall 2018 and beyond.", "full_search": "Gitcoin AmbassadorThis Kudos can be awarded only by Gitcoin team, and signifies that one was a Gitcoin ambassador during Fall 2018 and beyond.Kudos", "url": "https://gitcoin.co/kudos/486/gitcoin_ambassador", "pk": 94898, "img_url": "https://gitcoin.co/dynamic/kudos/486/gitcoin_ambassador", "timestamp": "2020-04-11T11:32:06.394147+00:00", "source_type": "Kudos"}, {"title": "Gitcoin Genesis", "description": "The Gitcoin Genesis Badge is the rarest of the Gitcoin team badges. Owners of this badge contributed to Gitcoin in a meaningful way in the way-back-when.", "full_search": "Gitcoin GenesisThe Gitcoin Genesis Badge is the rarest of the Gitcoin team badges. Owners of this badge contributed to Gitcoin in a meaningful way in the way-back-when.Kudos", "url": "https://gitcoin.co/kudos/3/gitcoin_genesis", "pk": 94470, "img_url": "https://gitcoin.co/dynamic/kudos/3/gitcoin_genesis", "timestamp": "2020-04-10T17:03:20.171063+00:00", "source_type": "Kudos"}, {"title": "Gitcoin Torchbearer", "description": "For the Gitcoin Grants TorchBearers", "full_search": "Gitcoin TorchbearerFor the Gitcoin Grants TorchBearersKudos", "url": "https://gitcoin.co/kudos/1904/gitcoin_torchbearer", "pk": 94775, "img_url": "https://gitcoin.co/dynamic/kudos/1904/gitcoin_torchbearer", "timestamp": "2020-04-11T11:26:46.881200+00:00", "source_type": "Kudos"}, {"title": "Gitcoin Genesis", "description": "The Gitcoin Genesis Badge is the rarest of the Gitcoin team badges. Owners of this badge contributed to Gitcoin in a meaningful way in the way-back-when.", "full_search": "Gitcoin GenesisThe Gitcoin Genesis Badge is the rarest of the Gitcoin team badges. Owners of this badge contributed to Gitcoin in a meaningful way in the way-back-when.Kudos", "url": "https://gitcoin.co/kudos/53/gitcoin_genesis", "pk": 94915, "img_url": "https://gitcoin.co/dynamic/kudos/53/gitcoin_genesis", "timestamp": "2020-04-11T10:26:48.271323+00:00", "source_type": "Kudos"}, {"title": "Gitcoin Quests 101", "description": "This Quest is an intro to Gitcoin Quests (how meta!)", "full_search": "Gitcoin Quests 101This Quest is an intro to Gitcoin Quests (how meta!)Quest", "url": "https://gitcoin.co/quests/43/gitcoin-quests-101", "pk": 17139, "img_url": "https://gitcoin.co/dynamic/kudos/4550/grants_round_3_contributor_-_futurism_bot", "timestamp": "2020-04-11T15:25:54.813955+00:00", "source_type": "Quest"}, {"title": "gitcoin mock issue", "description": "####gitcoin mock issue\r\n", "full_search": "gitcoin mock issue####gitcoin mock issue\r\nBounty", "url": "https://gitcoin.co/issue/Korridzy/range/1/566", "pk": 12982, "img_url": "https://gitcoin.co/dynamic/avatar/Korridzy/1", "timestamp": "2020-04-11T02:26:36.194393+00:00", "source_type": "Bounty"}, {"title": "Gitcoin Testing", "description": "Testing Gitcoin Functionality with this issue.", "full_search": "Gitcoin TestingTesting Gitcoin Functionality with this issue.Bounty", "url": "https://gitcoin.co/issue/UniBitProject/wallet/18/1476", "pk": 14619, "img_url": "https://gitcoin.co/dynamic/avatar/UniBitProject/1", "timestamp": "2020-04-10T19:26:57.564235+00:00", "source_type": "Bounty"}, {"title": "Gitcoin and StandardBounties 101", "description": "Whats the difference between Gitcoin and StandardBounties?", "full_search": "Gitcoin and StandardBounties 101Whats the difference between Gitcoin and StandardBounties?Quest", "url": "https://gitcoin.co/quests/32/gitcoin-and-standardbounties-101", "pk": 17140, "img_url": "https://gitcoin.co/dynamic/kudos/105/bee_of_all_trades", "timestamp": "2020-04-11T15:25:54.483253+00:00", "source_type": "Quest"}, {"title": "Gitcoin Robot Friend", "description": "This kudos for those who wanna see a gitcoin robot friend", "full_search": "Gitcoin Robot FriendThis kudos for those who wanna see a gitcoin robot friendKudos", "url": "https://gitcoin.co/kudos/12477/gitcoin_robot_friend", "pk": 191834, "img_url": "https://gitcoin.co/dynamic/kudos/12477/gitcoin_robot_friend", "timestamp": "2020-04-08T18:24:39.350902+00:00", "source_type": "Kudos"}]; - - if (document.current_search == thisDate) { - vm.results = groupBySource(response); - } - vm.isLoading = false; + // fetch the response from the api + fetch( + `/api/v0.1/search/?term=${vm.term}&page=${vm.page}`, + { + method: 'GET', + signal: signal + } + ).then((res) => { + if (document.current_search == thisDate) { + res.json().then((response) => { + if (vm.page === 0) { + vm.results = response.results; + } else { + vm.results.push(...response.results); + } + vm.searchTerm = vm.term; + vm.totals = response.totals; + vm.page = response.page; + vm.perPage = response.perPage; + // clear loading states + vm.isLoading = false; + }); + } + }).catch(() => { + if (document.current_search == thisDate) { + // clear the results + vm.clear(); + // clear loading states + vm.isLoading = false; + } + }); } else { - vm.results = {}; + // clear the results + vm.clear(); + // clear loading states vm.isLoading = false; } } @@ -76,18 +212,6 @@ if (document.getElementById('gc-search')) { } document.current_search = new Date(); -const groupBySource = results => { - let grouped_result = {}; - - results.map(result => { - const source_type = result.source_type; - - grouped_result['All'] ? grouped_result['All'].push(result) : grouped_result['All'] = [result]; - grouped_result[source_type] ? grouped_result[source_type].push(result) : grouped_result[source_type] = [result]; - }); - return grouped_result; -}; - $(document).on('click', '.gc-search .dropdown-menu', function(event) { event.stopPropagation(); }); diff --git a/app/assets/v2/js/shared.js b/app/assets/v2/js/shared.js index 2afeaa527a0..be43718cf27 100644 --- a/app/assets/v2/js/shared.js +++ b/app/assets/v2/js/shared.js @@ -1,12 +1,13 @@ +(function() { /* eslint-disable no-console */ /* eslint-disable nonblock-statement-body-position */ // helper functions -/** + /** * * Generates a boostrap modal handler for when a user clicks a link to launch a boostrap modal. * * @param {string} modalUrl - content url for the modal * */ -this.show_modal_handler = (modalUrl) => { + this.show_modal_handler = (modalUrl) => { const url = modalUrl; return (e) => { @@ -19,649 +20,649 @@ this.show_modal_handler = (modalUrl) => { }); e.preventDefault(); }; -}; + }; -/** + /** * how many decimals are allowed in token displays */ -this.token_round_decimals = 3; + this.token_round_decimals = 3; -/** + /** * Validates if input is a valid URL * @param {string} input - Input String */ -this.validURL = function(input) { - var regex = /(([\w]+:)?\/\/)?(([\d\w]|%[a-fA-f\d]{2,2})+(:([\d\w]|%[a-fA-f\d]{2,2})+)?@)?([\d\w][-\d\w]{0,253}[\d\w]\.)+[\w]{2,63}(:[\d]+)?(\/([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)*(\?(&?([-+_~.\d\w]|%[a-fA-f\d]{2,2})=?)*)?(#([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)?/; + this.validURL = function(input) { + var regex = /(([\w]+:)?\/\/)?(([\d\w]|%[a-fA-f\d]{2,2})+(:([\d\w]|%[a-fA-f\d]{2,2})+)?@)?([\d\w][-\d\w]{0,253}[\d\w]\.)+[\w]{2,63}(:[\d]+)?(\/([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)*(\?(&?([-+_~.\d\w]|%[a-fA-f\d]{2,2})=?)*)?(#([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)?/; - return regex.test(input); -}; + return regex.test(input); + }; -/** + /** * Looks for a transaction receipt. If it doesn't find one, it keeps running until it does. * @callback * @param {string} txhash - The transaction hash. * @param {function} f - The function passed into this callback. */ -this.callFunctionWhenTransactionMined = function(txHash, f) { - var transactionReceipt = web3.eth.getTransactionReceipt(txHash, function(error, result) { - if (result) { + this.callFunctionWhenTransactionMined = function(txHash, f) { + var transactionReceipt = web3.eth.getTransactionReceipt(txHash, function(error, result) { + if (result) { + f(); + } else { + setTimeout(function() { + callFunctionWhenTransactionMined(txHash, f); + }, 1000); + } + }); + }; + + + /** + * Looks for web3. Won't call the fucntion until its there + * @callback + * @param {function} f - The function passed into this callback. + */ + this.callFunctionWhenweb3Available = function(f) { + if (typeof document.web3network != 'undefined') { f(); } else { setTimeout(function() { - callFunctionWhenTransactionMined(txHash, f); + callFunctionWhenweb3Available(f); }, 1000); } - }); -}; + }; + this.loading_button = function(button) { + button.prop('disabled', true); + button.prepend(''); + }; -/** - * Looks for web3. Won't call the fucntion until its there - * @callback - * @param {function} f - The function passed into this callback. - */ -this.callFunctionWhenweb3Available = function(f) { - if (typeof document.web3network != 'undefined') { - f(); - } else { - setTimeout(function() { - callFunctionWhenweb3Available(f); - }, 1000); - } -}; + this.cb_address = null; + this.unloading_button = function(button) { + button.prop('disabled', false); + button.removeClass('disabled'); + button.find('img').remove(); + }; -this.loading_button = function(button) { - button.prop('disabled', true); - button.prepend(''); -}; + this.sanitizeHTML = function(str) { + const temp = document.createElement('div'); -this.cb_address = null; -this.unloading_button = function(button) { - button.prop('disabled', false); - button.removeClass('disabled'); - button.find('img').remove(); -}; + temp.textContent = str; + return temp.innerHTML; + }; -this.sanitizeHTML = function(str) { - const temp = document.createElement('div'); + this.sanitizeDict = function(d, keyToIgnore) { + if (typeof d != 'object') { + return d; + } + keys = Object.keys(d); + for (var i = 0; i < keys.length; i++) { + var key = keys[i]; - temp.textContent = str; - return temp.innerHTML; -}; + if (key === keyToIgnore) { + continue; + } -this.sanitizeDict = function(d, keyToIgnore) { - if (typeof d != 'object') { + d[key] = sanitize(d[key]); + } return d; - } - keys = Object.keys(d); - for (var i = 0; i < keys.length; i++) { - var key = keys[i]; + }; - if (key === keyToIgnore) { - continue; + this.sanitizeAPIResults = function(results, keyToIgnore) { + if (results.length >= 1) { + for (let i = 0; i < results.length; i++) { + results[i] = sanitizeDict(results[i], keyToIgnore); + } + return results; } - d[key] = sanitize(d[key]); - } - return d; -}; + return sanitizeDict(results, keyToIgnore); + }; -this.sanitizeAPIResults = function(results, keyToIgnore) { - if (results.length >= 1) { - for (let i = 0; i < results.length; i++) { - results[i] = sanitizeDict(results[i], keyToIgnore); + this.ucwords = function(str) { + return (str + '').replace(/^([a-z])|\s+([a-z])/g, function($1) { + return $1.toUpperCase(); + }); + }; + + this.sanitize = function(str) { + if (typeof str != 'string') { + return str; } - return results; - } + result = DOMPurify.sanitize(str); - return sanitizeDict(results, keyToIgnore); -}; + return result; + }; -this.ucwords = function(str) { - return (str + '').replace(/^([a-z])|\s+([a-z])/g, function($1) { - return $1.toUpperCase(); - }); -}; + this.getFormattedDate = function(date) { + var monthNames = [ + 'January', 'February', 'March', + 'April', 'May', 'June', 'July', + 'August', 'September', 'October', + 'November', 'December' + ]; -this.sanitize = function(str) { - if (typeof str != 'string') { - return str; - } - result = DOMPurify.sanitize(str); - - return result; -}; - -this.getFormattedDate = function(date) { - var monthNames = [ - 'January', 'February', 'March', - 'April', 'May', 'June', 'July', - 'August', 'September', 'October', - 'November', 'December' - ]; - - var day = date.getDate(); - var monthIndex = date.getMonth(); - var year = date.getFullYear(); - - return monthNames[monthIndex] + ' ' + day + ', ' + year; -}; - -this.getTimeFromDate = function(date) { - return date.getHours() + ':' + date.getMinutes(); -}; - -this.waitforWeb3 = function(callback) { - if (document.web3network && document.web3network != 'locked') { - callback(); - } else { - var wait_callback = function() { - waitforWeb3(callback); - }; + var day = date.getDate(); + var monthIndex = date.getMonth(); + var year = date.getFullYear(); - setTimeout(wait_callback, 100); - } -}; - -this.normalizeURL = function(url) { - return url.replace(/\/$/, ''); -}; - -this.timestamp = function() { - return Math.floor(Date.now() / 1000); -}; - - -this.showLoading = function() { - $('.loading').css('display', 'flex'); - $('.nonefound').css('display', 'none'); - $('#primary_view').css('display', 'none'); - $('#actions').css('display', 'none'); - setTimeout(showLoading, 10); -}; - -this.waitingStateActive = function() { - $('.bg-container').show(); - $('.loading_img').addClass('waiting-state '); - $('.waiting_room_entertainment').show(); - $('.issue-url').html('' + document.issueURL + ''); - waitingRoomEntertainment(); -}; - -this.notify_funder = (network, std_bounties_id, data) => { - var request_url = '/actions/bounty/' + network + '/' + std_bounties_id + '/notify/funder_payout_reminder/'; - - showBusyOverlay(); - $.post(request_url, data).then(() => { - hideBusyOverlay(); - _alert({message: gettext('Sent payout reminder')}, 'success'); - $('#notifyFunder a').addClass('disabled'); - return true; - }).fail(() => { - hideBusyOverlay(); - _alert({ message: gettext('got an error. please try again, or contact support@gitcoin.co') }, 'danger'); - }); -}; - -/** Add the current profile to the interested profiles list. */ -this.add_interest = function(bounty_pk, data) { - if (document.interested) { - return; - } + return monthNames[monthIndex] + ' ' + day + ', ' + year; + }; - if (typeof fbq !== 'undefined') { - fbq('trackCustom', 'Start Work'); - } + this.getTimeFromDate = function(date) { + return date.getHours() + ':' + date.getMinutes(); + }; - if (typeof ga !== 'undefined') { - ga('send', 'event', 'Start Work', 'click', 'Bounty Hunter'); - } + this.waitforWeb3 = function(callback) { + if (document.web3network && document.web3network != 'locked') { + callback(); + } else { + var wait_callback = function() { + waitforWeb3(callback); + }; - return mutate_interest(bounty_pk, 'new', data); -}; + setTimeout(wait_callback, 100); + } + }; -/** Remove the current profile from the interested profiles list. */ -this.remove_interest = function(bounty_pk, slash = false) { - if (!document.interested) { - return; - } + this.normalizeURL = function(url) { + return url.replace(/\/$/, ''); + }; - mutate_interest(bounty_pk, 'remove', slash); -}; + this.timestamp = function() { + return Math.floor(Date.now() / 1000); + }; -/** Helper function -- mutates interests in either direction. */ -this.mutate_interest = function(bounty_pk, direction, data) { - var request_url = '/actions/bounty/' + bounty_pk + '/interest/' + direction + '/'; - showBusyOverlay(); - return $.post(request_url, data).then(function(result) { - hideBusyOverlay(); + this.showLoading = function() { + $('.loading').css('display', 'flex'); + $('.nonefound').css('display', 'none'); + $('#primary_view').css('display', 'none'); + $('#actions').css('display', 'none'); + setTimeout(showLoading, 10); + }; - result = sanitizeAPIResults(result); + this.waitingStateActive = function() { + $('.bg-container').show(); + $('.loading_img').addClass('waiting-state '); + $('.waiting_room_entertainment').show(); + $('.issue-url').html('' + document.issueURL + ''); + waitingRoomEntertainment(); + }; - if (result.success) { - if (direction === 'new') { - _alert({ message: result.msg }, 'success'); - $('#interest a').attr('id', 'btn-white'); - return true; - } else if (direction === 'remove') { - _alert({ message: result.msg }, 'success'); - $('#interest a').attr('id', ''); - } + this.notify_funder = (network, std_bounties_id, data) => { + var request_url = '/actions/bounty/' + network + '/' + std_bounties_id + '/notify/funder_payout_reminder/'; - pull_interest_list(bounty_pk); + showBusyOverlay(); + $.post(request_url, data).then(() => { + hideBusyOverlay(); + _alert({message: gettext('Sent payout reminder')}, 'success'); + $('#notifyFunder a').addClass('disabled'); return true; + }).fail(() => { + hideBusyOverlay(); + _alert({ message: gettext('got an error. please try again, or contact support@gitcoin.co') }, 'danger'); + }); + }; + + /** Add the current profile to the interested profiles list. */ + this.add_interest = function(bounty_pk, data) { + if (document.interested) { + return; } - return false; - }).fail(function(result) { - hideBusyOverlay(); - var alertMsg = result && result.responseJSON ? result.responseJSON.error : null; + if (typeof fbq !== 'undefined') { + fbq('trackCustom', 'Start Work'); + } - if (alertMsg === null) { - alertMsg = gettext('Network error. Please reload the page and try again.'); + if (typeof ga !== 'undefined') { + ga('send', 'event', 'Start Work', 'click', 'Bounty Hunter'); } - _alert({ message: alertMsg }, 'danger'); - }); -}; + return mutate_interest(bounty_pk, 'new', data); + }; + /** Remove the current profile from the interested profiles list. */ + this.remove_interest = function(bounty_pk, slash = false) { + if (!document.interested) { + return; + } -this.uninterested = function(bounty_pk, profileId, slash) { - var data = {}; - var success_message = 'Contributor removed from bounty.'; + mutate_interest(bounty_pk, 'remove', slash); + }; - if (slash) { - success_message = 'Contributor removed from bounty and rep dinged'; - data.slashed = true; - } + /** Helper function -- mutates interests in either direction. */ + this.mutate_interest = function(bounty_pk, direction, data) { + var request_url = '/actions/bounty/' + bounty_pk + '/interest/' + direction + '/'; - var request_url = '/actions/bounty/' + bounty_pk + '/interest/' + profileId + '/uninterested/'; + showBusyOverlay(); + return $.post(request_url, data).then(function(result) { + hideBusyOverlay(); - showBusyOverlay(); - $.post(request_url, data, function(result) { - hideBusyOverlay(); + result = sanitizeAPIResults(result); - result = sanitizeAPIResults(result); - if (result.success) { - _alert({ message: gettext(success_message) }, 'success'); - pull_interest_list(bounty_pk); - return true; - } - return false; - }).fail(function(result) { - hideBusyOverlay(); - _alert({ message: gettext('got an error. please try again, or contact support@gitcoin.co') }, 'danger'); - }); -}; + if (result.success) { + if (direction === 'new') { + _alert({ message: result.msg }, 'success'); + $('#interest a').attr('id', 'btn-white'); + return true; + } else if (direction === 'remove') { + _alert({ message: result.msg }, 'success'); + $('#interest a').attr('id', ''); + } -this.extend_expiration = function(bounty_pk, data) { - var request_url = '/actions/bounty/' + bounty_pk + '/extend_expiration/'; + pull_interest_list(bounty_pk); + return true; + } + return false; + }).fail(function(result) { + hideBusyOverlay(); - showBusyOverlay(); - $.post(request_url, data, function(result) { - hideBusyOverlay(); + var alertMsg = result && result.responseJSON ? result.responseJSON.error : null; - result = sanitizeAPIResults(result); - if (result.success) { - _alert({ message: result.msg }, 'success'); - pull_interest_list(bounty_pk); - return true; + if (alertMsg === null) { + alertMsg = gettext('Network error. Please reload the page and try again.'); + } + + _alert({ message: alertMsg }, 'danger'); + }); + }; + + + this.uninterested = function(bounty_pk, profileId, slash) { + var data = {}; + var success_message = 'Contributor removed from bounty.'; + + if (slash) { + success_message = 'Contributor removed from bounty and rep dinged'; + data.slashed = true; } - return false; - }).fail(function(result) { - hideBusyOverlay(); - _alert({ message: gettext('got an error. please try again, or contact support@gitcoin.co') }, 'danger'); - }); -}; + var request_url = '/actions/bounty/' + bounty_pk + '/interest/' + profileId + '/uninterested/'; -/** Pulls the list of interested profiles from the server. */ -this.pull_interest_list = function(bounty_pk, callback) { - document.interested = false; - var uri = '/actions/api/v0.1/bounties/?github_url=' + document.issueURL + '¬_current=1'; - var started = []; + showBusyOverlay(); + $.post(request_url, data, function(result) { + hideBusyOverlay(); - $.get(uri, function(results) { - results = sanitizeAPIResults(results); - const current = results.find(result => result.current_bounty); + result = sanitizeAPIResults(result); + if (result.success) { + _alert({ message: gettext(success_message) }, 'success'); + pull_interest_list(bounty_pk); + return true; + } + return false; + }).fail(function(result) { + hideBusyOverlay(); + _alert({ message: gettext('got an error. please try again, or contact support@gitcoin.co') }, 'danger'); + }); + }; - render_activity(current, results); - if (current.interested) { - var interested = current.interested; + this.extend_expiration = function(bounty_pk, data) { + var request_url = '/actions/bounty/' + bounty_pk + '/extend_expiration/'; - interested.forEach(function(_interested) { - started.push( - profileHtml(_interested.profile.handle) - ); - if (_interested.profile.handle == document.contxt.github_handle) { - document.interested = true; - } - }); - } - if (started.length == 0) { - started.push(''); - } - $('#started_owners_username').html(started); - if (typeof callback != 'undefined') { - callback(document.interested); - } - }); -}; + showBusyOverlay(); + $.post(request_url, data, function(result) { + hideBusyOverlay(); -this.profileHtml = function(handle, name) { - return '' + (name ? name : handle) + ''; -}; + result = sanitizeAPIResults(result); + if (result.success) { + _alert({ message: result.msg }, 'success'); + pull_interest_list(bounty_pk); + return true; + } + return false; + }).fail(function(result) { + hideBusyOverlay(); + _alert({ message: gettext('got an error. please try again, or contact support@gitcoin.co') }, 'danger'); + }); + }; -// Update the list of bounty submitters. -this.update_fulfiller_list = function(bounty_pk) { - fulfillers = []; - $.getJSON('/api/v0.1/bounties/' + bounty_pk, function(data) { - data = sanitizeAPIResults(data); - var fulfillmentList = data.fulfillments; - $.each(fulfillmentList, function(index, value) { - var fulfiller = value; + /** Pulls the list of interested profiles from the server. */ + this.pull_interest_list = function(bounty_pk, callback) { + document.interested = false; + var uri = '/actions/api/v0.1/bounties/?github_url=' + document.issueURL + '¬_current=1'; + var started = []; - fulfillers.push(fulfiller); + $.get(uri, function(results) { + results = sanitizeAPIResults(results); + const current = results.find(result => result.current_bounty); + + render_activity(current, results); + if (current.interested) { + var interested = current.interested; + + interested.forEach(function(_interested) { + started.push( + profileHtml(_interested.profile.handle) + ); + if (_interested.profile.handle == document.contxt.github_handle) { + document.interested = true; + } + }); + } + if (started.length == 0) { + started.push(''); + } + $('#started_owners_username').html(started); + if (typeof callback != 'undefined') { + callback(document.interested); + } }); - var tmpl = $.templates('#submitters'); - var html = tmpl.render(fulfillers); + }; - if (fulfillers.length == 0) { - html = 'No one has submitted work yet.'; - } - $('#submitter_list').html(html); - }); - return fulfillers; -}; -// ETC TODO END - -this.validateEmail = function(email) { - var re = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; - - return re.test(email); -}; - -this.timedifferenceCvrt = function(date) { - return timeDifference(new Date(), new Date(date), false, 60 * 60); -}; - -this.activitytextCvrt = function(activity_type) { - return activity_names[activity_type]; -}; - -this.getParam = function(parameterName) { - var result = null; - var tmp = []; - - location.search - .substr(1) - .split('&') - .forEach(function(item) { - tmp = item.split('='); - if (tmp[0] === parameterName) - result = decodeURIComponent(tmp[1]); + this.profileHtml = function(handle, name) { + return '' + (name ? name : handle) + ''; + }; + + // Update the list of bounty submitters. + this.update_fulfiller_list = function(bounty_pk) { + fulfillers = []; + $.getJSON('/api/v0.1/bounties/' + bounty_pk, function(data) { + data = sanitizeAPIResults(data); + var fulfillmentList = data.fulfillments; + + $.each(fulfillmentList, function(index, value) { + var fulfiller = value; + + fulfillers.push(fulfiller); + }); + var tmpl = $.templates('#submitters'); + var html = tmpl.render(fulfillers); + + if (fulfillers.length == 0) { + html = 'No one has submitted work yet.'; + } + $('#submitter_list').html(html); }); - return result; -}; + return fulfillers; + }; + // ETC TODO END -if ($.views) { - $.views.converters({ - timedifference: timedifferenceCvrt, - activitytext: activitytextCvrt - }); + this.validateEmail = function(email) { + var re = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; -} -this.activity_names = { - new_bounty: gettext('New bounty'), - start_work: gettext('Work started'), - stop_work: gettext('Work stopped'), - work_submitted: gettext('Work submitted'), - work_done: gettext('Work done'), - worker_approved: gettext('Worker approved'), - worker_rejected: gettext('Worker rejected'), - worker_applied: gettext('Worker applied'), - increased_bounty: gettext('Increased funding'), - killed_bounty: gettext('Canceled bounty'), - new_crowdfund: gettext('New crowdfund contribution'), - new_tip: gettext('New tip'), - receive_tip: gettext('Tip received'), - bounty_abandonment_escalation_to_mods: gettext('Escalated for abandonment of bounty'), - bounty_abandonment_warning: gettext('Warned for abandonment of bounty'), - bounty_removed_slashed_by_staff: gettext('Dinged and removed from bounty by staff'), - bounty_removed_by_staff: gettext('Removed from bounty by staff'), - bounty_removed_by_funder: gettext('Removed from bounty by funder'), - bounty_changed: gettext('Bounty details changed') -}; - -this.timeDifference = function(current, previous, remaining, now_threshold_seconds) { - - var elapsed = current - previous; - - if (now_threshold_seconds && (now_threshold_seconds * 1000) > Math.abs(elapsed)) { - return 'now'; - } + return re.test(email); + }; - if (current < previous) { - return 'in ' + timeDifference(previous, current).replace(' ago', ''); - } + this.timedifferenceCvrt = function(date) { + return timeDifference(new Date(), new Date(date), false, 60 * 60); + }; + + this.activitytextCvrt = function(activity_type) { + return activity_names[activity_type]; + }; + + this.getParam = function(parameterName) { + var result = null; + var tmp = []; + + location.search + .substr(1) + .split('&') + .forEach(function(item) { + tmp = item.split('='); + if (tmp[0] === parameterName) + result = decodeURIComponent(tmp[1]); + }); + return result; + }; + + if ($.views) { + $.views.converters({ + timedifference: timedifferenceCvrt, + activitytext: activitytextCvrt + }); - var msPerMinute = 60 * 1000; - var msPerHour = msPerMinute * 60; - var msPerDay = msPerHour * 24; - var msPerMonth = msPerDay * 30; - var msPerYear = msPerDay * 365; - - var amt; - var unit; - - if (elapsed < msPerMinute) { - amt = Math.round(elapsed / 1000); - unit = 'second'; - } else if (elapsed < msPerHour) { - amt = Math.round(elapsed / msPerMinute); - unit = 'minute'; - } else if (elapsed < msPerDay) { - amt = Math.round(elapsed / msPerHour); - unit = 'hour'; - } else if (elapsed < msPerMonth) { - amt = Math.round(elapsed / msPerDay); - unit = 'day'; - } else if (elapsed < msPerYear) { - amt = Math.round(elapsed / msPerMonth); - unit = 'month'; - } else { - amt = Math.round(elapsed / msPerYear); - unit = 'year'; } - var plural = amt != 1 ? 's' : ''; + this.activity_names = { + new_bounty: gettext('New bounty'), + start_work: gettext('Work started'), + stop_work: gettext('Work stopped'), + work_submitted: gettext('Work submitted'), + work_done: gettext('Work done'), + worker_approved: gettext('Worker approved'), + worker_rejected: gettext('Worker rejected'), + worker_applied: gettext('Worker applied'), + increased_bounty: gettext('Increased funding'), + killed_bounty: gettext('Canceled bounty'), + new_crowdfund: gettext('New crowdfund contribution'), + new_tip: gettext('New tip'), + receive_tip: gettext('Tip received'), + bounty_abandonment_escalation_to_mods: gettext('Escalated for abandonment of bounty'), + bounty_abandonment_warning: gettext('Warned for abandonment of bounty'), + bounty_removed_slashed_by_staff: gettext('Dinged and removed from bounty by staff'), + bounty_removed_by_staff: gettext('Removed from bounty by staff'), + bounty_removed_by_funder: gettext('Removed from bounty by funder'), + bounty_changed: gettext('Bounty details changed') + }; - if (remaining) return amt + ' ' + unit + plural; - return amt + ' ' + unit + plural + ' ago'; -}; + this.timeDifference = function(current, previous, remaining, now_threshold_seconds) { -this.attach_change_element_type = function() { - (function($) { - $.fn.changeElementType = function(newType) { - var attrs = {}; + var elapsed = current - previous; - $.each(this[0].attributes, function(idx, attr) { - attrs[attr.nodeName] = attr.nodeValue; - }); + if (now_threshold_seconds && (now_threshold_seconds * 1000) > Math.abs(elapsed)) { + return 'now'; + } - this.replaceWith(function() { - return $('<' + newType + '/>', attrs).append($(this).contents()); - }); - }; - })(jQuery); -}; + if (current < previous) { + return 'in ' + timeDifference(previous, current).replace(' ago', ''); + } -// callbacks that can retrieve various metadata about a github issue URL + var msPerMinute = 60 * 1000; + var msPerHour = msPerMinute * 60; + var msPerDay = msPerHour * 24; + var msPerMonth = msPerDay * 30; + var msPerYear = msPerDay * 365; + + var amt; + var unit; + + if (elapsed < msPerMinute) { + amt = Math.round(elapsed / 1000); + unit = 'second'; + } else if (elapsed < msPerHour) { + amt = Math.round(elapsed / msPerMinute); + unit = 'minute'; + } else if (elapsed < msPerDay) { + amt = Math.round(elapsed / msPerHour); + unit = 'hour'; + } else if (elapsed < msPerMonth) { + amt = Math.round(elapsed / msPerDay); + unit = 'day'; + } else if (elapsed < msPerYear) { + amt = Math.round(elapsed / msPerMonth); + unit = 'month'; + } else { + amt = Math.round(elapsed / msPerYear); + unit = 'year'; + } + var plural = amt != 1 ? 's' : ''; -this.retrieveAmount = function() { - var ele = $('input[name=amount]'); - var target_ele = $('#usd_amount'); + if (remaining) return amt + ' ' + unit + plural; + return amt + ' ' + unit + plural + ' ago'; + }; - if (target_ele.html() == '') { - target_ele.html(''); - } + this.attach_change_element_type = function() { + (function($) { + $.fn.changeElementType = function(newType) { + var attrs = {}; - var amount = $('input[name=amount]').val(); - var address = $('select[name=denomination]').val(); - var denomination = tokenAddressToDetails(address)['name']; - var request_url = '/sync/get_amount?amount=' + amount + '&denomination=' + denomination; + $.each(this[0].attributes, function(idx, attr) { + attrs[attr.nodeName] = attr.nodeValue; + }); - // use cached conv rate if possible. - if (document.conversion_rates && document.conversion_rates[denomination]) { - var usd_amount = amount / document.conversion_rates[denomination]; + this.replaceWith(function() { + return $('<' + newType + '/>', attrs).append($(this).contents()); + }); + }; + })(jQuery); + }; - updateAmountUI(target_ele, usd_amount); - return; - } + // callbacks that can retrieve various metadata about a github issue URL - // if not, use remote one - $.get(request_url, function(results) { - const result = results[0]; + this.retrieveAmount = function() { + var ele = $('input[name=amount]'); + var target_ele = $('#usd_amount'); - // update UI - var usd_amount = result['usdt']; - var conv_rate = amount / usd_amount; + if (target_ele.html() == '') { + target_ele.html(''); + } - updateAmountUI(target_ele, usd_amount); + var amount = $('input[name=amount]').val(); + var address = $('select[name=denomination]').val(); + var denomination = tokenAddressToDetails(address)['name']; + var request_url = '/sync/get_amount?amount=' + amount + '&denomination=' + denomination; - // store conv rate for later in cache - if (typeof document.conversion_rates == 'undefined') { - document.conversion_rates = {}; + // use cached conv rate if possible. + if (document.conversion_rates && document.conversion_rates[denomination]) { + var usd_amount = amount / document.conversion_rates[denomination]; + + updateAmountUI(target_ele, usd_amount); + return; } - document.conversion_rates[denomination] = conv_rate; - }).fail(function() { - target_ele.html(' '); + // if not, use remote one + $.get(request_url, function(results) { + const result = results[0]; + + // update UI + var usd_amount = result['usdt']; + var conv_rate = amount / usd_amount; + + updateAmountUI(target_ele, usd_amount); + + // store conv rate for later in cache + if (typeof document.conversion_rates == 'undefined') { + document.conversion_rates = {}; + } + document.conversion_rates[denomination] = conv_rate; + + }).fail(function() { + target_ele.html(' '); // target_ele.html('Unable to find USDT amount'); - }); -}; + }); + }; -this.updateAmountUI = function(target_ele, usd_amount) { - usd_amount = Math.round(usd_amount * 100) / 100; + this.updateAmountUI = function(target_ele, usd_amount) { + usd_amount = Math.round(usd_amount * 100) / 100; - if (usd_amount > 1000000) { - usd_amount = Math.round(usd_amount / 100000) / 10 + 'm'; - } else if (usd_amount > 1000) { - usd_amount = Math.round(usd_amount / 100) / 10 + 'k'; - } - target_ele.html('Approx: ' + usd_amount + ' USD'); -}; + if (usd_amount > 1000000) { + usd_amount = Math.round(usd_amount / 100000) / 10 + 'm'; + } else if (usd_amount > 1000) { + usd_amount = Math.round(usd_amount / 100) / 10 + 'k'; + } + target_ele.html('Approx: ' + usd_amount + ' USD'); + }; -this.showChoices = (choice_id, selector_id, choices) => { - let html = ''; - let selected_choices = []; + this.showChoices = (choice_id, selector_id, choices) => { + let html = ''; + let selected_choices = []; - for (let i = 0; i < choices.length; i++) { - html += '
  • \ + for (let i = 0; i < choices.length; i++) { + html += '
  • \ ×\ ' + choices[i] + '\
  • '; - } - $(choice_id).html(html); - $('.select2-available__choice').on('click', function() { - selected_choices.push($(this).find('.text').text()); - $(selector_id).val(selected_choices).trigger('change'); - $(this).remove(); - }); -}; - -this.retrieveIssueDetails = function() { - var ele = $('input[name=issueURL]'); - var target_eles = { - 'title': $('input[name=title]'), - 'description': $('textarea[name=description]') + } + $(choice_id).html(html); + $('.select2-available__choice').on('click', function() { + selected_choices.push($(this).find('.text').text()); + $(selector_id).val(selected_choices).trigger('change'); + $(this).remove(); + }); }; - var issue_url = ele.val(); - if (typeof issue_url == 'undefined') { - return; - } - if (issue_url.length < 5 || issue_url.indexOf('github') == -1) { - return; - } - var request_url = '/sync/get_issue_details?url=' + encodeURIComponent(issue_url) + '&token=' + currentProfile.githubToken; - - $.each(target_eles, function(i, ele) { - ele.addClass('loading'); - }); - $('#sync-issue').children('.fas').addClass('fa-spin'); - - $.get(request_url, function(result) { - result = sanitizeAPIResults(result); - if (result['keywords']) { - let keywords = result['keywords']; - - showChoices('#keyword-suggestions', '#keywords', keywords); - $('#keywords').select2({ - placeholder: 'Select tags', - data: keywords, - tags: 'true', - allowClear: true, - tokenSeparators: [ ',', ' ' ] - }).trigger('change'); + this.retrieveIssueDetails = function() { + var ele = $('input[name=issueURL]'); + var target_eles = { + 'title': $('input[name=title]'), + 'description': $('textarea[name=description]') + }; + var issue_url = ele.val(); + if (typeof issue_url == 'undefined') { + return; } - target_eles['title'].val(result['title']); - target_eles['description'].val(result['description']); - $('#no-issue-banner').hide(); - $('#issue-details, #issue-details-edit').show(); + if (issue_url.length < 5 || issue_url.indexOf('github') == -1) { + return; + } + var request_url = '/sync/get_issue_details?url=' + encodeURIComponent(issue_url) + '&token=' + currentProfile.githubToken; - // $('#title--text').html(result['title']); // TODO: Refactor $.each(target_eles, function(i, ele) { - ele.removeClass('loading'); + ele.addClass('loading'); }); - $('#sync-issue').children('.fas').removeClass('fa-spin'); + $('#sync-issue').children('.fas').addClass('fa-spin'); - }).fail(function() { - $.each(target_eles, function(i, ele) { - ele.removeClass('loading'); - }); - }); -}; + $.get(request_url, function(result) { + result = sanitizeAPIResults(result); + if (result['keywords']) { + let keywords = result['keywords']; + + showChoices('#keyword-suggestions', '#keywords', keywords); + $('#keywords').select2({ + placeholder: 'Select tags', + data: keywords, + tags: 'true', + allowClear: true, + tokenSeparators: [ ',', ' ' ] + }).trigger('change'); + } + target_eles['title'].val(result['title']); + target_eles['description'].val(result['description']); + $('#no-issue-banner').hide(); + $('#issue-details, #issue-details-edit').show(); + + // $('#title--text').html(result['title']); // TODO: Refactor + $.each(target_eles, function(i, ele) { + ele.removeClass('loading'); + }); + $('#sync-issue').children('.fas').removeClass('fa-spin'); + + }).fail(function() { + $.each(target_eles, function(i, ele) { + ele.removeClass('loading'); + }); + }); + }; -this.randomElement = array => { - const length = array.length; - const randomNumber = Math.random(); - const randomIndex = Math.floor(randomNumber * length); - return array[randomIndex]; -}; + this.randomElement = array => { + const length = array.length; + const randomNumber = Math.random(); + const randomIndex = Math.floor(randomNumber * length); -this.getNetwork = function(id) { - var networks = { - '1': 'mainnet', - '2': 'morden', - '3': 'ropsten', - '4': 'rinkeby', - '42': 'kovan' + return array[randomIndex]; }; - return networks[id] || 'custom network'; -}; + this.getNetwork = function(id) { + var networks = { + '1': 'mainnet', + '2': 'morden', + '3': 'ropsten', + '4': 'rinkeby', + '42': 'kovan' + }; + + return networks[id] || 'custom network'; + }; -this.actions_page_warn_if_not_on_same_network = function() { - var user_network = document.web3network; + this.actions_page_warn_if_not_on_same_network = function() { + var user_network = document.web3network; - if (user_network === 'locked') { + if (user_network === 'locked') { // handled by the unlock MetaMask banner - return; - } + return; + } - if (typeof user_network == 'undefined') { - user_network = 'no network'; - } - var bounty_network = $('input[name=network]').val(); + if (typeof user_network == 'undefined') { + user_network = 'no network'; + } + var bounty_network = $('input[name=network]').val(); - if (bounty_network != user_network) { - var msg = 'Warning: You are on ' + + if (bounty_network != user_network) { + var msg = 'Warning: You are on ' + user_network + ' and this bounty is on the ' + bounty_network + @@ -669,216 +670,216 @@ this.actions_page_warn_if_not_on_same_network = function() { bounty_network + ' network.'; - _alert({ message: gettext(msg) }, 'danger'); - } -}; + _alert({ message: gettext(msg) }, 'danger'); + } + }; -attach_change_element_type(); + attach_change_element_type(); -this.setUsdAmount = function(givenDenomination, approx = true) { - const amount = $('input[name=amount]').val(); - const denomination = givenDenomination || $('#token option:selected').text(); + this.setUsdAmount = function(givenDenomination, approx = true) { + const amount = $('input[name=amount]').val(); + const denomination = givenDenomination || $('#token option:selected').text(); - getUSDEstimate(amount, denomination, function(estimate) { + getUSDEstimate(amount, denomination, function(estimate) { - const key = approx ? 'value' : 'value_unrounded'; + const key = approx ? 'value' : 'value_unrounded'; - if (estimate[key]) { - $('#usd-amount-wrapper').show(); - $('#usd_amount_text').show(); + if (estimate[key]) { + $('#usd-amount-wrapper').show(); + $('#usd_amount_text').show(); - $('#usd_amount').val(estimate[key]); - $('#usd_amount_text').html(estimate['rate_text']); - $('#usd_amount').removeAttr('disabled'); - } else { - $('#usd-amount-wrapper').hide(); - $('#usd_amount_text').hide(); + $('#usd_amount').val(estimate[key]); + $('#usd_amount_text').html(estimate['rate_text']); + $('#usd_amount').removeAttr('disabled'); + } else { + $('#usd-amount-wrapper').hide(); + $('#usd_amount_text').hide(); - $('#usd_amount_text').html(''); - $('#usd_amount').prop('disabled', true); - $('#usd_amount').val(''); - } - }); -}; + $('#usd_amount_text').html(''); + $('#usd_amount').prop('disabled', true); + $('#usd_amount').val(''); + } + }); + }; -this.usdToAmount = function(usdAmount, givenDenomination) { - const denomination = givenDenomination || $('#token option:selected').text(); + this.usdToAmount = function(usdAmount, givenDenomination) { + const denomination = givenDenomination || $('#token option:selected').text(); - getAmountEstimate(usdAmount, denomination, function(amountEstimate) { - if (amountEstimate['value']) { - $('#amount').val(amountEstimate['value']); - $('#usd_amount_text').html(amountEstimate['rate_text']); - } - }); -}; + getAmountEstimate(usdAmount, denomination, function(amountEstimate) { + if (amountEstimate['value']) { + $('#amount').val(amountEstimate['value']); + $('#usd_amount_text').html(amountEstimate['rate_text']); + } + }); + }; -this.renderBountyRowsFromResults = function(results, renderForExplorer) { - let html = ''; - const tmpl = $.templates('#result'); + this.renderBountyRowsFromResults = function(results, renderForExplorer) { + let html = ''; + const tmpl = $.templates('#result'); - if (results.length === 0) { - return html; - } + if (results.length === 0) { + return html; + } - for (var i = 0; i < results.length; i++) { - const result = results[i]; - const relatedTokenDetails = tokenAddressToDetailsByNetwork(result['token_address'], result['network']); - let decimals = 18; + for (var i = 0; i < results.length; i++) { + const result = results[i]; + const relatedTokenDetails = tokenAddressToDetailsByNetwork(result['token_address'], result['network']); + let decimals = 18; - if (relatedTokenDetails && relatedTokenDetails.decimals) { - decimals = relatedTokenDetails.decimals; - } + if (relatedTokenDetails && relatedTokenDetails.decimals) { + decimals = relatedTokenDetails.decimals; + } - result['rounded_amount'] = normalizeAmount(result['value_in_token'], decimals); + result['rounded_amount'] = normalizeAmount(result['value_in_token'], decimals); - const crowdfunding = result['additional_funding_summary']; + const crowdfunding = result['additional_funding_summary']; - if (crowdfunding) { - const tokenDecimals = 3; - const dollarDecimals = 2; - const tokens = Object.keys(crowdfunding); - let usdValue = 0.0; + if (crowdfunding) { + const tokenDecimals = 3; + const dollarDecimals = 2; + const tokens = Object.keys(crowdfunding); + let usdValue = 0.0; - if (tokens.length) { - const obj = {}; + if (tokens.length) { + const obj = {}; - while (tokens.length) { - const tokenName = tokens.shift(); - const tokenObj = crowdfunding[tokenName]; - const amount = tokenObj['amount']; - const ratio = tokenObj['ratio']; + while (tokens.length) { + const tokenName = tokens.shift(); + const tokenObj = crowdfunding[tokenName]; + const amount = tokenObj['amount']; + const ratio = tokenObj['ratio']; - obj[tokenName] = + obj[tokenName] = normalizeAmount(amount, tokenDecimals); - usdValue += amount * ratio; + usdValue += amount * ratio; + } + result['tokens'] = obj; } - result['tokens'] = obj; - } - if (usdValue && result['value_in_usdt']) { - result['value_in_usdt'] = + if (usdValue && result['value_in_usdt']) { + result['value_in_usdt'] = normalizeAmount( parseFloat(result['value_in_usdt']) + usdValue, dollarDecimals ); + } } - } - const dateNow = new Date(); - const dateExpires = new Date(result['expires_date']); - const isExpired = dateExpires < dateNow && !result['is_open']; - const isInfinite = dateExpires - new Date().setFullYear(new Date().getFullYear() + 1) > 1; - const projectType = ucwords(result['project_type']) + ' '; - - result['action'] = result['url']; - result['title'] = result['title'] ? result['title'] : result['github_url']; - result['p'] = projectType + (result['experience_level'] ? (result['experience_level'] + ' ') : ''); - result['expired'] = ''; - - if (result['status'] === 'done') { - result['p'] += 'Done'; - if (result['fulfillment_accepted_on']) { - result['p'] += ' ' + timeDifference(dateNow, new Date(result['fulfillment_accepted_on']), false, 60 * 60); - } - } else if (result['status'] === 'started') { - result['p'] += 'Started'; - if (result['fulfillment_started_on']) { - result['p'] += ' ' + timeDifference(dateNow, new Date(result['fulfillment_started_on']), false, 60 * 60); - } - } else if (result['status'] === 'submitted') { - result['p'] += 'Submitted'; - if (result['fulfillment_submitted_on']) { - result['p'] += ' ' + timeDifference(dateNow, new Date(result['fulfillment_submitted_on']), false, 60 * 60); - } - } else if (result['status'] == 'cancelled') { - result['p'] += 'Cancelled'; - if (result['canceled_on']) { - result['p'] += ' ' + timeDifference(dateNow, new Date(result['canceled_on']), false, 60 * 60); - } - } else if (isExpired) { - const timeAgo = timeDifference(dateNow, dateExpires, true); + const dateNow = new Date(); + const dateExpires = new Date(result['expires_date']); + const isExpired = dateExpires < dateNow && !result['is_open']; + const isInfinite = dateExpires - new Date().setFullYear(new Date().getFullYear() + 1) > 1; + const projectType = ucwords(result['project_type']) + ' '; + + result['action'] = result['url']; + result['title'] = result['title'] ? result['title'] : result['github_url']; + result['p'] = projectType + (result['experience_level'] ? (result['experience_level'] + ' ') : ''); + result['expired'] = ''; + + if (result['status'] === 'done') { + result['p'] += 'Done'; + if (result['fulfillment_accepted_on']) { + result['p'] += ' ' + timeDifference(dateNow, new Date(result['fulfillment_accepted_on']), false, 60 * 60); + } + } else if (result['status'] === 'started') { + result['p'] += 'Started'; + if (result['fulfillment_started_on']) { + result['p'] += ' ' + timeDifference(dateNow, new Date(result['fulfillment_started_on']), false, 60 * 60); + } + } else if (result['status'] === 'submitted') { + result['p'] += 'Submitted'; + if (result['fulfillment_submitted_on']) { + result['p'] += ' ' + timeDifference(dateNow, new Date(result['fulfillment_submitted_on']), false, 60 * 60); + } + } else if (result['status'] == 'cancelled') { + result['p'] += 'Cancelled'; + if (result['canceled_on']) { + result['p'] += ' ' + timeDifference(dateNow, new Date(result['canceled_on']), false, 60 * 60); + } + } else if (isExpired) { + const timeAgo = timeDifference(dateNow, dateExpires, true); - result['expired'] += ('Expired ' + timeAgo + ' ago'); - } else { - const openedWhen = timeDifference(dateNow, new Date(result['web3_created']), true); + result['expired'] += ('Expired ' + timeAgo + ' ago'); + } else { + const openedWhen = timeDifference(dateNow, new Date(result['web3_created']), true); - if (isInfinite) { - const expiredExpires = 'Never expires'; + if (isInfinite) { + const expiredExpires = 'Never expires'; - result['p'] += ('Opened ' + openedWhen + ' ago'); - result['expired'] += (expiredExpires); - } else { - const timeLeft = timeDifference(dateNow, dateExpires); - const expiredExpires = dateNow < dateExpires ? 'Expires' : 'Expired'; + result['p'] += ('Opened ' + openedWhen + ' ago'); + result['expired'] += (expiredExpires); + } else { + const timeLeft = timeDifference(dateNow, dateExpires); + const expiredExpires = dateNow < dateExpires ? 'Expires' : 'Expired'; - result['p'] += ('Opened ' + openedWhen + ' ago'); - result['expired'] += (expiredExpires + ' ' + timeLeft); + result['p'] += ('Opened ' + openedWhen + ' ago'); + result['expired'] += (expiredExpires + ' ' + timeLeft); + } } - } - if (renderForExplorer) { + if (renderForExplorer) { - if (web3 && typeof web3 != 'undefined' && typeof web3.eth != 'undefined' && cb_address == result['bounty_owner_address']) { - result['my_bounty'] = 'mine'; - } else if (result['fulfiller_address'] !== '0x0000000000000000000000000000000000000000') { - result['my_bounty'] = '' + result['status'] + ''; + if (web3 && typeof web3 != 'undefined' && typeof web3.eth != 'undefined' && cb_address == result['bounty_owner_address']) { + result['my_bounty'] = 'mine'; + } else if (result['fulfiller_address'] !== '0x0000000000000000000000000000000000000000') { + result['my_bounty'] = '' + result['status'] + ''; + } + + result['watch'] = 'Watch'; + } else { + result['hidden'] = (i > 4); } - result['watch'] = 'Watch'; - } else { - result['hidden'] = (i > 4); + html += tmpl.render(result); } + return html; + }; - html += tmpl.render(result); - } - return html; -}; - -this.saveAttestationData = (result, cost_eth, to_address, type) => { - let request_url = '/revenue/attestations/new'; - let txid = result; - let data = { - 'txid': txid, - 'amount': cost_eth, - 'network': document.web3network, - 'from_address': cb_address, - 'to_address': to_address, - 'type': type - }; - - $.post(request_url, data).then(function(result) { - _alert('Success ✅ Loading your purchase now.', 'success'); - }); -}; - -this.renderFeaturedBountiesFromResults = (results, renderForExplorer) => { - let html = ''; - const tmpl = $.templates('#featured-card'); + this.saveAttestationData = (result, cost_eth, to_address, type) => { + let request_url = '/revenue/attestations/new'; + let txid = result; + let data = { + 'txid': txid, + 'amount': cost_eth, + 'network': document.web3network, + 'from_address': cb_address, + 'to_address': to_address, + 'type': type + }; - if (results.length === 0) { - return html; - } + $.post(request_url, data).then(function(result) { + _alert('Success ✅ Loading your purchase now.', 'success'); + }); + }; - for (let i = 0; i < results.length; i++) { - const result = results[i]; - let decimals = 18; - const relatedTokenDetails = tokenAddressToDetailsByNetwork(result['token_address'], result['network']); + this.renderFeaturedBountiesFromResults = (results, renderForExplorer) => { + let html = ''; + const tmpl = $.templates('#featured-card'); - if (relatedTokenDetails && relatedTokenDetails.decimals) { - decimals = relatedTokenDetails.decimals; - } - if (result.metadata && result.metadata.hypercharge_mode) { - result['url'] = `${result['url']}?utm_source=hypercharge-auto-hack-explorer&utm_medium=gitcoin&utm_campaign=${result['title']}`; + if (results.length === 0) { + return html; } - result['rounded_amount'] = normalizeAmount(result['value_in_token'], decimals); + for (let i = 0; i < results.length; i++) { + const result = results[i]; + let decimals = 18; + const relatedTokenDetails = tokenAddressToDetailsByNetwork(result['token_address'], result['network']); - html += tmpl.render(result); - } - return html; -}; + if (relatedTokenDetails && relatedTokenDetails.decimals) { + decimals = relatedTokenDetails.decimals; + } + if (result.metadata && result.metadata.hypercharge_mode) { + result['url'] = `${result['url']}?utm_source=hypercharge-auto-hack-explorer&utm_medium=gitcoin&utm_campaign=${result['title']}`; + } -/** + result['rounded_amount'] = normalizeAmount(result['value_in_token'], decimals); + + html += tmpl.render(result); + } + return html; + }; + + /** * Fetches results from the API and paints them onto the target element * * params - query params for bounty API @@ -887,272 +888,272 @@ this.renderFeaturedBountiesFromResults = (results, renderForExplorer) => { * * TODO: refactor explorer to reuse this */ -this.fetchBountiesAndAddToList = function(params, target, limit, additional_callback) { - $.get('/api/v0.1/bounties/?' + params, function(results) { - results = sanitizeAPIResults(results); - - var html = renderBountyRowsFromResults(results); - - if (html) { - $(target).prepend(html); - $(target).removeClass('profile-bounties--loading'); + this.fetchBountiesAndAddToList = function(params, target, limit, additional_callback) { + $.get('/api/v0.1/bounties/?' + params, function(results) { + results = sanitizeAPIResults(results); + + var html = renderBountyRowsFromResults(results); + + if (html) { + $(target).prepend(html); + $(target).removeClass('profile-bounties--loading'); + + if (limit) { + results = results.slice(0, limit); + } else if (results.length > 5) { + var $button = $(target + ' .profile-bounties__btn-show-all'); + + $button.removeClass('hidden'); + $button.on('click', function(event) { + $(this).remove(); + $(target + ' .bounty_row').removeClass('bounty_row--hidden'); + }); + } - if (limit) { - results = results.slice(0, limit); - } else if (results.length > 5) { - var $button = $(target + ' .profile-bounties__btn-show-all'); + $('div.bounty_row.result').each(function() { + var href = $(this).attr('href'); - $button.removeClass('hidden'); - $button.on('click', function(event) { - $(this).remove(); - $(target + ' .bounty_row').removeClass('bounty_row--hidden'); + if (typeof $(this).changeElementType !== 'undefined') { + $(this).changeElementType('a'); + } + $(this).attr('href', href); }); + } else { + console.log($(target).parent().closest('.container').addClass('hidden')); } + if (typeof additional_callback != 'undefined') { + additional_callback(results); + } + }); + }; - $('div.bounty_row.result').each(function() { - var href = $(this).attr('href'); + this.showBusyOverlay = function() { + let overlay = document.querySelector('.busyOverlay'); - if (typeof $(this).changeElementType !== 'undefined') { - $(this).changeElementType('a'); - } - $(this).attr('href', href); - }); - } else { - console.log($(target).parent().closest('.container').addClass('hidden')); - } - if (typeof additional_callback != 'undefined') { - additional_callback(results); + if (overlay) { + overlay.style['display'] = 'block'; + overlay.style['animation-name'] = 'fadeIn'; + $(overlay).fadeIn('slow'); + return; } - }); -}; -this.showBusyOverlay = function() { - let overlay = document.querySelector('.busyOverlay'); + overlay = document.createElement('div'); + overlay.className = 'busyOverlay'; + overlay.addEventListener( + 'animationend', + function() { + if (overlay.style['animation-name'] === 'fadeOut') { + overlay.style['display'] = 'none'; + } + }, + false + ); + document.body.appendChild(overlay); + }; - if (overlay) { - overlay.style['display'] = 'block'; - overlay.style['animation-name'] = 'fadeIn'; - $(overlay).fadeIn('slow'); - return; - } + this.hideBusyOverlay = function() { + let overlay = document.querySelector('.busyOverlay'); - overlay = document.createElement('div'); - overlay.className = 'busyOverlay'; - overlay.addEventListener( - 'animationend', - function() { - if (overlay.style['animation-name'] === 'fadeOut') { - overlay.style['display'] = 'none'; - } - }, - false - ); - document.body.appendChild(overlay); -}; - -this.hideBusyOverlay = function() { - let overlay = document.querySelector('.busyOverlay'); - - if (overlay) { - setTimeout(function() { - $(overlay).fadeOut('slow'); - overlay.style['animation-name'] = 'fadeOut'; - }, 300); - } -}; + if (overlay) { + setTimeout(function() { + $(overlay).fadeOut('slow'); + overlay.style['animation-name'] = 'fadeOut'; + }, 300); + } + }; -this.toggleExpandableBounty = function(evt, selector) { - evt.preventDefault(); + this.toggleExpandableBounty = function(evt, selector) { + evt.preventDefault(); - if (evt.target.id === 'expanded') { - evt.target.id = ''; - } else { - evt.target.id = 'expanded'; - } + if (evt.target.id === 'expanded') { + evt.target.id = ''; + } else { + evt.target.id = 'expanded'; + } - var container = document.body.querySelector(selector).querySelector('.expandable'); + var container = document.body.querySelector(selector).querySelector('.expandable'); - if (container) { - if (container.id === 'expanded') { - container.id = ''; - evt.target.id = ''; - return; + if (container) { + if (container.id === 'expanded') { + container.id = ''; + evt.target.id = ''; + return; + } + container.id = 'expanded'; + evt.target.id = 'expanded'; } - container.id = 'expanded'; - evt.target.id = 'expanded'; - } -}; + }; -this.normalizeAmount = function(amount, decimals) { - return Math.round((parseInt(amount) / Math.pow(10, decimals)) * 1000) / 1000; -}; + this.normalizeAmount = function(amount, decimals) { + return Math.round((parseInt(amount) / Math.pow(10, decimals)) * 1000) / 1000; + }; -this.round = function(amount, decimals) { - return Math.round(((amount) * Math.pow(10, decimals))) / Math.pow(10, decimals); -}; + this.round = function(amount, decimals) { + return Math.round(((amount) * Math.pow(10, decimals))) / Math.pow(10, decimals); + }; -this.newTokenTag = function(amount, tokenName, tooltipInfo, isCrowdfunded) { - const ele = document.createElement('div'); - const p = document.createElement('p'); - const span = document.createElement('span'); + this.newTokenTag = function(amount, tokenName, tooltipInfo, isCrowdfunded) { + const ele = document.createElement('div'); + const p = document.createElement('p'); + const span = document.createElement('span'); - ele.className = 'tag token'; - span.innerHTML = amount + ' ' + tokenName + + ele.className = 'tag token'; + span.innerHTML = amount + ' ' + tokenName + (isCrowdfunded ? '' : ''); - p.className = 'inner-tooltip'; - p.appendChild(span); - ele.appendChild(p); - if (tooltipInfo) { - ele.title = tooltipInfo; - } + p.className = 'inner-tooltip'; + p.appendChild(span); + ele.appendChild(p); + if (tooltipInfo) { + ele.title = tooltipInfo; + } - return ele; -}; + return ele; + }; -this.shuffleArray = function(array) { - for (let i = array.length - 1; i > 0; i--) { - const j = Math.floor(Math.random() * (i + 1)); + this.shuffleArray = function(array) { + for (let i = array.length - 1; i > 0; i--) { + const j = Math.floor(Math.random() * (i + 1)); - [ array[i], array[j] ] = [ array[j], array[i] ]; - } - return array; -}; + [ array[i], array[j] ] = [ array[j], array[i] ]; + } + return array; + }; -this.getAllUrlParams = () => { + this.getAllUrlParams = () => { - // get query string from url (optional) or window - var queryString = window.location.search.slice(1); + // get query string from url (optional) or window + var queryString = window.location.search.slice(1); - // we'll store the parameters here - var obj = {}; + // we'll store the parameters here + var obj = {}; - // if query string exists - if (queryString) { + // if query string exists + if (queryString) { - // stuff after # is not part of query string, so get rid of it - queryString = queryString.split('#')[0]; + // stuff after # is not part of query string, so get rid of it + queryString = queryString.split('#')[0]; - // split our query string into its component parts - var arr = queryString.split('&'); + // split our query string into its component parts + var arr = queryString.split('&'); - for (var i = 0; i < arr.length; i++) { + for (var i = 0; i < arr.length; i++) { // separate the keys and the values - var a = arr[i].split('='); + var a = arr[i].split('='); - // set parameter name and value (use 'true' if empty) - var paramName = a[0]; - var paramValue = typeof (a[1]) === 'undefined' ? true : a[1]; + // set parameter name and value (use 'true' if empty) + var paramName = a[0]; + var paramValue = typeof (a[1]) === 'undefined' ? true : a[1]; - // (optional) keep case consistent - paramName = paramName.toLowerCase(); - if (typeof paramValue === 'string') paramValue = paramValue.toLowerCase(); + // (optional) keep case consistent + paramName = paramName.toLowerCase(); + if (typeof paramValue === 'string') paramValue = paramValue.toLowerCase(); - // if the paramName ends with square brackets, e.g. colors[] or colors[2] - if (paramName.match(/\[(\d+)?\]$/)) { + // if the paramName ends with square brackets, e.g. colors[] or colors[2] + if (paramName.match(/\[(\d+)?\]$/)) { - // create key if it doesn't exist - var key = paramName.replace(/\[(\d+)?\]/, ''); + // create key if it doesn't exist + var key = paramName.replace(/\[(\d+)?\]/, ''); - if (!obj[key]) obj[key] = []; + if (!obj[key]) obj[key] = []; - // if it's an indexed array e.g. colors[2] - if (paramName.match(/\[\d+\]$/)) { + // if it's an indexed array e.g. colors[2] + if (paramName.match(/\[\d+\]$/)) { // get the index value and add the entry at the appropriate position - var index = (/\[(\d+)\]/).exec(paramName)[1]; + var index = (/\[(\d+)\]/).exec(paramName)[1]; - obj[key][index] = paramValue; - } else { + obj[key][index] = paramValue; + } else { // otherwise add the value to the end of the array - obj[key].push(paramValue); - } - } else { + obj[key].push(paramValue); + } + } else { // we're dealing with a string // eslint-disable-next-line no-lonely-if - if (!obj[paramName]) { + if (!obj[paramName]) { // if it doesn't exist, create property - obj[paramName] = paramValue; - } else if (obj[paramName] && typeof obj[paramName] === 'string') { + obj[paramName] = paramValue; + } else if (obj[paramName] && typeof obj[paramName] === 'string') { // if property does exist and it's a string, convert it to an array - obj[paramName] = [obj[paramName]]; - obj[paramName].push(paramValue); - } else { + obj[paramName] = [obj[paramName]]; + obj[paramName].push(paramValue); + } else { // otherwise add the property - obj[paramName].push(paramValue); + obj[paramName].push(paramValue); + } } } } - } - return obj; -}; + return obj; + }; -this.getURLParams = (k) => { - var p = {}; + this.getURLParams = (k) => { + var p = {}; - location.search.replace(/[?&]+([^=&]+)=([^&]*)/gi, function(s, k, v) { - p[k] = v; - }); - return k ? p[k] : p; -}; + location.search.replace(/[?&]+([^=&]+)=([^&]*)/gi, function(s, k, v) { + p[k] = v; + }); + return k ? p[k] : p; + }; -// this.updateParams = (key, value) => { -// params = new URLSearchParams(window.location.search); -// if (params.get(key) === value) return; -// params.set(key, value); + // this.updateParams = (key, value) => { + // params = new URLSearchParams(window.location.search); + // if (params.get(key) === value) return; + // params.set(key, value); -// let path = '/'; + // let path = '/'; -// if (params.get('type', '')) { -// path = '/' + params.get('type', ''); -// } -// window.location.href = '/grants' + path + '?' + decodeURIComponent(params.toString()); -// }; + // if (params.get('type', '')) { + // path = '/' + params.get('type', ''); + // } + // window.location.href = '/grants' + path + '?' + decodeURIComponent(params.toString()); + // }; -/** + /** * shrinks text if it exceeds a given length which introduces a button * which can expand / shrink the text. * useage:
    ...
    * * @param {number} length - text length to be wrapped. */ -this.showMore = (length = 400) => { - const placeholder = '...'; - const expand = 'More'; - const shrink = 'Less'; - - $('.wrap-text').each(function() { - const content = $(this).html(); - - if (content.length > length) { - const shortText = content.substr(0, length); - const remainingText = content.substr(length, content.length - length + 1); - const html = shortText + '' + placeholder + + this.showMore = (length = 400) => { + const placeholder = '...'; + const expand = 'More'; + const shrink = 'Less'; + + $('.wrap-text').each(function() { + const content = $(this).html(); + + if (content.length > length) { + const shortText = content.substr(0, length); + const remainingText = content.substr(length, content.length - length + 1); + const html = shortText + '' + placeholder + ' ' + remainingText + '  ' + expand + ''; - $(this).html(html); - } - }); + $(this).html(html); + } + }); - $('.morelink').on('click', function(event) { - if ($(event.currentTarget).hasClass('less')) { - $(event.currentTarget).removeClass('less'); - $(event.currentTarget).html(expand); - } else { - $(event.currentTarget).addClass('less'); - $(event.currentTarget).html(shrink); - } - $(event.currentTarget).parent().prev().toggle(); - $(event.currentTarget).prev().toggle(); - return false; - }); -}; + $('.morelink').on('click', function(event) { + if ($(event.currentTarget).hasClass('less')) { + $(event.currentTarget).removeClass('less'); + $(event.currentTarget).html(expand); + } else { + $(event.currentTarget).addClass('less'); + $(event.currentTarget).html(shrink); + } + $(event.currentTarget).parent().prev().toggle(); + $(event.currentTarget).prev().toggle(); + return false; + }); + }; -/** + /** * Check input file size * * input - input element @@ -1160,262 +1161,264 @@ this.showMore = (length = 400) => { * * Useage: checkFileSize($(input), 4000000) */ -this.checkFileSize = (input, max_img_size) => { - if (input.files && input.files.length > 0) { - if (input.files[0].size > max_img_size) { - input.value = ''; - return false; + this.checkFileSize = (input, max_img_size) => { + if (input.files && input.files.length > 0) { + if (input.files[0].size > max_img_size) { + input.value = ''; + return false; + } } - } - return true; -}; + return true; + }; -/** + /** * Compare two strings in a case insensitive way * * Usage: caseInsensitiveCompare('gitcoinco', 'GitcoinCo') */ -this.caseInsensitiveCompare = (val1, val2) => { - if (val1 && val2 && typeof val1 === 'string' && typeof val2 === 'string') { - return val1.toLowerCase() === val2.toLowerCase(); - } - return false; -}; + this.caseInsensitiveCompare = (val1, val2) => { + if (val1 && val2 && typeof val1 === 'string' && typeof val2 === 'string') { + return val1.toLowerCase() === val2.toLowerCase(); + } + return false; + }; -/** + /** * A popup to notify users to approve metamask transaction * @param {*} closePopup [boolean] */ -this.indicateMetamaskPopup = (closePopup) => { + this.indicateMetamaskPopup = (closePopup) => { // Don't show popup if user is not using Metamask - if (web3Modal.cachedProvider !== 'injected') { - return; - } - - if (closePopup) { - $('#indicate-popup').hide(); - } else if ($('#indicate-popup').length) { - if ($('#indicate-popup').is(':hidden')) { - $('#indicate-popup').show(); + if (web3Modal.cachedProvider !== 'injected') { + return; } - } else { - const svg = '
    Web3 Action PendingAction PendingIn order to use features of the Gitcoin network we must confirm transactions on the ethereum blockchain. Please check the pending action on your secure wallet.
    '; - $('body').append(svg); - } -}; - -(function($) { - $.fn.visible = function(partial) { - let $t = $(this); - let $w = $(window); - let viewTop = $w.scrollTop(); - let viewBottom = viewTop + $w.height(); - let _top = $t.offset().top; - let _bottom = _top + $t.height(); - let compareTop = partial === true ? _bottom : _top; - let compareBottom = partial === true ? _top : _bottom; - - return ((compareBottom <= viewBottom) && (compareTop >= viewTop)); - }; -})(jQuery); - - -$(document).ready(function() { - $(window).scroll(function() { - $('.g-fadein').each(function(index, element) { - let duration = $(this).attr('data-fade-duration') ? $(this).attr('data-fade-duration') : 1500; - let direction = $(this).attr('data-fade-direction') ? $(this).attr('data-fade-direction') : 'mid'; - let animateProps; - - switch (direction) { - case 'left': - animateProps = { 'opacity': '1', 'left': '0' }; - break; - case 'right': - animateProps = { 'opacity': '1', 'left': '0' }; - break; - default: - animateProps = { 'opacity': '1', 'bottom': '0' }; + if (closePopup) { + $('#indicate-popup').hide(); + } else if ($('#indicate-popup').length) { + if ($('#indicate-popup').is(':hidden')) { + $('#indicate-popup').show(); } + } else { + const svg = '
    Web3 Action PendingAction PendingIn order to use features of the Gitcoin network we must confirm transactions on the ethereum blockchain. Please check the pending action on your secure wallet.
    '; - if ($(element).visible(true)) { - $(this).animate(animateProps, duration); - } + $('body').append(svg); + } + }; - }); - }); -}); + (function($) { + $.fn.visible = function(partial) { + let $t = $(this); + let $w = $(window); + let viewTop = $w.scrollTop(); + let viewBottom = viewTop + $w.height(); + let _top = $t.offset().top; + let _bottom = _top + $t.height(); + let compareTop = partial === true ? _bottom : _top; + let compareBottom = partial === true ? _top : _bottom; + + return ((compareBottom <= viewBottom) && (compareTop >= viewTop)); + }; + })(jQuery); -this.copyToClipboard = str => { - const el = document.createElement('textarea'); - el.value = str; - document.body.appendChild(el); - el.select(); - document.execCommand('copy'); - document.body.removeChild(el); -}; + $(document).ready(function() { + $(window).scroll(function() { + $('.g-fadein').each(function(index, element) { + let duration = $(this).attr('data-fade-duration') ? $(this).attr('data-fade-duration') : 1500; + let direction = $(this).attr('data-fade-direction') ? $(this).attr('data-fade-direction') : 'mid'; + let animateProps; + + switch (direction) { + case 'left': + animateProps = { 'opacity': '1', 'left': '0' }; + break; + case 'right': + animateProps = { 'opacity': '1', 'left': '0' }; + break; + default: + animateProps = { 'opacity': '1', 'bottom': '0' }; + } -this.check_balance_and_alert_user_if_not_enough = function( - tokenAddress, - amount, - msg = 'You do not have enough tokens to perform this action.') { + if ($(element).visible(true)) { + $(this).animate(animateProps, duration); + } - if (tokenAddress == '0x0' || tokenAddress == '0x0000000000000000000000000000000000000000') { - return; - } + }); + }); + }); - let token_contract = new web3.eth.Contract(token_abi, tokenAddress); - let from = cb_address; - let token_details = tokenAddressToDetails(tokenAddress); - let token_decimals = token_details['decimals']; - let token_name = token_details['name']; + this.copyToClipboard = str => { + const el = document.createElement('textarea'); - token_contract.methods.balanceOf(from).call({from: from}, function(error, result) { - if (error) return; - let balance = Number(result) / Math.pow(10, token_decimals); - let balance_rounded = Math.round(balance * 10) / 10; + el.value = str; + document.body.appendChild(el); + el.select(); + document.execCommand('copy'); + document.body.removeChild(el); + }; - if (parseFloat(amount) > balance) { - let msg1 = gettext(msg); - let msg2 = gettext(' You have ') + balance_rounded + ' ' + token_name + ' ' + gettext(' but you need ') + amount + ' ' + token_name; + this.check_balance_and_alert_user_if_not_enough = ( + tokenAddress, + amount, + msg = 'You do not have enough tokens to perform this action.') => { - _alert(msg1 + msg2, 'warning'); + if (tokenAddress == '0x0' || tokenAddress == '0x0000000000000000000000000000000000000000') { return; } - }); -}; + let token_contract = new web3.eth.Contract(token_abi, tokenAddress); + let from = cb_address; + let token_details = tokenAddressToDetails(tokenAddress); + let token_decimals = token_details['decimals']; + let token_name = token_details['name']; + + token_contract.methods.balanceOf(from).call({from: from}, function(error, result) { + if (error) return; + let balance = Number(result) / Math.pow(10, token_decimals); + let balance_rounded = Math.round(balance * 10) / 10; + + if (parseFloat(amount) > balance) { + let msg1 = gettext(msg); + let msg2 = gettext(' You have ') + balance_rounded + ' ' + token_name + ' ' + gettext(' but you need ') + amount + ' ' + token_name; + + _alert(msg1 + msg2, 'warning'); + return; + } + }); -/** + }; + + /** * fetches github issue details of the issue_url * @param {string} issue_url */ -this.fetchIssueDetailsFromGithub = issue_url => { - return new Promise((resolve, reject) => { - if (!issue_url || issue_url.length < 5 || issue_url.indexOf('github') == -1) { - reject('error: issue_url needs to be a valid github URL'); - } + this.fetchIssueDetailsFromGithub = (issue_url) => { + return new Promise((resolve, reject) => { + if (!issue_url || issue_url.length < 5 || issue_url.indexOf('github') == -1) { + reject('error: issue_url needs to be a valid github URL'); + } - const github_token = currentProfile.githubToken; + const github_token = currentProfile.githubToken; - if (!github_token) { - reject('error: API calls needs user to be logged in'); - } + if (!github_token) { + reject('error: API calls needs user to be logged in'); + } - const request_url = '/sync/get_issue_details?url=' + encodeURIComponent(issue_url) + '&token=' + github_token; + const request_url = '/sync/get_issue_details?url=' + encodeURIComponent(issue_url) + '&token=' + github_token; - $.get(request_url, function(result) { - result = sanitizeAPIResults(result); - resolve(result); - }).fail(err => { - console.log(err); - reject(error); + $.get(request_url, function(result) { + result = sanitizeAPIResults(result); + resolve(result); + }).fail(err => { + console.log(err); + reject(error); + }); }); - }); -}; + }; -this.get_UUID = () => { - var dt = new Date().getTime(); - const uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) { - const r = (dt + Math.random() * 16) % 16 | 0; + this.get_UUID = () => { + var dt = new Date().getTime(); + const uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) { + const r = (dt + Math.random() * 16) % 16 | 0; - dt = Math.floor(dt / 16); - return (c === 'x' ? r : (r & 0x3 | 0x8)).toString(16); - }); + dt = Math.floor(dt / 16); + return (c === 'x' ? r : (r & 0x3 | 0x8)).toString(16); + }); - return uuid; -}; + return uuid; + }; -this.isVimeoProvider = (videoURL) => { - let vimeoId = null; + this.isVimeoProvider = (videoURL) => { + let vimeoId = null; - $.ajax({ - url: `https://vimeo.com/api/oembed.json?url=${videoURL}`, - async: false, - success: function(response) { - if (response.video_id) { - vimeoId = response.video_id; + $.ajax({ + url: `https://vimeo.com/api/oembed.json?url=${videoURL}`, + async: false, + success: function(response) { + if (response.video_id) { + vimeoId = response.video_id; + } } - } - }); + }); - return vimeoId; -}; + return vimeoId; + }; -this.isValidUrl = function(string) { - try { + this.isValidUrl = function(string) { + try { // eslint-disable-next-line no-new - new URL(string); - } catch (_) { - return false; - } + new URL(string); + } catch (_) { + return false; + } - return true; -}; + return true; + }; -this.getVideoMetadata = (videoURL) => { - const youtube_re = /(?:https?:\/\/|\/\/)?(?:www\.|m\.)?(?:youtu\.be\/|youtube\.com\/(?:embed\/|v\/|watch\?v=|watch\?.+&v=))([\w-]{11})(?![\w-])/; - const loom_re = /(?:https?:\/\/|\/\/)?(?:www\.)?(?:loom\.com\/share\/)([\w]{32})/; + this.getVideoMetadata = (videoURL) => { + const youtube_re = /(?:https?:\/\/|\/\/)?(?:www\.|m\.)?(?:youtu\.be\/|youtube\.com\/(?:embed\/|v\/|watch\?v=|watch\?.+&v=))([\w-]{11})(?![\w-])/; + const loom_re = /(?:https?:\/\/|\/\/)?(?:www\.)?(?:loom\.com\/share\/)([\w]{32})/; - if (!videoURL || !isValidUrl(videoURL)) { - return null; - } + if (!videoURL || !isValidUrl(videoURL)) { + return null; + } - const youtube_match = videoURL.match(youtube_re); - const loom_match = videoURL.match(loom_re); + const youtube_match = videoURL.match(youtube_re); + const loom_match = videoURL.match(loom_re); - if (youtube_match !== null && youtube_match[1].length === 11) { - return { - 'provider': 'youtube', - 'id': youtube_match[1], - 'url': videoURL - }; - } + if (youtube_match !== null && youtube_match[1].length === 11) { + return { + 'provider': 'youtube', + 'id': youtube_match[1], + 'url': videoURL + }; + } - if (loom_match !== null) { - return { - 'provider': 'loom', - 'id': loom_match[1], - 'url': videoURL - }; - } + if (loom_match !== null) { + return { + 'provider': 'loom', + 'id': loom_match[1], + 'url': videoURL + }; + } - const vimeoId = isVimeoProvider(videoURL); + const vimeoId = isVimeoProvider(videoURL); + + if (vimeoId) { + return { + 'provider': 'vimeo', + 'id': vimeoId, + 'url': videoURL + }; + } - if (vimeoId) { return { - 'provider': 'vimeo', - 'id': vimeoId, + 'provider': 'generic', + 'id': null, 'url': videoURL }; - } - - return { - 'provider': 'generic', - 'id': null, - 'url': videoURL }; -}; -/** + /** * decode html encoded string */ -const textArea = document.createElement('textarea'); + const textArea = document.createElement('textarea'); -this.htmlDecode = (value) => { - textArea.innerHTML = value || ''; + this.htmlDecode = (value) => { + textArea.innerHTML = value || ''; - return textArea.textContent; -}; + return textArea.textContent; + }; -/** + /** * bootstrap breakpoints */ -this.computedRootStyles = getComputedStyle(document.documentElement); + this.computedRootStyles = getComputedStyle(document.documentElement); + + this.breakpoint_sm = parseFloat(computedRootStyles.getPropertyValue('--breakpoint-sm')); + this.breakpoint_md = parseFloat(computedRootStyles.getPropertyValue('--breakpoint-md')); + this.breakpoint_lg = parseFloat(computedRootStyles.getPropertyValue('--breakpoint-lg')); + this.breakpoint_xl = parseFloat(computedRootStyles.getPropertyValue('--breakpoint-xl')); -this.breakpoint_sm = parseFloat(computedRootStyles.getPropertyValue('--breakpoint-sm')); -this.breakpoint_md = parseFloat(computedRootStyles.getPropertyValue('--breakpoint-md')); -this.breakpoint_lg = parseFloat(computedRootStyles.getPropertyValue('--breakpoint-lg')); -this.breakpoint_xl = parseFloat(computedRootStyles.getPropertyValue('--breakpoint-xl')); +}).call(window); diff --git a/app/assets/v2/js/status.js b/app/assets/v2/js/status.js index 26050a921d1..cdcc774717e 100644 --- a/app/assets/v2/js/status.js +++ b/app/assets/v2/js/status.js @@ -32,7 +32,7 @@ $(document).ready(function() { let selector = $('#bg-selector'); for (var i = 0; i < bgs.length; i++) { - selector.append('
    '); + selector.append('
    '); } function closeBackgroundDropdown(e) { @@ -184,7 +184,7 @@ $(document).ready(function() { } else { $('#thumbnail-img').addClass('py-2 px-4'); $('#thumbnail-img').css('width', '8rem'); - $('#thumbnail-img').attr('src', 'https://s.gitcoin.co/static/v2/images/team/gitcoinbot.c1e81ab42f13.png'); + $('#thumbnail-img').attr('src', static_url + 'v2/images/team/gitcoinbot.c1e81ab42f13.png'); } embedded_resource = url; @@ -362,7 +362,7 @@ $(document).ready(function() { let html = `
    - +
    `; diff --git a/app/assets/v2/js/vue-components.js b/app/assets/v2/js/vue-components.js index 4538a806ac2..d191e95ccc5 100644 --- a/app/assets/v2/js/vue-components.js +++ b/app/assets/v2/js/vue-components.js @@ -787,25 +787,42 @@ Vue.component('suggested-profile', { Vue.component('date-range-picker', { template: '#date-range-template', + // date is expected to be a momentjs object props: [ 'date', 'disabled' ], data: function() { return { - newDate: this.date + newDate: this.date.format('MM/DD/YYYY') }; }, computed: { - pickDate() { - return this.newDate; + pickDate: { + // getter + get() { + return this.newDate; + }, + // setter + set(newValue) { + let vm = this; + let mDate = moment(newValue); + + vm.newDate = newValue; + vm.$emit('apply-daterangepicker', mDate); + } + } + }, + methods: { + $datepicker: function() { + return window.$(this.$el).find('input'); } }, mounted: function() { let vm = this; this.$nextTick(function() { - window.$(this.$el).daterangepicker({ + this.$datepicker().daterangepicker({ singleDatePicker: true, - startDate: moment().add(1, 'month'), + startDate: vm.newDate, alwaysShowCalendars: false, ranges: { '1 week': [ moment().add(7, 'days'), moment().add(7, 'days') ], diff --git a/app/assets/v2/js/wallet.js b/app/assets/v2/js/wallet.js index 420e96ea445..a8d44bd4377 100644 --- a/app/assets/v2/js/wallet.js +++ b/app/assets/v2/js/wallet.js @@ -1,6 +1,7 @@ const Web3Modal = window.Web3Modal.default; const WalletConnectProvider = window.WalletConnectProvider.default; const eventWalletReady = new Event('walletReady', {bubbles: true}); +const eventWalletDisconnect = new Event('walletDisconnect', {bubbles: true}); const eventDataWalletReady = new Event('dataWalletReady', {bubbles: true}); if (!Object.hasOwnProperty.call(window, 'web3')) { @@ -26,9 +27,6 @@ function initWallet() { const isProd = url.host == 'gitcoin.co' && url.protocol == 'https:'; const formaticKey = isProd ? document.contxt['fortmatic_live_key'] : document.contxt['fortmatic_test_key']; const providerOptions = { - authereum: { - 'package': Authereum - }, fortmatic: { 'package': Fortmatic, options: { @@ -44,7 +42,8 @@ function initWallet() { portis: { 'package': Portis, options: { - id: 'b2345081-a47e-413a-941f-33fd645d39b3' + id: 'b2345081-a47e-413a-941f-33fd645d39b3', + network: 'mainnet' } } }; @@ -95,7 +94,9 @@ async function fetchAccountData(provider) { } await web3.eth.net.getId().then(id => { networkId = id; - networkName = getDataChains(id, 'chainId')[0] && getDataChains(id, 'chainId')[0].network; + const chainInfo = getDataChains(id, 'chainId')[0]; + + networkName = chainInfo && (chainInfo.network || chainInfo.name); }); // web3.currentProvider.chainId // networkName = await web3.eth.net.getNetworkType(); @@ -112,9 +113,11 @@ async function fetchAccountData(provider) { // Load chain information over an HTTP API // const chainData = await EvmChains.getChain(chainId); - document.querySelector('.network-name').textContent = networkName; - document.querySelector('.wallet-network').classList.remove('rinkeby', 'mainnet'); - document.querySelector('.wallet-network').classList.add(networkName.split(' ').join('-')); + if (networkName) { + document.querySelector('.network-name').textContent = networkName; + document.querySelector('.wallet-network').classList.remove('rinkeby', 'mainnet'); + document.querySelector('.wallet-network').classList.add(networkName.split(' ').join('-')); + } document.querySelector('#wallet-btn').innerText = 'Change Wallet'; @@ -231,44 +234,43 @@ function displayProvider() { createImg(image); } -async function setupPolygon(network = networkName) { - // Connect to Polygon network with MetaMask - let chainId = network === 'mainnet' ? '0x89' : '0x13881'; - let rpcUrl = network === 'mainnet' ? 'https://polygon-rpc.com' - : 'https://rpc-mumbai.matic.today'; +async function switchChain(id) { + const web3 = new Web3(provider); + const providerName = window.Web3Modal.getInjectedProviderName(); + const chainInfo = getDataChains(Number(id), 'chainId')[0]; + const chainId = Web3.utils.numberToHex(chainInfo.chainId); try { - await ethereum.request({ + await web3.currentProvider.request({ method: 'wallet_switchEthereumChain', params: [{ chainId }] }); } catch (switchError) { // This error code indicates that the chain has not been added to MetaMask if (switchError.code === 4902) { - let networkText = network === 'rinkeby' || network === 'goerli' || - network === 'ropsten' || network === 'kovan' ? 'testnet' : network; try { - await ethereum.request({ + await web3.currentProvider.request({ method: 'wallet_addEthereumChain', params: [{ chainId, - rpcUrls: [rpcUrl], - chainName: `Polygon ${networkText.replace(/\b[a-z]/g, (x) => x.toUpperCase())}`, - nativeCurrency: { name: 'MATIC', symbol: 'MATIC', decimals: 18 } + rpcUrls: chainInfo.rpc, + chainName: chainInfo.name, + nativeCurrency: chainInfo.nativeCurrency, + blockExplorerUrls: chainInfo.explorers && chainInfo.explorers.map(e => e.url) }] }); } catch (addError) { if (addError.code === 4001) { - throw new Error('Please connect MetaMask to Polygon network.'); + throw new Error(`Please connect ${providerName} to ${chainInfo.name} network.`); } else { console.error(addError); } } } else if (switchError.code === 4001) { - throw new Error('Please connect MetaMask to Polygon network.'); + throw new Error(`Please connect ${providerName} to ${chainInfo.name} network.`); } else if (switchError.code === -32002) { - throw new Error('Please respond to a pending MetaMask request.'); + throw new Error(`Please respond to a pending ${providerName} request.`); } else { console.error(switchError); } @@ -331,6 +333,8 @@ async function onDisconnect() { document.querySelector('.wallet-network').classList.remove('rinkeby', 'mainnet'); cleanUpWalletData(); + document.dispatchEvent(eventWalletDisconnect); + // Set the UI back to the initial state // document.querySelector("#prepare").style.display = "block"; // document.querySelector("#connected").style.display = "none"; diff --git a/app/assets/v2/scss/base.scss b/app/assets/v2/scss/base.scss index d7097ba6127..879a01d3d63 100644 --- a/app/assets/v2/scss/base.scss +++ b/app/assets/v2/scss/base.scss @@ -4,6 +4,15 @@ html { --profile-step-fill: #cfbfff; --profile-step: var(--gc-blue); + scroll-behavior: smooth; +} + +#btn-back-to-top { + position: fixed; + bottom: 20px; + right: 20px; + display: none; + z-index: 9999; } div.body { diff --git a/app/assets/v2/scss/bounty.scss b/app/assets/v2/scss/bounty.scss index a73cad8a802..7a4743b7186 100644 --- a/app/assets/v2/scss/bounty.scss +++ b/app/assets/v2/scss/bounty.scss @@ -893,3 +893,38 @@ a.btn { .qrcode { display: inline-block; } + +.tag.bounty-category-tag { + background-color: $gc-violet-100; + color: $gc-violet-400; + border-radius: 10px; + font-size: 0.75rem; +} + +.tag.bounty-info-amount-usd { + background-color: var(--usd-bg); + color: var(--usd-color); + border-radius: 10px; + font-size: 0.85rem; +} + +.tag.bounty-info-amount-token { + background-color: $gc-violet-100; + color: $gc-violet-400; + border-radius: 10px; + font-size: 0.85rem; +} + +.bounty-info-payment-token { + font-size: 0.85rem; +} + +.bounty-info-payment-token i { + font-size: 11px; + top: -1px; + position: relative; +} + +.bounty-info-payment-token-name { + color: $gc-violet-400; +} diff --git a/app/assets/v2/scss/colors.scss b/app/assets/v2/scss/colors.scss index 236f9f3ad2d..070ab6c82f0 100644 --- a/app/assets/v2/scss/colors.scss +++ b/app/assets/v2/scss/colors.scss @@ -139,3 +139,7 @@ html.dark-mode { .gc-alert-yellow { background-color: #FFF4CB; } + +.text-dark-purple { + color: #0E0333; +} \ No newline at end of file diff --git a/app/assets/v2/scss/forms/hubspot-form.scss b/app/assets/v2/scss/forms/hubspot-form.scss new file mode 100644 index 00000000000..60bad03d49b --- /dev/null +++ b/app/assets/v2/scss/forms/hubspot-form.scss @@ -0,0 +1,50 @@ +/** Forms embedded by hubspot do not have classes that match up with the bootstrap classes, so let's cater for the Hubspot classes and extend them to be the same as the bootstrap classes */ + +.hs-form-iframe { + width: 100% !important; +} +.hs-input { + @extend .form-control; +} +.hs-form-field { + @extend .form-group; + @extend .mb-3; +} +.hs-button { + @extend .btn; +} +.hs-button.primary { + @extend .btn-primary; +} +.hs-form-field label { + margin-bottom: 0.5rem; +} +.hs-error-msgs { + @extend .list-unstyled; +} +.hs-error-msgs li { + @extend .invalid-feedback; + display: block !important; +} +.hs-input.invalid.error { + @extend .is-invalid; +} +.hs-error-msgs li .hs-error-msg { + @extend .invalid-feedback; + display: block !important; +} +.hs_error_rollup .hs-error-msgs li { + font-size: inherit !important; +} + +// Some styling to get the email and submit button to sit side by side +.hubspot_form_wrap.simple, .hubspot_form_wrap .hbspt-form { width : 100%; } +.hubspot_form_wrap.simple .hs-form { + display: flex; + flex-direction: row; + padding: 16px 0; +} +.hubspot_form_wrap.simple .hs-form .hs_email { margin-right: 5px; width: 100%; } +.hubspot_form_wrap.simple .hs-form input.hs-button { height: 37px; } +.hubspot_form_wrap.simple .hs-form .hs_email label, .hubspot_form_wrap.simple .hs-form ul.hs-error-msgs +{ display: none !important; } diff --git a/app/assets/v2/scss/gc-utilities.scss b/app/assets/v2/scss/gc-utilities.scss index a09640a63c0..f40a497c994 100644 --- a/app/assets/v2/scss/gc-utilities.scss +++ b/app/assets/v2/scss/gc-utilities.scss @@ -121,6 +121,10 @@ } // hover effects +.disable-hover-underline:hover { + text-decoration: none!important +} + .hover-underline:not(:disabled):not(.disabled):not(.active):hover { text-decoration: underline!important } @@ -326,3 +330,58 @@ div.hr { .tooltip-inner { background-color: $gc-grey-500; } + +.alert-fixed-top { + position: fixed; + top: 80px; + right: 0; + z-index: 1030; + width: 450px; + max-width: 95%; +} + +a.plain-link { + color: inherit; + text-decoration: none; +} + +.gc-border-circle { + border-radius: 100%; + border: 2px solid #000; + display: inline-flex; + justify-content: center; + + min-width: 25px; + max-width: 25px; + min-height: 25px; + max-height: 25px; + + & > span { + line-height: 1.7; + display: inline-block; + } +} + +.gc-border-default { + border-color: rgb(14, 3, 51); +} + +.gc-border-success { + border-color: rgb(5, 150, 105); +} + +.gc-border-disabled { + border-color: rgb(183, 183, 183); +} + +.gc-text-default { + border-color: rgb(14, 3, 51); +} + +.gc-text-success { + color: rgb(5, 150, 105); +} + +.gc-text-disabled { + color: rgb(183, 183, 183); +} diff --git a/app/assets/v2/scss/grants/cart.scss b/app/assets/v2/scss/grants/cart.scss index c43f39eaea9..a2d0326ee62 100644 --- a/app/assets/v2/scss/grants/cart.scss +++ b/app/assets/v2/scss/grants/cart.scss @@ -184,6 +184,7 @@ .dropdown-toggle { background-color: inherit; border-color: inherit; + cursor: not-allowed; &.btn.btn-primary:active { background-color: inherit; @@ -193,6 +194,7 @@ &.btn.btn-primary:hover { background-color: inherit; border-color: inherit; + cursor: not-allowed; } } } @@ -229,7 +231,13 @@ width: 100%; text-align: center; } - + .dropdown-item:disabled { + cursor: not-allowed; + pointer-events: initial; + button { + cursor: not-allowed; + } + } .dropdown-item { padding-top: 0.45rem; padding-bottom: 0.45rem; @@ -272,8 +280,10 @@ fill: rgba(78, 82, 155, 0.25); } } +} - +.checkout-logo.btn:disabled { + cursor: not-allowed; } .donation-amount-container { @@ -332,6 +342,25 @@ color: #6F3FF5 !important; border-color: #6F3FF5 !important; } + .nav-tabs { + border-bottom: 0; + .nav-link { + padding: 16px; + margin: 0 12px; + img { + opacity: .5; + } + } + .nav-link.active { + img { + opacity: 1; + } + } + + .nav-link:first-child { + margin-left: 0; + } + } } .cart-grant-thumbnail { diff --git a/app/assets/v2/scss/grants/collection.scss b/app/assets/v2/scss/grants/collection.scss index 811d82364f3..e765214cb92 100644 --- a/app/assets/v2/scss/grants/collection.scss +++ b/app/assets/v2/scss/grants/collection.scss @@ -28,7 +28,7 @@ } .collection-item__pitch { - color: #666666; + color: #000000; height: 24px; overflow: hidden; line-height: 22px; diff --git a/app/assets/v2/scss/grants/form_wrapper.scss b/app/assets/v2/scss/grants/form_wrapper.scss index ff91f087c1c..3cf4939ca74 100644 --- a/app/assets/v2/scss/grants/form_wrapper.scss +++ b/app/assets/v2/scss/grants/form_wrapper.scss @@ -11,9 +11,59 @@ padding: 0 0 24px 0; } } + + .preview-shadow { + box-shadow: 0.25rem 1.5rem 1.5rem 0.5rem $gc-grey-100; + border: none; + pointer-events: none; + } + .new-border-top { + border-top: solid 1px $gc-grey-200; + border-left: solid 1px $gc-grey-200; + border-right: solid 1px $gc-grey-200; + border-top-left-radius: 8px; + border-top-right-radius: 8px; + padding: 2.5rem 2.5rem 0 2.5rem; + > p { + margin: 0 0 12px 0; + } + > h4 { + padding: 0 0 24px 0; + } + } + + .new-border-mid { + border-left: solid 1px $gc-grey-200; + border-right: solid 1px $gc-grey-200; + margin-left: 0 !important; + margin-right: 0 !important; + padding: 0 2.5rem 0 2.5rem; + > p { + margin: 0 0 12px 0; + } + > h4 { + padding: 0 0 24px 0; + } + } + + .new-border-bottom { + border-left: solid 1px $gc-grey-200; + border-right: solid 1px $gc-grey-200; + border-bottom: solid 1px $gc-grey-200; + border-bottom-left-radius: 8px; + border-bottom-right-radius: 8px; + padding: 0 2.5rem 2.5rem 2.5rem; + > p { + margin: 0 0 12px 0; + } + > h4 { + padding: 0 0 24px 0; + } + } + .navigation { - margin-top: 30px; + margin-top: 50px; color: $gc-violet-400; button { margin: 0 5px; @@ -27,4 +77,34 @@ color: $gc-grey-300; } } + + .preview-navigation { + margin-top: 50px; + button { + margin: 0 5px; + width: 204px; + } + } + + .vs__dropdown-option--disabled { + border-bottom: 1px solid $border-color; + font-size: 9px; + padding-bottom: 12px; + margin: 20px 0 10px 0; + } + + .bounty-creation-help { + background-color: $gc-violet-100; + border-radius: 4px; + } +} + +@media (max-width: 991.98px) { + .create-wrapper { + .new-border { + border: none; + padding-left: 0; + padding-right: 0; + } + } } diff --git a/app/assets/v2/scss/grants/grant.scss b/app/assets/v2/scss/grants/grant.scss index 45c7e7bba44..a1b04b6f473 100644 --- a/app/assets/v2/scss/grants/grant.scss +++ b/app/assets/v2/scss/grants/grant.scss @@ -706,27 +706,32 @@ margin-top: 0; } -.rounded-toggle .vs__dropdown-toggle { - border-radius: 5rem; - border-color: #A7A2B6; - max-width: 6rem; - font-weight: 600; - padding: 2px ​0 7px 0px; - - .vs__actions { - padding: 0.45rem 1rem 0.35rem 0; - } - - .v-select, .v-select * { - height: 2rem; +.rounded-toggle { + &.checkout-toggle { + .vs__dropdown-toggle { + border-radius: 0; + border-left: 0; + } } - -} - -.rounded-toggle { - .vs__dropdown-toggle .vs__selected { - margin: 0; - padding: 0 0 0 15px; + .vs__dropdown-toggle { + border-radius: 5rem; + border-color: #A7A2B6; + max-width: 6rem; + font-weight: 600; + padding: 2px ​0 7px 0px; + + .vs__actions { + padding: 0.45rem 1rem 0.35rem 0; + } + + .v-select, .v-select * { + height: 2rem; + } + + .vs__selected { + margin: 0; + padding: 0 0 0 15px; + } } svg { diff --git a/app/assets/v2/scss/jtbd.scss b/app/assets/v2/scss/jtbd.scss index 5bacd6d6af5..11df1e3b0c6 100644 --- a/app/assets/v2/scss/jtbd.scss +++ b/app/assets/v2/scss/jtbd.scss @@ -13,3 +13,86 @@ max-width: 100%; } } + +.home-carousel { + .carousel-indicators { + z-index: 1; + } + .carousel-inner { + min-height: 500px; + .carousel-item[data-carousel-item-href] { + cursor: pointer; + } + } + .grants { + display: flex; + h3 { + margin-top: 2rem; + } + .dates { + font-weight: normal; + font-size: 32px; + color: $gc-teal-400; + text-align: center; + } + img { + width: 40%; + margin: 0 auto; + } + a { + width: 20%; + margin-left: 40%; + } + background-size: 100% auto; + background-repeat: no-repeat; + min-height: 450px; + text-align: center; + } + li { + background-color: $gc-violet-400; + } + .carousel-caption { + h5 { + color: $gray-900; + } + } + .carousel-indicator { + z-index: auto; + } +} +.header-image { + img { + width: 100%; + } +} +@media screen and (max-width: 768px) { + .home-carousel { + .carousel-inner { + min-height: 525px; + } + .grants { + margin-top: 40px; + .dates { + margin-top: 0; + } + min-height: 425px; + img { + width: 60%; + margin: 0 auto; + } + a { + width: 50%; + margin-left: 25%; + } + } + } + .build-slide { + h1 { + font-size: 24px; + } + p { + font-size: 20px; + margin-bottom: 0; + } + } +} diff --git a/app/assets/v2/scss/lib/bootstrap.scss b/app/assets/v2/scss/lib/bootstrap.scss index 90216b00b0d..bc61d007b80 100644 --- a/app/assets/v2/scss/lib/bootstrap.scss +++ b/app/assets/v2/scss/lib/bootstrap.scss @@ -35,3 +35,5 @@ @import "./bootstrap/spinners"; @import "./bootstrap/utilities"; @import "./bootstrap/print"; + +@import "../forms/hubspot-form.scss"; diff --git a/app/assets/v2/scss/lib/bootstrap/_navbar.scss b/app/assets/v2/scss/lib/bootstrap/_navbar.scss index cf5b667908a..b007b1cefab 100644 --- a/app/assets/v2/scss/lib/bootstrap/_navbar.scss +++ b/app/assets/v2/scss/lib/bootstrap/_navbar.scss @@ -120,7 +120,7 @@ @include font-size($navbar-toggler-font-size); line-height: 1; background-color: transparent; // remove default button style - border: $border-width solid transparent; // remove default button style + border: none; // remove default button style @include border-radius($navbar-toggler-border-radius); @include hover-focus() { @@ -132,8 +132,8 @@ // or image file as needed. .navbar-toggler-icon { display: inline-block; - width: 1.5em; - height: 1.5em; + width: 1.3em; + height: 1.3em; vertical-align: middle; content: ""; background: 50% / 100% 100% no-repeat; diff --git a/app/assets/v2/scss/navbar.scss b/app/assets/v2/scss/navbar.scss index 25bd061e1d3..e2861bb2e2b 100644 --- a/app/assets/v2/scss/navbar.scss +++ b/app/assets/v2/scss/navbar.scss @@ -115,6 +115,10 @@ text-align: center; } + .gc-menu-inner { + overflow: inherit; + } + .gc-menu-inner .media-body > p:last-of-type { margin: 0; } @@ -254,11 +258,11 @@ transition: opacity var(--gc-menu-transition-duration); } - .gc-menu-inner { + .navbar-nav .gc-menu-inner { font-size: 0.8rem; padding: var(--gc-menu-padding); max-width: 60vw; - overflow: hidden; + overflow: auto; } .gc-menu-submenu-toggle:hover { @@ -500,8 +504,6 @@ } .navbar-nav .dropdown-menu { - border: 0px; - border-top: 1px solid #e2e0e7; box-shadow: unset; margin-top: 0px; max-height: unset; @@ -509,6 +511,17 @@ padding: 0px; } + .navbar-nav .dropdown-item { + border-top: 1px solid transparent; + border-bottom: 1px solid transparent; + } + + .navbar-nav .dropdown-item.gc-menu-submenu-toggle-active { + border-radius: 0; + border-top: 1px solid #e2e0e7; + border-bottom: 1px solid #e2e0e7; + } + .navbar-nav .dropdown-menu.notifications__box { padding: 10px 0px 10px 0px; } diff --git a/app/assets/v2/scss/profile.scss b/app/assets/v2/scss/profile.scss index 89e29953d0b..f646a925b6d 100644 --- a/app/assets/v2/scss/profile.scss +++ b/app/assets/v2/scss/profile.scss @@ -180,6 +180,11 @@ border-radius: 50%; } +.trust-bonus-message { + background-color: #F3587D; + color: #0E0333; +} + @media (max-width: 1200px) { .profile-header{ min-height: 350px; @@ -238,7 +243,7 @@ } .profile-header__stats .card-header { - padding: 0.1rem 0.7rem; + padding: 0.1rem; color: #666; border-radius: 0; border-bottom: none; @@ -250,10 +255,6 @@ font-size: 1.7rem; } -.profile-header__stats .card-body { - padding: 0.7rem; -} - .bounty_row { border-bottom: 1px solid #EFEFEF; @@ -270,7 +271,6 @@ @media (min-width: 992px) and (max-width: 1199.98px) { .profile-header__stats .card-header { - padding: 0 0.5rem; font-size: 1.2rem; } @@ -282,7 +282,7 @@ .profile-header__stats ul { list-style-type: none; - padding: 0; + padding-left: 0.5rem; margin: 0; } @@ -610,3 +610,74 @@ nav.navbar.navbar-dark{ .ql-align-justify { text-align: justify; } + +.status { + width: 32px; + height: 32px; + border: solid 1px $gc-grey-400; + border-radius: 50%; + &.complete { + background: #059669; + border: none; + } + + &.loading { + border: solid 1px $gc-violet-500; + } + + .fa-check { + color: white; + margin-top: 10px; + margin-left: 9px; + } + + div { + background: $gc-violet-500; + border-radius: 50%; + width: 10px; + height: 10px; + margin-top: 10px; + margin-left: 10px; + } +} + +.vl { + height: 27px; + width: 1px; + border: solid 1px #D9D9D9; + &.complete { + border: solid 1px #059669; + } +} + +.currentScore.saved { + color: #059669; +} + +.progress-bar.bg-secondary { + background-color: #059669 !important; +} + +.trustBonusBg { + background: url(static('wallpapers/confetti.svg')) no-repeat center center fixed; + -webkit-background-size: cover; + -moz-background-size: cover; + -o-background-size: cover; + background-size: cover; +} + +.refresh-button { + background: $gc-grey-500; +} + +.providers { + margin: 15px 0; + img { + height: 32px; + margin-right: 10px; + } + p { + margin-bottom: 0px; + margin-top: 5px; + } +} diff --git a/app/assets/v2/scss/quests.scss b/app/assets/v2/scss/quests.scss index a2450189591..f85055787ac 100644 --- a/app/assets/v2/scss/quests.scss +++ b/app/assets/v2/scss/quests.scss @@ -27,6 +27,11 @@ bottom: -5px; } +#btn-back-to-top { + width: auto; + top: auto; +} + // .btn:not(.btn-gc-blue) { // width: 100px; // position: relative; diff --git a/app/assets/v2/scss/search.scss b/app/assets/v2/scss/search.scss index b9296a2c517..8b7ffab101e 100644 --- a/app/assets/v2/scss/search.scss +++ b/app/assets/v2/scss/search.scss @@ -22,12 +22,16 @@ } .gc-search-box.dropdown-menu { - width: 520px; + width: 540px; background-color: #ffffff; border-radius: 4px; top: 2.3rem; } +.gc-search-box.dropdown-menu.show { + display: table; +} + .gc-search-box input[type=text] { width: 78%; display: inline; @@ -64,6 +68,10 @@ color: #666666; } +.gc-search-more-results { + z-index: 2; +} + .gc-search__avatar { border-radius: 50px; width: 47px; diff --git a/app/assets/v2/scss/submit_bounty.scss b/app/assets/v2/scss/submit_bounty.scss index 985897ecb5c..d4ef0605dbb 100644 --- a/app/assets/v2/scss/submit_bounty.scss +++ b/app/assets/v2/scss/submit_bounty.scss @@ -265,3 +265,13 @@ input:read-only { color: #0FCE7C; background: rgba(15, 206, 124, 0.2); } + +.bounty-type-label { + width: 120px; + display: block !important; +} + +.btn-radio.bounty-toggle-btn:hover:not(.disabled) { + background-color: #f9f9f9; + border-color: #3E00FF!important; +} diff --git a/app/assets/v2/scss/top-nav.scss b/app/assets/v2/scss/top-nav.scss index 2aee1f0f3e3..cc4b6ae00fb 100644 --- a/app/assets/v2/scss/top-nav.scss +++ b/app/assets/v2/scss/top-nav.scss @@ -1,8 +1,8 @@ // SVGs for mobile nav html { - --navbar-toggle-open: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='30'%20height='30'%20viewBox='0%200%2030%2030'%3E%3Cpath%20stroke='currentColor'%20stroke-linecap='round'%20stroke-miterlimit='10'%20stroke-width='2'%20d='M4%207h22M4%2015h22M4%2023h22'%20/%3E%3C/svg%3E"); - --navbar-toggle-close: url("data:image/svg+xml,%3Csvg%20width='30px'%20height='30px'%20viewBox='0%200%2030%2030'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg%20id='Page-1'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3E%3Cg%20id='Artboard'%20transform='translate(-146.000000,%20-156.000000)'%20fill-rule='nonzero'%3E%3Cg%20id='download'%20transform='translate(77.000000,%2045.000000)'%3E%3Cpath%20d='M73,118%20L95,134%20M73,134%20L95,118'%20id='Shape-Copy-2'%20stroke='currentColor'%20stroke-width='2'%20stroke-linecap='round'%3E%3C/path%3E%3Crect%20id='Path'%20x='69'%20y='111'%20width='30'%20height='30'%3E%3C/rect%3E%3C/g%3E%3C/g%3E%3C/g%3E%3C/svg%3E"); + --navbar-toggle-open: url("data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M3%208V6H21V8H3ZM3%2013H21V11H3V13ZM3%2018H21V16H3V18Z'%20fill='black'/%3e%3c/svg%3e"); + --navbar-toggle-close: url("data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M19%206.41L17.59%205L12%2010.59L6.41%205L5%206.41L10.59%2012L5%2017.59L6.41%2019L12%2013.41L17.59%2019L19%2017.59L13.41%2012L19%206.41Z'%20fill='black'/%3e%3c/svg%3e"); } .top-nav { diff --git a/app/assets/wallpapers/confetti.svg b/app/assets/wallpapers/confetti.svg new file mode 100644 index 00000000000..3914a81fc97 --- /dev/null +++ b/app/assets/wallpapers/confetti.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/app/avatar/views.py b/app/avatar/views.py index cf9239509e7..23e3eedb81b 100644 --- a/app/avatar/views.py +++ b/app/avatar/views.py @@ -27,7 +27,7 @@ from dashboard.utils import create_user_action, is_blocked from git.utils import org_name -from marketing.utils import is_deleted_account +from marketing.common.utils import is_deleted_account from PIL import Image, ImageOps from .models import BaseAvatar, CustomAvatar, SocialAvatar diff --git a/app/dashboard/admin.py b/app/dashboard/admin.py index 418632c3aaf..c78c9d69166 100644 --- a/app/dashboard/admin.py +++ b/app/dashboard/admin.py @@ -31,8 +31,8 @@ Activity, ActivityIndex, Answer, BlockedIP, BlockedURLFilter, BlockedUser, Bounty, BountyEvent, BountyFulfillment, BountyInvites, BountySyncRequest, CoinRedemption, CoinRedemptionRequest, Coupon, Earning, FeedbackEntry, FundRequest, HackathonEvent, HackathonProject, HackathonRegistration, HackathonSponsor, HackathonWorkshop, Interest, - Investigation, LabsResearch, MediaFile, ObjectView, Option, Poll, PollMedia, PortfolioItem, Profile, - ProfileVerification, ProfileView, Question, SearchHistory, Sponsor, Tip, TipPayout, TokenApproval, + Investigation, LabsResearch, MediaFile, ObjectView, Option, Passport, PassportStamp, Poll, PollMedia, PortfolioItem, + Profile, ProfileVerification, ProfileView, Question, SearchHistory, Sponsor, Tip, TipPayout, TokenApproval, TransactionHistory, TribeMember, TribesSubscription, UserAction, UserVerificationModel, ) @@ -376,10 +376,10 @@ def response_change(self, request, obj): # Register your models here. class BountyAdmin(admin.ModelAdmin): - raw_id_fields = ['interested', 'coupon_code', 'org', 'event', 'bounty_owner_profile', 'bounty_reserved_for_user'] + raw_id_fields = ['interested', 'coupon_code', 'org', 'event', 'bounty_owner_profile', 'bounty_reserved_for_user', 'owners'] ordering = ['-id'] - search_fields = ['raw_data', 'title', 'bounty_owner_github_username', 'token_name'] + search_fields = ['raw_data', 'title', 'bounty_owner_github_username', 'token_name', 'custom_title', 'custom_description'] list_display = ['pk', 'img', 'bounty_state', 'idx_status', 'network_link', 'standard_bounties_id_link', 'bounty_link', 'what'] readonly_fields = [ 'what', 'img', 'fulfillments_link', 'standard_bounties_id_link', 'bounty_link', 'network_link', @@ -671,6 +671,20 @@ class MediaFileAdmin(admin.ModelAdmin): list_display = ['id', 'file', 'filename'] +class PassportStampAdmin(admin.ModelAdmin): + list_display = ['user', 'stamp_id', 'stamp_provider'] + raw_id_fields = ['user', 'passport'] + search_fields = [ + 'user__id', 'user__username', 'stamp_id', 'stamp_provider' + ] + +class PassportAdmin(admin.ModelAdmin): + list_display = ['user', 'did'] + raw_id_fields = ['user'] + search_fields = [ + 'user__id', 'user__username', 'did' + ] + admin.site.register(BountyEvent, BountyEventAdmin) admin.site.register(SearchHistory, SearchHistoryAdmin) admin.site.register(Activity, ActivityAdmin) @@ -716,3 +730,5 @@ class MediaFileAdmin(admin.ModelAdmin): admin.site.register(PollMedia, PollMediaAdmin) admin.site.register(ProfileVerification, ProfileVerificationAdmin) admin.site.register(MediaFile, MediaFileAdmin) +admin.site.register(PassportStamp, PassportStampAdmin) +admin.site.register(Passport, PassportAdmin) diff --git a/app/dashboard/ethelo.py b/app/dashboard/ethelo.py new file mode 100644 index 00000000000..0bce82e5688 --- /dev/null +++ b/app/dashboard/ethelo.py @@ -0,0 +1,104 @@ +from grants.models import Flag, FlagQuerySet, Grant, GrantQuerySet + +EXPORT_FILENAME = "grants_export_for_ethelo.json" + + +def get_grants_from_database(start_grant_number: int, end_grant_number: int=None, inactive_grants_only: bool=True, flagged_grants_only: bool=False) -> dict: + """Query the grants database and return a JSONify-able dict that can be uploaded into ethelo. + + Args: + start_grant_number (int): The index of the starting grant. + end_grant_number (int, optional): The index of the ending grant. If None, all grants after `start_grant_number` + will be included. Defaults to None. + inactive_grants_only (bool): If True, only grants that have not been activated by admins yet will be exported. + + Returns: + dict: The returned dict will be JSONify-able. + """ + + query = GrantQuerySet(Grant) + + if end_grant_number is None: + end_grant_number = query.count() + + pk_list = list(range(start_grant_number, end_grant_number + 1)) + + if flagged_grants_only: + flagQuery = FlagQuerySet(Flag) + pk_list = [f.grant.id for f in flagQuery.range(pk_list)] + + query = query.filter(pk__in=pk_list) + + grants = [ + _format_grant(grant) + for grant in query + if not inactive_grants_only or not grant.active + ] + + return {"options": grants} + + +def _format_grant(grant: Grant) -> dict: + """Format a grant into a dict compatible with ethelo. + + Args: + grant (Grant): Grant to be formatted. + + Returns: + dict: JSONify-able grant dictionary. + """ + + tags = list(grant.tags.all().values_list("name", flat=True)) + + return { + "slug": f"grant_{grant.pk}", + "title": grant.title, + "info": grant.description_rich, # NOTE: grant.description is just a weird stringified JSON of the rich description + "display_data": { + "Status": _get_status(grant), + "Github Project Url": grant.github_project_url, + "Creator Handle": grant.admin_profile.handle, + "Database Number": grant.pk, + "Tags": tags, + "Flags": _format_flags(grant) + }, + } + + +def _get_status(grant: Grant) -> str: + return "Approved" if grant.active else "Unapproved" + +def _format_flags(grant: Grant) -> list: + """Format all flags of a grant into a list for the Flags field + + Args: + grant (Grant): Grant to have its flags formatted. + + Returns: + list + """ + flags = list(grant.flags.all().values("comments", "profile", "created_on", "processed", "comments_admin")) + return [ + _format_flag(flag) + for flag in flags + ] + +def _format_flag(flag: Flag) -> dict: + """Format one flag + + Args: + flag (Flag): Flag to be formatted + + Returns: + dict: JSONify-able grant dictionary. + """ + flag_vals = [] + for key in flag: + flag_vals.append(flag[key]) + return { + "comment": flag_vals[0], + "created by": flag_vals[1], + "on": str(flag_vals[2]), + "processed": flag_vals[3], + "admin comments": flag_vals[4] + } diff --git a/app/dashboard/gas_views.py b/app/dashboard/gas_views.py index b03c638d939..2bbcc0d7f44 100644 --- a/app/dashboard/gas_views.py +++ b/app/dashboard/gas_views.py @@ -109,7 +109,7 @@ def gas_calculator(request): actions = [{ 'name': _('New Bounty'), - 'target': '/new', + 'target': 'bounty/new', 'persona': 'funder', 'product': 'bounties', }, { diff --git a/app/dashboard/helpers.py b/app/dashboard/helpers.py index 9d91b28bd76..5120efebec5 100644 --- a/app/dashboard/helpers.py +++ b/app/dashboard/helpers.py @@ -218,9 +218,33 @@ def issue_details(request): logger.warning(e) message = 'could not pull back remote response' return JsonResponse({'status':'false','message':message}, status=404) + return JsonResponse(response) +@ratelimit(key='ip', rate='50/m', method=ratelimit.UNSAFE, block=True) +def validate_org_url(request): + """Determine if the github org URL represents a valid bounty sponsor. + + Returns: + Empty response with status 200 if the url is valid + + """ + url = request.GET.get('url') + hackathon_slug = request.GET.get('hackathon_slug') + + if hackathon_slug: + sponsor_profiles = HackathonEvent.objects.filter(slug__iexact=hackathon_slug).prefetch_related('sponsor_profiles').values_list('sponsor_profiles__handle', flat=True) + sponsor_profiles = list(sponsor_profiles) + org_issue = org_name(url).lower() + + if org_issue not in sponsor_profiles: + message = 'This GitHub URL is not for a valid sponsor' + return JsonResponse({'status':'false','message':message}, status=404) + + return JsonResponse({'status': 'true'}) + + def normalize_url(url): """Normalize the URL. diff --git a/app/dashboard/management/commands/add_main_rnd_tag.py b/app/dashboard/management/commands/add_main_rnd_tag.py new file mode 100644 index 00000000000..f1f2fabfb69 --- /dev/null +++ b/app/dashboard/management/commands/add_main_rnd_tag.py @@ -0,0 +1,26 @@ +from django.core.management.base import BaseCommand + +from grants.models import Grant, GrantTag + + +class Command(BaseCommand): + + help = 'updates all approved grants to include the main-round tag' + + def handle(self, *args, **options): + # main-round tag + tag = GrantTag.objects.get(pk=62) + grants = Grant.objects.filter(active=True, hidden=False, is_clr_eligible=True) + + print(f"adding main-round tag to {grants.count()} Grants:") + + # for every eligible grant + for grant in grants: + try: + # update the tag record to include the main round tag + grant.tags.add(tag) + grant.save() + except Exception as e: + pass + + print("\n - done\n") diff --git a/app/dashboard/management/commands/bundle.py b/app/dashboard/management/commands/bundle.py index 6dc9b710b79..a77235d51a0 100644 --- a/app/dashboard/management/commands/bundle.py +++ b/app/dashboard/management/commands/bundle.py @@ -3,7 +3,7 @@ import shutil from django.conf import settings -from django.core.management.base import BaseCommand +from django.core.management.base import BaseCommand, CommandError from django.template import Context, Template from django.template.loaders.app_directories import get_app_template_dirs @@ -50,8 +50,17 @@ def handle(self, *args, **options): if settings.BASE_DIR in template_dir: template_dir_list.append(template_dir) + + # We work with absolute paths only, and make sure to exclude duplicates. Sometimes the same dir is comes in via 2 routes: + # - from the app config + # - and from the template dirs config + full_template_dir_list = set(template_dir_list + [os.path.abspath(p) for p in settings.TEMPLATES[0]['DIRS']]) + print('\nThe following folder will be checked for templates:\n') + for d in full_template_dir_list: + print(d) + template_list = [] - for template_dir in (template_dir_list + settings.TEMPLATES[0]['DIRS']): + for template_dir in full_template_dir_list: for base_dir, dirnames, filenames in os.walk(template_dir): for filename in filenames: if ".html" in filename: @@ -111,7 +120,14 @@ def handle(self, *args, **options): block = block.render(bundleContext) # render the template (producing a bundle file) - rendered[render(block, kind, 'file', name, True)] = True + rendered_tag = render(block, kind, 'file', name, True) + if rendered_tag in rendered: + error = '-- X - duplicate: "%s"\ntemplate: "%s"\nblock:"%s"' % (rendered_tag, template, block) + raise CommandError(error) + + rendered[rendered_tag] = True + except CommandError: + raise except Exception as e: print('-- X - failed to parse %s: %s' % (template, e)) pass diff --git a/app/dashboard/management/commands/determine_bounties_never_expires_field.py b/app/dashboard/management/commands/determine_bounties_never_expires_field.py new file mode 100644 index 00000000000..4ac9d0d1a73 --- /dev/null +++ b/app/dashboard/management/commands/determine_bounties_never_expires_field.py @@ -0,0 +1,54 @@ +''' + Copyright (C) 2018 Gitcoin Core + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published + by the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + +''' + +from django.core.management.base import BaseCommand + +from dashboard.models import Bounty + + +class Command(BaseCommand): + + help = """This will set the `never_expire` flag to true on each bounty that meets the following criteria: + - never_expire - is false + - expires_date - is far into the future (year > 2200) + + """ + + def add_arguments(self , parser): + parser.add_argument('--exec', action='store_true') + + def handle(self, *args, **options): + do_exec = options["exec"] + if not do_exec: + print(""" +**************************************************************************************** +* This is a dry run, no processes will be killed +* In order to kill the processes re-run this command with the '--exec' option +**************************************************************************************** +""") + + bounties = Bounty.objects.all() + + for bounty in bounties: + print("checkin bounty -- date: %s, never_expires=%s bounty summary: %s" % (bounty.expires_date, bounty.never_expires, bounty)) + if bounty.expires_date.year > 2200 and not bounty.never_expires: + print(" -> setting never_expires flag to True") + + if do_exec: + bounty.never_expires = True + bounty.save() diff --git a/app/dashboard/management/commands/fix_handle_missmatch.py b/app/dashboard/management/commands/fix_handle_missmatch.py new file mode 100644 index 00000000000..4c3013a3d4b --- /dev/null +++ b/app/dashboard/management/commands/fix_handle_missmatch.py @@ -0,0 +1,42 @@ +''' + Copyright (C) 2021 Gitcoin Core + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published + by the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + +''' +from django.core.management.base import BaseCommand + +from django.db.models import F + +from dashboard.models import Profile + +class Command(BaseCommand): + + help = 'Align profile handles and user usernames' + + def handle(self, *args, **options): + # all users who don't have the same handle on their profile and user + profiles = Profile.objects.exclude(handle__iexact = F('user__username')) + + print(f"Need to fix - {profiles.count()} profiles") + + # for all copy the handle from the profile into the user + for profile in profiles.all(): + print(profile.handle, "is not", profile.user.username) + + # update the users username + profile.user.username = profile.handle + profile.user.save() + + pass diff --git a/app/dashboard/management/commands/migrate_stamp_data.py b/app/dashboard/management/commands/migrate_stamp_data.py new file mode 100644 index 00000000000..2d10483cb46 --- /dev/null +++ b/app/dashboard/management/commands/migrate_stamp_data.py @@ -0,0 +1,60 @@ +''' + Copyright (C) 2021 Gitcoin Core + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published + by the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + +''' + +from django.core import management +from django.core.management.base import BaseCommand +from django.utils import timezone + +from dashboard.models import Passport, PassportStamp +from dashboard.passport_reader import TRUSTED_IAM_ISSUER + + +class Command(BaseCommand): + + help = 'runs migration on the stamps table' + + def handle(self, *args, **options): + counter = 1 + + passports = Passport.objects.all() + + print(f"Migrating {passports.count()} Passports and {PassportStamp.objects.all().count()} PassportStamps\n") + + # move all stamp details in to the stamp table + for passport in passports: + try: + stamps = passport.passport["stamps"] + for stamp in stamps: + stamp_credential = stamp["credential"] + stamp_id = stamp_credential["credentialSubject"]["hash"] + stamp_provider = stamp_credential["credentialSubject"]["provider"] + + # stamp_provider = f"{TRUSTED_IAM_ISSUER}#{stamp_provider}" + + db_stamp = PassportStamp.objects.get(stamp_id=stamp_id) + + db_stamp.stamp_provider = stamp_provider + db_stamp.stamp_credential = stamp_credential + + print(f"{counter} - Saving {passport.user.profile.handle} - {stamp_id} :: {stamp_provider}") + + db_stamp.save() + + counter = counter+1 + except Exception as e: + print(e) diff --git a/app/dashboard/management/commands/sync_pending_fulfillments.py b/app/dashboard/management/commands/sync_pending_fulfillments.py index c50979df7da..babc1ae95c3 100644 --- a/app/dashboard/management/commands/sync_pending_fulfillments.py +++ b/app/dashboard/management/commands/sync_pending_fulfillments.py @@ -36,7 +36,20 @@ def handle(self, *args, **options): ) # Extensions - ext_payout_types= ['web3_modal', 'polkadot_ext', 'harmony_ext', 'binance_ext', 'rsk_ext', 'xinfin_ext', 'nervos_ext', 'algorand_ext', 'sia_ext', 'tezos_ext', 'casper_ext'] + ext_payout_types = [ + 'web3_modal', + 'polkadot_ext', + 'harmony_ext', + 'binance_ext', + 'rsk_ext', + 'xinfin_ext', + 'nervos_ext', + 'algorand_ext', + 'sia_ext', + 'tezos_ext', + 'casper_ext', + 'cosmos_ext' + ] for ext_payout_type in ext_payout_types: ext_pending_fulfillments = pending_fulfillments.filter(payout_type=ext_payout_type) for fulfillment in ext_pending_fulfillments.all(): diff --git a/app/dashboard/management/commands/sync_profiles.py b/app/dashboard/management/commands/sync_profiles.py index 5c93500f9f6..aa3162029a9 100644 --- a/app/dashboard/management/commands/sync_profiles.py +++ b/app/dashboard/management/commands/sync_profiles.py @@ -24,7 +24,7 @@ from app.utils import sync_profile from dashboard.models import Bounty, Profile from dashboard.utils import is_blocked -from marketing.utils import is_deleted_account +from marketing.common.utils import is_deleted_account def does_need_refresh(handle): diff --git a/app/dashboard/migrations/0200_auto_20220420_0228.py b/app/dashboard/migrations/0200_auto_20220420_0228.py new file mode 100644 index 00000000000..d89fb3f43fa --- /dev/null +++ b/app/dashboard/migrations/0200_auto_20220420_0228.py @@ -0,0 +1,28 @@ +# Generated by Django 2.2.24 on 2022-04-20 02:28 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('dashboard', '0199_auto_20220210_0344'), + ] + + operations = [ + migrations.AlterField( + model_name='bounty', + name='web3_type', + field=models.CharField(choices=[('legacy_gitcoin', 'Legacy Bounty'), ('bounties_network', 'Bounties Network'), ('qr', 'QR Code'), ('web3_modal', 'Web3 Modal'), ('polkadot_ext', 'Polkadot Ext'), ('binance_ext', 'Binance Ext'), ('harmony_ext', 'Harmony Ext'), ('rsk_ext', 'RSK Ext'), ('xinfin_ext', 'Xinfin Ext'), ('nervos_ext', 'Nervos Ext'), ('algorand_ext', 'Algorand Ext'), ('sia_ext', 'Sia Ext'), ('tezos_ext', 'Tezos Ext'), ('casper_ext', 'Casper Ext'), ('cosmos_ext', 'Cosmos Ext'), ('fiat', 'Fiat'), ('manual', 'Manual')], default='bounties_network', max_length=50), + ), + migrations.AlterField( + model_name='bountyfulfillment', + name='payout_type', + field=models.CharField(blank=True, choices=[('bounties_network', 'bounties_network'), ('qr', 'qr'), ('fiat', 'fiat'), ('web3_modal', 'web3_modal'), ('polkadot_ext', 'polkadot_ext'), ('binance_ext', 'binance_ext'), ('harmony_ext', 'harmony_ext'), ('rsk_ext', 'rsk_ext'), ('xinfin_ext', 'xinfin_ext'), ('nervos_ext', 'nervos_ext'), ('algorand_ext', 'algorand_ext'), ('sia_ext', 'sia_ext'), ('tezos_ext', 'tezos_ext'), ('casper_ext', 'casper_ext'), ('cosmos_ext', 'cosmos_ext'), ('manual', 'manual')], help_text='payment type used to make the payment', max_length=20, null=True), + ), + migrations.AlterField( + model_name='bountyfulfillment', + name='tenant', + field=models.CharField(blank=True, choices=[('BTC', 'BTC'), ('ETH', 'ETH'), ('ETC', 'ETC'), ('ZIL', 'ZIL'), ('CELO', 'CELO'), ('PYPL', 'PYPL'), ('POLKADOT', 'POLKADOT'), ('BINANCE', 'BINANCE'), ('HARMONY', 'HARMONY'), ('FILECOIN', 'FILECOIN'), ('RSK', 'RSK'), ('XINFIN', 'XINFIN'), ('NERVOS', 'NERVOS'), ('ALGORAND', 'ALGORAND'), ('SIA', 'SIA'), ('TEZOS', 'TEZOS'), ('CASPER', 'CASPER'), ('COSMOS', 'COSMOS'), ('OTHERS', 'OTHERS')], help_text='specific tenant type under the payout_type', max_length=10, null=True), + ), + ] diff --git a/app/dashboard/migrations/0200_auto_20220420_0336.py b/app/dashboard/migrations/0200_auto_20220420_0336.py new file mode 100644 index 00000000000..00c20e9d836 --- /dev/null +++ b/app/dashboard/migrations/0200_auto_20220420_0336.py @@ -0,0 +1,28 @@ +# Generated by Django 2.2.24 on 2022-04-20 03:36 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('dashboard', '0199_auto_20220210_0344'), + ] + + operations = [ + migrations.AlterField( + model_name='bounty', + name='web3_type', + field=models.CharField(choices=[('legacy_gitcoin', 'Legacy Bounty'), ('bounties_network', 'Bounties Network'), ('qr', 'QR Code'), ('web3_modal', 'Web3 Modal'), ('polkadot_ext', 'Polkadot Ext'), ('binance_ext', 'Binance Ext'), ('harmony_ext', 'Harmony Ext'), ('rsk_ext', 'RSK Ext'), ('xinfin_ext', 'Xinfin Ext'), ('nervos_ext', 'Nervos Ext'), ('algorand_ext', 'Algorand Ext'), ('sia_ext', 'Sia Ext'), ('tezos_ext', 'Tezos Ext'), ('casper_ext', 'Casper Ext'), ('cosmos_ext', 'Cosmos Ext'), ('fiat', 'Fiat'), ('manual', 'Manual')], default='bounties_network', max_length=50), + ), + migrations.AlterField( + model_name='bountyfulfillment', + name='payout_type', + field=models.CharField(blank=True, choices=[('bounties_network', 'bounties_network'), ('qr', 'qr'), ('fiat', 'fiat'), ('web3_modal', 'web3_modal'), ('polkadot_ext', 'polkadot_ext'), ('binance_ext', 'binance_ext'), ('harmony_ext', 'harmony_ext'), ('rsk_ext', 'rsk_ext'), ('xinfin_ext', 'xinfin_ext'), ('nervos_ext', 'nervos_ext'), ('algorand_ext', 'algorand_ext'), ('sia_ext', 'sia_ext'), ('tezos_ext', 'tezos_ext'), ('casper_ext', 'casper_ext'), ('cosmos_ext', 'cosmos_ext'), ('manual', 'manual')], help_text='payment type used to make the payment', max_length=20, null=True), + ), + migrations.AlterField( + model_name='bountyfulfillment', + name='tenant', + field=models.CharField(blank=True, choices=[('BTC', 'BTC'), ('ETH', 'ETH'), ('ETC', 'ETC'), ('ZIL', 'ZIL'), ('CELO', 'CELO'), ('PYPL', 'PYPL'), ('POLKADOT', 'POLKADOT'), ('BINANCE', 'BINANCE'), ('HARMONY', 'HARMONY'), ('FILECOIN', 'FILECOIN'), ('RSK', 'RSK'), ('XINFIN', 'XINFIN'), ('NERVOS', 'NERVOS'), ('ALGORAND', 'ALGORAND'), ('SIA', 'SIA'), ('TEZOS', 'TEZOS'), ('CASPER', 'CASPER'), ('COSMOS', 'COSMOS'), ('OTHERS', 'OTHERS')], help_text='specific tenant type under the payout_type', max_length=10, null=True), + ), + ] diff --git a/app/dashboard/migrations/0201_merge_20220427_1416.py b/app/dashboard/migrations/0201_merge_20220427_1416.py new file mode 100644 index 00000000000..28e51b8f378 --- /dev/null +++ b/app/dashboard/migrations/0201_merge_20220427_1416.py @@ -0,0 +1,14 @@ +# Generated by Django 2.2.24 on 2022-04-27 14:16 + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('dashboard', '0200_auto_20220420_0228'), + ('dashboard', '0200_auto_20220420_0336'), + ] + + operations = [ + ] diff --git a/app/dashboard/migrations/0202_hackathonevent_discord_server.py b/app/dashboard/migrations/0202_hackathonevent_discord_server.py new file mode 100644 index 00000000000..9ae9c5d6e97 --- /dev/null +++ b/app/dashboard/migrations/0202_hackathonevent_discord_server.py @@ -0,0 +1,18 @@ +# Generated by Django 2.2.24 on 2022-05-06 18:19 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('dashboard', '0201_merge_20220427_1416'), + ] + + operations = [ + migrations.AddField( + model_name='hackathonevent', + name='discord_server', + field=models.URLField(blank=True, help_text='Link to Discord server for Hackathon', null=True), + ), + ] diff --git a/app/dashboard/migrations/0203_auto_20220518_0612.py b/app/dashboard/migrations/0203_auto_20220518_0612.py new file mode 100644 index 00000000000..a9d47d310b7 --- /dev/null +++ b/app/dashboard/migrations/0203_auto_20220518_0612.py @@ -0,0 +1,89 @@ +# Generated by Django 2.2.24 on 2022-05-18 06:12 + +import django.contrib.postgres.fields.jsonb +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('dashboard', '0202_hackathonevent_discord_server'), + ] + + operations = [ + migrations.AddField( + model_name='bounty', + name='acceptance_criteria', + field=models.TextField(blank=True, default='', help_text='Acceptance criteria', null=True), + ), + migrations.AddField( + model_name='bounty', + name='bounty_source', + field=models.CharField(choices=[('github', 'Github'), ('custom', 'Custom')], db_index=True, default='github', max_length=50), + ), + migrations.AddField( + model_name='bounty', + name='contact_details', + field=django.contrib.postgres.fields.jsonb.JSONField(blank=True, default=dict, null=True), + ), + migrations.AddField( + model_name='bounty', + name='custom_issue_description', + field=models.TextField(blank=True, default=''), + ), + migrations.AddField( + model_name='bounty', + name='never_expires', + field=models.BooleanField(default=False), + ), + migrations.AddField( + model_name='bounty', + name='owners', + field=models.ManyToManyField(blank=True, to='dashboard.Profile'), + ), + migrations.AddField( + model_name='bounty', + name='payout_date', + field=models.DateTimeField(blank=True, null=True), + ), + migrations.AddField( + model_name='bounty', + name='peg_to_usd', + field=models.BooleanField(default=False), + ), + migrations.AddField( + model_name='bounty', + name='resources', + field=models.TextField(blank=True, default='', help_text='Resources', null=True), + ), + migrations.AddField( + model_name='bounty', + name='usd_pegged_value_in_token', + field=models.DecimalField(blank=True, decimal_places=2, default=0, max_digits=50, null=True), + ), + migrations.AddField( + model_name='bounty', + name='usd_pegged_value_in_token_now', + field=models.DecimalField(blank=True, decimal_places=2, default=0, max_digits=50, null=True), + ), + migrations.AddField( + model_name='bounty', + name='value_true_usd', + field=models.DecimalField(blank=True, decimal_places=2, default=0, max_digits=50, null=True), + ), + migrations.AlterField( + model_name='bounty', + name='bounty_type', + field=models.CharField(blank=True, choices=[('Bug', 'Bug'), ('Project', 'Project'), ('Feature', 'Feature'), ('Security', 'Security'), ('Improvement', 'Improvement'), ('Design', 'Design'), ('Docs', 'Docs'), ('Code review', 'Code review'), ('Other', 'Other'), ('Unknown', 'Unknown')], db_index=True, max_length=50), + ), + migrations.AlterField( + model_name='bounty', + name='github_url', + field=models.URLField(blank=True, db_index=True, null=True), + ), + migrations.AlterField( + model_name='bounty', + name='project_type', + field=models.CharField(choices=[('traditional', 'traditional'), ('contest', 'contest - deprecated'), ('cooperative', 'cooperative - deprecated'), ('multiple', 'multiple')], db_index=True, default='traditional', max_length=50), + ), + ] diff --git a/app/dashboard/migrations/0204_auto_20220525_0843.py b/app/dashboard/migrations/0204_auto_20220525_0843.py new file mode 100644 index 00000000000..0db2a4c3cda --- /dev/null +++ b/app/dashboard/migrations/0204_auto_20220525_0843.py @@ -0,0 +1,50 @@ +# Generated by Django 2.2.24 on 2022-05-25 08:43 + +from django.conf import settings +import django.contrib.postgres.fields.jsonb +from django.db import migrations, models +import django.db.models.deletion +import economy.models + + +class Migration(migrations.Migration): + + dependencies = [ + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ('dashboard', '0203_auto_20220518_0612'), + ] + + operations = [ + migrations.AddField( + model_name='profile', + name='dpopp_trust_bonus', + field=models.DecimalField(decimal_places=2, default=None, help_text='Trust Bonus score based on dpopp passport', max_digits=5, null=True), + ), + migrations.CreateModel( + name='PassportStamp', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('created_on', models.DateTimeField(db_index=True, default=economy.models.get_time)), + ('modified_on', models.DateTimeField(default=economy.models.get_time)), + ('stamp_id', models.CharField(max_length=100, unique=True)), + ('user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='passport_stamps', to=settings.AUTH_USER_MODEL)), + ], + options={ + 'abstract': False, + }, + ), + migrations.CreateModel( + name='Passport', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('created_on', models.DateTimeField(db_index=True, default=economy.models.get_time)), + ('modified_on', models.DateTimeField(default=economy.models.get_time)), + ('did', models.CharField(max_length=100, unique=True)), + ('passport', django.contrib.postgres.fields.jsonb.JSONField(default=dict)), + ('user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='passports', to=settings.AUTH_USER_MODEL)), + ], + options={ + 'abstract': False, + }, + ), + ] diff --git a/app/dashboard/migrations/0205_auto_20220526_0748.py b/app/dashboard/migrations/0205_auto_20220526_0748.py new file mode 100644 index 00000000000..4b9b3ce81c3 --- /dev/null +++ b/app/dashboard/migrations/0205_auto_20220526_0748.py @@ -0,0 +1,24 @@ +# Generated by Django 2.2.24 on 2022-05-26 07:48 + +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + ('dashboard', '0204_auto_20220525_0843'), + ] + + operations = [ + migrations.AddField( + model_name='passportstamp', + name='passport', + field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='stamps', to='dashboard.Passport'), + ), + migrations.AlterField( + model_name='profile', + name='dpopp_trust_bonus', + field=models.DecimalField(blank=True, decimal_places=2, default=None, help_text='Trust Bonus score based on dpopp passport', max_digits=5, null=True), + ), + ] diff --git a/app/dashboard/migrations/0206_auto_20220526_2120.py b/app/dashboard/migrations/0206_auto_20220526_2120.py new file mode 100644 index 00000000000..4df646a740e --- /dev/null +++ b/app/dashboard/migrations/0206_auto_20220526_2120.py @@ -0,0 +1,23 @@ +# Generated by Django 2.2.24 on 2022-05-26 21:20 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('dashboard', '0205_auto_20220526_0748'), + ] + + operations = [ + migrations.RenameField( + model_name='profile', + old_name='dpopp_trust_bonus', + new_name='passport_trust_bonus', + ), + migrations.AlterField( + model_name='profile', + name='passport_trust_bonus', + field=models.DecimalField(blank=True, decimal_places=2, default=None, help_text='Trust Bonus score based on Gitcoin Passport', max_digits=5, null=True), + ), + ] diff --git a/app/dashboard/migrations/0207_auto_20220530_2233.py b/app/dashboard/migrations/0207_auto_20220530_2233.py new file mode 100644 index 00000000000..1fdcbf0fd74 --- /dev/null +++ b/app/dashboard/migrations/0207_auto_20220530_2233.py @@ -0,0 +1,23 @@ +# Generated by Django 2.2.24 on 2022-05-30 22:33 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('dashboard', '0206_auto_20220526_2120'), + ] + + operations = [ + migrations.AddField( + model_name='profile', + name='passport_trust_bonus_last_updated', + field=models.DateTimeField(blank=True, help_text='Trust Bonus score last updated datetime', null=True), + ), + migrations.AddField( + model_name='profile', + name='passport_trust_bonus_status', + field=models.CharField(blank=True, help_text='Trust Bonus score update status', max_length=14, null=True), + ), + ] diff --git a/app/dashboard/migrations/0208_auto_20220616_1607.py b/app/dashboard/migrations/0208_auto_20220616_1607.py new file mode 100644 index 00000000000..59de1ef00bf --- /dev/null +++ b/app/dashboard/migrations/0208_auto_20220616_1607.py @@ -0,0 +1,18 @@ +# Generated by Django 2.2.24 on 2022-06-16 16:07 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('dashboard', '0207_auto_20220530_2233'), + ] + + operations = [ + migrations.AlterField( + model_name='profile', + name='passport_trust_bonus_status', + field=models.CharField(blank=True, help_text='Trust Bonus score update status', max_length=255, null=True), + ), + ] diff --git a/app/dashboard/migrations/0209_profile_passport_trust_bonus_stamp_validation.py b/app/dashboard/migrations/0209_profile_passport_trust_bonus_stamp_validation.py new file mode 100644 index 00000000000..31ffcaa3804 --- /dev/null +++ b/app/dashboard/migrations/0209_profile_passport_trust_bonus_stamp_validation.py @@ -0,0 +1,19 @@ +# Generated by Django 2.2.24 on 2022-06-29 09:16 + +import django.contrib.postgres.fields.jsonb +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('dashboard', '0208_auto_20220616_1607'), + ] + + operations = [ + migrations.AddField( + model_name='profile', + name='passport_trust_bonus_stamp_validation', + field=django.contrib.postgres.fields.jsonb.JSONField(blank=True, null=True), + ), + ] diff --git a/app/dashboard/migrations/0210_auto_20220718_1306.py b/app/dashboard/migrations/0210_auto_20220718_1306.py new file mode 100644 index 00000000000..b16b7d74707 --- /dev/null +++ b/app/dashboard/migrations/0210_auto_20220718_1306.py @@ -0,0 +1,29 @@ +# Generated by Django 2.2.24 on 2022-07-18 13:06 + +import django.contrib.postgres.fields.jsonb +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('dashboard', '0209_profile_passport_trust_bonus_stamp_validation'), + ] + + operations = [ + migrations.AlterField( + model_name='passportstamp', + name='stamp_id', + field=models.CharField(db_index=True, max_length=100, unique=True), + ), + migrations.AddField( + model_name='passportstamp', + name='stamp_credential', + field=django.contrib.postgres.fields.jsonb.JSONField(default=dict), + ), + migrations.AddField( + model_name='passportstamp', + name='stamp_provider', + field=models.CharField(db_index=True, default="", max_length=256), + ), + ] diff --git a/app/dashboard/models.py b/app/dashboard/models.py index c717d8dda68..5faaec635bf 100644 --- a/app/dashboard/models.py +++ b/app/dashboard/models.py @@ -63,6 +63,7 @@ from git.utils import get_issue_comments, get_issue_details, issue_number, org_name, repo_name from marketing.mails import fund_request_email, start_work_approved from marketing.models import EmailSupressionList, LeaderboardRank +from passport_score.models import GR15TrustScore from rest_framework import serializers from townsquare.models import PinnedPost from unidecode import unidecode @@ -223,8 +224,9 @@ class Bounty(SuperModel): ] PROJECT_TYPES = [ ('traditional', 'traditional'), - ('contest', 'contest'), - ('cooperative', 'cooperative'), + ('contest', 'contest - deprecated'), + ('cooperative', 'cooperative - deprecated'), + ('multiple', 'multiple'), ] BOUNTY_CATEGORIES = [ ('frontend', 'frontend'), @@ -235,10 +237,17 @@ class Bounty(SuperModel): ] BOUNTY_TYPES = [ ('Bug', 'Bug'), - ('Security', 'Security'), + ('Project', 'Project'), ('Feature', 'Feature'), + ('Security', 'Security'), + ('Improvement', 'Improvement'), + ('Design', 'Design'), + ('Docs', 'Docs'), + ('Code review', 'Code review'), + ('Other', 'Other'), ('Unknown', 'Unknown'), ] + EXPERIENCE_LEVELS = [ ('Beginner', 'Beginner'), ('Intermediate', 'Intermediate'), @@ -294,10 +303,17 @@ class Bounty(SuperModel): ('sia_ext', 'Sia Ext'), ('tezos_ext', 'Tezos Ext'), ('casper_ext', 'Casper Ext'), + ('cosmos_ext', 'Cosmos Ext'), ('fiat', 'Fiat'), ('manual', 'Manual') ) + + BOUNTY_SOURCES = ( + ('github', 'Github'), + ('custom', 'Custom'), + ) + bounty_state = models.CharField(max_length=50, choices=BOUNTY_STATES, default='open', db_index=True) web3_type = models.CharField(max_length=50, choices=WEB3_TYPES, default='bounties_network') title = models.CharField(max_length=1000) @@ -309,7 +325,7 @@ class Bounty(SuperModel): project_length = models.CharField(max_length=50, choices=PROJECT_LENGTHS, blank=True, db_index=True) estimated_hours = models.PositiveIntegerField(blank=True, null=True) experience_level = models.CharField(max_length=50, choices=EXPERIENCE_LEVELS, blank=True, db_index=True) - github_url = models.URLField(db_index=True) + github_url = models.URLField(db_index=True, blank=True, null=True) github_issue_details = JSONField(default=dict, blank=True, null=True) github_comments = models.IntegerField(default=0) bounty_owner_address = models.CharField(max_length=100, blank=True, null=True, db_index=True) @@ -329,6 +345,8 @@ class Bounty(SuperModel): reserved_for_user_expiration = models.DateTimeField(blank=True, null=True) is_open = models.BooleanField(db_index=True, help_text=_('Whether the bounty is still open for fulfillments.')) expires_date = models.DateTimeField() + payout_date = models.DateTimeField(null=True, blank=True) + never_expires = models.BooleanField(default=False) raw_data = JSONField(blank=True) metadata = JSONField(default=dict, blank=True) current_bounty = models.BooleanField( @@ -376,6 +394,12 @@ class Bounty(SuperModel): value_in_usdt = models.DecimalField(default=0, decimal_places=2, max_digits=50, blank=True, null=True) value_in_eth = models.DecimalField(default=0, decimal_places=2, max_digits=50, blank=True, null=True) value_true = models.DecimalField(default=0, decimal_places=2, max_digits=50, blank=True, null=True) + + usd_pegged_value_in_token_now = models.DecimalField(default=0, decimal_places=2, max_digits=50, blank=True, null=True) # The calculated amount in token, corresponding to value_true_usd + usd_pegged_value_in_token = models.DecimalField(default=0, decimal_places=2, max_digits=50, blank=True, null=True) # The calculated amount in token, corresponding to value_true_usd + value_true_usd = models.DecimalField(default=0, decimal_places=2, max_digits=50, blank=True, null=True) # The value the user wants to pay in USD + peg_to_usd = models.BooleanField(default=False) # True if the amount to pay should be pegged to USD + privacy_preferences = JSONField(default=dict, blank=True) admin_override_and_hide = models.BooleanField( default=False, help_text=_('Admin override to hide the bounty from the system') @@ -404,6 +428,22 @@ class Bounty(SuperModel): # Bounty QuerySet Manager objects = BountyQuerySet.as_manager() + contact_details = JSONField(default=dict, blank=True, null=True) + bounty_source = models.CharField(max_length=50, choices=BOUNTY_SOURCES, default='github', db_index=True) + + # acceptance criteria + acceptance_criteria = models.TextField(default='', blank=True, null=True, help_text=_('Acceptance criteria')) + + # resources + resources = models.TextField(default='', blank=True, null=True, help_text=_('Resources')) + + # Allow multiple owners + # This contains a list of IDs to dashboard.Profile + owners = models.ManyToManyField("Profile", blank=True) + + # Issue description for custom bounties, not related to a GitHUB issue + custom_issue_description = models.TextField(default='', blank=True) + class Meta: """Define metadata associated with Bounty.""" @@ -515,13 +555,7 @@ def get_relative_url(self, preceding_slash=True): str: The relative URL for the Bounty. """ - try: - _org_name = org_name(self.github_url) - _issue_num = int(issue_number(self.github_url)) - _repo_name = repo_name(self.github_url) - return f"{'/' if preceding_slash else ''}issue/{_org_name}/{_repo_name}/{_issue_num}/{self.standard_bounties_id}" - except Exception: - return f"{'/' if preceding_slash else ''}funding/details?url={self.github_url}" + return f"{'/' if preceding_slash else ''}issue/{self.id}" def get_canonical_url(self): """Get the canonical URL of the Bounty for SEO purposes. @@ -530,10 +564,7 @@ def get_canonical_url(self): str: The canonical URL of the Bounty. """ - _org_name = org_name(self.github_url) - _repo_name = repo_name(self.github_url) - _issue_num = int(issue_number(self.github_url)) - return settings.BASE_URL.rstrip('/') + reverse('issue_details_new2', kwargs={'ghuser': _org_name, 'ghrepo': _repo_name, 'ghissue': _issue_num}) + return settings.BASE_URL.rstrip('/') + reverse('issue_details_new4', kwargs={'bounty_id': self.id}) def get_natural_value(self): if not self.value_in_token: @@ -678,7 +709,11 @@ def org_display_name(self): # TODO: Remove POST ORGS @property def github_org_name(self): try: - return org_name(self.github_url) + if self.bounty_source == "github": + return org_name(self.github_url) + elif self.funding_organisation: + return self.funding_organisation + return None except Exception: return None @@ -857,6 +892,14 @@ def get_value_true(self): @property def get_value_in_eth(self): + if self.peg_to_usd: + if self.token_name == 'ETH': + return self.value_in_token / 10**18 + try: + return convert_amount(self.value_true, 'USDT', 'ETH') + except Exception: + return None + if self.token_name == 'ETH': return self.value_in_token / 10**18 try: @@ -866,20 +909,61 @@ def get_value_in_eth(self): @property def get_value_in_usdt_now(self): + if self.peg_to_usd: + return self.value_true_usd return self.value_in_usdt_at_time(None) @property def get_value_in_usdt(self): + if self.peg_to_usd: + return self.value_true_usd if self.status in self.OPEN_STATUSES: return self.value_in_usdt_now return self.value_in_usdt_then + @property + def get_usd_pegged_value_in_token_now(self): + if self.peg_to_usd: + try: + return self.usd_pegged_value_in_token_at_time(None) + except Exception: + return None + return self.value_true + + @property + def get_usd_pegged_value_in_token(self): + if self.peg_to_usd: + if self.status in self.OPEN_STATUSES: + try: + return self.usd_pegged_value_in_token_now + except Exception: + return None + return self.usd_pegged_value_in_token_then + return self.value_true + + @property + def usd_pegged_value_in_token_then(self): + return self.usd_pegged_value_in_token_at_time(self.web3_created) + + def usd_pegged_value_in_token_at_time(self, at_time): + if self.token_name in ['USDT', 'USDC']: + return self.value_true_usd + if self.token_name in settings.STABLE_COINS: + return self.value_true_usd + try: + return convert_amount(self.value_true_usd, 'USDT', self.token_name) + except ConversionRateNotFoundError: + try: + in_eth = convert_amount(self.value_true, 'USDT', 'ETH', at_time) + return convert_amount(in_eth, 'ETH', self.token_name, at_time) + except ConversionRateNotFoundError: + return None + @property def value_in_usdt_then(self): return self.value_in_usdt_at_time(self.web3_created) def value_in_usdt_at_time(self, at_time): - decimals = 10 ** 18 if self.token_name in ['USDT', 'USDC']: return float(self.value_in_token / 10 ** 6) if self.token_name in settings.STABLE_COINS: @@ -895,6 +979,8 @@ def value_in_usdt_at_time(self, at_time): @property def token_value_in_usdt_now(self): + if self.peg_to_usd: + return self.value_true_usd if self.token_name in settings.STABLE_COINS: return 1 try: @@ -904,6 +990,8 @@ def token_value_in_usdt_now(self): @property def token_value_in_usdt_then(self): + if self.peg_to_usd: + return self.value_true_usd try: return round(convert_token_to_usdt(self.token_name, self.web3_created), 2) except ConversionRateNotFoundError: @@ -1423,6 +1511,7 @@ class BountyFulfillment(SuperModel): ('sia_ext', 'sia_ext'), ('tezos_ext', 'tezos_ext'), ('casper_ext', 'casper_ext'), + ('cosmos_ext', 'cosmos_ext'), ('manual', 'manual') ] @@ -1444,6 +1533,7 @@ class BountyFulfillment(SuperModel): ('SIA', 'SIA'), ('TEZOS', 'TEZOS'), ('CASPER', 'CASPER'), + ('COSMOS', 'COSMOS'), ('OTHERS', 'OTHERS') ] @@ -2059,13 +2149,15 @@ def psave_bounty(sender, instance, **kwargs): 'Months': 5, } - instance.github_url = instance.github_url.lower() - try: - handle = instance.github_url.split('/')[3] - if not instance.org: - instance.org = Profile.objects.get(handle=handle) - except: - pass + if instance.github_url: + instance.github_url = instance.github_url.lower() + try: + handle = instance.github_url.split('/')[3] + if not instance.org: + instance.org = Profile.objects.get(handle=handle) + except: + pass + instance.idx_status = instance.status instance.fulfillment_accepted_on = instance.get_fulfillment_accepted_on instance.fulfillment_submitted_on = instance.get_fulfillment_submitted_on @@ -2081,6 +2173,9 @@ def psave_bounty(sender, instance, **kwargs): instance.value_in_eth = instance.get_value_in_eth instance.value_true = instance.get_value_true + instance.usd_pegged_value_in_token_now = instance.get_usd_pegged_value_in_token_now + instance.usd_pegged_value_in_token = instance.get_usd_pegged_value_in_token + # https://gitcoincore.slack.com/archives/CAXQ7PT60/p1600019142065700 if not instance.value_true: instance.value_true = 0 @@ -3078,6 +3173,12 @@ class Profile(SuperModel): # store the trust bonus on the model itself trust_bonus = models.DecimalField(default=0.5, decimal_places=2, max_digits=5, help_text='Trust Bonus score based on verified services') + # score details of the passport_trust_bonus on the model + passport_trust_bonus = models.DecimalField(default=None, null=True, blank=True, decimal_places=2, max_digits=5, help_text='Trust Bonus score based on Gitcoin Passport') + passport_trust_bonus_status = models.CharField(max_length=255, null=True, blank=True, help_text='Trust Bonus score update status') + passport_trust_bonus_last_updated = models.DateTimeField(null=True, blank=True, help_text='Trust Bonus score last updated datetime') + passport_trust_bonus_stamp_validation = JSONField(null=True, blank=True) + def update_idena_status(self): self.idena_status = get_idena_status(self.idena_address) @@ -3086,6 +3187,14 @@ def update_idena_status(self): else: self.is_idena_verified = False + @property + def final_trust_bonus(self): + try: + return GR15TrustScore.objects.get(user_id=self.user_id).trust_bonus + except: + pass + return 0.5 + @property def shadowbanned(self): return self.squelches.filter(active=True).exists() @@ -3914,7 +4023,7 @@ def get_quarterly_stats(self): user_active_in_last_quarter = True relevant_bounties = [] else: - from marketing.utils import get_or_save_email_subscriber + from marketing.common.utils import get_or_save_email_subscriber user_coding_languages = get_or_save_email_subscriber(self.email, 'internal').keywords if user_coding_languages is not None: potential_bounties = Bounty.objects.all() @@ -4254,7 +4363,7 @@ def get_who_works_with(self, work_type='collected', network='mainnet', bounties= if work_type != 'org': github_urls = bounties.values_list('github_url', flat=True) - profiles = [org_name(url) for url in github_urls] + profiles = [org_name(url) for url in github_urls if url] # github_url will be empty for custom bounties profiles = [ele for ele in profiles if ele] else: profiles = self.as_dict.get('orgs_bounties_works_with', []) @@ -4321,20 +4430,27 @@ def activate_avatar(self, avatar_pk): @property def to_representation(instance): + avatar_url = instance.avatar_url + if instance.avatar_baseavatar_related.filter(active=True).exists(): + avatar_url = instance.avatar_baseavatar_related.filter(active=True).first().avatar_url + return { 'id': instance.id, 'handle': instance.handle, 'name': instance.name, 'github_url': instance.github_url, - 'avatar_url': instance.avatar_url, + 'avatar_url': avatar_url, 'keywords': instance.keywords, 'url': instance.get_relative_url(), 'position': instance.get_contributor_leaderboard_index(), 'organizations': instance.get_who_works_with(network=None), - 'total_earned': instance.get_sum(network=None, currency='eth') + 'total_earned': instance.get_sum(network=None, currency='eth'), + 'followers': instance.follower_count, + 'following': instance.following_count, + 'grants_owned': instance.grants.count(), + 'grants_contributed': instance.grant_contributor.filter(subscription_contribution__success=True).distinct('grant').values_list('subscription_contribution').count() + instance.grant_phantom_funding.distinct('grant').count() } - def to_es(self): return json.dumps(self.to_dict()) @@ -4501,8 +4617,6 @@ def to_dict(self): return context - - @property def reassemble_profile_dict(self): params = self.as_dict @@ -4539,7 +4653,6 @@ def last_known_ip(self): return ips[0] return '' - @property def locations(self): from app.utils import get_location_from_ip @@ -4750,7 +4863,6 @@ def to_representation(self, instance): instance.calculate_all() instance.save() - return instance.as_representation @receiver(pre_save, sender=Tip, dispatch_uid="normalize_tip_usernames") @@ -5069,6 +5181,7 @@ class HackathonEvent(SuperModel): use_circle = models.BooleanField(help_text=_('Use circle for the Hackathon'), default=False) visible = models.BooleanField(help_text=_('Can this HackathonEvent be seeing on /hackathons ?'), default=True) total_prize = models.CharField(max_length=255, null=True, blank=True, help_text='extra text to display next the event dates on the hackathon list page') + discord_server = models.URLField(blank=True, null=True, help_text=_('Link to Discord server for Hackathon')) default_channels = ArrayField(models.CharField(max_length=255), blank=True, default=list) objects = HackathonEventQuerySet.as_manager() @@ -5093,6 +5206,15 @@ def relative_url(self): def town_square_link(self): return f'townsquare/?tab=hackathon:{self.pk}' + def is_expired(self): + """Check if Hackathon is active + + Returns: + boolean: Whether or not hackathon is expired + """ + now = timezone.now() + return self.end_date < now + def get_absolute_url(self): """Get the absolute URL for the HackathonEvent. @@ -5981,3 +6103,21 @@ class MediaFile(SuperModel): def __str__(self): return f'{self.id} - {self.filename}' + +class Passport(SuperModel): + user = models.ForeignKey(User, related_name='passports', on_delete=models.CASCADE, null=True, db_index=True) + did = models.CharField(unique=True, null=False, blank=False, max_length=100) + passport = JSONField(default=dict) + + def __str__(self): + return f'{self.did}' + +class PassportStamp(SuperModel): + user = models.ForeignKey(User, related_name='passport_stamps', on_delete=models.CASCADE, null=True, db_index=True) + passport = models.ForeignKey(Passport, related_name='stamps', on_delete=models.CASCADE, null=True) + stamp_id = models.CharField(unique=True, null=False, blank=False, max_length=100, db_index=True) + stamp_provider = models.CharField(null=False, blank=False, default="", max_length=256, db_index=True) + stamp_credential = JSONField(default=dict) + + def __str__(self): + return f'{self.stamp_id}' diff --git a/app/dashboard/notifications.py b/app/dashboard/notifications.py index 90f43495c57..df284cc543d 100644 --- a/app/dashboard/notifications.py +++ b/app/dashboard/notifications.py @@ -31,9 +31,9 @@ import twitter from economy.utils import convert_token_to_usdt from git.utils import delete_issue_comment, org_name, patch_issue_comment, post_issue_comment, repo_name +from marketing.common.utils import allowed_to_send_email from marketing.mails import featured_funded_bounty, send_mail, setup_lang, tip_email from marketing.models import GithubOrgToTwitterHandleMapping -from marketing.utils import allowed_to_send_email from pyshorteners import Shortener from retail.emails import render_new_kudos_email from slackclient import SlackClient diff --git a/app/dashboard/passport_reader.py b/app/dashboard/passport_reader.py new file mode 100644 index 00000000000..b7716c482fb --- /dev/null +++ b/app/dashboard/passport_reader.py @@ -0,0 +1,137 @@ +# libs for processing the deterministic stream location +import json + +# Making GET requests against the CERAMIC_URL to read streams +import requests + +# Location of a Ceramic node that we can read state from +CERAMIC_URL = "https://ceramic.passport-iam.gitcoin.co" + +# DID of the trusted IAM server (DEV = "did:key:z6Mkmhp2sE9s4AxFrKUXQjcNxbDV7WTM8xdh1FDNmNDtogdw") +TRUSTED_IAM_ISSUER = "did:key:z6MkghvGHLobLEdj1bgRLhS4LPGJAvbMA1tn2zcRyqmYU5LC" + +# Service weights for scorer +SCORER_SERVICE_WEIGHTS = [ + { + 'ref': f'{TRUSTED_IAM_ISSUER}#Poh', + 'match_percent': 50, + }, { + 'ref': f'{TRUSTED_IAM_ISSUER}#POAP', + 'match_percent': 25, + }, { + 'ref': f'{TRUSTED_IAM_ISSUER}#Ens', + 'match_percent': 25, + }, { + 'ref': f'{TRUSTED_IAM_ISSUER}#Google', + 'match_percent': 15, + }, { + 'ref': f'{TRUSTED_IAM_ISSUER}#Twitter', + 'match_percent': 15, + }, { + 'ref': f'{TRUSTED_IAM_ISSUER}#Facebook', + 'match_percent': 15, + }, { + 'ref': f'{TRUSTED_IAM_ISSUER}#Brightid', + 'match_percent': 50, + } +] + +# Ceramic definition id for Gitcoin Passport +CERAMIC_GITCOIN_PASSPORT_STREAM_ID = "kjzl6cwe1jw148h1e14jb5fkf55xmqhmyorp29r9cq356c7ou74ulowf8czjlzs" + +def get_did(address, network="1"): + # returns the did associated with the address on the given network + return f"did:pkh:eip155:{network}:{address}" + +def get_stream_ids(did, ids=[CERAMIC_GITCOIN_PASSPORT_STREAM_ID]): + # return streams in a dict + streams = {} + + try: + # query and pin for the streamId + stream_response = requests.post(f"{CERAMIC_URL}/api/v0/streams", json={ + "type": 0, + "genesis": { + "header": { + "family": "IDX", + "controllers": [did], + }, + }, + "opts": { + "pin": True, + "anchor": False, + } + }) + # get the state and default to empty content + state = stream_response.json().get('state', {"content": {}}) + + # check for a next record else pull from content + content = state['next']['content'] if state.get('next') else state['content'] + + # return streams for the given ids + for linked_stream_id in ids: + # pull CryptoAccounts streamID from expected location (kjzl6cwe1jw149z4rvwzi56mjjukafta30kojzktd9dsrgqdgz4wlnceu59f95f) + streams[linked_stream_id] = content[linked_stream_id].replace("ceramic://", "") if content.get(linked_stream_id) else False + except requests.exceptions.RequestException: + pass + except: + pass + + # return the CryptoAccounts streamID (without the ceramic:// prefix) + return streams + +def get_passport(did="", stream_ids=[]): + # get streamIds if non are provided + stream_ids = stream_ids if len(stream_ids) > 0 else get_stream_ids(did, [CERAMIC_GITCOIN_PASSPORT_STREAM_ID]) + + # attempt to pull content + passport = get_stamps(get_passport_stream(stream_ids)) + + # return a list of wallet address without the @eip155:1 suffix + return passport + +def get_stamps(passport): + # hydrate stamps contained within the passport + if passport and passport['stamps']: + for (index, stamp) in enumerate(passport['stamps']): + passport['stamps'][index] = get_stamp_stream(stamp) + + return passport + +def get_passport_stream(stream_ids=[]): + # create an empty passport + passport = { + "stamps": [] + } + + try: + # pull the CryptoAccounts streamID + stream_id = stream_ids[CERAMIC_GITCOIN_PASSPORT_STREAM_ID] + # get the stream content from given streamID + stream_response = requests.get(f"{CERAMIC_URL}/api/v0/streams/{stream_id}") + # get back the state object + state = stream_response.json().get('state', {"content": {}}) + + # check for a next record else pull from content + passport = state['next']['content'] if state.get('next') else state['content'] + except requests.exceptions.RequestException: + pass + except: + pass + + return passport + +def get_stamp_stream(stamp): + try: + stamp['credential'] = stamp['credential'].replace("ceramic://", "") + stamp_response = requests.get(f"{CERAMIC_URL}/api/v0/streams/{stamp['credential']}") + # get back the state object + state = stamp_response.json().get('state', {"content": {}}) + # check for a next record else pull from content + stamp['credential'] = state['next']['content'] if state.get('next') else state['content'] + except requests.exceptions.RequestException: + pass + except: + pass + + return stamp diff --git a/app/dashboard/router.py b/app/dashboard/router.py index 8dff7b0cb10..c71fee3f4e9 100644 --- a/app/dashboard/router.py +++ b/app/dashboard/router.py @@ -140,6 +140,8 @@ class BountySerializer(serializers.HyperlinkedModelSerializer): event = HackathonEventSerializer(many=False) bounty_owner_email = serializers.SerializerMethodField('override_bounty_owner_email') bounty_owner_name = serializers.SerializerMethodField('override_bounty_owner_name') + owners = ProfileSerializer(many=True, read_only=True) + bounty_owner_profile = ProfileSerializer() def override_bounty_owner_email(self, obj): can_make_visible_via_api = bool(int(obj.privacy_preferences.get('show_email_publicly', 0))) @@ -170,7 +172,10 @@ class Meta: 'attached_job_description', 'needs_review', 'github_issue_state', 'is_issue_closed', 'additional_funding_summary', 'funding_organisation', 'paid', 'event', 'admin_override_suspend_auto_approval', 'reserved_for_user_handle', 'is_featured', - 'featuring_date', 'repo_type', 'funder_last_messaged_on', 'can_remarket', 'is_reserved' + 'featuring_date', 'repo_type', 'funder_last_messaged_on', 'can_remarket', 'is_reserved', + 'contact_details', 'usd_pegged_value_in_token_now', 'usd_pegged_value_in_token', + 'value_true_usd', 'peg_to_usd', 'owners', 'payout_date', 'acceptance_criteria', 'resources', + 'bounty_source', 'bounty_owner_profile', 'never_expires', 'custom_issue_description' ) def create(self, validated_data): @@ -301,7 +306,12 @@ def get_queryset(self): class BountySerializerSlim(BountySerializer): + interested_count = serializers.SerializerMethodField() + def get_interested_count(self, obj): + # It is expected that slim_interested_count will be an annotated fielf coming from the query + # it is not part of model + return obj.slim_interested_count class Meta: """Define the bounty serializer metadata.""" @@ -311,7 +321,7 @@ class Meta: 'fulfillment_started_on', 'fulfillment_submitted_on', 'canceled_on', 'web3_created', 'bounty_owner_address', 'avatar_url', 'network', 'standard_bounties_id', 'github_org_name', 'interested_count', 'token_name', 'value_in_usdt', 'keywords', 'value_in_token', 'project_type', 'is_open', 'expires_date', 'latest_activity', 'token_address', - 'bounty_categories' + 'bounty_categories', 'value_true_usd', 'peg_to_usd' ) @@ -406,12 +416,17 @@ def get_queryset(self): applicants = self.request.query_params.get('applicants') if applicants == '0': queryset = queryset.annotate( - interested_count=Count("interested") - ).filter(interested_count=0) + slim_interested_count=Count("interested") + ).filter(slim_interested_count=0) elif applicants == '1-5': queryset = queryset.annotate( - interested_count=Count("interested") - ).filter(interested_count__gte=1).filter(interested_count__lte=5) + slim_interested_count=Count("interested") + ).filter(slim_interested_count__gte=1).filter(slim_interested_count__lte=5) + else: + # We do not filter by interested count, but we still need the aggregation for the serializer + queryset = queryset.annotate( + slim_interested_count=Count("interested") + ) # filter by who is interested if 'started' in param_keys: diff --git a/app/dashboard/sync/cosmos.py b/app/dashboard/sync/cosmos.py new file mode 100644 index 00000000000..d9ad345ffc7 --- /dev/null +++ b/app/dashboard/sync/cosmos.py @@ -0,0 +1,54 @@ +from django.utils import timezone + +import requests +from dashboard.sync.helpers import record_payout_activity, txn_already_used + +BASE_URL = 'https://api.cosmos.network' + + +def get_cosmos_txn_status(fulfillment): + txnid = fulfillment.payout_tx_id + token_name = fulfillment.token_name + funderAddress = fulfillment.funder_address + amount = fulfillment.payout_amount + payeeAddress = fulfillment.fulfiller_address + + if token_name != 'ATOM' or not txnid: + return None + + response = requests.get(f'{BASE_URL}/cosmos/tx/v1beta1/txs/{txnid}').json() + + tx_response = response.get('tx') + + if tx_response and tx_response['body']['messages'][0]['@type'] == '/cosmos.bank.v1beta1.MsgSend': + tx_response = tx_response['body']['messages'][0] + block_tip = requests.get( + f'{BASE_URL}/blocks/latest' + ).json()['block']['header']['height'] + confirmations = int(block_tip) - int(response['tx_response']['height']) + + if ( + response['tx_response']['txhash'].strip() == txnid + and tx_response['from_address'] == funderAddress + and tx_response['to_address'] == payeeAddress + and float([ + token['amount'] for token in tx_response['amount'] if token['denom'] == 'uatom' + ][0]) == float(amount) + ): + if response['tx_response']['code'] == 0 and confirmations > 0: + return 'success' + return 'expired' + + return None + + +def sync_cosmos_payout(fulfillment): + if fulfillment.payout_tx_id and fulfillment.payout_tx_id != "0x0": + txn_status = get_cosmos_txn_status(fulfillment) + + if txn_status == 'success': + fulfillment.payout_status = 'done' + fulfillment.accepted_on = timezone.now() + fulfillment.accepted = True + record_payout_activity(fulfillment) + fulfillment.save() diff --git a/app/dashboard/tasks.py b/app/dashboard/tasks.py index c64f1ac38f1..c3b94d7b75a 100644 --- a/app/dashboard/tasks.py +++ b/app/dashboard/tasks.py @@ -3,6 +3,9 @@ import math import os from datetime import datetime +from functools import reduce +from operator import add +from pprint import pformat from django.conf import settings from django.contrib.auth.models import User @@ -15,13 +18,20 @@ from app.utils import get_location_from_ip from celery import app, group from celery.utils.log import get_task_logger -from dashboard.models import Activity, Bounty, Earning, ObjectView, Profile, TransactionHistory, UserAction +from dashboard.models import ( + Activity, Bounty, Earning, ObjectView, Passport, PassportStamp, Profile, TransactionHistory, UserAction, +) from dashboard.utils import get_tx_status_and_details from economy.models import EncodeAnything from marketing.mails import func_name, grant_update_email, send_mail +from passport_score.models import GR15TrustScore +from passport_score.utils import compute_min_trust_bonus_for_user, handle_submitted_passport, handle_submitted_stamps +from passport_score.views import compute_gr15_apu from proxy.views import proxy_view from retail.emails import render_share_bounty +from .passport_reader import SCORER_SERVICE_WEIGHTS, TRUSTED_IAM_ISSUER, get_passport, get_stream_ids + logger = get_task_logger(__name__) redis = RedisService().redis @@ -240,6 +250,10 @@ def profile_dict(self, pk, retry: bool = True) -> None: :param pk: :return: """ + + if settings.FLUSH_QUEUE: + return + if isinstance(pk, list): pk = pk[0] with redis.lock("tasks:profile_dict:%s" % pk, timeout=LOCK_TIMEOUT): @@ -311,7 +325,7 @@ def m2m_changed_interested(self, bounty_pk, retry: bool = True) -> None: :param bounty_pk: :return: """ - with redis.lock("m2m_changed_interested:bounty", timeout=LOCK_TIMEOUT): + with redis.lock(f"m2m_changed_interested:bounty:{bounty_pk}", timeout=LOCK_TIMEOUT): bounty = Bounty.objects.get(pk=bounty_pk) from dashboard.notifications import maybe_market_to_github maybe_market_to_github(bounty, 'work_started', @@ -353,6 +367,10 @@ def increment_view_count(self, pks, content_type, user_id, view_type, retry: boo @app.shared_task(bind=True, max_retries=1) def sync_profile(self, handle, user_pk, hide_profile, retry: bool = True) -> None: + + if settings.FLUSH_QUEUE: + return + from app.utils import actually_sync_profile user = User.objects.filter(pk=user_pk).first() if user_pk else None actually_sync_profile(handle, user=user, hide_profile=hide_profile) @@ -360,6 +378,10 @@ def sync_profile(self, handle, user_pk, hide_profile, retry: bool = True) -> Non @app.shared_task(bind=True, max_retries=1) def recalculate_earning(self, pk, retry: bool = True) -> None: + + if settings.FLUSH_QUEUE: + return + from dashboard.models import Earning earning = Earning.objects.get(pk=pk) src = earning.source @@ -382,6 +404,9 @@ def record_visit(self, user_pk, profile_pk, ip_address, visitorId, useragent, re :return: None """ + if settings.FLUSH_QUEUE: + return + user = User.objects.filter(pk=user_pk).first() if user_pk else None profile = Profile.objects.filter(pk=profile_pk).first() if profile_pk else None if user and profile: @@ -436,10 +461,13 @@ def record_join(self, profile_pk, retry: bool = True) -> None: """ # There seems to be a race condition, this is task is sometimes - # executed in parallel for the same profile. And this leads to an integrity + # executed in parallel for the same profile. And this leads to an integrity # error (becasue Activity.objects.create also performs delete operations in a # post_save signal) # To avoid the integrity error we execute this operation in a transaction + if settings.FLUSH_QUEUE: + return + with transaction.atomic(): profile = Profile.objects.filter(pk=profile_pk).first() if profile_pk else None if profile: @@ -475,3 +503,128 @@ def save_tx_status_and_details(self, earning_pk, chain='std'): txid=txid, captured_at=timezone.now(), ) + + +@app.shared_task +def calculate_trust_bonus(user_id, did, address): + """ + :param self: Self + :param user_id: the user_id + :param did: the did for the passport + :return: None + """ + + # delay import as this is only available in celery envs + import didkit + + try: + + # Pull streamIds from Ceramic Account associated with DID + stream_ids = get_stream_ids(did) + + # No Ceramic Account found for user + if not stream_ids: + raise Exception(f"No Ceramic Account found for '{did}'") + + # check account against did + is_owner = did.lower() == f"did:pkh:eip155:1:{address.lower()}" + + # Invalid owner + if not is_owner: + raise Exception(f"Bad owner when checking did '{did}'") + + # Retrieve DIDs Passport from Ceramic + passport = get_passport(stream_ids=stream_ids) + + # No Passport discovered + if not passport: + raise Exception(f"No Passport discovered for '{did}'") + + db_passport = handle_submitted_passport(user_id, did, passport) + stamp_validation_list = [] + + # Check the validity of each stamp in the passport + valid_stamps = [] + for stamp in passport['stamps']: + try: + if stamp and stamp['credential'] and stamp["provider"]: + stamp_validation = { + "provider": stamp["provider"], + "is_verified": False, + "errors": [] + } + stamp_validation_list.append(stamp_validation) + + # get the user credential ID, this will have the form: "did:ethr:0x...#POAP" + subject_id = stamp["credential"]["credentialSubject"]["id"] + + # the subjectId must match the users DID + is_subject_valid = subject_id.lower() == did.lower() + + stamp_expiration_date = stamp["credential"]["expirationDate"] + # the stamp must not have expired before being registered (when expiry comes around, should we expire the stamp on the scorer side?) + try: + is_stamp_expired = datetime.strptime(stamp_expiration_date, "%Y-%m-%dT%H:%M:%S.%fZ") < datetime.now() + except: + # In some cases the microseconds are missing in the timestamp (has been encountered in production) + is_stamp_expired = datetime.strptime(stamp_expiration_date, "%Y-%m-%dT%H:%M:%SZ") < datetime.now() + + + # the stamp must be issued by the trusted IAM server + is_issued_by_iam = stamp["credential"]["issuer"] == TRUSTED_IAM_ISSUER + + # check that the provider matches the provider in the VC + is_for_provider = stamp["provider"] == stamp["credential"]["credentialSubject"]["provider"] + + if not is_subject_valid: + msg = "Invalid stamp subject: %s != %s" %( subject_id, did) + stamp_validation["errors"].append(msg) + logger.error(msg) + + if is_stamp_expired: + mag = "Expired stamp (%s): %s" % ( subject_id, stamp["credential"]["expirationDate"]) + stamp_validation["errors"].append(msg) + logger.error(msg) + + if not is_issued_by_iam: + msg = "Stamp issuer missmatch: '%s' != '%s'" %( TRUSTED_IAM_ISSUER, stamp["credential"]["issuer"]) + stamp_validation["errors"].append(msg) + logger.error(msg) + + if not is_for_provider: + msg = "Stamp provider missmatch: '%s' != '%s' " % ( stamp["provider"], stamp["credential"]["credentialSubject"]["provider"]) + stamp_validation["errors"].append(msg) + logger.error(msg) + + if is_subject_valid and not is_stamp_expired and is_issued_by_iam and is_for_provider: + # Proceed with verifying the credential + verification = didkit.verifyCredential(json.dumps(stamp["credential"]), '{"proofPurpose":"assertionMethod"}') + verification = json.loads(verification) + + # Check that the credential verified + stamp['is_verified'] = (not verification["errors"]) + + # Given a valid stamp - set is_verified and add stamp to returns + if stamp['is_verified']: + stamp_validation['is_verified'] = True + + valid_stamps.append(stamp) + + handle_submitted_stamps(db_passport, user_id, valid_stamps) + + except Exception as e: + logger.error("Error verifying the stamp: %s. Error: %s", stamp, e, exc_info=True) + + compute_min_trust_bonus_for_user(user_id) + + except Exception as e: + # Log the error + logger.error(e) + # We expect this verification to throw + logger.error("Error calculating trust bonus score!", exc_info=True) + profile = Profile.objects.get(user_id=user_id) + profile.passport_trust_bonus = profile.passport_trust_bonus or 0.5 + profile.passport_trust_bonus_status = f"Error: {e}"[:255] + profile.passport_trust_bonus_last_updated = timezone.now() + profile.passport_trust_bonus_stamp_validation = [] + profile.save() diff --git a/app/dashboard/templates/board/funder.html b/app/dashboard/templates/board/funder.html index ab3e099c12e..63817c6ad75 100644 --- a/app/dashboard/templates/board/funder.html +++ b/app/dashboard/templates/board/funder.html @@ -129,9 +129,9 @@

    You don't have any open issues right now!

    -

    Fund an Issue or check out our Funders Guide to start getting contributors for your project!

    +

    Fund an Issue or check out our Funders Guide to start getting contributors for your project!

    Have any questions? Chat with us on Slack!

    - Fund an Issue + Fund an Issue diff --git a/app/dashboard/templates/bounty/bounty_progress_bar.html b/app/dashboard/templates/bounty/bounty_progress_bar.html new file mode 100644 index 00000000000..88530b61706 --- /dev/null +++ b/app/dashboard/templates/bounty/bounty_progress_bar.html @@ -0,0 +1,24 @@ + + + diff --git a/app/dashboard/templates/bounty/change.html b/app/dashboard/templates/bounty/change.html index c19c2701546..00f3af0b9e1 100644 --- a/app/dashboard/templates/bounty/change.html +++ b/app/dashboard/templates/bounty/change.html @@ -21,7 +21,17 @@ {% include 'shared/head.html' %} {% include 'shared/cards.html' %} {% bundle css file bounty_change %} + + + + + + + + + + {% endbundle %} @@ -31,93 +41,112 @@ {% include 'shared/top_nav.html' with class='d-md-flex' %} {% include 'shared/nav.html' %} -
    -
    -
    -
    -
    -
    -
    -

    {% trans "Change Bounty Details" %}

    - -
    - {% include 'shared/issue_details.html' %} -
    - -
    - {% include 'shared/bounty_details.html' %} -
    - -
    - {% include 'shared/bounty_categories.html' %} -
    - -
    - {% include 'shared/bounty_keywords.html' %} -
    - -
    - {% include 'shared/reserved.html' %} -
    - - {% if is_bounties_network %} -
    - {% include 'shared/featured.html' %} -
    - {% endif %} - - {% if not is_bounties_network %} -
    - -
    -
    - - -
    -
    - - -
    -
    - - -
    -
    - - -
    -
    - - -
    - {% endif %} +
    +
    + {% include './bounty_progress_bar.html' %} +
    +
    +

    Need help? Check out our Funder + Guide

    +
    -
    - -
    + +
    + + {% include './new_bounty_step_1.html' %} + {% include './new_bounty_step_2.html' %} + {% include './new_bounty_step_3.html' %} + {% include './new_bounty_step_4.html' %} + {% include './new_bounty_step_5.html' %} - -
    -
    -
    -
    +
    + + + + {% include 'shared/footer.html' %} {% include 'shared/footer_scripts.html' with slim=1 %} {% include 'shared/current_profile.html' %} + {% include 'grants/components/form_wrapper.html' %}
    + + + + + + {% bundle merge_js file change_bounty_libs %} + + + {% endbundle %} + diff --git a/app/dashboard/templates/bounty/details.html b/app/dashboard/templates/bounty/details.html index 0bafda1add8..e864701f2d5 100644 --- a/app/dashboard/templates/bounty/details.html +++ b/app/dashboard/templates/bounty/details.html @@ -49,7 +49,7 @@

    {% trans "No funded issue found." %}

    {% url 'explorer' as explorerurl %}{% blocktrans %}Check out the Issue Explorer{% endblocktrans %}


    {% trans "Be the OSS Funding you wish to see in the world." %}
    -

    {% url 'new_funding' as new_fundingurl %}{% blocktrans %}Looking to fund some work? You can submit a new Funded Issue here.{% endblocktrans %}

    +

    {% url 'new_bounty' as new_fundingurl %}{% blocktrans %}Looking to fund some work? You can submit a new Funded Issue here.{% endblocktrans %}

    @@ -531,7 +531,7 @@

    {{ noscript.keywords }}

    - {% bundle merge_js file libs %} + {% bundle merge_js file bounty_details_libs %} diff --git a/app/dashboard/templates/bounty/details2.html b/app/dashboard/templates/bounty/details2.html index e1ab39c5778..feb87bd863d 100644 --- a/app/dashboard/templates/bounty/details2.html +++ b/app/dashboard/templates/bounty/details2.html @@ -56,40 +56,56 @@
    -
    + +
    Hackathon: [[bounty.event.name]]

    [[ bounty.title ]]

    -
    +
    +

    [[keyword]]

    +
    +
    +
    +
    + +
    +
    + + +
    -
    -
    +
    WARNING: this is a [[bounty.network]] network bounty, and is NOT real money. To see mainnet bounties, go to the bounty explorer and search for mainnet bounties.
    @@ -98,15 +114,6 @@

    [[ bounty.title ]

    -
    - {% trans "Time left" %} - - Expired - More than a year - -
    {% trans "Opened" %}
    +
    +
    + {% trans "Submission Cutoff Date" %} + Never expires + Expired + More than a year + +
    + +
    + {% trans "Estimated Payout Date" %} + Expired + More than a year + +
    +
    + +
    + {% trans "Bounty Owners" %} + + +
    +
    +
    + +
    + [[bounty.bounty_owner_profile.handle]] +
    +
    +
    + +
    + [[owner.handle]] +
    +
    +
    + +
    + {% trans "Contacts" %} + +
    +
    + [[contact.value]] + [[contact.value]] + [[contact.value]] +
    +
    +
    +
    - -